@parra/parra-js-sdk 0.3.239 → 0.3.241

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.
@@ -601,32 +601,25 @@ export interface TenantPlansResponse {
601
601
  export interface BillingPortalSession {
602
602
  url: string;
603
603
  }
604
- export interface CreateSubscriberRequestBody {
604
+ export interface CreateEmailSubscriberRequestBody {
605
605
  email: string;
606
606
  }
607
- export interface SubmitFeedbackFormResponseBody {
608
- }
609
- export interface FeedbackFormSubmission {
607
+ export interface AppFaq {
610
608
  id: string;
611
609
  created_at: string;
612
610
  updated_at: string;
613
611
  deleted_at?: string | null;
614
- feedback_form_id: string;
615
- user_id: string;
616
- data: SubmitFeedbackFormResponseBody;
617
- }
618
- export interface CollectionResponse {
619
- page: number;
620
- page_count: number;
621
- page_size: number;
622
- total_count: number;
612
+ title: string;
613
+ body: string;
623
614
  }
624
- export interface FeedbackFormSubmissionCollectionResponse {
625
- page: number;
626
- page_count: number;
627
- page_size: number;
628
- total_count: number;
629
- data: Array<FeedbackFormSubmission>;
615
+ export interface AppFaqSection {
616
+ id: string;
617
+ created_at: string;
618
+ updated_at: string;
619
+ deleted_at?: string | null;
620
+ title?: string | null;
621
+ description?: string | null;
622
+ items: Array<AppFaq>;
630
623
  }
631
624
  export declare enum FeedbackFormFieldType {
632
625
  text = "text",
@@ -674,6 +667,124 @@ export interface FeedbackFormDataStub {
674
667
  deleted_at?: string | null;
675
668
  data: FeedbackFormData;
676
669
  }
670
+ export interface AppFaqView {
671
+ id: string;
672
+ created_at: string;
673
+ updated_at: string;
674
+ deleted_at?: string | null;
675
+ tenant_id: string;
676
+ title?: string | null;
677
+ description?: string | null;
678
+ app_area_id?: string | null;
679
+ feedback_form_id?: string | null;
680
+ sections: Array<AppFaqSection>;
681
+ feedback_form?: FeedbackFormDataStub | null;
682
+ }
683
+ export interface UpdateFaqViewRequestBody {
684
+ title: string;
685
+ display_title?: string | null;
686
+ slug: string;
687
+ description?: string | null;
688
+ display_description?: string | null;
689
+ app_area_id?: string | null;
690
+ feedback_form_id?: string | null;
691
+ }
692
+ export interface CreateFaqViewRequestBody {
693
+ title: string;
694
+ display_title?: string | null;
695
+ slug: string;
696
+ description?: string | null;
697
+ display_description?: string | null;
698
+ app_area_id?: string | null;
699
+ feedback_form_id?: string | null;
700
+ }
701
+ export interface FaqSection {
702
+ id: string;
703
+ created_at: string;
704
+ updated_at: string;
705
+ deleted_at?: string | null;
706
+ tenant_id: string;
707
+ title: string;
708
+ display_title?: string | null;
709
+ description?: string | null;
710
+ display_description?: string | null;
711
+ }
712
+ export interface FaqView {
713
+ id: string;
714
+ created_at: string;
715
+ updated_at: string;
716
+ deleted_at?: string | null;
717
+ title: string;
718
+ display_title?: string | null;
719
+ slug: string;
720
+ description?: string | null;
721
+ display_description?: string | null;
722
+ app_area_id?: string | null;
723
+ feedback_form_id?: string | null;
724
+ tenant_id: string;
725
+ sections: Array<FaqSection>;
726
+ }
727
+ export interface UpdateFaqRequestBody {
728
+ title: string;
729
+ body: string;
730
+ }
731
+ export interface CreateFaqRequestBody {
732
+ title: string;
733
+ body: string;
734
+ faq_section_id?: string | null;
735
+ }
736
+ export interface Faq {
737
+ id: string;
738
+ created_at: string;
739
+ updated_at: string;
740
+ deleted_at?: string | null;
741
+ tenant_id: string;
742
+ title: string;
743
+ body: string;
744
+ }
745
+ export interface CollectionResponse {
746
+ page: number;
747
+ page_count: number;
748
+ page_size: number;
749
+ total_count: number;
750
+ }
751
+ export interface FaqCollectionResponse {
752
+ page: number;
753
+ page_count: number;
754
+ page_size: number;
755
+ total_count: number;
756
+ data: Array<Faq>;
757
+ }
758
+ export interface UpdateFaqSectionRequestBody {
759
+ title: string;
760
+ display_title?: string | null;
761
+ description?: string | null;
762
+ display_description?: string | null;
763
+ }
764
+ export interface CreateFaqSectionRequestBody {
765
+ title: string;
766
+ display_title?: string | null;
767
+ description?: string | null;
768
+ display_description?: string | null;
769
+ }
770
+ export interface SubmitFeedbackFormResponseBody {
771
+ }
772
+ export interface FeedbackFormSubmission {
773
+ id: string;
774
+ created_at: string;
775
+ updated_at: string;
776
+ deleted_at?: string | null;
777
+ feedback_form_id: string;
778
+ user_id: string;
779
+ data: SubmitFeedbackFormResponseBody;
780
+ }
781
+ export interface FeedbackFormSubmissionCollectionResponse {
782
+ page: number;
783
+ page_count: number;
784
+ page_size: number;
785
+ total_count: number;
786
+ data: Array<FeedbackFormSubmission>;
787
+ }
677
788
  export declare enum QuestionType {
678
789
  choice = "choice",
679
790
  checkbox = "checkbox",
@@ -2955,7 +3066,25 @@ declare class ParraAPI {
2955
3066
  createCheckoutSession: (body: CreateCheckoutSessionRequestBody, options?: Options) => Promise<CheckoutSession>;
2956
3067
  getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
2957
3068
  createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
2958
- createSubscriberForAudienceById: (audience_id: string, body: CreateSubscriberRequestBody, options?: Options) => Promise<Response>;
3069
+ createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
3070
+ listAppFaqs: (tenant_id: string, application_id: string, query?: {
3071
+ app_area_id?: string;
3072
+ }, options?: Options) => Promise<AppFaqView>;
3073
+ createFaqView: (tenant_id: string, body?: CreateFaqViewRequestBody, options?: Options) => Promise<FaqView>;
3074
+ listFaqViews: (tenant_id: string, options?: Options) => Promise<Array<FaqView>>;
3075
+ getFaqViewById: (tenant_id: string, faq_view_id: string, options?: Options) => Promise<FaqView>;
3076
+ updateFaqViewById: (tenant_id: string, faq_view_id: string, body: UpdateFaqViewRequestBody, options?: Options) => Promise<FaqView>;
3077
+ deleteFaqViewById: (tenant_id: string, faq_view_id: string, options?: Options) => Promise<Response>;
3078
+ createFaq: (tenant_id: string, body?: CreateFaqRequestBody, options?: Options) => Promise<Faq>;
3079
+ listFaqs: (tenant_id: string, options?: Options) => Promise<FaqCollectionResponse>;
3080
+ getFaqById: (tenant_id: string, faq_id: string, options?: Options) => Promise<Faq>;
3081
+ updateFaqById: (tenant_id: string, faq_id: string, body: UpdateFaqRequestBody, options?: Options) => Promise<Faq>;
3082
+ deleteFaqById: (tenant_id: string, faq_id: string, options?: Options) => Promise<Response>;
3083
+ createFaqSection: (tenant_id: string, faq_view_id: string, body?: CreateFaqSectionRequestBody, options?: Options) => Promise<FaqSection>;
3084
+ listFaqSections: (tenant_id: string, faq_view_id: string, options?: Options) => Promise<Array<FaqSection>>;
3085
+ getFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, options?: Options) => Promise<FaqSection>;
3086
+ updateFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, body: UpdateFaqSectionRequestBody, options?: Options) => Promise<FaqSection>;
3087
+ deleteFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, options?: Options) => Promise<Response>;
2959
3088
  paginateFeedbackFormResponsesForTenantUser: (tenant_id: string, user_id: string, query?: {
2960
3089
  $select?: string;
2961
3090
  $top?: number;
package/dist/ParraAPI.js CHANGED
@@ -438,12 +438,88 @@ var ParraAPI = /** @class */ (function () {
438
438
  if (options === void 0) { options = {}; }
439
439
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing-portal/sessions"), __assign({ method: "post" }, options));
440
440
  };
441
- this.createSubscriberForAudienceById = function (audience_id, body, options) {
441
+ this.createSubscriberForEmailAudienceById = function (email_audience_id, body, options) {
442
442
  if (options === void 0) { options = {}; }
443
- return _this.http.execute("".concat(_this.options.baseUrl, "/v1/email/audiences/").concat(audience_id, "/subscribers"), __assign({ method: "post", body: JSON.stringify(body), headers: {
443
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/email/audiences/").concat(email_audience_id, "/subscribers"), __assign({ method: "post", body: JSON.stringify(body), headers: {
444
444
  "content-type": "application/json",
445
445
  }, raw: true }, options));
446
446
  };
447
+ this.listAppFaqs = function (tenant_id, application_id, query, options) {
448
+ if (options === void 0) { options = {}; }
449
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/faqs"), __assign({ method: "get", query: query }, options));
450
+ };
451
+ this.createFaqView = function (tenant_id, body, options) {
452
+ if (options === void 0) { options = {}; }
453
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views"), __assign({ method: "post", body: JSON.stringify(body), headers: {
454
+ "content-type": "application/json",
455
+ } }, options));
456
+ };
457
+ this.listFaqViews = function (tenant_id, options) {
458
+ if (options === void 0) { options = {}; }
459
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views"), __assign({ method: "get" }, options));
460
+ };
461
+ this.getFaqViewById = function (tenant_id, faq_view_id, options) {
462
+ if (options === void 0) { options = {}; }
463
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id), __assign({ method: "get" }, options));
464
+ };
465
+ this.updateFaqViewById = function (tenant_id, faq_view_id, body, options) {
466
+ if (options === void 0) { options = {}; }
467
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
468
+ "content-type": "application/json",
469
+ } }, options));
470
+ };
471
+ this.deleteFaqViewById = function (tenant_id, faq_view_id, options) {
472
+ if (options === void 0) { options = {}; }
473
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id), __assign({ method: "delete" }, options));
474
+ };
475
+ this.createFaq = function (tenant_id, body, options) {
476
+ if (options === void 0) { options = {}; }
477
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs"), __assign({ method: "post", body: JSON.stringify(body), headers: {
478
+ "content-type": "application/json",
479
+ } }, options));
480
+ };
481
+ this.listFaqs = function (tenant_id, options) {
482
+ if (options === void 0) { options = {}; }
483
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs"), __assign({ method: "get" }, options));
484
+ };
485
+ this.getFaqById = function (tenant_id, faq_id, options) {
486
+ if (options === void 0) { options = {}; }
487
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/").concat(faq_id), __assign({ method: "get" }, options));
488
+ };
489
+ this.updateFaqById = function (tenant_id, faq_id, body, options) {
490
+ if (options === void 0) { options = {}; }
491
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/").concat(faq_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
492
+ "content-type": "application/json",
493
+ } }, options));
494
+ };
495
+ this.deleteFaqById = function (tenant_id, faq_id, options) {
496
+ if (options === void 0) { options = {}; }
497
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/").concat(faq_id), __assign({ method: "delete" }, options));
498
+ };
499
+ this.createFaqSection = function (tenant_id, faq_view_id, body, options) {
500
+ if (options === void 0) { options = {}; }
501
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id, "/sections"), __assign({ method: "post", body: JSON.stringify(body), headers: {
502
+ "content-type": "application/json",
503
+ } }, options));
504
+ };
505
+ this.listFaqSections = function (tenant_id, faq_view_id, options) {
506
+ if (options === void 0) { options = {}; }
507
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id, "/sections"), __assign({ method: "get" }, options));
508
+ };
509
+ this.getFaqSectionById = function (tenant_id, faq_view_id, faq_section_id, options) {
510
+ if (options === void 0) { options = {}; }
511
+ 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: "get" }, options));
512
+ };
513
+ this.updateFaqSectionById = function (tenant_id, faq_view_id, faq_section_id, body, options) {
514
+ if (options === void 0) { options = {}; }
515
+ 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: "put", body: JSON.stringify(body), headers: {
516
+ "content-type": "application/json",
517
+ } }, options));
518
+ };
519
+ this.deleteFaqSectionById = function (tenant_id, faq_view_id, faq_section_id, options) {
520
+ if (options === void 0) { options = {}; }
521
+ 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));
522
+ };
447
523
  this.paginateFeedbackFormResponsesForTenantUser = function (tenant_id, user_id, query, options) {
448
524
  if (options === void 0) { options = {}; }
449
525
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/feedback/form/responses"), __assign({ method: "get", query: query }, options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.239",
3
+ "version": "0.3.241",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",