@keboola/api-client 18.0.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{backends-BgUzAQul.d.cts → backends-Bofq_Nr0.d.cts} +2 -0
- package/dist/{backends-BgUzAQul.d.ts → backends-Bofq_Nr0.d.ts} +2 -0
- package/dist/{chunk-Y5QJJWDQ.js → chunk-552FC4ZV.js} +5 -3
- package/dist/chunk-552FC4ZV.js.map +1 -0
- package/dist/{chunk-NFA5ITNG.cjs → chunk-YXGBD4WP.cjs} +5 -3
- package/dist/chunk-YXGBD4WP.cjs.map +1 -0
- package/dist/constants/index.cjs +2 -2
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/domain/permissions/index.cjs +7 -5
- package/dist/domain/permissions/index.cjs.map +1 -1
- package/dist/domain/permissions/index.d.cts +5 -4
- package/dist/domain/permissions/index.d.ts +5 -4
- package/dist/domain/permissions/index.js +3 -2
- package/dist/domain/permissions/index.js.map +1 -1
- package/dist/encryption/index.d.cts +2 -2
- package/dist/encryption/index.d.ts +2 -2
- package/dist/encryption/types.d.cts +2 -2
- package/dist/encryption/types.d.ts +2 -2
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/{project-BxSa1Ci9.d.ts → project-Bj7A_TSe.d.ts} +2 -2
- package/dist/{project-NJuUPx8-.d.cts → project-CX3TEH8A.d.cts} +2 -2
- package/dist/sdk/configurations/index.d.cts +4 -4
- package/dist/sdk/configurations/index.d.ts +4 -4
- package/dist/sdk/storage/index.d.cts +4 -4
- package/dist/sdk/storage/index.d.ts +4 -4
- package/dist/sdk/vault/index.d.cts +3 -3
- package/dist/sdk/vault/index.d.ts +3 -3
- package/dist/storage/index.d.cts +3 -3
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/types.d.cts +4 -4
- package/dist/storage/types.d.ts +4 -4
- package/dist/{storageClient-C0Kh5L01.d.cts → storageClient-8LhUUGYa.d.cts} +1 -1
- package/dist/{storageClient-Bqd4_-xH.d.ts → storageClient-Scemp8F6.d.ts} +1 -1
- package/dist/{storageSdk-BCUgrB3U.d.cts → storageSdk-CXFUSkSB.d.cts} +1 -1
- package/dist/{storageSdk-C5Ea9eRR.d.ts → storageSdk-r-6-GCFM.d.ts} +1 -1
- package/dist/{types-CMEwVQ78.d.cts → types-ClxrZC77.d.cts} +1 -1
- package/dist/{types-DsqDUWJn.d.cts → types-DHCbX2uR.d.cts} +1 -1
- package/dist/{types-D64zThBJ.d.ts → types-l_pP5J0H.d.ts} +1 -1
- package/dist/{types-GmAeMsok.d.ts → types-o8eTf_G9.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-NFA5ITNG.cjs.map +0 -1
- package/dist/chunk-Y5QJJWDQ.js.map +0 -1
|
@@ -4,6 +4,8 @@ declare const AdminRole: {
|
|
|
4
4
|
readonly ProductionManager: "productionManager";
|
|
5
5
|
readonly Developer: "developer";
|
|
6
6
|
readonly Reviewer: "reviewer";
|
|
7
|
+
readonly ReadOnly: "readOnly";
|
|
8
|
+
readonly Guest: "guest";
|
|
7
9
|
};
|
|
8
10
|
type AdminRole = (typeof AdminRole)[keyof typeof AdminRole];
|
|
9
11
|
|
|
@@ -4,6 +4,8 @@ declare const AdminRole: {
|
|
|
4
4
|
readonly ProductionManager: "productionManager";
|
|
5
5
|
readonly Developer: "developer";
|
|
6
6
|
readonly Reviewer: "reviewer";
|
|
7
|
+
readonly ReadOnly: "readOnly";
|
|
8
|
+
readonly Guest: "guest";
|
|
7
9
|
};
|
|
8
10
|
type AdminRole = (typeof AdminRole)[keyof typeof AdminRole];
|
|
9
11
|
|
|
@@ -4,9 +4,11 @@ var AdminRole = {
|
|
|
4
4
|
Share: "share",
|
|
5
5
|
ProductionManager: "productionManager",
|
|
6
6
|
Developer: "developer",
|
|
7
|
-
Reviewer: "reviewer"
|
|
7
|
+
Reviewer: "reviewer",
|
|
8
|
+
ReadOnly: "readOnly",
|
|
9
|
+
Guest: "guest"
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export { AdminRole };
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-552FC4ZV.js.map
|
|
14
|
+
//# sourceMappingURL=chunk-552FC4ZV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants/adminRoles.ts"],"names":[],"mappings":";AAAO,IAAM,SAAA,GAAY;AAAA,EACvB,KAAA,EAAO,OAAA;AAAA,EACP,KAAA,EAAO,OAAA;AAAA,EACP,iBAAA,EAAmB,mBAAA;AAAA,EACnB,SAAA,EAAW,WAAA;AAAA,EACX,QAAA,EAAU,UAAA;AAAA,EACV,QAAA,EAAU,UAAA;AAAA,EACV,KAAA,EAAO;AACT","file":"chunk-552FC4ZV.js","sourcesContent":["export const AdminRole = {\n Admin: 'admin',\n Share: 'share',\n ProductionManager: 'productionManager',\n Developer: 'developer',\n Reviewer: 'reviewer',\n ReadOnly: 'readOnly',\n Guest: 'guest',\n} as const;\n\nexport type AdminRole = (typeof AdminRole)[keyof typeof AdminRole];\n"]}
|
|
@@ -6,9 +6,11 @@ var AdminRole = {
|
|
|
6
6
|
Share: "share",
|
|
7
7
|
ProductionManager: "productionManager",
|
|
8
8
|
Developer: "developer",
|
|
9
|
-
Reviewer: "reviewer"
|
|
9
|
+
Reviewer: "reviewer",
|
|
10
|
+
ReadOnly: "readOnly",
|
|
11
|
+
Guest: "guest"
|
|
10
12
|
};
|
|
11
13
|
|
|
12
14
|
exports.AdminRole = AdminRole;
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-YXGBD4WP.cjs.map
|
|
16
|
+
//# sourceMappingURL=chunk-YXGBD4WP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants/adminRoles.ts"],"names":[],"mappings":";;;AAAO,IAAM,SAAA,GAAY;AAAA,EACvB,KAAA,EAAO,OAAA;AAAA,EACP,KAAA,EAAO,OAAA;AAAA,EACP,iBAAA,EAAmB,mBAAA;AAAA,EACnB,SAAA,EAAW,WAAA;AAAA,EACX,QAAA,EAAU,UAAA;AAAA,EACV,QAAA,EAAU,UAAA;AAAA,EACV,KAAA,EAAO;AACT","file":"chunk-YXGBD4WP.cjs","sourcesContent":["export const AdminRole = {\n Admin: 'admin',\n Share: 'share',\n ProductionManager: 'productionManager',\n Developer: 'developer',\n Reviewer: 'reviewer',\n ReadOnly: 'readOnly',\n Guest: 'guest',\n} as const;\n\nexport type AdminRole = (typeof AdminRole)[keyof typeof AdminRole];\n"]}
|
package/dist/constants/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYXGBD4WP_cjs = require('../chunk-YXGBD4WP.cjs');
|
|
4
4
|
var chunk3FZHFTLG_cjs = require('../chunk-3FZHFTLG.cjs');
|
|
5
5
|
var chunkTTPJSPZA_cjs = require('../chunk-TTPJSPZA.cjs');
|
|
6
6
|
|
|
@@ -151,7 +151,7 @@ var URLS = {
|
|
|
151
151
|
|
|
152
152
|
Object.defineProperty(exports, "AdminRole", {
|
|
153
153
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkYXGBD4WP_cjs.AdminRole; }
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "ProjectFeature", {
|
|
157
157
|
enumerable: true,
|
package/dist/constants/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYXGBD4WP_cjs = require('../../chunk-YXGBD4WP.cjs');
|
|
4
4
|
var chunkGF4XZK5N_cjs = require('../../chunk-GF4XZK5N.cjs');
|
|
5
5
|
|
|
6
6
|
// src/domain/permissions/errors.ts
|
|
@@ -19,10 +19,11 @@ var PermissionDeniedError = class extends Error {
|
|
|
19
19
|
|
|
20
20
|
// src/domain/permissions/admin.ts
|
|
21
21
|
var role = (token) => token.admin.role;
|
|
22
|
-
var isAdmin = (token) => role(token) ===
|
|
23
|
-
var isAdminOrShare = (token) => role(token) ===
|
|
24
|
-
var isProductionManager = (token) => role(token) ===
|
|
25
|
-
var isDeveloperOrReviewer = (token) => role(token) ===
|
|
22
|
+
var isAdmin = (token) => role(token) === chunkYXGBD4WP_cjs.AdminRole.Admin;
|
|
23
|
+
var isAdminOrShare = (token) => role(token) === chunkYXGBD4WP_cjs.AdminRole.Admin || role(token) === chunkYXGBD4WP_cjs.AdminRole.Share;
|
|
24
|
+
var isProductionManager = (token) => role(token) === chunkYXGBD4WP_cjs.AdminRole.ProductionManager;
|
|
25
|
+
var isDeveloperOrReviewer = (token) => role(token) === chunkYXGBD4WP_cjs.AdminRole.Developer || role(token) === chunkYXGBD4WP_cjs.AdminRole.Reviewer;
|
|
26
|
+
var isReadOnlyRole = (token) => role(token) === chunkYXGBD4WP_cjs.AdminRole.ReadOnly;
|
|
26
27
|
var assertCanAdmin = (token) => {
|
|
27
28
|
if (!isAdmin(token)) {
|
|
28
29
|
throw new PermissionDeniedError({
|
|
@@ -132,5 +133,6 @@ exports.isAdmin = isAdmin;
|
|
|
132
133
|
exports.isAdminOrShare = isAdminOrShare;
|
|
133
134
|
exports.isDeveloperOrReviewer = isDeveloperOrReviewer;
|
|
134
135
|
exports.isProductionManager = isProductionManager;
|
|
136
|
+
exports.isReadOnlyRole = isReadOnlyRole;
|
|
135
137
|
//# sourceMappingURL=index.cjs.map
|
|
136
138
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/domain/permissions/errors.ts","../../../src/domain/permissions/admin.ts","../../../src/domain/permissions/configurations.ts"],"names":["AdminRole"],"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CAAsB,KAAU,CAAA,EAAG;AACtC,IAAA,MAAM,IAAI,qBAAA,CAAsB;AAAA,MAC9B,MAAA,EAAQ,qBAAA;AAAA,MACR,MAAA,EAAQ;AAAA,KACT,CAAA;AAAA,EACH;AACF;AAEO,IAAM,qBAAA,GAAwB,CAAC,KAAA,EAAqB,GAAA,KAAgC;AACzF,EAAA,IAAI,CAAC,eAAA,CAAgB,KAAA,EAAO,GAAG,CAAA,EAAG;AAChC,IAAA,MAAM,IAAI,qBAAA,CAAsB;AAAA,MAC9B,MAAA,EAAQ,eAAA;AAAA,MACR,MAAA,EAAQ,iBAAiB,GAAG;AAAA,KAC7B,CAAA;AAAA,EACH;AACF","file":"index.cjs","sourcesContent":["/**\n * @module domain/permissions/errors\n *\n * Stable error contract for permission denials.\n *\n * `PermissionDeniedError` is what every `assertCan*` pair throws on denial. The\n * three public fields are part of the SDK's published contract — consumers\n * (kbc-ui, kai-agent, third-party TS callers) may pattern-match on `action`\n * and surface `reason` in UI, so renames here are breaking changes.\n *\n * PII boundary on `subject`:\n * `subject` is optional and intended for debugging hints only — admin id,\n * role name, configuration id, branch id, etc. It MUST NOT carry the full\n * `StorageToken`, raw tokens, secrets, or any value that could be logged or\n * surfaced to a user without further redaction.\n */\nexport class PermissionDeniedError extends Error {\n public readonly action: string;\n public readonly reason?: string;\n public readonly subject?: string;\n\n constructor({ action, reason, subject }: { action: string; reason?: string; subject?: string }) {\n super(reason ? `Permission denied: ${action} (${reason})` : `Permission denied: ${action}`);\n this.name = 'PermissionDeniedError';\n this.action = action;\n this.reason = reason;\n this.subject = subject;\n }\n}\n","/**\n * @module domain/permissions/admin\n *\n * Baseline admin-role predicates. Token-only — depend purely on the admin\n * role string carried in `StorageToken.admin.role`. Each predicate has an\n * `assertCan*` pair that throws `PermissionDeniedError` with a stable\n * kebab-case `action` field documented per pair.\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\nimport { AdminRole } from '../../constants/adminRoles';\n\nimport { PermissionDeniedError } from './errors';\n\nconst role = (token: StorageToken): string => token.admin.role;\n\nexport const isAdmin = (token: StorageToken): boolean => role(token) === AdminRole.Admin;\n\nexport const isAdminOrShare = (token: StorageToken): boolean =>\n role(token) === AdminRole.Admin || role(token) === AdminRole.Share;\n\nexport const isProductionManager = (token: StorageToken): boolean =>\n role(token) === AdminRole.ProductionManager;\n\nexport const isDeveloperOrReviewer = (token: StorageToken): boolean =>\n role(token) === AdminRole.Developer || role(token) === AdminRole.Reviewer;\n\nexport const assertCanAdmin = (token: StorageToken): void => {\n if (!isAdmin(token)) {\n throw new PermissionDeniedError({\n action: 'admin',\n reason: `role '${role(token)}' is not admin`,\n });\n }\n};\n\nexport const assertCanAdminOrShare = (token: StorageToken): void => {\n if (!isAdminOrShare(token)) {\n throw new PermissionDeniedError({\n action: 'admin-or-share',\n reason: `role '${role(token)}' is not admin or share`,\n });\n }\n};\n\nexport const assertCanProductionManage = (token: StorageToken): void => {\n if (!isProductionManager(token)) {\n throw new PermissionDeniedError({\n action: 'production-manage',\n reason: `role '${role(token)}' is not productionManager`,\n });\n }\n};\n\nexport const assertCanDevelopOrReview = (token: StorageToken): void => {\n if (!isDeveloperOrReviewer(token)) {\n throw new PermissionDeniedError({\n action: 'develop-or-review',\n reason: `role '${role(token)}' is not developer or reviewer`,\n });\n }\n};\n","/**\n * @module domain/permissions/configurations\n *\n * Predicate pairs guarding the Core SDK configuration workflow methods\n * (create / copy / migrate-from-template / purge / assign-folder). Each\n * predicate composes the baseline admin role predicates with the caller-\n * supplied dev-mode flag from `ctx`.\n *\n * Rule shape:\n * - In a dev branch (`ctx.isDevModeActive === true`) → caller must be a\n * developer or reviewer.\n * - In production (`ctx.isDevModeActive === false`) → caller must be a\n * production manager.\n * - `canPurgeConfiguration` is **admin-only**, regardless of branch mode.\n * Purge is destructive and the situational base rule does not apply —\n * `token.admin.role` is a single scalar, so requiring both \"admin\" and\n * \"developer/reviewer/productionManager\" simultaneously would be an\n * impossible conjunction. The `ctx` parameter is accepted for signature\n * symmetry with the other configuration predicates and ignored.\n *\n * `ctx` is the trailing object argument convention for composed predicates;\n * extra fields land here as future rules grow (see AGENTS.md).\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\n\nimport { isAdmin, isDeveloperOrReviewer, isProductionManager } from './admin';\nimport { PermissionDeniedError } from './errors';\n\n/**\n * Caller-supplied context for configuration predicates.\n *\n * @property isDevModeActive — `true` when the user is operating inside a\n * development branch (any storage branch other than the protected default /\n * production branch); `false` when operating on the default branch in\n * production.\n *\n * How the caller determines this:\n * - The active branch comes from the caller's own routing / app state\n * (e.g. `/branch/:branchId` in kbc-ui).\n * - A branch is \"dev mode\" when it is **not** the default branch returned by\n * `apiClient.storage.devBranches.list()` (where `isDefault === true`).\n * - kbc-ui exposes this through its `RoutesStore.getCurrentRouteParam('branchId')`\n * compared against the default branch id; the api-client itself stays\n * isomorphic and never reads that state directly.\n *\n * Why it changes the rule:\n * - In dev branches Keboola allows broader write access — `developer` and\n * `reviewer` roles may create / copy / migrate configurations because the\n * branch is sandboxed from production.\n * - On the default branch only `productionManager` (or `admin`) may perform\n * the same writes, since changes ship live to production.\n */\nexport type ConfigurationCtx = {\n isDevModeActive: boolean;\n};\n\nconst meetsBaseRule = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n ctx.isDevModeActive ? isDeveloperOrReviewer(token) : isProductionManager(token);\n\nconst baseDenialReason = (ctx: ConfigurationCtx): string =>\n ctx.isDevModeActive\n ? 'dev branch requires developer or reviewer role'\n : 'production requires productionManager role';\n\nexport const canCreateConfiguration = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canCopyConfiguration = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canMigrateFromTemplate = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canPurgeConfiguration: (token: StorageToken, ctx: ConfigurationCtx) => boolean = (\n token,\n) => isAdmin(token);\n\nexport const canAssignFolder = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const assertCanCreateConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canCreateConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'create-configuration',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanCopyConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canCopyConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'copy-configuration',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanMigrateFromTemplate = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canMigrateFromTemplate(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'migrate-from-template',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanPurgeConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canPurgeConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'purge-configuration',\n reason: 'purge requires admin role',\n });\n }\n};\n\nexport const assertCanAssignFolder = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canAssignFolder(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'assign-folder',\n reason: baseDenialReason(ctx),\n });\n }\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/domain/permissions/errors.ts","../../../src/domain/permissions/admin.ts","../../../src/domain/permissions/configurations.ts"],"names":["AdminRole"],"mappings":";;;;;;AAgBO,IAAM,qBAAA,GAAN,cAAoC,KAAA,CAAM;AAAA,EAC/B,MAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EAEhB,WAAA,CAAY,EAAE,MAAA,EAAQ,MAAA,EAAQ,SAAQ,EAA0D;AAC9F,IAAA,KAAA,CAAM,MAAA,GAAS,sBAAsB,MAAM,CAAA,EAAA,EAAK,MAAM,CAAA,CAAA,CAAA,GAAM,CAAA,mBAAA,EAAs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AA,IAAI,CAAC,eAAA,CAAgB,KAAA,EAAO,GAAG,CAAA,EAAG;AAChC,IAAA,MAAM,IAAI,qBAAA,CAAsB;AAAA,MAC9B,MAAA,EAAQ,eAAA;AAAA,MACR,MAAA,EAAQ,iBAAiB,GAAG;AAAA,KAC7B,CAAA;AAAA,EACH;AACF","file":"index.cjs","sourcesContent":["/**\n * @module domain/permissions/errors\n *\n * Stable error contract for permission denials.\n *\n * `PermissionDeniedError` is what every `assertCan*` pair throws on denial. The\n * three public fields are part of the SDK's published contract — consumers\n * (kbc-ui, kai-agent, third-party TS callers) may pattern-match on `action`\n * and surface `reason` in UI, so renames here are breaking changes.\n *\n * PII boundary on `subject`:\n * `subject` is optional and intended for debugging hints only — admin id,\n * role name, configuration id, branch id, etc. It MUST NOT carry the full\n * `StorageToken`, raw tokens, secrets, or any value that could be logged or\n * surfaced to a user without further redaction.\n */\nexport class PermissionDeniedError extends Error {\n public readonly action: string;\n public readonly reason?: string;\n public readonly subject?: string;\n\n constructor({ action, reason, subject }: { action: string; reason?: string; subject?: string }) {\n super(reason ? `Permission denied: ${action} (${reason})` : `Permission denied: ${action}`);\n this.name = 'PermissionDeniedError';\n this.action = action;\n this.reason = reason;\n this.subject = subject;\n }\n}\n","/**\n * @module domain/permissions/admin\n *\n * Baseline admin-role predicates. Token-only — depend purely on the admin\n * role string carried in `StorageToken.admin.role`. Each predicate has an\n * `assertCan*` pair that throws `PermissionDeniedError` with a stable\n * kebab-case `action` field documented per pair.\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\nimport { AdminRole } from '../../constants/adminRoles';\n\nimport { PermissionDeniedError } from './errors';\n\nconst role = (token: StorageToken): string => token.admin.role;\n\nexport const isAdmin = (token: StorageToken): boolean => role(token) === AdminRole.Admin;\n\nexport const isAdminOrShare = (token: StorageToken): boolean =>\n role(token) === AdminRole.Admin || role(token) === AdminRole.Share;\n\nexport const isProductionManager = (token: StorageToken): boolean =>\n role(token) === AdminRole.ProductionManager;\n\nexport const isDeveloperOrReviewer = (token: StorageToken): boolean =>\n role(token) === AdminRole.Developer || role(token) === AdminRole.Reviewer;\n\nexport const isReadOnlyRole = (token: StorageToken): boolean => role(token) === AdminRole.ReadOnly;\n\nexport const assertCanAdmin = (token: StorageToken): void => {\n if (!isAdmin(token)) {\n throw new PermissionDeniedError({\n action: 'admin',\n reason: `role '${role(token)}' is not admin`,\n });\n }\n};\n\nexport const assertCanAdminOrShare = (token: StorageToken): void => {\n if (!isAdminOrShare(token)) {\n throw new PermissionDeniedError({\n action: 'admin-or-share',\n reason: `role '${role(token)}' is not admin or share`,\n });\n }\n};\n\nexport const assertCanProductionManage = (token: StorageToken): void => {\n if (!isProductionManager(token)) {\n throw new PermissionDeniedError({\n action: 'production-manage',\n reason: `role '${role(token)}' is not productionManager`,\n });\n }\n};\n\nexport const assertCanDevelopOrReview = (token: StorageToken): void => {\n if (!isDeveloperOrReviewer(token)) {\n throw new PermissionDeniedError({\n action: 'develop-or-review',\n reason: `role '${role(token)}' is not developer or reviewer`,\n });\n }\n};\n","/**\n * @module domain/permissions/configurations\n *\n * Predicate pairs guarding the Core SDK configuration workflow methods\n * (create / copy / migrate-from-template / purge / assign-folder). Each\n * predicate composes the baseline admin role predicates with the caller-\n * supplied dev-mode flag from `ctx`.\n *\n * Rule shape:\n * - In a dev branch (`ctx.isDevModeActive === true`) → caller must be a\n * developer or reviewer.\n * - In production (`ctx.isDevModeActive === false`) → caller must be a\n * production manager.\n * - `canPurgeConfiguration` is **admin-only**, regardless of branch mode.\n * Purge is destructive and the situational base rule does not apply —\n * `token.admin.role` is a single scalar, so requiring both \"admin\" and\n * \"developer/reviewer/productionManager\" simultaneously would be an\n * impossible conjunction. The `ctx` parameter is accepted for signature\n * symmetry with the other configuration predicates and ignored.\n *\n * `ctx` is the trailing object argument convention for composed predicates;\n * extra fields land here as future rules grow (see AGENTS.md).\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\n\nimport { isAdmin, isDeveloperOrReviewer, isProductionManager } from './admin';\nimport { PermissionDeniedError } from './errors';\n\n/**\n * Caller-supplied context for configuration predicates.\n *\n * @property isDevModeActive — `true` when the user is operating inside a\n * development branch (any storage branch other than the protected default /\n * production branch); `false` when operating on the default branch in\n * production.\n *\n * How the caller determines this:\n * - The active branch comes from the caller's own routing / app state\n * (e.g. `/branch/:branchId` in kbc-ui).\n * - A branch is \"dev mode\" when it is **not** the default branch returned by\n * `apiClient.storage.devBranches.list()` (where `isDefault === true`).\n * - kbc-ui exposes this through its `RoutesStore.getCurrentRouteParam('branchId')`\n * compared against the default branch id; the api-client itself stays\n * isomorphic and never reads that state directly.\n *\n * Why it changes the rule:\n * - In dev branches Keboola allows broader write access — `developer` and\n * `reviewer` roles may create / copy / migrate configurations because the\n * branch is sandboxed from production.\n * - On the default branch only `productionManager` (or `admin`) may perform\n * the same writes, since changes ship live to production.\n */\nexport type ConfigurationCtx = {\n isDevModeActive: boolean;\n};\n\nconst meetsBaseRule = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n ctx.isDevModeActive ? isDeveloperOrReviewer(token) : isProductionManager(token);\n\nconst baseDenialReason = (ctx: ConfigurationCtx): string =>\n ctx.isDevModeActive\n ? 'dev branch requires developer or reviewer role'\n : 'production requires productionManager role';\n\nexport const canCreateConfiguration = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canCopyConfiguration = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canMigrateFromTemplate = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canPurgeConfiguration: (token: StorageToken, ctx: ConfigurationCtx) => boolean = (\n token,\n) => isAdmin(token);\n\nexport const canAssignFolder = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const assertCanCreateConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canCreateConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'create-configuration',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanCopyConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canCopyConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'copy-configuration',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanMigrateFromTemplate = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canMigrateFromTemplate(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'migrate-from-template',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanPurgeConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canPurgeConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'purge-configuration',\n reason: 'purge requires admin role',\n });\n }\n};\n\nexport const assertCanAssignFolder = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canAssignFolder(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'assign-folder',\n reason: baseDenialReason(ctx),\n });\n }\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as StorageToken } from '../../types-
|
|
2
|
-
export { h as hasAdminFeature, a as hasFeature } from '../../project-
|
|
3
|
-
import '../../backends-
|
|
1
|
+
import { S as StorageToken } from '../../types-ClxrZC77.cjs';
|
|
2
|
+
export { h as hasAdminFeature, a as hasFeature } from '../../project-CX3TEH8A.cjs';
|
|
3
|
+
import '../../backends-Bofq_Nr0.cjs';
|
|
4
4
|
import '../../types-jKnx7Tm_.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -43,6 +43,7 @@ declare const isAdmin: (token: StorageToken) => boolean;
|
|
|
43
43
|
declare const isAdminOrShare: (token: StorageToken) => boolean;
|
|
44
44
|
declare const isProductionManager: (token: StorageToken) => boolean;
|
|
45
45
|
declare const isDeveloperOrReviewer: (token: StorageToken) => boolean;
|
|
46
|
+
declare const isReadOnlyRole: (token: StorageToken) => boolean;
|
|
46
47
|
declare const assertCanAdmin: (token: StorageToken) => void;
|
|
47
48
|
declare const assertCanAdminOrShare: (token: StorageToken) => void;
|
|
48
49
|
declare const assertCanProductionManage: (token: StorageToken) => void;
|
|
@@ -110,4 +111,4 @@ declare const assertCanMigrateFromTemplate: (token: StorageToken, ctx: Configura
|
|
|
110
111
|
declare const assertCanPurgeConfiguration: (token: StorageToken, ctx: ConfigurationCtx) => void;
|
|
111
112
|
declare const assertCanAssignFolder: (token: StorageToken, ctx: ConfigurationCtx) => void;
|
|
112
113
|
|
|
113
|
-
export { type ConfigurationCtx, PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isProductionManager };
|
|
114
|
+
export { type ConfigurationCtx, PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isProductionManager, isReadOnlyRole };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as StorageToken } from '../../types-
|
|
2
|
-
export { h as hasAdminFeature, a as hasFeature } from '../../project-
|
|
3
|
-
import '../../backends-
|
|
1
|
+
import { S as StorageToken } from '../../types-o8eTf_G9.js';
|
|
2
|
+
export { h as hasAdminFeature, a as hasFeature } from '../../project-Bj7A_TSe.js';
|
|
3
|
+
import '../../backends-Bofq_Nr0.js';
|
|
4
4
|
import '../../types-jKnx7Tm_.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -43,6 +43,7 @@ declare const isAdmin: (token: StorageToken) => boolean;
|
|
|
43
43
|
declare const isAdminOrShare: (token: StorageToken) => boolean;
|
|
44
44
|
declare const isProductionManager: (token: StorageToken) => boolean;
|
|
45
45
|
declare const isDeveloperOrReviewer: (token: StorageToken) => boolean;
|
|
46
|
+
declare const isReadOnlyRole: (token: StorageToken) => boolean;
|
|
46
47
|
declare const assertCanAdmin: (token: StorageToken) => void;
|
|
47
48
|
declare const assertCanAdminOrShare: (token: StorageToken) => void;
|
|
48
49
|
declare const assertCanProductionManage: (token: StorageToken) => void;
|
|
@@ -110,4 +111,4 @@ declare const assertCanMigrateFromTemplate: (token: StorageToken, ctx: Configura
|
|
|
110
111
|
declare const assertCanPurgeConfiguration: (token: StorageToken, ctx: ConfigurationCtx) => void;
|
|
111
112
|
declare const assertCanAssignFolder: (token: StorageToken, ctx: ConfigurationCtx) => void;
|
|
112
113
|
|
|
113
|
-
export { type ConfigurationCtx, PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isProductionManager };
|
|
114
|
+
export { type ConfigurationCtx, PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isProductionManager, isReadOnlyRole };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdminRole } from '../../chunk-
|
|
1
|
+
import { AdminRole } from '../../chunk-552FC4ZV.js';
|
|
2
2
|
export { hasAdminFeature, hasFeature } from '../../chunk-UABYNGBZ.js';
|
|
3
3
|
|
|
4
4
|
// src/domain/permissions/errors.ts
|
|
@@ -21,6 +21,7 @@ var isAdmin = (token) => role(token) === AdminRole.Admin;
|
|
|
21
21
|
var isAdminOrShare = (token) => role(token) === AdminRole.Admin || role(token) === AdminRole.Share;
|
|
22
22
|
var isProductionManager = (token) => role(token) === AdminRole.ProductionManager;
|
|
23
23
|
var isDeveloperOrReviewer = (token) => role(token) === AdminRole.Developer || role(token) === AdminRole.Reviewer;
|
|
24
|
+
var isReadOnlyRole = (token) => role(token) === AdminRole.ReadOnly;
|
|
24
25
|
var assertCanAdmin = (token) => {
|
|
25
26
|
if (!isAdmin(token)) {
|
|
26
27
|
throw new PermissionDeniedError({
|
|
@@ -103,6 +104,6 @@ var assertCanAssignFolder = (token, ctx) => {
|
|
|
103
104
|
}
|
|
104
105
|
};
|
|
105
106
|
|
|
106
|
-
export { PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isProductionManager };
|
|
107
|
+
export { PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isProductionManager, isReadOnlyRole };
|
|
107
108
|
//# sourceMappingURL=index.js.map
|
|
108
109
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/domain/permissions/errors.ts","../../../src/domain/permissions/admin.ts","../../../src/domain/permissions/configurations.ts"],"names":[],"mappings":";;;;AAgBO,IAAM,qBAAA,GAAN,cAAoC,KAAA,CAAM;AAAA,EAC/B,MAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EAEhB,WAAA,CAAY,EAAE,MAAA,EAAQ,MAAA,EAAQ,SAAQ,EAA0D;AAC9F,IAAA,KAAA,CAAM,MAAA,GAAS,sBAAsB,MAAM,CAAA,EAAA,EAAK,MAAM,CAAA,CAAA,CAAA,GAAM,CAAA,mBAAA,EAAsB,MAAM,CAAA,CAAE,CAAA;AAC1F,IAAA,IAAA,CAAK,IAAA,GAAO,uBAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AACF;;;ACfA,IAAM,IAAA,GAAO,CAAC,KAAA,KAAgC,KAAA,CAAM,KAAA,CAAM,IAAA;AAEnD,IAAM,UAAU,CAAC,KAAA,KAAiC,IAAA,CAAK,KAAK,MAAM,SAAA,CAAU;AAE5E,IAAM,cAAA,GAAiB,CAAC,KAAA,KAC7B,IAAA,CAAK,KAAK,CAAA,KAAM,SAAA,CAAU,KAAA,IAAS,IAAA,CAAK,KAAK,CAAA,KAAM,SAAA,CAAU;AAExD,IAAM,sBAAsB,CAAC,KAAA,KAClC,IAAA,CAAK,KAAK,MAAM,SAAA,CAAU;AAErB,IAAM,qBAAA,GAAwB,CAAC,KAAA,KACpC,IAAA,CAAK,KAAK,CAAA,KAAM,SAAA,CAAU,SAAA,IAAa,IAAA,CAAK,KAAK,CAAA,KAAM,SAAA,CAAU;AAE5D,IAAM,cAAA,GAAiB,CAAC,KAAA,KAA8B;AAC3D,EAAA,IAAI,CAAC,OAAA,CAAQ,KAAK,CAAA,EAAG;AACnB,IAAA,MAAM,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AAA,GAA8B,CAAC,KAAA,EAAqB,GAAA,KAAgC;AAC/F,EAAA,IAAI,CAAC,qBAAA,CAAsB,KAAU,CAAA,EAAG;AACtC,IAAA,MAAM,IAAI,qBAAA,CAAsB;AAAA,MAC9B,MAAA,EAAQ,qBAAA;AAAA,MACR,MAAA,EAAQ;AAAA,KACT,CAAA;AAAA,EACH;AACF;AAEO,IAAM,qBAAA,GAAwB,CAAC,KAAA,EAAqB,GAAA,KAAgC;AACzF,EAAA,IAAI,CAAC,eAAA,CAAgB,KAAA,EAAO,GAAG,CAAA,EAAG;AAChC,IAAA,MAAM,IAAI,qBAAA,CAAsB;AAAA,MAC9B,MAAA,EAAQ,eAAA;AAAA,MACR,MAAA,EAAQ,iBAAiB,GAAG;AAAA,KAC7B,CAAA;AAAA,EACH;AACF","file":"index.js","sourcesContent":["/**\n * @module domain/permissions/errors\n *\n * Stable error contract for permission denials.\n *\n * `PermissionDeniedError` is what every `assertCan*` pair throws on denial. The\n * three public fields are part of the SDK's published contract — consumers\n * (kbc-ui, kai-agent, third-party TS callers) may pattern-match on `action`\n * and surface `reason` in UI, so renames here are breaking changes.\n *\n * PII boundary on `subject`:\n * `subject` is optional and intended for debugging hints only — admin id,\n * role name, configuration id, branch id, etc. It MUST NOT carry the full\n * `StorageToken`, raw tokens, secrets, or any value that could be logged or\n * surfaced to a user without further redaction.\n */\nexport class PermissionDeniedError extends Error {\n public readonly action: string;\n public readonly reason?: string;\n public readonly subject?: string;\n\n constructor({ action, reason, subject }: { action: string; reason?: string; subject?: string }) {\n super(reason ? `Permission denied: ${action} (${reason})` : `Permission denied: ${action}`);\n this.name = 'PermissionDeniedError';\n this.action = action;\n this.reason = reason;\n this.subject = subject;\n }\n}\n","/**\n * @module domain/permissions/admin\n *\n * Baseline admin-role predicates. Token-only — depend purely on the admin\n * role string carried in `StorageToken.admin.role`. Each predicate has an\n * `assertCan*` pair that throws `PermissionDeniedError` with a stable\n * kebab-case `action` field documented per pair.\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\nimport { AdminRole } from '../../constants/adminRoles';\n\nimport { PermissionDeniedError } from './errors';\n\nconst role = (token: StorageToken): string => token.admin.role;\n\nexport const isAdmin = (token: StorageToken): boolean => role(token) === AdminRole.Admin;\n\nexport const isAdminOrShare = (token: StorageToken): boolean =>\n role(token) === AdminRole.Admin || role(token) === AdminRole.Share;\n\nexport const isProductionManager = (token: StorageToken): boolean =>\n role(token) === AdminRole.ProductionManager;\n\nexport const isDeveloperOrReviewer = (token: StorageToken): boolean =>\n role(token) === AdminRole.Developer || role(token) === AdminRole.Reviewer;\n\nexport const assertCanAdmin = (token: StorageToken): void => {\n if (!isAdmin(token)) {\n throw new PermissionDeniedError({\n action: 'admin',\n reason: `role '${role(token)}' is not admin`,\n });\n }\n};\n\nexport const assertCanAdminOrShare = (token: StorageToken): void => {\n if (!isAdminOrShare(token)) {\n throw new PermissionDeniedError({\n action: 'admin-or-share',\n reason: `role '${role(token)}' is not admin or share`,\n });\n }\n};\n\nexport const assertCanProductionManage = (token: StorageToken): void => {\n if (!isProductionManager(token)) {\n throw new PermissionDeniedError({\n action: 'production-manage',\n reason: `role '${role(token)}' is not productionManager`,\n });\n }\n};\n\nexport const assertCanDevelopOrReview = (token: StorageToken): void => {\n if (!isDeveloperOrReviewer(token)) {\n throw new PermissionDeniedError({\n action: 'develop-or-review',\n reason: `role '${role(token)}' is not developer or reviewer`,\n });\n }\n};\n","/**\n * @module domain/permissions/configurations\n *\n * Predicate pairs guarding the Core SDK configuration workflow methods\n * (create / copy / migrate-from-template / purge / assign-folder). Each\n * predicate composes the baseline admin role predicates with the caller-\n * supplied dev-mode flag from `ctx`.\n *\n * Rule shape:\n * - In a dev branch (`ctx.isDevModeActive === true`) → caller must be a\n * developer or reviewer.\n * - In production (`ctx.isDevModeActive === false`) → caller must be a\n * production manager.\n * - `canPurgeConfiguration` is **admin-only**, regardless of branch mode.\n * Purge is destructive and the situational base rule does not apply —\n * `token.admin.role` is a single scalar, so requiring both \"admin\" and\n * \"developer/reviewer/productionManager\" simultaneously would be an\n * impossible conjunction. The `ctx` parameter is accepted for signature\n * symmetry with the other configuration predicates and ignored.\n *\n * `ctx` is the trailing object argument convention for composed predicates;\n * extra fields land here as future rules grow (see AGENTS.md).\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\n\nimport { isAdmin, isDeveloperOrReviewer, isProductionManager } from './admin';\nimport { PermissionDeniedError } from './errors';\n\n/**\n * Caller-supplied context for configuration predicates.\n *\n * @property isDevModeActive — `true` when the user is operating inside a\n * development branch (any storage branch other than the protected default /\n * production branch); `false` when operating on the default branch in\n * production.\n *\n * How the caller determines this:\n * - The active branch comes from the caller's own routing / app state\n * (e.g. `/branch/:branchId` in kbc-ui).\n * - A branch is \"dev mode\" when it is **not** the default branch returned by\n * `apiClient.storage.devBranches.list()` (where `isDefault === true`).\n * - kbc-ui exposes this through its `RoutesStore.getCurrentRouteParam('branchId')`\n * compared against the default branch id; the api-client itself stays\n * isomorphic and never reads that state directly.\n *\n * Why it changes the rule:\n * - In dev branches Keboola allows broader write access — `developer` and\n * `reviewer` roles may create / copy / migrate configurations because the\n * branch is sandboxed from production.\n * - On the default branch only `productionManager` (or `admin`) may perform\n * the same writes, since changes ship live to production.\n */\nexport type ConfigurationCtx = {\n isDevModeActive: boolean;\n};\n\nconst meetsBaseRule = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n ctx.isDevModeActive ? isDeveloperOrReviewer(token) : isProductionManager(token);\n\nconst baseDenialReason = (ctx: ConfigurationCtx): string =>\n ctx.isDevModeActive\n ? 'dev branch requires developer or reviewer role'\n : 'production requires productionManager role';\n\nexport const canCreateConfiguration = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canCopyConfiguration = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canMigrateFromTemplate = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canPurgeConfiguration: (token: StorageToken, ctx: ConfigurationCtx) => boolean = (\n token,\n) => isAdmin(token);\n\nexport const canAssignFolder = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const assertCanCreateConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canCreateConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'create-configuration',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanCopyConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canCopyConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'copy-configuration',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanMigrateFromTemplate = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canMigrateFromTemplate(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'migrate-from-template',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanPurgeConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canPurgeConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'purge-configuration',\n reason: 'purge requires admin role',\n });\n }\n};\n\nexport const assertCanAssignFolder = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canAssignFolder(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'assign-folder',\n reason: baseDenialReason(ctx),\n });\n }\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/domain/permissions/errors.ts","../../../src/domain/permissions/admin.ts","../../../src/domain/permissions/configurations.ts"],"names":[],"mappings":";;;;AAgBO,IAAM,qBAAA,GAAN,cAAoC,KAAA,CAAM;AAAA,EAC/B,MAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EAEhB,WAAA,CAAY,EAAE,MAAA,EAAQ,MAAA,EAAQ,SAAQ,EAA0D;AAC9F,IAAA,KAAA,CAAM,MAAA,GAAS,sBAAsB,MAAM,C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GAAwB,CAAC,KAAA,EAAqB,GAAA,KAAgC;AACzF,EAAA,IAAI,CAAC,eAAA,CAAgB,KAAA,EAAO,GAAG,CAAA,EAAG;AAChC,IAAA,MAAM,IAAI,qBAAA,CAAsB;AAAA,MAC9B,MAAA,EAAQ,eAAA;AAAA,MACR,MAAA,EAAQ,iBAAiB,GAAG;AAAA,KAC7B,CAAA;AAAA,EACH;AACF","file":"index.js","sourcesContent":["/**\n * @module domain/permissions/errors\n *\n * Stable error contract for permission denials.\n *\n * `PermissionDeniedError` is what every `assertCan*` pair throws on denial. The\n * three public fields are part of the SDK's published contract — consumers\n * (kbc-ui, kai-agent, third-party TS callers) may pattern-match on `action`\n * and surface `reason` in UI, so renames here are breaking changes.\n *\n * PII boundary on `subject`:\n * `subject` is optional and intended for debugging hints only — admin id,\n * role name, configuration id, branch id, etc. It MUST NOT carry the full\n * `StorageToken`, raw tokens, secrets, or any value that could be logged or\n * surfaced to a user without further redaction.\n */\nexport class PermissionDeniedError extends Error {\n public readonly action: string;\n public readonly reason?: string;\n public readonly subject?: string;\n\n constructor({ action, reason, subject }: { action: string; reason?: string; subject?: string }) {\n super(reason ? `Permission denied: ${action} (${reason})` : `Permission denied: ${action}`);\n this.name = 'PermissionDeniedError';\n this.action = action;\n this.reason = reason;\n this.subject = subject;\n }\n}\n","/**\n * @module domain/permissions/admin\n *\n * Baseline admin-role predicates. Token-only — depend purely on the admin\n * role string carried in `StorageToken.admin.role`. Each predicate has an\n * `assertCan*` pair that throws `PermissionDeniedError` with a stable\n * kebab-case `action` field documented per pair.\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\nimport { AdminRole } from '../../constants/adminRoles';\n\nimport { PermissionDeniedError } from './errors';\n\nconst role = (token: StorageToken): string => token.admin.role;\n\nexport const isAdmin = (token: StorageToken): boolean => role(token) === AdminRole.Admin;\n\nexport const isAdminOrShare = (token: StorageToken): boolean =>\n role(token) === AdminRole.Admin || role(token) === AdminRole.Share;\n\nexport const isProductionManager = (token: StorageToken): boolean =>\n role(token) === AdminRole.ProductionManager;\n\nexport const isDeveloperOrReviewer = (token: StorageToken): boolean =>\n role(token) === AdminRole.Developer || role(token) === AdminRole.Reviewer;\n\nexport const isReadOnlyRole = (token: StorageToken): boolean => role(token) === AdminRole.ReadOnly;\n\nexport const assertCanAdmin = (token: StorageToken): void => {\n if (!isAdmin(token)) {\n throw new PermissionDeniedError({\n action: 'admin',\n reason: `role '${role(token)}' is not admin`,\n });\n }\n};\n\nexport const assertCanAdminOrShare = (token: StorageToken): void => {\n if (!isAdminOrShare(token)) {\n throw new PermissionDeniedError({\n action: 'admin-or-share',\n reason: `role '${role(token)}' is not admin or share`,\n });\n }\n};\n\nexport const assertCanProductionManage = (token: StorageToken): void => {\n if (!isProductionManager(token)) {\n throw new PermissionDeniedError({\n action: 'production-manage',\n reason: `role '${role(token)}' is not productionManager`,\n });\n }\n};\n\nexport const assertCanDevelopOrReview = (token: StorageToken): void => {\n if (!isDeveloperOrReviewer(token)) {\n throw new PermissionDeniedError({\n action: 'develop-or-review',\n reason: `role '${role(token)}' is not developer or reviewer`,\n });\n }\n};\n","/**\n * @module domain/permissions/configurations\n *\n * Predicate pairs guarding the Core SDK configuration workflow methods\n * (create / copy / migrate-from-template / purge / assign-folder). Each\n * predicate composes the baseline admin role predicates with the caller-\n * supplied dev-mode flag from `ctx`.\n *\n * Rule shape:\n * - In a dev branch (`ctx.isDevModeActive === true`) → caller must be a\n * developer or reviewer.\n * - In production (`ctx.isDevModeActive === false`) → caller must be a\n * production manager.\n * - `canPurgeConfiguration` is **admin-only**, regardless of branch mode.\n * Purge is destructive and the situational base rule does not apply —\n * `token.admin.role` is a single scalar, so requiring both \"admin\" and\n * \"developer/reviewer/productionManager\" simultaneously would be an\n * impossible conjunction. The `ctx` parameter is accepted for signature\n * symmetry with the other configuration predicates and ignored.\n *\n * `ctx` is the trailing object argument convention for composed predicates;\n * extra fields land here as future rules grow (see AGENTS.md).\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\n\nimport { isAdmin, isDeveloperOrReviewer, isProductionManager } from './admin';\nimport { PermissionDeniedError } from './errors';\n\n/**\n * Caller-supplied context for configuration predicates.\n *\n * @property isDevModeActive — `true` when the user is operating inside a\n * development branch (any storage branch other than the protected default /\n * production branch); `false` when operating on the default branch in\n * production.\n *\n * How the caller determines this:\n * - The active branch comes from the caller's own routing / app state\n * (e.g. `/branch/:branchId` in kbc-ui).\n * - A branch is \"dev mode\" when it is **not** the default branch returned by\n * `apiClient.storage.devBranches.list()` (where `isDefault === true`).\n * - kbc-ui exposes this through its `RoutesStore.getCurrentRouteParam('branchId')`\n * compared against the default branch id; the api-client itself stays\n * isomorphic and never reads that state directly.\n *\n * Why it changes the rule:\n * - In dev branches Keboola allows broader write access — `developer` and\n * `reviewer` roles may create / copy / migrate configurations because the\n * branch is sandboxed from production.\n * - On the default branch only `productionManager` (or `admin`) may perform\n * the same writes, since changes ship live to production.\n */\nexport type ConfigurationCtx = {\n isDevModeActive: boolean;\n};\n\nconst meetsBaseRule = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n ctx.isDevModeActive ? isDeveloperOrReviewer(token) : isProductionManager(token);\n\nconst baseDenialReason = (ctx: ConfigurationCtx): string =>\n ctx.isDevModeActive\n ? 'dev branch requires developer or reviewer role'\n : 'production requires productionManager role';\n\nexport const canCreateConfiguration = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canCopyConfiguration = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canMigrateFromTemplate = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const canPurgeConfiguration: (token: StorageToken, ctx: ConfigurationCtx) => boolean = (\n token,\n) => isAdmin(token);\n\nexport const canAssignFolder = (token: StorageToken, ctx: ConfigurationCtx): boolean =>\n meetsBaseRule(token, ctx);\n\nexport const assertCanCreateConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canCreateConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'create-configuration',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanCopyConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canCopyConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'copy-configuration',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanMigrateFromTemplate = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canMigrateFromTemplate(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'migrate-from-template',\n reason: baseDenialReason(ctx),\n });\n }\n};\n\nexport const assertCanPurgeConfiguration = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canPurgeConfiguration(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'purge-configuration',\n reason: 'purge requires admin role',\n });\n }\n};\n\nexport const assertCanAssignFolder = (token: StorageToken, ctx: ConfigurationCtx): void => {\n if (!canAssignFolder(token, ctx)) {\n throw new PermissionDeniedError({\n action: 'assign-folder',\n reason: baseDenialReason(ctx),\n });\n }\n};\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as ClientInitOptions } from '../types-BLJoO6YL.cjs';
|
|
2
2
|
import { EncryptQuery, ScopedSecrets } from './types.cjs';
|
|
3
3
|
import 'qs';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../backends-
|
|
4
|
+
import '../types-ClxrZC77.cjs';
|
|
5
|
+
import '../backends-Bofq_Nr0.cjs';
|
|
6
6
|
import '../types-jKnx7Tm_.cjs';
|
|
7
7
|
|
|
8
8
|
declare const createEncryptionClient: ({ baseUrl, middlewares, }: Omit<ClientInitOptions, "token">) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as ClientInitOptions } from '../types-BLJoO6YL.js';
|
|
2
2
|
import { EncryptQuery, ScopedSecrets } from './types.js';
|
|
3
3
|
import 'qs';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../backends-
|
|
4
|
+
import '../types-o8eTf_G9.js';
|
|
5
|
+
import '../backends-Bofq_Nr0.js';
|
|
6
6
|
import '../types-jKnx7Tm_.js';
|
|
7
7
|
|
|
8
8
|
declare const createEncryptionClient: ({ baseUrl, middlewares, }: Omit<ClientInitOptions, "token">) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { L as LoginInput, O as OidcInput, M as MfaCodeInput, a as MfaWebauthnInp
|
|
|
3
3
|
import { M as MiddlewareFn, c as BaseClientOptions, A as ApiResponse, H as HttpMethod } from './types-BLJoO6YL.cjs';
|
|
4
4
|
export { a as ApiError } from './types-BLJoO6YL.cjs';
|
|
5
5
|
import { D as DeletedProjectsListQuery, a as DeletedProject, b as DeletedProjectPurgeResult, M as Maintainer, c as MaintainerDetail, C as CreateMaintainerBody, U as UpdateMaintainerBody, d as MaintainerUser, A as AddMaintainerUserBody, e as CreateMaintainerInvitationBody, f as CreateMaintainerOrganizationBody, g as MetadataItem, S as SetMaintainerMetadataBody, O as OrganizationDetail, h as UpdateOrganizationBody, i as AddOrganizationUserBody, j as CreateOrganizationInvitationBody, P as Project, k as CreateOrganizationProjectBody, l as SetOrganizationMetadataBody, G as GetAllFeaturesQuery, F as Feature, m as FeatureProject, n as FeatureAdmin, o as GetProjectPath, p as CreateProjectFeaturePath, q as CreateProjectFeatureBody, R as RemoveProjectFeaturePath, r as User, L as ListProjectUsersPath, s as ListProjectInvitationsPath, t as CreateProjectInvitationPath, u as CreateProjectInvitationBody, v as DeleteProjectInvitationPath, w as AddProjectUserPath, x as AddProjectUserBody, y as RemoveProjectUserPath, z as GetProjectMetadataPath, B as ProjectMetadataItem, E as SetProjectMetadataPath, H as SetProjectMetadataBody, I as GetProjectReviewersPath, J as Reviewer, K as SetProjectReviewersPath, N as SetProjectReviewersBody, Q as UpdateProjectBody, T as MoveProjectBody, V as SetProjectDisabledBody, W as AddUserFeatureBody, X as AddUserFeaturePath, Y as RemoveUserFeaturePath } from './types-YEfQ5pAy.cjs';
|
|
6
|
-
import { S as StorageToken, c as components$8, C as CreateTokenBody, U as UpdateTokenBody, a as ShareTokenBody } from './types-
|
|
6
|
+
import { S as StorageToken, c as components$8, C as CreateTokenBody, U as UpdateTokenBody, a as ShareTokenBody } from './types-ClxrZC77.cjs';
|
|
7
7
|
import { StorageTableScope as StorageTable } from './domain/storageTable/index.cjs';
|
|
8
8
|
import { M as MetaObject, G as GetMetaObjectsPath, a as MetaStoreListResponse, b as GetMetaObjectRevisionsPath, c as GetMetaObjectPath, d as MetaStoreObjectResponse, C as CreateMetaObjectInput, D as DeleteMetaObjectPath, U as UpdateMetaObjectInput, R as ReplaceMetaObjectInput, e as GetMetaObjectRevisionPath, f as DeleteMetaObjectRevisionPath, g as GetSchemaPath, h as components$7, i as GetVersionedSchemaPath } from './types-BCPmAXOQ.cjs';
|
|
9
9
|
import { L as ListSubscriptionsQuery, c as components$6, G as GetSubscriptionPath, C as CreateSubscriptionBody, D as DeleteSubscriptionPath } from './types-BVldT2vs.cjs';
|
|
@@ -24,23 +24,23 @@ import { EncryptQuery, ScopedSecrets } from './encryption/types.cjs';
|
|
|
24
24
|
import { G as GetDataAppRunsPath, a as GetDataAppRunsQuery, b as GetDataAppRunPath, c as GetDataAppLogsDownloadPath, d as GetDataAppLogsTailPath, e as GetDataAppLogsTailQuery, L as LogEntry, f as GetAppsQuery, g as GetDataAppPath, C as CreateDataAppBody, P as PatchDataAppPath, h as PatchDataAppBody, D as DeleteDataAppPath, i as GetDataAppPasswordPath, R as ResetDataAppPasswordPath, j as GetSandboxPath, k as DeleteSandboxPath } from './utils-DDERw8dM.cjs';
|
|
25
25
|
export { p as parseLogLines } from './utils-DDERw8dM.cjs';
|
|
26
26
|
import { CreateVariableBody, VariableWithHash, DeleteVariablePath, GetVariablesQuery, GetVariablesByBranchId } from './vault/types.cjs';
|
|
27
|
-
import { a as EncryptionCtx } from './types-
|
|
27
|
+
import { a as EncryptionCtx } from './types-DHCbX2uR.cjs';
|
|
28
28
|
import { TagWithBindings, TagData, CreateMetaObjectMetaDataInput, UpdateMetaObjectMetaDataInput } from './sdk/tag/types.cjs';
|
|
29
29
|
import * as zod_v4_core from 'zod/v4/core';
|
|
30
30
|
import * as zod from 'zod';
|
|
31
31
|
import { z } from 'zod';
|
|
32
32
|
import { ServiceId, ConfigurationPath, BaseComponentConfig, CreateConfigurationInput, UpdateConfigurationInput, CreateTableAsyncBody, TableCreateJob, CreateTableDefinitionBody, JobStatus, Table, TableImportAsyncBody, TableImportJob, TableExportAsyncBody, TableExportJob, BucketListing, CreateBucketListingInput, UpdateBucketListingInput, ShareBucketToProjectsBody, ShareBucketToUsersBody, RegisterBucketBody, RefreshExternalBucketQuery, CreateSnapshotBody, AddTableColumnBody, DeleteTableColumnQuery, CreateTablePrimaryKeyBody, Service, StackComponent, GetBucketsQuery, Bucket, BucketDetail, CreateBucketBody, UpdateBucketBody, CreateScheduledRefreshPath, CreateScheduledRefreshBody, ScheduledTask, Job, UpdateBucketOwnerBody, BucketRegistrationGuideQuery, SaveBucketMetadataBody, GetEventsQuery, StorageEvent, GetTableEventsQuery, TableEvent, CreateEventBody, File as File$1, GetFilesQuery, DeleteFileTagPath, PrepareFileBody, PreparedFile, GetTablesQuery, TableDetail, GetDataPreview, PreviewData, DeleteTableRows, JobUnion, UpdateTableDefinitionInput, UpdateTableBody, CreateAliasTableBody, SetAliasTableFilterBody, Snapshot, SaveMetadataBody, Metadata, DevBranch, CreateDevBranchJobBody, DevBranchPath, BranchMetadata, BranchMetadataEntry, WorkspacePath, Workspace, WorkspacesPath, ResetWorkspacePassword, SetWorkspacePublicInput, GetWorkspaceSaml2LoginPath, WorkspaceSaml2Login, WorkspaceObject, DeleteWorkspaceObjectInput, UnloadWorkspaceInput, WorkspaceInputMappingLoadPreviewInput, MergeRequestDetail, MergeRequestDetailWithActivityLog, CreateMergeRequestParams, UpdateMergeRequestParams, JobOperation, GetJobPath, GetJobsQuery, GetComponentPath, Component, GetComponentsPath, GetComponentsQuery, GetSearchComponentConfigurationsPath, SearchComponentConfigurationsQuery, SearchComponentConfiguration, ConfigType, PartialKey, ComponentConfig, ConfigurationDiffPath, ConfigurationDiff, ConfigurationRowDiffPath, ConfigurationRowDiff, RebaseConfigurationInput, GetConfigurationsPath, CreateConfigurationRowInput, Row, CreateConfigurationRowsInput, CreateConfigurationRowBody, DeleteConfigurationRowInput, DeleteConfigurationRowsInput, CreateConfigurationWorkspaceBody, ConfigurationUseCaseType, ConfigurationVersionPath, ConfigurationVersion, ConfigurationVersionDetailPath, ConfigurationVersionDetail, ListTriggersQuery, CreateTriggerBody, UpdateTriggerBody, GlobalSearchQuery, GlobalSearchResponse, RunIdStats, GetStackInfoQuery, StackInfo } from './storage/types.cjs';
|
|
33
33
|
import { R as RegisteredComponentId } from './registry-BLItWxbK.cjs';
|
|
34
|
-
import { C as ConcurrentOptions, M as MiddlewareFn$1 } from './storageClient-
|
|
35
|
-
export { a as concurrent } from './storageClient-
|
|
34
|
+
import { C as ConcurrentOptions, M as MiddlewareFn$1 } from './storageClient-8LhUUGYa.cjs';
|
|
35
|
+
export { a as concurrent } from './storageClient-8LhUUGYa.cjs';
|
|
36
36
|
import { K as KeboolaObjectId } from './keboolaUID-D1DGSbge.cjs';
|
|
37
37
|
export { k as keboolaUID } from './keboolaUID-D1DGSbge.cjs';
|
|
38
|
-
import { B as Backend } from './backends-
|
|
38
|
+
import { B as Backend } from './backends-Bofq_Nr0.cjs';
|
|
39
39
|
export { FetchClientError, ServiceUnavailableError, UserError, isAbortError, isApiError, isFetchClientError } from './storage/index.cjs';
|
|
40
40
|
export { c as createGenericFetchClient } from './createGenericFetchClient-CSHOaFE3.cjs';
|
|
41
41
|
export { i as isManagementClientAuthError } from './authMiddleware-B9RM45AH.cjs';
|
|
42
42
|
export { M as ManagementClientAuthError } from './ManagementClientAuthError-DNUPB6cb.cjs';
|
|
43
|
-
export { c as createStorageSdk } from './storageSdk-
|
|
43
|
+
export { c as createStorageSdk } from './storageSdk-CXFUSkSB.cjs';
|
|
44
44
|
import 'qs';
|
|
45
45
|
import './encryption/index.cjs';
|
|
46
46
|
import './vault/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { L as LoginInput, O as OidcInput, M as MfaCodeInput, a as MfaWebauthnInp
|
|
|
3
3
|
import { M as MiddlewareFn, c as BaseClientOptions, A as ApiResponse, H as HttpMethod } from './types-BLJoO6YL.js';
|
|
4
4
|
export { a as ApiError } from './types-BLJoO6YL.js';
|
|
5
5
|
import { D as DeletedProjectsListQuery, a as DeletedProject, b as DeletedProjectPurgeResult, M as Maintainer, c as MaintainerDetail, C as CreateMaintainerBody, U as UpdateMaintainerBody, d as MaintainerUser, A as AddMaintainerUserBody, e as CreateMaintainerInvitationBody, f as CreateMaintainerOrganizationBody, g as MetadataItem, S as SetMaintainerMetadataBody, O as OrganizationDetail, h as UpdateOrganizationBody, i as AddOrganizationUserBody, j as CreateOrganizationInvitationBody, P as Project, k as CreateOrganizationProjectBody, l as SetOrganizationMetadataBody, G as GetAllFeaturesQuery, F as Feature, m as FeatureProject, n as FeatureAdmin, o as GetProjectPath, p as CreateProjectFeaturePath, q as CreateProjectFeatureBody, R as RemoveProjectFeaturePath, r as User, L as ListProjectUsersPath, s as ListProjectInvitationsPath, t as CreateProjectInvitationPath, u as CreateProjectInvitationBody, v as DeleteProjectInvitationPath, w as AddProjectUserPath, x as AddProjectUserBody, y as RemoveProjectUserPath, z as GetProjectMetadataPath, B as ProjectMetadataItem, E as SetProjectMetadataPath, H as SetProjectMetadataBody, I as GetProjectReviewersPath, J as Reviewer, K as SetProjectReviewersPath, N as SetProjectReviewersBody, Q as UpdateProjectBody, T as MoveProjectBody, V as SetProjectDisabledBody, W as AddUserFeatureBody, X as AddUserFeaturePath, Y as RemoveUserFeaturePath } from './types-YEfQ5pAy.js';
|
|
6
|
-
import { S as StorageToken, c as components$8, C as CreateTokenBody, U as UpdateTokenBody, a as ShareTokenBody } from './types-
|
|
6
|
+
import { S as StorageToken, c as components$8, C as CreateTokenBody, U as UpdateTokenBody, a as ShareTokenBody } from './types-o8eTf_G9.js';
|
|
7
7
|
import { StorageTableScope as StorageTable } from './domain/storageTable/index.js';
|
|
8
8
|
import { M as MetaObject, G as GetMetaObjectsPath, a as MetaStoreListResponse, b as GetMetaObjectRevisionsPath, c as GetMetaObjectPath, d as MetaStoreObjectResponse, C as CreateMetaObjectInput, D as DeleteMetaObjectPath, U as UpdateMetaObjectInput, R as ReplaceMetaObjectInput, e as GetMetaObjectRevisionPath, f as DeleteMetaObjectRevisionPath, g as GetSchemaPath, h as components$7, i as GetVersionedSchemaPath } from './types-BowqtZ7v.js';
|
|
9
9
|
import { L as ListSubscriptionsQuery, c as components$6, G as GetSubscriptionPath, C as CreateSubscriptionBody, D as DeleteSubscriptionPath } from './types-CS8MYc2k.js';
|
|
@@ -24,23 +24,23 @@ import { EncryptQuery, ScopedSecrets } from './encryption/types.js';
|
|
|
24
24
|
import { G as GetDataAppRunsPath, a as GetDataAppRunsQuery, b as GetDataAppRunPath, c as GetDataAppLogsDownloadPath, d as GetDataAppLogsTailPath, e as GetDataAppLogsTailQuery, L as LogEntry, f as GetAppsQuery, g as GetDataAppPath, C as CreateDataAppBody, P as PatchDataAppPath, h as PatchDataAppBody, D as DeleteDataAppPath, i as GetDataAppPasswordPath, R as ResetDataAppPasswordPath, j as GetSandboxPath, k as DeleteSandboxPath } from './utils-C7eSJKtG.js';
|
|
25
25
|
export { p as parseLogLines } from './utils-C7eSJKtG.js';
|
|
26
26
|
import { CreateVariableBody, VariableWithHash, DeleteVariablePath, GetVariablesQuery, GetVariablesByBranchId } from './vault/types.js';
|
|
27
|
-
import { a as EncryptionCtx } from './types-
|
|
27
|
+
import { a as EncryptionCtx } from './types-l_pP5J0H.js';
|
|
28
28
|
import { TagWithBindings, TagData, CreateMetaObjectMetaDataInput, UpdateMetaObjectMetaDataInput } from './sdk/tag/types.js';
|
|
29
29
|
import * as zod_v4_core from 'zod/v4/core';
|
|
30
30
|
import * as zod from 'zod';
|
|
31
31
|
import { z } from 'zod';
|
|
32
32
|
import { ServiceId, ConfigurationPath, BaseComponentConfig, CreateConfigurationInput, UpdateConfigurationInput, CreateTableAsyncBody, TableCreateJob, CreateTableDefinitionBody, JobStatus, Table, TableImportAsyncBody, TableImportJob, TableExportAsyncBody, TableExportJob, BucketListing, CreateBucketListingInput, UpdateBucketListingInput, ShareBucketToProjectsBody, ShareBucketToUsersBody, RegisterBucketBody, RefreshExternalBucketQuery, CreateSnapshotBody, AddTableColumnBody, DeleteTableColumnQuery, CreateTablePrimaryKeyBody, Service, StackComponent, GetBucketsQuery, Bucket, BucketDetail, CreateBucketBody, UpdateBucketBody, CreateScheduledRefreshPath, CreateScheduledRefreshBody, ScheduledTask, Job, UpdateBucketOwnerBody, BucketRegistrationGuideQuery, SaveBucketMetadataBody, GetEventsQuery, StorageEvent, GetTableEventsQuery, TableEvent, CreateEventBody, File as File$1, GetFilesQuery, DeleteFileTagPath, PrepareFileBody, PreparedFile, GetTablesQuery, TableDetail, GetDataPreview, PreviewData, DeleteTableRows, JobUnion, UpdateTableDefinitionInput, UpdateTableBody, CreateAliasTableBody, SetAliasTableFilterBody, Snapshot, SaveMetadataBody, Metadata, DevBranch, CreateDevBranchJobBody, DevBranchPath, BranchMetadata, BranchMetadataEntry, WorkspacePath, Workspace, WorkspacesPath, ResetWorkspacePassword, SetWorkspacePublicInput, GetWorkspaceSaml2LoginPath, WorkspaceSaml2Login, WorkspaceObject, DeleteWorkspaceObjectInput, UnloadWorkspaceInput, WorkspaceInputMappingLoadPreviewInput, MergeRequestDetail, MergeRequestDetailWithActivityLog, CreateMergeRequestParams, UpdateMergeRequestParams, JobOperation, GetJobPath, GetJobsQuery, GetComponentPath, Component, GetComponentsPath, GetComponentsQuery, GetSearchComponentConfigurationsPath, SearchComponentConfigurationsQuery, SearchComponentConfiguration, ConfigType, PartialKey, ComponentConfig, ConfigurationDiffPath, ConfigurationDiff, ConfigurationRowDiffPath, ConfigurationRowDiff, RebaseConfigurationInput, GetConfigurationsPath, CreateConfigurationRowInput, Row, CreateConfigurationRowsInput, CreateConfigurationRowBody, DeleteConfigurationRowInput, DeleteConfigurationRowsInput, CreateConfigurationWorkspaceBody, ConfigurationUseCaseType, ConfigurationVersionPath, ConfigurationVersion, ConfigurationVersionDetailPath, ConfigurationVersionDetail, ListTriggersQuery, CreateTriggerBody, UpdateTriggerBody, GlobalSearchQuery, GlobalSearchResponse, RunIdStats, GetStackInfoQuery, StackInfo } from './storage/types.js';
|
|
33
33
|
import { R as RegisteredComponentId } from './registry-BLItWxbK.js';
|
|
34
|
-
import { C as ConcurrentOptions, M as MiddlewareFn$1 } from './storageClient-
|
|
35
|
-
export { a as concurrent } from './storageClient-
|
|
34
|
+
import { C as ConcurrentOptions, M as MiddlewareFn$1 } from './storageClient-Scemp8F6.js';
|
|
35
|
+
export { a as concurrent } from './storageClient-Scemp8F6.js';
|
|
36
36
|
import { K as KeboolaObjectId } from './keboolaUID-D1DGSbge.js';
|
|
37
37
|
export { k as keboolaUID } from './keboolaUID-D1DGSbge.js';
|
|
38
|
-
import { B as Backend } from './backends-
|
|
38
|
+
import { B as Backend } from './backends-Bofq_Nr0.js';
|
|
39
39
|
export { FetchClientError, ServiceUnavailableError, UserError, isAbortError, isApiError, isFetchClientError } from './storage/index.js';
|
|
40
40
|
export { c as createGenericFetchClient } from './createGenericFetchClient-D_vU8nco.js';
|
|
41
41
|
export { i as isManagementClientAuthError } from './authMiddleware-CwkfLK36.js';
|
|
42
42
|
export { M as ManagementClientAuthError } from './ManagementClientAuthError-WRHtWJSv.js';
|
|
43
|
-
export { c as createStorageSdk } from './storageSdk-
|
|
43
|
+
export { c as createStorageSdk } from './storageSdk-r-6-GCFM.js';
|
|
44
44
|
import 'qs';
|
|
45
45
|
import './encryption/index.js';
|
|
46
46
|
import './vault/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StorageToken } from './types-
|
|
2
|
-
import { B as Backend } from './backends-
|
|
1
|
+
import { S as StorageToken } from './types-o8eTf_G9.js';
|
|
2
|
+
import { B as Backend } from './backends-Bofq_Nr0.js';
|
|
3
3
|
|
|
4
4
|
type Options = {
|
|
5
5
|
sapiToken: StorageToken;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StorageToken } from './types-
|
|
2
|
-
import { B as Backend } from './backends-
|
|
1
|
+
import { S as StorageToken } from './types-ClxrZC77.cjs';
|
|
2
|
+
import { B as Backend } from './backends-Bofq_Nr0.cjs';
|
|
3
3
|
|
|
4
4
|
type Options = {
|
|
5
5
|
sapiToken: StorageToken;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { createEncryptionClient } from '../../encryption/index.cjs';
|
|
3
|
-
import { c as createStorageClient } from '../../storageClient-
|
|
3
|
+
import { c as createStorageClient } from '../../storageClient-8LhUUGYa.cjs';
|
|
4
4
|
import { DevBranch, ConfigurationPath, BaseComponentConfig, CreateConfigurationInput, UpdateConfigurationInput } from '../../storage/types.cjs';
|
|
5
|
-
import { P as Project } from '../../project-
|
|
5
|
+
import { P as Project } from '../../project-CX3TEH8A.cjs';
|
|
6
6
|
import { R as RegisteredComponentId, r as registry } from '../../registry-BLItWxbK.cjs';
|
|
7
7
|
import '../../types-BLJoO6YL.cjs';
|
|
8
8
|
import 'qs';
|
|
9
9
|
import '../../encryption/types.cjs';
|
|
10
|
-
import '../../types-
|
|
11
|
-
import '../../backends-
|
|
10
|
+
import '../../types-ClxrZC77.cjs';
|
|
11
|
+
import '../../backends-Bofq_Nr0.cjs';
|
|
12
12
|
import '../../types-jKnx7Tm_.cjs';
|
|
13
13
|
import '../../createGenericFetchClient-CSHOaFE3.cjs';
|
|
14
14
|
import '../../createOpenapiFetchClient-CKNLT4ND.cjs';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { createEncryptionClient } from '../../encryption/index.js';
|
|
3
|
-
import { c as createStorageClient } from '../../storageClient-
|
|
3
|
+
import { c as createStorageClient } from '../../storageClient-Scemp8F6.js';
|
|
4
4
|
import { DevBranch, ConfigurationPath, BaseComponentConfig, CreateConfigurationInput, UpdateConfigurationInput } from '../../storage/types.js';
|
|
5
|
-
import { P as Project } from '../../project-
|
|
5
|
+
import { P as Project } from '../../project-Bj7A_TSe.js';
|
|
6
6
|
import { R as RegisteredComponentId, r as registry } from '../../registry-BLItWxbK.js';
|
|
7
7
|
import '../../types-BLJoO6YL.js';
|
|
8
8
|
import 'qs';
|
|
9
9
|
import '../../encryption/types.js';
|
|
10
|
-
import '../../types-
|
|
11
|
-
import '../../backends-
|
|
10
|
+
import '../../types-o8eTf_G9.js';
|
|
11
|
+
import '../../backends-Bofq_Nr0.js';
|
|
12
12
|
import '../../types-jKnx7Tm_.js';
|
|
13
13
|
import '../../createGenericFetchClient-D_vU8nco.js';
|
|
14
14
|
import '../../createOpenapiFetchClient-B50N1zkV.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { c as createStorageSdk } from '../../storageSdk-
|
|
1
|
+
export { c as createStorageSdk } from '../../storageSdk-CXFUSkSB.cjs';
|
|
2
2
|
import '../../storage/types.cjs';
|
|
3
3
|
import '../../types-jKnx7Tm_.cjs';
|
|
4
|
-
import '../../types-
|
|
5
|
-
import '../../backends-
|
|
6
|
-
import '../../storageClient-
|
|
4
|
+
import '../../types-ClxrZC77.cjs';
|
|
5
|
+
import '../../backends-Bofq_Nr0.cjs';
|
|
6
|
+
import '../../storageClient-8LhUUGYa.cjs';
|
|
7
7
|
import '../../types-BLJoO6YL.cjs';
|
|
8
8
|
import 'qs';
|
|
9
9
|
import '../../createGenericFetchClient-CSHOaFE3.cjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { c as createStorageSdk } from '../../storageSdk-
|
|
1
|
+
export { c as createStorageSdk } from '../../storageSdk-r-6-GCFM.js';
|
|
2
2
|
import '../../storage/types.js';
|
|
3
3
|
import '../../types-jKnx7Tm_.js';
|
|
4
|
-
import '../../types-
|
|
5
|
-
import '../../backends-
|
|
6
|
-
import '../../storageClient-
|
|
4
|
+
import '../../types-o8eTf_G9.js';
|
|
5
|
+
import '../../backends-Bofq_Nr0.js';
|
|
6
|
+
import '../../storageClient-Scemp8F6.js';
|
|
7
7
|
import '../../types-BLJoO6YL.js';
|
|
8
8
|
import 'qs';
|
|
9
9
|
import '../../createGenericFetchClient-D_vU8nco.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CreateVariableBody, VariableWithHash, AnyVariable } from '../../vault/types.cjs';
|
|
2
|
-
import { V as VaultClient, E as EncryptionClient, a as EncryptionCtx } from '../../types-
|
|
2
|
+
import { V as VaultClient, E as EncryptionClient, a as EncryptionCtx } from '../../types-DHCbX2uR.cjs';
|
|
3
3
|
import '../../types-jKnx7Tm_.cjs';
|
|
4
4
|
import '../../encryption/index.cjs';
|
|
5
5
|
import '../../types-BLJoO6YL.cjs';
|
|
6
6
|
import 'qs';
|
|
7
7
|
import '../../encryption/types.cjs';
|
|
8
|
-
import '../../types-
|
|
9
|
-
import '../../backends-
|
|
8
|
+
import '../../types-ClxrZC77.cjs';
|
|
9
|
+
import '../../backends-Bofq_Nr0.cjs';
|
|
10
10
|
import '../../vault/index.cjs';
|
|
11
11
|
|
|
12
12
|
type Options = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CreateVariableBody, VariableWithHash, AnyVariable } from '../../vault/types.js';
|
|
2
|
-
import { V as VaultClient, E as EncryptionClient, a as EncryptionCtx } from '../../types-
|
|
2
|
+
import { V as VaultClient, E as EncryptionClient, a as EncryptionCtx } from '../../types-l_pP5J0H.js';
|
|
3
3
|
import '../../types-jKnx7Tm_.js';
|
|
4
4
|
import '../../encryption/index.js';
|
|
5
5
|
import '../../types-BLJoO6YL.js';
|
|
6
6
|
import 'qs';
|
|
7
7
|
import '../../encryption/types.js';
|
|
8
|
-
import '../../types-
|
|
9
|
-
import '../../backends-
|
|
8
|
+
import '../../types-o8eTf_G9.js';
|
|
9
|
+
import '../../backends-Bofq_Nr0.js';
|
|
10
10
|
import '../../vault/index.js';
|
|
11
11
|
|
|
12
12
|
type Options = {
|
package/dist/storage/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { G as GenericFetchClient, S as StorageOpenApiFetchClient, c as createStorageClient } from '../storageClient-
|
|
1
|
+
export { G as GenericFetchClient, S as StorageOpenApiFetchClient, c as createStorageClient } from '../storageClient-8LhUUGYa.cjs';
|
|
2
2
|
import { a as ApiError } from '../types-BLJoO6YL.cjs';
|
|
3
3
|
export { M as ManagementClientAuthError } from '../ManagementClientAuthError-DNUPB6cb.cjs';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../backends-
|
|
4
|
+
import '../types-ClxrZC77.cjs';
|
|
5
|
+
import '../backends-Bofq_Nr0.cjs';
|
|
6
6
|
import '../types-jKnx7Tm_.cjs';
|
|
7
7
|
import './types.cjs';
|
|
8
8
|
import '../createGenericFetchClient-CSHOaFE3.cjs';
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { G as GenericFetchClient, S as StorageOpenApiFetchClient, c as createStorageClient } from '../storageClient-
|
|
1
|
+
export { G as GenericFetchClient, S as StorageOpenApiFetchClient, c as createStorageClient } from '../storageClient-Scemp8F6.js';
|
|
2
2
|
import { a as ApiError } from '../types-BLJoO6YL.js';
|
|
3
3
|
export { M as ManagementClientAuthError } from '../ManagementClientAuthError-WRHtWJSv.js';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../backends-
|
|
4
|
+
import '../types-o8eTf_G9.js';
|
|
5
|
+
import '../backends-Bofq_Nr0.js';
|
|
6
6
|
import '../types-jKnx7Tm_.js';
|
|
7
7
|
import './types.js';
|
|
8
8
|
import '../createGenericFetchClient-D_vU8nco.js';
|
package/dist/storage/types.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as OpenapiQueryType, b as OpenapiBodyType, a as OpenapiReturnType, d as OpenapiPathType } from '../types-jKnx7Tm_.cjs';
|
|
2
|
-
import { p as paths, c as components } from '../types-
|
|
3
|
-
export { C as CreateTokenBody, b as CreateTokenResponse, P as ProjectId, a as ShareTokenBody, S as StorageToken, T as TokenListItem, U as UpdateTokenBody } from '../types-
|
|
4
|
-
export { A as AdminRole, B as Backend } from '../backends-
|
|
2
|
+
import { p as paths, c as components } from '../types-ClxrZC77.cjs';
|
|
3
|
+
export { C as CreateTokenBody, b as CreateTokenResponse, P as ProjectId, a as ShareTokenBody, S as StorageToken, T as TokenListItem, U as UpdateTokenBody } from '../types-ClxrZC77.cjs';
|
|
4
|
+
export { A as AdminRole, B as Backend } from '../backends-Bofq_Nr0.cjs';
|
|
5
5
|
|
|
6
6
|
type BucketStage = 'in' | 'out';
|
|
7
7
|
type BucketBackend = 'snowflake' | 'redshift' | 'bigquery' | 'teradata';
|
|
@@ -334,7 +334,7 @@ type WhereFilters = {
|
|
|
334
334
|
type DeleteTableRows = {
|
|
335
335
|
changedSince?: string;
|
|
336
336
|
changedUntil?: string;
|
|
337
|
-
whereFilters?: WhereFilters;
|
|
337
|
+
whereFilters?: WhereFilters[];
|
|
338
338
|
};
|
|
339
339
|
type GetDataPreview = {
|
|
340
340
|
format?: 'json' | 'rfc';
|
package/dist/storage/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as OpenapiQueryType, b as OpenapiBodyType, a as OpenapiReturnType, d as OpenapiPathType } from '../types-jKnx7Tm_.js';
|
|
2
|
-
import { p as paths, c as components } from '../types-
|
|
3
|
-
export { C as CreateTokenBody, b as CreateTokenResponse, P as ProjectId, a as ShareTokenBody, S as StorageToken, T as TokenListItem, U as UpdateTokenBody } from '../types-
|
|
4
|
-
export { A as AdminRole, B as Backend } from '../backends-
|
|
2
|
+
import { p as paths, c as components } from '../types-o8eTf_G9.js';
|
|
3
|
+
export { C as CreateTokenBody, b as CreateTokenResponse, P as ProjectId, a as ShareTokenBody, S as StorageToken, T as TokenListItem, U as UpdateTokenBody } from '../types-o8eTf_G9.js';
|
|
4
|
+
export { A as AdminRole, B as Backend } from '../backends-Bofq_Nr0.js';
|
|
5
5
|
|
|
6
6
|
type BucketStage = 'in' | 'out';
|
|
7
7
|
type BucketBackend = 'snowflake' | 'redshift' | 'bigquery' | 'teradata';
|
|
@@ -334,7 +334,7 @@ type WhereFilters = {
|
|
|
334
334
|
type DeleteTableRows = {
|
|
335
335
|
changedSince?: string;
|
|
336
336
|
changedUntil?: string;
|
|
337
|
-
whereFilters?: WhereFilters;
|
|
337
|
+
whereFilters?: WhereFilters[];
|
|
338
338
|
};
|
|
339
339
|
type GetDataPreview = {
|
|
340
340
|
format?: 'json' | 'rfc';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as components, S as StorageToken, C as CreateTokenBody, U as UpdateTokenBody, a as ShareTokenBody } from './types-
|
|
1
|
+
import { c as components, S as StorageToken, C as CreateTokenBody, U as UpdateTokenBody, a as ShareTokenBody } from './types-ClxrZC77.cjs';
|
|
2
2
|
import { GetBucketsQuery, Bucket, BucketDetail, CreateBucketBody, UpdateBucketBody, JobStatus, CreateScheduledRefreshPath, CreateScheduledRefreshBody, ScheduledTask, BucketListing, CreateBucketListingInput, Job, UpdateBucketListingInput, ShareBucketToProjectsBody, ShareBucketToUsersBody, UpdateBucketOwnerBody, RefreshExternalBucketQuery, RegisterBucketBody, BucketRegistrationGuideQuery, SaveBucketMetadataBody, GetEventsQuery, StorageEvent, GetTableEventsQuery, TableEvent, CreateEventBody, File, GetFilesQuery, DeleteFileTagPath, PrepareFileBody, PreparedFile, GetTablesQuery, Table, TableDetail, GetDataPreview, PreviewData, DeleteTableRows, JobUnion, TableExportAsyncBody, TableExportJob, CreateTableAsyncBody, TableCreateJob, CreateTableDefinitionBody, TableImportAsyncBody, TableImportJob, UpdateTableDefinitionInput, UpdateTableBody, CreateAliasTableBody, SetAliasTableFilterBody, CreateSnapshotBody, Snapshot, SaveMetadataBody, Metadata, AddTableColumnBody, DeleteTableColumnQuery, CreateTablePrimaryKeyBody, DevBranch, CreateDevBranchJobBody, DevBranchPath, BranchMetadata, BranchMetadataEntry, WorkspacePath, Workspace, WorkspacesPath, ResetWorkspacePassword, SetWorkspacePublicInput, GetWorkspaceSaml2LoginPath, WorkspaceSaml2Login, WorkspaceObject, DeleteWorkspaceObjectInput, UnloadWorkspaceInput, WorkspaceInputMappingLoadPreviewInput, MergeRequestDetail, MergeRequestDetailWithActivityLog, CreateMergeRequestParams, UpdateMergeRequestParams, JobOperation, GetJobPath, GetJobsQuery, GetComponentPath, Component, GetComponentsPath, GetComponentsQuery, GetSearchComponentConfigurationsPath, SearchComponentConfigurationsQuery, SearchComponentConfiguration, CreateConfigurationInput, BaseComponentConfig, ConfigType, PartialKey, UpdateConfigurationInput, ComponentConfig, ConfigurationPath, ConfigurationDiffPath, ConfigurationDiff, ConfigurationRowDiffPath, ConfigurationRowDiff, RebaseConfigurationInput, GetConfigurationsPath, CreateConfigurationRowInput, Row, CreateConfigurationRowsInput, CreateConfigurationRowBody, DeleteConfigurationRowInput, DeleteConfigurationRowsInput, CreateConfigurationWorkspaceBody, ConfigurationUseCaseType, ConfigurationVersionPath, ConfigurationVersion, ConfigurationVersionDetailPath, ConfigurationVersionDetail, ListTriggersQuery, CreateTriggerBody, UpdateTriggerBody, GlobalSearchQuery, GlobalSearchResponse, RunIdStats, GetStackInfoQuery, StackInfo } from './storage/types.cjs';
|
|
3
3
|
import { C as ClientInitOptions, M as MiddlewareFn$1 } from './types-BLJoO6YL.cjs';
|
|
4
4
|
import { c as createGenericFetchClient } from './createGenericFetchClient-CSHOaFE3.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as components, S as StorageToken, C as CreateTokenBody, U as UpdateTokenBody, a as ShareTokenBody } from './types-
|
|
1
|
+
import { c as components, S as StorageToken, C as CreateTokenBody, U as UpdateTokenBody, a as ShareTokenBody } from './types-o8eTf_G9.js';
|
|
2
2
|
import { GetBucketsQuery, Bucket, BucketDetail, CreateBucketBody, UpdateBucketBody, JobStatus, CreateScheduledRefreshPath, CreateScheduledRefreshBody, ScheduledTask, BucketListing, CreateBucketListingInput, Job, UpdateBucketListingInput, ShareBucketToProjectsBody, ShareBucketToUsersBody, UpdateBucketOwnerBody, RefreshExternalBucketQuery, RegisterBucketBody, BucketRegistrationGuideQuery, SaveBucketMetadataBody, GetEventsQuery, StorageEvent, GetTableEventsQuery, TableEvent, CreateEventBody, File, GetFilesQuery, DeleteFileTagPath, PrepareFileBody, PreparedFile, GetTablesQuery, Table, TableDetail, GetDataPreview, PreviewData, DeleteTableRows, JobUnion, TableExportAsyncBody, TableExportJob, CreateTableAsyncBody, TableCreateJob, CreateTableDefinitionBody, TableImportAsyncBody, TableImportJob, UpdateTableDefinitionInput, UpdateTableBody, CreateAliasTableBody, SetAliasTableFilterBody, CreateSnapshotBody, Snapshot, SaveMetadataBody, Metadata, AddTableColumnBody, DeleteTableColumnQuery, CreateTablePrimaryKeyBody, DevBranch, CreateDevBranchJobBody, DevBranchPath, BranchMetadata, BranchMetadataEntry, WorkspacePath, Workspace, WorkspacesPath, ResetWorkspacePassword, SetWorkspacePublicInput, GetWorkspaceSaml2LoginPath, WorkspaceSaml2Login, WorkspaceObject, DeleteWorkspaceObjectInput, UnloadWorkspaceInput, WorkspaceInputMappingLoadPreviewInput, MergeRequestDetail, MergeRequestDetailWithActivityLog, CreateMergeRequestParams, UpdateMergeRequestParams, JobOperation, GetJobPath, GetJobsQuery, GetComponentPath, Component, GetComponentsPath, GetComponentsQuery, GetSearchComponentConfigurationsPath, SearchComponentConfigurationsQuery, SearchComponentConfiguration, CreateConfigurationInput, BaseComponentConfig, ConfigType, PartialKey, UpdateConfigurationInput, ComponentConfig, ConfigurationPath, ConfigurationDiffPath, ConfigurationDiff, ConfigurationRowDiffPath, ConfigurationRowDiff, RebaseConfigurationInput, GetConfigurationsPath, CreateConfigurationRowInput, Row, CreateConfigurationRowsInput, CreateConfigurationRowBody, DeleteConfigurationRowInput, DeleteConfigurationRowsInput, CreateConfigurationWorkspaceBody, ConfigurationUseCaseType, ConfigurationVersionPath, ConfigurationVersion, ConfigurationVersionDetailPath, ConfigurationVersionDetail, ListTriggersQuery, CreateTriggerBody, UpdateTriggerBody, GlobalSearchQuery, GlobalSearchResponse, RunIdStats, GetStackInfoQuery, StackInfo } from './storage/types.js';
|
|
3
3
|
import { C as ClientInitOptions, M as MiddlewareFn$1 } from './types-BLJoO6YL.js';
|
|
4
4
|
import { c as createGenericFetchClient } from './createGenericFetchClient-D_vU8nco.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateTableAsyncBody, TableCreateJob, CreateTableDefinitionBody, JobStatus, Table, TableImportAsyncBody, TableImportJob, TableExportAsyncBody, TableExportJob, BucketListing, CreateBucketListingInput, UpdateBucketListingInput, ShareBucketToProjectsBody, ShareBucketToUsersBody, RegisterBucketBody, RefreshExternalBucketQuery, CreateSnapshotBody, AddTableColumnBody, DeleteTableColumnQuery, CreateTablePrimaryKeyBody } from './storage/types.cjs';
|
|
2
|
-
import { c as createStorageClient } from './storageClient-
|
|
2
|
+
import { c as createStorageClient } from './storageClient-8LhUUGYa.cjs';
|
|
3
3
|
|
|
4
4
|
type Options = {
|
|
5
5
|
interval?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateTableAsyncBody, TableCreateJob, CreateTableDefinitionBody, JobStatus, Table, TableImportAsyncBody, TableImportJob, TableExportAsyncBody, TableExportJob, BucketListing, CreateBucketListingInput, UpdateBucketListingInput, ShareBucketToProjectsBody, ShareBucketToUsersBody, RegisterBucketBody, RefreshExternalBucketQuery, CreateSnapshotBody, AddTableColumnBody, DeleteTableColumnQuery, CreateTablePrimaryKeyBody } from './storage/types.js';
|
|
2
|
-
import { c as createStorageClient } from './storageClient-
|
|
2
|
+
import { c as createStorageClient } from './storageClient-Scemp8F6.js';
|
|
3
3
|
|
|
4
4
|
type Options = {
|
|
5
5
|
interval?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEncryptionClient } from './encryption/index.cjs';
|
|
2
|
-
import { P as ProjectId } from './types-
|
|
2
|
+
import { P as ProjectId } from './types-ClxrZC77.cjs';
|
|
3
3
|
import { createVaultClient } from './vault/index.cjs';
|
|
4
4
|
|
|
5
5
|
type VaultClient = ReturnType<typeof createVaultClient>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEncryptionClient } from './encryption/index.js';
|
|
2
|
-
import { P as ProjectId } from './types-
|
|
2
|
+
import { P as ProjectId } from './types-o8eTf_G9.js';
|
|
3
3
|
import { createVaultClient } from './vault/index.js';
|
|
4
4
|
|
|
5
5
|
type VaultClient = ReturnType<typeof createVaultClient>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keboola/api-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"description": "TypeScript SDK for Keboola APIs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -723,8 +723,8 @@
|
|
|
723
723
|
"vite": "^8.0.16",
|
|
724
724
|
"vitest": "^4.1.8",
|
|
725
725
|
"yaml": "^2.8.3",
|
|
726
|
-
"@keboola/
|
|
727
|
-
"@keboola/
|
|
726
|
+
"@keboola/tsconfig": "^0.2.0",
|
|
727
|
+
"@keboola/oxlint-config": "^8.0.0"
|
|
728
728
|
},
|
|
729
729
|
"scripts": {
|
|
730
730
|
"gen:types": "openapi-typescript --export-type",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants/adminRoles.ts"],"names":[],"mappings":";;;AAAO,IAAM,SAAA,GAAY;AAAA,EACvB,KAAA,EAAO,OAAA;AAAA,EACP,KAAA,EAAO,OAAA;AAAA,EACP,iBAAA,EAAmB,mBAAA;AAAA,EACnB,SAAA,EAAW,WAAA;AAAA,EACX,QAAA,EAAU;AACZ","file":"chunk-NFA5ITNG.cjs","sourcesContent":["export const AdminRole = {\n Admin: 'admin',\n Share: 'share',\n ProductionManager: 'productionManager',\n Developer: 'developer',\n Reviewer: 'reviewer',\n} as const;\n\nexport type AdminRole = (typeof AdminRole)[keyof typeof AdminRole];\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants/adminRoles.ts"],"names":[],"mappings":";AAAO,IAAM,SAAA,GAAY;AAAA,EACvB,KAAA,EAAO,OAAA;AAAA,EACP,KAAA,EAAO,OAAA;AAAA,EACP,iBAAA,EAAmB,mBAAA;AAAA,EACnB,SAAA,EAAW,WAAA;AAAA,EACX,QAAA,EAAU;AACZ","file":"chunk-Y5QJJWDQ.js","sourcesContent":["export const AdminRole = {\n Admin: 'admin',\n Share: 'share',\n ProductionManager: 'productionManager',\n Developer: 'developer',\n Reviewer: 'reviewer',\n} as const;\n\nexport type AdminRole = (typeof AdminRole)[keyof typeof AdminRole];\n"]}
|