samva 0.4.0 → 0.5.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 (42) hide show
  1. package/dist/{categories-CsUa8ojo.js → categories-B9Nw2v_F.js} +5 -1
  2. package/dist/client/sdk.gen.d.ts +150 -11
  3. package/dist/client/types.gen.d.ts +893 -37
  4. package/dist/{client-BmZK_uCt.js → client-B7gEkvEq.js} +952 -110
  5. package/dist/{client-attribution-BslSOa_8.js → client-attribution-B2yJBXdZ.js} +2 -2
  6. package/dist/effect/api-keys.js +1 -1
  7. package/dist/effect/campaigns.d.ts +16 -0
  8. package/dist/effect/campaigns.js +1 -1
  9. package/dist/effect/categories.js +1 -1
  10. package/dist/effect/client.js +1 -1
  11. package/dist/effect/contacts.js +1 -1
  12. package/dist/effect/conversations.d.ts +15 -0
  13. package/dist/effect/conversations.js +1 -1
  14. package/dist/effect/design.js +1 -1
  15. package/dist/effect/email.d.ts +700 -2
  16. package/dist/effect/email.js +27 -3
  17. package/dist/effect/generated-metadata.d.ts +4 -0
  18. package/dist/effect/generated.d.ts +4102 -359
  19. package/dist/effect/index.js +2 -2
  20. package/dist/effect/internal/operation.d.ts +13 -3
  21. package/dist/effect/media.d.ts +3 -3
  22. package/dist/effect/media.js +1 -1
  23. package/dist/effect/messages.d.ts +180 -1
  24. package/dist/effect/messages.js +5 -3
  25. package/dist/effect/operations.js +1 -1
  26. package/dist/effect/organizations.js +1 -1
  27. package/dist/effect/retry.js +1 -1
  28. package/dist/effect/scheduled-messages.d.ts +90 -6
  29. package/dist/effect/scheduled-messages.js +5 -3
  30. package/dist/effect/templates.d.ts +12 -0
  31. package/dist/effect/templates.js +2 -2
  32. package/dist/effect/webhooks.d.ts +40 -6
  33. package/dist/effect/webhooks.js +2 -2
  34. package/dist/index.js +2 -2
  35. package/dist/{operation-B1knNlxk.js → operation-B4FjN6wq.js} +50 -2
  36. package/dist/promises/errors.gen.d.ts +21 -2
  37. package/dist/promises/index.d.ts +1 -0
  38. package/dist/promises/index.js +2 -2
  39. package/dist/promises/types.gen.d.ts +1 -1
  40. package/dist/{promises-n1opem5V.js → promises-CP_nxUus.js} +502 -11
  41. package/dist/service-map.d.ts +66 -0
  42. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { n as clientAttribution, t as CLIENT_ATTRIBUTION_HEADER } from "./client-attribution-BslSOa_8.js";
1
+ import { n as clientAttribution, t as CLIENT_ATTRIBUTION_HEADER } from "./client-attribution-B2yJBXdZ.js";
2
2
  import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-BiIJnycv.js";
3
3
  //#region src/client/core/bodySerializer.gen.ts
4
4
  const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
@@ -671,14 +671,14 @@ const createClient$1 = (config = {}) => {
671
671
  };
672
672
  //#endregion
673
673
  //#region src/client/client.gen.ts
674
- const client = createClient$1(createConfig());
674
+ const client = createClient$1(createConfig({ baseUrl: "https://api.samva.dev" }));
675
675
  //#endregion
676
676
  //#region src/client/sdk.gen.ts
