@parra/parra-js-sdk 0.2.12 → 0.2.16
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 +8 -4
- package/dist/ParraAPI.js +7 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface Tenant {
|
|
|
11
11
|
name: string;
|
|
12
12
|
is_test: boolean;
|
|
13
13
|
}
|
|
14
|
+
export declare type TenantListResponse = Array<Tenant>;
|
|
14
15
|
export interface TenantCollectionResponse {
|
|
15
16
|
page: number;
|
|
16
17
|
page_count: number;
|
|
@@ -76,19 +77,21 @@ export interface CardsResponse {
|
|
|
76
77
|
items: Array<CardItem>;
|
|
77
78
|
}
|
|
78
79
|
export declare enum QuestionType {
|
|
79
|
-
choice = "choice"
|
|
80
|
+
choice = "choice",
|
|
81
|
+
rating = "rating"
|
|
80
82
|
}
|
|
81
83
|
export declare enum QuestionKind {
|
|
82
84
|
radio = "radio",
|
|
83
|
-
checkbox = "checkbox"
|
|
85
|
+
checkbox = "checkbox",
|
|
86
|
+
star = "star"
|
|
84
87
|
}
|
|
85
88
|
export interface CreateChoiceQuestionOption {
|
|
86
|
-
title
|
|
89
|
+
title: string;
|
|
87
90
|
value: string;
|
|
88
91
|
is_other?: boolean | null;
|
|
89
92
|
}
|
|
90
93
|
export interface ChoiceQuestionOption {
|
|
91
|
-
title
|
|
94
|
+
title: string;
|
|
92
95
|
value: string;
|
|
93
96
|
is_other?: boolean | null;
|
|
94
97
|
id: string;
|
|
@@ -267,6 +270,7 @@ declare class ParraAPI {
|
|
|
267
270
|
$search?: string | undefined;
|
|
268
271
|
} | undefined) => Promise<QuestionCollectionResponse>;
|
|
269
272
|
getQuestionById: (question_id: string) => Promise<Question>;
|
|
273
|
+
deleteQuestionById: (question_id: string) => Promise<Response>;
|
|
270
274
|
answerQuestionById: (question_id: string, body?: AnswerQuestionBody | undefined) => Promise<Response>;
|
|
271
275
|
createUser: (body: CreateUserRequestBody) => Promise<UserResponse>;
|
|
272
276
|
listUsers: (query?: {
|
package/dist/ParraAPI.js
CHANGED
|
@@ -8,11 +8,13 @@ var CardItemType;
|
|
|
8
8
|
var QuestionType;
|
|
9
9
|
(function (QuestionType) {
|
|
10
10
|
QuestionType["choice"] = "choice";
|
|
11
|
+
QuestionType["rating"] = "rating";
|
|
11
12
|
})(QuestionType = exports.QuestionType || (exports.QuestionType = {}));
|
|
12
13
|
var QuestionKind;
|
|
13
14
|
(function (QuestionKind) {
|
|
14
15
|
QuestionKind["radio"] = "radio";
|
|
15
16
|
QuestionKind["checkbox"] = "checkbox";
|
|
17
|
+
QuestionKind["star"] = "star";
|
|
16
18
|
})(QuestionKind = exports.QuestionKind || (exports.QuestionKind = {}));
|
|
17
19
|
var ParraAPI = /** @class */ (function () {
|
|
18
20
|
function ParraAPI(http, options) {
|
|
@@ -92,6 +94,11 @@ var ParraAPI = /** @class */ (function () {
|
|
|
92
94
|
method: "get",
|
|
93
95
|
});
|
|
94
96
|
};
|
|
97
|
+
this.deleteQuestionById = function (question_id) {
|
|
98
|
+
return _this.http.execute(_this.options.baseUrl + "/v1/questions/" + question_id, {
|
|
99
|
+
method: "delete",
|
|
100
|
+
});
|
|
101
|
+
};
|
|
95
102
|
this.answerQuestionById = function (question_id, body) {
|
|
96
103
|
return _this.http.execute(_this.options.baseUrl + "/v1/questions/" + question_id + "/answer", {
|
|
97
104
|
method: "put",
|