@parra/parra-js-sdk 0.2.119 → 0.2.120
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.
- package/dist/ParraAPI.d.ts +67 -4
- package/dist/ParraAPI.js +19 -4
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -419,9 +419,62 @@ export interface CampaignAction {
|
|
|
419
419
|
app_area_id?: string | null;
|
|
420
420
|
}
|
|
421
421
|
export declare type CampaignActionList = Array<CampaignAction>;
|
|
422
|
-
export interface
|
|
422
|
+
export interface CreateFeedbackFormRequestBody {
|
|
423
|
+
title: string;
|
|
424
|
+
description?: string | null;
|
|
425
|
+
data: FeedbackFormData;
|
|
426
|
+
}
|
|
427
|
+
export interface FeedbackFormStub {
|
|
428
|
+
id: string;
|
|
429
|
+
created_at: string;
|
|
430
|
+
updated_at: string;
|
|
431
|
+
deleted_at?: string | null;
|
|
432
|
+
title: string;
|
|
433
|
+
description?: string | null;
|
|
434
|
+
}
|
|
435
|
+
export interface FeedbackFormResponse {
|
|
436
|
+
}
|
|
437
|
+
export interface FeedbackForm {
|
|
438
|
+
id: string;
|
|
439
|
+
created_at: string;
|
|
440
|
+
updated_at: string;
|
|
441
|
+
deleted_at?: string | null;
|
|
442
|
+
data?: FeedbackFormData;
|
|
443
|
+
}
|
|
444
|
+
export interface FeedbackFormData {
|
|
445
|
+
title: string;
|
|
446
|
+
description?: string | null;
|
|
447
|
+
fields: Array<FeedbackFormField>;
|
|
448
|
+
}
|
|
449
|
+
export interface FeedbackFormField {
|
|
450
|
+
name: string;
|
|
451
|
+
title?: string;
|
|
452
|
+
type: string;
|
|
453
|
+
required?: boolean;
|
|
454
|
+
data: FeedbackFormFieldData;
|
|
455
|
+
}
|
|
456
|
+
export declare type FeedbackFormFieldData = FeedbackFormTextFieldData | FeedbackFormTextFieldData;
|
|
457
|
+
export interface FeedbackFormTextFieldData {
|
|
458
|
+
placeholder?: string;
|
|
459
|
+
max_lines?: number;
|
|
460
|
+
min_characters?: number;
|
|
461
|
+
max_characters?: number;
|
|
423
462
|
}
|
|
424
|
-
export interface
|
|
463
|
+
export interface FeedbackFormTextFieldData {
|
|
464
|
+
placeholder?: string;
|
|
465
|
+
options?: Array<FeedbackFormSelectFieldOption>;
|
|
466
|
+
}
|
|
467
|
+
export interface FeedbackFormSelectFieldOption {
|
|
468
|
+
title: string;
|
|
469
|
+
value: string;
|
|
470
|
+
is_other?: boolean;
|
|
471
|
+
}
|
|
472
|
+
export interface FeedbackFormCollectionResponse {
|
|
473
|
+
page: number;
|
|
474
|
+
page_count: number;
|
|
475
|
+
page_size: number;
|
|
476
|
+
total_count: number;
|
|
477
|
+
data: Array<FeedbackFormStub>;
|
|
425
478
|
}
|
|
426
479
|
export interface FeedbackMetrics {
|
|
427
480
|
user_count: number;
|
|
@@ -1033,8 +1086,18 @@ declare class ParraAPI {
|
|
|
1033
1086
|
getCards: (query?: {
|
|
1034
1087
|
app_area_id?: string | undefined;
|
|
1035
1088
|
} | undefined) => Promise<CardsResponse>;
|
|
1036
|
-
|
|
1037
|
-
|
|
1089
|
+
paginateFeedbackFormsForTenantById: (tenant_id: string, query?: {
|
|
1090
|
+
$select?: string | undefined;
|
|
1091
|
+
$top?: number | undefined;
|
|
1092
|
+
$skip?: number | undefined;
|
|
1093
|
+
$orderby?: string | undefined;
|
|
1094
|
+
$filter?: string | undefined;
|
|
1095
|
+
$expand?: string | undefined;
|
|
1096
|
+
$search?: string | undefined;
|
|
1097
|
+
} | undefined) => Promise<TenantUserCollectionResponse>;
|
|
1098
|
+
createFeedbackFormForTenantById: (tenant_id: string, body?: CreateFeedbackFormRequestBody | undefined) => Promise<FeedbackForm>;
|
|
1099
|
+
getFormById: (feedback_form_id: string) => Promise<FeedbackForm>;
|
|
1100
|
+
submitFormById: (feedback_form_id: string, body?: FeedbackFormResponse | undefined) => Promise<Response>;
|
|
1038
1101
|
createQuestion: (body?: CreateQuestionRequestBody | undefined) => Promise<Question>;
|
|
1039
1102
|
paginateQuestions: (query?: {
|
|
1040
1103
|
$select?: string | undefined;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -372,13 +372,28 @@ var ParraAPI = /** @class */ (function () {
|
|
|
372
372
|
query: query,
|
|
373
373
|
});
|
|
374
374
|
};
|
|
375
|
-
this.
|
|
376
|
-
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/
|
|
375
|
+
this.paginateFeedbackFormsForTenantById = function (tenant_id, query) {
|
|
376
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feedback/forms"), {
|
|
377
|
+
method: "get",
|
|
378
|
+
query: query,
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
this.createFeedbackFormForTenantById = function (tenant_id, body) {
|
|
382
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feedback/forms"), {
|
|
383
|
+
method: "post",
|
|
384
|
+
body: JSON.stringify(body),
|
|
385
|
+
headers: {
|
|
386
|
+
"content-type": "application/json",
|
|
387
|
+
},
|
|
388
|
+
});
|
|
389
|
+
};
|
|
390
|
+
this.getFormById = function (feedback_form_id) {
|
|
391
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/feedback/forms/").concat(feedback_form_id), {
|
|
377
392
|
method: "get",
|
|
378
393
|
});
|
|
379
394
|
};
|
|
380
|
-
this.submitFormById = function (
|
|
381
|
-
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/forms/").concat(
|
|
395
|
+
this.submitFormById = function (feedback_form_id, body) {
|
|
396
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/feedback/forms/").concat(feedback_form_id, "/submit"), {
|
|
382
397
|
method: "post",
|
|
383
398
|
body: JSON.stringify(body),
|
|
384
399
|
headers: {
|