@scaleway/sdk 2.46.0 → 2.48.0

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 (193) hide show
  1. package/dist/api/baremetal/v1/api.gen.cjs +36 -1
  2. package/dist/api/baremetal/v1/api.gen.d.ts +17 -1
  3. package/dist/api/baremetal/v1/api.gen.js +37 -2
  4. package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
  5. package/dist/api/baremetal/v1/marshalling.gen.cjs +200 -0
  6. package/dist/api/baremetal/v1/marshalling.gen.d.ts +4 -1
  7. package/dist/api/baremetal/v1/marshalling.gen.js +200 -0
  8. package/dist/api/baremetal/v1/types.gen.d.ts +74 -0
  9. package/dist/api/billing/v2alpha1/marshalling.gen.cjs +1 -0
  10. package/dist/api/billing/v2alpha1/marshalling.gen.js +1 -0
  11. package/dist/api/billing/v2alpha1/types.gen.d.ts +2 -0
  12. package/dist/api/billing/v2beta1/marshalling.gen.cjs +1 -0
  13. package/dist/api/billing/v2beta1/marshalling.gen.js +1 -0
  14. package/dist/api/billing/v2beta1/types.gen.d.ts +2 -0
  15. package/dist/api/edge_services/v1alpha1/api.gen.cjs +636 -0
  16. package/dist/api/edge_services/v1alpha1/api.gen.d.ts +5 -1
  17. package/dist/api/edge_services/v1alpha1/api.gen.js +636 -0
  18. package/dist/api/edge_services/v1alpha1/content.gen.cjs +8 -0
  19. package/dist/api/edge_services/v1alpha1/content.gen.js +8 -0
  20. package/dist/api/edge_services/v1alpha1/index.gen.cjs +7 -0
  21. package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
  22. package/dist/api/edge_services/v1alpha1/index.gen.js +7 -0
  23. package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +474 -0
  24. package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +5 -2
  25. package/dist/api/edge_services/v1alpha1/marshalling.gen.js +474 -0
  26. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +51 -28
  27. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +1 -0
  28. package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
  29. package/dist/api/iam/v1alpha1/types.gen.d.ts +2 -0
  30. package/dist/api/index.d.ts +65 -35
  31. package/dist/api/inference/v1beta1/api.gen.cjs +306 -0
  32. package/dist/api/inference/v1beta1/api.gen.js +306 -0
  33. package/dist/api/inference/v1beta1/content.gen.cjs +8 -0
  34. package/dist/api/inference/v1beta1/content.gen.js +8 -0
  35. package/dist/api/inference/v1beta1/index.gen.cjs +8 -0
  36. package/dist/api/inference/v1beta1/index.gen.js +8 -0
  37. package/dist/api/inference/v1beta1/marshalling.gen.cjs +273 -0
  38. package/dist/api/inference/v1beta1/marshalling.gen.js +273 -0
  39. package/dist/api/inference/v1beta1/validation-rules.gen.cjs +56 -0
  40. package/dist/api/inference/v1beta1/validation-rules.gen.js +56 -0
  41. package/dist/api/k8s/v1/marshalling.gen.cjs +1 -0
  42. package/dist/api/k8s/v1/marshalling.gen.js +1 -0
  43. package/dist/api/k8s/v1/types.gen.d.ts +2 -0
  44. package/dist/api/k8s/v1/validation-rules.gen.cjs +63 -0
  45. package/dist/api/k8s/v1/validation-rules.gen.d.ts +60 -0
  46. package/dist/api/k8s/v1/validation-rules.gen.js +64 -1
  47. package/dist/api/mnq/index.gen.cjs +4 -0
  48. package/dist/api/mnq/index.gen.js +4 -0
  49. package/dist/api/qaas/v1alpha1/api.gen.cjs +527 -0
  50. package/dist/api/qaas/v1alpha1/api.gen.js +527 -0
  51. package/dist/api/qaas/v1alpha1/content.gen.cjs +19 -0
  52. package/dist/api/qaas/v1alpha1/content.gen.js +19 -0
  53. package/dist/api/qaas/v1alpha1/index.gen.cjs +10 -0
  54. package/dist/api/qaas/v1alpha1/index.gen.js +10 -0
  55. package/dist/api/qaas/v1alpha1/marshalling.gen.cjs +320 -0
  56. package/dist/api/qaas/v1alpha1/marshalling.gen.js +320 -0
  57. package/dist/api/qaas/v1alpha1/validation-rules.gen.cjs +14 -0
  58. package/dist/api/qaas/v1alpha1/validation-rules.gen.js +14 -0
  59. package/dist/api/tem/index.gen.cjs +4 -0
  60. package/dist/api/tem/index.gen.js +4 -0
  61. package/dist/api/tem/v1alpha1/api.gen.cjs +32 -0
  62. package/dist/api/tem/v1alpha1/api.gen.d.ts +17 -1
  63. package/dist/api/tem/v1alpha1/api.gen.js +33 -1
  64. package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
  65. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +36 -0
  66. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +3 -1
  67. package/dist/api/tem/v1alpha1/marshalling.gen.js +36 -0
  68. package/dist/api/tem/v1alpha1/types.gen.d.ts +51 -0
  69. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +11 -0
  70. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +10 -0
  71. package/dist/api/tem/v1alpha1/validation-rules.gen.js +11 -0
  72. package/dist/api/webhosting/index.gen.cjs +6 -0
  73. package/dist/api/webhosting/index.gen.js +6 -0
  74. package/dist/api/webhosting/v1/api.gen.cjs +620 -0
  75. package/dist/api/webhosting/v1/api.gen.js +620 -0
  76. package/dist/api/webhosting/v1/content.gen.cjs +14 -0
  77. package/dist/api/webhosting/v1/content.gen.js +14 -0
  78. package/dist/api/webhosting/v1/index.gen.cjs +15 -0
  79. package/dist/api/webhosting/v1/index.gen.js +15 -0
  80. package/dist/api/webhosting/v1/marshalling.gen.cjs +391 -0
  81. package/dist/api/webhosting/v1/marshalling.gen.js +391 -0
  82. package/dist/api/webhosting/v1/types.gen.d.ts +5 -0
  83. package/dist/api/webhosting/v1/validation-rules.gen.cjs +82 -0
  84. package/dist/api/webhosting/v1/validation-rules.gen.js +82 -0
  85. package/dist/index.cjs +92 -70
  86. package/dist/index.js +92 -70
  87. package/dist/scw/constants.cjs +1 -1
  88. package/dist/scw/constants.d.ts +2 -2
  89. package/dist/scw/constants.js +1 -1
  90. package/package.json +2 -2
  91. package/dist/api/account/index.d.ts +0 -2
  92. package/dist/api/applesilicon/index.d.ts +0 -1
  93. package/dist/api/baremetal/index.d.ts +0 -1
  94. package/dist/api/billing/index.d.ts +0 -2
  95. package/dist/api/block/index.d.ts +0 -1
  96. package/dist/api/cockpit/index.d.ts +0 -2
  97. package/dist/api/container/index.d.ts +0 -1
  98. package/dist/api/dedibox/index.d.ts +0 -1
  99. package/dist/api/document_db/index.d.ts +0 -1
  100. package/dist/api/domain/index.d.ts +0 -1
  101. package/dist/api/edge_services/index.d.ts +0 -1
  102. package/dist/api/flexibleip/index.d.ts +0 -1
  103. package/dist/api/function/index.d.ts +0 -1
  104. package/dist/api/iam/index.d.ts +0 -1
  105. package/dist/api/instance/index.d.ts +0 -1
  106. package/dist/api/iot/index.d.ts +0 -1
  107. package/dist/api/ipam/index.d.ts +0 -1
  108. package/dist/api/ipfs/index.d.ts +0 -1
  109. package/dist/api/jobs/index.d.ts +0 -1
  110. package/dist/api/k8s/index.d.ts +0 -1
  111. package/dist/api/key_manager/index.d.ts +0 -1
  112. package/dist/api/lb/index.d.ts +0 -1
  113. package/dist/api/llm_inference/index.d.ts +0 -1
  114. package/dist/api/marketplace/index.d.ts +0 -1
  115. package/dist/api/mnq/index.d.ts +0 -1
  116. package/dist/api/rdb/index.d.ts +0 -1
  117. package/dist/api/redis/index.d.ts +0 -1
  118. package/dist/api/registry/index.d.ts +0 -1
  119. package/dist/api/secret/index.d.ts +0 -2
  120. package/dist/api/serverless_sqldb/index.d.ts +0 -1
  121. package/dist/api/tem/index.d.ts +0 -1
  122. package/dist/api/test/index.d.ts +0 -1
  123. package/dist/api/vpc/index.d.ts +0 -2
  124. package/dist/api/vpcgw/index.d.ts +0 -1
  125. package/dist/api/webhosting/index.d.ts +0 -1
  126. /package/dist/api/account/{index.cjs → index.gen.cjs} +0 -0
  127. /package/dist/api/account/{index.js → index.gen.js} +0 -0
  128. /package/dist/api/applesilicon/{index.cjs → index.gen.cjs} +0 -0
  129. /package/dist/api/applesilicon/{index.js → index.gen.js} +0 -0
  130. /package/dist/api/baremetal/{index.cjs → index.gen.cjs} +0 -0
  131. /package/dist/api/baremetal/{index.js → index.gen.js} +0 -0
  132. /package/dist/api/billing/{index.cjs → index.gen.cjs} +0 -0
  133. /package/dist/api/billing/{index.js → index.gen.js} +0 -0
  134. /package/dist/api/block/{index.cjs → index.gen.cjs} +0 -0
  135. /package/dist/api/block/{index.js → index.gen.js} +0 -0
  136. /package/dist/api/cockpit/{index.cjs → index.gen.cjs} +0 -0
  137. /package/dist/api/cockpit/{index.js → index.gen.js} +0 -0
  138. /package/dist/api/container/{index.cjs → index.gen.cjs} +0 -0
  139. /package/dist/api/container/{index.js → index.gen.js} +0 -0
  140. /package/dist/api/dedibox/{index.cjs → index.gen.cjs} +0 -0
  141. /package/dist/api/dedibox/{index.js → index.gen.js} +0 -0
  142. /package/dist/api/document_db/{index.cjs → index.gen.cjs} +0 -0
  143. /package/dist/api/document_db/{index.js → index.gen.js} +0 -0
  144. /package/dist/api/domain/{index.cjs → index.gen.cjs} +0 -0
  145. /package/dist/api/domain/{index.js → index.gen.js} +0 -0
  146. /package/dist/api/{flexibleip/index.cjs → edge_services/index.gen.cjs} +0 -0
  147. /package/dist/api/{flexibleip/index.js → edge_services/index.gen.js} +0 -0
  148. /package/dist/api/{iam/index.cjs → flexibleip/index.gen.cjs} +0 -0
  149. /package/dist/api/{iam/index.js → flexibleip/index.gen.js} +0 -0
  150. /package/dist/api/function/{index.cjs → index.gen.cjs} +0 -0
  151. /package/dist/api/function/{index.js → index.gen.js} +0 -0
  152. /package/dist/api/{ipfs/index.cjs → iam/index.gen.cjs} +0 -0
  153. /package/dist/api/{ipfs/index.js → iam/index.gen.js} +0 -0
  154. /package/dist/api/{llm_inference/index.cjs → inference/index.gen.cjs} +0 -0
  155. /package/dist/api/{llm_inference/index.js → inference/index.gen.js} +0 -0
  156. /package/dist/api/instance/{index.cjs → index.gen.cjs} +0 -0
  157. /package/dist/api/instance/{index.js → index.gen.js} +0 -0
  158. /package/dist/api/iot/{index.cjs → index.gen.cjs} +0 -0
  159. /package/dist/api/iot/{index.js → index.gen.js} +0 -0
  160. /package/dist/api/ipam/{index.cjs → index.gen.cjs} +0 -0
  161. /package/dist/api/ipam/{index.js → index.gen.js} +0 -0
  162. /package/dist/api/{jobs/index.cjs → ipfs/index.gen.cjs} +0 -0
  163. /package/dist/api/{jobs/index.js → ipfs/index.gen.js} +0 -0
  164. /package/dist/api/{key_manager/index.cjs → jobs/index.gen.cjs} +0 -0
  165. /package/dist/api/{key_manager/index.js → jobs/index.gen.js} +0 -0
  166. /package/dist/api/k8s/{index.cjs → index.gen.cjs} +0 -0
  167. /package/dist/api/k8s/{index.js → index.gen.js} +0 -0
  168. /package/dist/api/{serverless_sqldb/index.cjs → key_manager/index.gen.cjs} +0 -0
  169. /package/dist/api/{serverless_sqldb/index.js → key_manager/index.gen.js} +0 -0
  170. /package/dist/api/lb/{index.cjs → index.gen.cjs} +0 -0
  171. /package/dist/api/lb/{index.js → index.gen.js} +0 -0
  172. /package/dist/api/{mnq/index.cjs → llm_inference/index.gen.cjs} +0 -0
  173. /package/dist/api/{mnq/index.js → llm_inference/index.gen.js} +0 -0
  174. /package/dist/api/marketplace/{index.cjs → index.gen.cjs} +0 -0
  175. /package/dist/api/marketplace/{index.js → index.gen.js} +0 -0
  176. /package/dist/api/{tem/index.cjs → qaas/index.gen.cjs} +0 -0
  177. /package/dist/api/{tem/index.js → qaas/index.gen.js} +0 -0
  178. /package/dist/api/rdb/{index.cjs → index.gen.cjs} +0 -0
  179. /package/dist/api/rdb/{index.js → index.gen.js} +0 -0
  180. /package/dist/api/redis/{index.cjs → index.gen.cjs} +0 -0
  181. /package/dist/api/redis/{index.js → index.gen.js} +0 -0
  182. /package/dist/api/registry/{index.cjs → index.gen.cjs} +0 -0
  183. /package/dist/api/registry/{index.js → index.gen.js} +0 -0
  184. /package/dist/api/secret/{index.cjs → index.gen.cjs} +0 -0
  185. /package/dist/api/secret/{index.js → index.gen.js} +0 -0
  186. /package/dist/api/{webhosting/index.cjs → serverless_sqldb/index.gen.cjs} +0 -0
  187. /package/dist/api/{webhosting/index.js → serverless_sqldb/index.gen.js} +0 -0
  188. /package/dist/api/test/{index.cjs → index.gen.cjs} +0 -0
  189. /package/dist/api/test/{index.js → index.gen.js} +0 -0
  190. /package/dist/api/vpc/{index.cjs → index.gen.cjs} +0 -0
  191. /package/dist/api/vpc/{index.js → index.gen.js} +0 -0
  192. /package/dist/api/vpcgw/{index.cjs → index.gen.cjs} +0 -0
  193. /package/dist/api/vpcgw/{index.js → index.gen.js} +0 -0
