samva 0.33.0 → 0.35.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 (117) hide show
  1. package/README.md +1 -1
  2. package/dist/client/sdk.gen.d.ts +225 -251
  3. package/dist/client/sdk.gen.js +85 -211
  4. package/dist/client/types.gen.d.ts +2897 -403
  5. package/dist/effect/agents.d.ts +28 -13
  6. package/dist/effect/agents.js +5 -1
  7. package/dist/effect/analytics.d.ts +15 -15
  8. package/dist/effect/api-keys.d.ts +27 -18
  9. package/dist/effect/campaigns.d.ts +721 -65
  10. package/dist/effect/categories.d.ts +3 -3
  11. package/dist/effect/contact-groups.d.ts +15 -15
  12. package/dist/effect/contacts.d.ts +56 -52
  13. package/dist/effect/conversations.d.ts +45 -45
  14. package/dist/effect/email.d.ts +82 -82
  15. package/dist/effect/errors.d.ts +1 -1
  16. package/dist/effect/errors.js +2 -2
  17. package/dist/effect/extension-installations.d.ts +11 -11
  18. package/dist/effect/extensions.d.ts +16 -16
  19. package/dist/effect/generated/agents.d.ts +1063 -33
  20. package/dist/effect/generated/agents.js +133 -11
  21. package/dist/effect/generated/analytics.d.ts +109 -136
  22. package/dist/effect/generated/analytics.js +65 -36
  23. package/dist/effect/generated/api-keys.d.ts +240 -19
  24. package/dist/effect/generated/api-keys.js +24 -8
  25. package/dist/effect/generated/attachments.d.ts +89 -1
  26. package/dist/effect/generated/attachments.js +10 -2
  27. package/dist/effect/generated/brands.d.ts +133 -1
  28. package/dist/effect/generated/brands.js +22 -10
  29. package/dist/effect/generated/campaigns.d.ts +1442 -140
  30. package/dist/effect/generated/campaigns.js +82 -20
  31. package/dist/effect/generated/contact-events.d.ts +26 -4
  32. package/dist/effect/generated/contact-events.js +5 -3
  33. package/dist/effect/generated/contact-groups.d.ts +233 -13
  34. package/dist/effect/generated/contact-groups.js +33 -17
  35. package/dist/effect/generated/contacts.d.ts +634 -96
  36. package/dist/effect/generated/contacts.js +82 -20
  37. package/dist/effect/generated/conversations.d.ts +398 -106
  38. package/dist/effect/generated/conversations.js +96 -22
  39. package/dist/effect/generated/custom-fields.d.ts +89 -1
  40. package/dist/effect/generated/custom-fields.js +11 -3
  41. package/dist/effect/generated/email.d.ts +1447 -83
  42. package/dist/effect/generated/email.js +167 -43
  43. package/dist/effect/generated/events.d.ts +51 -7
  44. package/dist/effect/generated/events.js +9 -5
  45. package/dist/effect/generated/extension-installations.d.ts +208 -10
  46. package/dist/effect/generated/extension-installations.js +26 -8
  47. package/dist/effect/generated/extensions.d.ts +123 -13
  48. package/dist/effect/generated/extensions.js +20 -10
  49. package/dist/effect/generated/feedback.d.ts +23 -1
  50. package/dist/effect/generated/feedback.js +6 -4
  51. package/dist/effect/generated/journeys.d.ts +684 -16
  52. package/dist/effect/generated/journeys.js +37 -9
  53. package/dist/effect/generated/mailboxes.d.ts +3085 -627
  54. package/dist/effect/generated/mailboxes.js +340 -141
  55. package/dist/effect/generated/media.d.ts +125 -15
  56. package/dist/effect/generated/media.js +15 -2
  57. package/dist/effect/generated/messages.d.ts +2036 -117
  58. package/dist/effect/generated/messages.js +286 -54
  59. package/dist/effect/generated/namespaces.d.ts +209 -25
  60. package/dist/effect/generated/namespaces.js +27 -9
  61. package/dist/effect/generated/newsletter-domains.d.ts +98 -12
  62. package/dist/effect/generated/newsletter-domains.js +20 -13
  63. package/dist/effect/generated/newsletter-issues.d.ts +354 -19
  64. package/dist/effect/generated/newsletter-issues.js +162 -98
  65. package/dist/effect/generated/newsletters.d.ts +123 -13
  66. package/dist/effect/generated/newsletters.js +19 -9
  67. package/dist/effect/generated/operations.d.ts +76 -10
  68. package/dist/effect/generated/operations.js +12 -6
  69. package/dist/effect/generated/organizations.d.ts +287 -7
  70. package/dist/effect/generated/organizations.js +33 -5
  71. package/dist/effect/generated/scheduled-messages.d.ts +4427 -99
  72. package/dist/effect/generated/scheduled-messages.js +71 -12
  73. package/dist/effect/generated/shared.d.ts +2213 -190
  74. package/dist/effect/generated/shared.js +527 -76
  75. package/dist/effect/generated/subscriptions.d.ts +23 -1
  76. package/dist/effect/generated/subscriptions.js +6 -4
  77. package/dist/effect/generated/templates.d.ts +1718 -136
  78. package/dist/effect/generated/templates.js +421 -226
  79. package/dist/effect/generated/topic-forms.d.ts +111 -1
  80. package/dist/effect/generated/topic-forms.js +23 -13
  81. package/dist/effect/generated/topics.d.ts +353 -43
  82. package/dist/effect/generated/topics.js +67 -19
  83. package/dist/effect/generated/webhooks.d.ts +308 -46
  84. package/dist/effect/generated/webhooks.js +67 -19
  85. package/dist/effect/generated/whoami.d.ts +35 -1
  86. package/dist/effect/generated/whoami.js +4 -2
  87. package/dist/effect/generated-metadata.d.ts +20 -0
  88. package/dist/effect/generated-metadata.js +10 -0
  89. package/dist/effect/index.js +2 -2
  90. package/dist/effect/internal/client.js +1 -1
  91. package/dist/effect/internal/email-sender.d.ts +1 -1
  92. package/dist/effect/internal/send.d.ts +1 -1
  93. package/dist/effect/journeys.d.ts +105 -19
  94. package/dist/effect/mailboxes.d.ts +405 -174
  95. package/dist/effect/media.d.ts +1 -1
  96. package/dist/effect/messages.d.ts +40 -40
  97. package/dist/effect/namespaces.d.ts +15 -15
  98. package/dist/effect/newsletter-domains.d.ts +5 -5
  99. package/dist/effect/newsletters.d.ts +1 -1
  100. package/dist/effect/operations.d.ts +11 -11
  101. package/dist/effect/organizations.d.ts +2 -2
  102. package/dist/effect/scheduled-messages.d.ts +863 -8
  103. package/dist/effect/templates.d.ts +37 -37
  104. package/dist/effect/topics.d.ts +21 -21
  105. package/dist/effect/webhooks.d.ts +28 -26
  106. package/dist/index.js +2 -2
  107. package/dist/normalize.js +13 -1
  108. package/dist/package.js +1 -1
  109. package/dist/promises/client.d.ts +1 -1
  110. package/dist/promises/client.js +2 -2
  111. package/dist/promises/errors.gen.d.ts +22 -2
  112. package/dist/promises/errors.gen.js +60 -2
  113. package/dist/promises/index.js +2 -2
  114. package/dist/promises/types.gen.d.ts +1 -1
  115. package/dist/service-map.d.ts +9 -0
  116. package/dist/service-map.js +5 -0
  117. package/package.json +9 -8
