samva 0.35.0 → 0.36.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 (70) hide show
  1. package/AGENTS.md +17 -0
  2. package/README.md +1 -0
  3. package/dist/client/sdk.gen.d.ts +102 -82
  4. package/dist/client/sdk.gen.js +322 -244
  5. package/dist/client/types.gen.d.ts +600 -378
  6. package/dist/effect/agents.d.ts +194 -4
  7. package/dist/effect/agents.js +3 -1
  8. package/dist/effect/analytics.d.ts +6 -0
  9. package/dist/effect/api-keys.d.ts +3 -6
  10. package/dist/effect/campaigns.d.ts +216 -216
  11. package/dist/effect/conversations.d.ts +6 -0
  12. package/dist/effect/errors.d.ts +1 -1
  13. package/dist/effect/errors.js +2 -2
  14. package/dist/effect/extension-installations.d.ts +53 -1
  15. package/dist/effect/generated/agents.d.ts +1803 -81
  16. package/dist/effect/generated/agents.js +92 -26
  17. package/dist/effect/generated/analytics.d.ts +19 -1
  18. package/dist/effect/generated/analytics.js +8 -2
  19. package/dist/effect/generated/api-keys.d.ts +4 -29
  20. package/dist/effect/generated/api-keys.js +5 -6
  21. package/dist/effect/generated/campaigns.d.ts +22 -0
  22. package/dist/effect/generated/campaigns.js +3 -1
  23. package/dist/effect/generated/conversations.d.ts +104 -3
  24. package/dist/effect/generated/conversations.js +12 -2
  25. package/dist/effect/generated/extension-installations.d.ts +845 -68
  26. package/dist/effect/generated/extension-installations.js +22 -26
  27. package/dist/effect/generated/index.d.ts +3 -1
  28. package/dist/effect/generated/mailboxes.d.ts +3423 -1446
  29. package/dist/effect/generated/mailboxes.js +226 -220
  30. package/dist/effect/generated/namespaces.d.ts +7 -31
  31. package/dist/effect/generated/namespaces.js +4 -4
  32. package/dist/effect/generated/policies.d.ts +953 -0
  33. package/dist/effect/generated/policies.js +116 -0
  34. package/dist/effect/generated/scheduled-messages.d.ts +45 -4
  35. package/dist/effect/generated/scheduled-messages.js +8 -3
  36. package/dist/effect/generated/shared.d.ts +893 -224
  37. package/dist/effect/generated/shared.js +194 -60
  38. package/dist/effect/generated/templates.d.ts +474 -668
  39. package/dist/effect/generated/templates.js +65 -45
  40. package/dist/effect/generated/webhooks.d.ts +22 -19
  41. package/dist/effect/generated/webhooks.js +10 -1
  42. package/dist/effect/generated/whoami.d.ts +0 -4
  43. package/dist/effect/generated-metadata.d.ts +36 -32
  44. package/dist/effect/generated-metadata.js +127 -105
  45. package/dist/effect/index.d.ts +1 -0
  46. package/dist/effect/index.js +3 -2
  47. package/dist/effect/internal/operation.js +5 -32
  48. package/dist/effect/journeys.d.ts +146 -146
  49. package/dist/effect/mailboxes.d.ts +575 -129
  50. package/dist/effect/mailboxes.js +1 -11
  51. package/dist/effect/policies.d.ts +65 -0
  52. package/dist/effect/policies.js +16 -0
  53. package/dist/effect/scheduled-messages.d.ts +6 -0
  54. package/dist/effect/templates.d.ts +6 -8
  55. package/dist/effect/templates.js +5 -3
  56. package/dist/effect/topics.d.ts +2 -2
  57. package/dist/effect/webhooks.d.ts +7 -4
  58. package/dist/index.js +2 -2
  59. package/dist/mailbox/test.js +11 -4
  60. package/dist/mailbox/types.d.ts +39 -3
  61. package/dist/package.js +1 -1
  62. package/dist/promises/client.d.ts +3 -1
  63. package/dist/promises/client.js +5 -3
  64. package/dist/promises/errors.gen.d.ts +18 -2
  65. package/dist/promises/errors.gen.js +335 -33
  66. package/dist/promises/index.js +2 -2
  67. package/dist/promises/types.gen.d.ts +1 -1
  68. package/dist/service-map.d.ts +30 -28
  69. package/dist/service-map.js +219 -786
  70. package/package.json +6 -2
