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, BillingProviderError, ConflictError, Cursor, EmailChannelError, EmailDomainId, EmailSenderId, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, NamespaceId, OperationId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SendsSeries, UnauthorizedError, UnsubscribeId, ValidationError, WebhookEndpointId } from "./shared.js";
1
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, Cursor, EmailChannelError, EmailDomainId, EmailSenderId, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, NamespaceId, OperationId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SendsSeries, TopicId, UnauthorizedError, ValidationError, WebhookEndpointId } 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/email.ts
@@ -644,8 +644,7 @@ const EmailDomainVerification = /* @__PURE__ */ Schema.Struct({
644
644
  Schema.Literal("unknown")
645
645
  ]),
646
646
  evidence: Schema.Array(Schema.Union([
647
- Schema.Struct({
648
- _tag: Schema.Literal("PublicDns"),
647
+ Schema.TaggedStruct("PublicDns", {
649
648
  resolver: Schema.String,
650
649
  status: Schema.Union([
651
650
  Schema.Literal("satisfied"),
@@ -657,8 +656,7 @@ const EmailDomainVerification = /* @__PURE__ */ Schema.Struct({
657
656
  detail: Schema.Union([Schema.String, Schema.Null]),
658
657
  observedAt: Schema.String
659
658
  }),
660
- Schema.Struct({
661
- _tag: Schema.Literal("Provider"),
659
+ Schema.TaggedStruct("Provider", {
662
660
  provider: Schema.String,
663
661
  status: Schema.Union([
664
662
  Schema.Literal("satisfied"),
@@ -670,8 +668,7 @@ const EmailDomainVerification = /* @__PURE__ */ Schema.Struct({
670
668
  detail: Schema.Union([Schema.String, Schema.Null]),
671
669
  observedAt: Schema.String
672
670
  }),
673
- Schema.Struct({
674
- _tag: Schema.Literal("Host"),
671
+ Schema.TaggedStruct("Host", {
675
672
  source: Schema.String,
676
673
  status: Schema.Union([
677
674
  Schema.Literal("ok"),
@@ -822,8 +819,8 @@ const SuppressionPage = /* @__PURE__ */ Schema.Struct({
822
819
  }).annotate({ identifier: "SuppressionPage" });
823
820
  const EmailListBlocksQuery = /* @__PURE__ */ Schema.Struct({
824
821
  blockType: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("email"), Schema.Literal("domain")]), Schema.Null])),
825
- isActive: Schema.optionalKey(Schema.Union([Schema.String.annotate({ contentMediaType: "application/json" }), Schema.Null])),
826
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
822
+ isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
823
+ 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])),
827
824
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
828
825
  });
829
826
  const EmailListBlocks200 = BlockPage;
@@ -908,7 +905,7 @@ const EmailGetBlockLogsQuery = /* @__PURE__ */ Schema.Struct({
908
905
  fromAddress: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
909
906
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
910
907
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
911
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
908
+ 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])),
912
909
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
913
910
  });
914
911
  const EmailGetBlockLogs200 = BlockLogPage;
@@ -965,9 +962,9 @@ const EmailGetCatchAllStats422 = ValidationError;
965
962
  const EmailGetCatchAllStats500 = InternalError;
966
963
  const EmailGetCatchAllStats504 = GatewayTimeoutError;
967
964
  const EmailListDomainsQuery = /* @__PURE__ */ Schema.Struct({
968
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
965
+ 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])),
969
966
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
970
- sendable: Schema.optionalKey(Schema.Union([Schema.Literal("true"), Schema.Null])),
967
+ sendable: Schema.optionalKey(Schema.Union([Schema.Literal(true), Schema.Null])),
971
968
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]))
972
969
  });
973
970
  const EmailListDomains200 = EmailDomainPage;
@@ -1017,7 +1014,7 @@ const EmailUpdateDomainConfigRequestJson = /* @__PURE__ */ Schema.Struct({
1017
1014
  openTracking: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Boolean, Schema.Null]), Schema.Null])),
1018
1015
  clickTracking: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Boolean, Schema.Null]), Schema.Null])),
1019
1016
  replyTo: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Array(Schema.String), Schema.Null]), Schema.Null])),
1020
- unsubscribeGroupId: Schema.optionalKey(Schema.Union([Schema.Union([UnsubscribeId, Schema.Null]), Schema.Null])),
1017
+ topicId: Schema.optionalKey(Schema.Union([Schema.Union([TopicId, Schema.Null]), Schema.Null])),
1021
1018
  footerEnabled: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Boolean, Schema.Null]), Schema.Null])),
