@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
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const json = require("../../../helpers/json.cjs");
4
+ const marshalling = require("../../../helpers/marshalling.cjs");
5
+ require("../../../vendor/base64/index.cjs");
6
+ const unmarshalScalewayLb = (data) => {
7
+ if (!json.isJSONObject(data)) {
8
+ throw new TypeError(
9
+ `Unmarshalling the type 'ScalewayLb' failed as data isn't a dictionary.`
10
+ );
11
+ }
12
+ return {
13
+ domainName: data.domain_name,
14
+ frontendId: data.frontend_id,
15
+ id: data.id,
16
+ isSsl: data.is_ssl,
17
+ zone: data.zone
18
+ };
19
+ };
20
+ const unmarshalScalewayLbBackendConfig = (data) => {
21
+ if (!json.isJSONObject(data)) {
22
+ throw new TypeError(
23
+ `Unmarshalling the type 'ScalewayLbBackendConfig' failed as data isn't a dictionary.`
24
+ );
25
+ }
26
+ return {
27
+ lbs: marshalling.unmarshalArrayOfObject(data.lbs, unmarshalScalewayLb)
28
+ };
29
+ };
30
+ const unmarshalScalewayS3BackendConfig = (data) => {
31
+ if (!json.isJSONObject(data)) {
32
+ throw new TypeError(
33
+ `Unmarshalling the type 'ScalewayS3BackendConfig' failed as data isn't a dictionary.`
34
+ );
35
+ }
36
+ return {
37
+ bucketName: data.bucket_name,
38
+ bucketRegion: data.bucket_region,
39
+ isWebsite: data.is_website
40
+ };
41
+ };
42
+ const unmarshalBackendStage = (data) => {
43
+ if (!json.isJSONObject(data)) {
44
+ throw new TypeError(
45
+ `Unmarshalling the type 'BackendStage' failed as data isn't a dictionary.`
46
+ );
47
+ }
48
+ return {
49
+ createdAt: marshalling.unmarshalDate(data.created_at),
50
+ id: data.id,
51
+ pipelineId: data.pipeline_id,
52
+ projectId: data.project_id,
53
+ scalewayLb: data.scaleway_lb ? unmarshalScalewayLbBackendConfig(data.scaleway_lb) : void 0,
54
+ scalewayS3: data.scaleway_s3 ? unmarshalScalewayS3BackendConfig(data.scaleway_s3) : void 0,
55
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
56
+ };
57
+ };
58
+ const unmarshalCacheStage = (data) => {
59
+ if (!json.isJSONObject(data)) {
60
+ throw new TypeError(
61
+ `Unmarshalling the type 'CacheStage' failed as data isn't a dictionary.`
62
+ );
63
+ }
64
+ return {
65
+ backendStageId: data.backend_stage_id,
66
+ createdAt: marshalling.unmarshalDate(data.created_at),
67
+ fallbackTtl: data.fallback_ttl,
68
+ id: data.id,
69
+ pipelineId: data.pipeline_id,
70
+ projectId: data.project_id,
71
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
72
+ };
73
+ };
74
+ const unmarshalDNSStage = (data) => {
75
+ if (!json.isJSONObject(data)) {
76
+ throw new TypeError(
77
+ `Unmarshalling the type 'DNSStage' failed as data isn't a dictionary.`
78
+ );
79
+ }
80
+ return {
81
+ backendStageId: data.backend_stage_id,
82
+ cacheStageId: data.cache_stage_id,
83
+ createdAt: marshalling.unmarshalDate(data.created_at),
84
+ fqdns: data.fqdns,
85
+ id: data.id,
86
+ pipelineId: data.pipeline_id,
87
+ projectId: data.project_id,
88
+ tlsStageId: data.tls_stage_id,
89
+ type: data.type,
90
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
91
+ };
92
+ };
93
+ const unmarshalPipelineError = (data) => {
94
+ if (!json.isJSONObject(data)) {
95
+ throw new TypeError(
96
+ `Unmarshalling the type 'PipelineError' failed as data isn't a dictionary.`
97
+ );
98
+ }
99
+ return {
100
+ code: data.code,
101
+ message: data.message,
102
+ severity: data.severity,
103
+ stage: data.stage,
104
+ type: data.type
105
+ };
106
+ };
107
+ const unmarshalPipeline = (data) => {
108
+ if (!json.isJSONObject(data)) {
109
+ throw new TypeError(
110
+ `Unmarshalling the type 'Pipeline' failed as data isn't a dictionary.`
111
+ );
112
+ }
113
+ return {
114
+ createdAt: marshalling.unmarshalDate(data.created_at),
115
+ description: data.description,
116
+ dnsStageId: data.dns_stage_id,
117
+ errors: marshalling.unmarshalArrayOfObject(data.errors, unmarshalPipelineError),
118
+ id: data.id,
119
+ name: data.name,
120
+ projectId: data.project_id,
121
+ status: data.status,
122
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
123
+ };
124
+ };
125
+ const unmarshalTLSSecret = (data) => {
126
+ if (!json.isJSONObject(data)) {
127
+ throw new TypeError(
128
+ `Unmarshalling the type 'TLSSecret' failed as data isn't a dictionary.`
129
+ );
130
+ }
131
+ return {
132
+ region: data.region,
133
+ secretId: data.secret_id
134
+ };
135
+ };
136
+ const unmarshalTLSStage = (data) => {
137
+ if (!json.isJSONObject(data)) {
138
+ throw new TypeError(
139
+ `Unmarshalling the type 'TLSStage' failed as data isn't a dictionary.`
140
+ );
141
+ }
142
+ return {
143
+ backendStageId: data.backend_stage_id,
144
+ cacheStageId: data.cache_stage_id,
145
+ certificateExpiresAt: marshalling.unmarshalDate(data.certificate_expires_at),
146
+ createdAt: marshalling.unmarshalDate(data.created_at),
147
+ id: data.id,
148
+ managedCertificate: data.managed_certificate,
149
+ pipelineId: data.pipeline_id,
150
+ projectId: data.project_id,
151
+ secrets: marshalling.unmarshalArrayOfObject(data.secrets, unmarshalTLSSecret),
152
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
153
+ };
154
+ };
155
+ const unmarshalPurgeRequest = (data) => {
156
+ if (!json.isJSONObject(data)) {
157
+ throw new TypeError(
158
+ `Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`
159
+ );
160
+ }
161
+ return {
162
+ all: data.all,
163
+ assets: data.assets,
164
+ createdAt: marshalling.unmarshalDate(data.created_at),
165
+ id: data.id,
166
+ pipelineId: data.pipeline_id,
167
+ status: data.status,
168
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
169
+ };
170
+ };
171
+ const unmarshalCheckDomainResponse = (data) => {
172
+ if (!json.isJSONObject(data)) {
173
+ throw new TypeError(
174
+ `Unmarshalling the type 'CheckDomainResponse' failed as data isn't a dictionary.`
175
+ );
176
+ }
177
+ return {
178
+ isValid: data.is_valid
179
+ };
180
+ };
181
+ const unmarshalCheckLbOriginResponse = (data) => {
182
+ if (!json.isJSONObject(data)) {
183
+ throw new TypeError(
184
+ `Unmarshalling the type 'CheckLbOriginResponse' failed as data isn't a dictionary.`
185
+ );
186
+ }
187
+ return {
188
+ errorType: data.error_type,
189
+ isValid: data.is_valid
190
+ };
191
+ };
192
+ const unmarshalCheckPEMChainResponse = (data) => {
193
+ if (!json.isJSONObject(data)) {
194
+ throw new TypeError(
195
+ `Unmarshalling the type 'CheckPEMChainResponse' failed as data isn't a dictionary.`
196
+ );
197
+ }
198
+ return {
199
+ isValid: data.is_valid
200
+ };
201
+ };
202
+ const unmarshalListBackendStagesResponse = (data) => {
203
+ if (!json.isJSONObject(data)) {
204
+ throw new TypeError(
205
+ `Unmarshalling the type 'ListBackendStagesResponse' failed as data isn't a dictionary.`
206
+ );
207
+ }
208
+ return {
209
+ stages: marshalling.unmarshalArrayOfObject(data.stages, unmarshalBackendStage),
210
+ totalCount: data.total_count
211
+ };
212
+ };
213
+ const unmarshalListCacheStagesResponse = (data) => {
214
+ if (!json.isJSONObject(data)) {
215
+ throw new TypeError(
216
+ `Unmarshalling the type 'ListCacheStagesResponse' failed as data isn't a dictionary.`
217
+ );
218
+ }
219
+ return {
220
+ stages: marshalling.unmarshalArrayOfObject(data.stages, unmarshalCacheStage),
221
+ totalCount: data.total_count
222
+ };
223
+ };
224
+ const unmarshalListDNSStagesResponse = (data) => {
225
+ if (!json.isJSONObject(data)) {
226
+ throw new TypeError(
227
+ `Unmarshalling the type 'ListDNSStagesResponse' failed as data isn't a dictionary.`
228
+ );
229
+ }
230
+ return {
231
+ stages: marshalling.unmarshalArrayOfObject(data.stages, unmarshalDNSStage),
232
+ totalCount: data.total_count
233
+ };
234
+ };
235
+ const unmarshalListPipelinesResponse = (data) => {
236
+ if (!json.isJSONObject(data)) {
237
+ throw new TypeError(
238
+ `Unmarshalling the type 'ListPipelinesResponse' failed as data isn't a dictionary.`
239
+ );
240
+ }
241
+ return {
242
+ pipelines: marshalling.unmarshalArrayOfObject(data.pipelines, unmarshalPipeline),
243
+ totalCount: data.total_count
244
+ };
245
+ };
246
+ const unmarshalPlanDetails = (data) => {
247
+ if (!json.isJSONObject(data)) {
248
+ throw new TypeError(
249
+ `Unmarshalling the type 'PlanDetails' failed as data isn't a dictionary.`
250
+ );
251
+ }
252
+ return {
253
+ packageGb: data.package_gb,
254
+ pipelineLimit: data.pipeline_limit,
255
+ planName: data.plan_name
256
+ };
257
+ };
258
+ const unmarshalListPlansResponse = (data) => {
259
+ if (!json.isJSONObject(data)) {
260
+ throw new TypeError(
261
+ `Unmarshalling the type 'ListPlansResponse' failed as data isn't a dictionary.`
262
+ );
263
+ }
264
+ return {
265
+ plans: marshalling.unmarshalArrayOfObject(data.plans, unmarshalPlanDetails),
266
+ totalCount: data.total_count
267
+ };
268
+ };
269
+ const unmarshalListPurgeRequestsResponse = (data) => {
270
+ if (!json.isJSONObject(data)) {
271
+ throw new TypeError(
272
+ `Unmarshalling the type 'ListPurgeRequestsResponse' failed as data isn't a dictionary.`
273
+ );
274
+ }
275
+ return {
276
+ purgeRequests: marshalling.unmarshalArrayOfObject(
277
+ data.purge_requests,
278
+ unmarshalPurgeRequest
279
+ ),
280
+ totalCount: data.total_count
281
+ };
282
+ };
283
+ const unmarshalListTLSStagesResponse = (data) => {
284
+ if (!json.isJSONObject(data)) {
285
+ throw new TypeError(
286
+ `Unmarshalling the type 'ListTLSStagesResponse' failed as data isn't a dictionary.`
287
+ );
288
+ }
289
+ return {
290
+ stages: marshalling.unmarshalArrayOfObject(data.stages, unmarshalTLSStage),
291
+ totalCount: data.total_count
292
+ };
293
+ };
294
+ const unmarshalPlan = (data) => {
295
+ if (!json.isJSONObject(data)) {
296
+ throw new TypeError(
297
+ `Unmarshalling the type 'Plan' failed as data isn't a dictionary.`
298
+ );
299
+ }
300
+ return {
301
+ planName: data.plan_name
302
+ };
303
+ };
304
+ const marshalCheckDomainRequest = (request, defaults) => ({
305
+ cname: request.cname,
306
+ fqdn: request.fqdn,
307
+ project_id: request.projectId ?? defaults.defaultProjectId
308
+ });
309
+ const marshalScalewayLb = (request, defaults) => ({
310
+ domain_name: request.domainName,
311
+ frontend_id: request.frontendId,
312
+ id: request.id,
313
+ is_ssl: request.isSsl,
314
+ zone: request.zone
315
+ });
316
+ const marshalCheckLbOriginRequest = (request, defaults) => ({
317
+ lb: request.lb !== void 0 ? marshalScalewayLb(request.lb) : void 0
318
+ });
319
+ const marshalCheckPEMChainRequestSecretChain = (request, defaults) => ({
320
+ secret_id: request.secretId,
321
+ secret_region: request.secretRegion
322
+ });
323
+ const marshalCheckPEMChainRequest = (request, defaults) => ({
324
+ fqdn: request.fqdn,
325
+ project_id: request.projectId ?? defaults.defaultProjectId,
326
+ ...marshalling.resolveOneOf([
327
+ {
328
+ param: "secret",
329
+ value: request.secret !== void 0 ? marshalCheckPEMChainRequestSecretChain(request.secret) : void 0
330
+ },
331
+ { param: "raw", value: request.raw }
332
+ ])
333
+ });
334
+ const marshalScalewayLbBackendConfig = (request, defaults) => ({
335
+ lbs: request.lbs.map((elt) => marshalScalewayLb(elt))
336
+ });
337
+ const marshalScalewayS3BackendConfig = (request, defaults) => ({
338
+ bucket_name: request.bucketName,
339
+ bucket_region: request.bucketRegion,
340
+ is_website: request.isWebsite
341
+ });
342
+ const marshalCreateBackendStageRequest = (request, defaults) => ({
343
+ project_id: request.projectId ?? defaults.defaultProjectId,
344
+ ...marshalling.resolveOneOf([
345
+ {
346
+ param: "scaleway_s3",
347
+ value: request.scalewayS3 !== void 0 ? marshalScalewayS3BackendConfig(request.scalewayS3) : void 0
348
+ },
349
+ {
350
+ param: "scaleway_lb",
351
+ value: request.scalewayLb !== void 0 ? marshalScalewayLbBackendConfig(request.scalewayLb) : void 0
352
+ }
353
+ ])
354
+ });
355
+ const marshalCreateCacheStageRequest = (request, defaults) => ({
356
+ fallback_ttl: request.fallbackTtl,
357
+ project_id: request.projectId ?? defaults.defaultProjectId,
358
+ ...marshalling.resolveOneOf([
359
+ { param: "backend_stage_id", value: request.backendStageId }
360
+ ])
361
+ });
362
+ const marshalCreateDNSStageRequest = (request, defaults) => ({
363
+ fqdns: request.fqdns,
364
+ project_id: request.projectId ?? defaults.defaultProjectId,
365
+ ...marshalling.resolveOneOf([
366
+ { param: "tls_stage_id", value: request.tlsStageId },
367
+ { param: "cache_stage_id", value: request.cacheStageId },
368
+ { param: "backend_stage_id", value: request.backendStageId }
369
+ ])
370
+ });
371
+ const marshalCreatePipelineRequest = (request, defaults) => ({
372
+ description: request.description,
373
+ name: request.name,
374
+ project_id: request.projectId ?? defaults.defaultProjectId,
375
+ ...marshalling.resolveOneOf([{ param: "dns_stage_id", value: request.dnsStageId }])
376
+ });
377
+ const marshalCreatePurgeRequestRequest = (request, defaults) => ({
378
+ pipeline_id: request.pipelineId,
379
+ ...marshalling.resolveOneOf([
380
+ { param: "assets", value: request.assets },
381
+ { param: "all", value: request.all }
382
+ ])
383
+ });
384
+ const marshalTLSSecret = (request, defaults) => ({
385
+ region: request.region,
386
+ secret_id: request.secretId
387
+ });
388
+ const marshalCreateTLSStageRequest = (request, defaults) => ({
389
+ managed_certificate: request.managedCertificate,
390
+ project_id: request.projectId ?? defaults.defaultProjectId,
391
+ secrets: request.secrets !== void 0 ? request.secrets.map((elt) => marshalTLSSecret(elt)) : void 0,
392
+ ...marshalling.resolveOneOf([
393
+ { param: "cache_stage_id", value: request.cacheStageId },
394
+ { param: "backend_stage_id", value: request.backendStageId }
395
+ ])
396
+ });
397
+ const marshalSelectPlanRequest = (request, defaults) => ({
398
+ plan_name: request.planName,
399
+ project_id: request.projectId ?? defaults.defaultProjectId
400
+ });
401
+ const marshalUpdateBackendStageRequest = (request, defaults) => ({
402
+ ...marshalling.resolveOneOf([
403
+ {
404
+ param: "scaleway_s3",
405
+ value: request.scalewayS3 !== void 0 ? marshalScalewayS3BackendConfig(request.scalewayS3) : void 0
406
+ },
407
+ {
408
+ param: "scaleway_lb",
409
+ value: request.scalewayLb !== void 0 ? marshalScalewayLbBackendConfig(request.scalewayLb) : void 0
410
+ }
411
+ ])
412
+ });
413
+ const marshalUpdateCacheStageRequest = (request, defaults) => ({
414
+ fallback_ttl: request.fallbackTtl,
415
+ ...marshalling.resolveOneOf([
416
+ { param: "backend_stage_id", value: request.backendStageId }
417
+ ])
418
+ });
419
+ const marshalUpdateDNSStageRequest = (request, defaults) => ({
420
+ fqdns: request.fqdns,
421
+ ...marshalling.resolveOneOf([
422
+ { param: "tls_stage_id", value: request.tlsStageId },
423
+ { param: "cache_stage_id", value: request.cacheStageId },
424
+ { param: "backend_stage_id", value: request.backendStageId }
425
+ ])
426
+ });
427
+ const marshalUpdatePipelineRequest = (request, defaults) => ({
428
+ description: request.description,
429
+ name: request.name,
430
+ ...marshalling.resolveOneOf([{ param: "dns_stage_id", value: request.dnsStageId }])
431
+ });
432
+ const marshalTLSSecretsConfig = (request, defaults) => ({
433
+ tls_secrets: request.tlsSecrets.map((elt) => marshalTLSSecret(elt))
434
+ });
435
+ const marshalUpdateTLSStageRequest = (request, defaults) => ({
436
+ managed_certificate: request.managedCertificate,
437
+ tls_secrets_config: request.tlsSecretsConfig !== void 0 ? marshalTLSSecretsConfig(request.tlsSecretsConfig) : void 0,
438
+ ...marshalling.resolveOneOf([
439
+ { param: "cache_stage_id", value: request.cacheStageId },
440
+ { param: "backend_stage_id", value: request.backendStageId }
441
+ ])
442
+ });
443
+ exports.marshalCheckDomainRequest = marshalCheckDomainRequest;
444
+ exports.marshalCheckLbOriginRequest = marshalCheckLbOriginRequest;
445
+ exports.marshalCheckPEMChainRequest = marshalCheckPEMChainRequest;
446
+ exports.marshalCreateBackendStageRequest = marshalCreateBackendStageRequest;
447
+ exports.marshalCreateCacheStageRequest = marshalCreateCacheStageRequest;
448
+ exports.marshalCreateDNSStageRequest = marshalCreateDNSStageRequest;
449
+ exports.marshalCreatePipelineRequest = marshalCreatePipelineRequest;
450
+ exports.marshalCreatePurgeRequestRequest = marshalCreatePurgeRequestRequest;
451
+ exports.marshalCreateTLSStageRequest = marshalCreateTLSStageRequest;
452
+ exports.marshalSelectPlanRequest = marshalSelectPlanRequest;
453
+ exports.marshalUpdateBackendStageRequest = marshalUpdateBackendStageRequest;
454
+ exports.marshalUpdateCacheStageRequest = marshalUpdateCacheStageRequest;
455
+ exports.marshalUpdateDNSStageRequest = marshalUpdateDNSStageRequest;
456
+ exports.marshalUpdatePipelineRequest = marshalUpdatePipelineRequest;
457
+ exports.marshalUpdateTLSStageRequest = marshalUpdateTLSStageRequest;
458
+ exports.unmarshalBackendStage = unmarshalBackendStage;
459
+ exports.unmarshalCacheStage = unmarshalCacheStage;
460
+ exports.unmarshalCheckDomainResponse = unmarshalCheckDomainResponse;
461
+ exports.unmarshalCheckLbOriginResponse = unmarshalCheckLbOriginResponse;
462
+ exports.unmarshalCheckPEMChainResponse = unmarshalCheckPEMChainResponse;
463
+ exports.unmarshalDNSStage = unmarshalDNSStage;
464
+ exports.unmarshalListBackendStagesResponse = unmarshalListBackendStagesResponse;
465
+ exports.unmarshalListCacheStagesResponse = unmarshalListCacheStagesResponse;
466
+ exports.unmarshalListDNSStagesResponse = unmarshalListDNSStagesResponse;
467
+ exports.unmarshalListPipelinesResponse = unmarshalListPipelinesResponse;
468
+ exports.unmarshalListPlansResponse = unmarshalListPlansResponse;
469
+ exports.unmarshalListPurgeRequestsResponse = unmarshalListPurgeRequestsResponse;
470
+ exports.unmarshalListTLSStagesResponse = unmarshalListTLSStagesResponse;
471
+ exports.unmarshalPipeline = unmarshalPipeline;
472
+ exports.unmarshalPlan = unmarshalPlan;
473
+ exports.unmarshalPurgeRequest = unmarshalPurgeRequest;
474
+ exports.unmarshalTLSStage = unmarshalTLSStage;
@@ -1,11 +1,11 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, ListBackendStagesResponse, ListCacheStagesResponse, ListDNSStagesResponse, ListPipelinesResponse, ListPurgeRequestsResponse, ListTLSStagesResponse, Pipeline, PurgeRequest, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest } from './types.gen';
2
+ import type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, ListBackendStagesResponse, ListCacheStagesResponse, ListDNSStagesResponse, ListPipelinesResponse, ListPlansResponse, ListPurgeRequestsResponse, ListTLSStagesResponse, Pipeline, Plan, PurgeRequest, SelectPlanRequest, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest } from './types.gen';
3
3
  export declare const unmarshalBackendStage: (data: unknown) => BackendStage;
