samva 0.46.0 → 0.47.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 (276) hide show
  1. package/AGENTS.md +13 -7
  2. package/README.md +107 -9
  3. package/dist/agent/index.d.ts +56 -0
  4. package/dist/agent/index.js +52 -0
  5. package/dist/agent/runtime.d.ts +3 -0
  6. package/dist/agent/runtime.js +74 -0
  7. package/dist/agent/test.d.ts +31 -0
  8. package/dist/agent/test.js +66 -0
  9. package/dist/agent/types.d.ts +123 -0
  10. package/dist/client/client/client.gen.d.ts +1 -1
  11. package/dist/client/client/index.d.ts +10 -10
  12. package/dist/client/client/types.gen.d.ts +4 -4
  13. package/dist/client/client/utils.gen.d.ts +2 -2
  14. package/dist/client/client.gen.d.ts +2 -2
  15. package/dist/client/core/bodySerializer.gen.d.ts +1 -1
  16. package/dist/client/core/serverSentEvents.gen.d.ts +1 -1
  17. package/dist/client/core/types.gen.d.ts +2 -2
  18. package/dist/client/core/utils.gen.d.ts +1 -1
  19. package/dist/client/sdk.gen.d.ts +41 -161
  20. package/dist/client/sdk.gen.js +1302 -1598
  21. package/dist/client/types.gen.d.ts +377 -966
  22. package/dist/effect/accounts.d.ts +6 -6
  23. package/dist/effect/accounts.js +2 -1
  24. package/dist/effect/agents.d.ts +355 -23
  25. package/dist/effect/agents.js +6 -3
  26. package/dist/effect/analytics.d.ts +6 -6
  27. package/dist/effect/analytics.js +2 -1
  28. package/dist/effect/api-keys.d.ts +13 -13
  29. package/dist/effect/api-keys.js +2 -1
  30. package/dist/effect/approval-requests.d.ts +4 -4
  31. package/dist/effect/approval-requests.js +2 -1
  32. package/dist/effect/attachments.d.ts +4 -4
  33. package/dist/effect/attachments.js +2 -1
  34. package/dist/effect/brands.d.ts +7 -7
  35. package/dist/effect/brands.js +2 -1
  36. package/dist/effect/campaigns.d.ts +205 -205
  37. package/dist/effect/campaigns.js +2 -1
  38. package/dist/effect/categories.d.ts +3 -3
  39. package/dist/effect/client.d.ts +1 -1
  40. package/dist/effect/contact-groups.d.ts +18 -18
  41. package/dist/effect/contact-groups.js +2 -1
  42. package/dist/effect/contacts.d.ts +41 -33
  43. package/dist/effect/contacts.js +8 -3
  44. package/dist/effect/conversations.d.ts +17 -17
  45. package/dist/effect/conversations.js +2 -1
  46. package/dist/effect/custom-fields.d.ts +4 -4
  47. package/dist/effect/custom-fields.js +2 -1
  48. package/dist/effect/descriptors/accounts.d.ts +59 -0
  49. package/dist/effect/descriptors/accounts.js +57 -0
  50. package/dist/effect/descriptors/agents.d.ts +129 -0
  51. package/dist/effect/descriptors/agents.js +127 -0
  52. package/dist/effect/descriptors/analytics.d.ts +56 -0
  53. package/dist/effect/descriptors/analytics.js +48 -0
  54. package/dist/effect/descriptors/api-keys.d.ts +80 -0
  55. package/dist/effect/descriptors/api-keys.js +80 -0
  56. package/dist/effect/descriptors/approval-requests.d.ts +41 -0
  57. package/dist/effect/descriptors/approval-requests.js +43 -0
  58. package/dist/effect/descriptors/attachments.d.ts +41 -0
  59. package/dist/effect/descriptors/attachments.js +43 -0
  60. package/dist/effect/descriptors/brands.d.ts +60 -0
  61. package/dist/effect/descriptors/brands.js +60 -0
  62. package/dist/effect/descriptors/campaigns.d.ts +148 -0
  63. package/dist/effect/descriptors/campaigns.js +144 -0
  64. package/dist/effect/descriptors/contact-groups.d.ts +99 -0
  65. package/dist/effect/descriptors/contact-groups.js +97 -0
  66. package/dist/effect/descriptors/contacts.d.ts +246 -0
  67. package/dist/effect/descriptors/contacts.js +234 -0
  68. package/dist/effect/descriptors/conversations.d.ts +130 -0
  69. package/dist/effect/descriptors/conversations.js +130 -0
  70. package/dist/effect/descriptors/custom-fields.d.ts +40 -0
  71. package/dist/effect/descriptors/custom-fields.js +40 -0
  72. package/dist/effect/descriptors/email.d.ts +607 -0
  73. package/dist/effect/descriptors/email.js +561 -0
  74. package/dist/effect/descriptors/events.d.ts +20 -0
  75. package/dist/effect/descriptors/events.js +20 -0
  76. package/dist/effect/descriptors/feedback.d.ts +11 -0
  77. package/dist/effect/descriptors/feedback.js +11 -0
  78. package/dist/effect/descriptors/integrations-catalog.d.ts +29 -0
  79. package/dist/effect/descriptors/integrations-catalog.js +27 -0
  80. package/dist/effect/descriptors/integrations.d.ts +70 -0
  81. package/dist/effect/descriptors/integrations.js +70 -0
  82. package/dist/effect/descriptors/journeys.d.ts +140 -0
  83. package/dist/effect/descriptors/journeys.js +140 -0
  84. package/dist/effect/descriptors/mailboxes.d.ts +724 -0
  85. package/dist/effect/descriptors/mailboxes.js +728 -0
  86. package/dist/effect/descriptors/media.d.ts +51 -0
  87. package/dist/effect/descriptors/media.js +53 -0
  88. package/dist/effect/descriptors/messages.d.ts +99 -0
  89. package/dist/effect/descriptors/messages.js +97 -0
  90. package/dist/effect/descriptors/namespaces.d.ts +110 -0
  91. package/dist/effect/descriptors/namespaces.js +114 -0
  92. package/dist/effect/descriptors/newsletter-domains.d.ts +42 -0
  93. package/dist/effect/descriptors/newsletter-domains.js +46 -0
  94. package/dist/effect/descriptors/newsletter-issues.d.ts +112 -0
  95. package/dist/effect/descriptors/newsletter-issues.js +116 -0
  96. package/dist/effect/descriptors/newsletters.d.ts +51 -0
  97. package/dist/effect/descriptors/newsletters.js +53 -0
  98. package/dist/effect/descriptors/operations.d.ts +31 -0
  99. package/dist/effect/descriptors/operations.js +33 -0
  100. package/dist/effect/descriptors/organizations.d.ts +111 -0
  101. package/dist/effect/descriptors/organizations.js +93 -0
  102. package/dist/effect/descriptors/policies.d.ts +32 -0
  103. package/dist/effect/descriptors/policies.js +36 -0
  104. package/dist/effect/descriptors/scheduled-messages.d.ts +50 -0
  105. package/dist/effect/descriptors/scheduled-messages.js +50 -0
  106. package/dist/effect/descriptors/subscriptions.d.ts +11 -0
  107. package/dist/effect/descriptors/subscriptions.js +11 -0
  108. package/dist/effect/descriptors/template-registrations.d.ts +32 -0
  109. package/dist/effect/descriptors/template-registrations.js +36 -0
  110. package/dist/effect/descriptors/template-share-links.d.ts +52 -0
  111. package/dist/effect/descriptors/template-share-links.js +56 -0
  112. package/dist/effect/descriptors/templates.d.ts +365 -0
  113. package/dist/effect/descriptors/templates.js +355 -0
  114. package/dist/effect/descriptors/topic-forms.d.ts +52 -0
  115. package/dist/effect/descriptors/topic-forms.js +56 -0
  116. package/dist/effect/descriptors/topics.d.ts +89 -0
  117. package/dist/effect/descriptors/topics.js +87 -0
  118. package/dist/effect/descriptors/webhooks.d.ts +110 -0
  119. package/dist/effect/descriptors/webhooks.js +110 -0
  120. package/dist/effect/descriptors/whats-app-flows.d.ts +99 -0
  121. package/dist/effect/descriptors/whats-app-flows.js +97 -0
  122. package/dist/effect/descriptors/whats-app-setup-links.d.ts +40 -0
  123. package/dist/effect/descriptors/whats-app-setup-links.js +40 -0
  124. package/dist/effect/descriptors/whats-app.d.ts +116 -0
  125. package/dist/effect/descriptors/whats-app.js +108 -0
  126. package/dist/effect/descriptors/whoami.d.ts +11 -0
  127. package/dist/effect/descriptors/whoami.js +11 -0
  128. package/dist/effect/email.d.ts +78 -78
  129. package/dist/effect/email.js +2 -1
  130. package/dist/effect/errors.d.ts +2 -2
  131. package/dist/effect/events.d.ts +3 -3
  132. package/dist/effect/events.js +2 -1
  133. package/dist/effect/feedback.d.ts +2 -2
  134. package/dist/effect/feedback.js +2 -1
  135. package/dist/effect/generated/accounts.d.ts +19 -9
  136. package/dist/effect/generated/accounts.js +1 -0
  137. package/dist/effect/generated/agents.d.ts +2967 -690
  138. package/dist/effect/generated/agents.js +54 -13
  139. package/dist/effect/generated/analytics.d.ts +1 -1
  140. package/dist/effect/generated/api-keys.d.ts +1 -1
  141. package/dist/effect/generated/approval-requests.d.ts +13 -13
  142. package/dist/effect/generated/attachments.d.ts +1 -1
  143. package/dist/effect/generated/brands.d.ts +1 -1
  144. package/dist/effect/generated/campaigns.d.ts +230 -230
  145. package/dist/effect/generated/contact-events.d.ts +4 -4
  146. package/dist/effect/generated/contact-groups.d.ts +1 -1
  147. package/dist/effect/generated/contacts.d.ts +907 -49
  148. package/dist/effect/generated/contacts.js +62 -3
  149. package/dist/effect/generated/conversations.d.ts +1 -1
  150. package/dist/effect/generated/custom-fields.d.ts +1 -1
  151. package/dist/effect/generated/email.d.ts +1 -1
  152. package/dist/effect/generated/events.d.ts +12 -12
  153. package/dist/effect/generated/feedback.d.ts +1 -1
  154. package/dist/effect/generated/index.d.ts +84 -88
  155. package/dist/effect/generated/integrations-catalog.d.ts +3 -3
  156. package/dist/effect/generated/integrations.d.ts +15 -15
  157. package/dist/effect/generated/journeys.d.ts +336 -96
  158. package/dist/effect/generated/journeys.js +3 -1
  159. package/dist/effect/generated/mailboxes.d.ts +93 -95
  160. package/dist/effect/generated/mailboxes.js +21 -25
  161. package/dist/effect/generated/media.d.ts +1 -1
  162. package/dist/effect/generated/messages.d.ts +1 -1
  163. package/dist/effect/generated/namespaces.d.ts +1 -1
  164. package/dist/effect/generated/newsletter-domains.d.ts +1 -1
  165. package/dist/effect/generated/newsletter-issues.d.ts +1 -1
  166. package/dist/effect/generated/newsletters.d.ts +1 -1
  167. package/dist/effect/generated/operations.d.ts +1 -1
  168. package/dist/effect/generated/organizations.d.ts +1 -1
  169. package/dist/effect/generated/policies.d.ts +1 -1
  170. package/dist/effect/generated/scheduled-messages.d.ts +147 -147
  171. package/dist/effect/generated/shared.d.ts +408 -102
  172. package/dist/effect/generated/shared.js +80 -36
  173. package/dist/effect/generated/subscriptions.d.ts +1 -1
  174. package/dist/effect/generated/template-registrations.d.ts +1 -4
  175. package/dist/effect/generated/template-registrations.js +2 -6
  176. package/dist/effect/generated/template-share-links.d.ts +1 -1
  177. package/dist/effect/generated/templates.d.ts +1 -1
  178. package/dist/effect/generated/topic-forms.d.ts +1 -1
  179. package/dist/effect/generated/topics.d.ts +1 -1
  180. package/dist/effect/generated/webhooks.d.ts +1 -1
  181. package/dist/effect/generated/whats-app-flows.d.ts +1 -1
  182. package/dist/effect/generated/whats-app-setup-links.d.ts +1 -1
  183. package/dist/effect/generated/whats-app.d.ts +1 -1
  184. package/dist/effect/generated/whoami.d.ts +1 -1
  185. package/dist/effect/generated-metadata.d.ts +18 -84
  186. package/dist/effect/generated-metadata.js +362 -415
  187. package/dist/effect/index.d.ts +45 -47
  188. package/dist/effect/index.js +1 -3
  189. package/dist/effect/integrations-catalog.d.ts +3 -3
  190. package/dist/effect/integrations-catalog.js +2 -1
  191. package/dist/effect/integrations.d.ts +11 -11
  192. package/dist/effect/integrations.js +2 -1
  193. package/dist/effect/internal/client.d.ts +3 -3
  194. package/dist/effect/internal/client.js +1 -1
  195. package/dist/effect/internal/email-sender.d.ts +4 -4
  196. package/dist/effect/internal/mailbox-events.d.ts +2 -2
  197. package/dist/effect/internal/operation.d.ts +24 -5
  198. package/dist/effect/internal/operation.js +25 -22
  199. package/dist/effect/internal/send.d.ts +4 -4
  200. package/dist/effect/journeys.d.ts +46 -22
  201. package/dist/effect/journeys.js +2 -1
  202. package/dist/effect/mailboxes.d.ts +163 -163
  203. package/dist/effect/mailboxes.js +2 -1
  204. package/dist/effect/media.d.ts +5 -5
  205. package/dist/effect/media.js +2 -1
  206. package/dist/effect/messages.d.ts +17 -17
  207. package/dist/effect/messages.js +2 -1
  208. package/dist/effect/namespaces.d.ts +15 -15
  209. package/dist/effect/namespaces.js +2 -1
  210. package/dist/effect/newsletter-domains.d.ts +6 -6
  211. package/dist/effect/newsletter-domains.js +2 -1
  212. package/dist/effect/newsletter-issues.d.ts +11 -11
  213. package/dist/effect/newsletter-issues.js +2 -1
  214. package/dist/effect/newsletters.d.ts +5 -5
  215. package/dist/effect/newsletters.js +2 -1
  216. package/dist/effect/operations.d.ts +5 -5
  217. package/dist/effect/operations.js +2 -1
  218. package/dist/effect/organizations.d.ts +12 -12
  219. package/dist/effect/organizations.js +2 -1
  220. package/dist/effect/policies.d.ts +3 -3
  221. package/dist/effect/policies.js +2 -1
  222. package/dist/effect/scheduled-messages.d.ts +371 -371
  223. package/dist/effect/scheduled-messages.js +2 -1
  224. package/dist/effect/subscriptions.d.ts +1 -1
  225. package/dist/effect/subscriptions.js +2 -1
  226. package/dist/effect/template-registrations.d.ts +3 -3
  227. package/dist/effect/template-registrations.js +2 -1
  228. package/dist/effect/template-share-links.d.ts +5 -5
  229. package/dist/effect/template-share-links.js +2 -1
  230. package/dist/effect/templates.d.ts +46 -46
  231. package/dist/effect/templates.js +2 -1
  232. package/dist/effect/topic-forms.d.ts +5 -5
  233. package/dist/effect/topic-forms.js +2 -1
  234. package/dist/effect/topics.d.ts +13 -13
  235. package/dist/effect/topics.js +2 -1
  236. package/dist/effect/webhooks.d.ts +16 -16
  237. package/dist/effect/webhooks.js +2 -1
  238. package/dist/effect/whatsapp-flows.d.ts +10 -10
  239. package/dist/effect/whatsapp-flows.js +2 -1
  240. package/dist/effect/whatsapp-setup-links.d.ts +6 -6
  241. package/dist/effect/whatsapp-setup-links.js +2 -1
  242. package/dist/effect/whatsapp.d.ts +12 -12
  243. package/dist/effect/whatsapp.js +2 -1
  244. package/dist/effect/whoami.d.ts +1 -1
  245. package/dist/effect/whoami.js +2 -1
  246. package/dist/index.d.ts +1 -1
  247. package/dist/package.js +1 -1
  248. package/dist/promises/client.d.ts +10 -14
  249. package/dist/promises/client.js +3 -7
  250. package/dist/promises/errors.gen.d.ts +1 -1
  251. package/dist/promises/index.d.ts +5 -5
  252. package/dist/promises/request.d.ts +2 -2
  253. package/dist/promises/request.js +1 -1
  254. package/dist/promises/types.gen.d.ts +1 -1
  255. package/dist/request-policy.d.ts +10 -2
  256. package/dist/request-policy.js +3 -5
  257. package/dist/service-map.d.ts +18 -75
  258. package/package.json +17 -29
  259. package/dist/effect/extension-installations.d.ts +0 -132
  260. package/dist/effect/extension-installations.js +0 -28
  261. package/dist/effect/extensions.d.ts +0 -102
  262. package/dist/effect/extensions.js +0 -20
  263. package/dist/effect/generated/extension-installations.d.ts +0 -2761
  264. package/dist/effect/generated/extension-installations.js +0 -405
  265. package/dist/effect/generated/extensions.d.ts +0 -1037
  266. package/dist/effect/generated/extensions.js +0 -214
  267. package/dist/mailbox/dispatch.d.ts +0 -10
  268. package/dist/mailbox/dispatch.js +0 -66
  269. package/dist/mailbox/index.d.ts +0 -17
  270. package/dist/mailbox/index.js +0 -30
  271. package/dist/mailbox/test.d.ts +0 -25
  272. package/dist/mailbox/test.js +0 -181
  273. package/dist/mailbox/types.d.ts +0 -221
  274. package/dist/mailbox/webhook.d.ts +0 -10
  275. package/dist/mailbox/webhook.js +0 -41
  276. package/dist/service-map.js +0 -830
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactGroupId, ContactId, ContactIdentity, ContactIdentityId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, MessageId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared";
4
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactGroupId, ContactId, ContactIdentity, ContactIdentityId, ConversationId, ForbiddenError, GatewayTimeoutError, IntegrationAccountId, InternalError, JsonObject, MalformedRequestError, MessageId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
5
5
  export type ContactCustomFields = {
6
6
  readonly [x: string]: string | number | boolean | null;
7
7
  };
