kb-cloud-client-typescript 2.4.0-alpha.88 → 2.4.0-alpha.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/adminapi/apis/cluster-log-api.d.ts +198 -0
  2. package/dist/adminapi/apis/cluster-log-api.d.ts.map +1 -1
  3. package/dist/adminapi/apis/cluster-log-api.js +228 -0
  4. package/dist/adminapi/apis/cluster-log-api.js.map +1 -1
  5. package/dist/adminapi/apis/environment-api.d.ts +174 -0
  6. package/dist/adminapi/apis/environment-api.d.ts.map +1 -1
  7. package/dist/adminapi/apis/environment-api.js +213 -0
  8. package/dist/adminapi/apis/environment-api.js.map +1 -1
  9. package/dist/adminapi/models/index.d.ts +1 -0
  10. package/dist/adminapi/models/index.d.ts.map +1 -1
  11. package/dist/adminapi/models/index.js +1 -0
  12. package/dist/adminapi/models/index.js.map +1 -1
  13. package/dist/adminapi/models/log-retention.d.ts +49 -0
  14. package/dist/adminapi/models/log-retention.d.ts.map +1 -0
  15. package/dist/adminapi/models/log-retention.js +16 -0
  16. package/dist/adminapi/models/log-retention.js.map +1 -0
  17. package/dist/internalapi/api.d.ts +2 -0
  18. package/dist/internalapi/api.d.ts.map +1 -1
  19. package/dist/internalapi/api.js +2 -0
  20. package/dist/internalapi/api.js.map +1 -1
  21. package/dist/internalapi/apis/opsrequest-api.d.ts +121 -0
  22. package/dist/internalapi/apis/opsrequest-api.d.ts.map +1 -0
  23. package/dist/internalapi/apis/opsrequest-api.js +142 -0
  24. package/dist/internalapi/apis/opsrequest-api.js.map +1 -0
  25. package/dist/internalapi/apis/parameter-api.d.ts +128 -0
  26. package/dist/internalapi/apis/parameter-api.d.ts.map +1 -0
  27. package/dist/internalapi/apis/parameter-api.js +146 -0
  28. package/dist/internalapi/apis/parameter-api.js.map +1 -0
  29. package/dist/internalapi/apis/shared-api.d.ts +153 -0
  30. package/dist/internalapi/apis/shared-api.d.ts.map +1 -1
  31. package/dist/internalapi/apis/shared-api.js +160 -0
  32. package/dist/internalapi/apis/shared-api.js.map +1 -1
  33. package/dist/internalapi/models/index.d.ts +7 -0
  34. package/dist/internalapi/models/index.d.ts.map +1 -1
  35. package/dist/internalapi/models/index.js +7 -0
  36. package/dist/internalapi/models/index.js.map +1 -1
  37. package/dist/internalapi/models/ops-request-name.d.ts +31 -0
  38. package/dist/internalapi/models/ops-request-name.d.ts.map +1 -0
  39. package/dist/internalapi/models/ops-request-name.js +16 -0
  40. package/dist/internalapi/models/ops-request-name.js.map +1 -0
  41. package/dist/internalapi/models/parameter-item.d.ts +50 -0
  42. package/dist/internalapi/models/parameter-item.d.ts.map +1 -0
  43. package/dist/internalapi/models/parameter-item.js +16 -0
  44. package/dist/internalapi/models/parameter-item.js.map +1 -0
  45. package/dist/internalapi/models/parameter-list.d.ts +38 -0
  46. package/dist/internalapi/models/parameter-list.d.ts.map +1 -0
  47. package/dist/internalapi/models/parameter-list.js +16 -0
  48. package/dist/internalapi/models/parameter-list.js.map +1 -0
  49. package/dist/internalapi/models/parameter-prop.d.ts +85 -0
  50. package/dist/internalapi/models/parameter-prop.d.ts.map +1 -0
  51. package/dist/internalapi/models/parameter-prop.js +16 -0
  52. package/dist/internalapi/models/parameter-prop.js.map +1 -0
  53. package/dist/internalapi/models/reconfigure-create.d.ts +52 -0
  54. package/dist/internalapi/models/reconfigure-create.d.ts.map +1 -0
  55. package/dist/internalapi/models/reconfigure-create.js +16 -0
  56. package/dist/internalapi/models/reconfigure-create.js.map +1 -0
  57. package/dist/internalapi/models/task-schedule-type.d.ts +23 -0
  58. package/dist/internalapi/models/task-schedule-type.d.ts.map +1 -0
  59. package/dist/internalapi/models/task-schedule-type.js +27 -0
  60. package/dist/internalapi/models/task-schedule-type.js.map +1 -0
  61. package/dist/internalapi/models/task-schedule.d.ts +38 -0
  62. package/dist/internalapi/models/task-schedule.d.ts.map +1 -0
  63. package/dist/internalapi/models/task-schedule.js +16 -0
  64. package/dist/internalapi/models/task-schedule.js.map +1 -0
  65. package/dist/openapi/apis/cluster-log-api.d.ts +198 -0
  66. package/dist/openapi/apis/cluster-log-api.d.ts.map +1 -1
  67. package/dist/openapi/apis/cluster-log-api.js +228 -0
  68. package/dist/openapi/apis/cluster-log-api.js.map +1 -1
  69. package/dist/openapi/models/index.d.ts +1 -0
  70. package/dist/openapi/models/index.d.ts.map +1 -1
  71. package/dist/openapi/models/index.js +1 -0
  72. package/dist/openapi/models/index.js.map +1 -1
  73. package/dist/openapi/models/log-retention.d.ts +49 -0
  74. package/dist/openapi/models/log-retention.d.ts.map +1 -0
  75. package/dist/openapi/models/log-retention.js +16 -0
  76. package/dist/openapi/models/log-retention.js.map +1 -0
  77. package/package.json +1 -1
  78. package/src/adminapi/.openapi-generator/FILES +1 -0
  79. package/src/adminapi/apis/cluster-log-api.ts +352 -0
  80. package/src/adminapi/apis/environment-api.ts +316 -0
  81. package/src/adminapi/models/index.ts +1 -0
  82. package/src/adminapi/models/log-retention.ts +54 -0
  83. package/src/adminapi.yaml +227 -0
  84. package/src/internalapi/.openapi-generator/FILES +9 -0
  85. package/src/internalapi/api.ts +2 -0
  86. package/src/internalapi/apis/opsrequest-api.ts +197 -0
  87. package/src/internalapi/apis/parameter-api.ts +207 -0
  88. package/src/internalapi/apis/shared-api.ts +264 -0
  89. package/src/internalapi/models/index.ts +7 -0
  90. package/src/internalapi/models/ops-request-name.ts +36 -0
  91. package/src/internalapi/models/parameter-item.ts +57 -0
  92. package/src/internalapi/models/parameter-list.ts +45 -0
  93. package/src/internalapi/models/parameter-prop.ts +90 -0
  94. package/src/internalapi/models/reconfigure-create.ts +57 -0
  95. package/src/internalapi/models/task-schedule-type.ts +32 -0
  96. package/src/internalapi/models/task-schedule.ts +47 -0
  97. package/src/internalapi.yaml +224 -0
  98. package/src/openapi/.openapi-generator/FILES +1 -0
  99. package/src/openapi/apis/cluster-log-api.ts +352 -0
  100. package/src/openapi/models/index.ts +1 -0
  101. package/src/openapi/models/log-retention.ts +54 -0
  102. package/src/openapi.yaml +136 -0