1022
1019
  brandSlug: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })), Schema.Null]), Schema.Null]))
1023
1020
  });
@@ -1026,7 +1023,7 @@ const EmailUpdateDomainConfig200 = /* @__PURE__ */ Schema.Struct({
1026
1023
  openTracking: Schema.Union([Schema.Boolean, Schema.Null]),
1027
1024
  clickTracking: Schema.Union([Schema.Boolean, Schema.Null]),
1028
1025
  replyTo: Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1029
- unsubscribeGroupId: Schema.Union([UnsubscribeId, Schema.Null]),
1026
+ topicId: Schema.Union([TopicId, Schema.Null]),
1030
1027
  footerEnabled: Schema.Union([Schema.Boolean, Schema.Null]),
1031
1028
  brandSlug: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })), Schema.Null])
1032
1029
  });
@@ -1324,7 +1321,7 @@ const EmailResumeDomainWarming500 = InternalError;
1324
1321
  const EmailResumeDomainWarming504 = GatewayTimeoutError;
1325
1322
  const EmailListForwardingRulesQuery = /* @__PURE__ */ Schema.Struct({
1326
1323
  domainId: Schema.optionalKey(Schema.Union([EmailDomainId, Schema.Null])),
1327
- isActive: Schema.optionalKey(Schema.Union([Schema.String.annotate({ contentMediaType: "application/json" }), Schema.Null]))
1324
+ isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
1328
1325
  });
1329
1326
  const EmailListForwardingRules200 = ForwardingRuleList;
1330
1327
  const EmailListForwardingRules401 = UnauthorizedError;
@@ -1405,7 +1402,7 @@ const EmailGetForwardingLogQuery = /* @__PURE__ */ Schema.Struct({
1405
1402
  ]), Schema.Null])),
1406
1403
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1407
1404
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1408
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1405
+ 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])),
1409
1406
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
1410
1407
  });
1411
1408
  const EmailGetForwardingLog200 = ForwardingLogPage;
@@ -1441,15 +1438,15 @@ const EmailRespondToOnboardingInformationRequest422 = ValidationError;
1441
1438
  const EmailRespondToOnboardingInformationRequest500 = InternalError;
1442
1439
  const EmailRespondToOnboardingInformationRequest504 = GatewayTimeoutError;
1443
1440
  const EmailListSendersQuery = /* @__PURE__ */ Schema.Struct({
1444
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1441
+ 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])),
1445
1442
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
1446
1443
  verificationStatus: Schema.optionalKey(Schema.Union([Schema.Union([
1447
1444
  Schema.Literal("pending"),
1448
1445
  Schema.Literal("verified"),
1449
1446
  Schema.Literal("failed")
1450
1447
  ]), Schema.Null])),
1451
- isActive: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1452
- isDefault: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1448
+ isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1449
+ isDefault: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1453
1450
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]))
1454
1451
  });
1455
1452
  const EmailListSenders200 = EmailSenderPage;
@@ -1588,7 +1585,7 @@ const EmailListSuppressionsQuery = /* @__PURE__ */ Schema.Struct({
1588
1585
  ]), Schema.Null])),
1589
1586
  status: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("active"), Schema.Literal("expired")]), Schema.Null])),
1590
1587
  search: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" })), Schema.Null])),
1591
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1588
+ 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])),
1592
1589
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
1593
1590
  });
1594
1591
  const EmailListSuppressions200 = SuppressionPage;
@@ -1804,7 +1801,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
1804
1801
  EmailUpdateDomainConfig500,
1805
1802
  EmailUpdateDomainConfig504.pipe(HttpApiSchema.status(504))
1806
1803
  ]
1807
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.updateDomainConfig").annotate(OpenApi.Summary, "Update a domain's send-settings config").annotate(OpenApi.Description, "Overrides the domain's open/click tracking, reply-to, unsubscribe-group defaults, and the brand its mail uses for the settings cascade. An omitted field is left unchanged; null clears it back to the organization default. Returns the saved config."), HttpApiEndpoint.get("emailGetCustomTracking", "/v1/email/domains/:id/custom-tracking", {
1804
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.updateDomainConfig").annotate(OpenApi.Summary, "Update a domain's send-settings config").annotate(OpenApi.Description, "Overrides the domain's open/click tracking, reply-to, topic defaults, and the brand its mail uses for the settings cascade. An omitted field is left unchanged; null clears it back to the organization default. Returns the saved config."), HttpApiEndpoint.get("emailGetCustomTracking", "/v1/email/domains/:id/custom-tracking", {
1808
1805
  params: EmailGetCustomTrackingPathParams,