@@ -247,6 +247,7 @@ export declare const ContactPage: Schema.Struct<{
247
247
  }>;
248
248
  export type Contact = {
249
249
  readonly id: ContactId;
250
+ readonly mergedInto?: ContactId | null;
250
251
  readonly namespaceId: NamespaceId | null;
251
252
  readonly name: string;
252
253
  readonly displayName: string | null;
@@ -327,6 +328,7 @@ export type Contact = {
327
328
  };
328
329
  export declare const Contact: Schema.Struct<{
329
330
  readonly id: Schema.brand<Schema.String, "ContactId">;
331
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
330
332
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
331
333
  readonly name: Schema.String;
332
334
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -346,7 +348,7 @@ export declare const Contact: Schema.Struct<{
346
348
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
347
349
  readonly source: Schema.String;
348
350
  readonly capturedAt: Schema.String;
349
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
351
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
350
352
  }>, Schema.Null]>;
351
353
  }>>;
352
354
  }>>;
@@ -379,7 +381,7 @@ export declare const Contact: Schema.Struct<{
379
381
  }>, Schema.Null]>>;
380
382
  }>, Schema.Null]>;
381
383
  readonly tags: Schema.$Array<Schema.String>;
382
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
384
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
383
385
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
384
386
  readonly first: Schema.Struct<{
385
387
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -560,11 +562,12 @@ export declare const ContactsCreateRequestJson: Schema.Struct<{
560
562
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"blocked">, Schema.Literal<"archived">]>, Schema.Null]>>;
561
563
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
562
564
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
563
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
565
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
564
566
  }>;
565
567
  export type ContactsCreate201 = Contact;
566
568
  export declare const ContactsCreate201: Schema.Struct<{
567
569
  readonly id: Schema.brand<Schema.String, "ContactId">;
570
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
568
571
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
569
572
  readonly name: Schema.String;
570
573
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -584,7 +587,7 @@ export declare const ContactsCreate201: Schema.Struct<{
584
587
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
585
588
  readonly source: Schema.String;
586
589
  readonly capturedAt: Schema.String;
587
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
590
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
588
591
  }>, Schema.Null]>;
589
592
  }>>;
590
593
  }>>;
@@ -617,7 +620,7 @@ export declare const ContactsCreate201: Schema.Struct<{
617
620
  }>, Schema.Null]>>;
