samva 0.54.0 → 0.55.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 (146) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +1 -0
  3. package/dist/_virtual/_rolldown/runtime.js +4 -4
  4. package/dist/agent/index.js +1 -1
  5. package/dist/client/client/client.gen.js +1 -2
  6. package/dist/client/client/utils.gen.js +1 -1
  7. package/dist/client/client.gen.js +1 -1
  8. package/dist/client/sdk.gen.d.ts +57 -3
  9. package/dist/client/sdk.gen.js +184 -8
  10. package/dist/client/types.gen.d.ts +420 -1
  11. package/dist/client-attribution.js +1 -1
  12. package/dist/effect/agents.js +1 -1
  13. package/dist/effect/analytics.js +1 -1
  14. package/dist/effect/api-keys.js +1 -1
  15. package/dist/effect/approval-requests.js +1 -1
  16. package/dist/effect/attachments.js +1 -1
  17. package/dist/effect/brands.js +2 -2
  18. package/dist/effect/campaigns.d.ts +66 -56
  19. package/dist/effect/campaigns.js +1 -1
  20. package/dist/effect/categories.js +6 -6
  21. package/dist/effect/contact-groups.js +1 -1
  22. package/dist/effect/contacts.js +1 -1
  23. package/dist/effect/conversations.js +1 -1
  24. package/dist/effect/custom-fields.js +1 -1
  25. package/dist/effect/descriptors/phone-numbers.d.ts +49 -0
  26. package/dist/effect/descriptors/phone-numbers.js +47 -0
  27. package/dist/effect/descriptors/topics.d.ts +1 -1
  28. package/dist/effect/descriptors/topics.js +1 -1
  29. package/dist/effect/email.js +1 -1
  30. package/dist/effect/errors.d.ts +1 -1
  31. package/dist/effect/errors.js +2 -2
  32. package/dist/effect/events.js +2 -2
  33. package/dist/effect/feedback.js +2 -2
  34. package/dist/effect/generated/accounts.d.ts +12 -1
  35. package/dist/effect/generated/accounts.js +2 -1
  36. package/dist/effect/generated/agents.js +7 -7
  37. package/dist/effect/generated/analytics.js +16 -16
  38. package/dist/effect/generated/api-keys.js +5 -5
  39. package/dist/effect/generated/approval-requests.js +1 -1
  40. package/dist/effect/generated/attachments.js +4 -4
  41. package/dist/effect/generated/brands.js +1 -1
  42. package/dist/effect/generated/campaigns.d.ts +17 -1
  43. package/dist/effect/generated/campaigns.js +15 -14
  44. package/dist/effect/generated/contact-events.js +1 -1
  45. package/dist/effect/generated/contact-groups.js +12 -12
  46. package/dist/effect/generated/contacts.js +50 -50
  47. package/dist/effect/generated/conversations.js +7 -7
  48. package/dist/effect/generated/custom-fields.js +6 -6
  49. package/dist/effect/generated/email.js +48 -48
  50. package/dist/effect/generated/events.js +5 -5
  51. package/dist/effect/generated/feedback.js +1 -1
  52. package/dist/effect/generated/index.d.ts +3 -1
  53. package/dist/effect/generated/integrations-catalog.d.ts +16 -0
  54. package/dist/effect/generated/integrations-catalog.js +10 -6
  55. package/dist/effect/generated/integrations.js +5 -5
  56. package/dist/effect/generated/journeys.d.ts +38 -1
  57. package/dist/effect/generated/journeys.js +16 -14
  58. package/dist/effect/generated/logs.js +2 -2
  59. package/dist/effect/generated/mailboxes.d.ts +41 -3
  60. package/dist/effect/generated/mailboxes.js +48 -50
  61. package/dist/effect/generated/media.js +1 -1
  62. package/dist/effect/generated/messages.js +5 -5
  63. package/dist/effect/generated/namespaces.d.ts +9 -9
  64. package/dist/effect/generated/namespaces.js +1 -1
  65. package/dist/effect/generated/newsletter-domains.js +1 -1
  66. package/dist/effect/generated/newsletter-issues.js +69 -69
  67. package/dist/effect/generated/newsletters.js +1 -1
  68. package/dist/effect/generated/operations.js +1 -1
  69. package/dist/effect/generated/organizations.d.ts +3 -0
  70. package/dist/effect/generated/organizations.js +2 -1
  71. package/dist/effect/generated/phone-numbers.d.ts +817 -0
  72. package/dist/effect/generated/phone-numbers.js +230 -0
  73. package/dist/effect/generated/policies.js +2 -2
  74. package/dist/effect/generated/scheduled-messages.js +1 -1
  75. package/dist/effect/generated/shared.d.ts +31 -10
  76. package/dist/effect/generated/shared.js +34 -13
  77. package/dist/effect/generated/subscriptions.js +1 -1
  78. package/dist/effect/generated/template-registrations.js +1 -1
  79. package/dist/effect/generated/template-share-links.js +9 -9
  80. package/dist/effect/generated/templates.js +119 -119
  81. package/dist/effect/generated/topic-forms.js +1 -1
  82. package/dist/effect/generated/topics.d.ts +10 -0
  83. package/dist/effect/generated/topics.js +20 -13
  84. package/dist/effect/generated/webhooks.js +18 -18
  85. package/dist/effect/generated/whats-app-flows.js +5 -5
  86. package/dist/effect/generated/whats-app-setup-links.js +1 -1
  87. package/dist/effect/generated/whats-app.d.ts +75 -0
  88. package/dist/effect/generated/whats-app.js +43 -18
  89. package/dist/effect/generated/whoami.js +1 -1
  90. package/dist/effect/generated-metadata.d.ts +35 -1
  91. package/dist/effect/generated-metadata.js +173 -146
  92. package/dist/effect/index.d.ts +1 -0
  93. package/dist/effect/index.js +6 -5
  94. package/dist/effect/integrations-catalog.js +1 -1
  95. package/dist/effect/integrations.js +1 -1
  96. package/dist/effect/internal/client.js +6 -6
  97. package/dist/effect/internal/email-sender.js +3 -3
  98. package/dist/effect/internal/log-events.js +2 -2
  99. package/dist/effect/internal/mailbox-events.js +1 -1
  100. package/dist/effect/internal/operation.js +2 -2
  101. package/dist/effect/internal/send.js +4 -4
  102. package/dist/effect/journeys.d.ts +10 -0
  103. package/dist/effect/journeys.js +1 -1
  104. package/dist/effect/logs.js +1 -1
  105. package/dist/effect/mailboxes.d.ts +191 -191
  106. package/dist/effect/mailboxes.js +3 -3
  107. package/dist/effect/media.js +2 -2
  108. package/dist/effect/messages.js +2 -2
  109. package/dist/effect/namespaces.d.ts +2 -2
  110. package/dist/effect/namespaces.js +1 -1
  111. package/dist/effect/newsletter-domains.js +1 -1
  112. package/dist/effect/newsletter-issues.js +1 -1
  113. package/dist/effect/newsletters.js +1 -1
  114. package/dist/effect/operations.js +1 -1
  115. package/dist/effect/organizations.js +1 -1
  116. package/dist/effect/phone-numbers.d.ts +22 -0
  117. package/dist/effect/phone-numbers.js +21 -0
  118. package/dist/effect/policies.js +1 -1
  119. package/dist/effect/retry.js +3 -3
  120. package/dist/effect/scheduled-messages.d.ts +350 -350
  121. package/dist/effect/scheduled-messages.js +1 -1
  122. package/dist/effect/subscriptions.js +1 -1
  123. package/dist/effect/template-registrations.js +1 -1
  124. package/dist/effect/template-share-links.js +1 -1
  125. package/dist/effect/templates.js +2 -2
  126. package/dist/effect/topic-forms.js +1 -1
  127. package/dist/effect/topics.d.ts +70 -2
  128. package/dist/effect/topics.js +1 -1
  129. package/dist/effect/webhooks.js +2 -2
  130. package/dist/effect/whatsapp-flows.js +1 -1
  131. package/dist/effect/whatsapp-setup-links.js +1 -1
  132. package/dist/effect/whatsapp.d.ts +10 -0
  133. package/dist/effect/whatsapp.js +1 -1
  134. package/dist/effect/whoami.js +1 -1
  135. package/dist/index.js +2 -2
  136. package/dist/package.json.js +5 -0
  137. package/dist/promises/client.d.ts +3 -1
  138. package/dist/promises/client.js +7 -5
  139. package/dist/promises/errors.gen.d.ts +16 -2
  140. package/dist/promises/errors.gen.js +48 -11
  141. package/dist/promises/index.js +3 -3
  142. package/dist/promises/types.gen.d.ts +1 -1
  143. package/dist/request-policy.js +1 -1
  144. package/dist/service-map.d.ts +25 -0
  145. package/package.json +9 -5
  146. package/dist/package.js +0 -5
