@parra/parra-js-sdk 0.3.115 → 0.3.117

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.
@@ -39,12 +39,18 @@ export interface UserResponse {
39
39
  role_other_description?: string | null;
40
40
  avatar?: ImageAssetStub;
41
41
  }
42
+ export declare enum IdentityType {
43
+ username = "username",
44
+ email = "email",
45
+ phoneNumber = "phone_number",
46
+ externalId = "external_id"
47
+ }
42
48
  export interface Identity {
43
49
  id: string;
44
50
  created_at: string;
45
51
  updated_at: string;
46
52
  deleted_at?: string | null;
47
- type: string;
53
+ type: IdentityType;
48
54
  provider?: string | null;
49
55
  provider_user_id?: string | null;
50
56
  email?: string | null;
@@ -1778,6 +1784,20 @@ export interface UpdateTenantUserRequestBody {
1778
1784
  name?: string | null;
1779
1785
  properties?: object | null;
1780
1786
  }
1787
+ export interface CreateTenantUserRequestBody {
1788
+ identity?: string | null;
1789
+ name?: string | null;
1790
+ password?: string | null;
1791
+ properties?: object | null;
1792
+ username?: string | null;
1793
+ email?: string | null;
1794
+ email_verified?: boolean | null;
1795
+ phone_number?: string | null;
1796
+ phone_number_verified?: boolean | null;
1797
+ first_name?: string | null;
1798
+ last_name?: string | null;
1799
+ locale?: string | null;
1800
+ }
1781
1801
  export interface TenantUserCollectionResponse {
1782
1802
  page: number;
1783
1803
  page_count: number;
@@ -2094,6 +2114,7 @@ declare class ParraAPI {
2094
2114
  }) => Promise<TenantUser>;
2095
2115
  updateUserForTenantById: (tenant_id: string, user_id: string, body?: UpdateTenantUserRequestBody) => Promise<TenantUser>;
2096
2116
  deleteUserForTenantById: (tenant_id: string, user_id: string) => Promise<Response>;
2117
+ createUserForTenantById: (tenant_id: string, body?: CreateTenantUserRequestBody) => Promise<TenantUser>;
2097
2118
  paginateTenantUsersForTenantById: (tenant_id: string, query?: {
2098
2119
  $select?: string;
2099
2120
  $top?: number;
package/dist/ParraAPI.js CHANGED
@@ -1,6 +1,13 @@
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 = void 0;
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;
4
+ var IdentityType;
5
+ (function (IdentityType) {
6
+ IdentityType["username"] = "username";
7
+ IdentityType["email"] = "email";
8
+ IdentityType["phoneNumber"] = "phone_number";
9
+ IdentityType["externalId"] = "external_id";
10
+ })(IdentityType || (exports.IdentityType = IdentityType = {}));
4
11
  var Interval;
5
12
  (function (Interval) {
6
13
  Interval["monthly"] = "monthly";
@@ -922,7 +929,7 @@ var ParraAPI = /** @class */ (function () {
922
929
  };
923
930
  this.getTenantUserInfo = function (tenant_id) {
924
931
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/user-info"), {
925
- method: "post",
932
+ method: "get",
926
933
  });
927
934
  };
928
935
  this.logoutUserForTenant = function (tenant_id) {
@@ -1128,6 +1135,15 @@ var ParraAPI = /** @class */ (function () {
1128
1135
  method: "delete",
1129
1136
  });
1130
1137
  };
1138
+ this.createUserForTenantById = function (tenant_id, body) {
1139
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users"), {
1140
+ method: "post",
1141
+ body: JSON.stringify(body),
1142
+ headers: {
1143
+ "content-type": "application/json",
1144
+ },
1145
+ });
1146
+ };
1131
1147
  this.paginateTenantUsersForTenantById = function (tenant_id, query) {
1132
1148
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users"), {
1133
1149
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.115",
3
+ "version": "0.3.117",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",