@parra/parra-js-sdk 0.3.118 → 0.3.120

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.
@@ -78,6 +78,29 @@ export interface TenantUserCollectionStub {
78
78
  name?: string | null;
79
79
  avatar?: ImageAssetStub;
80
80
  identity?: string | null;
81
+ username?: string | null;
82
+ email?: string | null;
83
+ email_verified?: boolean | null;
84
+ phone_number?: string | null;
85
+ phone_number_verified?: boolean | null;
86
+ first_name?: string | null;
87
+ last_name?: string | null;
88
+ locale?: string | null;
89
+ signed_up_at?: string | null;
90
+ last_updated_at?: string | null;
91
+ last_seen_at?: string | null;
92
+ last_login_at?: string | null;
93
+ }
94
+ export interface TenantUserDataStub {
95
+ id: string;
96
+ created_at: string;
97
+ updated_at: string;
98
+ deleted_at?: string | null;
99
+ tenant_id: string;
100
+ name?: string | null;
101
+ avatar?: ImageAssetStub;
102
+ identity?: string | null;
103
+ username?: string | null;
81
104
  email?: string | null;
82
105
  email_verified?: boolean | null;
83
106
  phone_number?: string | null;
@@ -99,6 +122,7 @@ export interface TenantUser {
99
122
  name?: string | null;
100
123
  avatar?: ImageAssetStub;
101
124
  identity?: string | null;
125
+ username?: string | null;
102
126
  email?: string | null;
103
127
  email_verified?: boolean | null;
104
128
  phone_number?: string | null;
@@ -1408,6 +1432,15 @@ export interface UpdateChannelRequestBody {
1408
1432
  apns?: UpdateApnsChannelRequestBody;
1409
1433
  inbox?: UpdateInboxChannelRequestBody;
1410
1434
  }
1435
+ export interface SubdomainAvailabilityRequestBody {
1436
+ subdomain: string;
1437
+ }
1438
+ export interface SubdomainAvailabilityResponse {
1439
+ subdomain?: string | null;
1440
+ available: boolean;
1441
+ valid: boolean;
1442
+ message?: string | null;
1443
+ }
1411
1444
  export interface TenantUserInfo {
1412
1445
  roles: Array<string>;
1413
1446
  user: TenantUser;
@@ -1436,9 +1469,17 @@ export interface JwtConfiguration {
1436
1469
  lifetime_in_seconds: number;
1437
1470
  secret_encoded: boolean;
1438
1471
  }
1472
+ export declare enum RefreshTokenExpirationType {
1473
+ expiring = "expiring",
1474
+ infinite = "infinite"
1475
+ }
1476
+ export declare enum RefreshTokenRotationType {
1477
+ none = "none",
1478
+ rotating = "rotating"
1479
+ }
1439
1480
  export interface RefreshTokenConfiguration {
1440
- expiration_type: string;
1441
- rotation_type: string;
1481
+ expiration_type: RefreshTokenExpirationType;
1482
+ rotation_type: RefreshTokenRotationType;
1442
1483
  idle_token_lifetime: number;
1443
1484
  infinite_idle_token_lifetime: boolean;
1444
1485
  infinite_token_lifetime: boolean;
@@ -1470,13 +1511,13 @@ export interface UpdateClientRequestBody {
1470
1511
  allowed_callbacks?: Array<string>;
1471
1512
  allowed_logout_urls?: Array<string>;
1472
1513
  grants?: Array<GrantType>;
1473
- refresh_token_expiration_type?: string;
1514
+ refresh_token_expiration_type?: RefreshTokenExpirationType;
1474
1515
  refresh_token_idle_token_lifetime?: number;
1475
1516
  refresh_token_infinite_idle_token_lifetime?: boolean;
1476
1517
  refresh_token_infinite_token_lifetime?: boolean;
1477
1518
  refresh_token_leeway?: number;
1478
1519
  refresh_token_token_lifetime?: number;
1479
- refresh_token_rotation_type?: string;
1520
+ refresh_token_rotation_type?: RefreshTokenRotationType;
1480
1521
  jwt_alg?: JwtAlgorithm;
1481
1522
  jwt_lifetime_in_seconds?: number;
1482
1523
  jwt_secret_encoded?: boolean;
@@ -1538,6 +1579,7 @@ export interface TenantMetrics {
1538
1579
  }
1539
1580
  export interface CreateTenantRequestBody {
1540
1581
  name: string;
1582
+ subdomain?: string | null;
1541
1583
  is_test: boolean;
1542
1584
  parent_tenant_id?: string | null;
1543
1585
  }
@@ -1547,6 +1589,7 @@ export interface Tenant {
1547
1589
  updated_at: string;
1548
1590
  deleted_at?: string | null;
1549
1591
  name: string;
1592
+ subdomain?: string | null;
1550
1593
  is_test: boolean;
1551
1594
  parent_tenant_id?: string | null;
1552
1595
  onboarding?: TenantOnboarding | null;
@@ -1809,6 +1852,7 @@ export interface TenantUserCollectionResponse {
1809
1852
  }
1810
1853
  export interface UpdateTenantRequestBody {
1811
1854
  name?: string;
1855
+ subdomain?: string | null;
1812
1856
  onboarding_skipped?: boolean;
1813
1857
  onboarding_goal?: string | null;
1814
1858
  application_onboarding_skipped?: boolean;
@@ -2067,6 +2111,7 @@ declare class ParraAPI {
2067
2111
  createChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, body: CreateChannelRequestBody) => Promise<Channel>;
2068
2112
  updateChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, body: UpdateChannelRequestBody) => Promise<Channel>;
2069
2113
  deleteChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string) => Promise<Response>;
2114
+ checkSubdomainAvailability: (body: SubdomainAvailabilityRequestBody) => Promise<SubdomainAvailabilityResponse>;
2070
2115
  loginUserForTenant: (tenant_id: string) => Promise<TenantUserInfo>;
2071
2116
  getTenantUserInfo: (tenant_id: string) => Promise<TenantUserInfo>;
2072
2117
  logoutUserForTenant: (tenant_id: string) => Promise<Response>;
package/dist/ParraAPI.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.ApplicationType = exports.JwtAlgorithm = exports.GrantType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.FeedbackFormFieldType = exports.SubscriptionStatus = exports.Currency = exports.Interval = exports.IdentityType = void 0;
3
+ exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.ApplicationType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.FeedbackFormFieldType = exports.SubscriptionStatus = exports.Currency = exports.Interval = exports.IdentityType = void 0;
4
4
  var IdentityType;
5
5
  (function (IdentityType) {
6
6
  IdentityType["username"] = "username";
@@ -182,6 +182,16 @@ var JwtAlgorithm;
182
182
  (function (JwtAlgorithm) {
183
183
  JwtAlgorithm["rs256"] = "RS256";
184
184
  })(JwtAlgorithm || (exports.JwtAlgorithm = JwtAlgorithm = {}));
185
+ var RefreshTokenExpirationType;
186
+ (function (RefreshTokenExpirationType) {
187
+ RefreshTokenExpirationType["expiring"] = "expiring";
188
+ RefreshTokenExpirationType["infinite"] = "infinite";
189
+ })(RefreshTokenExpirationType || (exports.RefreshTokenExpirationType = RefreshTokenExpirationType = {}));
190
+ var RefreshTokenRotationType;
191
+ (function (RefreshTokenRotationType) {
192
+ RefreshTokenRotationType["none"] = "none";
193
+ RefreshTokenRotationType["rotating"] = "rotating";
194
+ })(RefreshTokenRotationType || (exports.RefreshTokenRotationType = RefreshTokenRotationType = {}));
185
195
  var ApplicationType;
186
196
  (function (ApplicationType) {
187
197
  ApplicationType["ios"] = "ios";
@@ -922,6 +932,15 @@ var ParraAPI = /** @class */ (function () {
922
932
  method: "delete",
923
933
  });
924
934
  };
935
+ this.checkSubdomainAvailability = function (body) {
936
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/subdomains/availability"), {
937
+ method: "post",
938
+ body: JSON.stringify(body),
939
+ headers: {
940
+ "content-type": "application/json",
941
+ },
942
+ });
943
+ };
925
944
  this.loginUserForTenant = function (tenant_id) {
926
945
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/login"), {
927
946
  method: "post",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.118",
3
+ "version": "0.3.120",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",