@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,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function validatePathParam(name, param) {
|
|
4
|
+
if (typeof param === "string" && param.length > 0) return param;
|
|
5
|
+
if (typeof param === "number") return param.toString();
|
|
6
|
+
throw new TypeError(`param ${name} cannot be empty in request`);
|
|
7
|
+
}
|
|
8
|
+
const resolveOneOf = (list, isRequired = false) => {
|
|
9
|
+
const elt = list.find((obj) => obj.value !== void 0) ?? list.find((obj) => obj.default !== void 0);
|
|
10
|
+
const value = elt?.value ?? elt?.default;
|
|
11
|
+
if (elt && value !== void 0) {
|
|
12
|
+
return { [elt.param]: value };
|
|
13
|
+
}
|
|
14
|
+
if (isRequired) {
|
|
15
|
+
const keyList = list.map((obj) => obj.param).join(" or ");
|
|
16
|
+
throw new TypeError(`one of ${keyList} must be indicated in the request`);
|
|
17
|
+
}
|
|
18
|
+
return {};
|
|
19
|
+
};
|
|
20
|
+
const urlParams = (...paramTuples) => {
|
|
21
|
+
const params = new URLSearchParams();
|
|
22
|
+
for (const [key, value] of paramTuples) {
|
|
23
|
+
if (typeof key === "string" && value != null) {
|
|
24
|
+
if (Array.isArray(value)) {
|
|
25
|
+
for (const innerValue of value) {
|
|
26
|
+
if (innerValue !== null) {
|
|
27
|
+
params.append(
|
|
28
|
+
key,
|
|
29
|
+
innerValue instanceof Date ? innerValue.toISOString() : innerValue.toString()
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
params.append(
|
|
35
|
+
key,
|
|
36
|
+
value instanceof Date ? value.toISOString() : value.toString()
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return params;
|
|
42
|
+
};
|
|
43
|
+
const unmarshalDate = (data) => {
|
|
44
|
+
if (typeof data !== "string") {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
const date = new Date(data);
|
|
48
|
+
if (Number.isNaN(date.getTime())) {
|
|
49
|
+
return void 0;
|
|
50
|
+
}
|
|
51
|
+
return date;
|
|
52
|
+
};
|
|
53
|
+
const unmarshalArrayOfObject = (data, unmarshaller, emptyFallback = true) => {
|
|
54
|
+
if (!Array.isArray(data)) {
|
|
55
|
+
return emptyFallback ? [] : void 0;
|
|
56
|
+
}
|
|
57
|
+
return data.map((elt) => unmarshaller(elt));
|
|
58
|
+
};
|
|
59
|
+
const unmarshalMapOfObject = (data, unmarshaller, emptyFallback = true) => {
|
|
60
|
+
if (!data || typeof data !== "object" || !(data instanceof Object) || Array.isArray(data)) {
|
|
61
|
+
return emptyFallback ? {} : void 0;
|
|
62
|
+
}
|
|
63
|
+
return Object.entries(data).reduce(
|
|
64
|
+
(acc, [key, value]) => ({
|
|
65
|
+
...acc,
|
|
66
|
+
[key]: unmarshaller(value)
|
|
67
|
+
}),
|
|
68
|
+
{}
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
exports.resolveOneOf = resolveOneOf;
|
|
72
|
+
exports.unmarshalArrayOfObject = unmarshalArrayOfObject;
|
|
73
|
+
exports.unmarshalDate = unmarshalDate;
|
|
74
|
+
exports.unmarshalMapOfObject = unmarshalMapOfObject;
|
|
75
|
+
exports.urlParams = urlParams;
|
|
76
|
+
exports.validatePathParam = validatePathParam;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function validatePathParam(name, param) {
|
|
2
|
+
if (typeof param === "string" && param.length > 0) return param;
|
|
3
|
+
if (typeof param === "number") return param.toString();
|
|
4
|
+
throw new TypeError(`param ${name} cannot be empty in request`);
|
|
5
|
+
}
|
|
6
|
+
const resolveOneOf = (list, isRequired = false) => {
|
|
7
|
+
const elt = list.find((obj) => obj.value !== void 0) ?? list.find((obj) => obj.default !== void 0);
|
|
8
|
+
const value = elt?.value ?? elt?.default;
|
|
9
|
+
if (elt && value !== void 0) {
|
|
10
|
+
return { [elt.param]: value };
|
|
11
|
+
}
|
|
12
|
+
if (isRequired) {
|
|
13
|
+
const keyList = list.map((obj) => obj.param).join(" or ");
|
|
14
|
+
throw new TypeError(`one of ${keyList} must be indicated in the request`);
|
|
15
|
+
}
|
|
16
|
+
return {};
|
|
17
|
+
};
|
|
18
|
+
const urlParams = (...paramTuples) => {
|
|
19
|
+
const params = new URLSearchParams();
|
|
20
|
+
for (const [key, value] of paramTuples) {
|
|
21
|
+
if (typeof key === "string" && value != null) {
|
|
22
|
+
if (Array.isArray(value)) {
|
|
23
|
+
for (const innerValue of value) {
|
|
24
|
+
if (innerValue !== null) {
|
|
25
|
+
params.append(
|
|
26
|
+
key,
|
|
27
|
+
innerValue instanceof Date ? innerValue.toISOString() : innerValue.toString()
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
params.append(
|
|
33
|
+
key,
|
|
34
|
+
value instanceof Date ? value.toISOString() : value.toString()
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return params;
|
|
40
|
+
};
|
|
41
|
+
const unmarshalDate = (data) => {
|
|
42
|
+
if (typeof data !== "string") {
|
|
43
|
+
return void 0;
|
|
44
|
+
}
|
|
45
|
+
const date = new Date(data);
|
|
46
|
+
if (Number.isNaN(date.getTime())) {
|
|
47
|
+
return void 0;
|
|
48
|
+
}
|
|
49
|
+
return date;
|
|
50
|
+
};
|
|
51
|
+
const unmarshalArrayOfObject = (data, unmarshaller, emptyFallback = true) => {
|
|
52
|
+
if (!Array.isArray(data)) {
|
|
53
|
+
return emptyFallback ? [] : void 0;
|
|
54
|
+
}
|
|
55
|
+
return data.map((elt) => unmarshaller(elt));
|
|
56
|
+
};
|
|
57
|
+
const unmarshalMapOfObject = (data, unmarshaller, emptyFallback = true) => {
|
|
58
|
+
if (!data || typeof data !== "object" || !(data instanceof Object) || Array.isArray(data)) {
|
|
59
|
+
return emptyFallback ? {} : void 0;
|
|
60
|
+
}
|
|
61
|
+
return Object.entries(data).reduce(
|
|
62
|
+
(acc, [key, value]) => ({
|
|
63
|
+
...acc,
|
|
64
|
+
[key]: unmarshaller(value)
|
|
65
|
+
}),
|
|
66
|
+
{}
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
resolveOneOf,
|
|
71
|
+
unmarshalArrayOfObject,
|
|
72
|
+
unmarshalDate,
|
|
73
|
+
unmarshalMapOfObject,
|
|
74
|
+
urlParams,
|
|
75
|
+
validatePathParam
|
|
76
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("./internal/logger/index.cjs");
|
|
4
|
+
const client = require("./scw/client.cjs");
|
|
5
|
+
const clientIniFactory = require("./scw/client-ini-factory.cjs");
|
|
6
|
+
const customTypes = require("./scw/custom-types.cjs");
|
|
7
|
+
const index$1 = require("./scw/errors/standard/index.cjs");
|
|
8
|
+
const json = require("./helpers/json.cjs");
|
|
9
|
+
const intervalRetrier = require("./internal/async/interval-retrier.cjs");
|
|
10
|
+
const helpers = require("./internal/interceptors/helpers.cjs");
|
|
11
|
+
const api = require("./scw/api.cjs");
|
|
12
|
+
const auth = require("./scw/auth.cjs");
|
|
13
|
+
const customMarshalling = require("./scw/custom-marshalling.cjs");
|
|
14
|
+
const marshalling = require("./helpers/marshalling.cjs");
|
|
15
|
+
const resourcePaginator = require("./scw/fetch/resource-paginator.cjs");
|
|
16
|
+
exports.enableConsoleLogger = index.enableConsoleLogger;
|
|
17
|
+
exports.setLogger = index.setLogger;
|
|
18
|
+
exports.createAdvancedClient = client.createAdvancedClient;
|
|
19
|
+
exports.createClient = client.createClient;
|
|
20
|
+
exports.withAdditionalInterceptors = clientIniFactory.withAdditionalInterceptors;
|
|
21
|
+
exports.withDefaultPageSize = clientIniFactory.withDefaultPageSize;
|
|
22
|
+
exports.withHTTPClient = clientIniFactory.withHTTPClient;
|
|
23
|
+
exports.withProfile = clientIniFactory.withProfile;
|
|
24
|
+
exports.withUserAgent = clientIniFactory.withUserAgent;
|
|
25
|
+
exports.withUserAgentSuffix = clientIniFactory.withUserAgentSuffix;
|
|
26
|
+
exports.Decimal = customTypes.Decimal;
|
|
27
|
+
exports.Errors = index$1;
|
|
28
|
+
exports.isJSONObject = json.isJSONObject;
|
|
29
|
+
exports.createExponentialBackoffStrategy = intervalRetrier.createExponentialBackoffStrategy;
|
|
30
|
+
exports.tryAtIntervals = intervalRetrier.tryAtIntervals;
|
|
31
|
+
exports.waitForResource = intervalRetrier.waitForResource;
|
|
32
|
+
exports.addAsyncHeaderInterceptor = helpers.addAsyncHeaderInterceptor;
|
|
33
|
+
exports.API = api.API;
|
|
34
|
+
exports.authenticateWithSessionToken = auth.authenticateWithSessionToken;
|
|
35
|
+
exports.marshalBlobToScwFile = customMarshalling.marshalBlobToScwFile;
|
|
36
|
+
exports.marshalDecimal = customMarshalling.marshalDecimal;
|
|
37
|
+
exports.marshalMoney = customMarshalling.marshalMoney;
|
|
38
|
+
exports.marshalScwFile = customMarshalling.marshalScwFile;
|
|
39
|
+
exports.marshalTimeSeries = customMarshalling.marshalTimeSeries;
|
|
40
|
+
exports.unmarshalDecimal = customMarshalling.unmarshalDecimal;
|
|
41
|
+
exports.unmarshalMoney = customMarshalling.unmarshalMoney;
|
|
42
|
+
exports.unmarshalScwFile = customMarshalling.unmarshalScwFile;
|
|
43
|
+
exports.unmarshalServiceInfo = customMarshalling.unmarshalServiceInfo;
|
|
44
|
+
exports.unmarshalTimeSeries = customMarshalling.unmarshalTimeSeries;
|
|
45
|
+
exports.unmarshalTimeSeriesPoint = customMarshalling.unmarshalTimeSeriesPoint;
|
|
46
|
+
exports.resolveOneOf = marshalling.resolveOneOf;
|
|
47
|
+
exports.unmarshalArrayOfObject = marshalling.unmarshalArrayOfObject;
|
|
48
|
+
exports.unmarshalDate = marshalling.unmarshalDate;
|
|
49
|
+
exports.unmarshalMapOfObject = marshalling.unmarshalMapOfObject;
|
|
50
|
+
exports.urlParams = marshalling.urlParams;
|
|
51
|
+
exports.validatePathParam = marshalling.validatePathParam;
|
|
52
|
+
exports.enrichForPagination = resourcePaginator.enrichForPagination;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type { WaitForOptions, WaitForStopCondition, } from './internal/async/interval-retrier.js';
|
|
2
|
+
export type { NetworkInterceptors, RequestInterceptor, ResponseInterceptor, ResponseErrorInterceptor, } from './internal/interceptors/types';
|
|
3
|
+
export { enableConsoleLogger, setLogger } from './internal/logger/index.js';
|
|
4
|
+
export type { Logger } from './internal/logger/logger';
|
|
5
|
+
export { createClient, createAdvancedClient } from './scw/client.js';
|
|
6
|
+
export type { Client } from './scw/client.js';
|
|
7
|
+
export type { Profile } from './scw/client-ini-profile.js';
|
|
8
|
+
export type { Settings } from './scw/client-settings.js';
|
|
9
|
+
export { withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix, } from './scw/client-ini-factory.js';
|
|
10
|
+
export type { ClientConfig } from './scw/client-ini-factory.js';
|
|
11
|
+
export { Decimal } from './scw/custom-types.js';
|
|
12
|
+
export type { Money, ScwFile, TimeSeries } from './scw/custom-types.js';
|
|
13
|
+
export * as Errors from './scw/errors/standard/index.js';
|
|
14
|
+
export type { Region, Zone } from './scw/locality';
|
|
15
|
+
export * from './internals';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { enableConsoleLogger, setLogger } from "./internal/logger/index.js";
|
|
2
|
+
import { createAdvancedClient, createClient } from "./scw/client.js";
|
|
3
|
+
import { withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix } from "./scw/client-ini-factory.js";
|
|
4
|
+
import { Decimal } from "./scw/custom-types.js";
|
|
5
|
+
import * as index from "./scw/errors/standard/index.js";
|
|
6
|
+
import { isJSONObject } from "./helpers/json.js";
|
|
7
|
+
import { createExponentialBackoffStrategy, tryAtIntervals, waitForResource } from "./internal/async/interval-retrier.js";
|
|
8
|
+
import { addAsyncHeaderInterceptor } from "./internal/interceptors/helpers.js";
|
|
9
|
+
import { API } from "./scw/api.js";
|
|
10
|
+
import { authenticateWithSessionToken } from "./scw/auth.js";
|
|
11
|
+
import { marshalBlobToScwFile, marshalDecimal, marshalMoney, marshalScwFile, marshalTimeSeries, unmarshalDecimal, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint } from "./scw/custom-marshalling.js";
|
|
12
|
+
import { resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, urlParams, validatePathParam } from "./helpers/marshalling.js";
|
|
13
|
+
import { enrichForPagination } from "./scw/fetch/resource-paginator.js";
|
|
14
|
+
export {
|
|
15
|
+
API,
|
|
16
|
+
Decimal,
|
|
17
|
+
index as Errors,
|
|
18
|
+
addAsyncHeaderInterceptor,
|
|
19
|
+
authenticateWithSessionToken,
|
|
20
|
+
createAdvancedClient,
|
|
21
|
+
createClient,
|
|
22
|
+
createExponentialBackoffStrategy,
|
|
23
|
+
enableConsoleLogger,
|
|
24
|
+
enrichForPagination,
|
|
25
|
+
isJSONObject,
|
|
26
|
+
marshalBlobToScwFile,
|
|
27
|
+
marshalDecimal,
|
|
28
|
+
marshalMoney,
|
|
29
|
+
marshalScwFile,
|
|
30
|
+
marshalTimeSeries,
|
|
31
|
+
resolveOneOf,
|
|
32
|
+
setLogger,
|
|
33
|
+
tryAtIntervals,
|
|
34
|
+
unmarshalArrayOfObject,
|
|
35
|
+
unmarshalDate,
|
|
36
|
+
unmarshalDecimal,
|
|
37
|
+
unmarshalMapOfObject,
|
|
38
|
+
unmarshalMoney,
|
|
39
|
+
unmarshalScwFile,
|
|
40
|
+
unmarshalServiceInfo,
|
|
41
|
+
unmarshalTimeSeries,
|
|
42
|
+
unmarshalTimeSeriesPoint,
|
|
43
|
+
urlParams,
|
|
44
|
+
validatePathParam,
|
|
45
|
+
waitForResource,
|
|
46
|
+
withAdditionalInterceptors,
|
|
47
|
+
withDefaultPageSize,
|
|
48
|
+
withHTTPClient,
|
|
49
|
+
withProfile,
|
|
50
|
+
withUserAgent,
|
|
51
|
+
withUserAgentSuffix
|
|
52
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const sleep = require("./sleep.cjs");
|
|
4
|
+
const DEFAULT_TIMEOUT_SECONDS = 300;
|
|
5
|
+
const DEFAULT_MIN_DELAY_SECONDS = 1;
|
|
6
|
+
const DEFAULT_MAX_DELAY_SECONDS = 30;
|
|
7
|
+
function* createExponentialBackoffStrategy(minDelay, maxDelay) {
|
|
8
|
+
if (minDelay < 1 || maxDelay < 1 || minDelay > maxDelay) {
|
|
9
|
+
throw new Error(
|
|
10
|
+
"Waiter: minDelay must be >= 1 and maxDelay must be >= minDelay"
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
let attempt = 1;
|
|
14
|
+
const ceiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;
|
|
15
|
+
const randomInRange = (min, max) => min + Math.random() * (max - min);
|
|
16
|
+
while (true) {
|
|
17
|
+
if (attempt > ceiling) {
|
|
18
|
+
yield maxDelay;
|
|
19
|
+
} else {
|
|
20
|
+
yield randomInRange(minDelay, minDelay * 2 ** (attempt - 1));
|
|
21
|
+
}
|
|
22
|
+
attempt += 1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const tryAtIntervals = async (retry, strategy, timeout = DEFAULT_TIMEOUT_SECONDS) => {
|
|
26
|
+
const timeoutTimestamp = Date.now() + timeout * 1e3;
|
|
27
|
+
let retryCount = 0;
|
|
28
|
+
while (Date.now() <= timeoutTimestamp) {
|
|
29
|
+
const delay = strategy.next(retryCount += 1).value * 1e3;
|
|
30
|
+
if (timeoutTimestamp <= Date.now() + delay) break;
|
|
31
|
+
await sleep.sleep(delay);
|
|
32
|
+
const { value, done } = await retry();
|
|
33
|
+
if (done) return value;
|
|
34
|
+
}
|
|
35
|
+
throw new Error(`Timeout after ${timeout}s`);
|
|
36
|
+
};
|
|
37
|
+
const waitForResource = (stop, fetcher, request, options, strategy = createExponentialBackoffStrategy(
|
|
38
|
+
options?.minDelay ?? DEFAULT_MIN_DELAY_SECONDS,
|
|
39
|
+
options?.maxDelay ?? DEFAULT_MAX_DELAY_SECONDS
|
|
40
|
+
)) => tryAtIntervals(
|
|
41
|
+
async () => {
|
|
42
|
+
const value = await fetcher(request);
|
|
43
|
+
return {
|
|
44
|
+
done: await stop(value),
|
|
45
|
+
value
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
strategy,
|
|
49
|
+
options?.timeout
|
|
50
|
+
);
|
|
51
|
+
exports.createExponentialBackoffStrategy = createExponentialBackoffStrategy;
|
|
52
|
+
exports.tryAtIntervals = tryAtIntervals;
|
|
53
|
+
exports.waitForResource = waitForResource;
|
package/{dist → node_modules/@scaleway/sdk-client/dist}/internal/async/interval-retrier.d.ts
RENAMED
|
@@ -67,7 +67,7 @@ export type WaitForStopCondition<T> = (obj: T) => Promise<boolean>;
|
|
|
67
67
|
*
|
|
68
68
|
* @public
|
|
69
69
|
*/
|
|
70
|
-
export
|
|
70
|
+
export interface WaitForOptions<T> {
|
|
71
71
|
/**
|
|
72
72
|
* Timeout in seconds.
|
|
73
73
|
*
|
|
@@ -92,7 +92,7 @@ export type WaitForOptions<T> = {
|
|
|
92
92
|
* @defaultValue Waits for non-transient value.
|
|
93
93
|
*/
|
|
94
94
|
stop?: WaitForStopCondition<T>;
|
|
95
|
-
}
|
|
95
|
+
}
|
|
96
96
|
type ResourceFetcher<T, R> = (request: R) => Promise<T>;
|
|
97
97
|
/**
|
|
98
98
|
* Fetches resource several times until an expected condition is reached, timeouts, or throws an exception.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { sleep } from "./sleep.js";
|
|
2
|
+
const DEFAULT_TIMEOUT_SECONDS = 300;
|
|
3
|
+
const DEFAULT_MIN_DELAY_SECONDS = 1;
|
|
4
|
+
const DEFAULT_MAX_DELAY_SECONDS = 30;
|
|
5
|
+
function* createExponentialBackoffStrategy(minDelay, maxDelay) {
|
|
6
|
+
if (minDelay < 1 || maxDelay < 1 || minDelay > maxDelay) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"Waiter: minDelay must be >= 1 and maxDelay must be >= minDelay"
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
let attempt = 1;
|
|
12
|
+
const ceiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;
|
|
13
|
+
const randomInRange = (min, max) => min + Math.random() * (max - min);
|
|
14
|
+
while (true) {
|
|
15
|
+
if (attempt > ceiling) {
|
|
16
|
+
yield maxDelay;
|
|
17
|
+
} else {
|
|
18
|
+
yield randomInRange(minDelay, minDelay * 2 ** (attempt - 1));
|
|
19
|
+
}
|
|
20
|
+
attempt += 1;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const tryAtIntervals = async (retry, strategy, timeout = DEFAULT_TIMEOUT_SECONDS) => {
|
|
24
|
+
const timeoutTimestamp = Date.now() + timeout * 1e3;
|
|
25
|
+
let retryCount = 0;
|
|
26
|
+
while (Date.now() <= timeoutTimestamp) {
|
|
27
|
+
const delay = strategy.next(retryCount += 1).value * 1e3;
|
|
28
|
+
if (timeoutTimestamp <= Date.now() + delay) break;
|
|
29
|
+
await sleep(delay);
|
|
30
|
+
const { value, done } = await retry();
|
|
31
|
+
if (done) return value;
|
|
32
|
+
}
|
|
33
|
+
throw new Error(`Timeout after ${timeout}s`);
|
|
34
|
+
};
|
|
35
|
+
const waitForResource = (stop, fetcher, request, options, strategy = createExponentialBackoffStrategy(
|
|
36
|
+
options?.minDelay ?? DEFAULT_MIN_DELAY_SECONDS,
|
|
37
|
+
options?.maxDelay ?? DEFAULT_MAX_DELAY_SECONDS
|
|
38
|
+
)) => tryAtIntervals(
|
|
39
|
+
async () => {
|
|
40
|
+
const value = await fetcher(request);
|
|
41
|
+
return {
|
|
42
|
+
done: await stop(value),
|
|
43
|
+
value
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
strategy,
|
|
47
|
+
options?.timeout
|
|
48
|
+
);
|
|
49
|
+
export {
|
|
50
|
+
createExponentialBackoffStrategy,
|
|
51
|
+
tryAtIntervals,
|
|
52
|
+
waitForResource
|
|
53
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const composeRequestInterceptors = (interceptors) => async (request) => interceptors.reduce(
|
|
4
|
+
async (asyncResult, interceptor) => interceptor({ request: await asyncResult }),
|
|
5
|
+
Promise.resolve(request)
|
|
6
|
+
);
|
|
7
|
+
const composeResponseInterceptors = (interceptors) => async (response) => interceptors.reduce(
|
|
8
|
+
async (asyncResult, interceptor) => interceptor({ response: await asyncResult }),
|
|
9
|
+
Promise.resolve(response)
|
|
10
|
+
);
|
|
11
|
+
const composeResponseErrorInterceptors = (interceptors) => async (request, error) => {
|
|
12
|
+
let prevError = error;
|
|
13
|
+
for (const interceptor of interceptors) {
|
|
14
|
+
try {
|
|
15
|
+
const res = await interceptor({ request, error: prevError });
|
|
16
|
+
return res;
|
|
17
|
+
} catch (err) {
|
|
18
|
+
prevError = err;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
throw prevError;
|
|
22
|
+
};
|
|
23
|
+
exports.composeRequestInterceptors = composeRequestInterceptors;
|
|
24
|
+
exports.composeResponseErrorInterceptors = composeResponseErrorInterceptors;
|
|
25
|
+
exports.composeResponseInterceptors = composeResponseInterceptors;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const composeRequestInterceptors = (interceptors) => async (request) => interceptors.reduce(
|
|
2
|
+
async (asyncResult, interceptor) => interceptor({ request: await asyncResult }),
|
|
3
|
+
Promise.resolve(request)
|
|
4
|
+
);
|
|
5
|
+
const composeResponseInterceptors = (interceptors) => async (response) => interceptors.reduce(
|
|
6
|
+
async (asyncResult, interceptor) => interceptor({ response: await asyncResult }),
|
|
7
|
+
Promise.resolve(response)
|
|
8
|
+
);
|
|
9
|
+
const composeResponseErrorInterceptors = (interceptors) => async (request, error) => {
|
|
10
|
+
let prevError = error;
|
|
11
|
+
for (const interceptor of interceptors) {
|
|
12
|
+
try {
|
|
13
|
+
const res = await interceptor({ request, error: prevError });
|
|
14
|
+
return res;
|
|
15
|
+
} catch (err) {
|
|
16
|
+
prevError = err;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
throw prevError;
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
composeRequestInterceptors,
|
|
23
|
+
composeResponseErrorInterceptors,
|
|
24
|
+
composeResponseInterceptors
|
|
25
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const addHeaderInterceptor = (key, value) => ({ request }) => {
|
|
4
|
+
const clone = request.clone();
|
|
5
|
+
if (value !== void 0) {
|
|
6
|
+
clone.headers.append(key, value);
|
|
7
|
+
}
|
|
8
|
+
return clone;
|
|
9
|
+
};
|
|
10
|
+
const addAsyncHeaderInterceptor = (key, getter) => async (request) => addHeaderInterceptor(key, await getter())(request);
|
|
11
|
+
exports.addAsyncHeaderInterceptor = addAsyncHeaderInterceptor;
|
|
12
|
+
exports.addHeaderInterceptor = addHeaderInterceptor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const addHeaderInterceptor = (key, value) => ({ request }) => {
|
|
2
|
+
const clone = request.clone();
|
|
3
|
+
if (value !== void 0) {
|
|
4
|
+
clone.headers.append(key, value);
|
|
5
|
+
}
|
|
6
|
+
return clone;
|
|
7
|
+
};
|
|
8
|
+
const addAsyncHeaderInterceptor = (key, getter) => async (request) => addHeaderInterceptor(key, await getter())(request);
|
|
9
|
+
export {
|
|
10
|
+
addAsyncHeaderInterceptor,
|
|
11
|
+
addHeaderInterceptor
|
|
12
|
+
};
|
|
@@ -82,8 +82,8 @@ export interface ResponseErrorInterceptor {
|
|
|
82
82
|
*
|
|
83
83
|
* @public
|
|
84
84
|
*/
|
|
85
|
-
export
|
|
85
|
+
export interface NetworkInterceptors {
|
|
86
86
|
request?: RequestInterceptor;
|
|
87
87
|
response?: ResponseInterceptor;
|
|
88
88
|
responseError?: ResponseErrorInterceptor;
|
|
89
|
-
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const levelResolver = require("./level-resolver.cjs");
|
|
4
|
+
class ConsoleLogger {
|
|
5
|
+
constructor(logLevel, prefix = "", output = console) {
|
|
6
|
+
this.logLevel = logLevel;
|
|
7
|
+
this.prefix = prefix;
|
|
8
|
+
this.output = output;
|
|
9
|
+
this.level = levelResolver.LevelResolver[this.logLevel];
|
|
10
|
+
}
|
|
11
|
+
level;
|
|
12
|
+
makeMethod(method) {
|
|
13
|
+
return (message) => {
|
|
14
|
+
if (levelResolver.shouldLog(this.level, method)) {
|
|
15
|
+
this.output[method](this.prefix ? `${this.prefix} ${message}` : message);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
debug = this.makeMethod("debug");
|
|
20
|
+
error = this.makeMethod("error");
|
|
21
|
+
info = this.makeMethod("info");
|
|
22
|
+
warn = this.makeMethod("warn");
|
|
23
|
+
}
|
|
24
|
+
exports.ConsoleLogger = ConsoleLogger;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LevelResolver, shouldLog } from "./level-resolver.js";
|
|
2
|
+
class ConsoleLogger {
|
|
3
|
+
constructor(logLevel, prefix = "", output = console) {
|
|
4
|
+
this.logLevel = logLevel;
|
|
5
|
+
this.prefix = prefix;
|
|
6
|
+
this.output = output;
|
|
7
|
+
this.level = LevelResolver[this.logLevel];
|
|
8
|
+
}
|
|
9
|
+
level;
|
|
10
|
+
makeMethod(method) {
|
|
11
|
+
return (message) => {
|
|
12
|
+
if (shouldLog(this.level, method)) {
|
|
13
|
+
this.output[method](this.prefix ? `${this.prefix} ${message}` : message);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
debug = this.makeMethod("debug");
|
|
18
|
+
error = this.makeMethod("error");
|
|
19
|
+
info = this.makeMethod("info");
|
|
20
|
+
warn = this.makeMethod("warn");
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
ConsoleLogger
|
|
24
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const consoleLogger = require("./console-logger.cjs");
|
|
4
|
+
let sdkLogger = new consoleLogger.ConsoleLogger("silent");
|
|
5
|
+
const setLogger = (logger) => {
|
|
6
|
+
sdkLogger = logger;
|
|
7
|
+
};
|
|
8
|
+
const enableConsoleLogger = (logLevel = "warn", prefix = "scaleway-sdk-js:") => setLogger(new consoleLogger.ConsoleLogger(logLevel, prefix));
|
|
9
|
+
const getLogger = () => sdkLogger;
|
|
10
|
+
exports.enableConsoleLogger = enableConsoleLogger;
|
|
11
|
+
exports.getLogger = getLogger;
|
|
12
|
+
exports.setLogger = setLogger;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConsoleLogger } from "./console-logger.js";
|
|
2
|
+
let sdkLogger = new ConsoleLogger("silent");
|
|
3
|
+
const setLogger = (logger) => {
|
|
4
|
+
sdkLogger = logger;
|
|
5
|
+
};
|
|
6
|
+
const enableConsoleLogger = (logLevel = "warn", prefix = "scaleway-sdk-js:") => setLogger(new ConsoleLogger(logLevel, prefix));
|
|
7
|
+
const getLogger = () => sdkLogger;
|
|
8
|
+
export {
|
|
9
|
+
enableConsoleLogger,
|
|
10
|
+
getLogger,
|
|
11
|
+
setLogger
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
var LevelResolver = /* @__PURE__ */ ((LevelResolver2) => {
|
|
4
|
+
LevelResolver2[LevelResolver2["silent"] = 0] = "silent";
|
|
5
|
+
LevelResolver2[LevelResolver2["error"] = 1] = "error";
|
|
6
|
+
LevelResolver2[LevelResolver2["warn"] = 2] = "warn";
|
|
7
|
+
LevelResolver2[LevelResolver2["info"] = 3] = "info";
|
|
8
|
+
LevelResolver2[LevelResolver2["debug"] = 4] = "debug";
|
|
9
|
+
return LevelResolver2;
|
|
10
|
+
})(LevelResolver || {});
|
|
11
|
+
const shouldLog = (currentLevel, level) => LevelResolver[level] <= currentLevel;
|
|
12
|
+
exports.LevelResolver = LevelResolver;
|
|
13
|
+
exports.shouldLog = shouldLog;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var LevelResolver = /* @__PURE__ */ ((LevelResolver2) => {
|
|
2
|
+
LevelResolver2[LevelResolver2["silent"] = 0] = "silent";
|
|
3
|
+
LevelResolver2[LevelResolver2["error"] = 1] = "error";
|
|
4
|
+
LevelResolver2[LevelResolver2["warn"] = 2] = "warn";
|
|
5
|
+
LevelResolver2[LevelResolver2["info"] = 3] = "info";
|
|
6
|
+
LevelResolver2[LevelResolver2["debug"] = 4] = "debug";
|
|
7
|
+
return LevelResolver2;
|
|
8
|
+
})(LevelResolver || {});
|
|
9
|
+
const shouldLog = (currentLevel, level) => LevelResolver[level] <= currentLevel;
|
|
10
|
+
export {
|
|
11
|
+
LevelResolver,
|
|
12
|
+
shouldLog
|
|
13
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const isAccessKeyRegex = /^SCW[A-Z0-9]{17}$/i;
|
|
4
|
+
const isRegionRegex = /^[a-z]{2}-[a-z]{3}$/i;
|
|
5
|
+
const isUUIDRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;
|
|
6
|
+
const isZoneRegex = /^[a-z]{2}-[a-z]{3}-[1-9]$/i;
|
|
7
|
+
const isUUID = (str) => isUUIDRegex.test(str);
|
|
8
|
+
const isAccessKey = (str) => isAccessKeyRegex.test(str);
|
|
9
|
+
const isSecretKey = (str) => isUUID(str);
|
|
10
|
+
const isOrganizationId = (str) => isUUID(str);
|
|
11
|
+
const isProjectId = (str) => isUUID(str);
|
|
12
|
+
const isRegion = (str) => isRegionRegex.test(str);
|
|
13
|
+
const isZone = (str) => isZoneRegex.test(str);
|
|
14
|
+
const isURL = (str) => {
|
|
15
|
+
let url;
|
|
16
|
+
try {
|
|
17
|
+
url = new URL(str);
|
|
18
|
+
} catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
22
|
+
};
|
|
23
|
+
exports.isAccessKey = isAccessKey;
|
|
24
|
+
exports.isOrganizationId = isOrganizationId;
|
|
25
|
+
exports.isProjectId = isProjectId;
|
|
26
|
+
exports.isRegion = isRegion;
|
|
27
|
+
exports.isSecretKey = isSecretKey;
|
|
28
|
+
exports.isURL = isURL;
|
|
29
|
+
exports.isUUID = isUUID;
|
|
30
|
+
exports.isZone = isZone;
|