@parra/parra-js-sdk 0.3.593 → 0.3.594

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.
@@ -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;
@@ -6716,6 +6759,12 @@ declare class ParraAPI {
6716
6759
  getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
6717
6760
  createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
6718
6761
  createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
6762
+ createTag: (tenant_id: string, body: CreateTagRequestBody, options?: Options) => Promise<Tag>;
6763
+ paginateTags: (tenant_id: string, query?: {
6764
+ pool?: string;
6765
+ }, options?: Options) => Promise<TagCollectionResponse>;
6766
+ updateTagById: (tenant_id: string, tag_id: string, body?: UpdateTagRequestBody, options?: Options) => Promise<Tag>;
6767
+ deleteTagById: (tenant_id: string, tag_id: string, options?: Options) => Promise<Response>;
6719
6768
  createArticle: (tenant_id: string, body: CreateArticleRequestBody, options?: Options) => Promise<Article>;
6720
6769
  paginateArticles: (tenant_id: string, query?: {
6721
6770
  limit?: number;
@@ -6726,11 +6775,14 @@ declare class ParraAPI {
6726
6775
  deleteArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Response>;
6727
6776
  addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
6728
6777
  removeAuthorFromArticle: (tenant_id: string, article_id: string, author_id: string, options?: Options) => Promise<Response>;
6778
+ addTagToArticle: (tenant_id: string, article_id: string, body: AddTagRequestBody, options?: Options) => Promise<TagStub>;
6779
+ removeTagFromArticle: (tenant_id: string, article_id: string, tag_id: string, options?: Options) => Promise<Response>;
6729
6780
  publishArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
6730
6781
  scheduleArticleById: (tenant_id: string, article_id: string, body: ScheduleArticleRequestBody, options?: Options) => Promise<Article>;
6731
6782
  paginateAppArticles: (tenant_id: string, query?: {
6732
6783
  limit?: number;
6733
6784
  offset?: number;
6785
+ tag_id?: string;
6734
6786
  }, options?: Options) => Promise<AppArticleCollectionResponse>;
6735
6787
  getAppArticleById: (tenant_id: string, article_id: string, query?: {
6736
6788
  include?: string;
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.LessonType = 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.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 = 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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.593",
3
+ "version": "0.3.594",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",