@parra/parra-js-sdk 0.2.71 → 0.2.73

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.
@@ -234,6 +234,34 @@ export interface TeamMember {
234
234
  export declare type TeamMemberListResponse = Array<TeamMember>;
235
235
  export interface AnswerData {
236
236
  }
237
+ export interface UpdateAppAreaRequestBody {
238
+ title: string;
239
+ slug: string;
240
+ description?: string | null;
241
+ }
242
+ export interface CreateAppAreaRequestBody {
243
+ title: string;
244
+ slug: string;
245
+ description?: string | null;
246
+ }
247
+ export interface AppArea {
248
+ id: string;
249
+ created_at: string;
250
+ updated_at: string;
251
+ deleted_at?: string | null;
252
+ tenant_id: string;
253
+ title: string;
254
+ slug: string;
255
+ description?: string | null;
256
+ }
257
+ export interface AppAreaCollectionResponse {
258
+ page: number;
259
+ page_count: number;
260
+ page_size: number;
261
+ total_count: number;
262
+ data: Array<AppArea>;
263
+ }
264
+ export declare type AppAreaListResponse = Array<AppArea>;
237
265
  export interface FormResponse {
238
266
  }
239
267
  export interface Form {
@@ -302,6 +330,7 @@ export declare type QuestionData = ChoiceQuestionBody;
302
330
  export interface UpdateQuestionRequestBody {
303
331
  title: string;
304
332
  subtitle?: string | null;
333
+ app_area_id?: string | null;
305
334
  data: MutableQuestionData | null;
306
335
  active?: boolean;
307
336
  expires_at?: string | null;
@@ -310,6 +339,7 @@ export interface UpdateQuestionRequestBody {
310
339
  export interface CreateQuestionRequestBody {
311
340
  title: string;
312
341
  subtitle?: string | null;
342
+ app_area_id?: string | null;
313
343
  data: MutableQuestionData | null;
314
344
  active?: boolean;
315
345
  expires_at?: string | null;
@@ -330,6 +360,7 @@ export interface Question {
330
360
  tenant_id: string;
331
361
  title: string;
332
362
  subtitle?: string | null;
363
+ app_area_id?: string | null;
333
364
  type: QuestionType | null;
334
365
  kind: QuestionKind | null;
335
366
  data: QuestionData | null;
@@ -340,6 +371,7 @@ export interface Question {
340
371
  closed_at?: string | null;
341
372
  answer?: Answer | null;
342
373
  metrics?: QuestionMetrics | null;
374
+ app_area?: AppArea | null;
343
375
  }
344
376
  export interface QuestionCollectionResponse {
345
377
  page: number;
@@ -511,6 +543,11 @@ declare class ParraAPI {
511
543
  getTeamMembersForTenantById: (tenant_id: string) => Promise<TeamMemberListResponse>;
512
544
  deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
513
545
  updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
546
+ createAppArea: (tenant_id: string, body?: CreateAppAreaRequestBody | undefined) => Promise<AppArea>;
547
+ listAppAreas: (tenant_id: string) => Promise<AppAreaListResponse>;
548
+ getAppAreaById: (tenant_id: string, app_area_id: string) => Promise<AppArea>;
549
+ updateAppAreaById: (tenant_id: string, app_area_id: string, body?: UpdateAppAreaRequestBody | undefined) => Promise<AppArea>;
550
+ deleteAppAreaById: (tenant_id: string, app_area_id: string) => Promise<Response>;
514
551
  getCards: () => Promise<CardsResponse>;
515
552
  getFormById: (form_id: string) => Promise<Form>;
516
553
  submitFormById: (form_id: string, body?: FormResponse | undefined) => Promise<Response>;
package/dist/ParraAPI.js CHANGED
@@ -197,6 +197,39 @@ var ParraAPI = /** @class */ (function () {
197
197
  method: "post",
198
198
  });
199
199
  };
200
+ this.createAppArea = function (tenant_id, body) {
201
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app-areas"), {
202
+ method: "post",
203
+ body: JSON.stringify(body),
204
+ headers: {
205
+ "content-type": "application/json",
206
+ },
207
+ });
208
+ };
209
+ this.listAppAreas = function (tenant_id) {
210
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app-areas"), {
211
+ method: "get",
212
+ });
213
+ };
214
+ this.getAppAreaById = function (tenant_id, app_area_id) {
215
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app-areas/").concat(app_area_id), {
216
+ method: "get",
217
+ });
218
+ };
219
+ this.updateAppAreaById = function (tenant_id, app_area_id, body) {
220
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app-areas/").concat(app_area_id), {
221
+ method: "put",
222
+ body: JSON.stringify(body),
223
+ headers: {
224
+ "content-type": "application/json",
225
+ },
226
+ });
227
+ };
228
+ this.deleteAppAreaById = function (tenant_id, app_area_id) {
229
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app-areas/").concat(app_area_id), {
230
+ method: "delete",
231
+ });
232
+ };
200
233
  this.getCards = function () {
201
234
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/cards"), {
202
235
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.71",
3
+ "version": "0.2.73",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",