@zarel-ai/sdk 0.6.0 → 0.7.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/LICENSE +1 -1
- package/README.md +29 -31
- package/dist/_internal/auth-headers.d.ts +3 -3
- package/dist/_internal/auth-headers.d.ts.map +1 -1
- package/dist/_internal/auth-headers.js +5 -3
- package/dist/_internal/auth-headers.js.map +1 -1
- package/dist/_internal/confirmation.d.ts +1 -1
- package/dist/_internal/confirmation.d.ts.map +1 -1
- package/dist/_internal/confirmation.js +3 -1
- package/dist/_internal/confirmation.js.map +1 -1
- package/dist/_internal/event-iterator.d.ts.map +1 -1
- package/dist/_internal/event-iterator.js +3 -1
- package/dist/_internal/event-iterator.js.map +1 -1
- package/dist/_internal/fetch-client.d.ts +26 -18
- package/dist/_internal/fetch-client.d.ts.map +1 -1
- package/dist/_internal/fetch-client.js +40 -35
- package/dist/_internal/fetch-client.js.map +1 -1
- package/dist/_internal/interceptors.d.ts.map +1 -1
- package/dist/_internal/interceptors.js.map +1 -1
- package/dist/_internal/mcp.d.ts.map +1 -1
- package/dist/_internal/mcp.js +6 -4
- package/dist/_internal/mcp.js.map +1 -1
- package/dist/_internal/pagination.d.ts +5 -5
- package/dist/_internal/pagination.d.ts.map +1 -1
- package/dist/_internal/pagination.js +7 -5
- package/dist/_internal/pagination.js.map +1 -1
- package/dist/_internal/require-token.d.ts +4 -4
- package/dist/_internal/require-token.d.ts.map +1 -1
- package/dist/_internal/require-token.js +6 -4
- package/dist/_internal/require-token.js.map +1 -1
- package/dist/_internal/retry-after.d.ts.map +1 -1
- package/dist/_internal/retry-after.js +2 -0
- package/dist/_internal/retry-after.js.map +1 -1
- package/dist/_internal/sse-client.d.ts.map +1 -1
- package/dist/_internal/sse-client.js +4 -3
- package/dist/_internal/sse-client.js.map +1 -1
- package/dist/_internal/version.d.ts +2 -2
- package/dist/_internal/version.d.ts.map +1 -1
- package/dist/_internal/version.js +4 -2
- package/dist/_internal/version.js.map +1 -1
- package/dist/client.d.ts +8 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +10 -10
- package/dist/client.js.map +1 -1
- package/dist/contract/_singleton.d.ts +31 -6
- package/dist/contract/_singleton.d.ts.map +1 -1
- package/dist/contract/_singleton.js +30 -6
- package/dist/contract/_singleton.js.map +1 -1
- package/dist/contract/actions.d.ts +16 -4
- package/dist/contract/actions.d.ts.map +1 -1
- package/dist/contract/actions.js +13 -12
- package/dist/contract/actions.js.map +1 -1
- package/dist/contract/assistant.d.ts +3 -3
- package/dist/contract/assistant.d.ts.map +1 -1
- package/dist/contract/assistant.js +13 -11
- package/dist/contract/assistant.js.map +1 -1
- package/dist/contract/batch.d.ts +9 -20
- package/dist/contract/batch.d.ts.map +1 -1
- package/dist/contract/batch.js +14 -6
- package/dist/contract/batch.js.map +1 -1
- package/dist/contract/capabilities.d.ts +7 -13
- package/dist/contract/capabilities.d.ts.map +1 -1
- package/dist/contract/capabilities.js +10 -8
- package/dist/contract/capabilities.js.map +1 -1
- package/dist/contract/constraints.d.ts +7 -13
- package/dist/contract/constraints.d.ts.map +1 -1
- package/dist/contract/constraints.js +10 -8
- package/dist/contract/constraints.js.map +1 -1
- package/dist/contract/events.d.ts +9 -13
- package/dist/contract/events.d.ts.map +1 -1
- package/dist/contract/events.js +12 -13
- package/dist/contract/events.js.map +1 -1
- package/dist/contract/flows.d.ts +30 -19
- package/dist/contract/flows.d.ts.map +1 -1
- package/dist/contract/flows.js +46 -29
- package/dist/contract/flows.js.map +1 -1
- package/dist/contract/index.d.ts +207 -32
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +13 -14
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/metadata.d.ts +6 -20
- package/dist/contract/metadata.d.ts.map +1 -1
- package/dist/contract/metadata.js +16 -8
- package/dist/contract/metadata.js.map +1 -1
- package/dist/contract/process-model.d.ts +10 -15
- package/dist/contract/process-model.d.ts.map +1 -1
- package/dist/contract/process-model.js +11 -9
- package/dist/contract/process-model.js.map +1 -1
- package/dist/contract/roots/channels.d.ts.map +1 -1
- package/dist/contract/roots/channels.js +12 -10
- package/dist/contract/roots/channels.js.map +1 -1
- package/dist/contract/roots/events.d.ts.map +1 -1
- package/dist/contract/roots/events.js +2 -0
- package/dist/contract/roots/events.js.map +1 -1
- package/dist/contract/roots/index.d.ts +3 -2
- package/dist/contract/roots/index.d.ts.map +1 -1
- package/dist/contract/roots/index.js +13 -12
- package/dist/contract/roots/index.js.map +1 -1
- package/dist/contract/roots/mcp-servers.d.ts +11 -29
- package/dist/contract/roots/mcp-servers.d.ts.map +1 -1
- package/dist/contract/roots/mcp-servers.js +22 -18
- package/dist/contract/roots/mcp-servers.js.map +1 -1
- package/dist/contract/roots/profiles.d.ts +13 -12
- package/dist/contract/roots/profiles.d.ts.map +1 -1
- package/dist/contract/roots/profiles.js +18 -7
- package/dist/contract/roots/profiles.js.map +1 -1
- package/dist/contract/roots/timezone.d.ts +3 -3
- package/dist/contract/roots/timezone.d.ts.map +1 -1
- package/dist/contract/roots/timezone.js +5 -2
- package/dist/contract/roots/timezone.js.map +1 -1
- package/dist/contract/roots/treatment.d.ts +3 -2
- package/dist/contract/roots/treatment.d.ts.map +1 -1
- package/dist/contract/roots/treatment.js +8 -8
- package/dist/contract/roots/treatment.js.map +1 -1
- package/dist/contract/roots/vocabulary.d.ts +20 -13
- package/dist/contract/roots/vocabulary.d.ts.map +1 -1
- package/dist/contract/roots/vocabulary.js +28 -9
- package/dist/contract/roots/vocabulary.js.map +1 -1
- package/dist/contract/schemas.d.ts +7 -10
- package/dist/contract/schemas.d.ts.map +1 -1
- package/dist/contract/schemas.js +10 -8
- package/dist/contract/schemas.js.map +1 -1
- package/dist/contract/skills.d.ts +14 -4
- package/dist/contract/skills.d.ts.map +1 -1
- package/dist/contract/skills.js +11 -11
- package/dist/contract/skills.js.map +1 -1
- package/dist/errors.d.ts +4 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +4 -4
- package/dist/errors.js.map +1 -1
- package/dist/generated/contract.d.ts +4494 -706
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/index.d.ts +119 -7
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/runtime.d.ts +1490 -368
- package/dist/generated/runtime.d.ts.map +1 -1
- package/dist/generated/unwrap-map.d.ts +5 -2
- package/dist/generated/unwrap-map.d.ts.map +1 -1
- package/dist/generated/unwrap-map.js +5 -5
- package/dist/generated/unwrap-map.js.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/resources/actions.d.ts +5 -6
- package/dist/resources/actions.d.ts.map +1 -1
- package/dist/resources/actions.js +9 -10
- package/dist/resources/actions.js.map +1 -1
- package/dist/resources/audit.d.ts +6 -6
- package/dist/resources/audit.d.ts.map +1 -1
- package/dist/resources/audit.js +3 -25
- package/dist/resources/audit.js.map +1 -1
- package/dist/resources/authorization-ceiling.d.ts +2 -2
- package/dist/resources/authorization-ceiling.d.ts.map +1 -1
- package/dist/resources/authorization-ceiling.js +8 -7
- package/dist/resources/authorization-ceiling.js.map +1 -1
- package/dist/resources/authorization-operation-ids.d.ts +1 -1
- package/dist/resources/authorization-operation-ids.d.ts.map +1 -1
- package/dist/resources/authorization-operation-ids.js +4 -2
- package/dist/resources/authorization-operation-ids.js.map +1 -1
- package/dist/resources/authorization.d.ts +53 -19
- package/dist/resources/authorization.d.ts.map +1 -1
- package/dist/resources/authorization.js +24 -6
- package/dist/resources/authorization.js.map +1 -1
- package/dist/resources/authorizations.d.ts +3 -5
- package/dist/resources/authorizations.d.ts.map +1 -1
- package/dist/resources/authorizations.js +4 -2
- package/dist/resources/authorizations.js.map +1 -1
- package/dist/resources/channels.d.ts +7 -7
- package/dist/resources/channels.d.ts.map +1 -1
- package/dist/resources/channels.js +10 -10
- package/dist/resources/channels.js.map +1 -1
- package/dist/resources/contracts.d.ts +2 -2
- package/dist/resources/contracts.d.ts.map +1 -1
- package/dist/resources/contracts.js +15 -14
- package/dist/resources/contracts.js.map +1 -1
- package/dist/resources/conversation-sessions.d.ts +19 -20
- package/dist/resources/conversation-sessions.d.ts.map +1 -1
- package/dist/resources/conversation-sessions.js +17 -22
- package/dist/resources/conversation-sessions.js.map +1 -1
- package/dist/resources/conversation.d.ts +4 -4
- package/dist/resources/conversation.d.ts.map +1 -1
- package/dist/resources/conversation.js +13 -11
- package/dist/resources/conversation.js.map +1 -1
- package/dist/resources/embedding-credentials.d.ts +3 -3
- package/dist/resources/embedding-credentials.d.ts.map +1 -1
- package/dist/resources/embedding-credentials.js +8 -6
- package/dist/resources/embedding-credentials.js.map +1 -1
- package/dist/resources/entities.d.ts +50 -32
- package/dist/resources/entities.d.ts.map +1 -1
- package/dist/resources/entities.js +51 -32
- package/dist/resources/entities.js.map +1 -1
- package/dist/resources/events.d.ts +4 -5
- package/dist/resources/events.d.ts.map +1 -1
- package/dist/resources/events.js +12 -11
- package/dist/resources/events.js.map +1 -1
- package/dist/resources/flows.d.ts +18 -15
- package/dist/resources/flows.d.ts.map +1 -1
- package/dist/resources/flows.js +41 -27
- package/dist/resources/flows.js.map +1 -1
- package/dist/resources/imports.d.ts.map +1 -1
- package/dist/resources/imports.js +1 -1
- package/dist/resources/imports.js.map +1 -1
- package/dist/resources/index.d.ts +3 -2
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +6 -2
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/llm-credentials.d.ts +21 -6
- package/dist/resources/llm-credentials.d.ts.map +1 -1
- package/dist/resources/llm-credentials.js +25 -10
- package/dist/resources/llm-credentials.js.map +1 -1
- package/dist/resources/llm-services.d.ts +8 -8
- package/dist/resources/llm-services.d.ts.map +1 -1
- package/dist/resources/llm-services.js +11 -9
- package/dist/resources/llm-services.js.map +1 -1
- package/dist/resources/mcp.d.ts.map +1 -1
- package/dist/resources/mcp.js +5 -3
- package/dist/resources/mcp.js.map +1 -1
- package/dist/resources/receipts.d.ts +1 -1
- package/dist/resources/receipts.d.ts.map +1 -1
- package/dist/resources/receipts.js +1 -1
- package/dist/resources/receipts.js.map +1 -1
- package/dist/resources/records.d.ts +1 -1
- package/dist/resources/records.d.ts.map +1 -1
- package/dist/resources/records.js +7 -5
- package/dist/resources/records.js.map +1 -1
- package/dist/resources/role-assignments.d.ts +4 -5
- package/dist/resources/role-assignments.d.ts.map +1 -1
- package/dist/resources/role-assignments.js +8 -7
- package/dist/resources/role-assignments.js.map +1 -1
- package/dist/resources/roles.d.ts +23 -23
- package/dist/resources/roles.d.ts.map +1 -1
- package/dist/resources/roles.js +20 -14
- package/dist/resources/roles.js.map +1 -1
- package/dist/resources/runtime-entities.d.ts +12 -9
- package/dist/resources/runtime-entities.d.ts.map +1 -1
- package/dist/resources/runtime-entities.js +5 -8
- package/dist/resources/runtime-entities.js.map +1 -1
- package/dist/resources/state-machine.d.ts +6 -12
- package/dist/resources/state-machine.d.ts.map +1 -1
- package/dist/resources/state-machine.js +17 -21
- package/dist/resources/state-machine.js.map +1 -1
- package/dist/resources/system.d.ts.map +1 -1
- package/dist/resources/system.js +5 -5
- package/dist/resources/system.js.map +1 -1
- package/dist/resources/tools.d.ts +2 -2
- package/dist/resources/tools.d.ts.map +1 -1
- package/dist/resources/tools.js +7 -5
- package/dist/resources/tools.js.map +1 -1
- package/dist/resources/traces.d.ts +1 -7
- package/dist/resources/traces.d.ts.map +1 -1
- package/dist/resources/traces.js +4 -29
- package/dist/resources/traces.js.map +1 -1
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +21 -17
- package/dist/runtime/index.js.map +1 -1
- package/dist/types/actions.d.ts +7 -8
- package/dist/types/actions.d.ts.map +1 -1
- package/dist/types/actions.js +4 -2
- package/dist/types/actions.js.map +1 -1
- package/dist/types/audit.d.ts +5 -7
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +6 -6
- package/dist/types/audit.js.map +1 -1
- package/dist/types/channels.d.ts +1 -1
- package/dist/types/channels.d.ts.map +1 -1
- package/dist/types/channels.js +5 -3
- package/dist/types/channels.js.map +1 -1
- package/dist/types/collections-contract.d.ts +50 -0
- package/dist/types/collections-contract.d.ts.map +1 -0
- package/dist/types/collections-contract.js +22 -0
- package/dist/types/collections-contract.js.map +1 -0
- package/dist/types/confirmation.d.ts +4 -4
- package/dist/types/confirmation.d.ts.map +1 -1
- package/dist/types/confirmation.js +6 -4
- package/dist/types/confirmation.js.map +1 -1
- package/dist/types/contracts.d.ts +12 -15
- package/dist/types/contracts.d.ts.map +1 -1
- package/dist/types/contracts.js +5 -4
- package/dist/types/contracts.js.map +1 -1
- package/dist/types/conversation-sessions.d.ts +1 -1
- package/dist/types/conversation-sessions.d.ts.map +1 -1
- package/dist/types/conversation-sessions.js +3 -1
- package/dist/types/conversation-sessions.js.map +1 -1
- package/dist/types/conversation.d.ts +13 -40
- package/dist/types/conversation.d.ts.map +1 -1
- package/dist/types/entities.d.ts +52 -16
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/entities.js +12 -0
- package/dist/types/entities.js.map +1 -1
- package/dist/types/events-stream.d.ts +2 -2
- package/dist/types/events-stream.d.ts.map +1 -1
- package/dist/types/events-stream.js +6 -4
- package/dist/types/events-stream.js.map +1 -1
- package/dist/types/flows-contract.d.ts +28 -7
- package/dist/types/flows-contract.d.ts.map +1 -1
- package/dist/types/flows-contract.js +11 -4
- package/dist/types/flows-contract.js.map +1 -1
- package/dist/types/flows.d.ts +27 -58
- package/dist/types/flows.d.ts.map +1 -1
- package/dist/types/flows.js +8 -20
- package/dist/types/flows.js.map +1 -1
- package/dist/types/imports.d.ts +9 -0
- package/dist/types/imports.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/locale.d.ts +2 -2
- package/dist/types/locale.d.ts.map +1 -1
- package/dist/types/locale.js +4 -2
- package/dist/types/locale.js.map +1 -1
- package/dist/types/mcp-and-events-contract.d.ts +51 -0
- package/dist/types/mcp-and-events-contract.d.ts.map +1 -0
- package/dist/types/mcp-and-events-contract.js +20 -0
- package/dist/types/mcp-and-events-contract.js.map +1 -0
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +3 -1
- package/dist/types/mcp.js.map +1 -1
- package/dist/types/platform.d.ts +12 -12
- package/dist/types/platform.d.ts.map +1 -1
- package/dist/types/platform.js +0 -1
- package/dist/types/platform.js.map +1 -1
- package/dist/types/receipt.d.ts +3 -5
- package/dist/types/receipt.d.ts.map +1 -1
- package/dist/types/receipt.js +5 -5
- package/dist/types/receipt.js.map +1 -1
- package/dist/types/records.d.ts +3 -3
- package/dist/types/records.d.ts.map +1 -1
- package/dist/types/records.js +2 -0
- package/dist/types/records.js.map +1 -1
- package/dist/types/spec.d.ts +2 -2
- package/dist/types/spec.d.ts.map +1 -1
- package/dist/types/state-machine.d.ts +48 -84
- package/dist/types/state-machine.d.ts.map +1 -1
- package/dist/types/state-machine.js +9 -4
- package/dist/types/state-machine.js.map +1 -1
- package/dist/types/system.d.ts.map +1 -1
- package/dist/types/tools.d.ts +36 -28
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/types/tools.js +6 -6
- package/dist/types/tools.js.map +1 -1
- package/dist/types/traces.d.ts +6 -9
- package/dist/types/traces.d.ts.map +1 -1
- package/dist/types/traces.js +5 -5
- package/dist/types/traces.js.map +1 -1
- package/dist/types/treatment-contract.d.ts +70 -0
- package/dist/types/treatment-contract.d.ts.map +1 -0
- package/dist/types/treatment-contract.js +20 -0
- package/dist/types/treatment-contract.js.map +1 -0
- package/dist/types/workflows.d.ts +14 -0
- package/dist/types/workflows.d.ts.map +1 -1
- package/dist/types/workflows.js +7 -6
- package/dist/types/workflows.js.map +1 -1
- package/package.json +93 -96
- package/dist/contract/governance.d.ts +0 -6
- package/dist/contract/governance.d.ts.map +0 -1
- package/dist/contract/governance.js +0 -17
- package/dist/contract/governance.js.map +0 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACxF,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG/D,YAAY,EACR,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACxB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACR,qBAAqB,EACrB,UAAU,EACV,uBAAuB,EACvB,iBAAiB,EACjB,2BAA2B,GAC9B,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACR,oBAAoB,EACpB,6BAA6B,GAChC,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACR,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACR,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,cAAc,EACd,qBAAqB,E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AAC;AAG/E,YAAY,EACR,YAAY,EACZ,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,GAC1B,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isConversationTurnCreatedEvent = exports.CONTRACT_SECTION_NAMES = exports.ChannelsResource = exports.ZarelTimeoutError = exports.ZarelAuthError = exports.ZarelAPIError = exports.ZarelError = exports.ContractAgentRoots = exports.ContractNamespace = exports.RuntimeNamespace = exports.Zarel = void 0;
|
|
3
|
+
exports.isConversationTurnCreatedEvent = exports.grantQualifiers = exports.CONTRACT_SECTION_NAMES = exports.ChannelsResource = exports.ZarelTimeoutError = exports.ZarelAuthError = exports.ZarelAPIError = exports.ZarelError = exports.ContractAgentRoots = exports.ContractNamespace = exports.RuntimeNamespace = exports.Zarel = void 0;
|
|
4
|
+
// SPDX-License-Identifier: MIT
|
|
5
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
6
|
// ── Main client ─────────────────────────────────────────────────────────
|
|
5
7
|
var client_1 = require("./client");
|
|
6
8
|
Object.defineProperty(exports, "Zarel", { enumerable: true, get: function () { return client_1.Zarel; } });
|
|
7
|
-
// ──
|
|
9
|
+
// ── Plane namespaces (for advanced consumer typing) ─────────────────────
|
|
8
10
|
var runtime_1 = require("./runtime");
|
|
9
11
|
Object.defineProperty(exports, "RuntimeNamespace", { enumerable: true, get: function () { return runtime_1.RuntimeNamespace; } });
|
|
10
12
|
var contract_1 = require("./contract");
|
|
@@ -17,11 +19,13 @@ Object.defineProperty(exports, "ZarelError", { enumerable: true, get: function (
|
|
|
17
19
|
Object.defineProperty(exports, "ZarelAPIError", { enumerable: true, get: function () { return errors_1.ZarelAPIError; } });
|
|
18
20
|
Object.defineProperty(exports, "ZarelAuthError", { enumerable: true, get: function () { return errors_1.ZarelAuthError; } });
|
|
19
21
|
Object.defineProperty(exports, "ZarelTimeoutError", { enumerable: true, get: function () { return errors_1.ZarelTimeoutError; } });
|
|
20
|
-
//
|
|
22
|
+
// Channel-ops DTOs + resource.
|
|
21
23
|
var channels_1 = require("./resources/channels");
|
|
22
24
|
Object.defineProperty(exports, "ChannelsResource", { enumerable: true, get: function () { return channels_1.ChannelsResource; } });
|
|
23
25
|
var tools_1 = require("./types/tools");
|
|
24
26
|
Object.defineProperty(exports, "CONTRACT_SECTION_NAMES", { enumerable: true, get: function () { return tools_1.CONTRACT_SECTION_NAMES; } });
|
|
27
|
+
var authorization_1 = require("./resources/authorization");
|
|
28
|
+
Object.defineProperty(exports, "grantQualifiers", { enumerable: true, get: function () { return authorization_1.grantQualifiers; } });
|
|
25
29
|
var events_stream_1 = require("./types/events-stream");
|
|
26
30
|
Object.defineProperty(exports, "isConversationTurnCreatedEvent", { enumerable: true, get: function () { return events_stream_1.isConversationTurnCreatedEvent; } });
|
|
27
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2EAA2E;AAC3E,mCAAiC;AAAxB,+FAAA,KAAK,OAAA;AAGd,2EAA2E;AAC3E,qCAA6C;AAApC,2GAAA,gBAAgB,OAAA;AACzB,uCAA+C;AAAtC,6GAAA,iBAAiB,OAAA;AAC1B,0CAAsD;AAA7C,2GAAA,kBAAkB,OAAA;AAE3B,2EAA2E;AAC3E,mCAAwF;AAA/E,oGAAA,UAAU,OAAA;AAAE,uGAAA,aAAa,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAcrE,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,2EAA2E;AAC3E,mCAAiC;AAAxB,+FAAA,KAAK,OAAA;AAGd,2EAA2E;AAC3E,qCAA6C;AAApC,2GAAA,gBAAgB,OAAA;AACzB,uCAA+C;AAAtC,6GAAA,iBAAiB,OAAA;AAC1B,0CAAsD;AAA7C,2GAAA,kBAAkB,OAAA;AAE3B,2EAA2E;AAC3E,mCAAwF;AAA/E,oGAAA,UAAU,OAAA;AAAE,uGAAA,aAAa,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAcrE,+BAA+B;AAC/B,iDAAwD;AAA/C,4GAAA,gBAAgB,OAAA;AAwCzB,uCAAuD;AAA9C,+GAAA,sBAAsB,OAAA;AAiG/B,2DAA4D;AAAnD,gHAAA,eAAe,OAAA;AAgBxB,uDAAuE;AAA9D,+HAAA,8BAA8B,OAAA"}
|
|
@@ -3,12 +3,11 @@ import type { ActionDispatchParams, ActionDispatchSuccessResponse } from '../typ
|
|
|
3
3
|
import type { ConfirmationRetryOptions } from '../types/confirmation';
|
|
4
4
|
export type { ActionDispatchParams, ActionDispatchSuccessResponse };
|
|
5
5
|
/**
|
|
6
|
-
* Dispatch surface for YAML-declared `action.<name>` intents
|
|
6
|
+
* Dispatch surface for YAML-declared `action.<name>` intents.
|
|
7
7
|
*
|
|
8
|
-
* Backs the `POST /runtime/actions/:name` route. The
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* effects through the existing entity-intent path.
|
|
8
|
+
* Backs the `POST /runtime/actions/:name` route. The server runs the action as
|
|
9
|
+
* the entity operation it declares, with the same authorization, validation,
|
|
10
|
+
* state-machine checks and side effects as a direct entity write.
|
|
12
11
|
*
|
|
13
12
|
* Errors surface as `ZarelAPIError` with `code` set to one of:
|
|
14
13
|
* `unknown_action` (404) — action name not in tenant contract
|
|
@@ -16,7 +15,7 @@ export type { ActionDispatchParams, ActionDispatchSuccessResponse };
|
|
|
16
15
|
* `precondition_failed` (422) — YAML preconditions evaluated false
|
|
17
16
|
* `validation_error` (400) — payload schema mismatch
|
|
18
17
|
* `confirmation_required` (409) — a `confirm` guard paused the write; the
|
|
19
|
-
* error carries `confirmation`
|
|
18
|
+
* error carries `confirmation`
|
|
20
19
|
*/
|
|
21
20
|
export declare class ActionsResource {
|
|
22
21
|
private readonly client;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/resources/actions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/resources/actions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,YAAY,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,CAAC;AAEpE;;;;;;;;;;;;;;GAcG;AACH,qBAAa,eAAe;IACZ,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD;;;;;;OAMG;IACG,QAAQ,CACV,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE,wBAAwB,GACnC,OAAO,CAAC,6BAA6B,CAAC;CAkB5C"}
|
|
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ActionsResource = void 0;
|
|
4
4
|
const confirmation_1 = require("../_internal/confirmation");
|
|
5
5
|
/**
|
|
6
|
-
* Dispatch surface for YAML-declared `action.<name>` intents
|
|
6
|
+
* Dispatch surface for YAML-declared `action.<name>` intents.
|
|
7
7
|
*
|
|
8
|
-
* Backs the `POST /runtime/actions/:name` route. The
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* effects through the existing entity-intent path.
|
|
8
|
+
* Backs the `POST /runtime/actions/:name` route. The server runs the action as
|
|
9
|
+
* the entity operation it declares, with the same authorization, validation,
|
|
10
|
+
* state-machine checks and side effects as a direct entity write.
|
|
12
11
|
*
|
|
13
12
|
* Errors surface as `ZarelAPIError` with `code` set to one of:
|
|
14
13
|
* `unknown_action` (404) — action name not in tenant contract
|
|
@@ -16,7 +15,7 @@ const confirmation_1 = require("../_internal/confirmation");
|
|
|
16
15
|
* `precondition_failed` (422) — YAML preconditions evaluated false
|
|
17
16
|
* `validation_error` (400) — payload schema mismatch
|
|
18
17
|
* `confirmation_required` (409) — a `confirm` guard paused the write; the
|
|
19
|
-
* error carries `confirmation`
|
|
18
|
+
* error carries `confirmation`
|
|
20
19
|
*/
|
|
21
20
|
class ActionsResource {
|
|
22
21
|
client;
|
|
@@ -34,8 +33,8 @@ class ActionsResource {
|
|
|
34
33
|
const body = {};
|
|
35
34
|
if (params?.record_id !== undefined)
|
|
36
35
|
body.record_id = params.record_id;
|
|
37
|
-
//
|
|
38
|
-
// still forwarded for the react confirm dialog
|
|
36
|
+
// `notes` is not in the published schema and is ignored by the runtime;
|
|
37
|
+
// still forwarded for the react confirm dialog.
|
|
39
38
|
if (params?.notes !== undefined)
|
|
40
39
|
body.notes = params.notes;
|
|
41
40
|
if (params?.payload !== undefined)
|
|
@@ -43,9 +42,9 @@ class ActionsResource {
|
|
|
43
42
|
if (params?.idempotency_key !== undefined)
|
|
44
43
|
body.idempotency_key = params.idempotency_key;
|
|
45
44
|
// The dispatch response carries `resolved_via_action` ALONGSIDE the
|
|
46
|
-
// {success,data} envelope, so opt out of the transport unwrap
|
|
45
|
+
// {success,data} envelope, so opt out of the transport unwrap and
|
|
47
46
|
// return the full envelope body as ActionDispatchSuccessResponse.
|
|
48
|
-
return this.client.post(`/runtime/actions/${encodeURIComponent(actionName)}`, body, { operationId: 'dispatchAction', headers: (0, confirmation_1.confirmationHeaders)(options?.confirmationToken) });
|
|
47
|
+
return await this.client.post(`/runtime/actions/${encodeURIComponent(actionName)}`, body, { operationId: 'dispatchAction', headers: (0, confirmation_1.confirmationHeaders)(options?.confirmationToken) });
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
exports.ActionsResource = ActionsResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/resources/actions.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/resources/actions.ts"],"names":[],"mappings":";;;AAGA,4DAAgE;AAMhE;;;;;;;;;;;;;;GAcG;AACH,MAAa,eAAe;IACK;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CACV,UAAkB,EAClB,MAA6B,EAC7B,OAAkC;QAElC,MAAM,IAAI,GAA4B,EAAE,CAAC;QACzC,IAAI,MAAM,EAAE,SAAS,KAAK,SAAS;YAAE,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QACvE,wEAAwE;QACxE,gDAAgD;QAChD,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC3D,IAAI,MAAM,EAAE,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QACjE,IAAI,MAAM,EAAE,eAAe,KAAK,SAAS;YAAE,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QAEzF,oEAAoE;QACpE,kEAAkE;QAClE,kEAAkE;QAClE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACzB,oBAAoB,kBAAkB,CAAC,UAAU,CAAC,EAAE,EACpD,IAAI,EACJ,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAA,kCAAmB,EAAC,OAAO,EAAE,iBAAiB,CAAC,EAAE,CAC9F,CAAC;IACN,CAAC;CACJ;AAhCD,0CAgCC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { FetchClient } from '../_internal/fetch-client';
|
|
2
2
|
import { PagePromise } from '../_internal/pagination';
|
|
3
3
|
import type { BindingViolationAuditRow, TopicRefusalAuditRow, BindingViolationAuditListParams, TopicRefusalAuditListParams, AuditListResponse } from '../types/audit';
|
|
4
|
-
/** The event logs that carry an audit hash-chain
|
|
4
|
+
/** The event logs that carry an audit hash-chain. */
|
|
5
5
|
export type AuditLogName = 'state_machine' | 'flows';
|
|
6
6
|
/**
|
|
7
|
-
* Optional inclusive `seq` range to bound the exported chain
|
|
8
|
-
*
|
|
7
|
+
* Optional inclusive `seq` range to bound the exported chain. Use it to
|
|
8
|
+
* narrow a large log — a request whose selected range
|
|
9
9
|
* exceeds the server's per-bundle event cap is refused with HTTP 413.
|
|
10
10
|
*/
|
|
11
11
|
export interface AuditEvidenceRange {
|
|
@@ -13,13 +13,13 @@ export interface AuditEvidenceRange {
|
|
|
13
13
|
readonly to?: number;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Audit tamper-evidence resource
|
|
16
|
+
* Audit tamper-evidence resource.
|
|
17
17
|
*
|
|
18
18
|
* client.audit.evidence(log) → GET /runtime/audit/{log}/evidence
|
|
19
19
|
* client.audit.evidence(log, {from,to}) → …?from=&to= (bounded slice)
|
|
20
20
|
*
|
|
21
21
|
* Downloads a signed evidence bundle (the event hash-chain + covering signed
|
|
22
|
-
* checkpoints + any external RFC 3161 TSA anchors over them
|
|
22
|
+
* checkpoints + any external RFC 3161 TSA anchors over them + a signed
|
|
23
23
|
* manifest) for offline verification with `zarel verify`. Mirrors
|
|
24
24
|
* `traces.bundle()` — the body is a binary `application/gzip` stream, so it
|
|
25
25
|
* returns a generic `ArrayBuffer` the caller writes to disk. The anchors ride
|
|
@@ -29,7 +29,7 @@ export declare class AuditResource {
|
|
|
29
29
|
private readonly client;
|
|
30
30
|
constructor(client: FetchClient);
|
|
31
31
|
/**
|
|
32
|
-
* List rows of a privacy-preserving audit row-table
|
|
32
|
+
* List rows of a privacy-preserving audit row-table:
|
|
33
33
|
*
|
|
34
34
|
* client.runtime.audit.list('binding_violations', { entity }) → GET /runtime/audit/binding_violations?…
|
|
35
35
|
* client.runtime.audit.list('topic_refusals', { category }) → GET /runtime/audit/topic_refusals?…
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/resources/audit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/resources/audit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAgC,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAER,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,2BAA2B,EAC3B,iBAAiB,EACpB,MAAM,gBAAgB,CAAC;AAExB,qDAAqD;AACrD,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,OAAO,CAAC;AAKrD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,aAAa;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEvD;;;;;;;;;;;;OAYG;IACI,IAAI,CACP,GAAG,EAAE,oBAAoB,EACzB,MAAM,CAAC,EAAE,+BAA+B,EACxC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACnC,WAAW,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IAC9E,IAAI,CACP,GAAG,EAAE,gBAAgB,EACrB,MAAM,CAAC,EAAE,2BAA2B,EACpC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACnC,WAAW,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAuChE,QAAQ,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;CAO7F"}
|
package/dist/resources/audit.js
CHANGED
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AuditResource = void 0;
|
|
4
4
|
const pagination_1 = require("../_internal/pagination");
|
|
5
5
|
/**
|
|
6
|
-
* Audit tamper-evidence resource
|
|
6
|
+
* Audit tamper-evidence resource.
|
|
7
7
|
*
|
|
8
8
|
* client.audit.evidence(log) → GET /runtime/audit/{log}/evidence
|
|
9
9
|
* client.audit.evidence(log, {from,to}) → …?from=&to= (bounded slice)
|
|
10
10
|
*
|
|
11
11
|
* Downloads a signed evidence bundle (the event hash-chain + covering signed
|
|
12
|
-
* checkpoints + any external RFC 3161 TSA anchors over them
|
|
12
|
+
* checkpoints + any external RFC 3161 TSA anchors over them + a signed
|
|
13
13
|
* manifest) for offline verification with `zarel verify`. Mirrors
|
|
14
14
|
* `traces.bundle()` — the body is a binary `application/gzip` stream, so it
|
|
15
15
|
* returns a generic `ArrayBuffer` the caller writes to disk. The anchors ride
|
|
@@ -57,29 +57,7 @@ class AuditResource {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
async evidence(log, range) {
|
|
60
|
-
|
|
61
|
-
if (range?.from !== undefined)
|
|
62
|
-
qs.push(`from=${encodeURIComponent(String(range.from))}`);
|
|
63
|
-
if (range?.to !== undefined)
|
|
64
|
-
qs.push(`to=${encodeURIComponent(String(range.to))}`);
|
|
65
|
-
const query = qs.length > 0 ? `?${qs.join('&')}` : '';
|
|
66
|
-
const path = `/runtime/audit/${encodeURIComponent(log)}/evidence${query}`;
|
|
67
|
-
const client = this.client;
|
|
68
|
-
if (client !== null
|
|
69
|
-
&& typeof client === 'object'
|
|
70
|
-
&& 'fetchRaw' in client
|
|
71
|
-
&& typeof client.fetchRaw === 'function') {
|
|
72
|
-
const fetchRaw = client.fetchRaw;
|
|
73
|
-
const res = await fetchRaw(path);
|
|
74
|
-
if (!res.ok) {
|
|
75
|
-
throw new Error(`Audit evidence download failed (status ${res.status})`);
|
|
76
|
-
}
|
|
77
|
-
return res.arrayBuffer();
|
|
78
|
-
}
|
|
79
|
-
const got = await this.client.get(path, undefined, { operationId: 'getAuditEvidenceBundle' });
|
|
80
|
-
if (got instanceof ArrayBuffer)
|
|
81
|
-
return got;
|
|
82
|
-
throw new Error('FetchClient does not support binary downloads — wire `fetchRaw(path)` on your custom client.');
|
|
60
|
+
return await this.client.getBinary(`/runtime/audit/${encodeURIComponent(log)}/evidence`, { from: range?.from, to: range?.to }, { operationId: 'getAuditEvidenceBundle' });
|
|
83
61
|
}
|
|
84
62
|
}
|
|
85
63
|
exports.AuditResource = AuditResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/resources/audit.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/resources/audit.ts"],"names":[],"mappings":";;;AAGA,wDAAoF;AA0BpF;;;;;;;;;;;;GAYG;AACH,MAAa,aAAa;IACc;IAApC,YAAoC,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAyBpD,IAAI,CACP,GAAoB,EACpB,MAA2B,EAC3B,OAAkC;QAElC,MAAM,IAAI,GAAG,kBAAkB,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;QACzD,MAAM,UAAU,GAAG,CAAC,MAAe,EAAE,KAAc,EAAyD,EAAE;YAC1G,MAAM,KAAK,GAA0D,EAAE,CAAC;YACxE,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS;gBAAE,KAAK,CAAC,IA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CAAC,EAAE,CAAC;SAChC,CAAC,CAAC;QAEP,OAAO,IAAI,wBAAW,CAClB,SAAS,EACT,IAAA,wBAAW,EAA8C,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAC1G;YACI,GAAG,CAAC,MAAM,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrE,CACJ,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,GAAiB,EAAE,KAA0B;QAC/D,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAC9B,kBAAkB,kBAAkB,CAAC,GAAG,CAAC,WAAW,EACpD,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EACpC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAC5C,CAAC;IACN,CAAC;CACJ;AAvED,sCAuEC"}
|
|
@@ -5,7 +5,7 @@ export interface EnvelopeGrant {
|
|
|
5
5
|
/** Section name for kind='section'; null for kind='system'. */
|
|
6
6
|
readonly target: string | null;
|
|
7
7
|
readonly action: string;
|
|
8
|
-
/** Bounds only (
|
|
8
|
+
/** Bounds only (system grants) — not part of grant identity. */
|
|
9
9
|
readonly conditions?: unknown;
|
|
10
10
|
}
|
|
11
11
|
export interface OwnerCeilingEnvelope {
|
|
@@ -18,7 +18,7 @@ export declare class AuthorizationCeilingResource {
|
|
|
18
18
|
/**
|
|
19
19
|
* GET /contract/authorizations/ceiling — the tenant's owner/ceiling envelope.
|
|
20
20
|
* This endpoint returns the BARE `{ownerRoleNames, grants}` body (no
|
|
21
|
-
* {success,data} wrapper), so it opts out of the transport unwrap
|
|
21
|
+
* {success,data} wrapper), so it opts out of the transport unwrap.
|
|
22
22
|
*/
|
|
23
23
|
get(): Promise<OwnerCeilingEnvelope>;
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-ceiling.d.ts","sourceRoot":"","sources":["../../src/resources/authorization-ceiling.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authorization-ceiling.d.ts","sourceRoot":"","sources":["../../src/resources/authorization-ceiling.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACjD;AAED,qBAAa,4BAA4B;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD;;;;OAIG;IACG,GAAG,IAAI,OAAO,CAAC,oBAAoB,CAAC;CAO7C"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
|
+
// Owner/ceiling envelope introspection.
|
|
3
5
|
//
|
|
4
6
|
// Read-only mirror of `GET /contract/authorizations/ceiling`. The envelope is
|
|
5
|
-
// the
|
|
6
|
-
// hold — the ceiling
|
|
7
|
-
//
|
|
8
|
-
// the SDK only reads it.
|
|
7
|
+
// the tenant's owner role names + the contract-section/system grants they
|
|
8
|
+
// hold — the ceiling a UI can compare other roles' grants against. The server
|
|
9
|
+
// computes it; the SDK only reads it.
|
|
9
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
11
|
exports.AuthorizationCeilingResource = void 0;
|
|
11
12
|
class AuthorizationCeilingResource {
|
|
@@ -16,10 +17,10 @@ class AuthorizationCeilingResource {
|
|
|
16
17
|
/**
|
|
17
18
|
* GET /contract/authorizations/ceiling — the tenant's owner/ceiling envelope.
|
|
18
19
|
* This endpoint returns the BARE `{ownerRoleNames, grants}` body (no
|
|
19
|
-
* {success,data} wrapper), so it opts out of the transport unwrap
|
|
20
|
+
* {success,data} wrapper), so it opts out of the transport unwrap.
|
|
20
21
|
*/
|
|
21
22
|
async get() {
|
|
22
|
-
return this.client.get('/contract/authorizations/ceiling', undefined, { operationId: 'getAuthorizationCeiling' });
|
|
23
|
+
return await this.client.get('/contract/authorizations/ceiling', undefined, { operationId: 'getAuthorizationCeiling' });
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
exports.AuthorizationCeilingResource = AuthorizationCeilingResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-ceiling.js","sourceRoot":"","sources":["../../src/resources/authorization-ceiling.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"authorization-ceiling.js","sourceRoot":"","sources":["../../src/resources/authorization-ceiling.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,wCAAwC;AACxC,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,8EAA8E;AAC9E,sCAAsC;;;AAoBtC,MAAa,4BAA4B;IACR;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD;;;;OAIG;IACH,KAAK,CAAC,GAAG;QACL,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACxB,kCAAkC,EAClC,SAAS,EACT,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAC7C,CAAC;IACN,CAAC;CACJ;AAfD,oEAeC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The operationId suffix for an on-path — mirrors the OpenAPI generator exactly.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* The operationId is the SINGLE unwrap authority, so every call
|
|
5
5
|
* must name its operation. The SDK carries zero runtime dependencies, so it
|
|
6
6
|
* cannot import the canonical derivation from `@zarel-ai/contract`; it mirrors
|
|
7
7
|
* it here instead, and `authorization-operation-ids.test.ts` asserts every
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-operation-ids.d.ts","sourceRoot":"","sources":["../../src/resources/authorization-operation-ids.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authorization-operation-ids.d.ts","sourceRoot":"","sources":["../../src/resources/authorization-operation-ids.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUnE"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.authorizationOperationSuffix = authorizationOperationSuffix;
|
|
4
|
+
// SPDX-License-Identifier: MIT
|
|
5
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
6
|
/**
|
|
5
7
|
* The operationId suffix for an on-path — mirrors the OpenAPI generator exactly.
|
|
6
8
|
*
|
|
7
|
-
*
|
|
9
|
+
* The operationId is the SINGLE unwrap authority, so every call
|
|
8
10
|
* must name its operation. The SDK carries zero runtime dependencies, so it
|
|
9
11
|
* cannot import the canonical derivation from `@zarel-ai/contract`; it mirrors
|
|
10
12
|
* it here instead, and `authorization-operation-ids.test.ts` asserts every
|
|
@@ -24,7 +26,7 @@ function authorizationOperationSuffix(onPath) {
|
|
|
24
26
|
const pascal = onPath
|
|
25
27
|
.split(/[^a-zA-Z0-9]+/)
|
|
26
28
|
.filter(Boolean)
|
|
27
|
-
.map((w) => w
|
|
29
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
28
30
|
.join('');
|
|
29
31
|
return `On${pascal}`;
|
|
30
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-operation-ids.js","sourceRoot":"","sources":["../../src/resources/authorization-operation-ids.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"authorization-operation-ids.js","sourceRoot":"","sources":["../../src/resources/authorization-operation-ids.ts"],"names":[],"mappings":";;AAeA,oEAUC;AAzBD,+BAA+B;AAC/B,gCAAgC;AAChC;;;;;;;;;;;;GAYG;AACH,SAAgB,4BAA4B,CAAC,MAAc;IACvD,IAAI,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,UAAU,CAAC;IACrD,IAAI,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IACjD,IAAI,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC;QAAE,OAAO,cAAc,CAAC;IAC9D,MAAM,MAAM,GAAG,MAAM;SAChB,KAAK,CAAC,eAAe,CAAC;SACtB,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAClD,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,OAAO,KAAK,MAAM,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -1,25 +1,59 @@
|
|
|
1
1
|
import { type FetchClient } from '../_internal/fetch-client';
|
|
2
2
|
import type { LocaleOptions } from '../types/locale';
|
|
3
|
+
import type { GrantCreatePayload, GrantQualifiersConfigPayload, GrantQualifiersFlowsPayload, GrantQualifiersLlmServicesPayload, GrantQualifiersRecordsPayload, GrantStatementConfigPayload, GrantStatementFlowsPayload, GrantStatementLlmServicesPayload, GrantStatementRecordsPayload } from '../generated';
|
|
3
4
|
/**
|
|
4
|
-
* The authorization surface
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* a
|
|
5
|
+
* The authorization surface.
|
|
6
|
+
*
|
|
7
|
+
* The HTTP surface is one path-addressed resource, so the SDK is one resource too.
|
|
8
|
+
*
|
|
9
|
+
* The on-path is NOT passed through `encodeURIComponent`: it travels as real path
|
|
10
|
+
* segments, and an encoded `%2F` is decoded by the server before routing.
|
|
11
|
+
* `{role}` is encoded: it is a single segment and a user-supplied value.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* A grant statement: a bare action, or one attenuated by `fields` / `scope` / `when`.
|
|
15
|
+
*
|
|
16
|
+
* DERIVED from the published grant schemas, so the action vocabulary is closed: a misspelled
|
|
17
|
+
* action does not type-check.
|
|
18
|
+
*
|
|
19
|
+
* A UNION OF THE FOUR FAMILIES rather than a per-family type, because `put`/`patch` take the
|
|
20
|
+
* on-path as a `string` that the caller computes, and a type cannot narrow on a value it has
|
|
21
|
+
* not seen. So this closes the ACTION vocabulary; which of the four families an on-path admits
|
|
22
|
+
* is decided by the server.
|
|
23
|
+
*/
|
|
24
|
+
export type AuthorizationStatement = GrantStatementConfigPayload | GrantStatementRecordsPayload | GrantStatementFlowsPayload | GrantStatementLlmServicesPayload;
|
|
25
|
+
/**
|
|
26
|
+
* The `POST` body — one published branch per family, so the DOCUMENT states which actions pair
|
|
27
|
+
* with which on-path and refuses a body that mixes them.
|
|
28
|
+
*
|
|
29
|
+
* TYPESCRIPT DOES NOT FOLLOW THE PAIRING: `{on: 'entities', actions: ['create']}` compiles.
|
|
30
|
+
* Only the config branch pins `on` (to the `ContractSectionName` enum); the three operational
|
|
31
|
+
* branches publish it as a `pattern`, which openapi-typescript renders as a bare `string` — so a
|
|
32
|
+
* mismatched body fails the config branch and is then admitted by the records one. The rule is
|
|
33
|
+
* enforced by the server, not by the caller's compiler; `authorization-statement-typing.test.ts`
|
|
34
|
+
* pins this behaviour.
|
|
35
|
+
*
|
|
36
|
+
* What the type DOES close is the statement vocabulary — see {@link AuthorizationStatement}.
|
|
37
|
+
*/
|
|
38
|
+
export type AuthorizationGrantCreate = GrantCreatePayload;
|
|
39
|
+
/**
|
|
40
|
+
* Every qualifier any family admits, as an INTERSECTION of the four published bags.
|
|
41
|
+
*
|
|
42
|
+
* All four declare their properties optional, so `{when?} & {fields?, when?} & {scope?}` is
|
|
43
|
+
* inhabited by each of them and by nothing wider — it is the read type a caller holding a
|
|
44
|
+
* statement of unknown family actually has. Derived, not restated.
|
|
45
|
+
*/
|
|
46
|
+
export type AuthorizationQualifiers = GrantQualifiersConfigPayload & GrantQualifiersRecordsPayload & GrantQualifiersFlowsPayload & GrantQualifiersLlmServicesPayload;
|
|
47
|
+
/**
|
|
48
|
+
* The qualifiers attenuating a statement, or `undefined` for a bare action.
|
|
49
|
+
*
|
|
50
|
+
* `Object.values(statement)[0]` does not keep its type: the object arm of each closed
|
|
51
|
+
* per-family type is `{use?: Q}`, which does not match `Object.values`' index-signature
|
|
52
|
+
* overload, so it falls through to the `{}` one and returns `any[]`. This helper reads the
|
|
53
|
+
* qualifier bag with its type intact, so no call site needs a cast (a cast would silence the
|
|
54
|
+
* `any` instead of removing it).
|
|
16
55
|
*/
|
|
17
|
-
|
|
18
|
-
export type AuthorizationStatement = string | Readonly<Record<string, {
|
|
19
|
-
readonly fields?: ReadonlyArray<string>;
|
|
20
|
-
readonly scope?: ReadonlyArray<'contract' | 'runtime'>;
|
|
21
|
-
readonly when?: Readonly<Record<string, unknown>>;
|
|
22
|
-
}>>;
|
|
56
|
+
export declare function grantQualifiers(statement: AuthorizationStatement): AuthorizationQualifiers | undefined;
|
|
23
57
|
/** The permissions a role holds on one on-path — the addressable unit. */
|
|
24
58
|
export interface AuthorizationGrant {
|
|
25
59
|
/** e.g. `entities`, `channels`, `records/orders`, `llm/services/primary`. */
|
|
@@ -47,7 +81,7 @@ export declare class AuthorizationResource {
|
|
|
47
81
|
/** Read one grant. */
|
|
48
82
|
get(role: string, onPath: string, options?: LocaleOptions): Promise<AuthorizationGrant>;
|
|
49
83
|
/** Create a grant. Rejects with 409 when one already exists on that on-path — use {@link put} to replace. */
|
|
50
|
-
create(role: string, grant:
|
|
84
|
+
create(role: string, grant: AuthorizationGrantCreate): Promise<AuthorizationGrant>;
|
|
51
85
|
/** Create or replace a grant. Idempotent. */
|
|
52
86
|
put(role: string, onPath: string, actions: ReadonlyArray<AuthorizationStatement>): Promise<AuthorizationGrant>;
|
|
53
87
|
/** Merge actions into an existing grant — adds or re-attenuates, never drops. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization.d.ts","sourceRoot":"","sources":["../../src/resources/authorization.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authorization.d.ts","sourceRoot":"","sources":["../../src/resources/authorization.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAA0B,MAAM,2BAA2B,CAAC;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EACR,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,iCAAiC,EACjC,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,gCAAgC,EAChC,4BAA4B,EAC/B,MAAM,cAAc,CAAC;AAGtB;;;;;;;;GA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,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAIxF,6CAA6C;IACvC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAMpH,iFAAiF;IAC3E,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAMtH,+BAA+B;IACzB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAKjF"}
|
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthorizationResource = void 0;
|
|
4
|
+
exports.grantQualifiers = grantQualifiers;
|
|
5
|
+
// SPDX-License-Identifier: MIT
|
|
6
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
7
|
const fetch_client_1 = require("../_internal/fetch-client");
|
|
5
8
|
const authorization_operation_ids_1 = require("./authorization-operation-ids");
|
|
9
|
+
/**
|
|
10
|
+
* The qualifiers attenuating a statement, or `undefined` for a bare action.
|
|
11
|
+
*
|
|
12
|
+
* `Object.values(statement)[0]` does not keep its type: the object arm of each closed
|
|
13
|
+
* per-family type is `{use?: Q}`, which does not match `Object.values`' index-signature
|
|
14
|
+
* overload, so it falls through to the `{}` one and returns `any[]`. This helper reads the
|
|
15
|
+
* qualifier bag with its type intact, so no call site needs a cast (a cast would silence the
|
|
16
|
+
* `any` instead of removing it).
|
|
17
|
+
*/
|
|
18
|
+
function grantQualifiers(statement) {
|
|
19
|
+
if (typeof statement === 'string')
|
|
20
|
+
return undefined;
|
|
21
|
+
const values = Object.values(statement);
|
|
22
|
+
return values[0];
|
|
23
|
+
}
|
|
6
24
|
/**
|
|
7
25
|
* Authorization grants, addressed the way the contract declares them:
|
|
8
26
|
* `/contract/authorization/{role}/<on-path>`.
|
|
@@ -24,27 +42,27 @@ class AuthorizationResource {
|
|
|
24
42
|
}
|
|
25
43
|
/** Every grant a role holds, in canonical order. */
|
|
26
44
|
async list(role, options) {
|
|
27
|
-
return this.client.get(this.base(role), (0, fetch_client_1.localeQueryOrUndefined)(options), { operationId: 'listRoleGrants' });
|
|
45
|
+
return await this.client.get(this.base(role), (0, fetch_client_1.localeQueryOrUndefined)(options), { operationId: 'listRoleGrants' });
|
|
28
46
|
}
|
|
29
47
|
/** Read one grant. */
|
|
30
48
|
async get(role, onPath, options) {
|
|
31
|
-
return this.client.get(this.item(role, onPath), (0, fetch_client_1.localeQueryOrUndefined)(options), { operationId: this.op('get', onPath) });
|
|
49
|
+
return await this.client.get(this.item(role, onPath), (0, fetch_client_1.localeQueryOrUndefined)(options), { operationId: this.op('get', onPath) });
|
|
32
50
|
}
|
|
33
51
|
/** Create a grant. Rejects with 409 when one already exists on that on-path — use {@link put} to replace. */
|
|
34
52
|
async create(role, grant) {
|
|
35
|
-
return this.client.post(this.base(role), grant, { operationId: 'createRoleGrant' });
|
|
53
|
+
return await this.client.post(this.base(role), grant, { operationId: 'createRoleGrant' });
|
|
36
54
|
}
|
|
37
55
|
/** Create or replace a grant. Idempotent. */
|
|
38
56
|
async put(role, onPath, actions) {
|
|
39
|
-
return this.client.put(this.item(role, onPath), { actions }, { operationId: this.op('put', onPath) });
|
|
57
|
+
return await this.client.put(this.item(role, onPath), { actions }, { operationId: this.op('put', onPath) });
|
|
40
58
|
}
|
|
41
59
|
/** Merge actions into an existing grant — adds or re-attenuates, never drops. */
|
|
42
60
|
async patch(role, onPath, actions) {
|
|
43
|
-
return this.client.patch(this.item(role, onPath), { actions }, { operationId: this.op('patch', onPath) });
|
|
61
|
+
return await this.client.patch(this.item(role, onPath), { actions }, { operationId: this.op('patch', onPath) });
|
|
44
62
|
}
|
|
45
63
|
/** Remove a grant entirely. */
|
|
46
64
|
async del(role, onPath) {
|
|
47
|
-
return this.client.del(this.item(role, onPath), { operationId: this.op('delete', onPath) });
|
|
65
|
+
return await this.client.del(this.item(role, onPath), { operationId: this.op('delete', onPath) });
|
|
48
66
|
}
|
|
49
67
|
}
|
|
50
68
|
exports.AuthorizationResource = AuthorizationResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization.js","sourceRoot":"","sources":["../../src/resources/authorization.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"authorization.js","sourceRoot":"","sources":["../../src/resources/authorization.ts"],"names":[],"mappings":";;;AAiFA,0CAMC;AAvFD,+BAA+B;AAC/B,gCAAgC;AAChC,4DAAqF;AAarF,+EAA6E;AAyD7E;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAC3B,SAAiC;IAEjC,IAAI,OAAO,SAAS,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACpD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAgE,CAAC,CAAC;IAC/F,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAeD;;;GAGG;AACH,MAAa,qBAAqB;IACD;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAE5C,IAAI,CAAC,IAAY;QACrB,OAAO,2BAA2B,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;IACjE,CAAC;IAED,8EAA8E;IACtE,IAAI,CAAC,IAAY,EAAE,MAAc;QACrC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE,CAAC;IAC1C,CAAC;IAEO,EAAE,CAAC,IAAwC,EAAE,MAAc;QAC/D,OAAO,GAAG,IAAI,QAAQ,IAAA,0DAA4B,EAAC,MAAM,CAAC,EAAE,CAAC;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AC,KAAK,CAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAClF,CAAC;IACN,CAAC;IAED,+BAA+B;IAC/B,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,MAAc;QAClC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACxB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CACtE,CAAC;IACN,CAAC;CACJ;AA3DD,sDA2DC"}
|
|
@@ -3,13 +3,11 @@ export interface EntityPermissionEntry {
|
|
|
3
3
|
readonly entity: string;
|
|
4
4
|
readonly actions: ReadonlyArray<string>;
|
|
5
5
|
/**
|
|
6
|
-
* The scope the
|
|
6
|
+
* The scope the server enforces, per reported action. `full` reaches every row;
|
|
7
7
|
* `owner` reaches only rows the caller owns.
|
|
8
8
|
*
|
|
9
|
-
* An owner-scoped action
|
|
10
|
-
*
|
|
11
|
-
* list contains. Callers gating an affordance on `actions.includes(...)` were therefore
|
|
12
|
-
* under-told, and should now gate the ROW-level affordance on this too.
|
|
9
|
+
* An owner-scoped action is listed in `actions` like any other, so gate a ROW-level
|
|
10
|
+
* affordance on this map, not on `actions.includes(...)` alone.
|
|
13
11
|
*/
|
|
14
12
|
readonly scope_by_action: Readonly<Record<string, 'full' | 'owner'>>;
|
|
15
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorizations.d.ts","sourceRoot":"","sources":["../../src/resources/authorizations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authorizations.d.ts","sourceRoot":"","sources":["../../src/resources/authorizations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IACrE;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;CACrF;AAED,MAAM,WAAW,+BAA+B;IAC5C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,kBAAkB,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACrE;AAED,qBAAa,sBAAsB;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,+BAA+B,CAAC;CAG9D"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
|
+
// Self-scoped effective-authorizations introspection.
|
|
3
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
6
|
exports.AuthorizationsResource = void 0;
|
|
5
7
|
class AuthorizationsResource {
|
|
@@ -12,7 +14,7 @@ class AuthorizationsResource {
|
|
|
12
14
|
* decides for the CALLING actor (self-scope; no actor parameter exists).
|
|
13
15
|
*/
|
|
14
16
|
async effective() {
|
|
15
|
-
return this.client.get('/runtime/authorizations/effective', undefined, { operationId: 'runtimeEffectiveAuthorizations' });
|
|
17
|
+
return await this.client.get('/runtime/authorizations/effective', undefined, { operationId: 'runtimeEffectiveAuthorizations' });
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
exports.AuthorizationsResource = AuthorizationsResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorizations.js","sourceRoot":"","sources":["../../src/resources/authorizations.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"authorizations.js","sourceRoot":"","sources":["../../src/resources/authorizations.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,sDAAsD;;;AA+BtD,MAAa,sBAAsB;IACF;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD;;;OAGG;IACH,KAAK,CAAC,SAAS;QACX,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAkC,mCAAmC,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC,CAAC;IACrK,CAAC;CACJ;AAVD,wDAUC"}
|