@parra/parra-js-sdk 0.3.440 → 0.3.441
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 +28 -23
- package/dist/ParraAPI.js +20 -6
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -1075,7 +1075,7 @@ export declare enum ChatChannelType {
|
|
1075
1075
|
}
|
1076
1076
|
export declare enum ChatChannelStatus {
|
1077
1077
|
active = "active",
|
1078
|
-
|
1078
|
+
locked = "locked",
|
1079
1079
|
archived = "archived"
|
1080
1080
|
}
|
1081
1081
|
export interface TenantUserStub {
|
@@ -1127,16 +1127,6 @@ export interface Channel {
|
|
1127
1127
|
apns?: CreateApnsChannelRequestBody;
|
1128
1128
|
inbox?: CreateInboxChannelRequestBody;
|
1129
1129
|
}
|
1130
|
-
export interface ChannelCollectionResponse {
|
1131
|
-
page: number;
|
1132
|
-
page_count: number;
|
1133
|
-
page_size: number;
|
1134
|
-
total_count: number;
|
1135
|
-
data: Array<Channel>;
|
1136
|
-
}
|
1137
|
-
export interface UpdateChatChannelRequestBody {
|
1138
|
-
status?: ChatChannelStatus;
|
1139
|
-
}
|
1140
1130
|
export interface MessageCollectionStub {
|
1141
1131
|
id: string;
|
1142
1132
|
created_at: string;
|
@@ -1431,6 +1421,8 @@ export declare enum CreatorUpdateChannelType {
|
|
1431
1421
|
}
|
1432
1422
|
export interface CreatorUpdateChannelFeedData {
|
1433
1423
|
feed_view_id: string;
|
1424
|
+
feed_item_reactions_disabled: boolean;
|
1425
|
+
feed_item_comments_disabled: boolean;
|
1434
1426
|
}
|
1435
1427
|
export interface CreatorUpdateChannelNotificationData {
|
1436
1428
|
notification_template_id: string;
|
@@ -1493,6 +1485,7 @@ export interface CreatorUpdateGiveawayWinnerResponse {
|
|
1493
1485
|
winning_user?: TenantUserStub;
|
1494
1486
|
message: string;
|
1495
1487
|
total_entries: number;
|
1488
|
+
criteria: CreatorUpdateGiveawayCriteria;
|
1496
1489
|
}
|
1497
1490
|
export interface ScheduleCreatorUpdateRequestBody {
|
1498
1491
|
schedule_at: string;
|
@@ -1627,6 +1620,10 @@ export interface ReactionOptionGroup {
|
|
1627
1620
|
description?: string | null;
|
1628
1621
|
options: Array<ReactionOption>;
|
1629
1622
|
}
|
1623
|
+
export interface TenantUserNameStub {
|
1624
|
+
id: string;
|
1625
|
+
name: string;
|
1626
|
+
}
|
1630
1627
|
export interface ReactionSummary {
|
1631
1628
|
id: string;
|
1632
1629
|
name: string;
|
@@ -1635,6 +1632,7 @@ export interface ReactionSummary {
|
|
1635
1632
|
count: number;
|
1636
1633
|
first_reaction_at: string;
|
1637
1634
|
reaction_id?: string | null;
|
1635
|
+
users: Array<TenantUserNameStub>;
|
1638
1636
|
}
|
1639
1637
|
export interface CommentSummary {
|
1640
1638
|
disabled: boolean;
|
@@ -2755,13 +2753,9 @@ export interface InboxItemCollectionResponse {
|
|
2755
2753
|
export interface ReadInboxItemsRequestBody {
|
2756
2754
|
item_ids: Array<string>;
|
2757
2755
|
}
|
2758
|
-
export interface UpdateNotificationTemplateRequestBody {
|
2759
|
-
name: string;
|
2760
|
-
description?: string | null;
|
2761
|
-
topic_id?: string | null;
|
2762
|
-
}
|
2763
2756
|
export interface CreateNotificationTemplateRequestBody {
|
2764
2757
|
name: string;
|
2758
|
+
key: string;
|
2765
2759
|
description?: string | null;
|
2766
2760
|
topic_id?: string | null;
|
2767
2761
|
}
|
@@ -2828,6 +2822,7 @@ export interface NotificationTemplate {
|
|
2828
2822
|
updated_at: string;
|
2829
2823
|
deleted_at?: string | null;
|
2830
2824
|
name: string;
|
2825
|
+
key: string;
|
2831
2826
|
description?: string | null;
|
2832
2827
|
topic_id?: string | null;
|
2833
2828
|
tenant_id: string;
|
@@ -2841,6 +2836,12 @@ export interface NotificationTemplateCollectionResponse {
|
|
2841
2836
|
total_count: number;
|
2842
2837
|
data: Array<NotificationTemplate>;
|
2843
2838
|
}
|
2839
|
+
export interface UpdateNotificationTemplateRequestBody {
|
2840
|
+
name?: string;
|
2841
|
+
key?: string;
|
2842
|
+
description?: string | null;
|
2843
|
+
topic_id?: string | null;
|
2844
|
+
}
|
2844
2845
|
export interface UpdateChannelRequestBody {
|
2845
2846
|
name: string;
|
2846
2847
|
description?: string | null;
|
@@ -4516,13 +4517,17 @@ declare class ParraAPI {
|
|
4516
4517
|
updateProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, body?: UpdateProductEntitlementRequestBody, options?: Options) => Promise<ProductEntitlement>;
|
4517
4518
|
deleteProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, options?: Options) => Promise<Response>;
|
4518
4519
|
createChatChannel: (tenant_id: string, body?: CreateChatChannelRequestBody, options?: Options) => Promise<Channel>;
|
4519
|
-
|
4520
|
+
listChatChannels: (tenant_id: string, query?: {
|
4520
4521
|
type?: string;
|
4521
|
-
|
4522
|
-
|
4523
|
-
|
4524
|
-
|
4522
|
+
}, options?: Options) => Promise<Array<Channel>>;
|
4523
|
+
getChatChannel: (tenant_id: string, channel_id: string, query?: {
|
4524
|
+
last_message_id?: string;
|
4525
|
+
}, options?: Options) => Promise<Channel>;
|
4525
4526
|
deleteChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Response>;
|
4527
|
+
listMembersForChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Array<ChannelMember>>;
|
4528
|
+
lockChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Channel>;
|
4529
|
+
unlockChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Channel>;
|
4530
|
+
leaveChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Response>;
|
4526
4531
|
paginateMessagesForChatChannel: (tenant_id: string, channel_id: string, query?: {
|
4527
4532
|
limit?: number;
|
4528
4533
|
offset?: number;
|
@@ -4854,7 +4859,7 @@ declare class ParraAPI {
|
|
4854
4859
|
archived?: boolean;
|
4855
4860
|
}, options?: Options) => Promise<InboxItemCollectionResponse>;
|
4856
4861
|
readInboxItemsForTenantUser: (tenant_id: string, user_id: string, body: ReadInboxItemsRequestBody, options?: Options) => Promise<Response>;
|
4857
|
-
createNotificationTemplate: (tenant_id: string, body
|
4862
|
+
createNotificationTemplate: (tenant_id: string, body: CreateNotificationTemplateRequestBody, options?: Options) => Promise<NotificationTemplate>;
|
4858
4863
|
paginateNotificationTemplatesForTenantById: (tenant_id: string, query?: {
|
4859
4864
|
$select?: string;
|
4860
4865
|
$top?: number;
|
@@ -4867,7 +4872,7 @@ declare class ParraAPI {
|
|
4867
4872
|
getNotificationTemplateById: (tenant_id: string, notification_template_id: string, query?: {
|
4868
4873
|
include?: string;
|
4869
4874
|
}, options?: Options) => Promise<NotificationTemplate>;
|
4870
|
-
updateNotificationTemplateById: (tenant_id: string, notification_template_id: string, body
|
4875
|
+
updateNotificationTemplateById: (tenant_id: string, notification_template_id: string, body?: UpdateNotificationTemplateRequestBody, options?: Options) => Promise<NotificationTemplate>;
|
4871
4876
|
deleteNotificationTemplateById: (tenant_id: string, notification_template_id: string, options?: Options) => Promise<Response>;
|
4872
4877
|
createChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, body: CreateChannelRequestBody, options?: Options) => Promise<Channel>;
|
4873
4878
|
updateChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, body: UpdateChannelRequestBody, options?: Options) => Promise<Channel>;
|
package/dist/ParraAPI.js
CHANGED
@@ -163,7 +163,7 @@ var ChatChannelType;
|
|
163
163
|
var ChatChannelStatus;
|
164
164
|
(function (ChatChannelStatus) {
|
165
165
|
ChatChannelStatus["active"] = "active";
|
166
|
-
ChatChannelStatus["
|
166
|
+
ChatChannelStatus["locked"] = "locked";
|
167
167
|
ChatChannelStatus["archived"] = "archived";
|
168
168
|
})(ChatChannelStatus || (exports.ChatChannelStatus = ChatChannelStatus = {}));
|
169
169
|
var ChannelMemberType;
|
@@ -761,20 +761,34 @@ var ParraAPI = /** @class */ (function () {
|
|
761
761
|
"content-type": "application/json",
|
762
762
|
} }, options));
|
763
763
|
};
|
764
|
-
this.
|
764
|
+
this.listChatChannels = function (tenant_id, query, options) {
|
765
765
|
if (options === void 0) { options = {}; }
|
766
766
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels"), __assign({ method: "get", query: query }, options));
|
767
767
|
};
|
768
|
-
this.
|
768
|
+
this.getChatChannel = function (tenant_id, channel_id, query, options) {
|
769
769
|
if (options === void 0) { options = {}; }
|
770
|
-
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id), __assign({ method: "
|
771
|
-
"content-type": "application/json",
|
772
|
-
} }, options));
|
770
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id), __assign({ method: "get", query: query }, options));
|
773
771
|
};
|
774
772
|
this.deleteChatChannel = function (tenant_id, channel_id, options) {
|
775
773
|
if (options === void 0) { options = {}; }
|
776
774
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id), __assign({ method: "delete" }, options));
|
777
775
|
};
|
776
|
+
this.listMembersForChatChannel = function (tenant_id, channel_id, options) {
|
777
|
+
if (options === void 0) { options = {}; }
|
778
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/members"), __assign({ method: "get" }, options));
|
779
|
+
};
|
780
|
+
this.lockChatChannel = function (tenant_id, channel_id, options) {
|
781
|
+
if (options === void 0) { options = {}; }
|
782
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/lock"), __assign({ method: "post" }, options));
|
783
|
+
};
|
784
|
+
this.unlockChatChannel = function (tenant_id, channel_id, options) {
|
785
|
+
if (options === void 0) { options = {}; }
|
786
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/unlock"), __assign({ method: "post" }, options));
|
787
|
+
};
|
788
|
+
this.leaveChatChannel = function (tenant_id, channel_id, options) {
|
789
|
+
if (options === void 0) { options = {}; }
|
790
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/leave"), __assign({ method: "post" }, options));
|
791
|
+
};
|
778
792
|
this.paginateMessagesForChatChannel = function (tenant_id, channel_id, query, options) {
|
779
793
|
if (options === void 0) { options = {}; }
|
780
794
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/messages"), __assign({ method: "get", query: query }, options));
|