samva 0.34.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 +224 -250
  3. package/dist/client/sdk.gen.js +84 -210
  4. package/dist/client/types.gen.d.ts +2894 -401
  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 +296 -38
  84. package/dist/effect/generated/webhooks.js +58 -16
  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 +22 -22
  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")]),
@@ -198,7 +206,11 @@ const WebhookStatsResponse = /* @__PURE__ */ (() => Schema.Struct({
198
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" })),
199
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" })),
200
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" })),
201
- 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])
202
214
  }).annotate({ identifier: "WebhookStatsResponse" }))();
203
215
  const WebhookEndpointPage = /* @__PURE__ */ (() => Schema.Struct({
204
216
  items: Schema.Array(WebhookEndpointListItem),
@@ -206,11 +218,12 @@ const WebhookEndpointPage = /* @__PURE__ */ (() => Schema.Struct({
206
218
  }).annotate({ identifier: "WebhookEndpointPage" }))();
207
219
  const WebhooksListQuery = /* @__PURE__ */ (() => Schema.Struct({
208
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])),
209
- cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
210
- search: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
211
- 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")]))
212
224
  }))();
213
225
  const WebhooksList200 = WebhookEndpointPage;
226
+ const WebhooksList400 = MalformedRequestError;
214
227
  const WebhooksList401 = UnauthorizedError;
215
228
  const WebhooksList403 = ForbiddenError;
216
229
  const WebhooksList422 = ValidationError;
@@ -260,7 +273,11 @@ const WebhooksCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
260
273
  Schema.Literal("mailbox.message.failed"),
261
274
  Schema.Literal("journey.webhook")
262
275
  ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
263
- 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])),
264
281
  mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
265
282
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
266
283
  headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
@@ -270,6 +287,7 @@ const WebhooksCreate201 = /* @__PURE__ */ (() => Schema.Struct({
270
287
  endpoint: WebhookEndpoint,
271
288
  secret: SensitiveString
272
289
  }))();
290
+ const WebhooksCreate400 = MalformedRequestError;
273
291
  const WebhooksCreate401 = UnauthorizedError;
274
292
  const WebhooksCreate402 = PaymentRequiredError;
275
293
  const WebhooksCreate403 = ForbiddenError;
@@ -281,6 +299,7 @@ const WebhooksCreate502 = BillingProviderError;
281
299
  const WebhooksCreate504 = GatewayTimeoutError;
282
300
  const WebhooksGetPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
283
301
  const WebhooksGet200 = WebhookEndpoint;
302
+ const WebhooksGet400 = MalformedRequestError;
284
303
  const WebhooksGet401 = UnauthorizedError;
285
304
  const WebhooksGet403 = ForbiddenError;
286
305
  const WebhooksGet404 = ResourceNotFoundError;
@@ -289,6 +308,7 @@ const WebhooksGet500 = InternalError;
289
308
  const WebhooksGet504 = GatewayTimeoutError;
290
309
  const WebhooksRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
291
310
  const WebhooksRemove200 = SuccessResponse;
311
+ const WebhooksRemove400 = MalformedRequestError;
292
312
  const WebhooksRemove401 = UnauthorizedError;
293
313
  const WebhooksRemove403 = ForbiddenError;
294
314
  const WebhooksRemove404 = ResourceNotFoundError;
@@ -341,13 +361,18 @@ const WebhooksUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
341
361
  Schema.Literal("mailbox.message.failed"),
342
362
  Schema.Literal("journey.webhook")
343
363
  ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
344
- 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])),
345
369
  mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
346
370
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
347
371
  headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
348
372
  status: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]), Schema.Null]))
349
373
  }))();
350
374
  const WebhooksUpdate200 = WebhookEndpoint;
375
+ const WebhooksUpdate400 = MalformedRequestError;
351
376
  const WebhooksUpdate401 = UnauthorizedError;
352
377
  const WebhooksUpdate403 = ForbiddenError;
353
378
  const WebhooksUpdate404 = ResourceNotFoundError;
@@ -365,6 +390,7 @@ const WebhooksRetryDelivery200 = /* @__PURE__ */ (() => Schema.Struct({
365
390
  attemptId: WebhookAttemptId,
366
391
  outcome: Schema.Union([Schema.Literal("succeeded"), Schema.Literal("failed")])
367
392
  }))();
393
+ const WebhooksRetryDelivery400 = MalformedRequestError;
368
394
  const WebhooksRetryDelivery401 = UnauthorizedError;
369
395
  const WebhooksRetryDelivery403 = ForbiddenError;
370
396
  const WebhooksRetryDelivery404 = ResourceNotFoundError;
