@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.
Files changed (358) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +29 -31
  3. package/dist/_internal/auth-headers.d.ts +3 -3
  4. package/dist/_internal/auth-headers.d.ts.map +1 -1
  5. package/dist/_internal/auth-headers.js +5 -3
  6. package/dist/_internal/auth-headers.js.map +1 -1
  7. package/dist/_internal/confirmation.d.ts +1 -1
  8. package/dist/_internal/confirmation.d.ts.map +1 -1
  9. package/dist/_internal/confirmation.js +3 -1
  10. package/dist/_internal/confirmation.js.map +1 -1
  11. package/dist/_internal/event-iterator.d.ts.map +1 -1
  12. package/dist/_internal/event-iterator.js +3 -1
  13. package/dist/_internal/event-iterator.js.map +1 -1
  14. package/dist/_internal/fetch-client.d.ts +26 -18
  15. package/dist/_internal/fetch-client.d.ts.map +1 -1
  16. package/dist/_internal/fetch-client.js +40 -35
  17. package/dist/_internal/fetch-client.js.map +1 -1
  18. package/dist/_internal/interceptors.d.ts.map +1 -1
  19. package/dist/_internal/interceptors.js.map +1 -1
  20. package/dist/_internal/mcp.d.ts.map +1 -1
  21. package/dist/_internal/mcp.js +6 -4
  22. package/dist/_internal/mcp.js.map +1 -1
  23. package/dist/_internal/pagination.d.ts +5 -5
  24. package/dist/_internal/pagination.d.ts.map +1 -1
  25. package/dist/_internal/pagination.js +7 -5
  26. package/dist/_internal/pagination.js.map +1 -1
  27. package/dist/_internal/require-token.d.ts +4 -4
  28. package/dist/_internal/require-token.d.ts.map +1 -1
  29. package/dist/_internal/require-token.js +6 -4
  30. package/dist/_internal/require-token.js.map +1 -1
  31. package/dist/_internal/retry-after.d.ts.map +1 -1
  32. package/dist/_internal/retry-after.js +2 -0
  33. package/dist/_internal/retry-after.js.map +1 -1
  34. package/dist/_internal/sse-client.d.ts.map +1 -1
  35. package/dist/_internal/sse-client.js +4 -3
  36. package/dist/_internal/sse-client.js.map +1 -1
  37. package/dist/_internal/version.d.ts +2 -2
  38. package/dist/_internal/version.d.ts.map +1 -1
  39. package/dist/_internal/version.js +4 -2
  40. package/dist/_internal/version.js.map +1 -1
  41. package/dist/client.d.ts +8 -8
  42. package/dist/client.d.ts.map +1 -1
  43. package/dist/client.js +10 -10
  44. package/dist/client.js.map +1 -1
  45. package/dist/contract/_singleton.d.ts +31 -6
  46. package/dist/contract/_singleton.d.ts.map +1 -1
  47. package/dist/contract/_singleton.js +30 -6
  48. package/dist/contract/_singleton.js.map +1 -1
  49. package/dist/contract/actions.d.ts +16 -4
  50. package/dist/contract/actions.d.ts.map +1 -1
  51. package/dist/contract/actions.js +13 -12
  52. package/dist/contract/actions.js.map +1 -1
  53. package/dist/contract/assistant.d.ts +3 -3
  54. package/dist/contract/assistant.d.ts.map +1 -1
  55. package/dist/contract/assistant.js +13 -11
  56. package/dist/contract/assistant.js.map +1 -1
  57. package/dist/contract/batch.d.ts +9 -20
  58. package/dist/contract/batch.d.ts.map +1 -1
  59. package/dist/contract/batch.js +14 -6
  60. package/dist/contract/batch.js.map +1 -1
  61. package/dist/contract/capabilities.d.ts +7 -13
  62. package/dist/contract/capabilities.d.ts.map +1 -1
  63. package/dist/contract/capabilities.js +10 -8
  64. package/dist/contract/capabilities.js.map +1 -1
  65. package/dist/contract/constraints.d.ts +7 -13
  66. package/dist/contract/constraints.d.ts.map +1 -1
  67. package/dist/contract/constraints.js +10 -8
  68. package/dist/contract/constraints.js.map +1 -1
  69. package/dist/contract/events.d.ts +9 -13
  70. package/dist/contract/events.d.ts.map +1 -1
  71. package/dist/contract/events.js +12 -13
  72. package/dist/contract/events.js.map +1 -1
  73. package/dist/contract/flows.d.ts +30 -19
  74. package/dist/contract/flows.d.ts.map +1 -1
  75. package/dist/contract/flows.js +46 -29
  76. package/dist/contract/flows.js.map +1 -1
  77. package/dist/contract/index.d.ts +207 -32
  78. package/dist/contract/index.d.ts.map +1 -1
  79. package/dist/contract/index.js +13 -14
  80. package/dist/contract/index.js.map +1 -1
  81. package/dist/contract/metadata.d.ts +6 -20
  82. package/dist/contract/metadata.d.ts.map +1 -1
  83. package/dist/contract/metadata.js +16 -8
  84. package/dist/contract/metadata.js.map +1 -1
  85. package/dist/contract/process-model.d.ts +10 -15
  86. package/dist/contract/process-model.d.ts.map +1 -1
  87. package/dist/contract/process-model.js +11 -9
  88. package/dist/contract/process-model.js.map +1 -1
  89. package/dist/contract/roots/channels.d.ts.map +1 -1
  90. package/dist/contract/roots/channels.js +12 -10
  91. package/dist/contract/roots/channels.js.map +1 -1
  92. package/dist/contract/roots/events.d.ts.map +1 -1
  93. package/dist/contract/roots/events.js +2 -0
  94. package/dist/contract/roots/events.js.map +1 -1
  95. package/dist/contract/roots/index.d.ts +3 -2
  96. package/dist/contract/roots/index.d.ts.map +1 -1
  97. package/dist/contract/roots/index.js +13 -12
  98. package/dist/contract/roots/index.js.map +1 -1
  99. package/dist/contract/roots/mcp-servers.d.ts +11 -29
  100. package/dist/contract/roots/mcp-servers.d.ts.map +1 -1
  101. package/dist/contract/roots/mcp-servers.js +22 -18
  102. package/dist/contract/roots/mcp-servers.js.map +1 -1
  103. package/dist/contract/roots/profiles.d.ts +13 -12
  104. package/dist/contract/roots/profiles.d.ts.map +1 -1
  105. package/dist/contract/roots/profiles.js +18 -7
  106. package/dist/contract/roots/profiles.js.map +1 -1
  107. package/dist/contract/roots/timezone.d.ts +3 -3
  108. package/dist/contract/roots/timezone.d.ts.map +1 -1
  109. package/dist/contract/roots/timezone.js +5 -2
  110. package/dist/contract/roots/timezone.js.map +1 -1
  111. package/dist/contract/roots/treatment.d.ts +3 -2
  112. package/dist/contract/roots/treatment.d.ts.map +1 -1
  113. package/dist/contract/roots/treatment.js +8 -8
  114. package/dist/contract/roots/treatment.js.map +1 -1
  115. package/dist/contract/roots/vocabulary.d.ts +20 -13
  116. package/dist/contract/roots/vocabulary.d.ts.map +1 -1
  117. package/dist/contract/roots/vocabulary.js +28 -9
  118. package/dist/contract/roots/vocabulary.js.map +1 -1
  119. package/dist/contract/schemas.d.ts +7 -10
  120. package/dist/contract/schemas.d.ts.map +1 -1
  121. package/dist/contract/schemas.js +10 -8
  122. package/dist/contract/schemas.js.map +1 -1
  123. package/dist/contract/skills.d.ts +14 -4
  124. package/dist/contract/skills.d.ts.map +1 -1
  125. package/dist/contract/skills.js +11 -11
  126. package/dist/contract/skills.js.map +1 -1
  127. package/dist/errors.d.ts +4 -4
  128. package/dist/errors.d.ts.map +1 -1
  129. package/dist/errors.js +4 -4
  130. package/dist/errors.js.map +1 -1
  131. package/dist/generated/contract.d.ts +4494 -706
  132. package/dist/generated/contract.d.ts.map +1 -1
  133. package/dist/generated/index.d.ts +119 -7
  134. package/dist/generated/index.d.ts.map +1 -1
  135. package/dist/generated/runtime.d.ts +1490 -368
  136. package/dist/generated/runtime.d.ts.map +1 -1
  137. package/dist/generated/unwrap-map.d.ts +5 -2
  138. package/dist/generated/unwrap-map.d.ts.map +1 -1
  139. package/dist/generated/unwrap-map.js +5 -5
  140. package/dist/generated/unwrap-map.js.map +1 -1
  141. package/dist/index.d.ts +9 -6
  142. package/dist/index.d.ts.map +1 -1
  143. package/dist/index.js +7 -3
  144. package/dist/index.js.map +1 -1
  145. package/dist/resources/actions.d.ts +5 -6
  146. package/dist/resources/actions.d.ts.map +1 -1
  147. package/dist/resources/actions.js +9 -10
  148. package/dist/resources/actions.js.map +1 -1
  149. package/dist/resources/audit.d.ts +6 -6
  150. package/dist/resources/audit.d.ts.map +1 -1
  151. package/dist/resources/audit.js +3 -25
  152. package/dist/resources/audit.js.map +1 -1
  153. package/dist/resources/authorization-ceiling.d.ts +2 -2
  154. package/dist/resources/authorization-ceiling.d.ts.map +1 -1
  155. package/dist/resources/authorization-ceiling.js +8 -7
  156. package/dist/resources/authorization-ceiling.js.map +1 -1
  157. package/dist/resources/authorization-operation-ids.d.ts +1 -1
  158. package/dist/resources/authorization-operation-ids.d.ts.map +1 -1
  159. package/dist/resources/authorization-operation-ids.js +4 -2
  160. package/dist/resources/authorization-operation-ids.js.map +1 -1
  161. package/dist/resources/authorization.d.ts +53 -19
  162. package/dist/resources/authorization.d.ts.map +1 -1
  163. package/dist/resources/authorization.js +24 -6
  164. package/dist/resources/authorization.js.map +1 -1
  165. package/dist/resources/authorizations.d.ts +3 -5
  166. package/dist/resources/authorizations.d.ts.map +1 -1
  167. package/dist/resources/authorizations.js +4 -2
  168. package/dist/resources/authorizations.js.map +1 -1
  169. package/dist/resources/channels.d.ts +7 -7
  170. package/dist/resources/channels.d.ts.map +1 -1
  171. package/dist/resources/channels.js +10 -10
  172. package/dist/resources/channels.js.map +1 -1
  173. package/dist/resources/contracts.d.ts +2 -2
  174. package/dist/resources/contracts.d.ts.map +1 -1
  175. package/dist/resources/contracts.js +15 -14
  176. package/dist/resources/contracts.js.map +1 -1
  177. package/dist/resources/conversation-sessions.d.ts +19 -20
  178. package/dist/resources/conversation-sessions.d.ts.map +1 -1
  179. package/dist/resources/conversation-sessions.js +17 -22
  180. package/dist/resources/conversation-sessions.js.map +1 -1
  181. package/dist/resources/conversation.d.ts +4 -4
  182. package/dist/resources/conversation.d.ts.map +1 -1
  183. package/dist/resources/conversation.js +13 -11
  184. package/dist/resources/conversation.js.map +1 -1
  185. package/dist/resources/embedding-credentials.d.ts +3 -3
  186. package/dist/resources/embedding-credentials.d.ts.map +1 -1
  187. package/dist/resources/embedding-credentials.js +8 -6
  188. package/dist/resources/embedding-credentials.js.map +1 -1
  189. package/dist/resources/entities.d.ts +50 -32
  190. package/dist/resources/entities.d.ts.map +1 -1
  191. package/dist/resources/entities.js +51 -32
  192. package/dist/resources/entities.js.map +1 -1
  193. package/dist/resources/events.d.ts +4 -5
  194. package/dist/resources/events.d.ts.map +1 -1
  195. package/dist/resources/events.js +12 -11
  196. package/dist/resources/events.js.map +1 -1
  197. package/dist/resources/flows.d.ts +18 -15
  198. package/dist/resources/flows.d.ts.map +1 -1
  199. package/dist/resources/flows.js +41 -27
  200. package/dist/resources/flows.js.map +1 -1
  201. package/dist/resources/imports.d.ts.map +1 -1
  202. package/dist/resources/imports.js +1 -1
  203. package/dist/resources/imports.js.map +1 -1
  204. package/dist/resources/index.d.ts +3 -2
  205. package/dist/resources/index.d.ts.map +1 -1
  206. package/dist/resources/index.js +6 -2
  207. package/dist/resources/index.js.map +1 -1
  208. package/dist/resources/llm-credentials.d.ts +21 -6
  209. package/dist/resources/llm-credentials.d.ts.map +1 -1
  210. package/dist/resources/llm-credentials.js +25 -10
  211. package/dist/resources/llm-credentials.js.map +1 -1
  212. package/dist/resources/llm-services.d.ts +8 -8
  213. package/dist/resources/llm-services.d.ts.map +1 -1
  214. package/dist/resources/llm-services.js +11 -9
  215. package/dist/resources/llm-services.js.map +1 -1
  216. package/dist/resources/mcp.d.ts.map +1 -1
  217. package/dist/resources/mcp.js +5 -3
  218. package/dist/resources/mcp.js.map +1 -1
  219. package/dist/resources/receipts.d.ts +1 -1
  220. package/dist/resources/receipts.d.ts.map +1 -1
  221. package/dist/resources/receipts.js +1 -1
  222. package/dist/resources/receipts.js.map +1 -1
  223. package/dist/resources/records.d.ts +1 -1
  224. package/dist/resources/records.d.ts.map +1 -1
  225. package/dist/resources/records.js +7 -5
  226. package/dist/resources/records.js.map +1 -1
  227. package/dist/resources/role-assignments.d.ts +4 -5
  228. package/dist/resources/role-assignments.d.ts.map +1 -1
  229. package/dist/resources/role-assignments.js +8 -7
  230. package/dist/resources/role-assignments.js.map +1 -1
  231. package/dist/resources/roles.d.ts +23 -23
  232. package/dist/resources/roles.d.ts.map +1 -1
  233. package/dist/resources/roles.js +20 -14
  234. package/dist/resources/roles.js.map +1 -1
  235. package/dist/resources/runtime-entities.d.ts +12 -9
  236. package/dist/resources/runtime-entities.d.ts.map +1 -1
  237. package/dist/resources/runtime-entities.js +5 -8
  238. package/dist/resources/runtime-entities.js.map +1 -1
  239. package/dist/resources/state-machine.d.ts +6 -12
  240. package/dist/resources/state-machine.d.ts.map +1 -1
  241. package/dist/resources/state-machine.js +17 -21
  242. package/dist/resources/state-machine.js.map +1 -1
  243. package/dist/resources/system.d.ts.map +1 -1
  244. package/dist/resources/system.js +5 -5
  245. package/dist/resources/system.js.map +1 -1
  246. package/dist/resources/tools.d.ts +2 -2
  247. package/dist/resources/tools.d.ts.map +1 -1
  248. package/dist/resources/tools.js +7 -5
  249. package/dist/resources/tools.js.map +1 -1
  250. package/dist/resources/traces.d.ts +1 -7
  251. package/dist/resources/traces.d.ts.map +1 -1
  252. package/dist/resources/traces.js +4 -29
  253. package/dist/resources/traces.js.map +1 -1
  254. package/dist/runtime/index.d.ts +4 -2
  255. package/dist/runtime/index.d.ts.map +1 -1
  256. package/dist/runtime/index.js +21 -17
  257. package/dist/runtime/index.js.map +1 -1
  258. package/dist/types/actions.d.ts +7 -8
  259. package/dist/types/actions.d.ts.map +1 -1
  260. package/dist/types/actions.js +4 -2
  261. package/dist/types/actions.js.map +1 -1
  262. package/dist/types/audit.d.ts +5 -7
  263. package/dist/types/audit.d.ts.map +1 -1
  264. package/dist/types/audit.js +6 -6
  265. package/dist/types/audit.js.map +1 -1
  266. package/dist/types/channels.d.ts +1 -1
  267. package/dist/types/channels.d.ts.map +1 -1
  268. package/dist/types/channels.js +5 -3
  269. package/dist/types/channels.js.map +1 -1
  270. package/dist/types/collections-contract.d.ts +50 -0
  271. package/dist/types/collections-contract.d.ts.map +1 -0
  272. package/dist/types/collections-contract.js +22 -0
  273. package/dist/types/collections-contract.js.map +1 -0
  274. package/dist/types/confirmation.d.ts +4 -4
  275. package/dist/types/confirmation.d.ts.map +1 -1
  276. package/dist/types/confirmation.js +6 -4
  277. package/dist/types/confirmation.js.map +1 -1
  278. package/dist/types/contracts.d.ts +12 -15
  279. package/dist/types/contracts.d.ts.map +1 -1
  280. package/dist/types/contracts.js +5 -4
  281. package/dist/types/contracts.js.map +1 -1
  282. package/dist/types/conversation-sessions.d.ts +1 -1
  283. package/dist/types/conversation-sessions.d.ts.map +1 -1
  284. package/dist/types/conversation-sessions.js +3 -1
  285. package/dist/types/conversation-sessions.js.map +1 -1
  286. package/dist/types/conversation.d.ts +13 -40
  287. package/dist/types/conversation.d.ts.map +1 -1
  288. package/dist/types/entities.d.ts +52 -16
  289. package/dist/types/entities.d.ts.map +1 -1
  290. package/dist/types/entities.js +12 -0
  291. package/dist/types/entities.js.map +1 -1
  292. package/dist/types/events-stream.d.ts +2 -2
  293. package/dist/types/events-stream.d.ts.map +1 -1
  294. package/dist/types/events-stream.js +6 -4
  295. package/dist/types/events-stream.js.map +1 -1
  296. package/dist/types/flows-contract.d.ts +28 -7
  297. package/dist/types/flows-contract.d.ts.map +1 -1
  298. package/dist/types/flows-contract.js +11 -4
  299. package/dist/types/flows-contract.js.map +1 -1
  300. package/dist/types/flows.d.ts +27 -58
  301. package/dist/types/flows.d.ts.map +1 -1
  302. package/dist/types/flows.js +8 -20
  303. package/dist/types/flows.js.map +1 -1
  304. package/dist/types/imports.d.ts +9 -0
  305. package/dist/types/imports.d.ts.map +1 -1
  306. package/dist/types/index.d.ts +8 -4
  307. package/dist/types/index.d.ts.map +1 -1
  308. package/dist/types/locale.d.ts +2 -2
  309. package/dist/types/locale.d.ts.map +1 -1
  310. package/dist/types/locale.js +4 -2
  311. package/dist/types/locale.js.map +1 -1
  312. package/dist/types/mcp-and-events-contract.d.ts +51 -0
  313. package/dist/types/mcp-and-events-contract.d.ts.map +1 -0
  314. package/dist/types/mcp-and-events-contract.js +20 -0
  315. package/dist/types/mcp-and-events-contract.js.map +1 -0
  316. package/dist/types/mcp.d.ts.map +1 -1
  317. package/dist/types/mcp.js +3 -1
  318. package/dist/types/mcp.js.map +1 -1
  319. package/dist/types/platform.d.ts +12 -12
  320. package/dist/types/platform.d.ts.map +1 -1
  321. package/dist/types/platform.js +0 -1
  322. package/dist/types/platform.js.map +1 -1
  323. package/dist/types/receipt.d.ts +3 -5
  324. package/dist/types/receipt.d.ts.map +1 -1
  325. package/dist/types/receipt.js +5 -5
  326. package/dist/types/receipt.js.map +1 -1
  327. package/dist/types/records.d.ts +3 -3
  328. package/dist/types/records.d.ts.map +1 -1
  329. package/dist/types/records.js +2 -0
  330. package/dist/types/records.js.map +1 -1
  331. package/dist/types/spec.d.ts +2 -2
  332. package/dist/types/spec.d.ts.map +1 -1
  333. package/dist/types/state-machine.d.ts +48 -84
  334. package/dist/types/state-machine.d.ts.map +1 -1
  335. package/dist/types/state-machine.js +9 -4
  336. package/dist/types/state-machine.js.map +1 -1
  337. package/dist/types/system.d.ts.map +1 -1
  338. package/dist/types/tools.d.ts +36 -28
  339. package/dist/types/tools.d.ts.map +1 -1
  340. package/dist/types/tools.js +6 -6
  341. package/dist/types/tools.js.map +1 -1
  342. package/dist/types/traces.d.ts +6 -9
  343. package/dist/types/traces.d.ts.map +1 -1
  344. package/dist/types/traces.js +5 -5
  345. package/dist/types/traces.js.map +1 -1
  346. package/dist/types/treatment-contract.d.ts +70 -0
  347. package/dist/types/treatment-contract.d.ts.map +1 -0
  348. package/dist/types/treatment-contract.js +20 -0
  349. package/dist/types/treatment-contract.js.map +1 -0
  350. package/dist/types/workflows.d.ts +14 -0
  351. package/dist/types/workflows.d.ts.map +1 -1
  352. package/dist/types/workflows.js +7 -6
  353. package/dist/types/workflows.js.map +1 -1
  354. package/package.json +93 -96
  355. package/dist/contract/governance.d.ts +0 -6
  356. package/dist/contract/governance.d.ts.map +0 -1
  357. package/dist/contract/governance.js +0 -17
  358. 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 (ADR-0133). Distinct from the runtime-PLANE
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,iFAAiF;AACjF,+EAA+E;AAC/E,kEAAkE;AAClE,yEAAyE;;;AAWzE,8EAA8E;AAC9E,MAAa,0BAA0B;IACN;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gCAAgC,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC,CAAC;IACnH,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAiB;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gCAAgC,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC,CAAC;IAChH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAW;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,kCAAkC,kBAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC,CAAC;IAC1I,CAAC;CACJ;AAdD,gEAcC;AAED,MAAa,wBAAwB;IAGJ;IAFpB,WAAW,CAA6B;IAEjD,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC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EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;IACpI,CAAC;IAED,KAAK,CAAC,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":"AAIA,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
+ {"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":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,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;IAC3B,QAAQ,CAAC,GAAG,EAAE,iBAAiB,CAAC;IAChC,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;CAalC"}
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
- // ADR-0138 — the contract roots the dissolved `runtime:` block became. These are
3
- // hoisted onto `client.contract.*` directly: there is no `contract.runtime`
4
- // namespace any more, because there is no `runtime:` section for it to mirror.
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 and keeps its name (ADR-0138 preserves `runtime`
9
- // as the plane and the scope qualifier).
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
- // ADR-0141 D10 / FR-023: `embeddings` is no longer a singleton — it became
29
- // `contract."embeddings/services"`, authored through contract import and read
30
- // back through export, exactly like its sibling `llm.services[]`. There is no
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,4EAA4E;AAC5E,+EAA+E;AAC/E,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,+EAA+E;AAC/E,yCAAyC;;;AAGzC,8CAAkD;AAClD,+CAAmD;AACnD,2CAAgD;AAChD,yCAA8C;AAC9C,yCAAsD;AAEtD,MAA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E,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
- export interface McpServerRecord {
3
- readonly namespace: string;
4
- readonly transport: 'http' | 'stdio';
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: Record<string, unknown>): Promise<McpAllowedToolRecord>;
30
- put(toolName: string, input: Record<string, unknown>): Promise<McpAllowedToolRecord>;
31
- patch(toolName: string, patch: Record<string, unknown>): Promise<McpAllowedToolRecord>;
32
- delete(toolName: string): Promise<void>;
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: Record<string, unknown>): Promise<McpServerRecord>;
40
- put(namespace: string, input: Record<string, unknown>): Promise<McpServerRecord>;
41
- patch(namespace: string, patch: Record<string, unknown>): Promise<McpServerRecord>;
42
- delete(namespace: string): Promise<void>;
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":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC,QAAQ,CAAC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,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
- // spec-050 T095 — contract.admin.mcpServers (servers + nested allowedTools).
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright 2026 Nicolas Moreno
4
+ // contract.admin.mcpServers (servers + nested allowedTools).
3
5
  //
4
- // Maps to contract-api `/contract/mcp-servers*` (T-6-13) and
5
- // `/contract/mcp-servers/:namespace/allowed-tools*` (T-6-14). The
6
- // The `/contract/` URL prefix marks the contract-plane host;
7
- // keeps the `runtime/` token as a hint that the resource configures runtime
8
- // behaviour (spec-051 US5 / FR-040).
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,6EAA6E;AAC7E,EAAE;AACF,6DAA6D;AAC7D,kEAAkE;AAClE,6DAA6D;AAC7D,4EAA4E;AAC5E,qCAAqC;;;AA0BrC,MAAM,eAAe;IACY;IAAsC;IAAnE,YAA6B,MAAmB,EAAmB,EAAU;QAAhD,WAAM,GAAN,MAAM,CAAa;QAAmB,OAAE,GAAF,EAAE,CAAQ;IAAG,CAAC;IAEzE,IAAI;QACR,OAAO,yBAAyB,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC;IAChF,CAAC;IAED,KAAK,CAAC,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC,CAAC;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,CAAC,KAAK,CAAC,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 JsonObject = Record<string, unknown>;
3
- export interface ProfileRecord {
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
- list(): Promise<ProfileRecord[]>;
11
- get(name: string): Promise<ProfileRecord>;
12
- create(input: JsonObject): Promise<ProfileRecord>;
13
- put(name: string, input: JsonObject): Promise<ProfileRecord>;
14
- patch(name: string, patch: JsonObject): Promise<ProfileRecord>;
15
- delete(name: string): Promise<void>;
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":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC;AAED,qBAAa,gBAAgB;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,IAAI,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAIhC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIzC,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC;IAIjD,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC;IAI5D,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC;IAI9D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG5C"}
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
- // contract.treatment.profiles — the runtime profile collection.
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('/contract/treatment/profiles', undefined, { operationId: 'listProfiles' });
19
+ return await this.client.get(this.base(), undefined, { operationId: 'listProfiles' });
13
20
  }
