@parra/parra-js-sdk 0.3.12 → 0.3.14

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.
@@ -1,20 +1,73 @@
1
1
  import { HTTPClient } from "@parra/http-client";
2
+ export interface CheckAuthorizationRequestBody {
3
+ scope: string;
4
+ }
5
+ export interface CheckAuthorization {
6
+ allowed: boolean;
7
+ }
2
8
  export interface Size {
3
9
  width: number;
4
10
  height: number;
5
11
  }
6
- export interface UploadUserAvatarRequestBody {
7
- image: File;
8
- }
9
- export interface UploadImageAssetForTenantRequestBody {
10
- group: string;
11
- image: File;
12
+ export interface EntityIdStub {
13
+ id: string;
12
14
  }
13
15
  export interface ImageAssetStub {
14
16
  id: string;
15
17
  size: Size;
16
18
  url: string;
17
19
  }
20
+ export interface Entity {
21
+ id: string;
22
+ created_at: string;
23
+ updated_at: string;
24
+ deleted_at?: string | null;
25
+ }
26
+ export interface UserResponse {
27
+ id: string;
28
+ created_at: string;
29
+ updated_at: string;
30
+ deleted_at?: string | null;
31
+ name: string;
32
+ first_name?: string | null;
33
+ last_name?: string | null;
34
+ email?: string | null;
35
+ email_verified?: boolean;
36
+ locale?: string | null;
37
+ type: string;
38
+ avatar?: ImageAssetStub;
39
+ }
40
+ export interface TenantUserStub {
41
+ id: string;
42
+ created_at: string;
43
+ updated_at: string;
44
+ deleted_at?: string | null;
45
+ tenant_id: string;
46
+ identity: string;
47
+ name?: string | null;
48
+ }
49
+ export interface TenantUser {
50
+ id: string;
51
+ created_at: string;
52
+ updated_at: string;
53
+ deleted_at?: string | null;
54
+ tenant_id: string;
55
+ identity: string;
56
+ name?: string | null;
57
+ properties: object;
58
+ }
59
+ export interface UserInfoResponse {
60
+ roles?: Array<string>;
61
+ user?: UserResponse | null;
62
+ tenant_user?: TenantUser | null;
63
+ }
64
+ export interface AuthToken {
65
+ access_token: string;
66
+ }
67
+ export interface UploadImageAssetForTenantRequestBody {
68
+ group: string;
69
+ image: File;
70
+ }
18
71
  export interface ImageAsset {
19
72
  id: string;
20
73
  created_at: string;
@@ -28,14 +81,8 @@ export interface ImageAsset {
28
81
  file_type: string;
29
82
  mime_type: string;
30
83
  }
31
- export interface AuthorizationCheckRequestBody {
32
- namespace: string;
33
- subject: string;
34
- scope: string;
35
- context?: object;
36
- }
37
- export interface AuthorizationCheck {
38
- allowed: boolean;
84
+ export interface UploadUserAvatarRequestBody {
85
+ image: File;
39
86
  }
40
87
  export interface CreateCheckoutSessionRequestBody {
41
88
  plan_id: string;
@@ -43,29 +90,13 @@ export interface CreateCheckoutSessionRequestBody {
43
90
  export interface CheckoutSession {
44
91
  url: string;
45
92
  }
46
- export interface BillingPortalSession {
47
- url: string;
48
- }
49
- export interface CreateCustomerRequestBody {
50
- name: string;
51
- tenant_id: string;
52
- }
53
- export interface Customer {
54
- id: string;
55
- created_at: string;
56
- updated_at: string;
57
- deleted_at?: string | null;
58
- name: string;
59
- tenant_id: string;
60
- stripe_customer_id: string;
61
- }
62
- export declare enum Currency {
63
- usd = "usd"
64
- }
65
93
  export declare enum Interval {
66
94
  monthly = "monthly",
67
95
  annual = "annual"
68
96
  }
97
+ export declare enum Currency {
98
+ usd = "usd"
99
+ }
69
100
  export interface Price {
70
101
  currency: Currency;
71
102
  amount: number;
@@ -126,486 +157,244 @@ export interface TenantPlansResponse {
126
157
  plans?: Array<Plan>;
127
158
  subscriptions?: Array<Subscription>;
128
159
  }
129
- export interface StripeEvent {
130
- }
131
- export interface CreateAudienceRequestBody {
132
- tenant_id: string;
133
- name: string;
134
- }
135
- export interface Audience {
136
- id: string;
137
- created_at: string;
138
- updated_at: string;
139
- deleted_at?: string | null;
140
- tenant_id: string;
141
- name: string;
160
+ export interface BillingPortalSession {
161
+ url: string;
142
162
  }
143
163
  export interface CreateSubscriberRequestBody {
144
164
  email: string;
145
165
  }
146
- export interface AuthToken {
147
- access_token: string;
166
+ export declare enum CardItemType {
167
+ question = "question"
148
168
  }
149
- export interface CreateAuthTokenRequestBody {
150
- user_id: string;
169
+ export declare enum CardItemDisplayType {
170
+ inline = "inline",
171
+ popup = "popup"
151
172
  }
152
- export interface Entitlement {
173
+ export declare enum QuestionType {
174
+ choice = "choice",
175
+ checkbox = "checkbox",
176
+ rating = "rating",
177
+ text = "text",
178
+ rankedChoice = "ranked-choice"
153
179
  }
154
- export type UpdateEntitlementsRequestBody = Array<Entitlement>;
155
- export interface UpdateTenantRequestBody {
156
- name: string;
180
+ export declare enum QuestionKind {
181
+ radio = "radio",
182
+ checkbox = "checkbox",
183
+ star = "star",
184
+ image = "image",
185
+ rating = "rating",
186
+ shortText = "short-text",
187
+ longText = "long-text",
188
+ emoji = "emoji",
189
+ boolean = "boolean",
190
+ slider = "slider",
191
+ rankedChoice = "ranked-choice",
192
+ tag = "tag"
157
193
  }
158
- export interface CreateTenantRequestBody {
159
- name: string;
160
- is_test: boolean;
161
- parent_tenant_id?: string | null;
194
+ export interface MutableChoiceQuestionOption {
195
+ title: string;
196
+ value: string;
197
+ is_other?: boolean | null;
162
198
  }
163
- export interface CreateTenantForUserRequestBody {
164
- name: string;
165
- is_test: boolean;
199
+ export interface ChoiceQuestionOption {
200
+ title: string;
201
+ value: string;
202
+ is_other?: boolean | null;
203
+ id: string;
204
+ }
205
+ export interface ChoiceQuestionBody {
206
+ options: Array<ChoiceQuestionOption>;
207
+ }
208
+ export interface MutableCheckboxQuestionOption {
209
+ title: string;
210
+ value: string;
211
+ is_other?: boolean | null;
166
212
  }
167
- export interface TenantMember {
213
+ export interface CheckboxQuestionOption {
214
+ title: string;
215
+ value: string;
216
+ is_other?: boolean | null;
168
217
  id: string;
169
- created_at: string;
170
- updated_at: string;
171
- deleted_at?: string | null;
172
- name: string;
173
- is_test: boolean;
174
- parent_tenant_id?: string | null;
175
- entitlements?: Array<Entitlement> | null;
176
- scopes: Array<string>;
177
218
  }
178
- export interface Tenant {
219
+ export interface CheckboxQuestionBody {
220
+ options: Array<CheckboxQuestionOption>;
221
+ }
222
+ export interface MutableImageQuestionOption {
223
+ image_asset_id: string;
224
+ title?: string | null;
225
+ value: string;
226
+ }
227
+ export interface ImageQuestionOption {
228
+ image_asset_id: string;
229
+ title?: string | null;
230
+ value: string;
179
231
  id: string;
180
- created_at: string;
181
- updated_at: string;
182
- deleted_at?: string | null;
183
- name: string;
184
- is_test: boolean;
185
- parent_tenant_id?: string | null;
186
- entitlements?: Array<Entitlement> | null;
187
- metrics?: TenantMetrics | null;
232
+ image_asset_url: string;
233
+ }
234
+ export interface ImageQuestionBody {
235
+ options: Array<ImageQuestionOption>;
236
+ }
237
+ export interface MutableRatingQuestionOption {
238
+ title: string;
239
+ value: number;
188
240
  }
189
- export interface TenantMember {
241
+ export interface RatingQuestionOption {
242
+ title: string;
243
+ value: number;
190
244
  id: string;
191
- created_at: string;
192
- updated_at: string;
193
- deleted_at?: string | null;
194
- name: string;
195
- is_test: boolean;
196
- parent_tenant_id?: string | null;
197
- entitlements?: Array<Entitlement> | null;
198
- metrics?: TenantMetrics | null;
199
- scopes: Array<string>;
200
245
  }
201
- export type TenantListResponse = Array<Tenant>;
202
- export interface TenantCollectionResponse {
203
- page: number;
204
- page_count: number;
205
- page_size: number;
206
- total_count: number;
207
- data: Array<Tenant>;
246
+ export interface RatingQuestionBody {
247
+ options: Array<RatingQuestionOption>;
248
+ leading_label?: string;
249
+ center_label?: string;
250
+ trailing_label?: string;
208
251
  }
209
- export interface TenantMetrics {
210
- child_tenant_count: number;
211
- question_count: number;
212
- answer_count: number;
213
- team_member_count: number;
214
- team_member_pending_invitation_count: number;
215
- user_count: number;
252
+ export interface StarQuestionBody {
253
+ star_count: number;
254
+ leading_label?: string;
255
+ center_label?: string;
256
+ trailing_label?: string;
216
257
  }
217
- export interface UpdateTenantMetricsRequestBody {
218
- child_tenant_count?: number;
219
- answer_count?: number;
220
- question_count?: number;
221
- team_member_count?: number;
222
- team_member_pending_invitation_count?: number;
223
- user_count?: number;
258
+ export interface ShortTextQuestionBody {
259
+ placeholder?: string | null;
260
+ min_length?: number | null;
261
+ max_length?: number | null;
224
262
  }
225
- export interface CreateTenantUserRequestBody {
226
- identity: string;
227
- name?: string | null;
228
- properties?: object | null;
263
+ export interface LongTextQuestionBody {
264
+ placeholder?: string | null;
265
+ min_length?: number | null;
266
+ max_length?: number | null;
229
267
  }
230
- export interface TenantUserStub {
268
+ export interface MutableBooleanQuestionOption {
269
+ title: string;
270
+ value: string;
271
+ }
272
+ export interface BooleanQuestionOption {
273
+ title: string;
274
+ value: string;
275
+ id: string;
276
+ }
277
+ export interface BooleanQuestionBody {
278
+ options: Array<BooleanQuestionOption>;
279
+ }
280
+ export type QuestionData = ChoiceQuestionBody | CheckboxQuestionBody | ImageQuestionBody | RatingQuestionBody | StarQuestionBody | ShortTextQuestionBody | LongTextQuestionBody | BooleanQuestionBody;
281
+ export interface AnswerData {
282
+ }
283
+ export interface Answer {
231
284
  id: string;
232
285
  created_at: string;
233
286
  updated_at: string;
234
287
  deleted_at?: string | null;
288
+ question_id: string;
289
+ user_id: string;
235
290
  tenant_id: string;
236
- identity: string;
237
- name?: string | null;
291
+ campaign_id?: string | null;
292
+ bucket_item_id?: string | null;
293
+ data: AnswerData;
238
294
  }
239
- export interface TenantUser {
295
+ export interface ChoiceQuestionMetricsOption {
296
+ title: string;
297
+ value: string;
298
+ is_other?: boolean | null;
240
299
  id: string;
241
- created_at: string;
242
- updated_at: string;
243
- deleted_at?: string | null;
244
- tenant_id: string;
245
- identity: string;
246
- name?: string | null;
247
- properties: object;
248
- }
249
- export interface TenantUserCollectionResponse {
250
- page: number;
251
- page_count: number;
252
- page_size: number;
253
- total_count: number;
254
- data: Array<TenantUserStub>;
255
- }
256
- export interface CreateApiKeyRequestBody {
257
- name: string;
258
- description?: string | null;
259
- is_public: boolean;
300
+ answer_count: number;
260
301
  }
261
- export interface ApiKey {
262
- id: string;
263
- created_at: string;
264
- updated_at: string;
265
- deleted_at?: string | null;
266
- name: string;
267
- description?: string | null;
268
- is_public: boolean;
269
- tenant_id: string;
302
+ export interface ChoiceQuestionMetricsBody {
303
+ options: Array<ChoiceQuestionMetricsOption>;
270
304
  }
271
- export interface ApiKeyWithSecretResponse {
305
+ export interface CheckboxQuestionMetricsOption {
306
+ title: string;
307
+ value: string;
308
+ is_other?: boolean | null;
272
309
  id: string;
273
- created_at: string;
274
- updated_at: string;
275
- deleted_at?: string | null;
276
- name: string;
277
- description?: string | null;
278
- is_public: boolean;
279
- tenant_id: string;
280
- secret?: string | null;
281
- }
282
- export interface ApiKeyCollectionResponse {
283
- page: number;
284
- page_count: number;
285
- page_size: number;
286
- total_count: number;
287
- data: Array<ApiKey>;
288
- }
289
- export interface TenantInvitationRequestBody {
290
- name: string;
291
- email: string;
310
+ answer_count: number;
292
311
  }
293
- export interface TenantInvitation {
294
- id: string;
295
- created_at: string;
296
- updated_at: string;
297
- deleted_at?: string | null;
298
- tenant_id: string;
299
- member_id?: string | null;
300
- name: string;
301
- email: string;
302
- code?: string;
303
- expires_at?: string;
304
- accepted_at?: string | null;
312
+ export interface CheckboxQuestionMetricsBody {
313
+ options: Array<CheckboxQuestionMetricsOption>;
305
314
  }
306
- export type TenantInvitationListResponse = Array<TenantInvitation>;
307
- export interface TeamMember {
315
+ export interface ImageQuestionMetricsOption {
316
+ image_asset_id: string;
317
+ title?: string | null;
318
+ value: string;
308
319
  id: string;
309
- created_at: string;
310
- updated_at: string;
311
- deleted_at?: string | null;
312
- tenant_id: string;
313
- user_id?: string | null;
314
- name: string;
315
- email: string;
316
- avatar?: ImageAssetStub;
317
- }
318
- export type TeamMemberListResponse = Array<TeamMember>;
319
- export interface AnswerData {
320
- }
321
- export interface AnswerCollectionResponse {
322
- page: number;
323
- page_count: number;
324
- page_size: number;
325
- total_count: number;
326
- data: Array<Answer>;
327
- }
328
- export interface UpdateAnalyticEventTypeRequestBody {
329
- description?: string | null;
320
+ image_asset_url: string;
321
+ answer_count: number;
330
322
  }
331
- export interface CreateAnalyticEventTypeRequestBody {
332
- description?: string | null;
333
- name: string;
323
+ export interface InageQuestionMetricsBody {
324
+ options: Array<ImageQuestionMetricsOption>;
334
325
  }
335
- export interface AnalyticEventType {
326
+ export interface RatingQuestionMetricsOption {
327
+ title: string;
328
+ value: number;
336
329
  id: string;
337
- created_at: string;
338
- updated_at: string;
339
- deleted_at?: string | null;
340
- tenant_id: string;
341
- name: string;
342
- description?: string | null;
343
- internal: boolean;
344
- }
345
- export interface AnalyticEventTypeCollectionResponse {
346
- page: number;
347
- page_count: number;
348
- page_size: number;
349
- total_count: number;
350
- data: Array<AnalyticEventType>;
330
+ answer_count: number;
351
331
  }
352
- export type AnalyticEventTypeListResponse = Array<AnalyticEventType>;
353
- export interface UpdateAppAreaRequestBody {
354
- title: string;
355
- slug: string;
356
- description?: string | null;
332
+ export interface RatingQuestionMetricsBody {
333
+ average_rating: number;
334
+ options: Array<RatingQuestionMetricsOption>;
357
335
  }
358
- export interface CreateAppAreaRequestBody {
336
+ export interface MutableStarQuestionOption {
359
337
  title: string;
360
- slug: string;
361
- description?: string | null;
338
+ value: number;
362
339
  }
363
- export interface AppArea {
364
- id: string;
365
- created_at: string;
366
- updated_at: string;
367
- deleted_at?: string | null;
368
- tenant_id: string;
340
+ export interface StarQuestionOption {
369
341
  title: string;
370
- slug: string;
371
- description?: string | null;
372
- }
373
- export interface AppAreaCollectionResponse {
374
- page: number;
375
- page_count: number;
376
- page_size: number;
377
- total_count: number;
378
- data: Array<AppArea>;
379
- }
380
- export type AppAreaListResponse = Array<AppArea>;
381
- export declare enum CampaignStatus {
382
- active = "active",
383
- paused = "paused",
384
- draft = "draft",
385
- scheduled = "scheduled",
386
- complete = "complete",
387
- closed = "closed",
388
- archived = "archived"
389
- }
390
- export interface UpdateCampaignRequestBody {
391
- name?: string;
392
- description?: string | null;
393
- start_at?: string | null;
394
- end_at?: string | null;
395
- paused_at?: string | null;
396
- triggers?: UpdateCampaignTriggerList;
397
- actions?: UpdateCampaignActionList;
398
- }
399
- export interface CreateCampaignRequestBody {
400
- name?: string;
401
- description?: string | null;
402
- start_at?: string | null;
403
- end_at?: string | null;
404
- paused_at?: string | null;
405
- triggers?: UpdateCampaignTriggerList;
406
- actions?: UpdateCampaignActionList;
407
- }
408
- export interface Campaign {
342
+ value: number;
409
343
  id: string;
410
- created_at: string;
411
- updated_at: string;
412
- deleted_at?: string | null;
413
- tenant_id: string;
414
- name: string;
415
- description?: string | null;
416
- published_at?: string | null;
417
- start_at?: string | null;
418
- end_at?: string | null;
419
- paused_at?: string | null;
420
- closed_at?: string | null;
421
- status: CampaignStatus;
422
- triggers?: CampaignTriggerList;
423
- actions?: CampaignActionList;
424
- }
425
- export interface CampaignCollectionResponse {
426
- page: number;
427
- page_count: number;
428
- page_size: number;
429
- total_count: number;
430
- data: Array<Campaign>;
431
344
  }
432
- export type CampaignListResponse = Array<Campaign>;
433
- export interface UpdateCampaignTriggerRequestBody {
434
- type: string;
435
- analytic_event_type_id?: string | null;
436
- }
437
- export type UpdateCampaignTriggerList = Array<UpdateCampaignTriggerRequestBody>;
438
- export interface CampaignTrigger {
345
+ export interface StarQuestionMetricsOption {
346
+ title: string;
347
+ value: number;
439
348
  id: string;
440
- created_at: string;
441
- updated_at: string;
442
- deleted_at?: string | null;
443
- type: string;
444
- analytic_event_type_id?: string | null;
445
- }
446
- export type CampaignTriggerList = Array<CampaignTrigger>;
447
- export declare enum CampaignActionType {
448
- question = "question",
449
- notification = "notification"
450
- }
451
- export declare enum CampaignActionDisplayType {
452
- popup = "popup",
453
- inline = "inline"
454
- }
455
- export interface UpdateCampaignActionRequestBody {
456
- type: CampaignActionType;
457
- notification_template_id?: string;
458
- question_id?: string;
459
- display_type?: CampaignActionDisplayType | null;
460
- app_area_id?: string | null;
349
+ answer_count: number;
461
350
  }
462
- export type UpdateCampaignActionList = Array<UpdateCampaignActionRequestBody>;
463
- export interface CampaignAction {
464
- id: string;
465
- created_at: string;
466
- updated_at: string;
467
- deleted_at?: string | null;
468
- type: CampaignActionType;
469
- notification_template_id?: string;
470
- question_id?: string;
471
- display_type?: CampaignActionDisplayType | null;
472
- app_area_id?: string | null;
351
+ export interface StarQuestionMetricsBody {
352
+ average_rating: number;
353
+ options: Array<StarQuestionMetricsOption>;
473
354
  }
474
- export type CampaignActionList = Array<CampaignAction>;
475
- export interface UpdateFeedbackFormRequestBody {
476
- title: string;
477
- description?: string | null;
478
- data: FeedbackFormData;
355
+ export interface LongTextQuestionMetricsBody {
479
356
  }
480
- export interface CreateFeedbackFormRequestBody {
481
- title: string;
482
- description?: string | null;
483
- data: FeedbackFormData;
357
+ export interface ShortTextQuestionMetricsBody {
484
358
  }
485
- export interface FeedbackFormStub {
486
- id: string;
487
- created_at: string;
488
- updated_at: string;
489
- deleted_at?: string | null;
359
+ export interface BooleanQuestionMetricsOption {
490
360
  title: string;
491
- description?: string | null;
492
- }
493
- export interface SubmitFeedbackFormResponseBody {
494
- }
495
- export interface FeedbackFormSubmission {
361
+ value: string;
496
362
  id: string;
497
- created_at: string;
498
- updated_at: string;
499
- deleted_at?: string | null;
500
- feedback_form_id: string;
501
- user_id: string;
502
- data: SubmitFeedbackFormResponseBody;
503
- }
504
- export interface FeedbackFormSubmissionCollectionResponse {
505
- page: number;
506
- page_count: number;
507
- page_size: number;
508
- total_count: number;
509
- data: Array<FeedbackFormSubmission>;
363
+ answer_count: number;
510
364
  }
511
- export interface FeedbackFormResponse {
512
- id: string;
513
- created_at: string;
514
- updated_at: string;
515
- deleted_at?: string | null;
516
- title: string;
517
- description?: string | null;
518
- data: FeedbackFormData;
365
+ export interface BooleanQuestionMetricsBody {
366
+ average_rating: number;
367
+ options: Array<BooleanQuestionMetricsOption>;
519
368
  }
520
- export interface FeedbackFormDataStub {
369
+ export type QuestionMetricsData = ChoiceQuestionMetricsBody | CheckboxQuestionMetricsBody | InageQuestionMetricsBody | RatingQuestionMetricsBody | StarQuestionMetricsBody | LongTextQuestionMetricsBody | ShortTextQuestionMetricsBody | BooleanQuestionMetricsBody;
370
+ export interface QuestionMetrics {
521
371
  id: string;
522
372
  created_at: string;
523
373
  updated_at: string;
524
374
  deleted_at?: string | null;
525
- data: FeedbackFormData;
526
- }
527
- export interface FeedbackFormData {
528
- title: string;
529
- description?: string | null;
530
- fields: Array<FeedbackFormField>;
531
- }
532
- export declare enum FeedbackFormFieldType {
533
- text = "text",
534
- input = "input",
535
- select = "select"
536
- }
537
- export interface FeedbackFormField {
538
- name: string;
539
- title?: string;
540
- helper_text?: string;
541
- type: FeedbackFormFieldType;
542
- required?: boolean;
543
- data: FeedbackFormFieldData;
544
- }
545
- export type FeedbackFormFieldData = FeedbackFormTextFieldData | FeedbackFormSelectFieldData | FeedbackFormInputFieldData;
546
- export interface FeedbackFormTextFieldData {
547
- placeholder?: string;
548
- lines?: number;
549
- max_lines?: number;
550
- min_characters?: number;
551
- max_characters?: number;
552
- max_height?: number;
553
- }
554
- export interface FeedbackFormInputFieldData {
555
- placeholder?: string;
556
- }
557
- export interface FeedbackFormSelectFieldData {
558
- placeholder?: string;
559
- options: Array<FeedbackFormSelectFieldOption>;
560
- }
561
- export interface FeedbackFormSelectFieldOption {
562
- title: string;
563
- value: string;
564
- is_other?: boolean;
565
- }
566
- export interface FeedbackFormCollectionResponse {
567
- page: number;
568
- page_count: number;
569
- page_size: number;
570
- total_count: number;
571
- data: Array<FeedbackFormStub>;
572
- }
573
- export interface FeedbackMetrics {
574
- user_count: number;
375
+ question_id: string;
376
+ campaign_id?: string | null;
575
377
  answer_count: number;
576
- question_count: number;
577
- questions_created_this_month: number;
378
+ type: QuestionType;
379
+ kind: QuestionKind;
380
+ data: QuestionMetricsData;
578
381
  }
579
- export interface Answer {
382
+ export interface Question {
580
383
  id: string;
581
384
  created_at: string;
582
385
  updated_at: string;
583
386
  deleted_at?: string | null;
584
- question_id: string;
585
- user_id: string;
586
387
  tenant_id: string;
587
- campaign_id?: string | null;
588
- bucket_item_id?: string | null;
589
- data: AnswerData;
590
- }
591
- export interface AnswerQuestionBody {
592
- bucket_item_id?: string | null;
593
- data: AnswerData;
594
- }
595
- export interface BulkAnswerQuestionBody {
596
- question_id: string;
597
- bucket_item_id?: string | null;
598
- data: AnswerData;
388
+ title: string;
389
+ subtitle?: string | null;
390
+ type: QuestionType;
391
+ kind: QuestionKind;
392
+ data: QuestionData;
393
+ answer_count?: number | null;
394
+ answer?: Answer;
395
+ metrics?: QuestionMetrics;
599
396
  }
600
- export type BulkAnswerQuestionsBody = Array<BulkAnswerQuestionBody>;
601
397
  export type CardItemData = Question;
602
- export declare enum CardItemDisplayType {
603
- inline = "inline",
604
- popup = "popup"
605
- }
606
- export declare enum CardItemType {
607
- question = "question"
608
- }
609
398
  export interface CardItem {
610
399
  id: string;
611
400
  campaign_id: string;
@@ -616,96 +405,121 @@ export interface CardItem {
616
405
  version: string;
617
406
  data: CardItemData;
618
407
  }
619
- export interface CardsResponse {
620
- items: Array<CardItem>;
408
+ export interface CardsResponse {
409
+ items: Array<CardItem>;
410
+ }
411
+ export interface FeedbackFormStub {
412
+ id: string;
413
+ created_at: string;
414
+ updated_at: string;
415
+ deleted_at?: string | null;
416
+ title: string;
417
+ description?: string | null;
418
+ }
419
+ export interface CollectionResponse {
420
+ page: number;
421
+ page_count: number;
422
+ page_size: number;
423
+ total_count: number;
621
424
  }
622
- export declare enum QuestionType {
623
- choice = "choice",
624
- checkbox = "checkbox",
625
- rating = "rating",
425
+ export interface FeedbackFormCollectionResponse {
426
+ page: number;
427
+ page_count: number;
428
+ page_size: number;
429
+ total_count: number;
430
+ data: Array<FeedbackFormStub>;
431
+ }
432
+ export declare enum FeedbackFormFieldType {
626
433
  text = "text",
627
- rankedChoice = "ranked-choice"
434
+ input = "input",
435
+ select = "select"
628
436
  }
629
- export declare enum QuestionKind {
630
- radio = "radio",
631
- checkbox = "checkbox",
632
- star = "star",
633
- image = "image",
634
- rating = "rating",
635
- shortText = "short-text",
636
- longText = "long-text",
637
- emoji = "emoji",
638
- boolean = "boolean",
639
- slider = "slider",
640
- rankedChoice = "ranked-choice",
641
- tag = "tag"
437
+ export interface FeedbackFormTextFieldData {
438
+ placeholder?: string;
439
+ lines?: number;
440
+ max_lines?: number;
441
+ min_characters?: number;
442
+ max_characters?: number;
443
+ max_height?: number;
642
444
  }
643
- export interface MutableChoiceQuestionOption {
445
+ export interface FeedbackFormSelectFieldOption {
644
446
  title: string;
645
447
  value: string;
646
- is_other?: boolean | null;
448
+ is_other?: boolean;
647
449
  }
648
- export interface ChoiceQuestionOption {
649
- title: string;
650
- value: string;
651
- is_other?: boolean | null;
652
- id: string;
450
+ export interface FeedbackFormSelectFieldData {
451
+ placeholder?: string;
452
+ options: Array<FeedbackFormSelectFieldOption>;
653
453
  }
654
- export interface ChoiceQuestionBody {
655
- options: Array<ChoiceQuestionOption>;
454
+ export interface FeedbackFormInputFieldData {
455
+ placeholder?: string;
656
456
  }
657
- export interface MutableChoiceQuestionBody {
658
- options: Array<MutableChoiceQuestionOption>;
457
+ export type FeedbackFormFieldData = FeedbackFormTextFieldData | FeedbackFormSelectFieldData | FeedbackFormInputFieldData;
458
+ export interface FeedbackFormField {
459
+ name: string;
460
+ title?: string;
461
+ helper_text?: string;
462
+ type: FeedbackFormFieldType;
463
+ required?: boolean;
464
+ data: FeedbackFormFieldData;
659
465
  }
660
- export interface MutableCheckboxQuestionOption {
466
+ export interface FeedbackFormData {
661
467
  title: string;
662
- value: string;
663
- is_other?: boolean | null;
468
+ description?: string | null;
469
+ fields: Array<FeedbackFormField>;
664
470
  }
665
- export interface CheckboxQuestionOption {
471
+ export interface UpdateFeedbackFormRequestBody {
666
472
  title: string;
667
- value: string;
668
- is_other?: boolean | null;
669
- id: string;
473
+ description?: string | null;
474
+ data: FeedbackFormData;
670
475
  }
671
- export interface CheckboxQuestionBody {
672
- options: Array<CheckboxQuestionOption>;
476
+ export interface CreateFeedbackFormRequestBody {
477
+ title: string;
478
+ description?: string | null;
479
+ data: FeedbackFormData;
673
480
  }
674
- export interface MutableCheckboxQuestionBody {
675
- options: Array<MutableCheckboxQuestionOption>;
481
+ export interface FeedbackFormResponse {
482
+ id: string;
483
+ created_at: string;
484
+ updated_at: string;
485
+ deleted_at?: string | null;
486
+ title: string;
487
+ description?: string | null;
488
+ data: FeedbackFormData;
676
489
  }
677
- export interface MutableImageQuestionOption {
678
- image_asset_id: string;
679
- title?: string | null;
680
- value: string;
490
+ export interface SubmitFeedbackFormResponseBody {
681
491
  }
682
- export interface ImageQuestionOption {
683
- image_asset_id: string;
684
- title?: string | null;
685
- value: string;
492
+ export interface FeedbackFormSubmission {
686
493
  id: string;
687
- image_asset_url: string;
494
+ created_at: string;
495
+ updated_at: string;
496
+ deleted_at?: string | null;
497
+ feedback_form_id: string;
498
+ user_id: string;
499
+ data: SubmitFeedbackFormResponseBody;
688
500
  }
689
- export interface ImageQuestionBody {
690
- options: Array<ImageQuestionOption>;
501
+ export interface FeedbackFormSubmissionCollectionResponse {
502
+ page: number;
503
+ page_count: number;
504
+ page_size: number;
505
+ total_count: number;
506
+ data: Array<FeedbackFormSubmission>;
691
507
  }
692
- export interface MutableImageQuestionBody {
693
- options: Array<MutableImageQuestionOption>;
508
+ export interface FeedbackFormDataStub {
509
+ id: string;
510
+ created_at: string;
511
+ updated_at: string;
512
+ deleted_at?: string | null;
513
+ data: FeedbackFormData;
694
514
  }
695
- export interface MutableRatingQuestionOption {
696
- title: string;
697
- value: number;
515
+ export interface MutableChoiceQuestionBody {
516
+ options: Array<MutableChoiceQuestionOption>;
698
517
  }
699
- export interface RatingQuestionOption {
700
- title: string;
701
- value: number;
702
- id: string;
518
+ export interface MutableCheckboxQuestionBody {
519
+ options: Array<MutableCheckboxQuestionOption>;
703
520
  }
704
- export interface RatingQuestionBody {
705
- options: Array<RatingQuestionOption>;
706
- leading_label?: string;
707
- center_label?: string;
708
- trailing_label?: string;
521
+ export interface MutableImageQuestionBody {
522
+ options: Array<MutableImageQuestionOption>;
709
523
  }
710
524
  export interface MutableRatingQuestionBody {
711
525
  options: Array<MutableRatingQuestionOption>;
@@ -713,55 +527,26 @@ export interface MutableRatingQuestionBody {
713
527
  center_label?: string;
714
528
  trailing_label?: string;
715
529
  }
716
- export interface StarQuestionBody {
717
- star_count: number;
718
- leading_label?: string;
719
- center_label?: string;
720
- trailing_label?: string;
721
- }
722
530
  export interface MutableStarQuestionBody {
723
531
  star_count: number;
724
532
  leading_label?: string;
725
533
  center_label?: string;
726
534
  trailing_label?: string;
727
535
  }
728
- export interface ShortTextQuestionBody {
729
- placeholder?: string | null;
730
- min_length?: number | null;
731
- max_length?: number | null;
732
- }
733
536
  export interface MutableShortTextQuestionBody {
734
537
  placeholder?: string | null;
735
538
  min_length?: number | null;
736
539
  max_length?: number | null;
737
540
  }
738
- export interface LongTextQuestionBody {
739
- placeholder?: string | null;
740
- min_length?: number | null;
741
- max_length?: number | null;
742
- }
743
541
  export interface MutableLongTextQuestionBody {
744
542
  placeholder?: string | null;
745
543
  min_length?: number | null;
746
544
  max_length?: number | null;
747
545
  }
748
- export interface MutableBooleanQuestionOption {
749
- title: string;
750
- value: string;
751
- }
752
- export interface BooleanQuestionOption {
753
- title: string;
754
- value: string;
755
- id: string;
756
- }
757
- export interface BooleanQuestionBody {
758
- options: Array<BooleanQuestionOption>;
759
- }
760
546
  export interface MutableBooleanQuestionBody {
761
547
  options: Array<MutableBooleanQuestionOption>;
762
548
  }
763
549
  export type MutableQuestionData = MutableChoiceQuestionBody | MutableCheckboxQuestionBody | MutableImageQuestionBody | MutableRatingQuestionBody | MutableStarQuestionBody | MutableShortTextQuestionBody | MutableLongTextQuestionBody | MutableBooleanQuestionBody;
764
- export type QuestionData = ChoiceQuestionBody | CheckboxQuestionBody | ImageQuestionBody | RatingQuestionBody | StarQuestionBody | ShortTextQuestionBody | LongTextQuestionBody | BooleanQuestionBody;
765
550
  export interface UpdateQuestionRequestBody {
766
551
  title: string;
767
552
  subtitle?: string | null;
@@ -774,21 +559,6 @@ export interface CreateQuestionRequestBody {
774
559
  type: QuestionType;
775
560
  kind: QuestionKind;
776
561
  }
777
- export interface Question {
778
- id: string;
779
- created_at: string;
780
- updated_at: string;
781
- deleted_at?: string | null;
782
- tenant_id: string;
783
- title: string;
784
- subtitle?: string | null;
785
- type: QuestionType;
786
- kind: QuestionKind;
787
- data: QuestionData;
788
- answer_count?: number | null;
789
- answer?: Answer;
790
- metrics?: QuestionMetrics;
791
- }
792
562
  export interface QuestionCollectionResponse {
793
563
  page: number;
794
564
  page_count: number;
@@ -796,118 +566,155 @@ export interface QuestionCollectionResponse {
796
566
  total_count: number;
797
567
  data: Array<Question>;
798
568
  }
799
- export interface CreateQuestionMetricsRequestBody {
800
- campaign_id?: string | null;
801
- }
802
- export interface QuestionMetrics {
803
- id: string;
804
- created_at: string;
805
- updated_at: string;
806
- deleted_at?: string | null;
807
- question_id: string;
808
- campaign_id?: string | null;
809
- answer_count: number;
810
- type: QuestionType;
811
- kind: QuestionKind;
812
- data: QuestionMetricsData;
813
- }
814
- export type QuestionMetricsData = ChoiceQuestionMetricsBody | CheckboxQuestionMetricsBody | InageQuestionMetricsBody | RatingQuestionMetricsBody | StarQuestionMetricsBody | LongTextQuestionMetricsBody | ShortTextQuestionMetricsBody | BooleanQuestionMetricsBody;
815
- export interface ChoiceQuestionMetricsBody {
816
- options: Array<ChoiceQuestionMetricsOption>;
569
+ export interface AnswerCollectionResponse {
570
+ page: number;
571
+ page_count: number;
572
+ page_size: number;
573
+ total_count: number;
574
+ data: Array<Answer>;
817
575
  }
818
- export interface ChoiceQuestionMetricsOption {
819
- title: string;
820
- value: string;
821
- is_other?: boolean | null;
822
- id: string;
823
- answer_count: number;
576
+ export interface AnswerQuestionBody {
577
+ bucket_item_id?: string | null;
578
+ data: AnswerData;
824
579
  }
825
- export interface CheckboxQuestionMetricsBody {
826
- options: Array<CheckboxQuestionMetricsOption>;
580
+ export interface BulkAnswerQuestionBody {
581
+ question_id: string;
582
+ bucket_item_id?: string | null;
583
+ data: AnswerData;
827
584
  }
828
- export interface CheckboxQuestionMetricsOption {
829
- title: string;
830
- value: string;
831
- is_other?: boolean | null;
832
- id: string;
833
- answer_count: number;
585
+ export type BulkAnswersQuestionBody = Array<BulkAnswerQuestionBody>;
586
+ export interface UpdateAnalyticEventTypeRequestBody {
587
+ description?: string | null;
834
588
  }
835
- export interface InageQuestionMetricsBody {
836
- options: Array<ImageQuestionMetricsOption>;
589
+ export interface CreateAnalyticEventTypeRequestBody {
590
+ description?: string | null;
591
+ name: string;
837
592
  }
838
- export interface ImageQuestionMetricsOption {
839
- image_asset_id: string;
840
- title?: string | null;
841
- value: string;
593
+ export interface AnalyticEventType {
842
594
  id: string;
843
- image_asset_url: string;
844
- answer_count: number;
595
+ created_at: string;
596
+ updated_at: string;
597
+ deleted_at?: string | null;
598
+ tenant_id: string;
599
+ name: string;
600
+ description?: string | null;
601
+ internal: boolean;
845
602
  }
846
- export interface RatingQuestionMetricsBody {
847
- average_rating: number;
848
- options: Array<RatingQuestionMetricsOption>;
603
+ export interface AnalyticEventTypeCollectionResponse {
604
+ page: number;
605
+ page_count: number;
606
+ page_size: number;
607
+ total_count: number;
608
+ data: Array<AnalyticEventType>;
849
609
  }
850
- export interface RatingQuestionMetricsOption {
610
+ export interface UpdateAppAreaRequestBody {
851
611
  title: string;
852
- value: number;
853
- id: string;
854
- answer_count: number;
612
+ slug: string;
613
+ description?: string | null;
855
614
  }
856
- export interface MutableStarQuestionOption {
615
+ export interface CreateAppAreaRequestBody {
857
616
  title: string;
858
- value: number;
617
+ slug: string;
618
+ description?: string | null;
859
619
  }
860
- export interface StarQuestionOption {
861
- title: string;
862
- value: number;
620
+ export interface AppArea {
863
621
  id: string;
622
+ created_at: string;
623
+ updated_at: string;
624
+ deleted_at?: string | null;
625
+ tenant_id: string;
626
+ title: string;
627
+ slug: string;
628
+ description?: string | null;
864
629
  }
865
- export interface StarQuestionMetricsBody {
866
- average_rating: number;
867
- options: Array<StarQuestionMetricsOption>;
630
+ export interface UpdateCampaignTriggerRequestBody {
631
+ type: string;
632
+ analytic_event_type_id?: string | null;
868
633
  }
869
- export interface StarQuestionMetricsOption {
870
- title: string;
871
- value: number;
872
- id: string;
873
- answer_count: number;
634
+ export declare enum CampaignActionType {
635
+ question = "question",
636
+ notification = "notification"
874
637
  }
875
- export interface ShortTextQuestionMetricsBody {
638
+ export declare enum CampaignActionDisplayType {
639
+ popup = "popup",
640
+ inline = "inline"
876
641
  }
877
- export interface LongTextQuestionMetricsBody {
642
+ export interface UpdateCampaignActionRequestBody {
643
+ type: CampaignActionType;
644
+ notification_template_id?: string;
645
+ question_id?: string;
646
+ display_type?: CampaignActionDisplayType | null;
647
+ app_area_id?: string | null;
878
648
  }
879
- export interface BooleanQuestionMetricsBody {
880
- average_rating: number;
881
- options: Array<BooleanQuestionMetricsOption>;
649
+ export interface UpdateCampaignRequestBody {
650
+ name?: string;
651
+ description?: string | null;
652
+ start_at?: string | null;
653
+ end_at?: string | null;
654
+ paused_at?: string | null;
655
+ triggers?: Array<UpdateCampaignTriggerRequestBody>;
656
+ actions?: Array<UpdateCampaignActionRequestBody>;
882
657
  }
883
- export interface BooleanQuestionMetricsOption {
884
- title: string;
885
- value: string;
886
- id: string;
887
- answer_count: number;
658
+ export interface CreateCampaignRequestBody {
659
+ name?: string;
660
+ description?: string | null;
661
+ start_at?: string | null;
662
+ end_at?: string | null;
663
+ paused_at?: string | null;
664
+ triggers?: Array<UpdateCampaignTriggerRequestBody>;
665
+ actions?: Array<UpdateCampaignActionRequestBody>;
888
666
  }
889
- export interface Event {
890
- name: string;
891
- created_at: string | null;
892
- metadata?: object | null;
667
+ export declare enum CampaignStatus {
668
+ active = "active",
669
+ paused = "paused",
670
+ draft = "draft",
671
+ scheduled = "scheduled",
672
+ complete = "complete",
673
+ closed = "closed",
674
+ archived = "archived"
893
675
  }
894
- export interface Session {
895
- started_at?: string | null;
896
- ended_at?: string | null;
897
- user_properties?: object | null;
898
- events?: Array<Event>;
676
+ export interface CampaignTrigger {
677
+ id: string;
678
+ created_at: string;
679
+ updated_at: string;
680
+ deleted_at?: string | null;
681
+ type: string;
682
+ analytic_event_type_id?: string | null;
899
683
  }
900
- export interface ReportSessionResponse {
901
- should_poll: boolean;
902
- retry_delay: number;
903
- retry_times: number;
684
+ export interface CampaignAction {
685
+ id: string;
686
+ created_at: string;
687
+ updated_at: string;
688
+ deleted_at?: string | null;
689
+ type: CampaignActionType;
690
+ notification_template_id?: string;
691
+ question_id?: string;
692
+ display_type?: CampaignActionDisplayType | null;
693
+ app_area_id?: string | null;
904
694
  }
905
- export interface UpdateTemplateRequestBody {
695
+ export interface Campaign {
696
+ id: string;
697
+ created_at: string;
698
+ updated_at: string;
699
+ deleted_at?: string | null;
700
+ tenant_id: string;
701
+ name: string;
906
702
  description?: string | null;
703
+ published_at?: string | null;
704
+ start_at?: string | null;
705
+ end_at?: string | null;
706
+ paused_at?: string | null;
707
+ closed_at?: string | null;
708
+ status: CampaignStatus;
709
+ triggers?: Array<CampaignTrigger>;
710
+ actions?: Array<CampaignAction>;
907
711
  }
908
- export interface CreateTemplateRequestBody {
909
- description?: string | null;
910
- title: string;
712
+ export interface CampaignCollectionResponse {
713
+ page: number;
714
+ page_count: number;
715
+ page_size: number;
716
+ total_count: number;
717
+ data: Array<Campaign>;
911
718
  }
912
719
  export declare enum TemplateType {
913
720
  question = "question"
@@ -942,14 +749,6 @@ export interface TemplateCollectionResponse {
942
749
  total_count: number;
943
750
  data: Array<Template>;
944
751
  }
945
- export type TemplateListResponse = Array<Template>;
946
- export interface UpdateTemplateTagRequestBody {
947
- description?: string | null;
948
- }
949
- export interface CreateTemplateTagRequestBody {
950
- description?: string | null;
951
- title: string;
952
- }
953
752
  export interface TemplateTag {
954
753
  id: string;
955
754
  created_at: string;
@@ -970,6 +769,9 @@ export interface TemplateTagCollectionResponse {
970
769
  data: Array<TemplateTag>;
971
770
  metadata?: TemplateTagCollectionMetadata;
972
771
  }
772
+ export declare enum ApplicationType {
773
+ ios = "ios"
774
+ }
973
775
  export interface UpdateApplicationRequestBody {
974
776
  name: string;
975
777
  description?: string | null;
@@ -979,8 +781,25 @@ export interface CreateApplicationRequestBody {
979
781
  description?: string | null;
980
782
  type: ApplicationType;
981
783
  }
982
- export declare enum ApplicationType {
983
- ios = "ios"
784
+ export interface UpdateApnsConfigurationRequestBody {
785
+ name: string;
786
+ description?: string | null;
787
+ bundle_id: string;
788
+ team_id: string;
789
+ key_id: string;
790
+ key: string;
791
+ }
792
+ export interface ApnsConfiguration {
793
+ id: string;
794
+ created_at: string;
795
+ updated_at: string;
796
+ deleted_at?: string | null;
797
+ name: string;
798
+ description?: string | null;
799
+ bundle_id: string;
800
+ team_id: string;
801
+ key_id: string;
802
+ key: string;
984
803
  }
985
804
  export interface Application {
986
805
  id: string;
@@ -1000,7 +819,38 @@ export interface ApplicationCollectionResponse {
1000
819
  total_count: number;
1001
820
  data: Array<Application>;
1002
821
  }
1003
- export type ApplicationListResponse = Array<Application>;
822
+ export interface InboxItem {
823
+ id: string;
824
+ created_at: string;
825
+ updated_at: string;
826
+ deleted_at?: string | null;
827
+ title: string;
828
+ description?: string;
829
+ read: boolean;
830
+ read_at?: string | null;
831
+ }
832
+ export interface InboxItemCollectionResponse {
833
+ page: number;
834
+ page_count: number;
835
+ page_size: number;
836
+ total_count: number;
837
+ data: Array<InboxItem>;
838
+ }
839
+ export interface ReadInboxItemsRequestBody {
840
+ item_ids: Array<string>;
841
+ }
842
+ export interface UpdateNotificationTemplateRequestBody {
843
+ name: string;
844
+ description?: string | null;
845
+ }
846
+ export interface CreateNotificationTemplateRequestBody {
847
+ name: string;
848
+ description?: string | null;
849
+ }
850
+ export declare enum ChannelType {
851
+ apns = "apns",
852
+ inbox = "inbox"
853
+ }
1004
854
  export declare enum ApnsEnvironment {
1005
855
  production = "production",
1006
856
  sandbox = "sandbox"
@@ -1034,84 +884,13 @@ export interface CreateApnsChannelRequestBody {
1034
884
  priority?: number;
1035
885
  payload: object;
1036
886
  }
1037
- export interface ApnsChannel {
1038
- id: string;
1039
- created_at: string;
1040
- updated_at: string;
1041
- deleted_at?: string | null;
1042
- application_id: string;
1043
- environment: ApnsEnvironment;
1044
- push_type: ApnsPushType;
1045
- expiration?: string | null;
1046
- collapse_id?: string | null;
1047
- priority?: number;
1048
- payload: object;
1049
- }
1050
- export interface UpdateInboxChannelRequestBody {
1051
- title: string;
1052
- description?: string | null;
1053
- }
1054
- export interface CreateInboxChannelRequestBody {
1055
- title: string;
1056
- description?: string | null;
1057
- }
1058
- export interface InboxChannel {
1059
- id: string;
1060
- created_at: string;
1061
- updated_at: string;
1062
- deleted_at?: string | null;
1063
- title: string;
1064
- description?: string | null;
1065
- }
1066
- export interface InboxItem {
1067
- id: string;
1068
- created_at: string;
1069
- updated_at: string;
1070
- deleted_at?: string | null;
1071
- title: string;
1072
- description?: string;
1073
- read: boolean;
1074
- read_at?: string | null;
1075
- }
1076
- export interface ReadInboxItemsRequestBody {
1077
- item_ids: Array<string>;
1078
- }
1079
- export interface InboxItemCollectionResponse {
1080
- page: number;
1081
- page_count: number;
1082
- page_size: number;
1083
- total_count: number;
1084
- data: Array<InboxItem>;
1085
- }
1086
- export interface UpdateApnsConfigurationRequestBody {
1087
- name: string;
1088
- description?: string | null;
1089
- bundle_id: string;
1090
- team_id: string;
1091
- key_id: string;
1092
- key: string;
1093
- }
1094
- export interface ApnsConfiguration {
1095
- id: string;
1096
- created_at: string;
1097
- updated_at: string;
1098
- deleted_at?: string | null;
1099
- name: string;
1100
- description?: string | null;
1101
- bundle_id: string;
1102
- team_id: string;
1103
- key_id: string;
1104
- key: string;
1105
- }
1106
- export declare enum ChannelType {
1107
- apns = "apns",
1108
- inbox = "inbox"
887
+ export interface UpdateInboxChannelRequestBody {
888
+ title: string;
889
+ description?: string | null;
1109
890
  }
1110
- export interface UpdateChannelRequestBody {
1111
- name: string;
891
+ export interface CreateInboxChannelRequestBody {
892
+ title: string;
1112
893
  description?: string | null;
1113
- apns?: UpdateApnsChannelRequestBody;
1114
- inbox?: UpdateInboxChannelRequestBody;
1115
894
  }
1116
895
  export interface CreateChannelRequestBody {
1117
896
  type: ChannelType;
@@ -1131,23 +910,6 @@ export interface Channel {
1131
910
  apns?: CreateApnsChannelRequestBody;
1132
911
  inbox?: CreateInboxChannelRequestBody;
1133
912
  }
1134
- export interface CreateDeviceRequestBody {
1135
- platform: string;
1136
- platform_agent: string;
1137
- device_id?: string | null;
1138
- bundle_id?: string | null;
1139
- ad_id?: string | null;
1140
- manufacturer?: string | null;
1141
- model?: string | null;
1142
- }
1143
- export interface UpdateNotificationTemplateRequestBody {
1144
- name: string;
1145
- description?: string | null;
1146
- }
1147
- export interface CreateNotificationTemplateRequestBody {
1148
- name: string;
1149
- description?: string | null;
1150
- }
1151
913
  export interface NotificationTemplate {
1152
914
  id: string;
1153
915
  created_at: string;
@@ -1165,59 +927,117 @@ export interface NotificationTemplateCollectionResponse {
1165
927
  total_count: number;
1166
928
  data: Array<NotificationTemplate>;
1167
929
  }
1168
- export type NotificationTemplateListResponse = Array<NotificationTemplate>;
1169
- export interface NotificationRecipient {
1170
- user_id?: string;
1171
- data?: object | null;
930
+ export interface UpdateChannelRequestBody {
931
+ name: string;
932
+ description?: string | null;
933
+ apns?: UpdateApnsChannelRequestBody;
934
+ inbox?: UpdateInboxChannelRequestBody;
1172
935
  }
1173
- export interface SendNotificationApnsChannelOverrides {
1174
- expiration?: string | null;
1175
- collapse_id?: string | null;
1176
- priority?: number;
936
+ export interface Entitlement {
1177
937
  }
1178
- export interface SendNotificationInboxChannelOverrides {
1179
- title?: string;
1180
- description?: string | null;
938
+ export interface TenantMetrics {
939
+ child_tenant_count: number;
940
+ question_count: number;
941
+ answer_count: number;
942
+ team_member_count: number;
943
+ team_member_pending_invitation_count: number;
944
+ user_count: number;
1181
945
  }
1182
- export interface SendNotificationChannels {
1183
- apns?: SendNotificationApnsChannelOverrides;
1184
- inbox?: SendNotificationInboxChannelOverrides;
946
+ export interface CreateTenantRequestBody {
947
+ name: string;
948
+ is_test: boolean;
949
+ parent_tenant_id?: string | null;
1185
950
  }
1186
- export interface SendNotificationForTemplateRequestBody {
1187
- recipients: Array<NotificationRecipient>;
1188
- data?: object | null;
1189
- channels?: SendNotificationChannels;
951
+ export interface Tenant {
952
+ id: string;
953
+ created_at: string;
954
+ updated_at: string;
955
+ deleted_at?: string | null;
956
+ name: string;
957
+ is_test: boolean;
958
+ parent_tenant_id?: string | null;
959
+ entitlements?: Array<Entitlement> | null;
960
+ metrics?: TenantMetrics | null;
1190
961
  }
1191
- export interface CreatePushTokenRequestBody {
1192
- type: string;
1193
- token: string;
962
+ export interface TenantInvitation {
963
+ id: string;
964
+ created_at: string;
965
+ updated_at: string;
966
+ deleted_at?: string | null;
967
+ tenant_id: string;
968
+ member_id?: string | null;
969
+ name: string;
970
+ email: string;
971
+ code?: string;
972
+ expires_at?: string;
973
+ accepted_at?: string | null;
1194
974
  }
1195
- export interface UserResponse {
975
+ export interface CreateApiKeyRequestBody {
976
+ name: string;
977
+ description?: string | null;
978
+ is_public: boolean;
979
+ }
980
+ export interface ApiKey {
1196
981
  id: string;
1197
982
  created_at: string;
1198
983
  updated_at: string;
1199
984
  deleted_at?: string | null;
1200
985
  name: string;
1201
- first_name?: string | null;
1202
- last_name?: string | null;
1203
- email?: string | null;
1204
- email_verified?: boolean;
1205
- locale?: string | null;
1206
- type: string;
1207
- avatar?: ImageAssetStub;
986
+ description?: string | null;
987
+ is_public: boolean;
988
+ tenant_id: string;
1208
989
  }
1209
- export interface CreateIdentityRequestBody {
1210
- provider: string;
1211
- provider_user_id: string;
990
+ export interface ApiKeyWithSecretResponse {
991
+ id: string;
992
+ created_at: string;
993
+ updated_at: string;
994
+ deleted_at?: string | null;
995
+ name: string;
996
+ description?: string | null;
997
+ is_public: boolean;
998
+ tenant_id: string;
999
+ secret?: string | null;
1000
+ }
1001
+ export interface ApiKeyCollectionResponse {
1002
+ page: number;
1003
+ page_count: number;
1004
+ page_size: number;
1005
+ total_count: number;
1006
+ data: Array<ApiKey>;
1212
1007
  }
1213
- export interface IdentityResponse {
1008
+ export interface TeamMember {
1214
1009
  id: string;
1215
1010
  created_at: string;
1216
1011
  updated_at: string;
1217
1012
  deleted_at?: string | null;
1013
+ tenant_id: string;
1014
+ user_id?: string | null;
1015
+ name: string;
1016
+ email: string;
1017
+ avatar?: ImageAssetStub;
1018
+ }
1019
+ export interface TenantUserCollectionResponse {
1020
+ page: number;
1021
+ page_count: number;
1022
+ page_size: number;
1023
+ total_count: number;
1024
+ data: Array<TenantUserStub>;
1025
+ }
1026
+ export interface UpdateTenantRequestBody {
1027
+ name: string;
1028
+ }
1029
+ export interface CreateTenantForUserRequestBody {
1030
+ name: string;
1031
+ is_test: boolean;
1032
+ }
1033
+ export interface UpdateUserRequestBody {
1034
+ first_name: string;
1035
+ last_name: string;
1036
+ name: string;
1037
+ }
1038
+ export interface CreateIdentityRequestBody {
1218
1039
  provider: string;
1219
1040
  provider_user_id: string;
1220
- user_id: string;
1221
1041
  }
1222
1042
  export interface CreateUserRequestBody {
1223
1043
  first_name?: string | null;
@@ -1228,11 +1048,6 @@ export interface CreateUserRequestBody {
1228
1048
  type: string;
1229
1049
  identities?: Array<CreateIdentityRequestBody>;
1230
1050
  }
1231
- export interface UpdateUserRequestBody {
1232
- first_name: string;
1233
- last_name: string;
1234
- name: string;
1235
- }
1236
1051
  export interface UserCollectionResponse {
1237
1052
  page: number;
1238
1053
  page_count: number;
@@ -1240,96 +1055,21 @@ export interface UserCollectionResponse {
1240
1055
  total_count: number;
1241
1056
  data: Array<UserResponse>;
1242
1057
  }
1243
- export interface CheckAuthorizationRequestBody {
1244
- scope: string;
1245
- }
1246
- export interface CheckAuthorization {
1247
- allowed: boolean;
1248
- }
1249
- export interface UserInfoResponse {
1250
- roles?: Array<string>;
1251
- user?: UserResponse | null;
1252
- tenant_user?: TenantUser | null;
1253
- }
1254
1058
  declare class ParraAPI {
1255
1059
  private http;
1256
1060
  private options;
1257
1061
  constructor(http: HTTPClient, options: {
1258
1062
  baseUrl: string;
1259
1063
  });
1260
- uploadAvatarForUser: (body?: UploadUserAvatarRequestBody) => Promise<ImageAssetStub>;
1261
- uploadImageAssetForTenantById: (tenant_id: string, body?: UploadImageAssetForTenantRequestBody) => Promise<ImageAsset>;
1262
- createCustomer: (body?: CreateCustomerRequestBody) => Promise<Customer>;
1263
- updateEntitlementsForCustomerById: (customer_id: string) => Promise<Response>;
1264
- createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
1265
- createCheckoutSession: (body?: CreateCheckoutSessionRequestBody) => Promise<CheckoutSession>;
1064
+ checkAuthorization: (body: CheckAuthorizationRequestBody) => Promise<CheckAuthorization>;
1065
+ getUserInfo: () => Promise<UserInfoResponse>;
1066
+ getParraAuthToken: () => Promise<AuthToken>;
1067
+ uploadImageAssetForTenantById: (tenant_id: string, body: UploadImageAssetForTenantRequestBody) => Promise<ImageAsset>;
1068
+ uploadAvatarForUser: (body: UploadUserAvatarRequestBody) => Promise<ImageAssetStub>;
1069
+ createCheckoutSession: (body: CreateCheckoutSessionRequestBody) => Promise<CheckoutSession>;
1266
1070
  getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
1267
- createAudience: (body?: CreateAudienceRequestBody) => Promise<Audience>;
1268
- createSubscriberForAudienceById: (audience_id: string, body?: CreateSubscriberRequestBody) => Promise<Response>;
1269
- createTenant: (body?: CreateTenantRequestBody) => Promise<Tenant>;
1270
- getTenantById: (tenant_id: string, query?: {
1271
- include?: string;
1272
- }) => Promise<Tenant>;
1273
- updateTenantById: (tenant_id: string, body?: UpdateTenantRequestBody) => Promise<Tenant>;
1274
- deleteTenantById: (tenant_id: string) => Promise<Response>;
1275
- paginateTenantUsersForTenantById: (tenant_id: string, query?: {
1276
- $select?: string;
1277
- $top?: number;
1278
- $skip?: number;
1279
- $orderby?: string;
1280
- $filter?: string;
1281
- $expand?: string;
1282
- $search?: string;
1283
- }) => Promise<TenantUserCollectionResponse>;
1284
- getUserForTenantById: (tenant_id: string, user_id: string) => Promise<TenantUser>;
1285
- createTenantForUserById: (user_id: string, body?: CreateTenantForUserRequestBody) => Promise<Tenant>;
1286
- getTenantsForUserById: (user_id: string) => Promise<TenantListResponse>;
1287
- createApiKeyForTenantById: (tenant_id: string, body?: CreateApiKeyRequestBody) => Promise<ApiKeyWithSecretResponse>;
1288
- getApiKeysForTenantById: (tenant_id: string) => Promise<ApiKeyCollectionResponse>;
1289
- deleteApiKeyForTenantById: (tenant_id: string, api_key_id: string) => Promise<Response>;
1290
- getTenantForApiKeyById: (api_key_id: string) => Promise<Tenant>;
1291
- getInvitationsForTenantById: (tenant_id: string) => Promise<TenantInvitationListResponse>;
1292
- createInvitationForTenantById: (tenant_id: string, body?: TenantInvitationRequestBody) => Promise<TenantInvitation>;
1293
- acceptInvitationByCode: (invitation_code: string) => Promise<TenantInvitation>;
1294
- getTeamMembersForTenantById: (tenant_id: string) => Promise<TeamMemberListResponse>;
1295
- deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
1296
- updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
1297
- createAnalyticEventTypeForTenantById: (tenant_id: string, body?: CreateAnalyticEventTypeRequestBody) => Promise<AnalyticEventType>;
1298
- paginateAnalyticEventTypesForTenantById: (tenant_id: string, query?: {
1299
- $select?: string;
1300
- $top?: number;
1301
- $skip?: number;
1302
- $orderby?: string;
1303
- $filter?: string;
1304
- $expand?: string;
1305
- $search?: string;
1306
- }) => Promise<AnalyticEventTypeCollectionResponse>;
1307
- getAnalyticEventTypeById: (tenant_id: string, analytic_event_type_id: string) => Promise<AnalyticEventType>;
1308
- updateAnalyticEventTypeById: (tenant_id: string, analytic_event_type_id: string, body?: UpdateAnalyticEventTypeRequestBody) => Promise<AnalyticEventType>;
1309
- deleteAnalyticEventTypeById: (tenant_id: string, analytic_event_type_id: string) => Promise<Response>;
1310
- createAppArea: (tenant_id: string, body?: CreateAppAreaRequestBody) => Promise<AppArea>;
1311
- listAppAreas: (tenant_id: string) => Promise<AppAreaListResponse>;
1312
- getAppAreaById: (tenant_id: string, app_area_id: string) => Promise<AppArea>;
1313
- updateAppAreaById: (tenant_id: string, app_area_id: string, body?: UpdateAppAreaRequestBody) => Promise<AppArea>;
1314
- deleteAppAreaById: (tenant_id: string, app_area_id: string) => Promise<Response>;
1315
- createCampaign: (tenant_id: string, body?: CreateCampaignRequestBody) => Promise<Campaign>;
1316
- paginateCampaignsForTenantById: (tenant_id: string, query?: {
1317
- $select?: string;
1318
- $top?: number;
1319
- $skip?: number;
1320
- $orderby?: string;
1321
- $filter?: string;
1322
- $expand?: string;
1323
- $search?: string;
1324
- }) => Promise<CampaignCollectionResponse>;
1325
- getCampaignById: (tenant_id: string, campaign_id: string, query?: {
1326
- include?: string;
1327
- }) => Promise<Campaign>;
1328
- updateCampaignById: (tenant_id: string, campaign_id: string, body?: UpdateCampaignRequestBody) => Promise<Campaign>;
1329
- deleteCampaignById: (tenant_id: string, campaign_id: string) => Promise<Response>;
1330
- publishCampaignById: (tenant_id: string, campaign_id: string, body?: UpdateCampaignRequestBody) => Promise<Campaign>;
1331
- enrollEligibleUsersForCampaignById: (campaign_id: string) => Promise<Response>;
1332
- closeCampaignById: (tenant_id: string, campaign_id: string) => Promise<Campaign>;
1071
+ createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
1072
+ createSubscriberForAudienceById: (audience_id: string, body: CreateSubscriberRequestBody) => Promise<Response>;
1333
1073
  getCards: (query?: {
1334
1074
  app_area_id?: string;
1335
1075
  }) => Promise<CardsResponse>;
@@ -1344,7 +1084,7 @@ declare class ParraAPI {
1344
1084
  }) => Promise<FeedbackFormCollectionResponse>;
1345
1085
  createFeedbackFormForTenantById: (tenant_id: string, body?: CreateFeedbackFormRequestBody) => Promise<FeedbackFormResponse>;
1346
1086
  getFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string) => Promise<FeedbackFormResponse>;
1347
- updateFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string, body?: UpdateFeedbackFormRequestBody) => Promise<FeedbackFormResponse>;
1087
+ updateFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string, body: UpdateFeedbackFormRequestBody) => Promise<FeedbackFormResponse>;
1348
1088
  deleteFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string) => Promise<Response>;
1349
1089
  paginateFeedbackFormResponsesForTenantById: (tenant_id: string, feedback_form_id: string, query?: {
1350
1090
  $select?: string;
@@ -1357,7 +1097,7 @@ declare class ParraAPI {
1357
1097
  }) => Promise<FeedbackFormSubmissionCollectionResponse>;
1358
1098
  getFormById: (feedback_form_id: string) => Promise<FeedbackFormDataStub>;
1359
1099
  submitFormById: (feedback_form_id: string, body?: SubmitFeedbackFormResponseBody) => Promise<Response>;
1360
- createQuestion: (body?: CreateQuestionRequestBody) => Promise<Question>;
1100
+ createQuestion: (body: CreateQuestionRequestBody) => Promise<Question>;
1361
1101
  paginateQuestions: (query?: {
1362
1102
  $select?: string;
1363
1103
  $top?: number;
@@ -1370,10 +1110,8 @@ declare class ParraAPI {
1370
1110
  getQuestionById: (question_id: string, query?: {
1371
1111
  campaign_id?: string;
1372
1112
  }) => Promise<Question>;
1373
- updateQuestionById: (question_id: string, body?: UpdateQuestionRequestBody) => Promise<Question>;
1113
+ updateQuestionById: (question_id: string, body: UpdateQuestionRequestBody) => Promise<Question>;
1374
1114
  deleteQuestionById: (question_id: string) => Promise<Response>;
1375
- createMetricsForQuestionById: (question_id: string, body?: CreateQuestionMetricsRequestBody) => Promise<QuestionMetrics>;
1376
- answerQuestionById: (question_id: string, body?: AnswerQuestionBody) => Promise<Response>;
1377
1115
  paginateAnswersForQuestionById: (question_id: string, query?: {
1378
1116
  $select?: string;
1379
1117
  $top?: number;
@@ -1383,8 +1121,10 @@ declare class ParraAPI {
1383
1121
  $expand?: string;
1384
1122
  $search?: string;
1385
1123
  }) => Promise<AnswerCollectionResponse>;
1386
- bulkAnswerQuestions: (body?: BulkAnswerQuestionsBody) => Promise<Response>;
1387
- paginateTemplateTags: (query?: {
1124
+ answerQuestionById: (question_id: string, body: AnswerQuestionBody) => Promise<Response>;
1125
+ bulkAnswerQuestions: (body?: BulkAnswersQuestionBody) => Promise<Response>;
1126
+ createAnalyticEventTypeForTenantById: (tenant_id: string, body: CreateAnalyticEventTypeRequestBody) => Promise<AnalyticEventType>;
1127
+ paginateAnalyticEventTypesForTenantById: (tenant_id: string, query?: {
1388
1128
  $select?: string;
1389
1129
  $top?: number;
1390
1130
  $skip?: number;
@@ -1392,7 +1132,29 @@ declare class ParraAPI {
1392
1132
  $filter?: string;
1393
1133
  $expand?: string;
1394
1134
  $search?: string;
1395
- }) => Promise<TemplateTagCollectionResponse>;
1135
+ }) => Promise<AnalyticEventTypeCollectionResponse>;
1136
+ createAppArea: (tenant_id: string, body?: CreateAppAreaRequestBody) => Promise<AppArea>;
1137
+ listAppAreas: (tenant_id: string) => Promise<Array<AppArea>>;
1138
+ getAppAreaById: (tenant_id: string, app_area_id: string) => Promise<AppArea>;
1139
+ updateAppAreaById: (tenant_id: string, app_area_id: string, body: UpdateAppAreaRequestBody) => Promise<AppArea>;
1140
+ deleteAppAreaById: (tenant_id: string, app_area_id: string) => Promise<Response>;
1141
+ createCampaign: (tenant_id: string, body?: CreateCampaignRequestBody) => Promise<Campaign>;
1142
+ paginateCampaignsForTenantById: (tenant_id: string, query?: {
1143
+ $select?: string;
1144
+ $top?: number;
1145
+ $skip?: number;
1146
+ $orderby?: string;
1147
+ $filter?: string;
1148
+ $expand?: string;
1149
+ $search?: string;
1150
+ }) => Promise<CampaignCollectionResponse>;
1151
+ getCampaignById: (tenant_id: string, campaign_id: string, query?: {
1152
+ include?: string;
1153
+ }) => Promise<Campaign>;
1154
+ updateCampaignById: (tenant_id: string, campaign_id: string, body?: UpdateCampaignRequestBody) => Promise<Campaign>;
1155
+ deleteCampaignById: (tenant_id: string, campaign_id: string) => Promise<Response>;
1156
+ closeCampaignById: (tenant_id: string, campaign_id: string) => Promise<Campaign>;
1157
+ publishCampaignById: (tenant_id: string, campaign_id: string, body?: UpdateCampaignRequestBody) => Promise<Campaign>;
1396
1158
  paginateTemplatesForTenantById: (tenant_id: string, query?: {
1397
1159
  $select?: string;
1398
1160
  $top?: number;
@@ -1403,21 +1165,30 @@ declare class ParraAPI {
1403
1165
  $search?: string;
1404
1166
  }) => Promise<TemplateCollectionResponse>;
1405
1167
  cloneTemplateForTenantById: (tenant_id: string, template_id: string) => Promise<Template>;
1406
- createApplicationForTenantById: (tenant_id: string, body?: CreateApplicationRequestBody) => Promise<Application>;
1168
+ paginateTemplateTags: (query?: {
1169
+ $select?: string;
1170
+ $top?: number;
1171
+ $skip?: number;
1172
+ $orderby?: string;
1173
+ $filter?: string;
1174
+ $expand?: string;
1175
+ $search?: string;
1176
+ }) => Promise<TemplateTagCollectionResponse>;
1177
+ createApplicationForTenantById: (tenant_id: string, body: CreateApplicationRequestBody) => Promise<Application>;
1407
1178
  paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
1408
1179
  getApplicationByIdForTenantById: (tenant_id: string, application_id: string, query?: {
1409
1180
  include?: string;
1410
1181
  }) => Promise<Application>;
1411
- updateApplicationByIdForTenantById: (tenant_id: string, application_id: string, body?: UpdateApplicationRequestBody) => Promise<Application>;
1182
+ updateApplicationByIdForTenantById: (tenant_id: string, application_id: string, body: UpdateApplicationRequestBody) => Promise<Application>;
1412
1183
  deleteApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Response>;
1413
- updateApnsConfigurationForTenantApplication: (tenant_id: string, application_id: string, body?: UpdateApnsConfigurationRequestBody) => Promise<ApnsConfiguration>;
1184
+ updateApnsConfigurationForTenantApplication: (tenant_id: string, application_id: string, body: UpdateApnsConfigurationRequestBody) => Promise<ApnsConfiguration>;
1414
1185
  getInboxItemsForTenantUser: (tenant_id: string, query?: {
1415
1186
  limit?: number;
1416
1187
  offset?: number;
1417
1188
  segment?: string;
1418
1189
  archived?: boolean;
1419
1190
  }) => Promise<InboxItemCollectionResponse>;
1420
- readInboxItemsForTenantUser: (tenant_id: string, body?: ReadInboxItemsRequestBody) => Promise<Response>;
1191
+ readInboxItemsForTenantUser: (tenant_id: string, body: ReadInboxItemsRequestBody) => Promise<Response>;
1421
1192
  createNotificationTemplate: (tenant_id: string, body?: CreateNotificationTemplateRequestBody) => Promise<NotificationTemplate>;
1422
1193
  paginateNotificationTemplatesForTenantById: (tenant_id: string, query?: {
1423
1194
  $select?: string;
@@ -1431,13 +1202,20 @@ declare class ParraAPI {
1431
1202
  getNotificationTemplateById: (tenant_id: string, notification_template_id: string, query?: {
1432
1203
  include?: string;
1433
1204
  }) => Promise<NotificationTemplate>;
1434
- updateNotificationTemplateById: (tenant_id: string, notification_template_id: string, body?: UpdateNotificationTemplateRequestBody) => Promise<NotificationTemplate>;
1205
+ updateNotificationTemplateById: (tenant_id: string, notification_template_id: string, body: UpdateNotificationTemplateRequestBody) => Promise<NotificationTemplate>;
1435
1206
  deleteNotificationTemplateById: (tenant_id: string, notification_template_id: string) => Promise<Response>;
1436
- createChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, body?: CreateChannelRequestBody) => Promise<Channel>;
1437
- updateChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, body?: UpdateChannelRequestBody) => Promise<Channel>;
1207
+ createChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, body: CreateChannelRequestBody) => Promise<Channel>;
1208
+ updateChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, body: UpdateChannelRequestBody) => Promise<Channel>;
1438
1209
  deleteChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string) => Promise<Response>;
1439
- createUser: (body: CreateUserRequestBody) => Promise<UserResponse>;
1440
- listUsers: (query?: {
1210
+ getTenantForApiKeyById: (api_key_id: string) => Promise<Tenant>;
1211
+ acceptInvitationByCode: (invitation_code: string) => Promise<TenantInvitation>;
1212
+ deleteApiKeyForTenantById: (tenant_id: string, api_key_id: string) => Promise<Response>;
1213
+ createApiKeyForTenantById: (tenant_id: string, body: CreateApiKeyRequestBody) => Promise<ApiKeyWithSecretResponse>;
1214
+ getApiKeysForTenantById: (tenant_id: string) => Promise<ApiKeyCollectionResponse>;
1215
+ getTeamMembersForTenantById: (tenant_id: string) => Promise<Array<TeamMember>>;
1216
+ deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
1217
+ getUserForTenantById: (tenant_id: string, user_id: string) => Promise<TenantUser>;
1218
+ paginateTenantUsersForTenantById: (tenant_id: string, query?: {
1441
1219
  $select?: string;
1442
1220
  $top?: number;
1443
1221
  $skip?: number;
@@ -1445,16 +1223,27 @@ declare class ParraAPI {
1445
1223
  $filter?: string;
1446
1224
  $expand?: string;
1447
1225
  $search?: string;
1448
- }) => Promise<UserCollectionResponse>;
1226
+ }) => Promise<TenantUserCollectionResponse>;
1227
+ getTenantById: (tenant_id: string, query?: {
1228
+ include?: string;
1229
+ }) => Promise<Tenant>;
1230
+ updateTenantById: (tenant_id: string, body: UpdateTenantRequestBody) => Promise<Tenant>;
1231
+ deleteTenantById: (tenant_id: string) => Promise<Response>;
1232
+ createTenant: (body: CreateTenantRequestBody) => Promise<Tenant>;
1233
+ createTenantForUserById: (user_id: string, body: CreateTenantForUserRequestBody) => Promise<Tenant>;
1234
+ getTenantsForUserById: (user_id: string) => Promise<Array<Tenant>>;
1449
1235
  getUserById: (user_id: string) => Promise<UserResponse>;
1450
1236
  updateUserById: (user_id: string, body: UpdateUserRequestBody) => Promise<UserResponse>;
1451
1237
  deleteUserById: (user_id: string) => Promise<Response>;
1452
- updateAvatarForUserById: (user_id: string, body: ImageAssetStub) => Promise<Response>;
1453
- createIdentityForUserById: (user_id: string, body: CreateIdentityRequestBody) => Promise<IdentityResponse>;
1454
- listIdentitiesForUserById: (user_id: string) => Promise<Array<IdentityResponse>>;
1455
- getUserByProviderAndProviderUserId: (provider: string, provider_user_id: string) => Promise<UserResponse>;
1456
- checkAuthorization: (body?: CheckAuthorizationRequestBody) => Promise<CheckAuthorization>;
1457
- getUserInfo: () => Promise<UserInfoResponse>;
1458
- getParraAuthToken: () => Promise<AuthToken>;
1238
+ createUser: (body: CreateUserRequestBody) => Promise<UserResponse>;
1239
+ listUsers: (query?: {
1240
+ $select?: string;
1241
+ $top?: number;
1242
+ $skip?: number;
1243
+ $orderby?: string;
1244
+ $filter?: string;
1245
+ $expand?: string;
1246
+ $search?: string;
1247
+ }) => Promise<UserCollectionResponse>;
1459
1248
  }
1460
1249
  export default ParraAPI;