@@ -1,5 +1,5 @@
1
1
  import { SensitiveString } from "../runtime.js";
2
- import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, NamespaceId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared.js";
2
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, MalformedRequestError, NamespaceId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared.js";
3
3
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
4
4
  import * as Schema from "effect/Schema";
5
5
  // src/effect/generated/webhooks.ts
@@ -10,15 +10,15 @@ const WebhookDeliveryCounts = /* @__PURE__ */ (() => Schema.Struct({
10
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
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" }))
12
12
  }).annotate({ identifier: "WebhookDeliveryCounts" }))();
13
- const WebhookDeliveryId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^whdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
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}$",
15
15
  identifier: "WebhookDeliveryId"
16
16
  })).pipe(Schema.brand("WebhookDeliveryId")))();
17
- const WebhookAttemptId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^whatt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
17
+ const WebhookAttemptId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^whatt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
18
18
  expected: "a string matching the RegExp ^whatt_[0-9a-hjkmnp-tv-z]{16,24}$",
19
19
  identifier: "WebhookAttemptId"
20
20
  })).pipe(Schema.brand("WebhookAttemptId")))();
21
- const WebhookEventId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^whevt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
21
+ const WebhookEventId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^whevt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
22
22
  expected: "a string matching the RegExp ^whevt_[0-9a-hjkmnp-tv-z]{16,24}$",
23
23
  identifier: "WebhookEventId"
24
24
  })).pipe(Schema.brand("WebhookEventId")))();
@@ -79,7 +79,11 @@ const WebhookEndpoint = /* @__PURE__ */ (() => Schema.Struct({
79
79
  Schema.Literal("mailbox.message.failed"),
80
80
  Schema.Literal("journey.webhook")
81
81
  ])),
82
- channels: Schema.Union([Schema.Array(Schema.Literal("email")), Schema.Null]),
82
+ channels: Schema.Union([Schema.Array(Schema.Union([
83
+ Schema.Literal("sms"),
84
+ Schema.Literal("whatsapp"),
85
+ Schema.Literal("email")
86
+ ])), Schema.Null]),
83
87
  mailboxIds: Schema.Union([Schema.Array(MailboxId), Schema.Null]),
84
88
  namespaceId: Schema.Union([NamespaceId, Schema.Null]),
85
89
  status: Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]),
@@ -134,7 +138,11 @@ const WebhookEndpointListItem = /* @__PURE__ */ (() => Schema.Struct({
134
138
  Schema.Literal("mailbox.message.failed"),
135
139
  Schema.Literal("journey.webhook")
136
140
  ])),
137
- channels: Schema.Union([Schema.Array(Schema.Literal("email")), Schema.Null]),
141
+ channels: Schema.Union([Schema.Array(Schema.Union([
142
+ Schema.Literal("sms"),
143
+ Schema.Literal("whatsapp"),
144
+ Schema.Literal("email")
145
+ ])), Schema.Null]),
138
146
  mailboxIds: Schema.Union([Schema.Array(MailboxId), Schema.Null]),
139
147
  namespaceId: Schema.Union([NamespaceId, Schema.Null]),
140
148
  status: Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]),
@@ -166,14 +174,20 @@ const WebhookDeliveryPage = /* @__PURE__ */ (() => Schema.Struct({
166
174
  attempts: Schema.Array(Schema.Struct({
167
175
  id: WebhookAttemptId,
168
176
  deliveryId: WebhookDeliveryId,
169
- kind: Schema.Union([Schema.Literal("automatic"), Schema.Literal("manual")]),
177
+ kind: Schema.Union([
178
+ Schema.Literal("automatic"),
179
+ Schema.Literal("manual"),
180
+ Schema.Literal("replay")
181
+ ]),
182
+ queueMessageId: Schema.Union([Schema.String, Schema.Null]),
170
183
  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" })),
171
184
  classification: Schema.Union([
172
185
  Schema.Literal("success"),
173
186
  Schema.Literal("http-error"),
174
187
  Schema.Literal("network-error"),
175
188
  Schema.Literal("timeout"),
176
- Schema.Literal("cancelled")
189
+ Schema.Literal("cancelled"),
190
+ Schema.Literal("skipped")
177
191
  ]),
178
192
  attemptedAt: Schema.String,
179
193
  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]),
@@ -192,7 +206,11 @@ const WebhookStatsResponse = /* @__PURE__ */ (() => Schema.Struct({
192
206
  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" })),
193
207
  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" })),
194
208
  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" })),
195
- daily: Schema.Array(WebhookDailyDeliveries)
209
+ daily: Schema.Array(WebhookDailyDeliveries),
210
+ latestAttempt: Schema.Union([Schema.Struct({
211
+ errorCode: Schema.Union([Schema.String, Schema.Null]),
212
+ completedAt: Schema.String
213
+ }), Schema.Null])
196
214
  }).annotate({ identifier: "WebhookStatsResponse" }))();
197
215
  const WebhookEndpointPage = /* @__PURE__ */ (() => Schema.Struct({
198
216
  items: Schema.Array(WebhookEndpointListItem),
@@ -200,11 +218,12 @@ const WebhookEndpointPage = /* @__PURE__ */ (() => Schema.Struct({
200
218
  }).annotate({ identifier: "WebhookEndpointPage" }))();
201
219
  const WebhooksListQuery = /* @__PURE__ */ (() => Schema.Struct({
202
220
  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])),
203
- cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
204
- search: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
205
- status: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]), Schema.Null]))
221
+ cursor: Schema.optionalKey(Schema.String),
222
+ search: Schema.optionalKey(Schema.String),
223
+ status: Schema.optionalKey(Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]))
206
224
  }))();
