samva 0.26.0 → 0.28.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 (107) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +14 -7
  3. package/dist/client/sdk.gen.d.ts +322 -143
  4. package/dist/client/sdk.gen.js +1085 -332
  5. package/dist/client/types.gen.d.ts +1342 -479
  6. package/dist/effect/agents.d.ts +119 -0
  7. package/dist/effect/agents.js +29 -0
  8. package/dist/effect/analytics.d.ts +1 -1
  9. package/dist/effect/analytics.js +1 -1
  10. package/dist/effect/api-keys.d.ts +6 -6
  11. package/dist/effect/attachments.d.ts +1 -1
  12. package/dist/effect/brands.d.ts +2 -0
  13. package/dist/effect/campaigns.d.ts +275 -25
  14. package/dist/effect/campaigns.js +7 -1
  15. package/dist/effect/contact-groups.d.ts +9 -9
  16. package/dist/effect/contacts.d.ts +74 -81
  17. package/dist/effect/contacts.js +7 -3
  18. package/dist/effect/conversations.d.ts +14 -6
  19. package/dist/effect/email.d.ts +34 -34
  20. package/dist/effect/errors.d.ts +1 -1
  21. package/dist/effect/errors.js +2 -2
  22. package/dist/effect/extension-installations.d.ts +3 -3
  23. package/dist/effect/extensions.d.ts +6 -6
  24. package/dist/effect/generated/agents.d.ts +6 -28
  25. package/dist/effect/generated/agents.js +270 -0
  26. package/dist/effect/generated/analytics.d.ts +3 -3
  27. package/dist/effect/generated/analytics.js +1 -1
  28. package/dist/effect/generated/api-keys.d.ts +6 -6
  29. package/dist/effect/generated/api-keys.js +2 -2
  30. package/dist/effect/generated/attachments.d.ts +3 -3
  31. package/dist/effect/generated/attachments.js +1 -1
  32. package/dist/effect/generated/brands.d.ts +16 -0
  33. package/dist/effect/generated/campaigns.d.ts +1181 -302
  34. package/dist/effect/generated/campaigns.js +169 -36
  35. package/dist/effect/generated/contact-events.d.ts +3 -3
  36. package/dist/effect/generated/contact-events.js +1 -1
  37. package/dist/effect/generated/contact-groups.d.ts +9 -9
  38. package/dist/effect/generated/contact-groups.js +7 -7
  39. package/dist/effect/generated/contacts.d.ts +2063 -290
  40. package/dist/effect/generated/contacts.js +343 -75
  41. package/dist/effect/generated/conversations.d.ts +14 -6
  42. package/dist/effect/generated/conversations.js +6 -6
  43. package/dist/effect/generated/email.d.ts +55 -70
  44. package/dist/effect/generated/email.js +18 -21
  45. package/dist/effect/generated/extension-installations.d.ts +3 -3
  46. package/dist/effect/generated/extension-installations.js +1 -1
  47. package/dist/effect/generated/extensions.d.ts +6 -6
  48. package/dist/effect/generated/extensions.js +2 -2
  49. package/dist/effect/generated/index.d.ts +5 -3
  50. package/dist/effect/generated/journeys.d.ts +9 -9
  51. package/dist/effect/generated/journeys.js +3 -3
  52. package/dist/effect/generated/mailboxes.d.ts +466 -712
  53. package/dist/effect/generated/mailboxes.js +22 -14
  54. package/dist/effect/generated/messages.d.ts +53 -29
  55. package/dist/effect/generated/messages.js +9 -5
  56. package/dist/effect/generated/namespaces.d.ts +3 -3
  57. package/dist/effect/generated/namespaces.js +1 -1
  58. package/dist/effect/generated/operations.d.ts +3 -3
  59. package/dist/effect/generated/operations.js +1 -1
  60. package/dist/effect/generated/organizations.d.ts +0 -9
  61. package/dist/effect/generated/organizations.js +1 -4
  62. package/dist/effect/generated/scheduled-messages.d.ts +69 -20
  63. package/dist/effect/generated/scheduled-messages.js +22 -3
  64. package/dist/effect/generated/shared.d.ts +431 -177
  65. package/dist/effect/generated/shared.js +216 -108
  66. package/dist/effect/generated/subscriptions.d.ts +4 -7
  67. package/dist/effect/generated/subscriptions.js +3 -4
  68. package/dist/effect/generated/templates.d.ts +71 -407
  69. package/dist/effect/generated/templates.js +23 -23
  70. package/dist/effect/generated/topic-forms.d.ts +656 -0
  71. package/dist/effect/generated/topic-forms.js +145 -0
  72. package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
  73. package/dist/effect/generated/topics.js +267 -0
  74. package/dist/effect/generated/webhooks.d.ts +6 -6
  75. package/dist/effect/generated/webhooks.js +2 -2
  76. package/dist/effect/generated-metadata.d.ts +78 -24
  77. package/dist/effect/generated-metadata.js +61 -27
  78. package/dist/effect/index.d.ts +3 -1
  79. package/dist/effect/index.js +5 -3
  80. package/dist/effect/internal/operation.js +4 -3
  81. package/dist/effect/internal/send.d.ts +4 -4
  82. package/dist/effect/journeys.d.ts +119 -119
  83. package/dist/effect/mailboxes.d.ts +137 -121
  84. package/dist/effect/messages.d.ts +19 -11
  85. package/dist/effect/namespaces.d.ts +3 -3
  86. package/dist/effect/operations.d.ts +3 -3
  87. package/dist/effect/scheduled-messages.d.ts +6 -6
  88. package/dist/effect/subscriptions.d.ts +1 -2
  89. package/dist/effect/templates.d.ts +13 -13
  90. package/dist/effect/topic-forms.d.ts +30 -0
  91. package/dist/effect/topic-forms.js +21 -0
  92. package/dist/effect/topics.d.ts +94 -0
  93. package/dist/effect/topics.js +29 -0
  94. package/dist/effect/webhooks.d.ts +6 -6
  95. package/dist/index.js +2 -2
  96. package/dist/package.js +1 -1
  97. package/dist/promises/errors.gen.d.ts +65 -8
  98. package/dist/promises/errors.gen.js +139 -7
  99. package/dist/promises/index.d.ts +7 -3
  100. package/dist/promises/index.js +9 -5
  101. package/dist/promises/types.gen.d.ts +1 -1
  102. package/dist/service-map.d.ts +117 -23
  103. package/dist/service-map.js +71 -10
  104. package/package.json +17 -9
  105. package/dist/effect/generated/unsubscribe-groups.js +0 -284
  106. package/dist/effect/unsubscribe-groups.d.ts +0 -74
  107. package/dist/effect/unsubscribe-groups.js +0 -29
@@ -377,10 +377,10 @@ export type MailboxSendError = {
377
377
  };
378
378
  export type SkippedRecipient = {
379
379
  address: string;
380
- reason: "bounce" | "complaint" | "unsubscribe" | "manual" | "group-unsubscribe";
381
- unsubscribeGroupId?: UnsubscribeId | null | undefined;
380
+ reason: "bounce" | "complaint" | "unsubscribe" | "manual" | "topic-unsubscribe";
381
+ topicId?: TopicId | null | undefined;
382
382
  };
383
- export type UnsubscribeId = string;
383
+ export type TopicId = string;
384
384
  export type MessageId = string;
385
385
  export type MailboxDraftId = string;
386
386
  export type MailboxAction = MailboxSendAction | MailboxNonSendAction;
@@ -671,6 +671,10 @@ export type MailboxDownloadUrl = {
671
671
  };