618
621
  }>, Schema.Null]>;
619
622
  readonly tags: Schema.$Array<Schema.String>;
620
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
623
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
621
624
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
622
625
  readonly first: Schema.Struct<{
623
626
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -713,6 +716,7 @@ export declare const ContactsGetPathParams: Schema.Struct<{
713
716
  export type ContactsGet200 = Contact;
714
717
  export declare const ContactsGet200: Schema.Struct<{
715
718
  readonly id: Schema.brand<Schema.String, "ContactId">;
719
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
716
720
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
717
721
  readonly name: Schema.String;
718
722
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -732,7 +736,7 @@ export declare const ContactsGet200: Schema.Struct<{
732
736
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
733
737
  readonly source: Schema.String;
734
738
  readonly capturedAt: Schema.String;
735
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
739
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
736
740
  }>, Schema.Null]>;
737
741
  }>>;
738
742
  }>>;
@@ -765,7 +769,7 @@ export declare const ContactsGet200: Schema.Struct<{
765
769
  }>, Schema.Null]>>;
766
770
  }>, Schema.Null]>;
767
771
  readonly tags: Schema.$Array<Schema.String>;
768
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
772
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
769
773
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
770
774
  readonly first: Schema.Struct<{
771
775
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -925,11 +929,12 @@ export declare const ContactsUpdateRequestJson: Schema.Struct<{
925
929
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"blocked">, Schema.Literal<"archived">]>, Schema.Null]>>;
926
930
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
927
931
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
928
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
932
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
929
933
  }>;
930
934
  export type ContactsUpdate200 = Contact;
931
935
  export declare const ContactsUpdate200: Schema.Struct<{
932
936
  readonly id: Schema.brand<Schema.String, "ContactId">;
937
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
933
938
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
934
939
  readonly name: Schema.String;
935
940
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -949,7 +954,7 @@ export declare const ContactsUpdate200: Schema.Struct<{
949
954
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
950
955
  readonly source: Schema.String;
951
956
  readonly capturedAt: Schema.String;
952
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
957
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
953
958
  }>, Schema.Null]>;
954
959
  }>>;
955
960
  }>>;
@@ -982,7 +987,7 @@ export declare const ContactsUpdate200: Schema.Struct<{
982
987
  }>, Schema.Null]>>;
983
988
  }>, Schema.Null]>;
984
989
  readonly tags: Schema.$Array<Schema.String>;
985
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
990
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
986
991
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
987
992
  readonly first: Schema.Struct<{
988
993
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -1208,6 +1213,7 @@ export declare const ContactsAddIdentityRequestJson: Schema.Struct<{
1208
1213
  export type ContactsAddIdentity200 = Contact;
1209
1214
  export declare const ContactsAddIdentity200: Schema.Struct<{
1210
1215
  readonly id: Schema.brand<Schema.String, "ContactId">;
1216
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
1211
1217
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1212
1218
  readonly name: Schema.String;
1213
1219
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1227,7 +1233,7 @@ export declare const ContactsAddIdentity200: Schema.Struct<{
1227
1233
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1228
1234
  readonly source: Schema.String;
1229
1235
  readonly capturedAt: Schema.String;
1230
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
1236
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1231
1237
  }>, Schema.Null]>;
1232
1238
  }>>;
1233
1239
  }>>;
@@ -1260,7 +1266,7 @@ export declare const ContactsAddIdentity200: Schema.Struct<{
1260
1266
  }>, Schema.Null]>>;
1261
1267
  }>, Schema.Null]>;
1262
1268
  readonly tags: Schema.$Array<Schema.String>;
1263
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
1269
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1264
1270
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
1265
1271
  readonly first: Schema.Struct<{
1266
1272
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -1354,6 +1360,7 @@ export declare const ContactsRemoveIdentityPathParams: Schema.Struct<{
1354
1360
  export type ContactsRemoveIdentity200 = Contact;
1355
1361
  export declare const ContactsRemoveIdentity200: Schema.Struct<{
1356
1362
  readonly id: Schema.brand<Schema.String, "ContactId">;
1363
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
1357
1364
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1358
1365
  readonly name: Schema.String;
1359
1366
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1373,7 +1380,7 @@ export declare const ContactsRemoveIdentity200: Schema.Struct<{
1373
1380
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1374
1381
  readonly source: Schema.String;
1375
1382
  readonly capturedAt: Schema.String;
1376
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
1383
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1377
1384
  }>, Schema.Null]>;
1378
1385
  }>>;
1379
1386
  }>>;
@@ -1406,7 +1413,7 @@ export declare const ContactsRemoveIdentity200: Schema.Struct<{
1406
1413
  }>, Schema.Null]>>;
1407
1414
  }>, Schema.Null]>;
1408
1415
  readonly tags: Schema.$Array<Schema.String>;
1409
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
1416
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1410
1417
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
1411
1418
  readonly first: Schema.Struct<{
1412
1419
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -1507,11 +1514,12 @@ export declare const ContactsSetConsentRequestJson: Schema.Struct<{
1507
1514
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1508
1515
  readonly source: Schema.String;
1509
1516
  readonly capturedAt: Schema.String;
1510
- readonly proof: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1517
+ readonly proof: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
1511
1518
  }>;
1512
1519
  export type ContactsSetConsent200 = Contact;
1513
1520
  export declare const ContactsSetConsent200: Schema.Struct<{
1514
1521
  readonly id: Schema.brand<Schema.String, "ContactId">;
1522
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
1515
1523
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1516
1524
  readonly name: Schema.String;
1517
1525
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1531,7 +1539,7 @@ export declare const ContactsSetConsent200: Schema.Struct<{
1531
1539
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1532
1540
  readonly source: Schema.String;
1533
1541
  readonly capturedAt: Schema.String;
1534
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
1542
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1535
1543
  }>, Schema.Null]>;
1536
1544
  }>>;
1537
1545
  }>>;
@@ -1564,7 +1572,7 @@ export declare const ContactsSetConsent200: Schema.Struct<{
1564
1572
  }>, Schema.Null]>>;
1565
1573
  }>, Schema.Null]>;
1566
1574
  readonly tags: Schema.$Array<Schema.String>;
