@parra/parra-js-sdk 0.2.114 → 0.2.115

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.
@@ -436,13 +436,16 @@ export interface Answer {
436
436
  user_id: string;
437
437
  tenant_id: string;
438
438
  campaign_id?: string | null;
439
+ bucket_item_id?: string | null;
439
440
  data: AnswerData;
440
441
  }
441
442
  export interface AnswerQuestionBody {
443
+ bucket_item_id?: string | null;
442
444
  data: AnswerData;
443
445
  }
444
446
  export interface BulkAnswerQuestionBody {
445
447
  question_id: string;
448
+ bucket_item_id?: string | null;
446
449
  data: AnswerData;
447
450
  }
448
451
  export declare type BulkAnswerQuestionsBody = Array<BulkAnswerQuestionBody>;
@@ -644,12 +647,16 @@ export interface QuestionCollectionResponse {
644
647
  total_count: number;
645
648
  data: Array<Question>;
646
649
  }
650
+ export interface CreateQuestionMetricsRequestBody {
651
+ campaign_id?: string | null;
652
+ }
647
653
  export interface QuestionMetrics {
648
654
  id: string;
649
655
  created_at: string;
650
656
  updated_at: string;
651
657
  deleted_at?: string | null;
652
658
  question_id: string;
659
+ campaign_id?: string | null;
653
660
  answer_count: number;
654
661
  type: QuestionType;
655
662
  kind: QuestionKind;
@@ -1038,7 +1045,7 @@ declare class ParraAPI {
1038
1045
  getQuestionById: (question_id: string) => Promise<Question>;
1039
1046
  updateQuestionById: (question_id: string, body?: UpdateQuestionRequestBody | undefined) => Promise<Question>;
1040
1047
  deleteQuestionById: (question_id: string) => Promise<Response>;
1041
- createMetricsForQuestionById: (question_id: string) => Promise<QuestionMetrics>;
1048
+ createMetricsForQuestionById: (question_id: string, body?: CreateQuestionMetricsRequestBody | undefined) => Promise<QuestionMetrics>;
1042
1049
  answerQuestionById: (question_id: string, body?: AnswerQuestionBody | undefined) => Promise<Response>;
1043
1050
  paginateAnswersForQuestionById: (question_id: string, query?: {
1044
1051
  $select?: string | undefined;
package/dist/ParraAPI.js CHANGED
@@ -416,9 +416,13 @@ var ParraAPI = /** @class */ (function () {
416
416
  method: "delete",
417
417
  });
418
418
  };
419
- this.createMetricsForQuestionById = function (question_id) {
419
+ this.createMetricsForQuestionById = function (question_id, body) {
420
420
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/questions/").concat(question_id, "/metrics"), {
421
421
  method: "post",
422
+ body: JSON.stringify(body),
423
+ headers: {
424
+ "content-type": "application/json",
425
+ },
422
426
  });
423
427
  };
424
428
  this.answerQuestionById = function (question_id, body) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.114",
3
+ "version": "0.2.115",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",