@parra/parra-js-sdk 0.3.13 → 0.3.15

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.
@@ -6,16 +6,16 @@ export interface CheckAuthorization {
6
6
  allowed: boolean;
7
7
  }
8
8
  export interface Size {
9
- width?: number;
10
- height?: number;
9
+ width: number;
10
+ height: number;
11
11
  }
12
12
  export interface EntityIdStub {
13
13
  id: string;
14
14
  }
15
15
  export interface ImageAssetStub {
16
16
  id: string;
17
- size?: Size;
18
- url?: string;
17
+ size: Size;
18
+ url: string;
19
19
  }
20
20
  export interface Entity {
21
21
  id: string;
@@ -104,7 +104,7 @@ export interface Price {
104
104
  export interface UnitPrice {
105
105
  currency: Currency;
106
106
  amount: number;
107
- interval?: Interval;
107
+ interval: Interval;
108
108
  }
109
109
  export interface Plan {
110
110
  id: string;
@@ -285,12 +285,12 @@ export interface Answer {
285
285
  created_at: string;
286
286
  updated_at: string;
287
287
  deleted_at?: string | null;
288
- question_id?: string;
289
- user_id?: string;
290
- tenant_id?: string;
288
+ question_id: string;
289
+ user_id: string;
290
+ tenant_id: string;
291
291
  campaign_id?: string | null;
292
292
  bucket_item_id?: string | null;
293
- data?: AnswerData;
293
+ data: AnswerData;
294
294
  }
295
295
  export interface ChoiceQuestionMetricsOption {
296
296
  title: string;
@@ -372,24 +372,24 @@ export interface QuestionMetrics {
372
372
  created_at: string;
373
373
  updated_at: string;
374
374
  deleted_at?: string | null;
375
- question_id?: string;
375
+ question_id: string;
376
376
  campaign_id?: string | null;
377
- answer_count?: number;
378
- type?: QuestionType;
379
- kind?: QuestionKind;
380
- data?: QuestionMetricsData;
377
+ answer_count: number;
378
+ type: QuestionType;
379
+ kind: QuestionKind;
380
+ data: QuestionMetricsData;
381
381
  }
382
382
  export interface Question {
383
383
  id: string;
384
384
  created_at: string;
385
385
  updated_at: string;
386
386
  deleted_at?: string | null;
387
- tenant_id?: string;
388
- title?: string;
387
+ tenant_id: string;
388
+ title: string;
389
389
  subtitle?: string | null;
390
- type?: QuestionType;
391
- kind?: QuestionKind;
392
- data?: QuestionData;
390
+ type: QuestionType;
391
+ kind: QuestionKind;
392
+ data: QuestionData;
393
393
  answer_count?: number | null;
394
394
  answer?: Answer;
395
395
  metrics?: QuestionMetrics;
@@ -464,9 +464,9 @@ export interface FeedbackFormField {
464
464
  data: FeedbackFormFieldData;
465
465
  }
466
466
  export interface FeedbackFormData {
467
- title?: string;
467
+ title: string;
468
468
  description?: string | null;
469
- fields?: Array<FeedbackFormField>;
469
+ fields: Array<FeedbackFormField>;
470
470
  }
471
471
  export interface UpdateFeedbackFormRequestBody {
472
472
  title: string;
@@ -1005,6 +1005,10 @@ export interface ApiKeyCollectionResponse {
1005
1005
  total_count: number;
1006
1006
  data: Array<ApiKey>;
1007
1007
  }
1008
+ export interface TenantInvitationRequestBody {
1009
+ name: string;
1010
+ email: string;
1011
+ }
1008
1012
  export interface TeamMember {
1009
1013
  id: string;
1010
1014
  created_at: string;
@@ -1212,6 +1216,8 @@ declare class ParraAPI {
1212
1216
  deleteApiKeyForTenantById: (tenant_id: string, api_key_id: string) => Promise<Response>;
1213
1217
  createApiKeyForTenantById: (tenant_id: string, body: CreateApiKeyRequestBody) => Promise<ApiKeyWithSecretResponse>;
1214
1218
  getApiKeysForTenantById: (tenant_id: string) => Promise<ApiKeyCollectionResponse>;
1219
+ getInvitationsForTenantById: (tenant_id: string) => Promise<Array<TenantInvitation>>;
1220
+ createInvitationForTenantById: (tenant_id: string, body: TenantInvitationRequestBody) => Promise<TenantInvitation>;
1215
1221
  getTeamMembersForTenantById: (tenant_id: string) => Promise<Array<TeamMember>>;
1216
1222
  deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
1217
1223
  getUserForTenantById: (tenant_id: string, user_id: string) => Promise<TenantUser>;
package/dist/ParraAPI.js CHANGED
@@ -567,6 +567,20 @@ var ParraAPI = /** @class */ (function () {
567
567
  method: "get",
568
568
  });
569
569
  };
570
+ this.getInvitationsForTenantById = function (tenant_id) {
571
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/invitations"), {
572
+ method: "get",
573
+ });
574
+ };
575
+ this.createInvitationForTenantById = function (tenant_id, body) {
576
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/invitations"), {
577
+ method: "post",
578
+ body: JSON.stringify(body),
579
+ headers: {
580
+ "content-type": "application/json",
581
+ },
582
+ });
583
+ };
570
584
  this.getTeamMembersForTenantById = function (tenant_id) {
571
585
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/team-members"), {
572
586
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",