@zyphr-dev/node-sdk 0.1.43 → 0.1.45
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/README.md +6 -4
- package/dist/index.cjs +511 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +522 -21
- package/dist/index.d.ts +522 -21
- package/dist/index.js +472 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +8 -0
- package/src/client.ts +18 -3
- package/src/clientAuth.ts +45 -12
- package/src/src/apis/AuthApplicationApi.ts +162 -0
- package/src/src/apis/AuthEmailTemplatesApi.ts +4 -4
- package/src/src/apis/AuthUserDirectoryApi.ts +66 -0
- package/src/src/apis/AuthUserProfileApi.ts +76 -0
- package/src/src/apis/index.ts +1 -0
- package/src/src/models/ApplicationSelf.ts +127 -0
- package/src/src/models/ApplicationSelfResponse.ts +88 -0
- package/src/src/models/AuthEmailTemplateTestRequest.ts +1 -1
- package/src/src/models/AuthMethods.ts +111 -0
- package/src/src/models/ChangePasswordRequest.ts +75 -0
- package/src/src/models/GetEndUserAuthMethods200Response.ts +88 -0
- package/src/src/models/SetSelfApplicationTestRecipientsRequest.ts +66 -0
- package/src/src/models/WebhookDelivery.ts +12 -4
- package/src/src/models/WebhookDeliveryDetail.ts +12 -4
- package/src/src/models/WebhookEventType.ts +79 -0
- package/src/src/models/WebhookEventTypesResponseData.ts +12 -4
- package/src/src/models/WebhookTestEventResponseData.ts +14 -4
- package/src/src/models/index.ts +7 -0
package/dist/index.cjs
CHANGED
|
@@ -61,6 +61,17 @@ __export(index_exports, {
|
|
|
61
61
|
ApiErrorMetaToJSONTyped: () => ApiErrorMetaToJSONTyped,
|
|
62
62
|
ApiErrorToJSON: () => ApiErrorToJSON,
|
|
63
63
|
ApiErrorToJSONTyped: () => ApiErrorToJSONTyped,
|
|
64
|
+
ApplicationSelfEnvironmentEnum: () => ApplicationSelfEnvironmentEnum,
|
|
65
|
+
ApplicationSelfFromJSON: () => ApplicationSelfFromJSON,
|
|
66
|
+
ApplicationSelfFromJSONTyped: () => ApplicationSelfFromJSONTyped,
|
|
67
|
+
ApplicationSelfResponseFromJSON: () => ApplicationSelfResponseFromJSON,
|
|
68
|
+
ApplicationSelfResponseFromJSONTyped: () => ApplicationSelfResponseFromJSONTyped,
|
|
69
|
+
ApplicationSelfResponseToJSON: () => ApplicationSelfResponseToJSON,
|
|
70
|
+
ApplicationSelfResponseToJSONTyped: () => ApplicationSelfResponseToJSONTyped,
|
|
71
|
+
ApplicationSelfSigningAlgorithmEnum: () => ApplicationSelfSigningAlgorithmEnum,
|
|
72
|
+
ApplicationSelfToJSON: () => ApplicationSelfToJSON,
|
|
73
|
+
ApplicationSelfToJSONTyped: () => ApplicationSelfToJSONTyped,
|
|
74
|
+
AuthApplicationApi: () => AuthApplicationApi,
|
|
64
75
|
AuthEmailOTPApi: () => AuthEmailOTPApi,
|
|
65
76
|
AuthEmailTemplateDefaultFromJSON: () => AuthEmailTemplateDefaultFromJSON,
|
|
66
77
|
AuthEmailTemplateDefaultFromJSONTyped: () => AuthEmailTemplateDefaultFromJSONTyped,
|
|
@@ -150,6 +161,10 @@ __export(index_exports, {
|
|
|
150
161
|
AuthLoginResultToJSONTyped: () => AuthLoginResultToJSONTyped,
|
|
151
162
|
AuthMFAApi: () => AuthMFAApi,
|
|
152
163
|
AuthMagicLinksApi: () => AuthMagicLinksApi,
|
|
164
|
+
AuthMethodsFromJSON: () => AuthMethodsFromJSON,
|
|
165
|
+
AuthMethodsFromJSONTyped: () => AuthMethodsFromJSONTyped,
|
|
166
|
+
AuthMethodsToJSON: () => AuthMethodsToJSON,
|
|
167
|
+
AuthMethodsToJSONTyped: () => AuthMethodsToJSONTyped,
|
|
153
168
|
AuthOAuthApi: () => AuthOAuthApi,
|
|
154
169
|
AuthOrganizationsApi: () => AuthOrganizationsApi,
|
|
155
170
|
AuthPasswordResetApi: () => AuthPasswordResetApi,
|
|
@@ -225,6 +240,10 @@ __export(index_exports, {
|
|
|
225
240
|
CategoryResponseToJSONTyped: () => CategoryResponseToJSONTyped,
|
|
226
241
|
CategoryToJSON: () => CategoryToJSON,
|
|
227
242
|
CategoryToJSONTyped: () => CategoryToJSONTyped,
|
|
243
|
+
ChangePasswordRequestFromJSON: () => ChangePasswordRequestFromJSON,
|
|
244
|
+
ChangePasswordRequestFromJSONTyped: () => ChangePasswordRequestFromJSONTyped,
|
|
245
|
+
ChangePasswordRequestToJSON: () => ChangePasswordRequestToJSON,
|
|
246
|
+
ChangePasswordRequestToJSONTyped: () => ChangePasswordRequestToJSONTyped,
|
|
228
247
|
CloseWaaSEndpointCircuit200ResponseDataFromJSON: () => CloseWaaSEndpointCircuit200ResponseDataFromJSON,
|
|
229
248
|
CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped: () => CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped,
|
|
230
249
|
CloseWaaSEndpointCircuit200ResponseDataStateEnum: () => CloseWaaSEndpointCircuit200ResponseDataStateEnum,
|
|
@@ -557,6 +576,10 @@ __export(index_exports, {
|
|
|
557
576
|
GetDomain200ResponseMetaToJSONTyped: () => GetDomain200ResponseMetaToJSONTyped,
|
|
558
577
|
GetDomain200ResponseToJSON: () => GetDomain200ResponseToJSON,
|
|
559
578
|
GetDomain200ResponseToJSONTyped: () => GetDomain200ResponseToJSONTyped,
|
|
579
|
+
GetEndUserAuthMethods200ResponseFromJSON: () => GetEndUserAuthMethods200ResponseFromJSON,
|
|
580
|
+
GetEndUserAuthMethods200ResponseFromJSONTyped: () => GetEndUserAuthMethods200ResponseFromJSONTyped,
|
|
581
|
+
GetEndUserAuthMethods200ResponseToJSON: () => GetEndUserAuthMethods200ResponseToJSON,
|
|
582
|
+
GetEndUserAuthMethods200ResponseToJSONTyped: () => GetEndUserAuthMethods200ResponseToJSONTyped,
|
|
560
583
|
GetEndUserById200ResponseFromJSON: () => GetEndUserById200ResponseFromJSON,
|
|
561
584
|
GetEndUserById200ResponseFromJSONTyped: () => GetEndUserById200ResponseFromJSONTyped,
|
|
562
585
|
GetEndUserById200ResponseToJSON: () => GetEndUserById200ResponseToJSON,
|
|
@@ -1401,6 +1424,10 @@ __export(index_exports, {
|
|
|
1401
1424
|
SetPreferencesRequestPreferencesInnerToJSONTyped: () => SetPreferencesRequestPreferencesInnerToJSONTyped,
|
|
1402
1425
|
SetPreferencesRequestToJSON: () => SetPreferencesRequestToJSON,
|
|
1403
1426
|
SetPreferencesRequestToJSONTyped: () => SetPreferencesRequestToJSONTyped,
|
|
1427
|
+
SetSelfApplicationTestRecipientsRequestFromJSON: () => SetSelfApplicationTestRecipientsRequestFromJSON,
|
|
1428
|
+
SetSelfApplicationTestRecipientsRequestFromJSONTyped: () => SetSelfApplicationTestRecipientsRequestFromJSONTyped,
|
|
1429
|
+
SetSelfApplicationTestRecipientsRequestToJSON: () => SetSelfApplicationTestRecipientsRequestToJSON,
|
|
1430
|
+
SetSelfApplicationTestRecipientsRequestToJSONTyped: () => SetSelfApplicationTestRecipientsRequestToJSONTyped,
|
|
1404
1431
|
SignInAnonymouslyRequestFromJSON: () => SignInAnonymouslyRequestFromJSON,
|
|
1405
1432
|
SignInAnonymouslyRequestFromJSONTyped: () => SignInAnonymouslyRequestFromJSONTyped,
|
|
1406
1433
|
SignInAnonymouslyRequestToJSON: () => SignInAnonymouslyRequestToJSON,
|
|
@@ -1983,6 +2010,11 @@ __export(index_exports, {
|
|
|
1983
2010
|
WebhookDeliveryStatusEnum: () => WebhookDeliveryStatusEnum,
|
|
1984
2011
|
WebhookDeliveryToJSON: () => WebhookDeliveryToJSON,
|
|
1985
2012
|
WebhookDeliveryToJSONTyped: () => WebhookDeliveryToJSONTyped,
|
|
2013
|
+
WebhookEventType: () => WebhookEventType,
|
|
2014
|
+
WebhookEventTypeFromJSON: () => WebhookEventTypeFromJSON,
|
|
2015
|
+
WebhookEventTypeFromJSONTyped: () => WebhookEventTypeFromJSONTyped,
|
|
2016
|
+
WebhookEventTypeToJSON: () => WebhookEventTypeToJSON,
|
|
2017
|
+
WebhookEventTypeToJSONTyped: () => WebhookEventTypeToJSONTyped,
|
|
1986
2018
|
WebhookEventTypesResponseDataFromJSON: () => WebhookEventTypesResponseDataFromJSON,
|
|
1987
2019
|
WebhookEventTypesResponseDataFromJSONTyped: () => WebhookEventTypesResponseDataFromJSONTyped,
|
|
1988
2020
|
WebhookEventTypesResponseDataToJSON: () => WebhookEventTypesResponseDataToJSON,
|
|
@@ -2139,6 +2171,8 @@ __export(index_exports, {
|
|
|
2139
2171
|
instanceOfApiError: () => instanceOfApiError,
|
|
2140
2172
|
instanceOfApiErrorError: () => instanceOfApiErrorError,
|
|
2141
2173
|
instanceOfApiErrorMeta: () => instanceOfApiErrorMeta,
|
|
2174
|
+
instanceOfApplicationSelf: () => instanceOfApplicationSelf,
|
|
2175
|
+
instanceOfApplicationSelfResponse: () => instanceOfApplicationSelfResponse,
|
|
2142
2176
|
instanceOfAuthEmailTemplate: () => instanceOfAuthEmailTemplate,
|
|
2143
2177
|
instanceOfAuthEmailTemplateDefault: () => instanceOfAuthEmailTemplateDefault,
|
|
2144
2178
|
instanceOfAuthEmailTemplateDefaultResponse: () => instanceOfAuthEmailTemplateDefaultResponse,
|
|
@@ -2159,6 +2193,7 @@ __export(index_exports, {
|
|
|
2159
2193
|
instanceOfAuthLoginResponse: () => instanceOfAuthLoginResponse,
|
|
2160
2194
|
instanceOfAuthLoginResult: () => instanceOfAuthLoginResult,
|
|
2161
2195
|
instanceOfAuthLoginResultMfaChallenge: () => instanceOfAuthLoginResultMfaChallenge,
|
|
2196
|
+
instanceOfAuthMethods: () => instanceOfAuthMethods,
|
|
2162
2197
|
instanceOfAuthResult: () => instanceOfAuthResult,
|
|
2163
2198
|
instanceOfAuthResultResponse: () => instanceOfAuthResultResponse,
|
|
2164
2199
|
instanceOfAuthSession: () => instanceOfAuthSession,
|
|
@@ -2174,6 +2209,7 @@ __export(index_exports, {
|
|
|
2174
2209
|
instanceOfCategory: () => instanceOfCategory,
|
|
2175
2210
|
instanceOfCategoryListResponse: () => instanceOfCategoryListResponse,
|
|
2176
2211
|
instanceOfCategoryResponse: () => instanceOfCategoryResponse,
|
|
2212
|
+
instanceOfChangePasswordRequest: () => instanceOfChangePasswordRequest,
|
|
2177
2213
|
instanceOfCloseWaaSEndpointCircuit200Response: () => instanceOfCloseWaaSEndpointCircuit200Response,
|
|
2178
2214
|
instanceOfCloseWaaSEndpointCircuit200ResponseData: () => instanceOfCloseWaaSEndpointCircuit200ResponseData,
|
|
2179
2215
|
instanceOfConfirmEmailVerificationRequest: () => instanceOfConfirmEmailVerificationRequest,
|
|
@@ -2251,6 +2287,7 @@ __export(index_exports, {
|
|
|
2251
2287
|
instanceOfGenerateWaaSPortalToken201Response: () => instanceOfGenerateWaaSPortalToken201Response,
|
|
2252
2288
|
instanceOfGetDomain200Response: () => instanceOfGetDomain200Response,
|
|
2253
2289
|
instanceOfGetDomain200ResponseMeta: () => instanceOfGetDomain200ResponseMeta,
|
|
2290
|
+
instanceOfGetEndUserAuthMethods200Response: () => instanceOfGetEndUserAuthMethods200Response,
|
|
2254
2291
|
instanceOfGetEndUserById200Response: () => instanceOfGetEndUserById200Response,
|
|
2255
2292
|
instanceOfGetEndUserClaims200Response: () => instanceOfGetEndUserClaims200Response,
|
|
2256
2293
|
instanceOfGetEndUserClaims200ResponseData: () => instanceOfGetEndUserClaims200ResponseData,
|
|
@@ -2451,6 +2488,7 @@ __export(index_exports, {
|
|
|
2451
2488
|
instanceOfSetEndUserClaimsRequest: () => instanceOfSetEndUserClaimsRequest,
|
|
2452
2489
|
instanceOfSetPreferencesRequest: () => instanceOfSetPreferencesRequest,
|
|
2453
2490
|
instanceOfSetPreferencesRequestPreferencesInner: () => instanceOfSetPreferencesRequestPreferencesInner,
|
|
2491
|
+
instanceOfSetSelfApplicationTestRecipientsRequest: () => instanceOfSetSelfApplicationTestRecipientsRequest,
|
|
2454
2492
|
instanceOfSignInAnonymouslyRequest: () => instanceOfSignInAnonymouslyRequest,
|
|
2455
2493
|
instanceOfSignInWithGameCenterRequest: () => instanceOfSignInWithGameCenterRequest,
|
|
2456
2494
|
instanceOfSignInWithGooglePlayGamesRequest: () => instanceOfSignInWithGooglePlayGamesRequest,
|
|
@@ -2588,6 +2626,7 @@ __export(index_exports, {
|
|
|
2588
2626
|
instanceOfWebhookDeliveryResponse: () => instanceOfWebhookDeliveryResponse,
|
|
2589
2627
|
instanceOfWebhookDeliveryRetryResponse: () => instanceOfWebhookDeliveryRetryResponse,
|
|
2590
2628
|
instanceOfWebhookDeliveryRetryResponseData: () => instanceOfWebhookDeliveryRetryResponseData,
|
|
2629
|
+
instanceOfWebhookEventType: () => instanceOfWebhookEventType,
|
|
2591
2630
|
instanceOfWebhookEventTypesResponse: () => instanceOfWebhookEventTypesResponse,
|
|
2592
2631
|
instanceOfWebhookEventTypesResponseData: () => instanceOfWebhookEventTypesResponseData,
|
|
2593
2632
|
instanceOfWebhookIpsResponse: () => instanceOfWebhookIpsResponse,
|
|
@@ -3476,6 +3515,84 @@ function ApiErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3476
3515
|
};
|
|
3477
3516
|
}
|
|
3478
3517
|
|
|
3518
|
+
// src/src/models/ApplicationSelf.ts
|
|
3519
|
+
var ApplicationSelfEnvironmentEnum = {
|
|
3520
|
+
TEST: "test",
|
|
3521
|
+
LIVE: "live"
|
|
3522
|
+
};
|
|
3523
|
+
var ApplicationSelfSigningAlgorithmEnum = {
|
|
3524
|
+
HS256: "HS256",
|
|
3525
|
+
RS256: "RS256",
|
|
3526
|
+
ES256: "ES256"
|
|
3527
|
+
};
|
|
3528
|
+
function instanceOfApplicationSelf(value) {
|
|
3529
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
3530
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
3531
|
+
if (!("environment" in value) || value["environment"] === void 0) return false;
|
|
3532
|
+
if (!("signingAlgorithm" in value) || value["signingAlgorithm"] === void 0) return false;
|
|
3533
|
+
if (!("testRecipients" in value) || value["testRecipients"] === void 0) return false;
|
|
3534
|
+
return true;
|
|
3535
|
+
}
|
|
3536
|
+
function ApplicationSelfFromJSON(json) {
|
|
3537
|
+
return ApplicationSelfFromJSONTyped(json, false);
|
|
3538
|
+
}
|
|
3539
|
+
function ApplicationSelfFromJSONTyped(json, ignoreDiscriminator) {
|
|
3540
|
+
if (json == null) {
|
|
3541
|
+
return json;
|
|
3542
|
+
}
|
|
3543
|
+
return {
|
|
3544
|
+
"id": json["id"],
|
|
3545
|
+
"name": json["name"],
|
|
3546
|
+
"environment": json["environment"],
|
|
3547
|
+
"signingAlgorithm": json["signing_algorithm"],
|
|
3548
|
+
"testRecipients": json["test_recipients"]
|
|
3549
|
+
};
|
|
3550
|
+
}
|
|
3551
|
+
function ApplicationSelfToJSON(json) {
|
|
3552
|
+
return ApplicationSelfToJSONTyped(json, false);
|
|
3553
|
+
}
|
|
3554
|
+
function ApplicationSelfToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3555
|
+
if (value == null) {
|
|
3556
|
+
return value;
|
|
3557
|
+
}
|
|
3558
|
+
return {
|
|
3559
|
+
"id": value["id"],
|
|
3560
|
+
"name": value["name"],
|
|
3561
|
+
"environment": value["environment"],
|
|
3562
|
+
"signing_algorithm": value["signingAlgorithm"],
|
|
3563
|
+
"test_recipients": value["testRecipients"]
|
|
3564
|
+
};
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
// src/src/models/ApplicationSelfResponse.ts
|
|
3568
|
+
function instanceOfApplicationSelfResponse(value) {
|
|
3569
|
+
return true;
|
|
3570
|
+
}
|
|
3571
|
+
function ApplicationSelfResponseFromJSON(json) {
|
|
3572
|
+
return ApplicationSelfResponseFromJSONTyped(json, false);
|
|
3573
|
+
}
|
|
3574
|
+
function ApplicationSelfResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
3575
|
+
if (json == null) {
|
|
3576
|
+
return json;
|
|
3577
|
+
}
|
|
3578
|
+
return {
|
|
3579
|
+
"data": json["data"] == null ? void 0 : ApplicationSelfFromJSON(json["data"]),
|
|
3580
|
+
"meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
|
|
3581
|
+
};
|
|
3582
|
+
}
|
|
3583
|
+
function ApplicationSelfResponseToJSON(json) {
|
|
3584
|
+
return ApplicationSelfResponseToJSONTyped(json, false);
|
|
3585
|
+
}
|
|
3586
|
+
function ApplicationSelfResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3587
|
+
if (value == null) {
|
|
3588
|
+
return value;
|
|
3589
|
+
}
|
|
3590
|
+
return {
|
|
3591
|
+
"data": ApplicationSelfToJSON(value["data"]),
|
|
3592
|
+
"meta": RequestMetaToJSON(value["meta"])
|
|
3593
|
+
};
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3479
3596
|
// src/src/models/AuthEmailType.ts
|
|
3480
3597
|
var AuthEmailType = {
|
|
3481
3598
|
MAGIC_LINK: "magic_link",
|
|
@@ -4224,6 +4341,49 @@ function AuthLoginResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4224
4341
|
};
|
|
4225
4342
|
}
|
|
4226
4343
|
|
|
4344
|
+
// src/src/models/AuthMethods.ts
|
|
4345
|
+
function instanceOfAuthMethods(value) {
|
|
4346
|
+
if (!("hasPassword" in value) || value["hasPassword"] === void 0) return false;
|
|
4347
|
+
if (!("oauthProviders" in value) || value["oauthProviders"] === void 0) return false;
|
|
4348
|
+
if (!("mfaEnabled" in value) || value["mfaEnabled"] === void 0) return false;
|
|
4349
|
+
if (!("emailVerified" in value) || value["emailVerified"] === void 0) return false;
|
|
4350
|
+
if (!("phoneVerified" in value) || value["phoneVerified"] === void 0) return false;
|
|
4351
|
+
if (!("passkeys" in value) || value["passkeys"] === void 0) return false;
|
|
4352
|
+
return true;
|
|
4353
|
+
}
|
|
4354
|
+
function AuthMethodsFromJSON(json) {
|
|
4355
|
+
return AuthMethodsFromJSONTyped(json, false);
|
|
4356
|
+
}
|
|
4357
|
+
function AuthMethodsFromJSONTyped(json, ignoreDiscriminator) {
|
|
4358
|
+
if (json == null) {
|
|
4359
|
+
return json;
|
|
4360
|
+
}
|
|
4361
|
+
return {
|
|
4362
|
+
"hasPassword": json["has_password"],
|
|
4363
|
+
"oauthProviders": json["oauth_providers"],
|
|
4364
|
+
"mfaEnabled": json["mfa_enabled"],
|
|
4365
|
+
"emailVerified": json["email_verified"],
|
|
4366
|
+
"phoneVerified": json["phone_verified"],
|
|
4367
|
+
"passkeys": json["passkeys"]
|
|
4368
|
+
};
|
|
4369
|
+
}
|
|
4370
|
+
function AuthMethodsToJSON(json) {
|
|
4371
|
+
return AuthMethodsToJSONTyped(json, false);
|
|
4372
|
+
}
|
|
4373
|
+
function AuthMethodsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4374
|
+
if (value == null) {
|
|
4375
|
+
return value;
|
|
4376
|
+
}
|
|
4377
|
+
return {
|
|
4378
|
+
"has_password": value["hasPassword"],
|
|
4379
|
+
"oauth_providers": value["oauthProviders"],
|
|
4380
|
+
"mfa_enabled": value["mfaEnabled"],
|
|
4381
|
+
"email_verified": value["emailVerified"],
|
|
4382
|
+
"phone_verified": value["phoneVerified"],
|
|
4383
|
+
"passkeys": value["passkeys"]
|
|
4384
|
+
};
|
|
4385
|
+
}
|
|
4386
|
+
|
|
4227
4387
|
// src/src/models/AuthResult.ts
|
|
4228
4388
|
function instanceOfAuthResult(value) {
|
|
4229
4389
|
return true;
|
|
@@ -4713,6 +4873,37 @@ function CategoryResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4713
4873
|
};
|
|
4714
4874
|
}
|
|
4715
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
|
+
|
|
4716
4907
|
// src/src/models/GetDomain200ResponseMeta.ts
|
|
4717
4908
|
function instanceOfGetDomain200ResponseMeta(value) {
|
|
4718
4909
|
return true;
|
|
@@ -7632,6 +7823,35 @@ function GetDomain200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
7632
7823
|
};
|
|
7633
7824
|
}
|
|
7634
7825
|
|
|
7826
|
+
// src/src/models/GetEndUserAuthMethods200Response.ts
|
|
7827
|
+
function instanceOfGetEndUserAuthMethods200Response(value) {
|
|
7828
|
+
return true;
|
|
7829
|
+
}
|
|
7830
|
+
function GetEndUserAuthMethods200ResponseFromJSON(json) {
|
|
7831
|
+
return GetEndUserAuthMethods200ResponseFromJSONTyped(json, false);
|
|
7832
|
+
}
|
|
7833
|
+
function GetEndUserAuthMethods200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7834
|
+
if (json == null) {
|
|
7835
|
+
return json;
|
|
7836
|
+
}
|
|
7837
|
+
return {
|
|
7838
|
+
"data": json["data"] == null ? void 0 : AuthMethodsFromJSON(json["data"]),
|
|
7839
|
+
"meta": json["meta"] == null ? void 0 : GetDomain200ResponseMetaFromJSON(json["meta"])
|
|
7840
|
+
};
|
|
7841
|
+
}
|
|
7842
|
+
function GetEndUserAuthMethods200ResponseToJSON(json) {
|
|
7843
|
+
return GetEndUserAuthMethods200ResponseToJSONTyped(json, false);
|
|
7844
|
+
}
|
|
7845
|
+
function GetEndUserAuthMethods200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7846
|
+
if (value == null) {
|
|
7847
|
+
return value;
|
|
7848
|
+
}
|
|
7849
|
+
return {
|
|
7850
|
+
"data": AuthMethodsToJSON(value["data"]),
|
|
7851
|
+
"meta": GetDomain200ResponseMetaToJSON(value["meta"])
|
|
7852
|
+
};
|
|
7853
|
+
}
|
|
7854
|
+
|
|
7635
7855
|
// src/src/models/GetEndUserById200Response.ts
|
|
7636
7856
|
function instanceOfGetEndUserById200Response(value) {
|
|
7637
7857
|
return true;
|
|
@@ -14438,6 +14658,34 @@ function SetPreferencesRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
14438
14658
|
};
|
|
14439
14659
|
}
|
|
14440
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
|
+
|
|
14441
14689
|
// src/src/models/SignInAnonymouslyRequest.ts
|
|
14442
14690
|
function instanceOfSignInAnonymouslyRequest(value) {
|
|
14443
14691
|
if (!("deviceId" in value) || value["deviceId"] === void 0) return false;
|
|
@@ -18270,6 +18518,60 @@ function WebhookDeleteResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
18270
18518
|
};
|
|
18271
18519
|
}
|
|
18272
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_RECEIVED: "email.received",
|
|
18533
|
+
PUSH_SENT: "push.sent",
|
|
18534
|
+
PUSH_DELIVERED: "push.delivered",
|
|
18535
|
+
PUSH_FAILED: "push.failed",
|
|
18536
|
+
PUSH_EXPIRED: "push.expired",
|
|
18537
|
+
USER_CREATED: "user.created",
|
|
18538
|
+
USER_LOGIN: "user.login",
|
|
18539
|
+
USER_LOGOUT: "user.logout",
|
|
18540
|
+
USER_PASSWORD_CHANGED: "user.password_changed",
|
|
18541
|
+
USER_PASSWORD_RESET_REQUESTED: "user.password_reset_requested",
|
|
18542
|
+
USER_EMAIL_VERIFIED: "user.email_verified",
|
|
18543
|
+
USER_PHONE_VERIFIED: "user.phone_verified",
|
|
18544
|
+
USER_DELETED: "user.deleted",
|
|
18545
|
+
USER_SESSION_REVOKED: "user.session_revoked",
|
|
18546
|
+
USER_MFA_ENABLED: "user.mfa_enabled",
|
|
18547
|
+
USER_MFA_DISABLED: "user.mfa_disabled",
|
|
18548
|
+
USER_IMPERSONATED: "user.impersonated",
|
|
18549
|
+
DOMAIN_VERIFIED: "domain.verified",
|
|
18550
|
+
DOMAIN_VERIFICATION_FAILED: "domain.verification_failed"
|
|
18551
|
+
};
|
|
18552
|
+
function instanceOfWebhookEventType(value) {
|
|
18553
|
+
for (const key in WebhookEventType) {
|
|
18554
|
+
if (Object.prototype.hasOwnProperty.call(WebhookEventType, key)) {
|
|
18555
|
+
if (WebhookEventType[key] === value) {
|
|
18556
|
+
return true;
|
|
18557
|
+
}
|
|
18558
|
+
}
|
|
18559
|
+
}
|
|
18560
|
+
return false;
|
|
18561
|
+
}
|
|
18562
|
+
function WebhookEventTypeFromJSON(json) {
|
|
18563
|
+
return WebhookEventTypeFromJSONTyped(json, false);
|
|
18564
|
+
}
|
|
18565
|
+
function WebhookEventTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
18566
|
+
return json;
|
|
18567
|
+
}
|
|
18568
|
+
function WebhookEventTypeToJSON(value) {
|
|
18569
|
+
return value;
|
|
18570
|
+
}
|
|
18571
|
+
function WebhookEventTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
18572
|
+
return value;
|
|
18573
|
+
}
|
|
18574
|
+
|
|
18273
18575
|
// src/src/models/WebhookDelivery.ts
|
|
18274
18576
|
var WebhookDeliveryStatusEnum = {
|
|
18275
18577
|
PENDING: "pending",
|
|
@@ -18292,7 +18594,7 @@ function WebhookDeliveryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
18292
18594
|
"id": json["id"] == null ? void 0 : json["id"],
|
|
18293
18595
|
"msgId": json["msg_id"] == null ? void 0 : json["msg_id"],
|
|
18294
18596
|
"eventId": json["event_id"] == null ? void 0 : json["event_id"],
|
|
18295
|
-
"eventType": json["event_type"] == null ? void 0 : json["event_type"],
|
|
18597
|
+
"eventType": json["event_type"] == null ? void 0 : WebhookEventTypeFromJSON(json["event_type"]),
|
|
18296
18598
|
"status": json["status"] == null ? void 0 : json["status"],
|
|
18297
18599
|
"attempts": json["attempts"] == null ? void 0 : json["attempts"],
|
|
18298
18600
|
"maxAttempts": json["max_attempts"] == null ? void 0 : json["max_attempts"],
|
|
@@ -18318,7 +18620,7 @@ function WebhookDeliveryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
18318
18620
|
"id": value["id"],
|
|
18319
18621
|
"msg_id": value["msgId"],
|
|
18320
18622
|
"event_id": value["eventId"],
|
|
18321
|
-
"event_type": value["eventType"],
|
|
18623
|
+
"event_type": WebhookEventTypeToJSON(value["eventType"]),
|
|
18322
18624
|
"status": value["status"],
|
|
18323
18625
|
"attempts": value["attempts"],
|
|
18324
18626
|
"max_attempts": value["maxAttempts"],
|
|
@@ -18356,7 +18658,7 @@ function WebhookDeliveryDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
18356
18658
|
"id": json["id"] == null ? void 0 : json["id"],
|
|
18357
18659
|
"msgId": json["msg_id"] == null ? void 0 : json["msg_id"],
|
|
18358
18660
|
"eventId": json["event_id"] == null ? void 0 : json["event_id"],
|
|
18359
|
-
"eventType": json["event_type"] == null ? void 0 : json["event_type"],
|
|
18661
|
+
"eventType": json["event_type"] == null ? void 0 : WebhookEventTypeFromJSON(json["event_type"]),
|
|
18360
18662
|
"status": json["status"] == null ? void 0 : json["status"],
|
|
18361
18663
|
"attempts": json["attempts"] == null ? void 0 : json["attempts"],
|
|
18362
18664
|
"maxAttempts": json["max_attempts"] == null ? void 0 : json["max_attempts"],
|
|
@@ -18386,7 +18688,7 @@ function WebhookDeliveryDetailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
18386
18688
|
"id": value["id"],
|
|
18387
18689
|
"msg_id": value["msgId"],
|
|
18388
18690
|
"event_id": value["eventId"],
|
|
18389
|
-
"event_type": value["eventType"],
|
|
18691
|
+
"event_type": WebhookEventTypeToJSON(value["eventType"]),
|
|
18390
18692
|
"status": value["status"],
|
|
18391
18693
|
"attempts": value["attempts"],
|
|
18392
18694
|
"max_attempts": value["maxAttempts"],
|
|
@@ -18536,7 +18838,7 @@ function WebhookEventTypesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
18536
18838
|
return json;
|
|
18537
18839
|
}
|
|
18538
18840
|
return {
|
|
18539
|
-
"eventTypes": json["event_types"] == null ? void 0 : json["event_types"],
|
|
18841
|
+
"eventTypes": json["event_types"] == null ? void 0 : json["event_types"].map(WebhookEventTypeFromJSON),
|
|
18540
18842
|
"registry": json["registry"] == null ? void 0 : json["registry"],
|
|
18541
18843
|
"categories": json["categories"] == null ? void 0 : json["categories"],
|
|
18542
18844
|
"apiVersion": json["api_version"] == null ? void 0 : json["api_version"]
|
|
@@ -18550,7 +18852,7 @@ function WebhookEventTypesResponseDataToJSONTyped(value, ignoreDiscriminator = f
|
|
|
18550
18852
|
return value;
|
|
18551
18853
|
}
|
|
18552
18854
|
return {
|
|
18553
|
-
"event_types": value["eventTypes"],
|
|
18855
|
+
"event_types": value["eventTypes"] == null ? void 0 : value["eventTypes"].map(WebhookEventTypeToJSON),
|
|
18554
18856
|
"registry": value["registry"],
|
|
18555
18857
|
"categories": value["categories"],
|
|
18556
18858
|
"api_version": value["apiVersion"]
|
|
@@ -18951,7 +19253,7 @@ function WebhookTestEventResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
18951
19253
|
}
|
|
18952
19254
|
return {
|
|
18953
19255
|
"deliveryId": json["delivery_id"] == null ? void 0 : json["delivery_id"],
|
|
18954
|
-
"eventType": json["event_type"] == null ? void 0 : json["event_type"],
|
|
19256
|
+
"eventType": json["event_type"] == null ? void 0 : WebhookEventTypeFromJSON(json["event_type"]),
|
|
18955
19257
|
"payload": json["payload"] == null ? void 0 : json["payload"],
|
|
18956
19258
|
"status": json["status"] == null ? void 0 : json["status"]
|
|
18957
19259
|
};
|
|
@@ -18965,7 +19267,7 @@ function WebhookTestEventResponseDataToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
18965
19267
|
}
|
|
18966
19268
|
return {
|
|
18967
19269
|
"delivery_id": value["deliveryId"],
|
|
18968
|
-
"event_type": value["eventType"],
|
|
19270
|
+
"event_type": WebhookEventTypeToJSON(value["eventType"]),
|
|
18969
19271
|
"payload": value["payload"],
|
|
18970
19272
|
"status": value["status"]
|
|
18971
19273
|
};
|
|
@@ -19184,6 +19486,76 @@ function WithdrawSubscriberConsentRequestToJSONTyped(value, ignoreDiscriminator
|
|
|
19184
19486
|
};
|
|
19185
19487
|
}
|
|
19186
19488
|
|
|
19489
|
+
// src/src/apis/AuthApplicationApi.ts
|
|
19490
|
+
var AuthApplicationApi = class extends BaseAPI {
|
|
19491
|
+
/**
|
|
19492
|
+
* 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.
|
|
19493
|
+
* Get the authenticating application
|
|
19494
|
+
*/
|
|
19495
|
+
async getSelfApplicationRaw(initOverrides) {
|
|
19496
|
+
const queryParameters = {};
|
|
19497
|
+
const headerParameters = {};
|
|
19498
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
19499
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
19500
|
+
}
|
|
19501
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
19502
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
19503
|
+
}
|
|
19504
|
+
const response = await this.request({
|
|
19505
|
+
path: `/auth/application`,
|
|
19506
|
+
method: "GET",
|
|
19507
|
+
headers: headerParameters,
|
|
19508
|
+
query: queryParameters
|
|
19509
|
+
}, initOverrides);
|
|
19510
|
+
return new JSONApiResponse(response, (jsonValue) => ApplicationSelfResponseFromJSON(jsonValue));
|
|
19511
|
+
}
|
|
19512
|
+
/**
|
|
19513
|
+
* 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.
|
|
19514
|
+
* Get the authenticating application
|
|
19515
|
+
*/
|
|
19516
|
+
async getSelfApplication(initOverrides) {
|
|
19517
|
+
const response = await this.getSelfApplicationRaw(initOverrides);
|
|
19518
|
+
return await response.value();
|
|
19519
|
+
}
|
|
19520
|
+
/**
|
|
19521
|
+
* 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).
|
|
19522
|
+
* Set the authenticating application\'s auth-email test allowlist
|
|
19523
|
+
*/
|
|
19524
|
+
async setSelfApplicationTestRecipientsRaw(requestParameters, initOverrides) {
|
|
19525
|
+
if (requestParameters["setSelfApplicationTestRecipientsRequest"] == null) {
|
|
19526
|
+
throw new RequiredError(
|
|
19527
|
+
"setSelfApplicationTestRecipientsRequest",
|
|
19528
|
+
'Required parameter "setSelfApplicationTestRecipientsRequest" was null or undefined when calling setSelfApplicationTestRecipients().'
|
|
19529
|
+
);
|
|
19530
|
+
}
|
|
19531
|
+
const queryParameters = {};
|
|
19532
|
+
const headerParameters = {};
|
|
19533
|
+
headerParameters["Content-Type"] = "application/json";
|
|
19534
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
19535
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
19536
|
+
}
|
|
19537
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
19538
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
19539
|
+
}
|
|
19540
|
+
const response = await this.request({
|
|
19541
|
+
path: `/auth/application`,
|
|
19542
|
+
method: "PATCH",
|
|
19543
|
+
headers: headerParameters,
|
|
19544
|
+
query: queryParameters,
|
|
19545
|
+
body: SetSelfApplicationTestRecipientsRequestToJSON(requestParameters["setSelfApplicationTestRecipientsRequest"])
|
|
19546
|
+
}, initOverrides);
|
|
19547
|
+
return new JSONApiResponse(response, (jsonValue) => ApplicationSelfResponseFromJSON(jsonValue));
|
|
19548
|
+
}
|
|
19549
|
+
/**
|
|
19550
|
+
* 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).
|
|
19551
|
+
* Set the authenticating application\'s auth-email test allowlist
|
|
19552
|
+
*/
|
|
19553
|
+
async setSelfApplicationTestRecipients(setSelfApplicationTestRecipientsRequest, initOverrides) {
|
|
19554
|
+
const response = await this.setSelfApplicationTestRecipientsRaw({ setSelfApplicationTestRecipientsRequest }, initOverrides);
|
|
19555
|
+
return await response.value();
|
|
19556
|
+
}
|
|
19557
|
+
};
|
|
19558
|
+
|
|
19187
19559
|
// src/src/apis/AuthEmailOTPApi.ts
|
|
19188
19560
|
var AuthEmailOTPApi = class extends BaseAPI {
|
|
19189
19561
|
/**
|
|
@@ -19647,7 +20019,7 @@ var AuthEmailTemplatesApi = class extends BaseAPI {
|
|
|
19647
20019
|
return await response.value();
|
|
19648
20020
|
}
|
|
19649
20021
|
/**
|
|
19650
|
-
* Renders the template (override or default) using sample/provided variables and sends to the recipient. The recipient must be in the application `test_recipients` allowlist. Rate-limited.
|
|
20022
|
+
* Renders the template (override or default) using sample/provided variables and sends to the recipient. The recipient must be in the application `test_recipients` allowlist. Rate-limited. When non-empty, `test_recipients` gates ALL auth emails this application sends (magic link, password reset, email verification, and email OTP) — not just these test renders. Only listed recipients receive auth email; any other recipient is silently blocked. Use it to make a non-production application safe from mass sends. An empty allowlist (the default) imposes no restriction and every recipient receives auth email normally.
|
|
19651
20023
|
* Send a test render of a template
|
|
19652
20024
|
*/
|
|
19653
20025
|
async sendAuthEmailTemplateTestRaw(requestParameters, initOverrides) {
|
|
@@ -19682,7 +20054,7 @@ var AuthEmailTemplatesApi = class extends BaseAPI {
|
|
|
19682
20054
|
return new JSONApiResponse(response, (jsonValue) => AuthEmailTemplateTestResponseFromJSON(jsonValue));
|
|
19683
20055
|
}
|
|
19684
20056
|
/**
|
|
19685
|
-
* Renders the template (override or default) using sample/provided variables and sends to the recipient. The recipient must be in the application `test_recipients` allowlist. Rate-limited.
|
|
20057
|
+
* Renders the template (override or default) using sample/provided variables and sends to the recipient. The recipient must be in the application `test_recipients` allowlist. Rate-limited. When non-empty, `test_recipients` gates ALL auth emails this application sends (magic link, password reset, email verification, and email OTP) — not just these test renders. Only listed recipients receive auth email; any other recipient is silently blocked. Use it to make a non-production application safe from mass sends. An empty allowlist (the default) imposes no restriction and every recipient receives auth email normally.
|
|
19686
20058
|
* Send a test render of a template
|
|
19687
20059
|
*/
|
|
19688
20060
|
async sendAuthEmailTemplateTest(type, authEmailTemplateTestRequest, initOverrides) {
|
|
@@ -21613,6 +21985,41 @@ var AuthUserDirectoryApi = class extends BaseAPI {
|
|
|
21613
21985
|
async deleteEndUserByApplication(userId, initOverrides) {
|
|
21614
21986
|
await this.deleteEndUserByApplicationRaw({ userId }, initOverrides);
|
|
21615
21987
|
}
|
|
21988
|
+
/**
|
|
21989
|
+
* Secret-key-scoped, aggregate view of the sign-in methods configured for a single end user within the authenticating application. Reports whether the user has a password, which OAuth providers are linked, whether MFA is enabled, whether email/phone are verified, and how many passkeys are registered — everything a customer admin needs to build a \"sign-in methods\" screen. Scoped to the application — a caller can never read a user belonging to another application.
|
|
21990
|
+
* Get an end user\'s sign-in methods (server-side admin)
|
|
21991
|
+
*/
|
|
21992
|
+
async getEndUserAuthMethodsRaw(requestParameters, initOverrides) {
|
|
21993
|
+
if (requestParameters["userId"] == null) {
|
|
21994
|
+
throw new RequiredError(
|
|
21995
|
+
"userId",
|
|
21996
|
+
'Required parameter "userId" was null or undefined when calling getEndUserAuthMethods().'
|
|
21997
|
+
);
|
|
21998
|
+
}
|
|
21999
|
+
const queryParameters = {};
|
|
22000
|
+
const headerParameters = {};
|
|
22001
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
22002
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
22003
|
+
}
|
|
22004
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
22005
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
22006
|
+
}
|
|
22007
|
+
const response = await this.request({
|
|
22008
|
+
path: `/auth/users/{user_id}/auth-methods`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters["userId"]))),
|
|
22009
|
+
method: "GET",
|
|
22010
|
+
headers: headerParameters,
|
|
22011
|
+
query: queryParameters
|
|
22012
|
+
}, initOverrides);
|
|
22013
|
+
return new JSONApiResponse(response, (jsonValue) => GetEndUserAuthMethods200ResponseFromJSON(jsonValue));
|
|
22014
|
+
}
|
|
22015
|
+
/**
|
|
22016
|
+
* Secret-key-scoped, aggregate view of the sign-in methods configured for a single end user within the authenticating application. Reports whether the user has a password, which OAuth providers are linked, whether MFA is enabled, whether email/phone are verified, and how many passkeys are registered — everything a customer admin needs to build a \"sign-in methods\" screen. Scoped to the application — a caller can never read a user belonging to another application.
|
|
22017
|
+
* Get an end user\'s sign-in methods (server-side admin)
|
|
22018
|
+
*/
|
|
22019
|
+
async getEndUserAuthMethods(userId, initOverrides) {
|
|
22020
|
+
const response = await this.getEndUserAuthMethodsRaw({ userId }, initOverrides);
|
|
22021
|
+
return await response.value();
|
|
22022
|
+
}
|
|
21616
22023
|
/**
|
|
21617
22024
|
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
21618
22025
|
* Look up an end user by email (server-side admin)
|
|
@@ -21893,6 +22300,47 @@ var ListEndUsersEnvironmentEnum = {
|
|
|
21893
22300
|
|
|
21894
22301
|
// src/src/apis/AuthUserProfileApi.ts
|
|
21895
22302
|
var AuthUserProfileApi = class extends BaseAPI {
|
|
22303
|
+
/**
|
|
22304
|
+
* 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.
|
|
22305
|
+
* Change password (authenticated session)
|
|
22306
|
+
*/
|
|
22307
|
+
async changeEndUserPasswordRaw(requestParameters, initOverrides) {
|
|
22308
|
+
if (requestParameters["changePasswordRequest"] == null) {
|
|
22309
|
+
throw new RequiredError(
|
|
22310
|
+
"changePasswordRequest",
|
|
22311
|
+
'Required parameter "changePasswordRequest" was null or undefined when calling changeEndUserPassword().'
|
|
22312
|
+
);
|
|
22313
|
+
}
|
|
22314
|
+
const queryParameters = {};
|
|
22315
|
+
const headerParameters = {};
|
|
22316
|
+
headerParameters["Content-Type"] = "application/json";
|
|
22317
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
22318
|
+
const token = this.configuration.accessToken;
|
|
22319
|
+
const tokenString = await token("EndUserToken", []);
|
|
22320
|
+
if (tokenString) {
|
|
22321
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
22322
|
+
}
|
|
22323
|
+
}
|
|
22324
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
22325
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
22326
|
+
}
|
|
22327
|
+
const response = await this.request({
|
|
22328
|
+
path: `/auth/users/change-password`,
|
|
22329
|
+
method: "POST",
|
|
22330
|
+
headers: headerParameters,
|
|
22331
|
+
query: queryParameters,
|
|
22332
|
+
body: ChangePasswordRequestToJSON(requestParameters["changePasswordRequest"])
|
|
22333
|
+
}, initOverrides);
|
|
22334
|
+
return new JSONApiResponse(response, (jsonValue) => RefreshTokenResponseFromJSON(jsonValue));
|
|
22335
|
+
}
|
|
22336
|
+
/**
|
|
22337
|
+
* 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.
|
|
22338
|
+
* Change password (authenticated session)
|
|
22339
|
+
*/
|
|
22340
|
+
async changeEndUserPassword(changePasswordRequest, initOverrides) {
|
|
22341
|
+
const response = await this.changeEndUserPasswordRaw({ changePasswordRequest }, initOverrides);
|
|
22342
|
+
return await response.value();
|
|
22343
|
+
}
|
|
21896
22344
|
/**
|
|
21897
22345
|
* 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.
|
|
21898
22346
|
* Delete current end user account
|
|
@@ -28471,7 +28919,8 @@ var Zyphr = class {
|
|
|
28471
28919
|
emailOtp: new AuthEmailOTPApi(config),
|
|
28472
28920
|
profile: new AuthUserProfileApi(config),
|
|
28473
28921
|
userDirectory: new AuthUserDirectoryApi(config),
|
|
28474
|
-
webauthn: new AuthWebAuthnApi(config)
|
|
28922
|
+
webauthn: new AuthWebAuthnApi(config),
|
|
28923
|
+
application: new AuthApplicationApi(config)
|
|
28475
28924
|
};
|
|
28476
28925
|
}
|
|
28477
28926
|
/**
|
|
@@ -28518,7 +28967,14 @@ var ZyphrClientCredentialError = class extends Error {
|
|
|
28518
28967
|
this.name = "ZyphrClientCredentialError";
|
|
28519
28968
|
}
|
|
28520
28969
|
};
|
|
28521
|
-
var
|
|
28970
|
+
var PUBLISHABLE_KEY_PREFIXES = ["za_live_pub_", "za_test_pub_", "za_pub_"];
|
|
28971
|
+
var SECRET_KEY_PREFIXES = [
|
|
28972
|
+
"za_live_sec_",
|
|
28973
|
+
"za_test_sec_",
|
|
28974
|
+
"za_sec_",
|
|
28975
|
+
"zy_live_",
|
|
28976
|
+
"zy_test_"
|
|
28977
|
+
];
|
|
28522
28978
|
var ZyphrClient = class {
|
|
28523
28979
|
auth;
|
|
28524
28980
|
/** Device registration for push (takes an OS-acquired token). */
|
|
@@ -28527,16 +28983,16 @@ var ZyphrClient = class {
|
|
|
28527
28983
|
accessToken;
|
|
28528
28984
|
constructor(options) {
|
|
28529
28985
|
if (!options.applicationKey) {
|
|
28530
|
-
throw new ZyphrClientCredentialError("applicationKey (
|
|
28986
|
+
throw new ZyphrClientCredentialError("applicationKey (za_live_pub_* / za_test_pub_*) is required");
|
|
28531
28987
|
}
|
|
28532
28988
|
if (SECRET_KEY_PREFIXES.some((p) => options.applicationKey.startsWith(p))) {
|
|
28533
28989
|
throw new ZyphrClientCredentialError(
|
|
28534
|
-
"ZyphrClient must be constructed with a publishable application key (
|
|
28990
|
+
"ZyphrClient must be constructed with a publishable application key (za_live_pub_* / za_test_pub_*), never a secret key. Secret keys must stay server-side."
|
|
28535
28991
|
);
|
|
28536
28992
|
}
|
|
28537
|
-
if (!options.applicationKey.startsWith(
|
|
28993
|
+
if (!PUBLISHABLE_KEY_PREFIXES.some((p) => options.applicationKey.startsWith(p))) {
|
|
28538
28994
|
throw new ZyphrClientCredentialError(
|
|
28539
|
-
"applicationKey must be a publishable application key (
|
|
28995
|
+
"applicationKey must be a publishable application key (za_live_pub_* / za_test_pub_*)."
|
|
28540
28996
|
);
|
|
28541
28997
|
}
|
|
28542
28998
|
this.applicationKey = options.applicationKey;
|
|
@@ -28641,6 +29097,17 @@ var SDK_VERSION = "0.1.0";
|
|
|
28641
29097
|
ApiErrorMetaToJSONTyped,
|
|
28642
29098
|
ApiErrorToJSON,
|
|
28643
29099
|
ApiErrorToJSONTyped,
|
|
29100
|
+
ApplicationSelfEnvironmentEnum,
|
|
29101
|
+
ApplicationSelfFromJSON,
|
|
29102
|
+
ApplicationSelfFromJSONTyped,
|
|
29103
|
+
ApplicationSelfResponseFromJSON,
|
|
29104
|
+
ApplicationSelfResponseFromJSONTyped,
|
|
29105
|
+
ApplicationSelfResponseToJSON,
|
|
29106
|
+
ApplicationSelfResponseToJSONTyped,
|
|
29107
|
+
ApplicationSelfSigningAlgorithmEnum,
|
|
29108
|
+
ApplicationSelfToJSON,
|
|
29109
|
+
ApplicationSelfToJSONTyped,
|
|
29110
|
+
AuthApplicationApi,
|
|
28644
29111
|
AuthEmailOTPApi,
|
|
28645
29112
|
AuthEmailTemplateDefaultFromJSON,
|
|
28646
29113
|
AuthEmailTemplateDefaultFromJSONTyped,
|
|
@@ -28730,6 +29197,10 @@ var SDK_VERSION = "0.1.0";
|
|
|
28730
29197
|
AuthLoginResultToJSONTyped,
|
|
28731
29198
|
AuthMFAApi,
|
|
28732
29199
|
AuthMagicLinksApi,
|
|
29200
|
+
AuthMethodsFromJSON,
|
|
29201
|
+
AuthMethodsFromJSONTyped,
|
|
29202
|
+
AuthMethodsToJSON,
|
|
29203
|
+
AuthMethodsToJSONTyped,
|
|
28733
29204
|
AuthOAuthApi,
|
|
28734
29205
|
AuthOrganizationsApi,
|
|
28735
29206
|
AuthPasswordResetApi,
|
|
@@ -28805,6 +29276,10 @@ var SDK_VERSION = "0.1.0";
|
|
|
28805
29276
|
CategoryResponseToJSONTyped,
|
|
28806
29277
|
CategoryToJSON,
|
|
28807
29278
|
CategoryToJSONTyped,
|
|
29279
|
+
ChangePasswordRequestFromJSON,
|
|
29280
|
+
ChangePasswordRequestFromJSONTyped,
|
|
29281
|
+
ChangePasswordRequestToJSON,
|
|
29282
|
+
ChangePasswordRequestToJSONTyped,
|
|
28808
29283
|
CloseWaaSEndpointCircuit200ResponseDataFromJSON,
|
|
28809
29284
|
CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped,
|
|
28810
29285
|
CloseWaaSEndpointCircuit200ResponseDataStateEnum,
|
|
@@ -29137,6 +29612,10 @@ var SDK_VERSION = "0.1.0";
|
|
|
29137
29612
|
GetDomain200ResponseMetaToJSONTyped,
|
|
29138
29613
|
GetDomain200ResponseToJSON,
|
|
29139
29614
|
GetDomain200ResponseToJSONTyped,
|
|
29615
|
+
GetEndUserAuthMethods200ResponseFromJSON,
|
|
29616
|
+
GetEndUserAuthMethods200ResponseFromJSONTyped,
|
|
29617
|
+
GetEndUserAuthMethods200ResponseToJSON,
|
|
29618
|
+
GetEndUserAuthMethods200ResponseToJSONTyped,
|
|
29140
29619
|
GetEndUserById200ResponseFromJSON,
|
|
29141
29620
|
GetEndUserById200ResponseFromJSONTyped,
|
|
29142
29621
|
GetEndUserById200ResponseToJSON,
|
|
@@ -29981,6 +30460,10 @@ var SDK_VERSION = "0.1.0";
|
|
|
29981
30460
|
SetPreferencesRequestPreferencesInnerToJSONTyped,
|
|
29982
30461
|
SetPreferencesRequestToJSON,
|
|
29983
30462
|
SetPreferencesRequestToJSONTyped,
|
|
30463
|
+
SetSelfApplicationTestRecipientsRequestFromJSON,
|
|
30464
|
+
SetSelfApplicationTestRecipientsRequestFromJSONTyped,
|
|
30465
|
+
SetSelfApplicationTestRecipientsRequestToJSON,
|
|
30466
|
+
SetSelfApplicationTestRecipientsRequestToJSONTyped,
|
|
29984
30467
|
SignInAnonymouslyRequestFromJSON,
|
|
29985
30468
|
SignInAnonymouslyRequestFromJSONTyped,
|
|
29986
30469
|
SignInAnonymouslyRequestToJSON,
|
|
@@ -30563,6 +31046,11 @@ var SDK_VERSION = "0.1.0";
|
|
|
30563
31046
|
WebhookDeliveryStatusEnum,
|
|
30564
31047
|
WebhookDeliveryToJSON,
|
|
30565
31048
|
WebhookDeliveryToJSONTyped,
|
|
31049
|
+
WebhookEventType,
|
|
31050
|
+
WebhookEventTypeFromJSON,
|
|
31051
|
+
WebhookEventTypeFromJSONTyped,
|
|
31052
|
+
WebhookEventTypeToJSON,
|
|
31053
|
+
WebhookEventTypeToJSONTyped,
|
|
30566
31054
|
WebhookEventTypesResponseDataFromJSON,
|
|
30567
31055
|
WebhookEventTypesResponseDataFromJSONTyped,
|
|
30568
31056
|
WebhookEventTypesResponseDataToJSON,
|
|
@@ -30719,6 +31207,8 @@ var SDK_VERSION = "0.1.0";
|
|
|
30719
31207
|
instanceOfApiError,
|
|
30720
31208
|
instanceOfApiErrorError,
|
|
30721
31209
|
instanceOfApiErrorMeta,
|
|
31210
|
+
instanceOfApplicationSelf,
|
|
31211
|
+
instanceOfApplicationSelfResponse,
|
|
30722
31212
|
instanceOfAuthEmailTemplate,
|
|
30723
31213
|
instanceOfAuthEmailTemplateDefault,
|
|
30724
31214
|
instanceOfAuthEmailTemplateDefaultResponse,
|
|
@@ -30739,6 +31229,7 @@ var SDK_VERSION = "0.1.0";
|
|
|
30739
31229
|
instanceOfAuthLoginResponse,
|
|
30740
31230
|
instanceOfAuthLoginResult,
|
|
30741
31231
|
instanceOfAuthLoginResultMfaChallenge,
|
|
31232
|
+
instanceOfAuthMethods,
|
|
30742
31233
|
instanceOfAuthResult,
|
|
30743
31234
|
instanceOfAuthResultResponse,
|
|
30744
31235
|
instanceOfAuthSession,
|
|
@@ -30754,6 +31245,7 @@ var SDK_VERSION = "0.1.0";
|
|
|
30754
31245
|
instanceOfCategory,
|
|
30755
31246
|
instanceOfCategoryListResponse,
|
|
30756
31247
|
instanceOfCategoryResponse,
|
|
31248
|
+
instanceOfChangePasswordRequest,
|
|
30757
31249
|
instanceOfCloseWaaSEndpointCircuit200Response,
|
|
30758
31250
|
instanceOfCloseWaaSEndpointCircuit200ResponseData,
|
|
30759
31251
|
instanceOfConfirmEmailVerificationRequest,
|
|
@@ -30831,6 +31323,7 @@ var SDK_VERSION = "0.1.0";
|
|
|
30831
31323
|
instanceOfGenerateWaaSPortalToken201Response,
|
|
30832
31324
|
instanceOfGetDomain200Response,
|
|
30833
31325
|
instanceOfGetDomain200ResponseMeta,
|
|
31326
|
+
instanceOfGetEndUserAuthMethods200Response,
|
|
30834
31327
|
instanceOfGetEndUserById200Response,
|
|
30835
31328
|
instanceOfGetEndUserClaims200Response,
|
|
30836
31329
|
instanceOfGetEndUserClaims200ResponseData,
|
|
@@ -31031,6 +31524,7 @@ var SDK_VERSION = "0.1.0";
|
|
|
31031
31524
|
instanceOfSetEndUserClaimsRequest,
|
|
31032
31525
|
instanceOfSetPreferencesRequest,
|
|
31033
31526
|
instanceOfSetPreferencesRequestPreferencesInner,
|
|
31527
|
+
instanceOfSetSelfApplicationTestRecipientsRequest,
|
|
31034
31528
|
instanceOfSignInAnonymouslyRequest,
|
|
31035
31529
|
instanceOfSignInWithGameCenterRequest,
|
|
31036
31530
|
instanceOfSignInWithGooglePlayGamesRequest,
|
|
@@ -31168,6 +31662,7 @@ var SDK_VERSION = "0.1.0";
|
|
|
31168
31662
|
instanceOfWebhookDeliveryResponse,
|
|
31169
31663
|
instanceOfWebhookDeliveryRetryResponse,
|
|
31170
31664
|
instanceOfWebhookDeliveryRetryResponseData,
|
|
31665
|
+
instanceOfWebhookEventType,
|
|
31171
31666
|
instanceOfWebhookEventTypesResponse,
|
|
31172
31667
|
instanceOfWebhookEventTypesResponseData,
|
|
31173
31668
|
instanceOfWebhookIpsResponse,
|