samva 0.44.0 → 0.45.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 (91) hide show
  1. package/AGENTS.md +3 -0
  2. package/README.md +4 -0
  3. package/dist/client/sdk.gen.d.ts +281 -1
  4. package/dist/client/sdk.gen.js +856 -1
  5. package/dist/client/types.gen.d.ts +1850 -46
  6. package/dist/effect/agents.d.ts +86 -86
  7. package/dist/effect/agents.js +2 -2
  8. package/dist/effect/api-keys.d.ts +36 -36
  9. package/dist/effect/api-keys.js +2 -2
  10. package/dist/effect/attachments.d.ts +3 -3
  11. package/dist/effect/attachments.js +1 -1
  12. package/dist/effect/campaigns.d.ts +250 -250
  13. package/dist/effect/campaigns.js +3 -3
  14. package/dist/effect/categories.d.ts +23 -5
  15. package/dist/effect/categories.js +11 -20
  16. package/dist/effect/contact-groups.d.ts +44 -44
  17. package/dist/effect/contact-groups.js +3 -3
  18. package/dist/effect/contacts.d.ts +3 -3
  19. package/dist/effect/contacts.js +1 -1
  20. package/dist/effect/conversations.d.ts +53 -53
  21. package/dist/effect/conversations.js +1 -1
  22. package/dist/effect/email.d.ts +97 -97
  23. package/dist/effect/email.js +21 -21
  24. package/dist/effect/errors.d.ts +1 -1
  25. package/dist/effect/errors.js +2 -2
  26. package/dist/effect/extension-installations.d.ts +6 -6
  27. package/dist/effect/extension-installations.js +1 -1
  28. package/dist/effect/generated/index.d.ts +9 -1
  29. package/dist/effect/generated/journeys.d.ts +1 -3
  30. package/dist/effect/generated/journeys.js +2 -6
  31. package/dist/effect/generated/messages.d.ts +1 -5
  32. package/dist/effect/generated/messages.js +2 -10
  33. package/dist/effect/generated/shared.d.ts +92 -2
  34. package/dist/effect/generated/shared.js +43 -2
  35. package/dist/effect/generated/template-registrations.d.ts +651 -0
  36. package/dist/effect/generated/template-registrations.js +138 -0
  37. package/dist/effect/generated/whats-app-flows.d.ts +1838 -0
  38. package/dist/effect/generated/whats-app-flows.js +338 -0
  39. package/dist/effect/generated/whats-app-setup-links.d.ts +705 -0
  40. package/dist/effect/generated/whats-app-setup-links.js +150 -0
  41. package/dist/effect/generated/whats-app.d.ts +2089 -0
  42. package/dist/effect/generated/whats-app.js +633 -0
  43. package/dist/effect/generated-metadata.d.ts +245 -0
  44. package/dist/effect/generated-metadata.js +221 -48
  45. package/dist/effect/index.d.ts +4 -0
  46. package/dist/effect/index.js +6 -2
  47. package/dist/effect/mailboxes.d.ts +298 -298
  48. package/dist/effect/mailboxes.js +3 -3
  49. package/dist/effect/media.d.ts +4 -4
  50. package/dist/effect/media.js +2 -2
  51. package/dist/effect/messages.d.ts +17 -17
  52. package/dist/effect/messages.js +4 -4
  53. package/dist/effect/namespaces.d.ts +5 -5
  54. package/dist/effect/namespaces.js +1 -1
  55. package/dist/effect/newsletter-issues.d.ts +8 -8
  56. package/dist/effect/newsletter-issues.js +2 -2
  57. package/dist/effect/newsletters.d.ts +3 -3
  58. package/dist/effect/newsletters.js +1 -1
  59. package/dist/effect/organizations.d.ts +10 -10
  60. package/dist/effect/organizations.js +1 -1
  61. package/dist/effect/runtime.d.ts +2 -0
  62. package/dist/effect/runtime.js +2 -1
  63. package/dist/effect/scheduled-messages.d.ts +839 -839
  64. package/dist/effect/scheduled-messages.js +1 -1
  65. package/dist/effect/template-registrations.d.ts +12 -0
  66. package/dist/effect/template-registrations.js +16 -0
  67. package/dist/effect/templates.d.ts +66 -66
  68. package/dist/effect/templates.js +13 -13
  69. package/dist/effect/topic-forms.d.ts +4 -4
  70. package/dist/effect/topic-forms.js +1 -1
  71. package/dist/effect/topics.d.ts +11 -11
  72. package/dist/effect/topics.js +2 -2
  73. package/dist/effect/webhooks.d.ts +18 -18
  74. package/dist/effect/webhooks.js +3 -3
  75. package/dist/effect/whatsapp-flows.d.ts +34 -0
  76. package/dist/effect/whatsapp-flows.js +30 -0
  77. package/dist/effect/whatsapp-setup-links.d.ts +66 -0
  78. package/dist/effect/whatsapp-setup-links.js +18 -0
  79. package/dist/effect/whatsapp.d.ts +51 -0
  80. package/dist/effect/whatsapp.js +34 -0
  81. package/dist/index.js +2 -2
  82. package/dist/package.js +1 -1
  83. package/dist/promises/client.d.ts +9 -1
  84. package/dist/promises/client.js +11 -3
  85. package/dist/promises/errors.gen.d.ts +38 -2
  86. package/dist/promises/errors.gen.js +160 -3
  87. package/dist/promises/index.js +2 -2
  88. package/dist/promises/types.gen.d.ts +1 -1
  89. package/dist/service-map.d.ts +917 -736
  90. package/dist/service-map.js +288 -235
  91. package/package.json +19 -3
