samva 0.45.1 → 0.46.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 (65) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +24 -0
  3. package/dist/client/sdk.gen.d.ts +438 -5
  4. package/dist/client/sdk.gen.js +1544 -229
  5. package/dist/client/types.gen.d.ts +8120 -5616
  6. package/dist/effect/accounts.d.ts +50 -0
  7. package/dist/effect/accounts.js +22 -0
  8. package/dist/effect/agents.d.ts +9 -0
  9. package/dist/effect/agents.js +1 -1
  10. package/dist/effect/approval-requests.d.ts +42 -0
  11. package/dist/effect/approval-requests.js +18 -0
  12. package/dist/effect/campaigns.d.ts +160 -160
  13. package/dist/effect/generated/accounts.d.ts +1002 -0
  14. package/dist/effect/generated/accounts.js +198 -0
  15. package/dist/effect/generated/agents.d.ts +84 -0
  16. package/dist/effect/generated/agents.js +1 -0
  17. package/dist/effect/generated/approval-requests.d.ts +777 -0
  18. package/dist/effect/generated/approval-requests.js +135 -0
  19. package/dist/effect/generated/campaigns.d.ts +17 -17
  20. package/dist/effect/generated/campaigns.js +6 -6
  21. package/dist/effect/generated/conversations.d.ts +20 -20
  22. package/dist/effect/generated/conversations.js +10 -10
  23. package/dist/effect/generated/events.js +1 -1
  24. package/dist/effect/generated/index.d.ts +11 -1
  25. package/dist/effect/generated/integrations-catalog.d.ts +671 -0
  26. package/dist/effect/generated/integrations-catalog.js +217 -0
  27. package/dist/effect/generated/integrations.d.ts +1401 -0
  28. package/dist/effect/generated/integrations.js +246 -0
  29. package/dist/effect/generated/mailboxes.d.ts +8157 -4241
  30. package/dist/effect/generated/mailboxes.js +677 -52
  31. package/dist/effect/generated/messages.d.ts +8 -8
  32. package/dist/effect/generated/messages.js +4 -4
  33. package/dist/effect/generated/scheduled-messages.d.ts +50 -50
  34. package/dist/effect/generated/scheduled-messages.js +17 -17
  35. package/dist/effect/generated/shared.d.ts +661 -511
  36. package/dist/effect/generated/shared.js +212 -179
  37. package/dist/effect/generated/template-share-links.d.ts +733 -0
  38. package/dist/effect/generated/template-share-links.js +165 -0
  39. package/dist/effect/generated/templates.d.ts +39 -22
  40. package/dist/effect/generated/templates.js +19 -16
  41. package/dist/effect/generated-metadata.d.ts +248 -0
  42. package/dist/effect/generated-metadata.js +705 -555
  43. package/dist/effect/index.d.ts +5 -0
  44. package/dist/effect/index.js +6 -1
  45. package/dist/effect/integrations-catalog.d.ts +38 -0
  46. package/dist/effect/integrations-catalog.js +16 -0
  47. package/dist/effect/integrations.d.ts +165 -0
  48. package/dist/effect/integrations.js +24 -0
  49. package/dist/effect/mailboxes.d.ts +373 -191
  50. package/dist/effect/mailboxes.js +31 -1
  51. package/dist/effect/scheduled-messages.d.ts +350 -350
  52. package/dist/effect/template-share-links.d.ts +18 -0
  53. package/dist/effect/template-share-links.js +20 -0
  54. package/dist/effect/templates.d.ts +4 -3
  55. package/dist/index.js +2 -2
  56. package/dist/package.js +1 -1
  57. package/dist/promises/client.d.ts +11 -1
  58. package/dist/promises/client.js +13 -3
  59. package/dist/promises/errors.gen.d.ts +22 -2
  60. package/dist/promises/errors.gen.js +54 -1
  61. package/dist/promises/index.js +2 -2
  62. package/dist/promises/types.gen.d.ts +1 -1
  63. package/dist/service-map.d.ts +203 -0
  64. package/dist/service-map.js +103 -0
  65. package/package.json +22 -2
@@ -6,12 +6,16 @@ export type JsonValue = string | number | boolean | null | ReadonlyArray<JsonVal
6
6
  readonly [x: string]: JsonValue;
7
7
  };
8
8
  export declare const JsonValue: Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>;
9
- export type NamespaceId = string & EffectBrand.Brand<"NamespaceId">;
10
- export declare const NamespaceId: Schema.brand<Schema.String, "NamespaceId">;
11
- export type AgentId = string & EffectBrand.Brand<"AgentId">;
12
- export declare const AgentId: Schema.brand<Schema.String, "AgentId">;
13
- export type AgentSetupJob = "support" | "store" | "booking";
14
- export declare const AgentSetupJob: Schema.Union<readonly [Schema.Literal<"support">, Schema.Literal<"store">, Schema.Literal<"booking">]>;
9
+ export type IntegrationKey = string;
10
+ export declare const IntegrationKey: Schema.String;
11
+ export type JsonObject = {
12
+ readonly [x: string]: JsonValue;
13
+ };
14
+ export declare const JsonObject: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
15
+ export type IntegrationAccountId = string & EffectBrand.Brand<"IntegrationAccountId">;
16
+ export declare const IntegrationAccountId: Schema.brand<Schema.String, "IntegrationAccountId">;
17
+ export type UserId = string & EffectBrand.Brand<"UserId">;
18
+ export declare const UserId: Schema.brand<Schema.String, "UserId">;
15
19
  declare const MalformedRequestError_base: Schema.Class<MalformedRequestError, Schema.Struct<{
16
20
  readonly _tag: Schema.tag<"MalformedRequestError">;
17
21
  readonly message: Schema.String;
@@ -51,14 +55,34 @@ declare const GatewayTimeoutError_base: Schema.Class<GatewayTimeoutError, Schema
51
55
  }>, import("effect/Cause").YieldableError>;
52
56
  export declare class GatewayTimeoutError extends GatewayTimeoutError_base {
53
57
  }
58
+ declare const ResourceNotFoundError_base: Schema.Class<ResourceNotFoundError, Schema.Struct<{
59
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
60
+ readonly resource: Schema.String;
61
+ readonly id: Schema.String;
62
+ readonly message: Schema.String;
63
+ }>, import("effect/Cause").YieldableError>;
64
+ export declare class ResourceNotFoundError extends ResourceNotFoundError_base {
65
+ }
66
+ export type IntegrationReturnTo = string;
67
+ export declare const IntegrationReturnTo: Schema.String;
68
+ export type OrganizationId = string & EffectBrand.Brand<"OrganizationId">;
69
+ export declare const OrganizationId: Schema.brand<Schema.String, "OrganizationId">;
70
+ export type IntegrationId = string & EffectBrand.Brand<"IntegrationId">;
71
+ export declare const IntegrationId: Schema.brand<Schema.String, "IntegrationId">;
72
+ export type ContactId = string & EffectBrand.Brand<"ContactId">;
73
+ export declare const ContactId: Schema.brand<Schema.String, "ContactId">;
74
+ export type NamespaceId = string & EffectBrand.Brand<"NamespaceId">;
75
+ export declare const NamespaceId: Schema.brand<Schema.String, "NamespaceId">;
76
+ export type AgentId = string & EffectBrand.Brand<"AgentId">;
77
+ export declare const AgentId: Schema.brand<Schema.String, "AgentId">;
78
+ export type AgentSetupJob = "support" | "store" | "booking";
79
+ export declare const AgentSetupJob: Schema.Union<readonly [Schema.Literal<"support">, Schema.Literal<"store">, Schema.Literal<"booking">]>;
54
80
  export type AgentName = string;
55
81
  export declare const AgentName: Schema.String;
56
82
  export type KnowledgeSourceId = string & EffectBrand.Brand<"KnowledgeSourceId">;
57
83
  export declare const KnowledgeSourceId: Schema.brand<Schema.String, "KnowledgeSourceId">;
58
84
  export type MailboxEndpointId = string & EffectBrand.Brand<"MailboxEndpointId">;
59
85
  export declare const MailboxEndpointId: Schema.brand<Schema.String, "MailboxEndpointId">;
60
- export type IntegrationId = string & EffectBrand.Brand<"IntegrationId">;
61
- export declare const IntegrationId: Schema.brand<Schema.String, "IntegrationId">;
62
86
  export type AgentToolScope = {
63
87
  readonly kind: "all";
64
88
  } | {
@@ -75,12 +99,12 @@ export declare const AgentToolScope: Schema.Union<readonly [Schema.Struct<{
75
99
  readonly kind: Schema.Literal<"selected">;
76
100
  readonly names: Schema.$Array<Schema.String>;
77
101
  }>]>;
102
+ export type TemplateId = string & EffectBrand.Brand<"TemplateId">;
103
+ export declare const TemplateId: Schema.brand<Schema.String, "TemplateId">;
78
104
  export type PolicyEffect = "read" | "write" | "final";
79
105
  export declare const PolicyEffect: Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">, Schema.Literal<"final">]>;
80
106
  export type ApiKeyId = string & EffectBrand.Brand<"ApiKeyId">;
81
107
  export declare const ApiKeyId: Schema.brand<Schema.String, "ApiKeyId">;
82
- export type UserId = string & EffectBrand.Brand<"UserId">;
83
- export declare const UserId: Schema.brand<Schema.String, "UserId">;
84
108
  export type ExtensionInstallationId = string & EffectBrand.Brand<"ExtensionInstallationId">;
85
109
  export declare const ExtensionInstallationId: Schema.brand<Schema.String, "ExtensionInstallationId">;
86
110
  export type PolicyRequirement = "run" | "model" | "person" | "never";
@@ -106,14 +130,6 @@ declare const PaymentRequiredError_base: Schema.Class<PaymentRequiredError, Sche
106
130
  }>, import("effect/Cause").YieldableError>;
