@parra/parra-js-sdk 0.2.123 → 0.2.125

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.
@@ -419,6 +419,11 @@ export interface CampaignAction {
419
419
  app_area_id?: string | null;
420
420
  }
421
421
  export declare type CampaignActionList = Array<CampaignAction>;
422
+ export interface UpdateFeedbackFormRequestBody {
423
+ title: string;
424
+ description?: string | null;
425
+ data: FeedbackFormData;
426
+ }
422
427
  export interface CreateFeedbackFormRequestBody {
423
428
  title: string;
424
429
  description?: string | null;
@@ -443,12 +448,12 @@ export interface FeedbackFormResponse {
443
448
  description?: string | null;
444
449
  data: FeedbackFormData;
445
450
  }
446
- export interface FeedbackForm {
451
+ export interface FeedbackFormDataStub {
447
452
  id: string;
448
453
  created_at: string;
449
454
  updated_at: string;
450
455
  deleted_at?: string | null;
451
- data?: FeedbackFormData;
456
+ data: FeedbackFormData;
452
457
  }
453
458
  export interface FeedbackFormData {
454
459
  title: string;
@@ -458,20 +463,26 @@ export interface FeedbackFormData {
458
463
  export interface FeedbackFormField {
459
464
  name: string;
460
465
  title?: string;
466
+ helper_text?: string;
461
467
  type: string;
462
468
  required?: boolean;
463
469
  data: FeedbackFormFieldData;
464
470
  }
465
- export declare type FeedbackFormFieldData = FeedbackFormTextFieldData | FeedbackFormTextFieldData;
471
+ export declare type FeedbackFormFieldData = FeedbackFormTextFieldData | FeedbackFormSelectFieldData | FeedbackFormInputFieldData;
466
472
  export interface FeedbackFormTextFieldData {
467
473
  placeholder?: string;
474
+ lines?: number;
468
475
  max_lines?: number;
469
476
  min_characters?: number;
470
477
  max_characters?: number;
478
+ max_height?: number;
471
479
  }
472
- export interface FeedbackFormTextFieldData {
480
+ export interface FeedbackFormInputFieldData {
481
+ placeholder?: string;
482
+ }
483
+ export interface FeedbackFormSelectFieldData {
473
484
  placeholder?: string;
474
- options?: Array<FeedbackFormSelectFieldOption>;
485
+ options: Array<FeedbackFormSelectFieldOption>;
475
486
  }
476
487
  export interface FeedbackFormSelectFieldOption {
477
488
  title: string;
@@ -1103,10 +1114,11 @@ declare class ParraAPI {
1103
1114
  $filter?: string | undefined;
1104
1115
  $expand?: string | undefined;
1105
1116
  $search?: string | undefined;
1106
- } | undefined) => Promise<TenantUserCollectionResponse>;
1117
+ } | undefined) => Promise<FeedbackFormCollectionResponse>;
1107
1118
  createFeedbackFormForTenantById: (tenant_id: string, body?: CreateFeedbackFormRequestBody | undefined) => Promise<FeedbackFormResponse>;
1108
1119
  getFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string) => Promise<FeedbackFormResponse>;
1109
- getFormById: (feedback_form_id: string) => Promise<FeedbackFormResponse>;
1120
+ updateFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string, body?: UpdateFeedbackFormRequestBody | undefined) => Promise<FeedbackFormResponse>;
1121
+ getFormById: (feedback_form_id: string) => Promise<FeedbackFormDataStub>;
1110
1122
  submitFormById: (feedback_form_id: string, body?: FeedbackFormResponse | undefined) => Promise<Response>;
1111
1123
  createQuestion: (body?: CreateQuestionRequestBody | undefined) => Promise<Question>;
1112
1124
  paginateQuestions: (query?: {
package/dist/ParraAPI.js CHANGED
@@ -392,6 +392,15 @@ var ParraAPI = /** @class */ (function () {
392
392
  method: "get",
393
393
  });
394
394
  };
395
+ this.updateFeedbackFormForTenantById = function (tenant_id, feedback_form_id, body) {
396
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feedback/forms/").concat(feedback_form_id), {
397
+ method: "put",
398
+ body: JSON.stringify(body),
399
+ headers: {
400
+ "content-type": "application/json",
401
+ },
402
+ });
403
+ };
395
404
  this.getFormById = function (feedback_form_id) {
396
405
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/feedback/forms/").concat(feedback_form_id), {
397
406
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.123",
3
+ "version": "0.2.125",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",