@parra/parra-js-sdk 0.3.593 → 0.3.595
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 +66 -2
- package/dist/ParraAPI.js +44 -6
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -858,6 +858,38 @@ export interface BillingPortalSession {
|
|
858
858
|
export interface CreateEmailSubscriberRequestBody {
|
859
859
|
email: string;
|
860
860
|
}
|
861
|
+
export declare enum TagPool {
|
862
|
+
content = "content"
|
863
|
+
}
|
864
|
+
export interface UpdateTagRequestBody {
|
865
|
+
title?: string;
|
866
|
+
description?: string | null;
|
867
|
+
slug?: string | null;
|
868
|
+
}
|
869
|
+
export interface CreateTagRequestBody {
|
870
|
+
title?: string;
|
871
|
+
description?: string | null;
|
872
|
+
slug?: string | null;
|
873
|
+
pool: TagPool;
|
874
|
+
}
|
875
|
+
export interface Tag {
|
876
|
+
id: string;
|
877
|
+
created_at: string;
|
878
|
+
updated_at: string;
|
879
|
+
deleted_at?: string | null;
|
880
|
+
tenant_id?: string | null;
|
881
|
+
title: string;
|
882
|
+
description?: string | null;
|
883
|
+
slug?: string | null;
|
884
|
+
pool: TagPool;
|
885
|
+
}
|
886
|
+
export interface TagCollectionResponse {
|
887
|
+
page: number;
|
888
|
+
page_count: number;
|
889
|
+
page_size: number;
|
890
|
+
total_count: number;
|
891
|
+
data: Array<Tag>;
|
892
|
+
}
|
861
893
|
export interface ArticleContent {
|
862
894
|
}
|
863
895
|
export interface UpdateArticleRequestBody {
|
@@ -989,6 +1021,14 @@ export interface ArticleAuthor {
|
|
989
1021
|
avatar?: ImageAssetStub | null;
|
990
1022
|
verified: boolean;
|
991
1023
|
}
|
1024
|
+
export interface AddTagRequestBody {
|
1025
|
+
tag_id: string;
|
1026
|
+
}
|
1027
|
+
export interface TagStub {
|
1028
|
+
id: string;
|
1029
|
+
title: string;
|
1030
|
+
slug?: string | null;
|
1031
|
+
}
|
992
1032
|
export interface ScheduleArticleRequestBody {
|
993
1033
|
schedule_at: string;
|
994
1034
|
}
|
@@ -1010,6 +1050,7 @@ export interface AppArticleStub {
|
|
1010
1050
|
authors: Array<CreatorUpdateSenderStub>;
|
1011
1051
|
reaction_options?: Array<ReactionOptionGroup>;
|
1012
1052
|
reactions?: Array<ReactionSummary>;
|
1053
|
+
tags?: Array<TagStub>;
|
1013
1054
|
}
|
1014
1055
|
export interface AppArticleCollectionResponse {
|
1015
1056
|
page: number;
|
@@ -1062,6 +1103,7 @@ export interface AppArticle {
|
|
1062
1103
|
authors: Array<CreatorUpdateSenderStub>;
|
1063
1104
|
reaction_options?: Array<ReactionOptionGroup>;
|
1064
1105
|
reactions?: Array<ReactionSummary>;
|
1106
|
+
tags?: Array<TagStub>;
|
1065
1107
|
json_content: ArticleContent;
|
1066
1108
|
html_content: string;
|
1067
1109
|
text_content: string;
|
@@ -3590,6 +3632,7 @@ export interface AppVideo {
|
|
3590
3632
|
comments?: CommentSummary;
|
3591
3633
|
products?: Array<AppAffiliateProduct>;
|
3592
3634
|
sponsors?: Array<AppSponsor>;
|
3635
|
+
tags?: Array<TagStub>;
|
3593
3636
|
}
|
3594
3637
|
export interface AppContentCard {
|
3595
3638
|
id: string;
|
@@ -3764,6 +3807,13 @@ export interface VideoCollectionResponse {
|
|
3764
3807
|
total_count: number;
|
3765
3808
|
data: Array<Video>;
|
3766
3809
|
}
|
3810
|
+
export interface AppVideoCollectionResponse {
|
3811
|
+
page: number;
|
3812
|
+
page_count: number;
|
3813
|
+
page_size: number;
|
3814
|
+
total_count: number;
|
3815
|
+
data: Array<AppVideo>;
|
3816
|
+
}
|
3767
3817
|
export interface CreateCommentRequestBody {
|
3768
3818
|
body: string;
|
3769
3819
|
}
|
@@ -6716,6 +6766,12 @@ declare class ParraAPI {
|
|
6716
6766
|
getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
|
6717
6767
|
createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
|
6718
6768
|
createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
|
6769
|
+
createTag: (tenant_id: string, body: CreateTagRequestBody, options?: Options) => Promise<Tag>;
|
6770
|
+
paginateTags: (tenant_id: string, query?: {
|
6771
|
+
pool?: string;
|
6772
|
+
}, options?: Options) => Promise<TagCollectionResponse>;
|
6773
|
+
updateTagById: (tenant_id: string, tag_id: string, body?: UpdateTagRequestBody, options?: Options) => Promise<Tag>;
|
6774
|
+
deleteTagById: (tenant_id: string, tag_id: string, options?: Options) => Promise<Response>;
|
6719
6775
|
createArticle: (tenant_id: string, body: CreateArticleRequestBody, options?: Options) => Promise<Article>;
|
6720
6776
|
paginateArticles: (tenant_id: string, query?: {
|
6721
6777
|
limit?: number;
|
@@ -6726,11 +6782,14 @@ declare class ParraAPI {
|
|
6726
6782
|
deleteArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Response>;
|
6727
6783
|
addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
|
6728
6784
|
removeAuthorFromArticle: (tenant_id: string, article_id: string, author_id: string, options?: Options) => Promise<Response>;
|
6785
|
+
addTagToArticle: (tenant_id: string, article_id: string, body: AddTagRequestBody, options?: Options) => Promise<TagStub>;
|
6786
|
+
removeTagFromArticle: (tenant_id: string, article_id: string, tag_id: string, options?: Options) => Promise<Response>;
|
6729
6787
|
publishArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
|
6730
6788
|
scheduleArticleById: (tenant_id: string, article_id: string, body: ScheduleArticleRequestBody, options?: Options) => Promise<Article>;
|
6731
6789
|
paginateAppArticles: (tenant_id: string, query?: {
|
6732
6790
|
limit?: number;
|
6733
6791
|
offset?: number;
|
6792
|
+
tag_id?: string;
|
6734
6793
|
}, options?: Options) => Promise<AppArticleCollectionResponse>;
|
6735
6794
|
getAppArticleById: (tenant_id: string, article_id: string, query?: {
|
6736
6795
|
include?: string;
|
@@ -6913,7 +6972,7 @@ declare class ParraAPI {
|
|
6913
6972
|
offset?: number;
|
6914
6973
|
}, options?: Options) => Promise<FeedCollectionResponse>;
|
6915
6974
|
createFeedForTenant: (tenant_id: string, body: CreateFeedRequestBody, options?: Options) => Promise<FeedView>;
|
6916
|
-
paginateItemsForAppFeed: (tenant_id: string,
|
6975
|
+
paginateItemsForAppFeed: (tenant_id: string, feed_id_or_slug: string, query?: {
|
6917
6976
|
limit?: number;
|
6918
6977
|
offset?: number;
|
6919
6978
|
}, options?: Options) => Promise<AppFeedItemCollectionResponse>;
|
@@ -6934,7 +6993,12 @@ declare class ParraAPI {
|
|
6934
6993
|
limit?: number;
|
6935
6994
|
offset?: number;
|
6936
6995
|
}, options?: Options) => Promise<VideoCollectionResponse>;
|
6937
|
-
|
6996
|
+
paginateAppVideos: (tenant_id: string, query?: {
|
6997
|
+
limit?: number;
|
6998
|
+
offset?: number;
|
6999
|
+
tag_id?: string;
|
7000
|
+
}, options?: Options) => Promise<AppVideoCollectionResponse>;
|
7001
|
+
getAppVideoById: (tenant_id: string, video_id: string, query?: {
|
6938
7002
|
include?: string;
|
6939
7003
|
}, options?: Options) => Promise<AppVideo>;
|
6940
7004
|
addCommentToVideo: (tenant_id: string, video_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
|
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.TenantUserMetricType = 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.ClientType = exports.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.BoardType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.SubmitCommentReviewStatus = exports.CommentReviewStatus = exports.FeedChannelType = exports.FeedItemType = exports.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = void 0;
|
14
|
+
exports.TextAlign = exports.HeadingTag = exports.QrCodeEcLevel = exports.QrCodeStyle = exports.QrCodeLogoPaddingStyle = exports.BorderRadiusType = exports.BorderStyle = exports.TextTransform = exports.FontFamilyType = exports.FontWeightType = exports.FontSizeType = exports.ParraTemplateType = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.ApplePurchaseType = exports.ApplePurchaseEnvironment = exports.PurchaseEnvironment = exports.PurchasePlatform = exports.PurchaseStatus = exports.PurchaseType = exports.PaywallIapType = exports.AppPaywallType = exports.ShareAssetType = exports.DesignTokenType = exports.ThemeCornerRadiusStyle = exports.ReactionType = exports.ArticleStatus = exports.TagPool = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.FeedbackFormFieldType = exports.ContentCardActionType = exports.IdentityType = exports.PolicyDocumentType = exports.AppleSsoScope = exports.TenantArchetype = 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.TenantUserMetricType = 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.ClientType = exports.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.BoardType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.SubmitCommentReviewStatus = exports.CommentReviewStatus = exports.FeedChannelType = exports.FeedItemType = exports.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.LessonType = void 0;
|
16
16
|
var TicketType;
|
17
17
|
(function (TicketType) {
|
18
18
|
TicketType["bug"] = "bug";
|
@@ -137,6 +137,10 @@ var SubscriptionStatus;
|
|
137
137
|
SubscriptionStatus["canceled"] = "canceled";
|
138
138
|
SubscriptionStatus["unpaid"] = "unpaid";
|
139
139
|
})(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
|
140
|
+
var TagPool;
|
141
|
+
(function (TagPool) {
|
142
|
+
TagPool["content"] = "content";
|
143
|
+
})(TagPool || (exports.TagPool = TagPool = {}));
|
140
144
|
var ArticleStatus;
|
141
145
|
(function (ArticleStatus) {
|
142
146
|
ArticleStatus["draft"] = "draft";
|
@@ -835,6 +839,26 @@ var ParraAPI = /** @class */ (function () {
|
|
835
839
|
"content-type": "application/json",
|
836
840
|
}, raw: true }, options));
|
837
841
|
};
|
842
|
+
this.createTag = function (tenant_id, body, options) {
|
843
|
+
if (options === void 0) { options = {}; }
|
844
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tags"), method: "post", body: JSON.stringify(body), headers: {
|
845
|
+
"content-type": "application/json",
|
846
|
+
} }, options));
|
847
|
+
};
|
848
|
+
this.paginateTags = function (tenant_id, query, options) {
|
849
|
+
if (options === void 0) { options = {}; }
|
850
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tags"), method: "get", query: query }, options));
|
851
|
+
};
|
852
|
+
this.updateTagById = function (tenant_id, tag_id, body, options) {
|
853
|
+
if (options === void 0) { options = {}; }
|
854
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tags/").concat(tag_id), method: "put", body: JSON.stringify(body), headers: {
|
855
|
+
"content-type": "application/json",
|
856
|
+
} }, options));
|
857
|
+
};
|
858
|
+
this.deleteTagById = function (tenant_id, tag_id, options) {
|
859
|
+
if (options === void 0) { options = {}; }
|
860
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tags/").concat(tag_id), method: "delete" }, options));
|
861
|
+
};
|
838
862
|
this.createArticle = function (tenant_id, body, options) {
|
839
863
|
if (options === void 0) { options = {}; }
|
840
864
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles"), method: "post", body: JSON.stringify(body), headers: {
|
@@ -869,6 +893,16 @@ var ParraAPI = /** @class */ (function () {
|
|
869
893
|
if (options === void 0) { options = {}; }
|
870
894
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/authors/").concat(author_id), method: "delete" }, options));
|
871
895
|
};
|
896
|
+
this.addTagToArticle = function (tenant_id, article_id, body, options) {
|
897
|
+
if (options === void 0) { options = {}; }
|
898
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/tags"), method: "post", body: JSON.stringify(body), headers: {
|
899
|
+
"content-type": "application/json",
|
900
|
+
} }, options));
|
901
|
+
};
|
902
|
+
this.removeTagFromArticle = function (tenant_id, article_id, tag_id, options) {
|
903
|
+
if (options === void 0) { options = {}; }
|
904
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/tags/").concat(tag_id), method: "delete" }, options));
|
905
|
+
};
|
872
906
|
this.publishArticleById = function (tenant_id, article_id, options) {
|
873
907
|
if (options === void 0) { options = {}; }
|
874
908
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/publish"), method: "post" }, options));
|
@@ -1553,9 +1587,9 @@ var ParraAPI = /** @class */ (function () {
|
|
1553
1587
|
"content-type": "application/json",
|
1554
1588
|
} }, options));
|
1555
1589
|
};
|
1556
|
-
this.paginateItemsForAppFeed = function (tenant_id,
|
1590
|
+
this.paginateItemsForAppFeed = function (tenant_id, feed_id_or_slug, query, options) {
|
1557
1591
|
if (options === void 0) { options = {}; }
|
1558
|
-
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/
|
1592
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/feeds/").concat(feed_id_or_slug, "/items"), method: "get", query: query }, options));
|
1559
1593
|
};
|
1560
1594
|
this.createChannelForFeed = function (tenant_id, feed_id_or_slug, body, options) {
|
1561
1595
|
if (options === void 0) { options = {}; }
|
@@ -1609,9 +1643,13 @@ var ParraAPI = /** @class */ (function () {
|
|
1609
1643
|
if (options === void 0) { options = {}; }
|
1610
1644
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/videos"), method: "get", query: query }, options));
|
1611
1645
|
};
|
1612
|
-
this.
|
1646
|
+
this.paginateAppVideos = function (tenant_id, query, options) {
|
1647
|
+
if (options === void 0) { options = {}; }
|
1648
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/videos"), method: "get", query: query }, options));
|
1649
|
+
};
|
1650
|
+
this.getAppVideoById = function (tenant_id, video_id, query, options) {
|
1613
1651
|
if (options === void 0) { options = {}; }
|
1614
|
-
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/videos/").concat(video_id), method: "get", query: query }, options));
|
1652
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/videos/").concat(video_id), method: "get", query: query }, options));
|
1615
1653
|
};
|
1616
1654
|
this.addCommentToVideo = function (tenant_id, video_id, body, options) {
|
1617
1655
|
if (options === void 0) { options = {}; }
|