107
131
  export declare class PaymentRequiredError extends PaymentRequiredError_base {
108
132
  }
109
- declare const ResourceNotFoundError_base: Schema.Class<ResourceNotFoundError, Schema.Struct<{
110
- readonly _tag: Schema.tag<"ResourceNotFoundError">;
111
- readonly resource: Schema.String;
112
- readonly id: Schema.String;
113
- readonly message: Schema.String;
114
- }>, import("effect/Cause").YieldableError>;
115
- export declare class ResourceNotFoundError extends ResourceNotFoundError_base {
116
- }
117
133
  export type MonthlySpendCapDollars = number;
118
134
  export declare const MonthlySpendCapDollars: Schema.Finite;
119
135
  declare const ConflictError_base: Schema.Class<ConflictError, Schema.Struct<{
@@ -191,8 +207,6 @@ export type MessageId = string & EffectBrand.Brand<"MessageId">;
191
207
  export declare const MessageId: Schema.brand<Schema.String, "MessageId">;
192
208
  export type AttachmentId = string & EffectBrand.Brand<"AttachmentId">;
193
209
  export declare const AttachmentId: Schema.brand<Schema.String, "AttachmentId">;
194
- export type OrganizationId = string & EffectBrand.Brand<"OrganizationId">;
195
- export declare const OrganizationId: Schema.brand<Schema.String, "OrganizationId">;
196
210
  export type BrandAssets = {
197
211
  readonly logoUrl?: string | null;
198
212
  readonly logoDarkUrl?: string | null;
@@ -235,12 +249,6 @@ export type TemplatePublicationId = string & EffectBrand.Brand<"TemplatePublicat
235
249
  export declare const TemplatePublicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
236
250
  export type TemplateInputContractId = string & EffectBrand.Brand<"TemplateInputContractId">;
237
251
  export declare const TemplateInputContractId: Schema.brand<Schema.String, "TemplateInputContractId">;
238
- export type TemplateId = string & EffectBrand.Brand<"TemplateId">;
239
- export declare const TemplateId: Schema.brand<Schema.String, "TemplateId">;
240
- export type JsonObject = {
241
- readonly [x: string]: JsonValue;
242
- };
243
- export declare const JsonObject: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
244
252
  export type RenderLocale = string;
245
253
  export declare const RenderLocale: Schema.String;
246
254
  export type RenderTimeZone = string;
@@ -291,8 +299,6 @@ export declare const WhatsAppTemplateCustomFieldBinding: Schema.Struct<{
291
299
  }>;
292
300
  export type WhatsAppBusinessAccountId = string & EffectBrand.Brand<"WhatsAppBusinessAccountId">;
293
301
  export declare const WhatsAppBusinessAccountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
294
- export type ContactId = string & EffectBrand.Brand<"ContactId">;
295
- export declare const ContactId: Schema.brand<Schema.String, "ContactId">;
296
302
  export type ContactGroupId = string & EffectBrand.Brand<"ContactGroupId">;
297
303
  export declare const ContactGroupId: Schema.brand<Schema.String, "ContactGroupId">;
298
304
  export type CampaignRunId = string & EffectBrand.Brand<"CampaignRunId">;
@@ -435,6 +441,12 @@ export declare const FeedbackContext: Schema.Struct<{
435
441
  readonly operation: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
436
442
  readonly resourceId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
437
443
  }>;
444
+ export type IntegrationStatus = "pending" | "connected" | "needsReconnect";
445
+ export declare const IntegrationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"connected">, Schema.Literal<"needsReconnect">]>;
446
+ export type AnswerWithoutApproval = boolean;
447
+ export declare const AnswerWithoutApproval: Schema.Boolean;
448
+ export type IntegrationTool = string;
449
+ export declare const IntegrationTool: Schema.String;
438
450
  export type JourneyId = string & EffectBrand.Brand<"JourneyId">;
439
451
  export declare const JourneyId: Schema.brand<Schema.String, "JourneyId">;
440
452
  export type JourneyName = string;
@@ -865,6 +877,14 @@ export declare const OperationResource: Schema.Struct<{
865
877
  }>;
866
878
  export type PolicyVersion = number;
867
879
  export declare const PolicyVersion: Schema.Finite;
880
+ declare const SlugTaken_base: Schema.Class<SlugTaken, Schema.Struct<{
881
+ readonly _tag: Schema.tag<"SlugTaken">;
882
+ readonly slug: Schema.String;
883
+ readonly suggestion: Schema.String;
884
+ readonly message: Schema.String;
885
+ }>, import("effect/Cause").YieldableError>;
886
+ export declare class SlugTaken extends SlugTaken_base {
887
+ }
868
888
  export type TemplateTrackingDefault = {
869
889
  readonly opens?: boolean | null;
870
890
  readonly clicks?: boolean | null;
@@ -883,6 +903,12 @@ declare const TemplateInUseError_base: Schema.Class<TemplateInUseError, Schema.S
883
903
  }>, import("effect/Cause").YieldableError>;
884
904
  export declare class TemplateInUseError extends TemplateInUseError_base {
885
905
  }
906
+ declare const ShareLinkUnavailable_base: Schema.Class<ShareLinkUnavailable, Schema.Struct<{
907
+ readonly _tag: Schema.tag<"ShareLinkUnavailable">;
908
+ readonly message: Schema.String;
909
+ }>, import("effect/Cause").YieldableError>;
910
+ export declare class ShareLinkUnavailable extends ShareLinkUnavailable_base {
911
+ }
886
912
  export type TemplateFromDefaultInput = {
887
913
  readonly email: string;
888
914
  readonly name?: string | null;
@@ -945,6 +971,16 @@ export declare const AddTemplateEntryPayload: Schema.Struct<{
945
971
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
946
972
  readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>>;
947
973
  }>;
974
+ export type ChangeMailboxSchedule = {
975
+ readonly idempotencyKey: string;
976
+ readonly base: string;
977
+ readonly expectedRevision: number;
978
+ };
979
+ export declare const ChangeMailboxSchedule: Schema.Struct<{
980
+ readonly idempotencyKey: Schema.String;
981
+ readonly base: Schema.String;
982
+ readonly expectedRevision: Schema.Finite;
983
+ }>;
948
984
  export type ContactTags = {
949
985
  readonly tags: readonly [string, ...Array<string>];
950
986
  };
@@ -1004,6 +1040,20 @@ export declare const CreateMailboxNotePayload: Schema.Struct<{
1004
1040
  readonly color: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1005
1041
  readonly pinned: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1006
1042
  }>;
1043
+ export type CreateMailHistoryUpload = {
1044
+ readonly importId?: string | null;
1045
+ readonly filename: string;
1046
+ readonly sizeBytes: number;
1047
+ readonly format: "gmail" | "apple" | "mbox";
1048
+ readonly mailboxPath?: string | null;
1049
+ };
1050
+ export declare const CreateMailHistoryUpload: Schema.Struct<{
1051
+ readonly importId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1052
+ readonly filename: Schema.String;
1053
+ readonly sizeBytes: Schema.Finite;
1054
+ readonly format: Schema.Union<readonly [Schema.Literal<"gmail">, Schema.Literal<"apple">, Schema.Literal<"mbox">]>;
1055
+ readonly mailboxPath: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1056
+ }>;
1007
1057
  export type CreateMediaPayload = {
1008
1058
  readonly filename: string;
1009
1059
  readonly contentType: string;
@@ -1140,6 +1190,30 @@ export declare const RecordWhatsAppFlowVersionPayload: Schema.Struct<{
1140
1190
  readonly commitSha: Schema.String;
1141
1191
  readonly expectedWorkspaceRevision: Schema.String;
1142
1192
  }>;
1193
+ export type RescheduleMailboxSend = {
1194
+ readonly idempotencyKey: string;
1195
+ readonly base: string;
1196
+ readonly expectedRevision: number;
1197
+ readonly sendAt: string;
1198
+ };
1199
+ export declare const RescheduleMailboxSend: Schema.Struct<{
1200
+ readonly idempotencyKey: Schema.String;
1201
+ readonly base: Schema.String;
1202
+ readonly expectedRevision: Schema.Finite;
1203
+ readonly sendAt: Schema.String;
1204
+ }>;
1205
+ export type ScheduleMailboxDraft = {
1206
+ readonly idempotencyKey: string;
1207
+ readonly base: string;
1208
+ readonly draftRevision: number;
1209
+ readonly sendAt: string;
1210
+ };
1211
+ export declare const ScheduleMailboxDraft: Schema.Struct<{
1212
+ readonly idempotencyKey: Schema.String;
1213
+ readonly base: Schema.String;
1214
+ readonly draftRevision: Schema.Finite;
1215
+ readonly sendAt: Schema.String;
1216
+ }>;
1143
1217
  export type SetWhatsAppFlowEndpointPayload = {
1144
1218
  readonly url: string;
1145
1219
  };
@@ -1244,6 +1318,162 @@ export declare const UpdateNamespacePayload: Schema.Struct<{
1244
1318
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1245
1319
  readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Null]>>, Schema.Null]>>;
1246
1320
  }>;
1321
+ export type TemplateData = JsonObject | null;
1322
+ export declare const TemplateData: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
1323
+ export type SmsTemplateData = JsonObject | null;
1324
+ export declare const SmsTemplateData: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
1325
+ export type ContactConsent = {
1326
+ readonly status: "opted_in" | "opted_out";
1327
+ readonly source: string;
1328
+ readonly capturedAt: string;
1329
+ readonly proof: JsonObject | null;
1330
+ };
1331
+ export declare const ContactConsent: Schema.Struct<{
1332
+ readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1333
+ readonly source: Schema.String;
1334
+ readonly capturedAt: Schema.String;
1335
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
1336
+ }>;
1337
+ export type JourneyWebhookConfig = {
1338
+ readonly data?: JsonObject;
1339
+ };
1340
+ export declare const JourneyWebhookConfig: Schema.Struct<{
1341
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
1342
+ }>;
1343
+ export type SetContactConsent = {
1344
+ readonly status: "opted_in" | "opted_out";
1345
+ readonly source: string;
1346
+ readonly capturedAt: string;
1347
+ readonly proof?: JsonObject | null;
1348
+ };
1349
+ export declare const SetContactConsent: Schema.Struct<{
1350
+ readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1351
+ readonly source: Schema.String;
1352
+ readonly capturedAt: Schema.String;
1353
+ readonly proof: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1354
+ }>;
1355
+ export type AccountLinks = {
1356
+ readonly [x: string]: IntegrationAccountId;
1357
+ };
1358
+ export declare const AccountLinks: Schema.$Record<Schema.String, Schema.brand<Schema.String, "IntegrationAccountId">>;
1359
+ export type ConnectAccountPayload = {
1360
+ readonly provider: IntegrationKey;
1361
+ readonly input?: JsonObject;
1362
+ readonly credentials?: {
1363
+ readonly [x: string]: string;
1364
+ };
1365
+ readonly app?: IntegrationKey;
1366
+ readonly accountId?: IntegrationAccountId;
1367
+ readonly expectedHosts?: ReadonlyArray<string>;
1368
+ readonly returnTo: IntegrationReturnTo;
1369
+ };
1370
+ export declare const ConnectAccountPayload: Schema.Struct<{
1371
+ readonly provider: Schema.String;
1372
+ readonly input: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
1373
+ readonly credentials: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
1374
+ readonly app: Schema.optionalKey<Schema.String>;
1375
+ readonly accountId: Schema.optionalKey<Schema.brand<Schema.String, "IntegrationAccountId">>;
1376
+ readonly expectedHosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
1377
+ readonly returnTo: Schema.String;
1378
+ }>;
1379
+ export type ContactEvent = {
1380
+ readonly id: string;
1381
+ readonly contactId: ContactId;
1382
+ readonly name: string;
1383
+ readonly source: "api" | "samva";
1384
+ readonly properties: JsonObject;
1385
+ readonly occurredAt: string;
1386
+ readonly recordedAt: string;
1387
+ };
1388
+ export declare const ContactEvent: Schema.Struct<{
1389
+ readonly id: Schema.String;
1390
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1391
+ readonly name: Schema.String;
1392
+ readonly source: Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"samva">]>;
1393
+ readonly properties: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
1394
+ readonly occurredAt: Schema.String;
1395
+ readonly recordedAt: Schema.String;
1396
+ }>;
1397
+ export type ContactEventReference = {
1398
+ readonly id: ContactId;
1399
+ readonly externalId?: never;
1400
+ readonly email?: never;
1401
+ } | {
1402
+ readonly externalId: string;
1403
+ readonly id?: never;
1404
+ readonly email?: never;
1405
+ } | {
1406
+ readonly email: string;
1407
+ readonly id?: never;
1408
+ readonly externalId?: never;
1409
+ };
1410
+ export declare const ContactEventReference: Schema.Union<readonly [Schema.Struct<{
1411
+ readonly id: Schema.brand<Schema.String, "ContactId">;
1412
+ readonly externalId: Schema.optionalKey<Schema.Never>;
1413
+ readonly email: Schema.optionalKey<Schema.Never>;
1414
+ }>, Schema.Struct<{
1415
+ readonly externalId: Schema.String;
1416
+ readonly id: Schema.optionalKey<Schema.Never>;
1417
+ readonly email: Schema.optionalKey<Schema.Never>;
1418
+ }>, Schema.Struct<{
1419
+ readonly email: Schema.String;
1420
+ readonly id: Schema.optionalKey<Schema.Never>;
1421
+ readonly externalId: Schema.optionalKey<Schema.Never>;
1422
+ }>]>;
1423
+ export type EmailRecipient = {
1424
+ readonly contactId: ContactId;
1425
+ } | {
1426
+ readonly email: string;
1427
+ readonly name?: string | null;
1428
+ readonly displayName?: string | null;
1429
+ };
1430
+ export declare const EmailRecipient: Schema.Union<readonly [Schema.Struct<{
1431
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1432
+ }>, Schema.Struct<{
1433
+ readonly email: Schema.String;
1434
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1435
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1436
+ }>]>;
1437
+ export type SmsRecipient = {
1438
+ readonly contactId: ContactId;
1439
+ } | {
1440
+ readonly phone: string;
1441
+ readonly name?: string | null;
1442
+ readonly displayName?: string | null;
1443
+ };
1444
+ export declare const SmsRecipient: Schema.Union<readonly [Schema.Struct<{
1445
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1446
+ }>, Schema.Struct<{
1447
+ readonly phone: Schema.String;
1448
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1449
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1450
+ }>]>;
1451
+ export type WhatsAppRecipient = {
1452
+ readonly contactId: ContactId;
1453
+ } | {
1454
+ readonly phone: string;
1455
+ readonly name?: string | null;
1456
+ readonly displayName?: string | null;
1457
+ };
1458
+ export declare const WhatsAppRecipient: Schema.Union<readonly [Schema.Struct<{
1459
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1460
+ }>, Schema.Struct<{
1461
+ readonly phone: Schema.String;
1462
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1463
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1464
+ }>]>;
1465
+ export type TopicContactById = {
1466
+ readonly contactId: ContactId;
1467
+ };
1468
+ export declare const TopicContactById: Schema.Struct<{
1469
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1470
+ }>;
1471
+ export type ConversationContacts = {
1472
+ readonly contactIds: readonly [ContactId, ...Array<ContactId>];
1473
+ };
1474
+ export declare const ConversationContacts: Schema.Struct<{
1475
+ readonly contactIds: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "ContactId">]>, readonly [Schema.brand<Schema.String, "ContactId">]>;
1476
+ }>;
1247
1477
  export type CreateTemplateFromBriefPayload = {
1248
1478
  readonly brief: string;
1249
1479
  readonly name?: string | null;
@@ -1269,7 +1499,8 @@ export declare const CreateTemplateFromWebsitePayload: Schema.Struct<{
1269
1499
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1270
1500
  }>;
1271
1501
  export type CreateTemplatePayload = {
1272
- readonly name: string;
1502
+ readonly name?: string | null;
1503
+ readonly shareLinkSlug?: string | null;
1273
1504
  readonly projectName?: string | null;
1274
1505
  readonly slug?: string | null;
1275
1506
  readonly galleryTemplateId?: string | null;
@@ -1280,7 +1511,8 @@ export type CreateTemplatePayload = {
1280
1511
  readonly shared?: boolean | null;
1281
1512
  };
1282
1513
  export declare const CreateTemplatePayload: Schema.Struct<{
1283
- readonly name: Schema.String;
1514
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1515
+ readonly shareLinkSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1284
1516
  readonly projectName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1285
1517
  readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1286
1518
  readonly galleryTemplateId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -1292,10 +1524,12 @@ export declare const CreateTemplatePayload: Schema.Struct<{
1292
1524
  }>;
1293
1525
  export type AgentIntegrationGrant = {
1294
1526
  readonly integrationId: IntegrationId;
1527
+ readonly subject?: "org" | "contact";
1295
1528
  readonly tools: AgentToolScope;
1296
1529
  };
1297
1530
  export declare const AgentIntegrationGrant: Schema.Struct<{
1298
1531
  readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
1532
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"org">, Schema.Literal<"contact">]>>;
1299
1533
  readonly tools: Schema.Union<readonly [Schema.Struct<{
1300
1534
  readonly kind: Schema.Literal<"all">;
1301
1535
  }>, Schema.Struct<{
@@ -1305,6 +1539,32 @@ export declare const AgentIntegrationGrant: Schema.Struct<{
1305
1539
  readonly names: Schema.$Array<Schema.String>;
1306
1540
  }>]>;
1307
1541
  }>;
1542
+ export type SendMailboxChatPayload = {
1543
+ readonly channel: "whatsapp" | "sms";
1544
+ readonly to: string;
1545
+ readonly text?: string | null;
1546
+ readonly templateId?: TemplateId | null;
1547
+ readonly templateData?: JsonObject | null;
1548
+ };
1549
+ export declare const SendMailboxChatPayload: Schema.Struct<{
1550
+ readonly channel: Schema.Union<readonly [Schema.Literal<"whatsapp">, Schema.Literal<"sms">]>;
1551
+ readonly to: Schema.String;
1552
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1553
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1554
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1555
+ }>;
1556
+ export type ReplyMailboxChatPayload = {
1557
+ readonly channel: "whatsapp" | "sms";
1558
+ readonly text?: string | null;
1559
+ readonly templateId?: TemplateId | null;
1560
+ readonly templateData?: JsonObject | null;
1561
+ };
1562
+ export declare const ReplyMailboxChatPayload: Schema.Struct<{
1563
+ readonly channel: Schema.Union<readonly [Schema.Literal<"whatsapp">, Schema.Literal<"sms">]>;
1564
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1565
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1566
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1567
+ }>;
1308
1568
  export type PolicySubject = {
1309
1569
  readonly kind: "agent";
1310
1570
  readonly id: AgentId;
@@ -1548,72 +1808,12 @@ export declare const RespondToOnboardingInformationRequestInput: Schema.Struct<{
1548
1808
  readonly responseText: Schema.String;
1549
1809
  readonly evidenceMediaIds: Schema.$Array<Schema.brand<Schema.String, "MediaId">>;
1550
1810
  }>;
1551
- export type TemplateData = JsonObject | null;
1552
- export declare const TemplateData: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
1553
- export type SmsTemplateData = JsonObject | null;
1554
- export declare const SmsTemplateData: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
1555
- export type ContactConsent = {
1556
- readonly status: "opted_in" | "opted_out";
1557
- readonly source: string;
1558
- readonly capturedAt: string;
1559
- readonly proof: JsonObject | null;
1560
- };
1561
- export declare const ContactConsent: Schema.Struct<{
1562
- readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1563
- readonly source: Schema.String;
1564
- readonly capturedAt: Schema.String;
1565
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
1566
- }>;
1567
- export type JourneyWebhookConfig = {
1568
- readonly data?: JsonObject;
1569
- };
1570
- export declare const JourneyWebhookConfig: Schema.Struct<{
1571
- readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
1572
- }>;
1573
- export type SendMailboxChatPayload = {
1574
- readonly channel: "whatsapp" | "sms";
1575
- readonly to: string;
1576
- readonly text?: string | null;
1577
- readonly templateId?: TemplateId | null;
1578
- readonly templateData?: JsonObject | null;
1579
- };
1580
- export declare const SendMailboxChatPayload: Schema.Struct<{
1581
- readonly channel: Schema.Union<readonly [Schema.Literal<"whatsapp">, Schema.Literal<"sms">]>;
1582
- readonly to: Schema.String;
1583
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1584
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1585
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1586
- }>;
1587
- export type ReplyMailboxChatPayload = {
1588
- readonly channel: "whatsapp" | "sms";
1589
- readonly text?: string | null;
1590
- readonly templateId?: TemplateId | null;
1591
- readonly templateData?: JsonObject | null;
1592
- };
1593
- export declare const ReplyMailboxChatPayload: Schema.Struct<{
1594
- readonly channel: Schema.Union<readonly [Schema.Literal<"whatsapp">, Schema.Literal<"sms">]>;
1595
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1596
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1597
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1598
- }>;
1599
- export type SetContactConsent = {
1600
- readonly status: "opted_in" | "opted_out";
1601
- readonly source: string;
1602
- readonly capturedAt: string;
1603
- readonly proof?: JsonObject | null;
1604
- };
1605
- export declare const SetContactConsent: Schema.Struct<{
1606
- readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1607
- readonly source: Schema.String;
1608
- readonly capturedAt: Schema.String;
1609
- readonly proof: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1610
- }>;
1611
- export type RenderTemplatePublicationPayload = {
1612
- readonly data: {
1613
- readonly [x: string]: JsonValue;
1614
- };
1615
- readonly locale?: RenderLocale;
1616
- readonly timeZone?: RenderTimeZone;
1811
+ export type RenderTemplatePublicationPayload = {
1812
+ readonly data: {
1813
+ readonly [x: string]: JsonValue;
1814
+ };
1815
+ readonly locale?: RenderLocale;
1816
+ readonly timeZone?: RenderTimeZone;
1617
1817
  };
1618
1818
  export declare const RenderTemplatePublicationPayload: Schema.Struct<{
1619
1819
  readonly data: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
@@ -1696,104 +1896,6 @@ export declare const SubmitTemplateRegistrationPayload: Schema.Struct<{
1696
1896
  readonly provider: Schema.Literal<"whatsapp">;
1697
1897
  readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
1698
1898
  }>;
1699
- export type ContactEvent = {
1700
- readonly id: string;
1701
- readonly contactId: ContactId;
1702
- readonly name: string;
1703
- readonly source: "api" | "samva";
1704
- readonly properties: JsonObject;
1705
- readonly occurredAt: string;
1706
- readonly recordedAt: string;
1707
- };
1708
- export declare const ContactEvent: Schema.Struct<{
1709
- readonly id: Schema.String;
1710
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
1711
- readonly name: Schema.String;
1712
- readonly source: Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"samva">]>;
1713
- readonly properties: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
1714
- readonly occurredAt: Schema.String;
1715
- readonly recordedAt: Schema.String;
1716
- }>;
1717
- export type ContactEventReference = {
1718
- readonly id: ContactId;
1719
- readonly externalId?: never;
1720
- readonly email?: never;
1721
- } | {
1722
- readonly externalId: string;
1723
- readonly id?: never;
1724
- readonly email?: never;
1725
- } | {
1726
- readonly email: string;
1727
- readonly id?: never;
1728
- readonly externalId?: never;
1729
- };
1730
- export declare const ContactEventReference: Schema.Union<readonly [Schema.Struct<{
1731
- readonly id: Schema.brand<Schema.String, "ContactId">;
1732
- readonly externalId: Schema.optionalKey<Schema.Never>;
1733
- readonly email: Schema.optionalKey<Schema.Never>;
1734
- }>, Schema.Struct<{
1735
- readonly externalId: Schema.String;
1736
- readonly id: Schema.optionalKey<Schema.Never>;
1737
- readonly email: Schema.optionalKey<Schema.Never>;
1738
- }>, Schema.Struct<{
1739
- readonly email: Schema.String;
1740
- readonly id: Schema.optionalKey<Schema.Never>;
1741
- readonly externalId: Schema.optionalKey<Schema.Never>;
1742
- }>]>;
1743
- export type EmailRecipient = {
1744
- readonly contactId: ContactId;
1745
- } | {
1746
- readonly email: string;
1747
- readonly name?: string | null;
1748
- readonly displayName?: string | null;
1749
- };
1750
- export declare const EmailRecipient: Schema.Union<readonly [Schema.Struct<{
1751
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
1752
- }>, Schema.Struct<{
1753
- readonly email: Schema.String;
1754
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1755
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1756
- }>]>;
1757
- export type SmsRecipient = {
1758
- readonly contactId: ContactId;
1759
- } | {
1760
- readonly phone: string;
1761
- readonly name?: string | null;
1762
- readonly displayName?: string | null;
1763
- };
1764
- export declare const SmsRecipient: Schema.Union<readonly [Schema.Struct<{
1765
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
1766
- }>, Schema.Struct<{
1767
- readonly phone: Schema.String;
1768
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1769
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1770
- }>]>;
1771
- export type WhatsAppRecipient = {
1772
- readonly contactId: ContactId;
1773
- } | {
1774
- readonly phone: string;
1775
- readonly name?: string | null;
1776
- readonly displayName?: string | null;
1777
- };
1778
- export declare const WhatsAppRecipient: Schema.Union<readonly [Schema.Struct<{
1779
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
1780
- }>, Schema.Struct<{
1781
- readonly phone: Schema.String;
1782
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1783
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1784
- }>]>;
1785
- export type TopicContactById = {
1786
- readonly contactId: ContactId;
1787
- };
1788
- export declare const TopicContactById: Schema.Struct<{
1789
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
1790
- }>;
1791
- export type ConversationContacts = {
1792
- readonly contactIds: readonly [ContactId, ...Array<ContactId>];
1793
- };
1794
- export declare const ConversationContacts: Schema.Struct<{
1795
- readonly contactIds: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "ContactId">]>, readonly [Schema.brand<Schema.String, "ContactId">]>;
1796
- }>;
1797
1899
  export type CampaignAudience = {
1798
1900
  readonly topicId: TopicId;
1799
1901
  readonly includeTags?: ReadonlyArray<string> | null;
@@ -1945,6 +2047,26 @@ export declare const SendFeedback: Schema.Struct<{
1945
2047
  readonly resourceId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1946
2048
  }>, Schema.Null]>>;
1947
2049
  }>;
2050
+ export type UpdateIntegrationPayload = {
2051
+ readonly answerWithoutApproval?: AnswerWithoutApproval;
2052
+ readonly enabledTools?: ReadonlyArray<IntegrationTool>;
2053
+ readonly tool?: {
2054
+ readonly name: IntegrationTool;
2055
+ readonly enabled?: boolean;
2056
+ readonly runsWithoutApproval?: boolean;
2057
+ };
2058
+ readonly settings?: JsonObject;
2059
+ };
2060
+ export declare const UpdateIntegrationPayload: Schema.Struct<{
2061
+ readonly answerWithoutApproval: Schema.optionalKey<Schema.Boolean>;
2062
+ readonly enabledTools: Schema.optionalKey<Schema.$Array<Schema.String>>;
2063
+ readonly tool: Schema.optionalKey<Schema.Struct<{
2064
+ readonly name: Schema.String;
2065
+ readonly enabled: Schema.optionalKey<Schema.Boolean>;
2066
+ readonly runsWithoutApproval: Schema.optionalKey<Schema.Boolean>;
2067
+ }>>;
2068
+ readonly settings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
2069
+ }>;
1948
2070
  export type UpdateJourneyPayload = {
1949
2071
  readonly name: JourneyName;
1950
2072
  };
@@ -2178,6 +2300,8 @@ export type UpdateMailboxThreadPayload = {
2178
2300
  readonly read?: boolean | null;
2179
2301
  readonly starred?: boolean | null;
2180
2302
  readonly snoozedUntil?: string | null;
2303
+ readonly ifNoReply?: boolean;
2304
+ readonly reminderInboxAt?: string | null;
2181
2305
  };
2182
2306
  export declare const UpdateMailboxThreadPayload: Schema.Struct<{
2183
2307
  readonly folder: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"inbox">, Schema.Literal<"assigned">, Schema.Literal<"pending">, Schema.Literal<"sent">, Schema.Literal<"archived">, Schema.Literal<"trash">]>, Schema.Null]>>;
@@ -2187,6 +2311,8 @@ export declare const UpdateMailboxThreadPayload: Schema.Struct<{
2187
2311
  readonly read: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2188
2312
  readonly starred: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2189
2313
  readonly snoozedUntil: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2314
+ readonly ifNoReply: Schema.optionalKey<Schema.Boolean>;
2315
+ readonly reminderInboxAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2190
2316
  }>;
2191
2317
  export type WhatsAppTemplateIdContent = {
2192
2318
  readonly templateId: TemplateId;
@@ -2437,84 +2563,205 @@ export declare const CreateWhatsAppSetupLinkPayload: Schema.Struct<{
2437
2563
  readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2438
2564
  readonly expiresAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2439
2565
  }>;
2440
- export type PolicyRuleMatch = {
2441
- readonly kind?: "send" | "reply" | "toolCall" | "handoff" | null;
2442
- readonly effect?: PolicyEffect | null;
2443
- readonly channel?: "sms" | "whatsapp" | "email" | null;
2444
- readonly integration?: string | null;
2445
- readonly tool?: string | null;
2446
- readonly subject?: "agent" | "apiKey" | "member" | "extension" | PolicySubject | null;
2566
+ export type SmsContent = {
2567
+ readonly text?: string | null;
2568
+ readonly templateId?: TemplateId | null;
2569
+ readonly templateSlug?: string | null;
2570
+ readonly templateData?: SmsTemplateData;
2447
2571
  };
2448
- export declare const PolicyRuleMatch: Schema.Struct<{
2449
- readonly kind: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"reply">, Schema.Literal<"toolCall">, Schema.Literal<"handoff">]>, Schema.Null]>>;
2450
- readonly effect: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">, Schema.Literal<"final">]>, Schema.Null]>>;
2451
- readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
2452
- readonly integration: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2453
- readonly tool: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2454
- readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"apiKey">, Schema.Literal<"member">, Schema.Literal<"extension">]>, Schema.Union<readonly [Schema.Struct<{
2455
- readonly kind: Schema.Literal<"agent">;
2456
- readonly id: Schema.brand<Schema.String, "AgentId">;
2457
- }>, Schema.Struct<{
2458
- readonly kind: Schema.Literal<"apiKey">;
2459
- readonly id: Schema.brand<Schema.String, "ApiKeyId">;
2460
- }>, Schema.Struct<{
2461
- readonly kind: Schema.Literal<"member">;
2462
- readonly userId: Schema.brand<Schema.String, "UserId">;
2463
- }>, Schema.Struct<{
2464
- readonly kind: Schema.Literal<"extension">;
2465
- readonly id: Schema.brand<Schema.String, "ExtensionInstallationId">;
2466
- }>]>, Schema.Null]>>;
2572
+ export declare const SmsContent: Schema.Struct<{
2573
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2574
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2575
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2576
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2467
2577
  }>;
2468
- export type WorkingHours = {
2469
- readonly timeZone: TimeZone;
2470
- readonly ranges: ReadonlyArray<WorkingHoursRange>;
2578
+ export type SmsDispatchContent = {
2579
+ readonly text?: string | null;
2580
+ readonly templateId?: TemplateId | null;
2581
+ readonly templateSlug?: string | null;
2582
+ readonly templateData?: SmsTemplateData;
2471
2583
  };
2472
- export declare const WorkingHours: Schema.Struct<{
2473
- readonly timeZone: Schema.String;
2474
- readonly ranges: Schema.$Array<Schema.Struct<{
2475
- readonly day: Schema.Union<readonly [Schema.Literal<"monday">, Schema.Literal<"tuesday">, Schema.Literal<"wednesday">, Schema.Literal<"thursday">, Schema.Literal<"friday">, Schema.Literal<"saturday">, Schema.Literal<"sunday">]>;
2476
- readonly opens: Schema.String;
2477
- readonly closes: Schema.String;
2478
- }>>;
2584
+ export declare const SmsDispatchContent: Schema.Struct<{
2585
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2586
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2587
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2588
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2479
2589
  }>;
2480
- export type ApiKeyAccess = {
2481
- readonly mode: "full";
2482
- } | {
2483
- readonly mode: "restricted";
2484
- readonly resources: ApiKeyResourceAccess;
2485
- readonly mailboxes?: ApiKeyMailboxAccess | null;
2486
- readonly namespaceId?: NamespaceId | null;
2590
+ export type ContactIdentityChannel = {
2591
+ readonly channel: "sms" | "whatsapp" | "email";
2592
+ readonly reachability: "unknown" | "reachable" | "unreachable";
2593
+ readonly consent: ContactConsent | null;
2487
2594
  };
2488
- export declare const ApiKeyAccess: Schema.Union<readonly [Schema.Struct<{
2489
- readonly mode: Schema.Literal<"full">;
2490
- }>, Schema.Struct<{
2491
- readonly mode: Schema.Literal<"restricted">;
2492
- readonly resources: Schema.Struct<{
2493
- readonly messages: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2494
- readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2495
- readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2496
- readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2497
- readonly domains: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2498
- readonly phoneNumbers: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2499
- readonly whatsappAccounts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2500
- readonly contacts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2501
- readonly conversations: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2502
- readonly templates: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2503
- readonly agents: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2504
- readonly webhooks: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2505
- readonly apiKeys: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2506
- readonly organization: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2507
- readonly billing: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2508
- readonly analytics: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2509
- }>;
2510
- readonly mailboxes: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2511
- readonly permissions: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>]>;
2512
- readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>>;
2513
- }>, Schema.Null]>>;
2514
- readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
2515
- }>]>;
2516
- export type WhatsAppReactionContent = {
2517
- readonly reaction: WhatsAppReaction;
2595
+ export declare const ContactIdentityChannel: Schema.Struct<{
2596
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2597
+ readonly reachability: Schema.Union<readonly [Schema.Literal<"unknown">, Schema.Literal<"reachable">, Schema.Literal<"unreachable">]>;
2598
+ readonly consent: Schema.Union<readonly [Schema.Struct<{
2599
+ readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
2600
+ readonly source: Schema.String;
2601
+ readonly capturedAt: Schema.String;
2602
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
2603
+ }>, Schema.Null]>;
2604
+ }>;
2605
+ export type InstallIntegrationPayload = {
2606
+ readonly app: IntegrationKey;
2607
+ readonly accounts: AccountLinks;
2608
+ readonly settings?: JsonObject;
2609
+ };
2610
+ export declare const InstallIntegrationPayload: Schema.Struct<{
2611
+ readonly app: Schema.String;
2612
+ readonly accounts: Schema.$Record<Schema.String, Schema.brand<Schema.String, "IntegrationAccountId">>;
2613
+ readonly settings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
2614
+ }>;
2615
+ export type CreateEventPayload = {
2616
+ readonly contact: ContactEventReference;
2617
+ readonly name: string;
2618
+ readonly properties?: JsonObject | null;
2619
+ readonly occurredAt?: string | null;
2620
+ };
2621
+ export declare const CreateEventPayload: Schema.Struct<{
2622
+ readonly contact: Schema.Union<readonly [Schema.Struct<{
2623
+ readonly id: Schema.brand<Schema.String, "ContactId">;
2624
+ readonly externalId: Schema.optionalKey<Schema.Never>;
2625
+ readonly email: Schema.optionalKey<Schema.Never>;
2626
+ }>, Schema.Struct<{
2627
+ readonly externalId: Schema.String;
2628
+ readonly id: Schema.optionalKey<Schema.Never>;
2629
+ readonly email: Schema.optionalKey<Schema.Never>;
2630
+ }>, Schema.Struct<{
2631
+ readonly email: Schema.String;
2632
+ readonly id: Schema.optionalKey<Schema.Never>;
2633
+ readonly externalId: Schema.optionalKey<Schema.Never>;
2634
+ }>]>;
2635
+ readonly name: Schema.String;
2636
+ readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2637
+ readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2638
+ }>;
2639
+ export type EmailRecipients = ReadonlyArray<EmailRecipient>;
2640
+ export declare const EmailRecipients: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2641
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2642
+ }>, Schema.Struct<{
2643
+ readonly email: Schema.String;
2644
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2645
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2646
+ }>]>>;
2647
+ export type EmailCcRecipients = ReadonlyArray<EmailRecipient> | null;
2648
+ export declare const EmailCcRecipients: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2649
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2650
+ }>, Schema.Struct<{
2651
+ readonly email: Schema.String;
2652
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2653
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2654
+ }>]>>, Schema.Null]>;
2655
+ export type EmailBccRecipients = ReadonlyArray<EmailRecipient> | null;
2656
+ export declare const EmailBccRecipients: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2657
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2658
+ }>, Schema.Struct<{
2659
+ readonly email: Schema.String;
2660
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2661
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2662
+ }>]>>, Schema.Null]>;
2663
+ export type SmsRecipients = ReadonlyArray<SmsRecipient>;
2664
+ export declare const SmsRecipients: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2665
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2666
+ }>, Schema.Struct<{
2667
+ readonly phone: Schema.String;
2668
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2669
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2670
+ }>]>>;
2671
+ export type WhatsAppRecipients = ReadonlyArray<WhatsAppRecipient>;
2672
+ export declare const WhatsAppRecipients: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2673
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2674
+ }>, Schema.Struct<{
2675
+ readonly phone: Schema.String;
2676
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2677
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2678
+ }>]>>;
2679
+ export type TopicContactRef = TopicContactById | TopicContactByEmail | TopicContactByPhone;
2680
+ export declare const TopicContactRef: Schema.Union<readonly [Schema.Struct<{
2681
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2682
+ }>, Schema.Struct<{
2683
+ readonly email: Schema.String;
2684
+ }>, Schema.Struct<{
2685
+ readonly phone: Schema.String;
2686
+ }>]>;
2687
+ export type PolicyRuleMatch = {
2688
+ readonly kind?: "send" | "reply" | "toolCall" | "handoff" | null;
2689
+ readonly effect?: PolicyEffect | null;
2690
+ readonly channel?: "sms" | "whatsapp" | "email" | null;
2691
+ readonly integration?: string | null;
2692
+ readonly tool?: string | null;
2693
+ readonly subject?: "agent" | "apiKey" | "member" | "extension" | PolicySubject | null;
2694
+ };
2695
+ export declare const PolicyRuleMatch: Schema.Struct<{
2696
+ readonly kind: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"reply">, Schema.Literal<"toolCall">, Schema.Literal<"handoff">]>, Schema.Null]>>;
2697
+ readonly effect: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">, Schema.Literal<"final">]>, Schema.Null]>>;
2698
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
2699
+ readonly integration: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2700
+ readonly tool: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2701
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"apiKey">, Schema.Literal<"member">, Schema.Literal<"extension">]>, Schema.Union<readonly [Schema.Struct<{
2702
+ readonly kind: Schema.Literal<"agent">;
2703
+ readonly id: Schema.brand<Schema.String, "AgentId">;
2704
+ }>, Schema.Struct<{
2705
+ readonly kind: Schema.Literal<"apiKey">;
2706
+ readonly id: Schema.brand<Schema.String, "ApiKeyId">;
2707
+ }>, Schema.Struct<{
2708
+ readonly kind: Schema.Literal<"member">;
2709
+ readonly userId: Schema.brand<Schema.String, "UserId">;
2710
+ }>, Schema.Struct<{
2711
+ readonly kind: Schema.Literal<"extension">;
2712
+ readonly id: Schema.brand<Schema.String, "ExtensionInstallationId">;
2713
+ }>]>, Schema.Null]>>;
2714
+ }>;
2715
+ export type WorkingHours = {
2716
+ readonly timeZone: TimeZone;
2717
+ readonly ranges: ReadonlyArray<WorkingHoursRange>;
2718
+ };
2719
+ export declare const WorkingHours: Schema.Struct<{
2720
+ readonly timeZone: Schema.String;
2721
+ readonly ranges: Schema.$Array<Schema.Struct<{
2722
+ readonly day: Schema.Union<readonly [Schema.Literal<"monday">, Schema.Literal<"tuesday">, Schema.Literal<"wednesday">, Schema.Literal<"thursday">, Schema.Literal<"friday">, Schema.Literal<"saturday">, Schema.Literal<"sunday">]>;
2723
+ readonly opens: Schema.String;
2724
+ readonly closes: Schema.String;
2725
+ }>>;
2726
+ }>;
2727
+ export type ApiKeyAccess = {
2728
+ readonly mode: "full";
2729
+ } | {
2730
+ readonly mode: "restricted";
2731
+ readonly resources: ApiKeyResourceAccess;
2732
+ readonly mailboxes?: ApiKeyMailboxAccess | null;
2733
+ readonly namespaceId?: NamespaceId | null;
2734
+ };
2735
+ export declare const ApiKeyAccess: Schema.Union<readonly [Schema.Struct<{
2736
+ readonly mode: Schema.Literal<"full">;
2737
+ }>, Schema.Struct<{
2738
+ readonly mode: Schema.Literal<"restricted">;
2739
+ readonly resources: Schema.Struct<{
2740
+ readonly messages: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2741
+ readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2742
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2743
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2744
+ readonly domains: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2745
+ readonly phoneNumbers: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2746
+ readonly whatsappAccounts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2747
+ readonly contacts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2748
+ readonly conversations: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2749
+ readonly templates: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2750
+ readonly agents: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2751
+ readonly webhooks: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2752
+ readonly apiKeys: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2753
+ readonly organization: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2754
+ readonly billing: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2755
+ readonly analytics: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
2756
+ }>;
2757
+ readonly mailboxes: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2758
+ readonly permissions: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>]>;
2759
+ readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>>;
2760
+ }>, Schema.Null]>>;
2761
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
2762
+ }>]>;
2763
+ export type WhatsAppReactionContent = {
2764
+ readonly reaction: WhatsAppReaction;
2518
2765
  };