14
21
  async get(name) {
15
- return this.client.get(`/contract/treatment/profiles/${encodeURIComponent(name)}`, undefined, { operationId: 'getProfile' });
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('/contract/treatment/profiles', input, { operationId: 'createProfile' });
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(`/contract/treatment/profiles/${encodeURIComponent(name)}`, input, { operationId: 'replaceProfile' });
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(`/contract/treatment/profiles/${encodeURIComponent(name)}`, patch, { operationId: 'patchProfile' });
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(`/contract/treatment/profiles/${encodeURIComponent(name)}`, { operationId: 'deleteProfile' });
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,gEAAgE;AAChE,oDAAoD;;;AAWpD,MAAa,gBAAgB;IACI;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,IAAI;QACN,OAAO,IAAI,C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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 JsonObject = Record<string, unknown>;
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: JsonObject): Promise<JsonObject>;
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":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,qBAAa,gBAAgB;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;IAI1B,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CAGpD"}
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;IAC5F,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,KAAiB;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC;IACxF,CAAC;CACJ;AAVD,4CAUC"}
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":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,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;IACpD,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;gBACtB,MAAM,EAAE,WAAW;CAYlC"}
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
- // ADR-0138: `profiles` and `rails` are nested HERE, not hoisted onto `contract`,
7
- // because the ADR-0066 bijection requires the TS access path to be a PREFIX of the
8
- // HTTP path it targets. `contract.rails` -> /contract/treatment/rails invents a
9
- // level and is a structural violation; `contract.treatment.rails` is not. The
10
- // reflective bijection gate catches the difference.
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,iFAAiF;AACjF,mFAAmF;AACnF,gFAAgF;AAChF,8EAA8E;AAC9E,oDAAoD;AACpD,EAAE;AACF,mEAAmE;AACnE,yEAAyE;;;AAGzE,8CAAkD;AAClD,6CAAkD;AAClD,yCAA8C;AAE9C,MAAa,iBAAkB,SAAQ,8BAAiB;IAC3C,UAAU,CAAqB;IAC/B,QAAQ,CAAmB;IAC3B,KAAK,CAAoB;IAClC,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,CAAC,MAAM,EAAE,2BAA2B,EAAE;YACpE,GAAG,EAAE,mBAAmB,EAAE,GAAG,EAAE,mBAAmB,EAAE,KAAK,EAAE,qBAAqB;SACnF,CAAC,CAAC;IACP,CAAC;CACJ;AAhBD,8CAgBC"}
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 { FetchClient } from '../../_internal/fetch-client';
2
- type JsonObject = Record<string, unknown>;
3
- export interface VocabularyEntry {
4
- readonly term: string;
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
- list(): Promise<VocabularyEntry[]>;
11
- get(term: string): Promise<VocabularyEntry>;
12
- create(input: JsonObject): Promise<VocabularyEntry>;
13
- put(term: string, input: JsonObject): Promise<VocabularyEntry>;
14
- patch(term: string, patch: JsonObject): Promise<VocabularyEntry>;
15
- delete(term: string): Promise<void>;
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