1809
1806
  success: EmailGetCustomTracking200,
1810
1807
  error: [
@@ -301,13 +301,13 @@ export declare const UpgradeExtensionResponse: Schema.Struct<{
301
301
  }>, Schema.Null]>;
302
302
  }>;
303
303
  export type ExtensionInstallationsListQuery = {
304
- readonly limit?: string | null;
304
+ readonly limit?: number | null;
305
305
  readonly cursor?: Cursor | null;
306
306
  readonly after?: string | null;
307
307
  readonly before?: string | null;
308
308
  };
309
309
  export declare const ExtensionInstallationsListQuery: Schema.Struct<{
310
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
310
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
311
311
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
312
312
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
313
313
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -1318,7 +1318,7 @@ declare const ExtensionInstallationsGroup_base: HttpApiGroup.HttpApiGroup<"Exten
1318
1318
  readonly message: Schema.String;
1319
1319
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1320
1320
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"extensionInstallationsList", "GET", "/v1/extension-installations", never, Schema.toCodecStringTree<Schema.Struct<{
1321
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1321
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1322
1322
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1323
1323
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1324
1324
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -162,7 +162,7 @@ const UpgradeExtensionResponse = /* @__PURE__ */ Schema.Struct({
162
162
  versionChange: Schema.Union([ExtensionVersionChange, Schema.Null])
163
163
  }).annotate({ identifier: "UpgradeExtensionResponse" });
164
164
  const ExtensionInstallationsListQuery = /* @__PURE__ */ Schema.Struct({
165
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
165
+ 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])),
166
166
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
167
167
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
168
168
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
@@ -160,13 +160,13 @@ export declare const PublishExtensionVersionResponse: Schema.Struct<{
160
160
  }>;
161
161
  }>;
162
162
  export type ExtensionsListQuery = {
163
- readonly limit?: string | null;
163
+ readonly limit?: number | null;
164
164
  readonly cursor?: Cursor | null;
165
165
  readonly after?: string | null;
166
166
  readonly before?: string | null;
167
167
  };
168
168
  export declare const ExtensionsListQuery: Schema.Struct<{
169
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
169
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
170
170
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
171
171
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
172
172
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -312,11 +312,11 @@ export declare const ExtensionsListVersionsPathParams: Schema.Struct<{
312
312
  readonly id: Schema.String;
313
313
  }>;
314
314
  export type ExtensionsListVersionsQuery = {
315
- readonly limit?: string | null;
315
+ readonly limit?: number | null;
316
316
  readonly cursor?: Cursor | null;
317
317
  };
318
318
  export declare const ExtensionsListVersionsQuery: Schema.Struct<{
319
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
319
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
320
320
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
321
321
  }>;
322
322
  export type ExtensionsListVersions200 = ExtensionVersionPage;
@@ -581,7 +581,7 @@ declare const ExtensionsGroup_base: HttpApiGroup.HttpApiGroup<"Extensions", Http
581
581
  readonly message: Schema.String;
582
582
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
583
583
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"extensionsList", "GET", "/v1/extensions", never, Schema.toCodecStringTree<Schema.Struct<{
584
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
584
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
585
585
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
586
586
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
587
587
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -683,7 +683,7 @@ declare const ExtensionsGroup_base: HttpApiGroup.HttpApiGroup<"Extensions", Http
683
683
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"extensionsListVersions", "GET", "/v1/extensions/:id/versions", Schema.toCodecStringTree<Schema.Struct<{
684
684
  readonly id: Schema.String;
685
685
  }>>, Schema.toCodecStringTree<Schema.Struct<{
686
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
686
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
687
687
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
688
688
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
689
689
  readonly items: Schema.$Array<Schema.Struct<{
@@ -65,7 +65,7 @@ const PublishExtensionVersionResponse = /* @__PURE__ */ Schema.Struct({
65
65
  version: ExtensionVersion
66
66
  }).annotate({ identifier: "PublishExtensionVersionResponse" });
67
67
  const ExtensionsListQuery = /* @__PURE__ */ Schema.Struct({
68
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
68
+ 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])),
69
69
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
70
70
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
71
71
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
@@ -120,7 +120,7 @@ const ExtensionsGet500 = InternalError;
120
120
  const ExtensionsGet504 = GatewayTimeoutError;
121
121
  const ExtensionsListVersionsPathParams = /* @__PURE__ */ Schema.Struct({ id: Schema.String.annotate({ description: "The extension's id (`ext_…`) or its name." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })) });
122
122
  const ExtensionsListVersionsQuery = /* @__PURE__ */ Schema.Struct({
123
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
123
+ 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])),
124
124
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
125
125
  });
