@katerai/sdk 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/LICENSE +201 -0
- package/README.md +385 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +188 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +188 -0
- package/client.d.ts.map +1 -0
- package/client.js +486 -0
- package/client.js.map +1 -0
- package/client.mjs +482 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +137 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +7 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -0
- package/resources/v1/api-keys.d.mts +142 -0
- package/resources/v1/api-keys.d.mts.map +1 -0
- package/resources/v1/api-keys.d.ts +142 -0
- package/resources/v1/api-keys.d.ts.map +1 -0
- package/resources/v1/api-keys.js +66 -0
- package/resources/v1/api-keys.js.map +1 -0
- package/resources/v1/api-keys.mjs +62 -0
- package/resources/v1/api-keys.mjs.map +1 -0
- package/resources/v1/connections/connections.d.mts +638 -0
- package/resources/v1/connections/connections.d.mts.map +1 -0
- package/resources/v1/connections/connections.d.ts +638 -0
- package/resources/v1/connections/connections.d.ts.map +1 -0
- package/resources/v1/connections/connections.js +67 -0
- package/resources/v1/connections/connections.js.map +1 -0
- package/resources/v1/connections/connections.mjs +62 -0
- package/resources/v1/connections/connections.mjs.map +1 -0
- package/resources/v1/connections/databases.d.mts +25 -0
- package/resources/v1/connections/databases.d.mts.map +1 -0
- package/resources/v1/connections/databases.d.ts +25 -0
- package/resources/v1/connections/databases.d.ts.map +1 -0
- package/resources/v1/connections/databases.js +26 -0
- package/resources/v1/connections/databases.js.map +1 -0
- package/resources/v1/connections/databases.mjs +22 -0
- package/resources/v1/connections/databases.mjs.map +1 -0
- package/resources/v1/connections/index.d.mts +3 -0
- package/resources/v1/connections/index.d.mts.map +1 -0
- package/resources/v1/connections/index.d.ts +3 -0
- package/resources/v1/connections/index.d.ts.map +1 -0
- package/resources/v1/connections/index.js +9 -0
- package/resources/v1/connections/index.js.map +1 -0
- package/resources/v1/connections/index.mjs +4 -0
- package/resources/v1/connections/index.mjs.map +1 -0
- package/resources/v1/connections.d.mts +2 -0
- package/resources/v1/connections.d.mts.map +1 -0
- package/resources/v1/connections.d.ts +2 -0
- package/resources/v1/connections.d.ts.map +1 -0
- package/resources/v1/connections.js +6 -0
- package/resources/v1/connections.js.map +1 -0
- package/resources/v1/connections.mjs +3 -0
- package/resources/v1/connections.mjs.map +1 -0
- package/resources/v1/github/admin.d.mts +33 -0
- package/resources/v1/github/admin.d.mts.map +1 -0
- package/resources/v1/github/admin.d.ts +33 -0
- package/resources/v1/github/admin.d.ts.map +1 -0
- package/resources/v1/github/admin.js +17 -0
- package/resources/v1/github/admin.js.map +1 -0
- package/resources/v1/github/admin.mjs +13 -0
- package/resources/v1/github/admin.mjs.map +1 -0
- package/resources/v1/github/github.d.mts +87 -0
- package/resources/v1/github/github.d.mts.map +1 -0
- package/resources/v1/github/github.d.ts +87 -0
- package/resources/v1/github/github.d.ts.map +1 -0
- package/resources/v1/github/github.js +53 -0
- package/resources/v1/github/github.js.map +1 -0
- package/resources/v1/github/github.mjs +48 -0
- package/resources/v1/github/github.mjs.map +1 -0
- package/resources/v1/github/index.d.mts +6 -0
- package/resources/v1/github/index.d.mts.map +1 -0
- package/resources/v1/github/index.d.ts +6 -0
- package/resources/v1/github/index.d.ts.map +1 -0
- package/resources/v1/github/index.js +15 -0
- package/resources/v1/github/index.js.map +1 -0
- package/resources/v1/github/index.mjs +7 -0
- package/resources/v1/github/index.mjs.map +1 -0
- package/resources/v1/github/repos.d.mts +54 -0
- package/resources/v1/github/repos.d.mts.map +1 -0
- package/resources/v1/github/repos.d.ts +54 -0
- package/resources/v1/github/repos.d.ts.map +1 -0
- package/resources/v1/github/repos.js +22 -0
- package/resources/v1/github/repos.js.map +1 -0
- package/resources/v1/github/repos.mjs +18 -0
- package/resources/v1/github/repos.mjs.map +1 -0
- package/resources/v1/github/scaffold.d.mts +44 -0
- package/resources/v1/github/scaffold.d.mts.map +1 -0
- package/resources/v1/github/scaffold.d.ts +44 -0
- package/resources/v1/github/scaffold.d.ts.map +1 -0
- package/resources/v1/github/scaffold.js +27 -0
- package/resources/v1/github/scaffold.js.map +1 -0
- package/resources/v1/github/scaffold.mjs +23 -0
- package/resources/v1/github/scaffold.mjs.map +1 -0
- package/resources/v1/github/webhooks.d.mts +16 -0
- package/resources/v1/github/webhooks.d.mts.map +1 -0
- package/resources/v1/github/webhooks.d.ts +16 -0
- package/resources/v1/github/webhooks.d.ts.map +1 -0
- package/resources/v1/github/webhooks.js +15 -0
- package/resources/v1/github/webhooks.js.map +1 -0
- package/resources/v1/github/webhooks.mjs +11 -0
- package/resources/v1/github/webhooks.mjs.map +1 -0
- package/resources/v1/github.d.mts +2 -0
- package/resources/v1/github.d.mts.map +1 -0
- package/resources/v1/github.d.ts +2 -0
- package/resources/v1/github.d.ts.map +1 -0
- package/resources/v1/github.js +6 -0
- package/resources/v1/github.js.map +1 -0
- package/resources/v1/github.mjs +3 -0
- package/resources/v1/github.mjs.map +1 -0
- package/resources/v1/groups/groups.d.mts +162 -0
- package/resources/v1/groups/groups.d.mts.map +1 -0
- package/resources/v1/groups/groups.d.ts +162 -0
- package/resources/v1/groups/groups.d.ts.map +1 -0
- package/resources/v1/groups/groups.js +81 -0
- package/resources/v1/groups/groups.js.map +1 -0
- package/resources/v1/groups/groups.mjs +76 -0
- package/resources/v1/groups/groups.mjs.map +1 -0
- package/resources/v1/groups/index.d.mts +3 -0
- package/resources/v1/groups/index.d.mts.map +1 -0
- package/resources/v1/groups/index.d.ts +3 -0
- package/resources/v1/groups/index.d.ts.map +1 -0
- package/resources/v1/groups/index.js +9 -0
- package/resources/v1/groups/index.js.map +1 -0
- package/resources/v1/groups/index.mjs +4 -0
- package/resources/v1/groups/index.mjs.map +1 -0
- package/resources/v1/groups/tenants.d.mts +55 -0
- package/resources/v1/groups/tenants.d.mts.map +1 -0
- package/resources/v1/groups/tenants.d.ts +55 -0
- package/resources/v1/groups/tenants.d.ts.map +1 -0
- package/resources/v1/groups/tenants.js +39 -0
- package/resources/v1/groups/tenants.js.map +1 -0
- package/resources/v1/groups/tenants.mjs +35 -0
- package/resources/v1/groups/tenants.mjs.map +1 -0
- package/resources/v1/groups.d.mts +2 -0
- package/resources/v1/groups.d.mts.map +1 -0
- package/resources/v1/groups.d.ts +2 -0
- package/resources/v1/groups.d.ts.map +1 -0
- package/resources/v1/groups.js +6 -0
- package/resources/v1/groups.js.map +1 -0
- package/resources/v1/groups.mjs +3 -0
- package/resources/v1/groups.mjs.map +1 -0
- package/resources/v1/index.d.mts +9 -0
- package/resources/v1/index.d.mts.map +1 -0
- package/resources/v1/index.d.ts +9 -0
- package/resources/v1/index.d.ts.map +1 -0
- package/resources/v1/index.js +21 -0
- package/resources/v1/index.js.map +1 -0
- package/resources/v1/index.mjs +10 -0
- package/resources/v1/index.mjs.map +1 -0
- package/resources/v1/me.d.mts +51 -0
- package/resources/v1/me.d.mts.map +1 -0
- package/resources/v1/me.d.ts +51 -0
- package/resources/v1/me.d.ts.map +1 -0
- package/resources/v1/me.js +29 -0
- package/resources/v1/me.js.map +1 -0
- package/resources/v1/me.mjs +25 -0
- package/resources/v1/me.mjs.map +1 -0
- package/resources/v1/org/client.d.mts +53 -0
- package/resources/v1/org/client.d.mts.map +1 -0
- package/resources/v1/org/client.d.ts +53 -0
- package/resources/v1/org/client.d.ts.map +1 -0
- package/resources/v1/org/client.js +25 -0
- package/resources/v1/org/client.js.map +1 -0
- package/resources/v1/org/client.mjs +21 -0
- package/resources/v1/org/client.mjs.map +1 -0
- package/resources/v1/org/index.d.mts +4 -0
- package/resources/v1/org/index.d.mts.map +1 -0
- package/resources/v1/org/index.d.ts +4 -0
- package/resources/v1/org/index.d.ts.map +1 -0
- package/resources/v1/org/index.js +11 -0
- package/resources/v1/org/index.js.map +1 -0
- package/resources/v1/org/index.mjs +5 -0
- package/resources/v1/org/index.mjs.map +1 -0
- package/resources/v1/org/org.d.mts +14 -0
- package/resources/v1/org/org.d.mts.map +1 -0
- package/resources/v1/org/org.d.ts +14 -0
- package/resources/v1/org/org.d.ts.map +1 -0
- package/resources/v1/org/org.js +21 -0
- package/resources/v1/org/org.js.map +1 -0
- package/resources/v1/org/org.mjs +16 -0
- package/resources/v1/org/org.mjs.map +1 -0
- package/resources/v1/org/users.d.mts +87 -0
- package/resources/v1/org/users.d.mts.map +1 -0
- package/resources/v1/org/users.d.ts +87 -0
- package/resources/v1/org/users.d.ts.map +1 -0
- package/resources/v1/org/users.js +60 -0
- package/resources/v1/org/users.js.map +1 -0
- package/resources/v1/org/users.mjs +56 -0
- package/resources/v1/org/users.mjs.map +1 -0
- package/resources/v1/org.d.mts +2 -0
- package/resources/v1/org.d.mts.map +1 -0
- package/resources/v1/org.d.ts +2 -0
- package/resources/v1/org.d.ts.map +1 -0
- package/resources/v1/org.js +6 -0
- package/resources/v1/org.js.map +1 -0
- package/resources/v1/org.mjs +3 -0
- package/resources/v1/org.mjs.map +1 -0
- package/resources/v1/tenants/batch.d.mts +159 -0
- package/resources/v1/tenants/batch.d.mts.map +1 -0
- package/resources/v1/tenants/batch.d.ts +159 -0
- package/resources/v1/tenants/batch.d.ts.map +1 -0
- package/resources/v1/tenants/batch.js +42 -0
- package/resources/v1/tenants/batch.js.map +1 -0
- package/resources/v1/tenants/batch.mjs +38 -0
- package/resources/v1/tenants/batch.mjs.map +1 -0
- package/resources/v1/tenants/import.d.mts +126 -0
- package/resources/v1/tenants/import.d.mts.map +1 -0
- package/resources/v1/tenants/import.d.ts +126 -0
- package/resources/v1/tenants/import.d.ts.map +1 -0
- package/resources/v1/tenants/import.js +50 -0
- package/resources/v1/tenants/import.js.map +1 -0
- package/resources/v1/tenants/import.mjs +46 -0
- package/resources/v1/tenants/import.mjs.map +1 -0
- package/resources/v1/tenants/index.d.mts +4 -0
- package/resources/v1/tenants/index.d.mts.map +1 -0
- package/resources/v1/tenants/index.d.ts +4 -0
- package/resources/v1/tenants/index.d.ts.map +1 -0
- package/resources/v1/tenants/index.js +11 -0
- package/resources/v1/tenants/index.js.map +1 -0
- package/resources/v1/tenants/index.mjs +5 -0
- package/resources/v1/tenants/index.mjs.map +1 -0
- package/resources/v1/tenants/tenants.d.mts +205 -0
- package/resources/v1/tenants/tenants.d.mts.map +1 -0
- package/resources/v1/tenants/tenants.d.ts +205 -0
- package/resources/v1/tenants/tenants.d.ts.map +1 -0
- package/resources/v1/tenants/tenants.js +97 -0
- package/resources/v1/tenants/tenants.js.map +1 -0
- package/resources/v1/tenants/tenants.mjs +92 -0
- package/resources/v1/tenants/tenants.mjs.map +1 -0
- package/resources/v1/tenants.d.mts +2 -0
- package/resources/v1/tenants.d.mts.map +1 -0
- package/resources/v1/tenants.d.ts +2 -0
- package/resources/v1/tenants.d.ts.map +1 -0
- package/resources/v1/tenants.js +6 -0
- package/resources/v1/tenants.js.map +1 -0
- package/resources/v1/tenants.mjs +3 -0
- package/resources/v1/tenants.mjs.map +1 -0
- package/resources/v1/v1.d.mts +34 -0
- package/resources/v1/v1.d.mts.map +1 -0
- package/resources/v1/v1.d.ts +34 -0
- package/resources/v1/v1.d.ts.map +1 -0
- package/resources/v1/v1.js +41 -0
- package/resources/v1/v1.js.map +1 -0
- package/resources/v1/v1.mjs +36 -0
- package/resources/v1/v1.mjs.map +1 -0
- package/resources/v1.d.mts +2 -0
- package/resources/v1.d.mts.map +1 -0
- package/resources/v1.d.ts +2 -0
- package/resources/v1.d.ts.map +1 -0
- package/resources/v1.js +6 -0
- package/resources/v1.js.map +1 -0
- package/resources/v1.mjs +3 -0
- package/resources/v1.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +761 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +127 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/v1/api-keys.ts +186 -0
- package/src/resources/v1/connections/connections.ts +804 -0
- package/src/resources/v1/connections/databases.ts +42 -0
- package/src/resources/v1/connections/index.ts +12 -0
- package/src/resources/v1/connections.ts +3 -0
- package/src/resources/v1/github/admin.ts +56 -0
- package/src/resources/v1/github/github.ts +145 -0
- package/src/resources/v1/github/index.ts +19 -0
- package/src/resources/v1/github/repos.ts +85 -0
- package/src/resources/v1/github/scaffold.ts +71 -0
- package/src/resources/v1/github/webhooks.ts +20 -0
- package/src/resources/v1/github.ts +3 -0
- package/src/resources/v1/groups/groups.ts +218 -0
- package/src/resources/v1/groups/index.ts +10 -0
- package/src/resources/v1/groups/tenants.ts +78 -0
- package/src/resources/v1/groups.ts +3 -0
- package/src/resources/v1/index.ts +43 -0
- package/src/resources/v1/me.ts +78 -0
- package/src/resources/v1/org/client.ts +81 -0
- package/src/resources/v1/org/index.ts +11 -0
- package/src/resources/v1/org/org.ts +32 -0
- package/src/resources/v1/org/users.ts +127 -0
- package/src/resources/v1/org.ts +3 -0
- package/src/resources/v1/tenants/batch.ts +200 -0
- package/src/resources/v1/tenants/import.ts +158 -0
- package/src/resources/v1/tenants/index.ts +27 -0
- package/src/resources/v1/tenants/tenants.ts +290 -0
- package/src/resources/v1/tenants.ts +3 -0
- package/src/resources/v1/v1.ts +116 -0
- package/src/resources/v1.ts +3 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Import = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const uploads_1 = require("../../../internal/uploads.js");
|
|
7
|
+
class Import extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Import tenants from a CSV file using upsert semantics.
|
|
10
|
+
*
|
|
11
|
+
* Expected CSV format:
|
|
12
|
+
*
|
|
13
|
+
* - tenant_key (required): Unique tenant identifier
|
|
14
|
+
* - tenant_name (optional): Human-readable name
|
|
15
|
+
* - group_names (optional): Comma-separated list of group names
|
|
16
|
+
*
|
|
17
|
+
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
18
|
+
* added additively (not replaced) and auto-created if needed.
|
|
19
|
+
*
|
|
20
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
21
|
+
*
|
|
22
|
+
* Raises: ValidationError: If CSV format is invalid (400)
|
|
23
|
+
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
24
|
+
*/
|
|
25
|
+
fromCsv(body, options) {
|
|
26
|
+
return this._client.post('/api/v1/tenants/import/csv', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Import tenants from a warehouse table using upsert semantics.
|
|
30
|
+
*
|
|
31
|
+
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
32
|
+
* added additively (not replaced).
|
|
33
|
+
*
|
|
34
|
+
* Streams data from the warehouse in batches to handle large datasets without
|
|
35
|
+
* loading everything into memory.
|
|
36
|
+
*
|
|
37
|
+
* For tenants with groups, groups are aggregated per tenant key and auto-created
|
|
38
|
+
* if they don't exist.
|
|
39
|
+
*
|
|
40
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
41
|
+
*
|
|
42
|
+
* Raises: ConnectionNotFoundError: If the connection doesn't exist (404)
|
|
43
|
+
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
44
|
+
*/
|
|
45
|
+
fromWarehouse(body, options) {
|
|
46
|
+
return this._client.post('/api/v1/tenants/import/warehouse', { body, ...options });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.Import = Import;
|
|
50
|
+
//# sourceMappingURL=import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../src/resources/v1/tenants/import.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAwE;AAExE,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,IAAyB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,4BAA4B,EAC5B,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,IAA+B,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA7CD,wBA6CC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
|
|
4
|
+
export class Import extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Import tenants from a CSV file using upsert semantics.
|
|
7
|
+
*
|
|
8
|
+
* Expected CSV format:
|
|
9
|
+
*
|
|
10
|
+
* - tenant_key (required): Unique tenant identifier
|
|
11
|
+
* - tenant_name (optional): Human-readable name
|
|
12
|
+
* - group_names (optional): Comma-separated list of group names
|
|
13
|
+
*
|
|
14
|
+
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
15
|
+
* added additively (not replaced) and auto-created if needed.
|
|
16
|
+
*
|
|
17
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
18
|
+
*
|
|
19
|
+
* Raises: ValidationError: If CSV format is invalid (400)
|
|
20
|
+
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
21
|
+
*/
|
|
22
|
+
fromCsv(body, options) {
|
|
23
|
+
return this._client.post('/api/v1/tenants/import/csv', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Import tenants from a warehouse table using upsert semantics.
|
|
27
|
+
*
|
|
28
|
+
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
29
|
+
* added additively (not replaced).
|
|
30
|
+
*
|
|
31
|
+
* Streams data from the warehouse in batches to handle large datasets without
|
|
32
|
+
* loading everything into memory.
|
|
33
|
+
*
|
|
34
|
+
* For tenants with groups, groups are aggregated per tenant key and auto-created
|
|
35
|
+
* if they don't exist.
|
|
36
|
+
*
|
|
37
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
38
|
+
*
|
|
39
|
+
* Raises: ConnectionNotFoundError: If the connection doesn't exist (404)
|
|
40
|
+
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
41
|
+
*/
|
|
42
|
+
fromWarehouse(body, options) {
|
|
43
|
+
return this._client.post('/api/v1/tenants/import/warehouse', { body, ...options });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=import.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/import.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,2BAA2B,EAAE;AAEtC,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,IAAyB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,4BAA4B,EAC5B,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,IAA+B,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Batch, type BatchTenantError, type BatchTenantSuccess, type BatchCreateResponse, type BatchUpdateResponse, type BatchDeleteResponse, type BatchCreateParams, type BatchUpdateParams, type BatchDeleteParams, } from "./batch.mjs";
|
|
2
|
+
export { Import, type ImportTenants, type ImportFromCsvParams, type ImportFromWarehouseParams, } from "./import.mjs";
|
|
3
|
+
export { Tenants, type CreateTenant, type Tenant, type TenantListResponse, type TenantCreateParams, type TenantUpdateParams, } from "./tenants.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B;OACM,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Batch, type BatchTenantError, type BatchTenantSuccess, type BatchCreateResponse, type BatchUpdateResponse, type BatchDeleteResponse, type BatchCreateParams, type BatchUpdateParams, type BatchDeleteParams, } from "./batch.js";
|
|
2
|
+
export { Import, type ImportTenants, type ImportFromCsvParams, type ImportFromWarehouseParams, } from "./import.js";
|
|
3
|
+
export { Tenants, type CreateTenant, type Tenant, type TenantListResponse, type TenantCreateParams, type TenantUpdateParams, } from "./tenants.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B;OACM,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Tenants = exports.Import = exports.Batch = void 0;
|
|
5
|
+
var batch_1 = require("./batch.js");
|
|
6
|
+
Object.defineProperty(exports, "Batch", { enumerable: true, get: function () { return batch_1.Batch; } });
|
|
7
|
+
var import_1 = require("./import.js");
|
|
8
|
+
Object.defineProperty(exports, "Import", { enumerable: true, get: function () { return import_1.Import; } });
|
|
9
|
+
var tenants_1 = require("./tenants.js");
|
|
10
|
+
Object.defineProperty(exports, "Tenants", { enumerable: true, get: function () { return tenants_1.Tenants; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/tenants/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAUiB;AATf,8FAAA,KAAK,OAAA;AAUP,sCAKkB;AAJhB,gGAAA,MAAM,OAAA;AAKR,wCAOmB;AANjB,kGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,KAAK,GASN;OACM,EACL,MAAM,GAIP;OACM,EACL,OAAO,GAMR"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as BatchAPI from "./batch.mjs";
|
|
3
|
+
import { Batch, BatchCreateParams, BatchCreateResponse, BatchDeleteParams, BatchDeleteResponse, BatchTenantError, BatchTenantSuccess, BatchUpdateParams, BatchUpdateResponse } from "./batch.mjs";
|
|
4
|
+
import * as ImportAPI from "./import.mjs";
|
|
5
|
+
import { Import, ImportFromCsvParams, ImportFromWarehouseParams, ImportTenants } from "./import.mjs";
|
|
6
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
7
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
8
|
+
export declare class Tenants extends APIResource {
|
|
9
|
+
batch: BatchAPI.Batch;
|
|
10
|
+
import: ImportAPI.Import;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new tenant.
|
|
13
|
+
*
|
|
14
|
+
* Validates the client's tenancy type and creates the tenant accordingly:
|
|
15
|
+
*
|
|
16
|
+
* - ROW tenancy: Creates tenant with optional group associations
|
|
17
|
+
* - DATABASE tenancy: Requires database_name, creates tenant with database
|
|
18
|
+
* association
|
|
19
|
+
* - NONE tenancy: Returns error (tenant creation not allowed)
|
|
20
|
+
*
|
|
21
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
22
|
+
*/
|
|
23
|
+
create(body: TenantCreateParams, options?: RequestOptions): APIPromise<Tenant>;
|
|
24
|
+
/**
|
|
25
|
+
* Get a single tenant by ID.
|
|
26
|
+
*
|
|
27
|
+
* Returns the tenant with associated groups and databases.
|
|
28
|
+
*
|
|
29
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
30
|
+
*
|
|
31
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
32
|
+
*/
|
|
33
|
+
retrieve(tenantID: string, options?: RequestOptions): APIPromise<Tenant>;
|
|
34
|
+
/**
|
|
35
|
+
* Update a tenant.
|
|
36
|
+
*
|
|
37
|
+
* Updates tenant metadata, group associations, and/or database associations. Group
|
|
38
|
+
* associations use replace semantics:
|
|
39
|
+
*
|
|
40
|
+
* - Omit group_names to leave existing associations unchanged
|
|
41
|
+
* - Pass empty list to remove all group associations
|
|
42
|
+
* - Pass list of names to replace all associations
|
|
43
|
+
*
|
|
44
|
+
* Database associations (DATABASE tenancy only):
|
|
45
|
+
*
|
|
46
|
+
* - Both connection_id and database_name must be provided together
|
|
47
|
+
* - Replaces existing database association
|
|
48
|
+
*
|
|
49
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
50
|
+
*
|
|
51
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
52
|
+
*/
|
|
53
|
+
update(tenantID: string, body: TenantUpdateParams, options?: RequestOptions): APIPromise<Tenant>;
|
|
54
|
+
/**
|
|
55
|
+
* List all tenants for the client.
|
|
56
|
+
*
|
|
57
|
+
* Returns tenants with their associated groups and databases.
|
|
58
|
+
*
|
|
59
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
60
|
+
*/
|
|
61
|
+
list(options?: RequestOptions): APIPromise<TenantListResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Delete a tenant.
|
|
64
|
+
*
|
|
65
|
+
* Soft-deletes the tenant and its group/database associations.
|
|
66
|
+
*
|
|
67
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
68
|
+
*
|
|
69
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
70
|
+
*/
|
|
71
|
+
delete(tenantID: string, options?: RequestOptions): APIPromise<void>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Request model for creating a single tenant.
|
|
75
|
+
*/
|
|
76
|
+
export interface CreateTenant {
|
|
77
|
+
/**
|
|
78
|
+
* Unique tenant identifier within the client
|
|
79
|
+
*/
|
|
80
|
+
tenant_key: string;
|
|
81
|
+
/**
|
|
82
|
+
* Connection ID (required for DATABASE tenancy type)
|
|
83
|
+
*/
|
|
84
|
+
connection_id?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Database name (required for DATABASE tenancy type)
|
|
87
|
+
*/
|
|
88
|
+
database_name?: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* List of group names to associate with the tenant
|
|
91
|
+
*/
|
|
92
|
+
group_names?: Array<string> | null;
|
|
93
|
+
/**
|
|
94
|
+
* Human-readable tenant name
|
|
95
|
+
*/
|
|
96
|
+
tenant_name?: string | null;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Response model for a single tenant.
|
|
100
|
+
*/
|
|
101
|
+
export interface Tenant {
|
|
102
|
+
/**
|
|
103
|
+
* Tenant ID
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
/**
|
|
107
|
+
* Creation timestamp
|
|
108
|
+
*/
|
|
109
|
+
created_at: string;
|
|
110
|
+
/**
|
|
111
|
+
* Associated databases
|
|
112
|
+
*/
|
|
113
|
+
databases: Array<Tenant.Database>;
|
|
114
|
+
/**
|
|
115
|
+
* Associated groups
|
|
116
|
+
*/
|
|
117
|
+
groups: Array<Tenant.Group>;
|
|
118
|
+
/**
|
|
119
|
+
* Human-readable tenant name
|
|
120
|
+
*/
|
|
121
|
+
name: string | null;
|
|
122
|
+
/**
|
|
123
|
+
* Unique tenant identifier
|
|
124
|
+
*/
|
|
125
|
+
tenant_key: string;
|
|
126
|
+
/**
|
|
127
|
+
* Last update timestamp
|
|
128
|
+
*/
|
|
129
|
+
updated_at: string;
|
|
130
|
+
}
|
|
131
|
+
export declare namespace Tenant {
|
|
132
|
+
/**
|
|
133
|
+
* Database information in tenant responses.
|
|
134
|
+
*/
|
|
135
|
+
interface Database {
|
|
136
|
+
/**
|
|
137
|
+
* Database ID
|
|
138
|
+
*/
|
|
139
|
+
id: string;
|
|
140
|
+
/**
|
|
141
|
+
* Database name
|
|
142
|
+
*/
|
|
143
|
+
name: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Group information in tenant responses.
|
|
147
|
+
*/
|
|
148
|
+
interface Group {
|
|
149
|
+
/**
|
|
150
|
+
* Group ID
|
|
151
|
+
*/
|
|
152
|
+
id: string;
|
|
153
|
+
/**
|
|
154
|
+
* Group name
|
|
155
|
+
*/
|
|
156
|
+
name: string;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export type TenantListResponse = Array<Tenant>;
|
|
160
|
+
export interface TenantCreateParams {
|
|
161
|
+
/**
|
|
162
|
+
* Unique tenant identifier within the client
|
|
163
|
+
*/
|
|
164
|
+
tenant_key: string;
|
|
165
|
+
/**
|
|
166
|
+
* Connection ID (required for DATABASE tenancy type)
|
|
167
|
+
*/
|
|
168
|
+
connection_id?: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Database name (required for DATABASE tenancy type)
|
|
171
|
+
*/
|
|
172
|
+
database_name?: string | null;
|
|
173
|
+
/**
|
|
174
|
+
* List of group names to associate with the tenant
|
|
175
|
+
*/
|
|
176
|
+
group_names?: Array<string> | null;
|
|
177
|
+
/**
|
|
178
|
+
* Human-readable tenant name
|
|
179
|
+
*/
|
|
180
|
+
tenant_name?: string | null;
|
|
181
|
+
}
|
|
182
|
+
export interface TenantUpdateParams {
|
|
183
|
+
/**
|
|
184
|
+
* Connection ID for database association (required with database_name)
|
|
185
|
+
*/
|
|
186
|
+
connection_id?: string | null;
|
|
187
|
+
/**
|
|
188
|
+
* Database name for association (required with connection_id)
|
|
189
|
+
*/
|
|
190
|
+
database_name?: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* New list of group names (replaces all existing associations)
|
|
193
|
+
*/
|
|
194
|
+
group_names?: Array<string> | null;
|
|
195
|
+
/**
|
|
196
|
+
* New human-readable tenant name
|
|
197
|
+
*/
|
|
198
|
+
tenant_name?: string | null;
|
|
199
|
+
}
|
|
200
|
+
export declare namespace Tenants {
|
|
201
|
+
export { type CreateTenant as CreateTenant, type Tenant as Tenant, type TenantListResponse as TenantListResponse, type TenantCreateParams as TenantCreateParams, type TenantUpdateParams as TenantUpdateParams, };
|
|
202
|
+
export { Batch as Batch, type BatchTenantError as BatchTenantError, type BatchTenantSuccess as BatchTenantSuccess, type BatchCreateResponse as BatchCreateResponse, type BatchUpdateResponse as BatchUpdateResponse, type BatchDeleteResponse as BatchDeleteResponse, type BatchCreateParams as BatchCreateParams, type BatchUpdateParams as BatchUpdateParams, type BatchDeleteParams as BatchDeleteParams, };
|
|
203
|
+
export { Import as Import, type ImportTenants as ImportTenants, type ImportFromCsvParams as ImportFromCsvParams, type ImportFromWarehouseParams as ImportFromWarehouseParams, };
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=tenants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenants.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/tenants.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OAC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M,WAAW,kBAAkB;IACjC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAKD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as BatchAPI from "./batch.js";
|
|
3
|
+
import { Batch, BatchCreateParams, BatchCreateResponse, BatchDeleteParams, BatchDeleteResponse, BatchTenantError, BatchTenantSuccess, BatchUpdateParams, BatchUpdateResponse } from "./batch.js";
|
|
4
|
+
import * as ImportAPI from "./import.js";
|
|
5
|
+
import { Import, ImportFromCsvParams, ImportFromWarehouseParams, ImportTenants } from "./import.js";
|
|
6
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
7
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
8
|
+
export declare class Tenants extends APIResource {
|
|
9
|
+
batch: BatchAPI.Batch;
|
|
10
|
+
import: ImportAPI.Import;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new tenant.
|
|
13
|
+
*
|
|
14
|
+
* Validates the client's tenancy type and creates the tenant accordingly:
|
|
15
|
+
*
|
|
16
|
+
* - ROW tenancy: Creates tenant with optional group associations
|
|
17
|
+
* - DATABASE tenancy: Requires database_name, creates tenant with database
|
|
18
|
+
* association
|
|
19
|
+
* - NONE tenancy: Returns error (tenant creation not allowed)
|
|
20
|
+
*
|
|
21
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
22
|
+
*/
|
|
23
|
+
create(body: TenantCreateParams, options?: RequestOptions): APIPromise<Tenant>;
|
|
24
|
+
/**
|
|
25
|
+
* Get a single tenant by ID.
|
|
26
|
+
*
|
|
27
|
+
* Returns the tenant with associated groups and databases.
|
|
28
|
+
*
|
|
29
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
30
|
+
*
|
|
31
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
32
|
+
*/
|
|
33
|
+
retrieve(tenantID: string, options?: RequestOptions): APIPromise<Tenant>;
|
|
34
|
+
/**
|
|
35
|
+
* Update a tenant.
|
|
36
|
+
*
|
|
37
|
+
* Updates tenant metadata, group associations, and/or database associations. Group
|
|
38
|
+
* associations use replace semantics:
|
|
39
|
+
*
|
|
40
|
+
* - Omit group_names to leave existing associations unchanged
|
|
41
|
+
* - Pass empty list to remove all group associations
|
|
42
|
+
* - Pass list of names to replace all associations
|
|
43
|
+
*
|
|
44
|
+
* Database associations (DATABASE tenancy only):
|
|
45
|
+
*
|
|
46
|
+
* - Both connection_id and database_name must be provided together
|
|
47
|
+
* - Replaces existing database association
|
|
48
|
+
*
|
|
49
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
50
|
+
*
|
|
51
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
52
|
+
*/
|
|
53
|
+
update(tenantID: string, body: TenantUpdateParams, options?: RequestOptions): APIPromise<Tenant>;
|
|
54
|
+
/**
|
|
55
|
+
* List all tenants for the client.
|
|
56
|
+
*
|
|
57
|
+
* Returns tenants with their associated groups and databases.
|
|
58
|
+
*
|
|
59
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
60
|
+
*/
|
|
61
|
+
list(options?: RequestOptions): APIPromise<TenantListResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Delete a tenant.
|
|
64
|
+
*
|
|
65
|
+
* Soft-deletes the tenant and its group/database associations.
|
|
66
|
+
*
|
|
67
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
68
|
+
*
|
|
69
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
70
|
+
*/
|
|
71
|
+
delete(tenantID: string, options?: RequestOptions): APIPromise<void>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Request model for creating a single tenant.
|
|
75
|
+
*/
|
|
76
|
+
export interface CreateTenant {
|
|
77
|
+
/**
|
|
78
|
+
* Unique tenant identifier within the client
|
|
79
|
+
*/
|
|
80
|
+
tenant_key: string;
|
|
81
|
+
/**
|
|
82
|
+
* Connection ID (required for DATABASE tenancy type)
|
|
83
|
+
*/
|
|
84
|
+
connection_id?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Database name (required for DATABASE tenancy type)
|
|
87
|
+
*/
|
|
88
|
+
database_name?: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* List of group names to associate with the tenant
|
|
91
|
+
*/
|
|
92
|
+
group_names?: Array<string> | null;
|
|
93
|
+
/**
|
|
94
|
+
* Human-readable tenant name
|
|
95
|
+
*/
|
|
96
|
+
tenant_name?: string | null;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Response model for a single tenant.
|
|
100
|
+
*/
|
|
101
|
+
export interface Tenant {
|
|
102
|
+
/**
|
|
103
|
+
* Tenant ID
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
/**
|
|
107
|
+
* Creation timestamp
|
|
108
|
+
*/
|
|
109
|
+
created_at: string;
|
|
110
|
+
/**
|
|
111
|
+
* Associated databases
|
|
112
|
+
*/
|
|
113
|
+
databases: Array<Tenant.Database>;
|
|
114
|
+
/**
|
|
115
|
+
* Associated groups
|
|
116
|
+
*/
|
|
117
|
+
groups: Array<Tenant.Group>;
|
|
118
|
+
/**
|
|
119
|
+
* Human-readable tenant name
|
|
120
|
+
*/
|
|
121
|
+
name: string | null;
|
|
122
|
+
/**
|
|
123
|
+
* Unique tenant identifier
|
|
124
|
+
*/
|
|
125
|
+
tenant_key: string;
|
|
126
|
+
/**
|
|
127
|
+
* Last update timestamp
|
|
128
|
+
*/
|
|
129
|
+
updated_at: string;
|
|
130
|
+
}
|
|
131
|
+
export declare namespace Tenant {
|
|
132
|
+
/**
|
|
133
|
+
* Database information in tenant responses.
|
|
134
|
+
*/
|
|
135
|
+
interface Database {
|
|
136
|
+
/**
|
|
137
|
+
* Database ID
|
|
138
|
+
*/
|
|
139
|
+
id: string;
|
|
140
|
+
/**
|
|
141
|
+
* Database name
|
|
142
|
+
*/
|
|
143
|
+
name: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Group information in tenant responses.
|
|
147
|
+
*/
|
|
148
|
+
interface Group {
|
|
149
|
+
/**
|
|
150
|
+
* Group ID
|
|
151
|
+
*/
|
|
152
|
+
id: string;
|
|
153
|
+
/**
|
|
154
|
+
* Group name
|
|
155
|
+
*/
|
|
156
|
+
name: string;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export type TenantListResponse = Array<Tenant>;
|
|
160
|
+
export interface TenantCreateParams {
|
|
161
|
+
/**
|
|
162
|
+
* Unique tenant identifier within the client
|
|
163
|
+
*/
|
|
164
|
+
tenant_key: string;
|
|
165
|
+
/**
|
|
166
|
+
* Connection ID (required for DATABASE tenancy type)
|
|
167
|
+
*/
|
|
168
|
+
connection_id?: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Database name (required for DATABASE tenancy type)
|
|
171
|
+
*/
|
|
172
|
+
database_name?: string | null;
|
|
173
|
+
/**
|
|
174
|
+
* List of group names to associate with the tenant
|
|
175
|
+
*/
|
|
176
|
+
group_names?: Array<string> | null;
|
|
177
|
+
/**
|
|
178
|
+
* Human-readable tenant name
|
|
179
|
+
*/
|
|
180
|
+
tenant_name?: string | null;
|
|
181
|
+
}
|
|
182
|
+
export interface TenantUpdateParams {
|
|
183
|
+
/**
|
|
184
|
+
* Connection ID for database association (required with database_name)
|
|
185
|
+
*/
|
|
186
|
+
connection_id?: string | null;
|
|
187
|
+
/**
|
|
188
|
+
* Database name for association (required with connection_id)
|
|
189
|
+
*/
|
|
190
|
+
database_name?: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* New list of group names (replaces all existing associations)
|
|
193
|
+
*/
|
|
194
|
+
group_names?: Array<string> | null;
|
|
195
|
+
/**
|
|
196
|
+
* New human-readable tenant name
|
|
197
|
+
*/
|
|
198
|
+
tenant_name?: string | null;
|
|
199
|
+
}
|
|
200
|
+
export declare namespace Tenants {
|
|
201
|
+
export { type CreateTenant as CreateTenant, type Tenant as Tenant, type TenantListResponse as TenantListResponse, type TenantCreateParams as TenantCreateParams, type TenantUpdateParams as TenantUpdateParams, };
|
|
202
|
+
export { Batch as Batch, type BatchTenantError as BatchTenantError, type BatchTenantSuccess as BatchTenantSuccess, type BatchCreateResponse as BatchCreateResponse, type BatchUpdateResponse as BatchUpdateResponse, type BatchDeleteResponse as BatchDeleteResponse, type BatchCreateParams as BatchCreateParams, type BatchUpdateParams as BatchUpdateParams, type BatchDeleteParams as BatchDeleteParams, };
|
|
203
|
+
export { Import as Import, type ImportTenants as ImportTenants, type ImportFromCsvParams as ImportFromCsvParams, type ImportFromWarehouseParams as ImportFromWarehouseParams, };
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=tenants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/tenants.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EACL,KAAK,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACpB;OACM,KAAK,SAAS;OACd,EAAE,MAAM,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,aAAa,EAAE;OACzE,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAI9E;;;;;;;;OAQG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAIxE;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAIhG;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAI9D;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,EA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I,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Tenants = void 0;
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
|
+
const BatchAPI = tslib_1.__importStar(require("./batch.js"));
|
|
8
|
+
const batch_1 = require("./batch.js");
|
|
9
|
+
const ImportAPI = tslib_1.__importStar(require("./import.js"));
|
|
10
|
+
const import_1 = require("./import.js");
|
|
11
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
12
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
13
|
+
class Tenants extends resource_1.APIResource {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.batch = new BatchAPI.Batch(this._client);
|
|
17
|
+
this.import = new ImportAPI.Import(this._client);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a new tenant.
|
|
21
|
+
*
|
|
22
|
+
* Validates the client's tenancy type and creates the tenant accordingly:
|
|
23
|
+
*
|
|
24
|
+
* - ROW tenancy: Creates tenant with optional group associations
|
|
25
|
+
* - DATABASE tenancy: Requires database_name, creates tenant with database
|
|
26
|
+
* association
|
|
27
|
+
* - NONE tenancy: Returns error (tenant creation not allowed)
|
|
28
|
+
*
|
|
29
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
30
|
+
*/
|
|
31
|
+
create(body, options) {
|
|
32
|
+
return this._client.post('/api/v1/tenants', { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get a single tenant by ID.
|
|
36
|
+
*
|
|
37
|
+
* Returns the tenant with associated groups and databases.
|
|
38
|
+
*
|
|
39
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
40
|
+
*
|
|
41
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
42
|
+
*/
|
|
43
|
+
retrieve(tenantID, options) {
|
|
44
|
+
return this._client.get((0, path_1.path) `/api/v1/tenants/${tenantID}`, options);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Update a tenant.
|
|
48
|
+
*
|
|
49
|
+
* Updates tenant metadata, group associations, and/or database associations. Group
|
|
50
|
+
* associations use replace semantics:
|
|
51
|
+
*
|
|
52
|
+
* - Omit group_names to leave existing associations unchanged
|
|
53
|
+
* - Pass empty list to remove all group associations
|
|
54
|
+
* - Pass list of names to replace all associations
|
|
55
|
+
*
|
|
56
|
+
* Database associations (DATABASE tenancy only):
|
|
57
|
+
*
|
|
58
|
+
* - Both connection_id and database_name must be provided together
|
|
59
|
+
* - Replaces existing database association
|
|
60
|
+
*
|
|
61
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
62
|
+
*
|
|
63
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
64
|
+
*/
|
|
65
|
+
update(tenantID, body, options) {
|
|
66
|
+
return this._client.patch((0, path_1.path) `/api/v1/tenants/${tenantID}`, { body, ...options });
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* List all tenants for the client.
|
|
70
|
+
*
|
|
71
|
+
* Returns tenants with their associated groups and databases.
|
|
72
|
+
*
|
|
73
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
74
|
+
*/
|
|
75
|
+
list(options) {
|
|
76
|
+
return this._client.get('/api/v1/tenants', options);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Delete a tenant.
|
|
80
|
+
*
|
|
81
|
+
* Soft-deletes the tenant and its group/database associations.
|
|
82
|
+
*
|
|
83
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
84
|
+
*
|
|
85
|
+
* Raises: TenantNotFoundError: If tenant doesn't exist (404)
|
|
86
|
+
*/
|
|
87
|
+
delete(tenantID, options) {
|
|
88
|
+
return this._client.delete((0, path_1.path) `/api/v1/tenants/${tenantID}`, {
|
|
89
|
+
...options,
|
|
90
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.Tenants = Tenants;
|
|
95
|
+
Tenants.Batch = batch_1.Batch;
|
|
96
|
+
Tenants.Import = import_1.Import;
|
|
97
|
+
//# sourceMappingURL=tenants.js.map
|