@parra/parra-js-sdk 0.2.23 → 0.2.24

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.
@@ -126,9 +126,10 @@ export interface Question {
126
126
  kind: QuestionKind;
127
127
  data: QuestionData;
128
128
  active?: boolean;
129
- expires_at?: string | null;
130
129
  answer_quota?: number | null;
131
130
  answer_count?: number;
131
+ expires_at?: string | null;
132
+ closed_at?: string | null;
132
133
  answer?: Answer;
133
134
  metrics?: QuestionMetrics;
134
135
  }
@@ -294,6 +295,7 @@ declare class ParraAPI {
294
295
  } | undefined) => Promise<QuestionCollectionResponse>;
295
296
  getQuestionById: (question_id: string) => Promise<Question>;
296
297
  deleteQuestionById: (question_id: string) => Promise<Response>;
298
+ closeQuestionById: (question_id: string) => Promise<Response>;
297
299
  createMetricsForQuestionById: (question_id: string) => Promise<QuestionMetrics>;
298
300
  answerQuestionById: (question_id: string, body?: AnswerQuestionBody | undefined) => Promise<Response>;
299
301
  createUser: (body: CreateUserRequestBody) => Promise<UserResponse>;
package/dist/ParraAPI.js CHANGED
@@ -99,6 +99,11 @@ var ParraAPI = /** @class */ (function () {
99
99
  method: "delete",
100
100
  });
101
101
  };
102
+ this.closeQuestionById = function (question_id) {
103
+ return _this.http.execute(_this.options.baseUrl + "/v1/questions/" + question_id + "/close", {
104
+ method: "post",
105
+ });
106
+ };
102
107
  this.createMetricsForQuestionById = function (question_id) {
103
108
  return _this.http.execute(_this.options.baseUrl + "/v1/questions/" + question_id + "/metrics", {
104
109
  method: "post",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",