@@ -1,10 +1,12 @@
1
1
  export declare const list: ((input?: {
2
2
  readonly limit?: number | null | undefined;
3
3
  readonly cursor?: string | undefined;
4
+ readonly namespaceId?: string | undefined;
4
5
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsList">) & {
5
6
  readonly pages: (input?: {
6
7
  readonly limit?: number | null | undefined;
7
8
  readonly cursor?: string | undefined;
9
+ readonly namespaceId?: string | undefined;
8
10
  } | undefined) => import("effect/Stream").Stream<{
9
11
  readonly items: readonly {
10
12
  readonly id: string & import("effect/Brand").Brand<"AgentId">;
@@ -23,6 +25,7 @@ export declare const list: ((input?: {
23
25
  readonly items: (input?: {
24
26
  readonly limit?: number | null | undefined;
25
27
  readonly cursor?: string | undefined;
28
+ readonly namespaceId?: string | undefined;
26
29
  } | undefined) => import("effect/Stream").Stream<{
27
30
  readonly id: string & import("effect/Brand").Brand<"AgentId">;
28
31
  readonly name: string;
@@ -55,9 +58,60 @@ export declare const create: (input: {
55
58
  readonly kind: "selected";
56
59
  readonly names: readonly string[];
57
60
  };
58
- readonly requireApproval: readonly string[];
59
61
  }[];
60
- readonly mode: "live" | "supervised";
62
+ readonly policy: {
63
+ readonly presets: readonly string[];
64
+ readonly rules: readonly ({
65
+ readonly match: {
66
+ readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
67
+ readonly effect?: "final" | "read" | "write" | null | undefined;
68
+ readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
69
+ readonly integration?: string | null | undefined;
70
+ readonly tool?: string | null | undefined;
71
+ readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
72
+ readonly kind: "agent";
73
+ readonly id: string;
74
+ } | {
75
+ readonly kind: "apiKey";
76
+ readonly id: string;
77
+ } | {
78
+ readonly kind: "member";
79
+ readonly userId: string;
80
+ } | {
81
+ readonly kind: "extension";
82
+ readonly id: string;
83
+ } | null | undefined;
84
+ };
85
+ readonly note?: string | null | undefined;
86
+ readonly decide: "model" | "never" | "person" | "run";
87
+ readonly atLeast?: null | undefined;
88
+ } | {
89
+ readonly match: {
90
+ readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
91
+ readonly effect?: "final" | "read" | "write" | null | undefined;
92
+ readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
93
+ readonly integration?: string | null | undefined;
94
+ readonly tool?: string | null | undefined;
95
+ readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
96
+ readonly kind: "agent";
97
+ readonly id: string;
98
+ } | {
99
+ readonly kind: "apiKey";
100
+ readonly id: string;
101
+ } | {
102
+ readonly kind: "member";
103
+ readonly userId: string;
104
+ } | {
105
+ readonly kind: "extension";
106
+ readonly id: string;
107
+ } | null | undefined;
108
+ };
109
+ readonly note?: string | null | undefined;
110
+ readonly decide?: null | undefined;
111
+ readonly atLeast: "model" | "never" | "person" | "run";
112
+ })[];
113
+ readonly instructions?: string | null | undefined;
114
+ };
61
115
  readonly model: string;
62
116
  readonly reasoning: "auto" | "high" | "low" | "medium";
63
117
  readonly workingHours: {
@@ -100,9 +154,60 @@ export declare const replaceDraft: (input: {
100
154
  readonly kind: "selected";
101
155
  readonly names: readonly string[];
102
156
  };
103
- readonly requireApproval: readonly string[];
104
157
  }[];
105
- readonly mode: "live" | "supervised";
158
+ readonly policy: {
159
+ readonly presets: readonly string[];
160
+ readonly rules: readonly ({
161
+ readonly match: {
162
+ readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
163
+ readonly effect?: "final" | "read" | "write" | null | undefined;
164
+ readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
165
+ readonly integration?: string | null | undefined;
166
+ readonly tool?: string | null | undefined;
167
+ readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
168
+ readonly kind: "agent";
169
+ readonly id: string;
170
+ } | {
171
+ readonly kind: "apiKey";
172
+ readonly id: string;
173
+ } | {
174
+ readonly kind: "member";
175
+ readonly userId: string;
176
+ } | {
177
+ readonly kind: "extension";
178
+ readonly id: string;
179
+ } | null | undefined;
180
+ };
181
+ readonly note?: string | null | undefined;
182
+ readonly decide: "model" | "never" | "person" | "run";
183
+ readonly atLeast?: null | undefined;
184
+ } | {
185
+ readonly match: {
186
+ readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
187
+ readonly effect?: "final" | "read" | "write" | null | undefined;
188
+ readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
189
+ readonly integration?: string | null | undefined;
190
+ readonly tool?: string | null | undefined;
191
+ readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
192
+ readonly kind: "agent";
193
+ readonly id: string;
194
+ } | {
195
+ readonly kind: "apiKey";
196
+ readonly id: string;
197
+ } | {
198
+ readonly kind: "member";
199
+ readonly userId: string;
200
+ } | {
201
+ readonly kind: "extension";
202
+ readonly id: string;
203
+ } | null | undefined;
204
+ };
205
+ readonly note?: string | null | undefined;
206
+ readonly decide?: null | undefined;
207
+ readonly atLeast: "model" | "never" | "person" | "run";
208
+ })[];
209
+ readonly instructions?: string | null | undefined;
210
+ };
106
211
  readonly model: string;
107
212
  readonly reasoning: "auto" | "high" | "low" | "medium";
108
213
  readonly workingHours: {
@@ -154,3 +259,88 @@ export declare const getVersion: (input: {
154
259
  readonly id: string;
155
260
  readonly version: string;
156
261
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsGetVersion">;
262
+ export declare const rerunTests: (input: {
263
+ readonly id: string;
264
+ readonly name: string;
265
+ readonly definition: {
266
+ readonly instructions: string;
267
+ readonly knowledge: string;
268
+ readonly knowledgeSourceIds?: readonly string[] | undefined;
269
+ readonly endpointIds: readonly string[];
270
+ readonly integrations: readonly {
271
+ readonly integrationId: string;
272
+ readonly tools: {
273
+ readonly kind: "all";
274
+ } | {
275
+ readonly kind: "readOnly";
276
+ } | {
277
+ readonly kind: "selected";
278
+ readonly names: readonly string[];
279
+ };
280
+ }[];
281
+ readonly policy: {
282
+ readonly presets: readonly string[];
283
+ readonly rules: readonly ({
284
+ readonly match: {
285
+ readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
286
+ readonly effect?: "final" | "read" | "write" | null | undefined;
287
+ readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
288
+ readonly integration?: string | null | undefined;
289
+ readonly tool?: string | null | undefined;
290
+ readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
291
+ readonly kind: "agent";
292
+ readonly id: string;
293
+ } | {
294
+ readonly kind: "apiKey";
295
+ readonly id: string;
296
+ } | {
297
+ readonly kind: "member";
298
+ readonly userId: string;
299
+ } | {
300
+ readonly kind: "extension";
301
+ readonly id: string;
302
+ } | null | undefined;
303
+ };
304
+ readonly note?: string | null | undefined;
305
+ readonly decide: "model" | "never" | "person" | "run";
306
+ readonly atLeast?: null | undefined;
307
+ } | {
308
+ readonly match: {
309
+ readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
310
+ readonly effect?: "final" | "read" | "write" | null | undefined;
311
+ readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
312
+ readonly integration?: string | null | undefined;
313
+ readonly tool?: string | null | undefined;
314
+ readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
315
+ readonly kind: "agent";
316
+ readonly id: string;
317
+ } | {
318
+ readonly kind: "apiKey";
319
+ readonly id: string;
320
+ } | {
321
+ readonly kind: "member";
322
+ readonly userId: string;
323
+ } | {
324
+ readonly kind: "extension";
325
+ readonly id: string;
326
+ } | null | undefined;
327
+ };
328
+ readonly note?: string | null | undefined;
329
+ readonly decide?: null | undefined;
330
+ readonly atLeast: "model" | "never" | "person" | "run";
331
+ })[];
332
+ readonly instructions?: string | null | undefined;
333
+ };
334
+ readonly model: string;
335
+ readonly reasoning: "auto" | "high" | "low" | "medium";
336
+ readonly workingHours: {
337
+ readonly timeZone: string;
338
+ readonly ranges: readonly {
339
+ readonly day: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday";
340
+ readonly opens: string;
341
+ readonly closes: string;
342
+ }[];
343
+ } | null;
344
+ readonly takeoverTimeoutMinutes: number;
345
+ };
346
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsRerunTests">;
@@ -13,6 +13,7 @@ var agents_exports = /* @__PURE__ */ __exportAll({
13
13
  publish: () => publish,
14
14
  remove: () => remove,
15
15
  replaceDraft: () => replaceDraft,
16
+ rerunTests: () => rerunTests,
16
17
  update: () => update
17
18
  });
18
19
  const make = /* @__PURE__ */ forGroup(AgentsGroup);
@@ -27,6 +28,7 @@ const publish = /* @__PURE__ */ make("agentsPublish");
27
28
  const continueOnStandard = /* @__PURE__ */ make("agentsContinueOnStandard");
28
29
  const listVersions = /* @__PURE__ */ make("agentsListVersions");
29
30
  const getVersion = /* @__PURE__ */ make("agentsGetVersion");
30
- export { agents_exports, continueOnStandard, create, get, getVersion, list, listModels, listVersions, publish, remove, replaceDraft, update };
31
+ const rerunTests = /* @__PURE__ */ make("agentsRerunTests");
32
+ export { agents_exports, continueOnStandard, create, get, getVersion, list, listModels, listVersions, publish, remove, replaceDraft, rerunTests, update };
31
33
 
32
34
  //# sourceMappingURL=agents.js.map
@@ -1,29 +1,35 @@
1
1
  export declare const getStats: (input?: {
2
+ readonly namespaceId?: string | undefined;
2
3
  readonly after?: Date | undefined;
3
4
  readonly before?: Date | undefined;
4
5
  readonly groupBy?: "day" | "month" | "week" | undefined;
5
6
  readonly channel?: "email" | "sms" | "whatsapp" | undefined;
6
7
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"analyticsGetStats">;
7
8
  export declare const getChannelStats: (input?: {
9
+ readonly namespaceId?: string | undefined;
8
10
  readonly after?: Date | undefined;
9
11
  readonly before?: Date | undefined;
10
12
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"analyticsGetChannelStats">;
11
13
  export declare const getTopContacts: (input?: {
14
+ readonly namespaceId?: string | undefined;
12
15
  readonly after?: Date | undefined;
13
16
  readonly before?: Date | undefined;
14
17
  readonly limit?: number | null | undefined;
15
18
  readonly sortBy?: "received" | "sent" | "total" | undefined;
16
19
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"analyticsGetTopContacts">;
17
20
  export declare const getHourlyDistribution: (input?: {
21
+ readonly namespaceId?: string | undefined;
18
22
  readonly after?: Date | undefined;
19
23
  readonly before?: Date | undefined;
20
24
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"analyticsGetHourlyDistribution">;
21
25
  export declare const getDeliveryMetrics: (input?: {
26
+ readonly namespaceId?: string | undefined;
22
27
  readonly after?: Date | undefined;
23
28
  readonly before?: Date | undefined;
24
29
  readonly channel?: "email" | "sms" | "whatsapp" | undefined;
25
30
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"analyticsGetDeliveryMetrics">;
26
31
  export declare const exportData: (input: {
32
+ readonly namespaceId?: string | null | undefined;
27
33
  readonly after: Date;
28
34
  readonly before: Date;
29
35
  readonly format?: "csv" | "json" | null | undefined;
@@ -2,12 +2,14 @@ export { ApiKeysCreateRequestJson as CreatePayload, ApiKeysUpdateRequestJson as
2
2
  export declare const list: ((input?: {
3
3
  readonly limit?: number | null | undefined;
4
4
  readonly cursor?: string | undefined;
5
+ readonly namespaceId?: string | undefined;
5
6
  readonly status?: "active" | "revoked" | undefined;
6
7
  readonly search?: string | undefined;
7
8
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysList">) & {
8
9
  readonly pages: (input?: {
9
10
  readonly limit?: number | null | undefined;
10
11
  readonly cursor?: string | undefined;
12
+ readonly namespaceId?: string | undefined;
11
13
  readonly status?: "active" | "revoked" | undefined;
12
14
  readonly search?: string | undefined;
13
15
  } | undefined) => import("effect/Stream").Stream<{
@@ -47,7 +49,6 @@ export declare const list: ((input?: {
47
49
  readonly mailboxes?: {
48
50
  readonly permissions: readonly ["quarantine.read" | "read" | "send" | "update", ...("quarantine.read" | "read" | "send" | "update")[]];
49
51
  readonly mailboxIds?: readonly [string & import("effect/Brand").Brand<"MailboxId">, ...(string & import("effect/Brand").Brand<"MailboxId">)[]] | null;
50
- readonly sendMode?: "approval" | "send" | null;
51
52
  } | null;
52
53
  readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
53
54
  };
@@ -62,6 +63,7 @@ export declare const list: ((input?: {
62
63
  readonly items: (input?: {
63
64
  readonly limit?: number | null | undefined;
64
65
  readonly cursor?: string | undefined;
66
+ readonly namespaceId?: string | undefined;
65
67
  readonly status?: "active" | "revoked" | undefined;
66
68
  readonly search?: string | undefined;
67
69
  } | undefined) => import("effect/Stream").Stream<{
@@ -100,7 +102,6 @@ export declare const list: ((input?: {
100
102
  readonly mailboxes?: {
101
103
  readonly permissions: readonly ["quarantine.read" | "read" | "send" | "update", ...("quarantine.read" | "read" | "send" | "update")[]];
102
104
  readonly mailboxIds?: readonly [string & import("effect/Brand").Brand<"MailboxId">, ...(string & import("effect/Brand").Brand<"MailboxId">)[]] | null;
103
- readonly sendMode?: "approval" | "send" | null;
104
105
  } | null;
105
106
  readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
106
107
  };
@@ -140,7 +141,6 @@ export declare const create: (input: {
140
141
  readonly mailboxes?: {
141
142
  readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
142
143
  readonly mailboxIds?: readonly string[] | null | undefined;
143
- readonly sendMode?: "approval" | "send" | null | undefined;
144
144
  } | null | undefined;
145
145
  readonly namespaceId?: string | null | undefined;
146
146
  } | null | undefined;
@@ -155,9 +155,6 @@ export declare const update: (input: {
155
155
  readonly id: string;
156
156
  readonly name?: string | null | undefined;
157
157
  readonly description?: string | null | undefined;
158
- readonly mailboxes?: {
159
- readonly sendMode: "approval" | "send";
160
- } | null | undefined;
161
158
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysUpdate">;
162
159
  export declare const rotate: (input: {
163
160
  readonly id: string;