@parra/parra-js-sdk 0.2.87 → 0.2.89

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.
@@ -301,6 +301,7 @@ export interface FormResponse {
301
301
  export interface Form {
302
302
  }
303
303
  export interface FeedbackMetrics {
304
+ user_count: number;
304
305
  answer_count: number;
305
306
  question_count: number;
306
307
  questions_created_this_month: number;
@@ -337,6 +338,7 @@ export interface CardsResponse {
337
338
  }
338
339
  export declare enum QuestionType {
339
340
  choice = "choice",
341
+ checkbox = "checkbox",
340
342
  rating = "rating"
341
343
  }
342
344
  export declare enum QuestionKind {
@@ -362,6 +364,23 @@ export interface ChoiceQuestionBody {
362
364
  export interface MutableChoiceQuestionBody {
363
365
  options: Array<MutableChoiceQuestionOption>;
364
366
  }
367
+ export interface MutableCheckboxQuestionOption {
368
+ title: string;
369
+ value: string;
370
+ is_other?: boolean | null;
371
+ }
372
+ export interface CheckboxQuestionOption {
373
+ title: string;
374
+ value: string;
375
+ is_other?: boolean | null;
376
+ id: string;
377
+ }
378
+ export interface CheckboxQuestionBody {
379
+ options: Array<CheckboxQuestionOption>;
380
+ }
381
+ export interface MutableCheckboxQuestionBody {
382
+ options: Array<MutableCheckboxQuestionOption>;
383
+ }
365
384
  export interface MutableImageQuestionOption {
366
385
  image_asset_id: string;
367
386
  title?: string | null;
@@ -380,8 +399,8 @@ export interface ImageQuestionBody {
380
399
  export interface MutableImageQuestionBody {
381
400
  options: Array<MutableImageQuestionOption>;
382
401
  }
383
- export declare type MutableQuestionData = MutableChoiceQuestionBody | MutableImageQuestionBody;
384
- export declare type QuestionData = ChoiceQuestionBody | ImageQuestionBody;
402
+ export declare type MutableQuestionData = MutableChoiceQuestionBody | MutableCheckboxQuestionBody | MutableImageQuestionBody;
403
+ export declare type QuestionData = ChoiceQuestionBody | CheckboxQuestionBody | ImageQuestionBody;
385
404
  export interface UpdateQuestionRequestBody {
386
405
  title: string;
387
406
  subtitle?: string | null;
@@ -390,6 +409,9 @@ export interface UpdateQuestionRequestBody {
390
409
  active?: boolean;
391
410
  expires_at?: string | null;
392
411
  answer_quota?: number | null;
412
+ show_expires_at?: boolean;
413
+ show_answer_count?: boolean;
414
+ show_answer_quota?: boolean;
393
415
  }
394
416
  export interface CreateQuestionRequestBody {
395
417
  title: string;
@@ -399,6 +421,9 @@ export interface CreateQuestionRequestBody {
399
421
  active?: boolean;
400
422
  expires_at?: string | null;
401
423
  answer_quota?: number | null;
424
+ show_expires_at?: boolean;
425
+ show_answer_count?: boolean;
426
+ show_answer_quota?: boolean;
402
427
  type: QuestionType;
403
428
  kind: QuestionKind;
404
429
  }
@@ -421,7 +446,10 @@ export interface Question {
421
446
  data: QuestionData;
422
447
  active?: boolean;
423
448
  answer_quota?: number | null;
424
- answer_count?: number;
449
+ answer_count?: number | null;
450
+ show_answer_count: boolean;
451
+ show_answer_quota: boolean;
452
+ show_expires_at: boolean;
425
453
  expires_at?: string | null;
426
454
  closed_at?: string | null;
427
455
  answer?: Answer;
@@ -445,7 +473,7 @@ export interface QuestionMetrics {
445
473
  type: QuestionType;
446
474
  data: QuestionMetricsData;
447
475
  }
448
- export declare type QuestionMetricsData = ChoiceQuestionMetricsBody | InageQuestionMetricsBody;
476
+ export declare type QuestionMetricsData = ChoiceQuestionMetricsBody | CheckboxQuestionMetricsBody | InageQuestionMetricsBody;
449
477
  export interface ChoiceQuestionMetricsBody {
450
478
  options: Array<ChoiceQuestionMetricsOption>;
451
479
  }
@@ -456,6 +484,16 @@ export interface ChoiceQuestionMetricsOption {
456
484
  id: string;
457
485
  answer_count: number;
458
486
  }
487
+ export interface CheckboxQuestionMetricsBody {
488
+ options: Array<CheckboxQuestionMetricsOption>;
489
+ }
490
+ export interface CheckboxQuestionMetricsOption {
491
+ title: string;
492
+ value: string;
493
+ is_other?: boolean | null;
494
+ id: string;
495
+ answer_count: number;
496
+ }
459
497
  export interface InageQuestionMetricsBody {
460
498
  options: Array<ImageQuestionMetricsOption>;
461
499
  }
@@ -467,6 +505,15 @@ export interface ImageQuestionMetricsOption {
467
505
  image_asset_url: string;
468
506
  answer_count: number;
469
507
  }
508
+ export interface Event {
509
+ name: string;
510
+ created_at: string | null;
511
+ event_properties?: Map<string, any> | null;
512
+ }
513
+ export interface Session {
514
+ user_properties?: Map<string, any> | null;
515
+ events?: Array<Event>;
516
+ }
470
517
  export interface NotificationRecipient {
471
518
  user_id?: string | null;
472
519
  }
package/dist/ParraAPI.js CHANGED
@@ -27,6 +27,7 @@ var CardItemType;
27
27
  var QuestionType;
28
28
  (function (QuestionType) {
29
29
  QuestionType["choice"] = "choice";
30
+ QuestionType["checkbox"] = "checkbox";
30
31
  QuestionType["rating"] = "rating";
31
32
  })(QuestionType = exports.QuestionType || (exports.QuestionType = {}));
32
33
  var QuestionKind;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.87",
3
+ "version": "0.2.89",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",