@parra/parra-js-sdk 0.3.368 → 0.3.372
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 +127 -11
- package/dist/ParraAPI.js +86 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -423,14 +423,10 @@ export interface TenantUserEntitlement {
|
|
|
423
423
|
key: string;
|
|
424
424
|
title: string;
|
|
425
425
|
}
|
|
426
|
-
export interface
|
|
426
|
+
export interface TenantUserRoleStub {
|
|
427
427
|
id: string;
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
deleted_at?: string | null;
|
|
431
|
-
tenant_id: string;
|
|
432
|
-
name?: string | null;
|
|
433
|
-
avatar?: ImageAssetStub | null;
|
|
428
|
+
name: string;
|
|
429
|
+
key: string;
|
|
434
430
|
}
|
|
435
431
|
export interface TenantUserCollectionStub {
|
|
436
432
|
id: string;
|
|
@@ -440,6 +436,8 @@ export interface TenantUserCollectionStub {
|
|
|
440
436
|
tenant_id: string;
|
|
441
437
|
name?: string | null;
|
|
442
438
|
avatar?: ImageAssetStub | null;
|
|
439
|
+
verified: boolean;
|
|
440
|
+
roles?: Array<TenantUserRoleStub> | null;
|
|
443
441
|
identity?: string | null;
|
|
444
442
|
username?: string | null;
|
|
445
443
|
email?: string | null;
|
|
@@ -451,7 +449,7 @@ export interface TenantUserCollectionStub {
|
|
|
451
449
|
is_anonymous: boolean;
|
|
452
450
|
is_internal: boolean;
|
|
453
451
|
is_test: boolean;
|
|
454
|
-
is_blocked
|
|
452
|
+
is_blocked: boolean;
|
|
455
453
|
blocked_at?: string | null;
|
|
456
454
|
blocked_reason?: string | null;
|
|
457
455
|
locale?: string | null;
|
|
@@ -469,6 +467,8 @@ export interface TenantUserDataStub {
|
|
|
469
467
|
tenant_id: string;
|
|
470
468
|
name?: string | null;
|
|
471
469
|
avatar?: ImageAssetStub | null;
|
|
470
|
+
verified: boolean;
|
|
471
|
+
roles?: Array<TenantUserRoleStub> | null;
|
|
472
472
|
identity?: string | null;
|
|
473
473
|
username?: string | null;
|
|
474
474
|
email?: string | null;
|
|
@@ -480,7 +480,7 @@ export interface TenantUserDataStub {
|
|
|
480
480
|
is_anonymous: boolean;
|
|
481
481
|
is_internal: boolean;
|
|
482
482
|
is_test: boolean;
|
|
483
|
-
is_blocked
|
|
483
|
+
is_blocked: boolean;
|
|
484
484
|
blocked_at?: string | null;
|
|
485
485
|
blocked_reason?: string | null;
|
|
486
486
|
locale?: string | null;
|
|
@@ -498,6 +498,8 @@ export interface TenantUser {
|
|
|
498
498
|
tenant_id: string;
|
|
499
499
|
name?: string | null;
|
|
500
500
|
avatar?: ImageAssetStub | null;
|
|
501
|
+
verified: boolean;
|
|
502
|
+
roles?: Array<TenantUserRoleStub> | null;
|
|
501
503
|
identity?: string | null;
|
|
502
504
|
username?: string | null;
|
|
503
505
|
email?: string | null;
|
|
@@ -509,7 +511,7 @@ export interface TenantUser {
|
|
|
509
511
|
is_anonymous: boolean;
|
|
510
512
|
is_internal: boolean;
|
|
511
513
|
is_test: boolean;
|
|
512
|
-
is_blocked
|
|
514
|
+
is_blocked: boolean;
|
|
513
515
|
blocked_at?: string | null;
|
|
514
516
|
blocked_reason?: string | null;
|
|
515
517
|
locale?: string | null;
|
|
@@ -1108,6 +1110,10 @@ export interface CreatorUpdateSenderStub {
|
|
|
1108
1110
|
avatar?: ImageAssetStub | null;
|
|
1109
1111
|
verified: boolean;
|
|
1110
1112
|
}
|
|
1113
|
+
export interface CreatorUpdateTemplateStub {
|
|
1114
|
+
id: string;
|
|
1115
|
+
name: string;
|
|
1116
|
+
}
|
|
1111
1117
|
export interface CreatorUpdateAttachmentStub {
|
|
1112
1118
|
id: string;
|
|
1113
1119
|
image?: ImageAssetStub | null;
|
|
@@ -1146,7 +1152,7 @@ export interface CreatorUpdate {
|
|
|
1146
1152
|
title: string;
|
|
1147
1153
|
body?: string;
|
|
1148
1154
|
sender?: CreatorUpdateSenderStub;
|
|
1149
|
-
template?:
|
|
1155
|
+
template?: CreatorUpdateTemplateStub;
|
|
1150
1156
|
attachments: Array<CreatorUpdateAttachmentStub>;
|
|
1151
1157
|
visibility: CreatorUpdateVisibility;
|
|
1152
1158
|
channels: Array<CreatorUpdateChannel>;
|
|
@@ -1183,6 +1189,11 @@ export interface FeedCollectionResponse {
|
|
|
1183
1189
|
total_count: number;
|
|
1184
1190
|
data: Array<FeedView>;
|
|
1185
1191
|
}
|
|
1192
|
+
export interface CreateFeedRequestBody {
|
|
1193
|
+
title: string;
|
|
1194
|
+
slug: string;
|
|
1195
|
+
description?: string | null;
|
|
1196
|
+
}
|
|
1186
1197
|
export declare enum FeedItemType {
|
|
1187
1198
|
youtubeVideo = "youtube_video",
|
|
1188
1199
|
contentCard = "content_card",
|
|
@@ -1284,8 +1295,13 @@ export interface ReactionSummary {
|
|
|
1284
1295
|
type: ReactionType;
|
|
1285
1296
|
value: string;
|
|
1286
1297
|
count: number;
|
|
1298
|
+
first_reaction_at: string;
|
|
1287
1299
|
reaction_id?: string | null;
|
|
1288
1300
|
}
|
|
1301
|
+
export interface CommentSummary {
|
|
1302
|
+
disabled: boolean;
|
|
1303
|
+
comment_count: number;
|
|
1304
|
+
}
|
|
1289
1305
|
export interface AppFeedItem {
|
|
1290
1306
|
id: string;
|
|
1291
1307
|
created_at: string;
|
|
@@ -1297,6 +1313,7 @@ export interface AppFeedItem {
|
|
|
1297
1313
|
data: FeedItemData;
|
|
1298
1314
|
reaction_options?: Array<ReactionOptionGroup>;
|
|
1299
1315
|
reactions?: Array<ReactionSummary>;
|
|
1316
|
+
comments?: CommentSummary;
|
|
1300
1317
|
}
|
|
1301
1318
|
export interface AppFeedItemCollectionResponse {
|
|
1302
1319
|
page: number;
|
|
@@ -1305,6 +1322,11 @@ export interface AppFeedItemCollectionResponse {
|
|
|
1305
1322
|
total_count: number;
|
|
1306
1323
|
data: Array<AppFeedItem>;
|
|
1307
1324
|
}
|
|
1325
|
+
export interface UpdateFeedRequestBody {
|
|
1326
|
+
title?: string;
|
|
1327
|
+
slug?: string;
|
|
1328
|
+
description?: string | null;
|
|
1329
|
+
}
|
|
1308
1330
|
export interface FeedItem {
|
|
1309
1331
|
id: string;
|
|
1310
1332
|
created_at: string;
|
|
@@ -1317,6 +1339,7 @@ export interface FeedItem {
|
|
|
1317
1339
|
data: FeedItemData;
|
|
1318
1340
|
reaction_options?: Array<ReactionOptionGroup>;
|
|
1319
1341
|
reactions?: Array<ReactionSummary>;
|
|
1342
|
+
comments?: CommentSummary;
|
|
1320
1343
|
}
|
|
1321
1344
|
export interface FeedItemCollectionResponse {
|
|
1322
1345
|
page: number;
|
|
@@ -1328,11 +1351,49 @@ export interface FeedItemCollectionResponse {
|
|
|
1328
1351
|
export interface UpdateFeedItemRequestBody {
|
|
1329
1352
|
disabled?: boolean;
|
|
1330
1353
|
}
|
|
1354
|
+
export interface CreateCommentRequestBody {
|
|
1355
|
+
body: string;
|
|
1356
|
+
}
|
|
1357
|
+
export interface TenantUserStub {
|
|
1358
|
+
id: string;
|
|
1359
|
+
tenant_id: string;
|
|
1360
|
+
name?: string | null;
|
|
1361
|
+
avatar?: ImageAssetStub | null;
|
|
1362
|
+
verified?: boolean | null;
|
|
1363
|
+
roles?: Array<TenantUserRoleStub> | null;
|
|
1364
|
+
}
|
|
1365
|
+
export interface Comment {
|
|
1366
|
+
id: string;
|
|
1367
|
+
created_at: string;
|
|
1368
|
+
updated_at: string;
|
|
1369
|
+
deleted_at?: string | null;
|
|
1370
|
+
body: string;
|
|
1371
|
+
user_id: string;
|
|
1372
|
+
feed_item_id?: string;
|
|
1373
|
+
user: TenantUserStub;
|
|
1374
|
+
reactions?: Array<ReactionSummary>;
|
|
1375
|
+
}
|
|
1376
|
+
export interface CommentCollectionResponse {
|
|
1377
|
+
page: number;
|
|
1378
|
+
page_count: number;
|
|
1379
|
+
page_size: number;
|
|
1380
|
+
total_count: number;
|
|
1381
|
+
data: Array<Comment>;
|
|
1382
|
+
}
|
|
1383
|
+
export interface UpdateCommentRequestBody {
|
|
1384
|
+
body?: string;
|
|
1385
|
+
}
|
|
1386
|
+
export interface FlagCommentRequestBody {
|
|
1387
|
+
reason?: string | null;
|
|
1388
|
+
}
|
|
1331
1389
|
export interface CreateReactionRequestBody {
|
|
1332
1390
|
option_id: string;
|
|
1333
1391
|
}
|
|
1334
1392
|
export interface Reaction {
|
|
1335
1393
|
id: string;
|
|
1394
|
+
created_at: string;
|
|
1395
|
+
updated_at: string;
|
|
1396
|
+
deleted_at?: string | null;
|
|
1336
1397
|
option_id: string;
|
|
1337
1398
|
user_id: string;
|
|
1338
1399
|
}
|
|
@@ -3507,6 +3568,39 @@ export interface TeamMember {
|
|
|
3507
3568
|
email: string;
|
|
3508
3569
|
avatar?: ImageAssetStub;
|
|
3509
3570
|
}
|
|
3571
|
+
export interface CreateRoleRequestBody {
|
|
3572
|
+
name: string;
|
|
3573
|
+
key: string;
|
|
3574
|
+
description?: string | null;
|
|
3575
|
+
}
|
|
3576
|
+
export interface Role {
|
|
3577
|
+
id: string;
|
|
3578
|
+
created_at: string;
|
|
3579
|
+
updated_at: string;
|
|
3580
|
+
deleted_at?: string | null;
|
|
3581
|
+
tenant_id: string;
|
|
3582
|
+
name: string;
|
|
3583
|
+
key: string;
|
|
3584
|
+
description?: string | null;
|
|
3585
|
+
}
|
|
3586
|
+
export interface UpdateRoleRequestBody {
|
|
3587
|
+
name?: string;
|
|
3588
|
+
key?: string;
|
|
3589
|
+
description?: string | null;
|
|
3590
|
+
}
|
|
3591
|
+
export interface AddRoleToUserRequestBody {
|
|
3592
|
+
role_id: string;
|
|
3593
|
+
}
|
|
3594
|
+
export interface UserRole {
|
|
3595
|
+
id: string;
|
|
3596
|
+
created_at: string;
|
|
3597
|
+
updated_at: string;
|
|
3598
|
+
deleted_at?: string | null;
|
|
3599
|
+
name: string;
|
|
3600
|
+
key: string;
|
|
3601
|
+
user_id: string;
|
|
3602
|
+
role_id: string;
|
|
3603
|
+
}
|
|
3510
3604
|
export interface UpdateTenantUserRequestBody {
|
|
3511
3605
|
identity?: string | null;
|
|
3512
3606
|
name?: string | null;
|
|
@@ -4052,11 +4146,14 @@ declare class ParraAPI {
|
|
|
4052
4146
|
$expand?: string;
|
|
4053
4147
|
$search?: string;
|
|
4054
4148
|
}, options?: Options) => Promise<FeedCollectionResponse>;
|
|
4149
|
+
createFeedForTenant: (tenant_id: string, body: CreateFeedRequestBody, options?: Options) => Promise<FeedView>;
|
|
4055
4150
|
paginateItemsForAppFeed: (tenant_id: string, application_id: string, feed_id_or_slug: string, query?: {
|
|
4056
4151
|
limit?: number;
|
|
4057
4152
|
offset?: number;
|
|
4058
4153
|
}, options?: Options) => Promise<AppFeedItemCollectionResponse>;
|
|
4059
4154
|
getFeedById: (tenant_id: string, feed_id_or_slug: string, options?: Options) => Promise<FeedView>;
|
|
4155
|
+
updateFeedById: (tenant_id: string, feed_id_or_slug: string, body?: UpdateFeedRequestBody, options?: Options) => Promise<FeedView>;
|
|
4156
|
+
deleteFeedById: (tenant_id: string, feed_id_or_slug: string, options?: Options) => Promise<Response>;
|
|
4060
4157
|
paginateItemsForFeed: (tenant_id: string, feed_id_or_slug: string, query?: {
|
|
4061
4158
|
$select?: string;
|
|
4062
4159
|
$top?: number;
|
|
@@ -4068,6 +4165,18 @@ declare class ParraAPI {
|
|
|
4068
4165
|
}, options?: Options) => Promise<FeedItemCollectionResponse>;
|
|
4069
4166
|
updateFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, body?: UpdateFeedItemRequestBody, options?: Options) => Promise<FeedItem>;
|
|
4070
4167
|
deleteFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, options?: Options) => Promise<Response>;
|
|
4168
|
+
addCommentToFeedItem: (tenant_id: string, feed_item_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
|
|
4169
|
+
paginateCommentsForFeedItem: (tenant_id: string, feed_item_id: string, query?: {
|
|
4170
|
+
limit?: number;
|
|
4171
|
+
offset?: number;
|
|
4172
|
+
sort?: string;
|
|
4173
|
+
created_at?: string;
|
|
4174
|
+
}, options?: Options) => Promise<CommentCollectionResponse>;
|
|
4175
|
+
updateCommentForFeedItem: (tenant_id: string, comment_id: string, body?: UpdateCommentRequestBody, options?: Options) => Promise<Comment>;
|
|
4176
|
+
removeCommentFromFeedItem: (tenant_id: string, comment_id: string, options?: Options) => Promise<Response>;
|
|
4177
|
+
flagComment: (tenant_id: string, comment_id: string, body?: FlagCommentRequestBody, options?: Options) => Promise<Response>;
|
|
4178
|
+
addReactionToComment: (tenant_id: string, comment_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
|
|
4179
|
+
removeReactionFromComment: (tenant_id: string, comment_id: string, reaction_id: string, options?: Options) => Promise<Response>;
|
|
4071
4180
|
addReactionToFeedItem: (tenant_id: string, feed_item_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
|
|
4072
4181
|
removeReactionFromFeedItem: (tenant_id: string, feed_item_id: string, reaction_id: string, options?: Options) => Promise<Response>;
|
|
4073
4182
|
paginateFeedbackFormResponsesForTenantUser: (tenant_id: string, user_id: string, query?: {
|
|
@@ -4395,6 +4504,13 @@ declare class ParraAPI {
|
|
|
4395
4504
|
createInvitationForTenantById: (tenant_id: string, body: TenantInvitationRequestBody, options?: Options) => Promise<TenantInvitation>;
|
|
4396
4505
|
getTeamMembersForTenantById: (tenant_id: string, options?: Options) => Promise<Array<TeamMember>>;
|
|
4397
4506
|
deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string, options?: Options) => Promise<Response>;
|
|
4507
|
+
createRole: (tenant_id: string, body: CreateRoleRequestBody, options?: Options) => Promise<Role>;
|
|
4508
|
+
listRoles: (tenant_id: string, options?: Options) => Promise<Array<Role>>;
|
|
4509
|
+
getRoleById: (tenant_id: string, role_id: string, options?: Options) => Promise<Role>;
|
|
4510
|
+
updateRoleById: (tenant_id: string, role_id: string, body?: UpdateRoleRequestBody, options?: Options) => Promise<Role>;
|
|
4511
|
+
deleteRoleById: (tenant_id: string, role_id: string, options?: Options) => Promise<Response>;
|
|
4512
|
+
addRoleToUser: (tenant_id: string, user_id: string, body: AddRoleToUserRequestBody, options?: Options) => Promise<UserRole>;
|
|
4513
|
+
removeRoleFromUser: (tenant_id: string, user_id: string, user_role_id: string, options?: Options) => Promise<Response>;
|
|
4398
4514
|
getUserForTenantById: (tenant_id: string, user_id: string, query?: {
|
|
4399
4515
|
include?: string;
|
|
4400
4516
|
}, options?: Options) => Promise<TenantUser>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -784,6 +784,12 @@ var ParraAPI = /** @class */ (function () {
|
|
|
784
784
|
if (options === void 0) { options = {}; }
|
|
785
785
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds"), __assign({ method: "get", query: query }, options));
|
|
786
786
|
};
|
|
787
|
+
this.createFeedForTenant = function (tenant_id, body, options) {
|
|
788
|
+
if (options === void 0) { options = {}; }
|
|
789
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
790
|
+
"content-type": "application/json",
|
|
791
|
+
} }, options));
|
|
792
|
+
};
|
|
787
793
|
this.paginateItemsForAppFeed = function (tenant_id, application_id, feed_id_or_slug, query, options) {
|
|
788
794
|
if (options === void 0) { options = {}; }
|
|
789
795
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/feeds/").concat(feed_id_or_slug, "/items"), __assign({ method: "get", query: query }, options));
|
|
@@ -792,6 +798,16 @@ var ParraAPI = /** @class */ (function () {
|
|
|
792
798
|
if (options === void 0) { options = {}; }
|
|
793
799
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug), __assign({ method: "get" }, options));
|
|
794
800
|
};
|
|
801
|
+
this.updateFeedById = function (tenant_id, feed_id_or_slug, body, options) {
|
|
802
|
+
if (options === void 0) { options = {}; }
|
|
803
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
804
|
+
"content-type": "application/json",
|
|
805
|
+
} }, options));
|
|
806
|
+
};
|
|
807
|
+
this.deleteFeedById = function (tenant_id, feed_id_or_slug, options) {
|
|
808
|
+
if (options === void 0) { options = {}; }
|
|
809
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug), __assign({ method: "delete" }, options));
|
|
810
|
+
};
|
|
795
811
|
this.paginateItemsForFeed = function (tenant_id, feed_id_or_slug, query, options) {
|
|
796
812
|
if (options === void 0) { options = {}; }
|
|
797
813
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug, "/items"), __assign({ method: "get", query: query }, options));
|
|
@@ -806,6 +822,42 @@ var ParraAPI = /** @class */ (function () {
|
|
|
806
822
|
if (options === void 0) { options = {}; }
|
|
807
823
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug, "/items/").concat(feed_item_id), __assign({ method: "delete" }, options));
|
|
808
824
|
};
|
|
825
|
+
this.addCommentToFeedItem = function (tenant_id, feed_item_id, body, options) {
|
|
826
|
+
if (options === void 0) { options = {}; }
|
|
827
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id, "/comments"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
828
|
+
"content-type": "application/json",
|
|
829
|
+
} }, options));
|
|
830
|
+
};
|
|
831
|
+
this.paginateCommentsForFeedItem = function (tenant_id, feed_item_id, query, options) {
|
|
832
|
+
if (options === void 0) { options = {}; }
|
|
833
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id, "/comments"), __assign({ method: "get", query: query }, options));
|
|
834
|
+
};
|
|
835
|
+
this.updateCommentForFeedItem = function (tenant_id, comment_id, body, options) {
|
|
836
|
+
if (options === void 0) { options = {}; }
|
|
837
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/comments/").concat(comment_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
838
|
+
"content-type": "application/json",
|
|
839
|
+
} }, options));
|
|
840
|
+
};
|
|
841
|
+
this.removeCommentFromFeedItem = function (tenant_id, comment_id, options) {
|
|
842
|
+
if (options === void 0) { options = {}; }
|
|
843
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/comments/").concat(comment_id), __assign({ method: "delete" }, options));
|
|
844
|
+
};
|
|
845
|
+
this.flagComment = function (tenant_id, comment_id, body, options) {
|
|
846
|
+
if (options === void 0) { options = {}; }
|
|
847
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/comments/").concat(comment_id, "/flag"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
848
|
+
"content-type": "application/json",
|
|
849
|
+
}, raw: true }, options));
|
|
850
|
+
};
|
|
851
|
+
this.addReactionToComment = function (tenant_id, comment_id, body, options) {
|
|
852
|
+
if (options === void 0) { options = {}; }
|
|
853
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/comments/").concat(comment_id, "/reactions"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
854
|
+
"content-type": "application/json",
|
|
855
|
+
} }, options));
|
|
856
|
+
};
|
|
857
|
+
this.removeReactionFromComment = function (tenant_id, comment_id, reaction_id, options) {
|
|
858
|
+
if (options === void 0) { options = {}; }
|
|
859
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/comments/").concat(comment_id, "/reactions/").concat(reaction_id), __assign({ method: "delete" }, options));
|
|
860
|
+
};
|
|
809
861
|
this.addReactionToFeedItem = function (tenant_id, feed_item_id, body, options) {
|
|
810
862
|
if (options === void 0) { options = {}; }
|
|
811
863
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id, "/reactions"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
@@ -1626,6 +1678,40 @@ var ParraAPI = /** @class */ (function () {
|
|
|
1626
1678
|
if (options === void 0) { options = {}; }
|
|
1627
1679
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/team-members/").concat(team_member_id), __assign({ method: "delete" }, options));
|
|
1628
1680
|
};
|
|
1681
|
+
this.createRole = function (tenant_id, body, options) {
|
|
1682
|
+
if (options === void 0) { options = {}; }
|
|
1683
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/roles"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
1684
|
+
"content-type": "application/json",
|
|
1685
|
+
} }, options));
|
|
1686
|
+
};
|
|
1687
|
+
this.listRoles = function (tenant_id, options) {
|
|
1688
|
+
if (options === void 0) { options = {}; }
|
|
1689
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/roles"), __assign({ method: "get" }, options));
|
|
1690
|
+
};
|
|
1691
|
+
this.getRoleById = function (tenant_id, role_id, options) {
|
|
1692
|
+
if (options === void 0) { options = {}; }
|
|
1693
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/roles/").concat(role_id), __assign({ method: "get" }, options));
|
|
1694
|
+
};
|
|
1695
|
+
this.updateRoleById = function (tenant_id, role_id, body, options) {
|
|
1696
|
+
if (options === void 0) { options = {}; }
|
|
1697
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/roles/").concat(role_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
1698
|
+
"content-type": "application/json",
|
|
1699
|
+
} }, options));
|
|
1700
|
+
};
|
|
1701
|
+
this.deleteRoleById = function (tenant_id, role_id, options) {
|
|
1702
|
+
if (options === void 0) { options = {}; }
|
|
1703
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/roles/").concat(role_id), __assign({ method: "delete" }, options));
|
|
1704
|
+
};
|
|
1705
|
+
this.addRoleToUser = function (tenant_id, user_id, body, options) {
|
|
1706
|
+
if (options === void 0) { options = {}; }
|
|
1707
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/roles"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
1708
|
+
"content-type": "application/json",
|
|
1709
|
+
} }, options));
|
|
1710
|
+
};
|
|
1711
|
+
this.removeRoleFromUser = function (tenant_id, user_id, user_role_id, options) {
|
|
1712
|
+
if (options === void 0) { options = {}; }
|
|
1713
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/roles/").concat(user_role_id), __assign({ method: "delete" }, options));
|
|
1714
|
+
};
|
|
1629
1715
|
this.getUserForTenantById = function (tenant_id, user_id, query, options) {
|
|
1630
1716
|
if (options === void 0) { options = {}; }
|
|
1631
1717
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id), __assign({ method: "get", query: query }, options));
|