@scaleway/sdk 2.71.0 → 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/README.md +6 -5
- 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 +56 -176
- package/dist/api/iam/v1alpha1/api.gen.d.ts +54 -176
- package/dist/api/iam/v1alpha1/api.gen.js +56 -176
- 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 +980 -373
- 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/client/dist/package.json.cjs +67 -0
- package/dist/client/dist/package.json.js +67 -0
- package/dist/client/dist/scw/constants.cjs +7 -0
- package/dist/{scw → client/dist/scw}/constants.js +2 -1
- 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/{dist → node_modules/@scaleway/sdk-client/dist}/scw/constants.cjs +2 -1
- package/node_modules/@scaleway/sdk-client/dist/scw/constants.d.ts +2 -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 -5
- package/dist/helpers/is-browser.cjs +0 -7
- package/dist/helpers/is-browser.js +0 -7
- package/dist/scw/constants.d.ts +0 -2
- /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}/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/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,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;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { isJSONObject } from "../helpers/json.js";
|
|
2
|
+
import { unmarshalDate, unmarshalArrayOfObject } from "../helpers/marshalling.js";
|
|
3
|
+
import { fromByteArray } from "../vendor/base64/index.js";
|
|
4
|
+
import { Decimal } from "./custom-types.js";
|
|
5
|
+
const unmarshalMoney = (data) => {
|
|
6
|
+
if (!isJSONObject(data)) {
|
|
7
|
+
throw new TypeError(
|
|
8
|
+
`Unmarshalling the type 'Money' failed as data isn't a dictionary.`
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
currencyCode: data.currency_code,
|
|
13
|
+
nanos: data.nanos,
|
|
14
|
+
units: data.units
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const unmarshalServiceInfo = (data) => {
|
|
18
|
+
if (!isJSONObject(data)) {
|
|
19
|
+
throw new TypeError(
|
|
20
|
+
`Unmarshalling the type 'ServiceInfo' failed as data isn't a dictionary.`
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
description: data.description,
|
|
25
|
+
documentationUrl: data.documentation_url,
|
|
26
|
+
name: data.name,
|
|
27
|
+
version: data.version
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const unmarshalScwFile = (data) => {
|
|
31
|
+
if (!isJSONObject(data)) {
|
|
32
|
+
throw new TypeError(
|
|
33
|
+
`Unmarshalling the type 'ScwFile' failed as data isn't a dictionary.`
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
content: data.content,
|
|
38
|
+
contentType: data.content_type,
|
|
39
|
+
name: data.name
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
const unmarshalTimeSeriesPoint = (data) => {
|
|
43
|
+
if (!Array.isArray(data)) {
|
|
44
|
+
throw new TypeError(
|
|
45
|
+
`Unmarshalling the type 'TimeSeriesPoint' failed as data isn't an array.`
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
timestamp: unmarshalDate(data[0]),
|
|
50
|
+
value: data[1]
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
const unmarshalTimeSeries = (data) => {
|
|
54
|
+
if (!isJSONObject(data)) {
|
|
55
|
+
throw new TypeError(
|
|
56
|
+
`Unmarshalling the type 'TimeSeries' failed as data isn't a dictionary.`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
metadata: data.metadata,
|
|
61
|
+
name: data.name,
|
|
62
|
+
points: unmarshalArrayOfObject(data.points, unmarshalTimeSeriesPoint)
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const unmarshalDecimal = (data) => {
|
|
66
|
+
if (!(typeof data === "object")) {
|
|
67
|
+
throw new TypeError(
|
|
68
|
+
`Unmarshalling the type 'Decimal' failed as data isn't an object.`
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
if (data === null) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
if (!("value" in data)) {
|
|
75
|
+
throw new TypeError(
|
|
76
|
+
`Unmarshalling the type 'Decimal' failed as data object does not have a 'value' key.`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
if (!(typeof data.value === "string")) {
|
|
80
|
+
throw new TypeError(
|
|
81
|
+
`Unmarshalling the type 'Decimal' failed as 'value' is not a string.`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
return new Decimal(data.value);
|
|
85
|
+
};
|
|
86
|
+
const marshalScwFile = (obj) => ({
|
|
87
|
+
content: obj.content,
|
|
88
|
+
content_type: obj.contentType,
|
|
89
|
+
name: obj.name
|
|
90
|
+
});
|
|
91
|
+
const marshalBlobToScwFile = async (blob) => ({
|
|
92
|
+
content: fromByteArray(new Uint8Array(await blob.arrayBuffer())),
|
|
93
|
+
content_type: blob.type,
|
|
94
|
+
name: "file"
|
|
95
|
+
});
|
|
96
|
+
const marshalMoney = (obj) => ({
|
|
97
|
+
currency_code: obj.currencyCode,
|
|
98
|
+
nanos: obj.nanos,
|
|
99
|
+
units: obj.units
|
|
100
|
+
});
|
|
101
|
+
const marshalTimeSeriesPoint = (obj) => ({
|
|
102
|
+
timestamp: obj.timestamp?.toISOString(),
|
|
103
|
+
value: obj.value
|
|
104
|
+
});
|
|
105
|
+
const marshalTimeSeries = (obj) => ({
|
|
106
|
+
metadata: obj.metadata,
|
|
107
|
+
name: obj.name,
|
|
108
|
+
points: obj.points.map((elt) => marshalTimeSeriesPoint(elt))
|
|
109
|
+
});
|
|
110
|
+
const marshalDecimal = (obj) => ({
|
|
111
|
+
value: obj.toString()
|
|
112
|
+
});
|
|
113
|
+
export {
|
|
114
|
+
marshalBlobToScwFile,
|
|
115
|
+
marshalDecimal,
|
|
116
|
+
marshalMoney,
|
|
117
|
+
marshalScwFile,
|
|
118
|
+
marshalTimeSeries,
|
|
119
|
+
marshalTimeSeriesPoint,
|
|
120
|
+
unmarshalDecimal,
|
|
121
|
+
unmarshalMoney,
|
|
122
|
+
unmarshalScwFile,
|
|
123
|
+
unmarshalServiceInfo,
|
|
124
|
+
unmarshalTimeSeries,
|
|
125
|
+
unmarshalTimeSeriesPoint
|
|
126
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const invalidRequestMapper = require("./non-standard/invalid-request-mapper.cjs");
|
|
4
|
+
const unknownResourceMapper = require("./non-standard/unknown-resource-mapper.cjs");
|
|
5
|
+
const scwError = require("./scw-error.cjs");
|
|
6
|
+
const alreadyExistsError = require("./standard/already-exists-error.cjs");
|
|
7
|
+
const deniedAuthenticationError = require("./standard/denied-authentication-error.cjs");
|
|
8
|
+
const invalidArgumentsError = require("./standard/invalid-arguments-error.cjs");
|
|
9
|
+
const outOfStockError = require("./standard/out-of-stock-error.cjs");
|
|
10
|
+
const permissionsDeniedError = require("./standard/permissions-denied-error.cjs");
|
|
11
|
+
const preconditionFailedError = require("./standard/precondition-failed-error.cjs");
|
|
12
|
+
const quotasExceededError = require("./standard/quotas-exceeded-error.cjs");
|
|
13
|
+
const resourceExpiredError = require("./standard/resource-expired-error.cjs");
|
|
14
|
+
const resourceLockedError = require("./standard/resource-locked-error.cjs");
|
|
15
|
+
const resourceNotFoundError = require("./standard/resource-not-found-error.cjs");
|
|
16
|
+
const tooManyRequestsError = require("./standard/too-many-requests-error.cjs");
|
|
17
|
+
const transientStateError = require("./standard/transient-state-error.cjs");
|
|
18
|
+
const unmarshalStandardError = (type, status, body) => {
|
|
19
|
+
let error;
|
|
20
|
+
switch (type) {
|
|
21
|
+
case "denied_authentication":
|
|
22
|
+
error = deniedAuthenticationError.DeniedAuthenticationError;
|
|
23
|
+
break;
|
|
24
|
+
case "invalid_arguments":
|
|
25
|
+
error = invalidArgumentsError.InvalidArgumentsError;
|
|
26
|
+
break;
|
|
27
|
+
case "out_of_stock":
|
|
28
|
+
error = outOfStockError.OutOfStockError;
|
|
29
|
+
break;
|
|
30
|
+
case "permissions_denied":
|
|
31
|
+
error = permissionsDeniedError.PermissionsDeniedError;
|
|
32
|
+
break;
|
|
33
|
+
case "precondition_failed":
|
|
34
|
+
error = preconditionFailedError.PreconditionFailedError;
|
|
35
|
+
break;
|
|
36
|
+
case "quotas_exceeded":
|
|
37
|
+
error = quotasExceededError.QuotasExceededError;
|
|
38
|
+
break;
|
|
39
|
+
case "expired":
|
|
40
|
+
error = resourceExpiredError.ResourceExpiredError;
|
|
41
|
+
break;
|
|
42
|
+
case "not_found":
|
|
43
|
+
error = resourceNotFoundError.ResourceNotFoundError;
|
|
44
|
+
break;
|
|
45
|
+
case "locked":
|
|
46
|
+
error = resourceLockedError.ResourceLockedError;
|
|
47
|
+
break;
|
|
48
|
+
case "transient_state":
|
|
49
|
+
error = transientStateError.TransientStateError;
|
|
50
|
+
break;
|
|
51
|
+
case "already_exists":
|
|
52
|
+
error = alreadyExistsError.AlreadyExistsError;
|
|
53
|
+
break;
|
|
54
|
+
case "too_many_requests":
|
|
55
|
+
error = tooManyRequestsError.TooManyRequestsError;
|
|
56
|
+
break;
|
|
57
|
+
default:
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return error.fromJSON(status, body);
|
|
61
|
+
};
|
|
62
|
+
const unmarshalNonStandardError = (type, status, body) => {
|
|
63
|
+
switch (type) {
|
|
64
|
+
case "unknown_resource":
|
|
65
|
+
return unknownResourceMapper.UnknownResourceMapper.fromJSON(status, body);
|
|
66
|
+
case "invalid_request_error":
|
|
67
|
+
return invalidRequestMapper.InvalidRequestMapper.fromJSON(status, body);
|
|
68
|
+
default:
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const parseScalewayError = (status, body) => {
|
|
73
|
+
const parsableError = typeof body.type === "string" && (unmarshalStandardError(body.type, status, body) ?? unmarshalNonStandardError(body.type, status, body));
|
|
74
|
+
return parsableError || new scwError.ScalewayError(status, body);
|
|
75
|
+
};
|
|
76
|
+
exports.parseScalewayError = parseScalewayError;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { InvalidRequestMapper } from "./non-standard/invalid-request-mapper.js";
|
|
2
|
+
import { UnknownResourceMapper } from "./non-standard/unknown-resource-mapper.js";
|
|
3
|
+
import { ScalewayError } from "./scw-error.js";
|
|
4
|
+
import { AlreadyExistsError } from "./standard/already-exists-error.js";
|
|
5
|
+
import { DeniedAuthenticationError } from "./standard/denied-authentication-error.js";
|
|
6
|
+
import { InvalidArgumentsError } from "./standard/invalid-arguments-error.js";
|
|
7
|
+
import { OutOfStockError } from "./standard/out-of-stock-error.js";
|
|
8
|
+
import { PermissionsDeniedError } from "./standard/permissions-denied-error.js";
|
|
9
|
+
import { PreconditionFailedError } from "./standard/precondition-failed-error.js";
|
|
10
|
+
import { QuotasExceededError } from "./standard/quotas-exceeded-error.js";
|
|
11
|
+
import { ResourceExpiredError } from "./standard/resource-expired-error.js";
|
|
12
|
+
import { ResourceLockedError } from "./standard/resource-locked-error.js";
|
|
13
|
+
import { ResourceNotFoundError } from "./standard/resource-not-found-error.js";
|
|
14
|
+
import { TooManyRequestsError } from "./standard/too-many-requests-error.js";
|
|
15
|
+
import { TransientStateError } from "./standard/transient-state-error.js";
|
|
16
|
+
const unmarshalStandardError = (type, status, body) => {
|
|
17
|
+
let error;
|
|
18
|
+
switch (type) {
|
|
19
|
+
case "denied_authentication":
|
|
20
|
+
error = DeniedAuthenticationError;
|
|
21
|
+
break;
|
|
22
|
+
case "invalid_arguments":
|
|
23
|
+
error = InvalidArgumentsError;
|
|
24
|
+
break;
|
|
25
|
+
case "out_of_stock":
|
|
26
|
+
error = OutOfStockError;
|
|
27
|
+
break;
|
|
28
|
+
case "permissions_denied":
|
|
29
|
+
error = PermissionsDeniedError;
|
|
30
|
+
break;
|
|
31
|
+
case "precondition_failed":
|
|
32
|
+
error = PreconditionFailedError;
|
|
33
|
+
break;
|
|
34
|
+
case "quotas_exceeded":
|
|
35
|
+
error = QuotasExceededError;
|
|
36
|
+
break;
|
|
37
|
+
case "expired":
|
|
38
|
+
error = ResourceExpiredError;
|
|
39
|
+
break;
|
|
40
|
+
case "not_found":
|
|
41
|
+
error = ResourceNotFoundError;
|
|
42
|
+
break;
|
|
43
|
+
case "locked":
|
|
44
|
+
error = ResourceLockedError;
|
|
45
|
+
break;
|
|
46
|
+
case "transient_state":
|
|
47
|
+
error = TransientStateError;
|
|
48
|
+
break;
|
|
49
|
+
case "already_exists":
|
|
50
|
+
error = AlreadyExistsError;
|
|
51
|
+
break;
|
|
52
|
+
case "too_many_requests":
|
|
53
|
+
error = TooManyRequestsError;
|
|
54
|
+
break;
|
|
55
|
+
default:
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return error.fromJSON(status, body);
|
|
59
|
+
};
|
|
60
|
+
const unmarshalNonStandardError = (type, status, body) => {
|
|
61
|
+
switch (type) {
|
|
62
|
+
case "unknown_resource":
|
|
63
|
+
return UnknownResourceMapper.fromJSON(status, body);
|
|
64
|
+
case "invalid_request_error":
|
|
65
|
+
return InvalidRequestMapper.fromJSON(status, body);
|
|
66
|
+
default:
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const parseScalewayError = (status, body) => {
|
|
71
|
+
const parsableError = typeof body.type === "string" && (unmarshalStandardError(body.type, status, body) ?? unmarshalNonStandardError(body.type, status, body));
|
|
72
|
+
return parsableError || new ScalewayError(status, body);
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
parseScalewayError
|
|
76
|
+
};
|
package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/invalid-request-mapper.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const scwError = require("../scw-error.cjs");
|
|
4
|
+
const invalidArgumentsError = require("../standard/invalid-arguments-error.cjs");
|
|
5
|
+
const quotasExceededError = require("../standard/quotas-exceeded-error.cjs");
|
|
6
|
+
const types = require("../types.cjs");
|
|
7
|
+
class InvalidRequestMapper {
|
|
8
|
+
static fromJSON(status, obj) {
|
|
9
|
+
if (typeof obj.message === "string" && obj.message.toLowerCase().includes("quota exceeded for this resource")) {
|
|
10
|
+
return new quotasExceededError.QuotasExceededError(status, obj, [
|
|
11
|
+
{
|
|
12
|
+
current: 0,
|
|
13
|
+
quota: 0,
|
|
14
|
+
resource: typeof obj.resource === "string" ? obj.resource : ""
|
|
15
|
+
}
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
const fields = obj.fields && types.isRecordOfStringArray(obj.fields) ? obj.fields : {};
|
|
19
|
+
const fieldsMessages = Object.entries(fields);
|
|
20
|
+
if (fieldsMessages.length) {
|
|
21
|
+
return new invalidArgumentsError.InvalidArgumentsError(
|
|
22
|
+
status,
|
|
23
|
+
obj,
|
|
24
|
+
fieldsMessages.map(
|
|
25
|
+
([argumentName, messages]) => messages.map((helpMessage) => ({
|
|
26
|
+
argumentName,
|
|
27
|
+
helpMessage,
|
|
28
|
+
reason: "constraint"
|
|
29
|
+
}))
|
|
30
|
+
).flat()
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
return new scwError.ScalewayError(status, obj);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.InvalidRequestMapper = InvalidRequestMapper;
|
package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/invalid-request-mapper.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ScalewayError } from "../scw-error.js";
|
|
2
|
+
import { InvalidArgumentsError } from "../standard/invalid-arguments-error.js";
|
|
3
|
+
import { QuotasExceededError } from "../standard/quotas-exceeded-error.js";
|
|
4
|
+
import { isRecordOfStringArray } from "../types.js";
|
|
5
|
+
class InvalidRequestMapper {
|
|
6
|
+
static fromJSON(status, obj) {
|
|
7
|
+
if (typeof obj.message === "string" && obj.message.toLowerCase().includes("quota exceeded for this resource")) {
|
|
8
|
+
return new QuotasExceededError(status, obj, [
|
|
9
|
+
{
|
|
10
|
+
current: 0,
|
|
11
|
+
quota: 0,
|
|
12
|
+
resource: typeof obj.resource === "string" ? obj.resource : ""
|
|
13
|
+
}
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
const fields = obj.fields && isRecordOfStringArray(obj.fields) ? obj.fields : {};
|
|
17
|
+
const fieldsMessages = Object.entries(fields);
|
|
18
|
+
if (fieldsMessages.length) {
|
|
19
|
+
return new InvalidArgumentsError(
|
|
20
|
+
status,
|
|
21
|
+
obj,
|
|
22
|
+
fieldsMessages.map(
|
|
23
|
+
([argumentName, messages]) => messages.map((helpMessage) => ({
|
|
24
|
+
argumentName,
|
|
25
|
+
helpMessage,
|
|
26
|
+
reason: "constraint"
|
|
27
|
+
}))
|
|
28
|
+
).flat()
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
return new ScalewayError(status, obj);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
InvalidRequestMapper
|
|
36
|
+
};
|
package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/unknown-resource-mapper.cjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const stringValidation = require("../../../internal/validations/string-validation.cjs");
|
|
4
|
+
const scwError = require("../scw-error.cjs");
|
|
5
|
+
const resourceNotFoundError = require("../standard/resource-not-found-error.cjs");
|
|
6
|
+
class UnknownResourceMapper {
|
|
7
|
+
static fromJSON(status, obj) {
|
|
8
|
+
const messageParts = typeof obj.message === "string" ? obj.message.split(/"|'/) : [];
|
|
9
|
+
if (messageParts.length === 3 && stringValidation.isUUID(messageParts[1])) {
|
|
10
|
+
return new resourceNotFoundError.ResourceNotFoundError(
|
|
11
|
+
status,
|
|
12
|
+
obj,
|
|
13
|
+
// transform `Security group ` to `security_group`
|
|
14
|
+
// `.replaceAll()` may be too recent to use yet.
|
|
15
|
+
// that's why we're using `.split(' ').join('_')` for now.
|
|
16
|
+
messageParts[0].trim().toLowerCase().split(" ").join("_"),
|
|
17
|
+
messageParts[1]
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
return new scwError.ScalewayError(status, obj);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.UnknownResourceMapper = UnknownResourceMapper;
|
package/node_modules/@scaleway/sdk-client/dist/scw/errors/non-standard/unknown-resource-mapper.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isUUID } from "../../../internal/validations/string-validation.js";
|
|
2
|
+
import { ScalewayError } from "../scw-error.js";
|
|
3
|
+
import { ResourceNotFoundError } from "../standard/resource-not-found-error.js";
|
|
4
|
+
class UnknownResourceMapper {
|
|
5
|
+
static fromJSON(status, obj) {
|
|
6
|
+
const messageParts = typeof obj.message === "string" ? obj.message.split(/"|'/) : [];
|
|
7
|
+
if (messageParts.length === 3 && isUUID(messageParts[1])) {
|
|
8
|
+
return new ResourceNotFoundError(
|
|
9
|
+
status,
|
|
10
|
+
obj,
|
|
11
|
+
// transform `Security group ` to `security_group`
|
|
12
|
+
// `.replaceAll()` may be too recent to use yet.
|
|
13
|
+
// that's why we're using `.split(' ').join('_')` for now.
|
|
14
|
+
messageParts[0].trim().toLowerCase().split(" ").join("_"),
|
|
15
|
+
messageParts[1]
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
return new ScalewayError(status, obj);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
UnknownResourceMapper
|
|
23
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const json = require("../../helpers/json.cjs");
|
|
4
|
+
const types = require("./types.cjs");
|
|
5
|
+
const buildDefaultMessage = (status, body) => {
|
|
6
|
+
const message = [`http error ${status}`];
|
|
7
|
+
if (typeof body === "string") {
|
|
8
|
+
message.push(body);
|
|
9
|
+
} else if (json.isJSONObject(body)) {
|
|
10
|
+
if (typeof body.resource === "string") {
|
|
11
|
+
message.push(`resource ${body.resource}`);
|
|
12
|
+
}
|
|
13
|
+
if (typeof body.message === "string") {
|
|
14
|
+
message.push(body.message);
|
|
15
|
+
}
|
|
16
|
+
if (body.fields && types.isRecordOfStringArray(body.fields)) {
|
|
17
|
+
message.push(
|
|
18
|
+
Object.entries(body.fields).map(([name, list]) => `${name} (${list.join(", ")})`).join(", ")
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return message.join(": ");
|
|
23
|
+
};
|
|
24
|
+
class ScalewayError extends Error {
|
|
25
|
+
constructor(status, body, message = buildDefaultMessage(status, body)) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.status = status;
|
|
28
|
+
this.body = body;
|
|
29
|
+
this.message = message;
|
|
30
|
+
this.name = "ScalewayError";
|
|
31
|
+
this.rawMessage = typeof body === "object" && typeof body.message === "string" ? body.message : void 0;
|
|
32
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
33
|
+
}
|
|
34
|
+
/** The message originating from the payload. */
|
|
35
|
+
rawMessage;
|
|
36
|
+
static fromJSON(status, obj) {
|
|
37
|
+
return new ScalewayError(status, obj);
|
|
38
|
+
}
|
|
39
|
+
toString() {
|
|
40
|
+
return `${this.name}: ${this.message}`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.ScalewayError = ScalewayError;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { isJSONObject } from "../../helpers/json.js";
|
|
2
|
+
import { isRecordOfStringArray } from "./types.js";
|
|
3
|
+
const buildDefaultMessage = (status, body) => {
|
|
4
|
+
const message = [`http error ${status}`];
|
|
5
|
+
if (typeof body === "string") {
|
|
6
|
+
message.push(body);
|
|
7
|
+
} else if (isJSONObject(body)) {
|
|
8
|
+
if (typeof body.resource === "string") {
|
|
9
|
+
message.push(`resource ${body.resource}`);
|
|
10
|
+
}
|
|
11
|
+
if (typeof body.message === "string") {
|
|
12
|
+
message.push(body.message);
|
|
13
|
+
}
|
|
14
|
+
if (body.fields && isRecordOfStringArray(body.fields)) {
|
|
15
|
+
message.push(
|
|
16
|
+
Object.entries(body.fields).map(([name, list]) => `${name} (${list.join(", ")})`).join(", ")
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return message.join(": ");
|
|
21
|
+
};
|
|
22
|
+
class ScalewayError extends Error {
|
|
23
|
+
constructor(status, body, message = buildDefaultMessage(status, body)) {
|
|
24
|
+
super(message);
|
|
25
|
+
this.status = status;
|
|
26
|
+
this.body = body;
|
|
27
|
+
this.message = message;
|
|
28
|
+
this.name = "ScalewayError";
|
|
29
|
+
this.rawMessage = typeof body === "object" && typeof body.message === "string" ? body.message : void 0;
|
|
30
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
31
|
+
}
|
|
32
|
+
/** The message originating from the payload. */
|
|
33
|
+
rawMessage;
|
|
34
|
+
static fromJSON(status, obj) {
|
|
35
|
+
return new ScalewayError(status, obj);
|
|
36
|
+
}
|
|
37
|
+
toString() {
|
|
38
|
+
return `${this.name}: ${this.message}`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
ScalewayError
|
|
43
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const scwError = require("../scw-error.cjs");
|
|
4
|
+
class AlreadyExistsError extends scwError.ScalewayError {
|
|
5
|
+
constructor(status, body, resource, resourceId, helpMessage) {
|
|
6
|
+
super(
|
|
7
|
+
status,
|
|
8
|
+
body,
|
|
9
|
+
`resource ${resource} with ID ${resourceId} already exists: ${helpMessage}`
|
|
10
|
+
);
|
|
11
|
+
this.status = status;
|
|
12
|
+
this.body = body;
|
|
13
|
+
this.resource = resource;
|
|
14
|
+
this.resourceId = resourceId;
|
|
15
|
+
this.helpMessage = helpMessage;
|
|
16
|
+
this.name = "AlreadyExistsError";
|
|
17
|
+
}
|
|
18
|
+
static fromJSON(status, obj) {
|
|
19
|
+
if (typeof obj.resource !== "string" || typeof obj.resource_id !== "string" || typeof obj.help_message !== "string") {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return new AlreadyExistsError(
|
|
23
|
+
status,
|
|
24
|
+
obj,
|
|
25
|
+
obj.resource,
|
|
26
|
+
obj.resource_id,
|
|
27
|
+
obj.help_message
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.AlreadyExistsError = AlreadyExistsError;
|