@scaleway/sdk 3.0.0-alpha.0 → 3.1.1

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 (214) hide show
  1. package/dist/index.gen.d.ts +362 -0
  2. package/dist/index.gen.js +323 -0
  3. package/package.json +71 -25
  4. package/README.md +0 -46
  5. package/dist/api/account/index.js +0 -4
  6. package/dist/api/account/v2/api.gen.js +0 -147
  7. package/dist/api/account/v2/index.gen.js +0 -4
  8. package/dist/api/account/v2/marshalling.gen.js +0 -39
  9. package/dist/api/account/v3/api.gen.js +0 -129
  10. package/dist/api/account/v3/index.gen.js +0 -6
  11. package/dist/api/account/v3/marshalling.gen.js +0 -39
  12. package/dist/api/account/v3/validation-rules.gen.js +0 -39
  13. package/dist/api/applesilicon/index.js +0 -2
  14. package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
  15. package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
  16. package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
  17. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
  18. package/dist/api/baremetal/index.js +0 -2
  19. package/dist/api/baremetal/v1/api.gen.js +0 -523
  20. package/dist/api/baremetal/v1/api.utils.js +0 -27
  21. package/dist/api/baremetal/v1/content.gen.js +0 -13
  22. package/dist/api/baremetal/v1/index.js +0 -5
  23. package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
  24. package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
  25. package/dist/api/billing/index.js +0 -2
  26. package/dist/api/billing/v2alpha1/api.gen.js +0 -80
  27. package/dist/api/billing/v2alpha1/index.gen.js +0 -4
  28. package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
  29. package/dist/api/block/index.js +0 -2
  30. package/dist/api/block/v1alpha1/api.gen.js +0 -245
  31. package/dist/api/block/v1alpha1/content.gen.js +0 -13
  32. package/dist/api/block/v1alpha1/index.gen.js +0 -7
  33. package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
  34. package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
  35. package/dist/api/cockpit/index.js +0 -2
  36. package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
  37. package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
  38. package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
  39. package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
  40. package/dist/api/container/index.js +0 -2
  41. package/dist/api/container/v1beta1/api.gen.js +0 -549
  42. package/dist/api/container/v1beta1/content.gen.js +0 -22
  43. package/dist/api/container/v1beta1/index.gen.js +0 -5
  44. package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
  45. package/dist/api/document_db/index.js +0 -2
  46. package/dist/api/document_db/v1beta1/api.gen.js +0 -830
  47. package/dist/api/document_db/v1beta1/content.gen.js +0 -19
  48. package/dist/api/document_db/v1beta1/index.gen.js +0 -7
  49. package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
  50. package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
  51. package/dist/api/domain/index.js +0 -2
  52. package/dist/api/domain/v2beta1/api.gen.js +0 -875
  53. package/dist/api/domain/v2beta1/content.gen.js +0 -28
  54. package/dist/api/domain/v2beta1/index.gen.js +0 -7
  55. package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
  56. package/dist/api/flexibleip/index.js +0 -2
  57. package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
  58. package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
  59. package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
  60. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
  61. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
  62. package/dist/api/function/index.js +0 -2
  63. package/dist/api/function/v1beta1/api.gen.js +0 -560
  64. package/dist/api/function/v1beta1/content.gen.js +0 -22
  65. package/dist/api/function/v1beta1/index.gen.js +0 -5
  66. package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
  67. package/dist/api/iam/index.js +0 -2
  68. package/dist/api/iam/v1alpha1/api.gen.js +0 -799
  69. package/dist/api/iam/v1alpha1/index.gen.js +0 -6
  70. package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
  71. package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
  72. package/dist/api/instance/index.js +0 -2
  73. package/dist/api/instance/v1/api.gen.js +0 -1003
  74. package/dist/api/instance/v1/api.utils.js +0 -369
  75. package/dist/api/instance/v1/content.gen.js +0 -31
  76. package/dist/api/instance/v1/index.js +0 -2
  77. package/dist/api/instance/v1/marshalling.gen.js +0 -1206
  78. package/dist/api/instance/v1/marshalling.utils.js +0 -63
  79. package/dist/api/iot/index.js +0 -2
  80. package/dist/api/iot/v1/api.gen.js +0 -581
  81. package/dist/api/iot/v1/content.gen.js +0 -7
  82. package/dist/api/iot/v1/index.gen.js +0 -5
  83. package/dist/api/iot/v1/marshalling.gen.js +0 -388
  84. package/dist/api/ipfs/index.js +0 -2
  85. package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
  86. package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
  87. package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
  88. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
  89. package/dist/api/k8s/index.js +0 -2
  90. package/dist/api/k8s/v1/api.gen.js +0 -454
  91. package/dist/api/k8s/v1/api.utils.js +0 -13
  92. package/dist/api/k8s/v1/content.gen.js +0 -13
  93. package/dist/api/k8s/v1/index.js +0 -4
  94. package/dist/api/k8s/v1/marshalling.gen.js +0 -333
  95. package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
  96. package/dist/api/lb/index.js +0 -2
  97. package/dist/api/lb/v1/api.gen.js +0 -1669
  98. package/dist/api/lb/v1/api.utils.js +0 -81
  99. package/dist/api/lb/v1/content.gen.js +0 -16
  100. package/dist/api/lb/v1/index.js +0 -2
  101. package/dist/api/lb/v1/marshalling.gen.js +0 -923
  102. package/dist/api/marketplace/index.js +0 -4
  103. package/dist/api/marketplace/v1/api.gen.js +0 -60
  104. package/dist/api/marketplace/v1/index.gen.js +0 -4
  105. package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
  106. package/dist/api/marketplace/v2/api.gen.js +0 -162
  107. package/dist/api/marketplace/v2/index.gen.js +0 -4
  108. package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
  109. package/dist/api/mnq/index.js +0 -2
  110. package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
  111. package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
  112. package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
  113. package/dist/api/rdb/index.js +0 -2
  114. package/dist/api/rdb/v1/api.gen.js +0 -972
  115. package/dist/api/rdb/v1/content.gen.js +0 -22
  116. package/dist/api/rdb/v1/index.gen.js +0 -7
  117. package/dist/api/rdb/v1/marshalling.gen.js +0 -636
  118. package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
  119. package/dist/api/redis/index.js +0 -2
  120. package/dist/api/redis/v1/api.gen.js +0 -389
  121. package/dist/api/redis/v1/content.gen.js +0 -7
  122. package/dist/api/redis/v1/index.gen.js +0 -5
  123. package/dist/api/redis/v1/marshalling.gen.js +0 -259
  124. package/dist/api/registry/index.js +0 -2
  125. package/dist/api/registry/v1/api.gen.js +0 -252
  126. package/dist/api/registry/v1/content.gen.js +0 -13
  127. package/dist/api/registry/v1/index.gen.js +0 -5
  128. package/dist/api/registry/v1/marshalling.gen.js +0 -106
  129. package/dist/api/secret/index.js +0 -2
  130. package/dist/api/secret/v1alpha1/api.gen.js +0 -415
  131. package/dist/api/secret/v1alpha1/index.gen.js +0 -4
  132. package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
  133. package/dist/api/tem/index.js +0 -2
  134. package/dist/api/tem/v1alpha1/api.gen.js +0 -229
  135. package/dist/api/tem/v1alpha1/content.gen.js +0 -10
  136. package/dist/api/tem/v1alpha1/index.gen.js +0 -5
  137. package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
  138. package/dist/api/test/index.js +0 -2
  139. package/dist/api/test/v1/api.gen.js +0 -152
  140. package/dist/api/test/v1/content.gen.js +0 -7
  141. package/dist/api/test/v1/index.gen.js +0 -5
  142. package/dist/api/test/v1/marshalling.gen.js +0 -79
  143. package/dist/api/vpc/index.js +0 -4
  144. package/dist/api/vpc/v1/api.gen.js +0 -110
  145. package/dist/api/vpc/v1/index.gen.js +0 -4
  146. package/dist/api/vpc/v1/marshalling.gen.js +0 -44
  147. package/dist/api/vpc/v2/api.gen.js +0 -276
  148. package/dist/api/vpc/v2/index.gen.js +0 -4
  149. package/dist/api/vpc/v2/marshalling.gen.js +0 -135
  150. package/dist/api/vpcgw/index.js +0 -2
  151. package/dist/api/vpcgw/v1/api.gen.js +0 -669
  152. package/dist/api/vpcgw/v1/content.gen.js +0 -10
  153. package/dist/api/vpcgw/v1/index.gen.js +0 -5
  154. package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
  155. package/dist/api/webhosting/index.js +0 -2
  156. package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
  157. package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
  158. package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
  159. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
  160. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
  161. package/dist/helpers/is-browser.js +0 -5
  162. package/dist/helpers/is-response.js +0 -10
  163. package/dist/helpers/json.js +0 -11
  164. package/dist/helpers/marshalling.js +0 -130
  165. package/dist/index.cjs +0 -24364
  166. package/dist/index.d.ts +0 -27584
  167. package/dist/index.js +0 -69
  168. package/dist/internal/async/interval-retrier.js +0 -105
  169. package/dist/internal/async/sleep.js +0 -13
  170. package/dist/internal/interceptors/composer.js +0 -46
  171. package/dist/internal/interceptors/helpers.js +0 -32
  172. package/dist/internal/logger/console-logger.js +0 -38
  173. package/dist/internal/logger/index.js +0 -41
  174. package/dist/internal/logger/level-resolver.js +0 -13
  175. package/dist/internal/validations/string-validation.js +0 -38
  176. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
  177. package/dist/scw/api.js +0 -12
  178. package/dist/scw/auth.js +0 -68
  179. package/dist/scw/client-ini-factory.js +0 -174
  180. package/dist/scw/client-ini-profile.js +0 -54
  181. package/dist/scw/client-settings.js +0 -78
  182. package/dist/scw/client.js +0 -98
  183. package/dist/scw/constants.js +0 -4
  184. package/dist/scw/custom-marshalling.js +0 -131
  185. package/dist/scw/errors/error-parser.js +0 -107
  186. package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
  187. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
  188. package/dist/scw/errors/scw-error.js +0 -66
  189. package/dist/scw/errors/standard/already-exists-error.js +0 -26
  190. package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
  191. package/dist/scw/errors/standard/index.js +0 -13
  192. package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
  193. package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
  194. package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
  195. package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
  196. package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
  197. package/dist/scw/errors/standard/resource-expired-error.js +0 -26
  198. package/dist/scw/errors/standard/resource-locked-error.js +0 -25
  199. package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
  200. package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
  201. package/dist/scw/errors/standard/transient-state-error.js +0 -26
  202. package/dist/scw/errors/types.js +0 -23
  203. package/dist/scw/fetch/build-fetcher.js +0 -72
  204. package/dist/scw/fetch/http-dumper.js +0 -54
  205. package/dist/scw/fetch/http-interceptors.js +0 -99
  206. package/dist/scw/fetch/resource-paginator.js +0 -84
  207. package/dist/scw/fetch/response-parser.js +0 -72
  208. package/node_modules/@scaleway/random-name/.npmignore +0 -4
  209. package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
  210. package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
  211. package/node_modules/@scaleway/random-name/README.md +0 -26
  212. package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
  213. package/node_modules/@scaleway/random-name/dist/index.js +0 -13
  214. package/node_modules/@scaleway/random-name/package.json +0 -23
