@zyphr-dev/node-sdk 0.1.53 → 0.1.55

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.
package/dist/index.cjs CHANGED
@@ -1216,6 +1216,10 @@ __export(index_exports, {
1216
1216
  RequestMetaToJSON: () => RequestMetaToJSON,
1217
1217
  RequestMetaToJSONTyped: () => RequestMetaToJSONTyped,
1218
1218
  RequiredError: () => RequiredError,
1219
+ ResendEmailVerificationRequestFromJSON: () => ResendEmailVerificationRequestFromJSON,
1220
+ ResendEmailVerificationRequestFromJSONTyped: () => ResendEmailVerificationRequestFromJSONTyped,
1221
+ ResendEmailVerificationRequestToJSON: () => ResendEmailVerificationRequestToJSON,
1222
+ ResendEmailVerificationRequestToJSONTyped: () => ResendEmailVerificationRequestToJSONTyped,
1219
1223
  ResetPasswordRequestFromJSON: () => ResetPasswordRequestFromJSON,
1220
1224
  ResetPasswordRequestFromJSONTyped: () => ResetPasswordRequestFromJSONTyped,
1221
1225
  ResetPasswordRequestToJSON: () => ResetPasswordRequestToJSON,
@@ -2076,18 +2080,6 @@ __export(index_exports, {
2076
2080
  WebhookMetricsResponseFromJSONTyped: () => WebhookMetricsResponseFromJSONTyped,
2077
2081
  WebhookMetricsResponseToJSON: () => WebhookMetricsResponseToJSON,
2078
2082
  WebhookMetricsResponseToJSONTyped: () => WebhookMetricsResponseToJSONTyped,
2079
- WebhookRegionFromJSON: () => WebhookRegionFromJSON,
2080
- WebhookRegionFromJSONTyped: () => WebhookRegionFromJSONTyped,
2081
- WebhookRegionToJSON: () => WebhookRegionToJSON,
2082
- WebhookRegionToJSONTyped: () => WebhookRegionToJSONTyped,
2083
- WebhookRegionsResponseDataFromJSON: () => WebhookRegionsResponseDataFromJSON,
2084
- WebhookRegionsResponseDataFromJSONTyped: () => WebhookRegionsResponseDataFromJSONTyped,
2085
- WebhookRegionsResponseDataToJSON: () => WebhookRegionsResponseDataToJSON,
2086
- WebhookRegionsResponseDataToJSONTyped: () => WebhookRegionsResponseDataToJSONTyped,
2087
- WebhookRegionsResponseFromJSON: () => WebhookRegionsResponseFromJSON,
2088
- WebhookRegionsResponseFromJSONTyped: () => WebhookRegionsResponseFromJSONTyped,
2089
- WebhookRegionsResponseToJSON: () => WebhookRegionsResponseToJSON,
2090
- WebhookRegionsResponseToJSONTyped: () => WebhookRegionsResponseToJSONTyped,
2091
2083
  WebhookReplayResponseFromJSON: () => WebhookReplayResponseFromJSON,
2092
2084
  WebhookReplayResponseFromJSONTyped: () => WebhookReplayResponseFromJSONTyped,
2093
2085
  WebhookReplayResponseToJSON: () => WebhookReplayResponseToJSON,
@@ -2468,6 +2460,7 @@ __export(index_exports, {
2468
2460
  instanceOfReorderWorkflowStepsRequest: () => instanceOfReorderWorkflowStepsRequest,
2469
2461
  instanceOfReplayWebhookEventsRequest: () => instanceOfReplayWebhookEventsRequest,
2470
2462
  instanceOfRequestMeta: () => instanceOfRequestMeta,
2463
+ instanceOfResendEmailVerificationRequest: () => instanceOfResendEmailVerificationRequest,
2471
2464
  instanceOfResetPasswordRequest: () => instanceOfResetPasswordRequest,
2472
2465
  instanceOfResetPasswordResponse: () => instanceOfResetPasswordResponse,
2473
2466
  instanceOfResubscribeRequest: () => instanceOfResubscribeRequest,
@@ -2672,9 +2665,6 @@ __export(index_exports, {
2672
2665
  instanceOfWebhookJobResponse: () => instanceOfWebhookJobResponse,
2673
2666
  instanceOfWebhookListResponse: () => instanceOfWebhookListResponse,
2674
2667
  instanceOfWebhookMetricsResponse: () => instanceOfWebhookMetricsResponse,
2675
- instanceOfWebhookRegion: () => instanceOfWebhookRegion,
2676
- instanceOfWebhookRegionsResponse: () => instanceOfWebhookRegionsResponse,
2677
- instanceOfWebhookRegionsResponseData: () => instanceOfWebhookRegionsResponseData,
2678
2668
  instanceOfWebhookReplayResponse: () => instanceOfWebhookReplayResponse,
2679
2669
  instanceOfWebhookResponse: () => instanceOfWebhookResponse,
2680
2670
  instanceOfWebhookSecretRotateResponse: () => instanceOfWebhookSecretRotateResponse,
@@ -5080,7 +5070,8 @@ function ConfirmEmailVerificationResponseDataFromJSONTyped(json, ignoreDiscrimin
5080
5070
  }
5081
5071
  return {
5082
5072
  "success": json["success"] == null ? void 0 : json["success"],
5083
- "email": json["email"] == null ? void 0 : json["email"]
5073
+ "email": json["email"] == null ? void 0 : json["email"],
5074
+ "alreadyVerified": json["already_verified"] == null ? void 0 : json["already_verified"]
5084
5075
  };
5085
5076
  }
5086
5077
  function ConfirmEmailVerificationResponseDataToJSON(json) {
@@ -5092,7 +5083,8 @@ function ConfirmEmailVerificationResponseDataToJSONTyped(value, ignoreDiscrimina
5092
5083
  }
5093
5084
  return {
5094
5085
  "success": value["success"],
5095
- "email": value["email"]
5086
+ "email": value["email"],
5087
+ "already_verified": value["alreadyVerified"]
5096
5088
  };
5097
5089
  }
5098
5090
 
@@ -12932,6 +12924,33 @@ function ReplayWebhookEventsRequestToJSONTyped(value, ignoreDiscriminator = fals
12932
12924
  };
12933
12925
  }
12934
12926
 
12927
+ // src/src/models/ResendEmailVerificationRequest.ts
12928
+ function instanceOfResendEmailVerificationRequest(value) {
12929
+ return true;
12930
+ }
12931
+ function ResendEmailVerificationRequestFromJSON(json) {
12932
+ return ResendEmailVerificationRequestFromJSONTyped(json, false);
12933
+ }
12934
+ function ResendEmailVerificationRequestFromJSONTyped(json, ignoreDiscriminator) {
12935
+ if (json == null) {
12936
+ return json;
12937
+ }
12938
+ return {
12939
+ "redirectUrl": json["redirect_url"] == null ? void 0 : json["redirect_url"]
12940
+ };
12941
+ }
12942
+ function ResendEmailVerificationRequestToJSON(json) {
12943
+ return ResendEmailVerificationRequestToJSONTyped(json, false);
12944
+ }
12945
+ function ResendEmailVerificationRequestToJSONTyped(value, ignoreDiscriminator = false) {
12946
+ if (value == null) {
12947
+ return value;
12948
+ }
12949
+ return {
12950
+ "redirect_url": value["redirectUrl"]
12951
+ };
12952
+ }
12953
+
12935
12954
  // src/src/models/ResetPasswordRequest.ts
12936
12955
  function instanceOfResetPasswordRequest(value) {
12937
12956
  if (!("token" in value) || value["token"] === void 0) return false;
@@ -18904,7 +18923,6 @@ function WebhookDeliveryFromJSONTyped(json, ignoreDiscriminator) {
18904
18923
  "firstAttemptedAt": json["first_attempted_at"] == null ? void 0 : new Date(json["first_attempted_at"]),
18905
18924
  "lastAttemptedAt": json["last_attempted_at"] == null ? void 0 : new Date(json["last_attempted_at"]),
18906
18925
  "completedAt": json["completed_at"] == null ? void 0 : new Date(json["completed_at"]),
18907
- "deliveryRegion": json["delivery_region"] == null ? void 0 : json["delivery_region"],
18908
18926
  "createdAt": json["created_at"] == null ? void 0 : new Date(json["created_at"])
18909
18927
  };
18910
18928
  }
@@ -18930,7 +18948,6 @@ function WebhookDeliveryToJSONTyped(value, ignoreDiscriminator = false) {
18930
18948
  "first_attempted_at": value["firstAttemptedAt"] == null ? void 0 : value["firstAttemptedAt"].toISOString(),
18931
18949
  "last_attempted_at": value["lastAttemptedAt"] == null ? void 0 : value["lastAttemptedAt"].toISOString(),
18932
18950
  "completed_at": value["completedAt"] == null ? void 0 : value["completedAt"].toISOString(),
18933
- "delivery_region": value["deliveryRegion"],
18934
18951
  "created_at": value["createdAt"] == null ? void 0 : value["createdAt"].toISOString()
18935
18952
  };
18936
18953
  }
@@ -18968,7 +18985,6 @@ function WebhookDeliveryDetailFromJSONTyped(json, ignoreDiscriminator) {
18968
18985
  "firstAttemptedAt": json["first_attempted_at"] == null ? void 0 : new Date(json["first_attempted_at"]),
18969
18986
  "lastAttemptedAt": json["last_attempted_at"] == null ? void 0 : new Date(json["last_attempted_at"]),
18970
18987
  "completedAt": json["completed_at"] == null ? void 0 : new Date(json["completed_at"]),
18971
- "deliveryRegion": json["delivery_region"] == null ? void 0 : json["delivery_region"],
18972
18988
  "createdAt": json["created_at"] == null ? void 0 : new Date(json["created_at"]),
18973
18989
  "payload": json["payload"] == null ? void 0 : json["payload"],
18974
18990
  "lastResponseBody": json["last_response_body"] == null ? void 0 : json["last_response_body"],
@@ -18998,7 +19014,6 @@ function WebhookDeliveryDetailToJSONTyped(value, ignoreDiscriminator = false) {
18998
19014
  "first_attempted_at": value["firstAttemptedAt"] == null ? void 0 : value["firstAttemptedAt"].toISOString(),
18999
19015
  "last_attempted_at": value["lastAttemptedAt"] == null ? void 0 : value["lastAttemptedAt"].toISOString(),
19000
19016
  "completed_at": value["completedAt"] == null ? void 0 : value["completedAt"].toISOString(),
19001
- "delivery_region": value["deliveryRegion"],
19002
19017
  "created_at": value["createdAt"] == null ? void 0 : value["createdAt"].toISOString(),
19003
19018
  "payload": value["payload"],
19004
19019
  "last_response_body": value["lastResponseBody"],
@@ -19334,95 +19349,6 @@ function WebhookMetricsResponseToJSONTyped(value, ignoreDiscriminator = false) {
19334
19349
  };
19335
19350
  }
19336
19351
 
19337
- // src/src/models/WebhookRegion.ts
19338
- function instanceOfWebhookRegion(value) {
19339
- return true;
19340
- }
19341
- function WebhookRegionFromJSON(json) {
19342
- return WebhookRegionFromJSONTyped(json, false);
19343
- }
19344
- function WebhookRegionFromJSONTyped(json, ignoreDiscriminator) {
19345
- if (json == null) {
19346
- return json;
19347
- }
19348
- return {
19349
- "code": json["code"] == null ? void 0 : json["code"],
19350
- "name": json["name"] == null ? void 0 : json["name"],
19351
- "staticIps": json["static_ips"] == null ? void 0 : json["static_ips"]
19352
- };
19353
- }
19354
- function WebhookRegionToJSON(json) {
19355
- return WebhookRegionToJSONTyped(json, false);
19356
- }
19357
- function WebhookRegionToJSONTyped(value, ignoreDiscriminator = false) {
19358
- if (value == null) {
19359
- return value;
19360
- }
19361
- return {
19362
- "code": value["code"],
19363
- "name": value["name"],
19364
- "static_ips": value["staticIps"]
19365
- };
19366
- }
19367
-
19368
- // src/src/models/WebhookRegionsResponseData.ts
19369
- function instanceOfWebhookRegionsResponseData(value) {
19370
- return true;
19371
- }
19372
- function WebhookRegionsResponseDataFromJSON(json) {
19373
- return WebhookRegionsResponseDataFromJSONTyped(json, false);
19374
- }
19375
- function WebhookRegionsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19376
- if (json == null) {
19377
- return json;
19378
- }
19379
- return {
19380
- "regions": json["regions"] == null ? void 0 : json["regions"].map(WebhookRegionFromJSON),
19381
- "defaultRegion": json["default_region"] == null ? void 0 : json["default_region"]
19382
- };
19383
- }
19384
- function WebhookRegionsResponseDataToJSON(json) {
19385
- return WebhookRegionsResponseDataToJSONTyped(json, false);
19386
- }
19387
- function WebhookRegionsResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
19388
- if (value == null) {
19389
- return value;
19390
- }
19391
- return {
19392
- "regions": value["regions"] == null ? void 0 : value["regions"].map(WebhookRegionToJSON),
19393
- "default_region": value["defaultRegion"]
19394
- };
19395
- }
19396
-
19397
- // src/src/models/WebhookRegionsResponse.ts
19398
- function instanceOfWebhookRegionsResponse(value) {
19399
- return true;
19400
- }
19401
- function WebhookRegionsResponseFromJSON(json) {
19402
- return WebhookRegionsResponseFromJSONTyped(json, false);
19403
- }
19404
- function WebhookRegionsResponseFromJSONTyped(json, ignoreDiscriminator) {
19405
- if (json == null) {
19406
- return json;
19407
- }
19408
- return {
19409
- "data": json["data"] == null ? void 0 : WebhookRegionsResponseDataFromJSON(json["data"]),
19410
- "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
19411
- };
19412
- }
19413
- function WebhookRegionsResponseToJSON(json) {
19414
- return WebhookRegionsResponseToJSONTyped(json, false);
19415
- }
19416
- function WebhookRegionsResponseToJSONTyped(value, ignoreDiscriminator = false) {
19417
- if (value == null) {
19418
- return value;
19419
- }
19420
- return {
19421
- "data": WebhookRegionsResponseDataToJSON(value["data"]),
19422
- "meta": RequestMetaToJSON(value["meta"])
19423
- };
19424
- }
19425
-
19426
19352
  // src/src/models/WebhookReplayResponse.ts
19427
19353
  function instanceOfWebhookReplayResponse(value) {
19428
19354
  return true;
@@ -19787,6 +19713,40 @@ function WithdrawSubscriberConsentRequestToJSONTyped(value, ignoreDiscriminator
19787
19713
 
19788
19714
  // src/src/apis/AuthApplicationApi.ts
19789
19715
  var AuthApplicationApi = class extends BaseAPI {
19716
+ /**
19717
+ * Returns a machine-readable JSON bundle of everything stored about one end user, for answering a GDPR Art. 15 (access) or Art. 20 (portability) request. Zyphr is a **processor**: we do not answer data subjects directly. This endpoint gives you, the controller, the data needed to respond to your own end user. **Credentials are deliberately excluded** and are listed in `export_metadata.excluded`: password hashes, session refresh-token hashes, MFA secrets, OAuth access/refresh tokens and WebAuthn public keys. These are authentication artifacts rather than personal data about the subject, and including them would turn this endpoint into a credential-exfiltration path. Message history is capped at the 1,000 most recent messages; `export_metadata.message_history_truncated` reports whether the cap was hit.
19718
+ * Export all data held about an end user
19719
+ */
19720
+ async exportEndUserDataRaw(requestParameters, initOverrides) {
19721
+ if (requestParameters["id"] == null) {
19722
+ throw new RequiredError(
19723
+ "id",
19724
+ 'Required parameter "id" was null or undefined when calling exportEndUserData().'
19725
+ );
19726
+ }
19727
+ if (requestParameters["userId"] == null) {
19728
+ throw new RequiredError(
19729
+ "userId",
19730
+ 'Required parameter "userId" was null or undefined when calling exportEndUserData().'
19731
+ );
19732
+ }
19733
+ const queryParameters = {};
19734
+ const headerParameters = {};
19735
+ const response = await this.request({
19736
+ path: `/v1/applications/{id}/users/{userId}/export`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters["userId"]))),
19737
+ method: "GET",
19738
+ headers: headerParameters,
19739
+ query: queryParameters
19740
+ }, initOverrides);
19741
+ return new VoidApiResponse(response);
19742
+ }
19743
+ /**
19744
+ * Returns a machine-readable JSON bundle of everything stored about one end user, for answering a GDPR Art. 15 (access) or Art. 20 (portability) request. Zyphr is a **processor**: we do not answer data subjects directly. This endpoint gives you, the controller, the data needed to respond to your own end user. **Credentials are deliberately excluded** and are listed in `export_metadata.excluded`: password hashes, session refresh-token hashes, MFA secrets, OAuth access/refresh tokens and WebAuthn public keys. These are authentication artifacts rather than personal data about the subject, and including them would turn this endpoint into a credential-exfiltration path. Message history is capped at the 1,000 most recent messages; `export_metadata.message_history_truncated` reports whether the cap was hit.
19745
+ * Export all data held about an end user
19746
+ */
19747
+ async exportEndUserData(id, userId, initOverrides) {
19748
+ await this.exportEndUserDataRaw({ id, userId }, initOverrides);
19749
+ }
19790
19750
  /**
19791
19751
  * Return non-sensitive metadata about the application whose credentials authenticated this request. Lets an integrator read their own application_id (the sole tenant discriminator embedded in every end-user token) directly from the API, rather than only from the dashboard UI or by decoding a token. Returns only id, name, the calling environment\'s mode, and the JWT signing algorithm — never secrets, signing keys, or account-internal fields.
19792
19752
  * Get the authenticating application
@@ -20408,7 +20368,7 @@ var AuthEmailTemplatesApi = class extends BaseAPI {
20408
20368
  // src/src/apis/AuthEmailVerificationApi.ts
20409
20369
  var AuthEmailVerificationApi = class extends BaseAPI {
20410
20370
  /**
20411
- * Verify the user\'s email using the token from the verification email.
20371
+ * Verify the user\'s email using a token you collected yourself. IMPORTANT: the emailed verification LINK verifies the address server-side **on click** and then redirects to `redirect_url`. So if you take the token off that redirect and post it here, it is already redeemed — and this endpoint treats that as an idempotent **success** (`200` with `already_verified: true`), not an error. Only a genuinely invalid / expired / unknown token returns `400`. `send` / `confirm` / `resend` are NOT a mandatory matched set — `confirm` is for flows where you collect the token directly rather than landing the hosted redirect. Recommended pattern for the redirect landing: call `confirm`, ignore its result, then read the user\'s verified state back and report that — correct whether or not the link already consumed the token.
20412
20372
  * Confirm email verification
20413
20373
  */
20414
20374
  async confirmEmailVerificationRaw(requestParameters, initOverrides) {
@@ -20437,7 +20397,7 @@ var AuthEmailVerificationApi = class extends BaseAPI {
20437
20397
  return new JSONApiResponse(response, (jsonValue) => ConfirmEmailVerificationResponseFromJSON(jsonValue));
20438
20398
  }
20439
20399
  /**
20440
- * Verify the user\'s email using the token from the verification email.
20400
+ * Verify the user\'s email using a token you collected yourself. IMPORTANT: the emailed verification LINK verifies the address server-side **on click** and then redirects to `redirect_url`. So if you take the token off that redirect and post it here, it is already redeemed — and this endpoint treats that as an idempotent **success** (`200` with `already_verified: true`), not an error. Only a genuinely invalid / expired / unknown token returns `400`. `send` / `confirm` / `resend` are NOT a mandatory matched set — `confirm` is for flows where you collect the token directly rather than landing the hosted redirect. Recommended pattern for the redirect landing: call `confirm`, ignore its result, then read the user\'s verified state back and report that — correct whether or not the link already consumed the token.
20441
20401
  * Confirm email verification
20442
20402
  */
20443
20403
  async confirmEmailVerification(confirmEmailVerificationRequest, initOverrides) {
@@ -20470,7 +20430,7 @@ var AuthEmailVerificationApi = class extends BaseAPI {
20470
20430
  method: "POST",
20471
20431
  headers: headerParameters,
20472
20432
  query: queryParameters,
20473
- body: SendEmailVerificationRequestToJSON(requestParameters["sendEmailVerificationRequest"])
20433
+ body: ResendEmailVerificationRequestToJSON(requestParameters["resendEmailVerificationRequest"])
20474
20434
  }, initOverrides);
20475
20435
  return new JSONApiResponse(response, (jsonValue) => SuccessResultFromJSON(jsonValue));
20476
20436
  }
@@ -20478,12 +20438,12 @@ var AuthEmailVerificationApi = class extends BaseAPI {
20478
20438
  * Resend the verification email to the authenticated user. Rate limited to once per 60 seconds.
20479
20439
  * Resend email verification
20480
20440
  */
20481
- async resendEmailVerification(sendEmailVerificationRequest, initOverrides) {
20482
- const response = await this.resendEmailVerificationRaw({ sendEmailVerificationRequest }, initOverrides);
20441
+ async resendEmailVerification(resendEmailVerificationRequest, initOverrides) {
20442
+ const response = await this.resendEmailVerificationRaw({ resendEmailVerificationRequest }, initOverrides);
20483
20443
  return await response.value();
20484
20444
  }
20485
20445
  /**
20486
- * Send an email verification link to the authenticated user.
20446
+ * Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user\'s `Authorization: Bearer` token. If the recipient is blocked by the application\'s `auth_email_mode=allowlist` gate, the request is still **accepted with 200** (mirroring `POST /auth/forgot-password`): no email is sent, and the suppression is recorded as a `messages` row (`status=suppressed`, `status_reason=recipient_not_allowlisted`) and an `email.suppressed` webhook. It is NOT a 500.
20487
20447
  * Send email verification
20488
20448
  */
20489
20449
  async sendEmailVerificationRaw(requestParameters, initOverrides) {
@@ -20513,7 +20473,7 @@ var AuthEmailVerificationApi = class extends BaseAPI {
20513
20473
  return new JSONApiResponse(response, (jsonValue) => SuccessResultFromJSON(jsonValue));
20514
20474
  }
20515
20475
  /**
20516
- * Send an email verification link to the authenticated user.
20476
+ * Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user\'s `Authorization: Bearer` token. If the recipient is blocked by the application\'s `auth_email_mode=allowlist` gate, the request is still **accepted with 200** (mirroring `POST /auth/forgot-password`): no email is sent, and the suppression is recorded as a `messages` row (`status=suppressed`, `status_reason=recipient_not_allowlisted`) and an `email.suppressed` webhook. It is NOT a 500.
20517
20477
  * Send email verification
20518
20478
  */
20519
20479
  async sendEmailVerification(sendEmailVerificationRequest, initOverrides) {
@@ -23756,7 +23716,7 @@ var EmailsApi = class extends BaseAPI {
23756
23716
  return await response.value();
23757
23717
  }
23758
23718
  /**
23759
- * Queue an email for delivery. The email is processed asynchronously and you\'ll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`.
23719
+ * Queue an email for delivery. The email is processed asynchronously and you\'ll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`. **CAN-SPAM compliance — actions required from you:** - **Set `classification`** to `transactional` or `marketing`. Unclassified is treated as marketing, the stricter reading. Transactional mail (password resets, receipts) is exempt from the opt-out and postal-address requirements. - **Set your postal address** in project settings. Commercial email must carry a valid physical postal address — the most commonly missed CAN-SPAM element. Marketing sends without one are flagged. - **Include an unsubscribe mechanism** on commercial email. Zyphr enforces suppression automatically once someone opts out, but the link itself is yours to include. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
23760
23720
  * Send an email
23761
23721
  */
23762
23722
  async sendEmailRaw(requestParameters, initOverrides) {
@@ -23782,7 +23742,7 @@ var EmailsApi = class extends BaseAPI {
23782
23742
  return new JSONApiResponse(response, (jsonValue) => SendEmailResponseFromJSON(jsonValue));
23783
23743
  }
23784
23744
  /**
23785
- * Queue an email for delivery. The email is processed asynchronously and you\'ll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`.
23745
+ * Queue an email for delivery. The email is processed asynchronously and you\'ll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`. **CAN-SPAM compliance — actions required from you:** - **Set `classification`** to `transactional` or `marketing`. Unclassified is treated as marketing, the stricter reading. Transactional mail (password resets, receipts) is exempt from the opt-out and postal-address requirements. - **Set your postal address** in project settings. Commercial email must carry a valid physical postal address — the most commonly missed CAN-SPAM element. Marketing sends without one are flagged. - **Include an unsubscribe mechanism** on commercial email. Zyphr enforces suppression automatically once someone opts out, but the link itself is yours to include. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
23786
23746
  * Send an email
23787
23747
  */
23788
23748
  async sendEmail(sendEmailRequest, initOverrides) {
@@ -25167,6 +25127,31 @@ var SMSApi = class extends BaseAPI {
25167
25127
  const response = await this.getSmsConfigRaw(initOverrides);
25168
25128
  return await response.value();
25169
25129
  }
25130
+ /**
25131
+ * Returns the URL to configure in your SMS provider so STOP/opt-out replies reach Zyphr. The token is generated on first request and is stable thereafter. **This is required for TCPA compliance.** Until your provider is pointed at this URL, opt-out replies stop at the provider and never reach us — from Zyphr\'s side the recipient never opted out, and sends continue. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
25132
+ * Get the inbound SMS webhook URL
25133
+ */
25134
+ async getSmsInboundWebhookRaw(initOverrides) {
25135
+ const queryParameters = {};
25136
+ const headerParameters = {};
25137
+ if (this.configuration && this.configuration.apiKey) {
25138
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
25139
+ }
25140
+ const response = await this.request({
25141
+ path: `/sms/inbound-webhook`,
25142
+ method: "GET",
25143
+ headers: headerParameters,
25144
+ query: queryParameters
25145
+ }, initOverrides);
25146
+ return new VoidApiResponse(response);
25147
+ }
25148
+ /**
25149
+ * Returns the URL to configure in your SMS provider so STOP/opt-out replies reach Zyphr. The token is generated on first request and is stable thereafter. **This is required for TCPA compliance.** Until your provider is pointed at this URL, opt-out replies stop at the provider and never reach us — from Zyphr\'s side the recipient never opted out, and sends continue. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
25150
+ * Get the inbound SMS webhook URL
25151
+ */
25152
+ async getSmsInboundWebhook(initOverrides) {
25153
+ await this.getSmsInboundWebhookRaw(initOverrides);
25154
+ }
25170
25155
  /**
25171
25156
  * List SMS messages for the account with optional filtering and pagination.
25172
25157
  * List SMS messages
@@ -25240,7 +25225,7 @@ var SMSApi = class extends BaseAPI {
25240
25225
  return await response.value();
25241
25226
  }
25242
25227
  /**
25243
- * Send a single SMS text message. Supports subscriber preference checks and scheduling.
25228
+ * Send a single SMS text message. Supports subscriber preference checks and scheduling. **TCPA compliance — actions required from you:** - **Configure the inbound webhook.** Zyphr only processes STOP/opt-out replies if your SMS provider is pointed at our inbound endpoint. Until you do this, opt-outs never reach us and we will keep delivering. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements). - **Pass `recipient_timezone`** (IANA, e.g. `America/New_York`) so quiet hours (8am-9pm recipient-local) can be enforced. Without it we send and record that quiet hours could not be evaluated. We deliberately do not infer a timezone from the area code — people keep numbers when they move. - **Record consent** for marketing sends. Marketing requires prior express *written* consent; `express` consent covers transactional only. With no record on file we deliver and flag it, which is a gap in your evidence, not permission. - **Set `classification`.** Unclassified messages are treated as marketing, the stricter reading.
25244
25229
  * Send an SMS message
25245
25230
  */
25246
25231
  async sendSmsRaw(requestParameters, initOverrides) {
@@ -25266,7 +25251,7 @@ var SMSApi = class extends BaseAPI {
25266
25251
  return new JSONApiResponse(response, (jsonValue) => SendSmsResponseFromJSON(jsonValue));
25267
25252
  }
25268
25253
  /**
25269
- * Send a single SMS text message. Supports subscriber preference checks and scheduling.
25254
+ * Send a single SMS text message. Supports subscriber preference checks and scheduling. **TCPA compliance — actions required from you:** - **Configure the inbound webhook.** Zyphr only processes STOP/opt-out replies if your SMS provider is pointed at our inbound endpoint. Until you do this, opt-outs never reach us and we will keep delivering. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements). - **Pass `recipient_timezone`** (IANA, e.g. `America/New_York`) so quiet hours (8am-9pm recipient-local) can be enforced. Without it we send and record that quiet hours could not be evaluated. We deliberately do not infer a timezone from the area code — people keep numbers when they move. - **Record consent** for marketing sends. Marketing requires prior express *written* consent; `express` consent covers transactional only. With no record on file we deliver and flag it, which is a gap in your evidence, not permission. - **Set `classification`.** Unclassified messages are treated as marketing, the stricter reading.
25270
25255
  * Send an SMS message
25271
25256
  */
25272
25257
  async sendSms(sendSmsRequest, initOverrides) {
@@ -28290,32 +28275,6 @@ var WebhooksApi = class extends BaseAPI {
28290
28275
  const response = await this.getWebhookMetricsRaw({ id }, initOverrides);
28291
28276
  return await response.value();
28292
28277
  }
28293
- /**
28294
- * Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
28295
- * Get available webhook regions
28296
- */
28297
- async getWebhookRegionsRaw(initOverrides) {
28298
- const queryParameters = {};
28299
- const headerParameters = {};
28300
- if (this.configuration && this.configuration.apiKey) {
28301
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
28302
- }
28303
- const response = await this.request({
28304
- path: `/v1/webhooks/regions`,
28305
- method: "GET",
28306
- headers: headerParameters,
28307
- query: queryParameters
28308
- }, initOverrides);
28309
- return new JSONApiResponse(response, (jsonValue) => WebhookRegionsResponseFromJSON(jsonValue));
28310
- }
28311
- /**
28312
- * Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
28313
- * Get available webhook regions
28314
- */
28315
- async getWebhookRegions(initOverrides) {
28316
- const response = await this.getWebhookRegionsRaw(initOverrides);
28317
- return await response.value();
28318
- }
28319
28278
  /**
28320
28279
  * Get webhook delivery usage statistics for the current billing period.
28321
28280
  * Get webhook usage metrics
@@ -29298,6 +29257,15 @@ var Zyphr = class {
29298
29257
  /** Publishable-key-safe utilities: password policy + pre-submit strength check. */
29299
29258
  utility;
29300
29259
  domains;
29260
+ /**
29261
+ * Multi-step workflow definitions and triggering (sc-7926).
29262
+ *
29263
+ * All 12 operations are API-key authenticated with dedicated
29264
+ * `workflows:read` / `workflows:write` / `workflows:execute` scopes, so this
29265
+ * is deliberate public surface. It was generated but never wired onto the
29266
+ * facade, which made the documented `zyphr.workflows.*` calls throw.
29267
+ */
29268
+ workflows;
29301
29269
  /** Inbound (received) email — read access. Requires the `email:read` scope. */
29302
29270
  inbound;
29303
29271
  waas;
@@ -29326,6 +29294,7 @@ var Zyphr = class {
29326
29294
  this.devices = new DevicesApi(config);
29327
29295
  this.utility = new UtilityApi(config);
29328
29296
  this.domains = new DomainsApi(config);
29297
+ this.workflows = new WorkflowsApi(config);
29329
29298
  this.inbound = new InboundEmailApi(config);
29330
29299
  this.waas = {
29331
29300
  applications: new WaaSApplicationsApi(config),
@@ -30706,6 +30675,10 @@ var SDK_VERSION = "0.1.0";
30706
30675
  RequestMetaToJSON,
30707
30676
  RequestMetaToJSONTyped,
30708
30677
  RequiredError,
30678
+ ResendEmailVerificationRequestFromJSON,
30679
+ ResendEmailVerificationRequestFromJSONTyped,
30680
+ ResendEmailVerificationRequestToJSON,
30681
+ ResendEmailVerificationRequestToJSONTyped,
30709
30682
  ResetPasswordRequestFromJSON,
30710
30683
  ResetPasswordRequestFromJSONTyped,
30711
30684
  ResetPasswordRequestToJSON,
@@ -31566,18 +31539,6 @@ var SDK_VERSION = "0.1.0";
31566
31539
  WebhookMetricsResponseFromJSONTyped,
31567
31540
  WebhookMetricsResponseToJSON,
31568
31541
  WebhookMetricsResponseToJSONTyped,
31569
- WebhookRegionFromJSON,
31570
- WebhookRegionFromJSONTyped,
31571
- WebhookRegionToJSON,
31572
- WebhookRegionToJSONTyped,
31573
- WebhookRegionsResponseDataFromJSON,
31574
- WebhookRegionsResponseDataFromJSONTyped,
31575
- WebhookRegionsResponseDataToJSON,
31576
- WebhookRegionsResponseDataToJSONTyped,
31577
- WebhookRegionsResponseFromJSON,
31578
- WebhookRegionsResponseFromJSONTyped,
31579
- WebhookRegionsResponseToJSON,
31580
- WebhookRegionsResponseToJSONTyped,
31581
31542
  WebhookReplayResponseFromJSON,
31582
31543
  WebhookReplayResponseFromJSONTyped,
31583
31544
  WebhookReplayResponseToJSON,
@@ -31958,6 +31919,7 @@ var SDK_VERSION = "0.1.0";
31958
31919
  instanceOfReorderWorkflowStepsRequest,
31959
31920
  instanceOfReplayWebhookEventsRequest,
31960
31921
  instanceOfRequestMeta,
31922
+ instanceOfResendEmailVerificationRequest,
31961
31923
  instanceOfResetPasswordRequest,
31962
31924
  instanceOfResetPasswordResponse,
31963
31925
  instanceOfResubscribeRequest,
@@ -32162,9 +32124,6 @@ var SDK_VERSION = "0.1.0";
32162
32124
  instanceOfWebhookJobResponse,
32163
32125
  instanceOfWebhookListResponse,
32164
32126
  instanceOfWebhookMetricsResponse,
32165
- instanceOfWebhookRegion,
32166
- instanceOfWebhookRegionsResponse,
32167
- instanceOfWebhookRegionsResponseData,
32168
32127
  instanceOfWebhookReplayResponse,
32169
32128
  instanceOfWebhookResponse,
32170
32129
  instanceOfWebhookSecretRotateResponse,