package/src/adminapi.yaml CHANGED
@@ -7609,6 +7609,203 @@ paths:
7609
7609
  $ref: '#/components/responses/403'
7610
7610
  '500':
7611
7611
  $ref: '#/components/responses/500'
7612
+ /admin/v1/environments/{environmentName}/logs/retention:
7613
+ get:
7614
+ summary: Get environment log retention
7615
+ operationId: getEnvironmentLogRetention
7616
+ parameters:
7617
+ - in: path
7618
+ name: environmentName
7619
+ required: true
7620
+ schema:
7621
+ type: string
7622
+ tags:
7623
+ - environment
7624
+ responses:
7625
+ '200':
7626
+ description: Log retention settings
7627
+ content:
7628
+ application/json:
7629
+ schema:
7630
+ $ref: '#/components/schemas/logRetention'
7631
+ '401':
7632
+ $ref: '#/components/responses/401'
7633
+ '403':
7634
+ $ref: '#/components/responses/403'
7635
+ '404':
7636
+ $ref: '#/components/responses/404'
7637
+ '500':
7638
+ $ref: '#/components/responses/500'
7639
+ put:
7640
+ summary: Set environment log retention
7641
+ description: Replaces the current settings. Applies to the next cleanup.
7642
+ operationId: putEnvironmentLogRetention
7643
+ parameters:
7644
+ - in: path
7645
+ name: environmentName
7646
+ required: true
7647
+ schema:
7648
+ type: string
7649
+ tags:
7650
+ - environment
7651
+ requestBody:
7652
+ required: true
7653
+ content:
7654
+ application/json:
7655
+ schema:
7656
+ $ref: '#/components/schemas/logRetention'
7657
+ responses:
7658
+ '200':
7659
+ description: Log retention settings
7660
+ content:
7661
+ application/json:
7662
+ schema:
7663
+ $ref: '#/components/schemas/logRetention'
7664
+ '400':
7665
+ $ref: '#/components/responses/400'
7666
+ '401':
7667
+ $ref: '#/components/responses/401'
7668
+ '403':
7669
+ $ref: '#/components/responses/403'
7670
+ '404':
7671
+ $ref: '#/components/responses/404'
7672
+ '500':
7673
+ $ref: '#/components/responses/500'
7674
+ delete:
7675
+ summary: Reset environment log retention
7676
+ description: Removes environment settings and returns the built-in defaults.
7677
+ operationId: deleteEnvironmentLogRetention
7678
+ parameters:
7679
+ - in: path
7680
+ name: environmentName
7681
+ required: true
7682
+ schema:
7683
+ type: string
7684
+ tags:
7685
+ - environment
7686
+ responses:
7687
+ '200':
7688
+ description: Default log retention settings
7689
+ content:
7690
+ application/json:
7691
+ schema:
7692
+ $ref: '#/components/schemas/logRetention'
7693
+ '400':
7694
+ $ref: '#/components/responses/400'
7695
+ '401':
7696
+ $ref: '#/components/responses/401'
7697
+ '403':
7698
+ $ref: '#/components/responses/403'
7699
+ '404':
7700
+ $ref: '#/components/responses/404'
7701
+ '500':
7702
+ $ref: '#/components/responses/500'
7703
+ /admin/v1/organizations/{orgName}/clusters/{clusterName}/logs/retention:
7704
+ get:
7705
+ summary: Get cluster log retention
7706
+ operationId: getClusterLogRetention
7707
+ parameters:
7708
+ - in: path
7709
+ name: orgName
7710
+ required: true
7711
+ schema:
7712
+ type: string
7713
+ - in: path
7714
+ name: clusterName
7715
+ required: true
7716
+ schema:
7717
+ type: string
7718
+ tags:
7719
+ - clusterLog
7720
+ responses:
7721
+ '200':
7722
+ description: Log retention settings
7723
+ content:
7724
+ application/json:
7725
+ schema:
7726
+ $ref: '#/components/schemas/logRetention'
7727
+ '401':
7728
+ $ref: '#/components/responses/401'
7729
+ '403':
7730
+ $ref: '#/components/responses/403'
7731
+ '404':
7732
+ $ref: '#/components/responses/404'
7733
+ '500':
7734
+ $ref: '#/components/responses/500'
7735
+ put:
7736
+ summary: Set cluster log retention
7737
+ description: Replaces the current settings. Applies to the next cleanup.
7738
+ operationId: putClusterLogRetention
7739
+ parameters:
7740
+ - in: path
7741
+ name: orgName
7742
+ required: true
7743
+ schema:
7744
+ type: string
7745
+ - in: path
7746
+ name: clusterName
7747
+ required: true
7748
+ schema:
7749
+ type: string
7750
+ tags:
7751
+ - clusterLog
7752
+ requestBody:
7753
+ required: true
7754
+ content:
7755
+ application/json:
7756
+ schema:
7757
+ $ref: '#/components/schemas/logRetention'
7758
+ responses:
7759
+ '200':
7760
+ description: Log retention settings
7761
+ content:
7762
+ application/json:
7763
+ schema:
7764
+ $ref: '#/components/schemas/logRetention'
7765
+ '400':
7766
+ $ref: '#/components/responses/400'
7767
+ '401':
7768
+ $ref: '#/components/responses/401'
7769
+ '403':
7770
+ $ref: '#/components/responses/403'
7771
+ '404':
7772
+ $ref: '#/components/responses/404'
7773
+ '500':
7774
+ $ref: '#/components/responses/500'
7775
+ delete:
7776
+ summary: Reset cluster log retention
7777
+ description: Removes cluster overrides and returns the retention inherited from the environment.
7778
+ operationId: deleteClusterLogRetention
7779
+ parameters:
7780
+ - in: path
7781
+ name: orgName
7782
+ required: true
7783
+ schema:
7784
+ type: string
7785
+ - in: path
7786
+ name: clusterName
7787
+ required: true
7788
+ schema:
7789
+ type: string
7790
+ tags:
7791
+ - clusterLog
7792
+ responses:
7793
+ '200':
7794
+ description: Effective log retention settings
7795
+ content:
7796
+ application/json:
7797
+ schema:
7798
+ $ref: '#/components/schemas/logRetention'
7799
+ '400':
7800
+ $ref: '#/components/responses/400'
7801
+ '401':
7802
+ $ref: '#/components/responses/401'
7803
+ '403':
7804
+ $ref: '#/components/responses/403'
7805
+ '404':
7806
+ $ref: '#/components/responses/404'
7807
+ '500':
7808
+ $ref: '#/components/responses/500'
7612
7809
  /admin/v1/organizations/{orgName}/clusters/{clusterName}/logs/pod:
