@parra/parra-js-sdk 0.2.60 → 0.2.63

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.
@@ -200,9 +200,6 @@ export interface TenantInvitation {
200
200
  accepted_at?: string | null;
201
201
  }
202
202
  export declare type TenantInvitationListResponse = Array<TenantInvitation>;
203
- export interface AcceptTenantInvitationRequestBody {
204
- code: string;
205
- }
206
203
  export interface TeamMember {
207
204
  id: string;
208
205
  created_at: string;
@@ -261,12 +258,12 @@ export declare enum QuestionKind {
261
258
  }
262
259
  export interface MutableChoiceQuestionOption {
263
260
  title: string | null;
264
- value: string | null;
261
+ value?: string | null;
265
262
  is_other?: boolean | null;
266
263
  }
267
264
  export interface ChoiceQuestionOption {
268
265
  title: string | null;
269
- value: string | null;
266
+ value?: string | null;
270
267
  is_other?: boolean | null;
271
268
  id: string | null;
272
269
  }
@@ -343,7 +340,7 @@ export interface ChoiceQuestionMetricsBody {
343
340
  }
344
341
  export interface ChoiceQuestionMetricsOption {
345
342
  title: string | null;
346
- value: string | null;
343
+ value?: string | null;
347
344
  is_other?: boolean | null;
348
345
  id: string | null;
349
346
  answer_count: number;
@@ -486,7 +483,7 @@ declare class ParraAPI {
486
483
  getTenantForApiKeyById: (api_key_id: string) => Promise<Tenant>;
487
484
  getInvitationsForTenantById: (tenant_id: string) => Promise<TenantInvitationListResponse>;
488
485
  createInvitationForTenantById: (tenant_id: string, body?: TenantInvitationRequestBody | undefined) => Promise<TenantInvitation>;
489
- acceptInvitationForTenantById: (tenant_id: string, body?: AcceptTenantInvitationRequestBody | undefined) => Promise<Response>;
486
+ acceptInvitationByCode: (invitation_code: string) => Promise<TenantInvitation>;
490
487
  getTeamMembersForTenantById: (tenant_id: string) => Promise<TeamMemberListResponse>;
491
488
  deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
492
489
  updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
@@ -524,7 +521,7 @@ declare class ParraAPI {
524
521
  createIdentityForUserById: (user_id: string, body: CreateIdentityRequestBody) => Promise<IdentityResponse>;
525
522
  listIdentitiesForUserById: (user_id: string) => Promise<Array<IdentityResponse>>;
526
523
  getUserByProviderAndProviderUserId: (provider: string, provider_user_id: string) => Promise<UserResponse>;
527
- checkAuthorization1: (body?: CheckAuthorizationRequestBody | undefined) => Promise<CheckAuthorization>;
524
+ checkAuthorization: (body?: CheckAuthorizationRequestBody | undefined) => Promise<CheckAuthorization>;
528
525
  getUserInfo: () => Promise<UserInfoResponse>;
529
526
  getParraAuthToken: () => Promise<AuthToken>;
530
527
  }
package/dist/ParraAPI.js CHANGED
@@ -154,14 +154,9 @@ var ParraAPI = /** @class */ (function () {
154
154
  },
155
155
  });
156
156
  };
157
- this.acceptInvitationForTenantById = function (tenant_id, body) {
158
- return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/invitations/accept"), {
157
+ this.acceptInvitationByCode = function (invitation_code) {
158
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/invitations/").concat(invitation_code, "/accept"), {
159
159
  method: "post",
160
- body: JSON.stringify(body),
161
- headers: {
162
- "content-type": "application/json",
163
- },
164
- raw: true,
165
160
  });
166
161
  };
167
162
  this.getTeamMembersForTenantById = function (tenant_id) {
@@ -301,7 +296,7 @@ var ParraAPI = /** @class */ (function () {
301
296
  method: "get",
302
297
  });
303
298
  };
304
- this.checkAuthorization1 = function (body) {
299
+ this.checkAuthorization = function (body) {
305
300
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/authorization/check"), {
306
301
  method: "post",
307
302
  body: JSON.stringify(body),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.60",
3
+ "version": "0.2.63",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",