126
126
  const ExtensionsListVersions200 = ExtensionVersionPage;
@@ -25,7 +25,8 @@ import { OrganizationsGroup } from "./organizations";
25
25
  import { ScheduledMessagesGroup } from "./scheduled-messages";
26
26
  import { SubscriptionsGroup } from "./subscriptions";
27
27
  import { TemplatesGroup } from "./templates";
28
- import { UnsubscribeGroupsGroup } from "./unsubscribe-groups";
28
+ import { TopicFormsGroup } from "./topic-forms";
29
+ import { TopicsGroup } from "./topics";
29
30
  import { WebhooksGroup } from "./webhooks";
30
31
  import { WhoamiGroup } from "./whoami";
31
32
  export * from "./shared";
@@ -55,9 +56,10 @@ export * from "./operations";
55
56
  export * from "./organizations";
56
57
  export * from "./subscriptions";
57
58
  export * from "./templates";
58
- export * from "./unsubscribe-groups";
59
+ export * from "./topics";
60
+ export * from "./topic-forms";
59
61
  export * from "./webhooks";
60
62
  export * from "./whoami";
61
- declare const SamvaApi_base: HttpApi.HttpApi<"SamvaApi", typeof AnalyticsGroup | typeof AgentsGroup | typeof APIKeysGroup | typeof AttachmentsGroup | typeof BrandsGroup | typeof CampaignsGroup | typeof ContactEventsGroup | typeof ContactGroupsGroup | typeof ContactsGroup | typeof ConversationsGroup | typeof CustomFieldsGroup | typeof EmailGroup | typeof EventsGroup | typeof ExtensionInstallationsGroup | typeof ExtensionsGroup | typeof FeedbackGroup | typeof JourneysGroup | typeof MailboxesGroup | typeof MediaGroup | typeof MessagesGroup | typeof NamespacesGroup | typeof OperationsGroup | typeof OrganizationsGroup | typeof ScheduledMessagesGroup | typeof SubscriptionsGroup | typeof TemplatesGroup | typeof UnsubscribeGroupsGroup | typeof WebhooksGroup | typeof WhoamiGroup>;
63
+ declare const SamvaApi_base: HttpApi.HttpApi<"SamvaApi", typeof AgentsGroup | typeof AnalyticsGroup | typeof APIKeysGroup | typeof AttachmentsGroup | typeof BrandsGroup | typeof CampaignsGroup | typeof ContactEventsGroup | typeof ContactGroupsGroup | typeof ContactsGroup | typeof ConversationsGroup | typeof CustomFieldsGroup | typeof EmailGroup | typeof EventsGroup | typeof ExtensionInstallationsGroup | typeof ExtensionsGroup | typeof FeedbackGroup | typeof JourneysGroup | typeof MailboxesGroup | typeof MediaGroup | typeof MessagesGroup | typeof NamespacesGroup | typeof OperationsGroup | typeof OrganizationsGroup | typeof ScheduledMessagesGroup | typeof SubscriptionsGroup | typeof TemplatesGroup | typeof TopicFormsGroup | typeof TopicsGroup | typeof WebhooksGroup | typeof WhoamiGroup>;
62
64
  export declare class SamvaApi extends SamvaApi_base {
63
65
  }
@@ -584,12 +584,12 @@ export declare const JourneyVersion: Schema.Struct<{
584
584
  }>;
585
585
  export type JourneysListQuery = {
586
586
  readonly status?: JourneyStatus | null;
587
- readonly limit?: string | null;
587
+ readonly limit?: number | null;
588
588
  readonly cursor?: Cursor | null;
589
589
  };
590
590
  export declare const JourneysListQuery: Schema.Struct<{
591
591
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"archived">]>, Schema.Null]>>;
592
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
592
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
593
593
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
594
594
  }>;
595
595
  export type JourneysList200 = JourneyPage;
@@ -2509,13 +2509,13 @@ export declare const JourneysListRunsPathParams: Schema.Struct<{
2509
2509
  export type JourneysListRunsQuery = {
2510
2510
  readonly status?: JourneyRunStatus | null;
2511
2511
  readonly contactId?: ContactId | null;
2512
- readonly limit?: string | null;
2512
+ readonly limit?: number | null;
2513
2513
  readonly cursor?: Cursor | null;
2514
2514
  };
2515
2515
  export declare const JourneysListRunsQuery: Schema.Struct<{
2516
2516
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"exited">, Schema.Literal<"failed">]>, Schema.Null]>>;
2517
2517
  readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