4
4
  export declare const unmarshalCacheStage: (data: unknown) => CacheStage;
5
5
  export declare const unmarshalDNSStage: (data: unknown) => DNSStage;
6
6
  export declare const unmarshalPipeline: (data: unknown) => Pipeline;
7
- export declare const unmarshalPurgeRequest: (data: unknown) => PurgeRequest;
8
7
  export declare const unmarshalTLSStage: (data: unknown) => TLSStage;
8
+ export declare const unmarshalPurgeRequest: (data: unknown) => PurgeRequest;
9
9
  export declare const unmarshalCheckDomainResponse: (data: unknown) => CheckDomainResponse;
10
10
  export declare const unmarshalCheckLbOriginResponse: (data: unknown) => CheckLbOriginResponse;
11
11
  export declare const unmarshalCheckPEMChainResponse: (data: unknown) => CheckPEMChainResponse;
@@ -13,8 +13,10 @@ export declare const unmarshalListBackendStagesResponse: (data: unknown) => List
13
13
  export declare const unmarshalListCacheStagesResponse: (data: unknown) => ListCacheStagesResponse;
14
14
  export declare const unmarshalListDNSStagesResponse: (data: unknown) => ListDNSStagesResponse;
15
15
  export declare const unmarshalListPipelinesResponse: (data: unknown) => ListPipelinesResponse;