207
225
  const WebhooksList200 = WebhookEndpointPage;
226
+ const WebhooksList400 = MalformedRequestError;
208
227
  const WebhooksList401 = UnauthorizedError;
209
228
  const WebhooksList403 = ForbiddenError;
210
229
  const WebhooksList422 = ValidationError;
@@ -254,7 +273,11 @@ const WebhooksCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
254
273
  Schema.Literal("mailbox.message.failed"),
255
274
  Schema.Literal("journey.webhook")
256
275
  ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
257
- channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Literal("email")).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
276
+ channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([
277
+ Schema.Literal("sms"),
278
+ Schema.Literal("whatsapp"),
279
+ Schema.Literal("email")
280
+ ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
258
281
  mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
259
282
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
260
283
  headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
@@ -264,6 +287,7 @@ const WebhooksCreate201 = /* @__PURE__ */ (() => Schema.Struct({
264
287
  endpoint: WebhookEndpoint,
265
288
  secret: SensitiveString
266
289
  }))();
290
+ const WebhooksCreate400 = MalformedRequestError;
267
291
  const WebhooksCreate401 = UnauthorizedError;
268
292
  const WebhooksCreate402 = PaymentRequiredError;
269
293
  const WebhooksCreate403 = ForbiddenError;
@@ -275,6 +299,7 @@ const WebhooksCreate502 = BillingProviderError;
275
299
  const WebhooksCreate504 = GatewayTimeoutError;
276
300
  const WebhooksGetPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
277
301
  const WebhooksGet200 = WebhookEndpoint;
302
+ const WebhooksGet400 = MalformedRequestError;
278
303
  const WebhooksGet401 = UnauthorizedError;
279
304
  const WebhooksGet403 = ForbiddenError;
280
305
  const WebhooksGet404 = ResourceNotFoundError;
@@ -283,6 +308,7 @@ const WebhooksGet500 = InternalError;
283
308
  const WebhooksGet504 = GatewayTimeoutError;
284
309
  const WebhooksRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
285
310
  const WebhooksRemove200 = SuccessResponse;
311
+ const WebhooksRemove400 = MalformedRequestError;
286
312
  const WebhooksRemove401 = UnauthorizedError;
287
313
  const WebhooksRemove403 = ForbiddenError;
288
314
  const WebhooksRemove404 = ResourceNotFoundError;
@@ -335,13 +361,18 @@ const WebhooksUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
335
361
  Schema.Literal("mailbox.message.failed"),
336
362
  Schema.Literal("journey.webhook")
337
363
  ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
338
- channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Literal("email")).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
364
+ channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([
365
+ Schema.Literal("sms"),
366
+ Schema.Literal("whatsapp"),
367
+ Schema.Literal("email")
368
+ ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
339
369
  mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
340
370
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
341
371
  headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
342
372
  status: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]), Schema.Null]))
343
373
  }))();
344
374
  const WebhooksUpdate200 = WebhookEndpoint;
375
+ const WebhooksUpdate400 = MalformedRequestError;
345
376
  const WebhooksUpdate401 = UnauthorizedError;
346
377
  const WebhooksUpdate403 = ForbiddenError;
347
378
  const WebhooksUpdate404 = ResourceNotFoundError;
@@ -359,6 +390,7 @@ const WebhooksRetryDelivery200 = /* @__PURE__ */ (() => Schema.Struct({
359
390
  attemptId: WebhookAttemptId,
360
391
  outcome: Schema.Union([Schema.Literal("succeeded"), Schema.Literal("failed")])
361
392
  }))();
393
+ const WebhooksRetryDelivery400 = MalformedRequestError;
362
394
  const WebhooksRetryDelivery401 = UnauthorizedError;
363
395
  const WebhooksRetryDelivery403 = ForbiddenError;
364
396
  const WebhooksRetryDelivery404 = ResourceNotFoundError;
@@ -369,9 +401,10 @@ const WebhooksRetryDelivery504 = GatewayTimeoutError;
369
401
  const WebhooksGetLogsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
370
402
  const WebhooksGetLogsQuery = /* @__PURE__ */ (() => Schema.Struct({
371
403
  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])),
372
- cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
404
+ cursor: Schema.optionalKey(Schema.String)
373
405
  }))();
374
406
  const WebhooksGetLogs200 = WebhookDeliveryPage;
407
+ const WebhooksGetLogs400 = MalformedRequestError;
375
408
  const WebhooksGetLogs401 = UnauthorizedError;
376
409
  const WebhooksGetLogs403 = ForbiddenError;
377
410
  const WebhooksGetLogs404 = ResourceNotFoundError;
@@ -380,6 +413,7 @@ const WebhooksGetLogs500 = InternalError;
380
413
  const WebhooksGetLogs504 = GatewayTimeoutError;
381
414
  const WebhooksRegenerateSecretPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
382
415
  const WebhooksRegenerateSecret200 = /* @__PURE__ */ (() => Schema.Struct({ secret: SensitiveString }))();
416
+ const WebhooksRegenerateSecret400 = MalformedRequestError;
383
417
  const WebhooksRegenerateSecret401 = UnauthorizedError;
384
418
  const WebhooksRegenerateSecret403 = ForbiddenError;
385
419
  const WebhooksRegenerateSecret404 = ResourceNotFoundError;
