Skip to content

Commit

Permalink
update to v2.10.0 schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Sczlog committed Aug 1, 2023
1 parent 812ec2f commit ce6ac3b
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 3 deletions.
12 changes: 10 additions & 2 deletions RELEASENOTE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# RELEASE NOTE

v2.9.1 release (tower version 3.0.0)
## release 日期 2023-08-01

v2.10.0 release (tower version 3.1.0)

- feature: [AlertNotifierApi] 支持更新,删除以及创建新的报警通知配置

## release 日期 2023-07-18

v2.9.1 release (tower version 3.0.0)

- optimize: 优化 CloudTowerClient LDAP 登陆,当使用 UserSource.LDAP 作为 UserSource 时,自动切换成当前的 LDAP 登录源进行登陆,减少迁移成本。

v2.9.0 release (tower version 3.0.0)
## release 日期 2023-07-03

v2.9.0 release (tower version 3.0.0)

- feature: [SecurityGroupApi] 支持创建,更新与删除安全组
- feature: [SecurityPolicy] 支持创建,更新与删除自定义安全策略
- feature: [OvfApi], [VmExportFileApi], [VmApi] 支持虚拟机的导入与导出
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudtower-node-sdk",
"version": "2.9.1",
"version": "2.10.0",
"description": "cloudtower operation api",
"main": "lib/index.js",
"typings": "typings/index.d.ts",
Expand Down
73 changes: 73 additions & 0 deletions src/generated/AlertNotifier.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import {
AlertNotifier,
AlertNotifierConnection,
AlertNotifierCreationParams,
AlertNotifierManyUpdationParams,
AlertNotifierUpdationParams,
DeleteAlertNotifierParams,
ErrorBody,
GetAlertNotifiersConnectionRequestBody,
GetAlertNotifiersRequestBody,
WithTaskAlertNotifier,
WithTaskDeleteAlertNotifier,
} from "./data-contracts";
import { ContentType, HttpClient, RequestParams } from "./http-client";