7613
7810
  get:
7614
7811
  description: Query pod logs of a cluster
@@ -34817,6 +35014,36 @@ components:
34817
35014
  type: array
34818
35015
  items:
34819
35016
  $ref: '#/components/schemas/DmsSession'
35017
+ logRetention:
35018
+ type: object
35019
+ description: Log retention in days.
35020
+ required:
35021
+ - pod
35022
+ - running
35023
+ - error
35024
+ - slow
35025
+ - audit
35026
+ properties:
35027
+ pod:
35028
+ type: integer
35029
+ format: int64
35030
+ minimum: 1
35031
+ running:
35032
+ type: integer
35033
+ format: int64
35034
+ minimum: 1
35035
+ error:
35036
+ type: integer
35037
+ format: int64
35038
+ minimum: 1
35039
+ slow:
35040
+ type: integer
35041
+ format: int64
35042
+ minimum: 1
35043
+ audit:
35044
+ type: integer
35045
+ format: int64
35046
+ minimum: 1
34820
35047
  sortType:
34821
35048
  description: Represents the type of sorting.
34822
35049
  enum:
@@ -11,6 +11,8 @@ apis/engine-api.ts
11
11
  apis/environment-api.ts
12
12
  apis/imagepullsecret-api.ts
13
13
  apis/nodeplane-api.ts