@@ -388,6 +422,7 @@ const WebhooksRegenerateSecret500 = InternalError;
388
422
  const WebhooksRegenerateSecret504 = GatewayTimeoutError;
389
423
  const WebhooksGetSecretPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
390
424
  const WebhooksGetSecret200 = WebhookSigningSecret;
425
+ const WebhooksGetSecret400 = MalformedRequestError;
391
426
  const WebhooksGetSecret401 = UnauthorizedError;
392
427
  const WebhooksGetSecret403 = ForbiddenError;
393
428
  const WebhooksGetSecret404 = ResourceNotFoundError;
@@ -396,10 +431,11 @@ const WebhooksGetSecret500 = InternalError;
396
431
  const WebhooksGetSecret504 = GatewayTimeoutError;
397
432
  const WebhooksGetStatsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
398
433
  const WebhooksGetStatsQuery = /* @__PURE__ */ (() => Schema.Struct({
399
- after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
400
- before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
434
+ after: Schema.optionalKey(Schema.String),
435
+ before: Schema.optionalKey(Schema.String)
401
436
  }))();
402
437
  const WebhooksGetStats200 = WebhookStatsResponse;
438
+ const WebhooksGetStats400 = MalformedRequestError;
403
439
  const WebhooksGetStats401 = UnauthorizedError;
404
440
  const WebhooksGetStats403 = ForbiddenError;
405
441
  const WebhooksGetStats404 = ResourceNotFoundError;
@@ -413,6 +449,7 @@ const WebhooksTest202 = /* @__PURE__ */ (() => Schema.Struct({
413
449
  eventId: WebhookEventId,
414
450
  deliveryId: WebhookDeliveryId
415
451
  }))();
452
+ const WebhooksTest400 = MalformedRequestError;
416
453
  const WebhooksTest401 = UnauthorizedError;
417
454
  const WebhooksTest403 = ForbiddenError;
418
455
  const WebhooksTest404 = ResourceNotFoundError;
@@ -423,6 +460,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
423
460
  query: WebhooksListQuery,
424
461
  success: WebhooksList200,