1567
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
1575
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1568
1576
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
1569
1577
  readonly first: Schema.Struct<{
1570
1578
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -1645,6 +1653,324 @@ export type ContactsSetConsent500 = InternalError;
1645
1653
  export declare const ContactsSetConsent500: typeof InternalError;
1646
1654
  export type ContactsSetConsent504 = GatewayTimeoutError;
1647
1655
  export declare const ContactsSetConsent504: typeof GatewayTimeoutError;
1656
+ export type ContactsMergePathParams = {
1657
+ readonly id: ContactId;
1658
+ };
1659
+ export declare const ContactsMergePathParams: Schema.Struct<{
1660
+ readonly id: Schema.brand<Schema.String, "ContactId">;
1661
+ }>;
1662
+ export type ContactsMergeHeaders = {
1663
+ readonly "x-samva-conversation-agent-admission"?: string;
1664
+ };
1665
+ export declare const ContactsMergeHeaders: Schema.Struct<{
1666
+ readonly "x-samva-conversation-agent-admission": Schema.optionalKey<Schema.String>;
1667
+ }>;
1668
+ export type ContactsMergeRequestJson = {
1669
+ readonly from: ContactId;
1670
+ };
1671
+ export declare const ContactsMergeRequestJson: Schema.Struct<{
1672
+ readonly from: Schema.brand<Schema.String, "ContactId">;
1673
+ }>;
1674
+ export type ContactsMerge200 = Contact;
1675
+ export declare const ContactsMerge200: Schema.Struct<{
1676
+ readonly id: Schema.brand<Schema.String, "ContactId">;
1677
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
1678
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1679
+ readonly name: Schema.String;
1680
+ readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
1681
+ readonly avatar: Schema.Union<readonly [Schema.String, Schema.Null]>;
1682
+ readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"blocked">, Schema.Literal<"archived">]>;
1683
+ readonly statusReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
1684
+ readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1685
+ readonly identities: Schema.$Array<Schema.Struct<{
1686
+ readonly id: Schema.brand<Schema.String, "ContactIdentityId">;
1687
+ readonly type: Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"phone">]>;
1688
+ readonly identifier: Schema.String;
1689
+ readonly verified: Schema.Boolean;
1690
+ readonly channels: Schema.$Array<Schema.Struct<{
1691
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1692
+ readonly reachability: Schema.Union<readonly [Schema.Literal<"unknown">, Schema.Literal<"reachable">, Schema.Literal<"unreachable">]>;
1693
+ readonly consent: Schema.Union<readonly [Schema.Struct<{
1694
+ readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1695
+ readonly source: Schema.String;
1696
+ readonly capturedAt: Schema.String;
1697
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1698
+ }>, Schema.Null]>;
1699
+ }>>;
1700
+ }>>;
1701
+ readonly profile: Schema.Union<readonly [Schema.Struct<{
1702
+ readonly firstName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1703
+ readonly lastName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1704
+ readonly company: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1705
+ readonly jobTitle: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1706
+ readonly location: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1707
+ readonly country: Schema.String;
1708
+ readonly state: Schema.String;
1709
+ readonly city: Schema.String;
1710
+ readonly timezone: Schema.String;
1711
+ }>, Schema.Null]>>;
1712
+ readonly customFields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>, Schema.Null]>>;
1713
+ readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"import">, Schema.Literal<"manual">, Schema.Literal<"form">]>, Schema.Null]>>;
1714
+ }>, Schema.Null]>;
1715
+ readonly preferences: Schema.Union<readonly [Schema.Struct<{
1716
+ readonly preferredChannels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
1717
+ readonly language: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1718
+ readonly timezone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1719
+ readonly notifications: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1720
+ readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1721
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1722
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1723
+ readonly quiet_hours: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1724
+ readonly start: Schema.String;
1725
+ readonly end: Schema.String;
1726
+ }>, Schema.Null]>>;
1727
+ }>, Schema.Null]>>;
1728
+ }>, Schema.Null]>;
1729
+ readonly tags: Schema.$Array<Schema.String>;
1730
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1731
+ readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
1732
+ readonly first: Schema.Struct<{
1733
+ readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
1734
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1735
+ readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
1736
+ readonly importedAt: Schema.String;
1737
+ readonly summary: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1738
+ readonly permissionAssumed: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1739
+ readonly signupAt: Schema.Union<readonly [Schema.Struct<{
1740
+ readonly value: Schema.String;
1741
+ readonly kind: Schema.Union<readonly [Schema.Literal<"time">, Schema.Literal<"text">]>;
1742
+ }>, Schema.Null]>;
1743
+ readonly sources: Schema.$Array<Schema.String>;
1744
+ readonly omittedSources: Schema.Finite;
1745
+ }>, Schema.Null]>>;
1746
+ readonly evidence: Schema.$Array<Schema.Struct<{
1747
+ readonly file: Schema.String;
1748
+ readonly row: Schema.Finite;
1749
+ readonly declared: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1750
+ readonly kind: Schema.Literal<"status_column">;
1751
+ }>, Schema.Struct<{
1752
+ readonly kind: Schema.Literal<"export_scope">;
1753
+ readonly scope: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">, Schema.Literal<"suppressed">, Schema.Literal<"cleaned/bounced">]>;
1754
+ }>, Schema.Null]>>;
1755
+ readonly suppressionFree: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1756
+ readonly permissionBasis: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"assumed">, Schema.Literal<"exported">]>, Schema.Null]>>;
1757
+ readonly sourceStatus: Schema.Union<readonly [Schema.String, Schema.Null]>;
1758
+ readonly signupAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1759
+ readonly source: Schema.Union<readonly [Schema.String, Schema.Null]>;
1760
+ }>>;
1761
+ }>;
1762
+ readonly latest: Schema.Struct<{
1763
+ readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
1764
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1765
+ readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
1766
+ readonly importedAt: Schema.String;
1767
+ readonly summary: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1768
+ readonly permissionAssumed: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1769
+ readonly signupAt: Schema.Union<readonly [Schema.Struct<{
1770
+ readonly value: Schema.String;
1771
+ readonly kind: Schema.Union<readonly [Schema.Literal<"time">, Schema.Literal<"text">]>;
1772
+ }>, Schema.Null]>;
1773
+ readonly sources: Schema.$Array<Schema.String>;
1774
+ readonly omittedSources: Schema.Finite;
1775
+ }>, Schema.Null]>>;
1776
+ readonly evidence: Schema.$Array<Schema.Struct<{
1777
+ readonly file: Schema.String;
1778
+ readonly row: Schema.Finite;
1779
+ readonly declared: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1780
+ readonly kind: Schema.Literal<"status_column">;
1781
+ }>, Schema.Struct<{
1782
+ readonly kind: Schema.Literal<"export_scope">;
1783
+ readonly scope: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">, Schema.Literal<"suppressed">, Schema.Literal<"cleaned/bounced">]>;
1784
+ }>, Schema.Null]>>;
1785
+ readonly suppressionFree: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1786
+ readonly permissionBasis: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"assumed">, Schema.Literal<"exported">]>, Schema.Null]>>;
1787
+ readonly sourceStatus: Schema.Union<readonly [Schema.String, Schema.Null]>;
1788
+ readonly signupAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1789
+ readonly source: Schema.Union<readonly [Schema.String, Schema.Null]>;
1790
+ }>>;
1791
+ }>;
1792
+ }>, Schema.Null]>;
1793
+ readonly addedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1794
+ readonly createdAt: Schema.String;
1795
+ readonly updatedAt: Schema.String;
1796
+ }>;
1797
+ export type ContactsMerge400 = MalformedRequestError;
1798
+ export declare const ContactsMerge400: typeof MalformedRequestError;
1799
+ export type ContactsMerge401 = UnauthorizedError;
1800
+ export declare const ContactsMerge401: typeof UnauthorizedError;
1801
+ export type ContactsMerge403 = ForbiddenError;
1802
+ export declare const ContactsMerge403: typeof ForbiddenError;
1803
+ export type ContactsMerge404 = ResourceNotFoundError;
1804
+ export declare const ContactsMerge404: typeof ResourceNotFoundError;
1805
+ export type ContactsMerge409 = ConflictError;
1806
+ export declare const ContactsMerge409: typeof ConflictError;
1807
+ export type ContactsMerge422 = ValidationError;
1808
+ export declare const ContactsMerge422: typeof ValidationError;
1809
+ export type ContactsMerge500 = InternalError;
1810
+ export declare const ContactsMerge500: typeof InternalError;
1811
+ export type ContactsMerge502 = BillingProviderError;
1812
+ export declare const ContactsMerge502: typeof BillingProviderError;
1813
+ export type ContactsMerge504 = GatewayTimeoutError;
1814
+ export declare const ContactsMerge504: typeof GatewayTimeoutError;
1815
+ export type ContactsMergeByConnectionPathParams = {
1816
+ readonly id: ContactId;
1817
+ };
1818
+ export declare const ContactsMergeByConnectionPathParams: Schema.Struct<{
1819
+ readonly id: Schema.brand<Schema.String, "ContactId">;
1820
+ }>;
1821
+ export type ContactsMergeByConnectionHeaders = {
1822
+ readonly "x-samva-conversation-agent-admission"?: string;
1823
+ };
1824
+ export declare const ContactsMergeByConnectionHeaders: Schema.Struct<{
1825
+ readonly "x-samva-conversation-agent-admission": Schema.optionalKey<Schema.String>;
1826
+ }>;
1827
+ export type ContactsMergeByConnectionRequestJson = {
1828
+ readonly connection: IntegrationAccountId;
1829
+ };
1830
+ export declare const ContactsMergeByConnectionRequestJson: Schema.Struct<{
1831
+ readonly connection: Schema.brand<Schema.String, "IntegrationAccountId">;
1832
+ }>;
1833
+ export type ContactsMergeByConnection200 = Contact;
1834
+ export declare const ContactsMergeByConnection200: Schema.Struct<{
1835
+ readonly id: Schema.brand<Schema.String, "ContactId">;
1836
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
1837
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1838
+ readonly name: Schema.String;
1839
+ readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
1840
+ readonly avatar: Schema.Union<readonly [Schema.String, Schema.Null]>;
1841
+ readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"blocked">, Schema.Literal<"archived">]>;
1842
+ readonly statusReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
1843
+ readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1844
+ readonly identities: Schema.$Array<Schema.Struct<{
1845
+ readonly id: Schema.brand<Schema.String, "ContactIdentityId">;
1846
+ readonly type: Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"phone">]>;
1847
+ readonly identifier: Schema.String;
1848
+ readonly verified: Schema.Boolean;
1849
+ readonly channels: Schema.$Array<Schema.Struct<{
1850
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1851
+ readonly reachability: Schema.Union<readonly [Schema.Literal<"unknown">, Schema.Literal<"reachable">, Schema.Literal<"unreachable">]>;
1852
+ readonly consent: Schema.Union<readonly [Schema.Struct<{
1853
+ readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1854
+ readonly source: Schema.String;
1855
+ readonly capturedAt: Schema.String;
1856
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1857
+ }>, Schema.Null]>;
1858
+ }>>;
1859
+ }>>;
1860
+ readonly profile: Schema.Union<readonly [Schema.Struct<{
1861
+ readonly firstName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1862
+ readonly lastName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1863
+ readonly company: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1864
+ readonly jobTitle: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1865
+ readonly location: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1866
+ readonly country: Schema.String;
1867
+ readonly state: Schema.String;
1868
+ readonly city: Schema.String;
1869
+ readonly timezone: Schema.String;
1870
+ }>, Schema.Null]>>;
1871
+ readonly customFields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>, Schema.Null]>>;
1872
+ readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"import">, Schema.Literal<"manual">, Schema.Literal<"form">]>, Schema.Null]>>;
1873
+ }>, Schema.Null]>;
1874
+ readonly preferences: Schema.Union<readonly [Schema.Struct<{
1875
+ readonly preferredChannels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
1876
+ readonly language: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1877
+ readonly timezone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1878
+ readonly notifications: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1879
+ readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1880
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1881
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1882
+ readonly quiet_hours: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1883
+ readonly start: Schema.String;
1884
+ readonly end: Schema.String;
1885
+ }>, Schema.Null]>>;
1886
+ }>, Schema.Null]>>;
1887
+ }>, Schema.Null]>;
1888
+ readonly tags: Schema.$Array<Schema.String>;
1889
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1890
+ readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
1891
+ readonly first: Schema.Struct<{
1892
+ readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
1893
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1894
+ readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
1895
+ readonly importedAt: Schema.String;
1896
+ readonly summary: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1897
+ readonly permissionAssumed: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1898
+ readonly signupAt: Schema.Union<readonly [Schema.Struct<{
1899
+ readonly value: Schema.String;
1900
+ readonly kind: Schema.Union<readonly [Schema.Literal<"time">, Schema.Literal<"text">]>;
1901
+ }>, Schema.Null]>;
1902
+ readonly sources: Schema.$Array<Schema.String>;
1903
+ readonly omittedSources: Schema.Finite;
1904
+ }>, Schema.Null]>>;
1905
+ readonly evidence: Schema.$Array<Schema.Struct<{
1906
+ readonly file: Schema.String;
1907
+ readonly row: Schema.Finite;
1908
+ readonly declared: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1909
+ readonly kind: Schema.Literal<"status_column">;
1910
+ }>, Schema.Struct<{
1911
+ readonly kind: Schema.Literal<"export_scope">;
1912
+ readonly scope: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">, Schema.Literal<"suppressed">, Schema.Literal<"cleaned/bounced">]>;
1913
+ }>, Schema.Null]>>;
1914
+ readonly suppressionFree: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1915
+ readonly permissionBasis: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"assumed">, Schema.Literal<"exported">]>, Schema.Null]>>;
1916
+ readonly sourceStatus: Schema.Union<readonly [Schema.String, Schema.Null]>;
1917
+ readonly signupAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1918
+ readonly source: Schema.Union<readonly [Schema.String, Schema.Null]>;
1919
+ }>>;
1920
+ }>;
1921
+ readonly latest: Schema.Struct<{
1922
+ readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
1923
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1924
+ readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
1925
+ readonly importedAt: Schema.String;
1926
+ readonly summary: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1927
+ readonly permissionAssumed: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1928
+ readonly signupAt: Schema.Union<readonly [Schema.Struct<{
1929
+ readonly value: Schema.String;
1930
+ readonly kind: Schema.Union<readonly [Schema.Literal<"time">, Schema.Literal<"text">]>;
1931
+ }>, Schema.Null]>;
1932
+ readonly sources: Schema.$Array<Schema.String>;
1933
+ readonly omittedSources: Schema.Finite;
1934
+ }>, Schema.Null]>>;
1935
+ readonly evidence: Schema.$Array<Schema.Struct<{
1936
+ readonly file: Schema.String;
1937
+ readonly row: Schema.Finite;
1938
+ readonly declared: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1939
+ readonly kind: Schema.Literal<"status_column">;
1940
+ }>, Schema.Struct<{
1941
+ readonly kind: Schema.Literal<"export_scope">;
1942
+ readonly scope: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">, Schema.Literal<"suppressed">, Schema.Literal<"cleaned/bounced">]>;
1943
+ }>, Schema.Null]>>;
1944
+ readonly suppressionFree: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1945
+ readonly permissionBasis: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"assumed">, Schema.Literal<"exported">]>, Schema.Null]>>;
1946
+ readonly sourceStatus: Schema.Union<readonly [Schema.String, Schema.Null]>;
1947
+ readonly signupAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1948
+ readonly source: Schema.Union<readonly [Schema.String, Schema.Null]>;
1949
+ }>>;
1950
+ }>;
1951
+ }>, Schema.Null]>;
1952
+ readonly addedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1953
+ readonly createdAt: Schema.String;
1954
+ readonly updatedAt: Schema.String;
1955
+ }>;
1956
+ export type ContactsMergeByConnection400 = MalformedRequestError;
1957
+ export declare const ContactsMergeByConnection400: typeof MalformedRequestError;
1958
+ export type ContactsMergeByConnection401 = UnauthorizedError;
1959
+ export declare const ContactsMergeByConnection401: typeof UnauthorizedError;
1960
+ export type ContactsMergeByConnection403 = ForbiddenError;
1961
+ export declare const ContactsMergeByConnection403: typeof ForbiddenError;
1962
+ export type ContactsMergeByConnection404 = ResourceNotFoundError;
1963
+ export declare const ContactsMergeByConnection404: typeof ResourceNotFoundError;
1964
+ export type ContactsMergeByConnection409 = ConflictError;
1965
+ export declare const ContactsMergeByConnection409: typeof ConflictError;
1966
+ export type ContactsMergeByConnection422 = ValidationError;
1967
+ export declare const ContactsMergeByConnection422: typeof ValidationError;
1968
+ export type ContactsMergeByConnection500 = InternalError;
1969
+ export declare const ContactsMergeByConnection500: typeof InternalError;
1970
+ export type ContactsMergeByConnection502 = BillingProviderError;
1971
+ export declare const ContactsMergeByConnection502: typeof BillingProviderError;
1972
+ export type ContactsMergeByConnection504 = GatewayTimeoutError;
1973
+ export declare const ContactsMergeByConnection504: typeof GatewayTimeoutError;
1648
1974
  export type ContactsAddTagsPathParams = {
1649
1975
  readonly id: ContactId;
1650
1976
  };
