├── .npmrc ├── .husky ├── .gitignore ├── pre-push ├── pre-commit └── commit-msg ├── .prettierignore ├── examples ├── nodejs-minimal │ ├── pnpm-workspace.yaml │ ├── .gitignore │ ├── tsconfig.json │ ├── README.md │ └── package.json ├── serverless-function-minimal │ ├── pnpm-workspace.yaml │ ├── .npmrc │ ├── .env.template │ ├── .gitignore │ ├── tsconfig.json │ ├── package.json │ ├── serverless.yml │ ├── README.md │ └── src │ │ └── index.ts └── .eslintrc ├── pnpm-workspace.yaml ├── packages ├── client │ ├── .npmignore │ ├── src │ │ ├── vendor │ │ │ └── base64 │ │ │ │ ├── README.md │ │ │ │ ├── index.d.ts │ │ │ │ └── LICENSE │ │ ├── helpers │ │ │ ├── is-browser.ts │ │ │ ├── __tests__ │ │ │ │ ├── is-browser.browser.test.ts │ │ │ │ ├── is-browser.node.test.ts │ │ │ │ └── json.test.ts │ │ │ └── is-response.ts │ │ ├── scw │ │ │ ├── api.ts │ │ │ ├── constants.ts │ │ │ ├── errors │ │ │ │ ├── scw-error-from-json.ts │ │ │ │ ├── __tests__ │ │ │ │ │ └── types.test.ts │ │ │ │ ├── types.ts │ │ │ │ └── standard │ │ │ │ │ ├── out-of-stock-error.ts │ │ │ │ │ ├── resource-locked-error.ts │ │ │ │ │ ├── resource-not-found-error.ts │ │ │ │ │ ├── already-exists-error.ts │ │ │ │ │ └── resource-expired-error.ts │ │ │ ├── fetch │ │ │ │ └── types.ts │ │ │ ├── __tests__ │ │ │ │ └── api.test.ts │ │ │ └── locality.ts │ │ ├── internal │ │ │ ├── async │ │ │ │ ├── sleep.ts │ │ │ │ └── __tests__ │ │ │ │ │ └── sleep.test.ts │ │ │ ├── logger │ │ │ │ ├── level-resolver.ts │ │ │ │ ├── logger.ts │ │ │ │ └── index.ts │ │ │ └── interceptors │ │ │ │ └── helpers.ts │ │ ├── internals.ts │ │ └── bridge.ts │ ├── tsconfig.json │ ├── .eslintrc.cjs │ ├── tsconfig.build.json │ └── package.json ├── sdk │ ├── .npmignore │ ├── tsconfig.json │ ├── tsconfig.build.json │ └── vite.config.ts └── configuration-loader │ ├── .npmignore │ ├── tsconfig.json │ ├── src │ ├── __tests__ │ │ └── data │ │ │ └── scw-config.yaml │ ├── index.ts │ ├── env.ts │ └── path-resolver.ts │ ├── .eslintrc.cjs │ ├── tsconfig.build.json │ └── package.json ├── .prettierrc ├── scripts ├── templates │ ├── tsconfig.json │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── biome.generated.json ├── constants.ts └── types.d.ts ├── packages_generated ├── block │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ ├── v1 │ │ │ ├── content.gen.ts │ │ │ ├── validation-rules.gen.ts │ │ │ └── index.gen.ts │ │ └── v1alpha1 │ │ │ ├── content.gen.ts │ │ │ └── validation-rules.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── domain │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── file │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ ├── content.gen.ts │ │ │ ├── index.gen.ts │ │ │ └── validation-rules.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── iam │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── iot │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── ipam │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ ├── validation-rules.gen.ts │ │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── jobs │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── k8s │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ ├── index.ts │ │ │ ├── api.utils.ts │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── kafka │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ └── content.gen.ts │ ├── CHANGELOG.md │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── lb │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ ├── validation-rules.gen.ts │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── mnq │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── qaas │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ ├── validation-rules.gen.ts │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── rdb │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ └── validation-rules.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── redis │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── secret │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1beta1 │ │ │ └── validation-rules.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── std │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── tem │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── test │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ ├── content.gen.ts │ │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── vpc │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v2 │ │ │ └── validation-rules.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── vpcgw │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ ├── v1 │ │ │ └── content.gen.ts │ │ └── v2 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── account │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── audit_trail │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── autoscaling │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── baremetal │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ ├── v3 │ │ │ ├── content.gen.ts │ │ │ └── index.gen.ts │ │ └── v1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── billing │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v2beta1 │ │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── cockpit │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── container │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── dedibox │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── flexibleip │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ ├── validation-rules.gen.ts │ │ │ ├── content.gen.ts │ │ │ └── index.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── function │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1beta1 │ │ │ └── validation-rules.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── inference │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ ├── v1beta1 │ │ │ └── content.gen.ts │ │ └── v1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── instance │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ ├── index.ts │ │ │ ├── validation-rules.gen.ts │ │ │ └── types.utils.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── interlink │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1beta1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── key_manager │ ├── tsconfig.json │ ├── src │ │ └── index.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── marketplace │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v2 │ │ │ └── index.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── mongodb │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ ├── v1 │ │ │ └── content.gen.ts │ │ └── v1alpha1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── registry │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ ├── content.gen.ts │ │ │ └── index.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── s2s_vpn │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ ├── vite.config.ts │ └── package.json ├── webhosting │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── applesilicon │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ ├── validation-rules.gen.ts │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── datawarehouse │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1beta1 │ │ │ └── content.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── edge_services │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1beta1 │ │ │ ├── content.gen.ts │ │ │ └── validation-rules.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── product_catalog │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v2alpha1 │ │ │ └── validation-rules.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── serverless_sqldb │ ├── tsconfig.json │ ├── src │ │ ├── index.gen.ts │ │ └── v1alpha1 │ │ │ ├── content.gen.ts │ │ │ └── index.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts └── environmental_footprint │ ├── tsconfig.json │ ├── src │ ├── index.gen.ts │ └── v1alpha1 │ │ └── index.gen.ts │ ├── tsconfig.build.json │ └── vite.config.ts ├── .editorconfig ├── .github └── workflows │ ├── labeler.yml │ └── check-pull-request.yml ├── lerna.json ├── .gitignore ├── tsconfig.json ├── typedoc.json ├── vitest.config.ts └── turbo.json /.npmrc: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | 4 | package.json -------------------------------------------------------------------------------- /examples/nodejs-minimal/pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - './' 3 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - './' 3 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -n "$CI" ] && exit 0 4 | 5 | pnpm lint-staged 6 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/*' 3 | - 'packages_generated/*' 4 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -n "$CI" ] && exit 0 4 | 5 | pnpm lint-staged 6 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -n "$CI" ] && exit 0 4 | 5 | pnpm commitlint --edit $1 6 | -------------------------------------------------------------------------------- /packages/client/.npmignore: -------------------------------------------------------------------------------- 1 | **/__tests__/** 2 | examples/ 3 | src 4 | .eslintrc.cjs 5 | !.npmignore 6 | -------------------------------------------------------------------------------- /packages/sdk/.npmignore: -------------------------------------------------------------------------------- 1 | **/__tests__/** 2 | examples/ 3 | src 4 | .eslintrc.cjs 5 | !.npmignore 6 | -------------------------------------------------------------------------------- /examples/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "rules": { 4 | "no-console": "off", 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/configuration-loader/.npmignore: -------------------------------------------------------------------------------- 1 | **/__tests__/** 2 | examples/ 3 | src 4 | .eslintrc.cjs 5 | !.npmignore 6 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/.npmrc: -------------------------------------------------------------------------------- 1 | # Required for serverless environment when using PNPM 2 | node-linker=hoisted 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "semi": false, 5 | "arrowParens": "avoid" 6 | } 7 | -------------------------------------------------------------------------------- /examples/nodejs-minimal/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules/ 3 | yarn.lock 4 | pnpm-lock.yaml 5 | 6 | # misc 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /packages/client/src/vendor/base64/README.md: -------------------------------------------------------------------------------- 1 | # base64 2 | 3 | This code is vendored from [github](https://github.com/beatgammit/base64-js) 4 | -------------------------------------------------------------------------------- /packages/sdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /scripts/templates/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/block/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/domain/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/file/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/iam/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/iot/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/ipam/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/jobs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/k8s/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/kafka/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/lb/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/mnq/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/qaas/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/rdb/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/redis/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/secret/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/std/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/tem/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/vpc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/vpcgw/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/account/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/audit_trail/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/autoscaling/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/baremetal/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/billing/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/cockpit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/container/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/dedibox/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/flexibleip/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/function/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/inference/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/instance/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/interlink/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/key_manager/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/marketplace/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/mongodb/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/registry/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/s2s_vpn/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/webhosting/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/client/src/helpers/is-browser.ts: -------------------------------------------------------------------------------- 1 | export const isBrowser = (): boolean => 2 | typeof window !== 'undefined' && typeof window.document !== 'undefined' 3 | -------------------------------------------------------------------------------- /packages/configuration-loader/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/applesilicon/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/datawarehouse/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/edge_services/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/product_catalog/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/serverless_sqldb/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages_generated/environmental_footprint/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/.env.template: -------------------------------------------------------------------------------- 1 | SCW_ACCESS_KEY= 2 | SCW_SECRET_KEY= 3 | SCW_DEFAULT_PROJECT_ID= 4 | SCW_DEFAULT_REGION=fr-par 5 | SCW_DEFAULT_ZONE=fr-par-1 6 | -------------------------------------------------------------------------------- /packages_generated/k8s/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as K8Sv1 from './v1/index.js' 7 | -------------------------------------------------------------------------------- /packages_generated/iot/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Iotv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/lb/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Lbv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/rdb/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Rdbv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/vpc/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Vpcv2 from './v2/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/instance/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Instancev1 from './v1/index.js' 7 | -------------------------------------------------------------------------------- /packages_generated/ipam/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Ipamv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/redis/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Redisv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/test/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Testv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/account/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Accountv3 from './v3/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/cockpit/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Cockpitv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/dedibox/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Dediboxv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/mnq/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Mnqv1beta1 from './v1beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/registry/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Registryv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/domain/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Domainv2beta1 from './v2beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/file/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Filev1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/iam/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Iamv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/jobs/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Jobsv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/kafka/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Kafkav1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/marketplace/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Marketplacev2 from './v2/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/qaas/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Qaasv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/secret/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Secretv1beta1 from './v1beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/tem/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Temv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/webhosting/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Webhostingv1 from './v1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/billing/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Billingv2beta1 from './v2beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/function/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Functionv1beta1 from './v1beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/s2s_vpn/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as S2SVpnv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules/ 3 | yarn.lock 4 | pnpm-lock.yaml 5 | 6 | # misc 7 | .DS_Store 8 | 9 | # serverless 10 | .serverless 11 | .env 12 | -------------------------------------------------------------------------------- /packages_generated/container/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Containerv1beta1 from './v1beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/flexibleip/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Flexibleipv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/interlink/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Interlinkv1beta1 from './v1beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/applesilicon/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Applesiliconv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/audit_trail/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as AuditTrailv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/autoscaling/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Autoscalingv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/datawarehouse/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Datawarehousev1beta1 from './v1beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/edge_services/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as EdgeServicesv1beta1 from './v1beta1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/instance/src/v1/index.ts: -------------------------------------------------------------------------------- 1 | export { InstanceV1UtilsAPI as API } from './api.utils' 2 | export * from './content.gen' 3 | export type * from './types.gen' 4 | export type * from './types.utils' 5 | -------------------------------------------------------------------------------- /packages_generated/key_manager/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as KeyManagerv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages/client/src/vendor/base64/index.d.ts: -------------------------------------------------------------------------------- 1 | export function byteLength(b64: string): number 2 | export function toByteArray(b64: string): Uint8Array 3 | export function fromByteArray(uint8: Uint8Array): string 4 | -------------------------------------------------------------------------------- /packages_generated/product_catalog/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as ProductCatalogv2alpha1 from './v2alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/serverless_sqldb/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as ServerlessSqldbv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/k8s/src/v1/index.ts: -------------------------------------------------------------------------------- 1 | export { K8SUtilsAPI as API } from './api.utils' 2 | export * from './content.gen' 3 | export type * from './types.gen' 4 | export * as ValidationRules from './validation-rules.gen' 5 | -------------------------------------------------------------------------------- /packages_generated/environmental_footprint/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as EnvironmentalFootprintv1alpha1 from './v1alpha1/index.gen.js' 7 | -------------------------------------------------------------------------------- /packages_generated/vpcgw/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Vpcgwv1 from './v1/index.gen.js' 7 | export * as Vpcgwv2 from './v2/index.gen.js' 8 | -------------------------------------------------------------------------------- /packages/configuration-loader/src/__tests__/data/scw-config.yaml: -------------------------------------------------------------------------------- 1 | dKey1: value1 2 | dKey2: value2 3 | #dKey3: value3 4 | dKey4: value4 5 | 6 | profiles: 7 | dev: 8 | devKey1: value5 9 | prod: 10 | prodKey1: value6 11 | -------------------------------------------------------------------------------- /packages_generated/baremetal/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Baremetalv1 from './v1/index.gen.js' 7 | export * as Baremetalv3 from './v3/index.gen.js' 8 | -------------------------------------------------------------------------------- /packages_generated/block/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Blockv1 from './v1/index.gen.js' 7 | export * as Blockv1alpha1 from './v1alpha1/index.gen.js' 8 | -------------------------------------------------------------------------------- /packages_generated/mongodb/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Mongodbv1 from './v1/index.gen.js' 7 | export * as Mongodbv1alpha1 from './v1alpha1/index.gen.js' 8 | -------------------------------------------------------------------------------- /packages_generated/inference/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is automatically generated 3 | * PLEASE DO NOT EDIT HERE 4 | */ 5 | 6 | export * as Inferencev1 from './v1/index.gen.js' 7 | export * as Inferencev1beta1 from './v1beta1/index.gen.js' 8 | -------------------------------------------------------------------------------- /packages_generated/std/src/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export type { 4 | CountryCode, 5 | LanguageCode, 6 | } from './types.gen.js' 7 | -------------------------------------------------------------------------------- /packages/client/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | const { join } = require('node:path') 2 | 3 | module.exports = { 4 | rules: { 5 | 'import/no-extraneous-dependencies': [ 6 | 'error', 7 | { packageDir: [__dirname, join(__dirname, '../../')] }, 8 | ], 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /packages/client/src/scw/api.ts: -------------------------------------------------------------------------------- 1 | import type { Client } from './client.js' 2 | 3 | /** 4 | * Abstract class to instantiate API from a {@link Client}. 5 | * 6 | * @internal 7 | */ 8 | export abstract class API { 9 | constructor(protected client: Client) {} 10 | } 11 | -------------------------------------------------------------------------------- /packages/client/src/scw/constants.ts: -------------------------------------------------------------------------------- 1 | import pkg from '../../package.json' 2 | 3 | export const { version } = pkg 4 | export const userAgent = `scaleway-sdk-js/${version}` 5 | 6 | export const SESSION_HEADER_KEY = 'x-session-token' 7 | export const AUTH_HEADER_KEY = 'x-auth-token' 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /packages/configuration-loader/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | const { join } = require('node:path') 2 | 3 | module.exports = { 4 | rules: { 5 | 'import/no-extraneous-dependencies': [ 6 | 'error', 7 | { packageDir: [__dirname, join(__dirname, '../../')] }, 8 | ], 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /packages_generated/secret/src/v1beta1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const DatabaseCredentials = { 5 | port: { 6 | pattern: /^[0-9]+$/, 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /packages_generated/rdb/src/v1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const UpdateInstanceRequest = { 5 | backupScheduleStartHour: { 6 | lessThanOrEqual: 23, 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /packages_generated/ipam/src/v1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const ListIPsRequest = { 5 | resourceName: { 6 | maxLength: 63, 7 | minLength: 2, 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /packages_generated/applesilicon/src/v1alpha1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const RunnerConfigurationV2 = { 5 | name: { 6 | maxLength: 255, 7 | minLength: 1, 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /packages/configuration-loader/src/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | loadAllProfilesFromConfigurationFile, 3 | loadProfileFromConfigurationFile, 4 | loadProfileFromEnvironmentValues, 5 | } from './config-loader.js' 6 | export type { 7 | AllProfilesFromFileParams, 8 | Profile, 9 | ProfileFromFileParams, 10 | } from './types.js' 11 | -------------------------------------------------------------------------------- /packages/client/src/helpers/__tests__/is-browser.browser.test.ts: -------------------------------------------------------------------------------- 1 | // @vitest-environment jsdom 2 | import { describe, expect, it } from 'vitest' 3 | import { isBrowser } from '../is-browser.js' 4 | 5 | describe('isBrowser', () => { 6 | it('returns true by default', () => { 7 | expect(isBrowser()).toBe(true) 8 | }) 9 | }) 10 | -------------------------------------------------------------------------------- /packages/client/src/helpers/__tests__/is-browser.node.test.ts: -------------------------------------------------------------------------------- 1 | // @vitest-environment node 2 | 3 | import { describe, expect, it } from 'vitest' 4 | import { isBrowser } from '../is-browser.js' 5 | 6 | describe('isBrowser', () => { 7 | it('returns false by default', () => { 8 | expect(isBrowser()).toBe(false) 9 | }) 10 | }) 11 | -------------------------------------------------------------------------------- /packages/client/src/internal/async/sleep.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Sleep for a specified number of time. 3 | * 4 | * @param ms - The number of milliseconds 5 | * @returns The sleep promise 6 | * 7 | * @internal 8 | */ 9 | export const sleep = (ms: number): Promise => 10 | new Promise(resolve => { 11 | setTimeout(resolve, ms) 12 | }) 13 | -------------------------------------------------------------------------------- /scripts/constants.ts: -------------------------------------------------------------------------------- 1 | import { join } from 'node:path' 2 | import { cwd } from 'node:process' 3 | import type { SDK } from './types' 4 | 5 | export const SDKS = new Set([ 6 | { 7 | path: join(cwd(), 'packages/sdk/package.json'), 8 | index: join(cwd(), 'packages/sdk/src/index.gen.ts'), 9 | type: 'public', 10 | }, 11 | ]) 12 | -------------------------------------------------------------------------------- /examples/nodejs-minimal/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "target": "ES2022", 6 | "outDir": "./dist", 7 | "strict": true, 8 | "strictNullChecks": true, 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/nodejs-minimal/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS example 2 | 3 | ## A. How to run 4 | 5 | **Notes:** depending on the desired authentication method, please update the client init in `src/index.ts`. 6 | 7 | **Steps:** 8 | 9 | 1. Install dependencies: `pnpm install`. 10 | 2. Build the project: `pnpm run build`. 11 | 3. Start the server: `pnpm run start`. 12 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ESNext", 4 | "moduleResolution": "Bundler", 5 | "target": "ES2022", 6 | "outDir": "./dist", 7 | "strict": true, 8 | "strictNullChecks": true, 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/src/internal/logger/level-resolver.ts: -------------------------------------------------------------------------------- 1 | export enum LevelResolver { 2 | silent = 0, 3 | error = 1, 4 | warn = 2, 5 | info = 3, 6 | debug = 4, 7 | } 8 | 9 | export type LogLevel = keyof typeof LevelResolver 10 | 11 | export const shouldLog = (currentLevel: LevelResolver, level: LogLevel) => 12 | LevelResolver[level] <= currentLevel 13 | -------------------------------------------------------------------------------- /packages_generated/test/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { HumanStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link HumanStatus}. */ 6 | export const HUMAN_TRANSIENT_STATUSES: HumanStatus[] = ['running'] 7 | -------------------------------------------------------------------------------- /packages_generated/iot/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { HubStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link HubStatus}. */ 6 | export const HUB_TRANSIENT_STATUSES: HubStatus[] = ['enabling', 'disabling'] 7 | -------------------------------------------------------------------------------- /packages_generated/flexibleip/src/v1alpha1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const ListFlexibleIPsRequest = { 5 | page: { 6 | greaterThan: 0, 7 | }, 8 | pageSize: { 9 | greaterThan: 0, 10 | lessThanOrEqual: 100, 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /packages_generated/std/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: 'Pull Request Labeler' 2 | on: 3 | - pull_request_target 4 | 5 | jobs: 6 | labeler: 7 | permissions: 8 | contents: read 9 | pull-requests: write 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | - name: Labeler 15 | uses: actions/labeler@v5 16 | -------------------------------------------------------------------------------- /packages/client/src/internal/logger/logger.ts: -------------------------------------------------------------------------------- 1 | import type { LogLevel } from './level-resolver.js' 2 | 3 | /** 4 | * Logger. 5 | * 6 | * @public 7 | */ 8 | export interface Logger { 9 | readonly logLevel: LogLevel 10 | debug: (message: string) => void 11 | info: (message: string) => void 12 | warn: (message: string) => void 13 | error: (message: string) => void 14 | } 15 | -------------------------------------------------------------------------------- /packages_generated/iam/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/iot/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/k8s/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/lb/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/mnq/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/qaas/src/v1alpha1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const CreateJobRequest = { 5 | name: { 6 | minLength: 1, 7 | }, 8 | } 9 | 10 | export const CreateProcessRequest = { 11 | name: { 12 | minLength: 1, 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /packages_generated/rdb/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/tem/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/vpc/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/account/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/billing/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/block/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/cockpit/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/dedibox/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/domain/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/file/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/function/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/instance/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/ipam/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/jobs/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/kafka/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | ## 2.0.0 (2025-01-XX) 7 | 8 | ### ⚠ BREAKING CHANGES 9 | 10 | - packages are ESM only 11 | 12 | ### :gear: Features 13 | 14 | - publish packages as ESM only 15 | -------------------------------------------------------------------------------- /packages_generated/kafka/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/mongodb/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/qaas/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/redis/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/registry/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/s2s_vpn/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/secret/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/vpcgw/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/applesilicon/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/audit_trail/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/autoscaling/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/baremetal/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/container/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/datawarehouse/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/edge_services/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/flexibleip/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/inference/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/interlink/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/key_manager/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/marketplace/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/product_catalog/src/v2alpha1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const PublicCatalogApiListPublicCatalogProductsRequest = { 5 | page: { 6 | greaterThanOrEqual: 1, 7 | }, 8 | pageSize: { 9 | greaterThanOrEqual: 1, 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /packages_generated/webhosting/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/sdk/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/product_catalog/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/serverless_sqldb/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/environmental_footprint/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /scripts/templates/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist" 8 | }, 9 | "exclude": [ 10 | "dist/*", 11 | "*.config.ts", 12 | "*.setup.ts", 13 | "**/__tests__", 14 | "**/__mocks__", 15 | "src/**/*.test.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages_generated/lb/src/v1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const HealthCheckHttpConfig = { 5 | hostHeader: { 6 | pattern: /^[^\s]+$/, 7 | }, 8 | } 9 | 10 | export const HealthCheckHttpsConfig = { 11 | hostHeader: { 12 | pattern: /^[^\s]+$/, 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/src/scw/errors/scw-error-from-json.ts: -------------------------------------------------------------------------------- 1 | import type { JSONObject } from '../../helpers/json.js' 2 | import type { ScalewayError } from './scw-error.js' 3 | /** 4 | * Interface with static method that initialize {@link ScalewayError} from JSON. 5 | * 6 | * @internal 7 | */ 8 | export interface ScalewayErrorFromJSONInitializer { 9 | fromJSON(status: number, obj: Readonly): ScalewayError | null 10 | } 11 | -------------------------------------------------------------------------------- /packages_generated/file/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { FileSystemStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link FileSystemStatus}. */ 6 | export const FILE_SYSTEM_TRANSIENT_STATUSES: FileSystemStatus[] = [ 7 | 'creating', 8 | 'updating', 9 | ] 10 | -------------------------------------------------------------------------------- /packages_generated/instance/src/v1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const UpdateSecurityGroupRuleRequest = { 5 | destPortFrom: { 6 | greaterThanOrEqual: 0, 7 | lessThanOrEqual: 65535, 8 | }, 9 | destPortTo: { 10 | greaterThanOrEqual: 0, 11 | lessThanOrEqual: 65535, 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /packages_generated/jobs/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { JobRunState } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link JobRunState}. */ 6 | export const JOB_RUN_TRANSIENT_STATUSES: JobRunState[] = [ 7 | 'queued', 8 | 'scheduled', 9 | 'running', 10 | ] 11 | -------------------------------------------------------------------------------- /packages_generated/kafka/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { ClusterStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link ClusterStatus}. */ 6 | export const CLUSTER_TRANSIENT_STATUSES: ClusterStatus[] = [ 7 | 'creating', 8 | 'configuring', 9 | 'deleting', 10 | ] 11 | -------------------------------------------------------------------------------- /packages/configuration-loader/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist", 8 | "skipLibCheck": true 9 | }, 10 | "exclude": [ 11 | "dist/*", 12 | "*.config.ts", 13 | "*.setup.ts", 14 | "**/__tests__", 15 | "**/__mocks__", 16 | "src/**/*.test.tsx" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages_generated/baremetal/src/v3/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { ServerPrivateNetworkStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */ 6 | export const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: ServerPrivateNetworkStatus[] = 7 | ['attaching', 'detaching'] 8 | -------------------------------------------------------------------------------- /packages_generated/serverless_sqldb/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { DatabaseStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link DatabaseStatus}. */ 6 | export const DATABASE_TRANSIENT_STATUSES: DatabaseStatus[] = [ 7 | 'creating', 8 | 'deleting', 9 | 'restoring', 10 | ] 11 | -------------------------------------------------------------------------------- /packages_generated/s2s_vpn/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { VpnGatewayStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link VpnGatewayStatus}. */ 6 | export const VPN_GATEWAY_TRANSIENT_STATUSES: VpnGatewayStatus[] = [ 7 | 'configuring', 8 | 'provisioning', 9 | 'deprovisioning', 10 | ] 11 | -------------------------------------------------------------------------------- /packages_generated/inference/src/v1beta1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { DeploymentStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link DeploymentStatus}. */ 6 | export const DEPLOYMENT_TRANSIENT_STATUSES: DeploymentStatus[] = [ 7 | 'creating', 8 | 'deploying', 9 | 'deleting', 10 | 'scaling', 11 | ] 12 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": ["packages/*", "packages_generated/*"], 3 | "npmClient": "pnpm", 4 | "version": "independent", 5 | "command": { 6 | "version": { 7 | "conventionalCommits": true, 8 | "message": "chore(release): publish", 9 | "createRelease": "github", 10 | "loglevel": "verbose", 11 | "signGitCommit": true, 12 | "signGitTag": true 13 | } 14 | }, 15 | "$schema": "node_modules/lerna/schemas/lerna-schema.json" 16 | } 17 | -------------------------------------------------------------------------------- /packages_generated/redis/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { ClusterStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link ClusterStatus}. */ 6 | export const CLUSTER_TRANSIENT_STATUSES: ClusterStatus[] = [ 7 | 'provisioning', 8 | 'configuring', 9 | 'deleting', 10 | 'autohealing', 11 | 'initializing', 12 | ] 13 | -------------------------------------------------------------------------------- /scripts/types.d.ts: -------------------------------------------------------------------------------- 1 | export type SDK = { 2 | path: string 3 | index: string 4 | type: 'public' 5 | } 6 | 7 | export type PackageJSON = { 8 | name: string 9 | version: string 10 | path: string 11 | dependencies?: { 12 | [key: string]: string 13 | } 14 | devDependencies?: { 15 | [key: string]: string 16 | } 17 | peerDependencies?: { 18 | [key: string]: string 19 | } 20 | optionalDependencies?: { 21 | [key: string]: string 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules/ 3 | yarn.lock 4 | 5 | # misc 6 | .DS_Store 7 | 8 | # lint 9 | .eslintcache 10 | 11 | # turbo 12 | .turbo 13 | !.turbo/config.json 14 | packages/*/.turbo 15 | packages/*/dist 16 | packages_generated/*/.turbo 17 | packages_generated/*/.dist 18 | 19 | 20 | # test & build 21 | .reports 22 | docs 23 | public 24 | dist 25 | coverage 26 | 27 | # Protobuf definition 28 | protobuf 29 | .bufcache 30 | 31 | 32 | # lerna 33 | lerna-debug.log 34 | -------------------------------------------------------------------------------- /packages_generated/k8s/src/v1/api.utils.ts: -------------------------------------------------------------------------------- 1 | import { API } from './api.gen' 2 | import type { GetClusterKubeConfigRequest } from './types.gen' 3 | 4 | export class K8SUtilsAPI extends API { 5 | /** 6 | * Get configuration of a kube cluster. 7 | * 8 | * @param request - The request {@link GetClusterKubeConfigRequest} 9 | * @returns A Promise of Blob 10 | */ 11 | getClusterKubeConfig = (request: Readonly) => 12 | this._getClusterKubeConfig(request) 13 | } 14 | -------------------------------------------------------------------------------- /packages_generated/datawarehouse/src/v1beta1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { DeploymentStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link DeploymentStatus}. */ 6 | export const DEPLOYMENT_TRANSIENT_STATUSES: DeploymentStatus[] = [ 7 | 'creating', 8 | 'configuring', 9 | 'deleting', 10 | 'locking', 11 | 'unlocking', 12 | 'deploying', 13 | ] 14 | -------------------------------------------------------------------------------- /packages_generated/lb/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages/sdk/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config.js' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/account/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/billing/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/block/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/cockpit/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/dedibox/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/domain/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/file/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/iam/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/iot/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/ipam/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/jobs/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/k8s/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/kafka/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/mnq/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/mongodb/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/qaas/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/rdb/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/redis/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/s2s_vpn/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/secret/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/tem/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/test/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/vpc/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/vpcgw/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /scripts/templates/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/applesilicon/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/audit_trail/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/autoscaling/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/baremetal/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/container/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/flexibleip/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/function/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/inference/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/instance/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/interlink/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/key_manager/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/marketplace/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/registry/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/std/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/webhosting/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages/client/src/scw/fetch/types.ts: -------------------------------------------------------------------------------- 1 | /** Scaleway Request. */ 2 | export interface ScwRequest { 3 | method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' 4 | path: string 5 | headers?: Record 6 | body?: string 7 | urlParams?: URLSearchParams 8 | responseType?: 'json' | 'text' | 'blob' 9 | } 10 | 11 | /** 12 | * A factory to unmarshal a response. 13 | * 14 | * @param obj - The input object. 15 | * @returns The output object 16 | */ 17 | export type ResponseUnmarshaller = (obj: unknown) => T 18 | -------------------------------------------------------------------------------- /packages_generated/datawarehouse/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/edge_services/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/product_catalog/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages_generated/serverless_sqldb/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages/client/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "rootDir": "src", 7 | "outDir": "dist", 8 | "skipLibCheck": true 9 | }, 10 | "tsc-alias": { 11 | "resolveFullPaths": true, 12 | "resolveFullExtension": ".js" 13 | }, 14 | "exclude": [ 15 | "dist/*", 16 | "*.config.ts", 17 | "*.setup.ts", 18 | "**/__tests__", 19 | "**/__mocks__", 20 | "src/**/*.test.tsx" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /packages_generated/environmental_footprint/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable eslint-comments/disable-enable-pair */ 2 | /* eslint-disable import/no-default-export */ 3 | /* eslint-disable import/no-relative-packages */ 4 | /* eslint-disable import/no-extraneous-dependencies */ 5 | import { defineConfig, mergeConfig } from 'vite' 6 | import { defaultConfig } from '../../vite.config' 7 | 8 | export default mergeConfig(defineConfig(defaultConfig), { 9 | build: { 10 | lib: { 11 | entry: 'src/index.gen.ts', 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /examples/nodejs-minimal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scaleway-nodejs-minimal", 3 | "version": "1.0.0", 4 | "main": "index.ts", 5 | "type": "module", 6 | "license": "Apache-2.0", 7 | "scripts": { 8 | "build": "tsc -p ./tsconfig.json", 9 | "start": "node ./dist/index" 10 | }, 11 | "dependencies": { 12 | "@scaleway/configuration-loader": "^1.0", 13 | "@scaleway/sdk": "^2.0", 14 | "@scaleway/sdk-client": "^2.0" 15 | }, 16 | "devDependencies": { 17 | "@types/node": "20.19.25", 18 | "typescript": "5.9.3" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages_generated/tem/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { DomainStatus, EmailStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link DomainStatus}. */ 6 | export const DOMAIN_TRANSIENT_STATUSES: DomainStatus[] = [ 7 | 'pending', 8 | 'autoconfiguring', 9 | ] 10 | 11 | /** Lists transient statutes of the enum {@link EmailStatus}. */ 12 | export const EMAIL_TRANSIENT_STATUSES: EmailStatus[] = ['new', 'sending'] 13 | -------------------------------------------------------------------------------- /packages_generated/edge_services/src/v1beta1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { PipelineStatus, PurgeRequestStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link PipelineStatus}. */ 6 | export const PIPELINE_TRANSIENT_STATUSES: PipelineStatus[] = ['pending'] 7 | 8 | /** Lists transient statutes of the enum {@link PurgeRequestStatus}. */ 9 | export const PURGE_REQUEST_TRANSIENT_STATUSES: PurgeRequestStatus[] = [ 10 | 'pending', 11 | ] 12 | -------------------------------------------------------------------------------- /packages_generated/interlink/src/v1beta1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { DedicatedConnectionStatus, LinkStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link DedicatedConnectionStatus}. */ 6 | export const DEDICATED_CONNECTION_TRANSIENT_STATUSES: DedicatedConnectionStatus[] = 7 | ['configuring'] 8 | 9 | /** Lists transient statutes of the enum {@link LinkStatus}. */ 10 | export const LINK_TRANSIENT_STATUSES: LinkStatus[] = ['configuring'] 11 | -------------------------------------------------------------------------------- /packages_generated/vpc/src/v2/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const AclRule = { 5 | description: { 6 | maxLength: 200, 7 | }, 8 | dstPortHigh: { 9 | lessThanOrEqual: 65536, 10 | }, 11 | dstPortLow: { 12 | lessThanOrEqual: 65536, 13 | }, 14 | srcPortHigh: { 15 | lessThanOrEqual: 65536, 16 | }, 17 | srcPortLow: { 18 | lessThanOrEqual: 65536, 19 | }, 20 | } 21 | 22 | export const Route = { 23 | description: { 24 | maxLength: 200, 25 | }, 26 | } 27 | -------------------------------------------------------------------------------- /packages_generated/edge_services/src/v1beta1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const CreateWafStageRequest = { 5 | paranoiaLevel: { 6 | greaterThanOrEqual: 1, 7 | lessThanOrEqual: 4, 8 | }, 9 | } 10 | 11 | export const UpdateWafStageRequest = { 12 | paranoiaLevel: { 13 | greaterThanOrEqual: 1, 14 | lessThanOrEqual: 4, 15 | }, 16 | } 17 | 18 | export const WafStage = { 19 | paranoiaLevel: { 20 | greaterThanOrEqual: 1, 21 | lessThanOrEqual: 4, 22 | }, 23 | } 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "lib": ["ES2022", "DOM", "DOM.Iterable"], 5 | "module": "ESNext", 6 | "moduleResolution": "Bundler", 7 | "target": "ES2022", 8 | "strict": true, 9 | "alwaysStrict": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "allowUnreachableCode": false, 12 | "noImplicitReturns": true, 13 | "noUnusedLocals": true, 14 | "skipLibCheck": true, 15 | "esModuleInterop": true, 16 | "resolveJsonModule": true 17 | }, 18 | "include": ["**/*.ts"], 19 | "exclude": ["**/examples/**", "**/dist/**"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/client/src/helpers/is-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Validates an object is of type Response without using `instanceof`. 3 | * 4 | * @remarks Check issue #509 for more context. 5 | * 6 | * @internal 7 | */ 8 | export const isResponse = (obj: unknown): obj is Response => 9 | obj !== null && 10 | obj !== undefined && 11 | typeof obj === 'object' && 12 | 'status' in obj && 13 | typeof obj.status === 'number' && 14 | 'statusText' in obj && 15 | typeof obj.statusText === 'string' && 16 | 'headers' in obj && 17 | typeof obj.headers === 'object' && 18 | 'body' in obj && 19 | typeof obj.body !== 'undefined' 20 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scaleway-serverless-function", 3 | "description": "Minimal Typescript template to run Scaleway SDK-JS in a Function.", 4 | "version": "1.0.0", 5 | "main": "index.js", 6 | "type": "module", 7 | "license": "Apache-2.0", 8 | "scripts": { 9 | "build": "tsc -p ./tsconfig.json" 10 | }, 11 | "dependencies": { 12 | "@scaleway/configuration-loader": "^1.0", 13 | "@scaleway/sdk": "^2.0" 14 | }, 15 | "devDependencies": { 16 | "serverless-scaleway-functions": "0.4.17", 17 | "@types/node": "20.19.25", 18 | "typescript": "5.9.3" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages_generated/flexibleip/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { FlexibleIPStatus, MACAddressStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link FlexibleIPStatus}. */ 6 | export const FLEXIBLE_IP_TRANSIENT_STATUSES: FlexibleIPStatus[] = [ 7 | 'updating', 8 | 'detaching', 9 | ] 10 | 11 | /** Lists transient statutes of the enum {@link MACAddressStatus}. */ 12 | export const MAC_ADDRESS_TRANSIENT_STATUSES: MACAddressStatus[] = [ 13 | 'updating', 14 | 'deleting', 15 | ] 16 | -------------------------------------------------------------------------------- /packages_generated/environmental_footprint/src/v1alpha1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { UserAPI } from './api.gen.js' 4 | export * from './marshalling.gen.js' 5 | export type { 6 | Impact, 7 | ImpactDataResponse, 8 | ImpactReportAvailability, 9 | ProductCategory, 10 | ProjectImpact, 11 | RegionImpact, 12 | ReportType, 13 | ServiceCategory, 14 | SkuImpact, 15 | UserApiDownloadImpactReportRequest, 16 | UserApiGetImpactDataRequest, 17 | UserApiGetImpactReportAvailabilityRequest, 18 | ZoneImpact, 19 | } from './types.gen.js' 20 | -------------------------------------------------------------------------------- /packages_generated/inference/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { DeploymentStatus, ModelStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link DeploymentStatus}. */ 6 | export const DEPLOYMENT_TRANSIENT_STATUSES: DeploymentStatus[] = [ 7 | 'creating', 8 | 'deploying', 9 | 'deleting', 10 | 'scaling', 11 | ] 12 | 13 | /** Lists transient statutes of the enum {@link ModelStatus}. */ 14 | export const MODEL_TRANSIENT_STATUSES: ModelStatus[] = [ 15 | 'preparing', 16 | 'downloading', 17 | ] 18 | -------------------------------------------------------------------------------- /packages_generated/test/src/v1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './content.gen.js' 5 | export * from './marshalling.gen.js' 6 | export type { 7 | CreateHumanRequest, 8 | DeleteHumanRequest, 9 | EyeColors, 10 | GetHumanRequest, 11 | Human, 12 | HumanStatus, 13 | ListHumansRequest, 14 | ListHumansRequestOrderBy, 15 | ListHumansResponse, 16 | RegisterRequest, 17 | RegisterResponse, 18 | RunHumanRequest, 19 | SmokeHumanRequest, 20 | UpdateHumanRequest, 21 | } from './types.gen.js' 22 | -------------------------------------------------------------------------------- /packages/client/src/internal/async/__tests__/sleep.test.ts: -------------------------------------------------------------------------------- 1 | import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest' 2 | import { sleep } from '../sleep.js' 3 | 4 | beforeAll(() => { 5 | vi.useFakeTimers() 6 | vi.spyOn(global, 'setTimeout') 7 | }) 8 | 9 | afterAll(() => { 10 | vi.useRealTimers() 11 | }) 12 | 13 | describe('sleep', () => { 14 | it('delays the proper amount of time', () => { 15 | const delay = 50 // 0.05s 16 | sleep(delay).catch(() => { 17 | /* noop */ 18 | }) 19 | expect(setTimeout).toHaveBeenCalledTimes(1) 20 | expect(setTimeout).toHaveBeenLastCalledWith(expect.any(Function), delay) 21 | }) 22 | }) 23 | -------------------------------------------------------------------------------- /typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "name": "Scaleway JS SDK", 4 | "entryPoints": [ 5 | "./packages/clients/src/index.ts", 6 | "./packages/configuration-loader/src/index.ts" 7 | ], 8 | "exclude": ["**/examples/**", "**/dist/**"], 9 | "out": "docs", 10 | "excludeInternal": true, 11 | "excludePrivate": true, 12 | "excludeProtected": true, 13 | "readme": "none", 14 | "navigationLinks": { 15 | "GitHub Project": "https://github.com/scaleway/scaleway-sdk-js", 16 | "Developers Reference": "https://www.scaleway.com/en/developers/" 17 | }, 18 | "visibilityFilters": { 19 | "protected": false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/client/src/scw/__tests__/api.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from 'vitest' 2 | import { API } from '../api.js' 3 | import { createClient } from '../client.js' 4 | 5 | class CustomAPI extends API { 6 | getBaseURL = (): string => { 7 | if (!this.client.settings.apiURL) { 8 | throw new Error('API URL is missing') 9 | } 10 | 11 | return this.client.settings.apiURL 12 | } 13 | } 14 | 15 | describe('API', () => { 16 | it('binds methods properly', () => { 17 | const api = new CustomAPI(createClient()) 18 | 19 | const unboundMethod = api.getBaseURL 20 | expect(() => { 21 | unboundMethod() 22 | }).not.toThrow() 23 | }) 24 | }) 25 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from 'vitest/config' 2 | import { defaultConfig } from './vite.config' 3 | 4 | export const defaultVitestConfig = mergeConfig( 5 | defaultConfig, 6 | defineConfig({ 7 | test: { 8 | coverage: { 9 | enabled: true, 10 | provider: 'v8', 11 | reporter: ['text', 'json', 'html'], 12 | exclude: [ 13 | '.reports/**', 14 | '**/.eslintrc.json.*', 15 | 'dist', 16 | '**/examples/**', 17 | '**/packages/clients/src/api/*', 18 | '**/*.d.ts', 19 | ], 20 | }, 21 | }, 22 | }), 23 | ) 24 | 25 | export default defaultVitestConfig 26 | -------------------------------------------------------------------------------- /packages_generated/registry/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { ImageStatus, NamespaceStatus, TagStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link ImageStatus}. */ 6 | export const IMAGE_TRANSIENT_STATUSES: ImageStatus[] = ['deleting'] 7 | 8 | /** Lists transient statutes of the enum {@link NamespaceStatus}. */ 9 | export const NAMESPACE_TRANSIENT_STATUSES: NamespaceStatus[] = ['deleting'] 10 | 11 | /** Lists transient statutes of the enum {@link TagStatus}. */ 12 | export const TAG_TRANSIENT_STATUSES: TagStatus[] = ['deleting'] 13 | -------------------------------------------------------------------------------- /packages_generated/vpcgw/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { GatewayNetworkStatus, GatewayStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link GatewayNetworkStatus}. */ 6 | export const GATEWAY_NETWORK_TRANSIENT_STATUSES: GatewayNetworkStatus[] = [ 7 | 'attaching', 8 | 'configuring', 9 | 'detaching', 10 | ] 11 | 12 | /** Lists transient statutes of the enum {@link GatewayStatus}. */ 13 | export const GATEWAY_TRANSIENT_STATUSES: GatewayStatus[] = [ 14 | 'allocating', 15 | 'configuring', 16 | 'stopping', 17 | 'deleting', 18 | ] 19 | -------------------------------------------------------------------------------- /packages_generated/vpcgw/src/v2/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { GatewayNetworkStatus, GatewayStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link GatewayNetworkStatus}. */ 6 | export const GATEWAY_NETWORK_TRANSIENT_STATUSES: GatewayNetworkStatus[] = [ 7 | 'attaching', 8 | 'configuring', 9 | 'detaching', 10 | ] 11 | 12 | /** Lists transient statutes of the enum {@link GatewayStatus}. */ 13 | export const GATEWAY_TRANSIENT_STATUSES: GatewayStatus[] = [ 14 | 'allocating', 15 | 'configuring', 16 | 'stopping', 17 | 'deleting', 18 | ] 19 | -------------------------------------------------------------------------------- /packages_generated/ipam/src/v1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './marshalling.gen.js' 5 | export type { 6 | AttachIPRequest, 7 | BookIPRequest, 8 | CustomResource, 9 | DetachIPRequest, 10 | GetIPRequest, 11 | IP, 12 | ListIPsRequest, 13 | ListIPsRequestOrderBy, 14 | ListIPsResponse, 15 | MoveIPRequest, 16 | ReleaseIPRequest, 17 | ReleaseIPSetRequest, 18 | Resource, 19 | ResourceType, 20 | Reverse, 21 | Source, 22 | UpdateIPRequest, 23 | } from './types.gen.js' 24 | export * as ValidationRules from './validation-rules.gen.js' 25 | -------------------------------------------------------------------------------- /packages_generated/mongodb/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { InstanceStatus, SnapshotStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link InstanceStatus}. */ 6 | export const INSTANCE_TRANSIENT_STATUSES: InstanceStatus[] = [ 7 | 'provisioning', 8 | 'configuring', 9 | 'deleting', 10 | 'initializing', 11 | 'snapshotting', 12 | ] 13 | 14 | /** Lists transient statutes of the enum {@link SnapshotStatus}. */ 15 | export const SNAPSHOT_TRANSIENT_STATUSES: SnapshotStatus[] = [ 16 | 'creating', 17 | 'restoring', 18 | 'deleting', 19 | ] 20 | -------------------------------------------------------------------------------- /packages_generated/mongodb/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { InstanceStatus, SnapshotStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link InstanceStatus}. */ 6 | export const INSTANCE_TRANSIENT_STATUSES: InstanceStatus[] = [ 7 | 'provisioning', 8 | 'configuring', 9 | 'deleting', 10 | 'initializing', 11 | 'snapshotting', 12 | ] 13 | 14 | /** Lists transient statutes of the enum {@link SnapshotStatus}. */ 15 | export const SNAPSHOT_TRANSIENT_STATUSES: SnapshotStatus[] = [ 16 | 'creating', 17 | 'restoring', 18 | 'deleting', 19 | ] 20 | -------------------------------------------------------------------------------- /packages/client/src/scw/errors/__tests__/types.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from 'vitest' 2 | import { isRecordOfStringArray } from '../types.js' 3 | 4 | describe('isRecordOfStringArray', () => { 5 | it('validates a proper object', () => { 6 | expect( 7 | isRecordOfStringArray({ myValue: ['reason 1', 'reason 2'] }), 8 | ).toBeTruthy() 9 | }) 10 | 11 | it('refuses object with proper structure but non-string values', () => { 12 | expect(isRecordOfStringArray({ myValue: [42] })).toBeFalsy() 13 | }) 14 | 15 | it('refuses non-JSONObjects', () => { 16 | expect(isRecordOfStringArray(['reason 1'])).toBeFalsy() 17 | expect(isRecordOfStringArray('reason 1')).toBeFalsy() 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /packages/client/src/scw/errors/types.ts: -------------------------------------------------------------------------------- 1 | import { isJSONObject } from '../../helpers/json.js' 2 | 3 | /** 4 | * Verifies the object is a record of string to string[]. 5 | * 6 | * @param obj - The object 7 | * @returns Whether the object is of the expected type 8 | * 9 | * @internal 10 | */ 11 | export const isRecordOfStringArray = ( 12 | obj: Readonly, 13 | ): obj is Record => { 14 | if (!isJSONObject(obj)) { 15 | return false 16 | } 17 | for (const elt of Object.values(obj)) { 18 | if ( 19 | !Array.isArray(elt) || 20 | Object.values(elt).find(x => typeof x !== 'string') !== undefined 21 | ) { 22 | return false 23 | } 24 | } 25 | 26 | return true 27 | } 28 | -------------------------------------------------------------------------------- /packages_generated/baremetal/src/v3/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { PrivateNetworkAPI } from './api.gen.js' 4 | export * from './content.gen.js' 5 | export * from './marshalling.gen.js' 6 | export type { 7 | ListServerPrivateNetworksRequestOrderBy, 8 | ListServerPrivateNetworksResponse, 9 | PrivateNetworkApiAddServerPrivateNetworkRequest, 10 | PrivateNetworkApiDeleteServerPrivateNetworkRequest, 11 | PrivateNetworkApiListServerPrivateNetworksRequest, 12 | PrivateNetworkApiSetServerPrivateNetworksRequest, 13 | ServerPrivateNetwork, 14 | ServerPrivateNetworkStatus, 15 | SetServerPrivateNetworksResponse, 16 | } from './types.gen.js' 17 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/serverless.yml: -------------------------------------------------------------------------------- 1 | service: sdk-js-example 2 | configValidationMode: off 3 | useDotenv: true 4 | provider: 5 | name: scaleway 6 | runtime: node20 7 | env: 8 | SCW_ACCESS_KEY: ${env:SCW_ACCESS_KEY} 9 | SCW_SECRET_KEY: ${env:SCW_SECRET_KEY} 10 | SCW_DEFAULT_PROJECT_ID: ${env:SCW_DEFAULT_PROJECT_ID} 11 | SCW_DEFAULT_REGION: ${env:SCW_DEFAULT_REGION} 12 | SCW_DEFAULT_ZONE: ${env:SCW_DEFAULT_ZONE} 13 | 14 | plugins: 15 | - serverless-scaleway-functions 16 | 17 | package: 18 | patterns: 19 | - '!./src/**' 20 | - '!.gitignore' 21 | - '!.git/**' 22 | - '!README.md' 23 | 24 | functions: 25 | list-namespaces: 26 | handler: dist/index.list 27 | privacy: public 28 | memoryLimit: 128 29 | -------------------------------------------------------------------------------- /packages_generated/file/src/v1alpha1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './content.gen.js' 5 | export * from './marshalling.gen.js' 6 | export type { 7 | Attachment, 8 | AttachmentResourceType, 9 | CreateFileSystemRequest, 10 | DeleteFileSystemRequest, 11 | FileSystem, 12 | FileSystemStatus, 13 | GetFileSystemRequest, 14 | ListAttachmentsRequest, 15 | ListAttachmentsResponse, 16 | ListFileSystemsRequest, 17 | ListFileSystemsRequestOrderBy, 18 | ListFileSystemsResponse, 19 | UpdateFileSystemRequest, 20 | } from './types.gen.js' 21 | export * as ValidationRules from './validation-rules.gen.js' 22 | -------------------------------------------------------------------------------- /packages/client/src/scw/errors/standard/out-of-stock-error.ts: -------------------------------------------------------------------------------- 1 | import type { JSONObject } from '../../../helpers/json.js' 2 | import { ScalewayError } from '../scw-error.js' 3 | 4 | /** 5 | * OutOfStock error happens when stocks are empty for the resource. 6 | * 7 | * @public 8 | */ 9 | export class OutOfStockError extends ScalewayError { 10 | constructor( 11 | readonly status: number, 12 | readonly body: JSONObject, 13 | readonly resource: string, 14 | ) { 15 | super(status, body, `resource ${resource} is out of stock`) 16 | this.name = 'OutOfStockError' 17 | } 18 | 19 | static fromJSON(status: number, obj: Readonly) { 20 | if (typeof obj.resource !== 'string') return null 21 | 22 | return new OutOfStockError(status, obj, obj.resource) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages_generated/marketplace/src/v2/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './marshalling.gen.js' 5 | export type { 6 | Category, 7 | GetCategoryRequest, 8 | GetImageRequest, 9 | GetLocalImageRequest, 10 | GetVersionRequest, 11 | Image, 12 | ListCategoriesRequest, 13 | ListCategoriesResponse, 14 | ListImagesRequest, 15 | ListImagesRequestOrderBy, 16 | ListImagesResponse, 17 | ListLocalImagesRequest, 18 | ListLocalImagesRequestOrderBy, 19 | ListLocalImagesResponse, 20 | ListVersionsRequest, 21 | ListVersionsRequestOrderBy, 22 | ListVersionsResponse, 23 | LocalImage, 24 | LocalImageType, 25 | Version, 26 | } from './types.gen.js' 27 | -------------------------------------------------------------------------------- /packages/configuration-loader/src/env.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Environment Key. 3 | */ 4 | export enum EnvironmentKey { 5 | /** Path to the Scaleway configuration file */ 6 | ScwConfigPath = 'SCW_CONFIG_PATH', 7 | /** Scaleway access key */ 8 | ScwAccessKey = 'SCW_ACCESS_KEY', 9 | /** 10 | * Scaleway secret key 11 | * @remarks #nosec G101 12 | */ 13 | ScwSecretKey = 'SCW_SECRET_KEY', 14 | /** Scaleway API URL */ 15 | ScwAPIURL = 'SCW_API_URL', 16 | /** Scaleway default organization ID */ 17 | ScwDefaultOrganizationId = 'SCW_DEFAULT_ORGANIZATION_ID', 18 | /** Scaleway default project ID */ 19 | ScwDefaultProjectId = 'SCW_DEFAULT_PROJECT_ID', 20 | /** Scaleway default region */ 21 | ScwDefaultRegion = 'SCW_DEFAULT_REGION', 22 | /** Scaleway default zone */ 23 | ScwDefaultZone = 'SCW_DEFAULT_ZONE', 24 | } 25 | -------------------------------------------------------------------------------- /packages_generated/file/src/v1alpha1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const CreateFileSystemRequest = { 5 | name: { 6 | minLength: 1, 7 | }, 8 | size: { 9 | greaterThan: 0, 10 | }, 11 | } 12 | 13 | export const ListAttachmentsRequest = { 14 | page: { 15 | greaterThan: 0, 16 | }, 17 | pageSize: { 18 | greaterThan: 0, 19 | lessThanOrEqual: 100, 20 | }, 21 | } 22 | 23 | export const ListFileSystemsRequest = { 24 | page: { 25 | greaterThan: 0, 26 | }, 27 | pageSize: { 28 | greaterThan: 0, 29 | lessThanOrEqual: 100, 30 | }, 31 | } 32 | 33 | export const UpdateFileSystemRequest = { 34 | name: { 35 | minLength: 1, 36 | }, 37 | size: { 38 | greaterThan: 0, 39 | }, 40 | } 41 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/README.md: -------------------------------------------------------------------------------- 1 | # Function example 2 | 3 | We assume that you have the dependency [serverless](https://www.serverless.com/) installed on your computer. 4 | 5 | ## A. How to run 6 | 7 | ⚠️ **Important:** this example creates your Scaleway profile (required by the Javascript client) using environment variables: please rename `.env.template` to `.env` (git ignored) and update the variables. 8 | 9 | - Note: by design, Serverless framework overrides environment variables already defined in your Scaleway account. 10 | 11 | **Steps:** 12 | 13 | 1. Install dependencies: `pnpm install`. 14 | 2. Build the project: `pnpm run build`. 15 | 3. Deploy in production: `SCW_DEFAULT_PROJECT_ID= SCW_SECRET_KEY= serverless deploy` 16 | 17 | - Or just `serverless deploy` if you already defined `SCW_DEFAULT_PROJECT_ID` and `SCW_SECRET_KEY` in your bash profile. 18 | -------------------------------------------------------------------------------- /packages_generated/k8s/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { ClusterStatus, NodeStatus, PoolStatus } from './types.gen.js' 4 | 5 | /** Lists transient statutes of the enum {@link ClusterStatus}. */ 6 | export const CLUSTER_TRANSIENT_STATUSES: ClusterStatus[] = [ 7 | 'creating', 8 | 'deleting', 9 | 'updating', 10 | ] 11 | 12 | /** Lists transient statutes of the enum {@link NodeStatus}. */ 13 | export const NODE_TRANSIENT_STATUSES: NodeStatus[] = [ 14 | 'creating', 15 | 'deleting', 16 | 'rebooting', 17 | 'upgrading', 18 | 'starting', 19 | 'registering', 20 | ] 21 | 22 | /** Lists transient statutes of the enum {@link PoolStatus}. */ 23 | export const POOL_TRANSIENT_STATUSES: PoolStatus[] = [ 24 | 'deleting', 25 | 'scaling', 26 | 'upgrading', 27 | ] 28 | -------------------------------------------------------------------------------- /packages_generated/serverless_sqldb/src/v1alpha1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './content.gen.js' 5 | export * from './marshalling.gen.js' 6 | export type { 7 | CreateDatabaseRequest, 8 | Database, 9 | DatabaseBackup, 10 | DatabaseBackupStatus, 11 | DatabaseStatus, 12 | DeleteDatabaseRequest, 13 | ExportDatabaseBackupRequest, 14 | GetDatabaseBackupRequest, 15 | GetDatabaseRequest, 16 | ListDatabaseBackupsRequest, 17 | ListDatabaseBackupsRequestOrderBy, 18 | ListDatabaseBackupsResponse, 19 | ListDatabasesRequest, 20 | ListDatabasesRequestOrderBy, 21 | ListDatabasesResponse, 22 | RestoreDatabaseFromBackupRequest, 23 | UpdateDatabaseRequest, 24 | } from './types.gen.js' 25 | export * as ValidationRules from './validation-rules.gen.js' 26 | -------------------------------------------------------------------------------- /packages_generated/block/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { 4 | ReferenceStatus, 5 | SnapshotStatus, 6 | VolumeStatus, 7 | } from './types.gen.js' 8 | 9 | /** Lists transient statutes of the enum {@link ReferenceStatus}. */ 10 | export const REFERENCE_TRANSIENT_STATUSES: ReferenceStatus[] = [ 11 | 'attaching', 12 | 'detaching', 13 | 'creating', 14 | ] 15 | 16 | /** Lists transient statutes of the enum {@link SnapshotStatus}. */ 17 | export const SNAPSHOT_TRANSIENT_STATUSES: SnapshotStatus[] = [ 18 | 'creating', 19 | 'deleting', 20 | 'exporting', 21 | ] 22 | 23 | /** Lists transient statutes of the enum {@link VolumeStatus}. */ 24 | export const VOLUME_TRANSIENT_STATUSES: VolumeStatus[] = [ 25 | 'creating', 26 | 'deleting', 27 | 'resizing', 28 | 'snapshotting', 29 | 'updating', 30 | ] 31 | -------------------------------------------------------------------------------- /packages_generated/block/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { 4 | ReferenceStatus, 5 | SnapshotStatus, 6 | VolumeStatus, 7 | } from './types.gen.js' 8 | 9 | /** Lists transient statutes of the enum {@link ReferenceStatus}. */ 10 | export const REFERENCE_TRANSIENT_STATUSES: ReferenceStatus[] = [ 11 | 'attaching', 12 | 'detaching', 13 | 'creating', 14 | ] 15 | 16 | /** Lists transient statutes of the enum {@link SnapshotStatus}. */ 17 | export const SNAPSHOT_TRANSIENT_STATUSES: SnapshotStatus[] = [ 18 | 'creating', 19 | 'deleting', 20 | 'exporting', 21 | ] 22 | 23 | /** Lists transient statutes of the enum {@link VolumeStatus}. */ 24 | export const VOLUME_TRANSIENT_STATUSES: VolumeStatus[] = [ 25 | 'creating', 26 | 'deleting', 27 | 'resizing', 28 | 'snapshotting', 29 | 'updating', 30 | ] 31 | -------------------------------------------------------------------------------- /packages_generated/registry/src/v1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './content.gen.js' 5 | export * from './marshalling.gen.js' 6 | export type { 7 | CreateNamespaceRequest, 8 | DeleteImageRequest, 9 | DeleteNamespaceRequest, 10 | DeleteTagRequest, 11 | GetImageRequest, 12 | GetNamespaceRequest, 13 | GetTagRequest, 14 | Image, 15 | ImageStatus, 16 | ImageVisibility, 17 | ListImagesRequest, 18 | ListImagesRequestOrderBy, 19 | ListImagesResponse, 20 | ListNamespacesRequest, 21 | ListNamespacesRequestOrderBy, 22 | ListNamespacesResponse, 23 | ListTagsRequest, 24 | ListTagsRequestOrderBy, 25 | ListTagsResponse, 26 | Namespace, 27 | NamespaceStatus, 28 | Tag, 29 | TagStatus, 30 | UpdateImageRequest, 31 | UpdateNamespaceRequest, 32 | } from './types.gen.js' 33 | -------------------------------------------------------------------------------- /.github/workflows/check-pull-request.yml: -------------------------------------------------------------------------------- 1 | name: Check Pull Request 2 | on: 3 | pull_request: 4 | types: ['opened', 'edited', 'reopened', 'synchronize'] 5 | merge_group: 6 | 7 | jobs: 8 | check-title: 9 | runs-on: ubuntu-24.04 10 | steps: 11 | - uses: actions/checkout@v4.3.1 12 | - uses: pnpm/action-setup@v4.1.0 13 | - name: Use Node.js 14 | uses: actions/setup-node@v6.0.0 15 | with: 16 | node-version: 20.19.6 17 | check-latest: true 18 | cache: 'pnpm' 19 | - run: make install-dependencies 20 | - name: Check title 21 | run: | 22 | title=$(cat <<- "EOF" 23 | ${{ github.event.pull_request.title }} 24 | EOF 25 | ) 26 | if [ "$title" == "feat: update generated APIs" ]; then 27 | echo "Invalid title." 28 | exit 1 29 | else 30 | echo "$title" | pnpm commitlint 31 | fi 32 | -------------------------------------------------------------------------------- /packages_generated/flexibleip/src/v1alpha1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './content.gen.js' 5 | export * from './marshalling.gen.js' 6 | export type { 7 | AttachFlexibleIPRequest, 8 | AttachFlexibleIPsResponse, 9 | CreateFlexibleIPRequest, 10 | DeleteFlexibleIPRequest, 11 | DeleteMACAddrRequest, 12 | DetachFlexibleIPRequest, 13 | DetachFlexibleIPsResponse, 14 | DuplicateMACAddrRequest, 15 | FlexibleIP, 16 | FlexibleIPStatus, 17 | GenerateMACAddrRequest, 18 | GetFlexibleIPRequest, 19 | ListFlexibleIPsRequest, 20 | ListFlexibleIPsRequestOrderBy, 21 | ListFlexibleIPsResponse, 22 | MACAddress, 23 | MACAddressStatus, 24 | MACAddressType, 25 | MoveMACAddrRequest, 26 | UpdateFlexibleIPRequest, 27 | } from './types.gen.js' 28 | export * as ValidationRules from './validation-rules.gen.js' 29 | -------------------------------------------------------------------------------- /packages/client/src/scw/errors/standard/resource-locked-error.ts: -------------------------------------------------------------------------------- 1 | import type { JSONObject } from '../../../helpers/json.js' 2 | import { ScalewayError } from '../scw-error.js' 3 | 4 | /** 5 | * ResourceLocked error happens when a resource is locked by trust and safety. 6 | * 7 | * @public 8 | */ 9 | export class ResourceLockedError extends ScalewayError { 10 | constructor( 11 | readonly status: number, 12 | readonly body: JSONObject, 13 | readonly resource: string, 14 | readonly resourceId: string, 15 | ) { 16 | super(status, body, `resource ${resource} with ID ${resourceId} is locked`) 17 | this.name = 'ResourceLockedError' 18 | } 19 | 20 | static fromJSON(status: number, obj: Readonly) { 21 | if ( 22 | typeof obj.resource !== 'string' || 23 | typeof obj.resource_id !== 'string' 24 | ) { 25 | return null 26 | } 27 | 28 | return new ResourceLockedError(status, obj, obj.resource, obj.resource_id) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages_generated/baremetal/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { 4 | ServerInstallStatus, 5 | ServerPrivateNetworkStatus, 6 | ServerStatus, 7 | } from './types.gen.js' 8 | 9 | /** Lists transient statutes of the enum {@link ServerInstallStatus}. */ 10 | export const SERVER_INSTALL_TRANSIENT_STATUSES: ServerInstallStatus[] = [ 11 | 'to_install', 12 | 'installing', 13 | ] 14 | 15 | /** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */ 16 | export const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: ServerPrivateNetworkStatus[] = 17 | ['attaching', 'detaching'] 18 | 19 | /** Lists transient statutes of the enum {@link ServerStatus}. */ 20 | export const SERVER_TRANSIENT_STATUSES: ServerStatus[] = [ 21 | 'delivering', 22 | 'stopping', 23 | 'starting', 24 | 'deleting', 25 | 'ordered', 26 | 'resetting', 27 | 'migrating', 28 | ] 29 | -------------------------------------------------------------------------------- /examples/serverless-function-minimal/src/index.ts: -------------------------------------------------------------------------------- 1 | import { loadProfileFromEnvironmentValues } from '@scaleway/configuration-loader' 2 | import { createClient, Errors, Registry } from '@scaleway/sdk' 3 | 4 | // Profile will be loade from the variables in your `.env` file. 5 | const loadedProfile = loadProfileFromEnvironmentValues() 6 | const client = createClient(loadedProfile) 7 | const api = new Registry.v1.API(client) 8 | 9 | const buildJsonRes = (data: object) => ({ 10 | body: JSON.stringify(data), 11 | statusCode: 200, 12 | }) 13 | 14 | const buildErrorRes = (error?: unknown) => ({ 15 | body: JSON.stringify({ 16 | message: `${error instanceof Error ? error.message : String(error)}`, 17 | }), 18 | statusCode: error instanceof Errors.ScalewayError ? error.status : 500, 19 | }) 20 | 21 | export const list = async (event: any, context: any, callback: any) => { 22 | try { 23 | return buildJsonRes(await api.listNamespaces().all()) 24 | } catch (error) { 25 | return buildErrorRes(error) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages_generated/webhosting/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { 4 | BackupStatus, 5 | DomainAvailabilityStatus, 6 | DomainStatus, 7 | HostingStatus, 8 | } from './types.gen.js' 9 | 10 | /** Lists transient statutes of the enum {@link BackupStatus}. */ 11 | export const BACKUP_TRANSIENT_STATUSES: BackupStatus[] = ['restoring'] 12 | 13 | /** Lists transient statutes of the enum {@link DomainAvailabilityStatus}. */ 14 | export const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES: DomainAvailabilityStatus[] = 15 | ['validating'] 16 | 17 | /** Lists transient statutes of the enum {@link DomainStatus}. */ 18 | export const DOMAIN_TRANSIENT_STATUSES: DomainStatus[] = ['validating'] 19 | 20 | /** Lists transient statutes of the enum {@link HostingStatus}. */ 21 | export const HOSTING_TRANSIENT_STATUSES: HostingStatus[] = [ 22 | 'delivering', 23 | 'deleting', 24 | 'migrating', 25 | 'updating', 26 | ] 27 | -------------------------------------------------------------------------------- /packages/client/src/scw/errors/standard/resource-not-found-error.ts: -------------------------------------------------------------------------------- 1 | import type { JSONObject } from '../../../helpers/json.js' 2 | import { ScalewayError } from '../scw-error.js' 3 | 4 | /** 5 | * ResourceNotFound error happens when getting a resource that does not exist anymore. 6 | * 7 | * @public 8 | */ 9 | export class ResourceNotFoundError extends ScalewayError { 10 | constructor( 11 | readonly status: number, 12 | readonly body: JSONObject, 13 | readonly resource: string, 14 | readonly resourceId: string, 15 | ) { 16 | super( 17 | status, 18 | body, 19 | `resource ${resource} with ID ${resourceId} is not found`, 20 | ) 21 | this.name = 'ResourceNotFoundError' 22 | } 23 | 24 | static fromJSON(status: number, obj: Readonly) { 25 | if ( 26 | typeof obj.resource !== 'string' || 27 | typeof obj.resource_id !== 'string' 28 | ) { 29 | return null 30 | } 31 | 32 | return new ResourceNotFoundError(status, obj, obj.resource, obj.resource_id) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/configuration-loader/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/configuration-loader", 3 | "version": "2.0.0", 4 | "license": "Apache-2.0", 5 | "description": "Load configuration via file or environment for NodeJS.", 6 | "publishConfig": { 7 | "access": "public" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/scaleway/scaleway-sdk-js", 12 | "directory": "packages/configuration-loader" 13 | }, 14 | "engines": { 15 | "node": ">=20.19.6" 16 | }, 17 | "type": "module", 18 | "exports": { 19 | ".": { 20 | "types": "./dist/index.d.ts", 21 | "default": "./dist/index.js" 22 | } 23 | }, 24 | "scripts": { 25 | "typecheck": "tsc --noEmit", 26 | "type:generate": "tsc --declaration -p tsconfig.build.json", 27 | "build": "vite build --config ../../vite.config.ts && pnpm run type:generate", 28 | "build:profile": "npx vite-bundle-visualizer -c ../../vite.config.ts" 29 | }, 30 | "devDependencies": { 31 | "@types/node": "18.19.130" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages_generated/std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-std", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK Std", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/types.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | } 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "directory": "packages_generated/std" 20 | }, 21 | "engines": { 22 | "node": ">=20.19.6" 23 | }, 24 | "scripts": { 25 | "package:check": "pnpm publint", 26 | "typecheck": "tsc --noEmit", 27 | "type:generate": "tsc --declaration -p tsconfig.build.json", 28 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 29 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 30 | }, 31 | "dependencies": { 32 | "@scaleway/sdk-client": "workspace:^" 33 | }, 34 | "peerDependencies": { 35 | "@scaleway/sdk-client": "workspace:^" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/client/src/scw/locality.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/ban-types */ 2 | export type Region = 'fr-par' | 'nl-ams' | 'pl-waw' | (string & {}) 3 | 4 | export type Zone = 5 | | 'fr-par-1' 6 | | 'fr-par-2' 7 | | 'fr-par-3' 8 | | 'nl-ams-1' 9 | | 'nl-ams-2' 10 | | 'nl-ams-3' 11 | | 'pl-waw-1' 12 | | 'pl-waw-2' 13 | | 'pl-waw-3' 14 | | (string & {}) 15 | /* eslint-enable @typescript-eslint/ban-types */ 16 | 17 | export type ApiLocality = 18 | | { type: 'zone'; zones: Zone[] } 19 | | { type: 'region'; regions: Region[] } 20 | | { type: 'global' } 21 | | { type: 'unspecified' } 22 | 23 | export function toApiLocality(legacy?: { 24 | zones?: Zone[] 25 | regions?: Region[] 26 | }): ApiLocality { 27 | if (!legacy) { 28 | return { type: 'unspecified' } 29 | } 30 | const { zones, regions } = legacy 31 | if (zones && zones.length > 0) { 32 | return { type: 'zone', zones } 33 | } 34 | if (regions && regions.length > 0) { 35 | return { type: 'region', regions } 36 | } 37 | 38 | return { type: 'global' } 39 | } 40 | -------------------------------------------------------------------------------- /packages_generated/qaas/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { 4 | BookingStatus, 5 | JobStatus, 6 | ProcessStatus, 7 | SessionStatus, 8 | } from './types.gen.js' 9 | 10 | /** Lists transient statutes of the enum {@link BookingStatus}. */ 11 | export const BOOKING_TRANSIENT_STATUSES: BookingStatus[] = [ 12 | 'waiting', 13 | 'validating', 14 | 'cancelling', 15 | ] 16 | 17 | /** Lists transient statutes of the enum {@link JobStatus}. */ 18 | export const JOB_TRANSIENT_STATUSES: JobStatus[] = [ 19 | 'waiting', 20 | 'running', 21 | 'cancelling', 22 | ] 23 | 24 | /** Lists transient statutes of the enum {@link ProcessStatus}. */ 25 | export const PROCESS_TRANSIENT_STATUSES: ProcessStatus[] = [ 26 | 'starting', 27 | 'running', 28 | 'cancelling', 29 | ] 30 | 31 | /** Lists transient statutes of the enum {@link SessionStatus}. */ 32 | export const SESSION_TRANSIENT_STATUSES: SessionStatus[] = [ 33 | 'starting', 34 | 'stopping', 35 | ] 36 | -------------------------------------------------------------------------------- /packages_generated/lb/src/v1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { 4 | CertificateStatus, 5 | InstanceStatus, 6 | LbStatus, 7 | PrivateNetworkStatus, 8 | } from './types.gen.js' 9 | 10 | /** Lists transient statutes of the enum {@link CertificateStatus}. */ 11 | export const CERTIFICATE_TRANSIENT_STATUSES: CertificateStatus[] = ['pending'] 12 | 13 | /** Lists transient statutes of the enum {@link InstanceStatus}. */ 14 | export const INSTANCE_TRANSIENT_STATUSES: InstanceStatus[] = [ 15 | 'pending', 16 | 'migrating', 17 | ] 18 | 19 | /** Lists transient statutes of the enum {@link LbStatus}. */ 20 | export const LB_TRANSIENT_STATUSES: LbStatus[] = [ 21 | 'pending', 22 | 'migrating', 23 | 'to_create', 24 | 'creating', 25 | 'to_delete', 26 | 'deleting', 27 | ] 28 | 29 | /** Lists transient statutes of the enum {@link PrivateNetworkStatus}. */ 30 | export const PRIVATE_NETWORK_TRANSIENT_STATUSES: PrivateNetworkStatus[] = [ 31 | 'pending', 32 | ] 33 | -------------------------------------------------------------------------------- /packages/client/src/internal/logger/index.ts: -------------------------------------------------------------------------------- 1 | import { ConsoleLogger } from './console-logger.js' 2 | import type { LogLevel } from './level-resolver.js' 3 | import type { Logger } from './logger.js' 4 | 5 | let sdkLogger: Logger = new ConsoleLogger('silent') 6 | 7 | /** 8 | * Sets a logger to be used within the SDK. 9 | * 10 | * @param logger - The Logger instance 11 | * 12 | * @public 13 | */ 14 | export const setLogger = (logger: Readonly) => { 15 | sdkLogger = logger 16 | } 17 | 18 | /** 19 | * Sets the logger to console logger with given logLevel (log is disabled by default). 20 | * 21 | * @param logLevel - The Log level (default to 'warn') 22 | * @param prefix - A Log message prefix (default to 'scaleway-sdk-js:') 23 | * 24 | * @public 25 | */ 26 | export const enableConsoleLogger = ( 27 | logLevel: LogLevel = 'warn', 28 | prefix = 'scaleway-sdk-js:', 29 | ) => setLogger(new ConsoleLogger(logLevel, prefix)) 30 | 31 | /** 32 | * Returns the active SDK logger. 33 | * 34 | * @internal 35 | */ 36 | export const getLogger = (): Readonly => sdkLogger 37 | -------------------------------------------------------------------------------- /packages/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-client", 3 | "version": "2.0.0", 4 | "license": "Apache-2.0", 5 | "description": "Scaleway SDK Client", 6 | "keywords": [ 7 | "scaleway", 8 | "cloud", 9 | "sdk", 10 | "client" 11 | ], 12 | "scripts": { 13 | "typecheck": "tsc --noEmit", 14 | "type:generate": "tsc --declaration -p tsconfig.build.json", 15 | "build": "vite build --config ../../vite.config.ts && pnpm run type:generate && tsc-alias -p tsconfig.build.json", 16 | "build:profile": "npx vite-bundle-visualizer -c ../../vite.config.ts" 17 | }, 18 | "files": [ 19 | "dist" 20 | ], 21 | "publishConfig": { 22 | "access": "public" 23 | }, 24 | "repository": { 25 | "type": "git", 26 | "url": "git+https://github.com/scaleway/scaleway-sdk-js", 27 | "directory": "packages/client" 28 | }, 29 | "engines": { 30 | "node": ">=20.19.6" 31 | }, 32 | "type": "module", 33 | "exports": { 34 | ".": { 35 | "types": "./dist/index.d.ts", 36 | "default": "./dist/index.js" 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /packages_generated/billing/src/v2beta1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './marshalling.gen.js' 5 | export type { 6 | Discount, 7 | DiscountCoupon, 8 | DiscountDiscountMode, 9 | DiscountFilter, 10 | DiscountFilterType, 11 | DownloadInvoiceRequest, 12 | DownloadInvoiceRequestFileType, 13 | ExportInvoicesRequest, 14 | ExportInvoicesRequestFileType, 15 | ExportInvoicesRequestOrderBy, 16 | GetInvoiceRequest, 17 | Invoice, 18 | InvoiceType, 19 | ListConsumptionsRequest, 20 | ListConsumptionsRequestOrderBy, 21 | ListConsumptionsResponse, 22 | ListConsumptionsResponseConsumption, 23 | ListDiscountsRequest, 24 | ListDiscountsRequestOrderBy, 25 | ListDiscountsResponse, 26 | ListInvoicesRequest, 27 | ListInvoicesRequestOrderBy, 28 | ListInvoicesResponse, 29 | ListTaxesRequest, 30 | ListTaxesRequestOrderBy, 31 | ListTaxesResponse, 32 | ListTaxesResponseTax, 33 | RedeemCouponRequest, 34 | } from './types.gen.js' 35 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "globalDependencies": ["tsconfig.json"], 4 | "ui": "stream", 5 | "globalEnv": [ 6 | "BASE_URL", 7 | "CI", 8 | "IS_CI", 9 | "DEVTOOLS", 10 | "ENVIRONMENT", 11 | "TIMING", 12 | "ESLINT_CODE_QUALITY_REPORT", 13 | "HUSKY", 14 | "NODE_ENV", 15 | "PROFILE", 16 | "PROXY", 17 | "RELEASE_NAME", 18 | "SENTRY_LOG_LEVEL", 19 | "VERSION" 20 | ], 21 | "tasks": { 22 | "build": { 23 | "dependsOn": ["^build"], 24 | "outputLogs": "new-only", 25 | "outputs": [ 26 | "build/**", 27 | "dist/**", 28 | ".next/**", 29 | "!.next/cache/**", 30 | "out/**" 31 | ], 32 | "cache": true 33 | }, 34 | 35 | "lint": { 36 | "dependsOn": ["build"], 37 | "outputLogs": "new-only", 38 | "outputs": [".eslintcache", "**/.eslintcache"], 39 | "cache": true 40 | }, 41 | "typecheck": { 42 | "dependsOn": ["build"], 43 | "outputLogs": "new-only", 44 | "cache": true 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /packages/client/src/internal/interceptors/helpers.ts: -------------------------------------------------------------------------------- 1 | import type { RequestInterceptor } from './types.js' 2 | 3 | /** 4 | * Adds an header to a request through an interceptor. 5 | * 6 | * @param key - The header key 7 | * @param value - The header value 8 | * @returns The Request interceptor 9 | * 10 | * @internal 11 | */ 12 | export const addHeaderInterceptor = 13 | (key: string, value?: string): RequestInterceptor => 14 | ({ request }) => { 15 | const clone = request.clone() 16 | if (value !== undefined) { 17 | clone.headers.append(key, value) 18 | } 19 | 20 | return clone 21 | } 22 | 23 | /** 24 | * Adds asynchronously an header to a request through an interceptor. 25 | * 26 | * @param key - The header key 27 | * @param value - The header value as a Promise 28 | * @returns The Request interceptor 29 | * 30 | * @internal 31 | */ 32 | export const addAsyncHeaderInterceptor = 33 | ( 34 | key: string, 35 | getter: () => Promise, 36 | ): RequestInterceptor => 37 | async request => 38 | addHeaderInterceptor(key, await getter())(request) 39 | -------------------------------------------------------------------------------- /packages_generated/block/src/v1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const CreateSnapshotRequest = { 5 | name: { 6 | minLength: 1, 7 | }, 8 | } 9 | 10 | export const CreateVolumeRequest = { 11 | name: { 12 | minLength: 1, 13 | }, 14 | } 15 | 16 | export const ImportSnapshotFromObjectStorageRequest = { 17 | name: { 18 | minLength: 1, 19 | }, 20 | } 21 | 22 | export const ListSnapshotsRequest = { 23 | page: { 24 | greaterThan: 0, 25 | }, 26 | pageSize: { 27 | greaterThan: 0, 28 | lessThanOrEqual: 100, 29 | }, 30 | } 31 | 32 | export const ListVolumeTypesRequest = { 33 | page: { 34 | greaterThan: 0, 35 | }, 36 | pageSize: { 37 | greaterThan: 0, 38 | lessThanOrEqual: 100, 39 | }, 40 | } 41 | 42 | export const ListVolumesRequest = { 43 | page: { 44 | greaterThan: 0, 45 | }, 46 | pageSize: { 47 | greaterThan: 0, 48 | lessThanOrEqual: 100, 49 | }, 50 | } 51 | 52 | export const Reference = { 53 | productResourceType: { 54 | minLength: 1, 55 | }, 56 | } 57 | -------------------------------------------------------------------------------- /packages/client/src/helpers/__tests__/json.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from 'vitest' 2 | import { isJSON, isJSONObject } from '../json.js' 3 | 4 | describe('isJSON', () => { 5 | test.each(['str', 200, true, null, [true, 'two', 3], { key: 'value' }])( 6 | `accepts %s as a valid JSON value`, 7 | obj => { 8 | expect(isJSON(obj)).toBeTruthy() 9 | }, 10 | ) 11 | 12 | test.each([ 13 | undefined, 14 | () => { 15 | /* noop */ 16 | }, 17 | Symbol(42), 18 | ])(`rejects %s as a valid JSON value`, obj => { 19 | expect(isJSON(obj)).toBeFalsy() 20 | }) 21 | }) 22 | 23 | describe('isJSONObject', () => { 24 | test.each([{ key: 'value' }])( 25 | `accepts %s as a valid JSONObject value`, 26 | obj => { 27 | expect(isJSONObject(obj)).toBeTruthy() 28 | }, 29 | ) 30 | 31 | test.each([ 32 | 'str', 33 | 200, 34 | true, 35 | null, 36 | [true, 'two', 3], 37 | undefined, 38 | () => { 39 | /* noop */ 40 | }, 41 | Symbol(42), 42 | ])(`rejects %s as a valid JSONObject value`, obj => { 43 | expect(isJSONObject(obj)).toBeFalsy() 44 | }) 45 | }) 46 | -------------------------------------------------------------------------------- /packages/client/src/internals.ts: -------------------------------------------------------------------------------- 1 | export { isJSONObject } from './helpers/json.js' 2 | export { 3 | resolveOneOf, 4 | unmarshalArrayOfObject, 5 | unmarshalDate, 6 | unmarshalMapOfObject, 7 | urlParams, 8 | validatePathParam, 9 | } from './helpers/marshalling.js' 10 | export { 11 | createExponentialBackoffStrategy, 12 | tryAtIntervals, 13 | waitForResource, 14 | } from './internal/async/interval-retrier.js' 15 | export { addAsyncHeaderInterceptor } from './internal/interceptors/helpers.js' 16 | export { API } from './scw/api.js' 17 | export { authenticateWithSessionToken } from './scw/auth.js' 18 | export type { DefaultValues } from './scw/client-settings.js' 19 | export { 20 | marshalBlobToScwFile, 21 | marshalDecimal, 22 | marshalMoney, 23 | marshalScwFile, 24 | marshalTimeSeries, 25 | unmarshalAnyRes, 26 | unmarshalDecimal, 27 | unmarshalMoney, 28 | unmarshalScwFile, 29 | unmarshalServiceInfo, 30 | unmarshalTimeSeries, 31 | unmarshalTimeSeriesPoint, 32 | } from './scw/custom-marshalling.js' 33 | export type { ServiceInfo } from './scw/custom-types.js' 34 | export { enrichForPagination } from './scw/fetch/resource-paginator.js' 35 | -------------------------------------------------------------------------------- /packages_generated/instance/src/v1/types.utils.ts: -------------------------------------------------------------------------------- 1 | import type { Zone } from '@scaleway/sdk-client' 2 | import type { Server } from './types.gen' 3 | 4 | export interface AttachVolumeRequest { 5 | zone?: Zone 6 | serverId: string 7 | volumeId: string 8 | } 9 | 10 | /** Contains the updated server after attaching a volume. */ 11 | export interface AttachVolumeResponse { 12 | server?: Server 13 | } 14 | 15 | export interface DetachVolumeRequest { 16 | zone?: Zone 17 | volumeId: string 18 | } 19 | 20 | /** Contains the updated server after detaching a volume. */ 21 | export interface DetachVolumeResponse { 22 | server?: Server 23 | } 24 | 25 | export interface GetServerUserDataRequest { 26 | /** Zone to target. If none is passed will use default zone from the config */ 27 | zone?: Zone 28 | serverId: string 29 | /** The user data key to get */ 30 | key: string 31 | } 32 | 33 | export interface SetServerUserDataRequest { 34 | /** Zone to target. If none is passed will use default zone from the config */ 35 | zone?: Zone 36 | serverId: string 37 | /** The user data key to set */ 38 | key: string 39 | /** The data encoded in base64 */ 40 | content: string 41 | } 42 | -------------------------------------------------------------------------------- /packages/client/src/vendor/base64/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jameson Little 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/configuration-loader/src/path-resolver.ts: -------------------------------------------------------------------------------- 1 | import { homedir } from 'node:os' 2 | import * as path from 'node:path' 3 | import { env } from 'node:process' 4 | import { EnvironmentKey } from './env.js' 5 | 6 | /** 7 | * Gets the Scaleway directory. 8 | * 9 | * @returns The path to the Scaleway diretory 10 | * 11 | * @internal 12 | */ 13 | export const getScwConfigurationDirectory = () => { 14 | const xdgConfigPath = env.XDG_CONFIG_HOME 15 | if (typeof xdgConfigPath === 'string' && xdgConfigPath.length > 0) { 16 | return path.join(xdgConfigPath, 'scw') 17 | } 18 | 19 | return path.join(homedir(), '.config', 'scw') 20 | } 21 | 22 | /** 23 | * Gets the configuration file path. 24 | * 25 | * @returns The path to the configuration file 26 | * 27 | * @internal 28 | */ 29 | export const resolveConfigurationFilePath = () => { 30 | // Try path defined by user in env variables 31 | const envFilePath = env[EnvironmentKey.ScwConfigPath] 32 | if (typeof envFilePath === 'string' && envFilePath.length > 0) { 33 | return envFilePath 34 | } 35 | 36 | // or fallback on the default path 37 | return path.join(getScwConfigurationDirectory(), 'config.yaml') 38 | } 39 | -------------------------------------------------------------------------------- /packages_generated/applesilicon/src/v1alpha1/content.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | import type { 4 | RunnerStatus, 5 | ServerPrivateNetworkServerStatus, 6 | ServerPrivateNetworkStatus, 7 | ServerStatus, 8 | } from './types.gen.js' 9 | 10 | /** Lists transient statutes of the enum {@link RunnerStatus}. */ 11 | export const RUNNER_TRANSIENT_STATUSES: RunnerStatus[] = ['waiting'] 12 | 13 | /** Lists transient statutes of the enum {@link ServerPrivateNetworkServerStatus}. */ 14 | export const SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES: ServerPrivateNetworkServerStatus[] = 15 | ['attaching', 'detaching'] 16 | 17 | /** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */ 18 | export const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: ServerPrivateNetworkStatus[] = 19 | ['vpc_updating'] 20 | 21 | /** Lists transient statutes of the enum {@link ServerStatus}. */ 22 | export const SERVER_TRANSIENT_STATUSES: ServerStatus[] = [ 23 | 'starting', 24 | 'rebooting', 25 | 'updating', 26 | 'locking', 27 | 'unlocking', 28 | 'reinstalling', 29 | 'busy', 30 | ] 31 | -------------------------------------------------------------------------------- /packages/client/src/bridge.ts: -------------------------------------------------------------------------------- 1 | /** List all helpers required by APIs */ 2 | export { isJSONObject } from './helpers/json.js' 3 | export { 4 | resolveOneOf, 5 | unmarshalArrayOfObject, 6 | unmarshalDate, 7 | unmarshalMapOfObject, 8 | urlParams, 9 | validatePathParam, 10 | } from './helpers/marshalling.js' 11 | export type { WaitForOptions } from './internal/async/interval-retrier.js' 12 | export { waitForResource } from './internal/async/interval-retrier.js' 13 | export { API } from './scw/api.js' 14 | export type { DefaultValues } from './scw/client-settings.js' 15 | export { 16 | marshalBlobToScwFile, 17 | marshalDecimal, 18 | marshalMoney, 19 | marshalScwFile, 20 | marshalTimeSeries, 21 | unmarshalDecimal, 22 | unmarshalMoney, 23 | unmarshalScwFile, 24 | unmarshalServiceInfo, 25 | unmarshalTimeSeries, 26 | unmarshalTimeSeriesPoint, 27 | } from './scw/custom-marshalling.js' 28 | export type { 29 | Money, 30 | ScwFile, 31 | ServiceInfo, 32 | TimeSeries, 33 | } from './scw/custom-types.js' 34 | export { Decimal } from './scw/custom-types.js' 35 | export { enrichForPagination } from './scw/fetch/resource-paginator.js' 36 | export type { Region, Zone } from './scw/locality.js' 37 | -------------------------------------------------------------------------------- /packages/client/src/scw/errors/standard/already-exists-error.ts: -------------------------------------------------------------------------------- 1 | import type { JSONObject } from '../../../helpers/json.js' 2 | import { ScalewayError } from '../scw-error.js' 3 | 4 | /** 5 | * AlreadyExists error is used when a resource already exists. 6 | * 7 | * @public 8 | */ 9 | export class AlreadyExistsError extends ScalewayError { 10 | constructor( 11 | readonly status: number, 12 | readonly body: JSONObject, 13 | readonly resource: string, 14 | readonly resourceId: string, 15 | readonly helpMessage: string, 16 | ) { 17 | super( 18 | status, 19 | body, 20 | `resource ${resource} with ID ${resourceId} already exists: ${helpMessage}`, 21 | ) 22 | this.name = 'AlreadyExistsError' 23 | } 24 | 25 | static fromJSON(status: number, obj: Readonly) { 26 | if ( 27 | typeof obj.resource !== 'string' || 28 | typeof obj.resource_id !== 'string' || 29 | typeof obj.help_message !== 'string' 30 | ) { 31 | return null 32 | } 33 | 34 | return new AlreadyExistsError( 35 | status, 36 | obj, 37 | obj.resource, 38 | obj.resource_id, 39 | obj.help_message, 40 | ) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages_generated/function/src/v1beta1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const CreateFunctionRequest = { 5 | privateNetworkId: { 6 | ignoreEmpty: true, 7 | }, 8 | } 9 | 10 | export const CreateTriggerRequest = { 11 | description: { 12 | maxLength: 255, 13 | }, 14 | name: { 15 | maxLength: 50, 16 | minLength: 1, 17 | }, 18 | } 19 | 20 | export const CreateTriggerRequestMnqNatsClientConfig = { 21 | mnqRegion: { 22 | maxLength: 20, 23 | minLength: 1, 24 | }, 25 | subject: { 26 | maxLength: 100, 27 | minLength: 1, 28 | pattern: /^[^\s]+$/, 29 | }, 30 | } 31 | 32 | export const CreateTriggerRequestMnqSqsClientConfig = { 33 | mnqRegion: { 34 | maxLength: 20, 35 | minLength: 1, 36 | }, 37 | queue: { 38 | maxLength: 100, 39 | minLength: 1, 40 | }, 41 | } 42 | 43 | export const UpdateFunctionRequest = { 44 | privateNetworkId: { 45 | ignoreEmpty: true, 46 | }, 47 | } 48 | 49 | export const UpdateTriggerRequest = { 50 | description: { 51 | maxLength: 255, 52 | }, 53 | name: { 54 | maxLength: 50, 55 | minLength: 1, 56 | }, 57 | } 58 | -------------------------------------------------------------------------------- /scripts/templates/biome.generated.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "$schema": "../../node_modules/@biomejs/biome/configuration_schema.json", 4 | "files": { 5 | "ignoreUnknown": true, 6 | "experimentalScannerIgnores": ["**/dist/**"] 7 | }, 8 | "linter": { 9 | "enabled": true, 10 | "rules": { 11 | "recommended": false, 12 | "correctness": { 13 | "noUnusedVariables": "error", 14 | "noUnusedImports": "error" 15 | }, 16 | "style": { 17 | "useNamingConvention": "off", 18 | "noDefaultExport": "off" 19 | }, 20 | "suspicious": { 21 | "noShadowRestrictedNames": "off", 22 | "noEmptyInterface": "off" 23 | }, 24 | "performance": { 25 | "noAccumulatingSpread": "off" 26 | }, 27 | "complexity": { 28 | "noExcessiveCognitiveComplexity": "off", 29 | "noStaticOnlyClass": "off", 30 | "noBannedTypes": "off" 31 | } 32 | } 33 | }, 34 | "formatter": { 35 | "enabled": true 36 | }, 37 | "javascript": { 38 | "formatter": { 39 | "quoteStyle": "single", 40 | "trailingCommas": "all", 41 | "semicolons": "asNeeded" 42 | } 43 | } 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /packages_generated/block/src/v1/index.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | export { API } from './api.gen.js' 4 | export * from './content.gen.js' 5 | export * from './marshalling.gen.js' 6 | export type { 7 | CreateSnapshotRequest, 8 | CreateVolumeRequest, 9 | CreateVolumeRequestFromEmpty, 10 | CreateVolumeRequestFromSnapshot, 11 | DeleteSnapshotRequest, 12 | DeleteVolumeRequest, 13 | ExportSnapshotToObjectStorageRequest, 14 | GetSnapshotRequest, 15 | GetVolumeRequest, 16 | ImportSnapshotFromObjectStorageRequest, 17 | ListSnapshotsRequest, 18 | ListSnapshotsRequestOrderBy, 19 | ListSnapshotsResponse, 20 | ListVolumeTypesRequest, 21 | ListVolumeTypesResponse, 22 | ListVolumesRequest, 23 | ListVolumesRequestOrderBy, 24 | ListVolumesResponse, 25 | Reference, 26 | ReferenceStatus, 27 | ReferenceType, 28 | Snapshot, 29 | SnapshotParentVolume, 30 | SnapshotStatus, 31 | StorageClass, 32 | UpdateSnapshotRequest, 33 | UpdateVolumeRequest, 34 | Volume, 35 | VolumeSpecifications, 36 | VolumeStatus, 37 | VolumeType, 38 | } from './types.gen.js' 39 | export * as ValidationRules from './validation-rules.gen.js' 40 | -------------------------------------------------------------------------------- /packages_generated/iam/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-iam", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK iam", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/iam" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/iot/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-iot", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK iot", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/iot" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/k8s/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-k8s", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK k8s", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/k8s" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/lb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-lb", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK lb", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/lb" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/mnq/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-mnq", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK mnq", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/mnq" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/rdb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-rdb", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK rdb", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/rdb" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/tem/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-tem", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK tem", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/tem" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/vpc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-vpc", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK vpc", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/vpc" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/block/src/v1alpha1/validation-rules.gen.ts: -------------------------------------------------------------------------------- 1 | // This file was automatically generated. DO NOT EDIT. 2 | // If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | export const CreateSnapshotRequest = { 5 | name: { 6 | minLength: 1, 7 | }, 8 | } 9 | 10 | export const CreateVolumeRequest = { 11 | name: { 12 | minLength: 1, 13 | }, 14 | } 15 | 16 | export const ImportSnapshotFromObjectStorageRequest = { 17 | name: { 18 | minLength: 1, 19 | }, 20 | } 21 | 22 | export const ImportSnapshotFromS3Request = { 23 | name: { 24 | minLength: 1, 25 | }, 26 | } 27 | 28 | export const ListSnapshotsRequest = { 29 | page: { 30 | greaterThan: 0, 31 | }, 32 | pageSize: { 33 | greaterThan: 0, 34 | lessThanOrEqual: 100, 35 | }, 36 | } 37 | 38 | export const ListVolumeTypesRequest = { 39 | page: { 40 | greaterThan: 0, 41 | }, 42 | pageSize: { 43 | greaterThan: 0, 44 | lessThanOrEqual: 100, 45 | }, 46 | } 47 | 48 | export const ListVolumesRequest = { 49 | page: { 50 | greaterThan: 0, 51 | }, 52 | pageSize: { 53 | greaterThan: 0, 54 | lessThanOrEqual: 100, 55 | }, 56 | } 57 | 58 | export const Reference = { 59 | productResourceType: { 60 | minLength: 1, 61 | }, 62 | } 63 | -------------------------------------------------------------------------------- /packages_generated/file/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-file", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK file", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/file" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/ipam/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-ipam", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK ipam", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/ipam" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/jobs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-jobs", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK jobs", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/jobs" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/qaas/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-qaas", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK qaas", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/qaas" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-test", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK test", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/test" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/block/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-block", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK block", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/block" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/kafka/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-kafka", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK kafka", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "dist", 8 | "README.md" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/kafka" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/sdk-std": "workspace:*", 37 | "@scaleway/random-name": "5.1.2" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/redis/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-redis", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK redis", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/redis" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/vpcgw/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-vpcgw", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK vpcgw", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/vpcgw" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/domain/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-domain", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK domain", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/domain" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/secret/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-secret", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK secret", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/secret" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/account/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-account", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK account", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/account" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/billing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-billing", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK billing", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/billing" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/cockpit/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-cockpit", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK cockpit", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/cockpit" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/dedibox/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-dedibox", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK dedibox", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/dedibox" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/function/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-function", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK function", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/function" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/instance/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-instance", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK instance", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/instance" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/mongodb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-mongodb", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK mongodb", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/mongodb" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/registry/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-registry", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK registry", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/registry" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/s2s_vpn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-s2s-vpn", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK s2s-vpn", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/s2s-vpn" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/baremetal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-baremetal", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK baremetal", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/baremetal" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/container/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-container", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK container", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/container" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/inference/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-inference", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK inference", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/inference" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages_generated/interlink/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scaleway/sdk-interlink", 3 | "version": "2.0.0", 4 | "description": "Scaleway SDK interlink", 5 | "license": "Apache-2.0", 6 | "files": [ 7 | "README.md", 8 | "dist" 9 | ], 10 | "type": "module", 11 | "exports": { 12 | ".": { 13 | "types": "./dist/index.gen.d.ts", 14 | "default": "./dist/index.gen.js" 15 | }, 16 | "./*": { 17 | "types": "./dist/*/index.gen.d.ts", 18 | "default": "./dist/*/index.gen.js" 19 | } 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "directory": "packages_generated/interlink" 24 | }, 25 | "engines": { 26 | "node": ">=20.19.6" 27 | }, 28 | "scripts": { 29 | "package:check": "pnpm publint", 30 | "typecheck": "tsc --noEmit", 31 | "type:generate": "tsc --declaration -p tsconfig.build.json", 32 | "build": "vite build --config vite.config.ts && pnpm run type:generate", 33 | "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" 34 | }, 35 | "dependencies": { 36 | "@scaleway/random-name": "5.1.2", 37 | "@scaleway/sdk-std": "workspace:*" 38 | }, 39 | "peerDependencies": { 40 | "@scaleway/sdk-client": "workspace:^" 41 | }, 42 | "devDependencies": { 43 | "@scaleway/sdk-client": "workspace:^" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/client/src/scw/errors/standard/resource-expired-error.ts: -------------------------------------------------------------------------------- 1 | import type { JSONObject } from '../../../helpers/json.js' 2 | import { ScalewayError } from '../scw-error.js' 3 | 4 | /** 5 | * ResourceExpired error happens when trying to access a resource that has expired. 6 | * 7 | * @public 8 | */ 9 | export class ResourceExpiredError extends ScalewayError { 10 | constructor( 11 | readonly status: number, 12 | readonly body: JSONObject, 13 | readonly resource: string, 14 | readonly resourceId: string, 15 | readonly expiredSince: Date, 16 | ) { 17 | super( 18 | status, 19 | body, 20 | `resource ${resource} with ID ${resourceId} expired since ${expiredSince.toISOString()}`, 21 | ) 22 | this.name = 'ResourceExpiredError' 23 | } 24 | 25 | static fromJSON(status: number, obj: Readonly) { 26 | if ( 27 | typeof obj.resource !== 'string' || 28 | typeof obj.resource_id !== 'string' || 29 | typeof obj.expired_since !== 'string' 30 | ) { 31 | return null 32 | } 33 | 34 | return new ResourceExpiredError( 35 | status, 36 | obj, 37 | obj.resource, 38 | obj.resource_id, 39 | new Date(obj.expired_since), 40 | ) 41 | } 42 | } 43 | --------------------------------------------------------------------------------