16
+ export declare const unmarshalListPlansResponse: (data: unknown) => ListPlansResponse;
16
17
  export declare const unmarshalListPurgeRequestsResponse: (data: unknown) => ListPurgeRequestsResponse;
17
18
  export declare const unmarshalListTLSStagesResponse: (data: unknown) => ListTLSStagesResponse;
19
+ export declare const unmarshalPlan: (data: unknown) => Plan;
18
20
  export declare const marshalCheckDomainRequest: (request: CheckDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
19
21
  export declare const marshalCheckLbOriginRequest: (request: CheckLbOriginRequest, defaults: DefaultValues) => Record<string, unknown>;
20
22
  export declare const marshalCheckPEMChainRequest: (request: CheckPEMChainRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -24,6 +26,7 @@ export declare const marshalCreateDNSStageRequest: (request: CreateDNSStageReque
24
26
  export declare const marshalCreatePipelineRequest: (request: CreatePipelineRequest, defaults: DefaultValues) => Record<string, unknown>;
25
27
  export declare const marshalCreatePurgeRequestRequest: (request: CreatePurgeRequestRequest, defaults: DefaultValues) => Record<string, unknown>;
26
28
  export declare const marshalCreateTLSStageRequest: (request: CreateTLSStageRequest, defaults: DefaultValues) => Record<string, unknown>;
29
+ export declare const marshalSelectPlanRequest: (request: SelectPlanRequest, defaults: DefaultValues) => Record<string, unknown>;
27
30
  export declare const marshalUpdateBackendStageRequest: (request: UpdateBackendStageRequest, defaults: DefaultValues) => Record<string, unknown>;
28
31
  export declare const marshalUpdateCacheStageRequest: (request: UpdateCacheStageRequest, defaults: DefaultValues) => Record<string, unknown>;
29
32
  export declare const marshalUpdateDNSStageRequest: (request: UpdateDNSStageRequest, defaults: DefaultValues) => Record<string, unknown>;