@@ -1660,6 +1986,7 @@ export declare const ContactsAddTagsRequestJson: Schema.Struct<{
1660
1986
  export type ContactsAddTags200 = Contact;
1661
1987
  export declare const ContactsAddTags200: Schema.Struct<{
1662
1988
  readonly id: Schema.brand<Schema.String, "ContactId">;
1989
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
1663
1990
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1664
1991
  readonly name: Schema.String;
1665
1992
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1679,7 +2006,7 @@ export declare const ContactsAddTags200: Schema.Struct<{
1679
2006
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1680
2007
  readonly source: Schema.String;
1681
2008
  readonly capturedAt: Schema.String;
1682
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
2009
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1683
2010
  }>, Schema.Null]>;
1684
2011
  }>>;
1685
2012
  }>>;
@@ -1712,7 +2039,7 @@ export declare const ContactsAddTags200: Schema.Struct<{
1712
2039
  }>, Schema.Null]>>;
1713
2040
  }>, Schema.Null]>;
1714
2041
  readonly tags: Schema.$Array<Schema.String>;
1715
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
2042
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1716
2043
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
1717
2044
  readonly first: Schema.Struct<{
1718
2045
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -1808,6 +2135,7 @@ export declare const ContactsRemoveTagsRequestJson: Schema.Struct<{
1808
2135
  export type ContactsRemoveTags200 = Contact;
1809
2136
  export declare const ContactsRemoveTags200: Schema.Struct<{
1810
2137
  readonly id: Schema.brand<Schema.String, "ContactId">;
2138
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
1811
2139
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1812
2140
  readonly name: Schema.String;
1813
2141
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1827,7 +2155,7 @@ export declare const ContactsRemoveTags200: Schema.Struct<{
1827
2155
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
1828
2156
  readonly source: Schema.String;
1829
2157
  readonly capturedAt: Schema.String;
1830
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
2158
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1831
2159
  }>, Schema.Null]>;
1832
2160
  }>>;
1833
2161
  }>>;
@@ -1860,7 +2188,7 @@ export declare const ContactsRemoveTags200: Schema.Struct<{
1860
2188
  }>, Schema.Null]>>;
1861
2189
  }>, Schema.Null]>;
1862
2190
  readonly tags: Schema.$Array<Schema.String>;
1863
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
2191
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
1864
2192
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
1865
2193
  readonly first: Schema.Struct<{
1866
2194
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -2080,6 +2408,7 @@ export declare const ContactsFindRequestJson: Schema.Struct<{
2080
2408
  export type ContactsFind200 = Contact | null;
2081
2409
  export declare const ContactsFind200: Schema.Union<readonly [Schema.Struct<{
2082
2410
  readonly id: Schema.brand<Schema.String, "ContactId">;
2411
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
2083
2412
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2084
2413
  readonly name: Schema.String;
2085
2414
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2099,7 +2428,7 @@ export declare const ContactsFind200: Schema.Union<readonly [Schema.Struct<{
2099
2428
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
2100
2429
  readonly source: Schema.String;
2101
2430
  readonly capturedAt: Schema.String;
2102
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
2431
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
2103
2432
  }>, Schema.Null]>;
2104
2433
  }>>;
2105
2434
  }>>;
@@ -2132,7 +2461,7 @@ export declare const ContactsFind200: Schema.Union<readonly [Schema.Struct<{
2132
2461
  }>, Schema.Null]>>;
2133
2462
  }>, Schema.Null]>;
2134
2463
  readonly tags: Schema.$Array<Schema.String>;
2135
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
2464
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
2136
2465
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
2137
2466
  readonly first: Schema.Struct<{
2138
2467
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -2272,6 +2601,7 @@ export type ContactsFindOrCreate200 = {
2272
2601
  export declare const ContactsFindOrCreate200: Schema.Struct<{
2273
2602
  readonly contact: Schema.Struct<{
2274
2603
  readonly id: Schema.brand<Schema.String, "ContactId">;
2604
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
2275
2605
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2276
2606
  readonly name: Schema.String;
2277
2607
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2291,7 +2621,7 @@ export declare const ContactsFindOrCreate200: Schema.Struct<{
2291
2621
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
2292
2622
  readonly source: Schema.String;
2293
2623
  readonly capturedAt: Schema.String;
2294
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
2624
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
2295
2625
  }>, Schema.Null]>;
2296
2626
  }>>;
2297
2627
  }>>;
@@ -2324,7 +2654,7 @@ export declare const ContactsFindOrCreate200: Schema.Struct<{
2324
2654
  }>, Schema.Null]>>;
2325
2655
  }>, Schema.Null]>;
2326
2656
  readonly tags: Schema.$Array<Schema.String>;
2327
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
2657
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
2328
2658
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
2329
2659
  readonly first: Schema.Struct<{
2330
2660
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -2775,6 +3105,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
2775
3105
  readonly verified: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2776
3106
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2777
3107
  readonly id: Schema.brand<Schema.String, "ContactId">;
3108
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
2778
3109
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2779
3110
  readonly name: Schema.String;
2780
3111
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2794,7 +3125,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
2794
3125
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
2795
3126
  readonly source: Schema.String;
2796
3127
  readonly capturedAt: Schema.String;
2797
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
3128
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
2798
3129
  }>, Schema.Null]>;
2799
3130
  }>>;
2800
3131
  }>>;
@@ -2827,7 +3158,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
2827
3158
  }>, Schema.Null]>>;
2828
3159
  }>, Schema.Null]>;
2829
3160
  readonly tags: Schema.$Array<Schema.String>;
2830
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
3161
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
2831
3162
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
2832
3163
  readonly first: Schema.Struct<{
2833
3164
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -3019,6 +3350,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
3019
3350
  readonly tags: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
3020
3351
  }>>, never, Schema.toCodecJson<Schema.Struct<{
3021
3352
  readonly id: Schema.brand<Schema.String, "ContactId">;
3353
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
3022
3354
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
3023
3355
  readonly name: Schema.String;
3024
3356
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -3038,7 +3370,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
3038
3370
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
3039
3371
  readonly source: Schema.String;
3040
3372
  readonly capturedAt: Schema.String;
3041
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
3373
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
3042
3374
  }>, Schema.Null]>;
3043
3375
  }>>;
3044
3376
  }>>;
@@ -3071,7 +3403,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
3071
3403
  }>, Schema.Null]>>;
3072
3404
  }>, Schema.Null]>;
3073
3405
  readonly tags: Schema.$Array<Schema.String>;
3074
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
3406
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
3075
3407
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
3076
3408
  readonly first: Schema.Struct<{
3077
3409
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -3585,9 +3917,10 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
3585
3917
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"blocked">, Schema.Literal<"archived">]>, Schema.Null]>>;
3586
3918
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3587
3919
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3588
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3920
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
3589
3921
  }>>, never, Schema.toCodecJson<Schema.Struct<{
3590
3922
  readonly id: Schema.brand<Schema.String, "ContactId">;
3923
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
3591
3924
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
3592
3925
  readonly name: Schema.String;
3593
3926
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -3607,7 +3940,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
3607
3940
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
3608
3941
  readonly source: Schema.String;
3609
3942
  readonly capturedAt: Schema.String;
3610
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
3943
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
3611
3944
  }>, Schema.Null]>;
3612
3945
  }>>;
3613
3946
  }>>;
@@ -3640,7 +3973,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
3640
3973
  }>, Schema.Null]>>;
3641
3974
  }>, Schema.Null]>;
3642
3975
  readonly tags: Schema.$Array<Schema.String>;
3643
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
3976
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
3644
3977
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
3645
3978
  readonly first: Schema.Struct<{
3646
3979
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -3961,6 +4294,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
3961
4294
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3962
4295
  }>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