425
462
  error: [
463
+ WebhooksList400.pipe(HttpApiSchema.status(400)),
426
464
  WebhooksList401.pipe(HttpApiSchema.status(401)),
427
465
  WebhooksList403.pipe(HttpApiSchema.status(403)),
428
466
  WebhooksList422.pipe(HttpApiSchema.status(422)),
@@ -433,6 +471,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
433
471
  payload: WebhooksCreateRequestJson,
434
472
  success: WebhooksCreate201.pipe(HttpApiSchema.status(201)),
435
473
  error: [
474
+ WebhooksCreate400.pipe(HttpApiSchema.status(400)),
436
475
  WebhooksCreate401.pipe(HttpApiSchema.status(401)),
437
476
  WebhooksCreate402.pipe(HttpApiSchema.status(402)),
438
477
  WebhooksCreate403.pipe(HttpApiSchema.status(403)),
@@ -447,6 +486,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
447
486
  params: WebhooksGetPathParams,
448
487
  success: WebhooksGet200,
449
488
  error: [
489
+ WebhooksGet400.pipe(HttpApiSchema.status(400)),
450
490
  WebhooksGet401.pipe(HttpApiSchema.status(401)),
451
491
  WebhooksGet403.pipe(HttpApiSchema.status(403)),
452
492
  WebhooksGet404.pipe(HttpApiSchema.status(404)),
@@ -458,6 +498,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
458
498
  params: WebhooksRemovePathParams,
459
499
  success: WebhooksRemove200,
460
500
  error: [
501
+ WebhooksRemove400.pipe(HttpApiSchema.status(400)),
461
502
  WebhooksRemove401.pipe(HttpApiSchema.status(401)),
462
503
  WebhooksRemove403.pipe(HttpApiSchema.status(403)),
463
504
  WebhooksRemove404.pipe(HttpApiSchema.status(404)),
@@ -471,6 +512,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
471
512
  payload: WebhooksUpdateRequestJson,
472
513
  success: WebhooksUpdate200,
473
514
  error: [
515
+ WebhooksUpdate400.pipe(HttpApiSchema.status(400)),
474
516
  WebhooksUpdate401.pipe(HttpApiSchema.status(401)),
475
517
  WebhooksUpdate403.pipe(HttpApiSchema.status(403)),
476
518
  WebhooksUpdate404.pipe(HttpApiSchema.status(404)),
@@ -483,6 +525,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
483
525
  params: WebhooksRetryDeliveryPathParams,
484
526
  success: WebhooksRetryDelivery200,
485
527
  error: [
528
+ WebhooksRetryDelivery400.pipe(HttpApiSchema.status(400)),
486
529
  WebhooksRetryDelivery401.pipe(HttpApiSchema.status(401)),
487
530
  WebhooksRetryDelivery403.pipe(HttpApiSchema.status(403)),
488
531
  WebhooksRetryDelivery404.pipe(HttpApiSchema.status(404)),
@@ -496,6 +539,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
496
539
  query: WebhooksGetLogsQuery,
497
540
  success: WebhooksGetLogs200,
498
541
  error: [
542
+ WebhooksGetLogs400.pipe(HttpApiSchema.status(400)),
499
543
  WebhooksGetLogs401.pipe(HttpApiSchema.status(401)),
500
544
  WebhooksGetLogs403.pipe(HttpApiSchema.status(403)),
501
545
  WebhooksGetLogs404.pipe(HttpApiSchema.status(404)),
@@ -503,10 +547,11 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
503
547
  WebhooksGetLogs500,
504
548
  WebhooksGetLogs504.pipe(HttpApiSchema.status(504))
505
549
  ]
506
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.getLogs").annotate(OpenApi.Summary, "List webhook delivery logs").annotate(OpenApi.Description, "Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("webhooksRegenerateSecret", "/v1/webhooks/:id/rotate-secret", {
550
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.getLogs").annotate(OpenApi.Summary, "List webhook delivery logs").annotate(OpenApi.Description, "Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. A replay of a terminal delivery records a skipped replay receipt without another HTTP request or a change to its automatic retry lifecycle. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("webhooksRegenerateSecret", "/v1/webhooks/:id/rotate-secret", {
507
551
  params: WebhooksRegenerateSecretPathParams,
508
552
  success: WebhooksRegenerateSecret200,
509
553
  error: [
554
+ WebhooksRegenerateSecret400.pipe(HttpApiSchema.status(400)),
510
555
  WebhooksRegenerateSecret401.pipe(HttpApiSchema.status(401)),
511
556
  WebhooksRegenerateSecret403.pipe(HttpApiSchema.status(403)),
512
557
  WebhooksRegenerateSecret404.pipe(HttpApiSchema.status(404)),
@@ -518,6 +563,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
518
563
  params: WebhooksGetSecretPathParams,
519
564
  success: WebhooksGetSecret200,
520
565
  error: [
566
+ WebhooksGetSecret400.pipe(HttpApiSchema.status(400)),
521
567
  WebhooksGetSecret401.pipe(HttpApiSchema.status(401)),
522
568
  WebhooksGetSecret403.pipe(HttpApiSchema.status(403)),
523
569
  WebhooksGetSecret404.pipe(HttpApiSchema.status(404)),
@@ -530,6 +576,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
530
576
  query: WebhooksGetStatsQuery,
531
577
  success: WebhooksGetStats200,
532
578
  error: [
579
+ WebhooksGetStats400.pipe(HttpApiSchema.status(400)),
533
580
  WebhooksGetStats401.pipe(HttpApiSchema.status(401)),
534
581
  WebhooksGetStats403.pipe(HttpApiSchema.status(403)),
535
582
  WebhooksGetStats404.pipe(HttpApiSchema.status(404)),
@@ -542,6 +589,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
542
589
  payload: WebhooksTestRequestJson,
543
590
  success: WebhooksTest202.pipe(HttpApiSchema.status(202)),
544
591
  error: [
592
+ WebhooksTest400.pipe(HttpApiSchema.status(400)),
545
593
  WebhooksTest401.pipe(HttpApiSchema.status(401)),
546
594
  WebhooksTest403.pipe(HttpApiSchema.status(403)),
547
595
  WebhooksTest404.pipe(HttpApiSchema.status(404)),
@@ -550,6 +598,6 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
550
598
  WebhooksTest504.pipe(HttpApiSchema.status(504))
551
599
  ]
552
600
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.test").annotate(OpenApi.Summary, "Send a test webhook delivery").annotate(OpenApi.Description, "Queues a signed webhook.test event through the normal delivery and retry lifecycle.")).annotate(OpenApi.Description, "Customer event webhook management, testing, and delivery logs") {};
553
- export { WebhookAttemptId, WebhookDailyDeliveries, WebhookDeliveryCounts, WebhookDeliveryId, WebhookDeliveryPage, WebhookEndpoint, WebhookEndpointListItem, WebhookEndpointPage, WebhookEventId, WebhookSigningSecret, WebhookStatsResponse, WebhooksCreate201, WebhooksCreate401, WebhooksCreate402, WebhooksCreate403, WebhooksCreate404, WebhooksCreate409, WebhooksCreate422, WebhooksCreate500, WebhooksCreate502, WebhooksCreate504, WebhooksCreateRequestJson, WebhooksGet200, WebhooksGet401, WebhooksGet403, WebhooksGet404, WebhooksGet422, WebhooksGet500, WebhooksGet504, WebhooksGetLogs200, WebhooksGetLogs401, WebhooksGetLogs403, WebhooksGetLogs404, WebhooksGetLogs422, WebhooksGetLogs500, WebhooksGetLogs504, WebhooksGetLogsPathParams, WebhooksGetLogsQuery, WebhooksGetPathParams, WebhooksGetSecret200, WebhooksGetSecret401, WebhooksGetSecret403, WebhooksGetSecret404, WebhooksGetSecret422, WebhooksGetSecret500, WebhooksGetSecret504, WebhooksGetSecretPathParams, WebhooksGetStats200, WebhooksGetStats401, WebhooksGetStats403, WebhooksGetStats404, WebhooksGetStats422, WebhooksGetStats500, WebhooksGetStats504, WebhooksGetStatsPathParams, WebhooksGetStatsQuery, WebhooksGroup, WebhooksList200, WebhooksList401, WebhooksList403, WebhooksList422, WebhooksList500, WebhooksList504, WebhooksListQuery, WebhooksRegenerateSecret200, WebhooksRegenerateSecret401, WebhooksRegenerateSecret403, WebhooksRegenerateSecret404, WebhooksRegenerateSecret422, WebhooksRegenerateSecret500, WebhooksRegenerateSecret504, WebhooksRegenerateSecretPathParams, WebhooksRemove200, WebhooksRemove401, WebhooksRemove403, WebhooksRemove404, WebhooksRemove422, WebhooksRemove500, WebhooksRemove502, WebhooksRemove504, WebhooksRemovePathParams, WebhooksRetryDelivery200, WebhooksRetryDelivery401, WebhooksRetryDelivery403, WebhooksRetryDelivery404, WebhooksRetryDelivery422, WebhooksRetryDelivery429, WebhooksRetryDelivery500, WebhooksRetryDelivery504, WebhooksRetryDeliveryPathParams, WebhooksTest202, WebhooksTest401, WebhooksTest403, WebhooksTest404, WebhooksTest422, WebhooksTest500, WebhooksTest504, WebhooksTestPathParams, WebhooksTestRequestJson, WebhooksUpdate200, WebhooksUpdate401, WebhooksUpdate403, WebhooksUpdate404, WebhooksUpdate409, WebhooksUpdate422, WebhooksUpdate500, WebhooksUpdate504, WebhooksUpdatePathParams, WebhooksUpdateRequestJson };
601
+ export { WebhookAttemptId, WebhookDailyDeliveries, WebhookDeliveryCounts, WebhookDeliveryId, WebhookDeliveryPage, WebhookEndpoint, WebhookEndpointListItem, WebhookEndpointPage, WebhookEventId, WebhookSigningSecret, WebhookStatsResponse, WebhooksCreate201, WebhooksCreate400, WebhooksCreate401, WebhooksCreate402, WebhooksCreate403, WebhooksCreate404, WebhooksCreate409, WebhooksCreate422, WebhooksCreate500, WebhooksCreate502, WebhooksCreate504, WebhooksCreateRequestJson, WebhooksGet200, WebhooksGet400, WebhooksGet401, WebhooksGet403, WebhooksGet404, WebhooksGet422, WebhooksGet500, WebhooksGet504, WebhooksGetLogs200, WebhooksGetLogs400, WebhooksGetLogs401, WebhooksGetLogs403, WebhooksGetLogs404, WebhooksGetLogs422, WebhooksGetLogs500, WebhooksGetLogs504, WebhooksGetLogsPathParams, WebhooksGetLogsQuery, WebhooksGetPathParams, WebhooksGetSecret200, WebhooksGetSecret400, WebhooksGetSecret401, WebhooksGetSecret403, WebhooksGetSecret404, WebhooksGetSecret422, WebhooksGetSecret500, WebhooksGetSecret504, WebhooksGetSecretPathParams, WebhooksGetStats200, WebhooksGetStats400, WebhooksGetStats401, WebhooksGetStats403, WebhooksGetStats404, WebhooksGetStats422, WebhooksGetStats500, WebhooksGetStats504, WebhooksGetStatsPathParams, WebhooksGetStatsQuery, WebhooksGroup, WebhooksList200, WebhooksList400, WebhooksList401, WebhooksList403, WebhooksList422, WebhooksList500, WebhooksList504, WebhooksListQuery, WebhooksRegenerateSecret200, WebhooksRegenerateSecret400, WebhooksRegenerateSecret401, WebhooksRegenerateSecret403, WebhooksRegenerateSecret404, WebhooksRegenerateSecret422, WebhooksRegenerateSecret500, WebhooksRegenerateSecret504, WebhooksRegenerateSecretPathParams, WebhooksRemove200, WebhooksRemove400, WebhooksRemove401, WebhooksRemove403, WebhooksRemove404, WebhooksRemove422, WebhooksRemove500, WebhooksRemove502, WebhooksRemove504, WebhooksRemovePathParams, WebhooksRetryDelivery200, WebhooksRetryDelivery400, WebhooksRetryDelivery401, WebhooksRetryDelivery403, WebhooksRetryDelivery404, WebhooksRetryDelivery422, WebhooksRetryDelivery429, WebhooksRetryDelivery500, WebhooksRetryDelivery504, WebhooksRetryDeliveryPathParams, WebhooksTest202, WebhooksTest400, WebhooksTest401, WebhooksTest403, WebhooksTest404, WebhooksTest422, WebhooksTest500, WebhooksTest504, WebhooksTestPathParams, WebhooksTestRequestJson, WebhooksUpdate200, WebhooksUpdate400, WebhooksUpdate401, WebhooksUpdate403, WebhooksUpdate404, WebhooksUpdate409, WebhooksUpdate422, WebhooksUpdate500, WebhooksUpdate504, WebhooksUpdatePathParams, WebhooksUpdateRequestJson };
554
602
 
555
603
  //# sourceMappingURL=webhooks.js.map
@@ -1,6 +1,6 @@
1
1
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
- import { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, OrganizationId, UnauthorizedError, ValidationError } from "./shared";
3
+ import { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, UnauthorizedError, ValidationError } from "./shared";
4
4
  export type WhoamiUser = {
5
5
  readonly id: string;
6
6
  readonly name: string;
@@ -54,8 +54,11 @@ export declare const WhoamiApiKeyCredential: Schema.Struct<{
54
54
  readonly resources: Schema.Struct<{
55
55
  readonly messages: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
56
56
  readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
57
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
58
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
57
59
  readonly domains: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
58
60
  readonly phoneNumbers: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
61
+ readonly whatsappAccounts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
59
62
  readonly contacts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
60
63
  readonly conversations: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
61
64
  readonly templates: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
@@ -96,8 +99,11 @@ export declare const Whoami: Schema.Struct<{
96
99
  readonly resources: Schema.Struct<{
97
100
  readonly messages: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
98
101
  readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
102
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
103
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
99
104
  readonly domains: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
100
105
  readonly phoneNumbers: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
106
+ readonly whatsappAccounts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
101
107
  readonly contacts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
102
108
  readonly conversations: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
103
109
  readonly templates: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
@@ -144,8 +150,11 @@ export declare const WhoamiGet200: Schema.Struct<{
144
150
  readonly resources: Schema.Struct<{
145
151
  readonly messages: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
146
152
  readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
153
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
154
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
147
155
  readonly domains: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
148
156
  readonly phoneNumbers: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
157
+ readonly whatsappAccounts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
149
158
  readonly contacts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
150
159
  readonly conversations: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
151
160
  readonly templates: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
@@ -173,6 +182,8 @@ export declare const WhoamiGet200: Schema.Struct<{
173
182
  readonly role: Schema.Union<readonly [Schema.Literal<"mail_user">, Schema.Literal<"member">, Schema.Literal<"admin">, Schema.Literal<"owner">]>;
174
183
  }>]>;
175
184
  }>;
185
+ export type WhoamiGet400 = MalformedRequestError;
186
+ export declare const WhoamiGet400: typeof MalformedRequestError;
176
187
  export type WhoamiGet401 = UnauthorizedError;
177
188
  export declare const WhoamiGet401: typeof UnauthorizedError;
178
189
  export type WhoamiGet403 = ForbiddenError;
@@ -201,8 +212,11 @@ declare const WhoamiGroup_base: HttpApiGroup.HttpApiGroup<"Whoami", HttpApiEndpo
201
212
  readonly resources: Schema.Struct<{
202
213
  readonly messages: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
203
214
  readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
215
+ readonly sms: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
216
+ readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
204
217
  readonly domains: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
205
218
  readonly phoneNumbers: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
219
+ readonly whatsappAccounts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
206
220
  readonly contacts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
207
221
  readonly conversations: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
208
222
  readonly templates: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
@@ -257,6 +271,26 @@ declare const WhoamiGroup_base: HttpApiGroup.HttpApiGroup<"Whoami", HttpApiEndpo
257
271
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
258
272
  readonly message: Schema.String;
259
273
  readonly retryAfterSeconds: Schema.Finite;
274
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
275
+ readonly _tag: "MalformedRequestError";
276
+ readonly message: string;
277
+ readonly fields: {
278
+ readonly [x: string]: readonly string[];
279
+ };
280
+ }, readonly [Schema.Struct<{
281
+ readonly _tag: Schema.tag<"MalformedRequestError">;
282
+ readonly message: Schema.String;
283
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
284
+ }>], {
285
+ readonly _tag: "MalformedRequestError";
286
+ readonly message: string;
287
+ readonly fields: {
288
+ readonly [x: string]: readonly string[];
289
+ };
290
+ }>, Schema.Struct<{
291
+ readonly _tag: Schema.tag<"MalformedRequestError">;
292
+ readonly message: Schema.String;
293
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
260
294
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
261
295
  readonly _tag: "UnauthorizedError";
262
296
  readonly message: string;
@@ -1,4 +1,4 @@
1
- import { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, OrganizationId, UnauthorizedError, ValidationError } from "./shared.js";
1
+ import { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, UnauthorizedError, ValidationError } from "./shared.js";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  // src/effect/generated/whoami.ts
@@ -34,6 +34,7 @@ const Whoami = /* @__PURE__ */ (() => Schema.Struct({
34
34
  credential: Schema.Union([WhoamiApiKeyCredential, WhoamiUserCredential])
35
35
  }).annotate({ identifier: "Whoami" }))();
36
36
  const WhoamiGet200 = Whoami;
37
+ const WhoamiGet400 = MalformedRequestError;
37
38
  const WhoamiGet401 = UnauthorizedError;
38
39
  const WhoamiGet403 = ForbiddenError;
39
40
  const WhoamiGet422 = ValidationError;
@@ -42,6 +43,7 @@ const WhoamiGet504 = GatewayTimeoutError;
42
43
  var WhoamiGroup = class extends HttpApiGroup.make("Whoami").add(HttpApiEndpoint.get("whoamiGet", "/v1/whoami", {
43
44
  success: WhoamiGet200,
44
45
  error: [
46
+ WhoamiGet400.pipe(HttpApiSchema.status(400)),
45
47
  WhoamiGet401.pipe(HttpApiSchema.status(401)),
46
48
  WhoamiGet403.pipe(HttpApiSchema.status(403)),
47
49
  WhoamiGet422.pipe(HttpApiSchema.status(422)),
@@ -49,6 +51,6 @@ var WhoamiGroup = class extends HttpApiGroup.make("Whoami").add(HttpApiEndpoint.
49
51
  WhoamiGet504.pipe(HttpApiSchema.status(504))
50
52
  ]
51
53
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whoami.get").annotate(OpenApi.Summary, "Get the calling credential").annotate(OpenApi.Description, "Returns the organization the request acts in and the credential it presents: an API key with its name, prefix, and access, or a signed-in user with their role. Any valid credential may call it, whatever its grants.")).annotate(OpenApi.Description, "The organization and credential behind the request.") {};
52
- export { Whoami, WhoamiApiKeyCredential, WhoamiGet200, WhoamiGet401, WhoamiGet403, WhoamiGet422, WhoamiGet500, WhoamiGet504, WhoamiGroup, WhoamiOrganization, WhoamiUser, WhoamiUserCredential };
54
+ export { Whoami, WhoamiApiKeyCredential, WhoamiGet200, WhoamiGet400, WhoamiGet401, WhoamiGet403, WhoamiGet422, WhoamiGet500, WhoamiGet504, WhoamiGroup, WhoamiOrganization, WhoamiUser, WhoamiUserCredential };
53
55
 
54
56
  //# sourceMappingURL=whoami.js.map
@@ -59,6 +59,10 @@ export declare const SamvaErrorMetadata: {
59
59
  readonly categories: readonly [];
60
60
  readonly retryable: false;
61
61
  };
62
+ readonly MalformedRequestError: {
63
+ readonly categories: readonly ["validation"];
64
+ readonly retryable: false;
65
+ };
62
66
  readonly OnboardingReviewRequiredError: {
63
67
  readonly categories: readonly ["validation"];
64
68
  readonly retryable: false;
@@ -95,6 +99,10 @@ export declare const SamvaErrorMetadata: {
95
99
  readonly categories: readonly ["validation"];
96
100
  readonly retryable: false;
97
101
  };
102
+ readonly WhatsAppServiceWindowClosedError: {
103
+ readonly categories: readonly [];
104
+ readonly retryable: false;
105
+ };
98
106
  };
99
107
  export declare const SamvaOperations: {
100
108
  readonly agentsList: {
@@ -127,6 +135,12 @@ export declare const SamvaOperations: {
127
135
  readonly idempotent: false;
128
136
  readonly paginated: false;
129
137
  };
138
+ readonly agentsContinueOnStandard: {
139
+ readonly group: "Agents";
140
+ readonly method: "POST";
141
+ readonly idempotent: false;
142
+ readonly paginated: false;
143
+ };
130
144
  readonly agentsReplaceDraft: {
131
145
  readonly group: "Agents";
132
146
  readonly method: "PUT";
@@ -151,6 +165,12 @@ export declare const SamvaOperations: {
151
165
  readonly idempotent: false;
152
166
  readonly paginated: false;
153
167
  };
168
+ readonly agentsListModels: {
169
+ readonly group: "Agents";
170
+ readonly method: "GET";
171
+ readonly idempotent: false;
172
+ readonly paginated: false;
173
+ };
154
174
  readonly analyticsGetChannelStats: {
155
175
  readonly group: "Analytics";
156
176
  readonly method: "GET";
@@ -60,6 +60,10 @@ const SamvaErrorMetadata = {
60
60
  categories: [],
61
61
  retryable: false
62
62
  },
63
+ MalformedRequestError: {
64
+ categories: ["validation"],
65
+ retryable: false
66
+ },
63
67
  OnboardingReviewRequiredError: {
64
68
  categories: ["validation"],
65
69
  retryable: false
@@ -95,6 +99,10 @@ const SamvaErrorMetadata = {
95
99
  ValidationError: {
96
100
  categories: ["validation"],
97
101
  retryable: false
102
+ },
103
+ WhatsAppServiceWindowClosedError: {
104
+ categories: [],
105
+ retryable: false
98
106
  }
99
107
  };
100
108
  const operationMetadata0 = {
@@ -875,10 +883,12 @@ const SamvaOperations = {
875
883
  agentsGet: operationMetadata2,
876
884
  agentsRemove: operationMetadata3,
877
885
  agentsUpdate: operationMetadata4,
886
+ agentsContinueOnStandard: operationMetadata1,
878
887
  agentsReplaceDraft: operationMetadata5,
879
888
  agentsPublish: operationMetadata1,
880
889
  agentsListVersions: operationMetadata0,
881
890
  agentsGetVersion: operationMetadata2,
891
+ agentsListModels: operationMetadata2,
882
892
  analyticsGetChannelStats: operationMetadata6,
883
893
  analyticsGetDeliveryMetrics: operationMetadata6,
884
894
  analyticsExportData: operationMetadata7,
@@ -1,5 +1,5 @@
1
1
  import { MediaUploadError } from "../inline-attachments.js";
2
- import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError } from "./generated/shared.js";
2
+ import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppServiceWindowClosedError } from "./generated/shared.js";
3
3
  import { catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError } from "./categories.js";
4
4
  import { retry_exports } from "./retry.js";
5
5
  import { agents_exports } from "./agents.js";
@@ -35,4 +35,4 @@ import { newsletter_issues_exports } from "./newsletter-issues.js";
35
35
  import { webhooks_exports } from "./webhooks.js";
36
36
  import { whoami_exports } from "./whoami.js";
37
37
  import { newsletters_exports } from "./newsletters.js";
38
- export { agents_exports as Agents, analytics_exports as Analytics, AnalyticsQueryError, api_keys_exports as ApiKeys, attachments_exports as Attachments, BillingProviderError, BrandAddressRequiredError, brands_exports as Brands, CampaignFooterRequiredError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contact_groups_exports as ContactGroups, contacts_exports as Contacts, conversations_exports as Conversations, custom_fields_exports as CustomFields, DeliveryUnavailableError, email_exports as Email, EmailChannelError, events_exports as Events, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, journeys_exports as Journeys, MailboxSendConflictError, MailboxSendRefusedError, mailboxes_exports as Mailboxes, media_exports as Media, MediaUploadError, messages_exports as Messages, namespaces_exports as Namespaces, newsletter_domains_exports as NewsletterDomains, newsletter_issues_exports as NewsletterIssues, newsletters_exports as Newsletters, OnboardingReviewRequiredError, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, SenderNotReadyError, ServiceUnavailableError, subscriptions_exports as Subscriptions, TemplateSourceError, templates_exports as Templates, topic_forms_exports as TopicForms, topics_exports as Topics, UnauthorizedError, ValidationError, webhooks_exports as Webhooks, whoami_exports as Whoami, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
38
+ export { agents_exports as Agents, analytics_exports as Analytics, AnalyticsQueryError, api_keys_exports as ApiKeys, attachments_exports as Attachments, BillingProviderError, BrandAddressRequiredError, brands_exports as Brands, CampaignFooterRequiredError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contact_groups_exports as ContactGroups, contacts_exports as Contacts, conversations_exports as Conversations, custom_fields_exports as CustomFields, DeliveryUnavailableError, email_exports as Email, EmailChannelError, events_exports as Events, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, journeys_exports as Journeys, MailboxSendConflictError, MailboxSendRefusedError, mailboxes_exports as Mailboxes, MalformedRequestError, media_exports as Media, MediaUploadError, messages_exports as Messages, namespaces_exports as Namespaces, newsletter_domains_exports as NewsletterDomains, newsletter_issues_exports as NewsletterIssues, newsletters_exports as Newsletters, OnboardingReviewRequiredError, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, SenderNotReadyError, ServiceUnavailableError, subscriptions_exports as Subscriptions, TemplateSourceError, templates_exports as Templates, topic_forms_exports as TopicForms, topics_exports as Topics, UnauthorizedError, ValidationError, webhooks_exports as Webhooks, WhatsAppServiceWindowClosedError, whoami_exports as Whoami, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
@@ -29,7 +29,7 @@ const make = (config) => Effect.gen(function* () {
29
29
  const groupClient = (group) => {
30
30
  const built = groups.get(group.identifier);
31
31
  if (built !== void 0) return Effect.succeed(built);
32
- return HttpApiClient.group(HttpApi.make("SamvaApi").add(group), {
32
+ return HttpApiClient.group(HttpApi.make("SamvaApi").add(group).annotate(HttpApi.PayloadParseOptions, { onExcessProperty: "error" }), {
33
33
  group: group.identifier,
34
34
  httpClient,
35
35
  baseUrl
@@ -13,5 +13,5 @@ export declare const addEmailSender: (input: EmailAddSenderInput, options?: Send
13
13
  readonly providerLifecycle: "active" | "deleting" | "failed" | "provisioning";
14
14
  readonly providerFailureCode: string | null;
15
15
  readonly createdAt: string;
16
- }, import("..").ConflictError | import("..").ExternalServiceError | import("..").ForbiddenError | import("..").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("..").InternalError | import("..").ResourceNotFoundError | import("effect/Schema").SchemaError | import("..").UnauthorizedError | import("..").ValidationError, Service>;
16
+ }, import("..").ConflictError | import("..").ExternalServiceError | import("..").ForbiddenError | import("..").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("..").InternalError | import("..").MalformedRequestError | import("..").ResourceNotFoundError | import("effect/Schema").SchemaError | import("..").UnauthorizedError | import("..").ValidationError, Service>;
17
17
  export {};
@@ -4,7 +4,7 @@ import type { SendMessagePayload } from "../generated/shared";
4
4
  import { Service } from "./client";
5
5
  import { type OperationResult } from "./operation";
6
6
  type MessagePayload = typeof SendMessagePayload.Encoded;
7
- export type MessageRecipient = MessagePayload["to"][number];
7
+ export type MessageRecipient = EmailPayload["to"][number];
8
8
  type ContactObjectRecipient = {
9
9
  readonly id: string;
10
10
  };