2519
2766
  export declare const WhatsAppReactionContent: Schema.Struct<{
2520
2767
  readonly reaction: Schema.Struct<{
@@ -2807,128 +3054,17 @@ export declare const WhatsAppDocumentHeader: Schema.Union<readonly [Schema.Struc
2807
3054
  readonly url: Schema.String;
2808
3055
  }>, Schema.Struct<{
2809
3056
  readonly type: Schema.Literal<"document">;
2810
- readonly filename: Schema.optionalKey<Schema.String>;
2811
- readonly mediaId: Schema.brand<Schema.String, "MediaId">;
2812
- }>]>;
2813
- export type SmsContent = {
2814
- readonly text?: string | null;
2815
- readonly templateId?: TemplateId | null;
2816
- readonly templateSlug?: string | null;
2817
- readonly templateData?: SmsTemplateData;
2818
- };
2819
- export declare const SmsContent: Schema.Struct<{
2820
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2821
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2822
- readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2823
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2824
- }>;
2825
- export type SmsDispatchContent = {
2826
- readonly text?: string | null;
2827
- readonly templateId?: TemplateId | null;
2828
- readonly templateSlug?: string | null;
2829
- readonly templateData?: SmsTemplateData;
2830
- };
2831
- export declare const SmsDispatchContent: Schema.Struct<{
2832
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2833
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2834
- readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2835
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2836
- }>;
2837
- export type ContactIdentityChannel = {
2838
- readonly channel: "sms" | "whatsapp" | "email";
2839
- readonly reachability: "unknown" | "reachable" | "unreachable";
2840
- readonly consent: ContactConsent | null;
2841
- };
2842
- export declare const ContactIdentityChannel: Schema.Struct<{
2843
- readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2844
- readonly reachability: Schema.Union<readonly [Schema.Literal<"unknown">, Schema.Literal<"reachable">, Schema.Literal<"unreachable">]>;
2845
- readonly consent: Schema.Union<readonly [Schema.Struct<{
2846
- readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
2847
- readonly source: Schema.String;
2848
- readonly capturedAt: Schema.String;
2849
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
2850
- }>, Schema.Null]>;
2851
- }>;
2852
- export type WhatsAppTemplateBindings = {
2853
- readonly [x: string]: WhatsAppTemplateBinding;
2854
- };
2855
- export declare const WhatsAppTemplateBindings: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
2856
- readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
2857
- }>, Schema.Struct<{
2858
- readonly customField: Schema.String;
2859
- }>]>>;
2860
- export type CreateEventPayload = {
2861
- readonly contact: ContactEventReference;
2862
- readonly name: string;
2863
- readonly properties?: JsonObject | null;
2864
- readonly occurredAt?: string | null;
2865
- };
2866
- export declare const CreateEventPayload: Schema.Struct<{
2867
- readonly contact: Schema.Union<readonly [Schema.Struct<{
2868
- readonly id: Schema.brand<Schema.String, "ContactId">;
2869
- readonly externalId: Schema.optionalKey<Schema.Never>;
2870
- readonly email: Schema.optionalKey<Schema.Never>;
2871
- }>, Schema.Struct<{
2872
- readonly externalId: Schema.String;
2873
- readonly id: Schema.optionalKey<Schema.Never>;
2874
- readonly email: Schema.optionalKey<Schema.Never>;
2875
- }>, Schema.Struct<{
2876
- readonly email: Schema.String;
2877
- readonly id: Schema.optionalKey<Schema.Never>;
2878
- readonly externalId: Schema.optionalKey<Schema.Never>;
2879
- }>]>;
2880
- readonly name: Schema.String;
2881
- readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2882
- readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2883
- }>;
2884
- export type EmailRecipients = ReadonlyArray<EmailRecipient>;
2885
- export declare const EmailRecipients: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2886
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
2887
- }>, Schema.Struct<{
2888
- readonly email: Schema.String;
2889
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2890
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2891
- }>]>>;
2892
- export type EmailCcRecipients = ReadonlyArray<EmailRecipient> | null;
2893
- export declare const EmailCcRecipients: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2894
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
2895
- }>, Schema.Struct<{
2896
- readonly email: Schema.String;
2897
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2898
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2899
- }>]>>, Schema.Null]>;
2900
- export type EmailBccRecipients = ReadonlyArray<EmailRecipient> | null;
2901
- export declare const EmailBccRecipients: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2902
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
2903
- }>, Schema.Struct<{
2904
- readonly email: Schema.String;
2905
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2906
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2907
- }>]>>, Schema.Null]>;
2908
- export type SmsRecipients = ReadonlyArray<SmsRecipient>;
2909
- export declare const SmsRecipients: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2910
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
2911
- }>, Schema.Struct<{
2912
- readonly phone: Schema.String;
2913
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2914
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2915
- }>]>>;
2916
- export type WhatsAppRecipients = ReadonlyArray<WhatsAppRecipient>;
2917
- export declare const WhatsAppRecipients: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2918
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
2919
- }>, Schema.Struct<{
2920
- readonly phone: Schema.String;
2921
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2922
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2923
- }>]>>;
2924
- export type TopicContactRef = TopicContactById | TopicContactByEmail | TopicContactByPhone;
2925
- export declare const TopicContactRef: Schema.Union<readonly [Schema.Struct<{
2926
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
2927
- }>, Schema.Struct<{
2928
- readonly email: Schema.String;
2929
- }>, Schema.Struct<{
2930
- readonly phone: Schema.String;
3057
+ readonly filename: Schema.optionalKey<Schema.String>;
3058
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
2931
3059
  }>]>;
