@parra/parra-js-sdk 0.2.137 → 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.
- package/dist/ParraAPI.d.ts +59 -38
- package/dist/ParraAPI.js +8 -7
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -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;
|
|
@@ -959,6 +964,7 @@ export interface Application {
|
|
|
959
964
|
description?: string | null;
|
|
960
965
|
type: ApplicationType;
|
|
961
966
|
tenant_id: string;
|
|
967
|
+
apns?: ApnsConfiguration | null;
|
|
962
968
|
}
|
|
963
969
|
export interface ApplicationCollectionResponse {
|
|
964
970
|
page: number;
|
|
@@ -992,6 +998,15 @@ export interface ApnsConfiguration {
|
|
|
992
998
|
key_id: string;
|
|
993
999
|
key: string;
|
|
994
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
|
+
}
|
|
995
1010
|
export interface NotificationRecipient {
|
|
996
1011
|
user_id?: string | null;
|
|
997
1012
|
}
|
|
@@ -1044,8 +1059,10 @@ export interface ReadNotificationsRequestBody {
|
|
|
1044
1059
|
notification_ids: Array<string>;
|
|
1045
1060
|
}
|
|
1046
1061
|
export interface CreatePushTokenRequestBody {
|
|
1047
|
-
|
|
1048
|
-
|
|
1062
|
+
application_id: string;
|
|
1063
|
+
type: string;
|
|
1064
|
+
token: string;
|
|
1065
|
+
device: CreateDeviceRequestBody;
|
|
1049
1066
|
}
|
|
1050
1067
|
export interface UserResponse {
|
|
1051
1068
|
id: string;
|
|
@@ -1103,7 +1120,9 @@ export interface CheckAuthorization {
|
|
|
1103
1120
|
allowed: boolean;
|
|
1104
1121
|
}
|
|
1105
1122
|
export interface UserInfoResponse {
|
|
1123
|
+
roles?: Array<string>;
|
|
1106
1124
|
user?: UserResponse | null;
|
|
1125
|
+
tenant_user?: TenantUser | null;
|
|
1107
1126
|
}
|
|
1108
1127
|
declare class ParraAPI {
|
|
1109
1128
|
private http;
|
|
@@ -1125,6 +1144,15 @@ declare class ParraAPI {
|
|
|
1125
1144
|
} | undefined) => Promise<Tenant>;
|
|
1126
1145
|
updateTenantById: (tenant_id: string, body?: UpdateTenantRequestBody | undefined) => Promise<Tenant>;
|
|
1127
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>;
|
|
1128
1156
|
createTenantForUserById: (user_id: string, body?: CreateTenantForUserRequestBody | undefined) => Promise<Tenant>;
|
|
1129
1157
|
getTenantsForUserById: (user_id: string) => Promise<TenantListResponse>;
|
|
1130
1158
|
createApiKeyForTenantById: (tenant_id: string, body?: CreateApiKeyRequestBody | undefined) => Promise<ApiKeyWithSecretResponse>;
|
|
@@ -1245,18 +1273,11 @@ declare class ParraAPI {
|
|
|
1245
1273
|
$expand?: string | undefined;
|
|
1246
1274
|
$search?: string | undefined;
|
|
1247
1275
|
} | undefined) => Promise<TemplateCollectionResponse>;
|
|
1248
|
-
paginateTenantUsersForTenantById: (tenant_id: string, query?: {
|
|
1249
|
-
$select?: string | undefined;
|
|
1250
|
-
$top?: number | undefined;
|
|
1251
|
-
$skip?: number | undefined;
|
|
1252
|
-
$orderby?: string | undefined;
|
|
1253
|
-
$filter?: string | undefined;
|
|
1254
|
-
$expand?: string | undefined;
|
|
1255
|
-
$search?: string | undefined;
|
|
1256
|
-
} | undefined) => Promise<TenantUserCollectionResponse>;
|
|
1257
1276
|
createApplicationForTenantById: (tenant_id: string, body?: CreateApplicationRequestBody | undefined) => Promise<Application>;
|
|
1258
1277
|
paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
|
|
1259
|
-
getApplicationByIdForTenantById: (tenant_id: string, application_id: string
|
|
1278
|
+
getApplicationByIdForTenantById: (tenant_id: string, application_id: string, query?: {
|
|
1279
|
+
include?: string | undefined;
|
|
1280
|
+
} | undefined) => Promise<Application>;
|
|
1260
1281
|
updateApplicationByIdForTenantById: (tenant_id: string, application_id: string, body?: UpdateApplicationRequestBody | undefined) => Promise<Application>;
|
|
1261
1282
|
deleteApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Response>;
|
|
1262
1283
|
updateApnsConfigurationForTenantApplication: (tenant_id: string, application_id: string, body?: UpdateApnsConfigurationRequestBody | undefined) => Promise<ApnsConfiguration>;
|
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",
|
|
@@ -538,9 +538,10 @@ var ParraAPI = /** @class */ (function () {
|
|
|
538
538
|
method: "get",
|
|
539
539
|
});
|
|
540
540
|
};
|
|
541
|
-
this.getApplicationByIdForTenantById = function (tenant_id, application_id) {
|
|
541
|
+
this.getApplicationByIdForTenantById = function (tenant_id, application_id, query) {
|
|
542
542
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id), {
|
|
543
543
|
method: "get",
|
|
544
|
+
query: query,
|
|
544
545
|
});
|
|
545
546
|
};
|
|
546
547
|
this.updateApplicationByIdForTenantById = function (tenant_id, application_id, body) {
|