2518
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2518
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2519
2519
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2520
2520
  }>;
2521
2521
  export type JourneysListRuns200 = JourneyRunPage;
@@ -2610,10 +2610,10 @@ export declare const JourneysStatsPathParams: Schema.Struct<{
2610
2610
  readonly id: Schema.brand<Schema.String, "JourneyId">;
2611
2611
  }>;
2612
2612
  export type JourneysStatsQuery = {
2613
- readonly version?: string | null;
2613
+ readonly version?: number | null;
2614
2614
  };
2615
2615
  export declare const JourneysStatsQuery: Schema.Struct<{
2616
- readonly version: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2616
+ readonly version: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2617
2617
  }>;
2618
2618
  export type JourneysStats200 = JourneyStats;
2619
2619
  export declare const JourneysStats200: Schema.Struct<{
@@ -4154,7 +4154,7 @@ declare const JourneysGroup_base: HttpApiGroup.HttpApiGroup<"Journeys", HttpApiE
4154
4154
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
4155
4155
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"journeysList", "GET", "/v1/journeys", never, Schema.toCodecStringTree<Schema.Struct<{
4156
4156
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"archived">]>, Schema.Null]>>;
4157
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4157
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
4158
4158
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4159
4159
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
4160
4160
  readonly items: Schema.$Array<Schema.Struct<{
@@ -4232,7 +4232,7 @@ declare const JourneysGroup_base: HttpApiGroup.HttpApiGroup<"Journeys", HttpApiE
4232
4232
  }>>, Schema.toCodecStringTree<Schema.Struct<{
4233
4233
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"paused">, Schema.Literal<"exited">, Schema.Literal<"failed">]>, Schema.Null]>>;
4234
4234
  readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
4235
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4235
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
4236
4236
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4237
4237
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
4238
4238
  readonly items: Schema.$Array<Schema.Struct<{
@@ -5753,7 +5753,7 @@ declare const JourneysGroup_base: HttpApiGroup.HttpApiGroup<"Journeys", HttpApiE
5753
5753
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"journeysStats", "GET", "/v1/journeys/:id/stats", Schema.toCodecStringTree<Schema.Struct<{
5754
5754
  readonly id: Schema.brand<Schema.String, "JourneyId">;
5755
5755
  }>>, Schema.toCodecStringTree<Schema.Struct<{
5756
- readonly version: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5756
+ readonly version: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
5757
5757
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
5758
5758
  readonly journeyId: Schema.brand<Schema.String, "JourneyId">;
5759
5759
  readonly version: Schema.Finite;
@@ -138,7 +138,7 @@ const JourneyVersion = /* @__PURE__ */ Schema.Struct({
138
138
  }).annotate({ identifier: "JourneyVersion" });
139
139
  const JourneysListQuery = /* @__PURE__ */ Schema.Struct({
140
140
  status: Schema.optionalKey(Schema.Union([JourneyStatus, Schema.Null])),
141
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
141
+ 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])),
142
142
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
143
143
  });
144
144
  const JourneysList200 = JourneyPage;
@@ -247,7 +247,7 @@ const JourneysListRunsPathParams = /* @__PURE__ */ Schema.Struct({ id: JourneyId
247
247
  const JourneysListRunsQuery = /* @__PURE__ */ Schema.Struct({
248
248
  status: Schema.optionalKey(Schema.Union([JourneyRunStatus, Schema.Null])),
249
249
  contactId: Schema.optionalKey(Schema.Union([ContactId, Schema.Null])),
250
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
250
+ 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])),
251
251
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
252
252
  });
253
253
  const JourneysListRuns200 = JourneyRunPage;
@@ -269,7 +269,7 @@ const JourneysGetRun422 = ValidationError;
269
269
  const JourneysGetRun500 = InternalError;
270
270
  const JourneysGetRun504 = GatewayTimeoutError;
271
271
  const JourneysStatsPathParams = /* @__PURE__ */ Schema.Struct({ id: JourneyId });
272
- const JourneysStatsQuery = /* @__PURE__ */ Schema.Struct({ version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) });
272
+ const JourneysStatsQuery = /* @__PURE__ */ Schema.Struct({ version: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])) });
273
273
  const JourneysStats200 = JourneyStats;
274
274
  const JourneysStats401 = UnauthorizedError;
275
275
  const JourneysStats403 = ForbiddenError;