@archastro/sdk 0.20.0 → 0.21.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 (152) hide show
  1. package/dist/channels/api_artifact_channel.d.ts +48 -0
  2. package/dist/channels/api_artifact_channel.d.ts.map +1 -0
  3. package/dist/channels/api_artifact_channel.js +85 -0
  4. package/dist/channels/api_artifact_channel.js.map +1 -0
  5. package/dist/client.d.ts +6 -0
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +7 -1
  8. package/dist/client.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/types/ai.d.ts +124 -10
  14. package/dist/types/ai.d.ts.map +1 -1
  15. package/dist/types/ai.js +27 -7
  16. package/dist/types/ai.js.map +1 -1
  17. package/dist/types/artifacts.d.ts +351 -0
  18. package/dist/types/artifacts.d.ts.map +1 -1
  19. package/dist/types/artifacts.js +65 -1
  20. package/dist/types/artifacts.js.map +1 -1
  21. package/dist/types/automations.d.ts +22 -22
  22. package/dist/types/automations.d.ts.map +1 -1
  23. package/dist/types/automations.js +7 -7
  24. package/dist/types/automations.js.map +1 -1
  25. package/dist/types/chat.d.ts +388 -0
  26. package/dist/types/chat.d.ts.map +1 -1
  27. package/dist/types/common.d.ts +1132 -287
  28. package/dist/types/common.d.ts.map +1 -1
  29. package/dist/types/common.js +146 -28
  30. package/dist/types/common.js.map +1 -1
  31. package/dist/types/computers.d.ts +22 -0
  32. package/dist/types/computers.d.ts.map +1 -0
  33. package/dist/types/computers.js +12 -0
  34. package/dist/types/computers.js.map +1 -0
  35. package/dist/types/events.d.ts +34 -16
  36. package/dist/types/events.d.ts.map +1 -1
  37. package/dist/types/events.js +3 -1
  38. package/dist/types/events.js.map +1 -1
  39. package/dist/types/index.d.ts +2 -0
  40. package/dist/types/index.d.ts.map +1 -1
  41. package/dist/types/index.js +3 -1
  42. package/dist/types/index.js.map +1 -1
  43. package/dist/types/relays.d.ts +22 -0
  44. package/dist/types/relays.d.ts.map +1 -0
  45. package/dist/types/relays.js +12 -0
  46. package/dist/types/relays.js.map +1 -0
  47. package/dist/types/tasks.d.ts +598 -14
  48. package/dist/types/tasks.d.ts.map +1 -1
  49. package/dist/types/tasks.js +43 -11
  50. package/dist/types/tasks.js.map +1 -1
  51. package/dist/types/threads.d.ts +64 -0
  52. package/dist/types/threads.d.ts.map +1 -1
  53. package/dist/v1/resources/agent_computers.d.ts +33 -1
  54. package/dist/v1/resources/agent_computers.d.ts.map +1 -1
  55. package/dist/v1/resources/agent_computers.js +17 -1
  56. package/dist/v1/resources/agent_computers.js.map +1 -1
  57. package/dist/v1/resources/agent_requests.d.ts +54 -0
  58. package/dist/v1/resources/agent_requests.d.ts.map +1 -0
  59. package/dist/v1/resources/agent_requests.js +71 -0
  60. package/dist/v1/resources/agent_requests.js.map +1 -0
  61. package/dist/v1/resources/agent_sessions.d.ts +23 -1
  62. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  63. package/dist/v1/resources/agent_sessions.js +26 -1
  64. package/dist/v1/resources/agent_sessions.js.map +1 -1
  65. package/dist/v1/resources/agents.d.ts +31 -1
  66. package/dist/v1/resources/agents.d.ts.map +1 -1
  67. package/dist/v1/resources/agents.js +12 -2
  68. package/dist/v1/resources/agents.js.map +1 -1
  69. package/dist/v1/resources/ai.d.ts +55 -4
  70. package/dist/v1/resources/ai.d.ts.map +1 -1
  71. package/dist/v1/resources/ai.js +44 -4
  72. package/dist/v1/resources/ai.js.map +1 -1
  73. package/dist/v1/resources/artifacts.d.ts +34 -2
  74. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  75. package/dist/v1/resources/artifacts.js +3 -2
  76. package/dist/v1/resources/artifacts.js.map +1 -1
  77. package/dist/v1/resources/custom_objects.d.ts +94 -0
  78. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  79. package/dist/v1/resources/custom_objects.js +60 -1
  80. package/dist/v1/resources/custom_objects.js.map +1 -1
  81. package/dist/v1/resources/event_subscriptions.d.ts +12 -0
  82. package/dist/v1/resources/event_subscriptions.d.ts.map +1 -1
  83. package/dist/v1/resources/event_subscriptions.js +7 -1
  84. package/dist/v1/resources/event_subscriptions.js.map +1 -1
  85. package/dist/v1/resources/files.d.ts +32 -10
  86. package/dist/v1/resources/files.d.ts.map +1 -1
  87. package/dist/v1/resources/files.js +32 -11
  88. package/dist/v1/resources/files.js.map +1 -1
  89. package/dist/v1/resources/index.d.ts +3 -0
  90. package/dist/v1/resources/index.d.ts.map +1 -1
  91. package/dist/v1/resources/index.js +4 -1
  92. package/dist/v1/resources/index.js.map +1 -1
  93. package/dist/v1/resources/knowledge_sources.d.ts +4 -0
  94. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -1
  95. package/dist/v1/resources/knowledge_sources.js +1 -1
  96. package/dist/v1/resources/kv.d.ts +75 -31
  97. package/dist/v1/resources/kv.d.ts.map +1 -1
  98. package/dist/v1/resources/kv.js +79 -32
  99. package/dist/v1/resources/kv.js.map +1 -1
  100. package/dist/v1/resources/notifications.d.ts +14 -0
  101. package/dist/v1/resources/notifications.d.ts.map +1 -1
  102. package/dist/v1/resources/notifications.js +13 -1
  103. package/dist/v1/resources/notifications.js.map +1 -1
  104. package/dist/v1/resources/oauth.d.ts +2 -0
  105. package/dist/v1/resources/oauth.d.ts.map +1 -1
  106. package/dist/v1/resources/oauth.js +2 -1
  107. package/dist/v1/resources/oauth.js.map +1 -1
  108. package/dist/v1/resources/orgs.d.ts +630 -1
  109. package/dist/v1/resources/orgs.d.ts.map +1 -1
  110. package/dist/v1/resources/orgs.js +351 -2
  111. package/dist/v1/resources/orgs.js.map +1 -1
  112. package/dist/v1/resources/private_service_enrollments.d.ts +7 -0
  113. package/dist/v1/resources/private_service_enrollments.d.ts.map +1 -1
  114. package/dist/v1/resources/private_service_enrollments.js +10 -1
  115. package/dist/v1/resources/private_service_enrollments.js.map +1 -1
  116. package/dist/v1/resources/relays.d.ts +38 -0
  117. package/dist/v1/resources/relays.d.ts.map +1 -0
  118. package/dist/v1/resources/relays.js +44 -0
  119. package/dist/v1/resources/relays.js.map +1 -0
  120. package/dist/v1/resources/scripts.d.ts +20 -9
  121. package/dist/v1/resources/scripts.d.ts.map +1 -1
  122. package/dist/v1/resources/scripts.js +18 -10
  123. package/dist/v1/resources/scripts.js.map +1 -1
  124. package/dist/v1/resources/task_ownership_conversions.d.ts +14 -0
  125. package/dist/v1/resources/task_ownership_conversions.d.ts.map +1 -0
  126. package/dist/v1/resources/task_ownership_conversions.js +19 -0
  127. package/dist/v1/resources/task_ownership_conversions.js.map +1 -0
  128. package/dist/v1/resources/tasks.d.ts +62 -1
  129. package/dist/v1/resources/tasks.d.ts.map +1 -1
  130. package/dist/v1/resources/tasks.js +35 -1
  131. package/dist/v1/resources/tasks.js.map +1 -1
  132. package/dist/v1/resources/teams.d.ts +129 -1
  133. package/dist/v1/resources/teams.d.ts.map +1 -1
  134. package/dist/v1/resources/teams.js +71 -1
  135. package/dist/v1/resources/teams.js.map +1 -1
  136. package/dist/v1/resources/threads.d.ts +76 -0
  137. package/dist/v1/resources/threads.d.ts.map +1 -1
  138. package/dist/v1/resources/threads.js +42 -1
  139. package/dist/v1/resources/threads.js.map +1 -1
  140. package/dist/v1/resources/users.d.ts +129 -3
  141. package/dist/v1/resources/users.d.ts.map +1 -1
  142. package/dist/v1/resources/users.js +73 -3
  143. package/dist/v1/resources/users.js.map +1 -1
  144. package/dist/v1/resources/workflows.d.ts +5 -1
  145. package/dist/v1/resources/workflows.d.ts.map +1 -1
  146. package/dist/v1/resources/workflows.js +6 -2
  147. package/dist/v1/resources/workflows.js.map +1 -1
  148. package/dist/v1.d.ts +6 -0
  149. package/dist/v1.d.ts.map +1 -1
  150. package/dist/v1.js +10 -1
  151. package/dist/v1.js.map +1 -1
  152. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: 0a43815e1d53