3963
4296
  readonly id: Schema.brand<Schema.String, "ContactId">;
4297
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
3964
4298
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
3965
4299
  readonly name: Schema.String;
3966
4300
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -3980,7 +4314,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
3980
4314
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
3981
4315
  readonly source: Schema.String;
3982
4316
  readonly capturedAt: Schema.String;
3983
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
4317
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
3984
4318
  }>, Schema.Null]>;
3985
4319
  }>>;
3986
4320
  }>>;
@@ -4013,7 +4347,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
4013
4347
  }>, Schema.Null]>>;
4014
4348
  }>, Schema.Null]>;
4015
4349
  readonly tags: Schema.$Array<Schema.String>;
4016
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
4350
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
4017
4351
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
4018
4352
  readonly first: Schema.Struct<{
4019
4353
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -4239,6 +4573,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
4239
4573
  }>>, never, Schema.toCodecJson<Schema.Struct<{
4240
4574
  readonly contact: Schema.Struct<{
4241
4575
  readonly id: Schema.brand<Schema.String, "ContactId">;
4576
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
4242
4577
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
4243
4578
  readonly name: Schema.String;
4244
4579
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -4258,7 +4593,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
4258
4593
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
4259
4594
  readonly source: Schema.String;
4260
4595
  readonly capturedAt: Schema.String;
4261
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
4596
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
4262
4597
  }>, Schema.Null]>;
4263
4598
  }>>;
4264
4599
  }>>;
@@ -4291,7 +4626,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
4291
4626
  }>, Schema.Null]>>;
4292
4627
  }>, Schema.Null]>;
4293
4628
  readonly tags: Schema.$Array<Schema.String>;
4294
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
4629
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
4295
4630
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
4296
4631
  readonly first: Schema.Struct<{
4297
4632
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -4519,6 +4854,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
4519
4854
  readonly id: Schema.brand<Schema.String, "ContactId">;
4520
4855
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
4521
4856
  readonly id: Schema.brand<Schema.String, "ContactId">;
4857
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
4522
4858
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
4523
4859
  readonly name: Schema.String;
4524
4860
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -4538,7 +4874,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
4538
4874
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
4539
4875
  readonly source: Schema.String;
4540
4876
  readonly capturedAt: Schema.String;
4541
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
4877
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
4542
4878
  }>, Schema.Null]>;
4543
4879
  }>>;
4544
4880
  }>>;
@@ -4571,7 +4907,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
4571
4907
  }>, Schema.Null]>>;
4572
4908
  }>, Schema.Null]>;
4573
4909
  readonly tags: Schema.$Array<Schema.String>;
