@parra/parra-js-sdk 0.2.138 → 0.2.139

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.
@@ -203,6 +203,37 @@ export interface UpdateTenantMetricsRequestBody {
203
203
  team_member_pending_invitation_count?: number;
204
204
  user_count?: number;
205
205
  }
206
+ export interface CreateTenantUserRequestBody {
207
+ identity: string;
208
+ name?: string | null;
209
+ properties?: Map<string, any> | null;
210
+ }
211
+ export interface TenantUserStub {
212
+ id: string;
213
+ created_at: string;
214
+ updated_at: string;
215
+ deleted_at?: string | null;
216
+ tenant_id: string;
217
+ identity: string;
218
+ name?: string | null;
219
+ }
220
+ export interface TenantUser {
221
+ id: string;
222
+ created_at: string;
223
+ updated_at: string;
224
+ deleted_at?: string | null;
225
+ tenant_id: string;
226
+ identity: string;
227
+ name?: string | null;
228
+ properties: Map<string, any>;
229
+ }
230
+ export interface TenantUserCollectionResponse {
231
+ page: number;
232
+ page_count: number;
233
+ page_size: number;
234
+ total_count: number;
235
+ data: Array<TenantUserStub>;
236
+ }
206
237
  export interface CreateApiKeyRequestBody {
207
238
  name: string;
208
239
  description?: string | null;
@@ -912,32 +943,6 @@ export interface TemplateTagCollectionResponse {
912
943
  data: Array<TemplateTag>;
913
944
  metadata?: TemplateTagCollectionMetadata;
914
945
  }
915
- export interface TenantUserStub {
916
- id: string;
917
- created_at: string;
918
- updated_at: string;
919
- deleted_at?: string | null;
920
- identity: string;
921
- tenant_id: string;
922
- name?: string | null;
923
- }
924
- export interface TenantUser {
925
- id: string;
926
- created_at: string;
927
- updated_at: string;
928
- deleted_at?: string | null;
929
- identity: string;
930
- tenant_id: string;
931
- name?: string | null;
932
- properties: Map<string, any>;
933
- }
934
- export interface TenantUserCollectionResponse {
935
- page: number;
936
- page_count: number;
937
- page_size: number;
938
- total_count: number;
939
- data: Array<TenantUserStub>;
940
- }
941
946
  export interface UpdateApplicationRequestBody {
942
947
  name: string;
943
948
  description?: string | null;
@@ -993,6 +998,15 @@ export interface ApnsConfiguration {
993
998
  key_id: string;
994
999
  key: string;
995
1000
  }
1001
+ export interface CreateDeviceRequestBody {
1002
+ platform: string;
1003
+ platform_agent: string;
1004
+ device_id?: string | null;
1005
+ bundle_id?: string | null;
1006
+ ad_id?: string | null;
1007
+ manufacturer?: string | null;
1008
+ model?: string | null;
1009
+ }
996
1010
  export interface NotificationRecipient {
997
1011
  user_id?: string | null;
998
1012
  }
@@ -1045,8 +1059,10 @@ export interface ReadNotificationsRequestBody {
1045
1059
  notification_ids: Array<string>;
1046
1060
  }
1047
1061
  export interface CreatePushTokenRequestBody {
1048
- user_id?: string;
1049
- apns_token: string;
1062
+ application_id: string;
1063
+ type: string;
1064
+ token: string;
1065
+ device: CreateDeviceRequestBody;
1050
1066
  }
1051
1067
  export interface UserResponse {
1052
1068
  id: string;
@@ -1104,7 +1120,9 @@ export interface CheckAuthorization {
1104
1120
  allowed: boolean;
1105
1121
  }
1106
1122
  export interface UserInfoResponse {
1123
+ roles?: Array<string>;
1107
1124
  user?: UserResponse | null;
1125
+ tenant_user?: TenantUser | null;
1108
1126
  }
1109
1127
  declare class ParraAPI {
1110
1128
  private http;
@@ -1126,6 +1144,15 @@ declare class ParraAPI {
1126
1144
  } | undefined) => Promise<Tenant>;
1127
1145
  updateTenantById: (tenant_id: string, body?: UpdateTenantRequestBody | undefined) => Promise<Tenant>;
1128
1146
  deleteTenantById: (tenant_id: string) => Promise<Response>;
1147
+ paginateTenantUsersForTenantById: (tenant_id: string, query?: {
1148
+ $select?: string | undefined;
1149
+ $top?: number | undefined;
1150
+ $skip?: number | undefined;
1151
+ $orderby?: string | undefined;
1152
+ $filter?: string | undefined;
1153
+ $expand?: string | undefined;
1154
+ $search?: string | undefined;
1155
+ } | undefined) => Promise<TenantUserCollectionResponse>;
1129
1156
  createTenantForUserById: (user_id: string, body?: CreateTenantForUserRequestBody | undefined) => Promise<Tenant>;
1130
1157
  getTenantsForUserById: (user_id: string) => Promise<TenantListResponse>;
1131
1158
  createApiKeyForTenantById: (tenant_id: string, body?: CreateApiKeyRequestBody | undefined) => Promise<ApiKeyWithSecretResponse>;
@@ -1246,15 +1273,6 @@ declare class ParraAPI {
1246
1273
  $expand?: string | undefined;
1247
1274
  $search?: string | undefined;
1248
1275
  } | undefined) => Promise<TemplateCollectionResponse>;
1249
- paginateTenantUsersForTenantById: (tenant_id: string, query?: {
1250
- $select?: string | undefined;
1251
- $top?: number | undefined;
1252
- $skip?: number | undefined;
1253
- $orderby?: string | undefined;
1254
- $filter?: string | undefined;
1255
- $expand?: string | undefined;
1256
- $search?: string | undefined;
1257
- } | undefined) => Promise<TenantUserCollectionResponse>;
1258
1276
  createApplicationForTenantById: (tenant_id: string, body?: CreateApplicationRequestBody | undefined) => Promise<Application>;
1259
1277
  paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
1260
1278
  getApplicationByIdForTenantById: (tenant_id: string, application_id: string, query?: {
package/dist/ParraAPI.js CHANGED
@@ -182,6 +182,12 @@ var ParraAPI = /** @class */ (function () {
182
182
  method: "delete",
183
183
  });
184
184
  };
185
+ this.paginateTenantUsersForTenantById = function (tenant_id, query) {
186
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users"), {
187
+ method: "get",
188
+ query: query,
189
+ });
190
+ };
185
191
  this.createTenantForUserById = function (user_id, body) {
186
192
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/users/").concat(user_id, "/tenants"), {
187
193
  method: "post",
@@ -518,12 +524,6 @@ var ParraAPI = /** @class */ (function () {
518
524
  query: query,
519
525
  });
520
526
  };
521
- this.paginateTenantUsersForTenantById = function (tenant_id, query) {
522
- return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users"), {
523
- method: "get",
524
- query: query,
525
- });
526
- };
527
527
  this.createApplicationForTenantById = function (tenant_id, body) {
528
528
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
529
529
  method: "post",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.138",
3
+ "version": "0.2.139",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",