@@ -0,0 +1,474 @@
1
+ import { isJSONObject } from "../../../helpers/json.js";
2
+ import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from "../../../helpers/marshalling.js";
3
+ import "../../../vendor/base64/index.js";
4
+ const unmarshalScalewayLb = (data) => {
5
+ if (!isJSONObject(data)) {
6
+ throw new TypeError(
7
+ `Unmarshalling the type 'ScalewayLb' failed as data isn't a dictionary.`
8
+ );
9
+ }
10
+ return {
11
+ domainName: data.domain_name,
12
+ frontendId: data.frontend_id,
13
+ id: data.id,
14
+ isSsl: data.is_ssl,
15
+ zone: data.zone
16
+ };
17
+ };
18
+ const unmarshalScalewayLbBackendConfig = (data) => {
19
+ if (!isJSONObject(data)) {
20
+ throw new TypeError(
21
+ `Unmarshalling the type 'ScalewayLbBackendConfig' failed as data isn't a dictionary.`
22
+ );
23
+ }
24
+ return {
25
+ lbs: unmarshalArrayOfObject(data.lbs, unmarshalScalewayLb)
26
+ };
27
+ };
28
+ const unmarshalScalewayS3BackendConfig = (data) => {
29
+ if (!isJSONObject(data)) {
30
+ throw new TypeError(
31
+ `Unmarshalling the type 'ScalewayS3BackendConfig' failed as data isn't a dictionary.`
32
+ );
33
+ }
34
+ return {
35
+ bucketName: data.bucket_name,
36
+ bucketRegion: data.bucket_region,
37
+ isWebsite: data.is_website
38
+ };
39
+ };
40
+ const unmarshalBackendStage = (data) => {
41
+ if (!isJSONObject(data)) {
42
+ throw new TypeError(
43
+ `Unmarshalling the type 'BackendStage' failed as data isn't a dictionary.`
44
+ );
45
+ }
46
+ return {
47
+ createdAt: unmarshalDate(data.created_at),
48
+ id: data.id,
49
+ pipelineId: data.pipeline_id,
50
+ projectId: data.project_id,
51
+ scalewayLb: data.scaleway_lb ? unmarshalScalewayLbBackendConfig(data.scaleway_lb) : void 0,
52
+ scalewayS3: data.scaleway_s3 ? unmarshalScalewayS3BackendConfig(data.scaleway_s3) : void 0,
53
+ updatedAt: unmarshalDate(data.updated_at)
54
+ };
55
+ };
56
+ const unmarshalCacheStage = (data) => {
57
+ if (!isJSONObject(data)) {
58
+ throw new TypeError(
59
+ `Unmarshalling the type 'CacheStage' failed as data isn't a dictionary.`
60
+ );
61
+ }
62
+ return {
63
+ backendStageId: data.backend_stage_id,
64
+ createdAt: unmarshalDate(data.created_at),
65
+ fallbackTtl: data.fallback_ttl,
66
+ id: data.id,
67
+ pipelineId: data.pipeline_id,
68
+ projectId: data.project_id,
69
+ updatedAt: unmarshalDate(data.updated_at)
70
+ };
71
+ };
72
+ const unmarshalDNSStage = (data) => {
73
+ if (!isJSONObject(data)) {
74
+ throw new TypeError(
75
+ `Unmarshalling the type 'DNSStage' failed as data isn't a dictionary.`
76
+ );
77
+ }
78
+ return {
79
+ backendStageId: data.backend_stage_id,
80
+ cacheStageId: data.cache_stage_id,
81
+ createdAt: unmarshalDate(data.created_at),
82
+ fqdns: data.fqdns,
83
+ id: data.id,
84
+ pipelineId: data.pipeline_id,
85
+ projectId: data.project_id,
86
+ tlsStageId: data.tls_stage_id,
87
+ type: data.type,
88
+ updatedAt: unmarshalDate(data.updated_at)
89
+ };
90
+ };
91
+ const unmarshalPipelineError = (data) => {
92
+ if (!isJSONObject(data)) {
93
+ throw new TypeError(
94
+ `Unmarshalling the type 'PipelineError' failed as data isn't a dictionary.`
95
+ );
96
+ }
97
+ return {
98
+ code: data.code,
99
+ message: data.message,
100
+ severity: data.severity,
101
+ stage: data.stage,
102
+ type: data.type
103
+ };
104
+ };
105
+ const unmarshalPipeline = (data) => {
106
+ if (!isJSONObject(data)) {
107
+ throw new TypeError(
108
+ `Unmarshalling the type 'Pipeline' failed as data isn't a dictionary.`
109
+ );
110
+ }
111
+ return {
112
+ createdAt: unmarshalDate(data.created_at),
113
+ description: data.description,
114
+ dnsStageId: data.dns_stage_id,
115
+ errors: unmarshalArrayOfObject(data.errors, unmarshalPipelineError),
116
+ id: data.id,
117
+ name: data.name,
118
+ projectId: data.project_id,
119
+ status: data.status,
120
+ updatedAt: unmarshalDate(data.updated_at)
121
+ };
122
+ };
123
+ const unmarshalTLSSecret = (data) => {
124
+ if (!isJSONObject(data)) {
125
+ throw new TypeError(
126
+ `Unmarshalling the type 'TLSSecret' failed as data isn't a dictionary.`
127
+ );
128
+ }
129
+ return {
130
+ region: data.region,
131
+ secretId: data.secret_id
132
+ };
133
+ };
134
+ const unmarshalTLSStage = (data) => {
135
+ if (!isJSONObject(data)) {
136
+ throw new TypeError(
137
+ `Unmarshalling the type 'TLSStage' failed as data isn't a dictionary.`
138
+ );
139
+ }
140
+ return {
141
+ backendStageId: data.backend_stage_id,
142
+ cacheStageId: data.cache_stage_id,
143
+ certificateExpiresAt: unmarshalDate(data.certificate_expires_at),
144
+ createdAt: unmarshalDate(data.created_at),
145
+ id: data.id,
146
+ managedCertificate: data.managed_certificate,
147
+ pipelineId: data.pipeline_id,
148
+ projectId: data.project_id,
149
+ secrets: unmarshalArrayOfObject(data.secrets, unmarshalTLSSecret),
150
+ updatedAt: unmarshalDate(data.updated_at)
151
+ };
152
+ };
153
+ const unmarshalPurgeRequest = (data) => {
154
+ if (!isJSONObject(data)) {
155
+ throw new TypeError(
156
+ `Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`
157
+ );
158
+ }
159
+ return {
160
+ all: data.all,
161
+ assets: data.assets,
162
+ createdAt: unmarshalDate(data.created_at),
163
+ id: data.id,
164
+ pipelineId: data.pipeline_id,
165
+ status: data.status,
166
+ updatedAt: unmarshalDate(data.updated_at)
167
+ };
168
+ };
169
+ const unmarshalCheckDomainResponse = (data) => {
170
+ if (!isJSONObject(data)) {
171
+ throw new TypeError(
172
+ `Unmarshalling the type 'CheckDomainResponse' failed as data isn't a dictionary.`
173
+ );
174
+ }
175
+ return {
176
+ isValid: data.is_valid
177
+ };
178
+ };
179
+ const unmarshalCheckLbOriginResponse = (data) => {
180
+ if (!isJSONObject(data)) {
181
+ throw new TypeError(
182
+ `Unmarshalling the type 'CheckLbOriginResponse' failed as data isn't a dictionary.`
183
+ );
184
+ }
185
+ return {
186
+ errorType: data.error_type,
187
+ isValid: data.is_valid
188
+ };
189
+ };
190
+ const unmarshalCheckPEMChainResponse = (data) => {
191
+ if (!isJSONObject(data)) {
192
+ throw new TypeError(
193
+ `Unmarshalling the type 'CheckPEMChainResponse' failed as data isn't a dictionary.`
194
+ );
195
+ }
196
+ return {
197
+ isValid: data.is_valid
198
+ };
199
+ };
200
+ const unmarshalListBackendStagesResponse = (data) => {
201
+ if (!isJSONObject(data)) {
202
+ throw new TypeError(
203
+ `Unmarshalling the type 'ListBackendStagesResponse' failed as data isn't a dictionary.`
204
+ );
205
+ }
206
+ return {
207
+ stages: unmarshalArrayOfObject(data.stages, unmarshalBackendStage),
208
+ totalCount: data.total_count
209
+ };
210
+ };
211
+ const unmarshalListCacheStagesResponse = (data) => {
212
+ if (!isJSONObject(data)) {
213
+ throw new TypeError(
214
+ `Unmarshalling the type 'ListCacheStagesResponse' failed as data isn't a dictionary.`
215
+ );
216
+ }
217
+ return {
218
+ stages: unmarshalArrayOfObject(data.stages, unmarshalCacheStage),
219
+ totalCount: data.total_count
220
+ };
221
+ };
222
+ const unmarshalListDNSStagesResponse = (data) => {
223
+ if (!isJSONObject(data)) {
224
+ throw new TypeError(
225
+ `Unmarshalling the type 'ListDNSStagesResponse' failed as data isn't a dictionary.`
226
+ );
227
+ }
228
+ return {
229
+ stages: unmarshalArrayOfObject(data.stages, unmarshalDNSStage),
230
+ totalCount: data.total_count
231
+ };
232
+ };
233
+ const unmarshalListPipelinesResponse = (data) => {
234
+ if (!isJSONObject(data)) {
235
+ throw new TypeError(
236
+ `Unmarshalling the type 'ListPipelinesResponse' failed as data isn't a dictionary.`
237
+ );
238
+ }
239
+ return {
240
+ pipelines: unmarshalArrayOfObject(data.pipelines, unmarshalPipeline),
241
+ totalCount: data.total_count
242
+ };
243
+ };
244
+ const unmarshalPlanDetails = (data) => {
245
+ if (!isJSONObject(data)) {
246
+ throw new TypeError(
247
+ `Unmarshalling the type 'PlanDetails' failed as data isn't a dictionary.`
248
+ );
249
+ }
250
+ return {
251
+ packageGb: data.package_gb,
252
+ pipelineLimit: data.pipeline_limit,
253
+ planName: data.plan_name
254
+ };
255
+ };
256
+ const unmarshalListPlansResponse = (data) => {
257
+ if (!isJSONObject(data)) {
258
+ throw new TypeError(
259
+ `Unmarshalling the type 'ListPlansResponse' failed as data isn't a dictionary.`
260
+ );
261
+ }
262
+ return {
263
+ plans: unmarshalArrayOfObject(data.plans, unmarshalPlanDetails),
264
+ totalCount: data.total_count
265
+ };
266
+ };
267
+ const unmarshalListPurgeRequestsResponse = (data) => {
268
+ if (!isJSONObject(data)) {
269
+ throw new TypeError(
270
+ `Unmarshalling the type 'ListPurgeRequestsResponse' failed as data isn't a dictionary.`
271
+ );
272
+ }
273
+ return {
274
+ purgeRequests: unmarshalArrayOfObject(
275
+ data.purge_requests,
276
+ unmarshalPurgeRequest
277
+ ),
278
+ totalCount: data.total_count
279
+ };
280
+ };
281
+ const unmarshalListTLSStagesResponse = (data) => {
282
+ if (!isJSONObject(data)) {
283
+ throw new TypeError(
284
+ `Unmarshalling the type 'ListTLSStagesResponse' failed as data isn't a dictionary.`
285
+ );
286
+ }
287
+ return {
288
+ stages: unmarshalArrayOfObject(data.stages, unmarshalTLSStage),
289
+ totalCount: data.total_count
290
+ };
291
+ };
292
+ const unmarshalPlan = (data) => {
293
+ if (!isJSONObject(data)) {
294
+ throw new TypeError(
295
+ `Unmarshalling the type 'Plan' failed as data isn't a dictionary.`
296
+ );
297
+ }
298
+ return {
299
+ planName: data.plan_name
300
+ };
301
+ };
302
+ const marshalCheckDomainRequest = (request, defaults) => ({
303
+ cname: request.cname,
304
+ fqdn: request.fqdn,
305
+ project_id: request.projectId ?? defaults.defaultProjectId
306
+ });
307
+ const marshalScalewayLb = (request, defaults) => ({
308
+ domain_name: request.domainName,
309
+ frontend_id: request.frontendId,
310
+ id: request.id,
311
+ is_ssl: request.isSsl,
312
+ zone: request.zone
313
+ });
314
+ const marshalCheckLbOriginRequest = (request, defaults) => ({
315
+ lb: request.lb !== void 0 ? marshalScalewayLb(request.lb) : void 0
316
+ });
317
+ const marshalCheckPEMChainRequestSecretChain = (request, defaults) => ({
318
+ secret_id: request.secretId,
319
+ secret_region: request.secretRegion
320
+ });
321
+ const marshalCheckPEMChainRequest = (request, defaults) => ({
322
+ fqdn: request.fqdn,
323
+ project_id: request.projectId ?? defaults.defaultProjectId,
324
+ ...resolveOneOf([
325
+ {
326
+ param: "secret",
327
+ value: request.secret !== void 0 ? marshalCheckPEMChainRequestSecretChain(request.secret) : void 0
328
+ },
329
+ { param: "raw", value: request.raw }
330
+ ])
331
+ });
332
+ const marshalScalewayLbBackendConfig = (request, defaults) => ({
333
+ lbs: request.lbs.map((elt) => marshalScalewayLb(elt))
334
+ });
335
+ const marshalScalewayS3BackendConfig = (request, defaults) => ({
336
+ bucket_name: request.bucketName,
337
+ bucket_region: request.bucketRegion,
338
+ is_website: request.isWebsite
339
+ });
340
+ const marshalCreateBackendStageRequest = (request, defaults) => ({
341
+ project_id: request.projectId ?? defaults.defaultProjectId,
342
+ ...resolveOneOf([
343
+ {
344
+ param: "scaleway_s3",
345
+ value: request.scalewayS3 !== void 0 ? marshalScalewayS3BackendConfig(request.scalewayS3) : void 0
346
+ },
347
+ {
348
+ param: "scaleway_lb",
349
+ value: request.scalewayLb !== void 0 ? marshalScalewayLbBackendConfig(request.scalewayLb) : void 0
350
+ }
351
+ ])
352
+ });
353
+ const marshalCreateCacheStageRequest = (request, defaults) => ({
354
+ fallback_ttl: request.fallbackTtl,
355
+ project_id: request.projectId ?? defaults.defaultProjectId,
356
+ ...resolveOneOf([
357
+ { param: "backend_stage_id", value: request.backendStageId }
358
+ ])
359
+ });
360
+ const marshalCreateDNSStageRequest = (request, defaults) => ({
361
+ fqdns: request.fqdns,
362
+ project_id: request.projectId ?? defaults.defaultProjectId,
363
+ ...resolveOneOf([
364
+ { param: "tls_stage_id", value: request.tlsStageId },
365
+ { param: "cache_stage_id", value: request.cacheStageId },
366
+ { param: "backend_stage_id", value: request.backendStageId }
367
+ ])
368
+ });
369
+ const marshalCreatePipelineRequest = (request, defaults) => ({
370
+ description: request.description,
371
+ name: request.name,
372
+ project_id: request.projectId ?? defaults.defaultProjectId,
373
+ ...resolveOneOf([{ param: "dns_stage_id", value: request.dnsStageId }])
374
+ });
375
+ const marshalCreatePurgeRequestRequest = (request, defaults) => ({
376
+ pipeline_id: request.pipelineId,
377
+ ...resolveOneOf([
378
+ { param: "assets", value: request.assets },
379
+ { param: "all", value: request.all }
380
+ ])
381
+ });
382
+ const marshalTLSSecret = (request, defaults) => ({
383
+ region: request.region,
384
+ secret_id: request.secretId
385
+ });
386
+ const marshalCreateTLSStageRequest = (request, defaults) => ({
387
+ managed_certificate: request.managedCertificate,
388
+ project_id: request.projectId ?? defaults.defaultProjectId,
389
+ secrets: request.secrets !== void 0 ? request.secrets.map((elt) => marshalTLSSecret(elt)) : void 0,
390
+ ...resolveOneOf([
391
+ { param: "cache_stage_id", value: request.cacheStageId },
392
+ { param: "backend_stage_id", value: request.backendStageId }
393
+ ])
394
+ });
395
+ const marshalSelectPlanRequest = (request, defaults) => ({
396
+ plan_name: request.planName,
397
+ project_id: request.projectId ?? defaults.defaultProjectId
398
+ });
399
+ const marshalUpdateBackendStageRequest = (request, defaults) => ({
400
+ ...resolveOneOf([
401
+ {
402
+ param: "scaleway_s3",
403
+ value: request.scalewayS3 !== void 0 ? marshalScalewayS3BackendConfig(request.scalewayS3) : void 0
404
+ },
405
+ {
406
+ param: "scaleway_lb",
407
+ value: request.scalewayLb !== void 0 ? marshalScalewayLbBackendConfig(request.scalewayLb) : void 0
408
+ }
409
+ ])
410
+ });
411
+ const marshalUpdateCacheStageRequest = (request, defaults) => ({
412
+ fallback_ttl: request.fallbackTtl,
413
+ ...resolveOneOf([
414
+ { param: "backend_stage_id", value: request.backendStageId }
415
+ ])
416
+ });
417
+ const marshalUpdateDNSStageRequest = (request, defaults) => ({
418
+ fqdns: request.fqdns,
419
+ ...resolveOneOf([
420
+ { param: "tls_stage_id", value: request.tlsStageId },
421
+ { param: "cache_stage_id", value: request.cacheStageId },
422
+ { param: "backend_stage_id", value: request.backendStageId }
423
+ ])
424
+ });
425
+ const marshalUpdatePipelineRequest = (request, defaults) => ({
426
+ description: request.description,
427
+ name: request.name,
428
+ ...resolveOneOf([{ param: "dns_stage_id", value: request.dnsStageId }])
429
+ });
430
+ const marshalTLSSecretsConfig = (request, defaults) => ({
431
+ tls_secrets: request.tlsSecrets.map((elt) => marshalTLSSecret(elt))
432
+ });
433
+ const marshalUpdateTLSStageRequest = (request, defaults) => ({
434
+ managed_certificate: request.managedCertificate,
435
+ tls_secrets_config: request.tlsSecretsConfig !== void 0 ? marshalTLSSecretsConfig(request.tlsSecretsConfig) : void 0,
436
+ ...resolveOneOf([
437
+ { param: "cache_stage_id", value: request.cacheStageId },
438
+ { param: "backend_stage_id", value: request.backendStageId }
439
+ ])
440
+ });
441
+ export {
442
+ marshalCheckDomainRequest,
443
+ marshalCheckLbOriginRequest,
444
+ marshalCheckPEMChainRequest,
445
+ marshalCreateBackendStageRequest,
446
+ marshalCreateCacheStageRequest,
447
+ marshalCreateDNSStageRequest,
448
+ marshalCreatePipelineRequest,
449
+ marshalCreatePurgeRequestRequest,
450
+ marshalCreateTLSStageRequest,
451
+ marshalSelectPlanRequest,
452
+ marshalUpdateBackendStageRequest,
453
+ marshalUpdateCacheStageRequest,
454
+ marshalUpdateDNSStageRequest,
455
+ marshalUpdatePipelineRequest,
456
+ marshalUpdateTLSStageRequest,
457
+ unmarshalBackendStage,
458
+ unmarshalCacheStage,
459
+ unmarshalCheckDomainResponse,
460
+ unmarshalCheckLbOriginResponse,
461
+ unmarshalCheckPEMChainResponse,
462
+ unmarshalDNSStage,
463
+ unmarshalListBackendStagesResponse,
464
+ unmarshalListCacheStagesResponse,
465
+ unmarshalListDNSStagesResponse,
466
+ unmarshalListPipelinesResponse,
467
+ unmarshalListPlansResponse,
468
+ unmarshalListPurgeRequestsResponse,
469
+ unmarshalListTLSStagesResponse,
470
+ unmarshalPipeline,
471
+ unmarshalPlan,
472
+ unmarshalPurgeRequest,
473
+ unmarshalTLSStage
474
+ };
@@ -12,6 +12,7 @@ export type PipelineErrorSeverity = 'unknown_severity' | 'warning' | 'critical';
12
12
  export type PipelineErrorStage = 'unknown_stage' | 'dns' | 'tls' | 'cache' | 'backend';
