@scaleway/sdk 2.26.0 → 2.28.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.
- package/dist/api/account/index.cjs +6 -0
- package/dist/api/account/index.d.ts +2 -0
- package/dist/api/account/index.js +6 -4
- package/dist/api/account/v2/api.gen.cjs +116 -0
- package/dist/api/account/v2/api.gen.d.ts +67 -0
- package/dist/api/account/v2/api.gen.js +61 -44
- package/dist/api/account/v2/index.gen.cjs +4 -0
- package/dist/api/account/v2/index.gen.d.ts +2 -0
- package/dist/api/account/v2/index.gen.js +4 -4
- package/dist/api/account/v2/marshalling.gen.cjs +44 -0
- package/dist/api/account/v2/marshalling.gen.d.ts +6 -0
- package/dist/api/account/v2/marshalling.gen.js +18 -13
- package/dist/api/account/v2/types.gen.d.ts +62 -0
- package/dist/api/account/v3/api.gen.cjs +106 -0
- package/dist/api/account/v3/api.gen.d.ts +57 -0
- package/dist/api/account/v3/api.gen.js +61 -44
- package/dist/api/account/v3/index.gen.cjs +6 -0
- package/dist/api/account/v3/index.gen.d.ts +3 -0
- package/dist/api/account/v3/index.gen.js +6 -6
- package/dist/api/account/v3/marshalling.gen.cjs +44 -0
- package/dist/api/account/v3/marshalling.gen.d.ts +6 -0
- package/dist/api/account/v3/marshalling.gen.js +18 -13
- package/dist/api/account/v3/types.gen.d.ts +62 -0
- package/dist/api/account/v3/validation-rules.gen.cjs +39 -0
- package/dist/api/account/v3/validation-rules.gen.d.ts +34 -0
- package/dist/api/account/v3/validation-rules.gen.js +5 -5
- package/dist/api/applesilicon/index.cjs +4 -0
- package/dist/api/applesilicon/index.d.ts +1 -0
- package/dist/api/applesilicon/index.js +4 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.cjs +222 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +123 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.js +125 -83
- package/dist/api/applesilicon/v1alpha1/content.gen.cjs +11 -0
- package/dist/api/applesilicon/v1alpha1/content.gen.d.ts +3 -0
- package/dist/api/applesilicon/v1alpha1/content.gen.js +11 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.cjs +6 -0
- package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +3 -0
- package/dist/api/applesilicon/v1alpha1/index.gen.js +6 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +147 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +11 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +56 -32
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +203 -0
- package/dist/api/baremetal/index.cjs +4 -0
- package/dist/api/baremetal/index.d.ts +1 -0
- package/dist/api/baremetal/index.js +4 -2
- package/dist/api/baremetal/v1/api.gen.cjs +575 -0
- package/dist/api/baremetal/v1/api.gen.d.ts +287 -0
- package/dist/api/baremetal/v1/api.gen.js +353 -205
- package/dist/api/baremetal/v1/api.utils.cjs +36 -0
- package/dist/api/baremetal/v1/api.utils.d.ts +13 -0
- package/dist/api/baremetal/v1/api.utils.js +27 -18
- package/dist/api/baremetal/v1/content.gen.cjs +18 -0
- package/dist/api/baremetal/v1/content.gen.d.ts +7 -0
- package/dist/api/baremetal/v1/content.gen.js +18 -13
- package/dist/api/baremetal/v1/index.cjs +12 -0
- package/dist/api/baremetal/v1/index.d.ts +5 -0
- package/dist/api/baremetal/v1/index.gen.d.ts +4 -0
- package/dist/api/baremetal/v1/index.js +12 -5
- package/dist/api/baremetal/v1/marshalling.gen.cjs +502 -0
- package/dist/api/baremetal/v1/marshalling.gen.d.ts +30 -0
- package/dist/api/baremetal/v1/marshalling.gen.js +186 -90
- package/dist/api/baremetal/v1/types.gen.d.ts +682 -0
- package/dist/api/baremetal/v1/validation-rules.gen.cjs +116 -0
- package/dist/api/baremetal/v1/validation-rules.gen.d.ts +104 -0
- package/dist/api/baremetal/v1/validation-rules.gen.js +12 -5
- package/dist/api/billing/index.cjs +6 -0
- package/dist/api/billing/index.d.ts +2 -0
- package/dist/api/billing/index.js +6 -4
- package/dist/api/billing/v2alpha1/api.gen.cjs +92 -0
- package/dist/api/billing/v2alpha1/api.gen.d.ts +51 -0
- package/dist/api/billing/v2alpha1/api.gen.js +60 -39
- package/dist/api/billing/v2alpha1/index.gen.cjs +4 -0
- package/dist/api/billing/v2alpha1/index.gen.d.ts +2 -0
- package/dist/api/billing/v2alpha1/index.gen.js +4 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.cjs +117 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.d.ts +4 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.js +48 -29
- package/dist/api/billing/v2alpha1/types.gen.d.ts +136 -0
- package/dist/api/billing/v2beta1/api.gen.cjs +175 -0
- package/dist/api/billing/v2beta1/api.gen.d.ts +104 -0
- package/dist/api/billing/v2beta1/api.gen.js +122 -65
- package/dist/api/billing/v2beta1/index.gen.cjs +4 -0
- package/dist/api/billing/v2beta1/index.gen.d.ts +2 -0
- package/dist/api/billing/v2beta1/index.gen.js +4 -4
- package/dist/api/billing/v2beta1/marshalling.gen.cjs +158 -0
- package/dist/api/billing/v2beta1/marshalling.gen.d.ts +6 -0
- package/dist/api/billing/v2beta1/marshalling.gen.js +61 -36
- package/dist/api/billing/v2beta1/types.gen.d.ts +269 -0
- package/dist/api/block/index.cjs +4 -0
- package/dist/api/block/index.d.ts +1 -0
- package/dist/api/block/index.js +4 -2
- package/dist/api/block/v1alpha1/api.gen.cjs +272 -0
- package/dist/api/block/v1alpha1/api.gen.d.ts +144 -0
- package/dist/api/block/v1alpha1/api.gen.js +167 -90
- package/dist/api/block/v1alpha1/content.gen.cjs +20 -0
- package/dist/api/block/v1alpha1/content.gen.d.ts +7 -0
- package/dist/api/block/v1alpha1/content.gen.js +20 -13
- package/dist/api/block/v1alpha1/index.gen.cjs +10 -0
- package/dist/api/block/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/block/v1alpha1/index.gen.js +10 -7
- package/dist/api/block/v1alpha1/marshalling.gen.cjs +194 -0
- package/dist/api/block/v1alpha1/marshalling.gen.d.ts +13 -0
- package/dist/api/block/v1alpha1/marshalling.gen.js +78 -42
- package/dist/api/block/v1alpha1/types.gen.d.ts +315 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.cjs +56 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.d.ts +47 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.js +14 -5
- package/dist/api/cockpit/index.cjs +6 -0
- package/dist/api/cockpit/index.d.ts +2 -0
- package/dist/api/cockpit/index.js +6 -4
- package/dist/api/cockpit/v1/api.gen.cjs +629 -0
- package/dist/api/cockpit/v1/api.gen.d.ts +310 -0
- package/dist/api/cockpit/v1/api.gen.js +374 -201
- package/dist/api/cockpit/v1/index.gen.cjs +7 -0
- package/dist/api/cockpit/v1/index.gen.d.ts +3 -0
- package/dist/api/cockpit/v1/index.gen.js +7 -6
- package/dist/api/cockpit/v1/marshalling.gen.cjs +325 -0
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +30 -0
- package/dist/api/cockpit/v1/marshalling.gen.js +131 -59
- package/dist/api/cockpit/v1/types.gen.d.ts +525 -0
- package/dist/api/cockpit/v1/validation-rules.gen.cjs +48 -0
- package/dist/api/cockpit/v1/validation-rules.gen.d.ts +41 -0
- package/dist/api/cockpit/v1/validation-rules.gen.js +10 -8
- package/dist/api/cockpit/v1beta1/api.gen.cjs +484 -0
- package/dist/api/cockpit/v1beta1/api.gen.d.ts +223 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +298 -167
- package/dist/api/cockpit/v1beta1/content.gen.cjs +8 -0
- package/dist/api/cockpit/v1beta1/content.gen.d.ts +3 -0
- package/dist/api/cockpit/v1beta1/content.gen.js +8 -7
- package/dist/api/cockpit/v1beta1/index.gen.cjs +6 -0
- package/dist/api/cockpit/v1beta1/index.gen.d.ts +3 -0
- package/dist/api/cockpit/v1beta1/index.gen.js +6 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.cjs +343 -0
- package/dist/api/cockpit/v1beta1/marshalling.gen.d.ts +29 -0
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +131 -60
- package/dist/api/cockpit/v1beta1/types.gen.d.ts +385 -0
- package/dist/api/container/index.cjs +4 -0
- package/dist/api/container/index.d.ts +1 -0
- package/dist/api/container/index.js +4 -2
- package/dist/api/container/v1beta1/api.gen.cjs +621 -0
- package/dist/api/container/v1beta1/api.gen.d.ts +304 -0
- package/dist/api/container/v1beta1/api.gen.js +384 -228
- package/dist/api/container/v1beta1/content.gen.cjs +34 -0
- package/dist/api/container/v1beta1/content.gen.d.ts +13 -0
- package/dist/api/container/v1beta1/content.gen.js +34 -22
- package/dist/api/container/v1beta1/index.gen.cjs +13 -0
- package/dist/api/container/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/container/v1beta1/index.gen.js +13 -7
- package/dist/api/container/v1beta1/marshalling.gen.cjs +408 -0
- package/dist/api/container/v1beta1/marshalling.gen.d.ts +24 -0
- package/dist/api/container/v1beta1/marshalling.gen.js +147 -71
- package/dist/api/container/v1beta1/types.gen.d.ts +785 -0
- package/dist/api/container/v1beta1/validation-rules.gen.cjs +45 -0
- package/dist/api/container/v1beta1/validation-rules.gen.d.ts +39 -0
- package/dist/api/container/v1beta1/validation-rules.gen.js +6 -5
- package/dist/api/dedibox/index.cjs +4 -0
- package/dist/api/dedibox/index.d.ts +1 -0
- package/dist/api/dedibox/index.js +4 -2
- package/dist/api/dedibox/v1/api.gen.cjs +1460 -0
- package/dist/api/dedibox/v1/api.gen.d.ts +560 -0
- package/dist/api/dedibox/v1/api.gen.js +1051 -565
- package/dist/api/dedibox/v1/content.gen.cjs +49 -0
- package/dist/api/dedibox/v1/content.gen.d.ts +19 -0
- package/dist/api/dedibox/v1/content.gen.js +49 -31
- package/dist/api/dedibox/v1/index.gen.cjs +22 -0
- package/dist/api/dedibox/v1/index.gen.d.ts +4 -0
- package/dist/api/dedibox/v1/index.gen.js +22 -7
- package/dist/api/dedibox/v1/marshalling.gen.cjs +1475 -0
- package/dist/api/dedibox/v1/marshalling.gen.d.ts +82 -0
- package/dist/api/dedibox/v1/marshalling.gen.js +514 -237
- package/dist/api/dedibox/v1/types.gen.d.ts +1900 -0
- package/dist/api/dedibox/v1/validation-rules.gen.cjs +626 -0
- package/dist/api/dedibox/v1/validation-rules.gen.d.ts +539 -0
- package/dist/api/dedibox/v1/validation-rules.gen.js +87 -5
- package/dist/api/document_db/index.cjs +4 -0
- package/dist/api/document_db/index.d.ts +1 -0
- package/dist/api/document_db/index.js +4 -2
- package/dist/api/document_db/v1beta1/api.gen.cjs +1018 -0
- package/dist/api/document_db/v1beta1/api.gen.d.ts +542 -0
- package/dist/api/document_db/v1beta1/api.gen.js +561 -339
- package/dist/api/document_db/v1beta1/content.gen.cjs +31 -0
- package/dist/api/document_db/v1beta1/content.gen.d.ts +11 -0
- package/dist/api/document_db/v1beta1/content.gen.js +31 -19
- package/dist/api/document_db/v1beta1/index.gen.cjs +12 -0
- package/dist/api/document_db/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/document_db/v1beta1/index.gen.js +12 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.cjs +829 -0
- package/dist/api/document_db/v1beta1/marshalling.gen.d.ts +50 -0
- package/dist/api/document_db/v1beta1/marshalling.gen.js +354 -181
- package/dist/api/document_db/v1beta1/types.gen.d.ts +1254 -0
- package/dist/api/document_db/v1beta1/validation-rules.gen.cjs +8 -0
- package/dist/api/document_db/v1beta1/validation-rules.gen.d.ts +5 -0
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +3 -5
- package/dist/api/domain/index.cjs +4 -0
- package/dist/api/domain/index.d.ts +1 -0
- package/dist/api/domain/index.js +4 -2
- package/dist/api/domain/v2beta1/api.gen.cjs +1052 -0
- package/dist/api/domain/v2beta1/api.gen.d.ts +521 -0
- package/dist/api/domain/v2beta1/api.gen.js +638 -365
- package/dist/api/domain/v2beta1/content.gen.cjs +29 -0
- package/dist/api/domain/v2beta1/content.gen.d.ts +18 -0
- package/dist/api/domain/v2beta1/content.gen.js +29 -28
- package/dist/api/domain/v2beta1/index.gen.cjs +13 -0
- package/dist/api/domain/v2beta1/index.gen.d.ts +3 -0
- package/dist/api/domain/v2beta1/index.gen.js +13 -5
- package/dist/api/domain/v2beta1/marshalling.gen.cjs +1472 -0
- package/dist/api/domain/v2beta1/marshalling.gen.d.ts +59 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +676 -383
- package/dist/api/domain/v2beta1/types.gen.d.ts +1073 -0
- package/dist/api/flexibleip/index.cjs +4 -0
- package/dist/api/flexibleip/index.d.ts +1 -0
- package/dist/api/flexibleip/index.js +4 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.cjs +227 -0
- package/dist/api/flexibleip/v1alpha1/api.gen.d.ts +115 -0
- package/dist/api/flexibleip/v1alpha1/api.gen.js +134 -86
- package/dist/api/flexibleip/v1alpha1/content.gen.cjs +12 -0
- package/dist/api/flexibleip/v1alpha1/content.gen.d.ts +5 -0
- package/dist/api/flexibleip/v1alpha1/content.gen.js +12 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.cjs +9 -0
- package/dist/api/flexibleip/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/flexibleip/v1alpha1/index.gen.js +9 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.cjs +115 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.d.ts +13 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +36 -18
- package/dist/api/flexibleip/v1alpha1/types.gen.d.ts +196 -0
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.cjs +12 -0
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.d.ts +9 -0
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +3 -5
- package/dist/api/function/index.cjs +4 -0
- package/dist/api/function/index.d.ts +1 -0
- package/dist/api/function/index.js +4 -2
- package/dist/api/function/v1beta1/api.gen.cjs +666 -0
- package/dist/api/function/v1beta1/api.gen.d.ts +330 -0
- package/dist/api/function/v1beta1/api.gen.js +406 -244
- package/dist/api/function/v1beta1/content.gen.cjs +34 -0
- package/dist/api/function/v1beta1/content.gen.d.ts +13 -0
- package/dist/api/function/v1beta1/content.gen.js +34 -22
- package/dist/api/function/v1beta1/index.gen.cjs +13 -0
- package/dist/api/function/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/function/v1beta1/index.gen.js +13 -7
- package/dist/api/function/v1beta1/marshalling.gen.cjs +457 -0
- package/dist/api/function/v1beta1/marshalling.gen.d.ts +27 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +167 -80
- package/dist/api/function/v1beta1/types.gen.d.ts +819 -0
- package/dist/api/function/v1beta1/validation-rules.gen.cjs +45 -0
- package/dist/api/function/v1beta1/validation-rules.gen.d.ts +39 -0
- package/dist/api/function/v1beta1/validation-rules.gen.js +6 -5
- package/dist/api/iam/index.cjs +4 -0
- package/dist/api/iam/index.d.ts +1 -0
- package/dist/api/iam/index.js +4 -2
- package/dist/api/iam/v1alpha1/api.gen.cjs +951 -0
- package/dist/api/iam/v1alpha1/api.gen.d.ts +480 -0
- package/dist/api/iam/v1alpha1/api.gen.js +560 -302
- package/dist/api/iam/v1alpha1/index.gen.cjs +6 -0
- package/dist/api/iam/v1alpha1/index.gen.d.ts +3 -0
- package/dist/api/iam/v1alpha1/index.gen.js +6 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +504 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +42 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +184 -119
- package/dist/api/iam/v1alpha1/types.gen.d.ts +886 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +235 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +211 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +29 -10
- package/dist/api/index.d.ts +34 -0
- package/dist/api/instance/index.cjs +4 -0
- package/dist/api/instance/index.d.ts +1 -0
- package/dist/api/instance/index.js +4 -2
- package/dist/api/instance/v1/api.gen.cjs +1178 -0
- package/dist/api/instance/v1/api.gen.d.ts +532 -0
- package/dist/api/instance/v1/api.gen.js +753 -436
- package/dist/api/instance/v1/api.utils.cjs +279 -0
- package/dist/api/instance/v1/api.utils.d.ts +95 -0
- package/dist/api/instance/v1/api.utils.js +145 -109
- package/dist/api/instance/v1/content.gen.cjs +44 -0
- package/dist/api/instance/v1/content.gen.d.ts +21 -0
- package/dist/api/instance/v1/content.gen.js +44 -34
- package/dist/api/instance/v1/index.cjs +15 -0
- package/dist/api/instance/v1/index.d.ts +4 -0
- package/dist/api/instance/v1/index.gen.d.ts +4 -0
- package/dist/api/instance/v1/index.js +15 -2
- package/dist/api/instance/v1/marshalling.gen.cjs +1813 -0
- package/dist/api/instance/v1/marshalling.gen.d.ts +95 -0
- package/dist/api/instance/v1/marshalling.gen.js +736 -412
- package/dist/api/instance/v1/marshalling.utils.d.ts +3 -0
- package/dist/api/instance/v1/types.gen.d.ts +1818 -0
- package/dist/api/instance/v1/types.private.gen.d.ts +167 -0
- package/dist/api/instance/v1/types.utils.d.ts +35 -0
- package/dist/api/instance/v1/validation-rules.gen.d.ts +10 -0
- package/dist/api/iot/index.cjs +4 -0
- package/dist/api/iot/index.d.ts +1 -0
- package/dist/api/iot/index.js +4 -2
- package/dist/api/iot/v1/api.gen.cjs +621 -0
- package/dist/api/iot/v1/api.gen.d.ts +325 -0
- package/dist/api/iot/v1/api.gen.js +350 -238
- package/dist/api/iot/v1/content.gen.cjs +4 -0
- package/dist/api/iot/v1/content.gen.d.ts +3 -0
- package/dist/api/iot/v1/content.gen.js +4 -7
- package/dist/api/iot/v1/index.gen.cjs +6 -0
- package/dist/api/iot/v1/index.gen.d.ts +3 -0
- package/dist/api/iot/v1/index.gen.js +6 -5
- package/dist/api/iot/v1/marshalling.gen.cjs +534 -0
- package/dist/api/iot/v1/marshalling.gen.d.ts +31 -0
- package/dist/api/iot/v1/marshalling.gen.js +209 -114
- package/dist/api/iot/v1/types.gen.d.ts +916 -0
- package/dist/api/ipam/index.cjs +4 -0
- package/dist/api/ipam/index.d.ts +1 -0
- package/dist/api/ipam/index.js +4 -2
- package/dist/api/ipam/v1/api.gen.cjs +117 -0
- package/dist/api/ipam/v1/api.gen.d.ts +57 -0
- package/dist/api/ipam/v1/api.gen.js +75 -55
- package/dist/api/ipam/v1/index.gen.cjs +6 -0
- package/dist/api/ipam/v1/index.gen.d.ts +3 -0
- package/dist/api/ipam/v1/index.gen.js +6 -6
- package/dist/api/ipam/v1/marshalling.gen.cjs +98 -0
- package/dist/api/ipam/v1/marshalling.gen.d.ts +6 -0
- package/dist/api/ipam/v1/marshalling.gen.js +35 -29
- package/dist/api/ipam/v1/types.gen.d.ts +209 -0
- package/dist/api/ipam/v1/validation-rules.gen.cjs +9 -0
- package/dist/api/ipam/v1/validation-rules.gen.d.ts +6 -0
- package/dist/api/ipam/v1/validation-rules.gen.js +3 -5
- package/dist/api/ipfs/index.cjs +4 -0
- package/dist/api/ipfs/index.d.ts +1 -0
- package/dist/api/ipfs/index.js +4 -2
- package/dist/api/ipfs/v1alpha1/api.gen.cjs +374 -0
- package/dist/api/ipfs/v1alpha1/api.gen.d.ts +198 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +210 -133
- package/dist/api/ipfs/v1alpha1/content.gen.cjs +6 -0
- package/dist/api/ipfs/v1alpha1/content.gen.d.ts +5 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +6 -10
- package/dist/api/ipfs/v1alpha1/index.gen.cjs +8 -0
- package/dist/api/ipfs/v1alpha1/index.gen.d.ts +3 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +8 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.cjs +208 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.d.ts +18 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +68 -33
- package/dist/api/ipfs/v1alpha1/types.gen.d.ts +317 -0
- package/dist/api/jobs/index.cjs +4 -0
- package/dist/api/jobs/index.d.ts +1 -0
- package/dist/api/jobs/index.js +4 -2
- package/dist/api/jobs/v1alpha1/api.gen.cjs +170 -0
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +84 -0
- package/dist/api/jobs/v1alpha1/api.gen.js +109 -69
- package/dist/api/jobs/v1alpha1/content.gen.cjs +8 -0
- package/dist/api/jobs/v1alpha1/content.gen.d.ts +3 -0
- package/dist/api/jobs/v1alpha1/content.gen.js +8 -7
- package/dist/api/jobs/v1alpha1/index.gen.cjs +8 -0
- package/dist/api/jobs/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/jobs/v1alpha1/index.gen.js +8 -7
- package/dist/api/jobs/v1alpha1/marshalling.gen.cjs +150 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.d.ts +10 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +50 -26
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +210 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.cjs +97 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.d.ts +87 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.js +12 -7
- package/dist/api/k8s/index.cjs +4 -0
- package/dist/api/k8s/index.d.ts +1 -0
- package/dist/api/k8s/index.js +4 -2
- package/dist/api/k8s/v1/api.gen.cjs +550 -0
- package/dist/api/k8s/v1/api.gen.d.ts +284 -0
- package/dist/api/k8s/v1/api.gen.js +317 -195
- package/dist/api/k8s/v1/api.utils.cjs +13 -0
- package/dist/api/k8s/v1/api.utils.d.ts +11 -0
- package/dist/api/k8s/v1/api.utils.js +5 -5
- package/dist/api/k8s/v1/content.gen.cjs +23 -0
- package/dist/api/k8s/v1/content.gen.d.ts +7 -0
- package/dist/api/k8s/v1/content.gen.js +23 -13
- package/dist/api/k8s/v1/index.cjs +10 -0
- package/dist/api/k8s/v1/index.d.ts +4 -0
- package/dist/api/k8s/v1/index.gen.d.ts +4 -0
- package/dist/api/k8s/v1/index.js +10 -4
- package/dist/api/k8s/v1/marshalling.gen.cjs +510 -0
- package/dist/api/k8s/v1/marshalling.gen.d.ts +22 -0
- package/dist/api/k8s/v1/marshalling.gen.js +158 -79
- package/dist/api/k8s/v1/types.gen.d.ts +1123 -0
- package/dist/api/k8s/v1/validation-rules.gen.cjs +110 -0
- package/dist/api/k8s/v1/validation-rules.gen.d.ts +96 -0
- package/dist/api/k8s/v1/validation-rules.gen.js +14 -5
- package/dist/api/lb/index.cjs +4 -0
- package/dist/api/lb/index.d.ts +1 -0
- package/dist/api/lb/index.js +4 -2
- package/dist/api/lb/v1/api.gen.cjs +1984 -0
- package/dist/api/lb/v1/api.gen.d.ts +990 -0
- package/dist/api/lb/v1/api.gen.js +1186 -695
- package/dist/api/lb/v1/api.utils.cjs +116 -0
- package/dist/api/lb/v1/api.utils.d.ts +41 -0
- package/dist/api/lb/v1/api.utils.js +83 -48
- package/dist/api/lb/v1/content.gen.cjs +22 -0
- package/dist/api/lb/v1/content.gen.d.ts +9 -0
- package/dist/api/lb/v1/content.gen.js +22 -16
- package/dist/api/lb/v1/index.cjs +10 -0
- package/dist/api/lb/v1/index.d.ts +4 -0
- package/dist/api/lb/v1/index.gen.d.ts +3 -0
- package/dist/api/lb/v1/index.js +10 -2
- package/dist/api/lb/v1/marshalling.gen.cjs +1289 -0
- package/dist/api/lb/v1/marshalling.gen.d.ts +73 -0
- package/dist/api/lb/v1/marshalling.gen.js +576 -334
- package/dist/api/lb/v1/types.gen.d.ts +2729 -0
- package/dist/api/lb/v1/types.utils.d.ts +13 -0
- package/dist/api/llm_inference/index.cjs +4 -0
- package/dist/api/llm_inference/index.d.ts +1 -0
- package/dist/api/llm_inference/index.js +4 -2
- package/dist/api/llm_inference/v1beta1/api.gen.cjs +305 -0
- package/dist/api/llm_inference/v1beta1/api.gen.d.ts +151 -0
- package/dist/api/llm_inference/v1beta1/api.gen.js +192 -120
- package/dist/api/llm_inference/v1beta1/content.gen.cjs +8 -0
- package/dist/api/llm_inference/v1beta1/content.gen.d.ts +3 -0
- package/dist/api/llm_inference/v1beta1/content.gen.js +8 -7
- package/dist/api/llm_inference/v1beta1/index.gen.cjs +8 -0
- package/dist/api/llm_inference/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/llm_inference/v1beta1/index.gen.js +8 -7
- package/dist/api/llm_inference/v1beta1/marshalling.gen.cjs +271 -0
- package/dist/api/llm_inference/v1beta1/marshalling.gen.d.ts +18 -0
- package/dist/api/llm_inference/v1beta1/marshalling.gen.js +98 -52
- package/dist/api/llm_inference/v1beta1/types.gen.d.ts +433 -0
- package/dist/api/llm_inference/v1beta1/validation-rules.gen.cjs +56 -0
- package/dist/api/llm_inference/v1beta1/validation-rules.gen.d.ts +50 -0
- package/dist/api/llm_inference/v1beta1/validation-rules.gen.js +6 -5
- package/dist/api/marketplace/index.cjs +4 -0
- package/dist/api/marketplace/index.d.ts +1 -0
- package/dist/api/marketplace/index.js +4 -2
- package/dist/api/marketplace/v2/api.gen.cjs +174 -0
- package/dist/api/marketplace/v2/api.gen.d.ts +95 -0
- package/dist/api/marketplace/v2/api.gen.js +111 -67
- package/dist/api/marketplace/v2/index.gen.cjs +4 -0
- package/dist/api/marketplace/v2/index.gen.d.ts +2 -0
- package/dist/api/marketplace/v2/index.gen.js +4 -4
- package/dist/api/marketplace/v2/marshalling.gen.cjs +115 -0
- package/dist/api/marketplace/v2/marshalling.gen.d.ts +9 -0
- package/dist/api/marketplace/v2/marshalling.gen.js +44 -23
- package/dist/api/marketplace/v2/types.gen.d.ts +135 -0
- package/dist/api/mnq/index.cjs +4 -0
- package/dist/api/mnq/index.d.ts +1 -0
- package/dist/api/mnq/index.js +4 -2
- package/dist/api/mnq/v1beta1/api.gen.cjs +500 -0
- package/dist/api/mnq/v1beta1/api.gen.d.ts +267 -0
- package/dist/api/mnq/v1beta1/api.gen.js +291 -184
- package/dist/api/mnq/v1beta1/index.gen.cjs +8 -0
- package/dist/api/mnq/v1beta1/index.gen.d.ts +3 -0
- package/dist/api/mnq/v1beta1/index.gen.js +8 -6
- package/dist/api/mnq/v1beta1/marshalling.gen.cjs +268 -0
- package/dist/api/mnq/v1beta1/marshalling.gen.d.ts +23 -0
- package/dist/api/mnq/v1beta1/marshalling.gen.js +105 -49
- package/dist/api/mnq/v1beta1/types.gen.d.ts +449 -0
- package/dist/api/mnq/v1beta1/validation-rules.gen.cjs +85 -0
- package/dist/api/mnq/v1beta1/validation-rules.gen.d.ts +72 -0
- package/dist/api/mnq/v1beta1/validation-rules.gen.js +13 -5
- package/dist/api/rdb/index.cjs +4 -0
- package/dist/api/rdb/index.d.ts +1 -0
- package/dist/api/rdb/index.js +4 -2
- package/dist/api/rdb/v1/api.gen.cjs +1192 -0
- package/dist/api/rdb/v1/api.gen.d.ts +631 -0
- package/dist/api/rdb/v1/api.gen.js +660 -393
- package/dist/api/rdb/v1/content.gen.cjs +38 -0
- package/dist/api/rdb/v1/content.gen.d.ts +13 -0
- package/dist/api/rdb/v1/content.gen.js +38 -22
- package/dist/api/rdb/v1/index.gen.cjs +13 -0
- package/dist/api/rdb/v1/index.gen.d.ts +4 -0
- package/dist/api/rdb/v1/index.gen.js +13 -7
- package/dist/api/rdb/v1/marshalling.gen.cjs +908 -0
- package/dist/api/rdb/v1/marshalling.gen.d.ts +59 -0
- package/dist/api/rdb/v1/marshalling.gen.js +385 -191
- package/dist/api/rdb/v1/types.gen.d.ts +1404 -0
- package/dist/api/rdb/v1/validation-rules.gen.cjs +8 -0
- package/dist/api/rdb/v1/validation-rules.gen.d.ts +5 -0
- package/dist/api/rdb/v1/validation-rules.gen.js +3 -5
- package/dist/api/redis/index.cjs +4 -0
- package/dist/api/redis/index.d.ts +1 -0
- package/dist/api/redis/index.js +4 -2
- package/dist/api/redis/v1/api.gen.cjs +476 -0
- package/dist/api/redis/v1/api.gen.d.ts +253 -0
- package/dist/api/redis/v1/api.gen.js +265 -162
- package/dist/api/redis/v1/content.gen.cjs +10 -0
- package/dist/api/redis/v1/content.gen.d.ts +3 -0
- package/dist/api/redis/v1/content.gen.js +10 -7
- package/dist/api/redis/v1/index.gen.cjs +6 -0
- package/dist/api/redis/v1/index.gen.d.ts +3 -0
- package/dist/api/redis/v1/index.gen.js +6 -5
- package/dist/api/redis/v1/marshalling.gen.cjs +355 -0
- package/dist/api/redis/v1/marshalling.gen.d.ts +24 -0
- package/dist/api/redis/v1/marshalling.gen.js +156 -84
- package/dist/api/redis/v1/types.gen.d.ts +473 -0
- package/dist/api/registry/index.cjs +4 -0
- package/dist/api/registry/index.d.ts +1 -0
- package/dist/api/registry/index.js +4 -2
- package/dist/api/registry/v1/api.gen.cjs +287 -0
- package/dist/api/registry/v1/api.gen.d.ts +160 -0
- package/dist/api/registry/v1/api.gen.js +161 -94
- package/dist/api/registry/v1/content.gen.cjs +8 -0
- package/dist/api/registry/v1/content.gen.d.ts +7 -0
- package/dist/api/registry/v1/content.gen.js +8 -13
- package/dist/api/registry/v1/index.gen.cjs +8 -0
- package/dist/api/registry/v1/index.gen.d.ts +3 -0
- package/dist/api/registry/v1/index.gen.js +8 -5
- package/dist/api/registry/v1/marshalling.gen.cjs +129 -0
- package/dist/api/registry/v1/marshalling.gen.d.ts +11 -0
- package/dist/api/registry/v1/marshalling.gen.js +51 -30
- package/dist/api/registry/v1/types.gen.d.ts +300 -0
- package/dist/api/secret/index.cjs +6 -0
- package/dist/api/secret/index.d.ts +2 -0
- package/dist/api/secret/index.js +6 -4
- package/dist/api/secret/v1alpha1/api.gen.cjs +483 -0
- package/dist/api/secret/v1alpha1/api.gen.d.ts +262 -0
- package/dist/api/secret/v1alpha1/api.gen.js +271 -176
- package/dist/api/secret/v1alpha1/index.gen.cjs +4 -0
- package/dist/api/secret/v1alpha1/index.gen.d.ts +2 -0
- package/dist/api/secret/v1alpha1/index.gen.js +4 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.cjs +221 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.d.ts +19 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.js +67 -33
- package/dist/api/secret/v1alpha1/types.gen.d.ts +619 -0
- package/dist/api/secret/v1beta1/api.gen.cjs +359 -0
- package/dist/api/secret/v1beta1/api.gen.d.ts +182 -0
- package/dist/api/secret/v1beta1/api.gen.js +213 -135
- package/dist/api/secret/v1beta1/index.gen.cjs +6 -0
- package/dist/api/secret/v1beta1/index.gen.d.ts +3 -0
- package/dist/api/secret/v1beta1/index.gen.js +6 -6
- package/dist/api/secret/v1beta1/marshalling.gen.cjs +219 -0
- package/dist/api/secret/v1beta1/marshalling.gen.d.ts +14 -0
- package/dist/api/secret/v1beta1/marshalling.gen.js +76 -40
- package/dist/api/secret/v1beta1/types.gen.d.ts +513 -0
- package/dist/api/secret/v1beta1/validation-rules.gen.cjs +8 -0
- package/dist/api/secret/v1beta1/validation-rules.gen.d.ts +5 -0
- package/dist/api/secret/v1beta1/validation-rules.gen.js +3 -5
- package/dist/api/serverless_sqldb/index.cjs +4 -0
- package/dist/api/serverless_sqldb/index.d.ts +1 -0
- package/dist/api/serverless_sqldb/index.js +4 -2
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.cjs +202 -0
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.d.ts +109 -0
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +118 -78
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.cjs +8 -0
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.d.ts +3 -0
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.js +8 -7
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.cjs +8 -0
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.js +8 -7
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.cjs +89 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.d.ts +9 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +27 -15
- package/dist/api/serverless_sqldb/v1alpha1/types.gen.d.ts +193 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.cjs +62 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.d.ts +55 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.js +9 -7
- package/dist/api/std/index.gen.cjs +1 -0
- package/dist/api/std/index.gen.d.ts +1 -0
- package/dist/api/std/types.gen.d.ts +1 -0
- package/dist/api/tem/index.cjs +4 -0
- package/dist/api/tem/index.d.ts +1 -0
- package/dist/api/tem/index.js +4 -2
- package/dist/api/tem/v1alpha1/api.gen.cjs +260 -0
- package/dist/api/tem/v1alpha1/api.gen.d.ts +134 -0
- package/dist/api/tem/v1alpha1/api.gen.js +154 -89
- package/dist/api/tem/v1alpha1/content.gen.cjs +6 -0
- package/dist/api/tem/v1alpha1/content.gen.d.ts +5 -0
- package/dist/api/tem/v1alpha1/content.gen.js +6 -10
- package/dist/api/tem/v1alpha1/index.gen.cjs +7 -0
- package/dist/api/tem/v1alpha1/index.gen.d.ts +3 -0
- package/dist/api/tem/v1alpha1/index.gen.js +7 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +255 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +11 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +90 -50
- package/dist/api/tem/v1alpha1/types.gen.d.ts +401 -0
- package/dist/api/test/index.cjs +4 -0
- package/dist/api/test/index.d.ts +1 -0
- package/dist/api/test/index.js +4 -2
- package/dist/api/test/v1/api.gen.cjs +164 -0
- package/dist/api/test/v1/api.gen.d.ts +84 -0
- package/dist/api/test/v1/api.gen.js +99 -71
- package/dist/api/test/v1/content.gen.cjs +4 -0
- package/dist/api/test/v1/content.gen.d.ts +3 -0
- package/dist/api/test/v1/content.gen.js +4 -7
- package/dist/api/test/v1/index.gen.cjs +6 -0
- package/dist/api/test/v1/index.gen.d.ts +3 -0
- package/dist/api/test/v1/index.gen.js +6 -5
- package/dist/api/test/v1/marshalling.gen.cjs +93 -0
- package/dist/api/test/v1/marshalling.gen.d.ts +8 -0
- package/dist/api/test/v1/marshalling.gen.js +34 -22
- package/dist/api/test/v1/types.gen.d.ts +91 -0
- package/dist/api/vpc/index.cjs +6 -0
- package/dist/api/vpc/index.d.ts +2 -0
- package/dist/api/vpc/index.js +6 -4
- package/dist/api/vpc/v1/api.gen.cjs +119 -0
- package/dist/api/vpc/v1/api.gen.d.ts +59 -0
- package/dist/api/vpc/v1/api.gen.js +76 -43
- package/dist/api/vpc/v1/index.gen.cjs +4 -0
- package/dist/api/vpc/v1/index.gen.d.ts +2 -0
- package/dist/api/vpc/v1/index.gen.js +4 -4
- package/dist/api/vpc/v1/marshalling.gen.cjs +52 -0
- package/dist/api/vpc/v1/marshalling.gen.d.ts +6 -0
- package/dist/api/vpc/v1/marshalling.gen.js +22 -14
- package/dist/api/vpc/v1/types.gen.d.ts +99 -0
- package/dist/api/vpc/v2/api.gen.cjs +303 -0
- package/dist/api/vpc/v2/api.gen.d.ts +149 -0
- package/dist/api/vpc/v2/api.gen.js +181 -112
- package/dist/api/vpc/v2/index.gen.cjs +4 -0
- package/dist/api/vpc/v2/index.gen.d.ts +2 -0
- package/dist/api/vpc/v2/index.gen.js +4 -4
- package/dist/api/vpc/v2/marshalling.gen.cjs +173 -0
- package/dist/api/vpc/v2/marshalling.gen.d.ts +17 -0
- package/dist/api/vpc/v2/marshalling.gen.js +70 -36
- package/dist/api/vpc/v2/types.gen.d.ts +338 -0
- package/dist/api/vpcgw/index.cjs +4 -0
- package/dist/api/vpcgw/index.d.ts +1 -0
- package/dist/api/vpcgw/index.js +4 -2
- package/dist/api/vpcgw/v1/api.gen.cjs +740 -0
- package/dist/api/vpcgw/v1/api.gen.d.ts +393 -0
- package/dist/api/vpcgw/v1/api.gen.js +408 -239
- package/dist/api/vpcgw/v1/content.gen.cjs +15 -0
- package/dist/api/vpcgw/v1/content.gen.d.ts +5 -0
- package/dist/api/vpcgw/v1/content.gen.js +15 -10
- package/dist/api/vpcgw/v1/index.gen.cjs +7 -0
- package/dist/api/vpcgw/v1/index.gen.d.ts +3 -0
- package/dist/api/vpcgw/v1/index.gen.js +7 -5
- package/dist/api/vpcgw/v1/marshalling.gen.cjs +437 -0
- package/dist/api/vpcgw/v1/marshalling.gen.d.ts +31 -0
- package/dist/api/vpcgw/v1/marshalling.gen.js +145 -74
- package/dist/api/vpcgw/v1/types.gen.d.ts +901 -0
- package/dist/api/webhosting/index.cjs +4 -0
- package/dist/api/webhosting/index.d.ts +1 -0
- package/dist/api/webhosting/index.js +4 -2
- package/dist/api/webhosting/v1alpha1/api.gen.cjs +226 -0
- package/dist/api/webhosting/v1alpha1/api.gen.d.ts +115 -0
- package/dist/api/webhosting/v1alpha1/api.gen.js +138 -86
- package/dist/api/webhosting/v1alpha1/content.gen.cjs +8 -0
- package/dist/api/webhosting/v1alpha1/content.gen.d.ts +3 -0
- package/dist/api/webhosting/v1alpha1/content.gen.js +8 -7
- package/dist/api/webhosting/v1alpha1/index.gen.cjs +8 -0
- package/dist/api/webhosting/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/webhosting/v1alpha1/index.gen.js +8 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.cjs +236 -0
- package/dist/api/webhosting/v1alpha1/marshalling.gen.d.ts +11 -0
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +80 -41
- package/dist/api/webhosting/v1alpha1/types.gen.d.ts +379 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.cjs +22 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.d.ts +18 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +4 -5
- package/dist/bridge.d.ts +11 -0
- package/dist/helpers/is-browser.cjs +7 -0
- package/dist/helpers/is-browser.d.ts +1 -0
- package/dist/helpers/is-browser.js +7 -5
- package/dist/helpers/is-response.cjs +4 -0
- package/dist/helpers/is-response.d.ts +8 -0
- package/dist/helpers/is-response.js +4 -10
- package/dist/helpers/json.cjs +7 -0
- package/dist/helpers/json.d.ts +13 -0
- package/dist/helpers/json.js +5 -9
- package/dist/helpers/marshalling.cjs +78 -0
- package/dist/helpers/marshalling.d.ts +63 -0
- package/dist/helpers/marshalling.js +40 -77
- package/dist/index.cjs +114 -32093
- package/dist/index.d.ts +15 -38464
- package/dist/index.js +115 -81
- package/dist/internal/async/interval-retrier.cjs +55 -0
- package/dist/internal/async/interval-retrier.d.ts +111 -0
- package/dist/internal/async/interval-retrier.js +30 -72
- package/dist/internal/async/sleep.cjs +6 -0
- package/dist/internal/async/sleep.d.ts +9 -0
- package/dist/internal/async/sleep.js +4 -11
- package/dist/internal/interceptors/composer.cjs +25 -0
- package/dist/internal/interceptors/composer.d.ts +25 -0
- package/dist/internal/interceptors/composer.js +15 -36
- package/dist/internal/interceptors/helpers.cjs +12 -0
- package/dist/internal/interceptors/helpers.d.ts +21 -0
- package/dist/internal/interceptors/helpers.js +7 -26
- package/dist/internal/interceptors/types.d.ts +89 -0
- package/dist/internal/logger/console-logger.cjs +24 -0
- package/dist/internal/logger/console-logger.d.ts +23 -0
- package/dist/internal/logger/console-logger.js +11 -19
- package/dist/internal/logger/index.cjs +12 -0
- package/dist/internal/logger/index.d.ts +25 -0
- package/dist/internal/logger/index.js +9 -30
- package/dist/internal/logger/level-resolver.cjs +13 -0
- package/dist/internal/logger/level-resolver.d.ts +9 -0
- package/dist/internal/logger/level-resolver.js +12 -12
- package/dist/internal/logger/logger.d.ts +13 -0
- package/dist/internal/validations/string-validation.cjs +30 -0
- package/dist/internal/validations/string-validation.d.ts +18 -0
- package/dist/internal/validations/string-validation.js +19 -27
- package/dist/internals.d.ts +10 -0
- package/dist/scw/api.cjs +8 -0
- package/dist/scw/api.d.ts +10 -0
- package/dist/scw/api.js +3 -7
- package/dist/scw/auth.cjs +28 -0
- package/dist/scw/auth.d.ts +57 -0
- package/dist/scw/auth.js +23 -62
- package/dist/scw/client-ini-factory.cjs +66 -0
- package/dist/scw/client-ini-factory.d.ts +111 -0
- package/dist/scw/client-ini-factory.js +33 -141
- package/dist/scw/client-ini-profile.cjs +23 -0
- package/dist/scw/client-ini-profile.d.ts +82 -0
- package/dist/scw/client-ini-profile.js +15 -46
- package/dist/scw/client-settings.cjs +51 -0
- package/dist/scw/client-settings.d.ts +59 -0
- package/dist/scw/client-settings.js +26 -53
- package/dist/scw/client.cjs +28 -0
- package/dist/scw/client.d.ts +72 -0
- package/dist/scw/client.js +14 -76
- package/dist/scw/constants.cjs +6 -0
- package/dist/scw/constants.d.ts +2 -0
- package/dist/scw/constants.js +5 -3
- package/dist/scw/custom-marshalling.cjs +92 -0
- package/dist/scw/custom-marshalling.d.ts +59 -0
- package/dist/scw/custom-marshalling.js +38 -77
- package/dist/scw/custom-types.d.ts +65 -0
- package/dist/scw/errors/error-parser.cjs +76 -0
- package/dist/scw/errors/error-parser.d.ts +12 -0
- package/dist/scw/errors/error-parser.js +33 -64
- package/dist/scw/errors/non-standard/invalid-request-mapper.cjs +36 -0
- package/dist/scw/errors/non-standard/invalid-request-mapper.d.ts +12 -0
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +26 -23
- package/dist/scw/errors/non-standard/unknown-resource-mapper.cjs +23 -0
- package/dist/scw/errors/non-standard/unknown-resource-mapper.d.ts +11 -0
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +16 -20
- package/dist/scw/errors/scw-error-from-json.d.ts +10 -0
- package/dist/scw/errors/scw-error.cjs +43 -0
- package/dist/scw/errors/scw-error.d.ts +25 -0
- package/dist/scw/errors/scw-error.js +19 -35
- package/dist/scw/errors/standard/already-exists-error.cjs +31 -0
- package/dist/scw/errors/standard/already-exists-error.d.ts +16 -0
- package/dist/scw/errors/standard/already-exists-error.js +18 -13
- package/dist/scw/errors/standard/denied-authentication-error.cjs +37 -0
- package/dist/scw/errors/standard/denied-authentication-error.d.ts +15 -0
- package/dist/scw/errors/standard/denied-authentication-error.js +9 -24
- package/dist/scw/errors/standard/index.cjs +28 -0
- package/dist/scw/errors/standard/index.d.ts +17 -0
- package/dist/scw/errors/standard/index.js +28 -13
- package/dist/scw/errors/standard/invalid-arguments-error.cjs +55 -0
- package/dist/scw/errors/standard/invalid-arguments-error.d.ts +24 -0
- package/dist/scw/errors/standard/invalid-arguments-error.js +26 -38
- package/dist/scw/errors/standard/out-of-stock-error.cjs +18 -0
- package/dist/scw/errors/standard/out-of-stock-error.d.ts +14 -0
- package/dist/scw/errors/standard/out-of-stock-error.js +7 -11
- package/dist/scw/errors/standard/permissions-denied-error.cjs +30 -0
- package/dist/scw/errors/standard/permissions-denied-error.d.ts +23 -0
- package/dist/scw/errors/standard/permissions-denied-error.js +20 -35
- package/dist/scw/errors/standard/precondition-failed-error.cjs +32 -0
- package/dist/scw/errors/standard/precondition-failed-error.d.ts +15 -0
- package/dist/scw/errors/standard/precondition-failed-error.js +14 -24
- package/dist/scw/errors/standard/quotas-exceeded-error.cjs +44 -0
- package/dist/scw/errors/standard/quotas-exceeded-error.d.ts +34 -0
- package/dist/scw/errors/standard/quotas-exceeded-error.js +29 -53
- package/dist/scw/errors/standard/resource-expired-error.cjs +31 -0
- package/dist/scw/errors/standard/resource-expired-error.d.ts +16 -0
- package/dist/scw/errors/standard/resource-expired-error.js +18 -13
- package/dist/scw/errors/standard/resource-locked-error.cjs +20 -0
- package/dist/scw/errors/standard/resource-locked-error.d.ts +15 -0
- package/dist/scw/errors/standard/resource-locked-error.js +6 -11
- package/dist/scw/errors/standard/resource-not-found-error.cjs +24 -0
- package/dist/scw/errors/standard/resource-not-found-error.d.ts +15 -0
- package/dist/scw/errors/standard/resource-not-found-error.js +11 -12
- package/dist/scw/errors/standard/too-many-requests-error.cjs +59 -0
- package/dist/scw/errors/standard/too-many-requests-error.d.ts +32 -0
- package/dist/scw/errors/standard/too-many-requests-error.js +20 -31
- package/dist/scw/errors/standard/transient-state-error.cjs +31 -0
- package/dist/scw/errors/standard/transient-state-error.d.ts +16 -0
- package/dist/scw/errors/standard/transient-state-error.js +18 -13
- package/dist/scw/errors/types.cjs +15 -0
- package/dist/scw/errors/types.d.ts +9 -0
- package/dist/scw/errors/types.js +6 -14
- package/dist/scw/fetch/build-fetcher.cjs +60 -0
- package/dist/scw/fetch/build-fetcher.d.ts +23 -0
- package/dist/scw/fetch/build-fetcher.js +29 -38
- package/dist/scw/fetch/http-dumper.cjs +20 -0
- package/dist/scw/fetch/http-dumper.d.ts +18 -0
- package/dist/scw/fetch/http-dumper.js +19 -50
- package/dist/scw/fetch/http-interceptors.cjs +43 -0
- package/dist/scw/fetch/http-interceptors.d.ts +38 -0
- package/dist/scw/fetch/http-interceptors.js +23 -66
- package/dist/scw/fetch/resource-paginator.cjs +37 -0
- package/dist/scw/fetch/resource-paginator.d.ts +47 -0
- package/dist/scw/fetch/resource-paginator.js +12 -45
- package/dist/scw/fetch/response-parser.cjs +57 -0
- package/dist/scw/fetch/response-parser.d.ts +25 -0
- package/dist/scw/fetch/response-parser.js +31 -46
- package/dist/scw/fetch/types.d.ts +16 -0
- package/dist/scw/locality.d.ts +2 -0
- package/package.json +7 -3
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.3/node_modules/@scaleway/random-name/dist/index.js +0 -11
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { isJSONObject } from
|
|
2
|
-
import { unmarshalDate, unmarshalArrayOfObject } from
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Unmarshals {@link Money}
|
|
6
|
-
*
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
const unmarshalMoney = data => {
|
|
1
|
+
import { isJSONObject } from "../helpers/json.js";
|
|
2
|
+
import { unmarshalDate, unmarshalArrayOfObject } from "../helpers/marshalling.js";
|
|
3
|
+
const unmarshalMoney = (data) => {
|
|
10
4
|
if (!isJSONObject(data)) {
|
|
11
|
-
throw new TypeError(
|
|
5
|
+
throw new TypeError(
|
|
6
|
+
`Unmarshalling the type 'Money' failed as data isn't a dictionary.`
|
|
7
|
+
);
|
|
12
8
|
}
|
|
13
9
|
return {
|
|
14
10
|
currencyCode: data.currency_code,
|
|
@@ -16,15 +12,11 @@ const unmarshalMoney = data => {
|
|
|
16
12
|
units: data.units
|
|
17
13
|
};
|
|
18
14
|
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Unmarshals {@link ServiceInfo}.
|
|
22
|
-
*
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
const unmarshalServiceInfo = data => {
|
|
15
|
+
const unmarshalServiceInfo = (data) => {
|
|
26
16
|
if (!isJSONObject(data)) {
|
|
27
|
-
throw new TypeError(
|
|
17
|
+
throw new TypeError(
|
|
18
|
+
`Unmarshalling the type 'ServiceInfo' failed as data isn't a dictionary.`
|
|
19
|
+
);
|
|
28
20
|
}
|
|
29
21
|
return {
|
|
30
22
|
description: data.description,
|
|
@@ -33,15 +25,11 @@ const unmarshalServiceInfo = data => {
|
|
|
33
25
|
version: data.version
|
|
34
26
|
};
|
|
35
27
|
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Unmarshals {@link ScwFile}.
|
|
39
|
-
*
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
const unmarshalScwFile = data => {
|
|
28
|
+
const unmarshalScwFile = (data) => {
|
|
43
29
|
if (!isJSONObject(data)) {
|
|
44
|
-
throw new TypeError(
|
|
30
|
+
throw new TypeError(
|
|
31
|
+
`Unmarshalling the type 'ScwFile' failed as data isn't a dictionary.`
|
|
32
|
+
);
|
|
45
33
|
}
|
|
46
34
|
return {
|
|
47
35
|
content: data.content,
|
|
@@ -49,34 +37,22 @@ const unmarshalScwFile = data => {
|
|
|
49
37
|
name: data.name
|
|
50
38
|
};
|
|
51
39
|
};
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Unmarshals {@link TimeSeriesPoint}
|
|
55
|
-
*
|
|
56
|
-
* @remarks To optimize the size of this message,
|
|
57
|
-
* the JSON is compressed in an array instead of a dictionary.
|
|
58
|
-
* Example: `["2019-08-08T15:00:00Z", 0.2]`.
|
|
59
|
-
*
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
|
-
const unmarshalTimeSeriesPoint = data => {
|
|
40
|
+
const unmarshalTimeSeriesPoint = (data) => {
|
|
63
41
|
if (!Array.isArray(data)) {
|
|
64
|
-
throw new TypeError(
|
|
42
|
+
throw new TypeError(
|
|
43
|
+
`Unmarshalling the type 'TimeSeriesPoint' failed as data isn't an array.`
|
|
44
|
+
);
|
|
65
45
|
}
|
|
66
46
|
return {
|
|
67
47
|
timestamp: unmarshalDate(data[0]),
|
|
68
48
|
value: data[1]
|
|
69
49
|
};
|
|
70
50
|
};
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Unmarshals {@link TimeSeries}
|
|
74
|
-
*
|
|
75
|
-
* @internal
|
|
76
|
-
*/
|
|
77
|
-
const unmarshalTimeSeries = data => {
|
|
51
|
+
const unmarshalTimeSeries = (data) => {
|
|
78
52
|
if (!isJSONObject(data)) {
|
|
79
|
-
throw new TypeError(
|
|
53
|
+
throw new TypeError(
|
|
54
|
+
`Unmarshalling the type 'TimeSeries' failed as data isn't a dictionary.`
|
|
55
|
+
);
|
|
80
56
|
}
|
|
81
57
|
return {
|
|
82
58
|
metadata: data.metadata,
|
|
@@ -84,48 +60,33 @@ const unmarshalTimeSeries = data => {
|
|
|
84
60
|
points: unmarshalArrayOfObject(data.points, unmarshalTimeSeriesPoint)
|
|
85
61
|
};
|
|
86
62
|
};
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Marshals {@link ScwFile}.
|
|
90
|
-
*
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
const marshalScwFile = obj => ({
|
|
63
|
+
const marshalScwFile = (obj) => ({
|
|
94
64
|
content: obj.content,
|
|
95
65
|
content_type: obj.contentType,
|
|
96
66
|
name: obj.name
|
|
97
67
|
});
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Marshals {@link Money}
|
|
101
|
-
*
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
const marshalMoney = obj => ({
|
|
68
|
+
const marshalMoney = (obj) => ({
|
|
105
69
|
currency_code: obj.currencyCode,
|
|
106
70
|
nanos: obj.nanos,
|
|
107
71
|
units: obj.units
|
|
108
72
|
});
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Marshals {@link TimeSeriesPoint}
|
|
112
|
-
*
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
const marshalTimeSeriesPoint = obj => ({
|
|
73
|
+
const marshalTimeSeriesPoint = (obj) => ({
|
|
116
74
|
timestamp: obj.timestamp?.toISOString(),
|
|
117
75
|
value: obj.value
|
|
118
76
|
});
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Marshals {@link TimeSeries}
|
|
122
|
-
*
|
|
123
|
-
* @internal
|
|
124
|
-
*/
|
|
125
|
-
const marshalTimeSeries = obj => ({
|
|
77
|
+
const marshalTimeSeries = (obj) => ({
|
|
126
78
|
metadata: obj.metadata,
|
|
127
79
|
name: obj.name,
|
|
128
|
-
points: obj.points.map(elt => marshalTimeSeriesPoint(elt))
|
|
80
|
+
points: obj.points.map((elt) => marshalTimeSeriesPoint(elt))
|
|
129
81
|
});
|
|
130
|
-
|
|
131
|
-
|
|
82
|
+
export {
|
|
83
|
+
marshalMoney,
|
|
84
|
+
marshalScwFile,
|
|
85
|
+
marshalTimeSeries,
|
|
86
|
+
marshalTimeSeriesPoint,
|
|
87
|
+
unmarshalMoney,
|
|
88
|
+
unmarshalScwFile,
|
|
89
|
+
unmarshalServiceInfo,
|
|
90
|
+
unmarshalTimeSeries,
|
|
91
|
+
unmarshalTimeSeriesPoint
|
|
92
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents API metadata.
|
|
3
|
+
*
|
|
4
|
+
* @remarks These metadata are only here for debugging. Do not rely on these values.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface ServiceInfo {
|
|
9
|
+
/** Name of the API */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Human readable description for the API. */
|
|
12
|
+
description: string;
|
|
13
|
+
/** Version of the API. */
|
|
14
|
+
version: string;
|
|
15
|
+
/** Web url where the documentation of the API can be found. */
|
|
16
|
+
documentationUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Represents an amount of money with its currency type.
|
|
20
|
+
*/
|
|
21
|
+
export interface Money {
|
|
22
|
+
/** 3-letter currency code defined in ISO 4217. */
|
|
23
|
+
currencyCode: string;
|
|
24
|
+
/**
|
|
25
|
+
* Whole units of the amount.
|
|
26
|
+
*
|
|
27
|
+
* For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
|
|
28
|
+
*/
|
|
29
|
+
units: number;
|
|
30
|
+
/**
|
|
31
|
+
* Number of nano (10^-9) units of the amount.
|
|
32
|
+
*
|
|
33
|
+
* The value must be between -999,999,999 and +999,999,999 inclusive.
|
|
34
|
+
* If `units` is positive, `nanos` must be positive or zero.
|
|
35
|
+
* If `units` is zero, `nanos` can be positive, zero, or negative.
|
|
36
|
+
* If `units` is negative, `nanos` must be negative or zero.
|
|
37
|
+
* For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
|
|
38
|
+
*/
|
|
39
|
+
nanos: number;
|
|
40
|
+
}
|
|
41
|
+
/** Represents a point in a TimeSeries. */
|
|
42
|
+
export interface TimeSeriesPoint {
|
|
43
|
+
/** Date of the point. */
|
|
44
|
+
timestamp?: Date;
|
|
45
|
+
/** Value of the point. */
|
|
46
|
+
value: number;
|
|
47
|
+
}
|
|
48
|
+
/** Represents a time series that could be used for graph purposes. */
|
|
49
|
+
export interface TimeSeries {
|
|
50
|
+
/** Name of the metric. */
|
|
51
|
+
name: string;
|
|
52
|
+
/** Points contains all the points that composed the series. */
|
|
53
|
+
points: TimeSeriesPoint[];
|
|
54
|
+
/** Metadata contains some string metadata related to a metric. */
|
|
55
|
+
metadata: Record<string, string>;
|
|
56
|
+
}
|
|
57
|
+
/** Represents a Scaleway file. */
|
|
58
|
+
export interface ScwFile {
|
|
59
|
+
/** Name of the file. */
|
|
60
|
+
name: string;
|
|
61
|
+
/** Content-type of the file. */
|
|
62
|
+
contentType: string;
|
|
63
|
+
/** Content of the file in base64. */
|
|
64
|
+
content: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const invalidRequestMapper = require("./non-standard/invalid-request-mapper.cjs");
|
|
4
|
+
const unknownResourceMapper = require("./non-standard/unknown-resource-mapper.cjs");
|
|
5
|
+
const scwError = require("./scw-error.cjs");
|
|
6
|
+
const alreadyExistsError = require("./standard/already-exists-error.cjs");
|
|
7
|
+
const deniedAuthenticationError = require("./standard/denied-authentication-error.cjs");
|
|
8
|
+
const invalidArgumentsError = require("./standard/invalid-arguments-error.cjs");
|
|
9
|
+
const outOfStockError = require("./standard/out-of-stock-error.cjs");
|
|
10
|
+
const permissionsDeniedError = require("./standard/permissions-denied-error.cjs");
|
|
11
|
+
const preconditionFailedError = require("./standard/precondition-failed-error.cjs");
|
|
12
|
+
const quotasExceededError = require("./standard/quotas-exceeded-error.cjs");
|
|
13
|
+
const resourceExpiredError = require("./standard/resource-expired-error.cjs");
|
|
14
|
+
const resourceLockedError = require("./standard/resource-locked-error.cjs");
|
|
15
|
+
const resourceNotFoundError = require("./standard/resource-not-found-error.cjs");
|
|
16
|
+
const tooManyRequestsError = require("./standard/too-many-requests-error.cjs");
|
|
17
|
+
const transientStateError = require("./standard/transient-state-error.cjs");
|
|
18
|
+
const unmarshalStandardError = (type, status, body) => {
|
|
19
|
+
let error;
|
|
20
|
+
switch (type) {
|
|
21
|
+
case "denied_authentication":
|
|
22
|
+
error = deniedAuthenticationError.DeniedAuthenticationError;
|
|
23
|
+
break;
|
|
24
|
+
case "invalid_arguments":
|
|
25
|
+
error = invalidArgumentsError.InvalidArgumentsError;
|
|
26
|
+
break;
|
|
27
|
+
case "out_of_stock":
|
|
28
|
+
error = outOfStockError.OutOfStockError;
|
|
29
|
+
break;
|
|
30
|
+
case "permissions_denied":
|
|
31
|
+
error = permissionsDeniedError.PermissionsDeniedError;
|
|
32
|
+
break;
|
|
33
|
+
case "precondition_failed":
|
|
34
|
+
error = preconditionFailedError.PreconditionFailedError;
|
|
35
|
+
break;
|
|
36
|
+
case "quotas_exceeded":
|
|
37
|
+
error = quotasExceededError.QuotasExceededError;
|
|
38
|
+
break;
|
|
39
|
+
case "expired":
|
|
40
|
+
error = resourceExpiredError.ResourceExpiredError;
|
|
41
|
+
break;
|
|
42
|
+
case "not_found":
|
|
43
|
+
error = resourceNotFoundError.ResourceNotFoundError;
|
|
44
|
+
break;
|
|
45
|
+
case "locked":
|
|
46
|
+
error = resourceLockedError.ResourceLockedError;
|
|
47
|
+
break;
|
|
48
|
+
case "transient_state":
|
|
49
|
+
error = transientStateError.TransientStateError;
|
|
50
|
+
break;
|
|
51
|
+
case "already_exists":
|
|
52
|
+
error = alreadyExistsError.AlreadyExistsError;
|
|
53
|
+
break;
|
|
54
|
+
case "too_many_requests":
|
|
55
|
+
error = tooManyRequestsError.TooManyRequestsError;
|
|
56
|
+
break;
|
|
57
|
+
default:
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return error.fromJSON(status, body);
|
|
61
|
+
};
|
|
62
|
+
const unmarshalNonStandardError = (type, status, body) => {
|
|
63
|
+
switch (type) {
|
|
64
|
+
case "unknown_resource":
|
|
65
|
+
return unknownResourceMapper.UnknownResourceMapper.fromJSON(status, body);
|
|
66
|
+
case "invalid_request_error":
|
|
67
|
+
return invalidRequestMapper.InvalidRequestMapper.fromJSON(status, body);
|
|
68
|
+
default:
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const parseScalewayError = (status, body) => {
|
|
73
|
+
const parsableError = typeof body.type === "string" && (unmarshalStandardError(body.type, status, body) ?? unmarshalNonStandardError(body.type, status, body));
|
|
74
|
+
return parsableError || new scwError.ScalewayError(status, body);
|
|
75
|
+
};
|
|
76
|
+
exports.parseScalewayError = parseScalewayError;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { JSONObject } from '../../helpers/json';
|
|
2
|
+
import { ScalewayError } from './scw-error';
|
|
3
|
+
/**
|
|
4
|
+
* Parses Scaleway error from raw body.
|
|
5
|
+
*
|
|
6
|
+
* @param status - The status code
|
|
7
|
+
* @param body - The error response
|
|
8
|
+
* @returns The resolved error
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const parseScalewayError: (status: number, body: Readonly<JSONObject>) => ScalewayError;
|
|
@@ -1,66 +1,55 @@
|
|
|
1
|
-
import { InvalidRequestMapper } from
|
|
2
|
-
import { UnknownResourceMapper } from
|
|
3
|
-
import { ScalewayError } from
|
|
4
|
-
import { AlreadyExistsError } from
|
|
5
|
-
import { DeniedAuthenticationError } from
|
|
6
|
-
import { InvalidArgumentsError } from
|
|
7
|
-
import { OutOfStockError } from
|
|
8
|
-
import { PermissionsDeniedError } from
|
|
9
|
-
import { PreconditionFailedError } from
|
|
10
|
-
import { QuotasExceededError } from
|
|
11
|
-
import { ResourceExpiredError } from
|
|
12
|
-
import { ResourceLockedError } from
|
|
13
|
-
import { ResourceNotFoundError } from
|
|
14
|
-
import { TooManyRequestsError } from
|
|
15
|
-
import { TransientStateError } from
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Unmarshals a standard error from raw body.
|
|
19
|
-
*
|
|
20
|
-
* @param type - The error type
|
|
21
|
-
* @param status - The status code
|
|
22
|
-
* @param body - The error response
|
|
23
|
-
* @returns The standard error if found
|
|
24
|
-
*
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
1
|
+
import { InvalidRequestMapper } from "./non-standard/invalid-request-mapper.js";
|
|
2
|
+
import { UnknownResourceMapper } from "./non-standard/unknown-resource-mapper.js";
|
|
3
|
+
import { ScalewayError } from "./scw-error.js";
|
|
4
|
+
import { AlreadyExistsError } from "./standard/already-exists-error.js";
|
|
5
|
+
import { DeniedAuthenticationError } from "./standard/denied-authentication-error.js";
|
|
6
|
+
import { InvalidArgumentsError } from "./standard/invalid-arguments-error.js";
|
|
7
|
+
import { OutOfStockError } from "./standard/out-of-stock-error.js";
|
|
8
|
+
import { PermissionsDeniedError } from "./standard/permissions-denied-error.js";
|
|
9
|
+
import { PreconditionFailedError } from "./standard/precondition-failed-error.js";
|
|
10
|
+
import { QuotasExceededError } from "./standard/quotas-exceeded-error.js";
|
|
11
|
+
import { ResourceExpiredError } from "./standard/resource-expired-error.js";
|
|
12
|
+
import { ResourceLockedError } from "./standard/resource-locked-error.js";
|
|
13
|
+
import { ResourceNotFoundError } from "./standard/resource-not-found-error.js";
|
|
14
|
+
import { TooManyRequestsError } from "./standard/too-many-requests-error.js";
|
|
15
|
+
import { TransientStateError } from "./standard/transient-state-error.js";
|
|
27
16
|
const unmarshalStandardError = (type, status, body) => {
|
|
28
17
|
let error;
|
|
29
18
|
switch (type) {
|
|
30
|
-
case
|
|
19
|
+
case "denied_authentication":
|
|
31
20
|
error = DeniedAuthenticationError;
|
|
32
21
|
break;
|
|
33
|
-
case
|
|
22
|
+
case "invalid_arguments":
|
|
34
23
|
error = InvalidArgumentsError;
|
|
35
24
|
break;
|
|
36
|
-
case
|
|
25
|
+
case "out_of_stock":
|
|
37
26
|
error = OutOfStockError;
|
|
38
27
|
break;
|
|
39
|
-
case
|
|
28
|
+
case "permissions_denied":
|
|
40
29
|
error = PermissionsDeniedError;
|
|
41
30
|
break;
|
|
42
|
-
case
|
|
31
|
+
case "precondition_failed":
|
|
43
32
|
error = PreconditionFailedError;
|
|
44
33
|
break;
|
|
45
|
-
case
|
|
34
|
+
case "quotas_exceeded":
|
|
46
35
|
error = QuotasExceededError;
|
|
47
36
|
break;
|
|
48
|
-
case
|
|
37
|
+
case "expired":
|
|
49
38
|
error = ResourceExpiredError;
|
|
50
39
|
break;
|
|
51
|
-
case
|
|
40
|
+
case "not_found":
|
|
52
41
|
error = ResourceNotFoundError;
|
|
53
42
|
break;
|
|
54
|
-
case
|
|
43
|
+
case "locked":
|
|
55
44
|
error = ResourceLockedError;
|
|
56
45
|
break;
|
|
57
|
-
case
|
|
46
|
+
case "transient_state":
|
|
58
47
|
error = TransientStateError;
|
|
59
48
|
break;
|
|
60
|
-
case
|
|
49
|
+
case "already_exists":
|
|
61
50
|
error = AlreadyExistsError;
|
|
62
51
|
break;
|
|
63
|
-
case
|
|
52
|
+
case "too_many_requests":
|
|
64
53
|
error = TooManyRequestsError;
|
|
65
54
|
break;
|
|
66
55
|
default:
|
|
@@ -68,40 +57,20 @@ const unmarshalStandardError = (type, status, body) => {
|
|
|
68
57
|
}
|
|
69
58
|
return error.fromJSON(status, body);
|
|
70
59
|
};
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Unmarshals a non-standard error from raw body.
|
|
74
|
-
*
|
|
75
|
-
* @param type - The error type
|
|
76
|
-
* @param status - The status code
|
|
77
|
-
* @param body - The error response
|
|
78
|
-
* @returns The non-standard error if found
|
|
79
|
-
*
|
|
80
|
-
* @internal
|
|
81
|
-
*/
|
|
82
60
|
const unmarshalNonStandardError = (type, status, body) => {
|
|
83
61
|
switch (type) {
|
|
84
|
-
case
|
|
62
|
+
case "unknown_resource":
|
|
85
63
|
return UnknownResourceMapper.fromJSON(status, body);
|
|
86
|
-
case
|
|
64
|
+
case "invalid_request_error":
|
|
87
65
|
return InvalidRequestMapper.fromJSON(status, body);
|
|
88
66
|
default:
|
|
89
67
|
return null;
|
|
90
68
|
}
|
|
91
69
|
};
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Parses Scaleway error from raw body.
|
|
95
|
-
*
|
|
96
|
-
* @param status - The status code
|
|
97
|
-
* @param body - The error response
|
|
98
|
-
* @returns The resolved error
|
|
99
|
-
*
|
|
100
|
-
* @internal
|
|
101
|
-
*/
|
|
102
70
|
const parseScalewayError = (status, body) => {
|
|
103
|
-
const parsableError = typeof body.type ===
|
|
71
|
+
const parsableError = typeof body.type === "string" && (unmarshalStandardError(body.type, status, body) ?? unmarshalNonStandardError(body.type, status, body));
|
|
104
72
|
return parsableError || new ScalewayError(status, body);
|
|
105
73
|
};
|
|
106
|
-
|
|
107
|
-
|
|
74
|
+
export {
|
|
75
|
+
parseScalewayError
|
|
76
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const scwError = require("../scw-error.cjs");
|
|
4
|
+
const invalidArgumentsError = require("../standard/invalid-arguments-error.cjs");
|
|
5
|
+
const quotasExceededError = require("../standard/quotas-exceeded-error.cjs");
|
|
6
|
+
const types = require("../types.cjs");
|
|
7
|
+
class InvalidRequestMapper {
|
|
8
|
+
static fromJSON(status, obj) {
|
|
9
|
+
if (typeof obj.message === "string" && obj.message.toLowerCase().includes("quota exceeded for this resource")) {
|
|
10
|
+
return new quotasExceededError.QuotasExceededError(status, obj, [
|
|
11
|
+
{
|
|
12
|
+
current: 0,
|
|
13
|
+
quota: 0,
|
|
14
|
+
resource: typeof obj.resource === "string" ? obj.resource : ""
|
|
15
|
+
}
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
const fields = obj.fields && types.isRecordOfStringArray(obj.fields) ? obj.fields : {};
|
|
19
|
+
const fieldsMessages = Object.entries(fields);
|
|
20
|
+
if (fieldsMessages.length) {
|
|
21
|
+
return new invalidArgumentsError.InvalidArgumentsError(
|
|
22
|
+
status,
|
|
23
|
+
obj,
|
|
24
|
+
fieldsMessages.map(
|
|
25
|
+
([argumentName, messages]) => messages.map((helpMessage) => ({
|
|
26
|
+
argumentName,
|
|
27
|
+
helpMessage,
|
|
28
|
+
reason: "constraint"
|
|
29
|
+
}))
|
|
30
|
+
).flat()
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
return new scwError.ScalewayError(status, obj);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.InvalidRequestMapper = InvalidRequestMapper;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { JSONObject } from '../../../helpers/json';
|
|
2
|
+
import { ScalewayError } from '../scw-error';
|
|
3
|
+
import { InvalidArgumentsError } from '../standard/invalid-arguments-error';
|
|
4
|
+
import { QuotasExceededError } from '../standard/quotas-exceeded-error';
|
|
5
|
+
/**
|
|
6
|
+
* InvalidRequest error is only returned by the instance API.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare class InvalidRequestMapper {
|
|
11
|
+
static fromJSON(status: number, obj: Readonly<JSONObject>): QuotasExceededError | InvalidArgumentsError | ScalewayError;
|
|
12
|
+
}
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
import { ScalewayError } from
|
|
2
|
-
import { InvalidArgumentsError } from
|
|
3
|
-
import { QuotasExceededError } from
|
|
4
|
-
import { isRecordOfStringArray } from
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* InvalidRequest error is only returned by the instance API.
|
|
8
|
-
*
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
1
|
+
import { ScalewayError } from "../scw-error.js";
|
|
2
|
+
import { InvalidArgumentsError } from "../standard/invalid-arguments-error.js";
|
|
3
|
+
import { QuotasExceededError } from "../standard/quotas-exceeded-error.js";
|
|
4
|
+
import { isRecordOfStringArray } from "../types.js";
|
|
11
5
|
class InvalidRequestMapper {
|
|
12
6
|
static fromJSON(status, obj) {
|
|
13
|
-
if (typeof obj.message ===
|
|
14
|
-
return new QuotasExceededError(status, obj, [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
if (typeof obj.message === "string" && obj.message.toLowerCase().includes("quota exceeded for this resource")) {
|
|
8
|
+
return new QuotasExceededError(status, obj, [
|
|
9
|
+
{
|
|
10
|
+
current: 0,
|
|
11
|
+
quota: 0,
|
|
12
|
+
resource: typeof obj.resource === "string" ? obj.resource : ""
|
|
13
|
+
}
|
|
14
|
+
]);
|
|
19
15
|
}
|
|
20
16
|
const fields = obj.fields && isRecordOfStringArray(obj.fields) ? obj.fields : {};
|
|
21
17
|
const fieldsMessages = Object.entries(fields);
|
|
22
18
|
if (fieldsMessages.length) {
|
|
23
|
-
return new InvalidArgumentsError(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
return new InvalidArgumentsError(
|
|
20
|
+
status,
|
|
21
|
+
obj,
|
|
22
|
+
fieldsMessages.map(
|
|
23
|
+
([argumentName, messages]) => messages.map((helpMessage) => ({
|
|
24
|
+
argumentName,
|
|
25
|
+
helpMessage,
|
|
26
|
+
reason: "constraint"
|
|
27
|
+
}))
|
|
28
|
+
).flat()
|
|
29
|
+
);
|
|
28
30
|
}
|
|
29
31
|
return new ScalewayError(status, obj);
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
export {
|
|
35
|
+
InvalidRequestMapper
|
|
36
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const stringValidation = require("../../../internal/validations/string-validation.cjs");
|
|
4
|
+
const scwError = require("../scw-error.cjs");
|
|
5
|
+
const resourceNotFoundError = require("../standard/resource-not-found-error.cjs");
|
|
6
|
+
class UnknownResourceMapper {
|
|
7
|
+
static fromJSON(status, obj) {
|
|
8
|
+
const messageParts = typeof obj.message === "string" ? obj.message.split(/"|'/) : [];
|
|
9
|
+
if (messageParts.length === 3 && stringValidation.isUUID(messageParts[1])) {
|
|
10
|
+
return new resourceNotFoundError.ResourceNotFoundError(
|
|
11
|
+
status,
|
|
12
|
+
obj,
|
|
13
|
+
// transform `Security group ` to `security_group`
|
|
14
|
+
// `.replaceAll()` may be too recent to use yet.
|
|
15
|
+
// that's why we're using `.split(' ').join('_')` for now.
|
|
16
|
+
messageParts[0].trim().toLowerCase().split(" ").join("_"),
|
|
17
|
+
messageParts[1]
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
return new scwError.ScalewayError(status, obj);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.UnknownResourceMapper = UnknownResourceMapper;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSONObject } from '../../../helpers/json';
|
|
2
|
+
import { ScalewayError } from '../scw-error';
|
|
3
|
+
import { ResourceNotFoundError } from '../standard/resource-not-found-error';
|
|
4
|
+
/**
|
|
5
|
+
* UnknownResource error is only returned by the instance API.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare class UnknownResourceMapper {
|
|
10
|
+
static fromJSON(status: number, obj: Readonly<JSONObject>): ResourceNotFoundError | ScalewayError;
|
|
11
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import { isUUID } from
|
|
2
|
-
import { ScalewayError } from
|
|
3
|
-
import { ResourceNotFoundError } from
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* UnknownResource error is only returned by the instance API.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
1
|
+
import { isUUID } from "../../../internal/validations/string-validation.js";
|
|
2
|
+
import { ScalewayError } from "../scw-error.js";
|
|
3
|
+
import { ResourceNotFoundError } from "../standard/resource-not-found-error.js";
|
|
10
4
|
class UnknownResourceMapper {
|
|
11
5
|
static fromJSON(status, obj) {
|
|
12
|
-
|
|
13
|
-
// Note: some errors uses ' and not "
|
|
14
|
-
// Examples: `"111..." not found` or `Security Group '111...' not found`
|
|
15
|
-
const messageParts = typeof obj.message === 'string' ? obj.message.split(/"|'/) : [];
|
|
6
|
+
const messageParts = typeof obj.message === "string" ? obj.message.split(/"|'/) : [];
|
|
16
7
|
if (messageParts.length === 3 && isUUID(messageParts[1])) {
|
|
17
|
-
return new ResourceNotFoundError(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
return new ResourceNotFoundError(
|
|
9
|
+
status,
|
|
10
|
+
obj,
|
|
11
|
+
// transform `Security group ` to `security_group`
|
|
12
|
+
// `.replaceAll()` may be too recent to use yet.
|
|
13
|
+
// that's why we're using `.split(' ').join('_')` for now.
|
|
14
|
+
messageParts[0].trim().toLowerCase().split(" ").join("_"),
|
|
15
|
+
messageParts[1]
|
|
16
|
+
);
|
|
22
17
|
}
|
|
23
18
|
return new ScalewayError(status, obj);
|
|
24
19
|
}
|
|
25
20
|
}
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
export {
|
|
22
|
+
UnknownResourceMapper
|
|
23
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JSONObject } from '../../helpers/json';
|
|
2
|
+
import type { ScalewayError } from './scw-error';
|
|
3
|
+
/**
|
|
4
|
+
* Interface with static method that initialize {@link ScalewayError} from JSON.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface ScalewayErrorFromJSONInitializer {
|
|
9
|
+
fromJSON(status: number, obj: Readonly<JSONObject>): ScalewayError | null;
|
|
10
|
+
}
|