@parra/parra-js-sdk 0.3.387 → 0.3.388

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.
@@ -592,6 +592,19 @@ export interface ContentCard {
592
592
  badge?: string | null;
593
593
  action?: ContentCardAction | null;
594
594
  }
595
+ export interface CollectionResponse {
596
+ page: number;
597
+ page_count: number;
598
+ page_size: number;
599
+ total_count: number;
600
+ }
601
+ export interface ContentCardCollectionResponse {
602
+ page: number;
603
+ page_count: number;
604
+ page_size: number;
605
+ total_count: number;
606
+ data: Array<ContentCard>;
607
+ }
595
608
  export interface CreateCheckoutSessionRequestBody {
596
609
  plan_id: string;
597
610
  success_url?: string | null;
@@ -1014,12 +1027,6 @@ export interface CreateFaqRequestBody {
1014
1027
  body: string;
1015
1028
  faq_section_id?: string | null;
1016
1029
  }
1017
- export interface CollectionResponse {
1018
- page: number;
1019
- page_count: number;
1020
- page_size: number;
1021
- total_count: number;
1022
- }
1023
1030
  export interface FaqCollectionResponse {
1024
1031
  page: number;
1025
1032
  page_count: number;
@@ -4124,6 +4131,15 @@ declare class ParraAPI {
4124
4131
  uploadHeaderForTenantRelease: (tenant_id: string, release_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
4125
4132
  uploadAttachmentForTicketById: (tenant_id: string, ticket_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
4126
4133
  createContentCard: (tenant_id: string, body: CreateContentCardRequestBody, options?: Options) => Promise<ContentCard>;
4134
+ paginateContentCards: (tenant_id: string, query?: {
4135
+ $select?: string;
4136
+ $top?: number;
4137
+ $skip?: number;
4138
+ $orderby?: string;
4139
+ $filter?: string;
4140
+ $expand?: string;
4141
+ $search?: string;
4142
+ }, options?: Options) => Promise<ContentCardCollectionResponse>;
4127
4143
  updateBackgroundImageForContentCardById: (tenant_id: string, content_card_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ContentCard>;
4128
4144
  uploadAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
4129
4145
  uploadLogoForTenantById: (tenant_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
package/dist/ParraAPI.js CHANGED
@@ -483,12 +483,13 @@ var ParraAPI = /** @class */ (function () {
483
483
  };
484
484
  this.createContentCard = function (tenant_id, body, options) {
485
485
  if (options === void 0) { options = {}; }
486
- var formData = new FormData();
487
- Object.entries(body).forEach(function (_a) {
488
- var key = _a[0], value = _a[1];
489
- formData.append(key, value);
490
- });
491
- return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/content-cards"), __assign({ method: "post", body: formData, headers: {} }, options));
486
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/content-cards"), __assign({ method: "post", body: JSON.stringify(body), headers: {
487
+ "content-type": "application/json",
488
+ } }, options));
489
+ };
490
+ this.paginateContentCards = function (tenant_id, query, options) {
491
+ if (options === void 0) { options = {}; }
492
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/content-cards"), __assign({ method: "get", query: query }, options));
492
493
  };
493
494
  this.updateBackgroundImageForContentCardById = function (tenant_id, content_card_id, body, options) {
494
495
  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.387",
3
+ "version": "0.3.388",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",