@parra/parra-js-sdk 0.3.584 → 0.3.586

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.
@@ -954,9 +954,40 @@ export interface Article {
954
954
  reactions?: Array<ReactionSummary>;
955
955
  content: ArticleContent;
956
956
  }
957
+ export interface ArticleCollectionResponse {
958
+ page: number;
959
+ page_count: number;
960
+ page_size: number;
961
+ total_count: number;
962
+ data: Array<ArticleStub>;
963
+ }
957
964
  export interface ScheduleArticleRequestBody {
958
965
  schedule_at: string;
959
966
  }
967
+ export interface AppArticleStub {
968
+ id: string;
969
+ created_at: string;
970
+ updated_at: string;
971
+ deleted_at?: string | null;
972
+ tenant_id: string;
973
+ title: string;
974
+ short_title?: string;
975
+ slug: string;
976
+ content_preview: string;
977
+ header_image?: ImageAssetStub;
978
+ published_at: string;
979
+ last_updated_at: string;
980
+ authors: Array<CreatorUpdateSenderStub>;
981
+ reaction_options?: Array<ReactionOptionGroup>;
982
+ reactions?: Array<ReactionSummary>;
983
+ }
984
+ export interface AppArticleCollectionResponse {
985
+ page: number;
986
+ page_count: number;
987
+ page_size: number;
988
+ total_count: number;
989
+ data: Array<AppArticleStub>;
990
+ }
960
991
  export interface CommentSummary {
961
992
  disabled: boolean;
962
993
  comment_count: number;
@@ -983,23 +1014,6 @@ export interface AppSponsor {
983
1014
  background_color?: string | null;
984
1015
  text_color?: string | null;
985
1016
  }
986
- export interface AppArticleStub {
987
- id: string;
988
- created_at: string;
989
- updated_at: string;
990
- deleted_at?: string | null;
991
- tenant_id: string;
992
- title: string;
993
- short_title?: string;
994
- slug: string;
995
- content_preview: string;
996
- header_image?: ImageAssetStub;
997
- published_at: string;
998
- last_updated_at: string;
999
- authors: Array<CreatorUpdateSenderStub>;
1000
- reaction_options?: Array<ReactionOptionGroup>;
1001
- reactions?: Array<ReactionSummary>;
1002
- }
1003
1017
  export interface AppArticle {
1004
1018
  id: string;
1005
1019
  created_at: string;
@@ -1021,13 +1035,6 @@ export interface AppArticle {
1021
1035
  products?: Array<AppAffiliateProduct>;
1022
1036
  sponsors?: Array<AppSponsor>;
1023
1037
  }
1024
- export interface AppArticleCollectionResponse {
1025
- page: number;
1026
- page_count: number;
1027
- page_size: number;
1028
- total_count: number;
1029
- data: Array<AppArticle>;
1030
- }
1031
1038
  export interface UpdateDesignSystemRequestBody {
1032
1039
  name?: string;
1033
1040
  key?: string;
@@ -6676,13 +6683,19 @@ declare class ParraAPI {
6676
6683
  createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
6677
6684
  createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
6678
6685
  createArticle: (tenant_id: string, body: CreateArticleRequestBody, options?: Options) => Promise<Article>;
6679
- paginateArticles: (tenant_id: string, options?: Options) => Promise<Array<Article>>;
6686
+ paginateArticles: (tenant_id: string, query?: {
6687
+ limit?: number;
6688
+ offset?: number;
6689
+ }, options?: Options) => Promise<ArticleCollectionResponse>;
6680
6690
  getArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
6681
6691
  updateArticleById: (tenant_id: string, article_id: string, body?: UpdateArticleRequestBody, options?: Options) => Promise<Article>;
6682
6692
  deleteArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Response>;
6683
6693
  publishArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
6684
6694
  scheduleArticleById: (tenant_id: string, article_id: string, body: ScheduleArticleRequestBody, options?: Options) => Promise<Article>;
6685
- paginateAppArticles: (tenant_id: string, options?: Options) => Promise<AppArticleCollectionResponse>;
6695
+ paginateAppArticles: (tenant_id: string, query?: {
6696
+ limit?: number;
6697
+ offset?: number;
6698
+ }, options?: Options) => Promise<AppArticleCollectionResponse>;
6686
6699
  getAppArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<AppArticle>;
6687
6700
  createDesignSystem: (tenant_id: string, body: CreateDesignSystemRequestBody, options?: Options) => Promise<DesignSystem>;
6688
6701
  listDesignSystems: (tenant_id: string, options?: Options) => Promise<Array<DesignSystem>>;
package/dist/ParraAPI.js CHANGED
@@ -840,9 +840,9 @@ var ParraAPI = /** @class */ (function () {
840
840
  "content-type": "application/json",
841
841
  } }, options));
842
842
  };
843
- this.paginateArticles = function (tenant_id, options) {
843
+ this.paginateArticles = function (tenant_id, query, options) {
844
844
  if (options === void 0) { options = {}; }
845
- return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles"), method: "get" }, options));
845
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles"), method: "get", query: query }, options));
846
846
  };
847
847
  this.getArticleById = function (tenant_id, article_id, options) {
848
848
  if (options === void 0) { options = {}; }
@@ -868,9 +868,9 @@ var ParraAPI = /** @class */ (function () {
868
868
  "content-type": "application/json",
869
869
  } }, options));
870
870
  };
871
- this.paginateAppArticles = function (tenant_id, options) {
871
+ this.paginateAppArticles = function (tenant_id, query, options) {
872
872
  if (options === void 0) { options = {}; }
873
- return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/articles"), method: "get" }, options));
873
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/articles"), method: "get", query: query }, options));
874
874
  };
875
875
  this.getAppArticleById = function (tenant_id, article_id, options) {
876
876
  if (options === void 0) { options = {}; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.584",
3
+ "version": "0.3.586",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",