677
677
  var Messages = class {
678
678
  /**
679
679
  * List messages
680
680
  *
681
- * Returns a paginated list of messages across all channels, with optional filters for channel, direction, status, conversation, contact, and date range.
681
+ * Returns a paginated list of messages, with optional filters for channel, direction, status, conversation, contact, and date range.
682
682
  */
683
683
  static list(parameters, options) {
684
684
  const params = buildClientParams([parameters], [{ args: [
@@ -828,6 +828,61 @@ var Messages = class {
828
828
  });
829
829
  }
830
830
  /**
831
+ * Validate an email message
832
+ *
833
+ * Resolves recipients, sender, and inline or published-template content without creating contacts, messages, billing reservations, quota draws, queue work, or provider calls.
834
+ */
835
+ static validateEmail(parameters, options) {
836
+ const params = buildClientParams([parameters], [{ args: [
837
+ {
838
+ in: "body",
839
+ key: "conversationId"
840
+ },
841
+ {
842
+ in: "body",
843
+ key: "metadata"
844
+ },
845
+ {
846
+ in: "body",
847
+ key: "channel"
848
+ },
849
+ {
850
+ in: "body",
851
+ key: "to"
852
+ },
853
+ {
854
+ in: "body",
855
+ key: "cc"
856
+ },
857
+ {
858
+ in: "body",
859
+ key: "bcc"
860
+ },
861
+ {
862
+ in: "body",
863
+ key: "from"
864
+ },
865
+ {
866
+ in: "body",
867
+ key: "email"
868
+ }
869
+ ] }]);
870
+ return (options?.client ?? client).post({
871
+ security: [{
872
+ name: "x-api-key",
873
+ type: "apiKey"
874
+ }],
875
+ url: "/v1/messages/validate/email",
876
+ ...options,
877
+ ...params,
878
+ headers: {
879
+ "Content-Type": "application/json",
880
+ ...options?.headers,
881
+ ...params.headers
882
+ }
883
+ });
884
+ }
885
+ /**
831
886
  * Get message delivery status
832
887
  *
833
888
  * Returns the current delivery status of a message by its ID.
@@ -1058,6 +1113,34 @@ var ScheduledMessages = class {
1058
1113
  ...params
1059
1114
  });
1060
1115
  }
1116
+ /**
1117
+ * Resume a review-paused scheduled message
1118
+ *
1119
+ * Explicitly resumes a scheduled message after onboarding review clearance. An overdue message requires either send_now or a new future scheduledFor value.
1120
+ */
1121
+ static resume(parameters, options) {
1122
+ const params = buildClientParams([parameters], [{ args: [{
1123
+ in: "path",
1124
+ key: "id"
1125
+ }, {
1126
+ key: "body",
1127
+ map: "body"
1128
+ }] }]);
1129
+ return (options?.client ?? client).post({
1130
+ security: [{
1131
+ name: "x-api-key",
1132
+ type: "apiKey"
1133
+ }],
1134
+ url: "/v1/messages/scheduled/{id}/resume",
1135
+ ...options,
1136
+ ...params,
1137
+ headers: {
1138
+ "Content-Type": "application/json",
1139
+ ...options?.headers,
1140
+ ...params.headers
1141
+ }
1142
+ });
1143
+ }
1061
1144
  };
1062
1145
  var Campaigns = class {
1063
1146
  /**
@@ -1417,6 +1500,81 @@ var Campaigns = class {
1417
1500
  }
1418
1501
  };
1419
1502
  var Email = class {
1503
+ /**
1504
+ * Get email onboarding review status
1505
+ *
1506
+ * Returns the customer-safe workspace review decision, workflow stage, next action, and current sending-identity clearances. A missing authority row is returned as a blocked initial state.
1507
+ */
1508
+ static getOnboardingReview(options) {
1509
+ return (options?.client ?? client).get({
1510
+ security: [{
1511
+ name: "x-api-key",
1512
+ type: "apiKey"
1513
+ }],
1514
+ url: "/v1/email/onboarding-review",
1515
+ ...options
1516
+ });
1517
+ }
1518
+ /**
1519
+ * Reapply for email onboarding review
1520
+ *
1521
+ * Allows a workspace owner or admin to submit a rejected workspace for review again. The expected generation prevents acting on stale status.
1522
+ */
1523
+ static reapplyOnboardingReview(parameters, options) {
1524
+ const params = buildClientParams([parameters], [{ args: [{
1525
+ in: "body",
1526
+ key: "expectedGeneration"
1527
+ }] }]);
1528
+ return (options?.client ?? client).post({
1529
+ security: [{
1530
+ name: "x-api-key",
1531
+ type: "apiKey"
1532
+ }],
1533
+ url: "/v1/email/onboarding-review/reapply",
1534
+ ...options,
1535
+ ...params,
1536
+ headers: {
1537
+ "Content-Type": "application/json",
1538
+ ...options?.headers,
1539
+ ...params.headers
1540
+ }
1541
+ });
1542
+ }
1543
+ /**
1544
+ * Respond to an email onboarding information request
1545
+ *
1546
+ * Allows workspace owners and admins to submit bounded text and up to three pending-scanned evidence uploads for the current review generation.
1547
+ */
1548
+ static respondToOnboardingInformationRequest(parameters, options) {
1549
+ const params = buildClientParams([parameters], [{ args: [
1550
+ {
1551
+ in: "body",
1552
+ key: "expectedGeneration"
1553
+ },
1554
+ {
1555
+ in: "body",
1556
+ key: "responseText"
1557
+ },
1558
+ {
1559
+ in: "body",
1560
+ key: "evidenceMediaIds"
1561
+ }
1562
+ ] }]);
1563
+ return (options?.client ?? client).post({
1564
+ security: [{
1565
+ name: "x-api-key",
1566
+ type: "apiKey"
1567
+ }],
1568
+ url: "/v1/email/onboarding-review/respond",
1569
+ ...options,
1570
+ ...params,
1571
+ headers: {
1572
+ "Content-Type": "application/json",
1573
+ ...options?.headers,
1574
+ ...params.headers
1575
+ }
1576
+ });
1577
+ }
1420
1578
  /**
1421
1579
  * Get email tracking defaults
1422
1580
  *
@@ -1600,6 +1758,29 @@ var Email = class {
1600
1758
  });
1601
1759
  }
1602
1760
  /**
1761
+ * Stage a DKIM selector rotation
1762
+ *
1763
+ * Creates encrypted signing custody and returns a new public DKIM record. Publish it, then advance domain verification to cut over. Retain the former record until separately approved retirement.
1764
+ */
1765
+ static rotateDomainDkim(parameters, options) {
1766
+ const params = buildClientParams([parameters], [{ args: [{
1767
+ in: "headers",
1768
+ key: "idempotency-key"
1769
+ }, {
1770
+ in: "path",
1771
+ key: "id"
1772
+ }] }]);
1773
+ return (options?.client ?? client).post({
1774
+ security: [{
1775
+ name: "x-api-key",
1776
+ type: "apiKey"
1777
+ }],
1778
+ url: "/v1/email/domains/{id}/dkim-rotation",
1779
+ ...options,
1780
+ ...params
1781
+ });
1782
+ }
1783
+ /**
1603
1784
  * Remove a sending domain
1604
1785
  *
1605
1786
  * Permanently deletes a sending domain from the organization.
@@ -2176,6 +2357,26 @@ var Email = class {
2176
2357
  });
2177
2358
  }
2178
2359
  /**
2360
+ * Get a sender identity
2361
+ *
2362
+ * Returns one sender identity owned by the authenticated organization. Other organizations' ids are reported as not found.
2363
+ */
2364
+ static getSender(parameters, options) {
2365
+ const params = buildClientParams([parameters], [{ args: [{
2366
+ in: "path",
2367
+ key: "id"
2368
+ }] }]);
2369
+ return (options?.client ?? client).get({
2370
+ security: [{
2371
+ name: "x-api-key",
2372
+ type: "apiKey"
2373
+ }],
2374
+ url: "/v1/email/senders/{id}",
2375
+ ...options,
2376
+ ...params
2377
+ });
2378
+ }
2379
+ /**
2179
2380
  * Set the organization default sender
2180
2381
  *
2181
2382
  * Marks a verified, active sender as the organization default, atomically clearing any previous default. Used for omitted-`from` sends when no default domain sender applies.
@@ -2848,6 +3049,215 @@ var Email = class {
2848
3049
  ...params
2849
3050
  });
2850
3051
  }
3052
+ /**
3053
+ * Get domain warming
3054
+ *
3055
+ * Returns the domain's automated warming policy, its system-created 24-hour windows and policy snapshots, the rolling bounce and complaint window the safety rule reads, every pause above the plan, and the decision history. A domain without a plan returns the evidence and a null plan.
3056
+ */
3057
+ static getDomainWarming(parameters, options) {
3058
+ const params = buildClientParams([parameters], [{ args: [{
3059
+ in: "path",
3060
+ key: "id"
3061
+ }] }]);
3062
+ return (options?.client ?? client).get({
3063
+ security: [{
3064
+ name: "x-api-key",
3065
+ type: "apiKey"
3066
+ }],
3067
+ url: "/v1/email/domains/{id}/warming",
3068
+ ...options,
3069
+ ...params
3070
+ });
3071
+ }
3072
+ /**
3073
+ * Start domain warming
3074
+ *
3075
+ * Starts an automated warming policy on a verified sending domain. Samva opens the first 24-hour campaign window immediately, then opens later windows from the saved growth policy after safe windows close. Direct sends are counted in the domain's window but never delayed. Responds with 201.
3076
+ */
3077
+ static createDomainWarmingPlan(parameters, options) {
3078
+ const params = buildClientParams([parameters], [{ args: [
3079
+ {
3080
+ in: "path",
3081
+ key: "id"
3082
+ },
3083
+ {
3084
+ in: "body",
3085
+ key: "identity"
3086
+ },
3087
+ {
3088
+ in: "body",
3089
+ key: "initialDailyRecipients"
3090
+ },
3091
+ {
3092
+ in: "body",
3093
+ key: "dailyGrowthPercent"
3094
+ },
3095
+ {
3096
+ in: "body",
3097
+ key: "targetDailyRecipients"
3098
+ }
3099
+ ] }]);
3100
+ return (options?.client ?? client).post({
3101
+ security: [{
3102
+ name: "x-api-key",
3103
+ type: "apiKey"
3104
+ }],
3105
+ url: "/v1/email/domains/{id}/warming",
3106
+ ...options,
3107
+ ...params,
3108
+ headers: {
3109
+ "Content-Type": "application/json",
3110
+ ...options?.headers,
3111
+ ...params.headers
3112
+ }
3113
+ });
3114
+ }
3115
+ /**
3116
+ * Update domain warming policy
3117
+ *
3118
+ * Updates the growth percentage and daily target Samva uses for future 24-hour warming windows. Existing windows keep their policy snapshot, including a scheduled window, so prior authorization remains auditable.
3119
+ */
3120
+ static updateDomainWarmingPolicy(parameters, options) {
3121
+ const params = buildClientParams([parameters], [{ args: [
3122
+ {
3123
+ in: "path",
3124
+ key: "id"
3125
+ },
3126
+ {
3127
+ in: "body",
3128
+ key: "dailyGrowthPercent"
3129
+ },
3130
+ {
3131
+ in: "body",
3132
+ key: "targetDailyRecipients"
3133
+ },
3134
+ {
3135
+ in: "body",
3136
+ key: "note"
3137
+ }
3138
+ ] }]);
3139
+ return (options?.client ?? client).patch({
3140
+ security: [{
3141
+ name: "x-api-key",
3142
+ type: "apiKey"
3143
+ }],
3144
+ url: "/v1/email/domains/{id}/warming/policy",
3145
+ ...options,
3146
+ ...params,
3147
+ headers: {
3148
+ "Content-Type": "application/json",
3149
+ ...options?.headers,
3150
+ ...params.headers
3151
+ }
3152
+ });
3153
+ }
3154
+ /**
3155
+ * Cancel a warming window
3156
+ *
3157
+ * Cancels a scheduled or open system-created warming window. Recipients a campaign run already reserved from it stay reserved; no further runs draw from it.
3158
+ */
3159
+ static cancelDomainWarmingBatch(parameters, options) {
3160
+ const params = buildClientParams([parameters], [{ args: [{
3161
+ in: "path",
3162
+ key: "id"
3163
+ }, {
3164
+ in: "path",
3165
+ key: "batchId"
3166
+ }] }]);
3167
+ return (options?.client ?? client).delete({
3168
+ security: [{
3169
+ name: "x-api-key",
3170
+ type: "apiKey"
3171
+ }],
3172
+ url: "/v1/email/domains/{id}/warming/batches/{batchId}",
3173
+ ...options,
3174
+ ...params
3175
+ });
3176
+ }
3177
+ /**
3178
+ * Pause domain warming
3179
+ *
3180
+ * Pauses the plan. Campaign runs from the domain stop at their next page and queued campaign email waits until it expires; direct sends are unaffected.
3181
+ */
3182
+ static pauseDomainWarming(parameters, options) {
3183
+ const params = buildClientParams([parameters], [{ args: [{
3184
+ in: "path",
3185
+ key: "id"
3186
+ }, {
3187
+ in: "body",
3188
+ key: "note"
3189
+ }] }]);
3190
+ return (options?.client ?? client).post({
3191
+ security: [{
3192
+ name: "x-api-key",
3193
+ type: "apiKey"
3194
+ }],
3195
+ url: "/v1/email/domains/{id}/warming/pause",
3196
+ ...options,
3197
+ ...params,
3198
+ headers: {
3199
+ "Content-Type": "application/json",
3200
+ ...options?.headers,
3201
+ ...params.headers
3202
+ }
3203
+ });
3204
+ }
3205
+ /**
3206
+ * Resume domain warming
3207
+ *
3208
+ * Resumes a paused or held plan and the campaign runs it was holding. A plan the domain rule held resumes only once the domain's rolling window is under both limits again; until then the request is refused with the observed rate.
3209
+ */
3210
+ static resumeDomainWarming(parameters, options) {
3211
+ const params = buildClientParams([parameters], [{ args: [{
3212
+ in: "path",
3213
+ key: "id"
3214
+ }, {
3215
+ in: "body",
3216
+ key: "note"
3217
+ }] }]);
3218
+ return (options?.client ?? client).post({
3219
+ security: [{
3220
+ name: "x-api-key",
3221
+ type: "apiKey"
3222
+ }],
3223
+ url: "/v1/email/domains/{id}/warming/resume",
3224
+ ...options,
3225
+ ...params,
3226
+ headers: {
3227
+ "Content-Type": "application/json",
3228
+ ...options?.headers,
3229
+ ...params.headers
3230
+ }
3231
+ });
3232
+ }
3233
+ /**
3234
+ * Complete domain warming
3235
+ *
3236
+ * Ends the policy. Campaign runs from the domain are no longer gated by warming windows; the workspace safeguards still apply.
3237
+ */
3238
+ static completeDomainWarming(parameters, options) {
3239
+ const params = buildClientParams([parameters], [{ args: [{
3240
+ in: "path",
3241
+ key: "id"
3242
+ }, {
3243
+ in: "body",
3244
+ key: "note"
3245
+ }] }]);
3246
+ return (options?.client ?? client).post({
3247
+ security: [{
3248
+ name: "x-api-key",
3249
+ type: "apiKey"
3250
+ }],
3251
+ url: "/v1/email/domains/{id}/warming/complete",
3252
+ ...options,
3253
+ ...params,
3254
+ headers: {
3255
+ "Content-Type": "application/json",
3256
+ ...options?.headers,
3257
+ ...params.headers
3258
+ }
3259
+ });
3260
+ }
2851
3261
  };
2852
3262
  var Media = class {
2853
3263
  /**
@@ -4960,7 +5370,7 @@ var Webhooks = class {
4960
5370
  /**
4961
5371
  * List webhooks
4962
5372
  *
4963
- * Returns a paginated list of the organization's webhook endpoints, optionally filtered by a name search.
5373
+ * Returns a paginated list of the organization's webhook endpoints with each endpoint's delivery counts, optionally filtered by name search and status.
4964
5374
  */
4965
5375
  static list(parameters, options) {
4966
5376
  const params = buildClientParams([parameters], [{ args: [
@@ -4975,6 +5385,10 @@ var Webhooks = class {
4975
5385
  {
4976
5386
  in: "query",
4977
5387
  key: "search"
5388
+ },
5389
+ {
5390
+ in: "query",
5391
+ key: "status"
4978
5392
  }
4979
5393
  ] }]);
4980
5394
  return (options?.client ?? client).get({
@@ -5156,7 +5570,7 @@ var Webhooks = class {
5156
5570
  /**
5157
5571
  * List webhook delivery logs
5158
5572
  *
5159
- * Returns recent deliveries and their nested attempt diagnostics for a webhook endpoint.
5573
+ * Returns recent deliveries for a webhook endpoint, each naming the event type and time it was made for, with its nested attempt diagnostics.
5160
5574
  */
5161
5575
  static getLogs(parameters, options) {
5162
5576
  const params = buildClientParams([parameters], [{ args: [{
@@ -5179,12 +5593,15 @@ var Webhooks = class {
5179
5593
  /**
5180
5594
  * Get webhook delivery statistics
5181
5595
  *
5182
- * Returns aggregate pending, delivered, exhausted, and cancelled delivery counts for a webhook endpoint.
5596
+ * Returns aggregate pending, delivered, exhausted, and cancelled delivery counts for a webhook endpoint, plus the same counts per workspace-local calendar day over the selected period of 7, 30, or 90 days. Deliveries are retained for 90 days, so 90d is the whole history.
5183
5597
  */
5184
5598
  static getStats(parameters, options) {
5185
5599
  const params = buildClientParams([parameters], [{ args: [{
5186
5600
  in: "path",
5187
5601
  key: "webhookId"
5602
+ }, {
5603
+ in: "query",
5604
+ key: "period"
5188
5605
  }] }]);
5189
5606
  return (options?.client ?? client).get({
5190
5607
  security: [{
@@ -5754,6 +6171,13 @@ var InternalError = class extends SamvaApiError {
5754
6171
  Object.assign(this, payload);
5755
6172
  }
5756
6173
  };
6174
+ var OnboardingReviewRequiredError = class extends SamvaApiError {
6175
+ _tag = "OnboardingReviewRequiredError";
6176
+ constructor(payload, context = {}) {
6177
+ super(messageOf("OnboardingReviewRequiredError", payload), context);
6178
+ Object.assign(this, payload);
6179
+ }
6180
+ };
5757
6181
  var PaymentRequiredError = class extends SamvaApiError {
5758
6182
  _tag = "PaymentRequiredError";
5759
6183
  constructor(payload, context = {}) {
@@ -5804,6 +6228,7 @@ const constructors = {
5804
6228
  FlagDisabledError,
5805
6229
  ForbiddenError,
5806
6230
  InternalError,
6231
+ OnboardingReviewRequiredError,
5807
6232
  PaymentRequiredError,
5808
6233
  RateLimitedError,
5809
6234
  ResourceNotFoundError,
@@ -5956,6 +6381,69 @@ const payloadSchemas = {
5956
6381
  "x-category": ["transient"],
5957
6382
  "x-retryable": true
5958
6383
  },
6384
+ OnboardingReviewRequiredError: {
6385
+ type: "object",
6386
+ properties: {
6387
+ _tag: {
6388
+ type: "string",
6389
+ enum: ["OnboardingReviewRequiredError"]
6390
+ },
6391
+ operation: { type: "string" },
6392
+ code: {
6393
+ type: "string",
6394
+ enum: [
6395
+ "review_required",
6396
+ "review_in_progress",
6397
+ "information_required",
6398
+ "review_rejected",
6399
+ "identity_review_required",
6400
+ "identity_review_rejected",
6401
+ "identity_changed"
6402
+ ]
6403
+ },
6404
+ decision: {
6405
+ type: "string",
6406
+ enum: [
6407
+ "undecided",
6408
+ "approved",
6409
+ "rejected",
6410
+ "exempt"
6411
+ ]
6412
+ },
6413
+ stage: {
6414
+ type: "string",
6415
+ enum: [
6416
+ "collecting",
6417
+ "automated_review",
6418
+ "manual_review",
6419
+ "information_requested",
6420
+ "complete"
6421
+ ]
6422
+ },
6423
+ nextAction: {
6424
+ type: "string",
6425
+ enum: [
6426
+ "wait_for_review",
6427
+ "provide_information",
6428
+ "verify_sending_identity",
6429
+ "reapply",
6430
+ "contact_support"
6431
+ ]
6432
+ },
6433
+ identityId: { anyOf: [{ type: "string" }, { type: "null" }] }
6434
+ },
6435
+ required: [
6436
+ "_tag",
6437
+ "operation",
6438
+ "code",
6439
+ "decision",
6440
+ "stage",
6441
+ "nextAction"
6442
+ ],
6443
+ additionalProperties: false,
6444
+ "x-category": ["validation"],
6445
+ "x-retryable": false
6446
+ },
5959
6447
  PaymentRequiredError: {
5960
6448
  type: "object",
5961
6449
  properties: {
@@ -6110,8 +6598,10 @@ const matchesSchema = (value, schema) => {
6110
6598
  if (schema.required?.some((key) => !Object.hasOwn(value, key)) === true) return false;
6111
6599
  const properties = schema.properties ?? {};
6112
6600
  for (const [key, propertySchema] of Object.entries(properties)) if (Object.hasOwn(value, key) && !matchesSchema(value[key], propertySchema)) return false;
6113
- if (typeof schema.additionalProperties === "object") {
6114
- for (const [key, propertyValue] of Object.entries(value)) if (!(key in properties) && !matchesSchema(propertyValue, schema.additionalProperties)) return false;
6601
+ if (schema.additionalProperties === false) {
6602
+ if (Object.keys(value).some((key) => !Object.hasOwn(properties, key))) return false;
6603
+ } else if (typeof schema.additionalProperties === "object") {
6604
+ for (const [key, propertyValue] of Object.entries(value)) if (!Object.hasOwn(properties, key) && !matchesSchema(propertyValue, schema.additionalProperties)) return false;
6115
6605
  }
6116
6606
  return true;
6117
6607
  };
@@ -6119,7 +6609,7 @@ const matchesSchema = (value, schema) => {
6119
6609
  function fromApiError(error, context = {}) {
6120
6610
  if (error instanceof SamvaApiError) return error;
6121
6611
  if (error instanceof SamvaTransportError) return error;
6122
- if (isRecord(error) && typeof error._tag === "string" && error._tag in constructors) {
6612
+ if (isRecord(error) && typeof error._tag === "string" && Object.hasOwn(constructors, error._tag)) {
6123
6613
  const tag = error._tag;
6124
6614
  if (!matchesSchema(error, payloadSchemas[tag])) return new SamvaTransportError(error, context);
6125
6615
  const Constructor = constructors[tag];
@@ -6167,6 +6657,7 @@ function createPromiseMessagesTransport(clientInstance) {
6167
6657
  getEmail: boundMessages.getEmail,
6168
6658
  getStatus: boundMessages.getStatus,
6169
6659
  getEvents: boundMessages.getEvents,
6660
+ validateEmail: boundMessages.validateEmail,
6170
6661
  send: (input, options) => Messages.send({ emailSendMessagePayload: buildMessagesSendPayload(input) }, {
6171
6662
  ...options,
6172
6663
  client: clientInstance
@@ -6294,6 +6785,6 @@ function createClient(config) {
6294
6785
  };
6295
6786
  }
6296
6787
  //#endregion
6297
- export { fromApiError as _, ExternalServiceError as a, InternalError as c, ResourceNotFoundError as d, SamvaApiError as f, WebhookEnqueueError as g, ValidationError as h, EmailChannelError as i, PaymentRequiredError as l, UnauthorizedError as m, BillingProviderError as n, FlagDisabledError as o, SamvaTransportError as p, ConflictError as r, ForbiddenError as s, createClient as t, RateLimitedError as u };
6788
+ export { WebhookEnqueueError as _, ExternalServiceError as a, InternalError as c, RateLimitedError as d, ResourceNotFoundError as f, ValidationError as g, UnauthorizedError as h, EmailChannelError as i, OnboardingReviewRequiredError as l, SamvaTransportError as m, BillingProviderError as n, FlagDisabledError as o, SamvaApiError as p, ConflictError as r, ForbiddenError as s, createClient as t, PaymentRequiredError as u, fromApiError as v };
6298
6789
 
6299
- //# sourceMappingURL=promises-n1opem5V.js.map
6790
+ //# sourceMappingURL=promises-CP_nxUus.js.map