@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
package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-not-found-error.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const scwError = require("../scw-error.cjs");
|
|
4
|
+
class ResourceNotFoundError extends scwError.ScalewayError {
|
|
5
|
+
constructor(status, body, resource, resourceId) {
|
|
6
|
+
super(
|
|
7
|
+
status,
|
|
8
|
+
body,
|
|
9
|
+
`resource ${resource} with ID ${resourceId} is not found`
|
|
10
|
+
);
|
|
11
|
+
this.status = status;
|
|
12
|
+
this.body = body;
|
|
13
|
+
this.resource = resource;
|
|
14
|
+
this.resourceId = resourceId;
|
|
15
|
+
this.name = "ResourceNotFoundError";
|
|
16
|
+
}
|
|
17
|
+
static fromJSON(status, obj) {
|
|
18
|
+
if (typeof obj.resource !== "string" || typeof obj.resource_id !== "string") {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return new ResourceNotFoundError(status, obj, obj.resource, obj.resource_id);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ResourceNotFoundError = ResourceNotFoundError;
|
package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/resource-not-found-error.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ScalewayError } from "../scw-error.js";
|
|
2
|
+
class ResourceNotFoundError extends ScalewayError {
|
|
3
|
+
constructor(status, body, resource, resourceId) {
|
|
4
|
+
super(
|
|
5
|
+
status,
|
|
6
|
+
body,
|
|
7
|
+
`resource ${resource} with ID ${resourceId} is not found`
|
|
8
|
+
);
|
|
9
|
+
this.status = status;
|
|
10
|
+
this.body = body;
|
|
11
|
+
this.resource = resource;
|
|
12
|
+
this.resourceId = resourceId;
|
|
13
|
+
this.name = "ResourceNotFoundError";
|
|
14
|
+
}
|
|
15
|
+
static fromJSON(status, obj) {
|
|
16
|
+
if (typeof obj.resource !== "string" || typeof obj.resource_id !== "string") {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return new ResourceNotFoundError(status, obj, obj.resource, obj.resource_id);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
ResourceNotFoundError
|
|
24
|
+
};
|
package/node_modules/@scaleway/sdk-client/dist/scw/errors/standard/too-many-requests-error.cjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const json = require("../../../helpers/json.cjs");
|
|
4
|
+
const scwError = require("../scw-error.cjs");
|
|
5
|
+
const buildMessage = (helpMessage, limit, resetSeconds, resetAt) => {
|
|
6
|
+
const details = [];
|
|
7
|
+
if (limit) {
|
|
8
|
+
if (limit.windowSeconds) {
|
|
9
|
+
details.push(`quota is ${limit.quota} for ${limit.windowSeconds}s`);
|
|
10
|
+
} else {
|
|
11
|
+
details.push(`quota is ${limit.quota}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
if (resetSeconds) {
|
|
15
|
+
details.push(`resets in ${resetSeconds}s`);
|
|
16
|
+
} else if (resetAt) {
|
|
17
|
+
details.push(`resets at ${resetAt.toISOString()}`);
|
|
18
|
+
}
|
|
19
|
+
let output = `too many requests`;
|
|
20
|
+
if (details.length > 0) {
|
|
21
|
+
output += ` (${details.join(", ")})`;
|
|
22
|
+
}
|
|
23
|
+
if (helpMessage.length > 0) {
|
|
24
|
+
output += `: ${helpMessage}`;
|
|
25
|
+
}
|
|
26
|
+
return output;
|
|
27
|
+
};
|
|
28
|
+
class TooManyRequestsError extends scwError.ScalewayError {
|
|
29
|
+
constructor(status, body, helpMessage, limit, resetSeconds, resetAt) {
|
|
30
|
+
super(status, body, buildMessage(helpMessage, limit, resetSeconds, resetAt));
|
|
31
|
+
this.status = status;
|
|
32
|
+
this.body = body;
|
|
33
|
+
this.helpMessage = helpMessage;
|
|
34
|
+
this.limit = limit;
|
|
35
|
+
this.resetSeconds = resetSeconds;
|
|
36
|
+
this.resetAt = resetAt;
|
|
37
|
+
this.name = "TooManyRequestsError";
|
|
38
|
+
}
|
|
39
|
+
static fromJSON(status, obj) {
|
|
40
|
+
if (typeof obj.help_message !== "string") return null;
|
|
41
|
+
let limit;
|
|
42
|
+
if (json.isJSONObject(obj.limit) && typeof obj.limit.quota === "number") {
|
|
43
|
+
limit = {
|
|
44
|
+
quota: obj.limit.quota,
|
|
45
|
+
windowSeconds: typeof obj.limit.window_seconds === "number" ? obj.limit.window_seconds : void 0
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return new TooManyRequestsError(
|
|
49
|
+
status,
|
|
50
|
+
obj,
|
|
51
|
+
obj.help_message,
|
|
52
|
+
limit,
|
|
53
|
+
typeof obj.reset_seconds === "number" ? obj.reset_seconds : void 0,
|
|
54
|
+
typeof obj.reset_at === "string" ? new Date(obj.reset_at) : void 0
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.TooManyRequestsError = TooManyRequestsError;
|
|
@@ -5,10 +5,10 @@ import { ScalewayError } from '../scw-error.js';
|
|
|
5
5
|
*
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export interface TooManyRequestsQuotaPolicy {
|
|
9
9
|
quota: number;
|
|
10
10
|
windowSeconds?: number;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
/**
|
|
13
13
|
* TooManyRequestsError error happens when fetching too many times a resource.
|
|
14
14
|
*
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { isJSONObject } from "../../../helpers/json.js";
|
|
2
|
+
import { ScalewayError } from "../scw-error.js";
|
|
3
|
+
const buildMessage = (helpMessage, limit, resetSeconds, resetAt) => {
|
|
4
|
+
const details = [];
|
|
5
|
+
if (limit) {
|
|
6
|
+
if (limit.windowSeconds) {
|
|
7
|
+
details.push(`quota is ${limit.quota} for ${limit.windowSeconds}s`);
|
|
8
|
+
} else {
|
|
9
|
+
details.push(`quota is ${limit.quota}`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
if (resetSeconds) {
|
|
13
|
+
details.push(`resets in ${resetSeconds}s`);
|
|
14
|
+
} else if (resetAt) {
|
|
15
|
+
details.push(`resets at ${resetAt.toISOString()}`);
|
|
16
|
+
}
|
|
17
|
+
let output = `too many requests`;
|
|
18
|
+
if (details.length > 0) {
|
|
19
|
+
output += ` (${details.join(", ")})`;
|
|
20
|
+
}
|
|
21
|
+
if (helpMessage.length > 0) {
|
|
22
|
+
output += `: ${helpMessage}`;
|
|
23
|
+
}
|
|
24
|
+
return output;
|
|
25
|
+
};
|
|
26
|
+
class TooManyRequestsError extends ScalewayError {
|
|
27
|
+
constructor(status, body, helpMessage, limit, resetSeconds, resetAt) {
|
|
28
|
+
super(status, body, buildMessage(helpMessage, limit, resetSeconds, resetAt));
|
|
29
|
+
this.status = status;
|
|
30
|
+
this.body = body;
|
|
31
|
+
this.helpMessage = helpMessage;
|
|
32
|
+
this.limit = limit;
|
|
33
|
+
this.resetSeconds = resetSeconds;
|
|
34
|
+
this.resetAt = resetAt;
|
|
35
|
+
this.name = "TooManyRequestsError";
|
|
36
|
+
}
|
|
37
|
+
static fromJSON(status, obj) {
|
|
38
|
+
if (typeof obj.help_message !== "string") return null;
|
|
39
|
+
let limit;
|
|
40
|
+
if (isJSONObject(obj.limit) && typeof obj.limit.quota === "number") {
|
|
41
|
+
limit = {
|
|
42
|
+
quota: obj.limit.quota,
|
|
43
|
+
windowSeconds: typeof obj.limit.window_seconds === "number" ? obj.limit.window_seconds : void 0
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return new TooManyRequestsError(
|
|
47
|
+
status,
|
|
48
|
+
obj,
|
|
49
|
+
obj.help_message,
|
|
50
|
+
limit,
|
|
51
|
+
typeof obj.reset_seconds === "number" ? obj.reset_seconds : void 0,
|
|
52
|
+
typeof obj.reset_at === "string" ? new Date(obj.reset_at) : void 0
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
TooManyRequestsError
|
|
58
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const scwError = require("../scw-error.cjs");
|
|
4
|
+
class TransientStateError extends scwError.ScalewayError {
|
|
5
|
+
constructor(status, body, resource, resourceId, currentState) {
|
|
6
|
+
super(
|
|
7
|
+
status,
|
|
8
|
+
body,
|
|
9
|
+
`resource ${resource} with ID ${resourceId} is in a transient state: ${currentState}`
|
|
10
|
+
);
|
|
11
|
+
this.status = status;
|
|
12
|
+
this.body = body;
|
|
13
|
+
this.resource = resource;
|
|
14
|
+
this.resourceId = resourceId;
|
|
15
|
+
this.currentState = currentState;
|
|
16
|
+
this.name = "TransientStateError";
|
|
17
|
+
}
|
|
18
|
+
static fromJSON(status, obj) {
|
|
19
|
+
if (typeof obj.resource !== "string" || typeof obj.resource_id !== "string" || typeof obj.current_state !== "string") {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return new TransientStateError(
|
|
23
|
+
status,
|
|
24
|
+
obj,
|
|
25
|
+
obj.resource,
|
|
26
|
+
obj.resource_id,
|
|
27
|
+
obj.current_state
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TransientStateError = TransientStateError;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ScalewayError } from "../scw-error.js";
|
|
2
|
+
class TransientStateError extends ScalewayError {
|
|
3
|
+
constructor(status, body, resource, resourceId, currentState) {
|
|
4
|
+
super(
|
|
5
|
+
status,
|
|
6
|
+
body,
|
|
7
|
+
`resource ${resource} with ID ${resourceId} is in a transient state: ${currentState}`
|
|
8
|
+
);
|
|
9
|
+
this.status = status;
|
|
10
|
+
this.body = body;
|
|
11
|
+
this.resource = resource;
|
|
12
|
+
this.resourceId = resourceId;
|
|
13
|
+
this.currentState = currentState;
|
|
14
|
+
this.name = "TransientStateError";
|
|
15
|
+
}
|
|
16
|
+
static fromJSON(status, obj) {
|
|
17
|
+
if (typeof obj.resource !== "string" || typeof obj.resource_id !== "string" || typeof obj.current_state !== "string") {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return new TransientStateError(
|
|
21
|
+
status,
|
|
22
|
+
obj,
|
|
23
|
+
obj.resource,
|
|
24
|
+
obj.resource_id,
|
|
25
|
+
obj.current_state
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
TransientStateError
|
|
31
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const json = require("../../helpers/json.cjs");
|
|
4
|
+
const isRecordOfStringArray = (obj) => {
|
|
5
|
+
if (!json.isJSONObject(obj)) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
for (const elt of Object.values(obj)) {
|
|
9
|
+
if (!Array.isArray(elt) || Object.values(elt).find((x) => typeof x !== "string") !== void 0) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return true;
|
|
14
|
+
};
|
|
15
|
+
exports.isRecordOfStringArray = isRecordOfStringArray;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isJSONObject } from "../../helpers/json.js";
|
|
2
|
+
const isRecordOfStringArray = (obj) => {
|
|
3
|
+
if (!isJSONObject(obj)) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
for (const elt of Object.values(obj)) {
|
|
7
|
+
if (!Array.isArray(elt) || Object.values(elt).find((x) => typeof x !== "string") !== void 0) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
isRecordOfStringArray
|
|
15
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const isBrowser = require("../../helpers/is-browser.cjs");
|
|
4
|
+
const composer = require("../../internal/interceptors/composer.cjs");
|
|
5
|
+
const auth = require("../auth.cjs");
|
|
6
|
+
const httpInterceptors = require("./http-interceptors.cjs");
|
|
7
|
+
const responseParser = require("./response-parser.cjs");
|
|
8
|
+
const buildRequest = (request, settings) => {
|
|
9
|
+
let { path } = request;
|
|
10
|
+
if (request.urlParams instanceof URLSearchParams) {
|
|
11
|
+
path = path.concat(`?${request.urlParams.toString()}`);
|
|
12
|
+
}
|
|
13
|
+
return new Request(`${settings.apiURL}${path}`, {
|
|
14
|
+
body: request.body,
|
|
15
|
+
headers: {
|
|
16
|
+
Accept: "application/json",
|
|
17
|
+
.../* istanbul ignore next */
|
|
18
|
+
!isBrowser.isBrowser() ? { "User-Agent": settings.userAgent } : {},
|
|
19
|
+
...request.headers
|
|
20
|
+
},
|
|
21
|
+
method: request.method
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const asIs = (response) => response;
|
|
25
|
+
const buildFetcher = (settings, httpClient) => {
|
|
26
|
+
let requestNumber = 0;
|
|
27
|
+
const prepareRequest = (requestId) => composer.composeRequestInterceptors([
|
|
28
|
+
...settings.interceptors.map((obj) => obj.request).filter((obj) => obj),
|
|
29
|
+
httpInterceptors.logRequest(requestId, httpInterceptors.obfuscateInterceptor(auth.obfuscateAuthHeadersEntry))
|
|
30
|
+
]);
|
|
31
|
+
const prepareResponse = (requestId) => composer.composeResponseInterceptors([
|
|
32
|
+
...settings.interceptors.map((obj) => obj.response).filter((obj) => obj),
|
|
33
|
+
httpInterceptors.logResponse(requestId)
|
|
34
|
+
]);
|
|
35
|
+
const prepareResponseErrors = () => composer.composeResponseErrorInterceptors(
|
|
36
|
+
settings.interceptors.map((obj) => obj.responseError).filter((obj) => obj)
|
|
37
|
+
);
|
|
38
|
+
return async (request, unwrapper = asIs) => {
|
|
39
|
+
const requestId = `${requestNumber += 1}`;
|
|
40
|
+
const reqInterceptors = prepareRequest(requestId);
|
|
41
|
+
const finalRequest = await reqInterceptors(buildRequest(request, settings));
|
|
42
|
+
try {
|
|
43
|
+
const response = await httpClient(finalRequest);
|
|
44
|
+
const resInterceptors = prepareResponse(requestId);
|
|
45
|
+
const finalResponse = await resInterceptors(response);
|
|
46
|
+
const resUnmarshaller = responseParser.responseParser(
|
|
47
|
+
unwrapper,
|
|
48
|
+
request.responseType ?? "json"
|
|
49
|
+
);
|
|
50
|
+
const unmarshaledResponse = await resUnmarshaller(finalResponse);
|
|
51
|
+
return unmarshaledResponse;
|
|
52
|
+
} catch (err) {
|
|
53
|
+
const resErrorInterceptors = prepareResponseErrors();
|
|
54
|
+
const handledError = await resErrorInterceptors(finalRequest, err);
|
|
55
|
+
return unwrapper(handledError);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
exports.buildFetcher = buildFetcher;
|
|
60
|
+
exports.buildRequest = buildRequest;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { isBrowser } from "../../helpers/is-browser.js";
|
|
2
|
+
import { composeRequestInterceptors, composeResponseInterceptors, composeResponseErrorInterceptors } from "../../internal/interceptors/composer.js";
|
|
3
|
+
import { obfuscateAuthHeadersEntry } from "../auth.js";
|
|
4
|
+
import { logRequest, logResponse, obfuscateInterceptor } from "./http-interceptors.js";
|
|
5
|
+
import { responseParser } from "./response-parser.js";
|
|
6
|
+
const buildRequest = (request, settings) => {
|
|
7
|
+
let { path } = request;
|
|
8
|
+
if (request.urlParams instanceof URLSearchParams) {
|
|
9
|
+
path = path.concat(`?${request.urlParams.toString()}`);
|
|
10
|
+
}
|
|
11
|
+
return new Request(`${settings.apiURL}${path}`, {
|
|
12
|
+
body: request.body,
|
|
13
|
+
headers: {
|
|
14
|
+
Accept: "application/json",
|
|
15
|
+
.../* istanbul ignore next */
|
|
16
|
+
!isBrowser() ? { "User-Agent": settings.userAgent } : {},
|
|
17
|
+
...request.headers
|
|
18
|
+
},
|
|
19
|
+
method: request.method
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const asIs = (response) => response;
|
|
23
|
+
const buildFetcher = (settings, httpClient) => {
|
|
24
|
+
let requestNumber = 0;
|
|
25
|
+
const prepareRequest = (requestId) => composeRequestInterceptors([
|
|
26
|
+
...settings.interceptors.map((obj) => obj.request).filter((obj) => obj),
|
|
27
|
+
logRequest(requestId, obfuscateInterceptor(obfuscateAuthHeadersEntry))
|
|
28
|
+
]);
|
|
29
|
+
const prepareResponse = (requestId) => composeResponseInterceptors([
|
|
30
|
+
...settings.interceptors.map((obj) => obj.response).filter((obj) => obj),
|
|
31
|
+
logResponse(requestId)
|
|
32
|
+
]);
|
|
33
|
+
const prepareResponseErrors = () => composeResponseErrorInterceptors(
|
|
34
|
+
settings.interceptors.map((obj) => obj.responseError).filter((obj) => obj)
|
|
35
|
+
);
|
|
36
|
+
return async (request, unwrapper = asIs) => {
|
|
37
|
+
const requestId = `${requestNumber += 1}`;
|
|
38
|
+
const reqInterceptors = prepareRequest(requestId);
|
|
39
|
+
const finalRequest = await reqInterceptors(buildRequest(request, settings));
|
|
40
|
+
try {
|
|
41
|
+
const response = await httpClient(finalRequest);
|
|
42
|
+
const resInterceptors = prepareResponse(requestId);
|
|
43
|
+
const finalResponse = await resInterceptors(response);
|
|
44
|
+
const resUnmarshaller = responseParser(
|
|
45
|
+
unwrapper,
|
|
46
|
+
request.responseType ?? "json"
|
|
47
|
+
);
|
|
48
|
+
const unmarshaledResponse = await resUnmarshaller(finalResponse);
|
|
49
|
+
return unmarshaledResponse;
|
|
50
|
+
} catch (err) {
|
|
51
|
+
const resErrorInterceptors = prepareResponseErrors();
|
|
52
|
+
const handledError = await resErrorInterceptors(finalRequest, err);
|
|
53
|
+
return unwrapper(handledError);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
buildFetcher,
|
|
59
|
+
buildRequest
|
|
60
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const toPascalCase = (str) => str.replace(
|
|
4
|
+
/\w+/g,
|
|
5
|
+
(word) => `${word[0].toUpperCase()}${word.slice(1).toLowerCase()}`
|
|
6
|
+
);
|
|
7
|
+
const serializeHeadersEntry = ([name, value]) => `${toPascalCase(name)}: ${value}`;
|
|
8
|
+
const serializeHeaders = (headers) => Array.from(headers.entries(), serializeHeadersEntry);
|
|
9
|
+
const dumpRequest = async (request) => [
|
|
10
|
+
`${request.method.toUpperCase()}: ${request.url}`,
|
|
11
|
+
...serializeHeaders(request.headers),
|
|
12
|
+
await request.clone().text()
|
|
13
|
+
].join("\r\n");
|
|
14
|
+
const dumpResponse = async (response) => [
|
|
15
|
+
`HTTP ${response.status} ${response.ok ? "OK" : "NOK"}`,
|
|
16
|
+
...serializeHeaders(response.headers),
|
|
17
|
+
await response.clone().text()
|
|
18
|
+
].join("\r\n");
|
|
19
|
+
exports.dumpRequest = dumpRequest;
|
|
20
|
+
exports.dumpResponse = dumpResponse;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const toPascalCase = (str) => str.replace(
|
|
2
|
+
/\w+/g,
|
|
3
|
+
(word) => `${word[0].toUpperCase()}${word.slice(1).toLowerCase()}`
|
|
4
|
+
);
|
|
5
|
+
const serializeHeadersEntry = ([name, value]) => `${toPascalCase(name)}: ${value}`;
|
|
6
|
+
const serializeHeaders = (headers) => Array.from(headers.entries(), serializeHeadersEntry);
|
|
7
|
+
const dumpRequest = async (request) => [
|
|
8
|
+
`${request.method.toUpperCase()}: ${request.url}`,
|
|
9
|
+
...serializeHeaders(request.headers),
|
|
10
|
+
await request.clone().text()
|
|
11
|
+
].join("\r\n");
|
|
12
|
+
const dumpResponse = async (response) => [
|
|
13
|
+
`HTTP ${response.status} ${response.ok ? "OK" : "NOK"}`,
|
|
14
|
+
...serializeHeaders(response.headers),
|
|
15
|
+
await response.clone().text()
|
|
16
|
+
].join("\r\n");
|
|
17
|
+
export {
|
|
18
|
+
dumpRequest,
|
|
19
|
+
dumpResponse
|
|
20
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../../internal/logger/index.cjs");
|
|
4
|
+
const levelResolver = require("../../internal/logger/level-resolver.cjs");
|
|
5
|
+
const httpDumper = require("./http-dumper.cjs");
|
|
6
|
+
class ObfuscatedRequest extends Request {
|
|
7
|
+
constructor(request, obfuscate) {
|
|
8
|
+
super(request);
|
|
9
|
+
this.request = request;
|
|
10
|
+
this.obfuscate = obfuscate;
|
|
11
|
+
}
|
|
12
|
+
get headers() {
|
|
13
|
+
return new Headers(Array.from(this.request.headers, this.obfuscate));
|
|
14
|
+
}
|
|
15
|
+
clone() {
|
|
16
|
+
return new ObfuscatedRequest(this.request, this.obfuscate);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const obfuscateInterceptor = (obfuscate) => ({ request }) => new ObfuscatedRequest(request, obfuscate);
|
|
20
|
+
const identity = ({ request }) => request;
|
|
21
|
+
const logRequest = (identifier, obfuscate = identity) => async ({ request }) => {
|
|
22
|
+
if (levelResolver.shouldLog(levelResolver.LevelResolver[index.getLogger().logLevel], "debug")) {
|
|
23
|
+
index.getLogger().debug(
|
|
24
|
+
`--------------- Scaleway SDK REQUEST ${identifier} ---------------
|
|
25
|
+
${await httpDumper.dumpRequest(await obfuscate({ request }))}
|
|
26
|
+
---------------------------------------------------------`
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
return request;
|
|
30
|
+
};
|
|
31
|
+
const logResponse = (identifier) => async ({ response }) => {
|
|
32
|
+
if (levelResolver.shouldLog(levelResolver.LevelResolver[index.getLogger().logLevel], "debug")) {
|
|
33
|
+
index.getLogger().debug(
|
|
34
|
+
`--------------- Scaleway SDK RESPONSE ${identifier} ---------------
|
|
35
|
+
${await httpDumper.dumpResponse(response)}
|
|
36
|
+
---------------------------------------------------------`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
return response;
|
|
40
|
+
};
|
|
41
|
+
exports.logRequest = logRequest;
|
|
42
|
+
exports.logResponse = logResponse;
|
|
43
|
+
exports.obfuscateInterceptor = obfuscateInterceptor;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { getLogger } from "../../internal/logger/index.js";
|
|
2
|
+
import { shouldLog, LevelResolver } from "../../internal/logger/level-resolver.js";
|
|
3
|
+
import { dumpRequest, dumpResponse } from "./http-dumper.js";
|
|
4
|
+
class ObfuscatedRequest extends Request {
|
|
5
|
+
constructor(request, obfuscate) {
|
|
6
|
+
super(request);
|
|
7
|
+
this.request = request;
|
|
8
|
+
this.obfuscate = obfuscate;
|
|
9
|
+
}
|
|
10
|
+
get headers() {
|
|
11
|
+
return new Headers(Array.from(this.request.headers, this.obfuscate));
|
|
12
|
+
}
|
|
13
|
+
clone() {
|
|
14
|
+
return new ObfuscatedRequest(this.request, this.obfuscate);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const obfuscateInterceptor = (obfuscate) => ({ request }) => new ObfuscatedRequest(request, obfuscate);
|
|
18
|
+
const identity = ({ request }) => request;
|
|
19
|
+
const logRequest = (identifier, obfuscate = identity) => async ({ request }) => {
|
|
20
|
+
if (shouldLog(LevelResolver[getLogger().logLevel], "debug")) {
|
|
21
|
+
getLogger().debug(
|
|
22
|
+
`--------------- Scaleway SDK REQUEST ${identifier} ---------------
|
|
23
|
+
${await dumpRequest(await obfuscate({ request }))}
|
|
24
|
+
---------------------------------------------------------`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return request;
|
|
28
|
+
};
|
|
29
|
+
const logResponse = (identifier) => async ({ response }) => {
|
|
30
|
+
if (shouldLog(LevelResolver[getLogger().logLevel], "debug")) {
|
|
31
|
+
getLogger().debug(
|
|
32
|
+
`--------------- Scaleway SDK RESPONSE ${identifier} ---------------
|
|
33
|
+
${await dumpResponse(response)}
|
|
34
|
+
---------------------------------------------------------`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
return response;
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
logRequest,
|
|
41
|
+
logResponse,
|
|
42
|
+
obfuscateInterceptor
|
|
43
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const extract = (key) => (result) => result[key];
|
|
4
|
+
function* pages(key, fetcher, request, firstPage) {
|
|
5
|
+
if (!Array.isArray(firstPage[key])) {
|
|
6
|
+
throw new Error(`Property ${key} is not a list in paginated result`);
|
|
7
|
+
}
|
|
8
|
+
const getList = extract(key);
|
|
9
|
+
let page = request.page || 1;
|
|
10
|
+
if (page === 1) {
|
|
11
|
+
yield Promise.resolve(getList(firstPage));
|
|
12
|
+
page += 1;
|
|
13
|
+
}
|
|
14
|
+
const { length } = firstPage[key];
|
|
15
|
+
if (!length) return;
|
|
16
|
+
const { totalCount } = firstPage;
|
|
17
|
+
while (page <= Math.floor((totalCount + length - 1) / length)) {
|
|
18
|
+
yield fetcher({ ...request, page }).then(getList);
|
|
19
|
+
page += 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function* fetchPaginated(key, fetcher, request, initial = fetcher(request)) {
|
|
23
|
+
yield* pages(key, fetcher, request, await initial);
|
|
24
|
+
}
|
|
25
|
+
const fetchAll = async (key, fetcher, request, initial = fetcher(request)) => (await Promise.all(Array.from(pages(key, fetcher, request, await initial)))).flat();
|
|
26
|
+
const enrichForPagination = (key, fetcher, request) => {
|
|
27
|
+
const firstPage = fetcher(request);
|
|
28
|
+
return Object.assign(firstPage, {
|
|
29
|
+
all: () => fetchAll(key, fetcher, request, firstPage),
|
|
30
|
+
[Symbol.asyncIterator]: () => fetchPaginated(key, fetcher, request, firstPage)
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
exports.enrichForPagination = enrichForPagination;
|
|
34
|
+
exports.extract = extract;
|
|
35
|
+
exports.fetchAll = fetchAll;
|
|
36
|
+
exports.fetchPaginated = fetchPaginated;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const extract = (key) => (result) => result[key];
|
|
2
|
+
function* pages(key, fetcher, request, firstPage) {
|
|
3
|
+
if (!Array.isArray(firstPage[key])) {
|
|
4
|
+
throw new Error(`Property ${key} is not a list in paginated result`);
|
|
5
|
+
}
|
|
6
|
+
const getList = extract(key);
|
|
7
|
+
let page = request.page || 1;
|
|
8
|
+
if (page === 1) {
|
|
9
|
+
yield Promise.resolve(getList(firstPage));
|
|
10
|
+
page += 1;
|
|
11
|
+
}
|
|
12
|
+
const { length } = firstPage[key];
|
|
13
|
+
if (!length) return;
|
|
14
|
+
const { totalCount } = firstPage;
|
|
15
|
+
while (page <= Math.floor((totalCount + length - 1) / length)) {
|
|
16
|
+
yield fetcher({ ...request, page }).then(getList);
|
|
17
|
+
page += 1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async function* fetchPaginated(key, fetcher, request, initial = fetcher(request)) {
|
|
21
|
+
yield* pages(key, fetcher, request, await initial);
|
|
22
|
+
}
|
|
23
|
+
const fetchAll = async (key, fetcher, request, initial = fetcher(request)) => (await Promise.all(Array.from(pages(key, fetcher, request, await initial)))).flat();
|
|
24
|
+
const enrichForPagination = (key, fetcher, request) => {
|
|
25
|
+
const firstPage = fetcher(request);
|
|
26
|
+
return Object.assign(firstPage, {
|
|
27
|
+
all: () => fetchAll(key, fetcher, request, firstPage),
|
|
28
|
+
[Symbol.asyncIterator]: () => fetchPaginated(key, fetcher, request, firstPage)
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
enrichForPagination,
|
|
33
|
+
extract,
|
|
34
|
+
fetchAll,
|
|
35
|
+
fetchPaginated
|
|
36
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const isResponse = require("../../helpers/is-response.cjs");
|
|
4
|
+
const json = require("../../helpers/json.cjs");
|
|
5
|
+
const errorParser = require("../errors/error-parser.cjs");
|
|
6
|
+
const scwError = require("../errors/scw-error.cjs");
|
|
7
|
+
const X_TOTAL_COUNT_HEADER_KEY = "x-total-count";
|
|
8
|
+
const TOTAL_COUNT_RES_KEY = "total_count";
|
|
9
|
+
const fixLegacyTotalCount = (obj, headers) => {
|
|
10
|
+
const headerVal = headers.get(X_TOTAL_COUNT_HEADER_KEY);
|
|
11
|
+
if (!headerVal) {
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
const totalCount = parseInt(headerVal, 10);
|
|
15
|
+
if (Number.isNaN(totalCount)) {
|
|
16
|
+
return obj;
|
|
17
|
+
}
|
|
18
|
+
if (json.isJSONObject(obj) && !(TOTAL_COUNT_RES_KEY in obj)) {
|
|
19
|
+
return Object.assign(obj, { [TOTAL_COUNT_RES_KEY]: totalCount });
|
|
20
|
+
}
|
|
21
|
+
return obj;
|
|
22
|
+
};
|
|
23
|
+
const responseParser = (unmarshaller, responseType) => async (response) => {
|
|
24
|
+
if (!isResponse.isResponse(response)) {
|
|
25
|
+
throw new TypeError("Invalid response object");
|
|
26
|
+
}
|
|
27
|
+
if (response.ok) {
|
|
28
|
+
if (response.status === 204) return unmarshaller(void 0);
|
|
29
|
+
const contentType = response.headers.get("Content-Type");
|
|
30
|
+
try {
|
|
31
|
+
if (responseType === "json" && contentType === "application/json") {
|
|
32
|
+
return unmarshaller(
|
|
33
|
+
fixLegacyTotalCount(await response.json(), response.headers)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
if (responseType === "blob") {
|
|
37
|
+
return unmarshaller(await response.blob());
|
|
38
|
+
}
|
|
39
|
+
return unmarshaller(await response.text());
|
|
40
|
+
} catch (err) {
|
|
41
|
+
throw new scwError.ScalewayError(
|
|
42
|
+
response.status,
|
|
43
|
+
`could not parse '${contentType ?? ""}' response${err instanceof Error ? `: ${err.message}` : ""}`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const error = await response.clone().json().catch(() => response.text());
|
|
48
|
+
if (json.isJSONObject(error)) throw errorParser.parseScalewayError(response.status, error);
|
|
49
|
+
throw new scwError.ScalewayError(
|
|
50
|
+
response.status,
|
|
51
|
+
typeof error === "string" ? error : "cannot read error response body"
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
exports.fixLegacyTotalCount = fixLegacyTotalCount;
|
|
55
|
+
exports.responseParser = responseParser;
|