@parra/parra-js-sdk 0.3.219 → 0.3.221

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.
@@ -287,12 +287,15 @@ export interface AppInfoPasskeysConfig {
287
287
  allow_progressive_enrollment: boolean;
288
288
  allow_local_enrollment: boolean;
289
289
  }
290
+ export interface AppInfoAnonymousAuthConfig {
291
+ }
290
292
  export interface AppInfoAuthDatabaseConnection {
291
293
  password?: AppInfoPasswordConfig | null;
292
294
  username?: AppInfoUsernameConfig | null;
293
295
  email?: AppInfoEmailConfig | null;
294
296
  phone_number?: AppInfoPhoneNumberConfig | null;
295
297
  passkeys?: AppInfoPasskeysConfig | null;
298
+ anonymous_auth?: AppInfoAnonymousAuthConfig | null;
296
299
  }
297
300
  export interface AuthInfoPasswordlessSmsConfig {
298
301
  otp_length: number;
@@ -342,6 +345,7 @@ export interface UserResponse {
342
345
  avatar?: ImageAssetStub;
343
346
  }
344
347
  export declare enum IdentityType {
348
+ anonymous = "anonymous",
345
349
  username = "username",
346
350
  email = "email",
347
351
  phoneNumber = "phone_number",
@@ -388,6 +392,12 @@ export interface TenantUserCollectionStub {
388
392
  phone_number_verified?: boolean | null;
389
393
  first_name?: string | null;
390
394
  last_name?: string | null;
395
+ is_anonymous: boolean;
396
+ is_internal: boolean;
397
+ is_test: boolean;
398
+ is_blocked?: boolean;
399
+ blocked_at?: string | null;
400
+ blocked_reason?: string | null;
391
401
  locale?: string | null;
392
402
  signed_up_at?: string | null;
393
403
  last_updated_at?: string | null;
@@ -410,6 +420,12 @@ export interface TenantUserDataStub {
410
420
  phone_number_verified?: boolean | null;
411
421
  first_name?: string | null;
412
422
  last_name?: string | null;
423
+ is_anonymous: boolean;
424
+ is_internal: boolean;
425
+ is_test: boolean;
426
+ is_blocked?: boolean;
427
+ blocked_at?: string | null;
428
+ blocked_reason?: string | null;
413
429
  locale?: string | null;
414
430
  signed_up_at?: string | null;
415
431
  last_updated_at?: string | null;
@@ -432,6 +448,12 @@ export interface TenantUser {
432
448
  phone_number_verified?: boolean | null;
433
449
  first_name?: string | null;
434
450
  last_name?: string | null;
451
+ is_anonymous: boolean;
452
+ is_internal: boolean;
453
+ is_test: boolean;
454
+ is_blocked?: boolean;
455
+ blocked_at?: string | null;
456
+ blocked_reason?: string | null;
435
457
  locale?: string | null;
436
458
  signed_up_at?: string | null;
437
459
  last_updated_at?: string | null;
@@ -1613,8 +1635,12 @@ export interface SubdomainAvailabilityResponse {
1613
1635
  valid: boolean;
1614
1636
  message?: string | null;
1615
1637
  }
1638
+ export interface LoginTenantUserRequestBody {
1639
+ anonymous_token?: string | null;
1640
+ }
1616
1641
  export interface TenantUserInfo {
1617
1642
  roles: Array<string>;
1643
+ scopes: Array<string>;
1618
1644
  user: TenantUser;
1619
1645
  }
1620
1646
  export interface AccountConfig {
@@ -1658,6 +1684,9 @@ export interface PasskeysConfig {
1658
1684
  allow_progressive_enrollment: boolean;
1659
1685
  allow_local_enrollment: boolean;
1660
1686
  }
1687
+ export interface AnonymousAuthConfig {
1688
+ disabled: boolean;
1689
+ }
1661
1690
  export interface AuthDatabaseConnection {
1662
1691
  account: AccountConfig;
1663
1692
  password: PasswordConfig;
@@ -1665,6 +1694,7 @@ export interface AuthDatabaseConnection {
1665
1694
  email: EmailConfig;
1666
1695
  phone_number: PhoneNumberConfig;
1667
1696
  passkeys: PasskeysConfig;
1697
+ anonymous_auth: AnonymousAuthConfig;
1668
1698
  }
1669
1699
  export interface UpdateAuthDatabaseConnection {
1670
1700
  disabled?: boolean;
@@ -1690,6 +1720,7 @@ export interface UpdateAuthDatabaseConnection {
1690
1720
  username_disabled?: boolean;
1691
1721
  username_required?: boolean;
1692
1722
  username_allow_signup?: boolean;
1723
+ anonymous_auth_disabled?: boolean;
1693
1724
  passkeys_disabled?: boolean;
1694
1725
  passkeys_challenge_allow_autofill?: boolean;
1695
1726
  passkeys_challenge_allow_button?: boolean;
@@ -2944,7 +2975,7 @@ declare class ParraAPI {
2944
2975
  deleteExternalDomainByIdForTenantById: (tenant_id: string, external_domain_id: string, options?: Options) => Promise<Response>;
2945
2976
  checkExternalDomainByIdForTenantById: (tenant_id: string, external_domain_id: string, options?: Options) => Promise<ExternalDomain>;
2946
2977
  checkSubdomainAvailability: (body: SubdomainAvailabilityRequestBody, options?: Options) => Promise<SubdomainAvailabilityResponse>;
2947
- loginUserForTenant: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
2978
+ loginUserForTenant: (tenant_id: string, body?: LoginTenantUserRequestBody, options?: Options) => Promise<TenantUserInfo>;
2948
2979
  getTenantUserInfo: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
2949
2980
  logoutUserForTenant: (tenant_id: string, options?: Options) => Promise<Response>;
2950
2981
  getAuthDatabaseConnectionForTenant: (tenant_id: string, options?: Options) => Promise<AuthDatabaseConnection>;
package/dist/ParraAPI.js CHANGED
@@ -79,6 +79,7 @@ var PolicyDocumentType;
79
79
  })(PolicyDocumentType || (exports.PolicyDocumentType = PolicyDocumentType = {}));
80
80
  var IdentityType;
81
81
  (function (IdentityType) {
82
+ IdentityType["anonymous"] = "anonymous";
82
83
  IdentityType["username"] = "username";
83
84
  IdentityType["email"] = "email";
84
85
  IdentityType["phoneNumber"] = "phone_number";
@@ -846,9 +847,11 @@ var ParraAPI = /** @class */ (function () {
846
847
  "content-type": "application/json",
847
848
  } }, options));
848
849
  };
849
- this.loginUserForTenant = function (tenant_id, options) {
850
+ this.loginUserForTenant = function (tenant_id, body, options) {
850
851
  if (options === void 0) { options = {}; }
851
- return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/login"), __assign({ method: "post" }, options));
852
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/login"), __assign({ method: "post", body: JSON.stringify(body), headers: {
853
+ "content-type": "application/json",
854
+ } }, options));
852
855
  };
853
856
  this.getTenantUserInfo = function (tenant_id, options) {
854
857
  if (options === void 0) { options = {}; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.219",
3
+ "version": "0.3.221",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",