3060
+ export type WhatsAppTemplateBindings = {
3061
+ readonly [x: string]: WhatsAppTemplateBinding;
3062
+ };
3063
+ export declare const WhatsAppTemplateBindings: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
3064
+ readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
3065
+ }>, Schema.Struct<{
3066
+ readonly customField: Schema.String;
3067
+ }>]>>;
2932
3068
  export type MessagePage = {
2933
3069
  readonly items: ReadonlyArray<MessageSummary>;
2934
3070
  readonly nextCursor: string | null;
@@ -3282,6 +3418,129 @@ export declare const OperationAccepted: Schema.Struct<{
3282
3418
  }>;
3283
3419
  }>;
3284
3420
  }>;
3421
+ export type SmsCampaignContentInput = {
3422
+ readonly channel: "sms";
3423
+ readonly sms: SmsDispatchContent;
3424
+ readonly conversationId?: CampaignConversationRef;
3425
+ readonly metadata?: CampaignContentMetadata;
3426
+ };
3427
+ export declare const SmsCampaignContentInput: Schema.Struct<{
3428
+ readonly channel: Schema.Literal<"sms">;
3429
+ readonly sms: Schema.Struct<{
3430
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3431
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3432
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3433
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3434
+ }>;
3435
+ readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
3436
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3437
+ }>;
3438
+ export type ContactIdentity = {
3439
+ readonly id: ContactIdentityId;
3440
+ readonly type: "email" | "phone";
3441
+ readonly identifier: string;
3442
+ readonly verified: boolean;
3443
+ readonly channels: ReadonlyArray<ContactIdentityChannel>;
3444
+ };
3445
+ export declare const ContactIdentity: Schema.Struct<{
3446
+ readonly id: Schema.brand<Schema.String, "ContactIdentityId">;
3447
+ readonly type: Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"phone">]>;
3448
+ readonly identifier: Schema.String;
3449
+ readonly verified: Schema.Boolean;
3450
+ readonly channels: Schema.$Array<Schema.Struct<{
3451
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3452
+ readonly reachability: Schema.Union<readonly [Schema.Literal<"unknown">, Schema.Literal<"reachable">, Schema.Literal<"unreachable">]>;
3453
+ readonly consent: Schema.Union<readonly [Schema.Struct<{
3454
+ readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
3455
+ readonly source: Schema.String;
3456
+ readonly capturedAt: Schema.String;
3457
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
3458
+ }>, Schema.Null]>;
3459
+ }>>;
3460
+ }>;
3461
+ export type BatchEventsPayload = {
3462
+ readonly events: readonly [CreateEventPayload, ...Array<CreateEventPayload>];
3463
+ };
3464
+ export declare const BatchEventsPayload: Schema.Struct<{
3465
+ readonly events: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
3466
+ readonly contact: Schema.Union<readonly [Schema.Struct<{
3467
+ readonly id: Schema.brand<Schema.String, "ContactId">;
3468
+ readonly externalId: Schema.optionalKey<Schema.Never>;
3469
+ readonly email: Schema.optionalKey<Schema.Never>;
3470
+ }>, Schema.Struct<{
3471
+ readonly externalId: Schema.String;
3472
+ readonly id: Schema.optionalKey<Schema.Never>;
3473
+ readonly email: Schema.optionalKey<Schema.Never>;
3474
+ }>, Schema.Struct<{
3475
+ readonly email: Schema.String;
3476
+ readonly id: Schema.optionalKey<Schema.Never>;
3477
+ readonly externalId: Schema.optionalKey<Schema.Never>;
3478
+ }>]>;
3479
+ readonly name: Schema.String;
3480
+ readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3481
+ readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3482
+ }>]>, readonly [Schema.Struct<{
3483
+ readonly contact: Schema.Union<readonly [Schema.Struct<{
3484
+ readonly id: Schema.brand<Schema.String, "ContactId">;
3485
+ readonly externalId: Schema.optionalKey<Schema.Never>;
3486
+ readonly email: Schema.optionalKey<Schema.Never>;
3487
+ }>, Schema.Struct<{
3488
+ readonly externalId: Schema.String;
3489
+ readonly id: Schema.optionalKey<Schema.Never>;
3490
+ readonly email: Schema.optionalKey<Schema.Never>;
3491
+ }>, Schema.Struct<{
3492
+ readonly email: Schema.String;
3493
+ readonly id: Schema.optionalKey<Schema.Never>;
3494
+ readonly externalId: Schema.optionalKey<Schema.Never>;
3495
+ }>]>;
3496
+ readonly name: Schema.String;
3497
+ readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3498
+ readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3499
+ }>]>;
3500
+ }>;
3501
+ export type SmsSendMessagePayload = {
3502
+ readonly conversationId?: ConversationId | null;
3503
+ readonly metadata?: MessageMetadata;
3504
+ readonly channel: "sms";
3505
+ readonly to: SmsRecipients;
3506
+ readonly sms: SmsContent;
3507
+ };
3508
+ export declare const SmsSendMessagePayload: Schema.Struct<{
3509
+ readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
3510
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3511
+ readonly channel: Schema.Literal<"sms">;
3512
+ readonly to: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3513
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
3514
+ }>, Schema.Struct<{
3515
+ readonly phone: Schema.String;
3516
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3517
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3518
+ }>]>>;
3519
+ readonly sms: Schema.Struct<{
3520
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3521
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3522
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3523
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3524
+ }>;
3525
+ }>;
3526
+ export type TopicSetSubscriptionsPayload = {
3527
+ readonly contacts: ReadonlyArray<TopicContactRef>;
3528
+ readonly channel: "sms" | "whatsapp" | "email";
3529
+ readonly status: "subscribed" | "unsubscribed";
3530
+ readonly source?: string | null;
3531
+ };
3532
+ export declare const TopicSetSubscriptionsPayload: Schema.Struct<{
3533
+ readonly contacts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3534
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
3535
+ }>, Schema.Struct<{
3536
+ readonly email: Schema.String;
3537
+ }>, Schema.Struct<{
3538
+ readonly phone: Schema.String;
3539
+ }>]>>;
3540
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3541
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
3542
+ readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3543
+ }>;
3285
3544
  export type PolicyRule = {
3286
3545
  readonly match: PolicyRuleMatch;
3287
3546
  readonly note?: string | null;
@@ -3576,46 +3835,6 @@ export declare const WhatsAppInteractiveHeader: Schema.Union<readonly [Schema.St
3576
3835
  readonly filename: Schema.optionalKey<Schema.String>;
3577
3836
  readonly mediaId: Schema.brand<Schema.String, "MediaId">;
3578
3837
  }>]>]>;
