@zyphr-dev/node-sdk 0.1.44 → 0.1.46

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
@@ -240,6 +240,10 @@ __export(index_exports, {
240
240
  CategoryResponseToJSONTyped: () => CategoryResponseToJSONTyped,
241
241
  CategoryToJSON: () => CategoryToJSON,
242
242
  CategoryToJSONTyped: () => CategoryToJSONTyped,
243
+ ChangePasswordRequestFromJSON: () => ChangePasswordRequestFromJSON,
244
+ ChangePasswordRequestFromJSONTyped: () => ChangePasswordRequestFromJSONTyped,
245
+ ChangePasswordRequestToJSON: () => ChangePasswordRequestToJSON,
246
+ ChangePasswordRequestToJSONTyped: () => ChangePasswordRequestToJSONTyped,
243
247
  CloseWaaSEndpointCircuit200ResponseDataFromJSON: () => CloseWaaSEndpointCircuit200ResponseDataFromJSON,
244
248
  CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped: () => CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped,
245
249
  CloseWaaSEndpointCircuit200ResponseDataStateEnum: () => CloseWaaSEndpointCircuit200ResponseDataStateEnum,
@@ -1420,6 +1424,10 @@ __export(index_exports, {
1420
1424
  SetPreferencesRequestPreferencesInnerToJSONTyped: () => SetPreferencesRequestPreferencesInnerToJSONTyped,
1421
1425
  SetPreferencesRequestToJSON: () => SetPreferencesRequestToJSON,
1422
1426
  SetPreferencesRequestToJSONTyped: () => SetPreferencesRequestToJSONTyped,
1427
+ SetSelfApplicationTestRecipientsRequestFromJSON: () => SetSelfApplicationTestRecipientsRequestFromJSON,
1428
+ SetSelfApplicationTestRecipientsRequestFromJSONTyped: () => SetSelfApplicationTestRecipientsRequestFromJSONTyped,
1429
+ SetSelfApplicationTestRecipientsRequestToJSON: () => SetSelfApplicationTestRecipientsRequestToJSON,
1430
+ SetSelfApplicationTestRecipientsRequestToJSONTyped: () => SetSelfApplicationTestRecipientsRequestToJSONTyped,
1423
1431
  SignInAnonymouslyRequestFromJSON: () => SignInAnonymouslyRequestFromJSON,
1424
1432
  SignInAnonymouslyRequestFromJSONTyped: () => SignInAnonymouslyRequestFromJSONTyped,
1425
1433
  SignInAnonymouslyRequestToJSON: () => SignInAnonymouslyRequestToJSON,
@@ -2002,6 +2010,11 @@ __export(index_exports, {
2002
2010
  WebhookDeliveryStatusEnum: () => WebhookDeliveryStatusEnum,
2003
2011
  WebhookDeliveryToJSON: () => WebhookDeliveryToJSON,
2004
2012
  WebhookDeliveryToJSONTyped: () => WebhookDeliveryToJSONTyped,
2013
+ WebhookEventType: () => WebhookEventType,
2014
+ WebhookEventTypeFromJSON: () => WebhookEventTypeFromJSON,
2015
+ WebhookEventTypeFromJSONTyped: () => WebhookEventTypeFromJSONTyped,
2016
+ WebhookEventTypeToJSON: () => WebhookEventTypeToJSON,
2017
+ WebhookEventTypeToJSONTyped: () => WebhookEventTypeToJSONTyped,
2005
2018
  WebhookEventTypesResponseDataFromJSON: () => WebhookEventTypesResponseDataFromJSON,
2006
2019
  WebhookEventTypesResponseDataFromJSONTyped: () => WebhookEventTypesResponseDataFromJSONTyped,
2007
2020
  WebhookEventTypesResponseDataToJSON: () => WebhookEventTypesResponseDataToJSON,
@@ -2196,6 +2209,7 @@ __export(index_exports, {
2196
2209
  instanceOfCategory: () => instanceOfCategory,
2197
2210
  instanceOfCategoryListResponse: () => instanceOfCategoryListResponse,
2198
2211
  instanceOfCategoryResponse: () => instanceOfCategoryResponse,
2212
+ instanceOfChangePasswordRequest: () => instanceOfChangePasswordRequest,
2199
2213
  instanceOfCloseWaaSEndpointCircuit200Response: () => instanceOfCloseWaaSEndpointCircuit200Response,
2200
2214
  instanceOfCloseWaaSEndpointCircuit200ResponseData: () => instanceOfCloseWaaSEndpointCircuit200ResponseData,
2201
2215
  instanceOfConfirmEmailVerificationRequest: () => instanceOfConfirmEmailVerificationRequest,
@@ -2474,6 +2488,7 @@ __export(index_exports, {
2474
2488
  instanceOfSetEndUserClaimsRequest: () => instanceOfSetEndUserClaimsRequest,
2475
2489
  instanceOfSetPreferencesRequest: () => instanceOfSetPreferencesRequest,
2476
2490
  instanceOfSetPreferencesRequestPreferencesInner: () => instanceOfSetPreferencesRequestPreferencesInner,
2491
+ instanceOfSetSelfApplicationTestRecipientsRequest: () => instanceOfSetSelfApplicationTestRecipientsRequest,
2477
2492
  instanceOfSignInAnonymouslyRequest: () => instanceOfSignInAnonymouslyRequest,
2478
2493
  instanceOfSignInWithGameCenterRequest: () => instanceOfSignInWithGameCenterRequest,
2479
2494
  instanceOfSignInWithGooglePlayGamesRequest: () => instanceOfSignInWithGooglePlayGamesRequest,
@@ -2611,6 +2626,7 @@ __export(index_exports, {
2611
2626
  instanceOfWebhookDeliveryResponse: () => instanceOfWebhookDeliveryResponse,
2612
2627
  instanceOfWebhookDeliveryRetryResponse: () => instanceOfWebhookDeliveryRetryResponse,
2613
2628
  instanceOfWebhookDeliveryRetryResponseData: () => instanceOfWebhookDeliveryRetryResponseData,
2629
+ instanceOfWebhookEventType: () => instanceOfWebhookEventType,
2614
2630
  instanceOfWebhookEventTypesResponse: () => instanceOfWebhookEventTypesResponse,
2615
2631
  instanceOfWebhookEventTypesResponseData: () => instanceOfWebhookEventTypesResponseData,
2616
2632
  instanceOfWebhookIpsResponse: () => instanceOfWebhookIpsResponse,
@@ -3514,6 +3530,7 @@ function instanceOfApplicationSelf(value) {
3514
3530
  if (!("name" in value) || value["name"] === void 0) return false;
3515
3531
  if (!("environment" in value) || value["environment"] === void 0) return false;
3516
3532
  if (!("signingAlgorithm" in value) || value["signingAlgorithm"] === void 0) return false;
3533
+ if (!("testRecipients" in value) || value["testRecipients"] === void 0) return false;
3517
3534
  return true;
3518
3535
  }
3519
3536
  function ApplicationSelfFromJSON(json) {
@@ -3527,7 +3544,8 @@ function ApplicationSelfFromJSONTyped(json, ignoreDiscriminator) {
3527
3544
  "id": json["id"],
3528
3545
  "name": json["name"],
3529
3546
  "environment": json["environment"],
3530
- "signingAlgorithm": json["signing_algorithm"]
3547
+ "signingAlgorithm": json["signing_algorithm"],
3548
+ "testRecipients": json["test_recipients"]
3531
3549
  };
3532
3550
  }
3533
3551
  function ApplicationSelfToJSON(json) {
@@ -3541,7 +3559,8 @@ function ApplicationSelfToJSONTyped(value, ignoreDiscriminator = false) {
3541
3559
  "id": value["id"],
3542
3560
  "name": value["name"],
3543
3561
  "environment": value["environment"],
3544
- "signing_algorithm": value["signingAlgorithm"]
3562
+ "signing_algorithm": value["signingAlgorithm"],
3563
+ "test_recipients": value["testRecipients"]
3545
3564
  };
3546
3565
  }
3547
3566
 
@@ -4854,6 +4873,37 @@ function CategoryResponseToJSONTyped(value, ignoreDiscriminator = false) {
4854
4873
  };
4855
4874
  }
4856
4875
 
4876
+ // src/src/models/ChangePasswordRequest.ts
4877
+ function instanceOfChangePasswordRequest(value) {
4878
+ if (!("currentPassword" in value) || value["currentPassword"] === void 0) return false;
4879
+ if (!("newPassword" in value) || value["newPassword"] === void 0) return false;
4880
+ return true;
4881
+ }
4882
+ function ChangePasswordRequestFromJSON(json) {
4883
+ return ChangePasswordRequestFromJSONTyped(json, false);
4884
+ }
4885
+ function ChangePasswordRequestFromJSONTyped(json, ignoreDiscriminator) {
4886
+ if (json == null) {
4887
+ return json;
4888
+ }
4889
+ return {
4890
+ "currentPassword": json["current_password"],
4891
+ "newPassword": json["new_password"]
4892
+ };
4893
+ }
4894
+ function ChangePasswordRequestToJSON(json) {
4895
+ return ChangePasswordRequestToJSONTyped(json, false);
4896
+ }
4897
+ function ChangePasswordRequestToJSONTyped(value, ignoreDiscriminator = false) {
4898
+ if (value == null) {
4899
+ return value;
4900
+ }
4901
+ return {
4902
+ "current_password": value["currentPassword"],
4903
+ "new_password": value["newPassword"]
4904
+ };
4905
+ }
4906
+
4857
4907
  // src/src/models/GetDomain200ResponseMeta.ts
4858
4908
  function instanceOfGetDomain200ResponseMeta(value) {
4859
4909
  return true;
@@ -14608,6 +14658,34 @@ function SetPreferencesRequestToJSONTyped(value, ignoreDiscriminator = false) {
14608
14658
  };
14609
14659
  }
14610
14660
 
14661
+ // src/src/models/SetSelfApplicationTestRecipientsRequest.ts
14662
+ function instanceOfSetSelfApplicationTestRecipientsRequest(value) {
14663
+ if (!("testRecipients" in value) || value["testRecipients"] === void 0) return false;
14664
+ return true;
14665
+ }
14666
+ function SetSelfApplicationTestRecipientsRequestFromJSON(json) {
14667
+ return SetSelfApplicationTestRecipientsRequestFromJSONTyped(json, false);
14668
+ }
14669
+ function SetSelfApplicationTestRecipientsRequestFromJSONTyped(json, ignoreDiscriminator) {
14670
+ if (json == null) {
14671
+ return json;
14672
+ }
14673
+ return {
14674
+ "testRecipients": json["test_recipients"]
14675
+ };
14676
+ }
14677
+ function SetSelfApplicationTestRecipientsRequestToJSON(json) {
14678
+ return SetSelfApplicationTestRecipientsRequestToJSONTyped(json, false);
14679
+ }
14680
+ function SetSelfApplicationTestRecipientsRequestToJSONTyped(value, ignoreDiscriminator = false) {
14681
+ if (value == null) {
14682
+ return value;
14683
+ }
14684
+ return {
14685
+ "test_recipients": value["testRecipients"]
14686
+ };
14687
+ }
14688
+
14611
14689
  // src/src/models/SignInAnonymouslyRequest.ts
14612
14690
  function instanceOfSignInAnonymouslyRequest(value) {
14613
14691
  if (!("deviceId" in value) || value["deviceId"] === void 0) return false;
@@ -18440,6 +18518,61 @@ function WebhookDeleteResponseToJSONTyped(value, ignoreDiscriminator = false) {
18440
18518
  };
18441
18519
  }
18442
18520
 
18521
+ // src/src/models/WebhookEventType.ts
18522
+ var WebhookEventType = {
18523
+ EMAIL_QUEUED: "email.queued",
18524
+ EMAIL_SENT: "email.sent",
18525
+ EMAIL_DELIVERED: "email.delivered",
18526
+ EMAIL_BOUNCED: "email.bounced",
18527
+ EMAIL_SOFT_BOUNCED: "email.soft_bounced",
18528
+ EMAIL_COMPLAINED: "email.complained",
18529
+ EMAIL_OPENED: "email.opened",
18530
+ EMAIL_CLICKED: "email.clicked",
18531
+ EMAIL_FAILED: "email.failed",
18532
+ EMAIL_SUPPRESSED: "email.suppressed",
18533
+ EMAIL_RECEIVED: "email.received",
18534
+ PUSH_SENT: "push.sent",
18535
+ PUSH_DELIVERED: "push.delivered",
18536
+ PUSH_FAILED: "push.failed",
18537
+ PUSH_EXPIRED: "push.expired",
18538
+ USER_CREATED: "user.created",
18539
+ USER_LOGIN: "user.login",
18540
+ USER_LOGOUT: "user.logout",
18541
+ USER_PASSWORD_CHANGED: "user.password_changed",
18542
+ USER_PASSWORD_RESET_REQUESTED: "user.password_reset_requested",
18543
+ USER_EMAIL_VERIFIED: "user.email_verified",
18544
+ USER_PHONE_VERIFIED: "user.phone_verified",
18545
+ USER_DELETED: "user.deleted",
18546
+ USER_SESSION_REVOKED: "user.session_revoked",
18547
+ USER_MFA_ENABLED: "user.mfa_enabled",
18548
+ USER_MFA_DISABLED: "user.mfa_disabled",
18549
+ USER_IMPERSONATED: "user.impersonated",
18550
+ DOMAIN_VERIFIED: "domain.verified",
18551
+ DOMAIN_VERIFICATION_FAILED: "domain.verification_failed"
18552
+ };
18553
+ function instanceOfWebhookEventType(value) {
18554
+ for (const key in WebhookEventType) {
18555
+ if (Object.prototype.hasOwnProperty.call(WebhookEventType, key)) {
18556
+ if (WebhookEventType[key] === value) {
18557
+ return true;
18558
+ }
18559
+ }
18560
+ }
18561
+ return false;
18562
+ }
18563
+ function WebhookEventTypeFromJSON(json) {
18564
+ return WebhookEventTypeFromJSONTyped(json, false);
18565
+ }
18566
+ function WebhookEventTypeFromJSONTyped(json, ignoreDiscriminator) {
18567
+ return json;
18568
+ }
18569
+ function WebhookEventTypeToJSON(value) {
18570
+ return value;
18571
+ }
18572
+ function WebhookEventTypeToJSONTyped(value, ignoreDiscriminator) {
18573
+ return value;
18574
+ }
18575
+
18443
18576
  // src/src/models/WebhookDelivery.ts
18444
18577
  var WebhookDeliveryStatusEnum = {
18445
18578
  PENDING: "pending",
@@ -18462,7 +18595,7 @@ function WebhookDeliveryFromJSONTyped(json, ignoreDiscriminator) {
18462
18595
  "id": json["id"] == null ? void 0 : json["id"],
18463
18596
  "msgId": json["msg_id"] == null ? void 0 : json["msg_id"],
18464
18597
  "eventId": json["event_id"] == null ? void 0 : json["event_id"],
18465
- "eventType": json["event_type"] == null ? void 0 : json["event_type"],
18598
+ "eventType": json["event_type"] == null ? void 0 : WebhookEventTypeFromJSON(json["event_type"]),
18466
18599
  "status": json["status"] == null ? void 0 : json["status"],
18467
18600
  "attempts": json["attempts"] == null ? void 0 : json["attempts"],
18468
18601
  "maxAttempts": json["max_attempts"] == null ? void 0 : json["max_attempts"],
@@ -18488,7 +18621,7 @@ function WebhookDeliveryToJSONTyped(value, ignoreDiscriminator = false) {
18488
18621
  "id": value["id"],
18489
18622
  "msg_id": value["msgId"],
18490
18623
  "event_id": value["eventId"],
18491
- "event_type": value["eventType"],
18624
+ "event_type": WebhookEventTypeToJSON(value["eventType"]),
18492
18625
  "status": value["status"],
18493
18626
  "attempts": value["attempts"],
18494
18627
  "max_attempts": value["maxAttempts"],
@@ -18526,7 +18659,7 @@ function WebhookDeliveryDetailFromJSONTyped(json, ignoreDiscriminator) {
18526
18659
  "id": json["id"] == null ? void 0 : json["id"],
18527
18660
  "msgId": json["msg_id"] == null ? void 0 : json["msg_id"],
18528
18661
  "eventId": json["event_id"] == null ? void 0 : json["event_id"],
18529
- "eventType": json["event_type"] == null ? void 0 : json["event_type"],
18662
+ "eventType": json["event_type"] == null ? void 0 : WebhookEventTypeFromJSON(json["event_type"]),
18530
18663
  "status": json["status"] == null ? void 0 : json["status"],
18531
18664
  "attempts": json["attempts"] == null ? void 0 : json["attempts"],
18532
18665
  "maxAttempts": json["max_attempts"] == null ? void 0 : json["max_attempts"],
@@ -18556,7 +18689,7 @@ function WebhookDeliveryDetailToJSONTyped(value, ignoreDiscriminator = false) {
18556
18689
  "id": value["id"],
18557
18690
  "msg_id": value["msgId"],
18558
18691
  "event_id": value["eventId"],
18559
- "event_type": value["eventType"],
18692
+ "event_type": WebhookEventTypeToJSON(value["eventType"]),
18560
18693
  "status": value["status"],
18561
18694
  "attempts": value["attempts"],
18562
18695
  "max_attempts": value["maxAttempts"],
@@ -18706,7 +18839,7 @@ function WebhookEventTypesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18706
18839
  return json;
18707
18840
  }
18708
18841
  return {
18709
- "eventTypes": json["event_types"] == null ? void 0 : json["event_types"],
18842
+ "eventTypes": json["event_types"] == null ? void 0 : json["event_types"].map(WebhookEventTypeFromJSON),
18710
18843
  "registry": json["registry"] == null ? void 0 : json["registry"],
18711
18844
  "categories": json["categories"] == null ? void 0 : json["categories"],
18712
18845
  "apiVersion": json["api_version"] == null ? void 0 : json["api_version"]
@@ -18720,7 +18853,7 @@ function WebhookEventTypesResponseDataToJSONTyped(value, ignoreDiscriminator = f
18720
18853
  return value;
18721
18854
  }
18722
18855
  return {
18723
- "event_types": value["eventTypes"],
18856
+ "event_types": value["eventTypes"] == null ? void 0 : value["eventTypes"].map(WebhookEventTypeToJSON),
18724
18857
  "registry": value["registry"],
18725
18858
  "categories": value["categories"],
18726
18859
  "api_version": value["apiVersion"]
@@ -19121,7 +19254,7 @@ function WebhookTestEventResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19121
19254
  }
19122
19255
  return {
19123
19256
  "deliveryId": json["delivery_id"] == null ? void 0 : json["delivery_id"],
19124
- "eventType": json["event_type"] == null ? void 0 : json["event_type"],
19257
+ "eventType": json["event_type"] == null ? void 0 : WebhookEventTypeFromJSON(json["event_type"]),
19125
19258
  "payload": json["payload"] == null ? void 0 : json["payload"],
19126
19259
  "status": json["status"] == null ? void 0 : json["status"]
19127
19260
  };
@@ -19135,7 +19268,7 @@ function WebhookTestEventResponseDataToJSONTyped(value, ignoreDiscriminator = fa
19135
19268
  }
19136
19269
  return {
19137
19270
  "delivery_id": value["deliveryId"],
19138
- "event_type": value["eventType"],
19271
+ "event_type": WebhookEventTypeToJSON(value["eventType"]),
19139
19272
  "payload": value["payload"],
19140
19273
  "status": value["status"]
19141
19274
  };
@@ -19385,6 +19518,43 @@ var AuthApplicationApi = class extends BaseAPI {
19385
19518
  const response = await this.getSelfApplicationRaw(initOverrides);
19386
19519
  return await response.value();
19387
19520
  }
19521
+ /**
19522
+ * Set `test_recipients` — the per-application auth-email allowlist — on the application whose credentials authenticated this request. When non-empty, this allowlist gates ALL auth emails (only listed addresses receive them); an EMPTY array clears it and disables the gate. Lets an integrator manage the allowlist from their own infrastructure config instead of the dashboard. Application-SECRET scoped (server-side write): requires X-Application-Key AND X-Application-Secret. Mutates ONLY the authenticating application — it never takes an application id from the request, so there is no cross-tenant write path. The response mirrors GET /auth/application exactly (never returns secrets).
19523
+ * Set the authenticating application\'s auth-email test allowlist
19524
+ */
19525
+ async setSelfApplicationTestRecipientsRaw(requestParameters, initOverrides) {
19526
+ if (requestParameters["setSelfApplicationTestRecipientsRequest"] == null) {
19527
+ throw new RequiredError(
19528
+ "setSelfApplicationTestRecipientsRequest",
19529
+ 'Required parameter "setSelfApplicationTestRecipientsRequest" was null or undefined when calling setSelfApplicationTestRecipients().'
19530
+ );
19531
+ }
19532
+ const queryParameters = {};
19533
+ const headerParameters = {};
19534
+ headerParameters["Content-Type"] = "application/json";
19535
+ if (this.configuration && this.configuration.apiKey) {
19536
+ headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
19537
+ }
19538
+ if (this.configuration && this.configuration.apiKey) {
19539
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
19540
+ }
19541
+ const response = await this.request({
19542
+ path: `/auth/application`,
19543
+ method: "PATCH",
19544
+ headers: headerParameters,
19545
+ query: queryParameters,
19546
+ body: SetSelfApplicationTestRecipientsRequestToJSON(requestParameters["setSelfApplicationTestRecipientsRequest"])
19547
+ }, initOverrides);
19548
+ return new JSONApiResponse(response, (jsonValue) => ApplicationSelfResponseFromJSON(jsonValue));
19549
+ }
19550
+ /**
19551
+ * Set `test_recipients` — the per-application auth-email allowlist — on the application whose credentials authenticated this request. When non-empty, this allowlist gates ALL auth emails (only listed addresses receive them); an EMPTY array clears it and disables the gate. Lets an integrator manage the allowlist from their own infrastructure config instead of the dashboard. Application-SECRET scoped (server-side write): requires X-Application-Key AND X-Application-Secret. Mutates ONLY the authenticating application — it never takes an application id from the request, so there is no cross-tenant write path. The response mirrors GET /auth/application exactly (never returns secrets).
19552
+ * Set the authenticating application\'s auth-email test allowlist
19553
+ */
19554
+ async setSelfApplicationTestRecipients(setSelfApplicationTestRecipientsRequest, initOverrides) {
19555
+ const response = await this.setSelfApplicationTestRecipientsRaw({ setSelfApplicationTestRecipientsRequest }, initOverrides);
19556
+ return await response.value();
19557
+ }
19388
19558
  };
19389
19559
 
19390
19560
  // src/src/apis/AuthEmailOTPApi.ts
@@ -22131,6 +22301,47 @@ var ListEndUsersEnvironmentEnum = {
22131
22301
 
22132
22302
  // src/src/apis/AuthUserProfileApi.ts
22133
22303
  var AuthUserProfileApi = class extends BaseAPI {
22304
+ /**
22305
+ * Change the currently authenticated end user\'s password from a logged-in session. The caller must prove possession of the CURRENT password (`current_password`); the user is identified from the end-user token, not the request body, so a user can only change their own password. On success, all existing sessions are revoked and a fresh token pair is returned so the current session stays authenticated. Emits the `user.password_changed` webhook.
22306
+ * Change password (authenticated session)
22307
+ */
22308
+ async changeEndUserPasswordRaw(requestParameters, initOverrides) {
22309
+ if (requestParameters["changePasswordRequest"] == null) {
22310
+ throw new RequiredError(
22311
+ "changePasswordRequest",
22312
+ 'Required parameter "changePasswordRequest" was null or undefined when calling changeEndUserPassword().'
22313
+ );
22314
+ }
22315
+ const queryParameters = {};
22316
+ const headerParameters = {};
22317
+ headerParameters["Content-Type"] = "application/json";
22318
+ if (this.configuration && this.configuration.accessToken) {
22319
+ const token = this.configuration.accessToken;
22320
+ const tokenString = await token("EndUserToken", []);
22321
+ if (tokenString) {
22322
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
22323
+ }
22324
+ }
22325
+ if (this.configuration && this.configuration.apiKey) {
22326
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
22327
+ }
22328
+ const response = await this.request({
22329
+ path: `/auth/users/change-password`,
22330
+ method: "POST",
22331
+ headers: headerParameters,
22332
+ query: queryParameters,
22333
+ body: ChangePasswordRequestToJSON(requestParameters["changePasswordRequest"])
22334
+ }, initOverrides);
22335
+ return new JSONApiResponse(response, (jsonValue) => RefreshTokenResponseFromJSON(jsonValue));
22336
+ }
22337
+ /**
22338
+ * Change the currently authenticated end user\'s password from a logged-in session. The caller must prove possession of the CURRENT password (`current_password`); the user is identified from the end-user token, not the request body, so a user can only change their own password. On success, all existing sessions are revoked and a fresh token pair is returned so the current session stays authenticated. Emits the `user.password_changed` webhook.
22339
+ * Change password (authenticated session)
22340
+ */
22341
+ async changeEndUserPassword(changePasswordRequest, initOverrides) {
22342
+ const response = await this.changeEndUserPasswordRaw({ changePasswordRequest }, initOverrides);
22343
+ return await response.value();
22344
+ }
22134
22345
  /**
22135
22346
  * Delete the current end user account (GDPR right to erasure). This is a soft delete — the account is marked as deleted but data is retained for a period to allow for recovery or legal requirements.
22136
22347
  * Delete current end user account
@@ -28789,10 +29000,18 @@ var ZyphrClient = class {
28789
29000
  this.accessToken = options.accessToken;
28790
29001
  const config = new Configuration({
28791
29002
  basePath: options.baseUrl,
28792
- // The only credential this client sends automatically is the publishable
28793
- // application key. End-user Bearer tokens are attached per-request via
28794
- // authedRequest() so token rotation doesn't require rebuilding the client.
29003
+ // The publishable application key is sent automatically on every call.
28795
29004
  apiKey: (name) => name === "X-Application-Key" ? this.applicationKey : "",
29005
+ // The stored end-user access token is also applied automatically: any
29006
+ // user-scoped generated method (which authenticates the EndUserToken
29007
+ // scheme) invokes this callback and attaches `Authorization: Bearer`.
29008
+ // The callback reads `this.accessToken` at call time, so setAccessToken()
29009
+ // takes effect on subsequent calls without rebuilding the client. When no
29010
+ // token is set it returns '', and the generated code adds no header — so
29011
+ // anonymous endpoints (login, register, password-reset) stay unauthenticated.
29012
+ // An explicit token passed to authedRequest() sets the header directly in
29013
+ // RequestInit, which overrides this callback.
29014
+ accessToken: async () => this.accessToken ?? "",
28796
29015
  middleware: [errorMiddleware2]
28797
29016
  });
28798
29017
  this.auth = {
@@ -28812,7 +29031,7 @@ var ZyphrClient = class {
28812
29031
  };
28813
29032
  this.devices = new DevicesApi(config);
28814
29033
  }
28815
- /** Store the end-user access token for subsequent authedRequest() calls. */
29034
+ /** Store the end-user access token; it is applied automatically to subsequent user-scoped calls. */
28816
29035
  setAccessToken(accessToken) {
28817
29036
  this.accessToken = accessToken;
28818
29037
  }
@@ -28823,11 +29042,17 @@ var ZyphrClient = class {
28823
29042
  /**
28824
29043
  * Build request overrides that authenticate as the current end user: the
28825
29044
  * stored Bearer token plus the publishable application key required by
28826
- * user-scoped endpoints. Pass an explicit token to override the stored one.
29045
+ * user-scoped endpoints.
29046
+ *
29047
+ * The stored token is now applied automatically to user-scoped calls, so this
29048
+ * is no longer required for authentication. It remains useful to authenticate
29049
+ * a single call with a different token — a token passed here sets the header
29050
+ * directly in RequestInit and overrides the stored token for that call.
28827
29051
  *
28828
29052
  * @example
28829
29053
  * ```ts
28830
- * const me = await zyphr.auth.profile.getEndUser(zyphr.authedRequest());
29054
+ * // Authenticate one call as a different user, without changing stored state:
29055
+ * const me = await zyphr.auth.profile.getEndUser(zyphr.authedRequest(otherToken));
28831
29056
  * ```
28832
29057
  */
28833
29058
  authedRequest(accessToken) {
@@ -29066,6 +29291,10 @@ var SDK_VERSION = "0.1.0";
29066
29291
  CategoryResponseToJSONTyped,
29067
29292
  CategoryToJSON,
29068
29293
  CategoryToJSONTyped,
29294
+ ChangePasswordRequestFromJSON,
29295
+ ChangePasswordRequestFromJSONTyped,
29296
+ ChangePasswordRequestToJSON,
29297
+ ChangePasswordRequestToJSONTyped,
29069
29298
  CloseWaaSEndpointCircuit200ResponseDataFromJSON,
29070
29299
  CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped,
29071
29300
  CloseWaaSEndpointCircuit200ResponseDataStateEnum,
@@ -30246,6 +30475,10 @@ var SDK_VERSION = "0.1.0";
30246
30475
  SetPreferencesRequestPreferencesInnerToJSONTyped,
30247
30476
  SetPreferencesRequestToJSON,
30248
30477
  SetPreferencesRequestToJSONTyped,
30478
+ SetSelfApplicationTestRecipientsRequestFromJSON,
30479
+ SetSelfApplicationTestRecipientsRequestFromJSONTyped,
30480
+ SetSelfApplicationTestRecipientsRequestToJSON,
30481
+ SetSelfApplicationTestRecipientsRequestToJSONTyped,
30249
30482
  SignInAnonymouslyRequestFromJSON,
30250
30483
  SignInAnonymouslyRequestFromJSONTyped,
30251
30484
  SignInAnonymouslyRequestToJSON,
@@ -30828,6 +31061,11 @@ var SDK_VERSION = "0.1.0";
30828
31061
  WebhookDeliveryStatusEnum,
30829
31062
  WebhookDeliveryToJSON,
30830
31063
  WebhookDeliveryToJSONTyped,
31064
+ WebhookEventType,
31065
+ WebhookEventTypeFromJSON,
31066
+ WebhookEventTypeFromJSONTyped,
31067
+ WebhookEventTypeToJSON,
31068
+ WebhookEventTypeToJSONTyped,
30831
31069
  WebhookEventTypesResponseDataFromJSON,
30832
31070
  WebhookEventTypesResponseDataFromJSONTyped,
30833
31071
  WebhookEventTypesResponseDataToJSON,
@@ -31022,6 +31260,7 @@ var SDK_VERSION = "0.1.0";
31022
31260
  instanceOfCategory,
31023
31261
  instanceOfCategoryListResponse,
31024
31262
  instanceOfCategoryResponse,
31263
+ instanceOfChangePasswordRequest,
31025
31264
  instanceOfCloseWaaSEndpointCircuit200Response,
31026
31265
  instanceOfCloseWaaSEndpointCircuit200ResponseData,
31027
31266
  instanceOfConfirmEmailVerificationRequest,
@@ -31300,6 +31539,7 @@ var SDK_VERSION = "0.1.0";
31300
31539
  instanceOfSetEndUserClaimsRequest,
31301
31540
  instanceOfSetPreferencesRequest,
31302
31541
  instanceOfSetPreferencesRequestPreferencesInner,
31542
+ instanceOfSetSelfApplicationTestRecipientsRequest,
31303
31543
  instanceOfSignInAnonymouslyRequest,
31304
31544
  instanceOfSignInWithGameCenterRequest,
31305
31545
  instanceOfSignInWithGooglePlayGamesRequest,
@@ -31437,6 +31677,7 @@ var SDK_VERSION = "0.1.0";
31437
31677
  instanceOfWebhookDeliveryResponse,
31438
31678
  instanceOfWebhookDeliveryRetryResponse,
31439
31679
  instanceOfWebhookDeliveryRetryResponseData,
31680
+ instanceOfWebhookEventType,
31440
31681
  instanceOfWebhookEventTypesResponse,
31441
31682
  instanceOfWebhookEventTypesResponseData,
31442
31683
  instanceOfWebhookIpsResponse,