@scaleway/sdk 2.71.1 → 2.72.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.gen.d.ts +2 -2
- package/dist/api/account/v2/api.gen.cjs +5 -4
- package/dist/api/account/v2/api.gen.d.ts +1 -1
- package/dist/api/account/v2/api.gen.js +5 -4
- package/dist/api/account/v2/marshalling.gen.cjs +4 -3
- package/dist/api/account/v2/marshalling.gen.d.ts +1 -1
- package/dist/api/account/v2/marshalling.gen.js +4 -3
- package/dist/api/account/v3/api.gen.cjs +5 -4
- package/dist/api/account/v3/api.gen.d.ts +1 -1
- package/dist/api/account/v3/api.gen.js +5 -4
- package/dist/api/account/v3/index.gen.d.ts +1 -1
- package/dist/api/account/v3/marshalling.gen.cjs +4 -3
- package/dist/api/account/v3/marshalling.gen.d.ts +1 -1
- package/dist/api/account/v3/marshalling.gen.js +4 -3
- package/dist/api/applesilicon/index.gen.d.ts +2 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +6 -5
- package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/audit_trail/index.gen.d.ts +2 -2
- package/dist/api/audit_trail/v1alpha1/api.gen.cjs +4 -3
- package/dist/api/audit_trail/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/audit_trail/v1alpha1/api.gen.js +4 -3
- package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/baremetal/index.gen.d.ts +2 -2
- package/dist/api/baremetal/v1/api.gen.cjs +6 -5
- package/dist/api/baremetal/v1/api.gen.d.ts +2 -2
- package/dist/api/baremetal/v1/api.gen.js +6 -5
- package/dist/api/baremetal/v1/api.utils.cjs +3 -1
- package/dist/api/baremetal/v1/api.utils.d.ts +1 -1
- package/dist/api/baremetal/v1/api.utils.js +3 -1
- package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
- package/dist/api/baremetal/v1/marshalling.gen.cjs +4 -3
- package/dist/api/baremetal/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +4 -3
- package/dist/api/baremetal/v1/types.gen.d.ts +65 -65
- package/dist/api/baremetal/v3/api.gen.cjs +5 -4
- package/dist/api/baremetal/v3/api.gen.d.ts +2 -2
- package/dist/api/baremetal/v3/api.gen.js +5 -4
- package/dist/api/baremetal/v3/marshalling.gen.cjs +4 -3
- package/dist/api/baremetal/v3/marshalling.gen.d.ts +1 -1
- package/dist/api/baremetal/v3/marshalling.gen.js +4 -3
- package/dist/api/baremetal/v3/types.gen.d.ts +1 -1
- package/dist/api/billing/index.gen.d.ts +2 -2
- package/dist/api/billing/v2alpha1/api.gen.cjs +5 -4
- package/dist/api/billing/v2alpha1/api.gen.d.ts +1 -1
- package/dist/api/billing/v2alpha1/api.gen.js +5 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/billing/v2alpha1/marshalling.gen.js +4 -3
- package/dist/api/billing/v2alpha1/types.gen.d.ts +1 -1
- package/dist/api/billing/v2beta1/api.gen.cjs +5 -4
- package/dist/api/billing/v2beta1/api.gen.d.ts +1 -1
- package/dist/api/billing/v2beta1/api.gen.js +5 -4
- package/dist/api/billing/v2beta1/marshalling.gen.cjs +4 -3
- package/dist/api/billing/v2beta1/marshalling.gen.js +4 -3
- package/dist/api/billing/v2beta1/types.gen.d.ts +1 -1
- package/dist/api/block/index.gen.d.ts +2 -2
- package/dist/api/block/v1/api.gen.cjs +6 -5
- package/dist/api/block/v1/api.gen.d.ts +2 -2
- package/dist/api/block/v1/api.gen.js +6 -5
- package/dist/api/block/v1/marshalling.gen.cjs +4 -3
- package/dist/api/block/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/block/v1/marshalling.gen.js +4 -3
- package/dist/api/block/v1/types.gen.d.ts +1 -1
- package/dist/api/block/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/block/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/block/v1alpha1/api.gen.js +6 -5
- package/dist/api/block/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/block/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/block/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/block/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/cockpit/index.gen.d.ts +2 -2
- package/dist/api/cockpit/v1/api.gen.cjs +5 -4
- package/dist/api/cockpit/v1/api.gen.d.ts +2 -2
- package/dist/api/cockpit/v1/api.gen.js +5 -4
- package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.cjs +4 -3
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.js +4 -3
- package/dist/api/cockpit/v1/types.gen.d.ts +1 -1
- package/dist/api/cockpit/v1beta1/api.gen.cjs +6 -5
- package/dist/api/cockpit/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/cockpit/v1beta1/api.gen.js +6 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/cockpit/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/cockpit/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/container/index.gen.d.ts +2 -2
- package/dist/api/container/v1beta1/api.gen.cjs +6 -5
- package/dist/api/container/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/container/v1beta1/api.gen.js +6 -5
- package/dist/api/container/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/container/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/container/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/dedibox/index.gen.d.ts +2 -2
- package/dist/api/dedibox/v1/api.gen.cjs +6 -5
- package/dist/api/dedibox/v1/api.gen.d.ts +2 -2
- package/dist/api/dedibox/v1/api.gen.js +6 -5
- package/dist/api/dedibox/v1/marshalling.gen.cjs +4 -3
- package/dist/api/dedibox/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/dedibox/v1/marshalling.gen.js +4 -3
- package/dist/api/dedibox/v1/types.gen.d.ts +1 -1
- package/dist/api/document_db/index.gen.d.ts +2 -2
- package/dist/api/document_db/v1beta1/api.gen.cjs +6 -5
- package/dist/api/document_db/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/document_db/v1beta1/api.gen.js +6 -5
- package/dist/api/document_db/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/document_db/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/document_db/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/document_db/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/domain/index.gen.d.ts +2 -2
- package/dist/api/domain/v2beta1/api.gen.cjs +6 -5
- package/dist/api/domain/v2beta1/api.gen.d.ts +2 -2
- package/dist/api/domain/v2beta1/api.gen.js +6 -5
- package/dist/api/domain/v2beta1/index.gen.d.ts +1 -1
- package/dist/api/domain/v2beta1/marshalling.gen.cjs +4 -3
- package/dist/api/domain/v2beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/domain/v2beta1/marshalling.gen.js +4 -3
- package/dist/api/domain/v2beta1/types.gen.d.ts +1 -1
- package/dist/api/edge_services/index.gen.d.ts +2 -2
- package/dist/api/edge_services/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/edge_services/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/edge_services/v1alpha1/api.gen.js +6 -5
- package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/edge_services/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/edge_services/v1beta1/api.gen.cjs +49 -136
- package/dist/api/edge_services/v1beta1/api.gen.d.ts +48 -134
- package/dist/api/edge_services/v1beta1/api.gen.js +49 -136
- package/dist/api/edge_services/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/edge_services/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/edge_services/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/edge_services/v1beta1/types.gen.d.ts +584 -380
- package/dist/api/flexibleip/index.gen.d.ts +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/flexibleip/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -5
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/flexibleip/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/function/index.gen.d.ts +2 -2
- package/dist/api/function/v1beta1/api.gen.cjs +20 -33
- package/dist/api/function/v1beta1/api.gen.d.ts +18 -32
- package/dist/api/function/v1beta1/api.gen.js +20 -33
- package/dist/api/function/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/function/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/function/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/function/v1beta1/types.gen.d.ts +617 -288
- package/dist/api/iam/index.gen.d.ts +2 -2
- package/dist/api/iam/v1alpha1/api.gen.cjs +49 -163
- package/dist/api/iam/v1alpha1/api.gen.d.ts +47 -163
- package/dist/api/iam/v1alpha1/api.gen.js +49 -163
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/iam/v1alpha1/types.gen.d.ts +979 -372
- package/dist/api/index.gen.d.ts +2 -2
- package/dist/api/inference/index.gen.d.ts +2 -2
- package/dist/api/inference/v1/api.gen.cjs +6 -5
- package/dist/api/inference/v1/api.gen.d.ts +2 -2
- package/dist/api/inference/v1/api.gen.js +6 -5
- package/dist/api/inference/v1/marshalling.gen.cjs +4 -3
- package/dist/api/inference/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/inference/v1/marshalling.gen.js +4 -3
- package/dist/api/inference/v1/types.gen.d.ts +1 -1
- package/dist/api/inference/v1beta1/api.gen.cjs +6 -5
- package/dist/api/inference/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/inference/v1beta1/api.gen.js +6 -5
- package/dist/api/inference/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/inference/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/inference/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/inference/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/instance/index.gen.d.ts +2 -2
- package/dist/api/instance/v1/api.gen.cjs +5 -4
- package/dist/api/instance/v1/api.gen.d.ts +2 -2
- package/dist/api/instance/v1/api.gen.js +5 -4
- package/dist/api/instance/v1/api.utils.cjs +4 -3
- package/dist/api/instance/v1/api.utils.d.ts +1 -1
- package/dist/api/instance/v1/api.utils.js +4 -3
- package/dist/api/instance/v1/marshalling.gen.cjs +4 -3
- package/dist/api/instance/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +4 -3
- package/dist/api/instance/v1/marshalling.utils.d.ts +1 -1
- package/dist/api/instance/v1/types.gen.d.ts +1 -1
- package/dist/api/instance/v1/types.private.gen.d.ts +1 -1
- package/dist/api/instance/v1/types.utils.d.ts +1 -1
- package/dist/api/interlink/index.gen.d.ts +2 -2
- package/dist/api/interlink/v1beta1/api.gen.cjs +101 -11
- package/dist/api/interlink/v1beta1/api.gen.d.ts +50 -10
- package/dist/api/interlink/v1beta1/api.gen.js +102 -12
- package/dist/api/interlink/v1beta1/content.gen.cjs +6 -0
- package/dist/api/interlink/v1beta1/content.gen.d.ts +5 -0
- package/dist/api/interlink/v1beta1/content.gen.js +6 -0
- package/dist/api/interlink/v1beta1/index.gen.cjs +3 -0
- package/dist/api/interlink/v1beta1/index.gen.d.ts +2 -1
- package/dist/api/interlink/v1beta1/index.gen.js +3 -0
- package/dist/api/interlink/v1beta1/marshalling.gen.cjs +82 -8
- package/dist/api/interlink/v1beta1/marshalling.gen.d.ts +4 -2
- package/dist/api/interlink/v1beta1/marshalling.gen.js +82 -8
- package/dist/api/interlink/v1beta1/types.gen.d.ts +145 -43
- package/dist/api/interlink/v1beta1/validation-rules.gen.cjs +17 -0
- package/dist/api/interlink/v1beta1/validation-rules.gen.d.ts +15 -0
- package/dist/api/interlink/v1beta1/validation-rules.gen.js +17 -0
- package/dist/api/iot/index.gen.d.ts +2 -2
- package/dist/api/iot/v1/api.gen.cjs +6 -5
- package/dist/api/iot/v1/api.gen.d.ts +2 -2
- package/dist/api/iot/v1/api.gen.js +6 -5
- package/dist/api/iot/v1/marshalling.gen.cjs +4 -3
- package/dist/api/iot/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/iot/v1/marshalling.gen.js +4 -3
- package/dist/api/iot/v1/types.gen.d.ts +1 -1
- package/dist/api/ipam/index.gen.d.ts +2 -2
- package/dist/api/ipam/v1/api.gen.cjs +5 -4
- package/dist/api/ipam/v1/api.gen.d.ts +2 -2
- package/dist/api/ipam/v1/api.gen.js +5 -4
- package/dist/api/ipam/v1/marshalling.gen.cjs +4 -3
- package/dist/api/ipam/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/ipam/v1/marshalling.gen.js +4 -3
- package/dist/api/ipam/v1/types.gen.d.ts +1 -1
- package/dist/api/ipfs/index.gen.d.ts +2 -2
- package/dist/api/ipfs/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/ipfs/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/ipfs/v1alpha1/api.gen.js +6 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/ipfs/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/ipfs/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/jobs/index.gen.d.ts +2 -2
- package/dist/api/jobs/v1alpha1/api.gen.cjs +5 -4
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/jobs/v1alpha1/api.gen.js +5 -4
- package/dist/api/jobs/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/jobs/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/k8s/index.gen.d.ts +2 -2
- package/dist/api/k8s/v1/api.gen.cjs +6 -5
- package/dist/api/k8s/v1/api.gen.d.ts +2 -2
- package/dist/api/k8s/v1/api.gen.js +6 -5
- package/dist/api/k8s/v1/marshalling.gen.cjs +4 -3
- package/dist/api/k8s/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/k8s/v1/marshalling.gen.js +4 -3
- package/dist/api/k8s/v1/types.gen.d.ts +1 -1
- package/dist/api/key_manager/index.gen.d.ts +2 -2
- package/dist/api/key_manager/v1alpha1/api.gen.cjs +5 -4
- package/dist/api/key_manager/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/key_manager/v1alpha1/api.gen.js +5 -4
- package/dist/api/key_manager/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/key_manager/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/key_manager/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/key_manager/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/lb/index.gen.d.ts +2 -2
- package/dist/api/lb/v1/api.gen.cjs +68 -178
- package/dist/api/lb/v1/api.gen.d.ts +60 -176
- package/dist/api/lb/v1/api.gen.js +69 -179
- package/dist/api/lb/v1/api.utils.cjs +3 -1
- package/dist/api/lb/v1/api.utils.d.ts +1 -1
- package/dist/api/lb/v1/api.utils.js +3 -1
- package/dist/api/lb/v1/index.gen.d.ts +1 -1
- package/dist/api/lb/v1/marshalling.gen.cjs +9 -3
- package/dist/api/lb/v1/marshalling.gen.d.ts +3 -2
- package/dist/api/lb/v1/marshalling.gen.js +9 -3
- package/dist/api/lb/v1/types.gen.d.ts +1835 -1117
- package/dist/api/lb/v1/types.utils.d.ts +1 -1
- package/dist/api/llm_inference/index.gen.d.ts +2 -2
- package/dist/api/llm_inference/v1beta1/api.gen.cjs +6 -5
- package/dist/api/llm_inference/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/llm_inference/v1beta1/api.gen.js +6 -5
- package/dist/api/llm_inference/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/llm_inference/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/llm_inference/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/llm_inference/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/marketplace/index.gen.d.ts +2 -2
- package/dist/api/marketplace/v2/api.gen.cjs +5 -4
- package/dist/api/marketplace/v2/api.gen.d.ts +1 -1
- package/dist/api/marketplace/v2/api.gen.js +5 -4
- package/dist/api/marketplace/v2/marshalling.gen.cjs +4 -3
- package/dist/api/marketplace/v2/marshalling.gen.js +4 -3
- package/dist/api/marketplace/v2/types.gen.d.ts +1 -1
- package/dist/api/mnq/index.gen.d.ts +2 -2
- package/dist/api/mnq/v1beta1/api.gen.cjs +5 -4
- package/dist/api/mnq/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/mnq/v1beta1/api.gen.js +5 -4
- package/dist/api/mnq/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/mnq/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/mnq/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/mnq/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/mnq/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/mongodb/index.gen.d.ts +2 -2
- package/dist/api/mongodb/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/mongodb/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/mongodb/v1alpha1/api.gen.js +6 -5
- package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/qaas/index.gen.d.ts +2 -2
- package/dist/api/qaas/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/qaas/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/qaas/v1alpha1/api.gen.js +6 -5
- package/dist/api/qaas/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/qaas/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/qaas/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/qaas/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/rdb/index.gen.d.ts +2 -2
- package/dist/api/rdb/v1/api.gen.cjs +6 -5
- package/dist/api/rdb/v1/api.gen.d.ts +2 -2
- package/dist/api/rdb/v1/api.gen.js +6 -5
- package/dist/api/rdb/v1/marshalling.gen.cjs +4 -3
- package/dist/api/rdb/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/rdb/v1/marshalling.gen.js +4 -3
- package/dist/api/rdb/v1/types.gen.d.ts +1 -1
- package/dist/api/redis/index.gen.d.ts +2 -2
- package/dist/api/redis/v1/api.gen.cjs +6 -5
- package/dist/api/redis/v1/api.gen.d.ts +2 -2
- package/dist/api/redis/v1/api.gen.js +6 -5
- package/dist/api/redis/v1/marshalling.gen.cjs +4 -3
- package/dist/api/redis/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/redis/v1/marshalling.gen.js +4 -3
- package/dist/api/redis/v1/types.gen.d.ts +1 -1
- package/dist/api/registry/index.gen.d.ts +2 -2
- package/dist/api/registry/v1/api.gen.cjs +6 -5
- package/dist/api/registry/v1/api.gen.d.ts +2 -2
- package/dist/api/registry/v1/api.gen.js +6 -5
- package/dist/api/registry/v1/marshalling.gen.cjs +4 -3
- package/dist/api/registry/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/registry/v1/marshalling.gen.js +4 -3
- package/dist/api/registry/v1/types.gen.d.ts +1 -1
- package/dist/api/secret/index.gen.d.ts +2 -2
- package/dist/api/secret/v1alpha1/api.gen.cjs +5 -4
- package/dist/api/secret/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/secret/v1alpha1/api.gen.js +5 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/secret/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/secret/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/secret/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/secret/v1beta1/api.gen.cjs +5 -4
- package/dist/api/secret/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/secret/v1beta1/api.gen.js +5 -4
- package/dist/api/secret/v1beta1/marshalling.gen.cjs +4 -3
- package/dist/api/secret/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/api/secret/v1beta1/marshalling.gen.js +4 -3
- package/dist/api/secret/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/serverless_sqldb/index.gen.d.ts +2 -2
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +6 -5
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/serverless_sqldb/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/tem/index.gen.d.ts +2 -2
- package/dist/api/tem/v1alpha1/api.gen.cjs +6 -5
- package/dist/api/tem/v1alpha1/api.gen.d.ts +2 -2
- package/dist/api/tem/v1alpha1/api.gen.js +6 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +4 -3
- package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +4 -3
- package/dist/api/tem/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/test/index.gen.d.ts +2 -2
- package/dist/api/test/v1/api.gen.cjs +6 -5
- package/dist/api/test/v1/api.gen.d.ts +2 -2
- package/dist/api/test/v1/api.gen.js +6 -5
- package/dist/api/test/v1/marshalling.gen.cjs +4 -3
- package/dist/api/test/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/test/v1/marshalling.gen.js +4 -3
- package/dist/api/vpc/index.gen.d.ts +2 -2
- package/dist/api/vpc/v1/api.gen.cjs +5 -4
- package/dist/api/vpc/v1/api.gen.d.ts +2 -2
- package/dist/api/vpc/v1/api.gen.js +5 -4
- package/dist/api/vpc/v1/marshalling.gen.cjs +4 -3
- package/dist/api/vpc/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/vpc/v1/marshalling.gen.js +4 -3
- package/dist/api/vpc/v1/types.gen.d.ts +1 -1
- package/dist/api/vpc/v2/api.gen.cjs +18 -53
- package/dist/api/vpc/v2/api.gen.d.ts +18 -45
- package/dist/api/vpc/v2/api.gen.js +19 -54
- package/dist/api/vpc/v2/index.gen.d.ts +1 -1
- package/dist/api/vpc/v2/marshalling.gen.cjs +4 -18
- package/dist/api/vpc/v2/marshalling.gen.d.ts +2 -4
- package/dist/api/vpc/v2/marshalling.gen.js +4 -18
- package/dist/api/vpc/v2/types.gen.d.ts +333 -200
- package/dist/api/vpcgw/index.gen.d.ts +2 -2
- package/dist/api/vpcgw/v1/api.gen.cjs +42 -140
- package/dist/api/vpcgw/v1/api.gen.d.ts +40 -139
- package/dist/api/vpcgw/v1/api.gen.js +42 -140
- package/dist/api/vpcgw/v1/marshalling.gen.cjs +4 -3
- package/dist/api/vpcgw/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/vpcgw/v1/marshalling.gen.js +4 -3
- package/dist/api/vpcgw/v1/types.gen.d.ts +784 -366
- package/dist/api/vpcgw/v2/api.gen.cjs +33 -93
- package/dist/api/vpcgw/v2/api.gen.d.ts +31 -92
- package/dist/api/vpcgw/v2/api.gen.js +33 -93
- package/dist/api/vpcgw/v2/marshalling.gen.cjs +4 -3
- package/dist/api/vpcgw/v2/marshalling.gen.d.ts +1 -1
- package/dist/api/vpcgw/v2/marshalling.gen.js +4 -3
- package/dist/api/vpcgw/v2/types.gen.d.ts +546 -197
- package/dist/api/webhosting/index.gen.d.ts +2 -2
- package/dist/api/webhosting/v1/api.gen.cjs +28 -55
- package/dist/api/webhosting/v1/api.gen.d.ts +40 -71
- package/dist/api/webhosting/v1/api.gen.js +28 -55
- package/dist/api/webhosting/v1/marshalling.gen.cjs +4 -3
- package/dist/api/webhosting/v1/marshalling.gen.d.ts +1 -1
- package/dist/api/webhosting/v1/marshalling.gen.js +4 -3
- package/dist/api/webhosting/v1/types.gen.d.ts +700 -351
- package/dist/client/dist/helpers/is-browser.cjs +4 -0
- package/dist/client/dist/helpers/is-browser.js +4 -0
- package/dist/{package.json.cjs → client/dist/package.json.cjs} +7 -16
- package/dist/{package.json.js → client/dist/package.json.js} +7 -16
- package/dist/client/dist/scw/constants.cjs +7 -0
- package/dist/{vendor → client/dist/vendor}/base64/index.cjs +8 -4
- package/dist/{vendor → client/dist/vendor}/base64/index.js +8 -4
- package/dist/index.cjs +16 -16
- package/dist/index.d.ts +1 -15
- package/dist/index.js +13 -13
- package/node_modules/@scaleway/sdk-client/LICENSE +191 -0
- package/node_modules/@scaleway/sdk-client/README.md +36 -0
- package/node_modules/@scaleway/sdk-client/dist/helpers/is-browser.cjs +4 -0
- package/node_modules/@scaleway/sdk-client/dist/helpers/is-browser.js +4 -0
- package/node_modules/@scaleway/sdk-client/dist/helpers/is-response.cjs +4 -0
- package/node_modules/@scaleway/sdk-client/dist/helpers/is-response.js +4 -0
- package/node_modules/@scaleway/sdk-client/dist/helpers/json.cjs +7 -0
- package/{dist → node_modules/@scaleway/sdk-client/dist}/helpers/json.d.ts +2 -2
- package/node_modules/@scaleway/sdk-client/dist/helpers/json.js +7 -0
- package/node_modules/@scaleway/sdk-client/dist/helpers/marshalling.cjs +76 -0
- package/node_modules/@scaleway/sdk-client/dist/helpers/marshalling.js +76 -0
- package/node_modules/@scaleway/sdk-client/dist/index.cjs +52 -0
- package/node_modules/@scaleway/sdk-client/dist/index.d.ts +15 -0
- package/node_modules/@scaleway/sdk-client/dist/index.js +52 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/async/interval-retrier.cjs +53 -0
- package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/async/interval-retrier.d.ts +2 -2
- package/node_modules/@scaleway/sdk-client/dist/internal/async/interval-retrier.js +53 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/async/sleep.cjs +6 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/async/sleep.js +6 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/interceptors/composer.cjs +25 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/interceptors/composer.js +25 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/interceptors/helpers.cjs +12 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/interceptors/helpers.js +12 -0
- package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/interceptors/types.d.ts +2 -2
- package/node_modules/@scaleway/sdk-client/dist/internal/logger/console-logger.cjs +24 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/logger/console-logger.js +24 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/logger/index.cjs +12 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/logger/index.js +12 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/logger/level-resolver.cjs +13 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/logger/level-resolver.js +13 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/validations/string-validation.cjs +30 -0
- package/node_modules/@scaleway/sdk-client/dist/internal/validations/string-validation.js +30 -0
- package/node_modules/@scaleway/sdk-client/dist/package.json.cjs +67 -0
- package/node_modules/@scaleway/sdk-client/dist/package.json.js +67 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/api.cjs +8 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/api.js +8 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/auth.cjs +26 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/auth.js +26 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/client-ini-factory.cjs +66 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/client-ini-factory.js +66 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/client-ini-profile.cjs +23 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/client-ini-profile.js +23 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/client-settings.cjs +51 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/client-settings.js +51 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/client.cjs +31 -0
- package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/client.d.ts +2 -2
- package/node_modules/@scaleway/sdk-client/dist/scw/client.js +31 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/constants.js +7 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/custom-marshalling.cjs +126 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/custom-marshalling.js +126 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/custom-types.cjs +11 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/custom-types.js +11 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/error-parser.cjs +76 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/error-parser.js +76 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/invalid-request-mapper.cjs +36 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/invalid-request-mapper.js +36 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/unknown-resource-mapper.cjs +23 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/unknown-resource-mapper.js +23 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/scw-error.cjs +43 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/scw-error.js +43 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/already-exists-error.cjs +31 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/already-exists-error.js +31 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/denied-authentication-error.cjs +37 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/denied-authentication-error.js +37 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/index.cjs +28 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/index.js +28 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/invalid-arguments-error.cjs +54 -0
- package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/invalid-arguments-error.d.ts +2 -2
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/invalid-arguments-error.js +54 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/out-of-stock-error.cjs +17 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/out-of-stock-error.js +17 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/permissions-denied-error.cjs +29 -0
- package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/permissions-denied-error.d.ts +2 -2
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/permissions-denied-error.js +29 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/precondition-failed-error.cjs +32 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/precondition-failed-error.js +32 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/quotas-exceeded-error.cjs +43 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/quotas-exceeded-error.js +43 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-expired-error.cjs +31 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-expired-error.js +31 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-locked-error.cjs +20 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-locked-error.js +20 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-not-found-error.cjs +24 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-not-found-error.js +24 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/too-many-requests-error.cjs +58 -0
- package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/too-many-requests-error.d.ts +2 -2
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/too-many-requests-error.js +58 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/transient-state-error.cjs +31 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/transient-state-error.js +31 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/types.cjs +15 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/errors/types.js +15 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/build-fetcher.cjs +60 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/build-fetcher.js +60 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/http-dumper.cjs +20 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/http-dumper.js +20 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/http-interceptors.cjs +43 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/http-interceptors.js +43 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/resource-paginator.cjs +36 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/resource-paginator.js +36 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/response-parser.cjs +55 -0
- package/node_modules/@scaleway/sdk-client/dist/scw/fetch/response-parser.js +55 -0
- package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/types.d.ts +2 -2
- package/node_modules/@scaleway/sdk-client/dist/vendor/base64/index.cjs +46 -0
- package/node_modules/@scaleway/sdk-client/dist/vendor/base64/index.js +46 -0
- package/node_modules/@scaleway/sdk-client/package.json +37 -0
- package/package.json +6 -4
- package/dist/helpers/is-browser.cjs +0 -7
- package/dist/helpers/is-browser.js +0 -7
- /package/dist/{helpers → client/dist/helpers}/is-response.cjs +0 -0
- /package/dist/{helpers → client/dist/helpers}/is-response.js +0 -0
- /package/dist/{helpers → client/dist/helpers}/json.cjs +0 -0
- /package/dist/{helpers → client/dist/helpers}/json.js +0 -0
- /package/dist/{helpers → client/dist/helpers}/marshalling.cjs +0 -0
- /package/dist/{helpers → client/dist/helpers}/marshalling.js +0 -0
- /package/dist/{internal → client/dist/internal}/async/interval-retrier.cjs +0 -0
- /package/dist/{internal → client/dist/internal}/async/interval-retrier.js +0 -0
- /package/dist/{internal → client/dist/internal}/async/sleep.cjs +0 -0
- /package/dist/{internal → client/dist/internal}/async/sleep.js +0 -0
- /package/dist/{internal → client/dist/internal}/interceptors/composer.cjs +0 -0
- /package/dist/{internal → client/dist/internal}/interceptors/composer.js +0 -0
- /package/dist/{internal → client/dist/internal}/interceptors/helpers.cjs +0 -0
- /package/dist/{internal → client/dist/internal}/interceptors/helpers.js +0 -0
- /package/dist/{internal → client/dist/internal}/logger/console-logger.cjs +0 -0
- /package/dist/{internal → client/dist/internal}/logger/console-logger.js +0 -0
- /package/dist/{internal → client/dist/internal}/logger/index.cjs +0 -0
- /package/dist/{internal → client/dist/internal}/logger/index.js +0 -0
- /package/dist/{internal → client/dist/internal}/logger/level-resolver.cjs +0 -0
- /package/dist/{internal → client/dist/internal}/logger/level-resolver.js +0 -0
- /package/dist/{internal → client/dist/internal}/validations/string-validation.cjs +0 -0
- /package/dist/{internal → client/dist/internal}/validations/string-validation.js +0 -0
- /package/dist/{scw → client/dist/scw}/api.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/api.js +0 -0
- /package/dist/{scw → client/dist/scw}/auth.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/auth.js +0 -0
- /package/dist/{scw → client/dist/scw}/client-ini-factory.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/client-ini-factory.js +0 -0
- /package/dist/{scw → client/dist/scw}/client-ini-profile.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/client-ini-profile.js +0 -0
- /package/dist/{scw → client/dist/scw}/client-settings.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/client-settings.js +0 -0
- /package/dist/{scw → client/dist/scw}/client.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/client.js +0 -0
- /package/dist/{scw → client/dist/scw}/constants.js +0 -0
- /package/dist/{scw → client/dist/scw}/custom-marshalling.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/custom-marshalling.js +0 -0
- /package/dist/{scw → client/dist/scw}/custom-types.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/custom-types.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/error-parser.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/error-parser.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/non-standard/invalid-request-mapper.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/non-standard/invalid-request-mapper.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/non-standard/unknown-resource-mapper.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/non-standard/unknown-resource-mapper.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/scw-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/scw-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/already-exists-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/already-exists-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/denied-authentication-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/denied-authentication-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/index.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/index.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/invalid-arguments-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/invalid-arguments-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/out-of-stock-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/out-of-stock-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/permissions-denied-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/permissions-denied-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/precondition-failed-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/precondition-failed-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/quotas-exceeded-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/quotas-exceeded-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/resource-expired-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/resource-expired-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/resource-locked-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/resource-locked-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/resource-not-found-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/resource-not-found-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/too-many-requests-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/too-many-requests-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/transient-state-error.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/standard/transient-state-error.js +0 -0
- /package/dist/{scw → client/dist/scw}/errors/types.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/errors/types.js +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/build-fetcher.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/build-fetcher.js +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/http-dumper.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/http-dumper.js +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/http-interceptors.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/http-interceptors.js +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/resource-paginator.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/resource-paginator.js +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/response-parser.cjs +0 -0
- /package/dist/{scw → client/dist/scw}/fetch/response-parser.js +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/bridge.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/helpers/is-browser.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/helpers/is-response.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/helpers/marshalling.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/async/sleep.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/interceptors/composer.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/interceptors/helpers.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/logger/console-logger.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/logger/index.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/logger/level-resolver.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/logger/logger.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/validations/string-validation.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/internals.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/api.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/auth.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/client-ini-factory.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/client-ini-profile.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/client-settings.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/constants.cjs +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/constants.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/custom-marshalling.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/custom-types.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/error-parser.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/non-standard/invalid-request-mapper.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/non-standard/unknown-resource-mapper.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/scw-error-from-json.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/scw-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/already-exists-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/denied-authentication-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/index.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/out-of-stock-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/precondition-failed-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/quotas-exceeded-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/resource-expired-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/resource-locked-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/resource-not-found-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/standard/transient-state-error.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/errors/types.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/build-fetcher.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/http-dumper.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/http-interceptors.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/resource-paginator.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/fetch/response-parser.d.ts +0 -0
- /package/{dist → node_modules/@scaleway/sdk-client/dist}/scw/locality.d.ts +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const name = "@scaleway/sdk-client";
|
|
2
|
+
const version = "1.1.0";
|
|
3
|
+
const license = "Apache-2.0";
|
|
4
|
+
const description = "Scaleway SDK Client";
|
|
5
|
+
const keywords = [
|
|
6
|
+
"scaleway",
|
|
7
|
+
"cloud",
|
|
8
|
+
"sdk",
|
|
9
|
+
"client"
|
|
10
|
+
];
|
|
11
|
+
const main = "dist/index.cjs";
|
|
12
|
+
const module = "dist/index.js";
|
|
13
|
+
const types = "dist/index.d.ts";
|
|
14
|
+
const scripts = {
|
|
15
|
+
typecheck: "tsc --noEmit",
|
|
16
|
+
"type:generate": "tsc --declaration -p tsconfig.build.json",
|
|
17
|
+
build: "vite build --config ../../vite.config.ts && pnpm run type:generate && tsc-alias -p tsconfig.build.json",
|
|
18
|
+
"build:profile": "npx vite-bundle-visualizer -c ../../vite.config.ts"
|
|
19
|
+
};
|
|
20
|
+
const files = [
|
|
21
|
+
"dist"
|
|
22
|
+
];
|
|
23
|
+
const publishConfig = {
|
|
24
|
+
access: "public"
|
|
25
|
+
};
|
|
26
|
+
const repository = {
|
|
27
|
+
type: "git",
|
|
28
|
+
url: "https://github.com/scaleway/scaleway-sdk-js",
|
|
29
|
+
directory: "packages/client"
|
|
30
|
+
};
|
|
31
|
+
const engines = {
|
|
32
|
+
node: ">=18.0"
|
|
33
|
+
};
|
|
34
|
+
const type = "module";
|
|
35
|
+
const pkg = {
|
|
36
|
+
name,
|
|
37
|
+
version,
|
|
38
|
+
license,
|
|
39
|
+
description,
|
|
40
|
+
keywords,
|
|
41
|
+
main,
|
|
42
|
+
module,
|
|
43
|
+
types,
|
|
44
|
+
scripts,
|
|
45
|
+
files,
|
|
46
|
+
publishConfig,
|
|
47
|
+
repository,
|
|
48
|
+
engines,
|
|
49
|
+
type
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
pkg as default,
|
|
53
|
+
description,
|
|
54
|
+
engines,
|
|
55
|
+
files,
|
|
56
|
+
keywords,
|
|
57
|
+
license,
|
|
58
|
+
main,
|
|
59
|
+
module,
|
|
60
|
+
name,
|
|
61
|
+
publishConfig,
|
|
62
|
+
repository,
|
|
63
|
+
scripts,
|
|
64
|
+
type,
|
|
65
|
+
types,
|
|
66
|
+
version
|
|
67
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const helpers = require("../internal/interceptors/helpers.cjs");
|
|
4
|
+
const clientIniProfile = require("./client-ini-profile.cjs");
|
|
5
|
+
const SESSION_HEADER_KEY = "x-session-token";
|
|
6
|
+
const AUTH_HEADER_KEY = "x-auth-token";
|
|
7
|
+
const authenticateWithSessionToken = (getToken) => helpers.addAsyncHeaderInterceptor(SESSION_HEADER_KEY, getToken);
|
|
8
|
+
const authenticateWithSecrets = (secrets) => {
|
|
9
|
+
clientIniProfile.assertValidAuthenticationSecrets(secrets);
|
|
10
|
+
return helpers.addHeaderInterceptor(AUTH_HEADER_KEY, secrets.secretKey);
|
|
11
|
+
};
|
|
12
|
+
const obfuscateToken = (key) => `${key.substring(0, 5)}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`;
|
|
13
|
+
const obfuscateUUID = (key) => `${key.substring(0, 8)}-xxxx-xxxx-xxxx-xxxxxxxxxxxx`;
|
|
14
|
+
const obfuscateAuthHeadersEntry = ([
|
|
15
|
+
name,
|
|
16
|
+
value
|
|
17
|
+
]) => {
|
|
18
|
+
if (name === SESSION_HEADER_KEY) return [name, obfuscateToken(value)];
|
|
19
|
+
if (name === AUTH_HEADER_KEY) return [name, obfuscateUUID(value)];
|
|
20
|
+
return [name, value];
|
|
21
|
+
};
|
|
22
|
+
exports.authenticateWithSecrets = authenticateWithSecrets;
|
|
23
|
+
exports.authenticateWithSessionToken = authenticateWithSessionToken;
|
|
24
|
+
exports.obfuscateAuthHeadersEntry = obfuscateAuthHeadersEntry;
|
|
25
|
+
exports.obfuscateToken = obfuscateToken;
|
|
26
|
+
exports.obfuscateUUID = obfuscateUUID;
|
|
@@ -0,0 +1,26 @@
|
|
|
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) => {
|
|
7
|
+
assertValidAuthenticationSecrets(secrets);
|
|
8
|
+
return addHeaderInterceptor(AUTH_HEADER_KEY, secrets.secretKey);
|
|
9
|
+
};
|
|
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) return [name, obfuscateToken(value)];
|
|
17
|
+
if (name === AUTH_HEADER_KEY) return [name, obfuscateUUID(value)];
|
|
18
|
+
return [name, value];
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
authenticateWithSecrets,
|
|
22
|
+
authenticateWithSessionToken,
|
|
23
|
+
obfuscateAuthHeadersEntry,
|
|
24
|
+
obfuscateToken,
|
|
25
|
+
obfuscateUUID
|
|
26
|
+
};
|
|
@@ -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,66 @@
|
|
|
1
|
+
import { authenticateWithSecrets } from "./auth.js";
|
|
2
|
+
import { hasAuthenticationSecrets } from "./client-ini-profile.js";
|
|
3
|
+
const withProfile = (profile) => (settings) => {
|
|
4
|
+
const newSettings = { ...settings };
|
|
5
|
+
if (profile.apiURL) {
|
|
6
|
+
newSettings.apiURL = profile.apiURL;
|
|
7
|
+
}
|
|
8
|
+
if (profile.defaultOrganizationId) {
|
|
9
|
+
newSettings.defaultOrganizationId = profile.defaultOrganizationId;
|
|
10
|
+
}
|
|
11
|
+
if (profile.defaultProjectId) {
|
|
12
|
+
newSettings.defaultProjectId = profile.defaultProjectId;
|
|
13
|
+
}
|
|
14
|
+
if (profile.defaultRegion) {
|
|
15
|
+
newSettings.defaultRegion = profile.defaultRegion;
|
|
16
|
+
}
|
|
17
|
+
if (profile.defaultZone) {
|
|
18
|
+
newSettings.defaultZone = profile.defaultZone;
|
|
19
|
+
}
|
|
20
|
+
if (hasAuthenticationSecrets(profile)) {
|
|
21
|
+
newSettings.interceptors = [
|
|
22
|
+
{
|
|
23
|
+
request: authenticateWithSecrets(profile)
|
|
24
|
+
},
|
|
25
|
+
...newSettings.interceptors
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
return newSettings;
|
|
29
|
+
};
|
|
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) => ({
|
|
34
|
+
...settings,
|
|
35
|
+
userAgent: settings.userAgent ? `${settings.userAgent} ${userAgent}` : userAgent
|
|
36
|
+
});
|
|
37
|
+
const withAdditionalInterceptors = (interceptors) => (settings) => ({
|
|
38
|
+
...settings,
|
|
39
|
+
interceptors: settings.interceptors.concat(interceptors)
|
|
40
|
+
});
|
|
41
|
+
const withLegacyInterceptors = () => (settings) => {
|
|
42
|
+
if (!settings.requestInterceptors && !settings.responseInterceptors) {
|
|
43
|
+
return settings;
|
|
44
|
+
}
|
|
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
|
+
);
|
|
53
|
+
return {
|
|
54
|
+
...settings,
|
|
55
|
+
interceptors: allInterceptors
|
|
56
|
+
};
|
|
57
|
+
};
|
|
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,23 @@
|
|
|
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 !== "";
|
|
3
|
+
function assertValidAuthenticationSecrets(obj) {
|
|
4
|
+
if (!(obj.accessKey && obj.secretKey)) {
|
|
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
|
+
);
|
|
8
|
+
}
|
|
9
|
+
if (!isAccessKey(obj.accessKey)) {
|
|
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
|
+
);
|
|
13
|
+
}
|
|
14
|
+
if (!isSecretKey(obj.secretKey)) {
|
|
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
|
+
);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
assertValidAuthenticationSecrets,
|
|
22
|
+
hasAuthenticationSecrets
|
|
23
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const stringValidation = require("../internal/validations/string-validation.cjs");
|
|
4
|
+
const assertValidSettings = (obj) => {
|
|
5
|
+
if (obj.defaultOrganizationId !== void 0) {
|
|
6
|
+
if (typeof obj.defaultOrganizationId !== "string" || obj.defaultOrganizationId.length === 0) {
|
|
7
|
+
throw new Error("Default organization ID cannot be empty");
|
|
8
|
+
}
|
|
9
|
+
if (!stringValidation.isOrganizationId(obj.defaultOrganizationId)) {
|
|
10
|
+
throw new Error(
|
|
11
|
+
`Invalid organization ID format '${obj.defaultOrganizationId}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (obj.defaultProjectId !== void 0) {
|
|
16
|
+
if (typeof obj.defaultProjectId !== "string" || obj.defaultProjectId.length === 0) {
|
|
17
|
+
throw new Error("Default project ID cannot be empty");
|
|
18
|
+
}
|
|
19
|
+
if (!stringValidation.isProjectId(obj.defaultProjectId)) {
|
|
20
|
+
throw new Error(
|
|
21
|
+
`Invalid project ID format '${obj.defaultProjectId}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (obj.defaultRegion && !stringValidation.isRegion(obj.defaultRegion)) {
|
|
26
|
+
throw new Error(`Invalid default region format '${obj.defaultRegion}'`);
|
|
27
|
+
}
|
|
28
|
+
if (obj.defaultZone && !stringValidation.isZone(obj.defaultZone)) {
|
|
29
|
+
throw new Error(`Invalid default zone format '${obj.defaultZone}'`);
|
|
30
|
+
}
|
|
31
|
+
if (obj.apiURL && !stringValidation.isURL(obj.apiURL)) {
|
|
32
|
+
throw new Error(`Invalid URL ${obj.apiURL}`);
|
|
33
|
+
}
|
|
34
|
+
if (obj.apiURL?.endsWith("/")) {
|
|
35
|
+
throw new Error(
|
|
36
|
+
`Invalid URL ${obj.apiURL}: it should not have a trailing slash`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
if (typeof obj.httpClient !== typeof fetch) {
|
|
40
|
+
throw new Error(`Invalid HTTP Client`);
|
|
41
|
+
}
|
|
42
|
+
if (obj.defaultPageSize !== void 0 && (typeof obj.defaultPageSize !== "number" || Number.isNaN(obj.defaultPageSize) || obj.defaultPageSize <= 0)) {
|
|
43
|
+
throw new Error(
|
|
44
|
+
`Invalid defaultPageSize ${obj.defaultPageSize}: it should be a number above 0`
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
if (typeof obj.userAgent !== "string") {
|
|
48
|
+
throw new Error(`Invalid User-Agent`);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.assertValidSettings = assertValidSettings;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { isOrganizationId, isProjectId, isRegion, isZone, isURL } from "../internal/validations/string-validation.js";
|
|
2
|
+
const assertValidSettings = (obj) => {
|
|
3
|
+
if (obj.defaultOrganizationId !== void 0) {
|
|
4
|
+
if (typeof obj.defaultOrganizationId !== "string" || obj.defaultOrganizationId.length === 0) {
|
|
5
|
+
throw new Error("Default organization ID cannot be empty");
|
|
6
|
+
}
|
|
7
|
+
if (!isOrganizationId(obj.defaultOrganizationId)) {
|
|
8
|
+
throw new Error(
|
|
9
|
+
`Invalid organization ID format '${obj.defaultOrganizationId}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (obj.defaultProjectId !== void 0) {
|
|
14
|
+
if (typeof obj.defaultProjectId !== "string" || obj.defaultProjectId.length === 0) {
|
|
15
|
+
throw new Error("Default project ID cannot be empty");
|
|
16
|
+
}
|
|
17
|
+
if (!isProjectId(obj.defaultProjectId)) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
`Invalid project ID format '${obj.defaultProjectId}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (obj.defaultRegion && !isRegion(obj.defaultRegion)) {
|
|
24
|
+
throw new Error(`Invalid default region format '${obj.defaultRegion}'`);
|
|
25
|
+
}
|
|
26
|
+
if (obj.defaultZone && !isZone(obj.defaultZone)) {
|
|
27
|
+
throw new Error(`Invalid default zone format '${obj.defaultZone}'`);
|
|
28
|
+
}
|
|
29
|
+
if (obj.apiURL && !isURL(obj.apiURL)) {
|
|
30
|
+
throw new Error(`Invalid URL ${obj.apiURL}`);
|
|
31
|
+
}
|
|
32
|
+
if (obj.apiURL?.endsWith("/")) {
|
|
33
|
+
throw new Error(
|
|
34
|
+
`Invalid URL ${obj.apiURL}: it should not have a trailing slash`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
if (typeof obj.httpClient !== typeof fetch) {
|
|
38
|
+
throw new Error(`Invalid HTTP Client`);
|
|
39
|
+
}
|
|
40
|
+
if (obj.defaultPageSize !== void 0 && (typeof obj.defaultPageSize !== "number" || Number.isNaN(obj.defaultPageSize) || obj.defaultPageSize <= 0)) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
`Invalid defaultPageSize ${obj.defaultPageSize}: it should be a number above 0`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
if (typeof obj.userAgent !== "string") {
|
|
46
|
+
throw new Error(`Invalid User-Agent`);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
assertValidSettings
|
|
51
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../internal/logger/index.cjs");
|
|
4
|
+
const clientIniFactory = require("./client-ini-factory.cjs");
|
|
5
|
+
const clientSettings = require("./client-settings.cjs");
|
|
6
|
+
const constants = require("./constants.cjs");
|
|
7
|
+
const buildFetcher = require("./fetch/build-fetcher.cjs");
|
|
8
|
+
const DEFAULT_SETTINGS = {
|
|
9
|
+
apiURL: "https://api.scaleway.com",
|
|
10
|
+
httpClient: fetch,
|
|
11
|
+
interceptors: [],
|
|
12
|
+
userAgent: constants.userAgent
|
|
13
|
+
};
|
|
14
|
+
const createAdvancedClient = (...configs) => {
|
|
15
|
+
const settings = configs.concat([clientIniFactory.withLegacyInterceptors()]).reduce(
|
|
16
|
+
(currentSettings, config) => config(currentSettings),
|
|
17
|
+
DEFAULT_SETTINGS
|
|
18
|
+
);
|
|
19
|
+
clientSettings.assertValidSettings(settings);
|
|
20
|
+
index.getLogger().info(`init Scaleway SDK version ${constants.version}`);
|
|
21
|
+
return {
|
|
22
|
+
fetch: buildFetcher.buildFetcher(settings, settings.httpClient),
|
|
23
|
+
settings
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
const createClient = (settings = {}) => createAdvancedClient(
|
|
27
|
+
clientIniFactory.withProfile(settings),
|
|
28
|
+
clientIniFactory.withAdditionalInterceptors(settings.interceptors ?? [])
|
|
29
|
+
);
|
|
30
|
+
exports.createAdvancedClient = createAdvancedClient;
|
|
31
|
+
exports.createClient = createClient;
|
|
@@ -4,10 +4,10 @@ import type { Fetcher } from './fetch/build-fetcher.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Scaleway client.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export interface Client {
|
|
8
8
|
fetch: Fetcher;
|
|
9
9
|
settings: Settings;
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
/**
|
|
12
12
|
* Creates a Scaleway client with advanced options.
|
|
13
13
|
* You can either use existing factories
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getLogger } from "../internal/logger/index.js";
|
|
2
|
+
import { withLegacyInterceptors, withAdditionalInterceptors, withProfile } from "./client-ini-factory.js";
|
|
3
|
+
import { assertValidSettings } from "./client-settings.js";
|
|
4
|
+
import { version, userAgent } from "./constants.js";
|
|
5
|
+
import { buildFetcher } from "./fetch/build-fetcher.js";
|
|
6
|
+
const DEFAULT_SETTINGS = {
|
|
7
|
+
apiURL: "https://api.scaleway.com",
|
|
8
|
+
httpClient: fetch,
|
|
9
|
+
interceptors: [],
|
|
10
|
+
userAgent
|
|
11
|
+
};
|
|
12
|
+
const createAdvancedClient = (...configs) => {
|
|
13
|
+
const settings = configs.concat([withLegacyInterceptors()]).reduce(
|
|
14
|
+
(currentSettings, config) => config(currentSettings),
|
|
15
|
+
DEFAULT_SETTINGS
|
|
16
|
+
);
|
|
17
|
+
assertValidSettings(settings);
|
|
18
|
+
getLogger().info(`init Scaleway SDK version ${version}`);
|
|
19
|
+
return {
|
|
20
|
+
fetch: buildFetcher(settings, settings.httpClient),
|
|
21
|
+
settings
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const createClient = (settings = {}) => createAdvancedClient(
|
|
25
|
+
withProfile(settings),
|
|
26
|
+
withAdditionalInterceptors(settings.interceptors ?? [])
|
|
27
|
+
);
|
|
28
|
+
export {
|
|
29
|
+
createAdvancedClient,
|
|
30
|
+
createClient
|
|
31
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const json = require("../helpers/json.cjs");
|
|
4
|
+
const marshalling = require("../helpers/marshalling.cjs");
|
|
5
|
+
const index = require("../vendor/base64/index.cjs");
|
|
6
|
+
const customTypes = require("./custom-types.cjs");
|
|
7
|
+
const unmarshalMoney = (data) => {
|
|
8
|
+
if (!json.isJSONObject(data)) {
|
|
9
|
+
throw new TypeError(
|
|
10
|
+
`Unmarshalling the type 'Money' failed as data isn't a dictionary.`
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
currencyCode: data.currency_code,
|
|
15
|
+
nanos: data.nanos,
|
|
16
|
+
units: data.units
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
const unmarshalServiceInfo = (data) => {
|
|
20
|
+
if (!json.isJSONObject(data)) {
|
|
21
|
+
throw new TypeError(
|
|
22
|
+
`Unmarshalling the type 'ServiceInfo' failed as data isn't a dictionary.`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
description: data.description,
|
|
27
|
+
documentationUrl: data.documentation_url,
|
|
28
|
+
name: data.name,
|
|
29
|
+
version: data.version
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const unmarshalScwFile = (data) => {
|
|
33
|
+
if (!json.isJSONObject(data)) {
|
|
34
|
+
throw new TypeError(
|
|
35
|
+
`Unmarshalling the type 'ScwFile' failed as data isn't a dictionary.`
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
content: data.content,
|
|
40
|
+
contentType: data.content_type,
|
|
41
|
+
name: data.name
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
const unmarshalTimeSeriesPoint = (data) => {
|
|
45
|
+
if (!Array.isArray(data)) {
|
|
46
|
+
throw new TypeError(
|
|
47
|
+
`Unmarshalling the type 'TimeSeriesPoint' failed as data isn't an array.`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
timestamp: marshalling.unmarshalDate(data[0]),
|
|
52
|
+
value: data[1]
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
const unmarshalTimeSeries = (data) => {
|
|
56
|
+
if (!json.isJSONObject(data)) {
|
|
57
|
+
throw new TypeError(
|
|
58
|
+
`Unmarshalling the type 'TimeSeries' failed as data isn't a dictionary.`
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
metadata: data.metadata,
|
|
63
|
+
name: data.name,
|
|
64
|
+
points: marshalling.unmarshalArrayOfObject(data.points, unmarshalTimeSeriesPoint)
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
const unmarshalDecimal = (data) => {
|
|
68
|
+
if (!(typeof data === "object")) {
|
|
69
|
+
throw new TypeError(
|
|
70
|
+
`Unmarshalling the type 'Decimal' failed as data isn't an object.`
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
if (data === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
if (!("value" in data)) {
|
|
77
|
+
throw new TypeError(
|
|
78
|
+
`Unmarshalling the type 'Decimal' failed as data object does not have a 'value' key.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
if (!(typeof data.value === "string")) {
|
|
82
|
+
throw new TypeError(
|
|
83
|
+
`Unmarshalling the type 'Decimal' failed as 'value' is not a string.`
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return new customTypes.Decimal(data.value);
|
|
87
|
+
};
|
|
88
|
+
const marshalScwFile = (obj) => ({
|
|
89
|
+
content: obj.content,
|
|
90
|
+
content_type: obj.contentType,
|
|
91
|
+
name: obj.name
|
|
92
|
+
});
|
|
93
|
+
const marshalBlobToScwFile = async (blob) => ({
|
|
94
|
+
content: index.fromByteArray(new Uint8Array(await blob.arrayBuffer())),
|
|
95
|
+
content_type: blob.type,
|
|
96
|
+
name: "file"
|
|
97
|
+
});
|
|
98
|
+
const marshalMoney = (obj) => ({
|
|
99
|
+
currency_code: obj.currencyCode,
|
|
100
|
+
nanos: obj.nanos,
|
|
101
|
+
units: obj.units
|
|
102
|
+
});
|
|
103
|
+
const marshalTimeSeriesPoint = (obj) => ({
|
|
104
|
+
timestamp: obj.timestamp?.toISOString(),
|
|
105
|
+
value: obj.value
|
|
106
|
+
});
|
|
107
|
+
const marshalTimeSeries = (obj) => ({
|
|
108
|
+
metadata: obj.metadata,
|
|
109
|
+
name: obj.name,
|
|
110
|
+
points: obj.points.map((elt) => marshalTimeSeriesPoint(elt))
|
|
111
|
+
});
|
|
112
|
+
const marshalDecimal = (obj) => ({
|
|
113
|
+
value: obj.toString()
|
|
114
|
+
});
|
|
115
|
+
exports.marshalBlobToScwFile = marshalBlobToScwFile;
|
|
116
|
+
exports.marshalDecimal = marshalDecimal;
|
|
117
|
+
exports.marshalMoney = marshalMoney;
|
|
118
|
+
exports.marshalScwFile = marshalScwFile;
|
|
119
|
+
exports.marshalTimeSeries = marshalTimeSeries;
|
|
120
|
+
exports.marshalTimeSeriesPoint = marshalTimeSeriesPoint;
|
|
121
|
+
exports.unmarshalDecimal = unmarshalDecimal;
|
|
122
|
+
exports.unmarshalMoney = unmarshalMoney;
|
|
123
|
+
exports.unmarshalScwFile = unmarshalScwFile;
|
|
124
|
+
exports.unmarshalServiceInfo = unmarshalServiceInfo;
|
|
125
|
+
exports.unmarshalTimeSeries = unmarshalTimeSeries;
|
|
126
|
+
exports.unmarshalTimeSeriesPoint = unmarshalTimeSeriesPoint;
|