4574
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
4910
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
4575
4911
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
4576
4912
  readonly first: Schema.Struct<{
4577
4913
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -5322,6 +5658,524 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
5322
5658
  readonly _tag: Schema.tag<"ValidationError">;
5323
5659
  readonly message: Schema.String;
5324
5660
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
5661
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"contactsMerge", "POST", "/v1/contacts/:id/merge", Schema.toCodecStringTree<Schema.Struct<{
5662
+ readonly id: Schema.brand<Schema.String, "ContactId">;
5663
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
5664
+ readonly from: Schema.brand<Schema.String, "ContactId">;
5665
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
5666
+ readonly "x-samva-conversation-agent-admission": Schema.optionalKey<Schema.String>;
5667
+ }>>, Schema.toCodecJson<Schema.Struct<{
5668
+ readonly id: Schema.brand<Schema.String, "ContactId">;
5669
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
5670
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
5671
+ readonly name: Schema.String;
5672
+ readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
5673
+ readonly avatar: Schema.Union<readonly [Schema.String, Schema.Null]>;
5674
+ readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"blocked">, Schema.Literal<"archived">]>;
5675
+ readonly statusReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
5676
+ readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
5677
+ readonly identities: Schema.$Array<Schema.Struct<{
5678
+ readonly id: Schema.brand<Schema.String, "ContactIdentityId">;
5679
+ readonly type: Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"phone">]>;
5680
+ readonly identifier: Schema.String;
5681
+ readonly verified: Schema.Boolean;
5682
+ readonly channels: Schema.$Array<Schema.Struct<{
5683
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
5684
+ readonly reachability: Schema.Union<readonly [Schema.Literal<"unknown">, Schema.Literal<"reachable">, Schema.Literal<"unreachable">]>;
5685
+ readonly consent: Schema.Union<readonly [Schema.Struct<{
5686
+ readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
5687
+ readonly source: Schema.String;
5688
+ readonly capturedAt: Schema.String;
5689
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
5690
+ }>, Schema.Null]>;
5691
+ }>>;
5692
+ }>>;
5693
+ readonly profile: Schema.Union<readonly [Schema.Struct<{
5694
+ readonly firstName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5695
+ readonly lastName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5696
+ readonly company: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5697
+ readonly jobTitle: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5698
+ readonly location: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5699
+ readonly country: Schema.String;
5700
+ readonly state: Schema.String;
5701
+ readonly city: Schema.String;
5702
+ readonly timezone: Schema.String;
5703
+ }>, Schema.Null]>>;
5704
+ readonly customFields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>, Schema.Null]>>;
5705
+ readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"import">, Schema.Literal<"manual">, Schema.Literal<"form">]>, Schema.Null]>>;
5706
+ }>, Schema.Null]>;
5707
+ readonly preferences: Schema.Union<readonly [Schema.Struct<{
5708
+ readonly preferredChannels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
5709
+ readonly language: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5710
+ readonly timezone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5711
+ readonly notifications: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5712
+ readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5713
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5714
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5715
+ readonly quiet_hours: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5716
+ readonly start: Schema.String;
5717
+ readonly end: Schema.String;
5718
+ }>, Schema.Null]>>;
5719
+ }>, Schema.Null]>>;
5720
+ }>, Schema.Null]>;
5721
+ readonly tags: Schema.$Array<Schema.String>;
5722
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
5723
+ readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
5724
+ readonly first: Schema.Struct<{
5725
+ readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
5726
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
5727
+ readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
5728
+ readonly importedAt: Schema.String;
5729
+ readonly summary: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5730
+ readonly permissionAssumed: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5731
+ readonly signupAt: Schema.Union<readonly [Schema.Struct<{
5732
+ readonly value: Schema.String;
5733
+ readonly kind: Schema.Union<readonly [Schema.Literal<"time">, Schema.Literal<"text">]>;
5734
+ }>, Schema.Null]>;
5735
+ readonly sources: Schema.$Array<Schema.String>;
5736
+ readonly omittedSources: Schema.Finite;
5737
+ }>, Schema.Null]>>;
5738
+ readonly evidence: Schema.$Array<Schema.Struct<{
5739
+ readonly file: Schema.String;
5740
+ readonly row: Schema.Finite;
5741
+ readonly declared: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5742
+ readonly kind: Schema.Literal<"status_column">;
5743
+ }>, Schema.Struct<{
5744
+ readonly kind: Schema.Literal<"export_scope">;
5745
+ readonly scope: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">, Schema.Literal<"suppressed">, Schema.Literal<"cleaned/bounced">]>;
5746
+ }>, Schema.Null]>>;
5747
+ readonly suppressionFree: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5748
+ readonly permissionBasis: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"assumed">, Schema.Literal<"exported">]>, Schema.Null]>>;
5749
+ readonly sourceStatus: Schema.Union<readonly [Schema.String, Schema.Null]>;
5750
+ readonly signupAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
5751
+ readonly source: Schema.Union<readonly [Schema.String, Schema.Null]>;
5752
+ }>>;
5753
+ }>;
5754
+ readonly latest: Schema.Struct<{
5755
+ readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
5756
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
5757
+ readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
5758
+ readonly importedAt: Schema.String;
5759
+ readonly summary: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5760
+ readonly permissionAssumed: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5761
+ readonly signupAt: Schema.Union<readonly [Schema.Struct<{
5762
+ readonly value: Schema.String;
5763
+ readonly kind: Schema.Union<readonly [Schema.Literal<"time">, Schema.Literal<"text">]>;
5764
+ }>, Schema.Null]>;
5765
+ readonly sources: Schema.$Array<Schema.String>;
5766
+ readonly omittedSources: Schema.Finite;
5767
+ }>, Schema.Null]>>;
5768
+ readonly evidence: Schema.$Array<Schema.Struct<{
5769
+ readonly file: Schema.String;
5770
+ readonly row: Schema.Finite;
5771
+ readonly declared: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5772
+ readonly kind: Schema.Literal<"status_column">;
5773
+ }>, Schema.Struct<{
5774
+ readonly kind: Schema.Literal<"export_scope">;
5775
+ readonly scope: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">, Schema.Literal<"suppressed">, Schema.Literal<"cleaned/bounced">]>;
5776
+ }>, Schema.Null]>>;
5777
+ readonly suppressionFree: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5778
+ readonly permissionBasis: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"assumed">, Schema.Literal<"exported">]>, Schema.Null]>>;
5779
+ readonly sourceStatus: Schema.Union<readonly [Schema.String, Schema.Null]>;
5780
+ readonly signupAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
5781
+ readonly source: Schema.Union<readonly [Schema.String, Schema.Null]>;
5782
+ }>>;
5783
+ }>;
5784
+ }>, Schema.Null]>;
5785
+ readonly addedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
5786
+ readonly createdAt: Schema.String;
5787
+ readonly updatedAt: Schema.String;
5788
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
5789
+ readonly _tag: "BillingProviderError";
5790
+ readonly message: string;
5791
+ }, readonly [Schema.Struct<{
5792
+ readonly _tag: Schema.tag<"BillingProviderError">;
5793
+ readonly message: Schema.String;
5794
+ }>], {
5795
+ readonly _tag: "BillingProviderError";
5796
+ readonly message: string;
5797
+ }>, Schema.Struct<{
5798
+ readonly _tag: Schema.tag<"BillingProviderError">;
5799
+ readonly message: Schema.String;
5800
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
5801
+ readonly _tag: "ConflictError";
5802
+ readonly message: string;
5803
+ readonly resource: string;
5804
+ readonly id?: string | null;
5805
+ }, readonly [Schema.Struct<{
5806
+ readonly _tag: Schema.tag<"ConflictError">;
5807
+ readonly message: Schema.String;
5808
+ readonly resource: Schema.String;
5809
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5810
+ }>], {
5811
+ readonly _tag: "ConflictError";
5812
+ readonly message: string;
5813
+ readonly resource: string;
5814
+ readonly id?: string | null;
5815
+ }>, Schema.Struct<{
5816
+ readonly _tag: Schema.tag<"ConflictError">;
5817
+ readonly message: Schema.String;
5818
+ readonly resource: Schema.String;
5819
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5820
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5821
+ readonly _tag: "ForbiddenError";
5822
+ readonly message: string;
5823
+ }, readonly [Schema.Struct<{
5824
+ readonly _tag: Schema.tag<"ForbiddenError">;
5825
+ readonly message: Schema.String;
5826
+ }>], {
5827
+ readonly _tag: "ForbiddenError";
5828
+ readonly message: string;
5829
+ }>, Schema.Struct<{
5830
+ readonly _tag: Schema.tag<"ForbiddenError">;
5831
+ readonly message: Schema.String;
5832
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
5833
+ readonly _tag: "GatewayTimeoutError";
5834
+ readonly message: string;
5835
+ readonly retryAfterSeconds: number;
5836
+ }, readonly [Schema.Struct<{
5837
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
5838
+ readonly message: Schema.String;
5839
+ readonly retryAfterSeconds: Schema.Finite;
5840
+ }>], {
5841
+ readonly _tag: "GatewayTimeoutError";
5842
+ readonly message: string;
5843
+ readonly retryAfterSeconds: number;
5844
+ }>, Schema.Struct<{
5845
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
5846
+ readonly message: Schema.String;
5847
+ readonly retryAfterSeconds: Schema.Finite;
5848
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
5849
+ readonly _tag: "MalformedRequestError";
5850
+ readonly message: string;
5851
+ readonly fields: {
5852
+ readonly [x: string]: readonly string[];
5853
+ };
5854
+ }, readonly [Schema.Struct<{
5855
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5856
+ readonly message: Schema.String;
5857
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5858
+ }>], {
5859
+ readonly _tag: "MalformedRequestError";
5860
+ readonly message: string;
5861
+ readonly fields: {
5862
+ readonly [x: string]: readonly string[];
5863
+ };
5864
+ }>, Schema.Struct<{
5865
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5866
+ readonly message: Schema.String;
5867
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5868
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5869
+ readonly _tag: "ResourceNotFoundError";
5870
+ readonly resource: string;
5871
+ readonly id: string;
5872
+ readonly message: string;
5873
+ }, readonly [Schema.Struct<{
5874
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
5875
+ readonly resource: Schema.String;
5876
+ readonly id: Schema.String;
5877
+ readonly message: Schema.String;
5878
+ }>], {
5879
+ readonly _tag: "ResourceNotFoundError";
5880
+ readonly resource: string;
5881
+ readonly id: string;
5882
+ readonly message: string;
5883
+ }>, Schema.Struct<{
5884
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
5885
+ readonly resource: Schema.String;
5886
+ readonly id: Schema.String;
5887
+ readonly message: Schema.String;
5888
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
5889
+ readonly _tag: "UnauthorizedError";
5890
+ readonly message: string;
5891
+ }, readonly [Schema.Struct<{
5892
+ readonly _tag: Schema.tag<"UnauthorizedError">;
5893
+ readonly message: Schema.String;
5894
+ }>], {
5895
+ readonly _tag: "UnauthorizedError";
5896
+ readonly message: string;
5897
+ }>, Schema.Struct<{
5898
+ readonly _tag: Schema.tag<"UnauthorizedError">;
5899
+ readonly message: Schema.String;
5900
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
5901
+ readonly _tag: "ValidationError";
5902
+ readonly message: string;
5903
+ readonly fields?: {
5904
+ readonly [x: string]: readonly string[];
5905
+ } | null;
5906
+ }, readonly [Schema.Struct<{
5907
+ readonly _tag: Schema.tag<"ValidationError">;
5908
+ readonly message: Schema.String;
5909
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
5910
+ }>], {
5911
+ readonly _tag: "ValidationError";
5912
+ readonly message: string;
5913
+ readonly fields?: {
5914
+ readonly [x: string]: readonly string[];
5915
+ } | null;
5916
+ }>, Schema.Struct<{
5917
+ readonly _tag: Schema.tag<"ValidationError">;
5918
+ readonly message: Schema.String;
5919
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
5920
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"contactsMergeByConnection", "POST", "/v1/contacts/:id/merge-by-connection", Schema.toCodecStringTree<Schema.Struct<{
5921
+ readonly id: Schema.brand<Schema.String, "ContactId">;
5922
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
5923
+ readonly connection: Schema.brand<Schema.String, "IntegrationAccountId">;
5924
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
5925
+ readonly "x-samva-conversation-agent-admission": Schema.optionalKey<Schema.String>;
5926
+ }>>, Schema.toCodecJson<Schema.Struct<{
5927
+ readonly id: Schema.brand<Schema.String, "ContactId">;
5928
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
5929
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
5930
+ readonly name: Schema.String;
5931
+ readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
5932
+ readonly avatar: Schema.Union<readonly [Schema.String, Schema.Null]>;
5933
+ readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"blocked">, Schema.Literal<"archived">]>;
5934
+ readonly statusReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
5935
+ readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
5936
+ readonly identities: Schema.$Array<Schema.Struct<{
5937
+ readonly id: Schema.brand<Schema.String, "ContactIdentityId">;
5938
+ readonly type: Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"phone">]>;
5939
+ readonly identifier: Schema.String;
5940
+ readonly verified: Schema.Boolean;
5941
+ readonly channels: Schema.$Array<Schema.Struct<{
5942
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
5943
+ readonly reachability: Schema.Union<readonly [Schema.Literal<"unknown">, Schema.Literal<"reachable">, Schema.Literal<"unreachable">]>;
5944
+ readonly consent: Schema.Union<readonly [Schema.Struct<{
5945
+ readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
5946
+ readonly source: Schema.String;
5947
+ readonly capturedAt: Schema.String;
5948
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
5949
+ }>, Schema.Null]>;
5950
+ }>>;
5951
+ }>>;
5952
+ readonly profile: Schema.Union<readonly [Schema.Struct<{
5953
+ readonly firstName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5954
+ readonly lastName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5955
+ readonly company: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5956
+ readonly jobTitle: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5957
+ readonly location: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5958
+ readonly country: Schema.String;
5959
+ readonly state: Schema.String;
5960
+ readonly city: Schema.String;
5961
+ readonly timezone: Schema.String;
5962
+ }>, Schema.Null]>>;
5963
+ readonly customFields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>, Schema.Null]>>;
5964
+ readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"import">, Schema.Literal<"manual">, Schema.Literal<"form">]>, Schema.Null]>>;
5965
+ }>, Schema.Null]>;
5966
+ readonly preferences: Schema.Union<readonly [Schema.Struct<{
5967
+ readonly preferredChannels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
5968
+ readonly language: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5969
+ readonly timezone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5970
+ readonly notifications: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5971
+ readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5972
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5973
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5974
+ readonly quiet_hours: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5975
+ readonly start: Schema.String;
5976
+ readonly end: Schema.String;
5977
+ }>, Schema.Null]>>;
5978
+ }>, Schema.Null]>>;
5979
+ }>, Schema.Null]>;
5980
+ readonly tags: Schema.$Array<Schema.String>;
5981
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
5982
+ readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
5983
+ readonly first: Schema.Struct<{
5984
+ readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
5985
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
5986
+ readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
5987
+ readonly importedAt: Schema.String;
5988
+ readonly summary: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
5989
+ readonly permissionAssumed: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
5990
+ readonly signupAt: Schema.Union<readonly [Schema.Struct<{
5991
+ readonly value: Schema.String;
5992
+ readonly kind: Schema.Union<readonly [Schema.Literal<"time">, Schema.Literal<"text">]>;
5993
+ }>, Schema.Null]>;
5994
+ readonly sources: Schema.$Array<Schema.String>;
5995
+ readonly omittedSources: Schema.Finite;
5996
+ }>, Schema.Null]>>;
5997
+ readonly evidence: Schema.$Array<Schema.Struct<{
5998
+ readonly file: Schema.String;
5999
+ readonly row: Schema.Finite;
6000
+ readonly declared: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
6001
+ readonly kind: Schema.Literal<"status_column">;
6002
+ }>, Schema.Struct<{
6003
+ readonly kind: Schema.Literal<"export_scope">;
6004
+ readonly scope: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">, Schema.Literal<"suppressed">, Schema.Literal<"cleaned/bounced">]>;
6005
+ }>, Schema.Null]>>;
6006
+ readonly suppressionFree: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
6007
+ readonly permissionBasis: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"assumed">, Schema.Literal<"exported">]>, Schema.Null]>>;
6008
+ readonly sourceStatus: Schema.Union<readonly [Schema.String, Schema.Null]>;
6009
+ readonly signupAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
6010
+ readonly source: Schema.Union<readonly [Schema.String, Schema.Null]>;
6011
+ }>>;
6012
+ }>;
6013
+ readonly latest: Schema.Struct<{
6014
+ readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
6015
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
6016
+ readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
6017
+ readonly importedAt: Schema.String;
6018
+ readonly summary: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
6019
+ readonly permissionAssumed: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
6020
+ readonly signupAt: Schema.Union<readonly [Schema.Struct<{
6021
+ readonly value: Schema.String;
6022
+ readonly kind: Schema.Union<readonly [Schema.Literal<"time">, Schema.Literal<"text">]>;
6023
+ }>, Schema.Null]>;
6024
+ readonly sources: Schema.$Array<Schema.String>;
6025
+ readonly omittedSources: Schema.Finite;
6026
+ }>, Schema.Null]>>;
6027
+ readonly evidence: Schema.$Array<Schema.Struct<{
6028
+ readonly file: Schema.String;
6029
+ readonly row: Schema.Finite;
6030
+ readonly declared: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
6031
+ readonly kind: Schema.Literal<"status_column">;
6032
+ }>, Schema.Struct<{
6033
+ readonly kind: Schema.Literal<"export_scope">;
6034
+ readonly scope: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">, Schema.Literal<"suppressed">, Schema.Literal<"cleaned/bounced">]>;
6035
+ }>, Schema.Null]>>;
6036
+ readonly suppressionFree: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
6037
+ readonly permissionBasis: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"assumed">, Schema.Literal<"exported">]>, Schema.Null]>>;
6038
+ readonly sourceStatus: Schema.Union<readonly [Schema.String, Schema.Null]>;
6039
+ readonly signupAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
6040
+ readonly source: Schema.Union<readonly [Schema.String, Schema.Null]>;
6041
+ }>>;
6042
+ }>;
6043
+ }>, Schema.Null]>;
6044
+ readonly addedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
6045
+ readonly createdAt: Schema.String;
6046
+ readonly updatedAt: Schema.String;
6047
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
6048
+ readonly _tag: "BillingProviderError";
6049
+ readonly message: string;
6050
+ }, readonly [Schema.Struct<{
6051
+ readonly _tag: Schema.tag<"BillingProviderError">;
6052
+ readonly message: Schema.String;
6053
+ }>], {
6054
+ readonly _tag: "BillingProviderError";
6055
+ readonly message: string;
6056
+ }>, Schema.Struct<{
6057
+ readonly _tag: Schema.tag<"BillingProviderError">;
6058
+ readonly message: Schema.String;
6059
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
6060
+ readonly _tag: "ConflictError";
6061
+ readonly message: string;
6062
+ readonly resource: string;
6063
+ readonly id?: string | null;
6064
+ }, readonly [Schema.Struct<{
6065
+ readonly _tag: Schema.tag<"ConflictError">;
6066
+ readonly message: Schema.String;
6067
+ readonly resource: Schema.String;
6068
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6069
+ }>], {
6070
+ readonly _tag: "ConflictError";
6071
+ readonly message: string;
6072
+ readonly resource: string;
6073
+ readonly id?: string | null;
6074
+ }>, Schema.Struct<{
6075
+ readonly _tag: Schema.tag<"ConflictError">;
6076
+ readonly message: Schema.String;
6077
+ readonly resource: Schema.String;
6078
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6079
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
6080
+ readonly _tag: "ForbiddenError";
6081
+ readonly message: string;
6082
+ }, readonly [Schema.Struct<{
6083
+ readonly _tag: Schema.tag<"ForbiddenError">;
6084
+ readonly message: Schema.String;
6085
+ }>], {
6086
+ readonly _tag: "ForbiddenError";
6087
+ readonly message: string;
6088
+ }>, Schema.Struct<{
6089
+ readonly _tag: Schema.tag<"ForbiddenError">;
6090
+ readonly message: Schema.String;
6091
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
6092
+ readonly _tag: "GatewayTimeoutError";
6093
+ readonly message: string;
6094
+ readonly retryAfterSeconds: number;
6095
+ }, readonly [Schema.Struct<{
6096
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
6097
+ readonly message: Schema.String;
6098
+ readonly retryAfterSeconds: Schema.Finite;
6099
+ }>], {
6100
+ readonly _tag: "GatewayTimeoutError";
6101
+ readonly message: string;
6102
+ readonly retryAfterSeconds: number;
6103
+ }>, Schema.Struct<{
6104
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
6105
+ readonly message: Schema.String;
6106
+ readonly retryAfterSeconds: Schema.Finite;
6107
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
6108
+ readonly _tag: "MalformedRequestError";
6109
+ readonly message: string;
6110
+ readonly fields: {
6111
+ readonly [x: string]: readonly string[];
6112
+ };
6113
+ }, readonly [Schema.Struct<{
6114
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6115
+ readonly message: Schema.String;
6116
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6117
+ }>], {
6118
+ readonly _tag: "MalformedRequestError";
6119
+ readonly message: string;
6120
+ readonly fields: {
6121
+ readonly [x: string]: readonly string[];
6122
+ };
6123
+ }>, Schema.Struct<{
6124
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6125
+ readonly message: Schema.String;
6126
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6127
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
6128
+ readonly _tag: "ResourceNotFoundError";
6129
+ readonly resource: string;
6130
+ readonly id: string;
6131
+ readonly message: string;
6132
+ }, readonly [Schema.Struct<{
6133
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
6134
+ readonly resource: Schema.String;
6135
+ readonly id: Schema.String;
6136
+ readonly message: Schema.String;
6137
+ }>], {
6138
+ readonly _tag: "ResourceNotFoundError";
6139
+ readonly resource: string;
6140
+ readonly id: string;
6141
+ readonly message: string;
6142
+ }>, Schema.Struct<{
6143
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
6144
+ readonly resource: Schema.String;
6145
+ readonly id: Schema.String;
6146
+ readonly message: Schema.String;
6147
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
6148
+ readonly _tag: "UnauthorizedError";
6149
+ readonly message: string;
6150
+ }, readonly [Schema.Struct<{
6151
+ readonly _tag: Schema.tag<"UnauthorizedError">;
6152
+ readonly message: Schema.String;
6153
+ }>], {
6154
+ readonly _tag: "UnauthorizedError";
6155
+ readonly message: string;
6156
+ }>, Schema.Struct<{
6157
+ readonly _tag: Schema.tag<"UnauthorizedError">;
6158
+ readonly message: Schema.String;
6159
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
6160
+ readonly _tag: "ValidationError";
6161
+ readonly message: string;
6162
+ readonly fields?: {
6163
+ readonly [x: string]: readonly string[];
6164
+ } | null;
6165
+ }, readonly [Schema.Struct<{
6166
+ readonly _tag: Schema.tag<"ValidationError">;
6167
+ readonly message: Schema.String;
6168
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
6169
+ }>], {
6170
+ readonly _tag: "ValidationError";
6171
+ readonly message: string;
6172
+ readonly fields?: {
6173
+ readonly [x: string]: readonly string[];
6174
+ } | null;
6175
+ }>, Schema.Struct<{
6176
+ readonly _tag: Schema.tag<"ValidationError">;
6177
+ readonly message: Schema.String;
6178
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
5325
6179
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"contactsPlanImport", "POST", "/v1/contacts/imports/plan", never, never, Schema.toCodecJson<Schema.Struct<{
5326
6180
  readonly preset: Schema.Union<readonly [Schema.Literal<"beehiiv">, Schema.Literal<"substack">, Schema.Literal<"kit">, Schema.Literal<"mailchimp">]>;
5327
6181
  readonly topicId: Schema.brand<Schema.String, "TopicId">;
@@ -5591,6 +6445,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
5591
6445
  readonly identityId: Schema.brand<Schema.String, "ContactIdentityId">;
5592
6446
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
5593
6447
  readonly id: Schema.brand<Schema.String, "ContactId">;
6448
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
5594
6449
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
5595
6450
  readonly name: Schema.String;
5596
6451
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -5610,7 +6465,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
5610
6465
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
5611
6466
  readonly source: Schema.String;
5612
6467
  readonly capturedAt: Schema.String;
5613
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
6468
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
5614
6469
  }>, Schema.Null]>;