@@ -1,333 +0,0 @@
1
- import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
2
- import { isJSONObject } from '../../../helpers/json.js';
3
- import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
4
-
5
- // This file was automatically generated. DO NOT EDIT.
6
- // If you have any remark or suggestion do not hesitate to open an issue.
7
- const unmarshalPoolUpgradePolicy = data => {
8
- if (!isJSONObject(data)) {
9
- throw new TypeError(`Unmarshalling the type 'PoolUpgradePolicy' failed as data isn't a dictionary.`);
10
- }
11
- return {
12
- maxSurge: data.max_surge,
13
- maxUnavailable: data.max_unavailable
14
- };
15
- };
16
- const unmarshalPool = data => {
17
- if (!isJSONObject(data)) {
18
- throw new TypeError(`Unmarshalling the type 'Pool' failed as data isn't a dictionary.`);
19
- }
20
- return {
21
- autohealing: data.autohealing,
22
- autoscaling: data.autoscaling,
23
- clusterId: data.cluster_id,
24
- containerRuntime: data.container_runtime,
25
- createdAt: unmarshalDate(data.created_at),
26
- id: data.id,
27
- kubeletArgs: data.kubelet_args,
28
- maxSize: data.max_size,
29
- minSize: data.min_size,
30
- name: data.name,
31
- nodeType: data.node_type,
32
- placementGroupId: data.placement_group_id ? data.placement_group_id : undefined,
33
- region: data.region,
34
- rootVolumeSize: data.root_volume_size ? data.root_volume_size : undefined,
35
- rootVolumeType: data.root_volume_type,
36
- size: data.size,
37
- status: data.status,
38
- tags: data.tags,
39
- updatedAt: unmarshalDate(data.updated_at),
40
- upgradePolicy: unmarshalPoolUpgradePolicy(data.upgrade_policy),
41
- version: data.version,
42
- zone: data.zone
43
- };
44
- };
45
- const unmarshalVersion = data => {
46
- if (!isJSONObject(data)) {
47
- throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
48
- }
49
- return {
50
- availableAdmissionPlugins: data.available_admission_plugins,
51
- availableCnis: data.available_cnis,
52
- availableContainerRuntimes: data.available_container_runtimes,
53
- availableFeatureGates: data.available_feature_gates,
54
- availableIngresses: data.available_ingresses ? data.available_ingresses : undefined,
55
- availableKubeletArgs: data.available_kubelet_args,
56
- label: data.label,
57
- name: data.name,
58
- region: data.region
59
- };
60
- };
61
- const unmarshalClusterOpenIDConnectConfig = data => {
62
- if (!isJSONObject(data)) {
63
- throw new TypeError(`Unmarshalling the type 'ClusterOpenIDConnectConfig' failed as data isn't a dictionary.`);
64
- }
65
- return {
66
- clientId: data.client_id,
67
- groupsClaim: data.groups_claim,
68
- groupsPrefix: data.groups_prefix,
69
- issuerUrl: data.issuer_url,
70
- requiredClaim: data.required_claim,
71
- usernameClaim: data.username_claim,
72
- usernamePrefix: data.username_prefix
73
- };
74
- };
75
- const unmarshalMaintenanceWindow = data => {
76
- if (!isJSONObject(data)) {
77
- throw new TypeError(`Unmarshalling the type 'MaintenanceWindow' failed as data isn't a dictionary.`);
78
- }
79
- return {
80
- day: data.day,
81
- startHour: data.start_hour
82
- };
83
- };
84
- const unmarshalClusterAutoUpgrade = data => {
85
- if (!isJSONObject(data)) {
86
- throw new TypeError(`Unmarshalling the type 'ClusterAutoUpgrade' failed as data isn't a dictionary.`);
87
- }
88
- return {
89
- enabled: data.enabled,
90
- maintenanceWindow: unmarshalMaintenanceWindow(data.maintenance_window)
91
- };
92
- };
93
- const unmarshalClusterAutoscalerConfig = data => {
94
- if (!isJSONObject(data)) {
95
- throw new TypeError(`Unmarshalling the type 'ClusterAutoscalerConfig' failed as data isn't a dictionary.`);
96
- }
97
- return {
98
- balanceSimilarNodeGroups: data.balance_similar_node_groups,
99
- estimator: data.estimator,
100
- expander: data.expander,
101
- expendablePodsPriorityCutoff: data.expendable_pods_priority_cutoff,
102
- ignoreDaemonsetsUtilization: data.ignore_daemonsets_utilization,
103
- maxGracefulTerminationSec: data.max_graceful_termination_sec,
104
- scaleDownDelayAfterAdd: data.scale_down_delay_after_add,
105
- scaleDownDisabled: data.scale_down_disabled,
106
- scaleDownUnneededTime: data.scale_down_unneeded_time,
107
- scaleDownUtilizationThreshold: data.scale_down_utilization_threshold
108
- };
109
- };
110
- const unmarshalCluster = data => {
111
- if (!isJSONObject(data)) {
112
- throw new TypeError(`Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`);
113
- }
114
- return {
115
- admissionPlugins: data.admission_plugins,
116
- apiserverCertSans: data.apiserver_cert_sans,
117
- autoUpgrade: unmarshalClusterAutoUpgrade(data.auto_upgrade),
118
- autoscalerConfig: unmarshalClusterAutoscalerConfig(data.autoscaler_config),
119
- clusterUrl: data.cluster_url,
120
- cni: data.cni,
121
- commitmentEndsAt: unmarshalDate(data.commitment_ends_at),
122
- createdAt: unmarshalDate(data.created_at),
123
- dashboardEnabled: data.dashboard_enabled ? data.dashboard_enabled : undefined,
124
- description: data.description,
125
- dnsWildcard: data.dns_wildcard,
126
- featureGates: data.feature_gates,
127
- id: data.id,
128
- ingress: data.ingress ? data.ingress : undefined,
129
- name: data.name,
130
- openIdConnectConfig: unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config),
131
- organizationId: data.organization_id,
132
- privateNetworkId: data.private_network_id ? data.private_network_id : undefined,
133
- projectId: data.project_id,
134
- region: data.region,
135
- status: data.status,
136
- tags: data.tags,
137
- type: data.type,
138
- updatedAt: unmarshalDate(data.updated_at),
139
- upgradeAvailable: data.upgrade_available,
140
- version: data.version
141
- };
142
- };
143
- const unmarshalNode = data => {
144
- if (!isJSONObject(data)) {
145
- throw new TypeError(`Unmarshalling the type 'Node' failed as data isn't a dictionary.`);
146
- }
147
- return {
148
- clusterId: data.cluster_id,
149
- conditions: data.conditions ? data.conditions : undefined,
150
- createdAt: unmarshalDate(data.created_at),
151
- errorMessage: data.error_message ? data.error_message : undefined,
152
- id: data.id,
153
- name: data.name,
154
- poolId: data.pool_id,
155
- providerId: data.provider_id,
156
- publicIpV4: data.public_ip_v4 ? data.public_ip_v4 : undefined,
157
- publicIpV6: data.public_ip_v6 ? data.public_ip_v6 : undefined,
158
- region: data.region,
159
- status: data.status,
160
- updatedAt: unmarshalDate(data.updated_at)
161
- };
162
- };
163
- const unmarshalExternalNode = data => {
164
- if (!isJSONObject(data)) {
165
- throw new TypeError(`Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`);
166
- }
167
- return {
168
- clusterCa: data.cluster_ca,
169
- clusterUrl: data.cluster_url,
170
- externalIp: data.external_ip,
171
- id: data.id,
172
- kubeToken: data.kube_token,
173
- kubeletConfig: data.kubelet_config,
174
- name: data.name,
175
- poolVersion: data.pool_version
176
- };
177
- };
178
- const unmarshalClusterType = data => {
179
- if (!isJSONObject(data)) {
180
- throw new TypeError(`Unmarshalling the type 'ClusterType' failed as data isn't a dictionary.`);
181
- }
182
- return {
183
- availability: data.availability,
184
- commitmentDelay: data.commitment_delay ? data.commitment_delay : undefined,
185
- dedicated: data.dedicated,
186
- maxNodes: data.max_nodes,
187
- memory: data.memory,
188
- name: data.name,
189
- resiliency: data.resiliency,
190
- sla: data.sla
191
- };
192
- };
193
- const unmarshalListClusterAvailableTypesResponse = data => {
194
- if (!isJSONObject(data)) {
195
- throw new TypeError(`Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`);
196
- }
197
- return {
198
- clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
199
- totalCount: data.total_count
200
- };
201
- };
202
- const unmarshalListClusterAvailableVersionsResponse = data => {
203
- if (!isJSONObject(data)) {
204
- throw new TypeError(`Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`);
205
- }
206
- return {
207
- versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
208
- };
209
- };
210
- const unmarshalListClusterTypesResponse = data => {
211
- if (!isJSONObject(data)) {
212
- throw new TypeError(`Unmarshalling the type 'ListClusterTypesResponse' failed as data isn't a dictionary.`);
213
- }
214
- return {
215
- clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
216
- totalCount: data.total_count
217
- };
218
- };
219
- const unmarshalListClustersResponse = data => {
220
- if (!isJSONObject(data)) {
221
- throw new TypeError(`Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`);
222
- }
223
- return {
224
- clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
225
- totalCount: data.total_count
226
- };
227
- };
228
- const unmarshalListNodesResponse = data => {
229
- if (!isJSONObject(data)) {
230
- throw new TypeError(`Unmarshalling the type 'ListNodesResponse' failed as data isn't a dictionary.`);
231
- }
232
- return {
233
- nodes: unmarshalArrayOfObject(data.nodes, unmarshalNode),
234
- totalCount: data.total_count
235
- };
236
- };
237
- const unmarshalListPoolsResponse = data => {
238
- if (!isJSONObject(data)) {
239
- throw new TypeError(`Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`);
240
- }
241
- return {
242
- pools: unmarshalArrayOfObject(data.pools, unmarshalPool),
243
- totalCount: data.total_count
244
- };
245
- };
246
- const unmarshalListVersionsResponse = data => {
247
- if (!isJSONObject(data)) {
248
- throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
249
- }
250
- return {
251
- versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
252
- };
253
- };
254
- const marshalCreateClusterRequest = (request, defaults) => ({
255
- admission_plugins: request.admissionPlugins,
256
- apiserver_cert_sans: request.apiserverCertSans,
257
- auto_upgrade: request.autoUpgrade,
258
- autoscaler_config: request.autoscalerConfig,
259
- cni: request.cni,
260
- description: request.description,
261
- enable_dashboard: request.enableDashboard,
262
- feature_gates: request.featureGates,
263
- ingress: request.ingress,
264
- name: request.name || randomName('k8s'),
265
- open_id_connect_config: request.openIdConnectConfig,
266
- pools: request.pools,
267
- private_network_id: request.privateNetworkId,
268
- tags: request.tags,
269
- type: request.type,
270
- version: request.version,
271
- ...resolveOneOf([{
272
- param: 'organization_id',
273
- value: request.organizationId
274
- }, {
275
- param: 'project_id',
276
- value: request.projectId
277
- }])
278
- });
279
- const marshalCreatePoolRequest = (request, defaults) => ({
280
- autohealing: request.autohealing,
281
- autoscaling: request.autoscaling,
282
- container_runtime: request.containerRuntime,
283
- kubelet_args: request.kubeletArgs,
284
- max_size: request.maxSize,
285
- min_size: request.minSize,
286
- name: request.name || randomName('pool'),
287
- node_type: request.nodeType,
288
- placement_group_id: request.placementGroupId,
289
- root_volume_size: request.rootVolumeSize,
290
- root_volume_type: request.rootVolumeType,
291
- size: request.size,
292
- tags: request.tags,
293
- upgrade_policy: request.upgradePolicy,
294
- zone: request.zone ?? defaults.defaultZone
295
- });
296
- const marshalMigrateToPrivateNetworkClusterRequest = (request, defaults) => ({
297
- private_network_id: request.privateNetworkId
298
- });
299
- const marshalSetClusterTypeRequest = (request, defaults) => ({
300
- type: request.type
301
- });
302
- const marshalUpdateClusterRequest = (request, defaults) => ({
303
- admission_plugins: request.admissionPlugins,
304
- apiserver_cert_sans: request.apiserverCertSans,
305
- auto_upgrade: request.autoUpgrade,
306
- autoscaler_config: request.autoscalerConfig,
307
- description: request.description,
308
- enable_dashboard: request.enableDashboard,
309
- feature_gates: request.featureGates,
310
- ingress: request.ingress,
311
- name: request.name,
312
- open_id_connect_config: request.openIdConnectConfig,
313
- tags: request.tags
314
- });
315
- const marshalUpdatePoolRequest = (request, defaults) => ({
316
- autohealing: request.autohealing,
317
- autoscaling: request.autoscaling,
318
- kubelet_args: request.kubeletArgs,
319
- max_size: request.maxSize,
320
- min_size: request.minSize,
321
- size: request.size,
322
- tags: request.tags,
323
- upgrade_policy: request.upgradePolicy
324
- });
325
- const marshalUpgradeClusterRequest = (request, defaults) => ({
326
- upgrade_pools: request.upgradePools,
327
- version: request.version
328
- });
329
- const marshalUpgradePoolRequest = (request, defaults) => ({
330
- version: request.version
331
- });
332
-
333
- export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalMigrateToPrivateNetworkClusterRequest, marshalSetClusterTypeRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
@@ -1,101 +0,0 @@
1
- // This file was automatically generated. DO NOT EDIT.
2
- // If you have any remark or suggestion do not hesitate to open an issue.
3
-
4
- const CreateClusterRequest = {
5
- name: {
6
- minLength: 1
7
- }
8
- };
9
- const CreateClusterRequestAutoscalerConfig = {
10
- scaleDownUtilizationThreshold: {
11
- greaterThan: 0,
12
- lessThan: 1
13
- }
14
- };
15
- const CreateClusterRequestOpenIDConnectConfig = {
16
- clientId: {
17
- minLength: 1
18
- },
19
- groupsPrefix: {
20
- minLength: 1
21
- },
22
- usernameClaim: {
23
- minLength: 1
24
- },
25
- usernamePrefix: {
26
- minLength: 1
27
- }
28
- };
29
- const CreateClusterRequestPoolConfig = {
30
- name: {
31
- minLength: 1
32
- }
33
- };
34
- const CreatePoolRequest = {
35
- name: {
36
- minLength: 1
37
- }
38
- };
39
- const ListClusterTypesRequest = {
40
- page: {
41
- greaterThan: 0
42
- },
43
- pageSize: {
44
- greaterThan: 0,
45
- lessThanOrEqual: 100
46
- }
47
- };
48
- const ListClustersRequest = {
49
- name: {
50
- minLength: 1
51
- },
52
- page: {
53
- greaterThan: 0
54
- },
55
- pageSize: {
56
- greaterThan: 0,
57
- lessThanOrEqual: 100
58
- }
59
- };
60
- const ListNodesRequest = {
61
- name: {
62
- minLength: 1
63
- },
64
- page: {
65
- greaterThan: 0
66
- },
67
- pageSize: {
68
- greaterThan: 0,
69
- lessThanOrEqual: 100
70
- }
71
- };
72
- const ListPoolsRequest = {
73
- name: {
74
- minLength: 1
75
- },
76
- page: {
77
- greaterThan: 0
78
- },
79
- pageSize: {
80
- greaterThan: 0,
81
- lessThanOrEqual: 100
82
- }
83
- };
84
- const MaintenanceWindow = {
85
- startHour: {
86
- lessThanOrEqual: 23
87
- }
88
- };
89
- const UpdateClusterRequest = {
90
- name: {
91
- minLength: 1
92
- }
93
- };
94
- const UpdateClusterRequestAutoscalerConfig = {
95
- scaleDownUtilizationThreshold: {
96
- greaterThan: 0,
97
- lessThan: 1
98
- }
99
- };
100
-
101
- export { CreateClusterRequest, CreateClusterRequestAutoscalerConfig, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreatePoolRequest, ListClusterTypesRequest, ListClustersRequest, ListNodesRequest, ListPoolsRequest, MaintenanceWindow, UpdateClusterRequest, UpdateClusterRequestAutoscalerConfig };
@@ -1,2 +0,0 @@
1
- import * as index from './v1/index.js';
2
- export { index as v1 };