@zyphr-dev/node-sdk 0.1.48 → 0.1.50
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 +241 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +253 -38
- package/dist/index.d.ts +253 -38
- package/dist/index.js +218 -29
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +4 -1
- package/src/client.ts +5 -0
- package/src/clientAuth.ts +9 -0
- package/src/src/apis/UtilityApi.ts +72 -4
- package/src/src/models/ApplicationSelf.ts +19 -1
- package/src/src/models/PasswordPolicy.ts +120 -0
- package/src/src/models/PasswordRequirementsResponseData.ts +20 -10
- package/src/src/models/{PasswordRequirements.ts → PasswordStrength.ts} +50 -49
- package/src/src/models/PasswordStrengthRequest.ts +74 -0
- package/src/src/models/PasswordStrengthResponse.ts +88 -0
- package/src/src/models/SetSelfApplicationTestRecipientsRequest.ts +23 -5
- package/src/src/models/index.ts +4 -1
package/dist/index.cjs
CHANGED
|
@@ -61,6 +61,7 @@ __export(index_exports, {
|
|
|
61
61
|
ApiErrorMetaToJSONTyped: () => ApiErrorMetaToJSONTyped,
|
|
62
62
|
ApiErrorToJSON: () => ApiErrorToJSON,
|
|
63
63
|
ApiErrorToJSONTyped: () => ApiErrorToJSONTyped,
|
|
64
|
+
ApplicationSelfAuthEmailModeEnum: () => ApplicationSelfAuthEmailModeEnum,
|
|
64
65
|
ApplicationSelfEnvironmentEnum: () => ApplicationSelfEnvironmentEnum,
|
|
65
66
|
ApplicationSelfFromJSON: () => ApplicationSelfFromJSON,
|
|
66
67
|
ApplicationSelfFromJSONTyped: () => ApplicationSelfFromJSONTyped,
|
|
@@ -1013,8 +1014,10 @@ __export(index_exports, {
|
|
|
1013
1014
|
PaginationMetaFromJSONTyped: () => PaginationMetaFromJSONTyped,
|
|
1014
1015
|
PaginationMetaToJSON: () => PaginationMetaToJSON,
|
|
1015
1016
|
PaginationMetaToJSONTyped: () => PaginationMetaToJSONTyped,
|
|
1016
|
-
|
|
1017
|
-
|
|
1017
|
+
PasswordPolicyFromJSON: () => PasswordPolicyFromJSON,
|
|
1018
|
+
PasswordPolicyFromJSONTyped: () => PasswordPolicyFromJSONTyped,
|
|
1019
|
+
PasswordPolicyToJSON: () => PasswordPolicyToJSON,
|
|
1020
|
+
PasswordPolicyToJSONTyped: () => PasswordPolicyToJSONTyped,
|
|
1018
1021
|
PasswordRequirementsResponseDataFromJSON: () => PasswordRequirementsResponseDataFromJSON,
|
|
1019
1022
|
PasswordRequirementsResponseDataFromJSONTyped: () => PasswordRequirementsResponseDataFromJSONTyped,
|
|
1020
1023
|
PasswordRequirementsResponseDataToJSON: () => PasswordRequirementsResponseDataToJSON,
|
|
@@ -1023,8 +1026,19 @@ __export(index_exports, {
|
|
|
1023
1026
|
PasswordRequirementsResponseFromJSONTyped: () => PasswordRequirementsResponseFromJSONTyped,
|
|
1024
1027
|
PasswordRequirementsResponseToJSON: () => PasswordRequirementsResponseToJSON,
|
|
1025
1028
|
PasswordRequirementsResponseToJSONTyped: () => PasswordRequirementsResponseToJSONTyped,
|
|
1026
|
-
|
|
1027
|
-
|
|
1029
|
+
PasswordStrengthFromJSON: () => PasswordStrengthFromJSON,
|
|
1030
|
+
PasswordStrengthFromJSONTyped: () => PasswordStrengthFromJSONTyped,
|
|
1031
|
+
PasswordStrengthLabelEnum: () => PasswordStrengthLabelEnum,
|
|
1032
|
+
PasswordStrengthRequestFromJSON: () => PasswordStrengthRequestFromJSON,
|
|
1033
|
+
PasswordStrengthRequestFromJSONTyped: () => PasswordStrengthRequestFromJSONTyped,
|
|
1034
|
+
PasswordStrengthRequestToJSON: () => PasswordStrengthRequestToJSON,
|
|
1035
|
+
PasswordStrengthRequestToJSONTyped: () => PasswordStrengthRequestToJSONTyped,
|
|
1036
|
+
PasswordStrengthResponseFromJSON: () => PasswordStrengthResponseFromJSON,
|
|
1037
|
+
PasswordStrengthResponseFromJSONTyped: () => PasswordStrengthResponseFromJSONTyped,
|
|
1038
|
+
PasswordStrengthResponseToJSON: () => PasswordStrengthResponseToJSON,
|
|
1039
|
+
PasswordStrengthResponseToJSONTyped: () => PasswordStrengthResponseToJSONTyped,
|
|
1040
|
+
PasswordStrengthToJSON: () => PasswordStrengthToJSON,
|
|
1041
|
+
PasswordStrengthToJSONTyped: () => PasswordStrengthToJSONTyped,
|
|
1028
1042
|
PayloadTooLargeErrorErrorCodeEnum: () => PayloadTooLargeErrorErrorCodeEnum,
|
|
1029
1043
|
PayloadTooLargeErrorErrorDetailsFromJSON: () => PayloadTooLargeErrorErrorDetailsFromJSON,
|
|
1030
1044
|
PayloadTooLargeErrorErrorDetailsFromJSONTyped: () => PayloadTooLargeErrorErrorDetailsFromJSONTyped,
|
|
@@ -1424,6 +1438,7 @@ __export(index_exports, {
|
|
|
1424
1438
|
SetPreferencesRequestPreferencesInnerToJSONTyped: () => SetPreferencesRequestPreferencesInnerToJSONTyped,
|
|
1425
1439
|
SetPreferencesRequestToJSON: () => SetPreferencesRequestToJSON,
|
|
1426
1440
|
SetPreferencesRequestToJSONTyped: () => SetPreferencesRequestToJSONTyped,
|
|
1441
|
+
SetSelfApplicationTestRecipientsRequestAuthEmailModeEnum: () => SetSelfApplicationTestRecipientsRequestAuthEmailModeEnum,
|
|
1427
1442
|
SetSelfApplicationTestRecipientsRequestFromJSON: () => SetSelfApplicationTestRecipientsRequestFromJSON,
|
|
1428
1443
|
SetSelfApplicationTestRecipientsRequestFromJSONTyped: () => SetSelfApplicationTestRecipientsRequestFromJSONTyped,
|
|
1429
1444
|
SetSelfApplicationTestRecipientsRequestToJSON: () => SetSelfApplicationTestRecipientsRequestToJSON,
|
|
@@ -2389,9 +2404,12 @@ __export(index_exports, {
|
|
|
2389
2404
|
instanceOfOrganizationMembershipWithUser: () => instanceOfOrganizationMembershipWithUser,
|
|
2390
2405
|
instanceOfOrganizationResponse: () => instanceOfOrganizationResponse,
|
|
2391
2406
|
instanceOfPaginationMeta: () => instanceOfPaginationMeta,
|
|
2392
|
-
|
|
2407
|
+
instanceOfPasswordPolicy: () => instanceOfPasswordPolicy,
|
|
2393
2408
|
instanceOfPasswordRequirementsResponse: () => instanceOfPasswordRequirementsResponse,
|
|
2394
2409
|
instanceOfPasswordRequirementsResponseData: () => instanceOfPasswordRequirementsResponseData,
|
|
2410
|
+
instanceOfPasswordStrength: () => instanceOfPasswordStrength,
|
|
2411
|
+
instanceOfPasswordStrengthRequest: () => instanceOfPasswordStrengthRequest,
|
|
2412
|
+
instanceOfPasswordStrengthResponse: () => instanceOfPasswordStrengthResponse,
|
|
2395
2413
|
instanceOfPayloadTooLargeError: () => instanceOfPayloadTooLargeError,
|
|
2396
2414
|
instanceOfPayloadTooLargeErrorError: () => instanceOfPayloadTooLargeErrorError,
|
|
2397
2415
|
instanceOfPayloadTooLargeErrorErrorDetails: () => instanceOfPayloadTooLargeErrorErrorDetails,
|
|
@@ -3525,12 +3543,17 @@ var ApplicationSelfSigningAlgorithmEnum = {
|
|
|
3525
3543
|
RS256: "RS256",
|
|
3526
3544
|
ES256: "ES256"
|
|
3527
3545
|
};
|
|
3546
|
+
var ApplicationSelfAuthEmailModeEnum = {
|
|
3547
|
+
ALLOWLIST: "allowlist",
|
|
3548
|
+
UNRESTRICTED: "unrestricted"
|
|
3549
|
+
};
|
|
3528
3550
|
function instanceOfApplicationSelf(value) {
|
|
3529
3551
|
if (!("id" in value) || value["id"] === void 0) return false;
|
|
3530
3552
|
if (!("name" in value) || value["name"] === void 0) return false;
|
|
3531
3553
|
if (!("environment" in value) || value["environment"] === void 0) return false;
|
|
3532
3554
|
if (!("signingAlgorithm" in value) || value["signingAlgorithm"] === void 0) return false;
|
|
3533
3555
|
if (!("testRecipients" in value) || value["testRecipients"] === void 0) return false;
|
|
3556
|
+
if (!("authEmailMode" in value) || value["authEmailMode"] === void 0) return false;
|
|
3534
3557
|
return true;
|
|
3535
3558
|
}
|
|
3536
3559
|
function ApplicationSelfFromJSON(json) {
|
|
@@ -3545,7 +3568,8 @@ function ApplicationSelfFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
3545
3568
|
"name": json["name"],
|
|
3546
3569
|
"environment": json["environment"],
|
|
3547
3570
|
"signingAlgorithm": json["signing_algorithm"],
|
|
3548
|
-
"testRecipients": json["test_recipients"]
|
|
3571
|
+
"testRecipients": json["test_recipients"],
|
|
3572
|
+
"authEmailMode": json["auth_email_mode"]
|
|
3549
3573
|
};
|
|
3550
3574
|
}
|
|
3551
3575
|
function ApplicationSelfToJSON(json) {
|
|
@@ -3560,7 +3584,8 @@ function ApplicationSelfToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3560
3584
|
"name": value["name"],
|
|
3561
3585
|
"environment": value["environment"],
|
|
3562
3586
|
"signing_algorithm": value["signingAlgorithm"],
|
|
3563
|
-
"test_recipients": value["testRecipients"]
|
|
3587
|
+
"test_recipients": value["testRecipients"],
|
|
3588
|
+
"auth_email_mode": value["authEmailMode"]
|
|
3564
3589
|
};
|
|
3565
3590
|
}
|
|
3566
3591
|
|
|
@@ -11230,30 +11255,38 @@ function OrganizationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
11230
11255
|
};
|
|
11231
11256
|
}
|
|
11232
11257
|
|
|
11233
|
-
// src/src/models/
|
|
11234
|
-
function
|
|
11258
|
+
// src/src/models/PasswordPolicy.ts
|
|
11259
|
+
function instanceOfPasswordPolicy(value) {
|
|
11260
|
+
if (!("minLength" in value) || value["minLength"] === void 0) return false;
|
|
11261
|
+
if (!("maxLength" in value) || value["maxLength"] === void 0) return false;
|
|
11262
|
+
if (!("requireUppercase" in value) || value["requireUppercase"] === void 0) return false;
|
|
11263
|
+
if (!("requireLowercase" in value) || value["requireLowercase"] === void 0) return false;
|
|
11264
|
+
if (!("requireNumbers" in value) || value["requireNumbers"] === void 0) return false;
|
|
11265
|
+
if (!("requireSpecial" in value) || value["requireSpecial"] === void 0) return false;
|
|
11266
|
+
if (!("disallowCommon" in value) || value["disallowCommon"] === void 0) return false;
|
|
11235
11267
|
return true;
|
|
11236
11268
|
}
|
|
11237
|
-
function
|
|
11238
|
-
return
|
|
11269
|
+
function PasswordPolicyFromJSON(json) {
|
|
11270
|
+
return PasswordPolicyFromJSONTyped(json, false);
|
|
11239
11271
|
}
|
|
11240
|
-
function
|
|
11272
|
+
function PasswordPolicyFromJSONTyped(json, ignoreDiscriminator) {
|
|
11241
11273
|
if (json == null) {
|
|
11242
11274
|
return json;
|
|
11243
11275
|
}
|
|
11244
11276
|
return {
|
|
11245
|
-
"minLength": json["min_length"]
|
|
11246
|
-
"maxLength": json["max_length"]
|
|
11247
|
-
"requireUppercase": json["require_uppercase"]
|
|
11248
|
-
"requireLowercase": json["require_lowercase"]
|
|
11249
|
-
"requireNumbers": json["require_numbers"]
|
|
11250
|
-
"requireSpecial": json["require_special"]
|
|
11277
|
+
"minLength": json["min_length"],
|
|
11278
|
+
"maxLength": json["max_length"],
|
|
11279
|
+
"requireUppercase": json["require_uppercase"],
|
|
11280
|
+
"requireLowercase": json["require_lowercase"],
|
|
11281
|
+
"requireNumbers": json["require_numbers"],
|
|
11282
|
+
"requireSpecial": json["require_special"],
|
|
11283
|
+
"disallowCommon": json["disallow_common"]
|
|
11251
11284
|
};
|
|
11252
11285
|
}
|
|
11253
|
-
function
|
|
11254
|
-
return
|
|
11286
|
+
function PasswordPolicyToJSON(json) {
|
|
11287
|
+
return PasswordPolicyToJSONTyped(json, false);
|
|
11255
11288
|
}
|
|
11256
|
-
function
|
|
11289
|
+
function PasswordPolicyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11257
11290
|
if (value == null) {
|
|
11258
11291
|
return value;
|
|
11259
11292
|
}
|
|
@@ -11263,12 +11296,15 @@ function PasswordRequirementsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
11263
11296
|
"require_uppercase": value["requireUppercase"],
|
|
11264
11297
|
"require_lowercase": value["requireLowercase"],
|
|
11265
11298
|
"require_numbers": value["requireNumbers"],
|
|
11266
|
-
"require_special": value["requireSpecial"]
|
|
11299
|
+
"require_special": value["requireSpecial"],
|
|
11300
|
+
"disallow_common": value["disallowCommon"]
|
|
11267
11301
|
};
|
|
11268
11302
|
}
|
|
11269
11303
|
|
|
11270
11304
|
// src/src/models/PasswordRequirementsResponseData.ts
|
|
11271
11305
|
function instanceOfPasswordRequirementsResponseData(value) {
|
|
11306
|
+
if (!("policy" in value) || value["policy"] === void 0) return false;
|
|
11307
|
+
if (!("requirements" in value) || value["requirements"] === void 0) return false;
|
|
11272
11308
|
return true;
|
|
11273
11309
|
}
|
|
11274
11310
|
function PasswordRequirementsResponseDataFromJSON(json) {
|
|
@@ -11279,7 +11315,8 @@ function PasswordRequirementsResponseDataFromJSONTyped(json, ignoreDiscriminator
|
|
|
11279
11315
|
return json;
|
|
11280
11316
|
}
|
|
11281
11317
|
return {
|
|
11282
|
-
"
|
|
11318
|
+
"policy": PasswordPolicyFromJSON(json["policy"]),
|
|
11319
|
+
"requirements": json["requirements"]
|
|
11283
11320
|
};
|
|
11284
11321
|
}
|
|
11285
11322
|
function PasswordRequirementsResponseDataToJSON(json) {
|
|
@@ -11290,7 +11327,8 @@ function PasswordRequirementsResponseDataToJSONTyped(value, ignoreDiscriminator
|
|
|
11290
11327
|
return value;
|
|
11291
11328
|
}
|
|
11292
11329
|
return {
|
|
11293
|
-
"
|
|
11330
|
+
"policy": PasswordPolicyToJSON(value["policy"]),
|
|
11331
|
+
"requirements": value["requirements"]
|
|
11294
11332
|
};
|
|
11295
11333
|
}
|
|
11296
11334
|
|
|
@@ -11323,6 +11361,108 @@ function PasswordRequirementsResponseToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
11323
11361
|
};
|
|
11324
11362
|
}
|
|
11325
11363
|
|
|
11364
|
+
// src/src/models/PasswordStrength.ts
|
|
11365
|
+
var PasswordStrengthLabelEnum = {
|
|
11366
|
+
WEAK: "weak",
|
|
11367
|
+
FAIR: "fair",
|
|
11368
|
+
GOOD: "good",
|
|
11369
|
+
STRONG: "strong"
|
|
11370
|
+
};
|
|
11371
|
+
function instanceOfPasswordStrength(value) {
|
|
11372
|
+
if (!("valid" in value) || value["valid"] === void 0) return false;
|
|
11373
|
+
if (!("score" in value) || value["score"] === void 0) return false;
|
|
11374
|
+
if (!("label" in value) || value["label"] === void 0) return false;
|
|
11375
|
+
if (!("feedback" in value) || value["feedback"] === void 0) return false;
|
|
11376
|
+
return true;
|
|
11377
|
+
}
|
|
11378
|
+
function PasswordStrengthFromJSON(json) {
|
|
11379
|
+
return PasswordStrengthFromJSONTyped(json, false);
|
|
11380
|
+
}
|
|
11381
|
+
function PasswordStrengthFromJSONTyped(json, ignoreDiscriminator) {
|
|
11382
|
+
if (json == null) {
|
|
11383
|
+
return json;
|
|
11384
|
+
}
|
|
11385
|
+
return {
|
|
11386
|
+
"valid": json["valid"],
|
|
11387
|
+
"score": json["score"],
|
|
11388
|
+
"label": json["label"],
|
|
11389
|
+
"feedback": json["feedback"]
|
|
11390
|
+
};
|
|
11391
|
+
}
|
|
11392
|
+
function PasswordStrengthToJSON(json) {
|
|
11393
|
+
return PasswordStrengthToJSONTyped(json, false);
|
|
11394
|
+
}
|
|
11395
|
+
function PasswordStrengthToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11396
|
+
if (value == null) {
|
|
11397
|
+
return value;
|
|
11398
|
+
}
|
|
11399
|
+
return {
|
|
11400
|
+
"valid": value["valid"],
|
|
11401
|
+
"score": value["score"],
|
|
11402
|
+
"label": value["label"],
|
|
11403
|
+
"feedback": value["feedback"]
|
|
11404
|
+
};
|
|
11405
|
+
}
|
|
11406
|
+
|
|
11407
|
+
// src/src/models/PasswordStrengthRequest.ts
|
|
11408
|
+
function instanceOfPasswordStrengthRequest(value) {
|
|
11409
|
+
if (!("password" in value) || value["password"] === void 0) return false;
|
|
11410
|
+
return true;
|
|
11411
|
+
}
|
|
11412
|
+
function PasswordStrengthRequestFromJSON(json) {
|
|
11413
|
+
return PasswordStrengthRequestFromJSONTyped(json, false);
|
|
11414
|
+
}
|
|
11415
|
+
function PasswordStrengthRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
11416
|
+
if (json == null) {
|
|
11417
|
+
return json;
|
|
11418
|
+
}
|
|
11419
|
+
return {
|
|
11420
|
+
"password": json["password"],
|
|
11421
|
+
"email": json["email"] == null ? void 0 : json["email"]
|
|
11422
|
+
};
|
|
11423
|
+
}
|
|
11424
|
+
function PasswordStrengthRequestToJSON(json) {
|
|
11425
|
+
return PasswordStrengthRequestToJSONTyped(json, false);
|
|
11426
|
+
}
|
|
11427
|
+
function PasswordStrengthRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11428
|
+
if (value == null) {
|
|
11429
|
+
return value;
|
|
11430
|
+
}
|
|
11431
|
+
return {
|
|
11432
|
+
"password": value["password"],
|
|
11433
|
+
"email": value["email"]
|
|
11434
|
+
};
|
|
11435
|
+
}
|
|
11436
|
+
|
|
11437
|
+
// src/src/models/PasswordStrengthResponse.ts
|
|
11438
|
+
function instanceOfPasswordStrengthResponse(value) {
|
|
11439
|
+
return true;
|
|
11440
|
+
}
|
|
11441
|
+
function PasswordStrengthResponseFromJSON(json) {
|
|
11442
|
+
return PasswordStrengthResponseFromJSONTyped(json, false);
|
|
11443
|
+
}
|
|
11444
|
+
function PasswordStrengthResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
11445
|
+
if (json == null) {
|
|
11446
|
+
return json;
|
|
11447
|
+
}
|
|
11448
|
+
return {
|
|
11449
|
+
"data": json["data"] == null ? void 0 : PasswordStrengthFromJSON(json["data"]),
|
|
11450
|
+
"meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
|
|
11451
|
+
};
|
|
11452
|
+
}
|
|
11453
|
+
function PasswordStrengthResponseToJSON(json) {
|
|
11454
|
+
return PasswordStrengthResponseToJSONTyped(json, false);
|
|
11455
|
+
}
|
|
11456
|
+
function PasswordStrengthResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11457
|
+
if (value == null) {
|
|
11458
|
+
return value;
|
|
11459
|
+
}
|
|
11460
|
+
return {
|
|
11461
|
+
"data": PasswordStrengthToJSON(value["data"]),
|
|
11462
|
+
"meta": RequestMetaToJSON(value["meta"])
|
|
11463
|
+
};
|
|
11464
|
+
}
|
|
11465
|
+
|
|
11326
11466
|
// src/src/models/PayloadTooLargeErrorErrorDetails.ts
|
|
11327
11467
|
function instanceOfPayloadTooLargeErrorErrorDetails(value) {
|
|
11328
11468
|
return true;
|
|
@@ -14662,8 +14802,11 @@ function SetPreferencesRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
14662
14802
|
}
|
|
14663
14803
|
|
|
14664
14804
|
// src/src/models/SetSelfApplicationTestRecipientsRequest.ts
|
|
14805
|
+
var SetSelfApplicationTestRecipientsRequestAuthEmailModeEnum = {
|
|
14806
|
+
ALLOWLIST: "allowlist",
|
|
14807
|
+
UNRESTRICTED: "unrestricted"
|
|
14808
|
+
};
|
|
14665
14809
|
function instanceOfSetSelfApplicationTestRecipientsRequest(value) {
|
|
14666
|
-
if (!("testRecipients" in value) || value["testRecipients"] === void 0) return false;
|
|
14667
14810
|
return true;
|
|
14668
14811
|
}
|
|
14669
14812
|
function SetSelfApplicationTestRecipientsRequestFromJSON(json) {
|
|
@@ -14674,7 +14817,8 @@ function SetSelfApplicationTestRecipientsRequestFromJSONTyped(json, ignoreDiscri
|
|
|
14674
14817
|
return json;
|
|
14675
14818
|
}
|
|
14676
14819
|
return {
|
|
14677
|
-
"testRecipients": json["test_recipients"]
|
|
14820
|
+
"testRecipients": json["test_recipients"] == null ? void 0 : json["test_recipients"],
|
|
14821
|
+
"authEmailMode": json["auth_email_mode"] == null ? void 0 : json["auth_email_mode"]
|
|
14678
14822
|
};
|
|
14679
14823
|
}
|
|
14680
14824
|
function SetSelfApplicationTestRecipientsRequestToJSON(json) {
|
|
@@ -14685,7 +14829,8 @@ function SetSelfApplicationTestRecipientsRequestToJSONTyped(value, ignoreDiscrim
|
|
|
14685
14829
|
return value;
|
|
14686
14830
|
}
|
|
14687
14831
|
return {
|
|
14688
|
-
"test_recipients": value["testRecipients"]
|
|
14832
|
+
"test_recipients": value["testRecipients"],
|
|
14833
|
+
"auth_email_mode": value["authEmailMode"]
|
|
14689
14834
|
};
|
|
14690
14835
|
}
|
|
14691
14836
|
|
|
@@ -26355,7 +26500,41 @@ var TopicsApi = class extends BaseAPI {
|
|
|
26355
26500
|
// src/src/apis/UtilityApi.ts
|
|
26356
26501
|
var UtilityApi = class extends BaseAPI {
|
|
26357
26502
|
/**
|
|
26358
|
-
*
|
|
26503
|
+
* Pre-submit password check for a live registration/reset experience. Returns whether the password would be accepted by the server (`valid`), a strength `score` (0-100) and `label`, and actionable `feedback`. When an `email` is supplied, a password that resembles the email\'s local-part is flagged and marked invalid. The password is never logged or persisted.
|
|
26504
|
+
* Check password strength
|
|
26505
|
+
*/
|
|
26506
|
+
async checkPasswordStrengthRaw(requestParameters, initOverrides) {
|
|
26507
|
+
if (requestParameters["passwordStrengthRequest"] == null) {
|
|
26508
|
+
throw new RequiredError(
|
|
26509
|
+
"passwordStrengthRequest",
|
|
26510
|
+
'Required parameter "passwordStrengthRequest" was null or undefined when calling checkPasswordStrength().'
|
|
26511
|
+
);
|
|
26512
|
+
}
|
|
26513
|
+
const queryParameters = {};
|
|
26514
|
+
const headerParameters = {};
|
|
26515
|
+
headerParameters["Content-Type"] = "application/json";
|
|
26516
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
26517
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
26518
|
+
}
|
|
26519
|
+
const response = await this.request({
|
|
26520
|
+
path: `/auth/password-strength`,
|
|
26521
|
+
method: "POST",
|
|
26522
|
+
headers: headerParameters,
|
|
26523
|
+
query: queryParameters,
|
|
26524
|
+
body: PasswordStrengthRequestToJSON(requestParameters["passwordStrengthRequest"])
|
|
26525
|
+
}, initOverrides);
|
|
26526
|
+
return new JSONApiResponse(response, (jsonValue) => PasswordStrengthResponseFromJSON(jsonValue));
|
|
26527
|
+
}
|
|
26528
|
+
/**
|
|
26529
|
+
* Pre-submit password check for a live registration/reset experience. Returns whether the password would be accepted by the server (`valid`), a strength `score` (0-100) and `label`, and actionable `feedback`. When an `email` is supplied, a password that resembles the email\'s local-part is flagged and marked invalid. The password is never logged or persisted.
|
|
26530
|
+
* Check password strength
|
|
26531
|
+
*/
|
|
26532
|
+
async checkPasswordStrength(passwordStrengthRequest, initOverrides) {
|
|
26533
|
+
const response = await this.checkPasswordStrengthRaw({ passwordStrengthRequest }, initOverrides);
|
|
26534
|
+
return await response.value();
|
|
26535
|
+
}
|
|
26536
|
+
/**
|
|
26537
|
+
* Get password requirements for the application. Returns both a structured `policy` object (for driving a live requirements checklist) and human-readable `requirements` display strings. Useful for client-side validation before registration.
|
|
26359
26538
|
* Get password requirements
|
|
26360
26539
|
*/
|
|
26361
26540
|
async getPasswordRequirementsRaw(initOverrides) {
|
|
@@ -26373,7 +26552,7 @@ var UtilityApi = class extends BaseAPI {
|
|
|
26373
26552
|
return new JSONApiResponse(response, (jsonValue) => PasswordRequirementsResponseFromJSON(jsonValue));
|
|
26374
26553
|
}
|
|
26375
26554
|
/**
|
|
26376
|
-
* Get password requirements for the application. Useful for client-side validation before registration.
|
|
26555
|
+
* Get password requirements for the application. Returns both a structured `policy` object (for driving a live requirements checklist) and human-readable `requirements` display strings. Useful for client-side validation before registration.
|
|
26377
26556
|
* Get password requirements
|
|
26378
26557
|
*/
|
|
26379
26558
|
async getPasswordRequirements(initOverrides) {
|
|
@@ -28871,6 +29050,8 @@ var Zyphr = class {
|
|
|
28871
29050
|
webhooks;
|
|
28872
29051
|
topics;
|
|
28873
29052
|
devices;
|
|
29053
|
+
/** Publishable-key-safe utilities: password policy + pre-submit strength check. */
|
|
29054
|
+
utility;
|
|
28874
29055
|
domains;
|
|
28875
29056
|
/** Inbound (received) email — read access. Requires the `email:read` scope. */
|
|
28876
29057
|
inbound;
|
|
@@ -28898,6 +29079,7 @@ var Zyphr = class {
|
|
|
28898
29079
|
this.webhooks = new WebhooksApi(config);
|
|
28899
29080
|
this.topics = new TopicsApi(config);
|
|
28900
29081
|
this.devices = new DevicesApi(config);
|
|
29082
|
+
this.utility = new UtilityApi(config);
|
|
28901
29083
|
this.domains = new DomainsApi(config);
|
|
28902
29084
|
this.inbound = new InboundEmailApi(config);
|
|
28903
29085
|
this.waas = {
|
|
@@ -28984,6 +29166,12 @@ var ZyphrClient = class {
|
|
|
28984
29166
|
auth;
|
|
28985
29167
|
/** Device registration for push (takes an OS-acquired token). */
|
|
28986
29168
|
devices;
|
|
29169
|
+
/**
|
|
29170
|
+
* Utility endpoints that are publishable-key-safe: the application's password
|
|
29171
|
+
* policy (`getPasswordRequirements`) and a pre-submit password strength check
|
|
29172
|
+
* (`checkPasswordStrength`). Useful for building a live registration UX.
|
|
29173
|
+
*/
|
|
29174
|
+
utility;
|
|
28987
29175
|
applicationKey;
|
|
28988
29176
|
accessToken;
|
|
28989
29177
|
constructor(options) {
|
|
@@ -29034,6 +29222,7 @@ var ZyphrClient = class {
|
|
|
29034
29222
|
webauthn: new AuthWebAuthnApi(config)
|
|
29035
29223
|
};
|
|
29036
29224
|
this.devices = new DevicesApi(config);
|
|
29225
|
+
this.utility = new UtilityApi(config);
|
|
29037
29226
|
}
|
|
29038
29227
|
/** Store the end-user access token; it is applied automatically to subsequent user-scoped calls. */
|
|
29039
29228
|
setAccessToken(accessToken) {
|
|
@@ -29117,6 +29306,7 @@ var SDK_VERSION = "0.1.0";
|
|
|
29117
29306
|
ApiErrorMetaToJSONTyped,
|
|
29118
29307
|
ApiErrorToJSON,
|
|
29119
29308
|
ApiErrorToJSONTyped,
|
|
29309
|
+
ApplicationSelfAuthEmailModeEnum,
|
|
29120
29310
|
ApplicationSelfEnvironmentEnum,
|
|
29121
29311
|
ApplicationSelfFromJSON,
|
|
29122
29312
|
ApplicationSelfFromJSONTyped,
|
|
@@ -30069,8 +30259,10 @@ var SDK_VERSION = "0.1.0";
|
|
|
30069
30259
|
PaginationMetaFromJSONTyped,
|
|
30070
30260
|
PaginationMetaToJSON,
|
|
30071
30261
|
PaginationMetaToJSONTyped,
|
|
30072
|
-
|
|
30073
|
-
|
|
30262
|
+
PasswordPolicyFromJSON,
|
|
30263
|
+
PasswordPolicyFromJSONTyped,
|
|
30264
|
+
PasswordPolicyToJSON,
|
|
30265
|
+
PasswordPolicyToJSONTyped,
|
|
30074
30266
|
PasswordRequirementsResponseDataFromJSON,
|
|
30075
30267
|
PasswordRequirementsResponseDataFromJSONTyped,
|
|
30076
30268
|
PasswordRequirementsResponseDataToJSON,
|
|
@@ -30079,8 +30271,19 @@ var SDK_VERSION = "0.1.0";
|
|
|
30079
30271
|
PasswordRequirementsResponseFromJSONTyped,
|
|
30080
30272
|
PasswordRequirementsResponseToJSON,
|
|
30081
30273
|
PasswordRequirementsResponseToJSONTyped,
|
|
30082
|
-
|
|
30083
|
-
|
|
30274
|
+
PasswordStrengthFromJSON,
|
|
30275
|
+
PasswordStrengthFromJSONTyped,
|
|
30276
|
+
PasswordStrengthLabelEnum,
|
|
30277
|
+
PasswordStrengthRequestFromJSON,
|
|
30278
|
+
PasswordStrengthRequestFromJSONTyped,
|
|
30279
|
+
PasswordStrengthRequestToJSON,
|
|
30280
|
+
PasswordStrengthRequestToJSONTyped,
|
|
30281
|
+
PasswordStrengthResponseFromJSON,
|
|
30282
|
+
PasswordStrengthResponseFromJSONTyped,
|
|
30283
|
+
PasswordStrengthResponseToJSON,
|
|
30284
|
+
PasswordStrengthResponseToJSONTyped,
|
|
30285
|
+
PasswordStrengthToJSON,
|
|
30286
|
+
PasswordStrengthToJSONTyped,
|
|
30084
30287
|
PayloadTooLargeErrorErrorCodeEnum,
|
|
30085
30288
|
PayloadTooLargeErrorErrorDetailsFromJSON,
|
|
30086
30289
|
PayloadTooLargeErrorErrorDetailsFromJSONTyped,
|
|
@@ -30480,6 +30683,7 @@ var SDK_VERSION = "0.1.0";
|
|
|
30480
30683
|
SetPreferencesRequestPreferencesInnerToJSONTyped,
|
|
30481
30684
|
SetPreferencesRequestToJSON,
|
|
30482
30685
|
SetPreferencesRequestToJSONTyped,
|
|
30686
|
+
SetSelfApplicationTestRecipientsRequestAuthEmailModeEnum,
|
|
30483
30687
|
SetSelfApplicationTestRecipientsRequestFromJSON,
|
|
30484
30688
|
SetSelfApplicationTestRecipientsRequestFromJSONTyped,
|
|
30485
30689
|
SetSelfApplicationTestRecipientsRequestToJSON,
|
|
@@ -31445,9 +31649,12 @@ var SDK_VERSION = "0.1.0";
|
|
|
31445
31649
|
instanceOfOrganizationMembershipWithUser,
|
|
31446
31650
|
instanceOfOrganizationResponse,
|
|
31447
31651
|
instanceOfPaginationMeta,
|
|
31448
|
-
|
|
31652
|
+
instanceOfPasswordPolicy,
|
|
31449
31653
|
instanceOfPasswordRequirementsResponse,
|
|
31450
31654
|
instanceOfPasswordRequirementsResponseData,
|
|
31655
|
+
instanceOfPasswordStrength,
|
|
31656
|
+
instanceOfPasswordStrengthRequest,
|
|
31657
|
+
instanceOfPasswordStrengthResponse,
|
|
31451
31658
|
instanceOfPayloadTooLargeError,
|
|
31452
31659
|
instanceOfPayloadTooLargeErrorError,
|
|
31453
31660
|
instanceOfPayloadTooLargeErrorErrorDetails,
|