5615
6470
  }>>;
5616
6471
  }>>;
@@ -5643,7 +6498,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
5643
6498
  }>, Schema.Null]>>;
5644
6499
  }>, Schema.Null]>;
5645
6500
  readonly tags: Schema.$Array<Schema.String>;
5646
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
6501
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
5647
6502
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
5648
6503
  readonly first: Schema.Struct<{
5649
6504
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -5815,6 +6670,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
5815
6670
  readonly tags: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
5816
6671
  }>>, never, Schema.toCodecJson<Schema.Struct<{
5817
6672
  readonly id: Schema.brand<Schema.String, "ContactId">;
6673
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
5818
6674
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
5819
6675
  readonly name: Schema.String;
5820
6676
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -5834,7 +6690,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
5834
6690
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
5835
6691
  readonly source: Schema.String;
5836
6692
  readonly capturedAt: Schema.String;
5837
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
6693
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
5838
6694
  }>, Schema.Null]>;
5839
6695
  }>>;
5840
6696
  }>>;
@@ -5867,7 +6723,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
5867
6723
  }>, Schema.Null]>>;
5868
6724
  }>, Schema.Null]>;
5869
6725
  readonly tags: Schema.$Array<Schema.String>;
5870
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
6726
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
5871
6727
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
5872
6728
  readonly first: Schema.Struct<{
5873
6729
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -6041,9 +6897,10 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
6041
6897
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
6042
6898
  readonly source: Schema.String;
6043
6899
  readonly capturedAt: Schema.String;
6044
- readonly proof: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
6900
+ readonly proof: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
6045
6901
  }>>, never, Schema.toCodecJson<Schema.Struct<{
6046
6902
  readonly id: Schema.brand<Schema.String, "ContactId">;
6903
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
6047
6904
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
6048
6905
  readonly name: Schema.String;
6049
6906
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -6063,7 +6920,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
6063
6920
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
6064
6921
  readonly source: Schema.String;
6065
6922
  readonly capturedAt: Schema.String;
6066
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
6923
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
6067
6924
  }>, Schema.Null]>;
6068
6925
  }>>;
6069
6926
  }>>;
@@ -6096,7 +6953,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
6096
6953
  }>, Schema.Null]>>;
6097
6954
  }>, Schema.Null]>;
6098
6955
  readonly tags: Schema.$Array<Schema.String>;
6099
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
6956
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
6100
6957
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
6101
6958
  readonly first: Schema.Struct<{
6102
6959
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;
@@ -6517,9 +7374,10 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
6517
7374
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"blocked">, Schema.Literal<"archived">]>, Schema.Null]>>;
6518
7375
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6519
7376
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6520
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
7377
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
6521
7378
  }>>, never, Schema.toCodecJson<Schema.Struct<{
6522
7379
  readonly id: Schema.brand<Schema.String, "ContactId">;
7380
+ readonly mergedInto: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
6523
7381
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
6524
7382
  readonly name: Schema.String;
6525
7383
  readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -6539,7 +7397,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
6539
7397
  readonly status: Schema.Union<readonly [Schema.Literal<"opted_in">, Schema.Literal<"opted_out">]>;
6540
7398
  readonly source: Schema.String;
6541
7399
  readonly capturedAt: Schema.String;
6542
- readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
7400
+ readonly proof: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
6543
7401
  }>, Schema.Null]>;
6544
7402
  }>>;
6545
7403
  }>>;
@@ -6572,7 +7430,7 @@ declare const ContactsGroup_base: HttpApiGroup.HttpApiGroup<"Contacts", HttpApiE
6572
7430
  }>, Schema.Null]>>;
6573
7431
  }>, Schema.Null]>;
6574
7432
  readonly tags: Schema.$Array<Schema.String>;
6575
- readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>;
7433
+ readonly metadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>;
6576
7434
  readonly importProvenance: Schema.Union<readonly [Schema.Struct<{
6577
7435
  readonly first: Schema.Struct<{
6578
7436
  readonly jobId: Schema.brand<Schema.String, "ContactImportJobId">;