13
13
  export type PipelineErrorType = 'unknown_type' | 'runtime' | 'config';
14
14
  export type PipelineStatus = 'unknown_status' | 'ready' | 'error' | 'pending' | 'warning';
15
+ export type PlanName = 'unknown_name' | 'starter' | 'professional' | 'advanced';
15
16
  export type PurgeRequestStatus = 'unknown_status' | 'done' | 'error' | 'pending';
16
17
  export interface ScalewayLb {
17
18
  /** ID of the Load Balancer. */
@@ -53,10 +54,6 @@ export interface TLSSecret {
53
54
  /** Region of the Secret. */
54
55
  region: Region;
55
56
  }
56
- export interface CheckPEMChainRequestSecretChain {
57
- secretId: string;
58
- secretRegion: string;
59
- }
60
57
  export interface BackendStage {
61
58
  /** ID of the backend stage. */
62
59
  id: string;
@@ -164,30 +161,6 @@ export interface Pipeline {
164
161
  */
165
162
  dnsStageId?: string;
166
163
  }
167
- export interface PurgeRequest {
168
- /** ID of the purge request. */
169
- id: string;
170
- /** Pipeline ID the purge request belongs to. */
171
- pipelineId: string;
172
- /** Status of the purge request. */
173
- status: PurgeRequestStatus;
174
- /**
175
- * List of asserts to purge.
176
- *
177
- * One-of ('target'): at most one of 'assets', 'all' could be set.
178
- */
179
- assets?: string[];
180
- /**
181
- * Defines whether to purge all content.
182
- *
183
- * One-of ('target'): at most one of 'assets', 'all' could be set.
184
- */
185
- all?: boolean;
186
- /** Date the purge request was created. */
187
- createdAt?: Date;
188
- /** Date the purge request was last updated. */
189
- updatedAt?: Date;
190
- }
191
164
  export interface TLSStage {
192
165
  /** ID of the TLS stage. */
193
166
  id: string;
@@ -223,6 +196,39 @@ export interface TLSStage {
223
196
  */
224
197
  backendStageId?: string;
225
198
  }
199
+ export interface CheckPEMChainRequestSecretChain {
200
+ secretId: string;
201
+ secretRegion: string;
202
+ }
203
+ export interface PlanDetails {
204
+ planName: PlanName;
205
+ packageGb: number;
206
+ pipelineLimit: number;
207
+ }
208
+ export interface PurgeRequest {
209
+ /** ID of the purge request. */
210
+ id: string;
211
+ /** Pipeline ID the purge request belongs to. */
212
+ pipelineId: string;
213
+ /** Status of the purge request. */
214
+ status: PurgeRequestStatus;
215
+ /**
216
+ * List of asserts to purge.
217
+ *
218
+ * One-of ('target'): at most one of 'assets', 'all' could be set.
219
+ */
220
+ assets?: string[];
221
+ /**
222
+ * Defines whether to purge all content.
223
+ *
224
+ * One-of ('target'): at most one of 'assets', 'all' could be set.
225
+ */
226
+ all?: boolean;
227
+ /** Date the purge request was created. */
228
+ createdAt?: Date;
229
+ /** Date the purge request was last updated. */
230
+ updatedAt?: Date;
231
+ }
226
232
  export interface TLSSecretsConfig {
227
233
  /** Secret information (from Secret Manager). */
228
234
  tlsSecrets: TLSSecret[];
@@ -376,6 +382,9 @@ export type DeleteCacheStageRequest = {
376
382
  /** ID of the cache stage to delete. */
377
383
  cacheStageId: string;
378
384
  };
385
+ export type DeleteCurrentPlanRequest = {
386
+ projectId?: string;
387
+ };
379
388
  export type DeleteDNSStageRequest = {
380
389
  /** ID of the DNS stage to delete. */
381
390
  dnsStageId: string;
@@ -396,6 +405,9 @@ export type GetCacheStageRequest = {
396
405
  /** ID of the requested cache stage. */
397
406
  cacheStageId: string;
398
407
  };
408
+ export type GetCurrentPlanRequest = {
409
+ projectId?: string;
410
+ };
399
411
  export type GetDNSStageRequest = {
400
412
  /** ID of the requested DNS stage. */
401
413
  dnsStageId: string;
@@ -538,6 +550,10 @@ export interface ListPipelinesResponse {
538
550
  /** Count of all pipelines matching the requested criteria. */
539
551
  totalCount: number;
540
552
  }
553
+ export interface ListPlansResponse {
554
+ totalCount: number;
555
+ plans: PlanDetails[];
556
+ }
541
557
  export type ListPurgeRequestsRequest = {
542
558
  /** Sort order of purge requests in the response. */
543
559
  orderBy?: ListPurgeRequestsRequestOrderBy;
@@ -601,6 +617,13 @@ export interface ListTLSStagesResponse {
601
617
  /** Count of all TLS stages matching the requested criteria. */
602
618
  totalCount: number;
603
619
  }
620
+ export interface Plan {
621
+ planName: PlanName;
622
+ }
623
+ export type SelectPlanRequest = {
624
+ projectId?: string;
625
+ planName?: PlanName;
626
+ };
604
627
  export type UpdateBackendStageRequest = {
605
628
  /** ID of the backend stage to update. */
606
629
  backendStageId: string;
@@ -165,6 +165,7 @@ const unmarshalUser = (data) => {
165
165
  email: data.email,
166
166
  id: data.id,
167
167
  lastLoginAt: marshalling.unmarshalDate(data.last_login_at),
168
+ locked: data.locked,
168
169
  mfa: data.mfa,
169
170
  organizationId: data.organization_id,
170
171
  status: data.status,
@@ -163,6 +163,7 @@ const unmarshalUser = (data) => {
163
163
  email: data.email,
164
164
  id: data.id,
165
165
  lastLoginAt: unmarshalDate(data.last_login_at),
166
+ locked: data.locked,
166
167
  mfa: data.mfa,
167
168
  organizationId: data.organization_id,
168
169
  status: data.status,
@@ -320,6 +320,8 @@ export interface User {
320
320
  accountRootUserId: string;
321
321
  /** Tags associated with the user. */
322
322
  tags: string[];
323
+ /** Defines whether the user is locked. */
324
+ locked: boolean;
323
325
  }
324
326
  export type AddGroupMemberRequest = {
325
327
  /** ID of the group. */