@scaleway/sdk 2.25.0 → 2.27.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 +119 -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 +65 -31
- 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 +50 -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 +79 -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 +224 -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 +300 -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 +538 -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 +117 -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 +326 -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 +475 -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 +528 -0
- package/dist/api/instance/v1/api.gen.js +763 -445
- 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 +115 -0
- package/dist/api/ipam/v1/api.gen.d.ts +57 -0
- package/dist/api/ipam/v1/api.gen.js +73 -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 +198 -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 +80 -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 +280 -0
- package/dist/api/k8s/v1/api.gen.js +324 -188
- 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 +147 -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 +90 -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 +265 -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 +626 -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 +249 -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 +156 -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 +261 -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 +181 -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 +130 -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 +54 -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 +144 -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 +389 -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 +111 -0
- package/dist/api/webhosting/v1alpha1/api.gen.js +145 -75
- 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 +92 -37
- 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 -32034
- package/dist/index.d.ts +15 -38373
- 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/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.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/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
package/dist/scw/auth.js
CHANGED
|
@@ -1,67 +1,28 @@
|
|
|
1
|
-
import { addAsyncHeaderInterceptor, addHeaderInterceptor } from
|
|
2
|
-
import { assertValidAuthenticationSecrets } from
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
* Authenticates with a session token.
|
|
8
|
-
*
|
|
9
|
-
* @param getToken - The token accessor
|
|
10
|
-
* @returns The request interceptor
|
|
11
|
-
*
|
|
12
|
-
* @deprecated Please use addAsyncHeaderInterceptor instead.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
const authenticateWithSessionToken = getToken => addAsyncHeaderInterceptor(SESSION_HEADER_KEY, getToken);
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Authenticates with a secrets.
|
|
20
|
-
*
|
|
21
|
-
* @param getToken - The secrets
|
|
22
|
-
* @returns The request interceptor
|
|
23
|
-
*
|
|
24
|
-
* @throws Error
|
|
25
|
-
* Thrown if the secrets are invalid.
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
const authenticateWithSecrets = secrets => {
|
|
1
|
+
import { addAsyncHeaderInterceptor, addHeaderInterceptor } from "../internal/interceptors/helpers.js";
|
|
2
|
+
import { assertValidAuthenticationSecrets } from "./client-ini-profile.js";
|
|
3
|
+
const SESSION_HEADER_KEY = "x-session-token";
|
|
4
|
+
const AUTH_HEADER_KEY = "x-auth-token";
|
|
5
|
+
const authenticateWithSessionToken = (getToken) => addAsyncHeaderInterceptor(SESSION_HEADER_KEY, getToken);
|
|
6
|
+
const authenticateWithSecrets = (secrets) => {
|
|
30
7
|
assertValidAuthenticationSecrets(secrets);
|
|
31
8
|
return addHeaderInterceptor(AUTH_HEADER_KEY, secrets.secretKey);
|
|
32
9
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Obfuscates an UUID.
|
|
46
|
-
*
|
|
47
|
-
* @param key - The UUID
|
|
48
|
-
* @returns The obfuscated UUID
|
|
49
|
-
*
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
52
|
-
const obfuscateUUID = key => `${key.substring(0, 8)}-xxxx-xxxx-xxxx-xxxxxxxxxxxx`;
|
|
53
|
-
/**
|
|
54
|
-
* Obfuscates headers entry.
|
|
55
|
-
*
|
|
56
|
-
* @param array - The header entry
|
|
57
|
-
* @returns The obfuscated entry
|
|
58
|
-
*
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
61
|
-
const obfuscateAuthHeadersEntry = ([name, value]) => {
|
|
62
|
-
if (name === SESSION_HEADER_KEY) return [name, obfuscateToken(value)];
|
|
63
|
-
if (name === AUTH_HEADER_KEY) return [name, obfuscateUUID(value)];
|
|
10
|
+
const obfuscateToken = (key) => `${key.substring(0, 5)}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`;
|
|
11
|
+
const obfuscateUUID = (key) => `${key.substring(0, 8)}-xxxx-xxxx-xxxx-xxxxxxxxxxxx`;
|
|
12
|
+
const obfuscateAuthHeadersEntry = ([
|
|
13
|
+
name,
|
|
14
|
+
value
|
|
15
|
+
]) => {
|
|
16
|
+
if (name === SESSION_HEADER_KEY)
|
|
17
|
+
return [name, obfuscateToken(value)];
|
|
18
|
+
if (name === AUTH_HEADER_KEY)
|
|
19
|
+
return [name, obfuscateUUID(value)];
|
|
64
20
|
return [name, value];
|
|
65
21
|
};
|
|
66
|
-
|
|
67
|
-
|
|
22
|
+
export {
|
|
23
|
+
authenticateWithSecrets,
|
|
24
|
+
authenticateWithSessionToken,
|
|
25
|
+
obfuscateAuthHeadersEntry,
|
|
26
|
+
obfuscateToken,
|
|
27
|
+
obfuscateUUID
|
|
28
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const auth = require("./auth.cjs");
|
|
4
|
+
const clientIniProfile = require("./client-ini-profile.cjs");
|
|
5
|
+
const withProfile = (profile) => (settings) => {
|
|
6
|
+
const newSettings = { ...settings };
|
|
7
|
+
if (profile.apiURL) {
|
|
8
|
+
newSettings.apiURL = profile.apiURL;
|
|
9
|
+
}
|
|
10
|
+
if (profile.defaultOrganizationId) {
|
|
11
|
+
newSettings.defaultOrganizationId = profile.defaultOrganizationId;
|
|
12
|
+
}
|
|
13
|
+
if (profile.defaultProjectId) {
|
|
14
|
+
newSettings.defaultProjectId = profile.defaultProjectId;
|
|
15
|
+
}
|
|
16
|
+
if (profile.defaultRegion) {
|
|
17
|
+
newSettings.defaultRegion = profile.defaultRegion;
|
|
18
|
+
}
|
|
19
|
+
if (profile.defaultZone) {
|
|
20
|
+
newSettings.defaultZone = profile.defaultZone;
|
|
21
|
+
}
|
|
22
|
+
if (clientIniProfile.hasAuthenticationSecrets(profile)) {
|
|
23
|
+
newSettings.interceptors = [
|
|
24
|
+
{
|
|
25
|
+
request: auth.authenticateWithSecrets(profile)
|
|
26
|
+
},
|
|
27
|
+
...newSettings.interceptors
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
return newSettings;
|
|
31
|
+
};
|
|
32
|
+
const withHTTPClient = (httpClient) => (settings) => ({ ...settings, httpClient });
|
|
33
|
+
const withDefaultPageSize = (defaultPageSize) => (settings) => ({ ...settings, defaultPageSize });
|
|
34
|
+
const withUserAgent = (userAgent) => (settings) => ({ ...settings, userAgent });
|
|
35
|
+
const withUserAgentSuffix = (userAgent) => (settings) => ({
|
|
36
|
+
...settings,
|
|
37
|
+
userAgent: settings.userAgent ? `${settings.userAgent} ${userAgent}` : userAgent
|
|
38
|
+
});
|
|
39
|
+
const withAdditionalInterceptors = (interceptors) => (settings) => ({
|
|
40
|
+
...settings,
|
|
41
|
+
interceptors: settings.interceptors.concat(interceptors)
|
|
42
|
+
});
|
|
43
|
+
const withLegacyInterceptors = () => (settings) => {
|
|
44
|
+
if (!settings.requestInterceptors && !settings.responseInterceptors) {
|
|
45
|
+
return settings;
|
|
46
|
+
}
|
|
47
|
+
const allInterceptors = settings.interceptors.concat(
|
|
48
|
+
(settings.requestInterceptors ?? []).map((obj) => ({
|
|
49
|
+
request: obj
|
|
50
|
+
})),
|
|
51
|
+
(settings.responseInterceptors ?? []).map((obj) => ({
|
|
52
|
+
response: obj
|
|
53
|
+
}))
|
|
54
|
+
);
|
|
55
|
+
return {
|
|
56
|
+
...settings,
|
|
57
|
+
interceptors: allInterceptors
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
exports.withAdditionalInterceptors = withAdditionalInterceptors;
|
|
61
|
+
exports.withDefaultPageSize = withDefaultPageSize;
|
|
62
|
+
exports.withHTTPClient = withHTTPClient;
|
|
63
|
+
exports.withLegacyInterceptors = withLegacyInterceptors;
|
|
64
|
+
exports.withProfile = withProfile;
|
|
65
|
+
exports.withUserAgent = withUserAgent;
|
|
66
|
+
exports.withUserAgentSuffix = withUserAgentSuffix;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { NetworkInterceptors } from '../index';
|
|
2
|
+
import type { Profile } from './client-ini-profile';
|
|
3
|
+
import type { Settings } from './client-settings';
|
|
4
|
+
/**
|
|
5
|
+
* A factory to build {@link Settings}.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type ClientConfig = (obj: Settings) => Settings;
|
|
10
|
+
/**
|
|
11
|
+
* Instantiates the SDK from a configuration {@link Profile}.
|
|
12
|
+
*
|
|
13
|
+
* @param profile - The profile
|
|
14
|
+
* @returns A factory {@link ClientConfig}
|
|
15
|
+
*
|
|
16
|
+
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare const withProfile: (profile: Readonly<Profile>) => (settings: Readonly<Settings>) => Settings;
|
|
21
|
+
/**
|
|
22
|
+
* Instantiates the SDK with a different HTTP client.
|
|
23
|
+
*
|
|
24
|
+
* @param httpClient - A fetch compatible HTTP client
|
|
25
|
+
* @returns A factory {@link ClientConfig}
|
|
26
|
+
*
|
|
27
|
+
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare const withHTTPClient: (httpClient: typeof fetch) => (settings: Readonly<Settings>) => Settings;
|
|
32
|
+
/**
|
|
33
|
+
* Instantiates the SDK with a default page size.
|
|
34
|
+
*
|
|
35
|
+
* @param defaultPageSize - The default page size
|
|
36
|
+
* @returns A factory {@link ClientConfig}
|
|
37
|
+
*
|
|
38
|
+
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export declare const withDefaultPageSize: (defaultPageSize: number) => ClientConfig;
|
|
43
|
+
/**
|
|
44
|
+
* Instantiates the SDK with a different default user agent.
|
|
45
|
+
*
|
|
46
|
+
* @param userAgent - The default user agent
|
|
47
|
+
* @returns A factory {@link ClientConfig}
|
|
48
|
+
*
|
|
49
|
+
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
50
|
+
*
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export declare const withUserAgent: (userAgent: string) => (settings: Readonly<Settings>) => Settings;
|
|
54
|
+
/**
|
|
55
|
+
* Instantiates the SDK with an additional user agent.
|
|
56
|
+
*
|
|
57
|
+
* @param userAgent - The suffix to append to default user agent
|
|
58
|
+
* @returns A factory {@link ClientConfig}
|
|
59
|
+
*
|
|
60
|
+
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export declare const withUserAgentSuffix: (userAgent: string) => (settings: Readonly<Settings>) => Settings;
|
|
65
|
+
/**
|
|
66
|
+
* Instantiates the SDK with additional interceptors.
|
|
67
|
+
*
|
|
68
|
+
* @param interceptors - The additional {@link NetworkInterceptors} interceptors
|
|
69
|
+
* @returns A factory {@link ClientConfig}
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* It doesn't override the existing interceptors, but instead push more to the list.
|
|
73
|
+
* This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```
|
|
77
|
+
* withAdditionalInterceptors([
|
|
78
|
+
* {
|
|
79
|
+
* request: ({ request }) => {
|
|
80
|
+
* console.log(`Do something with ${JSON.stringify(request)}`)
|
|
81
|
+
* return request
|
|
82
|
+
* },
|
|
83
|
+
* response: ({ response }) => {
|
|
84
|
+
* console.log(`Do something with ${JSON.stringify(response)}`)
|
|
85
|
+
* return response
|
|
86
|
+
* },
|
|
87
|
+
* responseError: async ({
|
|
88
|
+
* request,
|
|
89
|
+
* error,
|
|
90
|
+
* }: {
|
|
91
|
+
* request: Request
|
|
92
|
+
* error: unknown
|
|
93
|
+
* }) => {
|
|
94
|
+
* console.log(
|
|
95
|
+
* `Do something with ${JSON.stringify(request)} and ${JSON.stringify(
|
|
96
|
+
* error,
|
|
97
|
+
* )}`,
|
|
98
|
+
* )
|
|
99
|
+
* throw error // or return Promise.resolve(someData)
|
|
100
|
+
* },
|
|
101
|
+
* },
|
|
102
|
+
* ])
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export declare const withAdditionalInterceptors: (interceptors: NetworkInterceptors[]) => (settings: Readonly<Settings>) => Settings;
|
|
108
|
+
/**
|
|
109
|
+
* Instantiates the SDK with legacy interceptors.
|
|
110
|
+
*/
|
|
111
|
+
export declare const withLegacyInterceptors: () => (settings: Readonly<Settings>) => Settings;
|
|
@@ -1,26 +1,7 @@
|
|
|
1
|
-
import { authenticateWithSecrets } from
|
|
2
|
-
import { hasAuthenticationSecrets } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* A factory to build {@link Settings}.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Instantiates the SDK from a configuration {@link Profile}.
|
|
12
|
-
*
|
|
13
|
-
* @param profile - The profile
|
|
14
|
-
* @returns A factory {@link ClientConfig}
|
|
15
|
-
*
|
|
16
|
-
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
const withProfile = profile => settings => {
|
|
21
|
-
const newSettings = {
|
|
22
|
-
...settings
|
|
23
|
-
};
|
|
1
|
+
import { authenticateWithSecrets } from "./auth.js";
|
|
2
|
+
import { hasAuthenticationSecrets } from "./client-ini-profile.js";
|
|
3
|
+
const withProfile = (profile) => (settings) => {
|
|
4
|
+
const newSettings = { ...settings };
|
|
24
5
|
if (profile.apiURL) {
|
|
25
6
|
newSettings.apiURL = profile.apiURL;
|
|
26
7
|
}
|
|
@@ -37,138 +18,49 @@ const withProfile = profile => settings => {
|
|
|
37
18
|
newSettings.defaultZone = profile.defaultZone;
|
|
38
19
|
}
|
|
39
20
|
if (hasAuthenticationSecrets(profile)) {
|
|
40
|
-
newSettings.interceptors = [
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
newSettings.interceptors = [
|
|
22
|
+
{
|
|
23
|
+
request: authenticateWithSecrets(profile)
|
|
24
|
+
},
|
|
25
|
+
...newSettings.interceptors
|
|
26
|
+
];
|
|
43
27
|
}
|
|
44
28
|
return newSettings;
|
|
45
29
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* @param httpClient - A fetch compatible HTTP client
|
|
51
|
-
* @returns A factory {@link ClientConfig}
|
|
52
|
-
*
|
|
53
|
-
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
54
|
-
*
|
|
55
|
-
* @public
|
|
56
|
-
*/
|
|
57
|
-
const withHTTPClient = httpClient => settings => ({
|
|
58
|
-
...settings,
|
|
59
|
-
httpClient
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Instantiates the SDK with a default page size.
|
|
64
|
-
*
|
|
65
|
-
* @param defaultPageSize - The default page size
|
|
66
|
-
* @returns A factory {@link ClientConfig}
|
|
67
|
-
*
|
|
68
|
-
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
69
|
-
*
|
|
70
|
-
* @public
|
|
71
|
-
*/
|
|
72
|
-
const withDefaultPageSize = defaultPageSize => settings => ({
|
|
73
|
-
...settings,
|
|
74
|
-
defaultPageSize
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Instantiates the SDK with a different default user agent.
|
|
79
|
-
*
|
|
80
|
-
* @param userAgent - The default user agent
|
|
81
|
-
* @returns A factory {@link ClientConfig}
|
|
82
|
-
*
|
|
83
|
-
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
84
|
-
*
|
|
85
|
-
* @public
|
|
86
|
-
*/
|
|
87
|
-
const withUserAgent = userAgent => settings => ({
|
|
88
|
-
...settings,
|
|
89
|
-
userAgent
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Instantiates the SDK with an additional user agent.
|
|
94
|
-
*
|
|
95
|
-
* @param userAgent - The suffix to append to default user agent
|
|
96
|
-
* @returns A factory {@link ClientConfig}
|
|
97
|
-
*
|
|
98
|
-
* @remarks This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
99
|
-
*
|
|
100
|
-
* @public
|
|
101
|
-
*/
|
|
102
|
-
const withUserAgentSuffix = userAgent => settings => ({
|
|
30
|
+
const withHTTPClient = (httpClient) => (settings) => ({ ...settings, httpClient });
|
|
31
|
+
const withDefaultPageSize = (defaultPageSize) => (settings) => ({ ...settings, defaultPageSize });
|
|
32
|
+
const withUserAgent = (userAgent) => (settings) => ({ ...settings, userAgent });
|
|
33
|
+
const withUserAgentSuffix = (userAgent) => (settings) => ({
|
|
103
34
|
...settings,
|
|
104
35
|
userAgent: settings.userAgent ? `${settings.userAgent} ${userAgent}` : userAgent
|
|
105
36
|
});
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Instantiates the SDK with additional interceptors.
|
|
109
|
-
*
|
|
110
|
-
* @param interceptors - The additional {@link NetworkInterceptors} interceptors
|
|
111
|
-
* @returns A factory {@link ClientConfig}
|
|
112
|
-
*
|
|
113
|
-
* @remarks
|
|
114
|
-
* It doesn't override the existing interceptors, but instead push more to the list.
|
|
115
|
-
* This method should be used in conjunction with the initializer `createAdvancedClient`.
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* ```
|
|
119
|
-
* withAdditionalInterceptors([
|
|
120
|
-
* {
|
|
121
|
-
* request: ({ request }) => {
|
|
122
|
-
* console.log(`Do something with ${JSON.stringify(request)}`)
|
|
123
|
-
* return request
|
|
124
|
-
* },
|
|
125
|
-
* response: ({ response }) => {
|
|
126
|
-
* console.log(`Do something with ${JSON.stringify(response)}`)
|
|
127
|
-
* return response
|
|
128
|
-
* },
|
|
129
|
-
* responseError: async ({
|
|
130
|
-
* request,
|
|
131
|
-
* error,
|
|
132
|
-
* }: {
|
|
133
|
-
* request: Request
|
|
134
|
-
* error: unknown
|
|
135
|
-
* }) => {
|
|
136
|
-
* console.log(
|
|
137
|
-
* `Do something with ${JSON.stringify(request)} and ${JSON.stringify(
|
|
138
|
-
* error,
|
|
139
|
-
* )}`,
|
|
140
|
-
* )
|
|
141
|
-
* throw error // or return Promise.resolve(someData)
|
|
142
|
-
* },
|
|
143
|
-
* },
|
|
144
|
-
* ])
|
|
145
|
-
* ```
|
|
146
|
-
*
|
|
147
|
-
* @public
|
|
148
|
-
*/
|
|
149
|
-
const withAdditionalInterceptors = interceptors => settings => ({
|
|
37
|
+
const withAdditionalInterceptors = (interceptors) => (settings) => ({
|
|
150
38
|
...settings,
|
|
151
39
|
interceptors: settings.interceptors.concat(interceptors)
|
|
152
40
|
});
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Instantiates the SDK with legacy interceptors.
|
|
156
|
-
*/
|
|
157
|
-
/* eslint-disable deprecation/deprecation */
|
|
158
|
-
const withLegacyInterceptors = () => settings => {
|
|
41
|
+
const withLegacyInterceptors = () => (settings) => {
|
|
159
42
|
if (!settings.requestInterceptors && !settings.responseInterceptors) {
|
|
160
43
|
return settings;
|
|
161
44
|
}
|
|
162
|
-
const allInterceptors = settings.interceptors.concat(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
45
|
+
const allInterceptors = settings.interceptors.concat(
|
|
46
|
+
(settings.requestInterceptors ?? []).map((obj) => ({
|
|
47
|
+
request: obj
|
|
48
|
+
})),
|
|
49
|
+
(settings.responseInterceptors ?? []).map((obj) => ({
|
|
50
|
+
response: obj
|
|
51
|
+
}))
|
|
52
|
+
);
|
|
167
53
|
return {
|
|
168
54
|
...settings,
|
|
169
55
|
interceptors: allInterceptors
|
|
170
56
|
};
|
|
171
57
|
};
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
58
|
+
export {
|
|
59
|
+
withAdditionalInterceptors,
|
|
60
|
+
withDefaultPageSize,
|
|
61
|
+
withHTTPClient,
|
|
62
|
+
withLegacyInterceptors,
|
|
63
|
+
withProfile,
|
|
64
|
+
withUserAgent,
|
|
65
|
+
withUserAgentSuffix
|
|
66
|
+
};
|
|
@@ -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 hasAuthenticationSecrets = (obj) => typeof obj.accessKey === "string" && obj.accessKey !== "" && typeof obj.secretKey === "string" && obj.secretKey !== "";
|
|
5
|
+
function assertValidAuthenticationSecrets(obj) {
|
|
6
|
+
if (!(obj.accessKey && obj.secretKey)) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
if (!stringValidation.isAccessKey(obj.accessKey)) {
|
|
12
|
+
throw new Error(
|
|
13
|
+
`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
if (!stringValidation.isSecretKey(obj.secretKey)) {
|
|
17
|
+
throw new Error(
|
|
18
|
+
`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.assertValidAuthenticationSecrets = assertValidAuthenticationSecrets;
|
|
23
|
+
exports.hasAuthenticationSecrets = hasAuthenticationSecrets;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Region, Zone } from './locality';
|
|
2
|
+
/**
|
|
3
|
+
* Holds access key and secret key.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface AuthenticationSecrets {
|
|
8
|
+
/**
|
|
9
|
+
* You need an access key and a secret key to connect to Scaleway API.
|
|
10
|
+
* Generate your access key at the following address: {@link https://console.scaleway.com/project/credentials}.
|
|
11
|
+
*/
|
|
12
|
+
accessKey: string;
|
|
13
|
+
/**
|
|
14
|
+
* The secret key is the value that can be used to authenticate against the API (the value used in X-Auth-Token HTTP-header).
|
|
15
|
+
* The secret key MUST remain secret and not given to anyone or published online.
|
|
16
|
+
* Generate your secret key at the following address: {@link https://console.scaleway.com/project/credentials}.
|
|
17
|
+
*/
|
|
18
|
+
secretKey: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Holds default values of a Scaleway profile.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export interface ProfileDefaultValues {
|
|
26
|
+
/**
|
|
27
|
+
* APIURL overrides the API URL of the Scaleway API to the given URL.
|
|
28
|
+
* Change that if you want to direct requests to a different endpoint.
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue `https://api.scaleway.com`
|
|
31
|
+
*/
|
|
32
|
+
apiURL: string;
|
|
33
|
+
/**
|
|
34
|
+
* Your organization ID is the identifier of your account inside Scaleway infrastructure.
|
|
35
|
+
*/
|
|
36
|
+
defaultOrganizationId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Your project ID is the identifier of the project your resources are attached to.
|
|
39
|
+
*/
|
|
40
|
+
defaultProjectId?: string;
|
|
41
|
+
/**
|
|
42
|
+
* A region is represented as a geographical area such as France (Paris) or the Netherlands (Amsterdam).
|
|
43
|
+
* It can contain multiple availability zones.
|
|
44
|
+
*
|
|
45
|
+
* Examples: fr-par, nl-ams.
|
|
46
|
+
*/
|
|
47
|
+
defaultRegion?: Region;
|
|
48
|
+
/**
|
|
49
|
+
* A region can be split into many availability zones (AZ).
|
|
50
|
+
* Latency between multiple AZ of the same region are low as they have a common network layer.
|
|
51
|
+
*
|
|
52
|
+
* Examples: fr-par-1, nl-ams-1
|
|
53
|
+
*/
|
|
54
|
+
defaultZone?: Zone;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Holds values of a Scaleway profile.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export type Profile = Partial<ProfileDefaultValues & AuthenticationSecrets>;
|
|
62
|
+
/**
|
|
63
|
+
* Verifies that the payload contains both the accessKey and the secretKey.
|
|
64
|
+
*
|
|
65
|
+
* @param obj - The secrets
|
|
66
|
+
* @returns Whether the secrets are not empty.
|
|
67
|
+
*
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export declare const hasAuthenticationSecrets: (obj: Partial<AuthenticationSecrets>) => obj is AuthenticationSecrets;
|
|
71
|
+
/**
|
|
72
|
+
* Asserts the format of secrets.
|
|
73
|
+
*
|
|
74
|
+
* @param obj - The secrets
|
|
75
|
+
* @returns Whether the secrets use a valid format
|
|
76
|
+
*
|
|
77
|
+
* @throws Error
|
|
78
|
+
* Thrown if either the accessKey or the secretKey has en invalid format.
|
|
79
|
+
*
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
export declare function assertValidAuthenticationSecrets(obj: Partial<AuthenticationSecrets>): asserts obj is AuthenticationSecrets;
|
|
@@ -1,54 +1,23 @@
|
|
|
1
|
-
import { isAccessKey, isSecretKey } from
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Holds access key and secret key.
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Holds default values of a Scaleway profile.
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Holds values of a Scaleway profile.
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Verifies that the payload contains both the accessKey and the secretKey.
|
|
23
|
-
*
|
|
24
|
-
* @param obj - The secrets
|
|
25
|
-
* @returns Whether the secrets are not empty.
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
const hasAuthenticationSecrets = obj => typeof obj.accessKey === 'string' && obj.accessKey !== '' && typeof obj.secretKey === 'string' && obj.secretKey !== '';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Asserts the format of secrets.
|
|
33
|
-
*
|
|
34
|
-
* @param obj - The secrets
|
|
35
|
-
* @returns Whether the secrets use a valid format
|
|
36
|
-
*
|
|
37
|
-
* @throws Error
|
|
38
|
-
* Thrown if either the accessKey or the secretKey has en invalid format.
|
|
39
|
-
*
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
1
|
+
import { isAccessKey, isSecretKey } from "../internal/validations/string-validation.js";
|
|
2
|
+
const hasAuthenticationSecrets = (obj) => typeof obj.accessKey === "string" && obj.accessKey !== "" && typeof obj.secretKey === "string" && obj.secretKey !== "";
|
|
42
3
|
function assertValidAuthenticationSecrets(obj) {
|
|
43
4
|
if (!(obj.accessKey && obj.secretKey)) {
|
|
44
|
-
throw new Error(
|
|
5
|
+
throw new Error(
|
|
6
|
+
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`
|
|
7
|
+
);
|
|
45
8
|
}
|
|
46
9
|
if (!isAccessKey(obj.accessKey)) {
|
|
47
|
-
throw new Error(
|
|
10
|
+
throw new Error(
|
|
11
|
+
`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`
|
|
12
|
+
);
|
|
48
13
|
}
|
|
49
14
|
if (!isSecretKey(obj.secretKey)) {
|
|
50
|
-
throw new Error(
|
|
15
|
+
throw new Error(
|
|
16
|
+
`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`
|
|
17
|
+
);
|
|
51
18
|
}
|
|
52
19
|
}
|
|
53
|
-
|
|
54
|
-
|
|
20
|
+
export {
|
|
21
|
+
assertValidAuthenticationSecrets,
|
|
22
|
+
hasAuthenticationSecrets
|
|
23
|
+
};
|