@parra/parra-js-sdk 0.3.604 → 0.3.606

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.
@@ -1060,6 +1060,13 @@ export interface Comment {
1060
1060
  user: TenantUserStub;
1061
1061
  reactions?: Array<ReactionSummary>;
1062
1062
  }
1063
+ export interface CommentCollectionResponse {
1064
+ page: number;
1065
+ page_count: number;
1066
+ page_size: number;
1067
+ total_count: number;
1068
+ data: Array<Comment>;
1069
+ }
1063
1070
  export interface CreateReactionRequestBody {
1064
1071
  option_id: string;
1065
1072
  }
@@ -1128,6 +1135,101 @@ export interface AppSponsor {
1128
1135
  background_color?: string | null;
1129
1136
  text_color?: string | null;
1130
1137
  }
1138
+ export declare enum ContentType {
1139
+ video = "video",
1140
+ rssItem = "rss_item",
1141
+ article = "article"
1142
+ }
1143
+ export interface EntitlementStub {
1144
+ id: string;
1145
+ title: string;
1146
+ key: string;
1147
+ is_consumable: boolean;
1148
+ is_free: boolean;
1149
+ }
1150
+ export interface AppPaywallConfiguration {
1151
+ context?: string | null;
1152
+ entitlement?: EntitlementStub;
1153
+ }
1154
+ export interface YoutubeThumbnail {
1155
+ url: string;
1156
+ width: number;
1157
+ height: number;
1158
+ }
1159
+ export interface YoutubeThumbnails {
1160
+ default: YoutubeThumbnail;
1161
+ medium: YoutubeThumbnail;
1162
+ high: YoutubeThumbnail;
1163
+ standard: YoutubeThumbnail;
1164
+ maxres: YoutubeThumbnail;
1165
+ }
1166
+ export interface YoutubeStatistics {
1167
+ view_count?: number;
1168
+ like_count?: number;
1169
+ dislike_count?: number;
1170
+ favorite_count?: number;
1171
+ comment_count?: number;
1172
+ }
1173
+ export interface YoutubeVideo {
1174
+ id: string;
1175
+ created_at: string;
1176
+ updated_at: string;
1177
+ deleted_at?: string | null;
1178
+ url: string;
1179
+ video_id: string;
1180
+ title: string;
1181
+ channel_title: string;
1182
+ channel_id: string;
1183
+ description?: string;
1184
+ thumbnails: YoutubeThumbnails;
1185
+ published_at: string;
1186
+ live_broadcast_content?: string | null;
1187
+ statistics?: YoutubeStatistics | null;
1188
+ }
1189
+ export interface AppVideoFeedStub {
1190
+ id: string;
1191
+ created_at: string;
1192
+ updated_at: string;
1193
+ deleted_at?: string | null;
1194
+ url: string;
1195
+ video_id: string;
1196
+ title: string;
1197
+ channel_title: string;
1198
+ channel_id: string;
1199
+ description?: string;
1200
+ thumbnails: YoutubeThumbnails;
1201
+ published_at: string;
1202
+ live_broadcast_content?: string | null;
1203
+ statistics?: YoutubeStatistics | null;
1204
+ paywall?: AppPaywallConfiguration | null;
1205
+ tags?: Array<TagStub>;
1206
+ }
1207
+ export interface RssEnclosure {
1208
+ url: string;
1209
+ type: string;
1210
+ length?: number;
1211
+ }
1212
+ export interface AppRssItem {
1213
+ id: string;
1214
+ title: string;
1215
+ description: string;
1216
+ image_url?: string | null;
1217
+ link?: string | null;
1218
+ author?: string | null;
1219
+ enclosures?: Array<RssEnclosure> | null;
1220
+ published_at?: string | null;
1221
+ }
1222
+ export type ContentData = AppVideoFeedStub | AppRssItem | AppArticleStub;
1223
+ export interface ContentItem {
1224
+ id: string;
1225
+ type: ContentType;
1226
+ data: ContentData;
1227
+ }
1228
+ export interface Content {
1229
+ related_content?: Array<ContentItem>;
1230
+ next_content?: ContentItem | null;
1231
+ previous_content?: ContentItem | null;
1232
+ }
1131
1233
  export interface AppArticle {
1132
1234
  id: string;
1133
1235
  created_at: string;
@@ -1153,6 +1255,7 @@ export interface AppArticle {
1153
1255
  text_content: string;
1154
1256
  products?: Array<AppAffiliateProduct>;
1155
1257
  sponsors?: Array<AppSponsor>;
1258
+ content?: Content;
1156
1259
  }
1157
1260
  export interface UpdateDesignSystemRequestBody {
1158
1261
  name?: string;
@@ -3572,70 +3675,6 @@ export declare enum FeedItemType {
3572
3675
  rssItem = "rss_item",
3573
3676
  article = "article"
3574
3677
  }
3575
- export interface EntitlementStub {
3576
- id: string;
3577
- title: string;
3578
- key: string;
3579
- is_consumable: boolean;
3580
- is_free: boolean;
3581
- }
3582
- export interface AppPaywallConfiguration {
3583
- context?: string | null;
3584
- entitlement?: EntitlementStub;
3585
- }
3586
- export interface YoutubeThumbnail {
3587
- url: string;
3588
- width: number;
3589
- height: number;
3590
- }
3591
- export interface YoutubeThumbnails {
3592
- default: YoutubeThumbnail;
3593
- medium: YoutubeThumbnail;
3594
- high: YoutubeThumbnail;
3595
- standard: YoutubeThumbnail;
3596
- maxres: YoutubeThumbnail;
3597
- }
3598
- export interface YoutubeStatistics {
3599
- view_count?: number;
3600
- like_count?: number;
3601
- dislike_count?: number;
3602
- favorite_count?: number;
3603
- comment_count?: number;
3604
- }
3605
- export interface YoutubeVideo {
3606
- id: string;
3607
- created_at: string;
3608
- updated_at: string;
3609
- deleted_at?: string | null;
3610
- url: string;
3611
- video_id: string;
3612
- title: string;
3613
- channel_title: string;
3614
- channel_id: string;
3615
- description?: string;
3616
- thumbnails: YoutubeThumbnails;
3617
- published_at: string;
3618
- live_broadcast_content?: string | null;
3619
- statistics?: YoutubeStatistics | null;
3620
- }
3621
- export interface AppVideoFeedStub {
3622
- id: string;
3623
- created_at: string;
3624
- updated_at: string;
3625
- deleted_at?: string | null;
3626
- url: string;
3627
- video_id: string;
3628
- title: string;
3629
- channel_title: string;
3630
- channel_id: string;
3631
- description?: string;
3632
- thumbnails: YoutubeThumbnails;
3633
- published_at: string;
3634
- live_broadcast_content?: string | null;
3635
- statistics?: YoutubeStatistics | null;
3636
- paywall?: AppPaywallConfiguration | null;
3637
- tags?: Array<TagStub>;
3638
- }
3639
3678
  export interface AppContentCard {
3640
3679
  id: string;
3641
3680
  created_at: string;
@@ -3658,21 +3697,6 @@ export interface CreatorUpdateAppStub {
3658
3697
  attachments?: Array<CreatorUpdateAttachmentStub>;
3659
3698
  attachment_paywall?: AppPaywallConfiguration | null;
3660
3699
  }
3661
- export interface RssEnclosure {
3662
- url: string;
3663
- type: string;
3664
- length?: number;
3665
- }
3666
- export interface AppRssItem {
3667
- id: string;
3668
- title: string;
3669
- description: string;
3670
- image_url?: string | null;
3671
- link?: string | null;
3672
- author?: string | null;
3673
- enclosures?: Array<RssEnclosure> | null;
3674
- published_at?: string | null;
3675
- }
3676
3700
  export type FeedItemData = AppVideoFeedStub | AppContentCard | CreatorUpdateAppStub | AppRssItem | AppArticle;
3677
3701
  export interface AppFeedItem {
3678
3702
  id: string;
@@ -3832,6 +3856,13 @@ export interface AppVideoStub {
3832
3856
  reactions?: Array<ReactionSummary>;
3833
3857
  comments?: CommentSummary;
3834
3858
  }
3859
+ export interface AppVideoCollectionResponse {
3860
+ page: number;
3861
+ page_count: number;
3862
+ page_size: number;
3863
+ total_count: number;
3864
+ data: Array<AppVideoStub>;
3865
+ }
3835
3866
  export interface AppVideo {
3836
3867
  id: string;
3837
3868
  created_at: string;
@@ -3854,20 +3885,7 @@ export interface AppVideo {
3854
3885
  comments?: CommentSummary;
3855
3886
  products?: Array<AppAffiliateProduct>;
3856
3887
  sponsors?: Array<AppSponsor>;
3857
- }
3858
- export interface AppVideoCollectionResponse {
3859
- page: number;
3860
- page_count: number;
3861
- page_size: number;
3862
- total_count: number;
3863
- data: Array<AppVideo>;
3864
- }
3865
- export interface CommentCollectionResponse {
3866
- page: number;
3867
- page_count: number;
3868
- page_size: number;
3869
- total_count: number;
3870
- data: Array<Comment>;
3888
+ content?: Content;
3871
3889
  }
3872
3890
  export interface UpdateCommentRequestBody {
3873
3891
  body?: string;
@@ -6818,6 +6836,12 @@ declare class ParraAPI {
6818
6836
  addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
6819
6837
  removeAuthorFromArticle: (tenant_id: string, article_id: string, author_id: string, options?: Options) => Promise<Response>;
6820
6838
  addCommentToArticle: (tenant_id: string, article_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
6839
+ paginateCommentsForArticle: (tenant_id: string, article_id: string, query?: {
6840
+ limit?: number;
6841
+ offset?: number;
6842
+ sort?: string;
6843
+ created_at?: string | null;
6844
+ }, options?: Options) => Promise<CommentCollectionResponse>;
6821
6845
  addReactionToArticle: (tenant_id: string, article_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
6822
6846
  removeReactionFromArticle: (tenant_id: string, article_id: string, reaction_id: string, options?: Options) => Promise<Response>;
6823
6847
  addTagToArticle: (tenant_id: string, article_id: string, body: AddTagRequestBody, options?: Options) => Promise<TagStub>;
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.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;
14
+ 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.ContentType = 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 = exports.TextAlign = void 0;
16
16
  var TicketType;
17
17
  (function (TicketType) {
18
18
  TicketType["bug"] = "bug";
@@ -153,6 +153,12 @@ var ReactionType;
153
153
  ReactionType["emoji"] = "emoji";
154
154
  ReactionType["custom"] = "custom";
155
155
  })(ReactionType || (exports.ReactionType = ReactionType = {}));
156
+ var ContentType;
157
+ (function (ContentType) {
158
+ ContentType["video"] = "video";
159
+ ContentType["rssItem"] = "rss_item";
160
+ ContentType["article"] = "article";
161
+ })(ContentType || (exports.ContentType = ContentType = {}));
156
162
  var ThemeCornerRadiusStyle;
157
163
  (function (ThemeCornerRadiusStyle) {
158
164
  ThemeCornerRadiusStyle["rounded"] = "rounded";
@@ -903,6 +909,10 @@ var ParraAPI = /** @class */ (function () {
903
909
  "content-type": "application/json",
904
910
  } }, options));
905
911
  };
912
+ this.paginateCommentsForArticle = function (tenant_id, article_id, query, options) {
913
+ if (options === void 0) { options = {}; }
914
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/comments"), method: "get", query: query }, options));
915
+ };
906
916
  this.addReactionToArticle = function (tenant_id, article_id, body, options) {
907
917
  if (options === void 0) { options = {}; }
908
918
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/reactions"), method: "post", body: JSON.stringify(body), headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.604",
3
+ "version": "0.3.606",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",