@parra/parra-js-sdk 0.2.64 → 0.2.69
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 +6 -0
- package/dist/ParraAPI.js +15 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -3
- package/package.json +2 -2
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -214,6 +214,10 @@ export interface TeamMember {
|
|
|
214
214
|
export declare type TeamMemberListResponse = Array<TeamMember>;
|
|
215
215
|
export interface AnswerData {
|
|
216
216
|
}
|
|
217
|
+
export interface FormResponse {
|
|
218
|
+
}
|
|
219
|
+
export interface Form {
|
|
220
|
+
}
|
|
217
221
|
export interface FeedbackMetrics {
|
|
218
222
|
questions_created_this_month: number;
|
|
219
223
|
}
|
|
@@ -488,6 +492,8 @@ declare class ParraAPI {
|
|
|
488
492
|
deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
|
|
489
493
|
updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
|
|
490
494
|
getCards: () => Promise<CardsResponse>;
|
|
495
|
+
getFormById: (form_id: string) => Promise<Form>;
|
|
496
|
+
submitFormById: (form_id: string, body?: FormResponse | undefined) => Promise<Response>;
|
|
491
497
|
createQuestion: (body?: CreateQuestionRequestBody | undefined) => Promise<Question>;
|
|
492
498
|
paginateQuestions: (query?: {
|
|
493
499
|
$select?: string | undefined;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -179,6 +179,21 @@ var ParraAPI = /** @class */ (function () {
|
|
|
179
179
|
method: "get",
|
|
180
180
|
});
|
|
181
181
|
};
|
|
182
|
+
this.getFormById = function (form_id) {
|
|
183
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/forms/").concat(form_id), {
|
|
184
|
+
method: "get",
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
this.submitFormById = function (form_id, body) {
|
|
188
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/forms/").concat(form_id, "/submit"), {
|
|
189
|
+
method: "post",
|
|
190
|
+
body: JSON.stringify(body),
|
|
191
|
+
headers: {
|
|
192
|
+
"content-type": "application/json",
|
|
193
|
+
},
|
|
194
|
+
raw: true,
|
|
195
|
+
});
|
|
196
|
+
};
|
|
182
197
|
this.createQuestion = function (body) {
|
|
183
198
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/questions"), {
|
|
184
199
|
method: "post",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import 'isomorphic-fetch';
|
|
2
1
|
import { AuthorizationProvider, HTTPInterceptor } from '@parra/http-client';
|
|
2
|
+
import 'isomorphic-fetch';
|
|
3
3
|
import { default as ParraAPI } from './ParraAPI';
|
|
4
|
+
export { HTTPRequestBody, HTTPUrlComponent, HTTPResponse, HTTPHeaders, HTTPQuery, HTTPMethod, HTTPLogger, HTTPOptions, HTTPRequest, HTTPRequestWithoutMethod, HTTPClient, HTTPInterceptor, Authorization, AuthFunctionProvider, AuthPromiseProvider, AuthorizationProvider, AuthInterceptor } from '@parra/http-client';
|
|
4
5
|
export * from './ParraAPI';
|
|
5
|
-
export * from '@parra/http-client';
|
|
6
6
|
export { ParraAPI };
|
|
7
7
|
export declare type ParraAPIType = typeof ParraAPI;
|
|
8
8
|
export interface ParraAPIOptions {
|
package/dist/index.js
CHANGED
|
@@ -17,13 +17,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.ParraAPI = void 0;
|
|
21
|
-
require("isomorphic-fetch");
|
|
20
|
+
exports.ParraAPI = exports.AuthInterceptor = exports.HTTPClient = void 0;
|
|
22
21
|
var http_client_1 = require("@parra/http-client");
|
|
22
|
+
require("isomorphic-fetch");
|
|
23
23
|
var ParraAPI_1 = __importDefault(require("./ParraAPI"));
|
|
24
24
|
Object.defineProperty(exports, "ParraAPI", { enumerable: true, get: function () { return ParraAPI_1.default; } });
|
|
25
|
+
var http_client_2 = require("@parra/http-client");
|
|
26
|
+
Object.defineProperty(exports, "HTTPClient", { enumerable: true, get: function () { return http_client_2.HTTPClient; } });
|
|
27
|
+
Object.defineProperty(exports, "AuthInterceptor", { enumerable: true, get: function () { return http_client_2.AuthInterceptor; } });
|
|
25
28
|
__exportStar(require("./ParraAPI"), exports);
|
|
26
|
-
__exportStar(require("@parra/http-client"), exports);
|
|
27
29
|
function default_1(options) {
|
|
28
30
|
if (options === void 0) { options = {}; }
|
|
29
31
|
var baseUrl = options.baseUrl || 'https://api.parra.io';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parra/parra-js-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.69",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typescript": "^4.6.4"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@parra/http-client": "0.2.
|
|
25
|
+
"@parra/http-client": "0.2.6",
|
|
26
26
|
"isomorphic-fetch": "^3.0.0"
|
|
27
27
|
}
|
|
28
28
|
}
|