3579
- export type SmsCampaignContentInput = {
3580
- readonly channel: "sms";
3581
- readonly sms: SmsDispatchContent;
3582
- readonly conversationId?: CampaignConversationRef;
3583
- readonly metadata?: CampaignContentMetadata;
3584
- };
3585
- export declare const SmsCampaignContentInput: Schema.Struct<{
3586
- readonly channel: Schema.Literal<"sms">;
3587
- readonly sms: Schema.Struct<{
3588
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3589
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3590
- readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3591
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3592
- }>;
3593
- readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
3594
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3595
- }>;
3596
- export type ContactIdentity = {
3597
- readonly id: ContactIdentityId;
3598
- readonly type: "email" | "phone";
3599
- readonly identifier: string;
3600
- readonly verified: boolean;
3601
- readonly channels: ReadonlyArray<ContactIdentityChannel>;
3602
- };
3603
- export declare const ContactIdentity: Schema.Struct<{
3604
- readonly id: Schema.brand<Schema.String, "ContactIdentityId">;
3605
- readonly type: Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"phone">]>;
3606
- readonly identifier: Schema.String;
3607
- readonly verified: Schema.Boolean;
3608
- readonly channels: Schema.$Array<Schema.Struct<{
3609
- readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3610
- readonly reachability: Schema.Union<readonly [Schema.Literal<"unknown">, Schema.Literal<"reachable">, Schema.Literal<"unreachable">]>;
3611
- readonly consent: Schema.Union<readonly [Schema.Struct<{
3612
- readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
3613
- readonly source: Schema.String;
3614
- readonly capturedAt: Schema.String;
3615
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
3616
- }>, Schema.Null]>;
3617
- }>>;
3618
- }>;
3619
3838
  export type WhatsAppTemplateDispatch = {
3620
3839
  readonly template: TemplateId | string;
3621
3840
  readonly templateData?: WhatsAppTemplateDispatchData;
@@ -3632,89 +3851,6 @@ export declare const WhatsAppTemplateDispatch: Schema.Struct<{
3632
3851
  }>]>>>;
