@cadenya/cadenya 0.66.0 → 0.68.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 (267) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +42 -81
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +42 -81
  6. package/client.d.ts.map +1 -1
  7. package/client.js +24 -63
  8. package/client.js.map +1 -1
  9. package/client.mjs +24 -63
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/account.d.mts +18 -22
  13. package/resources/account.d.mts.map +1 -1
  14. package/resources/account.d.ts +18 -22
  15. package/resources/account.d.ts.map +1 -1
  16. package/resources/account.js +2 -6
  17. package/resources/account.js.map +1 -1
  18. package/resources/account.mjs +2 -6
  19. package/resources/account.mjs.map +1 -1
  20. package/resources/agents/agents.d.mts +34 -21
  21. package/resources/agents/agents.d.mts.map +1 -1
  22. package/resources/agents/agents.d.ts +34 -21
  23. package/resources/agents/agents.d.ts.map +1 -1
  24. package/resources/agents/agents.js +17 -16
  25. package/resources/agents/agents.js.map +1 -1
  26. package/resources/agents/agents.mjs +17 -16
  27. package/resources/agents/agents.mjs.map +1 -1
  28. package/resources/agents/feedback.d.mts +15 -15
  29. package/resources/agents/feedback.d.mts.map +1 -1
  30. package/resources/agents/feedback.d.ts +15 -15
  31. package/resources/agents/feedback.d.ts.map +1 -1
  32. package/resources/agents/feedback.js +4 -8
  33. package/resources/agents/feedback.js.map +1 -1
  34. package/resources/agents/feedback.mjs +4 -8
  35. package/resources/agents/feedback.mjs.map +1 -1
  36. package/resources/agents/index.d.mts +1 -1
  37. package/resources/agents/index.d.mts.map +1 -1
  38. package/resources/agents/index.d.ts +1 -1
  39. package/resources/agents/index.d.ts.map +1 -1
  40. package/resources/agents/index.js.map +1 -1
  41. package/resources/agents/index.mjs.map +1 -1
  42. package/resources/agents/schedules.d.mts +44 -26
  43. package/resources/agents/schedules.d.mts.map +1 -1
  44. package/resources/agents/schedules.d.ts +44 -26
  45. package/resources/agents/schedules.d.ts.map +1 -1
  46. package/resources/agents/schedules.js +20 -19
  47. package/resources/agents/schedules.js.map +1 -1
  48. package/resources/agents/schedules.mjs +20 -19
  49. package/resources/agents/schedules.mjs.map +1 -1
  50. package/resources/agents/variations.d.mts +88 -43
  51. package/resources/agents/variations.d.mts.map +1 -1
  52. package/resources/agents/variations.d.ts +88 -43
  53. package/resources/agents/variations.d.ts.map +1 -1
  54. package/resources/agents/variations.js +31 -32
  55. package/resources/agents/variations.js.map +1 -1
  56. package/resources/agents/variations.mjs +31 -32
  57. package/resources/agents/variations.mjs.map +1 -1
  58. package/resources/agents/webhook-deliveries.d.mts +10 -11
  59. package/resources/agents/webhook-deliveries.d.mts.map +1 -1
  60. package/resources/agents/webhook-deliveries.d.ts +10 -11
  61. package/resources/agents/webhook-deliveries.d.ts.map +1 -1
  62. package/resources/agents/webhook-deliveries.js +4 -8
  63. package/resources/agents/webhook-deliveries.js.map +1 -1
  64. package/resources/agents/webhook-deliveries.mjs +4 -8
  65. package/resources/agents/webhook-deliveries.mjs.map +1 -1
  66. package/resources/api-keys.d.mts +48 -28
  67. package/resources/api-keys.d.mts.map +1 -1
  68. package/resources/api-keys.d.ts +48 -28
  69. package/resources/api-keys.d.ts.map +1 -1
  70. package/resources/api-keys.js +21 -17
  71. package/resources/api-keys.js.map +1 -1
  72. package/resources/api-keys.mjs +21 -17
  73. package/resources/api-keys.mjs.map +1 -1
  74. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +20 -21
  75. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
  76. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +20 -21
  77. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
  78. package/resources/bulk-workspace-resources/bulk-workspace-resources.js +13 -17
  79. package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
  80. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +13 -17
  81. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
  82. package/resources/bulk-workspace-resources/index.d.mts +1 -1
  83. package/resources/bulk-workspace-resources/index.d.mts.map +1 -1
  84. package/resources/bulk-workspace-resources/index.d.ts +1 -1
  85. package/resources/bulk-workspace-resources/index.d.ts.map +1 -1
  86. package/resources/bulk-workspace-resources/index.js.map +1 -1
  87. package/resources/bulk-workspace-resources/index.mjs.map +1 -1
  88. package/resources/bulk-workspace-resources/results.d.mts +30 -35
  89. package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
  90. package/resources/bulk-workspace-resources/results.d.ts +30 -35
  91. package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
  92. package/resources/bulk-workspace-resources/results.js +6 -10
  93. package/resources/bulk-workspace-resources/results.js.map +1 -1
  94. package/resources/bulk-workspace-resources/results.mjs +6 -10
  95. package/resources/bulk-workspace-resources/results.mjs.map +1 -1
  96. package/resources/index.d.mts +9 -9
  97. package/resources/index.d.mts.map +1 -1
  98. package/resources/index.d.ts +9 -9
  99. package/resources/index.d.ts.map +1 -1
  100. package/resources/index.js.map +1 -1
  101. package/resources/index.mjs +1 -1
  102. package/resources/index.mjs.map +1 -1
  103. package/resources/memory-layers/entries.d.mts +40 -33
  104. package/resources/memory-layers/entries.d.mts.map +1 -1
  105. package/resources/memory-layers/entries.d.ts +40 -33
  106. package/resources/memory-layers/entries.d.ts.map +1 -1
  107. package/resources/memory-layers/entries.js +19 -23
  108. package/resources/memory-layers/entries.js.map +1 -1
  109. package/resources/memory-layers/entries.mjs +19 -23
  110. package/resources/memory-layers/entries.mjs.map +1 -1
  111. package/resources/memory-layers/index.d.mts +1 -1
  112. package/resources/memory-layers/index.d.mts.map +1 -1
  113. package/resources/memory-layers/index.d.ts +1 -1
  114. package/resources/memory-layers/index.d.ts.map +1 -1
  115. package/resources/memory-layers/index.js.map +1 -1
  116. package/resources/memory-layers/index.mjs.map +1 -1
  117. package/resources/memory-layers/memory-layers.d.mts +33 -22
  118. package/resources/memory-layers/memory-layers.d.mts.map +1 -1
  119. package/resources/memory-layers/memory-layers.d.ts +33 -22
  120. package/resources/memory-layers/memory-layers.d.ts.map +1 -1
  121. package/resources/memory-layers/memory-layers.js +17 -20
  122. package/resources/memory-layers/memory-layers.js.map +1 -1
  123. package/resources/memory-layers/memory-layers.mjs +17 -20
  124. package/resources/memory-layers/memory-layers.mjs.map +1 -1
  125. package/resources/models.d.mts +18 -12
  126. package/resources/models.d.mts.map +1 -1
  127. package/resources/models.d.ts +18 -12
  128. package/resources/models.d.ts.map +1 -1
  129. package/resources/models.js +14 -13
  130. package/resources/models.js.map +1 -1
  131. package/resources/models.mjs +14 -13
  132. package/resources/models.mjs.map +1 -1
  133. package/resources/objectives/feedback.d.mts +19 -8
  134. package/resources/objectives/feedback.d.mts.map +1 -1
  135. package/resources/objectives/feedback.d.ts +19 -8
  136. package/resources/objectives/feedback.d.ts.map +1 -1
  137. package/resources/objectives/feedback.js +9 -4
  138. package/resources/objectives/feedback.js.map +1 -1
  139. package/resources/objectives/feedback.mjs +9 -4
  140. package/resources/objectives/feedback.mjs.map +1 -1
  141. package/resources/objectives/index.d.mts +1 -1
  142. package/resources/objectives/index.d.mts.map +1 -1
  143. package/resources/objectives/index.d.ts +1 -1
  144. package/resources/objectives/index.d.ts.map +1 -1
  145. package/resources/objectives/index.js.map +1 -1
  146. package/resources/objectives/index.mjs.map +1 -1
  147. package/resources/objectives/objectives.d.mts +63 -44
  148. package/resources/objectives/objectives.d.mts.map +1 -1
  149. package/resources/objectives/objectives.d.ts +63 -44
  150. package/resources/objectives/objectives.d.ts.map +1 -1
  151. package/resources/objectives/objectives.js +31 -16
  152. package/resources/objectives/objectives.js.map +1 -1
  153. package/resources/objectives/objectives.mjs +31 -16
  154. package/resources/objectives/objectives.mjs.map +1 -1
  155. package/resources/objectives/tasks.d.mts +7 -2
  156. package/resources/objectives/tasks.d.mts.map +1 -1
  157. package/resources/objectives/tasks.d.ts +7 -2
  158. package/resources/objectives/tasks.d.ts.map +1 -1
  159. package/resources/objectives/tasks.js +5 -4
  160. package/resources/objectives/tasks.js.map +1 -1
  161. package/resources/objectives/tasks.mjs +5 -4
  162. package/resources/objectives/tasks.mjs.map +1 -1
  163. package/resources/objectives/tool-calls.d.mts +18 -9
  164. package/resources/objectives/tool-calls.d.mts.map +1 -1
  165. package/resources/objectives/tool-calls.d.ts +18 -9
  166. package/resources/objectives/tool-calls.d.ts.map +1 -1
  167. package/resources/objectives/tool-calls.js +7 -12
  168. package/resources/objectives/tool-calls.js.map +1 -1
  169. package/resources/objectives/tool-calls.mjs +7 -12
  170. package/resources/objectives/tool-calls.mjs.map +1 -1
  171. package/resources/objectives/tools.d.mts +5 -1
  172. package/resources/objectives/tools.d.mts.map +1 -1
  173. package/resources/objectives/tools.d.ts +5 -1
  174. package/resources/objectives/tools.d.ts.map +1 -1
  175. package/resources/objectives/tools.js +3 -2
  176. package/resources/objectives/tools.js.map +1 -1
  177. package/resources/objectives/tools.mjs +3 -2
  178. package/resources/objectives/tools.mjs.map +1 -1
  179. package/resources/search.d.mts +1 -1
  180. package/resources/search.d.mts.map +1 -1
  181. package/resources/search.d.ts +1 -1
  182. package/resources/search.d.ts.map +1 -1
  183. package/resources/search.js +6 -2
  184. package/resources/search.js.map +1 -1
  185. package/resources/search.mjs +6 -2
  186. package/resources/search.mjs.map +1 -1
  187. package/resources/tool-sets/index.d.mts +1 -1
  188. package/resources/tool-sets/index.d.mts.map +1 -1
  189. package/resources/tool-sets/index.d.ts +1 -1
  190. package/resources/tool-sets/index.d.ts.map +1 -1
  191. package/resources/tool-sets/index.js.map +1 -1
  192. package/resources/tool-sets/index.mjs.map +1 -1
  193. package/resources/tool-sets/tool-sets.d.mts +66 -43
  194. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  195. package/resources/tool-sets/tool-sets.d.ts +66 -43
  196. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  197. package/resources/tool-sets/tool-sets.js +23 -23
  198. package/resources/tool-sets/tool-sets.js.map +1 -1
  199. package/resources/tool-sets/tool-sets.mjs +23 -23
  200. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  201. package/resources/tool-sets/tools.d.mts +50 -31
  202. package/resources/tool-sets/tools.d.mts.map +1 -1
  203. package/resources/tool-sets/tools.d.ts +50 -31
  204. package/resources/tool-sets/tools.d.ts.map +1 -1
  205. package/resources/tool-sets/tools.js +22 -21
  206. package/resources/tool-sets/tools.js.map +1 -1
  207. package/resources/tool-sets/tools.mjs +22 -21
  208. package/resources/tool-sets/tools.mjs.map +1 -1
  209. package/resources/uploads.d.mts +21 -19
  210. package/resources/uploads.d.mts.map +1 -1
  211. package/resources/uploads.d.ts +21 -19
  212. package/resources/uploads.d.ts.map +1 -1
  213. package/resources/uploads.js +8 -11
  214. package/resources/uploads.js.map +1 -1
  215. package/resources/uploads.mjs +8 -11
  216. package/resources/uploads.mjs.map +1 -1
  217. package/resources/workspace-secrets.d.mts +33 -13
  218. package/resources/workspace-secrets.d.mts.map +1 -1
  219. package/resources/workspace-secrets.d.ts +33 -13
  220. package/resources/workspace-secrets.d.ts.map +1 -1
  221. package/resources/workspace-secrets.js +16 -13
  222. package/resources/workspace-secrets.js.map +1 -1
  223. package/resources/workspace-secrets.mjs +16 -13
  224. package/resources/workspace-secrets.mjs.map +1 -1
  225. package/resources/workspaces.d.mts +2 -6
  226. package/resources/workspaces.d.mts.map +1 -1
  227. package/resources/workspaces.d.ts +2 -6
  228. package/resources/workspaces.d.ts.map +1 -1
  229. package/resources/workspaces.js +2 -6
  230. package/resources/workspaces.js.map +1 -1
  231. package/resources/workspaces.mjs +2 -6
  232. package/resources/workspaces.mjs.map +1 -1
  233. package/src/client.ts +54 -63
  234. package/src/resources/account.ts +18 -22
  235. package/src/resources/agents/agents.ts +49 -24
  236. package/src/resources/agents/feedback.ts +18 -16
  237. package/src/resources/agents/index.ts +2 -0
  238. package/src/resources/agents/schedules.ts +69 -37
  239. package/src/resources/agents/variations.ts +141 -73
  240. package/src/resources/agents/webhook-deliveries.ts +13 -12
  241. package/src/resources/api-keys.ts +67 -32
  242. package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +40 -25
  243. package/src/resources/bulk-workspace-resources/index.ts +1 -0
  244. package/src/resources/bulk-workspace-resources/results.ts +33 -36
  245. package/src/resources/index.ts +22 -1
  246. package/src/resources/memory-layers/entries.ts +67 -44
  247. package/src/resources/memory-layers/index.ts +2 -0
  248. package/src/resources/memory-layers/memory-layers.ts +53 -25
  249. package/src/resources/models.ts +28 -13
  250. package/src/resources/objectives/feedback.ts +29 -11
  251. package/src/resources/objectives/index.ts +1 -0
  252. package/src/resources/objectives/objectives.ts +100 -50
  253. package/src/resources/objectives/tasks.ts +16 -5
  254. package/src/resources/objectives/tool-calls.ts +33 -20
  255. package/src/resources/objectives/tools.ts +9 -3
  256. package/src/resources/search.ts +6 -1
  257. package/src/resources/tool-sets/index.ts +2 -0
  258. package/src/resources/tool-sets/tool-sets.ts +88 -50
  259. package/src/resources/tool-sets/tools.ts +75 -42
  260. package/src/resources/uploads.ts +25 -20
  261. package/src/resources/workspace-secrets.ts +60 -19
  262. package/src/resources/workspaces.ts +2 -6
  263. package/src/version.ts +1 -1
  264. package/version.d.mts +1 -1
  265. package/version.d.ts +1 -1
  266. package/version.js +1 -1
  267. package/version.mjs +1 -1
