@parra/parra-js-sdk 0.3.603 → 0.3.605

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.
@@ -963,6 +963,10 @@ export interface TagStub {
963
963
  title: string;
964
964
  slug?: string | null;
965
965
  }
966
+ export interface CommentSummary {
967
+ disabled: boolean;
968
+ comment_count: number;
969
+ }
966
970
  export interface ArticleStub {
967
971
  id: string;
968
972
  created_at: string;
@@ -986,6 +990,7 @@ export interface ArticleStub {
986
990
  reaction_options?: Array<ReactionOptionGroup>;
987
991
  reactions?: Array<ReactionSummary>;
988
992
  tags?: Array<TagStub>;
993
+ comments?: CommentSummary;
989
994
  }
990
995
  export interface Article {
991
996
  id: string;
@@ -1010,6 +1015,7 @@ export interface Article {
1010
1015
  reaction_options?: Array<ReactionOptionGroup>;
1011
1016
  reactions?: Array<ReactionSummary>;
1012
1017
  tags?: Array<TagStub>;
1018
+ comments?: CommentSummary;
1013
1019
  json_content?: ArticleContent | null;
1014
1020
  html_content?: string | null;
1015
1021
  text_content?: string | null;
@@ -1054,6 +1060,13 @@ export interface Comment {
1054
1060
  user: TenantUserStub;
1055
1061
  reactions?: Array<ReactionSummary>;
1056
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
+ }
1057
1070
  export interface CreateReactionRequestBody {
1058
1071
  option_id: string;
1059
1072
  }
@@ -1091,6 +1104,7 @@ export interface AppArticleStub {
1091
1104
  reaction_options?: Array<ReactionOptionGroup>;
1092
1105
  reactions?: Array<ReactionSummary>;
1093
1106
  tags?: Array<TagStub>;
1107
+ comments?: CommentSummary;
1094
1108
  }
1095
1109
  export interface AppArticleCollectionResponse {
1096
1110
  page: number;
@@ -1099,10 +1113,6 @@ export interface AppArticleCollectionResponse {
1099
1113
  total_count: number;
1100
1114
  data: Array<AppArticleStub>;
1101
1115
  }
1102
- export interface CommentSummary {
1103
- disabled: boolean;
1104
- comment_count: number;
1105
- }
1106
1116
  export interface Cta {
1107
1117
  url: string;
1108
1118
  title: string;
@@ -1144,10 +1154,10 @@ export interface AppArticle {
1144
1154
  reaction_options?: Array<ReactionOptionGroup>;
1145
1155
  reactions?: Array<ReactionSummary>;
1146
1156
  tags?: Array<TagStub>;
1157
+ comments?: CommentSummary;
1147
1158
  json_content: ArticleContent;
1148
1159
  html_content: string;
1149
1160
  text_content: string;
1150
- comments?: CommentSummary;
1151
1161
  products?: Array<AppAffiliateProduct>;
1152
1162
  sponsors?: Array<AppSponsor>;
1153
1163
  }
@@ -3859,13 +3869,6 @@ export interface AppVideoCollectionResponse {
3859
3869
  total_count: number;
3860
3870
  data: Array<AppVideo>;
3861
3871
  }
3862
- export interface CommentCollectionResponse {
3863
- page: number;
3864
- page_count: number;
3865
- page_size: number;
3866
- total_count: number;
3867
- data: Array<Comment>;
3868
- }
3869
3872
  export interface UpdateCommentRequestBody {
3870
3873
  body?: string;
3871
3874
  }
@@ -6815,6 +6818,12 @@ declare class ParraAPI {
6815
6818
  addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
6816
6819
  removeAuthorFromArticle: (tenant_id: string, article_id: string, author_id: string, options?: Options) => Promise<Response>;
6817
6820
  addCommentToArticle: (tenant_id: string, article_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
6821
+ paginateCommentsForArticle: (tenant_id: string, article_id: string, query?: {
6822
+ limit?: number;
6823
+ offset?: number;
6824
+ sort?: string;
6825
+ created_at?: string | null;
6826
+ }, options?: Options) => Promise<CommentCollectionResponse>;
6818
6827
  addReactionToArticle: (tenant_id: string, article_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
6819
6828
  removeReactionFromArticle: (tenant_id: string, article_id: string, reaction_id: string, options?: Options) => Promise<Response>;
6820
6829
  addTagToArticle: (tenant_id: string, article_id: string, body: AddTagRequestBody, options?: Options) => Promise<TagStub>;
package/dist/ParraAPI.js CHANGED
@@ -903,6 +903,10 @@ var ParraAPI = /** @class */ (function () {
903
903
  "content-type": "application/json",
904
904
  } }, options));
905
905
  };
906
+ this.paginateCommentsForArticle = function (tenant_id, article_id, query, options) {
907
+ if (options === void 0) { options = {}; }
908
+ 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));
909
+ };
906
910
  this.addReactionToArticle = function (tenant_id, article_id, body, options) {
907
911
  if (options === void 0) { options = {}; }
908
912
  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.603",
3
+ "version": "0.3.605",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",