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
@@ -1,4 +1,4 @@
1
- import { ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ConversationId, CreateMailboxEndpointPayload, Cursor, EmailAttachment, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SuccessResponse, UnauthorizedError, UserId, ValidationError } from "./shared.js";
1
+ import { ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, CampaignId, CampaignRunId, ConflictError, ConversationId, CreateMailboxEndpointPayload, Cursor, EmailAttachment, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SuccessResponse, UnauthorizedError, UserId, ValidationError } from "./shared.js";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  //#region src/effect/generated/mailboxes.ts
@@ -334,6 +334,10 @@ const MailboxLabel = /* @__PURE__ */ Schema.Struct({
334
334
  }).annotate({ identifier: "MailboxLabel" });
335
335
  const MailboxMessageSummary = /* @__PURE__ */ Schema.Struct({
336
336
  id: MessageId,
337
+ campaign: Schema.optionalKey(Schema.Union([Schema.Struct({
338
+ campaignId: CampaignId,
339
+ runId: CampaignRunId
340
+ }), Schema.Null])),
337
341
  channel: MailboxChannel,
338
342
  direction: Schema.Union([Schema.Literal("inbound"), Schema.Literal("outbound")]),
339
343
  from: MailboxMessageSender,
@@ -345,6 +349,10 @@ const MailboxMessageSummary = /* @__PURE__ */ Schema.Struct({
345
349
  }).annotate({ identifier: "MailboxMessageSummary" });
346
350
  const MailboxMessage = /* @__PURE__ */ Schema.Struct({
347
351
  id: MessageId,
352
+ campaign: Schema.optionalKey(Schema.Union([Schema.Struct({
353
+ campaignId: CampaignId,
354
+ runId: CampaignRunId
355
+ }), Schema.Null])),
348
356
  threadId: MailboxThreadId,
349
357
  conversationId: ConversationId,
350
358
  direction: Schema.Union([Schema.Literal("inbound"), Schema.Literal("outbound")]),
@@ -684,7 +692,7 @@ const MailboxActionPage = /* @__PURE__ */ Schema.Struct({
684
692
  nextCursor: Schema.Union([Schema.String, Schema.Null])
685
693
  }).annotate({ identifier: "MailboxActionPage" });
686
694
  const MailboxesListQuery = /* @__PURE__ */ Schema.Struct({
687
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
695
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
688
696
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
689
697
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
690
698
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
@@ -743,7 +751,7 @@ const MailboxesUpdate500 = InternalError;
743
751
  const MailboxesUpdate504 = GatewayTimeoutError;
744
752
  const MailboxesListActionsPathParams = /* @__PURE__ */ Schema.Struct({ id: MailboxId });
745
753
  const MailboxesListActionsQuery = /* @__PURE__ */ Schema.Struct({
746
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
754
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
747
755
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
748
756
  threadId: Schema.optionalKey(Schema.Union([MailboxThreadId, Schema.Null])),
749
757
  state: Schema.optionalKey(Schema.Union([Schema.Union([
@@ -876,7 +884,7 @@ const MailboxesGetAgentActivity500 = InternalError;
876
884
  const MailboxesGetAgentActivity504 = GatewayTimeoutError;
877
885
  const MailboxesListDraftsPathParams = /* @__PURE__ */ Schema.Struct({ id: MailboxId });
878
886
  const MailboxesListDraftsQuery = /* @__PURE__ */ Schema.Struct({
879
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
887
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
880
888
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
881
889
  threadId: Schema.optionalKey(Schema.Union([MailboxThreadId, Schema.Null]))
882
890
  });
@@ -1017,7 +1025,7 @@ const MailboxesUpdateEndpoint500 = InternalError;
1017
1025
  const MailboxesUpdateEndpoint504 = GatewayTimeoutError;
1018
1026
  const MailboxesListEventsPathParams = /* @__PURE__ */ Schema.Struct({ id: MailboxId });
1019
1027
  const MailboxesListEventsQuery = /* @__PURE__ */ Schema.Struct({
1020
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1028
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
1021
1029
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
1022
1030
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1023
1031
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
@@ -1039,7 +1047,7 @@ const MailboxesListFolders500 = InternalError;
1039
1047
  const MailboxesListFolders504 = GatewayTimeoutError;
1040
1048
  const MailboxesListGrantsPathParams = /* @__PURE__ */ Schema.Struct({ id: MailboxId });
1041
1049
  const MailboxesListGrantsQuery = /* @__PURE__ */ Schema.Struct({
1042
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1050
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
1043
1051
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
1044
1052
  });
1045
1053
  const MailboxesListGrants200 = MailboxGrantPage;
@@ -1421,7 +1429,7 @@ const MailboxesUpdatePolicy500 = InternalError;
1421
1429
  const MailboxesUpdatePolicy504 = GatewayTimeoutError;
1422
1430
  const MailboxesListQuarantinePathParams = /* @__PURE__ */ Schema.Struct({ id: MailboxId });
1423
1431
  const MailboxesListQuarantineQuery = /* @__PURE__ */ Schema.Struct({
1424
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1432
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
1425
1433
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
1426
1434
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1427
1435
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
@@ -1443,16 +1451,16 @@ const MailboxesResume500 = InternalError;
1443
1451
  const MailboxesResume504 = GatewayTimeoutError;
1444
1452
  const MailboxesListThreadsPathParams = /* @__PURE__ */ Schema.Struct({ id: MailboxId });
1445
1453
  const MailboxesListThreadsQuery = /* @__PURE__ */ Schema.Struct({
1446
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1454
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
1447
1455
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
1448
1456
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1449
1457
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1450
1458
  q: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1451
1459
  folder: Schema.optionalKey(Schema.Union([MailboxThreadFolder, Schema.Null])),
1452
1460
  label: Schema.optionalKey(Schema.Union([MailboxLabelId, Schema.Null])),
1453
- unread: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("true"), Schema.Literal("false")]), Schema.Null])),
1454
- starred: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("true"), Schema.Literal("false")]), Schema.Null])),
1455
- snoozed: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("true"), Schema.Literal("false")]), Schema.Null]))
1461
+ unread: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1462
+ starred: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1463
+ snoozed: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
1456
1464
  });
1457
1465
  const MailboxesListThreads200 = MailboxThreadPage;
1458
1466
  const MailboxesListThreads401 = UnauthorizedError;
@@ -1495,7 +1503,7 @@ const MailboxesGetThreadContentPathParams = /* @__PURE__ */ Schema.Struct({
1495
1503
  threadId: MailboxThreadId
1496
1504
  });
1497
1505
  const MailboxesGetThreadContentQuery = /* @__PURE__ */ Schema.Struct({
1498
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1506
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
1499
1507
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
1500
1508
  });
1501
1509
  const MailboxesGetThreadContent200 = MailboxThreadContentPage;
@@ -1534,7 +1542,7 @@ const MailboxesListThreadMessagesPathParams = /* @__PURE__ */ Schema.Struct({
1534
1542
  threadId: MailboxThreadId
1535
1543
  });
1536
1544
  const MailboxesListThreadMessagesQuery = /* @__PURE__ */ Schema.Struct({
1537
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1545
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
1538
1546
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
1539
1547
  });
1540
1548
  const MailboxesListThreadMessages200 = MailboxMessagePage;
@@ -1549,7 +1557,7 @@ const MailboxesListThreadNotesPathParams = /* @__PURE__ */ Schema.Struct({
1549
1557
  threadId: MailboxThreadId
1550
1558
  });
1551
1559
  const MailboxesListThreadNotesQuery = /* @__PURE__ */ Schema.Struct({
1552
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1560
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
1553
1561
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
1554
1562
  });
1555
1563
  const MailboxesListThreadNotes200 = MailboxNotePage;
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared";
4
+ import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, CampaignId, CampaignRunId, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared";
5
5
  export type MessageSender = {
6
6
  readonly address: string;
7
7
  readonly name: string | null;
@@ -275,8 +275,8 @@ export declare const MessageReceipt: Schema.Struct<{
275
275
  readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
276
276
  readonly skippedRecipients: Schema.$Array<Schema.Struct<{
277
277
  readonly address: Schema.String;
278
- readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
279
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
278
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
279
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
280
280
  }>>;
281
281
  readonly createdAt: Schema.String;
282
282
  }>;
@@ -311,6 +311,10 @@ export declare const MessageDeliveryList: Schema.Struct<{
311
311
  }>;
312
312
  export type Message = {
313
313
  readonly id: MessageId;
314
+ readonly campaign?: {
315
+ readonly campaignId: CampaignId;
316
+ readonly runId: CampaignRunId;
317
+ } | null;
314
318
  readonly channel: "email";
315
319
  readonly direction: "outbound" | "inbound";
316
320
  readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
@@ -337,6 +341,10 @@ export type Message = {
337
341
  };
338
342
  export declare const Message: Schema.Struct<{
339
343
  readonly id: Schema.brand<Schema.String, "MessageId">;
344
+ readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
345
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
346
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
347
+ }>, Schema.Null]>>;
340
348
  readonly channel: Schema.Literal<"email">;
341
349
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
342
350
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
@@ -386,14 +394,14 @@ export declare const Message: Schema.Struct<{
386
394
  readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
387
395
  readonly skippedRecipients: Schema.$Array<Schema.Struct<{
388
396
  readonly address: Schema.String;
389
- readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
390
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
397
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
398
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
391
399
  }>>;
392
400
  readonly createdAt: Schema.String;
393
401
  readonly updatedAt: Schema.String;
394
402
  }>;
395
403
  export type MessagesListQuery = {
396
- readonly limit?: string | null;
404
+ readonly limit?: number | null;
397
405
  readonly cursor?: Cursor | null;
398
406
  readonly channel?: "email" | null;
399
407
  readonly direction?: "outbound" | "inbound" | null;
@@ -406,7 +414,7 @@ export type MessagesListQuery = {
406
414
  readonly before?: string | null;
407
415
  };
408
416
  export declare const MessagesListQuery: Schema.Struct<{
409
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
417
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
410
418
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
411
419
  readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
412
420
  readonly direction: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>, Schema.Null]>>;
@@ -422,6 +430,10 @@ export type MessagesList200 = MessagePage;
422
430
  export declare const MessagesList200: Schema.Struct<{
423
431
  readonly items: Schema.$Array<Schema.Struct<{
424
432
  readonly id: Schema.brand<Schema.String, "MessageId">;
433
+ readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
434
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
435
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
436
+ }>, Schema.Null]>>;
425
437
  readonly channel: Schema.Literal<"email">;
426
438
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
427
439
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
@@ -508,7 +520,7 @@ export declare const MessagesSendRequestJson: Schema.Struct<{
508
520
  readonly timeZone: Schema.optionalKey<Schema.String>;
509
521
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
510
522
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
511
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
523
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
512
524
  readonly tracking: Schema.optionalKey<Schema.Struct<{
513
525
  readonly opens: Schema.optionalKey<Schema.Boolean>;
514
526
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -527,8 +539,8 @@ export declare const MessagesSend201: Schema.Struct<{
527
539
  readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
528
540
  readonly skippedRecipients: Schema.$Array<Schema.Struct<{
529
541
  readonly address: Schema.String;
530
- readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
531
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
542
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
543
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
532
544
  }>>;
533
545
  readonly createdAt: Schema.String;
534
546
  }>;
@@ -563,6 +575,10 @@ export declare const MessagesGetPathParams: Schema.Struct<{
563
575
  export type MessagesGet200 = Message;
564
576
  export declare const MessagesGet200: Schema.Struct<{
565
577
  readonly id: Schema.brand<Schema.String, "MessageId">;
578
+ readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
579
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
580
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
581
+ }>, Schema.Null]>>;
566
582
  readonly channel: Schema.Literal<"email">;
567
583
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
568
584
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
@@ -612,8 +628,8 @@ export declare const MessagesGet200: Schema.Struct<{
612
628
  readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
613
629
  readonly skippedRecipients: Schema.$Array<Schema.Struct<{
614
630
  readonly address: Schema.String;
615
- readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
616
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
631
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
632
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
617
633
  }>>;
618
634
  readonly createdAt: Schema.String;
619
635
  readonly updatedAt: Schema.String;
@@ -754,12 +770,12 @@ export declare const MessagesGetEmailPathParams: Schema.Struct<{
754
770
  readonly id: Schema.brand<Schema.String, "MessageId">;
755
771
  }>;
756
772
  export type MessagesGetEmailQuery = {
757
- readonly includeDownloadUrls?: string | null;
758
- readonly urlExpiresIn?: string | null;
773
+ readonly includeDownloadUrls?: boolean | null;
774
+ readonly urlExpiresIn?: number | null;
759
775
  };
760
776
  export declare const MessagesGetEmailQuery: Schema.Struct<{
761
- readonly includeDownloadUrls: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
762
- readonly urlExpiresIn: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
777
+ readonly includeDownloadUrls: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
778
+ readonly urlExpiresIn: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
763
779
  }>;
764
780
  export type MessagesGetEmail200 = {
765
781
  readonly deliveries: ReadonlyArray<{
@@ -961,11 +977,11 @@ export declare const MessagesGetEventsPathParams: Schema.Struct<{
961
977
  readonly id: Schema.brand<Schema.String, "MessageId">;
962
978
  }>;
963
979
  export type MessagesGetEventsQuery = {
964
- readonly limit?: string | null;
980
+ readonly limit?: number | null;
965
981
  readonly cursor?: Cursor | null;
966
982
  };
967
983
  export declare const MessagesGetEventsQuery: Schema.Struct<{
968
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
984
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
969
985
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
970
986
  }>;
971
987
  export type MessagesGetEvents200 = MessageEventPage;
@@ -1079,7 +1095,7 @@ export declare const MessagesValidateEmailRequestJson: Schema.Struct<{
1079
1095
  readonly timeZone: Schema.optionalKey<Schema.String>;
1080
1096
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1081
1097
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1082
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1098
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1083
1099
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1084
1100
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1085
1101
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1123,6 +1139,10 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
1123
1139
  readonly id: Schema.brand<Schema.String, "MessageId">;
1124
1140
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1125
1141
  readonly id: Schema.brand<Schema.String, "MessageId">;
1142
+ readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1143
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
1144
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
1145
+ }>, Schema.Null]>>;
1126
1146
  readonly channel: Schema.Literal<"email">;
1127
1147
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
1128
1148
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
@@ -1172,8 +1192,8 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
1172
1192
  readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1173
1193
  readonly skippedRecipients: Schema.$Array<Schema.Struct<{
1174
1194
  readonly address: Schema.String;
1175
- readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
1176
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1195
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
1196
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
1177
1197
  }>>;
1178
1198
  readonly createdAt: Schema.String;
1179
1199
  readonly updatedAt: Schema.String;
@@ -1366,8 +1386,8 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
1366
1386
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"messagesGetEmail", "GET", "/v1/messages/:id/email", Schema.toCodecStringTree<Schema.Struct<{
1367
1387
  readonly id: Schema.brand<Schema.String, "MessageId">;
1368
1388
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1369
- readonly includeDownloadUrls: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1370
- readonly urlExpiresIn: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1389
+ readonly includeDownloadUrls: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1390
+ readonly urlExpiresIn: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1371
1391
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1372
1392
  readonly deliveries: Schema.$Array<Schema.Struct<{
1373
1393
  readonly scheduling: Schema.Union<readonly [Schema.Struct<{
@@ -1548,7 +1568,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
1548
1568
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"messagesGetEvents", "GET", "/v1/messages/:id/events", Schema.toCodecStringTree<Schema.Struct<{
1549
1569
  readonly id: Schema.brand<Schema.String, "MessageId">;
1550
1570
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1551
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1571
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1552
1572
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1553
1573
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1554
1574
  readonly items: Schema.$Array<Schema.Struct<{
@@ -1727,7 +1747,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
1727
1747
  readonly message: Schema.String;
1728
1748
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1729
1749
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"messagesList", "GET", "/v1/messages", never, Schema.toCodecStringTree<Schema.Struct<{
1730
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1750
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1731
1751
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1732
1752
  readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
1733
1753
  readonly direction: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>, Schema.Null]>>;
@@ -1741,6 +1761,10 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
1741
1761
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1742
1762
  readonly items: Schema.$Array<Schema.Struct<{
1743
1763
  readonly id: Schema.brand<Schema.String, "MessageId">;
1764
+ readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1765
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
1766
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
1767
+ }>, Schema.Null]>>;
1744
1768
  readonly channel: Schema.Literal<"email">;
1745
1769
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
1746
1770
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
@@ -2064,7 +2088,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
2064
2088
  readonly timeZone: Schema.optionalKey<Schema.String>;
2065
2089
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2066
2090
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2067
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2091
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2068
2092
  readonly tracking: Schema.optionalKey<Schema.Struct<{
2069
2093
  readonly opens: Schema.optionalKey<Schema.Boolean>;
2070
2094
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -2083,8 +2107,8 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
2083
2107
  readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2084
2108
  readonly skippedRecipients: Schema.$Array<Schema.Struct<{
2085
2109
  readonly address: Schema.String;
2086
- readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
2087
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2110
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
2111
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
2088
2112
  }>>;
2089
2113
  readonly createdAt: Schema.String;
2090
2114
  }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError]> | Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
@@ -2244,7 +2268,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
2244
2268
  readonly timeZone: Schema.optionalKey<Schema.String>;
2245
2269
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2246
2270
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2247
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2271
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2248
2272
  readonly tracking: Schema.optionalKey<Schema.Struct<{
2249
2273
  readonly opens: Schema.optionalKey<Schema.Boolean>;
2250
2274
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1,4 +1,4 @@
1
- import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared.js";
1
+ import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, CampaignId, CampaignRunId, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared.js";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  //#region src/effect/generated/messages.ts
@@ -198,6 +198,10 @@ const MessageReceipt = /* @__PURE__ */ Schema.Struct({
198
198
  const MessageDeliveryList = /* @__PURE__ */ Schema.Struct({ items: Schema.Array(MessageDelivery) }).annotate({ identifier: "MessageDeliveryList" });
199
199
  const Message = /* @__PURE__ */ Schema.Struct({
200
200
  id: MessageId,
201
+ campaign: Schema.optionalKey(Schema.Union([Schema.Struct({
202
+ campaignId: CampaignId,
203
+ runId: CampaignRunId
204
+ }), Schema.Null])),
201
205
  channel: Schema.Literal("email"),
202
206
  direction: Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]),
203
207
  status: Schema.Union([
@@ -244,7 +248,7 @@ const Message = /* @__PURE__ */ Schema.Struct({
244
248
  updatedAt: Schema.String
245
249
  }).annotate({ identifier: "Message" });
246
250
  const MessagesListQuery = /* @__PURE__ */ Schema.Struct({
247
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
251
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
248
252
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
249
253
  channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
250
254
  direction: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]), Schema.Null])),
@@ -338,8 +342,8 @@ const MessagesListDeliveries500 = InternalError;
338
342
  const MessagesListDeliveries504 = GatewayTimeoutError;
339
343
  const MessagesGetEmailPathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
340
344
  const MessagesGetEmailQuery = /* @__PURE__ */ Schema.Struct({
341
- includeDownloadUrls: Schema.optionalKey(Schema.Union([Schema.String.annotate({ contentMediaType: "application/json" }), Schema.Null])),
342
- urlExpiresIn: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
345
+ includeDownloadUrls: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
346
+ urlExpiresIn: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(604800).annotate({ expected: "a value less than or equal to 604800" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null]))
343
347
  });
344
348
  const MessagesGetEmail200 = /* @__PURE__ */ Schema.Struct({
345
349
  deliveries: Schema.Array(Schema.Struct({
@@ -502,7 +506,7 @@ const MessagesGetEmail500 = InternalError;
502
506
  const MessagesGetEmail504 = GatewayTimeoutError;
503
507
  const MessagesGetEventsPathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
504
508
  const MessagesGetEventsQuery = /* @__PURE__ */ Schema.Struct({
505
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
509
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
506
510
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
507
511
  });
508
512
  const MessagesGetEvents200 = MessageEventPage;
@@ -62,13 +62,13 @@ export declare const NamespacePage: Schema.Struct<{
62
62
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
63
63
  }>;
64
64
  export type NamespacesListQuery = {
65
- readonly limit?: string | null;
65
+ readonly limit?: number | null;
66
66
  readonly cursor?: Cursor | null;
67
67
  readonly after?: string | null;
68
68
  readonly before?: string | null;
69
69
  };
70
70
  export declare const NamespacesListQuery: Schema.Struct<{
71
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
71
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
72
72
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
73
73
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
74
74
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -684,7 +684,7 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
684
684
  readonly message: Schema.String;
685
685
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
686
686
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesList", "GET", "/v1/namespaces", never, Schema.toCodecStringTree<Schema.Struct<{
687
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
687
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
688
688
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
689
689
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
690
690
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -31,7 +31,7 @@ const NamespacePage = /* @__PURE__ */ Schema.Struct({
31
31
  nextCursor: Schema.Union([Schema.String, Schema.Null])
32
32
  }).annotate({ identifier: "NamespacePage" });
33
33
  const NamespacesListQuery = /* @__PURE__ */ Schema.Struct({
34
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
34
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
35
35
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
36
36
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
37
37
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
@@ -32,13 +32,13 @@ export declare const OperationPage: Schema.Struct<{
32
32
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
33
33
  }>;
34
34
  export type OperationsListQuery = {
35
- readonly limit?: string | null;
35
+ readonly limit?: number | null;
36
36
  readonly cursor?: Cursor | null;
37
37
  readonly kind?: "email-domain-provisioning" | "organization-deletion" | null;
38
38
  readonly status?: "pending" | "running" | "succeeded" | "failed" | null;
39
39
  };
40
40
  export declare const OperationsListQuery: Schema.Struct<{
41
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
41
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
42
42
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
43
43
  readonly kind: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"email-domain-provisioning">, Schema.Literal<"organization-deletion">]>, Schema.Null]>>;
44
44
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"running">, Schema.Literal<"succeeded">, Schema.Literal<"failed">]>, Schema.Null]>>;
@@ -283,7 +283,7 @@ declare const OperationsGroup_base: HttpApiGroup.HttpApiGroup<"Operations", Http
283
283
  readonly message: Schema.String;
284
284
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
285
285
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"operationsList", "GET", "/v1/operations", never, Schema.toCodecStringTree<Schema.Struct<{
286
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
286
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
287
287
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
288
288
  readonly kind: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"email-domain-provisioning">, Schema.Literal<"organization-deletion">]>, Schema.Null]>>;
289
289
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"running">, Schema.Literal<"succeeded">, Schema.Literal<"failed">]>, Schema.Null]>>;
@@ -7,7 +7,7 @@ const OperationPage = /* @__PURE__ */ Schema.Struct({
7
7
  nextCursor: Schema.Union([Schema.String, Schema.Null])
8
8
  }).annotate({ identifier: "OperationPage" });
9
9
  const OperationsListQuery = /* @__PURE__ */ Schema.Struct({
10
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
11
11
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
12
12
  kind: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("email-domain-provisioning"), Schema.Literal("organization-deletion")]), Schema.Null])),
13
13
  status: Schema.optionalKey(Schema.Union([Schema.Union([
@@ -399,9 +399,6 @@ export type OrganizationsGetUsage200 = {
399
399
  readonly aiPackCredits: number | null;
400
400
  readonly aiResetsAt: string | null;
401
401
  readonly creditsResetsAt: string | null;
402
- readonly standardGranted: number | null;
403
- readonly standardRemaining: number | null;
404
- readonly standardResetsAt: string | null;
405
402
  };
406
403
  };
407
404
  export declare const OrganizationsGetUsage200: Schema.Struct<{
@@ -425,9 +422,6 @@ export declare const OrganizationsGetUsage200: Schema.Struct<{
425
422
  readonly aiPackCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
426
423
  readonly aiResetsAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
427
424
  readonly creditsResetsAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
428
- readonly standardGranted: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
429
- readonly standardRemaining: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
430
- readonly standardResetsAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
431
425
  }>;
432
426
  }>;
433
427
  export type OrganizationsGetUsage401 = UnauthorizedError;
@@ -1055,9 +1049,6 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
1055
1049
  readonly aiPackCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1056
1050
  readonly aiResetsAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1057
1051
  readonly creditsResetsAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1058
- readonly standardGranted: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1059
- readonly standardRemaining: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1060
- readonly standardResetsAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1061
1052
  }>;
1062
1053
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
1063
1054
  readonly _tag: "ForbiddenError";
@@ -164,10 +164,7 @@ const OrganizationsGetUsage200 = /* @__PURE__ */ Schema.Struct({
164
164
  overageAiCost: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
165
165
  aiPackCredits: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
166
166
  aiResetsAt: Schema.Union([Schema.String, Schema.Null]),
167
- creditsResetsAt: Schema.Union([Schema.String, Schema.Null]),
168
- standardGranted: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
169
- standardRemaining: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
170
- standardResetsAt: Schema.Union([Schema.String, Schema.Null])
167
+ creditsResetsAt: Schema.Union([Schema.String, Schema.Null])
171
168
  })
172
169
  });
173
170
  const OrganizationsGetUsage401 = UnauthorizedError;