14
+ apis/opsrequest-api.ts
15
+ apis/parameter-api.ts
14
16
  apis/platform-parameter-api.ts
15
17
  apis/recycle-bin-cluster-api.ts
16
18
  apis/shared-api.ts
@@ -66,13 +68,18 @@ models/ip-pool-selection.ts
66
68
  models/koordinator-reservation-resource-class.ts
67
69
  models/localized-description.ts
68
70
  models/network-mode.ts
71
+ models/ops-request-name.ts
69
72
  models/outage-record.ts
70
73
  models/page-result.ts
71
74
  models/param-tpls-item.ts
75
+ models/parameter-item.ts
76
+ models/parameter-list.ts
77
+ models/parameter-prop.ts
72
78
  models/parameter-template-partition.ts
73
79
  models/platform-parameter-constraints.ts
74
80
  models/platform-parameter.ts
75
81
  models/postable-alert.ts
82
+ models/reconfigure-create.ts
76
83
  models/scheduling-policy-type.ts
77
84
  models/service-descriptor.ts
78
85
  models/service-ref.ts
@@ -80,3 +87,5 @@ models/static-cluster.ts
80
87
  models/storage-create.ts
81
88
  models/storage.ts
82
89
  models/tag.ts
90
+ models/task-schedule-type.ts
91
+ models/task-schedule.ts
@@ -23,6 +23,8 @@ export * from './apis/engine-api';
23
23
  export * from './apis/environment-api';
24
24
  export * from './apis/imagepullsecret-api';
25
25
  export * from './apis/nodeplane-api';
26
+ export * from './apis/opsrequest-api';
27
+ export * from './apis/parameter-api';
26
28
  export * from './apis/platform-parameter-api';