3633
3852
  readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
3634
3853
  }>;
3635
- export type BatchEventsPayload = {
3636
- readonly events: readonly [CreateEventPayload, ...Array<CreateEventPayload>];
3637
- };
3638
- export declare const BatchEventsPayload: Schema.Struct<{
3639
- readonly events: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
3640
- readonly contact: Schema.Union<readonly [Schema.Struct<{
3641
- readonly id: Schema.brand<Schema.String, "ContactId">;
3642
- readonly externalId: Schema.optionalKey<Schema.Never>;
3643
- readonly email: Schema.optionalKey<Schema.Never>;
3644
- }>, Schema.Struct<{
3645
- readonly externalId: Schema.String;
3646
- readonly id: Schema.optionalKey<Schema.Never>;
3647
- readonly email: Schema.optionalKey<Schema.Never>;
3648
- }>, Schema.Struct<{
3649
- readonly email: Schema.String;
3650
- readonly id: Schema.optionalKey<Schema.Never>;
3651
- readonly externalId: Schema.optionalKey<Schema.Never>;
3652
- }>]>;
3653
- readonly name: Schema.String;
3654
- readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3655
- readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3656
- }>]>, readonly [Schema.Struct<{
3657
- readonly contact: Schema.Union<readonly [Schema.Struct<{
3658
- readonly id: Schema.brand<Schema.String, "ContactId">;
3659
- readonly externalId: Schema.optionalKey<Schema.Never>;
3660
- readonly email: Schema.optionalKey<Schema.Never>;
3661
- }>, Schema.Struct<{
3662
- readonly externalId: Schema.String;
3663
- readonly id: Schema.optionalKey<Schema.Never>;
3664
- readonly email: Schema.optionalKey<Schema.Never>;
3665
- }>, Schema.Struct<{
3666
- readonly email: Schema.String;
3667
- readonly id: Schema.optionalKey<Schema.Never>;
3668
- readonly externalId: Schema.optionalKey<Schema.Never>;
3669
- }>]>;
3670
- readonly name: Schema.String;
3671
- readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3672
- readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3673
- }>]>;
3674
- }>;
3675
- export type SmsSendMessagePayload = {
3676
- readonly conversationId?: ConversationId | null;
3677
- readonly metadata?: MessageMetadata;
3678
- readonly channel: "sms";
3679
- readonly to: SmsRecipients;
3680
- readonly sms: SmsContent;
3681
- };
3682
- export declare const SmsSendMessagePayload: Schema.Struct<{
3683
- readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
3684
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3685
- readonly channel: Schema.Literal<"sms">;
3686
- readonly to: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3687
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
3688
- }>, Schema.Struct<{
3689
- readonly phone: Schema.String;
3690
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3691
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3692
- }>]>>;
3693
- readonly sms: Schema.Struct<{
3694
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3695
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3696
- readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3697
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3698
- }>;
3699
- }>;
3700
- export type TopicSetSubscriptionsPayload = {
3701
- readonly contacts: ReadonlyArray<TopicContactRef>;
3702
- readonly channel: "sms" | "whatsapp" | "email";
3703
- readonly status: "subscribed" | "unsubscribed";
3704
- readonly source?: string | null;
3705
- };
3706
- export declare const TopicSetSubscriptionsPayload: Schema.Struct<{
3707
- readonly contacts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3708
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
3709
- }>, Schema.Struct<{
3710
- readonly email: Schema.String;
3711
- }>, Schema.Struct<{
3712
- readonly phone: Schema.String;
3713
- }>]>>;
3714
- readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3715
- readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
3716
- readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3717
- }>;
3718
3854
  export type JourneyWaitForEventNode = {
3719
3855
  readonly type: "wait_for_event";
3720
3856
  readonly config: JourneyWaitForEventConfig;
@@ -4466,6 +4602,8 @@ export type AgentDefinition = {
4466
4602
  readonly knowledgeSourceIds?: ReadonlyArray<KnowledgeSourceId>;
4467
4603
  readonly endpointIds: ReadonlyArray<MailboxEndpointId>;
4468
4604
  readonly integrations: ReadonlyArray<AgentIntegrationGrant>;
4605
+ readonly eventTriggers?: ReadonlyArray<string>;
4606
+ readonly followUpTemplate?: TemplateId | string;
4469
4607
  readonly policy: PolicyConfiguration;
4470
4608
  readonly model: AgentModelChoice;
4471
4609
  readonly reasoning: AgentReasoning;
@@ -4479,6 +4617,7 @@ export declare const AgentDefinition: Schema.Struct<{
4479
4617
  readonly endpointIds: Schema.$Array<Schema.brand<Schema.String, "MailboxEndpointId">>;
4480
4618
  readonly integrations: Schema.$Array<Schema.Struct<{
4481
4619
  readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
4620
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"org">, Schema.Literal<"contact">]>>;
4482
4621
  readonly tools: Schema.Union<readonly [Schema.Struct<{
4483
4622
  readonly kind: Schema.Literal<"all">;
4484
4623
  }>, Schema.Struct<{
@@ -4488,6 +4627,8 @@ export declare const AgentDefinition: Schema.Struct<{
4488
4627
  readonly names: Schema.$Array<Schema.String>;
4489
4628
  }>]>;
4490
4629
  }>>;
4630
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
4631
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
4491
4632
  readonly policy: Schema.Struct<{
4492
4633
  readonly presets: Schema.$Array<Schema.String>;
4493
4634
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -4892,6 +5033,7 @@ export declare const CreateAgentPayload: Schema.Struct<{
4892
5033
  readonly endpointIds: Schema.$Array<Schema.brand<Schema.String, "MailboxEndpointId">>;
4893
5034
  readonly integrations: Schema.$Array<Schema.Struct<{
4894
5035
  readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
5036
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"org">, Schema.Literal<"contact">]>>;
4895
5037
  readonly tools: Schema.Union<readonly [Schema.Struct<{
4896
5038
  readonly kind: Schema.Literal<"all">;
4897
5039
  }>, Schema.Struct<{
@@ -4901,6 +5043,8 @@ export declare const CreateAgentPayload: Schema.Struct<{
4901
5043
  readonly names: Schema.$Array<Schema.String>;
4902
5044
  }>]>;
4903
5045
  }>>;
5046
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5047
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
4904
5048
  readonly policy: Schema.Struct<{
4905
5049
  readonly presets: Schema.$Array<Schema.String>;
4906
5050
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -4980,6 +5124,7 @@ export declare const ReplaceAgentDraftPayload: Schema.Struct<{
4980
5124
  readonly endpointIds: Schema.$Array<Schema.brand<Schema.String, "MailboxEndpointId">>;
4981
5125
  readonly integrations: Schema.$Array<Schema.Struct<{
4982
5126
  readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
5127
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"org">, Schema.Literal<"contact">]>>;
4983
5128
  readonly tools: Schema.Union<readonly [Schema.Struct<{
4984
5129
  readonly kind: Schema.Literal<"all">;
4985
5130
  }>, Schema.Struct<{
@@ -4989,6 +5134,8 @@ export declare const ReplaceAgentDraftPayload: Schema.Struct<{
4989
5134
  readonly names: Schema.$Array<Schema.String>;
4990
5135
  }>]>;
4991
5136
  }>>;
5137
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5138
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
4992
5139
  readonly policy: Schema.Struct<{
4993
5140
  readonly presets: Schema.$Array<Schema.String>;
4994
5141
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -5068,6 +5215,7 @@ export declare const RunAgentTestPayload: Schema.Struct<{
5068
5215
  readonly endpointIds: Schema.$Array<Schema.brand<Schema.String, "MailboxEndpointId">>;
5069
5216
  readonly integrations: Schema.$Array<Schema.Struct<{
5070
5217
  readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
5218
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"org">, Schema.Literal<"contact">]>>;
5071
5219
  readonly tools: Schema.Union<readonly [Schema.Struct<{
5072
5220
  readonly kind: Schema.Literal<"all">;
5073
5221
  }>, Schema.Struct<{
@@ -5077,6 +5225,8 @@ export declare const RunAgentTestPayload: Schema.Struct<{
5077
5225
  readonly names: Schema.$Array<Schema.String>;
5078
5226
  }>]>;
5079
5227
  }>>;
5228
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5229
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
5080
5230
  readonly policy: Schema.Struct<{
5081
5231
  readonly presets: Schema.$Array<Schema.String>;
5082
5232
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{