672
672
  export type MailboxMessage = {
673
673
  id: MessageId;
674
+ campaign?: {
675
+ campaignId: CampaignId;
676
+ runId: CampaignRunId;
677
+ } | null | undefined;
674
678
  threadId: MailboxThreadId;
675
679
  conversationId: ConversationId;
676
680
  direction: "inbound" | "outbound";
@@ -711,6 +715,8 @@ export type MailboxMessageSender = {
711
715
  displayName?: string | null | undefined;
712
716
  address: string;
713
717
  };
718
+ export type CampaignRunId = string;
719
+ export type CampaignId = string;
714
720
  export type MailboxMessageAuthentication = {
715
721
  spf: string | null;
716
722
  dkim: string | null;
@@ -775,6 +781,10 @@ export type MailboxMessagePage = {
775
781
  };
776
782
  export type MailboxMessageSummary = {
777
783
  id: MessageId;
784
+ campaign?: {
785
+ campaignId: CampaignId;
786
+ runId: CampaignRunId;
787
+ } | null | undefined;
778
788
  channel: MailboxChannel;
779
789
  direction: "inbound" | "outbound";
780
790
  from: MailboxMessageSender;
@@ -1389,6 +1399,7 @@ export type Brand = {
1389
1399
  };
1390
1400
  export type BrandFooter = {
1391
1401
  companyName?: string | null | undefined;
1402
+ websiteUrl?: string | null | undefined;
1392
1403
  address?: BrandAddress | null | undefined;
1393
1404
  socialLinks?: Array<BrandSocialLink> | null | undefined;
1394
1405
  };
@@ -1428,6 +1439,34 @@ export type CreateBrand = {
1428
1439
  export type BrandList = {
1429
1440
  items: Array<Brand>;
1430
1441
  };
1442
+ export type TemplateSourceError = {
1443
+ _tag: "TemplateSourceError";
1444
+ message: string;
1445
+ diagnostics: Array<{
1446
+ code: string;
1447
+ severity: "error" | "warning" | "info";
1448
+ message: string;
1449
+ origins: Array<{
1450
+ fileName: string;
1451
+ lineNumber: number;
1452
+ columnNumber: number;
1453
+ }>;
1454
+ clients?: Array<string> | null | undefined;
1455
+ notes?: string | null | undefined;
1456
+ provenance?: string | null | undefined;
1457
+ fixtures?: Array<string> | null | undefined;
1458
+ occurrences?: Array<Array<{
1459
+ fileName: string;
1460
+ lineNumber: number;
1461
+ columnNumber: number;
1462
+ }>> | null | undefined;
1463
+ compatibility?: {
1464
+ assessment: "risk" | "degradation" | "unverified" | "not-applicable";
1465
+ title: string;
1466
+ } | null | undefined;
1467
+ }>;
1468
+ revision?: string | null | undefined;
1469
+ };
1431
1470
  export type TemplateProjectId = string;
1432
1471
  export type TemplateInputContractId = string;
1433
1472
  export type TemplateInputContractPage = {
@@ -1666,40 +1705,120 @@ export type AnalyticsQueryError = {
1666
1705
  _tag: "AnalyticsQueryError";
1667
1706
  message: string;
1668
1707
  };
1669
- export type ContactId = string;
1670
- export type UnsubscribeGroupMemberPage = {
1671
- items: Array<{
1672
- id: UnsubscribeGroupMemberId;
1673
- contactId: ContactId;
1674
- source: "link" | "api" | "manual" | "complaint";
1675
- unsubscribedAt: string;
1676
- createdAt: string;
1677
- }>;
1678
- nextCursor: string | null;
1708
+ export type TopicForm = {
1709
+ id: string;
1710
+ publicKey: string;
1711
+ topicId: TopicId;
1712
+ allowedOrigins: Array<string>;
1713
+ confirmationTitle: string;
1714
+ confirmationMessage: string;
1715
+ successTitle: string;
1716
+ successMessage: string;
1717
+ redirectUrl: string | null;
1718
+ linkOrigin: string;
1719
+ createdAt: string;
1720
+ updatedAt: string;
1721
+ };
1722
+ export type TopicFormUpdatePayload = {
1723
+ allowedOrigins?: Array<string> | null | undefined;
1724
+ confirmationTitle?: string | null | undefined;
1725
+ confirmationMessage?: string | null | undefined;
1726
+ successTitle?: string | null | undefined;
1727
+ successMessage?: string | null | undefined;
1728
+ redirectUrl?: string | null | null | undefined;
1729
+ };
1730
+ export type TopicFormCreatePayload = {
1731
+ allowedOrigins: Array<string>;
1732
+ confirmationTitle: string;
1733
+ confirmationMessage: string;
1734
+ successTitle: string;
1735
+ successMessage: string;
1736
+ redirectUrl: string | null;
1737
+ };
1738
+ export type TopicSetSubscriptionsResult = {
1739
+ updated: number;
1740
+ };
1741
+ export type TopicSetSubscriptionsPayload = {
1742
+ contacts: Array<TopicContactRef>;
1743
+ channel: "email";
1744
+ status: "subscribed" | "unsubscribed";
1745
+ source?: string | null | undefined;
1679
1746
  };
1680
- export type UnsubscribeGroupMemberId = string;
1681
- export type UnsubscribeGroupMemberRef = UnsubscribeGroupMemberByContact | UnsubscribeGroupMemberByEmail | UnsubscribeGroupMemberByPhone;
1682
- export type UnsubscribeGroupMemberByPhone = {
1747
+ export type TopicContactRef = TopicContactById | TopicContactByEmail | TopicContactByPhone;
1748
+ export type TopicContactByPhone = {
1683
1749
  phone: string;
1684
1750
  };
1685
- export type UnsubscribeGroupMemberByEmail = {
1751
+ export type TopicContactByEmail = {
1686
1752
  email: string;
1687
1753
  };
1688
- export type UnsubscribeGroupMemberByContact = {
1754
+ export type TopicContactById = {
1689
1755
  contactId: ContactId;
1690
1756
  };
1691
- export type UnsubscribeGroupList = {
1692
- items: Array<{
1693
- id: UnsubscribeId;
1694
- organizationId: string;
1695
- name: string;
1696
- description: string | null;
1697
- isDefault: boolean;
1698
- memberCount: number;
1699
- createdAt: string;
1700
- updatedAt: string;
1757
+ export type ContactId = string;
1758
+ export type TopicSubscriptionPage = {
1759
+ items: Array<TopicSubscription>;
1760
+ nextCursor: string | null;
1761
+ };
1762
+ export type TopicSubscription = {
1763
+ contactId: ContactId;
1764
+ channel: "email";
1765
+ status: "subscribed" | "unsubscribed";
1766
+ source: string;
1767
+ subscribedAt: string | null;
1768
+ unsubscribedAt: string | null;
1769
+ createdAt: string;
1770
+ updatedAt: string;
1771
+ };
1772
+ export type Topic = {
1773
+ id: TopicId;
1774
+ namespaceId: NamespaceId | null;
1775
+ name: string;
1776
+ description: string | null;
1777
+ default: "opt_out" | "opt_in";
1778
+ isDefault: boolean;
1779
+ defaultSenderId: EmailSenderId | null;
1780
+ replyMailboxId: MailboxId | null;
1781
+ templateId: TemplateId | null;
1782
+ subscriptions: TopicSubscriptionCounts;
1783
+ createdAt: string;
1784
+ updatedAt: string;
1785
+ };
1786
+ export type TopicSubscriptionCounts = {
1787
+ email: {
1788
+ subscribed: number;
1789
+ unsubscribed: number;
1790
+ };
1791
+ };
1792
+ export type EmailSenderId = string;
1793
+ export type TopicUpdatePayload = {
1794
+ name?: string | null | undefined;
1795
+ description?: string | null | null | undefined;
1796
+ default?: "opt_out" | "opt_in" | null | undefined;
1797
+ defaultSenderId?: EmailSenderId | null | null | undefined;
1798
+ replyMailboxId?: MailboxId | null | null | undefined;
1799
+ templateId?: TemplateId | null | null | undefined;
1800
+ };
1801
+ export type TopicCreatePayload = {
1802
+ name: string;
1803
+ description?: string | null | null | undefined;
1804
+ namespaceId?: NamespaceId | null | null | undefined;
1805
+ default?: "opt_out" | "opt_in" | null | undefined;
1806
+ defaultSenderId?: EmailSenderId | null | null | undefined;
1807
+ replyMailboxId?: MailboxId | null | null | undefined;
1808
+ templateId?: TemplateId | null | null | undefined;
1809
+ };
1810
+ export type TopicSubscriptionCheck = {
1811
+ contactId: ContactId | null;
1812
+ channel: "email";
1813
+ topics: Array<{
1814
+ topicId: TopicId;
1815
+ topicName: string;
1816
+ status: "subscribed" | "unsubscribed";
1701
1817
  }>;
1702
1818
  };
1819
+ export type TopicList = {
1820
+ items: Array<Topic>;
1821
+ };
1703
1822
  export type CustomFieldDefinitionId = string;
1704
1823
  export type CustomFieldList = {
1705
1824
  items: Array<{
@@ -1812,7 +1931,7 @@ export type SubscribePayload = {
1812
1931
  * The recipient email address; confirmation proves consent for this address.
1813
1932
  */
1814
1933
  email: string;
1815
- contactGroupId: ContactGroupId;
1934
+ topicId: TopicId;
1816
1935
  /**
1817
1936
  * Your verified email sender. The ordinary send pipeline selects its domain and customer brand.
1818
1937
  */
@@ -1820,10 +1939,6 @@ export type SubscribePayload = {
1820
1939
  email: string;
1821
1940
  name?: string | null | undefined;
1822
1941
  };
1823
- /**
1824
- * Clear this unsubscribe group after confirmation; all other opt-outs remain.
1825
- */
1826
- unsubscribeGroupId?: UnsubscribeId | null | undefined;
1827
1942
  templateSlug?: string | null | undefined;
1828
1943
  consentIp?: string | null | undefined;
1829
1944
  consentSource?: string | null | undefined;
@@ -1837,7 +1952,6 @@ export type AgentVersion = {
1837
1952
  export type ClockTime = string;
1838
1953
  export type Weekday = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
1839
1954
  export type TimeZone = string;
1840
- export type AgentApprovalPolicy = "toolActions" | "none";
1841
1955
  export type AgentModel = "standard" | "max";
1842
1956
  export type AgentMode = "live" | "supervised";
1843
1957
  export type AgentIntegrationReference = string;
@@ -1870,7 +1984,6 @@ export type AgentDefinition = {
1870
1984
  integrationIds: Array<AgentIntegrationReference>;
1871
1985
  mode: AgentMode;
1872
1986
  model: AgentModel;
1873
- approvalPolicy: AgentApprovalPolicy;
1874
1987
  workingHours: WorkingHours | null;
1875
1988
  takeoverTimeoutMinutes: number;
1876
1989
  };
@@ -2158,7 +2271,6 @@ export type JourneySendEmailConfigWritable = {
2158
2271
  senderId?: EmailSenderId | undefined;
2159
2272
  templateData?: JsonObjectWritable | undefined;
2160
2273
  };
2161
- export type EmailSenderId = string;
2162
2274
  export type JourneyTrigger = JourneyCustomEventTrigger | JourneyContactCreatedTrigger | JourneyTagAddedTrigger | JourneyGroupJoinedTrigger;
2163
2275
  export type JourneyGroupJoinedTrigger = {
2164
2276
  type: "contact.joined_group";
@@ -2294,6 +2406,82 @@ export type BulkUpdateResult = {
2294
2406
  updated: number;
2295
2407
  failed: number;
2296
2408
  };
2409
+ export type ContactImportJobId = string;
2410
+ export type Contact = {
2411
+ id: ContactId;
2412
+ namespaceId: NamespaceId | null;
2413
+ name: string;
2414
+ displayName: string | null;
2415
+ avatar: string | null;
2416
+ status: "active" | "paused" | "blocked" | "archived";
2417
+ statusReason: string | null;
2418
+ externalId: string | null;
2419
+ identities: Array<ContactIdentity>;
2420
+ profile: ContactProfile | null;
2421
+ preferences: ContactPreferences | null;
2422
+ tags: Array<string>;
2423
+ metadata: JsonObject | null;
2424
+ importProvenance: {
2425
+ first: {
2426
+ jobId: ContactImportJobId;
2427
+ topicId: TopicId;
2428
+ preset: "beehiiv" | "substack" | "kit" | "mailchimp";
2429
+ importedAt: string;
2430
+ summary?: {
2431
+ signupAt: {
2432
+ value: string;
2433
+ kind: "time" | "text";
2434
+ } | null;
2435
+ sources: Array<string>;
2436
+ omittedSources: number;
2437
+ } | null | undefined;
2438
+ evidence: Array<{
2439
+ file: string;
2440
+ row: number;
2441
+ declared: {
2442
+ kind: "status_column";
2443
+ } | {
2444
+ kind: "export_scope";
2445
+ scope: "subscribed" | "unsubscribed" | "suppressed" | "cleaned/bounced";
2446
+ };
2447
+ suppressionFree: boolean;
2448
+ sourceStatus: string | null;
2449
+ signupAt: string | null;
2450
+ source: string | null;
2451
+ }>;
2452
+ };
2453
+ latest: {
2454
+ jobId: ContactImportJobId;
2455
+ topicId: TopicId;
2456
+ preset: "beehiiv" | "substack" | "kit" | "mailchimp";
2457
+ importedAt: string;
2458
+ summary?: {
2459
+ signupAt: {
2460
+ value: string;
2461
+ kind: "time" | "text";
2462
+ } | null;
2463
+ sources: Array<string>;
2464
+ omittedSources: number;
2465
+ } | null | undefined;
2466
+ evidence: Array<{
2467
+ file: string;
2468
+ row: number;
2469
+ declared: {
2470
+ kind: "status_column";
2471
+ } | {
2472
+ kind: "export_scope";
2473
+ scope: "subscribed" | "unsubscribed" | "suppressed" | "cleaned/bounced";
2474
+ };
2475
+ suppressionFree: boolean;
2476
+ sourceStatus: string | null;
2477
+ signupAt: string | null;
2478
+ source: string | null;
2479
+ }>;
2480
+ };
2481
+ } | null;
2482
+ createdAt: string;
2483
+ updatedAt: string;
2484
+ };
2297
2485
  export type ContactPreferences = {
2298
2486
  preferredChannels?: Array<"email"> | null | undefined;
2299
2487
  language?: string | null | undefined;
@@ -2336,28 +2524,6 @@ export type ContactLocation = {
2336
2524
  city: string;
2337
2525
  timezone: string;
2338
2526
  };
2339
- export type ContactIdentityInput = {
2340
- type: "email" | "phone";
2341
- identifier: string;
2342
- verified?: boolean | null | undefined;
2343
- };
2344
- export type Contact = {
2345
- id: ContactId;
2346
- namespaceId: NamespaceId | null;
2347
- name: string;
2348
- displayName: string | null;
2349
- avatar: string | null;
2350
- status: "active" | "paused" | "blocked" | "archived";
2351
- statusReason: string | null;
2352
- externalId: string | null;
2353
- identities: Array<ContactIdentity>;
2354
- profile: ContactProfile | null;
2355
- preferences: ContactPreferences | null;
2356
- tags: Array<string>;
2357
- metadata: JsonObject | null;
2358
- createdAt: string;
2359
- updatedAt: string;
2360
- };
2361
2527
  export type ContactTags = {
2362
2528
  tags: [string, ...Array<string>];
2363
2529
  };
@@ -2370,6 +2536,11 @@ export type SetContactConsent = {
2370
2536
  capturedAt: string;
2371
2537
  proof?: JsonObject | null | undefined;
2372
2538
  };
2539
+ export type ContactIdentityInput = {
2540
+ type: "email" | "phone";
2541
+ identifier: string;
2542
+ verified?: boolean | null | undefined;
2543
+ };
2373
2544
  export type ContactProfileUpdate = {
2374
2545
  firstName?: string | null | null | undefined;
2375
2546
  lastName?: string | null | null | undefined;
@@ -2499,6 +2670,10 @@ export type MessagePage = {
2499
2670
  };
2500
2671
  export type MessageSummary = {
2501
2672
  id: MessageId;
2673
+ campaign?: {
2674
+ campaignId: CampaignId;
2675
+ runId: CampaignRunId;
2676
+ } | null | undefined;
2502
2677
  channel: "email";
2503
2678
  direction: "outbound" | "inbound";
2504
2679
  status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
@@ -3128,15 +3303,13 @@ export type CampaignRecipientPage = {
3128
3303
  status: "pending" | "dispatching" | "dispatched" | "failed" | "skipped";
3129
3304
  messageId: string | null;
3130
3305
  failureReason: string | null;
3131
- skippedReason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | null;
3306
+ skippedReason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | "missing_merge_field" | null;
3132
3307
  createdAt: string;
3133
3308
  updatedAt: string;
3134
3309
  }>;
3135
3310
  nextCursor: string | null;
3136
3311
  };
3137
- export type CampaignRunId = string;
3138
3312
  export type CampaignRecipientId = string;
3139
- export type CampaignId = string;
3140
3313
  export type CampaignRunAction = {
3141
3314
  success: boolean;
3142
3315
  item: CampaignRun;
@@ -3172,14 +3345,14 @@ export type CampaignRun = {
3172
3345
  updatedAt: string;
3173
3346
  };
3174
3347
  export type CampaignRunSkippedReason = {
3175
- reason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed";
3348
+ reason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | "missing_merge_field";
3176
3349
  count: number;
3177
3350
  };
3178
3351
  export type CampaignPolicy = {
3179
- unsubscribeGroupId?: UnsubscribeId | null | undefined;
3180
3352
  pageSize?: number | null | undefined;
3181
3353
  };
3182
3354
  export type CampaignAudience = {
3355
+ topicId: TopicId;
3183
3356
  includeTags?: Array<string> | null | undefined;
3184
3357
  excludeTags?: Array<string> | null | undefined;
3185
3358
  contactIds?: Array<ContactId> | null | undefined;
@@ -3187,7 +3360,9 @@ export type CampaignAudience = {
3187
3360
  };
3188
3361
  export type CampaignContent = {
3189
3362
  channel: "email";
3190
- email: EmailContent;
3363
+ email: CampaignEmailContent;
3364
+ from?: CampaignFrom | undefined;
3365
+ replyMailboxId?: CampaignReplyMailbox | undefined;
3191
3366
  conversationId?: CampaignConversationRef | undefined;
3192
3367
  metadata?: CampaignContentMetadata | undefined;
3193
3368
  };
@@ -3198,7 +3373,15 @@ export type CampaignContentMetadataWritable = {
3198
3373
  [key: string]: JsonValueWritable | undefined;
3199
3374
  } | null;
3200
3375
  export type CampaignConversationRef = ConversationId | null | null;
3201
- export type EmailContent = {
3376
+ /**
3377
+ * Omit to inherit the topic mailbox; null disables mailbox inheritance. An explicit email.replyTo overrides an inherited mailbox.
3378
+ */
3379
+ export type CampaignReplyMailbox = MailboxId | null | null;
3380
+ export type CampaignFrom = {
3381
+ email: string;
3382
+ name?: string | null | undefined;
3383
+ } | null;
3384
+ export type CampaignEmailContent = {
3202
3385
  subject?: string | null | undefined;
3203
3386
  html?: string | null | undefined;
3204
3387
  text?: string | null | undefined;
@@ -3213,34 +3396,13 @@ export type EmailContent = {
3213
3396
  inReplyToMessageId?: MessageId | null | undefined;
3214
3397
  replyTo?: ReplyToAddresses | undefined;
3215
3398
  /**
3216
- * The unsubscribe group for this send. Omit to inherit the template group; null disables group inheritance for a direct send. Campaigns require a group.
3399
+ * The topic for this send. Omit to inherit the template topic; null disables topic inheritance for a direct send. Campaigns require a topic.
3217
3400
  */
3218
- unsubscribeGroupId?: UnsubscribeId | null | null | undefined;
3401
+ topicId?: TopicId | null | null | undefined;
3219
3402
  tracking?: EmailTrackingOverrideV1 | undefined;
3220
3403
  footer?: EmailFooterOverride | undefined;
3221
3404
  headers?: EmailCustomHeaders | null | undefined;
3222
- };
3223
- export type EmailContentWritable = {
3224
- subject?: string | null | undefined;
3225
- html?: string | null | undefined;
3226
- text?: string | null | undefined;
3227
- attachments?: EmailAttachments | undefined;
3228
- publicationId?: TemplatePublicationId | undefined;
3229
- inputContractId?: TemplateInputContractId | undefined;
3230
- templateId?: TemplateId | null | undefined;
3231
- templateSlug?: string | null | undefined;
3232
- templateData?: TemplateDataWritable | undefined;
3233
- locale?: RenderLocale | undefined;
3234
- timeZone?: RenderTimeZone | undefined;
3235
- inReplyToMessageId?: MessageId | null | undefined;
3236
- replyTo?: ReplyToAddresses | undefined;
3237
- /**
3238
- * The unsubscribe group for this send. Omit to inherit the template group; null disables group inheritance for a direct send. Campaigns require a group.
3239
- */
3240
- unsubscribeGroupId?: UnsubscribeId | null | null | undefined;
3241
- tracking?: EmailTrackingOverrideV1 | undefined;
3242
- footer?: EmailFooterOverride | undefined;
3243
- headers?: EmailCustomHeadersWritable | null | undefined;
3405
+ preheader?: string | null | undefined;
3244
3406
  };
3245
3407
  /**
3246
3408
  * Custom headers copied onto the outgoing message. Each name is an RFC 5322 field name and each value is one non-empty line of printable ASCII. Names Samva or the transport own are rejected.
@@ -3274,6 +3436,41 @@ export type ReplyToAddresses = Array<string> | null | null;
3274
3436
  export type TemplateData = JsonObject | null;
3275
3437
  export type TemplateDataWritable = JsonObjectWritable | null;
3276
3438
  export type EmailAttachments = Array<EmailAttachment> | null;
3439
+ export type CampaignRunReport = {
3440
+ campaignId: CampaignId;
3441
+ runId: CampaignRunId;
3442
+ totalRecipients: number;
3443
+ dispatchedCount: number;
3444
+ failedCount: number;
3445
+ skippedCount: number;
3446
+ deliveredCount: number;
3447
+ hardBounceCount: number;
3448
+ softBounceCount: number;
3449
+ complaintCount: number;
3450
+ engagement: CampaignRunReportEngagement;
3451
+ unsubscribesByTopic: Array<CampaignRunReportTopicUnsubscribes>;
3452
+ replyCount: number;
3453
+ skippedReasons: Array<CampaignRunReportSkippedReason>;
3454
+ };
3455
+ export type CampaignRunReportSkippedReason = {
3456
+ reason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | "missing_merge_field";
3457
+ count: number;
3458
+ };
3459
+ export type CampaignRunReportTopicUnsubscribes = {
3460
+ topicId: TopicId;
3461
+ count: number;
3462
+ };
3463
+ export type CampaignRunReportEngagement = {
3464
+ measurement: "directional";
3465
+ /**
3466
+ * Directional unique recipients who opened, excluding machine events; not an exact measurement.
3467
+ */
3468
+ uniqueOpens: number;
3469
+ /**
3470
+ * Directional unique recipients who clicked, excluding machine events; not an exact measurement.
3471
+ */
3472
+ uniqueClicks: number;
3473
+ };
3277
3474
  export type CampaignRunPage = {
3278
3475
  items: Array<CampaignRun>;
3279
3476
  nextCursor: string | null;
@@ -3311,11 +3508,13 @@ export type CampaignDefinitionSummary = {
3311
3508
  };
3312
3509
  export type CampaignContentInput = {
3313
3510
  channel: "email";
3314
- email: EmailDispatchContent;
3511
+ email: CampaignEmailInput;
3512
+ from?: CampaignFrom | undefined;
3513
+ replyMailboxId?: CampaignReplyMailbox | undefined;
3315
3514
  conversationId?: CampaignConversationRef | undefined;
3316
3515
  metadata?: CampaignContentMetadataWritable | undefined;
3317
3516
  };
3318
- export type EmailDispatchContent = {
3517
+ export type CampaignEmailInput = {
3319
3518
  subject?: string | null | undefined;
3320
3519
  html?: string | null | undefined;
3321
3520
  text?: string | null | undefined;
@@ -3330,12 +3529,13 @@ export type EmailDispatchContent = {
3330
3529
  inReplyToMessageId?: MessageId | null | undefined;
3331
3530
  replyTo?: ReplyToAddresses | undefined;
3332
3531
  /**
3333
- * The unsubscribe group for this send. Omit to inherit the template group; null disables group inheritance for a direct send. Campaigns require a group.
3532
+ * The topic for this send. Omit to inherit the template topic; null disables topic inheritance for a direct send. Campaigns require a topic.
3334
3533
  */
3335
- unsubscribeGroupId?: UnsubscribeId | null | null | undefined;
3534
+ topicId?: TopicId | null | null | undefined;
3336
3535
  tracking?: EmailTrackingOverrideV1 | undefined;
3337
3536
  footer?: EmailFooterOverride | undefined;
3338
3537
  headers?: EmailCustomHeadersWritable | null | undefined;
3538
+ preheader?: string | null | undefined;
3339
3539
  };
3340
3540
  export type CampaignPage = {
3341
3541
  items: Array<CampaignListItem>;
@@ -3357,6 +3557,20 @@ export type CampaignListItem = {
3357
3557
  updatedAt: string;
3358
3558
  series: SendsSeries;
3359
3559
  };
3560
+ export type CampaignTestSend = {
3561
+ id: MessageId;
3562
+ };
3563
+ export type CampaignComposition = {
3564
+ content: CampaignContentInput;
3565
+ audience: CampaignAudience;
3566
+ contactId?: ContactId | null | undefined;
3567
+ };
3568
+ export type CampaignPreview = {
3569
+ subject: string;
3570
+ preheader?: string | undefined;
3571
+ html: string;
3572
+ text: string;
3573
+ };
3360
3574
  export type ScheduledMessage = {
3361
3575
  id: ScheduledMessageId;
3362
3576
  status: "pending" | "dispatching" | "paused" | "dispatched" | "cancelled" | "failed";
@@ -3400,6 +3614,50 @@ export type EmailSendMessagePayload = {
3400
3614
  from?: EmailSender | undefined;
3401
3615
  email: EmailContent;
3402
3616
  };
3617
+ export type EmailContent = {
3618
+ subject?: string | null | undefined;
3619
+ html?: string | null | undefined;
3620
+ text?: string | null | undefined;
3621
+ attachments?: EmailAttachments | undefined;
3622
+ publicationId?: TemplatePublicationId | undefined;
3623
+ inputContractId?: TemplateInputContractId | undefined;
3624
+ templateId?: TemplateId | null | undefined;
3625
+ templateSlug?: string | null | undefined;
3626
+ templateData?: TemplateData | undefined;
3627
+ locale?: RenderLocale | undefined;
3628
+ timeZone?: RenderTimeZone | undefined;
3629
+ inReplyToMessageId?: MessageId | null | undefined;
3630
+ replyTo?: ReplyToAddresses | undefined;
3631
+ /**
3632
+ * The topic for this send. Omit to inherit the template topic; null disables topic inheritance for a direct send. Campaigns require a topic.
3633
+ */
3634
+ topicId?: TopicId | null | null | undefined;
3635
+ tracking?: EmailTrackingOverrideV1 | undefined;
3636
+ footer?: EmailFooterOverride | undefined;
3637
+ headers?: EmailCustomHeaders | null | undefined;
3638
+ };
3639
+ export type EmailContentWritable = {
3640
+ subject?: string | null | undefined;
3641
+ html?: string | null | undefined;
3642
+ text?: string | null | undefined;
3643
+ attachments?: EmailAttachments | undefined;
3644
+ publicationId?: TemplatePublicationId | undefined;
3645
+ inputContractId?: TemplateInputContractId | undefined;
3646
+ templateId?: TemplateId | null | undefined;
3647
+ templateSlug?: string | null | undefined;
3648
+ templateData?: TemplateDataWritable | undefined;
3649
+ locale?: RenderLocale | undefined;
3650
+ timeZone?: RenderTimeZone | undefined;
3651
+ inReplyToMessageId?: MessageId | null | undefined;
3652
+ replyTo?: ReplyToAddresses | undefined;
3653
+ /**
3654
+ * The topic for this send. Omit to inherit the template topic; null disables topic inheritance for a direct send. Campaigns require a topic.
3655
+ */
3656
+ topicId?: TopicId | null | null | undefined;
3657
+ tracking?: EmailTrackingOverrideV1 | undefined;
3658
+ footer?: EmailFooterOverride | undefined;
3659
+ headers?: EmailCustomHeadersWritable | null | undefined;
3660
+ };
3403
3661
  export type EmailSender = {
3404
3662
  email: string;
3405
3663
  name?: string | null | undefined;
@@ -3429,6 +3687,28 @@ export type DispatchSendMessagePayload = {
3429
3687
  from?: EmailSender | undefined;
3430
3688
  email: EmailDispatchContent;
3431
3689
  };
3690
+ export type EmailDispatchContent = {
3691
+ subject?: string | null | undefined;
3692
+ html?: string | null | undefined;
3693
+ text?: string | null | undefined;
3694
+ attachments?: EmailAttachments | undefined;
3695
+ publicationId?: TemplatePublicationId | undefined;
3696
+ inputContractId?: TemplateInputContractId | undefined;
3697
+ templateId?: TemplateId | null | undefined;
3698
+ templateSlug?: string | null | undefined;
3699
+ templateData?: TemplateDataWritable | undefined;
3700
+ locale?: RenderLocale | undefined;
3701
+ timeZone?: RenderTimeZone | undefined;
3702
+ inReplyToMessageId?: MessageId | null | undefined;
3703
+ replyTo?: ReplyToAddresses | undefined;
3704
+ /**
3705
+ * The topic for this send. Omit to inherit the template topic; null disables topic inheritance for a direct send. Campaigns require a topic.
3706
+ */
3707
+ topicId?: TopicId | null | null | undefined;
3708
+ tracking?: EmailTrackingOverrideV1 | undefined;
3709
+ footer?: EmailFooterOverride | undefined;
3710
+ headers?: EmailCustomHeadersWritable | null | undefined;
3711
+ };
3432
3712
  export type OperationPage = {
3433
3713
  items: Array<Operation>;
3434
3714
  nextCursor: string | null;
@@ -3540,6 +3820,10 @@ export type MessageDeliveryError = {
3540
3820
  export type MessageDeliveryId = string;
3541
3821
  export type Message = {
3542
3822
  id: MessageId;
3823
+ campaign?: {
3824
+ campaignId: CampaignId;
3825
+ runId: CampaignRunId;
3826
+ } | null | undefined;
3543
3827
  channel: "email";
3544
3828
  direction: "outbound" | "inbound";
3545
3829
  status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
@@ -3602,7 +3886,7 @@ export type MessagesListData = {
3602
3886
  body?: never;
3603
3887
  path?: never;
3604
3888
  query?: {
3605
- limit?: string | null | undefined;
3889
+ limit?: number | null | undefined;
3606
3890
  cursor?: Cursor | null | undefined;
3607
3891
  channel?: "email" | null | undefined;
3608
3892
  direction?: "outbound" | "inbound" | null | undefined;
@@ -3902,8 +4186,8 @@ export type MessagesGetEmailData = {
3902
4186
  id: MessageId;
3903
4187
  };
3904
4188
  query?: {
3905
- includeDownloadUrls?: string | null | undefined;
3906
- urlExpiresIn?: string | null | undefined;
4189
+ includeDownloadUrls?: boolean | null | undefined;
4190
+ urlExpiresIn?: number | null | undefined;
3907
4191
  };
3908
4192
  url: "/v1/messages/{id}/email";
3909
4193
  };
@@ -4131,7 +4415,7 @@ export type MessagesGetEventsData = {
4131
4415
  id: MessageId;
4132
4416
  };
4133
4417
  query?: {
4134
- limit?: string | null | undefined;
4418
+ limit?: number | null | undefined;
4135
4419
  cursor?: Cursor | null | undefined;
4136
4420
  };
4137
4421
  url: "/v1/messages/{id}/events";
@@ -4174,7 +4458,7 @@ export type OperationsListData = {
4174
4458
  body?: never;
4175
4459
  path?: never;
4176
4460
  query?: {
4177
- limit?: string | null | undefined;
4461
+ limit?: number | null | undefined;
4178
4462
  cursor?: Cursor | null | undefined;
4179
4463
  kind?: "email-domain-provisioning" | "organization-deletion" | null | undefined;
4180
4464
  status?: "pending" | "running" | "succeeded" | "failed" | null | undefined;
@@ -4303,7 +4587,7 @@ export type ScheduledMessagesListData = {
4303
4587
  body?: never;
4304
4588
  path?: never;
4305
4589
  query?: {
4306
- limit?: string | null | undefined;
4590
+ limit?: number | null | undefined;
4307
4591
  cursor?: Cursor | null | undefined;
4308
4592
  status?: "pending" | "dispatching" | "paused" | "dispatched" | "cancelled" | "failed" | null | undefined;
4309
4593
  };
@@ -4539,17 +4823,125 @@ export type ScheduledMessagesResumeResponses = {
4539
4823
  200: ScheduledMessage;
4540
4824
  };
4541
4825
  export type ScheduledMessagesResumeResponse = ScheduledMessagesResumeResponses[keyof ScheduledMessagesResumeResponses];
4542
- export type CampaignsListData = {
4543
- body?: never;
4544
- path?: never;
4545
- query?: {
4546
- status?: "draft" | "archived" | null | undefined;
4547
- limit?: string | null | undefined;
4548
- cursor?: Cursor | null | undefined;
4826
+ export type CampaignsPreviewData = {
4827
+ body: {
4828
+ content: CampaignContentInput;
4829
+ audience: CampaignAudience;
4830
+ contactId?: ContactId | null | undefined;
4549
4831
  };
4550
- url: "/v1/campaigns";
4832
+ path?: never;
4833
+ query?: never;
4834
+ url: "/v1/campaigns/preview";
4551
4835
  };
4552
- export type CampaignsListErrors = {
4836
+ export type CampaignsPreviewErrors = {
4837
+ /**
4838
+ * UnauthorizedError
4839
+ */
4840
+ 401: UnauthorizedError;
4841
+ /**
4842
+ * ForbiddenError
4843
+ */
4844
+ 403: ForbiddenError;
4845
+ /**
4846
+ * ResourceNotFoundError
4847
+ */
4848
+ 404: ResourceNotFoundError;
4849
+ /**
4850
+ * ValidationError
4851
+ */
4852
+ 422: ValidationError;
4853
+ /**
4854
+ * InternalError
4855
+ */
4856
+ 500: InternalError;
4857
+ /**
4858
+ * GatewayTimeoutError
4859
+ */
4860
+ 504: GatewayTimeoutError;
4861
+ };
4862
+ export type CampaignsPreviewError = CampaignsPreviewErrors[keyof CampaignsPreviewErrors];
4863
+ export type CampaignsPreviewResponses = {
4864
+ /**
4865
+ * CampaignPreview
4866
+ */
4867
+ 200: CampaignPreview;
4868
+ };
4869
+ export type CampaignsPreviewResponse = CampaignsPreviewResponses[keyof CampaignsPreviewResponses];
4870
+ export type CampaignsSendTestData = {
4871
+ body: {
4872
+ content: CampaignContentInput;
4873
+ audience: CampaignAudience;
4874
+ contactId?: ContactId | null | undefined;
4875
+ };
4876
+ path?: never;
4877
+ query?: never;
4878
+ url: "/v1/campaigns/test-send";
4879
+ };
4880
+ export type CampaignsSendTestErrors = {
4881
+ /**
4882
+ * UnauthorizedError
4883
+ */
4884
+ 401: UnauthorizedError;
4885
+ /**
4886
+ * PaymentRequiredError
4887
+ */
4888
+ 402: PaymentRequiredError;
4889
+ /**
4890
+ * ForbiddenError | OnboardingReviewRequiredError | FlagDisabledError
4891
+ */
4892
+ 403: ForbiddenError | OnboardingReviewRequiredError | FlagDisabledError;
4893
+ /**
4894
+ * ResourceNotFoundError
4895
+ */
4896
+ 404: ResourceNotFoundError;
4897
+ /**
4898
+ * ConflictError
4899
+ */
4900
+ 409: ConflictError;
4901
+ /**
4902
+ * ValidationError | FromAddressRequiredError | BrandAddressRequiredError | CampaignFooterRequiredError
4903
+ */
4904
+ 422: ValidationError | FromAddressRequiredError | BrandAddressRequiredError | CampaignFooterRequiredError;
4905
+ /**
4906
+ * RateLimitedError
4907
+ */
4908
+ 429: RateLimitedError;
4909
+ /**
4910
+ * InternalError
4911
+ */
4912
+ 500: InternalError;
4913
+ /**
4914
+ * BillingProviderError | ExternalServiceError
4915
+ */
4916
+ 502: BillingProviderError | ExternalServiceError;
4917
+ /**
4918
+ * SenderNotReadyError | DeliveryUnavailableError
4919
+ */
4920
+ 503: SenderNotReadyError | DeliveryUnavailableError;
4921
+ /**
4922
+ * GatewayTimeoutError
4923
+ */
4924
+ 504: GatewayTimeoutError;
4925
+ };
4926
+ export type CampaignsSendTestError = CampaignsSendTestErrors[keyof CampaignsSendTestErrors];
4927
+ export type CampaignsSendTestResponses = {
4928
+ /**
4929
+ * CampaignTestSend
4930
+ */
4931
+ 200: CampaignTestSend;
4932
+ };
4933
+ export type CampaignsSendTestResponse = CampaignsSendTestResponses[keyof CampaignsSendTestResponses];
4934
+ export type CampaignsListData = {
4935
+ body?: never;
4936
+ path?: never;
4937
+ query?: {
4938
+ status?: "draft" | "archived" | null | undefined;
4939
+ limit?: number | null | undefined;
4940
+ cursor?: Cursor | null | undefined;
4941
+ };
4942
+ url: "/v1/campaigns";
4943
+ };
4944
+ export type CampaignsListErrors = {
4553
4945
  /**
4554
4946
  * UnauthorizedError
4555
4947
  */
@@ -4767,7 +5159,7 @@ export type CampaignsListRunsData = {
4767
5159
  };
4768
5160
  query?: {
4769
5161
  status?: "scheduled" | "resolving" | "dispatching" | "paused" | "completed" | "cancelled" | "failed" | null | undefined;
4770
- limit?: string | null | undefined;
5162
+ limit?: number | null | undefined;
4771
5163
  cursor?: Cursor | null | undefined;
4772
5164
  };
4773
5165
  url: "/v1/campaigns/{id}/runs";
@@ -4906,6 +5298,49 @@ export type CampaignsGetRunResponses = {
4906
5298
  200: CampaignRun;
4907
5299
  };
4908
5300
  export type CampaignsGetRunResponse = CampaignsGetRunResponses[keyof CampaignsGetRunResponses];
5301
+ export type CampaignsGetRunReportData = {
5302
+ body?: never;
5303
+ path: {
5304
+ id: CampaignId;
5305
+ runId: CampaignRunId;
5306
+ };
5307
+ query?: never;
5308
+ url: "/v1/campaigns/{id}/runs/{runId}/report";
5309
+ };
5310
+ export type CampaignsGetRunReportErrors = {
5311
+ /**
5312
+ * UnauthorizedError
5313
+ */
5314
+ 401: UnauthorizedError;
5315
+ /**
5316
+ * ForbiddenError
5317
+ */
5318
+ 403: ForbiddenError;
5319
+ /**
5320
+ * ResourceNotFoundError
5321
+ */
5322
+ 404: ResourceNotFoundError;
5323
+ /**
5324
+ * ValidationError
5325
+ */
5326
+ 422: ValidationError;
5327
+ /**
5328
+ * InternalError
5329
+ */
5330
+ 500: InternalError;
5331
+ /**
5332
+ * GatewayTimeoutError
5333
+ */
5334
+ 504: GatewayTimeoutError;
5335
+ };
5336
+ export type CampaignsGetRunReportError = CampaignsGetRunReportErrors[keyof CampaignsGetRunReportErrors];
5337
+ export type CampaignsGetRunReportResponses = {
5338
+ /**
5339
+ * CampaignRunReport
5340
+ */
5341
+ 200: CampaignRunReport;
5342
+ };
5343
+ export type CampaignsGetRunReportResponse = CampaignsGetRunReportResponses[keyof CampaignsGetRunReportResponses];
4909
5344
  export type CampaignsPauseRunData = {
4910
5345
  body?: never;
4911
5346
  path: {
@@ -5067,7 +5502,7 @@ export type CampaignsListRecipientsData = {
5067
5502
  };
5068
5503
  query?: {
5069
5504
  status?: "pending" | "dispatching" | "dispatched" | "failed" | "skipped" | null | undefined;
5070
- limit?: string | null | undefined;
5505
+ limit?: number | null | undefined;
5071
5506
  cursor?: Cursor | null | undefined;
5072
5507
  };
5073
5508
  url: "/v1/campaigns/{id}/runs/{runId}/recipients";
@@ -5392,9 +5827,9 @@ export type EmailListDomainsData = {
5392
5827
  body?: never;
5393
5828
  path?: never;
5394
5829
  query?: {
5395
- limit?: string | null | undefined;
5830
+ limit?: number | null | undefined;
5396
5831
  cursor?: Cursor | null | undefined;
5397
- sendable?: "true" | null | undefined;
5832
+ sendable?: true | null | undefined;
5398
5833
  namespaceId?: NamespaceId | null | undefined;
5399
5834
  };
5400
5835
  url: "/v1/email/domains";
@@ -6063,7 +6498,7 @@ export type EmailUpdateDomainConfigData = {
6063
6498
  openTracking?: boolean | null | null | undefined;
6064
6499
  clickTracking?: boolean | null | null | undefined;
6065
6500
  replyTo?: Array<string> | null | null | undefined;
6066
- unsubscribeGroupId?: UnsubscribeId | null | null | undefined;
6501
+ topicId?: TopicId | null | null | undefined;
6067
6502
  footerEnabled?: boolean | null | null | undefined;
6068
6503
  brandSlug?: string | null | null | undefined;
6069
6504
  };
@@ -6109,7 +6544,7 @@ export type EmailUpdateDomainConfigResponses = {
6109
6544
  openTracking: boolean | null;
6110
6545
  clickTracking: boolean | null;
6111
6546
  replyTo: Array<string> | null;
6112
- unsubscribeGroupId: UnsubscribeId | null;
6547
+ topicId: TopicId | null;
6113
6548
  footerEnabled: boolean | null;
6114
6549
  brandSlug: string | null;
6115
6550
  };
@@ -6452,11 +6887,11 @@ export type EmailListSendersData = {
6452
6887
  body?: never;
6453
6888
  path?: never;
6454
6889
  query?: {
6455
- limit?: string | null | undefined;
6890
+ limit?: number | null | undefined;
6456
6891
  cursor?: Cursor | null | undefined;
6457
6892
  verificationStatus?: "pending" | "verified" | "failed" | null | undefined;
6458
- isActive?: string | null | undefined;
6459
- isDefault?: string | null | undefined;
6893
+ isActive?: boolean | null | undefined;
6894
+ isDefault?: boolean | null | undefined;
6460
6895
  namespaceId?: NamespaceId | null | undefined;
6461
6896
  };
6462
6897
  url: "/v1/email/senders";
@@ -7053,7 +7488,7 @@ export type EmailListSuppressionsData = {
7053
7488
  type?: "bounce" | "complaint" | "unsubscribe" | "manual" | null | undefined;
7054
7489
  status?: "active" | "expired" | null | undefined;
7055
7490
  search?: string | null | undefined;
7056
- limit?: string | null | undefined;
7491
+ limit?: number | null | undefined;
7057
7492
  cursor?: Cursor | null | undefined;
7058
7493
  };
7059
7494
  url: "/v1/email/suppressions";
@@ -7175,8 +7610,8 @@ export type EmailListBlocksData = {
7175
7610
  path?: never;
7176
7611
  query?: {
7177
7612
  blockType?: "email" | "domain" | null | undefined;
7178
- isActive?: string | null | undefined;
7179
- limit?: string | null | undefined;
7613
+ isActive?: boolean | null | undefined;
7614
+ limit?: number | null | undefined;
7180
7615
  cursor?: Cursor | null | undefined;
7181
7616
  };
7182
7617
  url: "/v1/email/blocks";
@@ -7372,7 +7807,7 @@ export type EmailGetBlockLogsData = {
7372
7807
  fromAddress?: string | null | undefined;
7373
7808
  after?: string | null | undefined;
7374
7809
  before?: string | null | undefined;
7375
- limit?: string | null | undefined;
7810
+ limit?: number | null | undefined;
7376
7811
  cursor?: Cursor | null | undefined;
7377
7812
  };
7378
7813
  url: "/v1/email/blocks/logs";
@@ -7460,7 +7895,7 @@ export type EmailListForwardingRulesData = {
7460
7895
  path?: never;
7461
7896
  query?: {
7462
7897
  domainId?: EmailDomainId | null | undefined;
7463
- isActive?: string | null | undefined;
7898
+ isActive?: boolean | null | undefined;
7464
7899
  };
7465
7900
  url: "/v1/email/forwarding";
7466
7901
  };
@@ -7672,7 +8107,7 @@ export type EmailGetForwardingLogData = {
7672
8107
  status?: "pending" | "forwarded" | "failed" | null | undefined;
7673
8108
  after?: string | null | undefined;
7674
8109
  before?: string | null | undefined;
7675
- limit?: string | null | undefined;
8110
+ limit?: number | null | undefined;
7676
8111
  cursor?: Cursor | null | undefined;
7677
8112
  };
7678
8113
  url: "/v1/email/forwarding/logs";
@@ -8396,7 +8831,7 @@ export type AttachmentsDownloadUrlData = {
8396
8831
  id: AttachmentId;
8397
8832
  };
8398
8833
  query?: {
8399
- expiresIn?: string | null | undefined;
8834
+ expiresIn?: number | null | undefined;
8400
8835
  };
8401
8836
  url: "/v1/attachments/{id}/download-url";
8402
8837
  };
@@ -8452,7 +8887,7 @@ export type ConversationsListData = {
8452
8887
  body?: never;
8453
8888
  path?: never;
8454
8889
  query?: {
8455
- limit?: string | null | undefined;
8890
+ limit?: number | null | undefined;
8456
8891
  cursor?: Cursor | null | undefined;
8457
8892
  status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null | undefined;
8458
8893
  channel?: "email" | null | undefined;
@@ -8653,7 +9088,7 @@ export type ConversationsListMessagesData = {
8653
9088
  id: ConversationId;
8654
9089
  };
8655
9090
  query?: {
8656
- limit?: string | null | undefined;
9091
+ limit?: number | null | undefined;
8657
9092
  cursor?: Cursor | null | undefined;
8658
9093
  after?: string | null | undefined;
8659
9094
  before?: string | null | undefined;
@@ -9050,7 +9485,7 @@ export type ContactsListData = {
9050
9485
  body?: never;
9051
9486
  path?: never;
9052
9487
  query?: {
9053
- limit?: string | null | undefined;
9488
+ limit?: number | null | undefined;
9054
9489
  cursor?: Cursor | null | undefined;
9055
9490
  namespaceId?: NamespaceId | null | undefined;
9056
9491
  search?: string | null | undefined;
@@ -9707,29 +10142,155 @@ export type ContactsGetEngagementResponses = {
9707
10142
  };
9708
10143
  };
9709
10144
  export type ContactsGetEngagementResponse = ContactsGetEngagementResponses[keyof ContactsGetEngagementResponses];
9710
- export type ContactsBulkImportData = {
10145
+ export type ContactsPlanImportData = {
9711
10146
  body: {
10147
+ preset: "beehiiv" | "substack" | "kit" | "mailchimp";
10148
+ topicId: TopicId;
9712
10149
  namespaceId?: NamespaceId | null | undefined;
9713
- contacts: Array<{
9714
- name: string;
9715
- displayName?: string | null | null | undefined;
9716
- avatar?: string | null | null | undefined;
9717
- identities?: Array<ContactIdentityInput> | null | undefined;
9718
- profile?: ContactProfileWritable | null | null | undefined;
9719
- preferences?: ContactPreferences | null | null | undefined;
9720
- tags?: Array<string> | null | undefined;
9721
- status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
9722
- statusReason?: string | null | null | undefined;
9723
- externalId?: string | null | null | undefined;
9724
- metadata?: JsonObjectWritable | null | null | undefined;
10150
+ files: [
10151
+ {
10152
+ name: string;
10153
+ csv: string;
10154
+ evidence: {
10155
+ kind: "status_column";
10156
+ } | {
10157
+ kind: "export_scope";
10158
+ scope: "subscribed" | "unsubscribed" | "suppressed" | "cleaned/bounced";
10159
+ };
10160
+ /**
10161
+ * The operator declares this beehiiv export was filtered to Suppression does not exist.
10162
+ */
10163
+ suppressionFree?: boolean | null | undefined;
10164
+ },
10165
+ ...Array<{
10166
+ name: string;
10167
+ csv: string;
10168
+ evidence: {
10169
+ kind: "status_column";
10170
+ } | {
10171
+ kind: "export_scope";
10172
+ scope: "subscribed" | "unsubscribed" | "suppressed" | "cleaned/bounced";
10173
+ };
10174
+ /**
10175
+ * The operator declares this beehiiv export was filtered to Suppression does not exist.
10176
+ */
10177
+ suppressionFree?: boolean | null | undefined;
10178
+ }>
10179
+ ];
10180
+ };
10181
+ path?: never;
10182
+ query?: never;
10183
+ url: "/v1/contacts/imports/plan";
10184
+ };
10185
+ export type ContactsPlanImportErrors = {
10186
+ /**
10187
+ * UnauthorizedError
10188
+ */
10189
+ 401: UnauthorizedError;
10190
+ /**
10191
+ * ForbiddenError | FlagDisabledError
10192
+ */
10193
+ 403: ForbiddenError | FlagDisabledError;
10194
+ /**
10195
+ * ResourceNotFoundError
10196
+ */
10197
+ 404: ResourceNotFoundError;
10198
+ /**
10199
+ * ValidationError
10200
+ */
10201
+ 422: ValidationError;
10202
+ /**
10203
+ * InternalError
10204
+ */
10205
+ 500: InternalError;
10206
+ /**
10207
+ * GatewayTimeoutError
10208
+ */
10209
+ 504: GatewayTimeoutError;
10210
+ };
10211
+ export type ContactsPlanImportError = ContactsPlanImportErrors[keyof ContactsPlanImportErrors];
10212
+ export type ContactsPlanImportResponses = {
10213
+ /**
10214
+ * Success
10215
+ */
10216
+ 200: {
10217
+ planHash: string;
10218
+ presetVersion: string;
10219
+ namespaceId: NamespaceId | null;
10220
+ topicId: TopicId;
10221
+ canStart: boolean;
10222
+ counts: {
10223
+ totalRows: number;
10224
+ uniqueAddresses: number;
10225
+ subscribed: number;
10226
+ unsubscribed: number;
10227
+ suppressed: number;
10228
+ skipped: number;
10229
+ conflicts: number;
10230
+ created: number;
10231
+ existing: number;
10232
+ };
10233
+ diagnostics: Array<{
10234
+ file: string;
10235
+ row: number;
10236
+ code: string;
10237
+ message: string;
10238
+ email?: string | null | undefined;
9725
10239
  }>;
9726
- onConflict?: "skip" | "update" | null | undefined;
10240
+ diagnosticsTruncated: boolean;
10241
+ };
10242
+ };
10243
+ export type ContactsPlanImportResponse = ContactsPlanImportResponses[keyof ContactsPlanImportResponses];
10244
+ export type ContactsStartImportData = {
10245
+ body: {
10246
+ mode: "new";
10247
+ input: {
10248
+ preset: "beehiiv" | "substack" | "kit" | "mailchimp";
10249
+ topicId: TopicId;
10250
+ namespaceId?: NamespaceId | null | undefined;
10251
+ files: [
10252
+ {
10253
+ name: string;
10254
+ csv: string;
10255
+ evidence: {
10256
+ kind: "status_column";
10257
+ } | {
10258
+ kind: "export_scope";
10259
+ scope: "subscribed" | "unsubscribed" | "suppressed" | "cleaned/bounced";
10260
+ };
10261
+ /**
10262
+ * The operator declares this beehiiv export was filtered to Suppression does not exist.
10263
+ */
10264
+ suppressionFree?: boolean | null | undefined;
10265
+ },
10266
+ ...Array<{
10267
+ name: string;
10268
+ csv: string;
10269
+ evidence: {
10270
+ kind: "status_column";
10271
+ } | {
10272
+ kind: "export_scope";
10273
+ scope: "subscribed" | "unsubscribed" | "suppressed" | "cleaned/bounced";
10274
+ };
10275
+ /**
10276
+ * The operator declares this beehiiv export was filtered to Suppression does not exist.
10277
+ */
10278
+ suppressionFree?: boolean | null | undefined;
10279
+ }>
10280
+ ];
10281
+ };
10282
+ planHash: string;
10283
+ idempotencyKey: string;
10284
+ } | {
10285
+ mode: "resume";
10286
+ jobId: ContactImportJobId;
10287
+ expectedGeneration: number;
9727
10288
  };
9728
10289
  path?: never;
9729
10290
  query?: never;
9730
- url: "/v1/contacts/bulk-import";
10291
+ url: "/v1/contacts/imports";
9731
10292
  };
9732
- export type ContactsBulkImportErrors = {
10293
+ export type ContactsStartImportErrors = {
9733
10294
  /**
9734
10295
  * UnauthorizedError
9735
10296
  */
@@ -9739,13 +10300,17 @@ export type ContactsBulkImportErrors = {
9739
10300
  */
9740
10301
  402: PaymentRequiredError;
9741
10302
  /**
9742
- * ForbiddenError
10303
+ * ForbiddenError | FlagDisabledError
9743
10304
  */
9744
- 403: ForbiddenError;
10305
+ 403: ForbiddenError | FlagDisabledError;
9745
10306
  /**
9746
10307
  * ResourceNotFoundError
9747
10308
  */
9748
10309
  404: ResourceNotFoundError;
10310
+ /**
10311
+ * ConflictError
10312
+ */
10313
+ 409: ConflictError;
9749
10314
  /**
9750
10315
  * ValidationError
9751
10316
  */
@@ -9763,26 +10328,116 @@ export type ContactsBulkImportErrors = {
9763
10328
  */
9764
10329
  504: GatewayTimeoutError;
9765
10330
  };
9766
- export type ContactsBulkImportError = ContactsBulkImportErrors[keyof ContactsBulkImportErrors];
9767
- export type ContactsBulkImportResponses = {
10331
+ export type ContactsStartImportError = ContactsStartImportErrors[keyof ContactsStartImportErrors];
10332
+ export type ContactsStartImportResponses = {
10333
+ /**
10334
+ * Success
10335
+ */
10336
+ 202: {
10337
+ id: ContactImportJobId;
10338
+ namespaceId: NamespaceId | null;
10339
+ topicId: TopicId;
10340
+ preset: "beehiiv" | "substack" | "kit" | "mailchimp";
10341
+ status: "queued" | "running" | "finalizing" | "completed" | "failed";
10342
+ generation: number;
10343
+ counts: {
10344
+ totalRows: number;
10345
+ uniqueAddresses: number;
10346
+ subscribed: number;
10347
+ unsubscribed: number;
10348
+ suppressed: number;
10349
+ skipped: number;
10350
+ conflicts: number;
10351
+ created: number;
10352
+ existing: number;
10353
+ };
10354
+ processedRows: number;
10355
+ totalRows: number;
10356
+ createdAt: string;
10357
+ startedAt: string | null;
10358
+ updatedAt: string;
10359
+ completedAt: string | null;
10360
+ failure: {
10361
+ code: string;
10362
+ message: string;
10363
+ retryable: boolean;
10364
+ } | null;
10365
+ resumable: boolean;
10366
+ };
10367
+ };
10368
+ export type ContactsStartImportResponse = ContactsStartImportResponses[keyof ContactsStartImportResponses];
10369
+ export type ContactsGetImportJobData = {
10370
+ body?: never;
10371
+ path: {
10372
+ id: ContactImportJobId;
10373
+ };
10374
+ query?: never;
10375
+ url: "/v1/contacts/imports/{id}";
10376
+ };
10377
+ export type ContactsGetImportJobErrors = {
10378
+ /**
10379
+ * UnauthorizedError
10380
+ */
10381
+ 401: UnauthorizedError;
10382
+ /**
10383
+ * ForbiddenError
10384
+ */
10385
+ 403: ForbiddenError;
10386
+ /**
10387
+ * ResourceNotFoundError
10388
+ */
10389
+ 404: ResourceNotFoundError;
10390
+ /**
10391
+ * ValidationError
10392
+ */
10393
+ 422: ValidationError;
10394
+ /**
10395
+ * InternalError
10396
+ */
10397
+ 500: InternalError;
10398
+ /**
10399
+ * GatewayTimeoutError
10400
+ */
10401
+ 504: GatewayTimeoutError;
10402
+ };
10403
+ export type ContactsGetImportJobError = ContactsGetImportJobErrors[keyof ContactsGetImportJobErrors];
10404
+ export type ContactsGetImportJobResponses = {
9768
10405
  /**
9769
10406
  * Success
9770
10407
  */
9771
10408
  200: {
9772
- total: number;
9773
- created: number;
9774
- updated: number;
9775
- skipped: number;
9776
- errors: number;
9777
- results: Array<{
9778
- index: number;
9779
- status: "created" | "updated" | "skipped" | "error";
9780
- contactId?: ContactId | null | undefined;
9781
- error?: string | null | undefined;
9782
- }>;
10409
+ id: ContactImportJobId;
10410
+ namespaceId: NamespaceId | null;
10411
+ topicId: TopicId;
10412
+ preset: "beehiiv" | "substack" | "kit" | "mailchimp";
10413
+ status: "queued" | "running" | "finalizing" | "completed" | "failed";
10414
+ generation: number;
10415
+ counts: {
10416
+ totalRows: number;
10417
+ uniqueAddresses: number;
10418
+ subscribed: number;
10419
+ unsubscribed: number;
10420
+ suppressed: number;
10421
+ skipped: number;
10422
+ conflicts: number;
10423
+ created: number;
10424
+ existing: number;
10425
+ };
10426
+ processedRows: number;
10427
+ totalRows: number;
10428
+ createdAt: string;
10429
+ startedAt: string | null;
10430
+ updatedAt: string;
10431
+ completedAt: string | null;
10432
+ failure: {
10433
+ code: string;
10434
+ message: string;
10435
+ retryable: boolean;
10436
+ } | null;
10437
+ resumable: boolean;
9783
10438
  };
9784
10439
  };
9785
- export type ContactsBulkImportResponse = ContactsBulkImportResponses[keyof ContactsBulkImportResponses];
10440
+ export type ContactsGetImportJobResponse = ContactsGetImportJobResponses[keyof ContactsGetImportJobResponses];
9786
10441
  export type ContactsBulkDeleteData = {
9787
10442
  body: {
9788
10443
  ids: [ContactId, ...Array<ContactId>];
@@ -9969,7 +10624,7 @@ export type ContactsGetActivityTimelineData = {
9969
10624
  id: ContactId;
9970
10625
  };
9971
10626
  query?: {
9972
- limit?: string | null | undefined;
10627
+ limit?: number | null | undefined;
9973
10628
  cursor?: Cursor | null | undefined;
9974
10629
  channel?: "email" | null | undefined;
9975
10630
  };
@@ -10015,7 +10670,7 @@ export type ContactsGetGroupMembershipsData = {
10015
10670
  id: ContactId;
10016
10671
  };
10017
10672
  query?: {
10018
- limit?: string | null | undefined;
10673
+ limit?: number | null | undefined;
10019
10674
  cursor?: Cursor | null | undefined;
10020
10675
  };
10021
10676
  url: "/v1/contacts/{id}/groups";
@@ -10160,7 +10815,7 @@ export type ContactEventsListEventsData = {
10160
10815
  id: ContactId;
10161
10816
  };
10162
10817
  query?: {
10163
- limit?: string | null | undefined;
10818
+ limit?: number | null | undefined;
10164
10819
  cursor?: Cursor | null | undefined;
10165
10820
  };
10166
10821
  url: "/v1/contacts/{id}/events";
@@ -10204,7 +10859,7 @@ export type JourneysListData = {
10204
10859
  path?: never;
10205
10860
  query?: {
10206
10861
  status?: JourneyStatus | null | undefined;
10207
- limit?: string | null | undefined;
10862
+ limit?: number | null | undefined;
10208
10863
  cursor?: Cursor | null | undefined;
10209
10864
  };
10210
10865
  url: "/v1/journeys";
@@ -10734,7 +11389,7 @@ export type JourneysStatsData = {
10734
11389
  id: JourneyId;
10735
11390
  };
10736
11391
  query?: {
10737
- version?: string | null | undefined;
11392
+ version?: number | null | undefined;
10738
11393
  };
10739
11394
  url: "/v1/journeys/{id}/stats";
10740
11395
  };
@@ -10780,7 +11435,7 @@ export type JourneysListRunsData = {
10780
11435
  query?: {
10781
11436
  status?: JourneyRunStatus | null | undefined;
10782
11437
  contactId?: ContactId | null | undefined;
10783
- limit?: string | null | undefined;
11438
+ limit?: number | null | undefined;
10784
11439
  cursor?: Cursor | null | undefined;
10785
11440
  };
10786
11441
  url: "/v1/journeys/{id}/runs";
@@ -10866,7 +11521,7 @@ export type AgentsListData = {
10866
11521
  body?: never;
10867
11522
  path?: never;
10868
11523
  query?: {
10869
- limit?: string | null | undefined;
11524
+ limit?: number | null | undefined;
10870
11525
  cursor?: Cursor | null | undefined;
10871
11526
  };
10872
11527
  url: "/v1/agents";
@@ -11182,7 +11837,7 @@ export type AgentsListVersionsData = {
11182
11837
  id: AgentId;
11183
11838
  };
11184
11839
  query?: {
11185
- limit?: string | null | undefined;
11840
+ limit?: number | null | undefined;
11186
11841
  cursor?: VersionCursor | null | undefined;
11187
11842
  };
11188
11843
  url: "/v1/agents/{id}/versions";
@@ -11270,7 +11925,7 @@ export type SubscriptionsSubscribeData = {
11270
11925
  * The recipient email address; confirmation proves consent for this address.
11271
11926
  */
11272
11927
  email: string;
11273
- contactGroupId: ContactGroupId;
11928
+ topicId: TopicId;
11274
11929
  /**
11275
11930
  * Your verified email sender. The ordinary send pipeline selects its domain and customer brand.
11276
11931
  */
@@ -11278,10 +11933,6 @@ export type SubscriptionsSubscribeData = {
11278
11933
  email: string;
11279
11934
  name?: string | null | undefined;
11280
11935
  };
11281
- /**
11282
- * Clear this unsubscribe group after confirmation; all other opt-outs remain.
11283
- */
11284
- unsubscribeGroupId?: UnsubscribeId | null | undefined;
11285
11936
  templateSlug?: string | null | undefined;
11286
11937
  consentIp?: string | null | undefined;
11287
11938
  consentSource?: string | null | undefined;
@@ -11348,10 +11999,10 @@ export type ContactGroupsListData = {
11348
11999
  body?: never;
11349
12000
  path?: never;
11350
12001
  query?: {
11351
- limit?: string | null | undefined;
12002
+ limit?: number | null | undefined;
11352
12003
  cursor?: Cursor | null | undefined;
11353
12004
  type?: "static" | "dynamic" | "smart" | Array<"static" | "dynamic" | "smart"> | null | undefined;
11354
- isActive?: string | null | undefined;
12005
+ isActive?: boolean | null | undefined;
11355
12006
  };
11356
12007
  url: "/v1/contact-groups";
11357
12008
  };
@@ -11683,7 +12334,7 @@ export type ContactGroupsGetMembersData = {
11683
12334
  id: ContactGroupId;
11684
12335
  };
11685
12336
  query?: {
11686
- limit?: string | null | undefined;
12337
+ limit?: number | null | undefined;
11687
12338
  cursor?: Cursor | null | undefined;
11688
12339
  };
11689
12340
  url: "/v1/contact-groups/{id}/members";
@@ -11880,11 +12531,265 @@ export type CustomFieldsListErrors = {
11880
12531
  /**
11881
12532
  * UnauthorizedError
11882
12533
  */
11883
- 401: UnauthorizedError;
12534
+ 401: UnauthorizedError;
12535
+ /**
12536
+ * ForbiddenError
12537
+ */
12538
+ 403: ForbiddenError;
12539
+ /**
12540
+ * ValidationError
12541
+ */
12542
+ 422: ValidationError;
12543
+ /**
12544
+ * InternalError
12545
+ */
12546
+ 500: InternalError;
12547
+ /**
12548
+ * GatewayTimeoutError
12549
+ */
12550
+ 504: GatewayTimeoutError;
12551
+ };
12552
+ export type CustomFieldsListError = CustomFieldsListErrors[keyof CustomFieldsListErrors];
12553
+ export type CustomFieldsListResponses = {
12554
+ /**
12555
+ * CustomFieldList
12556
+ */
12557
+ 200: CustomFieldList;
12558
+ };
12559
+ export type CustomFieldsListResponse = CustomFieldsListResponses[keyof CustomFieldsListResponses];
12560
+ export type CustomFieldsCreateData = {
12561
+ body: {
12562
+ key: string;
12563
+ label: string;
12564
+ type: "text" | "number" | "boolean" | "date" | "select";
12565
+ options?: Array<string> | null | undefined;
12566
+ defaultValue?: string | null | null | undefined;
12567
+ isRequired?: boolean | null | undefined;
12568
+ sortOrder?: number | null | undefined;
12569
+ };
12570
+ path?: never;
12571
+ query?: never;
12572
+ url: "/v1/custom-fields";
12573
+ };
12574
+ export type CustomFieldsCreateErrors = {
12575
+ /**
12576
+ * UnauthorizedError
12577
+ */
12578
+ 401: UnauthorizedError;
12579
+ /**
12580
+ * ForbiddenError
12581
+ */
12582
+ 403: ForbiddenError;
12583
+ /**
12584
+ * ConflictError
12585
+ */
12586
+ 409: ConflictError;
12587
+ /**
12588
+ * ValidationError
12589
+ */
12590
+ 422: ValidationError;
12591
+ /**
12592
+ * InternalError
12593
+ */
12594
+ 500: InternalError;
12595
+ /**
12596
+ * GatewayTimeoutError
12597
+ */
12598
+ 504: GatewayTimeoutError;
12599
+ };
12600
+ export type CustomFieldsCreateError = CustomFieldsCreateErrors[keyof CustomFieldsCreateErrors];
12601
+ export type CustomFieldsCreateResponses = {
12602
+ /**
12603
+ * Success
12604
+ */
12605
+ 201: {
12606
+ id: CustomFieldDefinitionId;
12607
+ organizationId: OrganizationId;
12608
+ key: string;
12609
+ label: string;
12610
+ type: "text" | "number" | "boolean" | "date" | "select";
12611
+ options: Array<string> | null;
12612
+ defaultValue: string | null;
12613
+ isRequired: boolean;
12614
+ sortOrder: number;
12615
+ createdAt: string;
12616
+ updatedAt: string;
12617
+ };
12618
+ };
12619
+ export type CustomFieldsCreateResponse = CustomFieldsCreateResponses[keyof CustomFieldsCreateResponses];
12620
+ export type CustomFieldsRemoveData = {
12621
+ body?: never;
12622
+ path: {
12623
+ id: CustomFieldDefinitionId;
12624
+ };
12625
+ query?: never;
12626
+ url: "/v1/custom-fields/{id}";
12627
+ };
12628
+ export type CustomFieldsRemoveErrors = {
12629
+ /**
12630
+ * UnauthorizedError
12631
+ */
12632
+ 401: UnauthorizedError;
12633
+ /**
12634
+ * ForbiddenError
12635
+ */
12636
+ 403: ForbiddenError;
12637
+ /**
12638
+ * ResourceNotFoundError
12639
+ */
12640
+ 404: ResourceNotFoundError;
12641
+ /**
12642
+ * ValidationError
12643
+ */
12644
+ 422: ValidationError;
12645
+ /**
12646
+ * InternalError
12647
+ */
12648
+ 500: InternalError;
12649
+ /**
12650
+ * GatewayTimeoutError
12651
+ */
12652
+ 504: GatewayTimeoutError;
12653
+ };
12654
+ export type CustomFieldsRemoveError = CustomFieldsRemoveErrors[keyof CustomFieldsRemoveErrors];
12655
+ export type CustomFieldsRemoveResponses = {
12656
+ /**
12657
+ * Success
12658
+ */
12659
+ 200: {
12660
+ success: boolean;
12661
+ };
12662
+ };
12663
+ export type CustomFieldsRemoveResponse = CustomFieldsRemoveResponses[keyof CustomFieldsRemoveResponses];
12664
+ export type CustomFieldsUpdateData = {
12665
+ body: {
12666
+ label?: string | null | undefined;
12667
+ options?: Array<string> | null | undefined;
12668
+ defaultValue?: string | null | null | undefined;
12669
+ isRequired?: boolean | null | undefined;
12670
+ sortOrder?: number | null | undefined;
12671
+ };
12672
+ path: {
12673
+ id: CustomFieldDefinitionId;
12674
+ };
12675
+ query?: never;
12676
+ url: "/v1/custom-fields/{id}";
12677
+ };
12678
+ export type CustomFieldsUpdateErrors = {
12679
+ /**
12680
+ * UnauthorizedError
12681
+ */
12682
+ 401: UnauthorizedError;
12683
+ /**
12684
+ * ForbiddenError
12685
+ */
12686
+ 403: ForbiddenError;
12687
+ /**
12688
+ * ResourceNotFoundError
12689
+ */
12690
+ 404: ResourceNotFoundError;
12691
+ /**
12692
+ * ValidationError
12693
+ */
12694
+ 422: ValidationError;
12695
+ /**
12696
+ * InternalError
12697
+ */
12698
+ 500: InternalError;
12699
+ /**
12700
+ * GatewayTimeoutError
12701
+ */
12702
+ 504: GatewayTimeoutError;
12703
+ };
12704
+ export type CustomFieldsUpdateError = CustomFieldsUpdateErrors[keyof CustomFieldsUpdateErrors];
12705
+ export type CustomFieldsUpdateResponses = {
12706
+ /**
12707
+ * Success
12708
+ */
12709
+ 200: {
12710
+ id: CustomFieldDefinitionId;
12711
+ organizationId: OrganizationId;
12712
+ key: string;
12713
+ label: string;
12714
+ type: "text" | "number" | "boolean" | "date" | "select";
12715
+ options: Array<string> | null;
12716
+ defaultValue: string | null;
12717
+ isRequired: boolean;
12718
+ sortOrder: number;
12719
+ createdAt: string;
12720
+ updatedAt: string;
12721
+ };
12722
+ };
12723
+ export type CustomFieldsUpdateResponse = CustomFieldsUpdateResponses[keyof CustomFieldsUpdateResponses];
12724
+ export type TopicsListData = {
12725
+ body?: never;
12726
+ path?: never;
12727
+ query?: {
12728
+ namespaceId?: NamespaceId | null | undefined;
12729
+ };
12730
+ url: "/v1/topics";
12731
+ };
12732
+ export type TopicsListErrors = {
12733
+ /**
12734
+ * UnauthorizedError
12735
+ */
12736
+ 401: UnauthorizedError;
12737
+ /**
12738
+ * ForbiddenError
12739
+ */
12740
+ 403: ForbiddenError;
12741
+ /**
12742
+ * ValidationError
12743
+ */
12744
+ 422: ValidationError;
12745
+ /**
12746
+ * InternalError
12747
+ */
12748
+ 500: InternalError;
12749
+ /**
12750
+ * GatewayTimeoutError
12751
+ */
12752
+ 504: GatewayTimeoutError;
12753
+ };
12754
+ export type TopicsListError = TopicsListErrors[keyof TopicsListErrors];
12755
+ export type TopicsListResponses = {
12756
+ /**
12757
+ * TopicList
12758
+ */
12759
+ 200: TopicList;
12760
+ };
12761
+ export type TopicsListResponse = TopicsListResponses[keyof TopicsListResponses];
12762
+ export type TopicsCreateData = {
12763
+ body: {
12764
+ name: string;
12765
+ description?: string | null | null | undefined;
12766
+ namespaceId?: NamespaceId | null | null | undefined;
12767
+ default?: "opt_out" | "opt_in" | null | undefined;
12768
+ defaultSenderId?: EmailSenderId | null | null | undefined;
12769
+ replyMailboxId?: MailboxId | null | null | undefined;
12770
+ templateId?: TemplateId | null | null | undefined;
12771
+ };
12772
+ path?: never;
12773
+ query?: never;
12774
+ url: "/v1/topics";
12775
+ };
12776
+ export type TopicsCreateErrors = {
12777
+ /**
12778
+ * UnauthorizedError
12779
+ */
12780
+ 401: UnauthorizedError;
12781
+ /**
12782
+ * ForbiddenError
12783
+ */
12784
+ 403: ForbiddenError;
12785
+ /**
12786
+ * ResourceNotFoundError
12787
+ */
12788
+ 404: ResourceNotFoundError;
11884
12789
  /**
11885
- * ForbiddenError
12790
+ * ConflictError
11886
12791
  */
11887
- 403: ForbiddenError;
12792
+ 409: ConflictError;
11888
12793
  /**
11889
12794
  * ValidationError
11890
12795
  */
@@ -11898,29 +12803,28 @@ export type CustomFieldsListErrors = {
11898
12803
  */
11899
12804
  504: GatewayTimeoutError;
11900
12805
  };
11901
- export type CustomFieldsListError = CustomFieldsListErrors[keyof CustomFieldsListErrors];
11902
- export type CustomFieldsListResponses = {
12806
+ export type TopicsCreateError = TopicsCreateErrors[keyof TopicsCreateErrors];
12807
+ export type TopicsCreateResponses = {
11903
12808
  /**
11904
- * CustomFieldList
12809
+ * Topic
11905
12810
  */
11906
- 200: CustomFieldList;
12811
+ 201: Topic;
11907
12812
  };
11908
- export type CustomFieldsListResponse = CustomFieldsListResponses[keyof CustomFieldsListResponses];
11909
- export type CustomFieldsCreateData = {
11910
- body: {
11911
- key: string;
11912
- label: string;
11913
- type: "text" | "number" | "boolean" | "date" | "select";
11914
- options?: Array<string> | null | undefined;
11915
- defaultValue?: string | null | null | undefined;
11916
- isRequired?: boolean | null | undefined;
11917
- sortOrder?: number | null | undefined;
11918
- };
12813
+ export type TopicsCreateResponse = TopicsCreateResponses[keyof TopicsCreateResponses];
12814
+ export type TopicsCheckSubscriptionData = {
12815
+ body?: never;
11919
12816
  path?: never;
11920
- query?: never;
11921
- url: "/v1/custom-fields";
12817
+ query: {
12818
+ contactId?: ContactId | null | undefined;
12819
+ email?: string | null | undefined;
12820
+ phone?: string | null | undefined;
12821
+ namespaceId?: NamespaceId | null | undefined;
12822
+ channel: "email";
12823
+ topicIds?: string | null | undefined;
12824
+ };
12825
+ url: "/v1/topics/check";
11922
12826
  };
11923
- export type CustomFieldsCreateErrors = {
12827
+ export type TopicsCheckSubscriptionErrors = {
11924
12828
  /**
11925
12829
  * UnauthorizedError
11926
12830
  */
@@ -11930,9 +12834,9 @@ export type CustomFieldsCreateErrors = {
11930
12834
  */
11931
12835
  403: ForbiddenError;
11932
12836
  /**
11933
- * ConflictError
12837
+ * ResourceNotFoundError
11934
12838
  */
11935
- 409: ConflictError;
12839
+ 404: ResourceNotFoundError;
11936
12840
  /**
11937
12841
  * ValidationError
11938
12842
  */
@@ -11946,35 +12850,23 @@ export type CustomFieldsCreateErrors = {
11946
12850
  */
11947
12851
  504: GatewayTimeoutError;
11948
12852
  };
11949
- export type CustomFieldsCreateError = CustomFieldsCreateErrors[keyof CustomFieldsCreateErrors];
11950
- export type CustomFieldsCreateResponses = {
12853
+ export type TopicsCheckSubscriptionError = TopicsCheckSubscriptionErrors[keyof TopicsCheckSubscriptionErrors];
12854
+ export type TopicsCheckSubscriptionResponses = {
11951
12855
  /**
11952
- * Success
12856
+ * TopicSubscriptionCheck
11953
12857
  */
11954
- 201: {
11955
- id: CustomFieldDefinitionId;
11956
- organizationId: OrganizationId;
11957
- key: string;
11958
- label: string;
11959
- type: "text" | "number" | "boolean" | "date" | "select";
11960
- options: Array<string> | null;
11961
- defaultValue: string | null;
11962
- isRequired: boolean;
11963
- sortOrder: number;
11964
- createdAt: string;
11965
- updatedAt: string;
11966
- };
12858
+ 200: TopicSubscriptionCheck;
11967
12859
  };
11968
- export type CustomFieldsCreateResponse = CustomFieldsCreateResponses[keyof CustomFieldsCreateResponses];
11969
- export type CustomFieldsRemoveData = {
12860
+ export type TopicsCheckSubscriptionResponse = TopicsCheckSubscriptionResponses[keyof TopicsCheckSubscriptionResponses];
12861
+ export type TopicsRemoveData = {
11970
12862
  body?: never;
11971
12863
  path: {
11972
- id: CustomFieldDefinitionId;
12864
+ id: TopicId;
11973
12865
  };
11974
12866
  query?: never;
11975
- url: "/v1/custom-fields/{id}";
12867
+ url: "/v1/topics/{id}";
11976
12868
  };
11977
- export type CustomFieldsRemoveErrors = {
12869
+ export type TopicsRemoveErrors = {
11978
12870
  /**
11979
12871
  * UnauthorizedError
11980
12872
  */
@@ -11987,6 +12879,10 @@ export type CustomFieldsRemoveErrors = {
11987
12879
  * ResourceNotFoundError
11988
12880
  */
11989
12881
  404: ResourceNotFoundError;
12882
+ /**
12883
+ * ConflictError
12884
+ */
12885
+ 409: ConflictError;
11990
12886
  /**
11991
12887
  * ValidationError
11992
12888
  */
@@ -12000,8 +12896,8 @@ export type CustomFieldsRemoveErrors = {
12000
12896
  */
12001
12897
  504: GatewayTimeoutError;
12002
12898
  };
12003
- export type CustomFieldsRemoveError = CustomFieldsRemoveErrors[keyof CustomFieldsRemoveErrors];
12004
- export type CustomFieldsRemoveResponses = {
12899
+ export type TopicsRemoveError = TopicsRemoveErrors[keyof TopicsRemoveErrors];
12900
+ export type TopicsRemoveResponses = {
12005
12901
  /**
12006
12902
  * Success
12007
12903
  */
@@ -12009,22 +12905,16 @@ export type CustomFieldsRemoveResponses = {
12009
12905
  success: boolean;
12010
12906
  };
12011
12907
  };
12012
- export type CustomFieldsRemoveResponse = CustomFieldsRemoveResponses[keyof CustomFieldsRemoveResponses];
12013
- export type CustomFieldsUpdateData = {
12014
- body: {
12015
- label?: string | null | undefined;
12016
- options?: Array<string> | null | undefined;
12017
- defaultValue?: string | null | null | undefined;
12018
- isRequired?: boolean | null | undefined;
12019
- sortOrder?: number | null | undefined;
12020
- };
12908
+ export type TopicsRemoveResponse = TopicsRemoveResponses[keyof TopicsRemoveResponses];
12909
+ export type TopicsGetData = {
12910
+ body?: never;
12021
12911
  path: {
12022
- id: CustomFieldDefinitionId;
12912
+ id: TopicId;
12023
12913
  };
12024
12914
  query?: never;
12025
- url: "/v1/custom-fields/{id}";
12915
+ url: "/v1/topics/{id}";
12026
12916
  };
12027
- export type CustomFieldsUpdateErrors = {
12917
+ export type TopicsGetErrors = {
12028
12918
  /**
12029
12919
  * UnauthorizedError
12030
12920
  */
@@ -12050,33 +12940,30 @@ export type CustomFieldsUpdateErrors = {
12050
12940
  */
12051
12941
  504: GatewayTimeoutError;
12052
12942
  };
12053
- export type CustomFieldsUpdateError = CustomFieldsUpdateErrors[keyof CustomFieldsUpdateErrors];
12054
- export type CustomFieldsUpdateResponses = {
12943
+ export type TopicsGetError = TopicsGetErrors[keyof TopicsGetErrors];
12944
+ export type TopicsGetResponses = {
12055
12945
  /**
12056
- * Success
12946
+ * Topic
12057
12947
  */
12058
- 200: {
12059
- id: CustomFieldDefinitionId;
12060
- organizationId: OrganizationId;
12061
- key: string;
12062
- label: string;
12063
- type: "text" | "number" | "boolean" | "date" | "select";
12064
- options: Array<string> | null;
12065
- defaultValue: string | null;
12066
- isRequired: boolean;
12067
- sortOrder: number;
12068
- createdAt: string;
12069
- updatedAt: string;
12070
- };
12948
+ 200: Topic;
12071
12949
  };
12072
- export type CustomFieldsUpdateResponse = CustomFieldsUpdateResponses[keyof CustomFieldsUpdateResponses];
12073
- export type UnsubscribeListData = {
12074
- body?: never;
12075
- path?: never;
12950
+ export type TopicsGetResponse = TopicsGetResponses[keyof TopicsGetResponses];
12951
+ export type TopicsUpdateData = {
12952
+ body: {
12953
+ name?: string | null | undefined;
12954
+ description?: string | null | null | undefined;
12955
+ default?: "opt_out" | "opt_in" | null | undefined;
12956
+ defaultSenderId?: EmailSenderId | null | null | undefined;
12957
+ replyMailboxId?: MailboxId | null | null | undefined;
12958
+ templateId?: TemplateId | null | null | undefined;
12959
+ };
12960
+ path: {
12961
+ id: TopicId;
12962
+ };
12076
12963
  query?: never;
12077
- url: "/v1/unsubscribe-groups";
12964
+ url: "/v1/topics/{id}";
12078
12965
  };
12079
- export type UnsubscribeListErrors = {
12966
+ export type TopicsUpdateErrors = {
12080
12967
  /**
12081
12968
  * UnauthorizedError
12082
12969
  */
@@ -12085,6 +12972,10 @@ export type UnsubscribeListErrors = {
12085
12972
  * ForbiddenError
12086
12973
  */
12087
12974
  403: ForbiddenError;
12975
+ /**
12976
+ * ResourceNotFoundError
12977
+ */
12978
+ 404: ResourceNotFoundError;
12088
12979
  /**
12089
12980
  * ValidationError
12090
12981
  */
@@ -12098,24 +12989,23 @@ export type UnsubscribeListErrors = {
12098
12989
  */
12099
12990
  504: GatewayTimeoutError;
12100
12991
  };
12101
- export type UnsubscribeListError = UnsubscribeListErrors[keyof UnsubscribeListErrors];
12102
- export type UnsubscribeListResponses = {
12992
+ export type TopicsUpdateError = TopicsUpdateErrors[keyof TopicsUpdateErrors];
12993
+ export type TopicsUpdateResponses = {
12103
12994
  /**
12104
- * UnsubscribeGroupList
12995
+ * Topic
12105
12996
  */
12106
- 200: UnsubscribeGroupList;
12997
+ 200: Topic;
12107
12998
  };
12108
- export type UnsubscribeListResponse = UnsubscribeListResponses[keyof UnsubscribeListResponses];
12109
- export type UnsubscribeCreateData = {
12110
- body: {
12111
- name: string;
12112
- description?: string | null | null | undefined;
12999
+ export type TopicsUpdateResponse = TopicsUpdateResponses[keyof TopicsUpdateResponses];
13000
+ export type TopicsSetDefaultData = {
13001
+ body?: never;
13002
+ path: {
13003
+ id: TopicId;
12113
13004
  };
12114
- path?: never;
12115
13005
  query?: never;
12116
- url: "/v1/unsubscribe-groups";
13006
+ url: "/v1/topics/{id}/default";
12117
13007
  };
12118
- export type UnsubscribeCreateErrors = {
13008
+ export type TopicsSetDefaultErrors = {
12119
13009
  /**
12120
13010
  * UnauthorizedError
12121
13011
  */
@@ -12125,9 +13015,9 @@ export type UnsubscribeCreateErrors = {
12125
13015
  */
12126
13016
  403: ForbiddenError;
12127
13017
  /**
12128
- * ConflictError
13018
+ * ResourceNotFoundError
12129
13019
  */
12130
- 409: ConflictError;
13020
+ 404: ResourceNotFoundError;
12131
13021
  /**
12132
13022
  * ValidationError
12133
13023
  */
@@ -12141,32 +13031,28 @@ export type UnsubscribeCreateErrors = {
12141
13031
  */
12142
13032
  504: GatewayTimeoutError;
12143
13033
  };
12144
- export type UnsubscribeCreateError = UnsubscribeCreateErrors[keyof UnsubscribeCreateErrors];
12145
- export type UnsubscribeCreateResponses = {
13034
+ export type TopicsSetDefaultError = TopicsSetDefaultErrors[keyof TopicsSetDefaultErrors];
13035
+ export type TopicsSetDefaultResponses = {
12146
13036
  /**
12147
- * Success
13037
+ * Topic
12148
13038
  */
12149
- 201: {
12150
- id: UnsubscribeId;
12151
- organizationId: string;
12152
- name: string;
12153
- description: string | null;
12154
- isDefault: boolean;
12155
- memberCount: number;
12156
- createdAt: string;
12157
- updatedAt: string;
12158
- };
13039
+ 200: Topic;
12159
13040
  };
12160
- export type UnsubscribeCreateResponse = UnsubscribeCreateResponses[keyof UnsubscribeCreateResponses];
12161
- export type UnsubscribeRemoveData = {
13041
+ export type TopicsSetDefaultResponse = TopicsSetDefaultResponses[keyof TopicsSetDefaultResponses];
13042
+ export type TopicsListSubscriptionsData = {
12162
13043
  body?: never;
12163
13044
  path: {
12164
- id: UnsubscribeId;
13045
+ id: TopicId;
12165
13046
  };
12166
- query?: never;
12167
- url: "/v1/unsubscribe-groups/{id}";
13047
+ query?: {
13048
+ limit?: number | null | undefined;
13049
+ cursor?: Cursor | null | undefined;
13050
+ channel?: "email" | null | undefined;
13051
+ status?: "subscribed" | "unsubscribed" | null | undefined;
13052
+ };
13053
+ url: "/v1/topics/{id}/subscriptions";
12168
13054
  };
12169
- export type UnsubscribeRemoveErrors = {
13055
+ export type TopicsListSubscriptionsErrors = {
12170
13056
  /**
12171
13057
  * UnauthorizedError
12172
13058
  */
@@ -12179,10 +13065,6 @@ export type UnsubscribeRemoveErrors = {
12179
13065
  * ResourceNotFoundError
12180
13066
  */
12181
13067
  404: ResourceNotFoundError;
12182
- /**
12183
- * ConflictError
12184
- */
12185
- 409: ConflictError;
12186
13068
  /**
12187
13069
  * ValidationError
12188
13070
  */
@@ -12196,32 +13078,36 @@ export type UnsubscribeRemoveErrors = {
12196
13078
  */
12197
13079
  504: GatewayTimeoutError;
12198
13080
  };
12199
- export type UnsubscribeRemoveError = UnsubscribeRemoveErrors[keyof UnsubscribeRemoveErrors];
12200
- export type UnsubscribeRemoveResponses = {
13081
+ export type TopicsListSubscriptionsError = TopicsListSubscriptionsErrors[keyof TopicsListSubscriptionsErrors];
13082
+ export type TopicsListSubscriptionsResponses = {
12201
13083
  /**
12202
- * Success
13084
+ * TopicSubscriptionPage
12203
13085
  */
12204
- 200: {
12205
- success: boolean;
12206
- };
13086
+ 200: TopicSubscriptionPage;
12207
13087
  };
12208
- export type UnsubscribeRemoveResponse = UnsubscribeRemoveResponses[keyof UnsubscribeRemoveResponses];
12209
- export type UnsubscribeUpdateData = {
13088
+ export type TopicsListSubscriptionsResponse = TopicsListSubscriptionsResponses[keyof TopicsListSubscriptionsResponses];
13089
+ export type TopicsSetSubscriptionsData = {
12210
13090
  body: {
12211
- name?: string | null | undefined;
12212
- description?: string | null | null | undefined;
13091
+ contacts: Array<TopicContactRef>;
13092
+ channel: "email";
13093
+ status: "subscribed" | "unsubscribed";
13094
+ source?: string | null | undefined;
12213
13095
  };
12214
13096
  path: {
12215
- id: UnsubscribeId;
13097
+ id: TopicId;
12216
13098
  };
12217
13099
  query?: never;
12218
- url: "/v1/unsubscribe-groups/{id}";
13100
+ url: "/v1/topics/{id}/subscriptions";
12219
13101
  };
12220
- export type UnsubscribeUpdateErrors = {
13102
+ export type TopicsSetSubscriptionsErrors = {
12221
13103
  /**
12222
13104
  * UnauthorizedError
12223
13105
  */
12224
13106
  401: UnauthorizedError;
13107
+ /**
13108
+ * PaymentRequiredError
13109
+ */
13110
+ 402: PaymentRequiredError;
12225
13111
  /**
12226
13112
  * ForbiddenError
12227
13113
  */
@@ -12238,45 +13124,40 @@ export type UnsubscribeUpdateErrors = {
12238
13124
  * InternalError
12239
13125
  */
12240
13126
  500: InternalError;
13127
+ /**
13128
+ * BillingProviderError
13129
+ */
13130
+ 502: BillingProviderError;
12241
13131
  /**
12242
13132
  * GatewayTimeoutError
12243
13133
  */
12244
13134
  504: GatewayTimeoutError;
12245
13135
  };
12246
- export type UnsubscribeUpdateError = UnsubscribeUpdateErrors[keyof UnsubscribeUpdateErrors];
12247
- export type UnsubscribeUpdateResponses = {
13136
+ export type TopicsSetSubscriptionsError = TopicsSetSubscriptionsErrors[keyof TopicsSetSubscriptionsErrors];
13137
+ export type TopicsSetSubscriptionsResponses = {
12248
13138
  /**
12249
- * Success
13139
+ * TopicSetSubscriptionsResult
12250
13140
  */
12251
- 200: {
12252
- id: UnsubscribeId;
12253
- organizationId: string;
12254
- name: string;
12255
- description: string | null;
12256
- isDefault: boolean;
12257
- memberCount: number;
12258
- createdAt: string;
12259
- updatedAt: string;
12260
- };
13141
+ 200: TopicSetSubscriptionsResult;
12261
13142
  };
12262
- export type UnsubscribeUpdateResponse = UnsubscribeUpdateResponses[keyof UnsubscribeUpdateResponses];
12263
- export type UnsubscribeSetDefaultData = {
13143
+ export type TopicsSetSubscriptionsResponse = TopicsSetSubscriptionsResponses[keyof TopicsSetSubscriptionsResponses];
13144
+ export type TopicFormsListData = {
12264
13145
  body?: never;
12265
13146
  path: {
12266
- id: UnsubscribeId;
13147
+ id: TopicId;
12267
13148
  };
12268
13149
  query?: never;
12269
- url: "/v1/unsubscribe-groups/{id}/default";
13150
+ url: "/v1/topics/{id}/forms";
12270
13151
  };
12271
- export type UnsubscribeSetDefaultErrors = {
13152
+ export type TopicFormsListErrors = {
12272
13153
  /**
12273
13154
  * UnauthorizedError
12274
13155
  */
12275
13156
  401: UnauthorizedError;
12276
13157
  /**
12277
- * ForbiddenError
13158
+ * ForbiddenError | FlagDisabledError
12278
13159
  */
12279
- 403: ForbiddenError;
13160
+ 403: ForbiddenError | FlagDisabledError;
12280
13161
  /**
12281
13162
  * ResourceNotFoundError
12282
13163
  */
@@ -12294,42 +13175,40 @@ export type UnsubscribeSetDefaultErrors = {
12294
13175
  */
12295
13176
  504: GatewayTimeoutError;
12296
13177
  };
12297
- export type UnsubscribeSetDefaultError = UnsubscribeSetDefaultErrors[keyof UnsubscribeSetDefaultErrors];
12298
- export type UnsubscribeSetDefaultResponses = {
13178
+ export type TopicFormsListError = TopicFormsListErrors[keyof TopicFormsListErrors];
13179
+ export type TopicFormsListResponses = {
12299
13180
  /**
12300
13181
  * Success
12301
13182
  */
12302
13183
  200: {
12303
- id: UnsubscribeId;
12304
- organizationId: string;
12305
- name: string;
12306
- description: string | null;
12307
- isDefault: boolean;
12308
- memberCount: number;
12309
- createdAt: string;
12310
- updatedAt: string;
13184
+ items: Array<TopicForm>;
12311
13185
  };
12312
13186
  };
12313
- export type UnsubscribeSetDefaultResponse = UnsubscribeSetDefaultResponses[keyof UnsubscribeSetDefaultResponses];
12314
- export type UnsubscribeRemoveMembersData = {
13187
+ export type TopicFormsListResponse = TopicFormsListResponses[keyof TopicFormsListResponses];
13188
+ export type TopicFormsCreateData = {
12315
13189
  body: {
12316
- members: Array<UnsubscribeGroupMemberRef>;
13190
+ allowedOrigins: Array<string>;
13191
+ confirmationTitle: string;
13192
+ confirmationMessage: string;
13193
+ successTitle: string;
13194
+ successMessage: string;
13195
+ redirectUrl: string | null;
12317
13196
  };
12318
13197
  path: {
12319
- id: UnsubscribeId;
13198
+ id: TopicId;
12320
13199
  };
12321
13200
  query?: never;
12322
- url: "/v1/unsubscribe-groups/{id}/members";
13201
+ url: "/v1/topics/{id}/forms";
12323
13202
  };
12324
- export type UnsubscribeRemoveMembersErrors = {
13203
+ export type TopicFormsCreateErrors = {
12325
13204
  /**
12326
13205
  * UnauthorizedError
12327
13206
  */
12328
13207
  401: UnauthorizedError;
12329
13208
  /**
12330
- * ForbiddenError
13209
+ * ForbiddenError | FlagDisabledError
12331
13210
  */
12332
- 403: ForbiddenError;
13211
+ 403: ForbiddenError | FlagDisabledError;
12333
13212
  /**
12334
13213
  * ResourceNotFoundError
12335
13214
  */
@@ -12347,36 +13226,32 @@ export type UnsubscribeRemoveMembersErrors = {
12347
13226
  */
12348
13227
  504: GatewayTimeoutError;
12349
13228
  };
12350
- export type UnsubscribeRemoveMembersError = UnsubscribeRemoveMembersErrors[keyof UnsubscribeRemoveMembersErrors];
12351
- export type UnsubscribeRemoveMembersResponses = {
13229
+ export type TopicFormsCreateError = TopicFormsCreateErrors[keyof TopicFormsCreateErrors];
13230
+ export type TopicFormsCreateResponses = {
12352
13231
  /**
12353
- * Success
13232
+ * TopicForm
12354
13233
  */
12355
- 200: {
12356
- removed: number;
12357
- };
13234
+ 201: TopicForm;
12358
13235
  };
12359
- export type UnsubscribeRemoveMembersResponse = UnsubscribeRemoveMembersResponses[keyof UnsubscribeRemoveMembersResponses];
12360
- export type UnsubscribeListMembersData = {
13236
+ export type TopicFormsCreateResponse = TopicFormsCreateResponses[keyof TopicFormsCreateResponses];
13237
+ export type TopicFormsRemoveData = {
12361
13238
  body?: never;
12362
13239
  path: {
12363
- id: UnsubscribeId;
13240
+ id: TopicId;
13241
+ formId: string;
12364
13242
  };
12365
- query?: {
12366
- limit?: string | null | undefined;
12367
- cursor?: Cursor | null | undefined;
12368
- };
12369
- url: "/v1/unsubscribe-groups/{id}/members";
13243
+ query?: never;
13244
+ url: "/v1/topics/{id}/forms/{formId}";
12370
13245
  };
12371
- export type UnsubscribeListMembersErrors = {
13246
+ export type TopicFormsRemoveErrors = {
12372
13247
  /**
12373
13248
  * UnauthorizedError
12374
13249
  */
12375
13250
  401: UnauthorizedError;
12376
13251
  /**
12377
- * ForbiddenError
13252
+ * ForbiddenError | FlagDisabledError
12378
13253
  */
12379
- 403: ForbiddenError;
13254
+ 403: ForbiddenError | FlagDisabledError;
12380
13255
  /**
12381
13256
  * ResourceNotFoundError
12382
13257
  */
@@ -12394,38 +13269,34 @@ export type UnsubscribeListMembersErrors = {
12394
13269
  */
12395
13270
  504: GatewayTimeoutError;
12396
13271
  };
12397
- export type UnsubscribeListMembersError = UnsubscribeListMembersErrors[keyof UnsubscribeListMembersErrors];
12398
- export type UnsubscribeListMembersResponses = {
13272
+ export type TopicFormsRemoveError = TopicFormsRemoveErrors[keyof TopicFormsRemoveErrors];
13273
+ export type TopicFormsRemoveResponses = {
12399
13274
  /**
12400
- * UnsubscribeGroupMemberPage
13275
+ * Success
12401
13276
  */
12402
- 200: UnsubscribeGroupMemberPage;
12403
- };
12404
- export type UnsubscribeListMembersResponse = UnsubscribeListMembersResponses[keyof UnsubscribeListMembersResponses];
12405
- export type UnsubscribeAddMembersData = {
12406
- body: {
12407
- members: Array<UnsubscribeGroupMemberRef>;
12408
- source?: "link" | "api" | "manual" | "complaint" | null | undefined;
13277
+ 200: {
13278
+ success: boolean;
12409
13279
  };
13280
+ };
13281
+ export type TopicFormsRemoveResponse = TopicFormsRemoveResponses[keyof TopicFormsRemoveResponses];
13282
+ export type TopicFormsGetData = {
13283
+ body?: never;
12410
13284
  path: {
12411
- id: UnsubscribeId;
13285
+ id: TopicId;
13286
+ formId: string;
12412
13287
  };
12413
13288
  query?: never;
12414
- url: "/v1/unsubscribe-groups/{id}/members";
13289
+ url: "/v1/topics/{id}/forms/{formId}";
12415
13290
  };
12416
- export type UnsubscribeAddMembersErrors = {
13291
+ export type TopicFormsGetErrors = {
12417
13292
  /**
12418
13293
  * UnauthorizedError
12419
13294
  */
12420
13295
  401: UnauthorizedError;
12421
13296
  /**
12422
- * PaymentRequiredError
12423
- */
12424
- 402: PaymentRequiredError;
12425
- /**
12426
- * ForbiddenError
13297
+ * ForbiddenError | FlagDisabledError
12427
13298
  */
12428
- 403: ForbiddenError;
13299
+ 403: ForbiddenError | FlagDisabledError;
12429
13300
  /**
12430
13301
  * ResourceNotFoundError
12431
13302
  */
@@ -12438,46 +13309,48 @@ export type UnsubscribeAddMembersErrors = {
12438
13309
  * InternalError
12439
13310
  */
12440
13311
  500: InternalError;
12441
- /**
12442
- * BillingProviderError
12443
- */
12444
- 502: BillingProviderError;
12445
13312
  /**
12446
13313
  * GatewayTimeoutError
12447
13314
  */
12448
13315
  504: GatewayTimeoutError;
12449
13316
  };
12450
- export type UnsubscribeAddMembersError = UnsubscribeAddMembersErrors[keyof UnsubscribeAddMembersErrors];
12451
- export type UnsubscribeAddMembersResponses = {
13317
+ export type TopicFormsGetError = TopicFormsGetErrors[keyof TopicFormsGetErrors];
13318
+ export type TopicFormsGetResponses = {
12452
13319
  /**
12453
- * Success
13320
+ * TopicForm
12454
13321
  */
12455
- 200: {
12456
- added: number;
12457
- skipped: number;
12458
- };
13322
+ 200: TopicForm;
12459
13323
  };
12460
- export type UnsubscribeAddMembersResponse = UnsubscribeAddMembersResponses[keyof UnsubscribeAddMembersResponses];
12461
- export type UnsubscribeCheckSubscriptionData = {
12462
- body?: never;
12463
- path?: never;
12464
- query?: {
12465
- contactId?: ContactId | null | undefined;
12466
- email?: string | null | undefined;
12467
- phone?: string | null | undefined;
12468
- groupIds?: string | null | undefined;
13324
+ export type TopicFormsGetResponse = TopicFormsGetResponses[keyof TopicFormsGetResponses];
13325
+ export type TopicFormsUpdateData = {
13326
+ body: {
13327
+ allowedOrigins?: Array<string> | null | undefined;
13328
+ confirmationTitle?: string | null | undefined;
13329
+ confirmationMessage?: string | null | undefined;
13330
+ successTitle?: string | null | undefined;
13331
+ successMessage?: string | null | undefined;
13332
+ redirectUrl?: string | null | null | undefined;
13333
+ };
13334
+ path: {
13335
+ id: TopicId;
13336
+ formId: string;
12469
13337
  };
12470
- url: "/v1/unsubscribe-groups/check";
13338
+ query?: never;
13339
+ url: "/v1/topics/{id}/forms/{formId}";
12471
13340
  };
12472
- export type UnsubscribeCheckSubscriptionErrors = {
13341
+ export type TopicFormsUpdateErrors = {
12473
13342
  /**
12474
13343
  * UnauthorizedError
12475
13344
  */
12476
13345
  401: UnauthorizedError;
12477
13346
  /**
12478
- * ForbiddenError
13347
+ * ForbiddenError | FlagDisabledError
12479
13348
  */
12480
- 403: ForbiddenError;
13349
+ 403: ForbiddenError | FlagDisabledError;
13350
+ /**
13351
+ * ResourceNotFoundError
13352
+ */
13353
+ 404: ResourceNotFoundError;
12481
13354
  /**
12482
13355
  * ValidationError
12483
13356
  */
@@ -12491,21 +13364,14 @@ export type UnsubscribeCheckSubscriptionErrors = {
12491
13364
  */
12492
13365
  504: GatewayTimeoutError;
12493
13366
  };
12494
- export type UnsubscribeCheckSubscriptionError = UnsubscribeCheckSubscriptionErrors[keyof UnsubscribeCheckSubscriptionErrors];
12495
- export type UnsubscribeCheckSubscriptionResponses = {
13367
+ export type TopicFormsUpdateError = TopicFormsUpdateErrors[keyof TopicFormsUpdateErrors];
13368
+ export type TopicFormsUpdateResponses = {
12496
13369
  /**
12497
- * Success
13370
+ * TopicForm
12498
13371
  */
12499
- 200: {
12500
- contactId: ContactId | null;
12501
- unsubscribedGroups: Array<{
12502
- groupId: string;
12503
- groupName: string;
12504
- unsubscribedAt: string;
12505
- }>;
12506
- };
13372
+ 200: TopicForm;
12507
13373
  };
12508
- export type UnsubscribeCheckSubscriptionResponse = UnsubscribeCheckSubscriptionResponses[keyof UnsubscribeCheckSubscriptionResponses];
13374
+ export type TopicFormsUpdateResponse = TopicFormsUpdateResponses[keyof TopicFormsUpdateResponses];
12509
13375
  export type AnalyticsGetStatsData = {
12510
13376
  body?: never;
12511
13377
  path?: never;
@@ -12617,7 +13483,7 @@ export type AnalyticsGetTopContactsData = {
12617
13483
  query?: {
12618
13484
  after?: string | null | undefined;
12619
13485
  before?: string | null | undefined;
12620
- limit?: string | null | undefined;
13486
+ limit?: number | null | undefined;
12621
13487
  sortBy?: "sent" | "received" | "total" | null | undefined;
12622
13488
  };
12623
13489
  url: "/v1/analytics/top-contacts";
@@ -12810,7 +13676,7 @@ export type TemplatesListData = {
12810
13676
  body?: never;
12811
13677
  path?: never;
12812
13678
  query?: {
12813
- limit?: string | null | undefined;
13679
+ limit?: number | null | undefined;
12814
13680
  cursor?: Cursor | null | undefined;
12815
13681
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | undefined;
12816
13682
  channel?: "email" | null | undefined;
@@ -12824,7 +13690,7 @@ export type TemplatesListData = {
12824
13690
  /**
12825
13691
  * Only templates whose project is shared with every namespace (true), or only unshared ones (false).
12826
13692
  */
12827
- shared?: "true" | "false" | null | undefined;
13693
+ shared?: boolean | null | undefined;
12828
13694
  };
12829
13695
  url: "/v1/templates";
12830
13696
  };
@@ -12900,9 +13766,9 @@ export type TemplatesCreateErrors = {
12900
13766
  */
12901
13767
  409: ConflictError;
12902
13768
  /**
12903
- * ValidationError
13769
+ * TemplateSourceError | ValidationError
12904
13770
  */
12905
- 422: ValidationError;
13771
+ 422: TemplateSourceError | ValidationError;
12906
13772
  /**
12907
13773
  * InternalError
12908
13774
  */
@@ -12924,7 +13790,7 @@ export type TemplatesListFamiliesData = {
12924
13790
  body?: never;
12925
13791
  path?: never;
12926
13792
  query?: {
12927
- limit?: string | null | undefined;
13793
+ limit?: number | null | undefined;
12928
13794
  cursor?: Cursor | null | undefined;
12929
13795
  };
12930
13796
  url: "/v1/templates/families";
@@ -13454,9 +14320,9 @@ export type TemplatesCreateFromWebsiteErrors = {
13454
14320
  */
13455
14321
  409: ConflictError;
13456
14322
  /**
13457
- * ValidationError
14323
+ * TemplateSourceError | ValidationError
13458
14324
  */
13459
- 422: ValidationError;
14325
+ 422: TemplateSourceError | ValidationError;
13460
14326
  /**
13461
14327
  * InternalError
13462
14328
  */
@@ -13559,9 +14425,9 @@ export type TemplatesPatchWorkspaceErrors = {
13559
14425
  */
13560
14426
  409: ConflictError;
13561
14427
  /**
13562
- * ValidationError
14428
+ * TemplateSourceError | ValidationError
13563
14429
  */
13564
- 422: ValidationError;
14430
+ 422: TemplateSourceError | ValidationError;
13565
14431
  /**
13566
14432
  * InternalError
13567
14433
  */
@@ -13685,9 +14551,9 @@ export type TemplatesOpenWorkspaceErrors = {
13685
14551
  */
13686
14552
  409: ConflictError;
13687
14553
  /**
13688
- * ValidationError
14554
+ * TemplateSourceError | ValidationError
13689
14555
  */
13690
- 422: ValidationError;
14556
+ 422: TemplateSourceError | ValidationError;
13691
14557
  /**
13692
14558
  * InternalError
13693
14559
  */
@@ -13813,9 +14679,9 @@ export type TemplatesDiffWorkspaceErrors = {
13813
14679
  */
13814
14680
  409: ConflictError;
13815
14681
  /**
13816
- * ValidationError
14682
+ * TemplateSourceError | ValidationError
13817
14683
  */
13818
- 422: ValidationError;
14684
+ 422: TemplateSourceError | ValidationError;
13819
14685
  /**
13820
14686
  * InternalError
13821
14687
  */
@@ -13880,9 +14746,9 @@ export type TemplatesPutWorkspaceAssetErrors = {
13880
14746
  */
13881
14747
  409: ConflictError;
13882
14748
  /**
13883
- * ValidationError
14749
+ * TemplateSourceError | ValidationError
13884
14750
  */
13885
- 422: ValidationError;
14751
+ 422: TemplateSourceError | ValidationError;
13886
14752
  /**
13887
14753
  * InternalError
13888
14754
  */
@@ -14013,9 +14879,9 @@ export type TemplatesResolveWorkspaceConflictErrors = {
14013
14879
  */
14014
14880
  409: ConflictError;
14015
14881
  /**
14016
- * ValidationError
14882
+ * TemplateSourceError | ValidationError
14017
14883
  */
14018
- 422: ValidationError;
14884
+ 422: TemplateSourceError | ValidationError;
14019
14885
  /**
14020
14886
  * InternalError
14021
14887
  */
@@ -14144,9 +15010,9 @@ export type TemplatesSaveWorkspaceErrors = {
14144
15010
  */
14145
15011
  409: ConflictError;
14146
15012
  /**
14147
- * ValidationError
15013
+ * TemplateSourceError | ValidationError
14148
15014
  */
14149
- 422: ValidationError;
15015
+ 422: TemplateSourceError | ValidationError;
14150
15016
  /**
14151
15017
  * InternalError
14152
15018
  */
@@ -14248,9 +15114,9 @@ export type TemplatesRestoreWorkspaceErrors = {
14248
15114
  */
14249
15115
  409: ConflictError;
14250
15116
  /**
14251
- * ValidationError
15117
+ * TemplateSourceError | ValidationError
14252
15118
  */
14253
- 422: ValidationError;
15119
+ 422: TemplateSourceError | ValidationError;
14254
15120
  /**
14255
15121
  * InternalError
14256
15122
  */
@@ -14360,7 +15226,7 @@ export type TemplatesWorkspaceHistoryData = {
14360
15226
  id: TemplateId;
14361
15227
  };
14362
15228
  query?: {
14363
- limit?: string | null | undefined;
15229
+ limit?: number | null | undefined;
14364
15230
  };
14365
15231
  url: "/v1/templates/{id}/workspace/history";
14366
15232
  };
@@ -14382,9 +15248,9 @@ export type TemplatesWorkspaceHistoryErrors = {
14382
15248
  */
14383
15249
  409: ConflictError;
14384
15250
  /**
14385
- * ValidationError
15251
+ * TemplateSourceError | ValidationError
14386
15252
  */
14387
- 422: ValidationError;
15253
+ 422: TemplateSourceError | ValidationError;
14388
15254
  /**
14389
15255
  * InternalError
14390
15256
  */
@@ -14444,9 +15310,9 @@ export type TemplatesCheckWorkspaceErrors = {
14444
15310
  */
14445
15311
  409: ConflictError;
14446
15312
  /**
14447
- * ValidationError
15313
+ * TemplateSourceError | ValidationError
14448
15314
  */
14449
- 422: ValidationError;
15315
+ 422: TemplateSourceError | ValidationError;
14450
15316
  /**
14451
15317
  * InternalError
14452
15318
  */
@@ -14555,9 +15421,9 @@ export type TemplatesRenderWorkspaceFixtureErrors = {
14555
15421
  */
14556
15422
  409: ConflictError;
14557
15423
  /**
14558
- * ValidationError
15424
+ * TemplateSourceError | ValidationError
14559
15425
  */
14560
- 422: ValidationError;
15426
+ 422: TemplateSourceError | ValidationError;
14561
15427
  /**
14562
15428
  * InternalError
14563
15429
  */
@@ -14693,9 +15559,9 @@ export type TemplatesPublishErrors = {
14693
15559
  */
14694
15560
  409: ConflictError;
14695
15561
  /**
14696
- * ValidationError
15562
+ * TemplateSourceError | ValidationError
14697
15563
  */
14698
- 422: ValidationError;
15564
+ 422: TemplateSourceError | ValidationError;
14699
15565
  /**
14700
15566
  * InternalError
14701
15567
  */
@@ -15040,7 +15906,7 @@ export type TemplatesListInputContractsData = {
15040
15906
  id: TemplateId;
15041
15907
  };
15042
15908
  query?: {
15043
- limit?: string | null | undefined;
15909
+ limit?: number | null | undefined;
15044
15910
  cursor?: VersionCursor | null | undefined;
15045
15911
  };
15046
15912
  url: "/v1/templates/{id}/input-contracts";
@@ -15158,9 +16024,9 @@ export type TemplatesGetGitRepositoryErrors = {
15158
16024
  */
15159
16025
  409: ConflictError;
15160
16026
  /**
15161
- * ValidationError
16027
+ * TemplateSourceError | ValidationError
15162
16028
  */
15163
- 422: ValidationError;
16029
+ 422: TemplateSourceError | ValidationError;
15164
16030
  /**
15165
16031
  * InternalError
15166
16032
  */
@@ -15209,9 +16075,9 @@ export type TemplatesIssueGitCredentialErrors = {
15209
16075
  */
15210
16076
  409: ConflictError;
15211
16077
  /**
15212
- * ValidationError
16078
+ * TemplateSourceError | ValidationError
15213
16079
  */
15214
- 422: ValidationError;
16080
+ 422: TemplateSourceError | ValidationError;
15215
16081
  /**
15216
16082
  * InternalError
15217
16083
  */
@@ -15272,9 +16138,9 @@ export type TemplatesAttachWorkspaceResourceErrors = {
15272
16138
  */
15273
16139
  409: ConflictError;
15274
16140
  /**
15275
- * ValidationError
16141
+ * TemplateSourceError | ValidationError
15276
16142
  */
15277
- 422: ValidationError;
16143
+ 422: TemplateSourceError | ValidationError;
15278
16144
  /**
15279
16145
  * InternalError
15280
16146
  */
@@ -15397,9 +16263,9 @@ export type TemplatesRemoveWorkspaceResourceErrors = {
15397
16263
  */
15398
16264
  409: ConflictError;
15399
16265
  /**
15400
- * ValidationError
16266
+ * TemplateSourceError | ValidationError
15401
16267
  */
15402
- 422: ValidationError;
16268
+ 422: TemplateSourceError | ValidationError;
15403
16269
  /**
15404
16270
  * InternalError
15405
16271
  */
@@ -15761,7 +16627,7 @@ export type WebhooksListData = {
15761
16627
  body?: never;
15762
16628
  path?: never;
15763
16629
  query?: {
15764
- limit?: string | null | undefined;
16630
+ limit?: number | null | undefined;
15765
16631
  cursor?: Cursor | null | undefined;
15766
16632
  search?: string | null | undefined;
15767
16633
  status?: "active" | "disabled" | null | undefined;
@@ -16065,7 +16931,7 @@ export type WebhooksGetLogsData = {
16065
16931
  id: WebhookEndpointId;
16066
16932
  };
16067
16933
  query?: {
16068
- limit?: string | null | undefined;
16934
+ limit?: number | null | undefined;
16069
16935
  cursor?: Cursor | null | undefined;
16070
16936
  };
16071
16937
  url: "/v1/webhooks/{id}/logs";
@@ -16653,9 +17519,6 @@ export type OrganizationsGetUsageResponses = {
16653
17519
  aiPackCredits: number | null;
16654
17520
  aiResetsAt: string | null;
16655
17521
  creditsResetsAt: string | null;
16656
- standardGranted: number | null;
16657
- standardRemaining: number | null;
16658
- standardResetsAt: string | null;
16659
17522
  };
16660
17523
  };
16661
17524
  };
@@ -16709,7 +17572,7 @@ export type ApiKeysListData = {
16709
17572
  body?: never;
16710
17573
  path?: never;
16711
17574
  query?: {
16712
- limit?: string | null | undefined;
17575
+ limit?: number | null | undefined;
16713
17576
  cursor?: Cursor | null | undefined;
16714
17577
  status?: "active" | "revoked" | null | undefined;
16715
17578
  search?: string | null | undefined;
@@ -17044,7 +17907,7 @@ export type ApiKeysGetActivityData = {
17044
17907
  id: ApiKeyId;
17045
17908
  };
17046
17909
  query?: {
17047
- limit?: string | null | undefined;
17910
+ limit?: number | null | undefined;
17048
17911
  cursor?: Cursor | null | undefined;
17049
17912
  };
17050
17913
  url: "/v1/api-keys/{id}/activity";
@@ -17166,7 +18029,7 @@ export type MailboxesListData = {
17166
18029
  body?: never;
17167
18030
  path?: never;
17168
18031
  query?: {
17169
- limit?: string | null | undefined;
18032
+ limit?: number | null | undefined;
17170
18033
  cursor?: Cursor | null | undefined;
17171
18034
  after?: string | null | undefined;
17172
18035
  before?: string | null | undefined;
@@ -17668,7 +18531,7 @@ export type MailboxesListGrantsData = {
17668
18531
  id: MailboxId;
17669
18532
  };
17670
18533
  query?: {
17671
- limit?: string | null | undefined;
18534
+ limit?: number | null | undefined;
17672
18535
  cursor?: Cursor | null | undefined;
17673
18536
  };
17674
18537
  url: "/v1/mailboxes/{id}/grants";
@@ -18310,16 +19173,16 @@ export type MailboxesListThreadsData = {
18310
19173
  id: MailboxId;
18311
19174
  };
18312
19175
  query?: {
18313
- limit?: string | null | undefined;
19176
+ limit?: number | null | undefined;
18314
19177
  cursor?: Cursor | null | undefined;
18315
19178
  after?: string | null | undefined;
18316
19179
  before?: string | null | undefined;
18317
19180
  q?: string | null | undefined;
18318
19181
  folder?: MailboxThreadFolder | null | undefined;
18319
19182
  label?: MailboxLabelId | null | undefined;
18320
- unread?: "true" | "false" | null | undefined;
18321
- starred?: "true" | "false" | null | undefined;
18322
- snoozed?: "true" | "false" | null | undefined;
19183
+ unread?: boolean | null | undefined;
19184
+ starred?: boolean | null | undefined;
19185
+ snoozed?: boolean | null | undefined;
18323
19186
  };
18324
19187
  url: "/v1/mailboxes/{id}/threads";
18325
19188
  };
@@ -18546,7 +19409,7 @@ export type MailboxesListThreadMessagesData = {
18546
19409
  threadId: MailboxThreadId;
18547
19410
  };
18548
19411
  query?: {
18549
- limit?: string | null | undefined;
19412
+ limit?: number | null | undefined;
18550
19413
  cursor?: Cursor | null | undefined;
18551
19414
  };
18552
19415
  url: "/v1/mailboxes/{id}/threads/{threadId}/messages";
@@ -18592,7 +19455,7 @@ export type MailboxesGetThreadContentData = {
18592
19455
  threadId: MailboxThreadId;
18593
19456
  };
18594
19457
  query?: {
18595
- limit?: string | null | undefined;
19458
+ limit?: number | null | undefined;
18596
19459
  cursor?: Cursor | null | undefined;
18597
19460
  };
18598
19461
  url: "/v1/mailboxes/{id}/threads/{threadId}/content";
@@ -18638,7 +19501,7 @@ export type MailboxesListThreadNotesData = {
18638
19501
  threadId: MailboxThreadId;
18639
19502
  };
18640
19503
  query?: {
18641
- limit?: string | null | undefined;
19504
+ limit?: number | null | undefined;
18642
19505
  cursor?: Cursor | null | undefined;
18643
19506
  };
18644
19507
  url: "/v1/mailboxes/{id}/threads/{threadId}/notes";
@@ -19310,7 +20173,7 @@ export type MailboxesListQuarantineData = {
19310
20173
  id: MailboxId;
19311
20174
  };
19312
20175
  query?: {
19313
- limit?: string | null | undefined;
20176
+ limit?: number | null | undefined;
19314
20177
  cursor?: Cursor | null | undefined;
19315
20178
  after?: string | null | undefined;
19316
20179
  before?: string | null | undefined;
@@ -19455,7 +20318,7 @@ export type MailboxesListDraftsData = {
19455
20318
  id: MailboxId;
19456
20319
  };
19457
20320
  query?: {
19458
- limit?: string | null | undefined;
20321
+ limit?: number | null | undefined;
19459
20322
  cursor?: Cursor | null | undefined;
19460
20323
  threadId?: MailboxThreadId | null | undefined;
19461
20324
  };
@@ -19767,7 +20630,7 @@ export type MailboxesListActionsData = {
19767
20630
  id: MailboxId;
19768
20631
  };
19769
20632
  query?: {
19770
- limit?: string | null | undefined;
20633
+ limit?: number | null | undefined;
19771
20634
  cursor?: Cursor | null | undefined;
19772
20635
  threadId?: MailboxThreadId | null | undefined;
19773
20636
  state?: "proposed" | "allowed" | "approvalRequired" | "policyDenied" | "approved" | "approvalDenied" | "executing" | "executed" | "failed" | "queued" | "accepted" | "completed" | "notSent" | "uncertain" | null | undefined;
@@ -20109,7 +20972,7 @@ export type MailboxesListEventsData = {
20109
20972
  id: MailboxId;
20110
20973
  };
20111
20974
  query?: {
20112
- limit?: string | null | undefined;
20975
+ limit?: number | null | undefined;
20113
20976
  cursor?: Cursor | null | undefined;
20114
20977
  after?: string | null | undefined;
20115
20978
  before?: string | null | undefined;
@@ -20154,7 +21017,7 @@ export type NamespacesListData = {
20154
21017
  body?: never;
20155
21018
  path?: never;
20156
21019
  query?: {
20157
- limit?: string | null | undefined;
21020
+ limit?: number | null | undefined;
20158
21021
  cursor?: Cursor | null | undefined;
20159
21022
  after?: string | null | undefined;
20160
21023
  before?: string | null | undefined;
@@ -20522,7 +21385,7 @@ export type ExtensionsListData = {
20522
21385
  body?: never;
20523
21386
  path?: never;
20524
21387
  query?: {
20525
- limit?: string | null | undefined;
21388
+ limit?: number | null | undefined;
20526
21389
  cursor?: Cursor | null | undefined;
20527
21390
  after?: string | null | undefined;
20528
21391
  before?: string | null | undefined;
@@ -20672,7 +21535,7 @@ export type ExtensionsListVersionsData = {
20672
21535
  id: string;
20673
21536
  };
20674
21537
  query?: {
20675
- limit?: string | null | undefined;
21538
+ limit?: number | null | undefined;
20676
21539
  cursor?: Cursor | null | undefined;
20677
21540
  };
20678
21541
  url: "/v1/extensions/{id}/versions";
@@ -20764,7 +21627,7 @@ export type ExtensionInstallationsListData = {
20764
21627
  body?: never;
20765
21628
  path?: never;
20766
21629
  query?: {
20767
- limit?: string | null | undefined;
21630
+ limit?: number | null | undefined;
20768
21631
  cursor?: Cursor | null | undefined;
20769
21632
  after?: string | null | undefined;
20770
21633
  before?: string | null | undefined;