@@ -3,23 +3,18 @@ import * as Shared from "../shared.js";
3
3
  import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.js";
4
4
  import { RequestOptions } from "../../internal/request-options.js";
5
5
  /**
6
- * AgentService manages AI agents at the WORKSPACE level.
7
- * Agents are workspace-scoped resources that define AI behavior and tool access.
8
- * All operations are implicitly scoped to the workspace determined by the JWT token.
9
- *
10
- * Authentication: Bearer token (JWT)
11
- * Scope: Workspace-level operations
6
+ * Manage AI agents within a workspace. Agents define AI behavior and tool access.
12
7
  */
13
8
  export declare class WebhookDeliveries extends APIResource {
14
9
  /**
15
10
  * Lists all webhook deliveries for an agent
16
11
  */
17
- list(agentID: string, query?: WebhookDeliveryListParams | null | undefined, options?: RequestOptions): PagePromise<WebhookDeliveriesCursorPagination, WebhookDelivery>;
12
+ list(agentID: string, params: WebhookDeliveryListParams, options?: RequestOptions): PagePromise<WebhookDeliveriesCursorPagination, WebhookDelivery>;
18
13
  }
19
14
  export type WebhookDeliveriesCursorPagination = CursorPagination<WebhookDelivery>;
20
15
  export interface WebhookDelivery {
21
16
  /**
22
- * Webhook delivery data
17
+ * Webhook delivery details.
23
18
  */
24
19
  data: WebhookDeliveryData;
25
20
  /**
@@ -39,7 +34,7 @@ export interface WebhookDeliveryData {
39
34
  */
40
35
  eventType: 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_SUB_OBJECTIVE_CREATED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED';
41
36
  /**
42
- * Response details (no response_body to avoid storing large payloads)
37
+ * Response details. The response body is not retained.
43
38
  */
44
39
  httpStatusCode: number;
45
40
  lastAttemptAt: string;
@@ -66,11 +61,15 @@ export interface WebhookDeliveryData {
66
61
  }
67
62
  export interface WebhookDeliveryListParams extends CursorPaginationParams {
68
63
  /**
69
- * Optional filter by event type
64
+ * Path param: Workspace ID.
65
+ */
66
+ workspaceId: string;
67
+ /**
68
+ * Query param: Optional filter by event type
70
69
  */
71
70
  eventType?: 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_SUB_OBJECTIVE_CREATED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED';
72
71
  /**
73
- * Optional filter by objective ID
72
+ * Query param: Optional filter by objective ID
74
73
  */
75
74
  objectiveId?: string;
76
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-deliveries.d.ts","sourceRoot":"","sources":["../../src/resources/agents/webhook-deliveries.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAC9D,EAAE,cAAc,EAAE;AAGzB;;;;;;;GAOG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iCAAiC,EAAE,eAAe,CAAC;CAOnE;AAED,MAAM,MAAM,iCAAiC,G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ACxC,kCAAkC,GAClC,iCAAiC,GACjC,+CAA+C,GAC/C,kCAAkC,GAClC,gCAAgC,CAAC;IAErC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,iBAAiB,CAAC;IACzC,OAAO,EACL,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
1
+ {"version":3,"file":"webhook-deliveries.d.ts","sourceRoot":"","sources":["../../src/resources/agents/webhook-deliveries.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAC9D,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,yBAAyB,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iCAAiC,EAAE,eAAe,CAAC;CAQnE;AAED,MAAM,MAAM,iCAAiC,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;AAElF,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAE1B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC,iBAAiB,CAAC;CACpC;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,EACL,kCAAkC,GAClC,mCAAmC,GACnC,8CAA8C,GAC9C,oCAAoC,GACpC,kCAAkC,GAClC,kCAAkC,GAClC,4CAA4C,GAC5C,4BAA4B,GAC5B,wCAAwC,GACxC,kCAAkC,GA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require("../../core/pagination.js");
7
7
  const path_1 = require("../../internal/utils/path.js");
8
8
  /**
9
- * AgentService manages AI agents at the WORKSPACE level.
10
- * Agents are workspace-scoped resources that define AI behavior and tool access.
11
- * All operations are implicitly scoped to the workspace determined by the JWT token.
12
- *
13
- * Authentication: Bearer token (JWT)
14
- * Scope: Workspace-level operations
9
+ * Manage AI agents within a workspace. Agents define AI behavior and tool access.
15
10
  */
16
11
  class WebhookDeliveries extends resource_1.APIResource {
17
12
  /**
18
13
  * Lists all webhook deliveries for an agent
19
14
  */
20
- list(agentID, query = {}, options) {
21
- return this._client.getAPIList((0, path_1.path) `/v1/agents/${agentID}/webhook_deliveries`, (pagination_1.CursorPagination), { query, ...options });
15
+ list(agentID, params, options) {
16
+ const { workspaceId, ...query } = params;
17
+ return this._client.getAPIList((0, path_1.path) `/v1/workspaces/${workspaceId}/agents/${agentID}/webhook_deliveries`, (pagination_1.CursorPagination), { query, ...options });
22
18
  }
23
19
  }
24
20
  exports.WebhookDeliveries = WebhookDeliveries;
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-deliveries.js","sourceRoot":"","sources":["../../src/resources/agents/webhook-deliveries.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAmG;AAEnG,uDAAiD;AAEjD;;;;;;;GAOG;AACH,MAAa,iBAAkB,SAAQ,sBAAW;IAChD;;OAEG;IACH,IAAI,CACF,OAAe,EACf,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,cAAc,OAAO,qBAAqB,EAC9C,CAAA,6BAAiC,CAAA,EACjC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AAfD,8CAeC"}
1
+ {"version":3,"file":"webhook-deliveries.js","sourceRoot":"","sources":["../../src/resources/agents/webhook-deliveries.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAmG;AAEnG,uDAAiD;AAEjD;;GAEG;AACH,MAAa,iBAAkB,SAAQ,sBAAW;IAChD;;OAEG;IACH,IAAI,CACF,OAAe,EACf,MAAiC,EACjC,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,kBAAkB,WAAW,WAAW,OAAO,qBAAqB,EACxE,CAAA,6BAAiC,CAAA,EACjC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AAhBD,8CAgBC"}
@@ -3,19 +3,15 @@ import { APIResource } from "../../core/resource.mjs";
3
3
  import { CursorPagination } from "../../core/pagination.mjs";
4
4
  import { path } from "../../internal/utils/path.mjs";
5
5
  /**
6
- * AgentService manages AI agents at the WORKSPACE level.
7
- * Agents are workspace-scoped resources that define AI behavior and tool access.
8
- * All operations are implicitly scoped to the workspace determined by the JWT token.
9
- *
10
- * Authentication: Bearer token (JWT)
11
- * Scope: Workspace-level operations
6
+ * Manage AI agents within a workspace. Agents define AI behavior and tool access.
12
7
  */
13
8
  export class WebhookDeliveries extends APIResource {
14
9
  /**
15
10
  * Lists all webhook deliveries for an agent
16
11
  */
17
- list(agentID, query = {}, options) {
18
- return this._client.getAPIList(path `/v1/agents/${agentID}/webhook_deliveries`, (CursorPagination), { query, ...options });
12
+ list(agentID, params, options) {
13
+ const { workspaceId, ...query } = params;
14
+ return this._client.getAPIList(path `/v1/workspaces/${workspaceId}/agents/${agentID}/webhook_deliveries`, (CursorPagination), { query, ...options });
19
15
  }
20
16
  }
21
17
  //# sourceMappingURL=webhook-deliveries.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-deliveries.mjs","sourceRoot":"","sources":["../../src/resources/agents/webhook-deliveries.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,gBAAgB,EAA4C;OAE9D,EAAE,IAAI,EAAE;AAEf;;;;;;;GAOG;AACH,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD;;OAEG;IACH,IAAI,CACF,OAAe,EACf,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,cAAc,OAAO,qBAAqB,EAC9C,CAAA,gBAAiC,CAAA,EACjC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"webhook-deliveries.mjs","sourceRoot":"","sources":["../../src/resources/agents/webhook-deliveries.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,gBAAgB,EAA4C;OAE9D,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD;;OAEG;IACH,IAAI,CACF,OAAe,EACf,MAAiC,EACjC,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,kBAAkB,WAAW,WAAW,OAAO,qBAAqB,EACxE,CAAA,gBAAiC,CAAA,EACjC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF"}
@@ -5,44 +5,40 @@ import { APIPromise } from "../core/api-promise.mjs";
5
5
  import { CursorPagination, type CursorPaginationParams, PagePromise } from "../core/pagination.mjs";
6
6
  import { RequestOptions } from "../internal/request-options.mjs";
7
7
  /**
8
- * APIKeyService manages workspace-scoped API Keys.
9
- * Each API key belongs to a single workspace, ensuring isolation between environments.
10
- *
11
- * Authentication: Bearer token (JWT)
12
- * Scope: Workspace-level operations
8
+ * Issue, rotate, and revoke API keys for a workspace. Each API key belongs to
9
+ * exactly one workspace, ensuring isolation between environments.
13
10
  */
14
11
  export declare class APIKeys extends APIResource {
15
12
  /**
16
13
  * Creates a new API key in the workspace.
17
14
  */
18
- create(body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKey>;
15
+ create(workspaceID: string, body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKey>;
19
16
  /**
20
17
  * Retrieves an API key by ID from the workspace
21
18
  */
22
- retrieve(id: string, options?: RequestOptions): APIPromise<APIKey>;
19
+ retrieve(id: string, params: APIKeyRetrieveParams, options?: RequestOptions): APIPromise<APIKey>;
23
20
  /**
24
21
  * Updates an API key in the workspace
25
22
  */
26
- update(id: string, body: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey>;
23
+ update(id: string, params: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey>;
27
24
  /**
28
25
  * Lists all API keys in the workspace
29
26
  */
30
- list(query?: APIKeyListParams | null | undefined, options?: RequestOptions): PagePromise<APIKeysCursorPagination, APIKey>;
27
+ list(workspaceID: string, query?: APIKeyListParams | null | undefined, options?: RequestOptions): PagePromise<APIKeysCursorPagination, APIKey>;
31
28
  /**
32
29
  * Deletes an API key from the workspace
33
30
  */
34
- delete(id: string, options?: RequestOptions): APIPromise<void>;
31
+ delete(id: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise<void>;
35
32
  /**
36
33
  * Rotates an API Key and returns a new token. All previous API Key tokens in use
37
34
  * will be invalidated.
38
35
  */
39
- rotate(id: string, options?: RequestOptions): APIPromise<APIKey>;
36
+ rotate(id: string, params: APIKeyRotateParams, options?: RequestOptions): APIPromise<APIKey>;
40
37
  }
41
38
  export type APIKeysCursorPagination = CursorPagination<APIKey>;
42
39
  /**
43
- * APIKey represents a workspace-scoped API key. Each API key belongs to exactly
44
- * one workspace, ensuring workspace isolation. Authentication is handled via
45
- * Cadenya-issued JWTs signed with the key's own signing secret.
40
+ * An API key scoped to a single workspace. The key's token is used to authenticate
41
+ * requests against that workspace's resources.
46
42
  */
47
43
  export interface APIKey {
48
44
  /**
@@ -50,29 +46,30 @@ export interface APIKey {
50
46
  */
51
47
  metadata: Shared.ResourceMetadata;
52
48
  /**
53
- * APIKeySpec contains the API Key-specific fields
49
+ * Configuration for an API key.
54
50
  */
55
51
  spec: APIKeySpec;
56
52
  info?: APIKeyInfo;
57
53
  }
58
54
  export interface APIKeyInfo {
59
55
  /**
60
- * Profile represents a human user at the account level. Profiles are
61
- * account-scoped resources that can be associated with multiple workspaces through
62
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
56
+ * A profile identifies a user or non-human principal (such as an API key) at the
57
+ * account level. Profiles are account-scoped and can be granted access to multiple
58
+ * workspaces.
63
59
  */
64
60
  createdBy?: AccountAPI.Profile;
65
61
  }
66
62
  /**
67
- * APIKeySpec contains the API Key-specific fields
63
+ * Configuration for an API key.
68
64
  */
69
65
  export interface APIKeySpec {
70
66
  /**
71
- * The actual token value (only returned on creation and rotation, read-only)
67
+ * The bearer token used to authenticate as this API key. Returned only on creation
68
+ * and rotation; subsequent reads omit this field.
72
69
  */
73
70
  token?: string;
74
71
  /**
75
- * Description of what this API Key is used for
72
+ * Free-form description of what this API key is used for.
76
73
  */
77
74
  description?: string;
78
75
  }
@@ -84,23 +81,34 @@ export interface APIKeyCreateParams {
84
81
  */
85
82
  metadata: Shared.CreateResourceMetadata;
86
83
  /**
87
- * APIKeySpec contains the API Key-specific fields
84
+ * Configuration for an API key.
88
85
  */
89
86
  spec: APIKeySpec;
90
87
  }
88
+ export interface APIKeyRetrieveParams {
89
+ /**
90
+ * The workspace the API key belongs to.
91
+ */
92
+ workspaceId: string;
93
+ }
91
94
  export interface APIKeyUpdateParams {
92
95
  /**
93
- * UpdateResourceMetadata contains the user-provided fields for updating a
94
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
95
- * profile_id, created_at) are excluded since they are set by the server.
96
+ * Path param: The workspace the API key belongs to.
97
+ */
98
+ workspaceId: string;
99
+ /**
100
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
101
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
102
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
103
+ * server.
96
104
  */
97
105
  metadata?: Shared.UpdateResourceMetadata;
98
106
  /**
99
- * APIKeySpec contains the API Key-specific fields
107
+ * Body param: Configuration for an API key.
100
108
  */
101
109
  spec?: APIKeySpec;
102
110
  /**
103
- * Fields to update
111
+ * Body param: Fields to update.
104
112
  */
105
113
  updateMask?: string;
106
114
  }
@@ -126,7 +134,19 @@ export interface APIKeyListParams extends CursorPaginationParams {
126
134
  */
127
135
  sortOrder?: string;
128
136
  }
137
+ export interface APIKeyDeleteParams {
138
+ /**
139
+ * The workspace the API key belongs to.
140
+ */
141
+ workspaceId: string;
142
+ }
143
+ export interface APIKeyRotateParams {
144
+ /**
145
+ * The workspace the API key belongs to.
146
+ */
147
+ workspaceId: string;
148
+ }
129
149
  export declare namespace APIKeys {
130
- export { type APIKey as APIKey, type APIKeyInfo as APIKeyInfo, type APIKeySpec as APIKeySpec, type APIKeysCursorPagination as APIKeysCursorPagination, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyUpdateParams as APIKeyUpdateParams, type APIKeyListParams as APIKeyListParams, };
150
+ export { type APIKey as APIKey, type APIKeyInfo as APIKeyInfo, type APIKeySpec as APIKeySpec, type APIKeysCursorPagination as APIKeysCursorPagination, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyRetrieveParams as APIKeyRetrieveParams, type APIKeyUpdateParams as APIKeyUpdateParams, type APIKeyListParams as APIKeyListParams, type APIKeyDeleteParams as APIKeyDeleteParams, type APIKeyRotateParams as APIKeyRotateParams, };
131
151
  }
132
152
  //# sourceMappingURL=api-keys.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.d.mts","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UA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AAI,UAAU,EAC7B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -5,44 +5,40 @@ import { APIPromise } from "../core/api-promise.js";
5
5
  import { CursorPagination, type CursorPaginationParams, PagePromise } from "../core/pagination.js";
6
6
  import { RequestOptions } from "../internal/request-options.js";
7
7
  /**
8
- * APIKeyService manages workspace-scoped API Keys.
9
- * Each API key belongs to a single workspace, ensuring isolation between environments.
10
- *
11
- * Authentication: Bearer token (JWT)
12
- * Scope: Workspace-level operations
8
+ * Issue, rotate, and revoke API keys for a workspace. Each API key belongs to
9
+ * exactly one workspace, ensuring isolation between environments.
13
10
  */
14
11
  export declare class APIKeys extends APIResource {
15
12
  /**
16
13
  * Creates a new API key in the workspace.
17
14
  */
18
- create(body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKey>;
15
+ create(workspaceID: string, body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKey>;
19
16
  /**
20
17
  * Retrieves an API key by ID from the workspace
21
18
  */
22
- retrieve(id: string, options?: RequestOptions): APIPromise<APIKey>;
19
+ retrieve(id: string, params: APIKeyRetrieveParams, options?: RequestOptions): APIPromise<APIKey>;
23
20
  /**
24
21
  * Updates an API key in the workspace
25
22
  */
26
- update(id: string, body: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey>;
23
+ update(id: string, params: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey>;
27
24
  /**
28
25
  * Lists all API keys in the workspace
29
26
  */
30
- list(query?: APIKeyListParams | null | undefined, options?: RequestOptions): PagePromise<APIKeysCursorPagination, APIKey>;
27
+ list(workspaceID: string, query?: APIKeyListParams | null | undefined, options?: RequestOptions): PagePromise<APIKeysCursorPagination, APIKey>;
31
28
  /**
32
29
  * Deletes an API key from the workspace
33
30
  */
34
- delete(id: string, options?: RequestOptions): APIPromise<void>;
31
+ delete(id: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise<void>;
35
32
  /**
36
33
  * Rotates an API Key and returns a new token. All previous API Key tokens in use
37
34
  * will be invalidated.
38
35
  */
39
- rotate(id: string, options?: RequestOptions): APIPromise<APIKey>;
36
+ rotate(id: string, params: APIKeyRotateParams, options?: RequestOptions): APIPromise<APIKey>;
40
37
  }
41
38
  export type APIKeysCursorPagination = CursorPagination<APIKey>;
42
39
  /**
43
- * APIKey represents a workspace-scoped API key. Each API key belongs to exactly
44
- * one workspace, ensuring workspace isolation. Authentication is handled via
45
- * Cadenya-issued JWTs signed with the key's own signing secret.
40
+ * An API key scoped to a single workspace. The key's token is used to authenticate
41
+ * requests against that workspace's resources.
46
42
  */
47
43
  export interface APIKey {
48
44
  /**
@@ -50,29 +46,30 @@ export interface APIKey {
50
46
  */
51
47
  metadata: Shared.ResourceMetadata;
52
48
  /**
53
- * APIKeySpec contains the API Key-specific fields
49
+ * Configuration for an API key.
54
50
  */
55
51
  spec: APIKeySpec;
56
52
  info?: APIKeyInfo;
57
53
  }
58
54
  export interface APIKeyInfo {
59
55
  /**
60
- * Profile represents a human user at the account level. Profiles are
61
- * account-scoped resources that can be associated with multiple workspaces through
62
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
56
+ * A profile identifies a user or non-human principal (such as an API key) at the
57
+ * account level. Profiles are account-scoped and can be granted access to multiple
58
+ * workspaces.
63
59
  */
64
60
  createdBy?: AccountAPI.Profile;
65
61
  }
66
62
  /**
67
- * APIKeySpec contains the API Key-specific fields
63
+ * Configuration for an API key.
68
64
  */
69
65
  export interface APIKeySpec {
70
66
  /**
71
- * The actual token value (only returned on creation and rotation, read-only)
67
+ * The bearer token used to authenticate as this API key. Returned only on creation
68
+ * and rotation; subsequent reads omit this field.
72
69
  */
73
70
  token?: string;
74
71
  /**
75
- * Description of what this API Key is used for
72
+ * Free-form description of what this API key is used for.
76
73
  */
77
74
  description?: string;
78
75
  }
@@ -84,23 +81,34 @@ export interface APIKeyCreateParams {
84
81
  */
85
82
  metadata: Shared.CreateResourceMetadata;
86
83
  /**
87
- * APIKeySpec contains the API Key-specific fields
84
+ * Configuration for an API key.
88
85
  */
89
86
  spec: APIKeySpec;
90
87
  }
88
+ export interface APIKeyRetrieveParams {
89
+ /**
90
+ * The workspace the API key belongs to.
91
+ */
92
+ workspaceId: string;
93
+ }
91
94
  export interface APIKeyUpdateParams {
92
95
  /**
93
- * UpdateResourceMetadata contains the user-provided fields for updating a
94
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
95
- * profile_id, created_at) are excluded since they are set by the server.
96
+ * Path param: The workspace the API key belongs to.
97
+ */
98
+ workspaceId: string;
99
+ /**
100
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
101
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
102
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
103
+ * server.
96
104
  */
97
105
  metadata?: Shared.UpdateResourceMetadata;
98
106
  /**
99
- * APIKeySpec contains the API Key-specific fields
107
+ * Body param: Configuration for an API key.
100
108
  */
101
109
  spec?: APIKeySpec;
102
110
  /**
103
- * Fields to update
111
+ * Body param: Fields to update.
104
112
  */
105
113
  updateMask?: string;
106
114
  }
@@ -126,7 +134,19 @@ export interface APIKeyListParams extends CursorPaginationParams {
126
134
  */
127
135
  sortOrder?: string;
128
136
  }
137
+ export interface APIKeyDeleteParams {
138
+ /**
139
+ * The workspace the API key belongs to.
140
+ */
141
+ workspaceId: string;
142
+ }
143
+ export interface APIKeyRotateParams {
144
+ /**
145
+ * The workspace the API key belongs to.
146
+ */
147
+ workspaceId: string;
148
+ }
129
149
  export declare namespace APIKeys {
130
- export { type APIKey as APIKey, type APIKeyInfo as APIKeyInfo, type APIKeySpec as APIKeySpec, type APIKeysCursorPagination as APIKeysCursorPagination, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyUpdateParams as APIKeyUpdateParams, type APIKeyListParams as APIKeyListParams, };
150
+ export { type APIKey as APIKey, type APIKeyInfo as APIKeyInfo, type APIKeySpec as APIKeySpec, type APIKeysCursorPagination as APIKeysCursorPagination, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyRetrieveParams as APIKeyRetrieveParams, type APIKeyUpdateParams as APIKeyUpdateParams, type APIKeyListParams as APIKeyListParams, type APIKeyDeleteParams as APIKeyDeleteParams, type APIKeyRotateParams as APIKeyRotateParams, };
131
151
  }
132
152
  //# sourceMappingURL=api-keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB;;;;;;GAMG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAI9E;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAIlE;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAI1F;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,uBAAuB,EAAE,MAAM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M,CAAC;CACrB;AAED,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -7,42 +7,45 @@ const pagination_1 = require("../core/pagination.js");
7
7
  const headers_1 = require("../internal/headers.js");
8
8
  const path_1 = require("../internal/utils/path.js");
9
9
  /**
10
- * APIKeyService manages workspace-scoped API Keys.
11
- * Each API key belongs to a single workspace, ensuring isolation between environments.
12
- *
13
- * Authentication: Bearer token (JWT)
14
- * Scope: Workspace-level operations
10
+ * Issue, rotate, and revoke API keys for a workspace. Each API key belongs to
11
+ * exactly one workspace, ensuring isolation between environments.
15
12
  */
16
13
  class APIKeys extends resource_1.APIResource {
17
14
  /**
18
15
  * Creates a new API key in the workspace.
19
16
  */
20
- create(body, options) {
21
- return this._client.post('/v1/api_keys', { body, ...options });
17
+ create(workspaceID, body, options) {
18
+ return this._client.post((0, path_1.path) `/v1/workspaces/${workspaceID}/api_keys`, { body, ...options });
22
19
  }
23
20
  /**
24
21
  * Retrieves an API key by ID from the workspace
25
22
  */
26
- retrieve(id, options) {
27
- return this._client.get((0, path_1.path) `/v1/api_keys/${id}`, options);
23
+ retrieve(id, params, options) {
24
+ const { workspaceId } = params;
25
+ return this._client.get((0, path_1.path) `/v1/workspaces/${workspaceId}/api_keys/${id}`, options);
28
26
  }
29
27
  /**
30
28
  * Updates an API key in the workspace
31
29
  */
32
- update(id, body, options) {
33
- return this._client.patch((0, path_1.path) `/v1/api_keys/${id}`, { body, ...options });
30
+ update(id, params, options) {
31
+ const { workspaceId, ...body } = params;
32
+ return this._client.patch((0, path_1.path) `/v1/workspaces/${workspaceId}/api_keys/${id}`, { body, ...options });
34
33
  }
35
34
  /**
36
35
  * Lists all API keys in the workspace
37
36
  */
38
- list(query = {}, options) {
39
- return this._client.getAPIList('/v1/api_keys', (pagination_1.CursorPagination), { query, ...options });
37
+ list(workspaceID, query = {}, options) {
38
+ return this._client.getAPIList((0, path_1.path) `/v1/workspaces/${workspaceID}/api_keys`, (pagination_1.CursorPagination), {
39
+ query,
40
+ ...options,
41
+ });
40
42
  }
41
43
  /**
42
44
  * Deletes an API key from the workspace
43
45
  */
44
- delete(id, options) {
45
- return this._client.delete((0, path_1.path) `/v1/api_keys/${id}`, {
46
+ delete(id, params, options) {
47
+ const { workspaceId } = params;
48
+ return this._client.delete((0, path_1.path) `/v1/workspaces/${workspaceId}/api_keys/${id}`, {
46
49
  ...options,
47
50
  headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
48
51
  });
@@ -51,8 +54,9 @@ class APIKeys extends resource_1.APIResource {
51
54
  * Rotates an API Key and returns a new token. All previous API Key tokens in use
52
55
  * will be invalidated.
53
56
  */
54
- rotate(id, options) {
55
- return this._client.put((0, path_1.path) `/v1/api_keys/${id}/rotate`, options);
57
+ rotate(id, params, options) {
58
+ const { workspaceId } = params;
59
+ return this._client.put((0, path_1.path) `/v1/workspaces/${workspaceId}/api_keys/${id}/rotate`, options);
56
60
  }
57
61
  }
58
62
  exports.APIKeys = APIKeys;
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAgG;AAChG,oDAAmD;AAEnD,oDAA8C;AAE9C;;;;;;GAMG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,6BAAwB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,I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O,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,WAAW,EAAE,CAAA,6BAAwB,CAAA,EAAE;YACrG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,MAA0B,EAAE,OAAwB;QACrE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,aAAa,EAAE,EAAE,EAAE;YAC7E,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,MAA0B,EAAE,OAAwB;QACrE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9F,CAAC;CACF;AAzDD,0BAyDC"}
@@ -4,42 +4,45 @@ import { CursorPagination } from "../core/pagination.mjs";
4
4
  import { buildHeaders } from "../internal/headers.mjs";
5
5
  import { path } from "../internal/utils/path.mjs";
6
6
  /**
7
- * APIKeyService manages workspace-scoped API Keys.
8
- * Each API key belongs to a single workspace, ensuring isolation between environments.
9
- *
10
- * Authentication: Bearer token (JWT)
11
- * Scope: Workspace-level operations
7
+ * Issue, rotate, and revoke API keys for a workspace. Each API key belongs to
8
+ * exactly one workspace, ensuring isolation between environments.
12
9
  */
13
10
  export class APIKeys extends APIResource {
14
11
  /**
15
12
  * Creates a new API key in the workspace.
16
13
  */
17
- create(body, options) {
18
- return this._client.post('/v1/api_keys', { body, ...options });
14
+ create(workspaceID, body, options) {
15
+ return this._client.post(path `/v1/workspaces/${workspaceID}/api_keys`, { body, ...options });
19
16
  }
20
17
  /**
21
18
  * Retrieves an API key by ID from the workspace
22
19
  */
23
- retrieve(id, options) {
24
- return this._client.get(path `/v1/api_keys/${id}`, options);
20
+ retrieve(id, params, options) {
21
+ const { workspaceId } = params;
22
+ return this._client.get(path `/v1/workspaces/${workspaceId}/api_keys/${id}`, options);
25
23
  }
26
24
  /**
27
25
  * Updates an API key in the workspace
28
26
  */
29
- update(id, body, options) {
30
- return this._client.patch(path `/v1/api_keys/${id}`, { body, ...options });
27
+ update(id, params, options) {
28
+ const { workspaceId, ...body } = params;
29
+ return this._client.patch(path `/v1/workspaces/${workspaceId}/api_keys/${id}`, { body, ...options });
31
30
  }
32
31
  /**
33
32
  * Lists all API keys in the workspace
34
33
  */
35
- list(query = {}, options) {
36
- return this._client.getAPIList('/v1/api_keys', (CursorPagination), { query, ...options });
34
+ list(workspaceID, query = {}, options) {
35
+ return this._client.getAPIList(path `/v1/workspaces/${workspaceID}/api_keys`, (CursorPagination), {
36
+ query,
37
+ ...options,
38
+ });
37
39
  }
38
40
  /**
39
41
  * Deletes an API key from the workspace
40
42
  */
41
- delete(id, options) {
42
- return this._client.delete(path `/v1/api_keys/${id}`, {
43
+ delete(id, params, options) {
44
+ const { workspaceId } = params;
45
+ return this._client.delete(path `/v1/workspaces/${workspaceId}/api_keys/${id}`, {
43
46
  ...options,
44
47
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
45
48
  });
@@ -48,8 +51,9 @@ export class APIKeys extends APIResource {
48
51
  * Rotates an API Key and returns a new token. All previous API Key tokens in use
49
52
  * will be invalidated.
50
53
  */
51
- rotate(id, options) {
52
- return this._client.put(path `/v1/api_keys/${id}/rotate`, options);
54
+ rotate(id, params, options) {
55
+ const { workspaceId } = params;
56
+ return this._client.put(path `/v1/workspaces/${workspaceId}/api_keys/${id}/rotate`, options);
53
57
  }
54
58
  }
55
59
  //# sourceMappingURL=api-keys.mjs.map