@@ -375,9 +401,10 @@ const WebhooksRetryDelivery504 = GatewayTimeoutError;
375
401
  const WebhooksGetLogsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
376
402
  const WebhooksGetLogsQuery = /* @__PURE__ */ (() => Schema.Struct({
377
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])),
378
- cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
404
+ cursor: Schema.optionalKey(Schema.String)
379
405
  }))();
380
406
  const WebhooksGetLogs200 = WebhookDeliveryPage;
407
+ const WebhooksGetLogs400 = MalformedRequestError;
381
408
  const WebhooksGetLogs401 = UnauthorizedError;
382
409
  const WebhooksGetLogs403 = ForbiddenError;
383
410
  const WebhooksGetLogs404 = ResourceNotFoundError;
@@ -386,6 +413,7 @@ const WebhooksGetLogs500 = InternalError;
386
413
  const WebhooksGetLogs504 = GatewayTimeoutError;
387
414
  const WebhooksRegenerateSecretPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
388
415
  const WebhooksRegenerateSecret200 = /* @__PURE__ */ (() => Schema.Struct({ secret: SensitiveString }))();
416
+ const WebhooksRegenerateSecret400 = MalformedRequestError;
389
417
  const WebhooksRegenerateSecret401 = UnauthorizedError;
390
418
  const WebhooksRegenerateSecret403 = ForbiddenError;
391
419
  const WebhooksRegenerateSecret404 = ResourceNotFoundError;
@@ -394,6 +422,7 @@ const WebhooksRegenerateSecret500 = InternalError;
394
422
  const WebhooksRegenerateSecret504 = GatewayTimeoutError;
395
423
  const WebhooksGetSecretPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
396
424
  const WebhooksGetSecret200 = WebhookSigningSecret;
425
+ const WebhooksGetSecret400 = MalformedRequestError;
397
426
  const WebhooksGetSecret401 = UnauthorizedError;
398
427
  const WebhooksGetSecret403 = ForbiddenError;
399
428
  const WebhooksGetSecret404 = ResourceNotFoundError;
@@ -402,10 +431,11 @@ const WebhooksGetSecret500 = InternalError;
402
431
  const WebhooksGetSecret504 = GatewayTimeoutError;
403
432
  const WebhooksGetStatsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WebhookEndpointId }))();
404
433
  const WebhooksGetStatsQuery = /* @__PURE__ */ (() => Schema.Struct({
405
- after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
406
- before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
434
+ after: Schema.optionalKey(Schema.String),
435
+ before: Schema.optionalKey(Schema.String)
407
436
  }))();
408
437
  const WebhooksGetStats200 = WebhookStatsResponse;
438
+ const WebhooksGetStats400 = MalformedRequestError;
409
439
  const WebhooksGetStats401 = UnauthorizedError;
410
440
  const WebhooksGetStats403 = ForbiddenError;
411
441
  const WebhooksGetStats404 = ResourceNotFoundError;
@@ -419,6 +449,7 @@ const WebhooksTest202 = /* @__PURE__ */ (() => Schema.Struct({
419
449
  eventId: WebhookEventId,
420
450
  deliveryId: WebhookDeliveryId
421
451
  }))();
452
+ const WebhooksTest400 = MalformedRequestError;
422
453
  const WebhooksTest401 = UnauthorizedError;
423
454
  const WebhooksTest403 = ForbiddenError;
424
455
  const WebhooksTest404 = ResourceNotFoundError;
@@ -429,6 +460,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
429
460
  query: WebhooksListQuery,
430
461
  success: WebhooksList200,
