@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
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
2
4
|
// contract.channels — the tenant channel-declaration collection plus its
|
|
3
|
-
// nested channel-ingress credentials
|
|
5
|
+
// nested channel-ingress credentials. Distinct from the runtime-PLANE
|
|
4
6
|
// `client.runtime` channel-ops resource — this is contract-plane config on the
|
|
5
7
|
// admin host. CRUD on /contract/channels (+ /{channel_name}); the
|
|
6
8
|
// `credentials` sub-node is list/issue on the base and revoke on /{jti}.
|
|
@@ -13,13 +15,13 @@ class ChannelCredentialsResource {
|
|
|
13
15
|
this.client = client;
|
|
14
16
|
}
|
|
15
17
|
async list() {
|
|
16
|
-
return this.client.get('/contract/channels/credentials', undefined, { operationId: 'listChannelCredentials' });
|
|
18
|
+
return await this.client.get('/contract/channels/credentials', undefined, { operationId: 'listChannelCredentials' });
|
|
17
19
|
}
|
|
18
20
|
async issue(input) {
|
|
19
|
-
return this.client.post('/contract/channels/credentials', input, { operationId: 'issueChannelCredential' });
|
|
21
|
+
return await this.client.post('/contract/channels/credentials', input, { operationId: 'issueChannelCredential' });
|
|
20
22
|
}
|
|
21
23
|
async revoke(jti) {
|
|
22
|
-
return this.client.del(`/contract/channels/credentials/${encodeURIComponent(jti)}`, { operationId: 'revokeChannelCredential' });
|
|
24
|
+
return await this.client.del(`/contract/channels/credentials/${encodeURIComponent(jti)}`, { operationId: 'revokeChannelCredential' });
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
exports.ChannelCredentialsResource = ChannelCredentialsResource;
|
|
@@ -31,22 +33,22 @@ class ContractChannelsResource {
|
|
|
31
33
|
this.credentials = new ChannelCredentialsResource(client);
|
|
32
34
|
}
|
|
33
35
|
async list() {
|
|
34
|
-
return this.client.get('/contract/channels', undefined, { operationId: 'listChannels' });
|
|
36
|
+
return await this.client.get('/contract/channels', undefined, { operationId: 'listChannels' });
|
|
35
37
|
}
|
|
36
38
|
async get(channelName) {
|
|
37
|
-
return this.client.get(`/contract/channels/${encodeURIComponent(channelName)}`, undefined, { operationId: 'getChannel' });
|
|
39
|
+
return await this.client.get(`/contract/channels/${encodeURIComponent(channelName)}`, undefined, { operationId: 'getChannel' });
|
|
38
40
|
}
|
|
39
41
|
async create(input) {
|
|
40
|
-
return this.client.post('/contract/channels', input, { operationId: 'createChannel' });
|
|
42
|
+
return await this.client.post('/contract/channels', input, { operationId: 'createChannel' });
|
|
41
43
|
}
|
|
42
44
|
async put(channelName, input) {
|
|
43
|
-
return this.client.put(`/contract/channels/${encodeURIComponent(channelName)}`, input, { operationId: 'replaceChannel' });
|
|
45
|
+
return await this.client.put(`/contract/channels/${encodeURIComponent(channelName)}`, input, { operationId: 'replaceChannel' });
|
|
44
46
|
}
|
|
45
47
|
async patch(channelName, patch) {
|
|
46
|
-
return this.client.patch(`/contract/channels/${encodeURIComponent(channelName)}`, patch, { operationId: 'patchChannel' });
|
|
48
|
+
return await this.client.patch(`/contract/channels/${encodeURIComponent(channelName)}`, patch, { operationId: 'patchChannel' });
|
|
47
49
|
}
|
|
48
50
|
async delete(channelName) {
|
|
49
|
-
return this.client.del(`/contract/channels/${encodeURIComponent(channelName)}`, { operationId: 'deleteChannel' });
|
|
51
|
+
return await this.client.del(`/contract/channels/${encodeURIComponent(channelName)}`, { operationId: 'deleteChannel' });
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
exports.ContractChannelsResource = ContractChannelsResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../../src/contract/roots/channels.ts"],"names":[],"mappings":";AAAA,yEAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../../src/contract/roots/channels.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,yEAAyE;AACzE,sEAAsE;AACtE,+EAA+E;AAC/E,kEAA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C,MAAM,CAAC,KAAiB;QAC1B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IACjG,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,WAAmB,EAAE,KAAiB;QAC5C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sBAAsB,kBAAkB,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACpI,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,WAAmB,EAAE,KAAiB;QAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,kBAAkB,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IACpI,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC5B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,sBAAsB,kBAAkB,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IAClI,CAAC;CACJ;AA9BD,4DA8BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/events.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,qBAAa,6BAA6B;IACtC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;gBACzB,MAAM,EAAE,WAAW;CAOlC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
2
4
|
// contract.events.delivery — the event-delivery config document.
|
|
3
5
|
// Mirrors `/contract/events/delivery` (distinct from the top-level
|
|
4
6
|
// `contract.events.rules` section — the HTTP surface splits them the same way).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/contract/roots/events.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,mEAAmE;AACnE,gFAAgF;;;AAGhF,8CAAkD;AAElD,MAAa,6BAA6B;IAC7B,QAAQ,CAAoB;IACrC,YAAY,MAAmB;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,8BAAiB,CAAC,MAAM,EAAE,2BAA2B,EAAE;YACvE,GAAG,EAAE,yBAAyB;YAC9B,GAAG,EAAE,yBAAyB;YAC9B,KAAK,EAAE,2BAA2B;SACrC,CAAC,CAAC;IACP,CAAC;CACJ;AATD,sEASC"}
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/contract/roots/events.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,iEAAiE;AACjE,mEAAmE;AACnE,gFAAgF;;;AAGhF,8CAAkD;AAElD,MAAa,6BAA6B;IAC7B,QAAQ,CAAoB;IACrC,YAAY,MAAmB;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,8BAAiB,CAAC,MAAM,EAAE,2BAA2B,EAAE;YACvE,GAAG,EAAE,yBAAyB;YAC9B,GAAG,EAAE,yBAAyB;YAC9B,KAAK,EAAE,2BAA2B;SACrC,CAAC,CAAC;IACP,CAAC;CACJ;AATD,sEASC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { FetchClient } from '../../_internal/fetch-client';
|
|
2
|
-
import { SingletonAccessor } from '../_singleton';
|
|
2
|
+
import { SingletonAccessor, type JsonObject } from '../_singleton';
|
|
3
|
+
import type { ContractLlmPatchPayload, ContractLlmWritePayload } from '../../generated';
|
|
3
4
|
import { McpServersResource } from './mcp-servers';
|
|
4
5
|
import { TreatmentResource } from './treatment';
|
|
5
6
|
import { TimezoneResource } from './timezone';
|
|
6
7
|
import { ContractChannelsResource } from './channels';
|
|
7
8
|
export declare class ContractAgentRoots {
|
|
8
|
-
readonly llm: SingletonAccessor
|
|
9
|
+
readonly llm: SingletonAccessor<JsonObject, ContractLlmWritePayload, ContractLlmPatchPayload>;
|
|
9
10
|
readonly treatment: TreatmentResource;
|
|
10
11
|
readonly mcpServers: McpServersResource;
|
|
11
12
|
readonly timezone: TimezoneResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD,qBAAa,kBAAkB;IAG3B,QAAQ,CAAC,GAAG,EAAE,iBAAiB,CAAC,UAAU,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;IAC9F,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;gBAEhC,MAAM,EAAE,WAAW;CAclC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
|
+
// The contract roots. These are hoisted onto `client.contract.*` directly: there
|
|
5
|
+
// is no `contract.runtime` namespace, because there is no `runtime:` section for
|
|
6
|
+
// it to mirror.
|
|
5
7
|
//
|
|
6
8
|
// They live on the CONTRACT host (`{tenant}.admin.zarel…`) and remain distinct
|
|
7
9
|
// from the runtime-PLANE namespace `client.runtime.*`, which is a different
|
|
8
|
-
// surface on a different host
|
|
9
|
-
//
|
|
10
|
+
// surface on a different host (`runtime` names the plane and the scope
|
|
11
|
+
// qualifier).
|
|
10
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
13
|
exports.ContractAgentRoots = void 0;
|
|
12
14
|
const _singleton_1 = require("../_singleton");
|
|
@@ -15,20 +17,19 @@ const treatment_1 = require("./treatment");
|
|
|
15
17
|
const timezone_1 = require("./timezone");
|
|
16
18
|
const channels_1 = require("./channels");
|
|
17
19
|
class ContractAgentRoots {
|
|
20
|
+
// The GLOBAL TUNABLES. `services[]` is the catalog and this body refuses it by name.
|
|
21
|
+
// The read stays untyped: `getLlm` publishes a bare `OkEnvelope`.
|
|
18
22
|
llm;
|
|
19
23
|
treatment;
|
|
20
24
|
mcpServers;
|
|
21
25
|
timezone;
|
|
22
26
|
channels;
|
|
23
27
|
constructor(client) {
|
|
24
|
-
this.llm = new _singleton_1.SingletonAccessor(client, '/contract/llm', {
|
|
25
|
-
get: 'getLlm', put: 'putLlm', patch: 'patchLlm',
|
|
26
|
-
});
|
|
28
|
+
this.llm = new _singleton_1.SingletonAccessor(client, '/contract/llm', { get: 'getLlm', put: 'putLlm', patch: 'patchLlm' });
|
|
27
29
|
this.treatment = new treatment_1.TreatmentResource(client);
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
// singleton endpoint left to accessor over.
|
|
30
|
+
// `embeddings` has no accessor here: like its sibling `llm.services[]`, it is authored
|
|
31
|
+
// through contract import and read back through export. There is no single-document
|
|
32
|
+
// endpoint for it.
|
|
32
33
|
this.mcpServers = new mcp_servers_1.McpServersResource(client);
|
|
33
34
|
this.timezone = new timezone_1.TimezoneResource(client);
|
|
34
35
|
this.channels = new channels_1.ContractChannelsResource(client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/roots/index.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/roots/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,iFAAiF;AACjF,iFAAiF;AACjF,gBAAgB;AAChB,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,uEAAuE;AACvE,cAAc;;;AAGd,8CAAmE;AAEnE,+CAAmD;AACnD,2CAAgD;AAChD,yCAA8C;AAC9C,yCAAsD;AAEtD,MAAa,kBAAkB;IAC3B,qFAAqF;IACrF,kEAAkE;IACzD,GAAG,CAAkF;IACrF,SAAS,CAAoB;IAC7B,UAAU,CAAqB;IAC/B,QAAQ,CAAmB;IAC3B,QAAQ,CAA2B;IAE5C,YAAY,MAAmB;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,8BAAiB,CAC5B,MAAM,EACN,eAAe,EACf,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,CACtD,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,IAAI,6BAAiB,CAAC,MAAM,CAAC,CAAC;QAC/C,uFAAuF;QACvF,oFAAoF;QACpF,mBAAmB;QACnB,IAAI,CAAC,UAAU,GAAG,IAAI,gCAAkB,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,2BAAgB,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,mCAAwB,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;CACJ;AAvBD,gDAuBC"}
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
import type { FetchClient } from '../../_internal/fetch-client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly auth_type: 'env_var';
|
|
6
|
-
readonly auth_ref: string;
|
|
7
|
-
readonly trust_level: 'trusted' | 'advisory' | 'untrusted';
|
|
8
|
-
readonly url?: string;
|
|
9
|
-
readonly timeout_ms?: number;
|
|
10
|
-
readonly retry?: Record<string, unknown>;
|
|
11
|
-
readonly [key: string]: unknown;
|
|
12
|
-
}
|
|
13
|
-
export interface McpAllowedToolRecord {
|
|
14
|
-
readonly namespace: string;
|
|
15
|
-
readonly tool_name: string;
|
|
16
|
-
readonly description?: string;
|
|
17
|
-
readonly capabilities_required?: Record<string, unknown>;
|
|
18
|
-
readonly phases?: Record<string, unknown>;
|
|
19
|
-
readonly preconditions?: Record<string, unknown>;
|
|
20
|
-
readonly [key: string]: unknown;
|
|
21
|
-
}
|
|
2
|
+
import type { McpAllowedToolCreate, McpAllowedToolRecord, McpAllowedToolWrite, McpServerCreate, McpServerRecord, McpServerWrite } from '../../types/mcp-and-events-contract';
|
|
3
|
+
import type { ContractDeletedAck } from '../../types/flows-contract';
|
|
4
|
+
export type { McpAllowedToolCreate, McpAllowedToolRecord, McpAllowedToolWrite, McpServerCreate, McpServerRecord, McpServerWrite, };
|
|
22
5
|
declare class McpAllowedTools {
|
|
23
6
|
private readonly client;
|
|
24
7
|
private readonly ns;
|
|
@@ -26,21 +9,20 @@ declare class McpAllowedTools {
|
|
|
26
9
|
private base;
|
|
27
10
|
list(): Promise<McpAllowedToolRecord[]>;
|
|
28
11
|
get(toolName: string): Promise<McpAllowedToolRecord>;
|
|
29
|
-
create(input:
|
|
30
|
-
put(toolName: string, input:
|
|
31
|
-
patch(toolName: string, patch:
|
|
32
|
-
delete(toolName: string): Promise<
|
|
12
|
+
create(input: McpAllowedToolCreate): Promise<McpAllowedToolRecord>;
|
|
13
|
+
put(toolName: string, input: McpAllowedToolWrite): Promise<McpAllowedToolRecord>;
|
|
14
|
+
patch(toolName: string, patch: McpAllowedToolWrite): Promise<McpAllowedToolRecord>;
|
|
15
|
+
delete(toolName: string): Promise<ContractDeletedAck>;
|
|
33
16
|
}
|
|
34
17
|
export declare class McpServersResource {
|
|
35
18
|
private readonly client;
|
|
36
19
|
constructor(client: FetchClient);
|
|
37
20
|
list(): Promise<McpServerRecord[]>;
|
|
38
21
|
get(namespace: string): Promise<McpServerRecord>;
|
|
39
|
-
create(input:
|
|
40
|
-
put(namespace: string, input:
|
|
41
|
-
patch(namespace: string, patch:
|
|
42
|
-
delete(namespace: string): Promise<
|
|
22
|
+
create(input: McpServerCreate): Promise<McpServerRecord>;
|
|
23
|
+
put(namespace: string, input: McpServerWrite): Promise<McpServerRecord>;
|
|
24
|
+
patch(namespace: string, patch: McpServerWrite): Promise<McpServerRecord>;
|
|
25
|
+
delete(namespace: string): Promise<ContractDeletedAck>;
|
|
43
26
|
allowedTools(namespace: string): McpAllowedTools;
|
|
44
27
|
}
|
|
45
|
-
export {};
|
|
46
28
|
//# sourceMappingURL=mcp-servers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-servers.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/mcp-servers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp-servers.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/mcp-servers.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OA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cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvE,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAIzE,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAI5D,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe;CAGnD"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
|
+
// contract.admin.mcpServers (servers + nested allowedTools).
|
|
3
5
|
//
|
|
4
|
-
// Maps to contract
|
|
5
|
-
// `/contract/mcp-servers/:namespace/allowed-tools
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
6
|
+
// Maps to the contract API's `/contract/mcp-servers*` and
|
|
7
|
+
// `/contract/mcp-servers/:namespace/allowed-tools*`. The `/contract/` URL
|
|
8
|
+
// prefix marks the contract-plane host; the resource configures runtime
|
|
9
|
+
// behaviour.
|
|
10
|
+
//
|
|
11
|
+
// The two record types and the four body types are DERIVED from the published schema — see
|
|
12
|
+
// `../../types/mcp-and-events-contract`.
|
|
9
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
14
|
exports.McpServersResource = void 0;
|
|
11
15
|
class McpAllowedTools {
|
|
@@ -19,22 +23,22 @@ class McpAllowedTools {
|
|
|
19
23
|
return `/contract/mcp-servers/${encodeURIComponent(this.ns)}/allowed-tools`;
|
|
20
24
|
}
|
|
21
25
|
async list() {
|
|
22
|
-
return this.client.get(this.base(), undefined, { operationId: 'listMcpAllowedTools' });
|
|
26
|
+
return await this.client.get(this.base(), undefined, { operationId: 'listMcpAllowedTools' });
|
|
23
27
|
}
|
|
24
28
|
async get(toolName) {
|
|
25
|
-
return this.client.get(`${this.base()}/${encodeURIComponent(toolName)}`, undefined, { operationId: 'getMcpAllowedTool' });
|
|
29
|
+
return await this.client.get(`${this.base()}/${encodeURIComponent(toolName)}`, undefined, { operationId: 'getMcpAllowedTool' });
|
|
26
30
|
}
|
|
27
31
|
async create(input) {
|
|
28
|
-
return this.client.post(this.base(), input, { operationId: 'createMcpAllowedTool' });
|
|
32
|
+
return await this.client.post(this.base(), input, { operationId: 'createMcpAllowedTool' });
|
|
29
33
|
}
|
|
30
34
|
async put(toolName, input) {
|
|
31
|
-
return this.client.put(`${this.base()}/${encodeURIComponent(toolName)}`, input, { operationId: 'replaceMcpAllowedTool' });
|
|
35
|
+
return await this.client.put(`${this.base()}/${encodeURIComponent(toolName)}`, input, { operationId: 'replaceMcpAllowedTool' });
|
|
32
36
|
}
|
|
33
37
|
async patch(toolName, patch) {
|
|
34
|
-
return this.client.patch(`${this.base()}/${encodeURIComponent(toolName)}`, patch, { operationId: 'patchMcpAllowedTool' });
|
|
38
|
+
return await this.client.patch(`${this.base()}/${encodeURIComponent(toolName)}`, patch, { operationId: 'patchMcpAllowedTool' });
|
|
35
39
|
}
|
|
36
40
|
async delete(toolName) {
|
|
37
|
-
return this.client.del(`${this.base()}/${encodeURIComponent(toolName)}`, { operationId: 'deleteMcpAllowedTool' });
|
|
41
|
+
return await this.client.del(`${this.base()}/${encodeURIComponent(toolName)}`, { operationId: 'deleteMcpAllowedTool' });
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
class McpServersResource {
|
|
@@ -43,22 +47,22 @@ class McpServersResource {
|
|
|
43
47
|
this.client = client;
|
|
44
48
|
}
|
|
45
49
|
async list() {
|
|
46
|
-
return this.client.get('/contract/mcp-servers', undefined, { operationId: 'listMcpServers' });
|
|
50
|
+
return await this.client.get('/contract/mcp-servers', undefined, { operationId: 'listMcpServers' });
|
|
47
51
|
}
|
|
48
52
|
async get(namespace) {
|
|
49
|
-
return this.client.get(`/contract/mcp-servers/${encodeURIComponent(namespace)}`, undefined, { operationId: 'getMcpServer' });
|
|
53
|
+
return await this.client.get(`/contract/mcp-servers/${encodeURIComponent(namespace)}`, undefined, { operationId: 'getMcpServer' });
|
|
50
54
|
}
|
|
51
55
|
async create(input) {
|
|
52
|
-
return this.client.post('/contract/mcp-servers', input, { operationId: 'createMcpServer' });
|
|
56
|
+
return await this.client.post('/contract/mcp-servers', input, { operationId: 'createMcpServer' });
|
|
53
57
|
}
|
|
54
58
|
async put(namespace, input) {
|
|
55
|
-
return this.client.put(`/contract/mcp-servers/${encodeURIComponent(namespace)}`, input, { operationId: 'replaceMcpServer' });
|
|
59
|
+
return await this.client.put(`/contract/mcp-servers/${encodeURIComponent(namespace)}`, input, { operationId: 'replaceMcpServer' });
|
|
56
60
|
}
|
|
57
61
|
async patch(namespace, patch) {
|
|
58
|
-
return this.client.patch(`/contract/mcp-servers/${encodeURIComponent(namespace)}`, patch, { operationId: 'patchMcpServer' });
|
|
62
|
+
return await this.client.patch(`/contract/mcp-servers/${encodeURIComponent(namespace)}`, patch, { operationId: 'patchMcpServer' });
|
|
59
63
|
}
|
|
60
64
|
async delete(namespace) {
|
|
61
|
-
return this.client.del(`/contract/mcp-servers/${encodeURIComponent(namespace)}`, { operationId: 'deleteMcpServer' });
|
|
65
|
+
return await this.client.del(`/contract/mcp-servers/${encodeURIComponent(namespace)}`, { operationId: 'deleteMcpServer' });
|
|
62
66
|
}
|
|
63
67
|
allowedTools(namespace) {
|
|
64
68
|
return new McpAllowedTools(this.client, namespace);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-servers.js","sourceRoot":"","sources":["../../../src/contract/roots/mcp-servers.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"mcp-servers.js","sourceRoot":"","sources":["../../../src/contract/roots/mcp-servers.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,6DAA6D;AAC7D,EAAE;AACF,0DAA0D;AAC1D,0EAA0E;AAC1E,wEAAwE;AACxE,aAAa;AACb,EAAE;AACF,2FAA2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SAAiB,EAAE,KAAqB;QAChD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,kBAAkB,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACvI,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,SAAiB;QAC1B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAqB,yBAAyB,kBAAkB,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACnJ,CAAC;IAED,YAAY,CAAC,SAAiB;QAC1B,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;CACJ;AA9BD,gDA8BC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { FetchClient } from '../../_internal/fetch-client';
|
|
2
|
-
type
|
|
3
|
-
export
|
|
4
|
-
readonly name: string;
|
|
5
|
-
readonly [key: string]: unknown;
|
|
6
|
-
}
|
|
2
|
+
import type { ContractDeletedAck, ContractProfile, ContractProfileCreate, ContractProfileWrite } from '../../types/treatment-contract';
|
|
3
|
+
export type { ContractProfile };
|
|
7
4
|
export declare class ProfilesResource {
|
|
8
5
|
private readonly client;
|
|
9
6
|
constructor(client: FetchClient);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
private base;
|
|
8
|
+
list(): Promise<ContractProfile[]>;
|
|
9
|
+
get(name: string): Promise<ContractProfile>;
|
|
10
|
+
/** Creates, or RESURRECTS a profile that was previously deleted. A live name is a 409. */
|
|
11
|
+
create(input: ContractProfileCreate): Promise<ContractProfile>;
|
|
12
|
+
/** The body is the FLAT treatment — no `name`, since the path already has it. */
|
|
13
|
+
put(name: string, input: ContractProfileWrite): Promise<ContractProfile>;
|
|
14
|
+
/** REPLACES the whole blob, exactly like `put` — the route does not merge. */
|
|
15
|
+
patch(name: string, patch: ContractProfileWrite): Promise<ContractProfile>;
|
|
16
|
+
/** Answers `{message}`, not an empty body — and the name can be created again after. */
|
|
17
|
+
delete(name: string): Promise<ContractDeletedAck>;
|
|
16
18
|
}
|
|
17
|
-
export {};
|
|
18
19
|
//# sourceMappingURL=profiles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/profiles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/profiles.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EACR,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACvB,MAAM,gCAAgC,CAAC;AAExC,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,qBAAa,gBAAgB;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD,OAAO,CAAC,IAAI;IAIN,IAAI,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAIlC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIjD,0FAA0F;IACpF,MAAM,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIpE,iFAAiF;IAC3E,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI9E,8EAA8E;IACxE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIhF,wFAAwF;IAClF,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAG1D"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
|
+
// contract.treatment.profiles — the named treatment overrides.
|
|
3
5
|
// CRUD on /contract/treatment/profiles (+ /{name}).
|
|
6
|
+
//
|
|
7
|
+
// Every shape is derived from the published schema; see `types/treatment-contract.ts`.
|
|
4
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
9
|
exports.ProfilesResource = void 0;
|
|
6
10
|
class ProfilesResource {
|
|
@@ -8,23 +12,30 @@ class ProfilesResource {
|
|
|
8
12
|
constructor(client) {
|
|
9
13
|
this.client = client;
|
|
10
14
|
}
|
|
15
|
+
base() {
|
|
16
|
+
return '/contract/treatment/profiles';
|
|
17
|
+
}
|
|
11
18
|
async list() {
|
|
12
|
-
return this.client.get(
|
|
19
|
+
return await this.client.get(this.base(), undefined, { operationId: 'listProfiles' });
|
|
13
20
|
}
|
|
14
21
|
async get(name) {
|
|
15
|
-
return this.client.get(
|
|
22
|
+
return await this.client.get(`${this.base()}/${encodeURIComponent(name)}`, undefined, { operationId: 'getProfile' });
|
|
16
23
|
}
|
|
24
|
+
/** Creates, or RESURRECTS a profile that was previously deleted. A live name is a 409. */
|
|
17
25
|
async create(input) {
|
|
18
|
-
return this.client.post(
|
|
26
|
+
return await this.client.post(this.base(), input, { operationId: 'createProfile' });
|
|
19
27
|
}
|
|
28
|
+
/** The body is the FLAT treatment — no `name`, since the path already has it. */
|
|
20
29
|
async put(name, input) {
|
|
21
|
-
return this.client.put(
|
|
30
|
+
return await this.client.put(`${this.base()}/${encodeURIComponent(name)}`, input, { operationId: 'replaceProfile' });
|
|
22
31
|
}
|
|
32
|
+
/** REPLACES the whole blob, exactly like `put` — the route does not merge. */
|
|
23
33
|
async patch(name, patch) {
|
|
24
|
-
return this.client.patch(
|
|
34
|
+
return await this.client.patch(`${this.base()}/${encodeURIComponent(name)}`, patch, { operationId: 'patchProfile' });
|
|
25
35
|
}
|
|
36
|
+
/** Answers `{message}`, not an empty body — and the name can be created again after. */
|
|
26
37
|
async delete(name) {
|
|
27
|
-
return this.client.del(
|
|
38
|
+
return await this.client.del(`${this.base()}/${encodeURIComponent(name)}`, { operationId: 'deleteProfile' });
|
|
28
39
|
}
|
|
29
40
|
}
|
|
30
41
|
exports.ProfilesResource = ProfilesResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../../src/contract/roots/profiles.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../../src/contract/roots/profiles.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,+DAA+D;AAC/D,oDAAoD;AACpD,EAAE;AACF,uFAAuF;;;AAYvF,MAAa,gBAAgB;IACI;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAE5C,IAAI;QACR,OAAO,8BAA8B,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,IAAI;QACN,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAoB,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7G,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAY;QAClB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAkB,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1I,CAAC;IAED,0FAA0F;IAC1F,KAAK,CAAC,MAAM,CAAC,KAA4B;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAkB,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,iFAAiF;IACjF,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,KAA2B;QAC/C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAkB,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC1I,CAAC;IAED,8EAA8E;IAC9E,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,KAA2B;QACjD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAkB,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAC1I,CAAC;IAED,wFAAwF;IACxF,KAAK,CAAC,MAAM,CAAC,IAAY;QACrB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAqB,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IACrI,CAAC;CACJ;AAlCD,4CAkCC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FetchClient } from '../../_internal/fetch-client';
|
|
2
|
-
type
|
|
2
|
+
import type { ContractTimezoneWritePayload } from '../../generated';
|
|
3
|
+
import type { JsonObject } from '../_singleton';
|
|
3
4
|
export declare class TimezoneResource {
|
|
4
5
|
private readonly client;
|
|
5
6
|
constructor(client: FetchClient);
|
|
6
7
|
get(): Promise<JsonObject>;
|
|
7
|
-
put(input:
|
|
8
|
+
put(input: ContractTimezoneWritePayload): Promise<JsonObject>;
|
|
8
9
|
}
|
|
9
|
-
export {};
|
|
10
10
|
//# sourceMappingURL=timezone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/timezone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/timezone.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,gBAAgB;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;IAK1B,GAAG,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,UAAU,CAAC;CAGtE"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
2
4
|
// contract.timezone — the tenant runtime timezone singleton.
|
|
3
5
|
// GET/PUT only (no patch) on /contract/timezone (validated IANA id).
|
|
4
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9,10 +11,11 @@ class TimezoneResource {
|
|
|
9
11
|
this.client = client;
|
|
10
12
|
}
|
|
11
13
|
async get() {
|
|
12
|
-
return this.client.get('/contract/timezone', undefined, { operationId: 'getTimezone' });
|
|
14
|
+
return await this.client.get('/contract/timezone', undefined, { operationId: 'getTimezone' });
|
|
13
15
|
}
|
|
16
|
+
// `{ timezone }` and nothing else — the route reads `timezone` and no other key.
|
|
14
17
|
async put(input) {
|
|
15
|
-
return this.client.put('/contract/timezone', input, { operationId: 'putTimezone' });
|
|
18
|
+
return await this.client.put('/contract/timezone', input, { operationId: 'putTimezone' });
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
21
|
exports.TimezoneResource = TimezoneResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone.js","sourceRoot":"","sources":["../../../src/contract/roots/timezone.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,qEAAqE;;;AAMrE,MAAa,gBAAgB;IACI;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,GAAG;QACL,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"timezone.js","sourceRoot":"","sources":["../../../src/contract/roots/timezone.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,6DAA6D;AAC7D,qEAAqE;;;AAMrE,MAAa,gBAAgB;IACI;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,GAAG;QACL,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC;IAClG,CAAC;IAED,iFAAiF;IACjF,KAAK,CAAC,GAAG,CAAC,KAAmC;QACzC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC;IAC9F,CAAC;CACJ;AAXD,4CAWC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { FetchClient } from '../../_internal/fetch-client';
|
|
2
|
+
import type { ContractTreatment, ContractTreatmentPatch, ContractTreatmentRails, ContractTreatmentRailsPatch, ContractTreatmentWrite } from '../../types/treatment-contract';
|
|
2
3
|
import { SingletonAccessor } from '../_singleton';
|
|
3
4
|
import { VocabularyResource } from './vocabulary';
|
|
4
5
|
import { ProfilesResource } from './profiles';
|
|
5
|
-
export declare class TreatmentResource extends SingletonAccessor {
|
|
6
|
+
export declare class TreatmentResource extends SingletonAccessor<ContractTreatment, ContractTreatmentWrite, ContractTreatmentPatch> {
|
|
6
7
|
readonly vocabulary: VocabularyResource;
|
|
7
8
|
readonly profiles: ProfilesResource;
|
|
8
|
-
readonly rails: SingletonAccessor
|
|
9
|
+
readonly rails: SingletonAccessor<ContractTreatmentRails, ContractTreatmentRails, ContractTreatmentRailsPatch>;
|
|
9
10
|
constructor(client: FetchClient);
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=treatment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treatment.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/treatment.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"treatment.d.ts","sourceRoot":"","sources":["../../../src/contract/roots/treatment.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EACR,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,qBAAa,iBAAkB,SAAQ,iBAAiB,CACpD,iBAAiB,EAAE,sBAAsB,EAAE,sBAAsB,CACpE;IACG,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC,sBAAsB,EAAE,sBAAsB,EAAE,2BAA2B,CAAC,CAAC;gBACnG,MAAM,EAAE,WAAW;CAclC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
2
4
|
// contract.treatment — the conversation-treatment document (`get`/`put`/`patch` on
|
|
3
5
|
// /contract/treatment) PLUS the children the HTTP hierarchy declares: `vocabulary`,
|
|
4
6
|
// `profiles` (the overrides) and `rails` (the non-overridable half).
|
|
5
7
|
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
8
|
+
// `profiles` and `rails` are nested HERE, not hoisted onto `contract`, because the
|
|
9
|
+
// SDK's TS access path must be a PREFIX of the HTTP path it targets.
|
|
10
|
+
// `contract.rails` -> /contract/treatment/rails invents a level and is a structural
|
|
11
|
+
// violation; `contract.treatment.rails` is not. A structural test walks every accessor
|
|
12
|
+
// and checks it against this rule.
|
|
11
13
|
//
|
|
12
14
|
// Distinct from the top-level contract.assistant authoring surface
|
|
13
15
|
// (/contract/assistant) — a different feature at a different HTTP level.
|
|
@@ -28,9 +30,7 @@ class TreatmentResource extends _singleton_1.SingletonAccessor {
|
|
|
28
30
|
});
|
|
29
31
|
this.vocabulary = new vocabulary_1.VocabularyResource(client);
|
|
30
32
|
this.profiles = new profiles_1.ProfilesResource(client);
|
|
31
|
-
this.rails = new _singleton_1.SingletonAccessor(client, '/contract/treatment/rails', {
|
|
32
|
-
get: 'getTreatmentRails', put: 'putTreatmentRails', patch: 'patchTreatmentRails',
|
|
33
|
-
});
|
|
33
|
+
this.rails = new _singleton_1.SingletonAccessor(client, '/contract/treatment/rails', { get: 'getTreatmentRails', put: 'putTreatmentRails', patch: 'patchTreatmentRails' });
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
exports.TreatmentResource = TreatmentResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treatment.js","sourceRoot":"","sources":["../../../src/contract/roots/treatment.ts"],"names":[],"mappings":";AAAA,mFAAmF;AACnF,oFAAoF;AACpF,qEAAqE;AACrE,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"treatment.js","sourceRoot":"","sources":["../../../src/contract/roots/treatment.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,mFAAmF;AACnF,oFAAoF;AACpF,qEAAqE;AACrE,EAAE;AACF,mFAAmF;AACnF,qEAAqE;AACrE,oFAAoF;AACpF,uFAAuF;AACvF,mCAAmC;AACnC,EAAE;AACF,mEAAmE;AACnE,yEAAyE;;;AAezE,8CAAkD;AAClD,6CAAkD;AAClD,yCAA8C;AAE9C,MAAa,iBAAkB,SAAQ,8BAEtC;IACY,UAAU,CAAqB;IAC/B,QAAQ,CAAmB;IAC3B,KAAK,CAAiG;IAC/G,YAAY,MAAmB;QAC3B,KAAK,CAAC,MAAM,EAAE,qBAAqB,EAAE;YACjC,GAAG,EAAE,cAAc;YACnB,GAAG,EAAE,cAAc;YACnB,KAAK,EAAE,gBAAgB;SAC1B,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,IAAI,+BAAkB,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,2BAAgB,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,8BAAiB,CAC9B,MAAM,EACN,2BAA2B,EAC3B,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG,EAAE,mBAAmB,EAAE,KAAK,EAAE,qBAAqB,EAAE,CACvF,CAAC;IACN,CAAC;CACJ;AApBD,8CAoBC"}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import type
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly [key: string]: unknown;
|
|
6
|
-
}
|
|
1
|
+
import { type FetchClient } from '../../_internal/fetch-client';
|
|
2
|
+
import type { LocaleOptions } from '../../types/locale';
|
|
3
|
+
import type { ContractDeletedAck, ContractVocabularyCreate, ContractVocabularyEntry, ContractVocabularyWrite } from '../../types/treatment-contract';
|
|
4
|
+
export type { ContractVocabularyEntry };
|
|
7
5
|
export declare class VocabularyResource {
|
|
8
6
|
private readonly client;
|
|
9
7
|
constructor(client: FetchClient);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
private base;
|
|
9
|
+
list(options?: LocaleOptions): Promise<ContractVocabularyEntry[]>;
|
|
10
|
+
get(term: string, options?: LocaleOptions): Promise<ContractVocabularyEntry>;
|
|
11
|
+
/** Creates, or RESURRECTS a term that was previously deleted. A live term is a 409. */
|
|
12
|
+
create(input: ContractVocabularyCreate): Promise<ContractVocabularyEntry>;
|
|
13
|
+
/**
|
|
14
|
+
* A TOTAL write: `means` is the entry's only mutable field and the body must state it.
|
|
15
|
+
* The intersection is what makes that a compile error rather than a 400 — the published
|
|
16
|
+
* body has `means` optional because PATCH shares the shape, and only PUT requires it.
|
|
17
|
+
*/
|
|
18
|
+
put(term: string, input: ContractVocabularyWrite & {
|
|
19
|
+
means: string;
|
|
20
|
+
}): Promise<ContractVocabularyEntry>;
|
|
21
|
+
patch(term: string, patch: ContractVocabularyWrite): Promise<ContractVocabularyEntry>;
|
|
22
|
+
/** Answers `{message}`, not an empty body — and the term can be created again after. */
|
|
23
|
+
delete(term: string): Promise<ContractDeletedAck>;
|
|
16
24
|
}
|
|
17
|
-
export {};
|
|
18
25
|
//# sourceMappingURL=vocabulary.d.ts.map
|