@@ -1,3 +1,88 @@
1
+ export declare const rerunTests: (input: {
2
+ readonly id: string;
3
+ readonly name: string;
4
+ readonly definition: {
5
+ readonly instructions: string;
6
+ readonly knowledge: string;
7
+ readonly knowledgeSourceIds?: readonly string[] | undefined;
8
+ readonly endpointIds: readonly string[];
9
+ readonly integrations: readonly {
10
+ readonly integrationId: string;
11
+ readonly tools: {
12
+ readonly kind: "all";
13
+ } | {
14
+ readonly kind: "readOnly";
15
+ } | {
16
+ readonly kind: "selected";
17
+ readonly names: readonly string[];
18
+ };
19
+ }[];
20
+ readonly policy: {
21
+ readonly presets: readonly string[];
22
+ readonly rules: readonly ({
23
+ readonly match: {
24
+ readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
25
+ readonly effect?: "final" | "read" | "write" | null | undefined;
26
+ readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
27
+ readonly integration?: string | null | undefined;
28
+ readonly tool?: string | null | undefined;
29
+ readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
30
+ readonly kind: "agent";
31
+ readonly id: string;
32
+ } | {
33
+ readonly kind: "apiKey";
34
+ readonly id: string;
35
+ } | {
36
+ readonly kind: "member";
37
+ readonly userId: string;
38
+ } | {
39
+ readonly kind: "extension";
40
+ readonly id: string;
41
+ } | null | undefined;
42
+ };
43
+ readonly note?: string | null | undefined;
44
+ readonly decide: "model" | "never" | "person" | "run";
45
+ readonly atLeast?: null | undefined;
46
+ } | {
47
+ readonly match: {
48
+ readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
49
+ readonly effect?: "final" | "read" | "write" | null | undefined;
50
+ readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
51
+ readonly integration?: string | null | undefined;
52
+ readonly tool?: string | null | undefined;
53
+ readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
54
+ readonly kind: "agent";
55
+ readonly id: string;
56
+ } | {
57
+ readonly kind: "apiKey";
58
+ readonly id: string;
59
+ } | {
60
+ readonly kind: "member";
61
+ readonly userId: string;
62
+ } | {
63
+ readonly kind: "extension";
64
+ readonly id: string;
65
+ } | null | undefined;
66
+ };
67
+ readonly note?: string | null | undefined;
68
+ readonly decide?: null | undefined;
69
+ readonly atLeast: "model" | "never" | "person" | "run";
70
+ })[];
71
+ readonly instructions?: string | null | undefined;
72
+ };
73
+ readonly model: string;
74
+ readonly reasoning: "auto" | "high" | "low" | "medium";
75
+ readonly workingHours: {
76
+ readonly timeZone: string;
77
+ readonly ranges: readonly {
78
+ readonly day: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday";
79
+ readonly opens: string;
80
+ readonly closes: string;
81
+ }[];
82
+ } | null;
83
+ readonly takeoverTimeoutMinutes: number;
84
+ };
85
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsRerunTests">;
1
86
  export declare const list: ((input?: {
2
87
  readonly limit?: number | null | undefined;
3
88
  readonly cursor?: string | undefined;
@@ -41,7 +126,6 @@ export declare const list: ((input?: {
41
126
  readonly updatedAt: string;
42
127
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
43
128
  };
44
- export declare const listModels: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsListModels">;
45
129
  export declare const create: (input: {
46
130
  readonly name: string;
47
131
  readonly setupJob?: "booking" | "store" | "support" | null | undefined;
@@ -128,6 +212,7 @@ export declare const create: (input: {
128
212
  readonly takeoverTimeoutMinutes: number;
129
213
  } | null | undefined;
130
214
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsCreate">;
215
+ export declare const listModels: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsListModels">;
131
216
  export declare const get: (input: {
132
217
  readonly id: string;
133
218
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsGet">;
@@ -262,88 +347,3 @@ export declare const getVersion: (input: {
262
347
  readonly id: string;
263
348
  readonly version: string;
264
349
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsGetVersion">;
265
- export declare const rerunTests: (input: {
266
- readonly id: string;
267
- readonly name: string;
268
- readonly definition: {
269
- readonly instructions: string;
270
- readonly knowledge: string;
271
- readonly knowledgeSourceIds?: readonly string[] | undefined;
272
- readonly endpointIds: readonly string[];
273
- readonly integrations: readonly {
274
- readonly integrationId: string;
275
- readonly tools: {
276
- readonly kind: "all";
277
- } | {
278
- readonly kind: "readOnly";
279
- } | {
280
- readonly kind: "selected";
281
- readonly names: readonly string[];
282
- };
283
- }[];
284
- readonly policy: {
285
- readonly presets: readonly string[];
286
- readonly rules: readonly ({
287
- readonly match: {
288
- readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
289
- readonly effect?: "final" | "read" | "write" | null | undefined;
290
- readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
291
- readonly integration?: string | null | undefined;
292
- readonly tool?: string | null | undefined;
293
- readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
294
- readonly kind: "agent";
295
- readonly id: string;
296
- } | {
297
- readonly kind: "apiKey";
298
- readonly id: string;
299
- } | {
300
- readonly kind: "member";
301
- readonly userId: string;
302
- } | {
303
- readonly kind: "extension";
304
- readonly id: string;
305
- } | null | undefined;
306
- };
307
- readonly note?: string | null | undefined;
308
- readonly decide: "model" | "never" | "person" | "run";
309
- readonly atLeast?: null | undefined;
310
- } | {
311
- readonly match: {
312
- readonly kind?: "handoff" | "reply" | "send" | "toolCall" | null | undefined;
313
- readonly effect?: "final" | "read" | "write" | null | undefined;
314
- readonly channel?: "email" | "sms" | "whatsapp" | null | undefined;
315
- readonly integration?: string | null | undefined;
316
- readonly tool?: string | null | undefined;
317
- readonly subject?: "agent" | "apiKey" | "extension" | "member" | {
318
- readonly kind: "agent";
319
- readonly id: string;
320
- } | {
321
- readonly kind: "apiKey";
322
- readonly id: string;
323
- } | {
324
- readonly kind: "member";
325
- readonly userId: string;
326
- } | {
327
- readonly kind: "extension";
328
- readonly id: string;
329
- } | null | undefined;
330
- };
331
- readonly note?: string | null | undefined;
332
- readonly decide?: null | undefined;
333
- readonly atLeast: "model" | "never" | "person" | "run";
334
- })[];
335
- readonly instructions?: string | null | undefined;
336
- };
337
- readonly model: string;
338
- readonly reasoning: "auto" | "high" | "low" | "medium";
339
- readonly workingHours: {
340
- readonly timeZone: string;
341
- readonly ranges: readonly {
342
- readonly day: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday";
343
- readonly opens: string;
344
- readonly closes: string;
345
- }[];
346
- } | null;
347
- readonly takeoverTimeoutMinutes: number;
348
- };
349
- }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"agentsRerunTests">;
@@ -17,9 +17,10 @@ var agents_exports = /* @__PURE__ */ __exportAll({
17
17
  update: () => update
18
18
  });
19
19
  const make = /* @__PURE__ */ forGroup(AgentsGroup);
20
+ const rerunTests = /* @__PURE__ */ make("agentsRerunTests");
20
21
  const list = /* @__PURE__ */ make("agentsList");
21
- const listModels = /* @__PURE__ */ make("agentsListModels");
22
22
  const create = /* @__PURE__ */ make("agentsCreate");
23
+ const listModels = /* @__PURE__ */ make("agentsListModels");
23
24
  const get = /* @__PURE__ */ make("agentsGet");
24
25
  const update = /* @__PURE__ */ make("agentsUpdate");
25
26
  const remove = /* @__PURE__ */ make("agentsRemove");
@@ -28,7 +29,6 @@ const publish = /* @__PURE__ */ make("agentsPublish");
28
29
  const continueOnStandard = /* @__PURE__ */ make("agentsContinueOnStandard");
29
30
  const listVersions = /* @__PURE__ */ make("agentsListVersions");
30
31
  const getVersion = /* @__PURE__ */ make("agentsGetVersion");
31
- const rerunTests = /* @__PURE__ */ make("agentsRerunTests");
32
32
  export { agents_exports, continueOnStandard, create, get, getVersion, list, listModels, listVersions, publish, remove, replaceDraft, rerunTests, update };
33
33
 
34
34
  //# sourceMappingURL=agents.js.map
@@ -1,4 +1,37 @@
1
1
  export { ApiKeysCreateRequestJson as CreatePayload, ApiKeysUpdateRequestJson as UpdatePayload, } from "./generated/api-keys";
2
+ export declare const create: (input: {
3
+ readonly name: string;
4
+ readonly description?: string | null | undefined;
5
+ readonly expiresAt?: string | null | undefined;
6
+ readonly access?: {
7
+ readonly mode: "full";
8
+ } | {
9
+ readonly mode: "restricted";
10
+ readonly resources: {
11
+ readonly messages?: "read" | "write" | null | undefined;
12
+ readonly email?: "read" | "write" | null | undefined;
13
+ readonly sms?: "read" | "write" | null | undefined;
14
+ readonly whatsapp?: "read" | "write" | null | undefined;
15
+ readonly domains?: "read" | "write" | null | undefined;
16
+ readonly phoneNumbers?: "read" | "write" | null | undefined;
17
+ readonly whatsappAccounts?: "read" | "write" | null | undefined;
18
+ readonly contacts?: "read" | "write" | null | undefined;
19
+ readonly conversations?: "read" | "write" | null | undefined;
20
+ readonly templates?: "read" | "write" | null | undefined;
21
+ readonly agents?: "read" | "write" | null | undefined;
22
+ readonly webhooks?: "read" | "write" | null | undefined;
23
+ readonly apiKeys?: "read" | "write" | null | undefined;
24
+ readonly organization?: "read" | "write" | null | undefined;
25
+ readonly billing?: "read" | "write" | null | undefined;
26
+ readonly analytics?: "read" | "write" | null | undefined;
27
+ };
28
+ readonly mailboxes?: {
29
+ readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
30
+ readonly mailboxIds?: readonly string[] | null | undefined;
31
+ } | null | undefined;
32
+ readonly namespaceId?: string | null | undefined;
33
+ } | null | undefined;
34
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysCreate">;
2
35
  export declare const list: ((input?: {
3
36
  readonly limit?: number | null | undefined;
4
37
  readonly cursor?: string | undefined;
@@ -112,50 +145,17 @@ export declare const list: ((input?: {
112
145
  } | null;
113
146
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
114
147
  };
115
- export declare const create: (input: {
116
- readonly name: string;
117
- readonly description?: string | null | undefined;
118
- readonly expiresAt?: string | null | undefined;
119
- readonly access?: {
120
- readonly mode: "full";
121
- } | {
122
- readonly mode: "restricted";
123
- readonly resources: {
124
- readonly messages?: "read" | "write" | null | undefined;
125
- readonly email?: "read" | "write" | null | undefined;
126
- readonly sms?: "read" | "write" | null | undefined;
127
- readonly whatsapp?: "read" | "write" | null | undefined;
128
- readonly domains?: "read" | "write" | null | undefined;
129
- readonly phoneNumbers?: "read" | "write" | null | undefined;
130
- readonly whatsappAccounts?: "read" | "write" | null | undefined;
131
- readonly contacts?: "read" | "write" | null | undefined;
132
- readonly conversations?: "read" | "write" | null | undefined;
133
- readonly templates?: "read" | "write" | null | undefined;
134
- readonly agents?: "read" | "write" | null | undefined;
135
- readonly webhooks?: "read" | "write" | null | undefined;
136
- readonly apiKeys?: "read" | "write" | null | undefined;
137
- readonly organization?: "read" | "write" | null | undefined;
138
- readonly billing?: "read" | "write" | null | undefined;
139
- readonly analytics?: "read" | "write" | null | undefined;
140
- };
141
- readonly mailboxes?: {
142
- readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
143
- readonly mailboxIds?: readonly string[] | null | undefined;
144
- } | null | undefined;
145
- readonly namespaceId?: string | null | undefined;
146
- } | null | undefined;
147
- }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysCreate">;
148
148
  export declare const get: (input: {
149
149
  readonly id: string;
150
150
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysGet">;
151
- export declare const revoke: (input: {
152
- readonly id: string;
153
- }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysRevoke">;
154
151
  export declare const update: (input: {
155
152
  readonly id: string;
156
153
  readonly name?: string | null | undefined;
157
154
  readonly description?: string | null | undefined;
158
155
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysUpdate">;
156
+ export declare const revoke: (input: {
157
+ readonly id: string;
158
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysRevoke">;
159
159
  export declare const rotate: (input: {
160
160
  readonly id: string;
161
161
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"apiKeysRotate">;
@@ -15,11 +15,11 @@ var api_keys_exports = /* @__PURE__ */ __exportAll({
15
15
  update: () => update
16
16
  });
17
17
  const make = /* @__PURE__ */ forGroup(APIKeysGroup);
18
- const list = /* @__PURE__ */ make("apiKeysList");
19
18
  const create = /* @__PURE__ */ make("apiKeysCreate");
19
+ const list = /* @__PURE__ */ make("apiKeysList");
20
20
  const get = /* @__PURE__ */ make("apiKeysGet");
21
- const revoke = /* @__PURE__ */ make("apiKeysRevoke");
22
21
  const update = /* @__PURE__ */ make("apiKeysUpdate");
22
+ const revoke = /* @__PURE__ */ make("apiKeysRevoke");
23
23
  const rotate = /* @__PURE__ */ make("apiKeysRotate");
24
24
  const getStats = /* @__PURE__ */ make("apiKeysGetStats");
25
25
  const getActivity = /* @__PURE__ */ make("apiKeysGetActivity");
@@ -1,12 +1,12 @@
1
- export declare const list: (input: {
2
- readonly messageId: string;
3
- }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"attachmentsList">;
4
1
  export declare const getById: (input: {
5
2
  readonly id: string;
6
3
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"attachmentsGetById">;
7
4
  export declare const remove: (input: {
8
5
  readonly id: string;
9
6
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"attachmentsRemove">;
7
+ export declare const list: (input: {
8
+ readonly messageId: string;
9
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"attachmentsList">;
10
10
  export declare const downloadUrl: (input: {
11
11
  readonly id: string;
12
12
  readonly expiresIn?: number | null | undefined;
@@ -9,9 +9,9 @@ var attachments_exports = /* @__PURE__ */ __exportAll({
9
9
  remove: () => remove
10
10
  });
11
11
  const make = /* @__PURE__ */ forGroup(AttachmentsGroup);
12
- const list = /* @__PURE__ */ make("attachmentsList");
13
12
  const getById = /* @__PURE__ */ make("attachmentsGetById");
14
13
  const remove = /* @__PURE__ */ make("attachmentsRemove");
14
+ const list = /* @__PURE__ */ make("attachmentsList");
15
15
  const downloadUrl = /* @__PURE__ */ make("attachmentsDownloadUrl");
16
16
  export { attachments_exports, downloadUrl, getById, list, remove };
17
17