@parra/parra-js-sdk 0.2.14 → 0.2.18

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.
@@ -11,6 +11,7 @@ export interface Tenant {
11
11
  name: string;
12
12
  is_test: boolean;
13
13
  }
14
+ export declare type TenantListResponse = Array<Tenant>;
14
15
  export interface TenantCollectionResponse {
15
16
  page: number;
16
17
  page_count: number;
@@ -127,6 +128,7 @@ export interface Question {
127
128
  active?: boolean;
128
129
  expires_at?: string | null;
129
130
  answer_quota?: number | null;
131
+ answer_count?: number | null;
130
132
  answer?: Answer;
131
133
  }
132
134
  export interface QuestionCollectionResponse {
@@ -251,7 +253,7 @@ declare class ParraAPI {
251
253
  });
252
254
  getTenantById: (tenant_id: string) => Promise<Tenant>;
253
255
  createTenantForUserById: (user_id: string, body?: CreateTenantRequestBody | undefined) => Promise<Tenant>;
254
- getTenantsForUserById: (user_id: string) => Promise<TenantCollectionResponse>;
256
+ getTenantsForUserById: (user_id: string) => Promise<TenantListResponse>;
255
257
  getTenantByUserIdAndTenantId: (user_id: string, tenant_id: string) => Promise<Tenant>;
256
258
  createApiKeyForTenantById: (tenant_id: string, body?: CreateApiKeyRequestBody | undefined) => Promise<ApiKeyWithSecretResponse>;
257
259
  getApiKeysForTenantById: (tenant_id: string) => Promise<ApiKeyCollectionResponse>;
@@ -269,6 +271,7 @@ declare class ParraAPI {
269
271
  $search?: string | undefined;
270
272
  } | undefined) => Promise<QuestionCollectionResponse>;
271
273
  getQuestionById: (question_id: string) => Promise<Question>;
274
+ deleteQuestionById: (question_id: string) => Promise<Response>;
272
275
  answerQuestionById: (question_id: string, body?: AnswerQuestionBody | undefined) => Promise<Response>;
273
276
  createUser: (body: CreateUserRequestBody) => Promise<UserResponse>;
274
277
  listUsers: (query?: {
package/dist/ParraAPI.js CHANGED
@@ -94,6 +94,11 @@ var ParraAPI = /** @class */ (function () {
94
94
  method: "get",
95
95
  });
96
96
  };
97
+ this.deleteQuestionById = function (question_id) {
98
+ return _this.http.execute(_this.options.baseUrl + "/v1/questions/" + question_id, {
99
+ method: "delete",
100
+ });
101
+ };
97
102
  this.answerQuestionById = function (question_id, body) {
98
103
  return _this.http.execute(_this.options.baseUrl + "/v1/questions/" + question_id + "/answer", {
99
104
  method: "put",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.14",
3
+ "version": "0.2.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",