@parra/parra-js-sdk 0.3.148 → 0.3.150
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/ParraAPI.d.ts +86 -12
- package/dist/ParraAPI.js +11 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -177,21 +177,36 @@ export interface PasswordRule {
|
|
|
177
177
|
regular_expression?: string;
|
|
178
178
|
error_message?: string;
|
|
179
179
|
}
|
|
180
|
-
export interface
|
|
180
|
+
export interface AppInfoPasswordConfig {
|
|
181
181
|
ios_password_rules_descriptor?: string | null;
|
|
182
182
|
rules: Array<PasswordRule>;
|
|
183
183
|
}
|
|
184
|
-
export interface
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
export interface AppInfoUsernameConfig {
|
|
185
|
+
required: boolean;
|
|
186
|
+
allow_signup: boolean;
|
|
187
187
|
}
|
|
188
|
-
export interface
|
|
188
|
+
export interface AppInfoEmailConfig {
|
|
189
|
+
required: boolean;
|
|
190
|
+
require_verification: boolean;
|
|
191
|
+
allow_signup: boolean;
|
|
189
192
|
}
|
|
190
|
-
export interface
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
export interface AppInfoPhoneNumberConfig {
|
|
194
|
+
required: boolean;
|
|
195
|
+
require_verification: boolean;
|
|
196
|
+
allow_signup: boolean;
|
|
197
|
+
}
|
|
198
|
+
export interface AppInfoPasskeysConfig {
|
|
199
|
+
challenge_allow_autofill: boolean;
|
|
200
|
+
challenge_allow_button: boolean;
|
|
201
|
+
allow_progressive_enrollment: boolean;
|
|
202
|
+
allow_local_enrollment: boolean;
|
|
203
|
+
}
|
|
204
|
+
export interface AppInfoAuthDatabaseConnection {
|
|
205
|
+
password?: AppInfoPasswordConfig | null;
|
|
206
|
+
username?: AppInfoUsernameConfig | null;
|
|
207
|
+
email?: AppInfoEmailConfig | null;
|
|
208
|
+
phone_number?: AppInfoPhoneNumberConfig | null;
|
|
209
|
+
passkeys?: AppInfoPasskeysConfig | null;
|
|
195
210
|
}
|
|
196
211
|
export interface AuthInfoPasswordlessSmsConfig {
|
|
197
212
|
otp_length: number;
|
|
@@ -200,7 +215,7 @@ export interface AuthInfoPasswordlessConfig {
|
|
|
200
215
|
sms?: AuthInfoPasswordlessSmsConfig | null;
|
|
201
216
|
}
|
|
202
217
|
export interface AppAuthInfo {
|
|
203
|
-
database?:
|
|
218
|
+
database?: AppInfoAuthDatabaseConnection | null;
|
|
204
219
|
passwordless?: AuthInfoPasswordlessConfig | null;
|
|
205
220
|
}
|
|
206
221
|
export declare enum PolicyDocumentType {
|
|
@@ -1492,6 +1507,62 @@ export interface TenantUserInfo {
|
|
|
1492
1507
|
roles: Array<string>;
|
|
1493
1508
|
user: TenantUser;
|
|
1494
1509
|
}
|
|
1510
|
+
export interface PasswordConfig {
|
|
1511
|
+
disabled: boolean;
|
|
1512
|
+
ios_password_rules_descriptor?: string | null;
|
|
1513
|
+
rules: Array<PasswordRule>;
|
|
1514
|
+
}
|
|
1515
|
+
export interface UsernameConfig {
|
|
1516
|
+
disabled: boolean;
|
|
1517
|
+
required: boolean;
|
|
1518
|
+
allow_signup: boolean;
|
|
1519
|
+
}
|
|
1520
|
+
export interface EmailConfig {
|
|
1521
|
+
disabled: boolean;
|
|
1522
|
+
required: boolean;
|
|
1523
|
+
require_verification: boolean;
|
|
1524
|
+
allow_signup: boolean;
|
|
1525
|
+
}
|
|
1526
|
+
export interface PhoneNumberConfig {
|
|
1527
|
+
disabled: boolean;
|
|
1528
|
+
required: boolean;
|
|
1529
|
+
require_verification: boolean;
|
|
1530
|
+
allow_signup: boolean;
|
|
1531
|
+
}
|
|
1532
|
+
export interface PasskeysConfig {
|
|
1533
|
+
disabled: boolean;
|
|
1534
|
+
challenge_allow_autofill: boolean;
|
|
1535
|
+
challenge_allow_button: boolean;
|
|
1536
|
+
allow_progressive_enrollment: boolean;
|
|
1537
|
+
allow_local_enrollment: boolean;
|
|
1538
|
+
}
|
|
1539
|
+
export interface AuthDatabaseConnection {
|
|
1540
|
+
password?: PasswordConfig;
|
|
1541
|
+
username?: UsernameConfig;
|
|
1542
|
+
email?: EmailConfig;
|
|
1543
|
+
phone_number?: PhoneNumberConfig;
|
|
1544
|
+
passkeys?: PasskeysConfig;
|
|
1545
|
+
}
|
|
1546
|
+
export interface UpdateAuthDatabaseConnection {
|
|
1547
|
+
disabled?: boolean;
|
|
1548
|
+
password_disabled?: boolean;
|
|
1549
|
+
email_disabled?: boolean;
|
|
1550
|
+
email_required?: boolean;
|
|
1551
|
+
email_require_verification?: boolean;
|
|
1552
|
+
email_allow_signup?: boolean;
|
|
1553
|
+
phone_number_disabled?: boolean;
|
|
1554
|
+
phone_number_required?: boolean;
|
|
1555
|
+
phone_number_require_verification?: boolean;
|
|
1556
|
+
phone_number_allow_signup?: boolean;
|
|
1557
|
+
username_disabled?: boolean;
|
|
1558
|
+
username_required?: boolean;
|
|
1559
|
+
username_allow_signup?: boolean;
|
|
1560
|
+
passkeys_disabled?: boolean;
|
|
1561
|
+
passkeys_challenge_allow_autofill?: boolean;
|
|
1562
|
+
passkeys_challenge_allow_button?: boolean;
|
|
1563
|
+
passkeys_allow_progressive_enrollment?: boolean;
|
|
1564
|
+
passkeys_allow_local_enrollment?: boolean;
|
|
1565
|
+
}
|
|
1495
1566
|
export interface PasswordlessSmsConnectionData {
|
|
1496
1567
|
connected_app_connection_id: string;
|
|
1497
1568
|
otp_length: number;
|
|
@@ -1541,7 +1612,8 @@ export declare enum GrantType {
|
|
|
1541
1612
|
implicit = "implicit",
|
|
1542
1613
|
password = "password",
|
|
1543
1614
|
refreshToken = "refresh_token",
|
|
1544
|
-
passwordlessOtp = "passwordless_otp"
|
|
1615
|
+
passwordlessOtp = "passwordless_otp",
|
|
1616
|
+
webauthnToken = "webauthn_token"
|
|
1545
1617
|
}
|
|
1546
1618
|
export interface Grant {
|
|
1547
1619
|
id: GrantType;
|
|
@@ -2366,6 +2438,8 @@ declare class ParraAPI {
|
|
|
2366
2438
|
loginUserForTenant: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
|
|
2367
2439
|
getTenantUserInfo: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
|
|
2368
2440
|
logoutUserForTenant: (tenant_id: string, options?: Options) => Promise<Response>;
|
|
2441
|
+
getAuthDatabaseConnectionForTenant: (tenant_id: string, options?: Options) => Promise<AuthDatabaseConnection>;
|
|
2442
|
+
updateAuthDatabaseConnectionForTenant: (tenant_id: string, body?: UpdateAuthDatabaseConnection, options?: Options) => Promise<AuthDatabaseConnection>;
|
|
2369
2443
|
createPasswordlessSmsConnectionForTenant: (tenant_id: string, body: CreatePasswordlessSmsConnectionBody, options?: Options) => Promise<PasswordlessConnection>;
|
|
2370
2444
|
listPasswordlessConnectionsForTenant: (tenant_id: string, options?: Options) => Promise<Array<PasswordlessConnection>>;
|
|
2371
2445
|
updatePasswordlessConnectionForTenant: (tenant_id: string, passwordless_connection_id: string, body?: UpdatePasswordlessConnectionBody, options?: Options) => Promise<PasswordlessConnection>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -201,6 +201,7 @@ var GrantType;
|
|
|
201
201
|
GrantType["password"] = "password";
|
|
202
202
|
GrantType["refreshToken"] = "refresh_token";
|
|
203
203
|
GrantType["passwordlessOtp"] = "passwordless_otp";
|
|
204
|
+
GrantType["webauthnToken"] = "webauthn_token";
|
|
204
205
|
})(GrantType || (exports.GrantType = GrantType = {}));
|
|
205
206
|
var JwtAlgorithm;
|
|
206
207
|
(function (JwtAlgorithm) {
|
|
@@ -791,6 +792,16 @@ var ParraAPI = /** @class */ (function () {
|
|
|
791
792
|
if (options === void 0) { options = {}; }
|
|
792
793
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/logout"), __assign({ method: "post" }, options));
|
|
793
794
|
};
|
|
795
|
+
this.getAuthDatabaseConnectionForTenant = function (tenant_id, options) {
|
|
796
|
+
if (options === void 0) { options = {}; }
|
|
797
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/database/connection"), __assign({ method: "get" }, options));
|
|
798
|
+
};
|
|
799
|
+
this.updateAuthDatabaseConnectionForTenant = function (tenant_id, body, options) {
|
|
800
|
+
if (options === void 0) { options = {}; }
|
|
801
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/database/connection"), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
802
|
+
"content-type": "application/json",
|
|
803
|
+
} }, options));
|
|
804
|
+
};
|
|
794
805
|
this.createPasswordlessSmsConnectionForTenant = function (tenant_id, body, options) {
|
|
795
806
|
if (options === void 0) { options = {}; }
|
|
796
807
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/passwordless/connections/sms"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|