3
+ // Content hash: 5498da2b5813
4
4
  export class StreamResource {
5
5
  http;
6
6
  constructor(http) {
@@ -108,17 +108,21 @@ export class EvaluationResource {
108
108
  * model and returns typed answers. This is not chat completion and not
109
109
  * JSON-schema structured output: there is no generated text.
110
110
  * Each question is a `boolean`, `choice`, or `score` object with its own
111
- * `id`. Answers come back as the same three typed objects, each carrying
112
- * that `id`.
111
+ * `id`. Answers carry that `id`, including a `refusal` answer containing
112
+ * only `id` and `type` when the model declines to judge a question.
113
+ * Image input, labelled score levels, and refusal answers are model-dependent.
114
+ * Images are separate from `state` and use the chat completion image-part format.
115
+ * Models without image support reject image input with `400 unsupported_capability`.
113
116
  * The authenticated app must have the `llm_calls` entitlement enabled on its
114
117
  * plan. Requests that exceed the plan quota are rejected with `402`. Token
115
118
  * usage is recorded against the authenticated app and organization.
116
119
  * @param input - Request body.
120
+ * @param input.images - Optional image content parts. Omitted or empty means no images. Requires model image support.
117
121
  * @param input.model - Evaluation model identifier. Omit to use the platform default.
118
122
  * @param input.questions - Nonempty list of boolean, choice, or score questions. Each question must include `id`, `type`, and `instructions`.
119
123
  * @param input.session_id - Optional UUID grouping this evaluation under one session in the Developers dashboard. Generated when omitted.
120
124
  * @param input.state - Shared content the model judges. A string, JSON object, or JSON array. Every question in the request sees this same state.
121
- * @returns Typed answers as a list of boolean, choice, or score objects, plus model and usage.
125
+ * @returns Typed boolean, choice, score, or refusal answers, plus model and usage.
122
126
  */
123
127
  async evaluations(input) {
124
128
  return this.http.request(`/api/v1/ai/evaluation/evaluations`, { method: "POST", body: input });
@@ -236,5 +240,41 @@ export class AiResource {
236
240
  async sessionToken(input) {
237
241
  return this.http.request(`/api/v1/ai/session_token`, { method: "POST", body: input });
238
242
  }
243
+ /**
244
+ * Read the authenticated user's LLM usage
245
+ * Returns the authenticated user's own LLM usage aggregated over a bounded
246
+ * time window. Each row carries request and token sums plus the customer-billed
247
+ * cost for the group. Cost is derived from the customer's active billing plan;
248
+ * provider-reported cost is never returned.
249
+ * Pass `group_by` one or more times to choose the grouping dimensions
250
+ * (`task`, `model`, `agent_kind`, `agent_id`, `hour`). The window (`since` to
251
+ * `until`) may span at most 31 days. Results are capped at `limit` groups.
252
+ * @param params - Query parameters.
253
+ * @param params.since - Window start as an ISO 8601 timestamp (inclusive). Defaults to 7 days before `until`.
254
+ * @param params.until - Window end as an ISO 8601 timestamp (inclusive). Defaults to now.
255
+ * @param params.groupBy - Grouping dimensions. Repeat for multiple dimensions (e.g. `group_by[]=task&group_by[]=model`). Defaults to `model`.
256
+ * @param params.task - Restrict results to these caller task IDs. Omit to include every task.
257
+ * @param params.limit - Maximum number of groups to return. Defaults to 50; maximum is 200.
258
+ * @returns Successful response
259
+ */
260
+ async usage(params) {
261
+ const query = {};
262
+ if (params?.since !== undefined) {
263
+ query["since"] = params?.since;
264
+ }
265
+ if (params?.until !== undefined) {
266
+ query["until"] = params?.until;
267
+ }
268
+ if (params?.groupBy !== undefined) {
269
+ query["group_by"] = params?.groupBy;
270
+ }
271
+ if (params?.task !== undefined) {
272
+ query["task"] = params?.task;
273
+ }
274
+ if (params?.limit !== undefined) {
275
+ query["limit"] = params?.limit;
276
+ }
277
+ return this.http.request(`/api/v1/ai/usage`, { query });
278
+ }
239
279
  }
240
280
  //# sourceMappingURL=ai.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai.js","sourceRoot":"","sources":["../../../src/v1/resources/ai.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,cAAc;IACL;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,CAAC,MAAM,CAAC,KAA04B;QACt5B,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,C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,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC;QACjC,CAAC;QACD,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC;QACjC,CAAC;QACD,IAAI,MAAM,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,KAAK,CAAC,UAAU,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC;QACtC,CAAC;QACD,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QACD,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC;QACjC,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF"}
@@ -18,6 +18,7 @@ export declare class ArtifactResource {
18
18
  * `thread` or `agent`. Legacy requests that wrap fields in an `artifact` object
19
19
  * are still accepted.
20
20
  * @param input - Request body.
21
+ * @param input.acl - Initial access control list. Grants add read or write access beyond the owner.
21
22
  * @param input.agent - Agent ID (`agt_...`) to associate with the artifact.
22
23
  * @param input.artifact - Legacy wrapper object containing artifact attributes. Prefer top-level fields.
23
24
  * @param input.description - Optional longer artifact description.
@@ -26,7 +27,6 @@ export declare class ArtifactResource {
26
27
  * @param input.idempotency_key - Optional PR-evidence retry key, limited to 255 characters. Requires both team and thread. Matching app, team, thread, name, and key values return the original artifact.
27
28
  * @param input.name - Human-readable artifact name.
28
29
  * @param input.org - Organization owning a system artifact. Requires an organization admin or system viewer.
29
- * @param input.permissions - Optional artifact permissions map.
30
30
  * @param input.system - When true, create a system-owned artifact. Mutually exclusive with `team` and `user`.
31
31
  * @param input.team - Team ID (`tem_...`) that should own the artifact. Mutually exclusive with `user`.
32
32
  * @param input.thread - Thread ID (`thr_...`) to associate with the artifact.
@@ -34,6 +34,22 @@ export declare class ArtifactResource {
34
34
  * @returns The newly created artifact.
35
35
  */
36
36
  create(input: {
37
+ acl?: {
38
+ add?: {
39
+ actions: string[];
40
+ principal?: string | undefined;
41
+ principal_type: string;
42
+ }[] | undefined;
43
+ grants?: {
44
+ actions: string[];
45
+ principal?: string | undefined;
46
+ principal_type: string;
47
+ }[] | undefined;
48
+ remove?: {
49
+ principal?: string | undefined;
50
+ principal_type: string;
51
+ }[] | undefined;
52
+ } | undefined;
37
53
  agent?: string | undefined;
38
54
  artifact?: Record<string, unknown> | undefined;
39
55
  description?: string | undefined;
@@ -47,7 +63,6 @@ export declare class ArtifactResource {
47
63
  idempotency_key?: string | undefined;
48
64
  name?: string | undefined;
49
65
  org?: string | undefined;
50
- permissions?: Record<string, unknown> | undefined;
51
66
  system?: boolean | undefined;
52
67
  team?: string | undefined;
53
68
  thread?: string | undefined;
@@ -90,6 +105,7 @@ export declare class ArtifactResource {
90
105
  * artifact's owner.
91
106
  * @param artifact - Artifact ID (`art_...`) of the artifact to update.
92
107
  * @param input - Request body.
108
+ * @param input.acl - Access control list replacement (`grants`) or add/remove operations. Omit to leave grants unchanged. ACL-only updates do not increment the content version.
93
109
  * @param input.description - New description for the artifact. Omit to leave the existing description unchanged.
94
110
  * @param input.file - Replacement file payload. Omit to leave the current file unchanged.
95
111
  * @param input.file_content - Legacy flat Base64 file content. Prefer `file.data`.
@@ -101,6 +117,22 @@ export declare class ArtifactResource {
101
117
  * @returns The artifact after applying the update, reflecting the new version number and any changed metadata or file.
102
118
  */
103
119
  replace(artifact: string, input: {
120
+ acl?: {
121
+ add?: {
122
+ actions: string[];
123
+ principal?: string | undefined;
124
+ principal_type: string;
125
+ }[] | undefined;
126
+ grants?: {
127
+ actions: string[];
128
+ principal?: string | undefined;
129
+ principal_type: string;
130
+ }[] | undefined;
131
+ remove?: {
132
+ principal?: string | undefined;
133
+ principal_type: string;
134
+ }[] | undefined;
135
+ } | undefined;
104
136
  description?: string | undefined;
105
137
  file?: {
106
138
  data: string;
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/artifacts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,qBAAa,gBAAgB;IACf,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,MAAM,CAAC,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,GAAG,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;Q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ro Inc. Licensed under the MIT License.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: a7e803c2e79d
3
+ // Content hash: c4c86309e387
4
4
  export class ArtifactResource {
5
5
  http;
6
6
  constructor(http) {
@@ -21,6 +21,7 @@ export class ArtifactResource {
21
21
  * `thread` or `agent`. Legacy requests that wrap fields in an `artifact` object
22
22
  * are still accepted.
23
23
  * @param input - Request body.
24
+ * @param input.acl - Initial access control list. Grants add read or write access beyond the owner.
24
25
  * @param input.agent - Agent ID (`agt_...`) to associate with the artifact.
25
26
  * @param input.artifact - Legacy wrapper object containing artifact attributes. Prefer top-level fields.
26
27
  * @param input.description - Optional longer artifact description.
@@ -29,7 +30,6 @@ export class ArtifactResource {
29
30
  * @param input.idempotency_key - Optional PR-evidence retry key, limited to 255 characters. Requires both team and thread. Matching app, team, thread, name, and key values return the original artifact.
30
31
  * @param input.name - Human-readable artifact name.
31
32
  * @param input.org - Organization owning a system artifact. Requires an organization admin or system viewer.
32
- * @param input.permissions - Optional artifact permissions map.
33
33
  * @param input.system - When true, create a system-owned artifact. Mutually exclusive with `team` and `user`.
34
34
  * @param input.team - Team ID (`tem_...`) that should own the artifact. Mutually exclusive with `user`.
35
35
  * @param input.thread - Thread ID (`thr_...`) to associate with the artifact.
@@ -80,6 +80,7 @@ export class ArtifactResource {
80
80
  * artifact's owner.
81
81
  * @param artifact - Artifact ID (`art_...`) of the artifact to update.
82
82
  * @param input - Request body.
83
+ * @param input.acl - Access control list replacement (`grants`) or add/remove operations. Omit to leave grants unchanged. ACL-only updates do not increment the content version.
83
84
  * @param input.description - New description for the artifact. Omit to leave the existing description unchanged.
84
85
  * @param input.file - Replacement file payload. Omit to leave the current file unchanged.
85
86
  * @param input.file_content - Legacy flat Base64 file content. Prefer `file.data`.
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../src/v1/resources/artifacts.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;A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AI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,OAAO,CAAC,QAAgB;QAC5B,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,QAAQ,UAAU,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,OAAO,CAAC,QAAgB,EAAE,MAA6B;QAC3D,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,KAAK,CAAC,SAAS,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC;QACrC,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,qBAAqB,QAAQ,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAClF,CAAC;CACF"}
@@ -23,8 +23,12 @@ export declare class CustomObjectResource {
23
23
  * @param params - Query parameters.
24
24
  * @param params.type - Schema type identifier (`lookup_key`) to filter by. Only objects of this type are returned. Alias of `schema_key`; either name is accepted.
25
25
  * @param params.schemaKey - Legacy alias for `type`. Prefer `type` on new clients. When both are supplied, `type` wins.
26
+ * @param params.fieldFilters - JSON containment predicates on fields, applied before pagination and counting.
27
+ * @param params.systemOnly - Only system-owned objects (no user, team, agent or thread owner). Visibility is unchanged.
28
+ * @param params.orderByField - Top-level JSON field for descending text order, with ID tie-breaker. Full-text relevance takes precedence.
26
29
  * @param params.rowKey - Exact `row_key` value to match. When supplied, only objects with this partition key are returned.
27
30
  * @param params.sortKey - One or more `sort_key` values to match within the `row_key` partition. Requires `row_key` to be set.
31
+ * @param params.keys - JSON-encoded array of up to 100 objects with required string row_key and optional string-array sort_key. Missing or empty sort_key selects the whole partition. Mutually exclusive with row_key and sort_key. Pagination applies globally across all matched partitions.
28
32
  * @param params.team - One or more team IDs (`team_...`) to filter by owning team. Returns objects owned by any of the supplied teams.
29
33
  * @param params.user - One or more user IDs (`user_...`) to filter by owning user. Returns objects owned by any of the supplied users.
30
34
  * @param params.agent - One or more agent IDs to filter by owning agent. Returns objects owned by any of the supplied agents.
@@ -32,14 +36,20 @@ export declare class CustomObjectResource {
32
36
  * @param params.query - Full-text search string matched against the schema's configured search fields. When supplied, results are ordered by relevance score descending instead of creation time descending.
33
37
  * @param params.search - Case-insensitive substring search applied across the schema type and serialized field values. Deprecated — prefer `query` for full-text search. Retained for developer-namespace clients.
34
38
  * @param params.page - Page number to retrieve (1-indexed). Defaults to `1`.
39
+ * @param params.updatedSince - Include only objects updated at or after this ISO 8601 timestamp. Applies before pagination and counting.
35
40
  * @param params.pageSize - Number of objects per page. Defaults to `25`; maximum is `100`.
41
+ * @param params.includeCount - Include total_entries and total_pages (default true). When false, totals are null, has_next uses one extra row, and pages beyond the end return an empty list without clamping. The page offset must fit PostgreSQL's signed 64-bit integer range.
36
42
  * @returns Paginated list of custom objects matching the supplied filters.
37
43
  */
38
44
  list(params?: {
39
45
  type?: string;
40
46
  schemaKey?: string;
47
+ fieldFilters?: Record<string, unknown>;
48
+ systemOnly?: boolean;
49
+ orderByField?: string;
41
50
  rowKey?: string;
42
51
  sortKey?: string[];
52
+ keys?: Record<string, unknown>[];
43
53
  team?: string[];
44
54
  user?: string[];
45
55
  agent?: string[];
@@ -47,7 +57,9 @@ export declare class CustomObjectResource {
47
57
  query?: string;
48
58
  search?: string;
49
59
  page?: number;
60
+ updatedSince?: string;
50
61
  pageSize?: number;
62
+ includeCount?: boolean;
51
63
  }): Promise<CustomObjectListResponse>;
52
64
  /**
53
65
  * Create a custom object
@@ -71,6 +83,7 @@ export declare class CustomObjectResource {
71
83
  * @param input.acl - Access control list for the custom object. Supports explicit `read` and `write` grants to users, teams, organizations, organization roles, agents, or everyone.
72
84
  * @param input.agent - Agent user ID to set as the object owner. Used when neither `team` nor `user` is supplied.
73
85
  * @param input.config - Config ID (`cfg_...`) that resolves to the target schema. Provide one of `type`, `schema_key`, or `config`.
86
+ * @param input.expires_at - Absolute expiry time in RFC 3339 format. Pass null to clear; omit to leave unchanged on update.
74
87
  * @param input.fields - Key-value map of field values for the new object. Must conform to the schema's field definitions. Omit to create an object with all fields at their default or null values.
75
88
  * @param input.org - Organization ID (`org_...`) to associate with the object. Typically required for system-owned objects.
76
89
  * @param input.schema_key - Legacy alias for `type` (schema `lookup_key`). Prefer `type` on new clients. Provide one of `type`, `schema_key`, or `config`.
@@ -100,6 +113,7 @@ export declare class CustomObjectResource {
100
113
  } | undefined;
101
114
  agent?: string | undefined;
102
115
  config?: string | undefined;
116
+ expires_at?: string | null | undefined;
103
117
  fields?: Record<string, unknown> | undefined;
104
118
  org?: string | undefined;
105
119
  schema_key?: string | undefined;
@@ -109,6 +123,80 @@ export declare class CustomObjectResource {
109
123
  upsert?: boolean | undefined;
110
124
  user?: string | undefined;
111
125
  }): Promise<CustomObject>;
126
+ /**
127
+ * Apply numeric patch ops to a custom object
128
+ * Applies numeric patch ops (`increment`, `max`, `min`, `set_if_newer` with
129
+ * dotted `path`s) atomically to a custom object and returns the updated
130
+ * object along with per-op results. The authenticated viewer must have
131
+ * permission to modify the object.
132
+ * Address the row in one of two ways: by `object` ID (`cobj_...`), or by
133
+ * `schema` + `row_key` (with optional `sort_key` for schemas that declare
134
+ * one). The keyed form resolves the row for the same owner the create
135
+ * contract would use and, when no row exists yet, creates it from
136
+ * `create_with` merged over the key fields before applying the ops — so an
137
+ * aggregator's first call creates the counter and later calls increment it.
138
+ * A racing create resolves to the same row instead of a duplicate.
139
+ * Pass `idempotency_key` to make retries safe: a retry with the same key and
140
+ * ops replays the stored result without re-applying the write (survives
141
+ * server restarts); reusing a key with different ops returns 409.
142
+ * @param input - Request body.
143
+ * @param input.agent - Agent user ID owning the keyed row. At most one owner selector may be present.
144
+ * @param input.create_with - Field values used to create the row when the keyed form finds no existing row. Merged over the key fields before validation; ignored by the `object` form.
145
+ * @param input.idempotency_key - Client-supplied deduplication key for this patch. A retry with the same key and the same ops replays the stored result without re-applying the write (survives server restarts); reusing a key with different ops returns 409.
146
+ * @param input.object - Custom object ID (`cobj_...`) to patch. Exactly one of `object` or `schema` + `row_key` is required.
147
+ * @param input.ops - Numeric patch ops to apply in order (e.g. `[%{"op" => "increment", "path" => "count", "by" => 1}]`). Supported ops: `increment` (`by`), `max`/`min` (`value`), `set_if_newer` (`value`, `fence_path`, `fence`).
148
+ * @param input.row_key - Row key naming the row within `schema` (e.g. a counter name). Requires `schema`.
149
+ * @param input.schema - Schema type identifier (`lookup_key`) for the keyed form. Requires `row_key`.
150
+ * @param input.sort_key - Sort-key segments partitioning rows within the `row_key` bucket. Only meaningful for schemas that declare a `sort_key`.
151
+ * @param input.team - Team ID (`tem_...`) owning the keyed row. Defaults to the viewer's owner like the create contract.
152
+ * @param input.user - User ID (`usr_...`) owning the keyed row. At most one owner selector may be present.
153
+ * @returns Successful response
154
+ */
155
+ patch(input: {
156
+ agent?: string | undefined;
157
+ create_with?: Record<string, unknown> | undefined;
158
+ idempotency_key?: string | undefined;
159
+ object?: string | undefined;
160
+ ops: Record<string, unknown>[];
161
+ row_key?: string | undefined;
162
+ schema?: string | undefined;
163
+ sort_key?: string[] | undefined;
164
+ team?: string | undefined;
165
+ user?: string | undefined;
166
+ }): Promise<{
167
+ data: {
168
+ acl?: {
169
+ add?: {
170
+ actions: string[];
171
+ principal?: string | undefined;
172
+ principal_type: string;
173
+ }[] | undefined;
174
+ grants?: {
175
+ actions: string[];
176
+ principal?: string | undefined;
177
+ principal_type: string;
178
+ }[] | undefined;
179
+ remove?: {
180
+ principal?: string | undefined;
181
+ principal_type: string;
182
+ }[] | undefined;
183
+ } | undefined;
184
+ agent?: string | undefined;
185
+ created_at?: string | undefined;
186
+ expires_at?: string | null | undefined;
187
+ fields?: Record<string, unknown> | undefined;
188
+ id: string;
189
+ org?: string | undefined;
190
+ row_key?: string | undefined;
191
+ sandbox?: string | undefined;
192
+ schema_type?: string | undefined;
193
+ team?: string | undefined;
194
+ updated_at?: string | undefined;
195
+ user?: string | undefined;
196
+ version?: number | undefined;
197
+ };
198
+ meta?: Record<string, unknown> | undefined;
199
+ }>;
112
200
  /**
113
201
  * Delete a custom object
114
202
  * Permanently deletes the custom object identified by `object`. The caller
@@ -155,8 +243,10 @@ export declare class CustomObjectResource {
155
243
  * @param input - Request body.
156
244
  * @param input.acl - Updated access control list. Supports full replacement via `grants` or targeted `add`/`remove` operations.
157
245
  * @param input.expected_version - Version number the caller expects to be current. If the object's actual current version does not match, the request returns 409 to signal a concurrent modification. Omit to skip optimistic locking and keep the existing OCC merge retry.
246
+ * @param input.expires_at - Absolute expiry time in RFC 3339 format. Pass null to clear; omit to leave unchanged on update.
158
247
  * @param input.field_ops - Granular array operations to apply per field (e.g. append, prepend, remove). A field must not appear in both `fields` and `field_ops`.
159
248
  * @param input.fields - Key-value map of field values to merge into the object. Only the supplied keys are affected.
249
+ * @param input.idempotency_key - Client-supplied deduplication key for this write. A retry with the same key and the same body replays the stored result without re-applying the write (survives server restarts); reusing a key with a different body returns 409.
160
250
  * @param input.type - Schema type identifier (`lookup_key`) of the object. Optional; used for routing context only.
161
251
  * @returns Successful response
162
252
  */
@@ -178,8 +268,10 @@ export declare class CustomObjectResource {
178
268
  }[] | undefined;
179
269
  } | undefined;
180
270
  expected_version?: number | undefined;
271
+ expires_at?: string | null | undefined;
181
272
  field_ops?: Record<string, unknown> | undefined;
182
273
  fields?: Record<string, unknown> | undefined;
274
+ idempotency_key?: string | undefined;
183
275
  type?: string | undefined;
184
276
  }): Promise<{
185
277
  data: {
@@ -199,7 +291,9 @@ export declare class CustomObjectResource {
199
291
  principal_type: string;
200
292
  }[] | undefined;
201
293
  } | undefined;
294
+ agent?: string | undefined;
202
295
  created_at?: string | undefined;
296
+ expires_at?: string | null | undefined;
203
297
  fields?: Record<string, unknown> | undefined;
204
298
  id: string;
205
299
  org?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"custom_objects.d.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S,CAAC;YAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;KAAE,CAAC;CAG30C"}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: c398450206df
3
+ // Content hash: 3d3dbbdec656
4
4
  export class CustomObjectResource {
5
5
  http;
6
6
  constructor(http) {
@@ -26,8 +26,12 @@ export class CustomObjectResource {
26
26
  * @param params - Query parameters.
27
27
  * @param params.type - Schema type identifier (`lookup_key`) to filter by. Only objects of this type are returned. Alias of `schema_key`; either name is accepted.
28
28
  * @param params.schemaKey - Legacy alias for `type`. Prefer `type` on new clients. When both are supplied, `type` wins.
29
+ * @param params.fieldFilters - JSON containment predicates on fields, applied before pagination and counting.
30
+ * @param params.systemOnly - Only system-owned objects (no user, team, agent or thread owner). Visibility is unchanged.
31
+ * @param params.orderByField - Top-level JSON field for descending text order, with ID tie-breaker. Full-text relevance takes precedence.
29
32
  * @param params.rowKey - Exact `row_key` value to match. When supplied, only objects with this partition key are returned.
30
33
  * @param params.sortKey - One or more `sort_key` values to match within the `row_key` partition. Requires `row_key` to be set.
34
+ * @param params.keys - JSON-encoded array of up to 100 objects with required string row_key and optional string-array sort_key. Missing or empty sort_key selects the whole partition. Mutually exclusive with row_key and sort_key. Pagination applies globally across all matched partitions.
31
35
  * @param params.team - One or more team IDs (`team_...`) to filter by owning team. Returns objects owned by any of the supplied teams.
32
36
  * @param params.user - One or more user IDs (`user_...`) to filter by owning user. Returns objects owned by any of the supplied users.
33
37
  * @param params.agent - One or more agent IDs to filter by owning agent. Returns objects owned by any of the supplied agents.
@@ -35,7 +39,9 @@ export class CustomObjectResource {
35
39
  * @param params.query - Full-text search string matched against the schema's configured search fields. When supplied, results are ordered by relevance score descending instead of creation time descending.
36
40
  * @param params.search - Case-insensitive substring search applied across the schema type and serialized field values. Deprecated — prefer `query` for full-text search. Retained for developer-namespace clients.
37
41
  * @param params.page - Page number to retrieve (1-indexed). Defaults to `1`.
42
+ * @param params.updatedSince - Include only objects updated at or after this ISO 8601 timestamp. Applies before pagination and counting.
38
43
  * @param params.pageSize - Number of objects per page. Defaults to `25`; maximum is `100`.
44
+ * @param params.includeCount - Include total_entries and total_pages (default true). When false, totals are null, has_next uses one extra row, and pages beyond the end return an empty list without clamping. The page offset must fit PostgreSQL's signed 64-bit integer range.
39
45
  * @returns Paginated list of custom objects matching the supplied filters.
40
46
  */
41
47
  async list(params) {
@@ -46,12 +52,24 @@ export class CustomObjectResource {
46
52
  if (params?.schemaKey !== undefined) {
47
53
  query["schema_key"] = params?.schemaKey;
48
54
  }
55
+ if (params?.fieldFilters !== undefined) {
56
+ query["field_filters"] = JSON.stringify(params?.fieldFilters);
57
+ }
58
+ if (params?.systemOnly !== undefined) {
59
+ query["system_only"] = params?.systemOnly;
60
+ }
61
+ if (params?.orderByField !== undefined) {
62
+ query["order_by_field"] = params?.orderByField;
63
+ }
49
64
  if (params?.rowKey !== undefined) {
50
65
  query["row_key"] = params?.rowKey;
51
66
  }
52
67
  if (params?.sortKey !== undefined) {
53
68
  query["sort_key"] = params?.sortKey;
54
69
  }
70
+ if (params?.keys !== undefined) {
71
+ query["keys"] = JSON.stringify(params?.keys);
72
+ }
55
73
  if (params?.team !== undefined) {
56
74
  query["team"] = params?.team;
57
75
  }
@@ -73,9 +91,15 @@ export class CustomObjectResource {
73
91
  if (params?.page !== undefined) {
74
92
  query["page"] = params?.page;
75
93
  }
94
+ if (params?.updatedSince !== undefined) {
95
+ query["updated_since"] = params?.updatedSince;
96
+ }
76
97
  if (params?.pageSize !== undefined) {
77
98
  query["page_size"] = params?.pageSize;
78
99
  }
100
+ if (params?.includeCount !== undefined) {
101
+ query["include_count"] = params?.includeCount;
102
+ }
79
103
  return this.http.request(`/api/v1/custom_objects`, { query });
80
104
  }
81
105
  /**
@@ -100,6 +124,7 @@ export class CustomObjectResource {
100
124
  * @param input.acl - Access control list for the custom object. Supports explicit `read` and `write` grants to users, teams, organizations, organization roles, agents, or everyone.
101
125
  * @param input.agent - Agent user ID to set as the object owner. Used when neither `team` nor `user` is supplied.
102
126
  * @param input.config - Config ID (`cfg_...`) that resolves to the target schema. Provide one of `type`, `schema_key`, or `config`.
127
+ * @param input.expires_at - Absolute expiry time in RFC 3339 format. Pass null to clear; omit to leave unchanged on update.
103
128
  * @param input.fields - Key-value map of field values for the new object. Must conform to the schema's field definitions. Omit to create an object with all fields at their default or null values.
104
129
  * @param input.org - Organization ID (`org_...`) to associate with the object. Typically required for system-owned objects.
105
130
  * @param input.schema_key - Legacy alias for `type` (schema `lookup_key`). Prefer `type` on new clients. Provide one of `type`, `schema_key`, or `config`.
@@ -113,6 +138,38 @@ export class CustomObjectResource {
113
138
  async create(input) {
114
139
  return this.http.request(`/api/v1/custom_objects`, { method: "POST", body: input });
115
140
  }
141
+ /**
142
+ * Apply numeric patch ops to a custom object
143
+ * Applies numeric patch ops (`increment`, `max`, `min`, `set_if_newer` with
144
+ * dotted `path`s) atomically to a custom object and returns the updated
145
+ * object along with per-op results. The authenticated viewer must have
146
+ * permission to modify the object.
147
+ * Address the row in one of two ways: by `object` ID (`cobj_...`), or by
148
+ * `schema` + `row_key` (with optional `sort_key` for schemas that declare
149
+ * one). The keyed form resolves the row for the same owner the create
150
+ * contract would use and, when no row exists yet, creates it from
151
+ * `create_with` merged over the key fields before applying the ops — so an
152
+ * aggregator's first call creates the counter and later calls increment it.
153
+ * A racing create resolves to the same row instead of a duplicate.
154
+ * Pass `idempotency_key` to make retries safe: a retry with the same key and
155
+ * ops replays the stored result without re-applying the write (survives
156
+ * server restarts); reusing a key with different ops returns 409.
157
+ * @param input - Request body.
158
+ * @param input.agent - Agent user ID owning the keyed row. At most one owner selector may be present.
159
+ * @param input.create_with - Field values used to create the row when the keyed form finds no existing row. Merged over the key fields before validation; ignored by the `object` form.
160
+ * @param input.idempotency_key - Client-supplied deduplication key for this patch. A retry with the same key and the same ops replays the stored result without re-applying the write (survives server restarts); reusing a key with different ops returns 409.
161
+ * @param input.object - Custom object ID (`cobj_...`) to patch. Exactly one of `object` or `schema` + `row_key` is required.
162
+ * @param input.ops - Numeric patch ops to apply in order (e.g. `[%{"op" => "increment", "path" => "count", "by" => 1}]`). Supported ops: `increment` (`by`), `max`/`min` (`value`), `set_if_newer` (`value`, `fence_path`, `fence`).
163
+ * @param input.row_key - Row key naming the row within `schema` (e.g. a counter name). Requires `schema`.
164
+ * @param input.schema - Schema type identifier (`lookup_key`) for the keyed form. Requires `row_key`.
165
+ * @param input.sort_key - Sort-key segments partitioning rows within the `row_key` bucket. Only meaningful for schemas that declare a `sort_key`.
166
+ * @param input.team - Team ID (`tem_...`) owning the keyed row. Defaults to the viewer's owner like the create contract.
167
+ * @param input.user - User ID (`usr_...`) owning the keyed row. At most one owner selector may be present.
168
+ * @returns Successful response
169
+ */
170
+ async patch(input) {
171
+ return this.http.request(`/api/v1/custom_objects/patch`, { method: "POST", body: input });
172
+ }
116
173
  /**
117
174
  * Delete a custom object
118
175
  * Permanently deletes the custom object identified by `object`. The caller
@@ -162,8 +219,10 @@ export class CustomObjectResource {
162
219
  * @param input - Request body.
163
220
  * @param input.acl - Updated access control list. Supports full replacement via `grants` or targeted `add`/`remove` operations.
164
221
  * @param input.expected_version - Version number the caller expects to be current. If the object's actual current version does not match, the request returns 409 to signal a concurrent modification. Omit to skip optimistic locking and keep the existing OCC merge retry.
222
+ * @param input.expires_at - Absolute expiry time in RFC 3339 format. Pass null to clear; omit to leave unchanged on update.
165
223
  * @param input.field_ops - Granular array operations to apply per field (e.g. append, prepend, remove). A field must not appear in both `fields` and `field_ops`.
166
224
  * @param input.fields - Key-value map of field values to merge into the object. Only the supplied keys are affected.
225
+ * @param input.idempotency_key - Client-supplied deduplication key for this write. A retry with the same key and the same body replays the stored result without re-applying the write (survives server restarts); reusing a key with a different body returns 409.
167
226
  * @param input.type - Schema type identifier (`lookup_key`) of the object. Optional; used for routing context only.
168
227
  * @returns Successful response
169
228
  */
@@ -1 +1 @@
1
- {"version":3,"file":"custom_objects.js","sourceRoot":"","sources":["../../../src/v1/resources/custom_objects.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,oBAAoB;IACX;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,KAAK,CAAC,IAAI,CAAC,MAA0N;QACnO,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QACD,IAAI,MAAM,EAAE,SAAS,KAAK,SAAS,EAAE,CAAC;YACpC,KAAK,CAAC,YAAY,CAAC,GAAG,MAAM,EAAE,SAAS,CAAC;QAC1C,CAAC;QACD,IAAI,MAAM,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;YACjC,KAAK,CAAC,SAAS,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC;QACpC,CAAC;QACD,IAAI,MAAM,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,KAAK,CAAC,UAAU,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC;QACtC,CAAC;QACD,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QACD,IAAI,MAAM,EAAE,IAAI,KAAK,SAA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AAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,KAAK,CAAC,KAAK,CAAC,KAA6U;QACvV,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,8BAA8B,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAG,CAAC,MAAc,EAAE,MAA0B;QAClD,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,KAA0iB;QACtkB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF"}
@@ -20,20 +20,30 @@ export declare class EventSubscriptionResource {
20
20
  * Creates a durable subscription that receives exportable domain events matching its exact event names. Matching events fan out into a per-subscription queue bounded by max_pending_events and retention_seconds; consume with claim and acknowledge.
21
21
  * @param input - Request body.
22
22
  * @param input.event_names - Exact event names to receive.
23
+ * @param input.filter - Optional match over subject_key, actor_key, and allowlisted dims. Only valid when every event name is a custom (script-emitted) event type. Missing filter matches all events.
23
24
  * @param input.max_pending_events - Queue cap. Defaults to 100; maximum 1000.
24
25
  * @param input.name - Customer-defined subscription name.
26
+ * @param input.previous_filter - Expected legacy filter for atomic watch-key adoption.
27
+ * @param input.previous_filters - Additional exact historical filters accepted for atomic watch-key adoption.
28
+ * @param input.previous_watch_key - Optionally adopt an existing key in the exact same owner and residence when the destination is absent and its filter exactly matches previous_filter, one of previous_filters, or filter. Preserves queue identity and deliveries; mismatches reject the request without changing either queue.
25
29
  * @param input.retention_seconds - Delivery retention in seconds. Defaults to 86400 (24 hours); between 7200 and 2592000. Applies to future deliveries only.
26
30
  * @param input.status - Initial status. Defaults to active.
27
31
  * @param input.visibility_timeout_seconds - Default claim lease in seconds. Defaults to 300.
32
+ * @param input.watch_key - Optional durable identity within the caller owner and residence. Repeated creates replace routes and filter on that queue; omission creates a new queue regardless of name.
28
33
  * @returns The new volatile subscription.
29
34
  */
30
35
  create(input: {
31
36
  event_names: string[];
37
+ filter?: Record<string, unknown> | undefined;
32
38
  max_pending_events?: number | undefined;
33
39
  name: string;
40
+ previous_filter?: Record<string, unknown> | undefined;
41
+ previous_filters?: Record<string, unknown>[] | undefined;
42
+ previous_watch_key?: string | undefined;
34
43
  retention_seconds?: number | undefined;
35
44
  status?: "active" | "paused" | undefined;
36
45
  visibility_timeout_seconds?: number | undefined;
46
+ watch_key?: string | undefined;
37
47
  }): Promise<EventSubscription>;
38
48
  /**
39
49
  * Delete a domain-event subscription
@@ -54,11 +64,13 @@ export declare class EventSubscriptionResource {
54
64
  * Updates matching, status, or queue limits for future fanout. Already queued deliveries remain unless a lower cap trims the oldest entries; retention changes apply to future deliveries only.
55
65
  * @param subscription - Subscription ID (`esub_...`).
56
66
  * @param input - Request body.
67
+ * @param input.filter - Optional match over subject_key, actor_key, and allowlisted dims. Only valid when every event name is a custom (script-emitted) event type. Missing filter matches all events.
57
68
  * @param input.retention_seconds - Delivery retention in seconds. Defaults to 86400 (24 hours); between 7200 and 2592000. Applies to future deliveries only.
58
69
  * @returns Successful response
59
70
  */
60
71
  update(subscription: string, input: {
61
72
  event_names?: string[] | undefined;
73
+ filter?: Record<string, unknown> | undefined;
62
74
  max_pending_events?: number | undefined;
63
75
  name?: string | undefined;
64
76
  retention_seconds?: number | undefined;