@parra/parra-js-sdk 0.2.66 → 0.2.70
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 +16 -4
- package/dist/ParraAPI.js +15 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -114,6 +114,12 @@ export interface Audience {
|
|
|
114
114
|
export interface CreateSubscriberRequestBody {
|
|
115
115
|
email: string;
|
|
116
116
|
}
|
|
117
|
+
export interface AuthToken {
|
|
118
|
+
access_token: string;
|
|
119
|
+
}
|
|
120
|
+
export interface CreateAuthTokenRequestBody {
|
|
121
|
+
user_id: string;
|
|
122
|
+
}
|
|
117
123
|
export interface Entitlement {
|
|
118
124
|
}
|
|
119
125
|
export declare type Entitlements = Array<Entitlement>;
|
|
@@ -155,6 +161,7 @@ export interface TenantMetrics {
|
|
|
155
161
|
export interface CreateApiKeyRequestBody {
|
|
156
162
|
name: string;
|
|
157
163
|
description?: string | null;
|
|
164
|
+
is_public: boolean;
|
|
158
165
|
}
|
|
159
166
|
export interface ApiKey {
|
|
160
167
|
id: string;
|
|
@@ -163,6 +170,7 @@ export interface ApiKey {
|
|
|
163
170
|
deleted_at?: string | null;
|
|
164
171
|
name: string;
|
|
165
172
|
description?: string | null;
|
|
173
|
+
is_public: boolean;
|
|
166
174
|
tenant_id: string;
|
|
167
175
|
}
|
|
168
176
|
export interface ApiKeyWithSecretResponse {
|
|
@@ -172,6 +180,7 @@ export interface ApiKeyWithSecretResponse {
|
|
|
172
180
|
deleted_at?: string | null;
|
|
173
181
|
name: string;
|
|
174
182
|
description?: string | null;
|
|
183
|
+
is_public: boolean;
|
|
175
184
|
tenant_id: string;
|
|
176
185
|
secret: string;
|
|
177
186
|
}
|
|
@@ -195,7 +204,7 @@ export interface TenantInvitation {
|
|
|
195
204
|
member_id?: string | null;
|
|
196
205
|
name: string;
|
|
197
206
|
email: string;
|
|
198
|
-
code
|
|
207
|
+
code?: string;
|
|
199
208
|
expires_at?: string;
|
|
200
209
|
accepted_at?: string | null;
|
|
201
210
|
}
|
|
@@ -214,6 +223,10 @@ export interface TeamMember {
|
|
|
214
223
|
export declare type TeamMemberListResponse = Array<TeamMember>;
|
|
215
224
|
export interface AnswerData {
|
|
216
225
|
}
|
|
226
|
+
export interface FormResponse {
|
|
227
|
+
}
|
|
228
|
+
export interface Form {
|
|
229
|
+
}
|
|
217
230
|
export interface FeedbackMetrics {
|
|
218
231
|
questions_created_this_month: number;
|
|
219
232
|
}
|
|
@@ -452,9 +465,6 @@ export interface UserCollectionResponse {
|
|
|
452
465
|
export interface CheckAuthorizationRequestBody {
|
|
453
466
|
scope: string;
|
|
454
467
|
}
|
|
455
|
-
export interface AuthToken {
|
|
456
|
-
access_token: string;
|
|
457
|
-
}
|
|
458
468
|
export interface CheckAuthorization {
|
|
459
469
|
allowed: boolean;
|
|
460
470
|
}
|
|
@@ -488,6 +498,8 @@ declare class ParraAPI {
|
|
|
488
498
|
deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
|
|
489
499
|
updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
|
|
490
500
|
getCards: () => Promise<CardsResponse>;
|
|
501
|
+
getFormById: (form_id: string) => Promise<Form>;
|
|
502
|
+
submitFormById: (form_id: string, body?: FormResponse | undefined) => Promise<Response>;
|
|
491
503
|
createQuestion: (body?: CreateQuestionRequestBody | undefined) => Promise<Question>;
|
|
492
504
|
paginateQuestions: (query?: {
|
|
493
505
|
$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,9 @@
|
|
|
1
|
+
import { AuthorizationProvider, HTTPInterceptor } from '@parra/http-client';
|
|
1
2
|
import 'isomorphic-fetch';
|
|
2
|
-
import { HTTPRequestBody, HTTPUrlComponent, HTTPResponse, HTTPHeaders, HTTPQuery, HTTPMethod, HTTPLogger, HTTPOptions, HTTPRequest, HTTPRequestWithoutMethod, HTTPClient, HTTPInterceptor, Authorization, AuthFunctionProvider, AuthPromiseProvider, AuthorizationProvider, AuthInterceptor } from '@parra/http-client';
|
|
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 { ParraAPI
|
|
6
|
+
export { ParraAPI };
|
|
6
7
|
export declare type ParraAPIType = typeof ParraAPI;
|
|
7
8
|
export interface ParraAPIOptions {
|
|
8
9
|
authorization?: AuthorizationProvider;
|
package/dist/index.js
CHANGED
|
@@ -17,13 +17,14 @@ 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.
|
|
21
|
-
require("isomorphic-fetch");
|
|
20
|
+
exports.ParraAPI = exports.AuthInterceptor = exports.HTTPClient = void 0;
|
|
22
21
|
var http_client_1 = require("@parra/http-client");
|
|
23
|
-
|
|
24
|
-
Object.defineProperty(exports, "AuthInterceptor", { enumerable: true, get: function () { return http_client_1.AuthInterceptor; } });
|
|
22
|
+
require("isomorphic-fetch");
|
|
25
23
|
var ParraAPI_1 = __importDefault(require("./ParraAPI"));
|
|
26
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; } });
|
|
27
28
|
__exportStar(require("./ParraAPI"), exports);
|
|
28
29
|
function default_1(options) {
|
|
29
30
|
if (options === void 0) { options = {}; }
|