@parra/parra-js-sdk 0.3.439 → 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 +44 -23
- package/dist/ParraAPI.js +33 -8
- 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;
|
@@ -1481,6 +1473,20 @@ export interface UpdateCreatorUpdateRequestBody {
|
|
1481
1473
|
post_visibility?: CreatorUpdateVisibilityType;
|
1482
1474
|
attachment_visibility?: CreatorUpdateVisibilityType;
|
1483
1475
|
}
|
1476
|
+
export declare enum CreatorUpdateGiveawayCriteria {
|
1477
|
+
comment = "comment",
|
1478
|
+
reaction = "reaction"
|
1479
|
+
}
|
1480
|
+
export interface CreatorUpdateGiveawayWinnerRequestBody {
|
1481
|
+
criteria: CreatorUpdateGiveawayCriteria;
|
1482
|
+
}
|
1483
|
+
export interface CreatorUpdateGiveawayWinnerResponse {
|
1484
|
+
winning_user_id?: string;
|
1485
|
+
winning_user?: TenantUserStub;
|
1486
|
+
message: string;
|
1487
|
+
total_entries: number;
|
1488
|
+
criteria: CreatorUpdateGiveawayCriteria;
|
1489
|
+
}
|
1484
1490
|
export interface ScheduleCreatorUpdateRequestBody {
|
1485
1491
|
schedule_at: string;
|
1486
1492
|
}
|
@@ -1614,6 +1620,10 @@ export interface ReactionOptionGroup {
|
|
1614
1620
|
description?: string | null;
|
1615
1621
|
options: Array<ReactionOption>;
|
1616
1622
|
}
|
1623
|
+
export interface TenantUserNameStub {
|
1624
|
+
id: string;
|
1625
|
+
name: string;
|
1626
|
+
}
|
1617
1627
|
export interface ReactionSummary {
|
1618
1628
|
id: string;
|
1619
1629
|
name: string;
|
@@ -1622,6 +1632,7 @@ export interface ReactionSummary {
|
|
1622
1632
|
count: number;
|
1623
1633
|
first_reaction_at: string;
|
1624
1634
|
reaction_id?: string | null;
|
1635
|
+
users: Array<TenantUserNameStub>;
|
1625
1636
|
}
|
1626
1637
|
export interface CommentSummary {
|
1627
1638
|
disabled: boolean;
|
@@ -2742,13 +2753,9 @@ export interface InboxItemCollectionResponse {
|
|
2742
2753
|
export interface ReadInboxItemsRequestBody {
|
2743
2754
|
item_ids: Array<string>;
|
2744
2755
|
}
|
2745
|
-
export interface UpdateNotificationTemplateRequestBody {
|
2746
|
-
name: string;
|
2747
|
-
description?: string | null;
|
2748
|
-
topic_id?: string | null;
|
2749
|
-
}
|
2750
2756
|
export interface CreateNotificationTemplateRequestBody {
|
2751
2757
|
name: string;
|
2758
|
+
key: string;
|
2752
2759
|
description?: string | null;
|
2753
2760
|
topic_id?: string | null;
|
2754
2761
|
}
|
@@ -2815,6 +2822,7 @@ export interface NotificationTemplate {
|
|
2815
2822
|
updated_at: string;
|
2816
2823
|
deleted_at?: string | null;
|
2817
2824
|
name: string;
|
2825
|
+
key: string;
|
2818
2826
|
description?: string | null;
|
2819
2827
|
topic_id?: string | null;
|
2820
2828
|
tenant_id: string;
|
@@ -2828,6 +2836,12 @@ export interface NotificationTemplateCollectionResponse {
|
|
2828
2836
|
total_count: number;
|
2829
2837
|
data: Array<NotificationTemplate>;
|
2830
2838
|
}
|
2839
|
+
export interface UpdateNotificationTemplateRequestBody {
|
2840
|
+
name?: string;
|
2841
|
+
key?: string;
|
2842
|
+
description?: string | null;
|
2843
|
+
topic_id?: string | null;
|
2844
|
+
}
|
2831
2845
|
export interface UpdateChannelRequestBody {
|
2832
2846
|
name: string;
|
2833
2847
|
description?: string | null;
|
@@ -4503,16 +4517,22 @@ declare class ParraAPI {
|
|
4503
4517
|
updateProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, body?: UpdateProductEntitlementRequestBody, options?: Options) => Promise<ProductEntitlement>;
|
4504
4518
|
deleteProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, options?: Options) => Promise<Response>;
|
4505
4519
|
createChatChannel: (tenant_id: string, body?: CreateChatChannelRequestBody, options?: Options) => Promise<Channel>;
|
4506
|
-
|
4520
|
+
listChatChannels: (tenant_id: string, query?: {
|
4507
4521
|
type?: string;
|
4508
|
-
|
4509
|
-
|
4510
|
-
|
4511
|
-
|
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>;
|
4512
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>;
|
4513
4531
|
paginateMessagesForChatChannel: (tenant_id: string, channel_id: string, query?: {
|
4514
4532
|
limit?: number;
|
4515
4533
|
offset?: number;
|
4534
|
+
sort?: string;
|
4535
|
+
created_at?: string;
|
4516
4536
|
}, options?: Options) => Promise<MessageCollectionResponse>;
|
4517
4537
|
createMessageForChatChannel: (tenant_id: string, channel_id: string, body: CreateMessageRequestBody, options?: Options) => Promise<Message>;
|
4518
4538
|
deleteChatMessage: (tenant_id: string, message_id: string, options?: Options) => Promise<Response>;
|
@@ -4579,6 +4599,7 @@ declare class ParraAPI {
|
|
4579
4599
|
getCreatorUpdate: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<CreatorUpdate>;
|
4580
4600
|
updateCreatorUpdate: (tenant_id: string, creator_update_id: string, body?: UpdateCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
|
4581
4601
|
deleteCreatorUpdate: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<Response>;
|
4602
|
+
calculateGiveawayWinnerForCreatorUpdate: (tenant_id: string, creator_update_id: string, body: CreatorUpdateGiveawayWinnerRequestBody, options?: Options) => Promise<CreatorUpdateGiveawayWinnerResponse>;
|
4582
4603
|
sendCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<CreatorUpdate>;
|
4583
4604
|
scheduleCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, body: ScheduleCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
|
4584
4605
|
deleteAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, creator_update_attachment_id: string, options?: Options) => Promise<Response>;
|
@@ -4838,7 +4859,7 @@ declare class ParraAPI {
|
|
4838
4859
|
archived?: boolean;
|
4839
4860
|
}, options?: Options) => Promise<InboxItemCollectionResponse>;
|
4840
4861
|
readInboxItemsForTenantUser: (tenant_id: string, user_id: string, body: ReadInboxItemsRequestBody, options?: Options) => Promise<Response>;
|
4841
|
-
createNotificationTemplate: (tenant_id: string, body
|
4862
|
+
createNotificationTemplate: (tenant_id: string, body: CreateNotificationTemplateRequestBody, options?: Options) => Promise<NotificationTemplate>;
|
4842
4863
|
paginateNotificationTemplatesForTenantById: (tenant_id: string, query?: {
|
4843
4864
|
$select?: string;
|
4844
4865
|
$top?: number;
|
@@ -4851,7 +4872,7 @@ declare class ParraAPI {
|
|
4851
4872
|
getNotificationTemplateById: (tenant_id: string, notification_template_id: string, query?: {
|
4852
4873
|
include?: string;
|
4853
4874
|
}, options?: Options) => Promise<NotificationTemplate>;
|
4854
|
-
updateNotificationTemplateById: (tenant_id: string, notification_template_id: string, body
|
4875
|
+
updateNotificationTemplateById: (tenant_id: string, notification_template_id: string, body?: UpdateNotificationTemplateRequestBody, options?: Options) => Promise<NotificationTemplate>;
|
4855
4876
|
deleteNotificationTemplateById: (tenant_id: string, notification_template_id: string, options?: Options) => Promise<Response>;
|
4856
4877
|
createChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, body: CreateChannelRequestBody, options?: Options) => Promise<Channel>;
|
4857
4878
|
updateChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, body: UpdateChannelRequestBody, options?: Options) => Promise<Channel>;
|
package/dist/ParraAPI.js
CHANGED
@@ -11,8 +11,8 @@ var __assign = (this && this.__assign) || function () {
|
|
11
11
|
return __assign.apply(this, arguments);
|
12
12
|
};
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
-
exports.
|
15
|
-
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = exports.MailTemplateVersionStatus = exports.MailTemplateType = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = void 0;
|
14
|
+
exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.SubmitCommentReviewStatus = exports.CommentReviewStatus = exports.ReactionType = exports.FeedItemType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.PaywallIapType = exports.AppPaywallType = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.FeedbackFormFieldType = exports.ContentCardActionType = exports.IdentityType = exports.PolicyDocumentType = exports.AppleSsoScope = exports.DomainStatus = exports.DomainType = exports.ApplicationType = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = void 0;
|
15
|
+
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = exports.MailTemplateVersionStatus = exports.MailTemplateType = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = void 0;
|
16
16
|
var TicketType;
|
17
17
|
(function (TicketType) {
|
18
18
|
TicketType["bug"] = "bug";
|
@@ -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;
|
@@ -200,6 +200,11 @@ var CreatorUpdateChannelType;
|
|
200
200
|
CreatorUpdateChannelType["feed"] = "feed";
|
201
201
|
CreatorUpdateChannelType["notification"] = "notification";
|
202
202
|
})(CreatorUpdateChannelType || (exports.CreatorUpdateChannelType = CreatorUpdateChannelType = {}));
|
203
|
+
var CreatorUpdateGiveawayCriteria;
|
204
|
+
(function (CreatorUpdateGiveawayCriteria) {
|
205
|
+
CreatorUpdateGiveawayCriteria["comment"] = "comment";
|
206
|
+
CreatorUpdateGiveawayCriteria["reaction"] = "reaction";
|
207
|
+
})(CreatorUpdateGiveawayCriteria || (exports.CreatorUpdateGiveawayCriteria = CreatorUpdateGiveawayCriteria = {}));
|
203
208
|
var FeedItemType;
|
204
209
|
(function (FeedItemType) {
|
205
210
|
FeedItemType["youtubeVideo"] = "youtube_video";
|
@@ -756,20 +761,34 @@ var ParraAPI = /** @class */ (function () {
|
|
756
761
|
"content-type": "application/json",
|
757
762
|
} }, options));
|
758
763
|
};
|
759
|
-
this.
|
764
|
+
this.listChatChannels = function (tenant_id, query, options) {
|
760
765
|
if (options === void 0) { options = {}; }
|
761
766
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels"), __assign({ method: "get", query: query }, options));
|
762
767
|
};
|
763
|
-
this.
|
768
|
+
this.getChatChannel = function (tenant_id, channel_id, query, options) {
|
764
769
|
if (options === void 0) { options = {}; }
|
765
|
-
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id), __assign({ method: "
|
766
|
-
"content-type": "application/json",
|
767
|
-
} }, 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));
|
768
771
|
};
|
769
772
|
this.deleteChatChannel = function (tenant_id, channel_id, options) {
|
770
773
|
if (options === void 0) { options = {}; }
|
771
774
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id), __assign({ method: "delete" }, options));
|
772
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
|
+
};
|
773
792
|
this.paginateMessagesForChatChannel = function (tenant_id, channel_id, query, options) {
|
774
793
|
if (options === void 0) { options = {}; }
|
775
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));
|
@@ -964,6 +983,12 @@ var ParraAPI = /** @class */ (function () {
|
|
964
983
|
if (options === void 0) { options = {}; }
|
965
984
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id), __assign({ method: "delete" }, options));
|
966
985
|
};
|
986
|
+
this.calculateGiveawayWinnerForCreatorUpdate = function (tenant_id, creator_update_id, body, options) {
|
987
|
+
if (options === void 0) { options = {}; }
|
988
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id, "/giveaway/winner"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
989
|
+
"content-type": "application/json",
|
990
|
+
} }, options));
|
991
|
+
};
|
967
992
|
this.sendCreatorUpdateForTenant = function (tenant_id, creator_update_id, options) {
|
968
993
|
if (options === void 0) { options = {}; }
|
969
994
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id, "/send"), __assign({ method: "post" }, options));
|