@@ -1,6 +1,6 @@
1
- import { ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
2
1
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
2
  import * as Schema from "effect/Schema";
3
+ import { ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
4
4
  // src/effect/generated/topic-forms.ts
5
5
  const TopicForm = /* @__PURE__ */ (() => Schema.Struct({
6
6
  id: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(new globalThis.RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" })),
@@ -135,6 +135,7 @@ export declare const TopicSubscriptionPage: Schema.Struct<{
135
135
  }>;
136
136
  export type TopicList = {
137
137
  readonly items: ReadonlyArray<Topic>;
138
+ readonly nextCursor: string | null;
138
139
  };
139
140
  export declare const TopicList: Schema.Struct<{
140
141
  readonly items: Schema.$Array<Schema.Struct<{
@@ -164,11 +165,16 @@ export declare const TopicList: Schema.Struct<{
164
165
  readonly createdAt: Schema.String;
165
166
  readonly updatedAt: Schema.String;
166
167
  }>>;
168
+ readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
167
169
  }>;
168
170
  export type TopicsListQuery = {
171
+ readonly limit?: number | null;
172
+ readonly cursor?: string;
169
173
  readonly namespaceId?: NamespaceId;
170
174
  };
171
175
  export declare const TopicsListQuery: Schema.Struct<{
176
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
177
+ readonly cursor: Schema.optionalKey<Schema.String>;
172
178
  readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
173
179
  }>;
174
180
  export type TopicsList200 = TopicList;
@@ -200,6 +206,7 @@ export declare const TopicsList200: Schema.Struct<{
200
206
  readonly createdAt: Schema.String;
201
207
  readonly updatedAt: Schema.String;
202
208
  }>>;
209
+ readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
203
210
  }>;
204
211
  export type TopicsList400 = MalformedRequestError;
205
212
  export declare const TopicsList400: typeof MalformedRequestError;
@@ -996,6 +1003,8 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
996
1003
  readonly message: Schema.String;
997
1004
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
998
1005
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsList", "GET", "/v1/topics", never, Schema.toCodecStringTree<Schema.Struct<{
1006
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1007
+ readonly cursor: Schema.optionalKey<Schema.String>;
999
1008
  readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
1000
1009
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1001
1010
  readonly items: Schema.$Array<Schema.Struct<{
@@ -1025,6 +1034,7 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
1025
1034
  readonly createdAt: Schema.String;
1026
1035
  readonly updatedAt: Schema.String;
1027
1036
  }>>;
1037
+ readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
1028
1038
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
1029
1039
  readonly _tag: "ForbiddenError";
1030
1040
  readonly message: string;
@@ -1,24 +1,24 @@
1
- import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, EmailSenderId, ForbiddenError, GatewayTimeoutError, InternalError, MailboxId, MalformedRequestError, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, TopicContactRef, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
2
1
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
2
  import * as Schema from "effect/Schema";
3
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, EmailSenderId, ForbiddenError, GatewayTimeoutError, InternalError, MailboxId, MalformedRequestError, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, TopicContactRef, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
4
4
  // src/effect/generated/topics.ts
5
5
  const TopicSubscriptionCounts = /* @__PURE__ */ (() => Schema.Struct({
6
6
  sms: Schema.Struct({
7
- subscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
8
- unsubscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
7
+ subscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
8
+ unsubscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
9
9
  }),
10
10
  whatsapp: Schema.Struct({
11
- subscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
12
- unsubscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
11
+ subscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
12
+ unsubscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
13
13
  }),
14
14
  email: Schema.Struct({
15
- subscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
16
- unsubscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
15
+ subscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
16
+ unsubscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
17
17
  })
18
18
  }).annotate({ identifier: "TopicSubscriptionCounts" }))();
19
19
  const TopicSetSubscriptionsResult = /* @__PURE__ */ (() => Schema.Struct({
20
- updated: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
21
- kept: Schema.Finite.annotate({ description: "Email contacts left unsubscribed because they explicitly unsubscribed from this topic. Only the recipient can resubscribe them, through the preference page or double opt-in." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
20
+ updated: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
21
+ kept: Schema.Finite.annotate({ description: "Email contacts left unsubscribed because they explicitly unsubscribed from this topic. Only the recipient can resubscribe them, through the preference page or double opt-in." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
22
22
  }).annotate({ identifier: "TopicSetSubscriptionsResult" }))();
23
23
  const TopicSubscription = /* @__PURE__ */ (() => Schema.Struct({
24
24
  contactId: ContactId,
@@ -65,8 +65,15 @@ const TopicSubscriptionPage = /* @__PURE__ */ (() => Schema.Struct({
65
65
  items: Schema.Array(TopicSubscription),
66
66
  nextCursor: Schema.Union([Schema.String, Schema.Null])
67
67
  }).annotate({ identifier: "TopicSubscriptionPage" }))();
68
- const TopicList = /* @__PURE__ */ (() => Schema.Struct({ items: Schema.Array(Topic).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })) }).annotate({ identifier: "TopicList" }))();
69
- const TopicsListQuery = /* @__PURE__ */ (() => Schema.Struct({ namespaceId: Schema.optionalKey(NamespaceId) }))();
68
+ const TopicList = /* @__PURE__ */ (() => Schema.Struct({
69
+ items: Schema.Array(Topic),
70
+ nextCursor: Schema.Union([Schema.String, Schema.Null])
71
+ }).annotate({ identifier: "TopicList" }))();
72
+ const TopicsListQuery = /* @__PURE__ */ (() => Schema.Struct({
73
+ 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])),
74
+ cursor: Schema.optionalKey(Schema.String),
75
+ namespaceId: Schema.optionalKey(NamespaceId)
76
+ }))();
70
77
  const TopicsList200 = TopicList;
71
78
  const TopicsList400 = MalformedRequestError;
72
79
  const TopicsList401 = UnauthorizedError;
@@ -209,7 +216,7 @@ var TopicsGroup = class extends HttpApiGroup.make("Topics").add(HttpApiEndpoint.
209
216
  TopicsList500,
210
217
  TopicsList504.pipe(HttpApiSchema.status(504))
211
218
  ]
212
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.list").annotate(OpenApi.Summary, "List topics").annotate(OpenApi.Description, "Lists visible topics, default first then by name. The organization holds at most 200 topics, so the list is bounded and unpaged."), HttpApiEndpoint.post("topicsCreate", "/v1/topics", {
219
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.list").annotate(OpenApi.Summary, "List topics").annotate(OpenApi.Description, "Lists one page of visible topics, default topics first, then by name and ID. Optionally filter by namespaceId. Pass nextCursor as cursor with the same filters to continue."), HttpApiEndpoint.post("topicsCreate", "/v1/topics", {
213
220
  payload: TopicsCreateRequestJson,
214
221
  success: TopicsCreate201.pipe(HttpApiSchema.status(201)),
215
222
  error: [
@@ -222,7 +229,7 @@ var TopicsGroup = class extends HttpApiGroup.make("Topics").add(HttpApiEndpoint.
222
229
  TopicsCreate500,
223
230
  TopicsCreate504.pipe(HttpApiSchema.status(504))
224
231
  ]
225
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.create").annotate(OpenApi.Summary, "Create a topic").annotate(OpenApi.Description, "Creates a topic in the caller's or requested namespace. The subscription default is opt_out when omitted. Sending defaults must be compatible with that namespace. An organization holds at most 200 topics."), HttpApiEndpoint.get("topicsGet", "/v1/topics/:id", {
232
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.create").annotate(OpenApi.Summary, "Create a topic").annotate(OpenApi.Description, "Creates a topic in the caller's or requested namespace. The subscription default is opt_out when omitted. Sending defaults must be compatible with that namespace. Each namespace and the organization level can each hold up to 200 topics. An organization can hold up to 20,000 topics in total."), HttpApiEndpoint.get("topicsGet", "/v1/topics/:id", {
226
233
  params: TopicsGetPathParams,
227
234
  success: TopicsGet200,
228
235
  error: [
@@ -1,14 +1,14 @@
1
1
  import { SensitiveString } from "../runtime.js";
2
- import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, MalformedRequestError, NamespaceId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared.js";
3
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
4
3
  import * as Schema from "effect/Schema";
4
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, MalformedRequestError, NamespaceId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared.js";
5
5
  // src/effect/generated/webhooks.ts
6
6
  const WebhookDeliveryCounts = /* @__PURE__ */ (() => Schema.Struct({
7
- total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
8
- pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
9
- delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
10
- exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
11
- cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
7
+ total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
8
+ pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
9
+ delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
10
+ exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
11
+ cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
12
12
  }).annotate({ identifier: "WebhookDeliveryCounts" }))();
13
13
  const WebhookDeliveryId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^whdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
14
14
  expected: "a string matching the RegExp ^whdel_[0-9a-hjkmnp-tv-z]{16,24}$",
@@ -24,10 +24,10 @@ const WebhookEventId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPatte
24
24
  })).pipe(Schema.brand("WebhookEventId")))();
25
25
  const WebhookDailyDeliveries = /* @__PURE__ */ (() => Schema.Struct({
26
26
  date: Schema.String,
27
- pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
28
- delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
29
- exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
30
- cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
27
+ pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
28
+ delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
29
+ exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
30
+ cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
31
31
  }).annotate({ identifier: "WebhookDailyDeliveries" }))();
32
32
  const WebhookSigningSecret = /* @__PURE__ */ (() => Schema.Struct({
33
33
  secret: SensitiveString,
@@ -170,7 +170,7 @@ const WebhookDeliveryPage = /* @__PURE__ */ (() => Schema.Struct({
170
170
  Schema.Literal("exhausted"),
171
171
  Schema.Literal("cancelled")
172
172
  ]),
173
- automaticAttempts: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
173
+ automaticAttempts: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
174
174
  nextAttemptAt: Schema.Union([Schema.String, Schema.Null]),
175
175
  completedAt: Schema.Union([Schema.String, Schema.Null]),
176
176
  createdAt: Schema.String,
@@ -184,7 +184,7 @@ const WebhookDeliveryPage = /* @__PURE__ */ (() => Schema.Struct({
184
184
  Schema.Literal("replay")
185
185
  ]),
186
186
  queueMessageId: Schema.Union([Schema.String, Schema.Null]),
187
- attemptNumber: 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" })),
187
+ attemptNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
188
188
  classification: Schema.Union([
189
189
  Schema.Literal("success"),
190
190
  Schema.Literal("http-error"),
@@ -194,7 +194,7 @@ const WebhookDeliveryPage = /* @__PURE__ */ (() => Schema.Struct({
194
194
  Schema.Literal("skipped")
195
195
  ]),
196
196
  attemptedAt: Schema.String,
197
- responseStatus: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
197
+ responseStatus: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
198
198
  responseHeaders: Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
199
199
  durationMs: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })), Schema.Null]),
200
200
  errorCode: Schema.Union([Schema.String, Schema.Null]),
@@ -205,11 +205,11 @@ const WebhookDeliveryPage = /* @__PURE__ */ (() => Schema.Struct({
205
205
  nextCursor: Schema.Union([Schema.String, Schema.Null])
206
206
  }).annotate({ identifier: "WebhookDeliveryPage" }))();
207
207
  const WebhookStatsResponse = /* @__PURE__ */ (() => Schema.Struct({
208
- total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
209
- pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
210
- delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
211
- exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
212
- cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
208
+ total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
209
+ pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
210
+ delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
211
+ exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
212
+ cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
213
213
  daily: Schema.Array(WebhookDailyDeliveries),
214
214
  latestAttempt: Schema.Union([Schema.Struct({
215
215
  errorCode: Schema.Union([Schema.String, Schema.Null]),
@@ -1,7 +1,7 @@
1
1
  import { SensitiveString } from "../runtime.js";
2
- import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId } from "./shared.js";
3
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
4
3
  import * as Schema from "effect/Schema";
4
+ import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId } from "./shared.js";
5
5
  // src/effect/generated/whats-app-flows.ts
6
6
  const WhatsAppFlowEndpoint = /* @__PURE__ */ (() => Schema.Struct({
7
7
  url: Schema.String,
@@ -15,8 +15,8 @@ const WhatsAppFlowValidationError = /* @__PURE__ */ (() => Schema.Struct({
15
15
  error: Schema.String,
16
16
  message: Schema.String,
17
17
  path: Schema.optionalKey(Schema.String),
18
- line: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))),
19
- column: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })))
18
+ line: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))),
19
+ column: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })))
20
20
  }).annotate({ identifier: "WhatsAppFlowValidationError" }))();
21
21
  const WhatsAppFlowEndpointAlert = /* @__PURE__ */ (() => Schema.Struct({
22
22
  kind: Schema.String,
@@ -39,7 +39,7 @@ const WhatsAppFlowEndpointSettings = /* @__PURE__ */ (() => Schema.Struct({
39
39
  const WhatsAppFlowVersion = /* @__PURE__ */ (() => Schema.Struct({
40
40
  id: WhatsAppFlowVersionId,
41
41
  flowId: WhatsAppFlowId,
42
- number: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
42
+ number: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
43
43
  commitSha: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
44
44
  digest: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
45
45
  jsonVersion: Schema.String,
@@ -51,7 +51,7 @@ const WhatsAppFlowRegistration = /* @__PURE__ */ (() => Schema.Struct({
51
51
  id: WhatsAppFlowRegistrationId,
52
52
  flowId: WhatsAppFlowId,
53
53
  versionId: WhatsAppFlowVersionId,
54
- versionNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
54
+ versionNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
55
55
  wabaId: Schema.String,
56
56
  providerFlowId: Schema.Union([Schema.String, Schema.Null]),
57
57
  name: Schema.String,
@@ -1,7 +1,7 @@
1
1
  import { SensitiveString } from "../runtime.js";
2
- import { ApiKeySecurityMiddleware, BillingProviderError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NamespaceId, OrganizationId, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError } from "./shared.js";
3
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
4
3
  import * as Schema from "effect/Schema";
4
+ import { ApiKeySecurityMiddleware, BillingProviderError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NamespaceId, OrganizationId, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError } from "./shared.js";
5
5
  // src/effect/generated/whats-app-setup-links.ts
6
6
  const WhatsAppSetupLinkStatus = /* @__PURE__ */ (() => Schema.Union([
7
7
  Schema.Literal("pending"),
@@ -120,11 +120,16 @@ export type WhatsappListBusinessAccounts200 = {
120
120
  readonly organizationId: string;
121
121
  readonly namespaceId: NamespaceId | null;
122
122
  readonly phoneNumber: string;
123
+ readonly phoneNumberDisplay: string;
123
124
  readonly phoneNumberId: string;
124
125
  readonly displayName: string;
125
126
  readonly whatsappBusinessAccountId: string;
126
127
  readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
127
128
  readonly credentialStatus: "active" | "reconnect_required";
129
+ readonly sendingLock: {
130
+ readonly lockedAt: string;
131
+ readonly reason: string;
132
+ } | null;
128
133
  readonly tokenExpiresAt: string | null;
129
134
  readonly isDefault: boolean;
130
135
  readonly webhookUrl: string | null;
@@ -150,11 +155,16 @@ export declare const WhatsappListBusinessAccounts200: Schema.Struct<{
150
155
  readonly organizationId: Schema.String;
151
156
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
152
157
  readonly phoneNumber: Schema.String;
158
+ readonly phoneNumberDisplay: Schema.String;
153
159
  readonly phoneNumberId: Schema.String;
154
160
  readonly displayName: Schema.String;
155
161
  readonly whatsappBusinessAccountId: Schema.String;
156
162
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
157
163
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
164
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
165
+ readonly lockedAt: Schema.String;
166
+ readonly reason: Schema.String;
167
+ }>, Schema.Null]>;
158
168
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
159
169
  readonly isDefault: Schema.Boolean;
160
170
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -203,11 +213,16 @@ export type WhatsappConnectBusinessAccount201 = {
203
213
  readonly organizationId: string;
204
214
  readonly namespaceId: NamespaceId | null;
205
215
  readonly phoneNumber: string;
216
+ readonly phoneNumberDisplay: string;
206
217
  readonly phoneNumberId: string;
207
218
  readonly displayName: string;
208
219
  readonly whatsappBusinessAccountId: string;
209
220
  readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
210
221
  readonly credentialStatus: "active" | "reconnect_required";
222
+ readonly sendingLock: {
223
+ readonly lockedAt: string;
224
+ readonly reason: string;
225
+ } | null;
211
226
  readonly tokenExpiresAt: string | null;
212
227
  readonly isDefault: boolean;
213
228
  readonly webhookUrl: string | null;
@@ -230,11 +245,16 @@ export declare const WhatsappConnectBusinessAccount201: Schema.Struct<{
230
245
  readonly organizationId: Schema.String;
231
246
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
232
247
  readonly phoneNumber: Schema.String;
248
+ readonly phoneNumberDisplay: Schema.String;
233
249
  readonly phoneNumberId: Schema.String;
234
250
  readonly displayName: Schema.String;
235
251
  readonly whatsappBusinessAccountId: Schema.String;
236
252
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
237
253
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
254
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
255
+ readonly lockedAt: Schema.String;
256
+ readonly reason: Schema.String;
257
+ }>, Schema.Null]>;
238
258
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
239
259
  readonly isDefault: Schema.Boolean;
240
260
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -283,11 +303,16 @@ export type WhatsappGetBusinessAccount200 = {
283
303
  readonly organizationId: string;
284
304
  readonly namespaceId: NamespaceId | null;
285
305
  readonly phoneNumber: string;
306
+ readonly phoneNumberDisplay: string;
286
307
  readonly phoneNumberId: string;
287
308
  readonly displayName: string;
288
309
  readonly whatsappBusinessAccountId: string;
289
310
  readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
290
311
  readonly credentialStatus: "active" | "reconnect_required";
312
+ readonly sendingLock: {
313
+ readonly lockedAt: string;
314
+ readonly reason: string;
315
+ } | null;
291
316
  readonly tokenExpiresAt: string | null;
292
317
  readonly isDefault: boolean;
293
318
  readonly webhookUrl: string | null;
@@ -310,11 +335,16 @@ export declare const WhatsappGetBusinessAccount200: Schema.Struct<{
310
335
  readonly organizationId: Schema.String;
311
336
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
312
337
  readonly phoneNumber: Schema.String;
338
+ readonly phoneNumberDisplay: Schema.String;
313
339
  readonly phoneNumberId: Schema.String;
314
340
  readonly displayName: Schema.String;
315
341
  readonly whatsappBusinessAccountId: Schema.String;
316
342
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
317
343
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
344
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
345
+ readonly lockedAt: Schema.String;
346
+ readonly reason: Schema.String;
347
+ }>, Schema.Null]>;
318
348
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
319
349
  readonly isDefault: Schema.Boolean;
320
350
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -391,11 +421,16 @@ export type WhatsappUpdateBusinessAccount200 = {
391
421
  readonly organizationId: string;
392
422
  readonly namespaceId: NamespaceId | null;
393
423
  readonly phoneNumber: string;
424
+ readonly phoneNumberDisplay: string;
394
425
  readonly phoneNumberId: string;
395
426
  readonly displayName: string;
396
427
  readonly whatsappBusinessAccountId: string;
397
428
  readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
398
429
  readonly credentialStatus: "active" | "reconnect_required";
430
+ readonly sendingLock: {
431
+ readonly lockedAt: string;
432
+ readonly reason: string;
433
+ } | null;
399
434
  readonly tokenExpiresAt: string | null;
400
435
  readonly isDefault: boolean;
401
436
  readonly webhookUrl: string | null;
@@ -418,11 +453,16 @@ export declare const WhatsappUpdateBusinessAccount200: Schema.Struct<{
418
453
  readonly organizationId: Schema.String;
419
454
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
420
455
  readonly phoneNumber: Schema.String;
456
+ readonly phoneNumberDisplay: Schema.String;
421
457
  readonly phoneNumberId: Schema.String;
422
458
  readonly displayName: Schema.String;
423
459
  readonly whatsappBusinessAccountId: Schema.String;
424
460
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
425
461
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
462
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
463
+ readonly lockedAt: Schema.String;
464
+ readonly reason: Schema.String;
465
+ }>, Schema.Null]>;
426
466
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
427
467
  readonly isDefault: Schema.Boolean;
428
468
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -465,11 +505,16 @@ export type WhatsappSetDefaultBusinessAccount200 = {
465
505
  readonly organizationId: string;
466
506
  readonly namespaceId: NamespaceId | null;
467
507
  readonly phoneNumber: string;
508
+ readonly phoneNumberDisplay: string;
468
509
  readonly phoneNumberId: string;
469
510
  readonly displayName: string;
470
511
  readonly whatsappBusinessAccountId: string;
471
512
  readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
472
513
  readonly credentialStatus: "active" | "reconnect_required";
514
+ readonly sendingLock: {
515
+ readonly lockedAt: string;
516
+ readonly reason: string;
517
+ } | null;
473
518
  readonly tokenExpiresAt: string | null;
474
519
  readonly isDefault: boolean;
475
520
  readonly webhookUrl: string | null;
@@ -492,11 +537,16 @@ export declare const WhatsappSetDefaultBusinessAccount200: Schema.Struct<{
492
537
  readonly organizationId: Schema.String;
493
538
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
494
539
  readonly phoneNumber: Schema.String;
540
+ readonly phoneNumberDisplay: Schema.String;
495
541
  readonly phoneNumberId: Schema.String;
496
542
  readonly displayName: Schema.String;
497
543
  readonly whatsappBusinessAccountId: Schema.String;
498
544
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
499
545
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
546
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
547
+ readonly lockedAt: Schema.String;
548
+ readonly reason: Schema.String;
549
+ }>, Schema.Null]>;
500
550
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
501
551
  readonly isDefault: Schema.Boolean;
502
552
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -769,11 +819,16 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
769
819
  readonly organizationId: Schema.String;
770
820
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
771
821
  readonly phoneNumber: Schema.String;
822
+ readonly phoneNumberDisplay: Schema.String;
772
823
  readonly phoneNumberId: Schema.String;
773
824
  readonly displayName: Schema.String;
774
825
  readonly whatsappBusinessAccountId: Schema.String;
775
826
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
776
827
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
828
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
829
+ readonly lockedAt: Schema.String;
830
+ readonly reason: Schema.String;
831
+ }>, Schema.Null]>;
777
832
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
778
833
  readonly isDefault: Schema.Boolean;
779
834
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1045,11 +1100,16 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
1045
1100
  readonly organizationId: Schema.String;
1046
1101
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1047
1102
  readonly phoneNumber: Schema.String;
1103
+ readonly phoneNumberDisplay: Schema.String;
1048
1104
  readonly phoneNumberId: Schema.String;
1049
1105
  readonly displayName: Schema.String;
1050
1106
  readonly whatsappBusinessAccountId: Schema.String;
1051
1107
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
1052
1108
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
1109
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
1110
+ readonly lockedAt: Schema.String;
1111
+ readonly reason: Schema.String;
1112
+ }>, Schema.Null]>;
1053
1113
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1054
1114
  readonly isDefault: Schema.Boolean;
1055
1115
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1705,11 +1765,16 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
1705
1765
  readonly organizationId: Schema.String;
1706
1766
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1707
1767
  readonly phoneNumber: Schema.String;
1768
+ readonly phoneNumberDisplay: Schema.String;
1708
1769
  readonly phoneNumberId: Schema.String;
1709
1770
  readonly displayName: Schema.String;
1710
1771
  readonly whatsappBusinessAccountId: Schema.String;
1711
1772
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
1712
1773
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
1774
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
1775
+ readonly lockedAt: Schema.String;
1776
+ readonly reason: Schema.String;
1777
+ }>, Schema.Null]>;
1713
1778
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1714
1779
  readonly isDefault: Schema.Boolean;
1715
1780
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1815,11 +1880,16 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
1815
1880
  readonly organizationId: Schema.String;
1816
1881
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1817
1882
  readonly phoneNumber: Schema.String;
1883
+ readonly phoneNumberDisplay: Schema.String;
1818
1884
  readonly phoneNumberId: Schema.String;
1819
1885
  readonly displayName: Schema.String;
1820
1886
  readonly whatsappBusinessAccountId: Schema.String;
1821
1887
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
1822
1888
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
1889
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
1890
+ readonly lockedAt: Schema.String;
1891
+ readonly reason: Schema.String;
1892
+ }>, Schema.Null]>;
1823
1893
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1824
1894
  readonly isDefault: Schema.Boolean;
1825
1895
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2084,11 +2154,16 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
2084
2154
  readonly organizationId: Schema.String;
2085
2155
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2086
2156
  readonly phoneNumber: Schema.String;
2157
+ readonly phoneNumberDisplay: Schema.String;
2087
2158
  readonly phoneNumberId: Schema.String;
2088
2159
  readonly displayName: Schema.String;
2089
2160
  readonly whatsappBusinessAccountId: Schema.String;
2090
2161
  readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
2091
2162
  readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
2163
+ readonly sendingLock: Schema.Union<readonly [Schema.Struct<{
2164
+ readonly lockedAt: Schema.String;
2165
+ readonly reason: Schema.String;
2166
+ }>, Schema.Null]>;
2092
2167
  readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2093
2168
  readonly isDefault: Schema.Boolean;
2094
2169
  readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;