27
29
  export * from './apis/recycle-bin-cluster-api';
28
30
  export * from './apis/slaapi';
@@ -0,0 +1,197 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KubeBlocks Cloud Internal API
5
+ * The Internal API is using for interaction of ApeCloud platform microservices.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { APIErrorResponse } from '../models';
26
+ // @ts-ignore
27
+ import type { OpsRequestName } from '../models';
28
+ // @ts-ignore
29
+ import type { ReconfigureCreate } from '../models';
30
+ /**
31
+ * OpsrequestApi - axios parameter creator
32
+ * @export
33
+ */
34
+ export const OpsrequestApiAxiosParamCreator = function (configuration?: Configuration) {
35
+ return {
36
+ /**
37
+ *
38
+ * @summary Update cluster configuration
39
+ * @param {string} orgName name of the Org
40
+ * @param {string} clusterName name of the KubeBlocks cluster
41
+ * @param {ReconfigureCreate} body
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ reconfigureCluster: async (orgName: string, clusterName: string, body: ReconfigureCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ // verify required parameter 'orgName' is not null or undefined
47
+ assertParamExists('reconfigureCluster', 'orgName', orgName)
48
+ // verify required parameter 'clusterName' is not null or undefined
49
+ assertParamExists('reconfigureCluster', 'clusterName', clusterName)
50
+ // verify required parameter 'body' is not null or undefined
51
+ assertParamExists('reconfigureCluster', 'body', body)
52
+ const localVarPath = `/internal/v1/organizations/{orgName}/clusters/{clusterName}/reconfigure`
53
+ .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
54
+ .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
55
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57
+ let baseOptions;
58
+ if (configuration) {
59
+ baseOptions = configuration.baseOptions;
60
+ }
61
+
62
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
63
+ const localVarHeaderParameter = {} as any;
64
+ const localVarQueryParameter = {} as any;
65
+
66
+ // authentication BasicAuth required
67
+ // http basic authentication required
68
+ setBasicAuthToObject(localVarRequestOptions, configuration)
69
+
70
+
71
+
72
+ localVarHeaderParameter['Content-Type'] = 'application/json';
73
+
74
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
77
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
78
+
79
+ return {
80
+ url: toPathString(localVarUrlObj),
81
+ options: localVarRequestOptions,
82
+ };
83
+ },
84
+ }
85
+ };
86
+
87
+ /**
88
+ * OpsrequestApi - functional programming interface
89
+ * @export
90
+ */
91
+ export const OpsrequestApiFp = function(configuration?: Configuration) {
92
+ const localVarAxiosParamCreator = OpsrequestApiAxiosParamCreator(configuration)
93
+ return {
94
+ /**
95
+ *
96
+ * @summary Update cluster configuration
97
+ * @param {string} orgName name of the Org
98
+ * @param {string} clusterName name of the KubeBlocks cluster
99
+ * @param {ReconfigureCreate} body
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ async reconfigureCluster(orgName: string, clusterName: string, body: ReconfigureCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
104
+ const localVarAxiosArgs = await localVarAxiosParamCreator.reconfigureCluster(orgName, clusterName, body, options);
105
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
106
+ const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.reconfigureCluster']?.[localVarOperationServerIndex]?.url;
107
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
108
+ },
109
+ }
110
+ };
111
+
112
+ /**
113
+ * OpsrequestApi - factory interface
114
+ * @export
115
+ */
116
+ export const OpsrequestApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
117
+ const localVarFp = OpsrequestApiFp(configuration)
118
+ return {
119
+ /**
120
+ *
121
+ * @summary Update cluster configuration
122
+ * @param {OpsrequestApiReconfigureClusterRequest} requestParameters Request parameters.
123
+ * @param {*} [options] Override http request option.
124
+ * @throws {RequiredError}
125
+ */
126
+ reconfigureCluster(requestParameters: OpsrequestApiReconfigureClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
127
+ return localVarFp.reconfigureCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
128
+ },
129
+ };
130
+ };
131
+
132
+ /**
133
+ * OpsrequestApi - interface
134
+ * @export
135
+ * @interface OpsrequestApi
136
+ */
137
+ export interface OpsrequestApiInterface {
138
+ /**
139
+ *
140
+ * @summary Update cluster configuration
141
+ * @param {OpsrequestApiReconfigureClusterRequest} requestParameters Request parameters.
142
+ * @param {*} [options] Override http request option.
143
+ * @throws {RequiredError}
144
+ * @memberof OpsrequestApiInterface
145
+ */
146
+ reconfigureCluster(requestParameters: OpsrequestApiReconfigureClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;
147
+
148
+ }
149
+
150
+ /**
151
+ * Request parameters for reconfigureCluster operation in OpsrequestApi.
152
+ * @export
153
+ * @interface OpsrequestApiReconfigureClusterRequest
154
+ */
155
+ export interface OpsrequestApiReconfigureClusterRequest {
156
+ /**
157
+ * name of the Org
158
+ * @type {string}
159
+ * @memberof OpsrequestApiReconfigureCluster
160
+ */
161
+ readonly orgName: string
162
+
163
+ /**
164
+ * name of the KubeBlocks cluster
165
+ * @type {string}
166
+ * @memberof OpsrequestApiReconfigureCluster
167
+ */
168
+ readonly clusterName: string
169
+
170
+ /**
171
+ *
172
+ * @type {ReconfigureCreate}
173
+ * @memberof OpsrequestApiReconfigureCluster
174
+ */
175
+ readonly body: ReconfigureCreate
176
+ }
177
+
178
+ /**
179
+ * OpsrequestApi - object-oriented interface
180
+ * @export
181
+ * @class OpsrequestApi
182
+ * @extends {BaseAPI}
183
+ */
184
+ export class OpsrequestApi extends BaseAPI implements OpsrequestApiInterface {
185
+ /**
186
+ *
187
+ * @summary Update cluster configuration
188
+ * @param {OpsrequestApiReconfigureClusterRequest} requestParameters Request parameters.
189
+ * @param {*} [options] Override http request option.
190
+ * @throws {RequiredError}
191
+ * @memberof OpsrequestApi
192
+ */
193
+ public reconfigureCluster(requestParameters: OpsrequestApiReconfigureClusterRequest, options?: RawAxiosRequestConfig) {
194
+ return OpsrequestApiFp(this.configuration).reconfigureCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
195
+ }
196
+ }
197
+
@@ -0,0 +1,207 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KubeBlocks Cloud Internal API
5
+ * The Internal API is using for interaction of ApeCloud platform microservices.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { APIErrorResponse } from '../models';
26
+ // @ts-ignore
27
+ import type { ParameterList } from '../models';
28
+ /**
29
+ * ParameterApi - axios parameter creator
30
+ * @export
31
+ */
32
+ export const ParameterApiAxiosParamCreator = function (configuration?: Configuration) {
33
+ return {
34
+ /**
35
+ *
36
+ * @summary List parameter properties of the cluster
37
+ * @param {string} orgName name of the organization
38
+ * @param {string} clusterName name of the cluster
39
+ * @param {string} [component] component type
40
+ * @param {boolean} [rawContent] whether to return the raw template content
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ listParameterProps: async (orgName: string, clusterName: string, component?: string, rawContent?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
45
+ // verify required parameter 'orgName' is not null or undefined
46
+ assertParamExists('listParameterProps', 'orgName', orgName)
47
+ // verify required parameter 'clusterName' is not null or undefined
48
+ assertParamExists('listParameterProps', 'clusterName', clusterName)
49
+ const localVarPath = `/internal/v1/organizations/{orgName}/clusters/{clusterName}/parameters`
50
+ .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
51
+ .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ }
58
+
59
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
60
+ const localVarHeaderParameter = {} as any;
61
+ const localVarQueryParameter = {} as any;
62
+
63
+ // authentication BasicAuth required
64
+ // http basic authentication required
65
+ setBasicAuthToObject(localVarRequestOptions, configuration)
66
+
67
+ if (component !== undefined) {
68
+ localVarQueryParameter['component'] = component;
69
+ }
70
+
71
+ if (rawContent !== undefined) {
72
+ localVarQueryParameter['rawContent'] = rawContent;
73
+ }
74
+
75
+
76
+
77
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
78
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
79
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
80
+
81
+ return {
82
+ url: toPathString(localVarUrlObj),
83
+ options: localVarRequestOptions,
84
+ };
85
+ },
86
+ }
87
+ };
88
+
89
+ /**
90
+ * ParameterApi - functional programming interface
91
+ * @export
92
+ */
93
+ export const ParameterApiFp = function(configuration?: Configuration) {
94
+ const localVarAxiosParamCreator = ParameterApiAxiosParamCreator(configuration)
95
+ return {
96
+ /**
97
+ *
98
+ * @summary List parameter properties of the cluster
99
+ * @param {string} orgName name of the organization
100
+ * @param {string} clusterName name of the cluster
101
+ * @param {string} [component] component type
102
+ * @param {boolean} [rawContent] whether to return the raw template content
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ async listParameterProps(orgName: string, clusterName: string, component?: string, rawContent?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParameterList>> {
107
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listParameterProps(orgName, clusterName, component, rawContent, options);
108
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
109
+ const localVarOperationServerBasePath = operationServerMap['ParameterApi.listParameterProps']?.[localVarOperationServerIndex]?.url;
110
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
111
+ },
112
+ }
113
+ };
114
+
115
+ /**
116
+ * ParameterApi - factory interface
117
+ * @export
118
+ */
119
+ export const ParameterApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
120
+ const localVarFp = ParameterApiFp(configuration)
121
+ return {
122
+ /**
123
+ *
124
+ * @summary List parameter properties of the cluster
125
+ * @param {ParameterApiListParameterPropsRequest} requestParameters Request parameters.
126
+ * @param {*} [options] Override http request option.
127
+ * @throws {RequiredError}
128
+ */
129
+ listParameterProps(requestParameters: ParameterApiListParameterPropsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParameterList> {
130
+ return localVarFp.listParameterProps(requestParameters.orgName, requestParameters.clusterName, requestParameters.component, requestParameters.rawContent, options).then((request) => request(axios, basePath));
131
+ },
132
+ };
133
+ };
134
+
135
+ /**
136
+ * ParameterApi - interface
137
+ * @export
138
+ * @interface ParameterApi
139
+ */
140
+ export interface ParameterApiInterface {
141
+ /**
142
+ *
143
+ * @summary List parameter properties of the cluster
144
+ * @param {ParameterApiListParameterPropsRequest} requestParameters Request parameters.
145
+ * @param {*} [options] Override http request option.
146
+ * @throws {RequiredError}
147
+ * @memberof ParameterApiInterface
148
+ */
149
+ listParameterProps(requestParameters: ParameterApiListParameterPropsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParameterList>;
150
+
151
+ }
152
+
153
+ /**
154
+ * Request parameters for listParameterProps operation in ParameterApi.
155
+ * @export
156
+ * @interface ParameterApiListParameterPropsRequest
157
+ */
158
+ export interface ParameterApiListParameterPropsRequest {
159
+ /**
160
+ * name of the organization
161
+ * @type {string}
162
+ * @memberof ParameterApiListParameterProps
163
+ */
164
+ readonly orgName: string
165
+
166
+ /**
167
+ * name of the cluster
168
+ * @type {string}
169
+ * @memberof ParameterApiListParameterProps
170
+ */
171
+ readonly clusterName: string
172
+
173
+ /**
174
+ * component type
175
+ * @type {string}
176
+ * @memberof ParameterApiListParameterProps
177
+ */
178
+ readonly component?: string
179
+
180
+ /**
181
+ * whether to return the raw template content
182
+ * @type {boolean}
183
+ * @memberof ParameterApiListParameterProps
184
+ */
185
+ readonly rawContent?: boolean
186
+ }
187
+
188
+ /**
189
+ * ParameterApi - object-oriented interface
190
+ * @export
191
+ * @class ParameterApi
192
+ * @extends {BaseAPI}
193
+ */
194
+ export class ParameterApi extends BaseAPI implements ParameterApiInterface {
195
+ /**
196
+ *
197
+ * @summary List parameter properties of the cluster
198
+ * @param {ParameterApiListParameterPropsRequest} requestParameters Request parameters.
199
+ * @param {*} [options] Override http request option.
200
+ * @throws {RequiredError}
201
+ * @memberof ParameterApi
202
+ */
203
+ public listParameterProps(requestParameters: ParameterApiListParameterPropsRequest, options?: RawAxiosRequestConfig) {
204
+ return ParameterApiFp(this.configuration).listParameterProps(requestParameters.orgName, requestParameters.clusterName, requestParameters.component, requestParameters.rawContent, options).then((request) => request(this.axios, this.basePath));
205
+ }
206
+ }
207
+