431
462
  error: [
463
+ WebhooksList400.pipe(HttpApiSchema.status(400)),
432
464
  WebhooksList401.pipe(HttpApiSchema.status(401)),
433
465
  WebhooksList403.pipe(HttpApiSchema.status(403)),
434
466
  WebhooksList422.pipe(HttpApiSchema.status(422)),
@@ -439,6 +471,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
439
471
  payload: WebhooksCreateRequestJson,
440
472
  success: WebhooksCreate201.pipe(HttpApiSchema.status(201)),
441
473
  error: [
474
+ WebhooksCreate400.pipe(HttpApiSchema.status(400)),
442
475
  WebhooksCreate401.pipe(HttpApiSchema.status(401)),
443
476
  WebhooksCreate402.pipe(HttpApiSchema.status(402)),
444
477
  WebhooksCreate403.pipe(HttpApiSchema.status(403)),
@@ -453,6 +486,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
453
486
  params: WebhooksGetPathParams,
454
487
  success: WebhooksGet200,
455
488
  error: [
489
+ WebhooksGet400.pipe(HttpApiSchema.status(400)),
456
490
  WebhooksGet401.pipe(HttpApiSchema.status(401)),
457
491
  WebhooksGet403.pipe(HttpApiSchema.status(403)),
458
492
  WebhooksGet404.pipe(HttpApiSchema.status(404)),
@@ -464,6 +498,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
464
498
  params: WebhooksRemovePathParams,
465
499
  success: WebhooksRemove200,
466
500
  error: [
501
+ WebhooksRemove400.pipe(HttpApiSchema.status(400)),
467
502
  WebhooksRemove401.pipe(HttpApiSchema.status(401)),
468
503
  WebhooksRemove403.pipe(HttpApiSchema.status(403)),
469
504
  WebhooksRemove404.pipe(HttpApiSchema.status(404)),
@@ -477,6 +512,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
477
512
  payload: WebhooksUpdateRequestJson,
478
513
  success: WebhooksUpdate200,
479
514
  error: [
515
+ WebhooksUpdate400.pipe(HttpApiSchema.status(400)),
480
516
  WebhooksUpdate401.pipe(HttpApiSchema.status(401)),
481
517
  WebhooksUpdate403.pipe(HttpApiSchema.status(403)),
482
518
  WebhooksUpdate404.pipe(HttpApiSchema.status(404)),
@@ -489,6 +525,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
489
525
  params: WebhooksRetryDeliveryPathParams,
490
526
  success: WebhooksRetryDelivery200,
491
527
  error: [
528
+ WebhooksRetryDelivery400.pipe(HttpApiSchema.status(400)),
492
529
  WebhooksRetryDelivery401.pipe(HttpApiSchema.status(401)),
493
530
  WebhooksRetryDelivery403.pipe(HttpApiSchema.status(403)),
494
531
  WebhooksRetryDelivery404.pipe(HttpApiSchema.status(404)),
@@ -502,6 +539,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
502
539
  query: WebhooksGetLogsQuery,
503
540
  success: WebhooksGetLogs200,
504
541
  error: [
542
+ WebhooksGetLogs400.pipe(HttpApiSchema.status(400)),
505
543
  WebhooksGetLogs401.pipe(HttpApiSchema.status(401)),
506
544
  WebhooksGetLogs403.pipe(HttpApiSchema.status(403)),
507
545
  WebhooksGetLogs404.pipe(HttpApiSchema.status(404)),
@@ -513,6 +551,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
513
551
  params: WebhooksRegenerateSecretPathParams,
514
552
  success: WebhooksRegenerateSecret200,
515
553
  error: [
554
+ WebhooksRegenerateSecret400.pipe(HttpApiSchema.status(400)),
516
555
  WebhooksRegenerateSecret401.pipe(HttpApiSchema.status(401)),
517
556
  WebhooksRegenerateSecret403.pipe(HttpApiSchema.status(403)),
518
557
  WebhooksRegenerateSecret404.pipe(HttpApiSchema.status(404)),
@@ -524,6 +563,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
524
563
  params: WebhooksGetSecretPathParams,
525
564
  success: WebhooksGetSecret200,
526
565
  error: [
566
+ WebhooksGetSecret400.pipe(HttpApiSchema.status(400)),
527
567
  WebhooksGetSecret401.pipe(HttpApiSchema.status(401)),
528
568
  WebhooksGetSecret403.pipe(HttpApiSchema.status(403)),
529
569
  WebhooksGetSecret404.pipe(HttpApiSchema.status(404)),
@@ -536,6 +576,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
536
576
  query: WebhooksGetStatsQuery,
537
577
  success: WebhooksGetStats200,
538
578
  error: [
579
+ WebhooksGetStats400.pipe(HttpApiSchema.status(400)),
539
580
  WebhooksGetStats401.pipe(HttpApiSchema.status(401)),
540
581
  WebhooksGetStats403.pipe(HttpApiSchema.status(403)),
541
582
  WebhooksGetStats404.pipe(HttpApiSchema.status(404)),
@@ -548,6 +589,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
548
589
  payload: WebhooksTestRequestJson,
549
590
  success: WebhooksTest202.pipe(HttpApiSchema.status(202)),
550
591
  error: [
592
+ WebhooksTest400.pipe(HttpApiSchema.status(400)),
551
593
  WebhooksTest401.pipe(HttpApiSchema.status(401)),
552
594
  WebhooksTest403.pipe(HttpApiSchema.status(403)),
553
595
  WebhooksTest404.pipe(HttpApiSchema.status(404)),
@@ -556,6 +598,6 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
556
598
  WebhooksTest504.pipe(HttpApiSchema.status(504))
557
599
  ]
558
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") {};
559
- 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 };
560
602
 
561
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
  };