@parra/parra-js-sdk 0.3.592 → 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 {
@@ -884,6 +916,7 @@ export interface CreateArticleRequestBody {
884
916
  }
885
917
  export declare enum ArticleStatus {
886
918
  draft = "draft",
919
+ dirty = "dirty",
887
920
  published = "published",
888
921
  scheduled = "scheduled"
889
922
  }
@@ -938,6 +971,8 @@ export interface ArticleStub {
938
971
  header_image?: ImageAssetStub | null;
939
972
  status: ArticleStatus;
940
973
  scheduled_at?: string | null;
974
+ dirty?: boolean;
975
+ published?: boolean;
941
976
  published_at?: string | null;
942
977
  last_updated_at: string | null;
943
978
  authors: Array<CreatorUpdateSenderStub>;
@@ -959,6 +994,8 @@ export interface Article {
959
994
  header_image?: ImageAssetStub | null;
960
995
  status: ArticleStatus;
961
996
  scheduled_at?: string | null;
997
+ dirty?: boolean;
998
+ published?: boolean;
962
999
  published_at?: string | null;
963
1000
  last_updated_at: string | null;
964
1001
  authors: Array<CreatorUpdateSenderStub>;
@@ -984,6 +1021,14 @@ export interface ArticleAuthor {
984
1021
  avatar?: ImageAssetStub | null;
985
1022
  verified: boolean;
986
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
+ }
987
1032
  export interface ScheduleArticleRequestBody {
988
1033
  schedule_at: string;
989
1034
  }
@@ -1005,6 +1050,7 @@ export interface AppArticleStub {
1005
1050
  authors: Array<CreatorUpdateSenderStub>;
1006
1051
  reaction_options?: Array<ReactionOptionGroup>;
1007
1052
  reactions?: Array<ReactionSummary>;
1053
+ tags?: Array<TagStub>;
1008
1054
  }
1009
1055
  export interface AppArticleCollectionResponse {
1010
1056
  page: number;
@@ -1057,6 +1103,7 @@ export interface AppArticle {
1057
1103
  authors: Array<CreatorUpdateSenderStub>;
1058
1104
  reaction_options?: Array<ReactionOptionGroup>;
1059
1105
  reactions?: Array<ReactionSummary>;
1106
+ tags?: Array<TagStub>;
1060
1107
  json_content: ArticleContent;
1061
1108
  html_content: string;
1062
1109
  text_content: string;
@@ -3585,6 +3632,7 @@ export interface AppVideo {
3585
3632
  comments?: CommentSummary;
3586
3633
  products?: Array<AppAffiliateProduct>;
3587
3634
  sponsors?: Array<AppSponsor>;
3635
+ tags?: Array<TagStub>;
3588
3636
  }
3589
3637
  export interface AppContentCard {
3590
3638
  id: string;
@@ -6711,6 +6759,12 @@ declare class ParraAPI {
6711
6759
  getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
6712
6760
  createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
6713
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>;
6714
6768
  createArticle: (tenant_id: string, body: CreateArticleRequestBody, options?: Options) => Promise<Article>;
6715
6769
  paginateArticles: (tenant_id: string, query?: {
6716
6770
  limit?: number;
@@ -6721,11 +6775,14 @@ declare class ParraAPI {
6721
6775
  deleteArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Response>;
6722
6776
  addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
6723
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>;
6724
6780
  publishArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
6725
6781
  scheduleArticleById: (tenant_id: string, article_id: string, body: ScheduleArticleRequestBody, options?: Options) => Promise<Article>;
6726
6782
  paginateAppArticles: (tenant_id: string, query?: {
6727
6783
  limit?: number;
6728
6784
  offset?: number;
6785
+ tag_id?: string;
6729
6786
  }, options?: Options) => Promise<AppArticleCollectionResponse>;
6730
6787
  getAppArticleById: (tenant_id: string, article_id: string, query?: {
6731
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,9 +137,14 @@ 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";
147
+ ArticleStatus["dirty"] = "dirty";
143
148
  ArticleStatus["published"] = "published";
144
149
  ArticleStatus["scheduled"] = "scheduled";
145
150
  })(ArticleStatus || (exports.ArticleStatus = ArticleStatus = {}));
@@ -834,6 +839,26 @@ var ParraAPI = /** @class */ (function () {
834
839
  "content-type": "application/json",
835
840
  }, raw: true }, options));
836
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
+ };
837
862
  this.createArticle = function (tenant_id, body, options) {
838
863
  if (options === void 0) { options = {}; }
839
864
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles"), method: "post", body: JSON.stringify(body), headers: {
@@ -868,6 +893,16 @@ var ParraAPI = /** @class */ (function () {
868
893
  if (options === void 0) { options = {}; }
869
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));
870
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
+ };
871
906
  this.publishArticleById = function (tenant_id, article_id, options) {
872
907
  if (options === void 0) { options = {}; }
873
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.592",
3
+ "version": "0.3.594",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",