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