@scaleway/sdk 2.71.1 → 2.73.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 (663) hide show
  1. package/dist/api/account/index.gen.d.ts +2 -2
  2. package/dist/api/account/v2/api.gen.cjs +5 -4
  3. package/dist/api/account/v2/api.gen.d.ts +1 -1
  4. package/dist/api/account/v2/api.gen.js +5 -4
  5. package/dist/api/account/v2/marshalling.gen.cjs +4 -3
  6. package/dist/api/account/v2/marshalling.gen.d.ts +1 -1
  7. package/dist/api/account/v2/marshalling.gen.js +4 -3
  8. package/dist/api/account/v3/api.gen.cjs +18 -36
  9. package/dist/api/account/v3/api.gen.d.ts +18 -37
  10. package/dist/api/account/v3/api.gen.js +18 -36
  11. package/dist/api/account/v3/index.gen.d.ts +1 -1
  12. package/dist/api/account/v3/marshalling.gen.cjs +4 -3
  13. package/dist/api/account/v3/marshalling.gen.d.ts +1 -1
  14. package/dist/api/account/v3/marshalling.gen.js +4 -3
  15. package/dist/api/account/v3/types.gen.d.ts +187 -85
  16. package/dist/api/applesilicon/index.gen.d.ts +2 -2
  17. package/dist/api/applesilicon/v1alpha1/api.gen.cjs +25 -51
  18. package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +26 -51
  19. package/dist/api/applesilicon/v1alpha1/api.gen.js +25 -51
  20. package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +1 -1
  21. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +4 -3
  22. package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +1 -1
  23. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +4 -3
  24. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +311 -136
  25. package/dist/api/audit_trail/index.gen.d.ts +2 -2
  26. package/dist/api/audit_trail/v1alpha1/api.gen.cjs +6 -8
  27. package/dist/api/audit_trail/v1alpha1/api.gen.d.ts +6 -10
  28. package/dist/api/audit_trail/v1alpha1/api.gen.js +6 -8
  29. package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +4 -3
  30. package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +4 -3
  31. package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +111 -83
  32. package/dist/api/baremetal/index.gen.d.ts +2 -2
  33. package/dist/api/baremetal/v1/api.gen.cjs +34 -66
  34. package/dist/api/baremetal/v1/api.gen.d.ts +31 -62
  35. package/dist/api/baremetal/v1/api.gen.js +34 -66
  36. package/dist/api/baremetal/v1/api.utils.cjs +3 -1
  37. package/dist/api/baremetal/v1/api.utils.d.ts +1 -1
  38. package/dist/api/baremetal/v1/api.utils.js +3 -1
  39. package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
  40. package/dist/api/baremetal/v1/marshalling.gen.cjs +4 -3
  41. package/dist/api/baremetal/v1/marshalling.gen.d.ts +1 -1
  42. package/dist/api/baremetal/v1/marshalling.gen.js +4 -3
  43. package/dist/api/baremetal/v1/types.gen.d.ts +866 -379
  44. package/dist/api/baremetal/v3/api.gen.cjs +12 -18
  45. package/dist/api/baremetal/v3/api.gen.d.ts +12 -17
  46. package/dist/api/baremetal/v3/api.gen.js +12 -18
  47. package/dist/api/baremetal/v3/marshalling.gen.cjs +4 -3
  48. package/dist/api/baremetal/v3/marshalling.gen.d.ts +1 -1
  49. package/dist/api/baremetal/v3/marshalling.gen.js +4 -3
  50. package/dist/api/baremetal/v3/types.gen.d.ts +83 -33
  51. package/dist/api/billing/index.gen.d.ts +2 -2
  52. package/dist/api/billing/v2alpha1/api.gen.cjs +5 -4
  53. package/dist/api/billing/v2alpha1/api.gen.d.ts +1 -1
  54. package/dist/api/billing/v2alpha1/api.gen.js +5 -4
  55. package/dist/api/billing/v2alpha1/marshalling.gen.cjs +4 -3
  56. package/dist/api/billing/v2alpha1/marshalling.gen.js +4 -3
  57. package/dist/api/billing/v2alpha1/types.gen.d.ts +1 -1
  58. package/dist/api/billing/v2beta1/api.gen.cjs +16 -24
  59. package/dist/api/billing/v2beta1/api.gen.d.ts +10 -20
  60. package/dist/api/billing/v2beta1/api.gen.js +16 -24
  61. package/dist/api/billing/v2beta1/marshalling.gen.cjs +4 -3
  62. package/dist/api/billing/v2beta1/marshalling.gen.js +4 -3
  63. package/dist/api/billing/v2beta1/types.gen.d.ts +232 -103
  64. package/dist/api/block/index.gen.d.ts +2 -2
  65. package/dist/api/block/v1/api.gen.cjs +43 -60
  66. package/dist/api/block/v1/api.gen.d.ts +21 -39
  67. package/dist/api/block/v1/api.gen.js +43 -60
  68. package/dist/api/block/v1/marshalling.gen.cjs +4 -3
  69. package/dist/api/block/v1/marshalling.gen.d.ts +1 -1
  70. package/dist/api/block/v1/marshalling.gen.js +4 -3
  71. package/dist/api/block/v1/types.gen.d.ts +307 -126
  72. package/dist/api/block/v1alpha1/api.gen.cjs +51 -69
  73. package/dist/api/block/v1alpha1/api.gen.d.ts +24 -43
  74. package/dist/api/block/v1alpha1/api.gen.js +51 -69
  75. package/dist/api/block/v1alpha1/marshalling.gen.cjs +4 -3
  76. package/dist/api/block/v1alpha1/marshalling.gen.d.ts +1 -1
  77. package/dist/api/block/v1alpha1/marshalling.gen.js +4 -3
  78. package/dist/api/block/v1alpha1/types.gen.d.ts +328 -133
  79. package/dist/api/cockpit/index.gen.d.ts +2 -2
  80. package/dist/api/cockpit/v1/api.gen.cjs +105 -160
  81. package/dist/api/cockpit/v1/api.gen.d.ts +55 -114
  82. package/dist/api/cockpit/v1/api.gen.js +105 -160
  83. package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
  84. package/dist/api/cockpit/v1/marshalling.gen.cjs +4 -3
  85. package/dist/api/cockpit/v1/marshalling.gen.d.ts +1 -1
  86. package/dist/api/cockpit/v1/marshalling.gen.js +4 -3
  87. package/dist/api/cockpit/v1/types.gen.d.ts +568 -247
  88. package/dist/api/cockpit/v1beta1/api.gen.cjs +6 -5
  89. package/dist/api/cockpit/v1beta1/api.gen.d.ts +2 -2
  90. package/dist/api/cockpit/v1beta1/api.gen.js +6 -5
  91. package/dist/api/cockpit/v1beta1/marshalling.gen.cjs +4 -3
  92. package/dist/api/cockpit/v1beta1/marshalling.gen.d.ts +1 -1
  93. package/dist/api/cockpit/v1beta1/marshalling.gen.js +4 -3
  94. package/dist/api/cockpit/v1beta1/types.gen.d.ts +1 -1
  95. package/dist/api/container/index.gen.d.ts +2 -2
  96. package/dist/api/container/v1beta1/api.gen.cjs +13 -19
  97. package/dist/api/container/v1beta1/api.gen.d.ts +11 -18
  98. package/dist/api/container/v1beta1/api.gen.js +13 -19
  99. package/dist/api/container/v1beta1/marshalling.gen.cjs +4 -3
  100. package/dist/api/container/v1beta1/marshalling.gen.d.ts +1 -1
  101. package/dist/api/container/v1beta1/marshalling.gen.js +4 -3
  102. package/dist/api/container/v1beta1/types.gen.d.ts +649 -323
  103. package/dist/api/dedibox/index.gen.d.ts +2 -2
  104. package/dist/api/dedibox/v1/api.gen.cjs +51 -74
  105. package/dist/api/dedibox/v1/api.gen.d.ts +54 -64
  106. package/dist/api/dedibox/v1/api.gen.js +51 -74
  107. package/dist/api/dedibox/v1/marshalling.gen.cjs +4 -3
  108. package/dist/api/dedibox/v1/marshalling.gen.d.ts +1 -1
  109. package/dist/api/dedibox/v1/marshalling.gen.js +4 -3
  110. package/dist/api/dedibox/v1/types.gen.d.ts +1766 -646
  111. package/dist/api/document_db/index.gen.d.ts +2 -2
  112. package/dist/api/document_db/v1beta1/api.gen.cjs +6 -5
  113. package/dist/api/document_db/v1beta1/api.gen.d.ts +2 -2
  114. package/dist/api/document_db/v1beta1/api.gen.js +6 -5
  115. package/dist/api/document_db/v1beta1/marshalling.gen.cjs +4 -3
  116. package/dist/api/document_db/v1beta1/marshalling.gen.d.ts +1 -1
  117. package/dist/api/document_db/v1beta1/marshalling.gen.js +4 -3
  118. package/dist/api/document_db/v1beta1/types.gen.d.ts +1 -1
  119. package/dist/api/domain/index.gen.d.ts +2 -2
  120. package/dist/api/domain/v2beta1/api.gen.cjs +125 -183
  121. package/dist/api/domain/v2beta1/api.gen.d.ts +73 -132
  122. package/dist/api/domain/v2beta1/api.gen.js +125 -183
  123. package/dist/api/domain/v2beta1/content.gen.d.ts +1 -4
  124. package/dist/api/domain/v2beta1/index.gen.d.ts +1 -1
  125. package/dist/api/domain/v2beta1/marshalling.gen.cjs +4 -3
  126. package/dist/api/domain/v2beta1/marshalling.gen.d.ts +1 -1
  127. package/dist/api/domain/v2beta1/marshalling.gen.js +4 -3
  128. package/dist/api/domain/v2beta1/types.gen.d.ts +412 -200
  129. package/dist/api/edge_services/index.gen.d.ts +2 -2
  130. package/dist/api/edge_services/v1alpha1/api.gen.cjs +6 -5
  131. package/dist/api/edge_services/v1alpha1/api.gen.d.ts +2 -2
  132. package/dist/api/edge_services/v1alpha1/api.gen.js +6 -5
  133. package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +4 -3
  134. package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +1 -1
  135. package/dist/api/edge_services/v1alpha1/marshalling.gen.js +4 -3
  136. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +1 -1
  137. package/dist/api/edge_services/v1beta1/api.gen.cjs +49 -136
  138. package/dist/api/edge_services/v1beta1/api.gen.d.ts +48 -134
  139. package/dist/api/edge_services/v1beta1/api.gen.js +49 -136
  140. package/dist/api/edge_services/v1beta1/marshalling.gen.cjs +4 -3
  141. package/dist/api/edge_services/v1beta1/marshalling.gen.d.ts +1 -1
  142. package/dist/api/edge_services/v1beta1/marshalling.gen.js +4 -3
  143. package/dist/api/edge_services/v1beta1/types.gen.d.ts +584 -380
  144. package/dist/api/flexibleip/index.gen.d.ts +2 -2
  145. package/dist/api/flexibleip/v1alpha1/api.gen.cjs +16 -30
  146. package/dist/api/flexibleip/v1alpha1/api.gen.d.ts +14 -30
  147. package/dist/api/flexibleip/v1alpha1/api.gen.js +16 -30
  148. package/dist/api/flexibleip/v1alpha1/marshalling.gen.cjs +4 -3
  149. package/dist/api/flexibleip/v1alpha1/marshalling.gen.d.ts +1 -1
  150. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +4 -3
  151. package/dist/api/flexibleip/v1alpha1/types.gen.d.ts +187 -79
  152. package/dist/api/function/index.gen.d.ts +2 -2
  153. package/dist/api/function/v1beta1/api.gen.cjs +20 -33
  154. package/dist/api/function/v1beta1/api.gen.d.ts +18 -32
  155. package/dist/api/function/v1beta1/api.gen.js +20 -33
  156. package/dist/api/function/v1beta1/marshalling.gen.cjs +4 -3
  157. package/dist/api/function/v1beta1/marshalling.gen.d.ts +1 -1
  158. package/dist/api/function/v1beta1/marshalling.gen.js +4 -3
  159. package/dist/api/function/v1beta1/types.gen.d.ts +617 -288
  160. package/dist/api/iam/index.gen.d.ts +2 -2
  161. package/dist/api/iam/v1alpha1/api.gen.cjs +49 -163
  162. package/dist/api/iam/v1alpha1/api.gen.d.ts +47 -163
  163. package/dist/api/iam/v1alpha1/api.gen.js +49 -163
  164. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +4 -3
  165. package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +1 -1
  166. package/dist/api/iam/v1alpha1/marshalling.gen.js +4 -3
  167. package/dist/api/iam/v1alpha1/types.gen.d.ts +979 -372
  168. package/dist/api/index.gen.d.ts +2 -2
  169. package/dist/api/inference/index.gen.d.ts +2 -2
  170. package/dist/api/inference/v1/api.gen.cjs +14 -16
  171. package/dist/api/inference/v1/api.gen.d.ts +8 -11
  172. package/dist/api/inference/v1/api.gen.js +14 -16
  173. package/dist/api/inference/v1/marshalling.gen.cjs +4 -3
  174. package/dist/api/inference/v1/marshalling.gen.d.ts +1 -1
  175. package/dist/api/inference/v1/marshalling.gen.js +4 -3
  176. package/dist/api/inference/v1/types.gen.d.ts +331 -151
  177. package/dist/api/inference/v1beta1/api.gen.cjs +14 -16
  178. package/dist/api/inference/v1beta1/api.gen.d.ts +8 -11
  179. package/dist/api/inference/v1beta1/api.gen.js +14 -16
  180. package/dist/api/inference/v1beta1/marshalling.gen.cjs +4 -3
  181. package/dist/api/inference/v1beta1/marshalling.gen.d.ts +1 -1
  182. package/dist/api/inference/v1beta1/marshalling.gen.js +4 -3
  183. package/dist/api/inference/v1beta1/types.gen.d.ts +342 -155
  184. package/dist/api/instance/index.gen.d.ts +2 -2
  185. package/dist/api/instance/v1/api.gen.cjs +69 -117
  186. package/dist/api/instance/v1/api.gen.d.ts +56 -105
  187. package/dist/api/instance/v1/api.gen.js +69 -117
  188. package/dist/api/instance/v1/api.utils.cjs +4 -3
  189. package/dist/api/instance/v1/api.utils.d.ts +1 -1
  190. package/dist/api/instance/v1/api.utils.js +4 -3
  191. package/dist/api/instance/v1/marshalling.gen.cjs +4 -3
  192. package/dist/api/instance/v1/marshalling.gen.d.ts +1 -1
  193. package/dist/api/instance/v1/marshalling.gen.js +4 -3
  194. package/dist/api/instance/v1/marshalling.utils.d.ts +1 -1
  195. package/dist/api/instance/v1/types.gen.d.ts +1352 -599
  196. package/dist/api/instance/v1/types.private.gen.d.ts +132 -60
  197. package/dist/api/instance/v1/types.utils.d.ts +1 -1
  198. package/dist/api/interlink/index.gen.d.ts +2 -2
  199. package/dist/api/interlink/v1beta1/api.gen.cjs +107 -63
  200. package/dist/api/interlink/v1beta1/api.gen.d.ts +58 -65
  201. package/dist/api/interlink/v1beta1/api.gen.js +108 -64
  202. package/dist/api/interlink/v1beta1/content.gen.cjs +6 -0
  203. package/dist/api/interlink/v1beta1/content.gen.d.ts +5 -0
  204. package/dist/api/interlink/v1beta1/content.gen.js +6 -0
  205. package/dist/api/interlink/v1beta1/index.gen.cjs +3 -0
  206. package/dist/api/interlink/v1beta1/index.gen.d.ts +2 -1
  207. package/dist/api/interlink/v1beta1/index.gen.js +3 -0
  208. package/dist/api/interlink/v1beta1/marshalling.gen.cjs +84 -8
  209. package/dist/api/interlink/v1beta1/marshalling.gen.d.ts +4 -2
  210. package/dist/api/interlink/v1beta1/marshalling.gen.js +84 -8
  211. package/dist/api/interlink/v1beta1/types.gen.d.ts +545 -195
  212. package/dist/api/interlink/v1beta1/validation-rules.gen.cjs +25 -0
  213. package/dist/api/interlink/v1beta1/validation-rules.gen.d.ts +23 -0
  214. package/dist/api/interlink/v1beta1/validation-rules.gen.js +25 -0
  215. package/dist/api/iot/index.gen.d.ts +2 -2
  216. package/dist/api/iot/v1/api.gen.cjs +43 -75
  217. package/dist/api/iot/v1/api.gen.d.ts +36 -69
  218. package/dist/api/iot/v1/api.gen.js +43 -75
  219. package/dist/api/iot/v1/marshalling.gen.cjs +4 -3
  220. package/dist/api/iot/v1/marshalling.gen.d.ts +1 -1
  221. package/dist/api/iot/v1/marshalling.gen.js +4 -3
  222. package/dist/api/iot/v1/types.gen.d.ts +567 -322
  223. package/dist/api/ipam/index.gen.d.ts +2 -2
  224. package/dist/api/ipam/v1/api.gen.cjs +11 -30
  225. package/dist/api/ipam/v1/api.gen.d.ts +10 -31
  226. package/dist/api/ipam/v1/api.gen.js +11 -30
  227. package/dist/api/ipam/v1/marshalling.gen.cjs +4 -3
  228. package/dist/api/ipam/v1/marshalling.gen.d.ts +1 -1
  229. package/dist/api/ipam/v1/marshalling.gen.js +4 -3
  230. package/dist/api/ipam/v1/types.gen.d.ts +147 -106
  231. package/dist/api/ipfs/index.gen.d.ts +2 -2
  232. package/dist/api/ipfs/v1alpha1/api.gen.cjs +6 -5
  233. package/dist/api/ipfs/v1alpha1/api.gen.d.ts +2 -2
  234. package/dist/api/ipfs/v1alpha1/api.gen.js +6 -5
  235. package/dist/api/ipfs/v1alpha1/marshalling.gen.cjs +4 -3
  236. package/dist/api/ipfs/v1alpha1/marshalling.gen.d.ts +1 -1
  237. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +4 -3
  238. package/dist/api/ipfs/v1alpha1/types.gen.d.ts +1 -1
  239. package/dist/api/jobs/index.gen.d.ts +2 -2
  240. package/dist/api/jobs/v1alpha1/api.gen.cjs +7 -8
  241. package/dist/api/jobs/v1alpha1/api.gen.d.ts +6 -8
  242. package/dist/api/jobs/v1alpha1/api.gen.js +7 -8
  243. package/dist/api/jobs/v1alpha1/marshalling.gen.cjs +4 -3
  244. package/dist/api/jobs/v1alpha1/marshalling.gen.d.ts +1 -1
  245. package/dist/api/jobs/v1alpha1/marshalling.gen.js +4 -3
  246. package/dist/api/jobs/v1alpha1/types.gen.d.ts +166 -92
  247. package/dist/api/k8s/index.gen.d.ts +2 -2
  248. package/dist/api/k8s/v1/api.gen.cjs +39 -83
  249. package/dist/api/k8s/v1/api.gen.d.ts +29 -74
  250. package/dist/api/k8s/v1/api.gen.js +39 -83
  251. package/dist/api/k8s/v1/marshalling.gen.cjs +4 -3
  252. package/dist/api/k8s/v1/marshalling.gen.d.ts +1 -1
  253. package/dist/api/k8s/v1/marshalling.gen.js +4 -3
  254. package/dist/api/k8s/v1/types.gen.d.ts +744 -507
  255. package/dist/api/key_manager/index.gen.d.ts +2 -2
  256. package/dist/api/key_manager/v1alpha1/api.gen.cjs +26 -61
  257. package/dist/api/key_manager/v1alpha1/api.gen.d.ts +21 -58
  258. package/dist/api/key_manager/v1alpha1/api.gen.js +26 -61
  259. package/dist/api/key_manager/v1alpha1/marshalling.gen.cjs +4 -3
  260. package/dist/api/key_manager/v1alpha1/marshalling.gen.d.ts +1 -1
  261. package/dist/api/key_manager/v1alpha1/marshalling.gen.js +4 -3
  262. package/dist/api/key_manager/v1alpha1/types.gen.d.ts +197 -115
  263. package/dist/api/lb/index.gen.d.ts +2 -2
  264. package/dist/api/lb/v1/api.gen.cjs +68 -178
  265. package/dist/api/lb/v1/api.gen.d.ts +60 -176
  266. package/dist/api/lb/v1/api.gen.js +69 -179
  267. package/dist/api/lb/v1/api.utils.cjs +3 -1
  268. package/dist/api/lb/v1/api.utils.d.ts +1 -1
  269. package/dist/api/lb/v1/api.utils.js +3 -1
  270. package/dist/api/lb/v1/index.gen.d.ts +1 -1
  271. package/dist/api/lb/v1/marshalling.gen.cjs +9 -3
  272. package/dist/api/lb/v1/marshalling.gen.d.ts +3 -2
  273. package/dist/api/lb/v1/marshalling.gen.js +9 -3
  274. package/dist/api/lb/v1/types.gen.d.ts +1835 -1117
  275. package/dist/api/lb/v1/types.utils.d.ts +1 -1
  276. package/dist/api/llm_inference/index.gen.d.ts +2 -2
  277. package/dist/api/llm_inference/v1beta1/api.gen.cjs +6 -5
  278. package/dist/api/llm_inference/v1beta1/api.gen.d.ts +2 -2
  279. package/dist/api/llm_inference/v1beta1/api.gen.js +6 -5
  280. package/dist/api/llm_inference/v1beta1/marshalling.gen.cjs +4 -3
  281. package/dist/api/llm_inference/v1beta1/marshalling.gen.d.ts +1 -1
  282. package/dist/api/llm_inference/v1beta1/marshalling.gen.js +4 -3
  283. package/dist/api/llm_inference/v1beta1/types.gen.d.ts +1 -1
  284. package/dist/api/marketplace/index.gen.d.ts +2 -2
  285. package/dist/api/marketplace/v2/api.gen.cjs +13 -25
  286. package/dist/api/marketplace/v2/api.gen.d.ts +11 -25
  287. package/dist/api/marketplace/v2/api.gen.js +13 -25
  288. package/dist/api/marketplace/v2/marshalling.gen.cjs +4 -3
  289. package/dist/api/marketplace/v2/marshalling.gen.js +4 -3
  290. package/dist/api/marketplace/v2/types.gen.d.ts +95 -42
  291. package/dist/api/mnq/index.gen.d.ts +2 -2
  292. package/dist/api/mnq/v1beta1/api.gen.cjs +29 -80
  293. package/dist/api/mnq/v1beta1/api.gen.d.ts +32 -84
  294. package/dist/api/mnq/v1beta1/api.gen.js +29 -80
  295. package/dist/api/mnq/v1beta1/index.gen.d.ts +1 -1
  296. package/dist/api/mnq/v1beta1/marshalling.gen.cjs +4 -3
  297. package/dist/api/mnq/v1beta1/marshalling.gen.d.ts +1 -1
  298. package/dist/api/mnq/v1beta1/marshalling.gen.js +4 -3
  299. package/dist/api/mnq/v1beta1/types.gen.d.ts +343 -170
  300. package/dist/api/mongodb/index.gen.d.ts +2 -2
  301. package/dist/api/mongodb/v1alpha1/api.gen.cjs +25 -67
  302. package/dist/api/mongodb/v1alpha1/api.gen.d.ts +23 -66
  303. package/dist/api/mongodb/v1alpha1/api.gen.js +25 -67
  304. package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +4 -3
  305. package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +1 -1
  306. package/dist/api/mongodb/v1alpha1/marshalling.gen.js +4 -3
  307. package/dist/api/mongodb/v1alpha1/types.gen.d.ts +444 -190
  308. package/dist/api/qaas/index.gen.d.ts +2 -2
  309. package/dist/api/qaas/v1alpha1/api.gen.cjs +23 -39
  310. package/dist/api/qaas/v1alpha1/api.gen.d.ts +21 -38
  311. package/dist/api/qaas/v1alpha1/api.gen.js +23 -39
  312. package/dist/api/qaas/v1alpha1/marshalling.gen.cjs +4 -3
  313. package/dist/api/qaas/v1alpha1/marshalling.gen.d.ts +1 -1
  314. package/dist/api/qaas/v1alpha1/marshalling.gen.js +4 -3
  315. package/dist/api/qaas/v1alpha1/types.gen.d.ts +503 -175
  316. package/dist/api/rdb/index.gen.d.ts +2 -2
  317. package/dist/api/rdb/v1/api.gen.cjs +68 -207
  318. package/dist/api/rdb/v1/api.gen.d.ts +62 -203
  319. package/dist/api/rdb/v1/api.gen.js +68 -207
  320. package/dist/api/rdb/v1/marshalling.gen.cjs +4 -3
  321. package/dist/api/rdb/v1/marshalling.gen.d.ts +1 -1
  322. package/dist/api/rdb/v1/marshalling.gen.js +4 -3
  323. package/dist/api/rdb/v1/types.gen.d.ts +1006 -525
  324. package/dist/api/redis/index.gen.d.ts +2 -2
  325. package/dist/api/redis/v1/api.gen.cjs +29 -88
  326. package/dist/api/redis/v1/api.gen.d.ts +27 -87
  327. package/dist/api/redis/v1/api.gen.js +29 -88
  328. package/dist/api/redis/v1/marshalling.gen.cjs +4 -3
  329. package/dist/api/redis/v1/marshalling.gen.d.ts +1 -1
  330. package/dist/api/redis/v1/marshalling.gen.js +4 -3
  331. package/dist/api/redis/v1/types.gen.d.ts +448 -171
  332. package/dist/api/registry/index.gen.d.ts +2 -2
  333. package/dist/api/registry/v1/api.gen.cjs +18 -45
  334. package/dist/api/registry/v1/api.gen.d.ts +16 -44
  335. package/dist/api/registry/v1/api.gen.js +18 -45
  336. package/dist/api/registry/v1/marshalling.gen.cjs +4 -3
  337. package/dist/api/registry/v1/marshalling.gen.d.ts +1 -1
  338. package/dist/api/registry/v1/marshalling.gen.js +4 -3
  339. package/dist/api/registry/v1/types.gen.d.ts +201 -117
  340. package/dist/api/secret/index.gen.d.ts +2 -2
  341. package/dist/api/secret/v1alpha1/api.gen.cjs +5 -4
  342. package/dist/api/secret/v1alpha1/api.gen.d.ts +2 -2
  343. package/dist/api/secret/v1alpha1/api.gen.js +5 -4
  344. package/dist/api/secret/v1alpha1/marshalling.gen.cjs +4 -3
  345. package/dist/api/secret/v1alpha1/marshalling.gen.d.ts +1 -1
  346. package/dist/api/secret/v1alpha1/marshalling.gen.js +4 -3
  347. package/dist/api/secret/v1alpha1/types.gen.d.ts +1 -1
  348. package/dist/api/secret/v1beta1/api.gen.cjs +24 -51
  349. package/dist/api/secret/v1beta1/api.gen.d.ts +23 -53
  350. package/dist/api/secret/v1beta1/api.gen.js +24 -51
  351. package/dist/api/secret/v1beta1/marshalling.gen.cjs +4 -3
  352. package/dist/api/secret/v1beta1/marshalling.gen.d.ts +1 -1
  353. package/dist/api/secret/v1beta1/marshalling.gen.js +4 -3
  354. package/dist/api/secret/v1beta1/types.gen.d.ts +360 -225
  355. package/dist/api/serverless_sqldb/index.gen.d.ts +2 -2
  356. package/dist/api/serverless_sqldb/v1alpha1/api.gen.cjs +15 -32
  357. package/dist/api/serverless_sqldb/v1alpha1/api.gen.d.ts +13 -31
  358. package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +15 -32
  359. package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.cjs +4 -3
  360. package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.d.ts +1 -1
  361. package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +4 -3
  362. package/dist/api/serverless_sqldb/v1alpha1/types.gen.d.ts +169 -77
  363. package/dist/api/tem/index.gen.d.ts +2 -2
  364. package/dist/api/tem/v1alpha1/api.gen.cjs +28 -63
  365. package/dist/api/tem/v1alpha1/api.gen.d.ts +26 -62
  366. package/dist/api/tem/v1alpha1/api.gen.js +28 -63
  367. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +4 -3
  368. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +1 -1
  369. package/dist/api/tem/v1alpha1/marshalling.gen.js +4 -3
  370. package/dist/api/tem/v1alpha1/types.gen.d.ts +762 -339
  371. package/dist/api/test/index.gen.d.ts +2 -2
  372. package/dist/api/test/v1/api.gen.cjs +14 -16
  373. package/dist/api/test/v1/api.gen.d.ts +8 -11
  374. package/dist/api/test/v1/api.gen.js +14 -16
  375. package/dist/api/test/v1/marshalling.gen.cjs +4 -3
  376. package/dist/api/test/v1/marshalling.gen.d.ts +1 -1
  377. package/dist/api/test/v1/marshalling.gen.js +4 -3
  378. package/dist/api/test/v1/types.gen.d.ts +21 -10
  379. package/dist/api/vpc/index.gen.d.ts +2 -2
  380. package/dist/api/vpc/v1/api.gen.cjs +5 -4
  381. package/dist/api/vpc/v1/api.gen.d.ts +2 -2
  382. package/dist/api/vpc/v1/api.gen.js +5 -4
  383. package/dist/api/vpc/v1/marshalling.gen.cjs +4 -3
  384. package/dist/api/vpc/v1/marshalling.gen.d.ts +1 -1
  385. package/dist/api/vpc/v1/marshalling.gen.js +4 -3
  386. package/dist/api/vpc/v1/types.gen.d.ts +1 -1
  387. package/dist/api/vpc/v2/api.gen.cjs +18 -53
  388. package/dist/api/vpc/v2/api.gen.d.ts +18 -45
  389. package/dist/api/vpc/v2/api.gen.js +19 -54
  390. package/dist/api/vpc/v2/index.gen.d.ts +1 -1
  391. package/dist/api/vpc/v2/marshalling.gen.cjs +4 -18
  392. package/dist/api/vpc/v2/marshalling.gen.d.ts +2 -4
  393. package/dist/api/vpc/v2/marshalling.gen.js +4 -18
  394. package/dist/api/vpc/v2/types.gen.d.ts +333 -200
  395. package/dist/api/vpcgw/index.gen.d.ts +2 -2
  396. package/dist/api/vpcgw/v1/api.gen.cjs +42 -140
  397. package/dist/api/vpcgw/v1/api.gen.d.ts +40 -139
  398. package/dist/api/vpcgw/v1/api.gen.js +42 -140
  399. package/dist/api/vpcgw/v1/marshalling.gen.cjs +4 -3
  400. package/dist/api/vpcgw/v1/marshalling.gen.d.ts +1 -1
  401. package/dist/api/vpcgw/v1/marshalling.gen.js +4 -3
  402. package/dist/api/vpcgw/v1/types.gen.d.ts +784 -366
  403. package/dist/api/vpcgw/v2/api.gen.cjs +33 -93
  404. package/dist/api/vpcgw/v2/api.gen.d.ts +31 -92
  405. package/dist/api/vpcgw/v2/api.gen.js +33 -93
  406. package/dist/api/vpcgw/v2/marshalling.gen.cjs +4 -3
  407. package/dist/api/vpcgw/v2/marshalling.gen.d.ts +1 -1
  408. package/dist/api/vpcgw/v2/marshalling.gen.js +4 -3
  409. package/dist/api/vpcgw/v2/types.gen.d.ts +546 -197
  410. package/dist/api/webhosting/index.gen.d.ts +2 -2
  411. package/dist/api/webhosting/v1/api.gen.cjs +28 -55
  412. package/dist/api/webhosting/v1/api.gen.d.ts +40 -71
  413. package/dist/api/webhosting/v1/api.gen.js +28 -55
  414. package/dist/api/webhosting/v1/marshalling.gen.cjs +4 -3
  415. package/dist/api/webhosting/v1/marshalling.gen.d.ts +1 -1
  416. package/dist/api/webhosting/v1/marshalling.gen.js +4 -3
  417. package/dist/api/webhosting/v1/types.gen.d.ts +700 -351
  418. package/dist/client/dist/helpers/is-browser.cjs +4 -0
  419. package/dist/client/dist/helpers/is-browser.js +4 -0
  420. package/dist/{package.json.cjs → client/dist/package.json.cjs} +7 -16
  421. package/dist/{package.json.js → client/dist/package.json.js} +7 -16
  422. package/dist/client/dist/scw/constants.cjs +7 -0
  423. package/dist/{vendor → client/dist/vendor}/base64/index.cjs +8 -4
  424. package/dist/{vendor → client/dist/vendor}/base64/index.js +8 -4
  425. package/dist/index.cjs +16 -16
  426. package/dist/index.d.ts +1 -15
  427. package/dist/index.js +13 -13
  428. package/node_modules/@scaleway/sdk-client/README.md +36 -0
  429. package/node_modules/@scaleway/sdk-client/dist/helpers/is-browser.cjs +4 -0
  430. package/node_modules/@scaleway/sdk-client/dist/helpers/is-browser.js +4 -0
  431. package/node_modules/@scaleway/sdk-client/dist/helpers/is-response.cjs +4 -0
  432. package/node_modules/@scaleway/sdk-client/dist/helpers/is-response.js +4 -0
  433. package/node_modules/@scaleway/sdk-client/dist/helpers/json.cjs +7 -0
  434. package/{dist → node_modules/@scaleway/sdk-client/dist}/helpers/json.d.ts +2 -2
  435. package/node_modules/@scaleway/sdk-client/dist/helpers/json.js +7 -0
  436. package/node_modules/@scaleway/sdk-client/dist/helpers/marshalling.cjs +76 -0
  437. package/node_modules/@scaleway/sdk-client/dist/helpers/marshalling.js +76 -0
  438. package/node_modules/@scaleway/sdk-client/dist/index.cjs +52 -0
  439. package/node_modules/@scaleway/sdk-client/dist/index.d.ts +15 -0
  440. package/node_modules/@scaleway/sdk-client/dist/index.js +52 -0
  441. package/node_modules/@scaleway/sdk-client/dist/internal/async/interval-retrier.cjs +53 -0
  442. package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/async/interval-retrier.d.ts +2 -2
  443. package/node_modules/@scaleway/sdk-client/dist/internal/async/interval-retrier.js +53 -0
  444. package/node_modules/@scaleway/sdk-client/dist/internal/async/sleep.cjs +6 -0
  445. package/node_modules/@scaleway/sdk-client/dist/internal/async/sleep.js +6 -0
  446. package/node_modules/@scaleway/sdk-client/dist/internal/interceptors/composer.cjs +25 -0
  447. package/node_modules/@scaleway/sdk-client/dist/internal/interceptors/composer.js +25 -0
  448. package/node_modules/@scaleway/sdk-client/dist/internal/interceptors/helpers.cjs +12 -0
  449. package/node_modules/@scaleway/sdk-client/dist/internal/interceptors/helpers.js +12 -0
  450. package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/interceptors/types.d.ts +2 -2
  451. package/node_modules/@scaleway/sdk-client/dist/internal/logger/console-logger.cjs +24 -0
  452. package/node_modules/@scaleway/sdk-client/dist/internal/logger/console-logger.js +24 -0
  453. package/node_modules/@scaleway/sdk-client/dist/internal/logger/index.cjs +12 -0
  454. package/node_modules/@scaleway/sdk-client/dist/internal/logger/index.js +12 -0
  455. package/node_modules/@scaleway/sdk-client/dist/internal/logger/level-resolver.cjs +13 -0
  456. package/node_modules/@scaleway/sdk-client/dist/internal/logger/level-resolver.js +13 -0
  457. package/node_modules/@scaleway/sdk-client/dist/internal/validations/string-validation.cjs +30 -0
  458. package/node_modules/@scaleway/sdk-client/dist/internal/validations/string-validation.js +30 -0
  459. package/node_modules/@scaleway/sdk-client/dist/package.json.cjs +67 -0
  460. package/node_modules/@scaleway/sdk-client/dist/package.json.js +67 -0
  461. package/node_modules/@scaleway/sdk-client/dist/scw/api.cjs +8 -0
  462. package/node_modules/@scaleway/sdk-client/dist/scw/api.js +8 -0
  463. package/node_modules/@scaleway/sdk-client/dist/scw/auth.cjs +26 -0
  464. package/node_modules/@scaleway/sdk-client/dist/scw/auth.js +26 -0
  465. package/node_modules/@scaleway/sdk-client/dist/scw/client-ini-factory.cjs +66 -0
  466. package/node_modules/@scaleway/sdk-client/dist/scw/client-ini-factory.js +66 -0
  467. package/node_modules/@scaleway/sdk-client/dist/scw/client-ini-profile.cjs +23 -0
  468. package/node_modules/@scaleway/sdk-client/dist/scw/client-ini-profile.js +23 -0
  469. package/node_modules/@scaleway/sdk-client/dist/scw/client-settings.cjs +51 -0
  470. package/node_modules/@scaleway/sdk-client/dist/scw/client-settings.js +51 -0
  471. package/node_modules/@scaleway/sdk-client/dist/scw/client.cjs +31 -0
  472. package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/client.d.ts +2 -2
  473. package/node_modules/@scaleway/sdk-client/dist/scw/client.js +31 -0
  474. package/node_modules/@scaleway/sdk-client/dist/scw/constants.js +7 -0
  475. package/node_modules/@scaleway/sdk-client/dist/scw/custom-marshalling.cjs +126 -0
  476. package/node_modules/@scaleway/sdk-client/dist/scw/custom-marshalling.js +126 -0
  477. package/node_modules/@scaleway/sdk-client/dist/scw/custom-types.cjs +11 -0
  478. package/node_modules/@scaleway/sdk-client/dist/scw/custom-types.js +11 -0
  479. package/node_modules/@scaleway/sdk-client/dist/scw/errors/error-parser.cjs +76 -0
  480. package/node_modules/@scaleway/sdk-client/dist/scw/errors/error-parser.js +76 -0
  481. package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/invalid-request-mapper.cjs +36 -0
  482. package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/invalid-request-mapper.js +36 -0
  483. package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/unknown-resource-mapper.cjs +23 -0
  484. package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/unknown-resource-mapper.js +23 -0
  485. package/node_modules/@scaleway/sdk-client/dist/scw/errors/scw-error.cjs +43 -0
  486. package/node_modules/@scaleway/sdk-client/dist/scw/errors/scw-error.js +43 -0
  487. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/already-exists-error.cjs +31 -0
  488. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/already-exists-error.js +31 -0
  489. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/denied-authentication-error.cjs +37 -0
  490. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/denied-authentication-error.js +37 -0
  491. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/index.cjs +28 -0
  492. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/index.js +28 -0
  493. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/invalid-arguments-error.cjs +54 -0
  494. package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/invalid-arguments-error.d.ts +2 -2
  495. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/invalid-arguments-error.js +54 -0
  496. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/out-of-stock-error.cjs +17 -0
  497. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/out-of-stock-error.js +17 -0
  498. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/permissions-denied-error.cjs +29 -0
  499. package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/permissions-denied-error.d.ts +2 -2
  500. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/permissions-denied-error.js +29 -0
  501. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/precondition-failed-error.cjs +32 -0
  502. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/precondition-failed-error.js +32 -0
  503. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/quotas-exceeded-error.cjs +43 -0
  504. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/quotas-exceeded-error.js +43 -0
  505. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-expired-error.cjs +31 -0
  506. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-expired-error.js +31 -0
  507. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-locked-error.cjs +20 -0
  508. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-locked-error.js +20 -0
  509. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-not-found-error.cjs +24 -0
  510. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-not-found-error.js +24 -0
  511. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/too-many-requests-error.cjs +58 -0
  512. package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/too-many-requests-error.d.ts +2 -2
  513. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/too-many-requests-error.js +58 -0
  514. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/transient-state-error.cjs +31 -0
  515. package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/transient-state-error.js +31 -0
  516. package/node_modules/@scaleway/sdk-client/dist/scw/errors/types.cjs +15 -0
  517. package/node_modules/@scaleway/sdk-client/dist/scw/errors/types.js +15 -0
  518. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/build-fetcher.cjs +60 -0
  519. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/build-fetcher.js +60 -0
  520. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/http-dumper.cjs +20 -0
  521. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/http-dumper.js +20 -0
  522. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/http-interceptors.cjs +43 -0
  523. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/http-interceptors.js +43 -0
  524. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/resource-paginator.cjs +36 -0
  525. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/resource-paginator.js +36 -0
  526. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/response-parser.cjs +55 -0
  527. package/node_modules/@scaleway/sdk-client/dist/scw/fetch/response-parser.js +55 -0
  528. package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/types.d.ts +2 -2
  529. package/node_modules/@scaleway/sdk-client/dist/vendor/base64/index.cjs +46 -0
  530. package/node_modules/@scaleway/sdk-client/dist/vendor/base64/index.js +46 -0
  531. package/node_modules/@scaleway/sdk-client/package.json +36 -0
  532. package/package.json +6 -4
  533. package/dist/helpers/is-browser.cjs +0 -7
  534. package/dist/helpers/is-browser.js +0 -7
  535. /package/dist/{helpers → client/dist/helpers}/is-response.cjs +0 -0
  536. /package/dist/{helpers → client/dist/helpers}/is-response.js +0 -0
  537. /package/dist/{helpers → client/dist/helpers}/json.cjs +0 -0
  538. /package/dist/{helpers → client/dist/helpers}/json.js +0 -0
  539. /package/dist/{helpers → client/dist/helpers}/marshalling.cjs +0 -0
  540. /package/dist/{helpers → client/dist/helpers}/marshalling.js +0 -0
  541. /package/dist/{internal → client/dist/internal}/async/interval-retrier.cjs +0 -0
  542. /package/dist/{internal → client/dist/internal}/async/interval-retrier.js +0 -0
  543. /package/dist/{internal → client/dist/internal}/async/sleep.cjs +0 -0
  544. /package/dist/{internal → client/dist/internal}/async/sleep.js +0 -0
  545. /package/dist/{internal → client/dist/internal}/interceptors/composer.cjs +0 -0
  546. /package/dist/{internal → client/dist/internal}/interceptors/composer.js +0 -0
  547. /package/dist/{internal → client/dist/internal}/interceptors/helpers.cjs +0 -0
  548. /package/dist/{internal → client/dist/internal}/interceptors/helpers.js +0 -0
  549. /package/dist/{internal → client/dist/internal}/logger/console-logger.cjs +0 -0
  550. /package/dist/{internal → client/dist/internal}/logger/console-logger.js +0 -0
  551. /package/dist/{internal → client/dist/internal}/logger/index.cjs +0 -0
  552. /package/dist/{internal → client/dist/internal}/logger/index.js +0 -0
  553. /package/dist/{internal → client/dist/internal}/logger/level-resolver.cjs +0 -0
  554. /package/dist/{internal → client/dist/internal}/logger/level-resolver.js +0 -0
  555. /package/dist/{internal → client/dist/internal}/validations/string-validation.cjs +0 -0
  556. /package/dist/{internal → client/dist/internal}/validations/string-validation.js +0 -0
  557. /package/dist/{scw → client/dist/scw}/api.cjs +0 -0
  558. /package/dist/{scw → client/dist/scw}/api.js +0 -0
  559. /package/dist/{scw → client/dist/scw}/auth.cjs +0 -0
  560. /package/dist/{scw → client/dist/scw}/auth.js +0 -0
  561. /package/dist/{scw → client/dist/scw}/client-ini-factory.cjs +0 -0
  562. /package/dist/{scw → client/dist/scw}/client-ini-factory.js +0 -0
  563. /package/dist/{scw → client/dist/scw}/client-ini-profile.cjs +0 -0
  564. /package/dist/{scw → client/dist/scw}/client-ini-profile.js +0 -0
  565. /package/dist/{scw → client/dist/scw}/client-settings.cjs +0 -0
  566. /package/dist/{scw → client/dist/scw}/client-settings.js +0 -0
  567. /package/dist/{scw → client/dist/scw}/client.cjs +0 -0
  568. /package/dist/{scw → client/dist/scw}/client.js +0 -0
  569. /package/dist/{scw → client/dist/scw}/constants.js +0 -0
  570. /package/dist/{scw → client/dist/scw}/custom-marshalling.cjs +0 -0
  571. /package/dist/{scw → client/dist/scw}/custom-marshalling.js +0 -0
  572. /package/dist/{scw → client/dist/scw}/custom-types.cjs +0 -0
  573. /package/dist/{scw → client/dist/scw}/custom-types.js +0 -0
  574. /package/dist/{scw → client/dist/scw}/errors/error-parser.cjs +0 -0
  575. /package/dist/{scw → client/dist/scw}/errors/error-parser.js +0 -0
  576. /package/dist/{scw → client/dist/scw}/errors/non-standard/invalid-request-mapper.cjs +0 -0
  577. /package/dist/{scw → client/dist/scw}/errors/non-standard/invalid-request-mapper.js +0 -0
  578. /package/dist/{scw → client/dist/scw}/errors/non-standard/unknown-resource-mapper.cjs +0 -0
  579. /package/dist/{scw → client/dist/scw}/errors/non-standard/unknown-resource-mapper.js +0 -0
  580. /package/dist/{scw → client/dist/scw}/errors/scw-error.cjs +0 -0
  581. /package/dist/{scw → client/dist/scw}/errors/scw-error.js +0 -0
  582. /package/dist/{scw → client/dist/scw}/errors/standard/already-exists-error.cjs +0 -0
  583. /package/dist/{scw → client/dist/scw}/errors/standard/already-exists-error.js +0 -0
  584. /package/dist/{scw → client/dist/scw}/errors/standard/denied-authentication-error.cjs +0 -0
  585. /package/dist/{scw → client/dist/scw}/errors/standard/denied-authentication-error.js +0 -0
  586. /package/dist/{scw → client/dist/scw}/errors/standard/index.cjs +0 -0
  587. /package/dist/{scw → client/dist/scw}/errors/standard/index.js +0 -0
  588. /package/dist/{scw → client/dist/scw}/errors/standard/invalid-arguments-error.cjs +0 -0
  589. /package/dist/{scw → client/dist/scw}/errors/standard/invalid-arguments-error.js +0 -0
  590. /package/dist/{scw → client/dist/scw}/errors/standard/out-of-stock-error.cjs +0 -0
  591. /package/dist/{scw → client/dist/scw}/errors/standard/out-of-stock-error.js +0 -0
  592. /package/dist/{scw → client/dist/scw}/errors/standard/permissions-denied-error.cjs +0 -0
  593. /package/dist/{scw → client/dist/scw}/errors/standard/permissions-denied-error.js +0 -0
  594. /package/dist/{scw → client/dist/scw}/errors/standard/precondition-failed-error.cjs +0 -0
  595. /package/dist/{scw → client/dist/scw}/errors/standard/precondition-failed-error.js +0 -0
  596. /package/dist/{scw → client/dist/scw}/errors/standard/quotas-exceeded-error.cjs +0 -0
  597. /package/dist/{scw → client/dist/scw}/errors/standard/quotas-exceeded-error.js +0 -0
  598. /package/dist/{scw → client/dist/scw}/errors/standard/resource-expired-error.cjs +0 -0
  599. /package/dist/{scw → client/dist/scw}/errors/standard/resource-expired-error.js +0 -0
  600. /package/dist/{scw → client/dist/scw}/errors/standard/resource-locked-error.cjs +0 -0
  601. /package/dist/{scw → client/dist/scw}/errors/standard/resource-locked-error.js +0 -0
  602. /package/dist/{scw → client/dist/scw}/errors/standard/resource-not-found-error.cjs +0 -0
  603. /package/dist/{scw → client/dist/scw}/errors/standard/resource-not-found-error.js +0 -0
  604. /package/dist/{scw → client/dist/scw}/errors/standard/too-many-requests-error.cjs +0 -0
  605. /package/dist/{scw → client/dist/scw}/errors/standard/too-many-requests-error.js +0 -0
  606. /package/dist/{scw → client/dist/scw}/errors/standard/transient-state-error.cjs +0 -0
  607. /package/dist/{scw → client/dist/scw}/errors/standard/transient-state-error.js +0 -0
  608. /package/dist/{scw → client/dist/scw}/errors/types.cjs +0 -0
  609. /package/dist/{scw → client/dist/scw}/errors/types.js +0 -0
  610. /package/dist/{scw → client/dist/scw}/fetch/build-fetcher.cjs +0 -0
  611. /package/dist/{scw → client/dist/scw}/fetch/build-fetcher.js +0 -0
  612. /package/dist/{scw → client/dist/scw}/fetch/http-dumper.cjs +0 -0
  613. /package/dist/{scw → client/dist/scw}/fetch/http-dumper.js +0 -0
  614. /package/dist/{scw → client/dist/scw}/fetch/http-interceptors.cjs +0 -0
  615. /package/dist/{scw → client/dist/scw}/fetch/http-interceptors.js +0 -0
  616. /package/dist/{scw → client/dist/scw}/fetch/resource-paginator.cjs +0 -0
  617. /package/dist/{scw → client/dist/scw}/fetch/resource-paginator.js +0 -0
  618. /package/dist/{scw → client/dist/scw}/fetch/response-parser.cjs +0 -0
  619. /package/dist/{scw → client/dist/scw}/fetch/response-parser.js +0 -0
  620. /package/{dist → node_modules/@scaleway/sdk-client/dist}/bridge.d.ts +0 -0
  621. /package/{dist → node_modules/@scaleway/sdk-client/dist}/helpers/is-browser.d.ts +0 -0
  622. /package/{dist → node_modules/@scaleway/sdk-client/dist}/helpers/is-response.d.ts +0 -0
  623. /package/{dist → node_modules/@scaleway/sdk-client/dist}/helpers/marshalling.d.ts +0 -0
  624. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/async/sleep.d.ts +0 -0
  625. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/interceptors/composer.d.ts +0 -0
  626. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/interceptors/helpers.d.ts +0 -0
  627. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/logger/console-logger.d.ts +0 -0
  628. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/logger/index.d.ts +0 -0
  629. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/logger/level-resolver.d.ts +0 -0
  630. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/logger/logger.d.ts +0 -0
  631. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/validations/string-validation.d.ts +0 -0
  632. /package/{dist → node_modules/@scaleway/sdk-client/dist}/internals.d.ts +0 -0
  633. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/api.d.ts +0 -0
  634. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/auth.d.ts +0 -0
  635. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/client-ini-factory.d.ts +0 -0
  636. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/client-ini-profile.d.ts +0 -0
  637. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/client-settings.d.ts +0 -0
  638. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/constants.cjs +0 -0
  639. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/constants.d.ts +0 -0
  640. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/custom-marshalling.d.ts +0 -0
  641. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/custom-types.d.ts +0 -0
  642. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/error-parser.d.ts +0 -0
  643. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/non-standard/invalid-request-mapper.d.ts +0 -0
  644. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/non-standard/unknown-resource-mapper.d.ts +0 -0
  645. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/scw-error-from-json.d.ts +0 -0
  646. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/scw-error.d.ts +0 -0
  647. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/already-exists-error.d.ts +0 -0
  648. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/denied-authentication-error.d.ts +0 -0
  649. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/index.d.ts +0 -0
  650. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/out-of-stock-error.d.ts +0 -0
  651. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/precondition-failed-error.d.ts +0 -0
  652. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/quotas-exceeded-error.d.ts +0 -0
  653. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/resource-expired-error.d.ts +0 -0
  654. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/resource-locked-error.d.ts +0 -0
  655. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/resource-not-found-error.d.ts +0 -0
  656. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/transient-state-error.d.ts +0 -0
  657. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/types.d.ts +0 -0
  658. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/build-fetcher.d.ts +0 -0
  659. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/http-dumper.d.ts +0 -0
  660. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/http-interceptors.d.ts +0 -0
  661. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/resource-paginator.d.ts +0 -0
  662. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/response-parser.d.ts +0 -0
  663. /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/locality.d.ts +0 -0
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const json = require("../../helpers/json.cjs");
4
+ const isRecordOfStringArray = (obj) => {
5
+ if (!json.isJSONObject(obj)) {
6
+ return false;
7
+ }
8
+ for (const elt of Object.values(obj)) {
9
+ if (!Array.isArray(elt) || Object.values(elt).find((x) => typeof x !== "string") !== void 0) {
10
+ return false;
11
+ }
12
+ }
13
+ return true;
14
+ };
15
+ exports.isRecordOfStringArray = isRecordOfStringArray;
@@ -0,0 +1,15 @@
1
+ import { isJSONObject } from "../../helpers/json.js";
2
+ const isRecordOfStringArray = (obj) => {
3
+ if (!isJSONObject(obj)) {
4
+ return false;
5
+ }
6
+ for (const elt of Object.values(obj)) {
7
+ if (!Array.isArray(elt) || Object.values(elt).find((x) => typeof x !== "string") !== void 0) {
8
+ return false;
9
+ }
10
+ }
11
+ return true;
12
+ };
13
+ export {
14
+ isRecordOfStringArray
15
+ };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const isBrowser = require("../../helpers/is-browser.cjs");
4
+ const composer = require("../../internal/interceptors/composer.cjs");
5
+ const auth = require("../auth.cjs");
6
+ const httpInterceptors = require("./http-interceptors.cjs");
7
+ const responseParser = require("./response-parser.cjs");
8
+ const buildRequest = (request, settings) => {
9
+ let { path } = request;
10
+ if (request.urlParams instanceof URLSearchParams) {
11
+ path = path.concat(`?${request.urlParams.toString()}`);
12
+ }
13
+ return new Request(`${settings.apiURL}${path}`, {
14
+ body: request.body,
15
+ headers: {
16
+ Accept: "application/json",
17
+ .../* istanbul ignore next */
18
+ !isBrowser.isBrowser() ? { "User-Agent": settings.userAgent } : {},
19
+ ...request.headers
20
+ },
21
+ method: request.method
22
+ });
23
+ };
24
+ const asIs = (response) => response;
25
+ const buildFetcher = (settings, httpClient) => {
26
+ let requestNumber = 0;
27
+ const prepareRequest = (requestId) => composer.composeRequestInterceptors([
28
+ ...settings.interceptors.map((obj) => obj.request).filter((obj) => obj),
29
+ httpInterceptors.logRequest(requestId, httpInterceptors.obfuscateInterceptor(auth.obfuscateAuthHeadersEntry))
30
+ ]);
31
+ const prepareResponse = (requestId) => composer.composeResponseInterceptors([
32
+ ...settings.interceptors.map((obj) => obj.response).filter((obj) => obj),
33
+ httpInterceptors.logResponse(requestId)
34
+ ]);
35
+ const prepareResponseErrors = () => composer.composeResponseErrorInterceptors(
36
+ settings.interceptors.map((obj) => obj.responseError).filter((obj) => obj)
37
+ );
38
+ return async (request, unwrapper = asIs) => {
39
+ const requestId = `${requestNumber += 1}`;
40
+ const reqInterceptors = prepareRequest(requestId);
41
+ const finalRequest = await reqInterceptors(buildRequest(request, settings));
42
+ try {
43
+ const response = await httpClient(finalRequest);
44
+ const resInterceptors = prepareResponse(requestId);
45
+ const finalResponse = await resInterceptors(response);
46
+ const resUnmarshaller = responseParser.responseParser(
47
+ unwrapper,
48
+ request.responseType ?? "json"
49
+ );
50
+ const unmarshaledResponse = await resUnmarshaller(finalResponse);
51
+ return unmarshaledResponse;
52
+ } catch (err) {
53
+ const resErrorInterceptors = prepareResponseErrors();
54
+ const handledError = await resErrorInterceptors(finalRequest, err);
55
+ return unwrapper(handledError);
56
+ }
57
+ };
58
+ };
59
+ exports.buildFetcher = buildFetcher;
60
+ exports.buildRequest = buildRequest;
@@ -0,0 +1,60 @@
1
+ import { isBrowser } from "../../helpers/is-browser.js";
2
+ import { composeRequestInterceptors, composeResponseInterceptors, composeResponseErrorInterceptors } from "../../internal/interceptors/composer.js";
3
+ import { obfuscateAuthHeadersEntry } from "../auth.js";
4
+ import { logRequest, logResponse, obfuscateInterceptor } from "./http-interceptors.js";
5
+ import { responseParser } from "./response-parser.js";
6
+ const buildRequest = (request, settings) => {
7
+ let { path } = request;
8
+ if (request.urlParams instanceof URLSearchParams) {
9
+ path = path.concat(`?${request.urlParams.toString()}`);
10
+ }
11
+ return new Request(`${settings.apiURL}${path}`, {
12
+ body: request.body,
13
+ headers: {
14
+ Accept: "application/json",
15
+ .../* istanbul ignore next */
16
+ !isBrowser() ? { "User-Agent": settings.userAgent } : {},
17
+ ...request.headers
18
+ },
19
+ method: request.method
20
+ });
21
+ };
22
+ const asIs = (response) => response;
23
+ const buildFetcher = (settings, httpClient) => {
24
+ let requestNumber = 0;
25
+ const prepareRequest = (requestId) => composeRequestInterceptors([
26
+ ...settings.interceptors.map((obj) => obj.request).filter((obj) => obj),
27
+ logRequest(requestId, obfuscateInterceptor(obfuscateAuthHeadersEntry))
28
+ ]);
29
+ const prepareResponse = (requestId) => composeResponseInterceptors([
30
+ ...settings.interceptors.map((obj) => obj.response).filter((obj) => obj),
31
+ logResponse(requestId)
32
+ ]);
33
+ const prepareResponseErrors = () => composeResponseErrorInterceptors(
34
+ settings.interceptors.map((obj) => obj.responseError).filter((obj) => obj)
35
+ );
36
+ return async (request, unwrapper = asIs) => {
37
+ const requestId = `${requestNumber += 1}`;
38
+ const reqInterceptors = prepareRequest(requestId);
39
+ const finalRequest = await reqInterceptors(buildRequest(request, settings));
40
+ try {
41
+ const response = await httpClient(finalRequest);
42
+ const resInterceptors = prepareResponse(requestId);
43
+ const finalResponse = await resInterceptors(response);
44
+ const resUnmarshaller = responseParser(
45
+ unwrapper,
46
+ request.responseType ?? "json"
47
+ );
48
+ const unmarshaledResponse = await resUnmarshaller(finalResponse);
49
+ return unmarshaledResponse;
50
+ } catch (err) {
51
+ const resErrorInterceptors = prepareResponseErrors();
52
+ const handledError = await resErrorInterceptors(finalRequest, err);
53
+ return unwrapper(handledError);
54
+ }
55
+ };
56
+ };
57
+ export {
58
+ buildFetcher,
59
+ buildRequest
60
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const toPascalCase = (str) => str.replace(
4
+ /\w+/g,
5
+ (word) => `${word[0].toUpperCase()}${word.slice(1).toLowerCase()}`
6
+ );
7
+ const serializeHeadersEntry = ([name, value]) => `${toPascalCase(name)}: ${value}`;
8
+ const serializeHeaders = (headers) => Array.from(headers.entries(), serializeHeadersEntry);
9
+ const dumpRequest = async (request) => [
10
+ `${request.method.toUpperCase()}: ${request.url}`,
11
+ ...serializeHeaders(request.headers),
12
+ await request.clone().text()
13
+ ].join("\r\n");
14
+ const dumpResponse = async (response) => [
15
+ `HTTP ${response.status} ${response.ok ? "OK" : "NOK"}`,
16
+ ...serializeHeaders(response.headers),
17
+ await response.clone().text()
18
+ ].join("\r\n");
19
+ exports.dumpRequest = dumpRequest;
20
+ exports.dumpResponse = dumpResponse;
@@ -0,0 +1,20 @@
1
+ const toPascalCase = (str) => str.replace(
2
+ /\w+/g,
3
+ (word) => `${word[0].toUpperCase()}${word.slice(1).toLowerCase()}`
4
+ );
5
+ const serializeHeadersEntry = ([name, value]) => `${toPascalCase(name)}: ${value}`;
6
+ const serializeHeaders = (headers) => Array.from(headers.entries(), serializeHeadersEntry);
7
+ const dumpRequest = async (request) => [
8
+ `${request.method.toUpperCase()}: ${request.url}`,
9
+ ...serializeHeaders(request.headers),
10
+ await request.clone().text()
11
+ ].join("\r\n");
12
+ const dumpResponse = async (response) => [
13
+ `HTTP ${response.status} ${response.ok ? "OK" : "NOK"}`,
14
+ ...serializeHeaders(response.headers),
15
+ await response.clone().text()
16
+ ].join("\r\n");
17
+ export {
18
+ dumpRequest,
19
+ dumpResponse
20
+ };
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const index = require("../../internal/logger/index.cjs");
4
+ const levelResolver = require("../../internal/logger/level-resolver.cjs");
5
+ const httpDumper = require("./http-dumper.cjs");
6
+ class ObfuscatedRequest extends Request {
7
+ constructor(request, obfuscate) {
8
+ super(request);
9
+ this.request = request;
10
+ this.obfuscate = obfuscate;
11
+ }
12
+ get headers() {
13
+ return new Headers(Array.from(this.request.headers, this.obfuscate));
14
+ }
15
+ clone() {
16
+ return new ObfuscatedRequest(this.request, this.obfuscate);
17
+ }
18
+ }
19
+ const obfuscateInterceptor = (obfuscate) => ({ request }) => new ObfuscatedRequest(request, obfuscate);
20
+ const identity = ({ request }) => request;
21
+ const logRequest = (identifier, obfuscate = identity) => async ({ request }) => {
22
+ if (levelResolver.shouldLog(levelResolver.LevelResolver[index.getLogger().logLevel], "debug")) {
23
+ index.getLogger().debug(
24
+ `--------------- Scaleway SDK REQUEST ${identifier} ---------------
25
+ ${await httpDumper.dumpRequest(await obfuscate({ request }))}
26
+ ---------------------------------------------------------`
27
+ );
28
+ }
29
+ return request;
30
+ };
31
+ const logResponse = (identifier) => async ({ response }) => {
32
+ if (levelResolver.shouldLog(levelResolver.LevelResolver[index.getLogger().logLevel], "debug")) {
33
+ index.getLogger().debug(
34
+ `--------------- Scaleway SDK RESPONSE ${identifier} ---------------
35
+ ${await httpDumper.dumpResponse(response)}
36
+ ---------------------------------------------------------`
37
+ );
38
+ }
39
+ return response;
40
+ };
41
+ exports.logRequest = logRequest;
42
+ exports.logResponse = logResponse;
43
+ exports.obfuscateInterceptor = obfuscateInterceptor;
@@ -0,0 +1,43 @@
1
+ import { getLogger } from "../../internal/logger/index.js";
2
+ import { shouldLog, LevelResolver } from "../../internal/logger/level-resolver.js";
3
+ import { dumpRequest, dumpResponse } from "./http-dumper.js";
4
+ class ObfuscatedRequest extends Request {
5
+ constructor(request, obfuscate) {
6
+ super(request);
7
+ this.request = request;
8
+ this.obfuscate = obfuscate;
9
+ }
10
+ get headers() {
11
+ return new Headers(Array.from(this.request.headers, this.obfuscate));
12
+ }
13
+ clone() {
14
+ return new ObfuscatedRequest(this.request, this.obfuscate);
15
+ }
16
+ }
17
+ const obfuscateInterceptor = (obfuscate) => ({ request }) => new ObfuscatedRequest(request, obfuscate);
18
+ const identity = ({ request }) => request;
19
+ const logRequest = (identifier, obfuscate = identity) => async ({ request }) => {
20
+ if (shouldLog(LevelResolver[getLogger().logLevel], "debug")) {
21
+ getLogger().debug(
22
+ `--------------- Scaleway SDK REQUEST ${identifier} ---------------
23
+ ${await dumpRequest(await obfuscate({ request }))}
24
+ ---------------------------------------------------------`
25
+ );
26
+ }
27
+ return request;
28
+ };
29
+ const logResponse = (identifier) => async ({ response }) => {
30
+ if (shouldLog(LevelResolver[getLogger().logLevel], "debug")) {
31
+ getLogger().debug(
32
+ `--------------- Scaleway SDK RESPONSE ${identifier} ---------------
33
+ ${await dumpResponse(response)}
34
+ ---------------------------------------------------------`
35
+ );
36
+ }
37
+ return response;
38
+ };
39
+ export {
40
+ logRequest,
41
+ logResponse,
42
+ obfuscateInterceptor
43
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const extract = (key) => (result) => result[key];
4
+ function* pages(key, fetcher, request, firstPage) {
5
+ if (!Array.isArray(firstPage[key])) {
6
+ throw new Error(`Property ${key} is not a list in paginated result`);
7
+ }
8
+ const getList = extract(key);
9
+ let page = request.page || 1;
10
+ if (page === 1) {
11
+ yield Promise.resolve(getList(firstPage));
12
+ page += 1;
13
+ }
14
+ const { length } = firstPage[key];
15
+ if (!length) return;
16
+ const { totalCount } = firstPage;
17
+ while (page <= Math.floor((totalCount + length - 1) / length)) {
18
+ yield fetcher({ ...request, page }).then(getList);
19
+ page += 1;
20
+ }
21
+ }
22
+ async function* fetchPaginated(key, fetcher, request, initial = fetcher(request)) {
23
+ yield* pages(key, fetcher, request, await initial);
24
+ }
25
+ const fetchAll = async (key, fetcher, request, initial = fetcher(request)) => (await Promise.all(Array.from(pages(key, fetcher, request, await initial)))).flat();
26
+ const enrichForPagination = (key, fetcher, request) => {
27
+ const firstPage = fetcher(request);
28
+ return Object.assign(firstPage, {
29
+ all: () => fetchAll(key, fetcher, request, firstPage),
30
+ [Symbol.asyncIterator]: () => fetchPaginated(key, fetcher, request, firstPage)
31
+ });
32
+ };
33
+ exports.enrichForPagination = enrichForPagination;
34
+ exports.extract = extract;
35
+ exports.fetchAll = fetchAll;
36
+ exports.fetchPaginated = fetchPaginated;
@@ -0,0 +1,36 @@
1
+ const extract = (key) => (result) => result[key];
2
+ function* pages(key, fetcher, request, firstPage) {
3
+ if (!Array.isArray(firstPage[key])) {
4
+ throw new Error(`Property ${key} is not a list in paginated result`);
5
+ }
6
+ const getList = extract(key);
7
+ let page = request.page || 1;
8
+ if (page === 1) {
9
+ yield Promise.resolve(getList(firstPage));
10
+ page += 1;
11
+ }
12
+ const { length } = firstPage[key];
13
+ if (!length) return;
14
+ const { totalCount } = firstPage;
15
+ while (page <= Math.floor((totalCount + length - 1) / length)) {
16
+ yield fetcher({ ...request, page }).then(getList);
17
+ page += 1;
18
+ }
19
+ }
20
+ async function* fetchPaginated(key, fetcher, request, initial = fetcher(request)) {
21
+ yield* pages(key, fetcher, request, await initial);
22
+ }
23
+ const fetchAll = async (key, fetcher, request, initial = fetcher(request)) => (await Promise.all(Array.from(pages(key, fetcher, request, await initial)))).flat();
24
+ const enrichForPagination = (key, fetcher, request) => {
25
+ const firstPage = fetcher(request);
26
+ return Object.assign(firstPage, {
27
+ all: () => fetchAll(key, fetcher, request, firstPage),
28
+ [Symbol.asyncIterator]: () => fetchPaginated(key, fetcher, request, firstPage)
29
+ });
30
+ };
31
+ export {
32
+ enrichForPagination,
33
+ extract,
34
+ fetchAll,
35
+ fetchPaginated
36
+ };
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const isResponse = require("../../helpers/is-response.cjs");
4
+ const json = require("../../helpers/json.cjs");
5
+ const errorParser = require("../errors/error-parser.cjs");
6
+ const scwError = require("../errors/scw-error.cjs");
7
+ const X_TOTAL_COUNT_HEADER_KEY = "x-total-count";
8
+ const TOTAL_COUNT_RES_KEY = "total_count";
9
+ const fixLegacyTotalCount = (obj, headers) => {
10
+ const headerVal = headers.get(X_TOTAL_COUNT_HEADER_KEY);
11
+ if (!headerVal) {
12
+ return obj;
13
+ }
14
+ const totalCount = parseInt(headerVal, 10);
15
+ if (Number.isNaN(totalCount)) {
16
+ return obj;
17
+ }
18
+ if (json.isJSONObject(obj) && !(TOTAL_COUNT_RES_KEY in obj)) {
19
+ return Object.assign(obj, { [TOTAL_COUNT_RES_KEY]: totalCount });
20
+ }
21
+ return obj;
22
+ };
23
+ const responseParser = (unmarshaller, responseType) => async (response) => {
24
+ if (!isResponse.isResponse(response)) {
25
+ throw new TypeError("Invalid response object");
26
+ }
27
+ if (response.ok) {
28
+ if (response.status === 204) return unmarshaller(void 0);
29
+ const contentType = response.headers.get("Content-Type");
30
+ try {
31
+ if (responseType === "json" && contentType === "application/json") {
32
+ return unmarshaller(
33
+ fixLegacyTotalCount(await response.json(), response.headers)
34
+ );
35
+ }
36
+ if (responseType === "blob") {
37
+ return unmarshaller(await response.blob());
38
+ }
39
+ return unmarshaller(await response.text());
40
+ } catch (err) {
41
+ throw new scwError.ScalewayError(
42
+ response.status,
43
+ `could not parse '${contentType ?? ""}' response${err instanceof Error ? `: ${err.message}` : ""}`
44
+ );
45
+ }
46
+ }
47
+ const error = await response.clone().json().catch(() => response.text());
48
+ if (json.isJSONObject(error)) throw errorParser.parseScalewayError(response.status, error);
49
+ throw new scwError.ScalewayError(
50
+ response.status,
51
+ typeof error === "string" ? error : "cannot read error response body"
52
+ );
53
+ };
54
+ exports.fixLegacyTotalCount = fixLegacyTotalCount;
55
+ exports.responseParser = responseParser;
@@ -0,0 +1,55 @@
1
+ import { isResponse } from "../../helpers/is-response.js";
2
+ import { isJSONObject } from "../../helpers/json.js";
3
+ import { parseScalewayError } from "../errors/error-parser.js";
4
+ import { ScalewayError } from "../errors/scw-error.js";
5
+ const X_TOTAL_COUNT_HEADER_KEY = "x-total-count";
6
+ const TOTAL_COUNT_RES_KEY = "total_count";
7
+ const fixLegacyTotalCount = (obj, headers) => {
8
+ const headerVal = headers.get(X_TOTAL_COUNT_HEADER_KEY);
9
+ if (!headerVal) {
10
+ return obj;
11
+ }
12
+ const totalCount = parseInt(headerVal, 10);
13
+ if (Number.isNaN(totalCount)) {
14
+ return obj;
15
+ }
16
+ if (isJSONObject(obj) && !(TOTAL_COUNT_RES_KEY in obj)) {
17
+ return Object.assign(obj, { [TOTAL_COUNT_RES_KEY]: totalCount });
18
+ }
19
+ return obj;
20
+ };
21
+ const responseParser = (unmarshaller, responseType) => async (response) => {
22
+ if (!isResponse(response)) {
23
+ throw new TypeError("Invalid response object");
24
+ }
25
+ if (response.ok) {
26
+ if (response.status === 204) return unmarshaller(void 0);
27
+ const contentType = response.headers.get("Content-Type");
28
+ try {
29
+ if (responseType === "json" && contentType === "application/json") {
30
+ return unmarshaller(
31
+ fixLegacyTotalCount(await response.json(), response.headers)
32
+ );
33
+ }
34
+ if (responseType === "blob") {
35
+ return unmarshaller(await response.blob());
36
+ }
37
+ return unmarshaller(await response.text());
38
+ } catch (err) {
39
+ throw new ScalewayError(
40
+ response.status,
41
+ `could not parse '${contentType ?? ""}' response${err instanceof Error ? `: ${err.message}` : ""}`
42
+ );
43
+ }
44
+ }
45
+ const error = await response.clone().json().catch(() => response.text());
46
+ if (isJSONObject(error)) throw parseScalewayError(response.status, error);
47
+ throw new ScalewayError(
48
+ response.status,
49
+ typeof error === "string" ? error : "cannot read error response body"
50
+ );
51
+ };
52
+ export {
53
+ fixLegacyTotalCount,
54
+ responseParser
55
+ };
@@ -1,12 +1,12 @@
1
1
  /** Scaleway Request. */
2
- export type ScwRequest = {
2
+ export interface ScwRequest {
3
3
  method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
4
4
  path: string;
5
5
  headers?: Record<string, string>;
6
6
  body?: string;
7
7
  urlParams?: URLSearchParams;
8
8
  responseType?: 'json' | 'text' | 'blob';
9
- };
9
+ }
10
10
  /**
11
11
  * A factory to unmarshal a response.
12
12
  *
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ var lookup = [];
4
+ var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
5
+ for (var i = 0, len = code.length; i < len; ++i) {
6
+ lookup[i] = code[i];
7
+ }
8
+ function tripletToBase64(num) {
9
+ return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
10
+ }
11
+ function encodeChunk(uint8, start, end) {
12
+ var tmp;
13
+ var output = [];
14
+ for (var i = start; i < end; i += 3) {
15
+ tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (uint8[i + 2] & 255);
16
+ output.push(tripletToBase64(tmp));
17
+ }
18
+ return output.join("");
19
+ }
20
+ function fromByteArray(uint8) {
21
+ var tmp;
22
+ var len = uint8.length;
23
+ var extraBytes = len % 3;
24
+ var parts = [];
25
+ var maxChunkLength = 16383;
26
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
27
+ parts.push(
28
+ encodeChunk(
29
+ uint8,
30
+ i,
31
+ i + maxChunkLength > len2 ? len2 : i + maxChunkLength
32
+ )
33
+ );
34
+ }
35
+ if (extraBytes === 1) {
36
+ tmp = uint8[len - 1];
37
+ parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==");
38
+ } else if (extraBytes === 2) {
39
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1];
40
+ parts.push(
41
+ lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
42
+ );
43
+ }
44
+ return parts.join("");
45
+ }
46
+ exports.fromByteArray = fromByteArray;
@@ -0,0 +1,46 @@
1
+ var lookup = [];
2
+ var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
3
+ for (var i = 0, len = code.length; i < len; ++i) {
4
+ lookup[i] = code[i];
5
+ }
6
+ function tripletToBase64(num) {
7
+ return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
8
+ }
9
+ function encodeChunk(uint8, start, end) {
10
+ var tmp;
11
+ var output = [];
12
+ for (var i = start; i < end; i += 3) {
13
+ tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (uint8[i + 2] & 255);
14
+ output.push(tripletToBase64(tmp));
15
+ }
16
+ return output.join("");
17
+ }
18
+ function fromByteArray(uint8) {
19
+ var tmp;
20
+ var len = uint8.length;
21
+ var extraBytes = len % 3;
22
+ var parts = [];
23
+ var maxChunkLength = 16383;
24
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
25
+ parts.push(
26
+ encodeChunk(
27
+ uint8,
28
+ i,
29
+ i + maxChunkLength > len2 ? len2 : i + maxChunkLength
30
+ )
31
+ );
32
+ }
33
+ if (extraBytes === 1) {
34
+ tmp = uint8[len - 1];
35
+ parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==");
36
+ } else if (extraBytes === 2) {
37
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1];
38
+ parts.push(
39
+ lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
40
+ );
41
+ }
42
+ return parts.join("");
43
+ }
44
+ export {
45
+ fromByteArray
46
+ };
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@scaleway/sdk-client",
3
+ "version": "1.1.1",
4
+ "license": "Apache-2.0",
5
+ "description": "Scaleway SDK Client",
6
+ "keywords": [
7
+ "scaleway",
8
+ "cloud",
9
+ "sdk",
10
+ "client"
11
+ ],
12
+ "main": "dist/index.cjs",
13
+ "module": "dist/index.js",
14
+ "types": "dist/index.d.ts",
15
+ "scripts": {
16
+ "typecheck": "tsc --noEmit",
17
+ "type:generate": "tsc --declaration -p tsconfig.build.json",
18
+ "build": "vite build --config ../../vite.config.ts && pnpm run type:generate && tsc-alias -p tsconfig.build.json",
19
+ "build:profile": "npx vite-bundle-visualizer -c ../../vite.config.ts"
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/scaleway/scaleway-sdk-js",
30
+ "directory": "packages/client"
31
+ },
32
+ "engines": {
33
+ "node": ">=18.0"
34
+ },
35
+ "type": "module"
36
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "2.71.1",
3
+ "version": "2.73.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Scaleway SDK.",
6
6
  "keywords": [
@@ -33,10 +33,12 @@
33
33
  },
34
34
  "type": "module",
35
35
  "dependencies": {
36
- "@scaleway/random-name": "5.1.1"
36
+ "@scaleway/random-name": "5.1.1",
37
+ "@scaleway/sdk-client": "1.1.1"
37
38
  },
38
39
  "bundledDependencies": [
39
- "@scaleway/random-name"
40
+ "@scaleway/random-name",
41
+ "@scaleway/sdk-client"
40
42
  ],
41
- "gitHead": "3436da6ff6b394f1000688c996f96c2471b2598a"
43
+ "gitHead": "96fa898987919b2771614a12a34d64fdec0f61bd"
42
44
  }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const isBrowser = () => (
4
- // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
5
- typeof window !== "undefined" && typeof window.document !== "undefined"
6
- );
7
- exports.isBrowser = isBrowser;
@@ -1,7 +0,0 @@
1
- const isBrowser = () => (
2
- // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
3
- typeof window !== "undefined" && typeof window.document !== "undefined"
4
- );
5
- export {
6
- isBrowser
7
- };
File without changes
File without changes