@parra/parra-js-sdk 0.3.347 → 0.3.349

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.
@@ -915,6 +915,15 @@ export interface CreateFaqViewRequestBody {
915
915
  app_area_id?: string | null;
916
916
  feedback_form_id?: string | null;
917
917
  }
918
+ export interface Faq {
919
+ id: string;
920
+ created_at: string;
921
+ updated_at: string;
922
+ deleted_at?: string | null;
923
+ tenant_id: string;
924
+ title: string;
925
+ body: string;
926
+ }
918
927
  export interface FaqSection {
919
928
  id: string;
920
929
  created_at: string;
@@ -925,6 +934,7 @@ export interface FaqSection {
925
934
  display_title?: string | null;
926
935
  description?: string | null;
927
936
  display_description?: string | null;
937
+ items: Array<Faq>;
928
938
  }
929
939
  export interface FaqView {
930
940
  id: string;
@@ -950,15 +960,6 @@ export interface CreateFaqRequestBody {
950
960
  body: string;
951
961
  faq_section_id?: string | null;
952
962
  }
953
- export interface Faq {
954
- id: string;
955
- created_at: string;
956
- updated_at: string;
957
- deleted_at?: string | null;
958
- tenant_id: string;
959
- title: string;
960
- body: string;
961
- }
962
963
  export interface CollectionResponse {
963
964
  page: number;
964
965
  page_count: number;
@@ -984,6 +985,14 @@ export interface CreateFaqSectionRequestBody {
984
985
  description?: string | null;
985
986
  display_description?: string | null;
986
987
  }
988
+ export interface AddFaqToSectionRequestBody {
989
+ faq_id: string;
990
+ }
991
+ export interface FaqSectionItemStub {
992
+ id: string;
993
+ faq_id: string;
994
+ section_id: string;
995
+ }
987
996
  export interface CreateCreatorAttachmentAttachmentRequestBody {
988
997
  id: string;
989
998
  size: Size;
@@ -3832,6 +3841,8 @@ declare class ParraAPI {
3832
3841
  getFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, options?: Options) => Promise<FaqSection>;
3833
3842
  updateFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, body: UpdateFaqSectionRequestBody, options?: Options) => Promise<FaqSection>;
3834
3843
  deleteFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, options?: Options) => Promise<Response>;
3844
+ addFaqToSection: (tenant_id: string, faq_view_id: string, faq_section_id: string, body: AddFaqToSectionRequestBody, options?: Options) => Promise<FaqSectionItemStub>;
3845
+ removeFaqFromSection: (tenant_id: string, faq_view_id: string, faq_section_id: string, faq_section_item_id: string, options?: Options) => Promise<Response>;
3835
3846
  createCreatorUpdateForTenant: (tenant_id: string, body: CreateCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
3836
3847
  paginateCreatorUpdatesForTenant: (tenant_id: string, options?: Options) => Promise<CreatorUpdateCollectionResponse>;
3837
3848
  getCreatorUpdate: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<CreatorUpdate>;
package/dist/ParraAPI.js CHANGED
@@ -693,6 +693,16 @@ var ParraAPI = /** @class */ (function () {
693
693
  if (options === void 0) { options = {}; }
694
694
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id, "/sections/").concat(faq_section_id), __assign({ method: "delete" }, options));
695
695
  };
696
+ this.addFaqToSection = function (tenant_id, faq_view_id, faq_section_id, body, options) {
697
+ if (options === void 0) { options = {}; }
698
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id, "/sections/").concat(faq_section_id, "/items"), __assign({ method: "post", body: JSON.stringify(body), headers: {
699
+ "content-type": "application/json",
700
+ } }, options));
701
+ };
702
+ this.removeFaqFromSection = function (tenant_id, faq_view_id, faq_section_id, faq_section_item_id, options) {
703
+ if (options === void 0) { options = {}; }
704
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id, "/sections/").concat(faq_section_id, "/items/").concat(faq_section_item_id), __assign({ method: "delete" }, options));
705
+ };
696
706
  this.createCreatorUpdateForTenant = function (tenant_id, body, options) {
697
707
  if (options === void 0) { options = {}; }
698
708
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates"), __assign({ 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.347",
3
+ "version": "0.3.349",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",