Expand Down Expand Up @@ -66,6 +70,29 @@ export class AlertNotifierApi<SecurityDataType = unknown> {
format: "json",
...params,
});
/**
* No description
*
* @tags AlertNotifier
* @name CreateAlertNotifier
* @request POST:/create-alert-notifier
* @response `200` `(WithTaskAlertNotifier)[]`
* @response `400` `ErrorBody` Bad request
* @response `404` `ErrorBody` Not found
* @response `500` `ErrorBody` Server error
*/
createAlertNotifier = (
data: AlertNotifierCreationParams[],
params: RequestParams = {}
) =>
this.http.request<WithTaskAlertNotifier[], ErrorBody>({
path: `/create-alert-notifier`,
method: "POST",
body: data,
type: ContentType.Json,
format: "json",
...params,
});
/**
* No description
*
Expand All @@ -89,4 +116,50 @@ export class AlertNotifierApi<SecurityDataType = unknown> {
format: "json",
...params,
});
/**
* No description
*
* @tags AlertNotifier
* @name UpdateManyAlertNotifiers
* @request POST:/update-many-alert-notifiers
* @response `200` `(WithTaskAlertNotifier)[]`
* @response `400` `ErrorBody` Bad request
* @response `404` `ErrorBody` Not found
* @response `500` `ErrorBody` Server error
*/
updateManyAlertNotifiers = (
data: AlertNotifierManyUpdationParams,
params: RequestParams = {}
) =>
this.http.request<WithTaskAlertNotifier[], ErrorBody>({
path: `/update-many-alert-notifiers`,
method: "POST",
body: data,
type: ContentType.Json,
format: "json",
...params,
});
/**
* No description
*
* @tags AlertNotifier
* @name DeleteAlertNotifier
* @request POST:/delete-alert-notifier
* @response `200` `(WithTaskDeleteAlertNotifier)[]`
* @response `400` `ErrorBody` Bad request
* @response `404` `ErrorBody` Not found
* @response `500` `ErrorBody` Server error
*/
deleteAlertNotifier = (
data: DeleteAlertNotifierParams,
params: RequestParams = {}
) =>
this.http.request<WithTaskDeleteAlertNotifier[], ErrorBody>({
path: `/delete-alert-notifier`,
method: "POST",
body: data,
type: ContentType.Json,
format: "json",
...params,
});
}
171 changes: 171 additions & 0 deletions src/generated/data-contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16844,6 +16844,7 @@ export enum ROLE_ACTION {
UPGRADE_EVEROUTE_CLUSTER = "UPGRADE_EVEROUTE_CLUSTER",
MANAGE_EVEROUTE_CLUSTER_ASSOCIATION = "MANAGE_EVEROUTE_CLUSTER_ASSOCIATION",
MANAGE_EVEROUTE_CLUSTER_GLOBAL_POLICY = "MANAGE_EVEROUTE_CLUSTER_GLOBAL_POLICY",
MANAGE_EVEROUTE_NETWORK_POLICY_RULE_SERVICE = "MANAGE_EVEROUTE_NETWORK_POLICY_RULE_SERVICE",
MANAGE_LDAP_AD_CONFIG = "MANAGE_LDAP_AD_CONFIG",
MANAGE_MFA_CONFIG = "MANAGE_MFA_CONFIG",
MANAGE_DEFAULT_LOGIN_OPTION = "MANAGE_DEFAULT_LOGIN_OPTION",
Expand Down Expand Up @@ -17004,7 +17005,9 @@ export interface NestedSecurityPolicyApply {
}

export enum NetworkPolicyRulePortProtocol {
ALG = "ALG",
ICMP = "ICMP",
IPIP = "IPIP",
TCP = "TCP",
UDP = "UDP",
}
Expand Down Expand Up @@ -22568,6 +22571,11 @@ export enum NotifierSecurityMode {
UNSPECIFIED = "UNSPECIFIED",
}

export interface NestedSmtpServer {
id: string;
name: string;
}

export interface AlertNotifier {
clusters?: NestedCluster[] | null;
disabled: boolean;
Expand All @@ -22579,6 +22587,7 @@ export interface AlertNotifier {
name?: string | null;
notice_severities: string[];
security_mode?: NotifierSecurityMode | null;
smtp_server_config?: NestedSmtpServer | null;
smtp_server_host?: string | null;

/** @format int32 */
Expand Down Expand Up @@ -22672,6 +22681,7 @@ export interface AlertNotifierWhereInput {
security_mode_in?: NotifierSecurityMode[] | null;
security_mode_not?: NotifierSecurityMode | null;
security_mode_not_in?: NotifierSecurityMode[] | null;
smtp_server_config?: SmtpServerWhereInput | null;
smtp_server_host?: string | null;
smtp_server_host_contains?: string | null;
smtp_server_host_ends_with?: string | null;
Expand Down Expand Up @@ -22722,6 +22732,128 @@ export interface AlertNotifierWhereInput {
username_starts_with?: string | null;
}

export interface SmtpServerWhereInput {
AND?: SmtpServerWhereInput[] | null;
description?: string | null;
description_contains?: string | null;
description_ends_with?: string | null;
description_gt?: string | null;
description_gte?: string | null;
description_in?: string[] | null;
description_lt?: string | null;
description_lte?: string | null;
description_not?: string | null;
description_not_contains?: string | null;
description_not_ends_with?: string | null;
description_not_in?: string[] | null;
description_not_starts_with?: string | null;
description_starts_with?: string | null;
host?: string | null;
host_contains?: string | null;
host_ends_with?: string | null;
host_gt?: string | null;
host_gte?: string | null;
host_in?: string[] | null;
host_lt?: string | null;
host_lte?: string | null;
host_not?: string | null;
host_not_contains?: string | null;
host_not_ends_with?: string | null;
host_not_in?: string[] | null;
host_not_starts_with?: string | null;
host_starts_with?: string | null;
id?: string | null;
id_contains?: string | null;
id_ends_with?: string | null;
id_gt?: string | null;
id_gte?: string | null;
id_in?: string[] | null;
id_lt?: string | null;
id_lte?: string | null;
id_not?: string | null;
id_not_contains?: string | null;
id_not_ends_with?: string | null;
id_not_in?: string[] | null;
id_not_starts_with?: string | null;
id_starts_with?: string | null;
is_record_password?: boolean | null;
is_record_password_not?: boolean | null;
name?: string | null;
name_contains?: string | null;
name_ends_with?: string | null;
name_gt?: string | null;
name_gte?: string | null;
name_in?: string[] | null;
name_lt?: string | null;
name_lte?: string | null;
name_not?: string | null;
name_not_contains?: string | null;
name_not_ends_with?: string | null;
name_not_in?: string[] | null;
name_not_starts_with?: string | null;
name_starts_with?: string | null;
NOT?: SmtpServerWhereInput[] | null;
OR?: SmtpServerWhereInput[] | null;
password?: string | null;
password_contains?: string | null;
password_ends_with?: string | null;
password_gt?: string | null;
password_gte?: string | null;
password_in?: string[] | null;
password_lt?: string | null;
password_lte?: string | null;
password_not?: string | null;
password_not_contains?: string | null;
password_not_ends_with?: string | null;
password_not_in?: string[] | null;
password_not_starts_with?: string | null;
password_starts_with?: string | null;

/** @format int32 */
port?: number | null;

/** @format int32 */
port_gt?: number | null;

/** @format int32 */
port_gte?: number | null;
port_in?: number[] | null;

/** @format int32 */
port_lt?: number | null;

/** @format int32 */
port_lte?: number | null;

/** @format int32 */
port_not?: number | null;
port_not_in?: number[] | null;
secure_mode?: SmtpSecureMode | null;
secure_mode_in?: SmtpSecureMode[] | null;
secure_mode_not?: SmtpSecureMode | null;
secure_mode_not_in?: SmtpSecureMode[] | null;
username?: string | null;
username_contains?: string | null;
username_ends_with?: string | null;
username_gt?: string | null;
username_gte?: string | null;
username_in?: string[] | null;
username_lt?: string | null;
username_lte?: string | null;
username_not?: string | null;
username_not_contains?: string | null;
username_not_ends_with?: string | null;
username_not_in?: string[] | null;
username_not_starts_with?: string | null;
username_starts_with?: string | null;
}

export enum SmtpSecureMode {
SSL = "SSL",
STARTTLS = "STARTTLS",
UNSPECIFIED = "UNSPECIFIED",
}

export interface GetAlertNotifiersRequestBody {
after?: string | null;
before?: string | null;
Expand Down Expand Up @@ -28244,10 +28376,49 @@ export interface WithTaskAlertNotifier {
data: AlertNotifier;
}

export interface AlertNotifierCreationParams {
notice_severities: ("CRITICAL" | "NOTICE" | "INFO")[];
language_code: NotifierLanguageCode;
email_tos: string[];
email_from: string;
disabled: boolean;
smtp_server_id: string;
name: string;
clusters: ClusterWhereInput;
}

export interface AlertNotifierUpdationParams {
notice_severities?: ("CRITICAL" | "NOTICE" | "INFO")[];
language_code?: NotifierLanguageCode;
email_tos?: string[];
email_from?: string;
disabled?: boolean;
smtp_server_id?: string;
name?: string;
clusters?: ClusterWhereInput;
id?: string;
}

export interface AlertNotifierManyUpdationParams {
notice_severities?: ("CRITICAL" | "NOTICE" | "INFO")[];
language_code?: NotifierLanguageCode;
email_tos?: string[];
email_from?: string;
disabled?: boolean;
smtp_server_id?: string;
name?: string;
where: AlertNotifierWhereInput;
}

export interface DeleteAlertNotifier {
id: string;
}

export interface WithTaskDeleteAlertNotifier {
task_id?: string | null;
data: DeleteAlertNotifier;
}

export interface DeleteAlertNotifierParams {
where: AlertNotifierWhereInput;
}

0 comments on commit ce6ac3b

Please sign in to comment.