@usergist/sdk-core 0.1.0
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/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/index.cjs +1154 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +250 -0
- package/dist/index.d.ts +250 -0
- package/dist/index.js +1092 -0
- package/dist/index.js.map +1 -0
- package/dist/mobile-H9slSAy8.d.cts +2991 -0
- package/dist/mobile-H9slSAy8.d.ts +2991 -0
- package/dist/mobile.cjs +763 -0
- package/dist/mobile.cjs.map +1 -0
- package/dist/mobile.d.cts +1 -0
- package/dist/mobile.d.ts +1 -0
- package/dist/mobile.js +710 -0
- package/dist/mobile.js.map +1 -0
- package/mobile.js +4 -0
- package/package.json +64 -0
|
@@ -0,0 +1,2991 @@
|
|
|
1
|
+
type EventPropertyValue = string | number | boolean | null;
|
|
2
|
+
interface EventProperties {
|
|
3
|
+
readonly [key: string]: EventPropertyValue;
|
|
4
|
+
}
|
|
5
|
+
interface IngestEvent {
|
|
6
|
+
/** Stable client-generated ID used to deduplicate network retries. */
|
|
7
|
+
readonly eventId?: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly timestamp: string;
|
|
10
|
+
readonly anonymousId: string;
|
|
11
|
+
readonly externalId?: string | null;
|
|
12
|
+
readonly properties?: EventProperties;
|
|
13
|
+
readonly sessionId?: string;
|
|
14
|
+
readonly sdkVersion?: string;
|
|
15
|
+
readonly appVersion?: string;
|
|
16
|
+
readonly platform?: SdkPlatform;
|
|
17
|
+
}
|
|
18
|
+
interface IngestBatch {
|
|
19
|
+
readonly events: ReadonlyArray<IngestEvent>;
|
|
20
|
+
readonly context: IngestContext;
|
|
21
|
+
}
|
|
22
|
+
interface IngestContext {
|
|
23
|
+
readonly anonymousId: string;
|
|
24
|
+
readonly externalId?: string | null;
|
|
25
|
+
readonly sdkVersion: string;
|
|
26
|
+
readonly platform: SdkPlatform;
|
|
27
|
+
readonly appVersion?: string;
|
|
28
|
+
readonly locale?: string;
|
|
29
|
+
readonly timezone?: string;
|
|
30
|
+
readonly osName?: string;
|
|
31
|
+
readonly osVersion?: string;
|
|
32
|
+
readonly deviceModel?: string;
|
|
33
|
+
}
|
|
34
|
+
type SdkPlatform = 'ios' | 'android' | 'react-native' | 'flutter' | 'web';
|
|
35
|
+
type EventPropertyType = 'string' | 'number' | 'boolean' | 'date';
|
|
36
|
+
interface EventPropertySchema {
|
|
37
|
+
readonly key: string;
|
|
38
|
+
readonly type: EventPropertyType;
|
|
39
|
+
readonly required?: boolean;
|
|
40
|
+
}
|
|
41
|
+
interface EventDefinition {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly appId: string;
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly description?: string;
|
|
46
|
+
readonly properties: ReadonlyArray<EventPropertySchema>;
|
|
47
|
+
readonly status: 'active' | 'deprecated';
|
|
48
|
+
readonly createdAt: string;
|
|
49
|
+
readonly updatedAt: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type ScalarValue = string | number | boolean;
|
|
53
|
+
type ScalarList = ReadonlyArray<string | number>;
|
|
54
|
+
type ComparisonOp = 'eq' | 'neq' | 'in' | 'nin' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'starts_with' | 'exists' | 'not_exists';
|
|
55
|
+
interface UserPropertyPredicate {
|
|
56
|
+
readonly kind: 'user_property';
|
|
57
|
+
readonly key: string;
|
|
58
|
+
readonly op: ComparisonOp;
|
|
59
|
+
readonly value?: ScalarValue | ScalarList;
|
|
60
|
+
}
|
|
61
|
+
type CountOp = 'gte' | 'lte' | 'eq' | 'gt' | 'lt';
|
|
62
|
+
interface EventCountPredicate {
|
|
63
|
+
readonly kind: 'event_count';
|
|
64
|
+
readonly eventName: string;
|
|
65
|
+
readonly op: CountOp;
|
|
66
|
+
readonly count: number;
|
|
67
|
+
readonly windowDays: number;
|
|
68
|
+
readonly propertyFilters?: ReadonlyArray<UserPropertyPredicate>;
|
|
69
|
+
}
|
|
70
|
+
interface EventOccurredPredicate {
|
|
71
|
+
readonly kind: 'event_occurred';
|
|
72
|
+
readonly eventName: string;
|
|
73
|
+
readonly ever: boolean;
|
|
74
|
+
readonly windowDays?: number;
|
|
75
|
+
}
|
|
76
|
+
type Predicate = UserPropertyPredicate | EventCountPredicate | EventOccurredPredicate;
|
|
77
|
+
type Combinator = 'AND' | 'OR';
|
|
78
|
+
interface PredicateGroup {
|
|
79
|
+
readonly combinator: Combinator;
|
|
80
|
+
readonly predicates: ReadonlyArray<Predicate | PredicateGroup>;
|
|
81
|
+
}
|
|
82
|
+
interface SegmentDsl {
|
|
83
|
+
readonly version: 1;
|
|
84
|
+
readonly root: PredicateGroup;
|
|
85
|
+
}
|
|
86
|
+
declare function emptySegmentDsl(): SegmentDsl;
|
|
87
|
+
|
|
88
|
+
type Platform = 'ios' | 'android' | 'web';
|
|
89
|
+
type AudienceCombinator = 'all' | 'any';
|
|
90
|
+
type AudienceMode = 'everyone' | 'match';
|
|
91
|
+
interface SegmentCondition {
|
|
92
|
+
readonly kind: 'segment';
|
|
93
|
+
readonly op: 'is' | 'is_not';
|
|
94
|
+
readonly segmentIds: ReadonlyArray<string>;
|
|
95
|
+
}
|
|
96
|
+
interface CountryCondition {
|
|
97
|
+
readonly kind: 'country';
|
|
98
|
+
readonly op: 'is_any_of' | 'is_none_of';
|
|
99
|
+
readonly values: ReadonlyArray<string>;
|
|
100
|
+
}
|
|
101
|
+
interface LastActiveCondition {
|
|
102
|
+
readonly kind: 'last_active';
|
|
103
|
+
readonly op: 'within_days' | 'before_days' | 'never';
|
|
104
|
+
readonly days?: number;
|
|
105
|
+
}
|
|
106
|
+
interface InstallDateCondition {
|
|
107
|
+
readonly kind: 'install_date';
|
|
108
|
+
readonly op: 'within_days' | 'before_days' | 'after_date' | 'before_date' | 'between';
|
|
109
|
+
readonly days?: number;
|
|
110
|
+
readonly date?: string;
|
|
111
|
+
readonly from?: string;
|
|
112
|
+
readonly to?: string;
|
|
113
|
+
}
|
|
114
|
+
interface PlatformCondition {
|
|
115
|
+
readonly kind: 'platform';
|
|
116
|
+
readonly op: 'is' | 'is_not';
|
|
117
|
+
readonly values: ReadonlyArray<Platform>;
|
|
118
|
+
}
|
|
119
|
+
interface UserPropertyCondition {
|
|
120
|
+
readonly kind: 'user_property';
|
|
121
|
+
readonly key: string;
|
|
122
|
+
readonly op: ComparisonOp;
|
|
123
|
+
readonly value?: string | number | boolean | ReadonlyArray<string | number>;
|
|
124
|
+
}
|
|
125
|
+
interface EventPropertyFilter {
|
|
126
|
+
readonly key: string;
|
|
127
|
+
readonly op: ComparisonOp;
|
|
128
|
+
readonly value?: string | number | boolean | ReadonlyArray<string | number>;
|
|
129
|
+
}
|
|
130
|
+
interface EventPerformedCondition {
|
|
131
|
+
readonly kind: 'event_performed';
|
|
132
|
+
readonly op: 'did' | 'did_not';
|
|
133
|
+
readonly eventName: string;
|
|
134
|
+
/** @deprecated Kept so previously saved audience definitions still load. */
|
|
135
|
+
readonly property?: EventPropertyFilter;
|
|
136
|
+
readonly propertyFilters?: ReadonlyArray<EventPropertyFilter>;
|
|
137
|
+
readonly windowDays?: number;
|
|
138
|
+
readonly minCount?: number;
|
|
139
|
+
}
|
|
140
|
+
interface AppVersionCondition {
|
|
141
|
+
readonly kind: 'app_version';
|
|
142
|
+
readonly op: 'eq' | 'neq' | 'gte' | 'lte' | 'gt' | 'lt';
|
|
143
|
+
readonly version: string;
|
|
144
|
+
}
|
|
145
|
+
type AudienceCondition = SegmentCondition | CountryCondition | LastActiveCondition | InstallDateCondition | PlatformCondition | UserPropertyCondition | EventPerformedCondition | AppVersionCondition;
|
|
146
|
+
type AudienceConditionKind = AudienceCondition['kind'];
|
|
147
|
+
interface AudienceSpec {
|
|
148
|
+
readonly version: 1;
|
|
149
|
+
readonly mode: AudienceMode;
|
|
150
|
+
readonly combinator: AudienceCombinator;
|
|
151
|
+
readonly conditions: ReadonlyArray<AudienceCondition>;
|
|
152
|
+
}
|
|
153
|
+
declare function emptyAudienceSpec(): AudienceSpec;
|
|
154
|
+
type TriggerOccurrenceMode = 'every' | 'after_nth' | 'first_only';
|
|
155
|
+
interface TriggerOccurrence {
|
|
156
|
+
readonly mode: TriggerOccurrenceMode;
|
|
157
|
+
readonly n?: number;
|
|
158
|
+
}
|
|
159
|
+
interface ActiveWindow {
|
|
160
|
+
readonly startAt?: string;
|
|
161
|
+
readonly endAt?: string;
|
|
162
|
+
}
|
|
163
|
+
interface AppOpenTrigger {
|
|
164
|
+
readonly kind: 'app_open';
|
|
165
|
+
readonly delaySeconds?: number;
|
|
166
|
+
readonly onceOnly?: boolean;
|
|
167
|
+
readonly activeWindow?: ActiveWindow;
|
|
168
|
+
}
|
|
169
|
+
interface EventTrigger {
|
|
170
|
+
readonly kind: 'event';
|
|
171
|
+
readonly eventName: string;
|
|
172
|
+
readonly propertyFilters?: ReadonlyArray<EventPropertyFilter>;
|
|
173
|
+
readonly occurrence?: TriggerOccurrence;
|
|
174
|
+
readonly delaySeconds?: number;
|
|
175
|
+
readonly onceOnly?: boolean;
|
|
176
|
+
readonly activeWindow?: ActiveWindow;
|
|
177
|
+
}
|
|
178
|
+
interface AudienceJoinTrigger {
|
|
179
|
+
readonly kind: 'audience_join';
|
|
180
|
+
readonly delaySeconds?: number;
|
|
181
|
+
readonly onceOnly?: boolean;
|
|
182
|
+
readonly activeWindow?: ActiveWindow;
|
|
183
|
+
}
|
|
184
|
+
interface AppVersionChangedTrigger {
|
|
185
|
+
readonly kind: 'app_version_changed';
|
|
186
|
+
readonly delaySeconds?: number;
|
|
187
|
+
readonly onceOnly?: boolean;
|
|
188
|
+
readonly activeWindow?: ActiveWindow;
|
|
189
|
+
}
|
|
190
|
+
type TriggerSpec = AppOpenTrigger | EventTrigger | AudienceJoinTrigger | AppVersionChangedTrigger;
|
|
191
|
+
type TriggerKind = TriggerSpec['kind'];
|
|
192
|
+
/**
|
|
193
|
+
* Synthetic event name the SDK emits whenever the host app cold-starts
|
|
194
|
+
* or transitions from background to foreground. The trigger engine
|
|
195
|
+
* indexes `app_open`-kind prompts under this name so the same matching
|
|
196
|
+
* pipeline handles both event-driven and lifecycle-driven prompts.
|
|
197
|
+
*/
|
|
198
|
+
declare const APP_OPEN_EVENT_NAME = "$app_open";
|
|
199
|
+
/**
|
|
200
|
+
* Synthetic event the engine indexes `audience_join` campaigns under.
|
|
201
|
+
* Mirrors APP_OPEN_EVENT_NAME so the same matching pipeline handles
|
|
202
|
+
* both lifecycle and audience-membership triggers.
|
|
203
|
+
*/
|
|
204
|
+
declare const AUDIENCE_JOIN_EVENT_NAME = "$audience_join";
|
|
205
|
+
declare const AUDIENCE_JOIN_TRIGGER_KIND: AudienceJoinTrigger['kind'];
|
|
206
|
+
/**
|
|
207
|
+
* Synthetic event the SDK emits on cold-start when the persisted app
|
|
208
|
+
* version differs from the running binary's version. Lets in-app
|
|
209
|
+
* messages (and feedback / surveys) target users right after an update
|
|
210
|
+
* — e.g. "What's new" modals.
|
|
211
|
+
*/
|
|
212
|
+
declare const APP_VERSION_CHANGED_EVENT_NAME = "$app_version_changed";
|
|
213
|
+
declare function defaultTriggerSpec(): TriggerSpec;
|
|
214
|
+
declare function defaultEventTrigger(eventName?: string): EventTrigger;
|
|
215
|
+
|
|
216
|
+
interface ThemeColors {
|
|
217
|
+
readonly primary: string;
|
|
218
|
+
readonly background: string;
|
|
219
|
+
readonly text: string;
|
|
220
|
+
readonly subtext: string;
|
|
221
|
+
readonly border: string;
|
|
222
|
+
readonly accent?: string;
|
|
223
|
+
readonly button?: string;
|
|
224
|
+
}
|
|
225
|
+
type CornerRadiusPreset = 'sharp' | 'soft' | 'rounded' | 'pill';
|
|
226
|
+
declare const RADIUS_PRESETS: Record<CornerRadiusPreset, number>;
|
|
227
|
+
interface ThemePreset {
|
|
228
|
+
readonly id: string;
|
|
229
|
+
readonly name: string;
|
|
230
|
+
readonly description: string;
|
|
231
|
+
readonly colors: ThemeColors;
|
|
232
|
+
readonly radius: number;
|
|
233
|
+
readonly fontFamily: string;
|
|
234
|
+
readonly swatches: readonly [string, string, string];
|
|
235
|
+
}
|
|
236
|
+
declare const THEME_PRESETS: ReadonlyArray<ThemePreset>;
|
|
237
|
+
declare function getThemePresetById(id: string): ThemePreset | undefined;
|
|
238
|
+
declare function defaultThemePreset(): ThemePreset;
|
|
239
|
+
|
|
240
|
+
type BrandPillar = 'feedback' | 'survey' | 'inapp' | 'requests';
|
|
241
|
+
type ThemeMode = 'app_default' | 'custom';
|
|
242
|
+
interface BrandThemeTokens {
|
|
243
|
+
readonly colors: {
|
|
244
|
+
readonly primary: string;
|
|
245
|
+
readonly background: string;
|
|
246
|
+
readonly text: string;
|
|
247
|
+
readonly subtext: string;
|
|
248
|
+
readonly border: string;
|
|
249
|
+
};
|
|
250
|
+
readonly radius: number;
|
|
251
|
+
readonly fontFamily: string;
|
|
252
|
+
}
|
|
253
|
+
type BrandThemeRef = `preset:${string}` | `custom:${string}`;
|
|
254
|
+
interface BrandTheme {
|
|
255
|
+
readonly ref: BrandThemeRef;
|
|
256
|
+
readonly id: string;
|
|
257
|
+
readonly kind: 'preset' | 'custom';
|
|
258
|
+
readonly name: string;
|
|
259
|
+
readonly description?: string;
|
|
260
|
+
readonly tokens: BrandThemeTokens;
|
|
261
|
+
readonly swatches: readonly [string, string, string];
|
|
262
|
+
readonly editable: boolean;
|
|
263
|
+
readonly assignedPillars: ReadonlyArray<BrandPillar>;
|
|
264
|
+
readonly createdAt?: string;
|
|
265
|
+
readonly updatedAt?: string;
|
|
266
|
+
}
|
|
267
|
+
type BrandThemeDefaults = Readonly<Record<BrandPillar, BrandThemeRef>>;
|
|
268
|
+
interface AppBrandSettings {
|
|
269
|
+
readonly appId: string;
|
|
270
|
+
readonly themes: ReadonlyArray<BrandTheme>;
|
|
271
|
+
readonly defaults: BrandThemeDefaults;
|
|
272
|
+
readonly resolvedDefaults: Readonly<Record<BrandPillar, BrandThemeTokens>>;
|
|
273
|
+
readonly updatedAt: string;
|
|
274
|
+
}
|
|
275
|
+
interface CreateBrandThemeRequest {
|
|
276
|
+
readonly name: string;
|
|
277
|
+
readonly tokens: BrandThemeTokens;
|
|
278
|
+
}
|
|
279
|
+
interface UpdateBrandThemeRequest {
|
|
280
|
+
readonly name?: string;
|
|
281
|
+
readonly tokens?: BrandThemeTokens;
|
|
282
|
+
}
|
|
283
|
+
interface UpdateBrandThemeDefaultsRequest {
|
|
284
|
+
readonly defaults: BrandThemeDefaults;
|
|
285
|
+
}
|
|
286
|
+
declare function brandTokensFromPreset(preset: Pick<ThemePreset, 'colors' | 'radius' | 'fontFamily'>): BrandThemeTokens;
|
|
287
|
+
declare function promptThemeFromBrandTokens(tokens: BrandThemeTokens): PromptTheme;
|
|
288
|
+
declare function inAppColorsFromBrandTokens(tokens: BrandThemeTokens): {
|
|
289
|
+
readonly backgroundColor: string;
|
|
290
|
+
readonly accentColor: string;
|
|
291
|
+
};
|
|
292
|
+
declare function requestAccentFromBrandTokens(tokens: BrandThemeTokens): string;
|
|
293
|
+
|
|
294
|
+
type QuestionType = 'rating' | 'nps' | 'multiple_choice' | 'short_text';
|
|
295
|
+
type RatingDisplayMode = 'stars' | 'numeric' | 'emoji';
|
|
296
|
+
interface RatingQuestion {
|
|
297
|
+
readonly id: string;
|
|
298
|
+
readonly type: 'rating';
|
|
299
|
+
readonly title: string;
|
|
300
|
+
readonly subtitle?: string;
|
|
301
|
+
readonly imageUrl?: string;
|
|
302
|
+
readonly scale: 5 | 10;
|
|
303
|
+
readonly display?: RatingDisplayMode;
|
|
304
|
+
readonly lowLabel?: string;
|
|
305
|
+
readonly highLabel?: string;
|
|
306
|
+
}
|
|
307
|
+
interface NpsQuestion {
|
|
308
|
+
readonly id: string;
|
|
309
|
+
readonly type: 'nps';
|
|
310
|
+
readonly title: string;
|
|
311
|
+
readonly subtitle?: string;
|
|
312
|
+
readonly imageUrl?: string;
|
|
313
|
+
readonly followUp?: string;
|
|
314
|
+
readonly lowLabel?: string;
|
|
315
|
+
readonly highLabel?: string;
|
|
316
|
+
}
|
|
317
|
+
interface MultipleChoiceQuestion {
|
|
318
|
+
readonly id: string;
|
|
319
|
+
readonly type: 'multiple_choice';
|
|
320
|
+
readonly title: string;
|
|
321
|
+
readonly subtitle?: string;
|
|
322
|
+
readonly imageUrl?: string;
|
|
323
|
+
readonly options: ReadonlyArray<{
|
|
324
|
+
id: string;
|
|
325
|
+
label: string;
|
|
326
|
+
}>;
|
|
327
|
+
readonly multiSelect?: boolean;
|
|
328
|
+
}
|
|
329
|
+
interface ShortTextQuestion {
|
|
330
|
+
readonly id: string;
|
|
331
|
+
readonly type: 'short_text';
|
|
332
|
+
readonly title: string;
|
|
333
|
+
readonly subtitle?: string;
|
|
334
|
+
readonly imageUrl?: string;
|
|
335
|
+
readonly placeholder?: string;
|
|
336
|
+
readonly maxLength?: number;
|
|
337
|
+
}
|
|
338
|
+
type Question = RatingQuestion | NpsQuestion | MultipleChoiceQuestion | ShortTextQuestion;
|
|
339
|
+
interface PromptTheme {
|
|
340
|
+
readonly presetId?: string;
|
|
341
|
+
readonly colors?: {
|
|
342
|
+
readonly primary?: string;
|
|
343
|
+
readonly background?: string;
|
|
344
|
+
readonly text?: string;
|
|
345
|
+
readonly subtext?: string;
|
|
346
|
+
readonly border?: string;
|
|
347
|
+
readonly accent?: string;
|
|
348
|
+
readonly button?: string;
|
|
349
|
+
};
|
|
350
|
+
readonly radius?: number;
|
|
351
|
+
readonly fontFamily?: string;
|
|
352
|
+
}
|
|
353
|
+
interface FrequencyCaps {
|
|
354
|
+
readonly perPromptDays?: number;
|
|
355
|
+
readonly perUserDays?: number;
|
|
356
|
+
}
|
|
357
|
+
type PromptStatus = 'draft' | 'active' | 'paused' | 'archived';
|
|
358
|
+
interface Prompt {
|
|
359
|
+
readonly id: string;
|
|
360
|
+
readonly appId: string;
|
|
361
|
+
readonly name: string;
|
|
362
|
+
/** @deprecated use `trigger.eventName` when `trigger.kind === 'event'` */
|
|
363
|
+
readonly triggerEventName: string;
|
|
364
|
+
/** @deprecated use `audience` (segment-kind condition) */
|
|
365
|
+
readonly segmentId?: string | null;
|
|
366
|
+
readonly audience?: AudienceSpec;
|
|
367
|
+
readonly trigger?: TriggerSpec;
|
|
368
|
+
readonly questions: ReadonlyArray<Question>;
|
|
369
|
+
readonly themeMode: ThemeMode;
|
|
370
|
+
readonly theme?: PromptTheme;
|
|
371
|
+
readonly frequency: FrequencyCaps;
|
|
372
|
+
readonly startAt?: string | null;
|
|
373
|
+
readonly endAt?: string | null;
|
|
374
|
+
readonly status: PromptStatus;
|
|
375
|
+
readonly createdAt: string;
|
|
376
|
+
readonly updatedAt: string;
|
|
377
|
+
}
|
|
378
|
+
interface ArmedTrigger {
|
|
379
|
+
readonly promptId: string;
|
|
380
|
+
readonly eventName: string;
|
|
381
|
+
readonly segmentRules?: SerializedSegmentRules | null;
|
|
382
|
+
/**
|
|
383
|
+
* True when the SDK can safely decide this trigger locally for instant UI.
|
|
384
|
+
* Advanced occurrence, delay, property-filter, and server-only audience
|
|
385
|
+
* rules remain authoritative on the server and arrive via instructions.
|
|
386
|
+
*/
|
|
387
|
+
readonly clientSideEligible?: boolean;
|
|
388
|
+
readonly frequency: FrequencyCaps;
|
|
389
|
+
readonly prompt: ClientPrompt;
|
|
390
|
+
}
|
|
391
|
+
interface ClientPrompt {
|
|
392
|
+
readonly id: string;
|
|
393
|
+
readonly questions: ReadonlyArray<Question>;
|
|
394
|
+
readonly theme?: PromptTheme;
|
|
395
|
+
}
|
|
396
|
+
interface SerializedSegmentRules {
|
|
397
|
+
readonly userProperties?: ReadonlyArray<UserPropertyRule>;
|
|
398
|
+
readonly eventCounts?: ReadonlyArray<EventCountRule>;
|
|
399
|
+
}
|
|
400
|
+
interface UserPropertyRule {
|
|
401
|
+
readonly key: string;
|
|
402
|
+
readonly op: 'eq' | 'neq' | 'in' | 'gte' | 'lte' | 'gt' | 'lt';
|
|
403
|
+
readonly value: string | number | boolean | ReadonlyArray<string | number>;
|
|
404
|
+
}
|
|
405
|
+
interface EventCountRule {
|
|
406
|
+
readonly eventName: string;
|
|
407
|
+
readonly op: 'gte' | 'lte' | 'eq';
|
|
408
|
+
readonly count: number;
|
|
409
|
+
readonly windowDays: number;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
interface Segment {
|
|
413
|
+
readonly id: string;
|
|
414
|
+
readonly appId: string;
|
|
415
|
+
readonly name: string;
|
|
416
|
+
readonly description?: string;
|
|
417
|
+
readonly definition: AudienceSpec | null;
|
|
418
|
+
readonly rules: SerializedSegmentRules | null;
|
|
419
|
+
readonly createdAt: string;
|
|
420
|
+
readonly updatedAt: string;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
type AnswerValue = number | string | ReadonlyArray<string> | null;
|
|
424
|
+
interface ResponseAnswer {
|
|
425
|
+
readonly questionId: string;
|
|
426
|
+
readonly value: AnswerValue;
|
|
427
|
+
}
|
|
428
|
+
interface PromptResponse {
|
|
429
|
+
readonly id: string;
|
|
430
|
+
readonly appId: string;
|
|
431
|
+
readonly promptId: string;
|
|
432
|
+
readonly anonymousId: string;
|
|
433
|
+
readonly externalId?: string | null;
|
|
434
|
+
readonly answers: ReadonlyArray<ResponseAnswer>;
|
|
435
|
+
readonly dismissed: boolean;
|
|
436
|
+
readonly latencyMs?: number;
|
|
437
|
+
readonly createdAt: string;
|
|
438
|
+
}
|
|
439
|
+
interface SubmitResponsePayload {
|
|
440
|
+
readonly idempotencyKey?: string;
|
|
441
|
+
readonly promptId: string;
|
|
442
|
+
readonly anonymousId: string;
|
|
443
|
+
readonly externalId?: string | null;
|
|
444
|
+
readonly answers?: ReadonlyArray<ResponseAnswer>;
|
|
445
|
+
readonly dismissed?: boolean;
|
|
446
|
+
readonly latencyMs?: number;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
declare const INAPP_SHOWN_EVENT_NAME = "$inapp_shown";
|
|
450
|
+
declare const INAPP_DISMISSED_EVENT_NAME = "$inapp_dismissed";
|
|
451
|
+
declare const INAPP_AUTO_DISMISSED_EVENT_NAME = "$inapp_auto_dismissed";
|
|
452
|
+
declare const INAPP_CTA_CLICKED_EVENT_NAME = "$inapp_cta_clicked";
|
|
453
|
+
type InAppMessageFormat = 'modal' | 'modal_full' | 'slideup';
|
|
454
|
+
type InAppMessageStatus = 'draft' | 'scheduled' | 'active' | 'paused' | 'completed' | 'archived';
|
|
455
|
+
type InAppMessageMode = 'triggered' | 'scheduled';
|
|
456
|
+
type JsonAction = Readonly<Record<string, unknown>>;
|
|
457
|
+
type InAppCtaAction = 'open_url' | 'deep_link' | 'dismiss' | 'custom_event' | 'json';
|
|
458
|
+
interface InAppCta {
|
|
459
|
+
readonly label: string;
|
|
460
|
+
readonly action: InAppCtaAction;
|
|
461
|
+
readonly target?: string;
|
|
462
|
+
/** Host-defined action data dispatched to the app when this CTA is tapped. */
|
|
463
|
+
readonly actionJson?: JsonAction;
|
|
464
|
+
}
|
|
465
|
+
interface InAppFrequency {
|
|
466
|
+
readonly cooldownAfterShownDays?: number;
|
|
467
|
+
readonly cooldownAfterDismissedDays?: number;
|
|
468
|
+
readonly cooldownAfterCtaClickedDays?: number;
|
|
469
|
+
readonly maxImpressionsPerUser?: number;
|
|
470
|
+
readonly perPillarDays?: number;
|
|
471
|
+
readonly perGlobalDays?: number;
|
|
472
|
+
}
|
|
473
|
+
interface InAppMessage {
|
|
474
|
+
readonly id: string;
|
|
475
|
+
readonly appId: string;
|
|
476
|
+
readonly name: string;
|
|
477
|
+
readonly status: InAppMessageStatus;
|
|
478
|
+
readonly mode: InAppMessageMode;
|
|
479
|
+
readonly audienceSegmentId: string | null;
|
|
480
|
+
readonly audience: AudienceSpec | null;
|
|
481
|
+
readonly trigger: TriggerSpec | null;
|
|
482
|
+
readonly triggerEventName: string | null;
|
|
483
|
+
readonly schedule: unknown | null;
|
|
484
|
+
readonly screenAllowlist: ReadonlyArray<string>;
|
|
485
|
+
readonly screenDenylist: ReadonlyArray<string>;
|
|
486
|
+
readonly frequency: InAppFrequency;
|
|
487
|
+
readonly conversionGoalEvent: string | null;
|
|
488
|
+
readonly conversionWindowHours: number;
|
|
489
|
+
readonly priority: number;
|
|
490
|
+
readonly forceShow: boolean;
|
|
491
|
+
readonly autoDismissSeconds: number | null;
|
|
492
|
+
readonly format: InAppMessageFormat;
|
|
493
|
+
readonly title: string;
|
|
494
|
+
readonly body: string | null;
|
|
495
|
+
readonly imageUrl: string | null;
|
|
496
|
+
readonly themeMode: ThemeMode;
|
|
497
|
+
readonly backgroundColor: string | null;
|
|
498
|
+
readonly accentColor: string | null;
|
|
499
|
+
readonly backdropEnabled: boolean;
|
|
500
|
+
readonly ctas: ReadonlyArray<InAppCta>;
|
|
501
|
+
readonly startAt: string | null;
|
|
502
|
+
readonly endAt: string | null;
|
|
503
|
+
readonly createdAt: string;
|
|
504
|
+
readonly updatedAt: string;
|
|
505
|
+
}
|
|
506
|
+
interface CreateInAppMessageRequest {
|
|
507
|
+
readonly name: string;
|
|
508
|
+
readonly audienceSegmentId?: string | null;
|
|
509
|
+
readonly audience?: AudienceSpec;
|
|
510
|
+
readonly trigger?: TriggerSpec;
|
|
511
|
+
readonly triggerEventName?: string | null;
|
|
512
|
+
readonly screenAllowlist?: ReadonlyArray<string>;
|
|
513
|
+
readonly screenDenylist?: ReadonlyArray<string>;
|
|
514
|
+
readonly frequency?: InAppFrequency;
|
|
515
|
+
readonly conversionGoalEvent?: string | null;
|
|
516
|
+
readonly conversionWindowHours?: number;
|
|
517
|
+
readonly priority?: number;
|
|
518
|
+
readonly forceShow?: boolean;
|
|
519
|
+
readonly autoDismissSeconds?: number | null;
|
|
520
|
+
readonly format: InAppMessageFormat;
|
|
521
|
+
readonly title: string;
|
|
522
|
+
readonly body?: string | null;
|
|
523
|
+
readonly imageUrl?: string | null;
|
|
524
|
+
readonly themeMode?: ThemeMode;
|
|
525
|
+
readonly backgroundColor?: string | null;
|
|
526
|
+
readonly accentColor?: string | null;
|
|
527
|
+
readonly backdropEnabled?: boolean;
|
|
528
|
+
readonly ctas?: ReadonlyArray<InAppCta>;
|
|
529
|
+
readonly startAt?: string | null;
|
|
530
|
+
readonly endAt?: string | null;
|
|
531
|
+
readonly status?: InAppMessageStatus;
|
|
532
|
+
}
|
|
533
|
+
interface UpdateInAppMessageRequest extends Partial<CreateInAppMessageRequest> {
|
|
534
|
+
readonly status?: InAppMessageStatus;
|
|
535
|
+
}
|
|
536
|
+
interface InAppMessageAnalytics {
|
|
537
|
+
readonly totals: {
|
|
538
|
+
readonly impressions: number;
|
|
539
|
+
readonly dismissed: number;
|
|
540
|
+
readonly autoDismissed: number;
|
|
541
|
+
readonly ctaClicked: number;
|
|
542
|
+
};
|
|
543
|
+
readonly timeline: ReadonlyArray<{
|
|
544
|
+
readonly day: string;
|
|
545
|
+
readonly impressions: number;
|
|
546
|
+
readonly dismissed: number;
|
|
547
|
+
readonly ctaClicked: number;
|
|
548
|
+
}>;
|
|
549
|
+
}
|
|
550
|
+
interface ArmedInAppMessage {
|
|
551
|
+
readonly messageId: string;
|
|
552
|
+
readonly eventName: string;
|
|
553
|
+
/** True only when the SDK can make the same targeting decision locally. */
|
|
554
|
+
readonly clientSideEligible?: boolean;
|
|
555
|
+
readonly format: InAppMessageFormat;
|
|
556
|
+
readonly title: string;
|
|
557
|
+
readonly body: string | null;
|
|
558
|
+
readonly imageUrl: string | null;
|
|
559
|
+
readonly themeMode?: ThemeMode;
|
|
560
|
+
readonly backgroundColor: string | null;
|
|
561
|
+
readonly accentColor: string | null;
|
|
562
|
+
/** Defaults to true when omitted by an older API/cache payload. */
|
|
563
|
+
readonly backdropEnabled?: boolean;
|
|
564
|
+
readonly ctas: ReadonlyArray<InAppCta>;
|
|
565
|
+
readonly autoDismissSeconds: number | null;
|
|
566
|
+
readonly screenAllowlist: ReadonlyArray<string>;
|
|
567
|
+
readonly screenDenylist: ReadonlyArray<string>;
|
|
568
|
+
readonly forceShow: boolean;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
type PushDeliveryMode = 'broadcast' | 'scheduled' | 'triggered' | 'transactional';
|
|
572
|
+
type PushPlatformFilter = 'all' | 'ios' | 'android';
|
|
573
|
+
type CampaignType = 'push' | 'survey';
|
|
574
|
+
type CampaignMode = 'broadcast' | 'scheduled' | 'triggered' | 'transactional' | 'on_demand' | 'link_only';
|
|
575
|
+
type CampaignStatus = 'draft' | 'scheduled' | 'active' | 'paused' | 'completed' | 'archived';
|
|
576
|
+
type PushActionType = 'open_app' | 'deep_link' | 'url' | 'dismiss' | 'json';
|
|
577
|
+
interface PushActionButton {
|
|
578
|
+
readonly label: string;
|
|
579
|
+
readonly action: PushActionType;
|
|
580
|
+
readonly target?: string;
|
|
581
|
+
/** Host-defined action data dispatched to the app when this button is tapped. */
|
|
582
|
+
readonly actionJson?: JsonAction;
|
|
583
|
+
}
|
|
584
|
+
type PushUrgency = 'time_sensitive' | 'normal' | 'low';
|
|
585
|
+
type PushInterruptionLevel = 'passive' | 'active' | 'time-sensitive' | 'critical';
|
|
586
|
+
interface PushVariant {
|
|
587
|
+
readonly id: string;
|
|
588
|
+
readonly campaignId: string;
|
|
589
|
+
readonly language: string | null;
|
|
590
|
+
readonly title: string;
|
|
591
|
+
readonly body: string;
|
|
592
|
+
readonly imageUrl: string | null;
|
|
593
|
+
readonly actionButtons: ReadonlyArray<PushActionButton>;
|
|
594
|
+
readonly deepLink: string | null;
|
|
595
|
+
readonly badge: string | null;
|
|
596
|
+
readonly sound: string | null;
|
|
597
|
+
readonly payloadExtras: Readonly<Record<string, unknown>>;
|
|
598
|
+
readonly abGroup: string | null;
|
|
599
|
+
readonly weight: number;
|
|
600
|
+
readonly createdAt: string;
|
|
601
|
+
readonly updatedAt: string;
|
|
602
|
+
readonly ttlSeconds?: number | null;
|
|
603
|
+
readonly collapseKey?: string | null;
|
|
604
|
+
readonly urgency?: PushUrgency;
|
|
605
|
+
readonly androidChannelId?: string | null;
|
|
606
|
+
readonly iosThreadId?: string | null;
|
|
607
|
+
readonly interruptionLevel?: PushInterruptionLevel | null;
|
|
608
|
+
}
|
|
609
|
+
type PeriodicFrequency = 'daily' | 'weekly' | 'monthly';
|
|
610
|
+
type PushSchedule = {
|
|
611
|
+
readonly kind: 'once_utc';
|
|
612
|
+
readonly at: string;
|
|
613
|
+
} | {
|
|
614
|
+
readonly kind: 'once_local';
|
|
615
|
+
readonly date: string;
|
|
616
|
+
readonly hourLocal: number;
|
|
617
|
+
readonly minuteLocal?: number;
|
|
618
|
+
} | {
|
|
619
|
+
readonly kind: 'periodic';
|
|
620
|
+
readonly frequency: PeriodicFrequency;
|
|
621
|
+
readonly hourLocal: number;
|
|
622
|
+
readonly minuteLocal?: number;
|
|
623
|
+
readonly weekday?: number;
|
|
624
|
+
readonly dayOfMonth?: number;
|
|
625
|
+
readonly localPerRecipient?: boolean;
|
|
626
|
+
readonly referenceTimezone?: string;
|
|
627
|
+
};
|
|
628
|
+
interface PushFrequencyCap {
|
|
629
|
+
readonly perCampaignDays?: number;
|
|
630
|
+
readonly perPillarDays?: number;
|
|
631
|
+
readonly perGlobalDays?: number;
|
|
632
|
+
readonly maxPerUser?: number;
|
|
633
|
+
}
|
|
634
|
+
interface PushQuietHours {
|
|
635
|
+
readonly enabled: boolean;
|
|
636
|
+
readonly startLocal: number;
|
|
637
|
+
readonly endLocal: number;
|
|
638
|
+
readonly behavior: 'hold' | 'drop';
|
|
639
|
+
}
|
|
640
|
+
interface PushABConfig {
|
|
641
|
+
readonly enabled: boolean;
|
|
642
|
+
readonly winnerMetric: 'delivered' | 'opened' | 'clicked';
|
|
643
|
+
readonly autoPromote: boolean;
|
|
644
|
+
readonly confidence: number;
|
|
645
|
+
}
|
|
646
|
+
interface Campaign {
|
|
647
|
+
readonly id: string;
|
|
648
|
+
readonly appId: string;
|
|
649
|
+
readonly name: string;
|
|
650
|
+
readonly type: 'push';
|
|
651
|
+
readonly mode: PushDeliveryMode;
|
|
652
|
+
readonly status: CampaignStatus;
|
|
653
|
+
readonly audienceSegmentId: string | null;
|
|
654
|
+
readonly audience: AudienceSpec | null;
|
|
655
|
+
readonly trigger: TriggerSpec | null;
|
|
656
|
+
readonly triggerEventName: string | null;
|
|
657
|
+
readonly schedule: PushSchedule | null;
|
|
658
|
+
readonly frequencyCap: PushFrequencyCap;
|
|
659
|
+
readonly quietHours: PushQuietHours;
|
|
660
|
+
readonly abConfig: PushABConfig;
|
|
661
|
+
readonly startAt: string | null;
|
|
662
|
+
readonly endAt: string | null;
|
|
663
|
+
readonly startedAt: string | null;
|
|
664
|
+
readonly endedAt: string | null;
|
|
665
|
+
readonly createdAt: string;
|
|
666
|
+
readonly updatedAt: string;
|
|
667
|
+
}
|
|
668
|
+
interface CampaignWithVariants extends Campaign {
|
|
669
|
+
readonly variants: ReadonlyArray<PushVariant>;
|
|
670
|
+
}
|
|
671
|
+
interface RegisterDeviceTokenPayload {
|
|
672
|
+
readonly anonymousId: string;
|
|
673
|
+
readonly externalId?: string;
|
|
674
|
+
readonly token: string;
|
|
675
|
+
readonly platform: 'ios' | 'android';
|
|
676
|
+
readonly environment?: 'production' | 'sandbox';
|
|
677
|
+
readonly language?: string;
|
|
678
|
+
readonly timezone?: string;
|
|
679
|
+
readonly appVersion?: string;
|
|
680
|
+
readonly sdkVersion?: string;
|
|
681
|
+
readonly optIn?: boolean;
|
|
682
|
+
}
|
|
683
|
+
interface UpdateDeviceTokenPayload {
|
|
684
|
+
readonly anonymousId: string;
|
|
685
|
+
readonly token: string;
|
|
686
|
+
readonly language?: string;
|
|
687
|
+
readonly timezone?: string;
|
|
688
|
+
readonly optIn?: boolean;
|
|
689
|
+
readonly appVersion?: string;
|
|
690
|
+
readonly sdkVersion?: string;
|
|
691
|
+
}
|
|
692
|
+
interface InvalidateDeviceTokenPayload {
|
|
693
|
+
readonly anonymousId: string;
|
|
694
|
+
readonly token: string;
|
|
695
|
+
}
|
|
696
|
+
interface CreateCampaignRequest {
|
|
697
|
+
readonly name: string;
|
|
698
|
+
readonly mode: PushDeliveryMode;
|
|
699
|
+
readonly audienceSegmentId?: string | null;
|
|
700
|
+
readonly audience?: AudienceSpec;
|
|
701
|
+
readonly trigger?: TriggerSpec;
|
|
702
|
+
readonly triggerEventName?: string | null;
|
|
703
|
+
readonly schedule?: PushSchedule | null;
|
|
704
|
+
readonly frequencyCap?: PushFrequencyCap;
|
|
705
|
+
readonly quietHours?: PushQuietHours;
|
|
706
|
+
readonly abConfig?: PushABConfig;
|
|
707
|
+
readonly startAt?: string | null;
|
|
708
|
+
readonly endAt?: string | null;
|
|
709
|
+
readonly variants: ReadonlyArray<Omit<PushVariant, 'id' | 'campaignId' | 'createdAt' | 'updatedAt'>>;
|
|
710
|
+
readonly status?: CampaignStatus;
|
|
711
|
+
}
|
|
712
|
+
interface UpdateCampaignRequest extends Partial<CreateCampaignRequest> {
|
|
713
|
+
readonly status?: CampaignStatus;
|
|
714
|
+
}
|
|
715
|
+
interface PushTransactionalRequest {
|
|
716
|
+
readonly campaignId: string;
|
|
717
|
+
readonly anonymousId?: string;
|
|
718
|
+
readonly externalId?: string;
|
|
719
|
+
readonly mergeTags?: Readonly<Record<string, unknown>>;
|
|
720
|
+
readonly override?: {
|
|
721
|
+
readonly title?: string;
|
|
722
|
+
readonly body?: string;
|
|
723
|
+
readonly imageUrl?: string;
|
|
724
|
+
};
|
|
725
|
+
readonly idempotencyKey?: string;
|
|
726
|
+
}
|
|
727
|
+
interface PushCredentialSummary {
|
|
728
|
+
readonly id: string;
|
|
729
|
+
readonly platform: 'ios' | 'android';
|
|
730
|
+
readonly environment: 'production' | 'sandbox';
|
|
731
|
+
readonly keyId: string | null;
|
|
732
|
+
readonly teamId: string | null;
|
|
733
|
+
readonly bundleId: string | null;
|
|
734
|
+
readonly projectId: string | null;
|
|
735
|
+
readonly clientEmail: string | null;
|
|
736
|
+
readonly uploadedAt: string;
|
|
737
|
+
readonly expiresAt: string | null;
|
|
738
|
+
}
|
|
739
|
+
interface UploadApnsCredentialRequest {
|
|
740
|
+
readonly platform: 'ios';
|
|
741
|
+
readonly environment?: 'production' | 'sandbox';
|
|
742
|
+
readonly p8: string;
|
|
743
|
+
readonly keyId: string;
|
|
744
|
+
readonly teamId: string;
|
|
745
|
+
readonly bundleId: string;
|
|
746
|
+
}
|
|
747
|
+
interface UploadFcmCredentialRequest {
|
|
748
|
+
readonly platform: 'android';
|
|
749
|
+
readonly serviceAccountJson: string;
|
|
750
|
+
}
|
|
751
|
+
type UploadCredentialRequest = UploadApnsCredentialRequest | UploadFcmCredentialRequest;
|
|
752
|
+
interface CampaignAnalytics {
|
|
753
|
+
readonly totals: {
|
|
754
|
+
readonly sent: number;
|
|
755
|
+
readonly delivered: number;
|
|
756
|
+
readonly opened: number;
|
|
757
|
+
readonly clicked: number;
|
|
758
|
+
readonly errors: number;
|
|
759
|
+
};
|
|
760
|
+
readonly perVariant: ReadonlyArray<{
|
|
761
|
+
readonly variant_id: string;
|
|
762
|
+
readonly language: string | null;
|
|
763
|
+
readonly sent: number;
|
|
764
|
+
readonly opened: number;
|
|
765
|
+
readonly clicked: number;
|
|
766
|
+
}>;
|
|
767
|
+
readonly timeline: ReadonlyArray<{
|
|
768
|
+
readonly day: string;
|
|
769
|
+
readonly sent: number;
|
|
770
|
+
readonly opened: number;
|
|
771
|
+
readonly clicked: number;
|
|
772
|
+
}>;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
type SurveyQuestionType = 'single_choice' | 'multi_choice' | 'nps' | 'rating' | 'likert' | 'short_text' | 'long_text' | 'ranking' | 'single_date' | 'info_screen';
|
|
776
|
+
type SurveyProgressStyle = 'bar' | 'dots' | 'none';
|
|
777
|
+
interface SurveyChoiceOption {
|
|
778
|
+
readonly id: string;
|
|
779
|
+
readonly label: string;
|
|
780
|
+
}
|
|
781
|
+
interface SurveyTextValidation {
|
|
782
|
+
readonly kind?: 'email' | 'url' | 'number' | 'regex';
|
|
783
|
+
readonly pattern?: string;
|
|
784
|
+
readonly minLength?: number;
|
|
785
|
+
readonly maxLength?: number;
|
|
786
|
+
}
|
|
787
|
+
interface BaseSurveyQuestion {
|
|
788
|
+
readonly id: string;
|
|
789
|
+
readonly title: string;
|
|
790
|
+
readonly subtitle?: string;
|
|
791
|
+
readonly required?: boolean;
|
|
792
|
+
readonly imageUrl?: string;
|
|
793
|
+
readonly mergeTagContext?: Readonly<Record<string, unknown>>;
|
|
794
|
+
}
|
|
795
|
+
interface SingleChoiceQuestion extends BaseSurveyQuestion {
|
|
796
|
+
readonly type: 'single_choice';
|
|
797
|
+
readonly options: ReadonlyArray<SurveyChoiceOption>;
|
|
798
|
+
readonly allowOther?: boolean;
|
|
799
|
+
}
|
|
800
|
+
interface MultiChoiceQuestion extends BaseSurveyQuestion {
|
|
801
|
+
readonly type: 'multi_choice';
|
|
802
|
+
readonly options: ReadonlyArray<SurveyChoiceOption>;
|
|
803
|
+
readonly minSelections?: number;
|
|
804
|
+
readonly maxSelections?: number;
|
|
805
|
+
readonly allowOther?: boolean;
|
|
806
|
+
}
|
|
807
|
+
interface SurveyNpsQuestion extends BaseSurveyQuestion {
|
|
808
|
+
readonly type: 'nps';
|
|
809
|
+
readonly lowLabel?: string;
|
|
810
|
+
readonly highLabel?: string;
|
|
811
|
+
}
|
|
812
|
+
interface SurveyRatingQuestion extends BaseSurveyQuestion {
|
|
813
|
+
readonly type: 'rating';
|
|
814
|
+
readonly scale: 5 | 10;
|
|
815
|
+
readonly style?: 'star' | 'numeric';
|
|
816
|
+
readonly lowLabel?: string;
|
|
817
|
+
readonly highLabel?: string;
|
|
818
|
+
}
|
|
819
|
+
interface LikertQuestion extends BaseSurveyQuestion {
|
|
820
|
+
readonly type: 'likert';
|
|
821
|
+
readonly labels?: readonly [string, string, string, string, string];
|
|
822
|
+
}
|
|
823
|
+
interface SurveyShortTextQuestion extends BaseSurveyQuestion {
|
|
824
|
+
readonly type: 'short_text';
|
|
825
|
+
readonly placeholder?: string;
|
|
826
|
+
readonly validation?: SurveyTextValidation;
|
|
827
|
+
}
|
|
828
|
+
interface LongTextQuestion extends BaseSurveyQuestion {
|
|
829
|
+
readonly type: 'long_text';
|
|
830
|
+
readonly placeholder?: string;
|
|
831
|
+
readonly maxLength?: number;
|
|
832
|
+
}
|
|
833
|
+
interface RankingQuestion extends BaseSurveyQuestion {
|
|
834
|
+
readonly type: 'ranking';
|
|
835
|
+
readonly items: ReadonlyArray<SurveyChoiceOption>;
|
|
836
|
+
}
|
|
837
|
+
interface SingleDateQuestion extends BaseSurveyQuestion {
|
|
838
|
+
readonly type: 'single_date';
|
|
839
|
+
readonly minDate?: string;
|
|
840
|
+
readonly maxDate?: string;
|
|
841
|
+
}
|
|
842
|
+
interface InfoScreenQuestion extends BaseSurveyQuestion {
|
|
843
|
+
readonly type: 'info_screen';
|
|
844
|
+
readonly body?: string;
|
|
845
|
+
}
|
|
846
|
+
type SurveyQuestion = SingleChoiceQuestion | MultiChoiceQuestion | SurveyNpsQuestion | SurveyRatingQuestion | LikertQuestion | SurveyShortTextQuestion | LongTextQuestion | RankingQuestion | SingleDateQuestion | InfoScreenQuestion;
|
|
847
|
+
type SurveyBranchOp = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'includes' | 'not_includes' | 'answered' | 'unanswered';
|
|
848
|
+
type SurveyBranchValue = string | number | boolean | ReadonlyArray<string | number>;
|
|
849
|
+
interface SurveyBranchCondition {
|
|
850
|
+
readonly op: SurveyBranchOp;
|
|
851
|
+
readonly value?: SurveyBranchValue;
|
|
852
|
+
}
|
|
853
|
+
interface SurveyBranch {
|
|
854
|
+
readonly fromQuestionId: string;
|
|
855
|
+
readonly condition: SurveyBranchCondition;
|
|
856
|
+
readonly toQuestionId: string;
|
|
857
|
+
}
|
|
858
|
+
declare const SURVEY_END_SENTINEL = "__end__";
|
|
859
|
+
type SurveyEndCtaKind = 'url' | 'deep_link' | 'close';
|
|
860
|
+
interface SurveyEndCta {
|
|
861
|
+
readonly kind: SurveyEndCtaKind;
|
|
862
|
+
readonly label: string;
|
|
863
|
+
readonly target?: string;
|
|
864
|
+
}
|
|
865
|
+
interface SurveyFollowUp {
|
|
866
|
+
readonly headline: string;
|
|
867
|
+
readonly body?: string;
|
|
868
|
+
readonly cta?: SurveyEndCta;
|
|
869
|
+
}
|
|
870
|
+
interface SurveyEndScreen {
|
|
871
|
+
readonly headline: string;
|
|
872
|
+
readonly body?: string;
|
|
873
|
+
readonly cta?: SurveyEndCta;
|
|
874
|
+
readonly followUp?: SurveyFollowUp;
|
|
875
|
+
}
|
|
876
|
+
interface SurveyLocalization {
|
|
877
|
+
readonly defaultLanguage?: string;
|
|
878
|
+
readonly languages?: Readonly<Record<string, {
|
|
879
|
+
readonly questions?: ReadonlyArray<SurveyQuestion>;
|
|
880
|
+
readonly endScreen?: SurveyEndScreen;
|
|
881
|
+
}>>;
|
|
882
|
+
}
|
|
883
|
+
interface SurveyFlow {
|
|
884
|
+
readonly startQuestionId: string;
|
|
885
|
+
readonly questions: ReadonlyArray<SurveyQuestion>;
|
|
886
|
+
readonly branches: ReadonlyArray<SurveyBranch>;
|
|
887
|
+
readonly progressStyle: SurveyProgressStyle;
|
|
888
|
+
readonly backNavigation: boolean;
|
|
889
|
+
readonly localization?: SurveyLocalization;
|
|
890
|
+
readonly endScreen?: SurveyEndScreen;
|
|
891
|
+
}
|
|
892
|
+
type SurveyDeliveryMode = 'triggered' | 'scheduled' | 'on_demand' | 'link_only';
|
|
893
|
+
type SurveyAttemptSource = 'triggered' | 'scheduled' | 'link' | 'on_demand' | 'test';
|
|
894
|
+
interface SurveyCampaign {
|
|
895
|
+
readonly id: string;
|
|
896
|
+
readonly appId: string;
|
|
897
|
+
readonly name: string;
|
|
898
|
+
readonly type: 'survey';
|
|
899
|
+
readonly mode: SurveyDeliveryMode;
|
|
900
|
+
readonly status: 'draft' | 'scheduled' | 'active' | 'paused' | 'completed' | 'archived';
|
|
901
|
+
readonly audienceSegmentId: string | null;
|
|
902
|
+
readonly triggerEventName: string | null;
|
|
903
|
+
readonly audience: AudienceSpec | null;
|
|
904
|
+
readonly trigger: TriggerSpec | null;
|
|
905
|
+
readonly schedule: PushSchedule | null;
|
|
906
|
+
readonly frequencyCap: PushFrequencyCap;
|
|
907
|
+
readonly cooldownSeconds: number | null;
|
|
908
|
+
readonly openAccess: boolean;
|
|
909
|
+
readonly saveResumeWindowSeconds: number;
|
|
910
|
+
readonly endScreen: SurveyEndScreen | null;
|
|
911
|
+
readonly themeMode: ThemeMode;
|
|
912
|
+
readonly theme: PromptTheme | null;
|
|
913
|
+
readonly startAt: string | null;
|
|
914
|
+
readonly endAt: string | null;
|
|
915
|
+
readonly startedAt: string | null;
|
|
916
|
+
readonly endedAt: string | null;
|
|
917
|
+
readonly createdAt: string;
|
|
918
|
+
readonly updatedAt: string;
|
|
919
|
+
}
|
|
920
|
+
interface SurveyCampaignWithFlow extends SurveyCampaign {
|
|
921
|
+
readonly flow: SurveyFlow;
|
|
922
|
+
}
|
|
923
|
+
interface SurveyAnswerRecord {
|
|
924
|
+
readonly [questionId: string]: SurveyAnswerValue;
|
|
925
|
+
}
|
|
926
|
+
type SurveyAnswerValue = string | number | boolean | null | ReadonlyArray<string> | ReadonlyArray<number>;
|
|
927
|
+
interface SurveyAttempt {
|
|
928
|
+
readonly id: string;
|
|
929
|
+
readonly campaignId: string;
|
|
930
|
+
readonly anonymousId: string;
|
|
931
|
+
readonly externalId: string | null;
|
|
932
|
+
readonly startedAt: string;
|
|
933
|
+
readonly completedAt: string | null;
|
|
934
|
+
readonly abandonedAt: string | null;
|
|
935
|
+
readonly currentQuestionId: string | null;
|
|
936
|
+
readonly progressSnapshot: SurveyAnswerRecord;
|
|
937
|
+
readonly source: SurveyAttemptSource;
|
|
938
|
+
readonly language: string | null;
|
|
939
|
+
}
|
|
940
|
+
interface SurveyResponseRecord {
|
|
941
|
+
readonly id: string;
|
|
942
|
+
readonly attemptId: string;
|
|
943
|
+
readonly campaignId: string;
|
|
944
|
+
readonly questionId: string;
|
|
945
|
+
readonly answerValue: SurveyAnswerValue;
|
|
946
|
+
readonly answeredAt: string;
|
|
947
|
+
}
|
|
948
|
+
interface SurveySummary {
|
|
949
|
+
readonly id: string;
|
|
950
|
+
readonly name: string;
|
|
951
|
+
readonly mode: SurveyDeliveryMode;
|
|
952
|
+
readonly source: SurveyAttemptSource;
|
|
953
|
+
readonly offeredAt?: string;
|
|
954
|
+
readonly resumableAttemptId?: string | null;
|
|
955
|
+
}
|
|
956
|
+
interface SurveyOfferInstruction {
|
|
957
|
+
readonly type: 'survey.offer';
|
|
958
|
+
readonly surveyId: string;
|
|
959
|
+
readonly name: string;
|
|
960
|
+
readonly mode: SurveyDeliveryMode;
|
|
961
|
+
readonly source: SurveyAttemptSource;
|
|
962
|
+
readonly emittedAt: string;
|
|
963
|
+
}
|
|
964
|
+
interface CreateSurveyAttemptRequest {
|
|
965
|
+
readonly anonymousId: string;
|
|
966
|
+
readonly externalId?: string | null;
|
|
967
|
+
readonly source: SurveyAttemptSource;
|
|
968
|
+
readonly language?: string;
|
|
969
|
+
readonly resume?: boolean;
|
|
970
|
+
readonly sdkVersion?: string;
|
|
971
|
+
readonly appVersion?: string;
|
|
972
|
+
readonly platform?: string;
|
|
973
|
+
}
|
|
974
|
+
interface CreateSurveyAttemptResponse {
|
|
975
|
+
readonly attemptId: string;
|
|
976
|
+
readonly startQuestionId: string;
|
|
977
|
+
readonly progressSnapshot: SurveyAnswerRecord;
|
|
978
|
+
readonly currentQuestionId: string | null;
|
|
979
|
+
readonly resumed: boolean;
|
|
980
|
+
}
|
|
981
|
+
interface SubmitSurveyAnswersRequest {
|
|
982
|
+
readonly answers: ReadonlyArray<{
|
|
983
|
+
readonly questionId: string;
|
|
984
|
+
readonly value: SurveyAnswerValue;
|
|
985
|
+
}>;
|
|
986
|
+
readonly currentQuestionId?: string | null;
|
|
987
|
+
}
|
|
988
|
+
interface UpdateSurveyAttemptProgressRequest {
|
|
989
|
+
readonly currentQuestionId: string | null;
|
|
990
|
+
readonly progressSnapshot: SurveyAnswerRecord;
|
|
991
|
+
}
|
|
992
|
+
interface CompleteSurveyAttemptRequest {
|
|
993
|
+
readonly finalAnswers?: ReadonlyArray<{
|
|
994
|
+
readonly questionId: string;
|
|
995
|
+
readonly value: SurveyAnswerValue;
|
|
996
|
+
}>;
|
|
997
|
+
readonly latencyMs?: number;
|
|
998
|
+
}
|
|
999
|
+
interface ResolveSurveyLinkRequest {
|
|
1000
|
+
readonly token: string;
|
|
1001
|
+
readonly anonymousId: string;
|
|
1002
|
+
readonly externalId?: string | null;
|
|
1003
|
+
}
|
|
1004
|
+
interface ResolveSurveyLinkResponse {
|
|
1005
|
+
readonly surveyId: string;
|
|
1006
|
+
readonly name: string;
|
|
1007
|
+
readonly consentRequired: boolean;
|
|
1008
|
+
readonly openAccess: boolean;
|
|
1009
|
+
}
|
|
1010
|
+
interface SurveyShareLinkResponse {
|
|
1011
|
+
readonly url: string;
|
|
1012
|
+
readonly token: string;
|
|
1013
|
+
readonly expiresAt: string | null;
|
|
1014
|
+
}
|
|
1015
|
+
interface SurveyTemplate {
|
|
1016
|
+
readonly id: string;
|
|
1017
|
+
readonly slug: string;
|
|
1018
|
+
readonly name: string;
|
|
1019
|
+
readonly description: string | null;
|
|
1020
|
+
readonly flow: SurveyFlow;
|
|
1021
|
+
readonly recommendedTriggerEvent: string | null;
|
|
1022
|
+
readonly recommendedMode: SurveyDeliveryMode | null;
|
|
1023
|
+
readonly createdAt: string;
|
|
1024
|
+
}
|
|
1025
|
+
interface CreateSurveyRequest {
|
|
1026
|
+
readonly name: string;
|
|
1027
|
+
readonly mode: SurveyDeliveryMode;
|
|
1028
|
+
readonly flow: SurveyFlow;
|
|
1029
|
+
readonly audienceSegmentId?: string | null;
|
|
1030
|
+
readonly triggerEventName?: string | null;
|
|
1031
|
+
readonly schedule?: PushSchedule | null;
|
|
1032
|
+
readonly frequencyCap?: PushFrequencyCap;
|
|
1033
|
+
readonly frequency?: FrequencyCaps;
|
|
1034
|
+
readonly cooldownSeconds?: number | null;
|
|
1035
|
+
readonly openAccess?: boolean;
|
|
1036
|
+
readonly saveResumeWindowSeconds?: number;
|
|
1037
|
+
readonly endScreen?: SurveyEndScreen;
|
|
1038
|
+
readonly themeMode?: ThemeMode;
|
|
1039
|
+
readonly theme?: PromptTheme;
|
|
1040
|
+
readonly startAt?: string | null;
|
|
1041
|
+
readonly endAt?: string | null;
|
|
1042
|
+
readonly status?: SurveyCampaign['status'];
|
|
1043
|
+
}
|
|
1044
|
+
interface UpdateSurveyRequest extends Partial<CreateSurveyRequest> {
|
|
1045
|
+
readonly status?: SurveyCampaign['status'];
|
|
1046
|
+
}
|
|
1047
|
+
interface CloneSurveyFromTemplateRequest {
|
|
1048
|
+
readonly name?: string;
|
|
1049
|
+
readonly audienceSegmentId?: string | null;
|
|
1050
|
+
readonly triggerEventName?: string | null;
|
|
1051
|
+
}
|
|
1052
|
+
interface SurveyFunnelStep {
|
|
1053
|
+
readonly questionId: string;
|
|
1054
|
+
readonly shown: number;
|
|
1055
|
+
readonly answered: number;
|
|
1056
|
+
readonly skipped: number;
|
|
1057
|
+
}
|
|
1058
|
+
interface SurveyQuestionDistribution {
|
|
1059
|
+
readonly questionId: string;
|
|
1060
|
+
readonly type: SurveyQuestionType;
|
|
1061
|
+
readonly distribution: Readonly<Record<string, number>>;
|
|
1062
|
+
readonly average?: number;
|
|
1063
|
+
readonly npsScore?: number;
|
|
1064
|
+
readonly sampleSize: number;
|
|
1065
|
+
}
|
|
1066
|
+
interface SurveyAnalytics {
|
|
1067
|
+
readonly surveyId: string;
|
|
1068
|
+
readonly totals: {
|
|
1069
|
+
readonly started: number;
|
|
1070
|
+
readonly completed: number;
|
|
1071
|
+
readonly abandoned: number;
|
|
1072
|
+
readonly completionRate: number;
|
|
1073
|
+
};
|
|
1074
|
+
readonly funnel: ReadonlyArray<SurveyFunnelStep>;
|
|
1075
|
+
readonly perQuestion: ReadonlyArray<SurveyQuestionDistribution>;
|
|
1076
|
+
readonly npsOverTime?: ReadonlyArray<{
|
|
1077
|
+
day: string;
|
|
1078
|
+
score: number;
|
|
1079
|
+
samples: number;
|
|
1080
|
+
}>;
|
|
1081
|
+
readonly perLanguage?: Readonly<Record<string, number>>;
|
|
1082
|
+
}
|
|
1083
|
+
interface ArmedSurvey {
|
|
1084
|
+
readonly campaignId: string;
|
|
1085
|
+
readonly eventName: string;
|
|
1086
|
+
readonly segmentRules?: SerializedSegmentRules | null;
|
|
1087
|
+
/** True only when the SDK can make the same targeting decision locally. */
|
|
1088
|
+
readonly clientSideEligible?: boolean;
|
|
1089
|
+
readonly cooldownSeconds: number | null;
|
|
1090
|
+
readonly frequencyCap: PushFrequencyCap;
|
|
1091
|
+
readonly survey: SurveyCampaignWithFlow;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
declare const RECIPIENTS_LIMIT = 100;
|
|
1095
|
+
interface RecipientIdentity {
|
|
1096
|
+
readonly anonymousId: string;
|
|
1097
|
+
readonly externalId: string | null;
|
|
1098
|
+
readonly country: string | null;
|
|
1099
|
+
readonly platform: string | null;
|
|
1100
|
+
}
|
|
1101
|
+
interface RecipientList<T> {
|
|
1102
|
+
readonly items: ReadonlyArray<T>;
|
|
1103
|
+
readonly total: number;
|
|
1104
|
+
readonly limit: number;
|
|
1105
|
+
}
|
|
1106
|
+
interface FeedbackRecipient extends RecipientIdentity {
|
|
1107
|
+
readonly receivedAt: string;
|
|
1108
|
+
readonly response: PromptResponse | null;
|
|
1109
|
+
}
|
|
1110
|
+
type InAppRecipientStatus = 'viewed' | 'dismissed' | 'auto_dismissed' | 'cta_clicked';
|
|
1111
|
+
interface InAppRecipient extends RecipientIdentity {
|
|
1112
|
+
readonly receivedAt: string;
|
|
1113
|
+
readonly status: InAppRecipientStatus;
|
|
1114
|
+
readonly actionAt: string | null;
|
|
1115
|
+
readonly ctaLabel: string | null;
|
|
1116
|
+
}
|
|
1117
|
+
type SurveyRecipientStatus = 'received' | 'declined' | 'in_progress' | 'completed' | 'abandoned';
|
|
1118
|
+
interface SurveyRecipient extends RecipientIdentity {
|
|
1119
|
+
readonly receivedAt: string;
|
|
1120
|
+
readonly source: SurveyAttemptSource;
|
|
1121
|
+
readonly status: SurveyRecipientStatus;
|
|
1122
|
+
readonly attemptId: string | null;
|
|
1123
|
+
readonly startedAt: string | null;
|
|
1124
|
+
readonly completedAt: string | null;
|
|
1125
|
+
readonly abandonedAt: string | null;
|
|
1126
|
+
readonly responses: ReadonlyArray<SurveyResponseRecord>;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
interface ApiError {
|
|
1130
|
+
readonly code: string;
|
|
1131
|
+
readonly message: string;
|
|
1132
|
+
readonly details?: unknown;
|
|
1133
|
+
}
|
|
1134
|
+
interface ApiMeta {
|
|
1135
|
+
readonly total?: number;
|
|
1136
|
+
readonly page?: number;
|
|
1137
|
+
readonly limit?: number;
|
|
1138
|
+
}
|
|
1139
|
+
interface ApiResponse<T> {
|
|
1140
|
+
readonly success: boolean;
|
|
1141
|
+
readonly data?: T;
|
|
1142
|
+
readonly error?: ApiError;
|
|
1143
|
+
readonly meta?: ApiMeta;
|
|
1144
|
+
}
|
|
1145
|
+
declare function ok<T>(data: T, meta?: ApiMeta): ApiResponse<T>;
|
|
1146
|
+
declare function err(code: string, message: string, details?: unknown): ApiResponse<never>;
|
|
1147
|
+
|
|
1148
|
+
type ConsentPurpose = 'analytics' | 'feedback' | 'push' | 'survey';
|
|
1149
|
+
type Consent = {
|
|
1150
|
+
readonly [K in ConsentPurpose]?: boolean;
|
|
1151
|
+
};
|
|
1152
|
+
interface SdkConfig {
|
|
1153
|
+
readonly writeKey: string;
|
|
1154
|
+
readonly apiUrl?: string;
|
|
1155
|
+
readonly environment?: 'production' | 'staging' | 'development';
|
|
1156
|
+
readonly flushIntervalMs?: number;
|
|
1157
|
+
readonly flushBatchSize?: number;
|
|
1158
|
+
readonly maxQueueSize?: number;
|
|
1159
|
+
readonly triggerSyncIntervalMs?: number;
|
|
1160
|
+
readonly debug?: boolean;
|
|
1161
|
+
/** Host app version used for lifecycle analytics and destination metadata. */
|
|
1162
|
+
readonly appVersion?: string;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
type WorkspaceRole = 'owner' | 'admin' | 'editor' | 'viewer';
|
|
1166
|
+
interface Workspace {
|
|
1167
|
+
readonly id: string;
|
|
1168
|
+
readonly name: string;
|
|
1169
|
+
readonly slug: string;
|
|
1170
|
+
readonly region: string;
|
|
1171
|
+
readonly createdAt: string;
|
|
1172
|
+
readonly updatedAt: string;
|
|
1173
|
+
}
|
|
1174
|
+
/** Workspace as returned from the authenticated `/v1/me` projection. */
|
|
1175
|
+
interface WorkspaceWithRole extends Workspace {
|
|
1176
|
+
readonly role: WorkspaceRole;
|
|
1177
|
+
}
|
|
1178
|
+
interface WorkspaceMember {
|
|
1179
|
+
readonly workspaceId: string;
|
|
1180
|
+
readonly userId: string;
|
|
1181
|
+
readonly email: string;
|
|
1182
|
+
readonly name?: string | null;
|
|
1183
|
+
readonly role: WorkspaceRole;
|
|
1184
|
+
readonly createdAt: string;
|
|
1185
|
+
}
|
|
1186
|
+
interface WorkspaceInvite {
|
|
1187
|
+
readonly id: string;
|
|
1188
|
+
readonly workspaceId: string;
|
|
1189
|
+
readonly email: string;
|
|
1190
|
+
readonly role: Exclude<WorkspaceRole, 'owner'>;
|
|
1191
|
+
readonly deliveryStatus: 'pending' | 'sent' | 'failed';
|
|
1192
|
+
readonly expiresAt: string;
|
|
1193
|
+
readonly createdAt: string;
|
|
1194
|
+
}
|
|
1195
|
+
interface AcceptWorkspaceInviteRequest {
|
|
1196
|
+
readonly token: string;
|
|
1197
|
+
}
|
|
1198
|
+
interface AcceptWorkspaceInviteResponse {
|
|
1199
|
+
readonly workspace: Workspace;
|
|
1200
|
+
readonly role: WorkspaceRole;
|
|
1201
|
+
readonly alreadyMember: boolean;
|
|
1202
|
+
}
|
|
1203
|
+
interface User {
|
|
1204
|
+
readonly id: string;
|
|
1205
|
+
readonly email: string;
|
|
1206
|
+
readonly name?: string | null;
|
|
1207
|
+
readonly emailVerifiedAt?: string | null;
|
|
1208
|
+
readonly createdAt: string;
|
|
1209
|
+
readonly isSuperAdmin?: boolean;
|
|
1210
|
+
}
|
|
1211
|
+
interface App {
|
|
1212
|
+
readonly id: string;
|
|
1213
|
+
readonly workspaceId: string;
|
|
1214
|
+
readonly name: string;
|
|
1215
|
+
readonly slug: string;
|
|
1216
|
+
readonly platforms: ReadonlyArray<'ios' | 'android' | 'react-native' | 'flutter'>;
|
|
1217
|
+
readonly piiAllowList: ReadonlyArray<string>;
|
|
1218
|
+
readonly lifecycleEventsEnabled: boolean;
|
|
1219
|
+
readonly billingSuspendedAt: string | null;
|
|
1220
|
+
readonly createdAt: string;
|
|
1221
|
+
readonly updatedAt: string;
|
|
1222
|
+
}
|
|
1223
|
+
interface WriteKey {
|
|
1224
|
+
readonly id: string;
|
|
1225
|
+
readonly appId: string;
|
|
1226
|
+
readonly keyPrefix: string;
|
|
1227
|
+
readonly environment: 'production' | 'staging' | 'development';
|
|
1228
|
+
readonly label?: string | null;
|
|
1229
|
+
readonly revokedAt?: string | null;
|
|
1230
|
+
readonly lastUsedAt?: string | null;
|
|
1231
|
+
readonly createdAt: string;
|
|
1232
|
+
}
|
|
1233
|
+
interface CreatedWriteKey extends WriteKey {
|
|
1234
|
+
readonly plaintext: string;
|
|
1235
|
+
}
|
|
1236
|
+
type ApiTokenScope = 'sdk:subjects' | 'push.transactional';
|
|
1237
|
+
/**
|
|
1238
|
+
* Metadata for a workspace-scoped server credential. The plaintext secret is
|
|
1239
|
+
* deliberately absent and is only returned by the create endpoint.
|
|
1240
|
+
*/
|
|
1241
|
+
interface ApiToken {
|
|
1242
|
+
readonly id: string;
|
|
1243
|
+
readonly workspaceId: string;
|
|
1244
|
+
readonly name: string;
|
|
1245
|
+
readonly tokenPrefix: string;
|
|
1246
|
+
readonly scopes: ReadonlyArray<ApiTokenScope>;
|
|
1247
|
+
readonly expiresAt: string;
|
|
1248
|
+
readonly revokedAt: string | null;
|
|
1249
|
+
readonly lastUsedAt: string | null;
|
|
1250
|
+
readonly createdAt: string;
|
|
1251
|
+
}
|
|
1252
|
+
interface CreatedApiToken extends ApiToken {
|
|
1253
|
+
/** One-time server secret. Never ship this value inside a client app. */
|
|
1254
|
+
readonly plaintext: string;
|
|
1255
|
+
}
|
|
1256
|
+
interface CreateApiTokenRequest {
|
|
1257
|
+
readonly name: string;
|
|
1258
|
+
readonly scopes: ReadonlyArray<ApiTokenScope>;
|
|
1259
|
+
readonly expiresInDays?: number;
|
|
1260
|
+
}
|
|
1261
|
+
/** App plus its first environment-specific write key, returned atomically. */
|
|
1262
|
+
interface CreatedApp extends App {
|
|
1263
|
+
readonly writeKey: CreatedWriteKey;
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Request body for `POST /v1/apps/:appId/write-keys/:keyId/rotate`. The grace
|
|
1267
|
+
* window is how long the old key keeps authenticating before the API starts
|
|
1268
|
+
* returning 401 — gives SDK consumers a deploy window before the cutover.
|
|
1269
|
+
*/
|
|
1270
|
+
interface RotateWriteKeyRequest {
|
|
1271
|
+
readonly graceSeconds?: number;
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Response from a successful key rotation. The new key's plaintext is
|
|
1275
|
+
* returned ONCE and never again — operators must capture it on rotation.
|
|
1276
|
+
*/
|
|
1277
|
+
interface RotateWriteKeyResponse {
|
|
1278
|
+
readonly newKey: CreatedWriteKey;
|
|
1279
|
+
readonly oldKey: WriteKey;
|
|
1280
|
+
readonly oldKeyExpiresAt: string;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
type RequestStatus = 'under_review' | 'planned' | 'in_progress' | 'shipped' | 'declined';
|
|
1284
|
+
type RequestFollowSource = 'upvote_auto' | 'manual';
|
|
1285
|
+
type RequestSort = 'top' | 'newest' | 'recently_updated';
|
|
1286
|
+
type RequestPersonalFilter = 'submitted' | 'upvoted' | 'following';
|
|
1287
|
+
declare const REQUEST_SUBMITTED_EVENT_NAME: "$request_submitted";
|
|
1288
|
+
declare const REQUEST_UPVOTED_EVENT_NAME: "$request_upvoted";
|
|
1289
|
+
declare const REQUEST_UNUPVOTED_EVENT_NAME: "$request_unupvoted";
|
|
1290
|
+
declare const REQUEST_FOLLOWED_EVENT_NAME: "$request_followed";
|
|
1291
|
+
declare const REQUEST_UNFOLLOWED_EVENT_NAME: "$request_unfollowed";
|
|
1292
|
+
declare const REQUEST_STATUS_CHANGED_EVENT_NAME: "$request_status_changed";
|
|
1293
|
+
declare const REQUEST_RESPONDED_EVENT_NAME: "$request_responded";
|
|
1294
|
+
declare const REQUEST_COMMENTED_EVENT_NAME: "$request_commented";
|
|
1295
|
+
declare const REQUEST_COMMENT_EDITED_EVENT_NAME: "$request_comment_edited";
|
|
1296
|
+
declare const REQUEST_COMMENT_DELETED_EVENT_NAME: "$request_comment_deleted";
|
|
1297
|
+
/**
|
|
1298
|
+
* A feature request with viewer-relative state attached. Returned from
|
|
1299
|
+
* detail and list endpoints; `viewer*` fields are computed server-side
|
|
1300
|
+
* from the caller's identity.
|
|
1301
|
+
*/
|
|
1302
|
+
interface Request {
|
|
1303
|
+
readonly id: string;
|
|
1304
|
+
readonly appId: string;
|
|
1305
|
+
readonly title: string;
|
|
1306
|
+
readonly description: string;
|
|
1307
|
+
readonly status: RequestStatus;
|
|
1308
|
+
readonly devResponse: string | null;
|
|
1309
|
+
readonly upvoteCount: number;
|
|
1310
|
+
readonly followerCount: number;
|
|
1311
|
+
readonly createdAt: string;
|
|
1312
|
+
readonly updatedAt: string;
|
|
1313
|
+
readonly statusChangedAt: string;
|
|
1314
|
+
readonly lastRespondedAt: string | null;
|
|
1315
|
+
readonly viewerHasUpvoted: boolean;
|
|
1316
|
+
readonly viewerIsFollowing: boolean;
|
|
1317
|
+
readonly viewerIsSubmitter: boolean;
|
|
1318
|
+
}
|
|
1319
|
+
/** Compact summary used in list views and search typeahead. */
|
|
1320
|
+
interface RequestSummary {
|
|
1321
|
+
readonly id: string;
|
|
1322
|
+
readonly title: string;
|
|
1323
|
+
readonly description: string;
|
|
1324
|
+
readonly status: RequestStatus;
|
|
1325
|
+
readonly upvoteCount: number;
|
|
1326
|
+
readonly followerCount: number;
|
|
1327
|
+
readonly createdAt: string;
|
|
1328
|
+
readonly statusChangedAt: string;
|
|
1329
|
+
readonly viewerHasUpvoted: boolean;
|
|
1330
|
+
readonly viewerIsFollowing: boolean;
|
|
1331
|
+
}
|
|
1332
|
+
/** Search-as-you-type result; the SDK shows up to 5. */
|
|
1333
|
+
interface RequestSearchResult {
|
|
1334
|
+
readonly id: string;
|
|
1335
|
+
readonly title: string;
|
|
1336
|
+
readonly status: RequestStatus;
|
|
1337
|
+
readonly upvoteCount: number;
|
|
1338
|
+
}
|
|
1339
|
+
/** Returned from POST/DELETE /v1/sdk/requests/:id/votes. */
|
|
1340
|
+
interface RequestVote {
|
|
1341
|
+
readonly requestId: string;
|
|
1342
|
+
readonly upvoted: boolean;
|
|
1343
|
+
readonly followed: boolean;
|
|
1344
|
+
readonly upvoteCount: number;
|
|
1345
|
+
readonly followerCount: number;
|
|
1346
|
+
}
|
|
1347
|
+
/** Returned from POST/DELETE /v1/sdk/requests/:id/follows. */
|
|
1348
|
+
interface RequestFollow {
|
|
1349
|
+
readonly requestId: string;
|
|
1350
|
+
readonly following: boolean;
|
|
1351
|
+
readonly followerCount: number;
|
|
1352
|
+
readonly source: RequestFollowSource;
|
|
1353
|
+
}
|
|
1354
|
+
interface GetRequestsOptions {
|
|
1355
|
+
readonly sort?: RequestSort;
|
|
1356
|
+
readonly statuses?: ReadonlyArray<RequestStatus>;
|
|
1357
|
+
readonly mine?: RequestPersonalFilter;
|
|
1358
|
+
readonly q?: string;
|
|
1359
|
+
readonly cursor?: string | null;
|
|
1360
|
+
readonly limit?: number;
|
|
1361
|
+
}
|
|
1362
|
+
interface GetRequestsResult {
|
|
1363
|
+
readonly items: ReadonlyArray<RequestSummary>;
|
|
1364
|
+
readonly nextCursor: string | null;
|
|
1365
|
+
}
|
|
1366
|
+
interface SubmitRequestPayload {
|
|
1367
|
+
readonly anonymousId: string;
|
|
1368
|
+
readonly externalId?: string | null;
|
|
1369
|
+
readonly title: string;
|
|
1370
|
+
readonly description: string;
|
|
1371
|
+
}
|
|
1372
|
+
interface RequestVotePayload {
|
|
1373
|
+
readonly anonymousId: string;
|
|
1374
|
+
readonly externalId?: string | null;
|
|
1375
|
+
}
|
|
1376
|
+
interface RequestFollowPayload {
|
|
1377
|
+
readonly anonymousId: string;
|
|
1378
|
+
readonly externalId?: string | null;
|
|
1379
|
+
}
|
|
1380
|
+
interface RequestDetail extends Request {
|
|
1381
|
+
readonly submitterAnonymousId: string;
|
|
1382
|
+
readonly submitterExternalId: string | null;
|
|
1383
|
+
readonly hidden: boolean;
|
|
1384
|
+
}
|
|
1385
|
+
interface RequestUpvoterSegmentBreakdown {
|
|
1386
|
+
readonly requestId: string;
|
|
1387
|
+
readonly totalUpvoters: number;
|
|
1388
|
+
readonly segments: ReadonlyArray<{
|
|
1389
|
+
readonly segmentId: string;
|
|
1390
|
+
readonly segmentName: string;
|
|
1391
|
+
readonly count: number;
|
|
1392
|
+
readonly percentage: number;
|
|
1393
|
+
}>;
|
|
1394
|
+
}
|
|
1395
|
+
type RequestTimelineEntryKind = 'submitted' | 'upvote_burst' | 'follow_burst' | 'status_changed' | 'responded';
|
|
1396
|
+
interface RequestTimelineEntry {
|
|
1397
|
+
readonly kind: RequestTimelineEntryKind;
|
|
1398
|
+
readonly at: string;
|
|
1399
|
+
readonly count?: number;
|
|
1400
|
+
readonly fromStatus?: RequestStatus;
|
|
1401
|
+
readonly toStatus?: RequestStatus;
|
|
1402
|
+
readonly responseExcerpt?: string;
|
|
1403
|
+
}
|
|
1404
|
+
interface RequestAnalytics {
|
|
1405
|
+
readonly submissions: ReadonlyArray<{
|
|
1406
|
+
readonly date: string;
|
|
1407
|
+
readonly count: number;
|
|
1408
|
+
}>;
|
|
1409
|
+
readonly upvotes: ReadonlyArray<{
|
|
1410
|
+
readonly date: string;
|
|
1411
|
+
readonly count: number;
|
|
1412
|
+
}>;
|
|
1413
|
+
readonly follows: ReadonlyArray<{
|
|
1414
|
+
readonly date: string;
|
|
1415
|
+
readonly count: number;
|
|
1416
|
+
}>;
|
|
1417
|
+
readonly statusDistribution: Record<RequestStatus, number>;
|
|
1418
|
+
readonly devResponseRate: number;
|
|
1419
|
+
readonly medianResponseHours: number | null;
|
|
1420
|
+
readonly leaderboard: ReadonlyArray<{
|
|
1421
|
+
readonly anonymousId: string;
|
|
1422
|
+
readonly externalId: string | null;
|
|
1423
|
+
readonly submissions: number;
|
|
1424
|
+
readonly upvotes: number;
|
|
1425
|
+
}>;
|
|
1426
|
+
}
|
|
1427
|
+
interface UpdateRequestStatusRequest {
|
|
1428
|
+
readonly status: RequestStatus;
|
|
1429
|
+
readonly responseAppend?: string;
|
|
1430
|
+
}
|
|
1431
|
+
interface UpdateRequestResponseRequest {
|
|
1432
|
+
readonly body: string;
|
|
1433
|
+
}
|
|
1434
|
+
interface UpdateRequestModerationRequest {
|
|
1435
|
+
readonly hidden: boolean;
|
|
1436
|
+
}
|
|
1437
|
+
interface MergeRequestsRequest {
|
|
1438
|
+
readonly canonicalId: string;
|
|
1439
|
+
readonly duplicateIds: ReadonlyArray<string>;
|
|
1440
|
+
}
|
|
1441
|
+
interface BulkUpdateStatusRequest {
|
|
1442
|
+
readonly ids: ReadonlyArray<string>;
|
|
1443
|
+
readonly status: RequestStatus;
|
|
1444
|
+
}
|
|
1445
|
+
interface ListRequestsQuery {
|
|
1446
|
+
readonly sort?: RequestSort;
|
|
1447
|
+
readonly status?: RequestStatus | ReadonlyArray<RequestStatus>;
|
|
1448
|
+
readonly filter?: RequestPersonalFilter;
|
|
1449
|
+
readonly anonymousId?: string;
|
|
1450
|
+
readonly q?: string;
|
|
1451
|
+
readonly hidden?: boolean;
|
|
1452
|
+
readonly page?: number;
|
|
1453
|
+
readonly limit?: number;
|
|
1454
|
+
}
|
|
1455
|
+
interface RequestBranding {
|
|
1456
|
+
readonly logoUrl?: string | null;
|
|
1457
|
+
readonly accentColor?: string | null;
|
|
1458
|
+
readonly coverImageUrl?: string | null;
|
|
1459
|
+
readonly introCopy?: string | null;
|
|
1460
|
+
}
|
|
1461
|
+
interface RequestNotificationRules {
|
|
1462
|
+
readonly transitions?: Record<string, boolean>;
|
|
1463
|
+
readonly responseFirst?: boolean;
|
|
1464
|
+
readonly responseEdit?: boolean;
|
|
1465
|
+
readonly templateOverrides?: {
|
|
1466
|
+
readonly statusChange?: string;
|
|
1467
|
+
readonly response?: string;
|
|
1468
|
+
};
|
|
1469
|
+
}
|
|
1470
|
+
interface RequestSettings {
|
|
1471
|
+
readonly appId: string;
|
|
1472
|
+
readonly enabled: boolean;
|
|
1473
|
+
readonly entryLabel: string;
|
|
1474
|
+
readonly viewSegmentId: string | null;
|
|
1475
|
+
readonly submitSegmentId: string | null;
|
|
1476
|
+
readonly publicRoadmapEnabled: boolean;
|
|
1477
|
+
readonly publicSlug: string | null;
|
|
1478
|
+
readonly themeMode: ThemeMode;
|
|
1479
|
+
readonly branding: RequestBranding;
|
|
1480
|
+
readonly notificationRules: RequestNotificationRules;
|
|
1481
|
+
}
|
|
1482
|
+
interface UpdateRequestSettingsRequest {
|
|
1483
|
+
readonly enabled?: boolean;
|
|
1484
|
+
readonly entryLabel?: string;
|
|
1485
|
+
readonly viewSegmentId?: string | null;
|
|
1486
|
+
readonly submitSegmentId?: string | null;
|
|
1487
|
+
readonly publicRoadmapEnabled?: boolean;
|
|
1488
|
+
readonly publicSlug?: string | null;
|
|
1489
|
+
readonly themeMode?: ThemeMode;
|
|
1490
|
+
readonly branding?: RequestBranding;
|
|
1491
|
+
readonly notificationRules?: RequestNotificationRules;
|
|
1492
|
+
}
|
|
1493
|
+
/** Public-safe request summary (no submitter identity). */
|
|
1494
|
+
interface RequestPublicSummary {
|
|
1495
|
+
readonly id: string;
|
|
1496
|
+
readonly title: string;
|
|
1497
|
+
readonly description: string;
|
|
1498
|
+
readonly status: RequestStatus;
|
|
1499
|
+
readonly upvoteCount: number;
|
|
1500
|
+
readonly followerCount: number;
|
|
1501
|
+
readonly createdAt: string;
|
|
1502
|
+
readonly statusChangedAt: string;
|
|
1503
|
+
}
|
|
1504
|
+
interface RequestPublicDetail extends RequestPublicSummary {
|
|
1505
|
+
readonly devResponse: string | null;
|
|
1506
|
+
readonly lastRespondedAt: string | null;
|
|
1507
|
+
}
|
|
1508
|
+
interface RequestPublicBranding {
|
|
1509
|
+
readonly entryLabel: string;
|
|
1510
|
+
readonly appName: string;
|
|
1511
|
+
readonly branding: RequestBranding;
|
|
1512
|
+
readonly fallbackInstallUrl: string | null;
|
|
1513
|
+
}
|
|
1514
|
+
/** Carried inside push/in-app message payloads when status changes. */
|
|
1515
|
+
interface RequestStatusChangedNotice {
|
|
1516
|
+
readonly requestId: string;
|
|
1517
|
+
readonly title: string;
|
|
1518
|
+
readonly oldStatus: RequestStatus;
|
|
1519
|
+
readonly newStatus: RequestStatus;
|
|
1520
|
+
readonly devResponseExcerpt?: string;
|
|
1521
|
+
readonly receivedVia: 'push' | 'inapp';
|
|
1522
|
+
}
|
|
1523
|
+
interface RequestComment {
|
|
1524
|
+
readonly id: string;
|
|
1525
|
+
readonly requestId: string;
|
|
1526
|
+
readonly body: string;
|
|
1527
|
+
readonly authorAnonymousId: string;
|
|
1528
|
+
readonly authorExternalId: string | null;
|
|
1529
|
+
readonly viewerIsAuthor: boolean;
|
|
1530
|
+
readonly createdAt: string;
|
|
1531
|
+
readonly updatedAt: string;
|
|
1532
|
+
}
|
|
1533
|
+
interface PostCommentPayload {
|
|
1534
|
+
readonly anonymousId: string;
|
|
1535
|
+
readonly externalId?: string | null;
|
|
1536
|
+
readonly body: string;
|
|
1537
|
+
}
|
|
1538
|
+
interface EditCommentPayload {
|
|
1539
|
+
readonly anonymousId: string;
|
|
1540
|
+
readonly body: string;
|
|
1541
|
+
}
|
|
1542
|
+
/** Host-app callbacks registered via `setRequestsHandlers`. */
|
|
1543
|
+
interface RequestsHandlers {
|
|
1544
|
+
readonly onSubmit?: (request: Request) => void;
|
|
1545
|
+
readonly onVote?: (vote: RequestVote) => void;
|
|
1546
|
+
readonly onFollow?: (follow: RequestFollow) => void;
|
|
1547
|
+
readonly onStatusChanged?: (notice: RequestStatusChangedNotice) => void;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
type SubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'paused' | 'canceled';
|
|
1551
|
+
type SubscriptionSource = 'paddle' | 'internal';
|
|
1552
|
+
type BillingPriceKind = 'fixed' | 'custom' | 'internal';
|
|
1553
|
+
type BillingInterval = 'month';
|
|
1554
|
+
type BillingAccessState = 'trial_active' | 'trial_grace' | 'active' | 'past_due_grace' | 'scheduled_cancel' | 'suspended' | 'internal';
|
|
1555
|
+
type BillingChargeStatus = 'pending' | 'submitted' | 'paid' | 'failed' | 'unknown' | 'waived';
|
|
1556
|
+
interface BillingPlan {
|
|
1557
|
+
readonly id: string;
|
|
1558
|
+
readonly name: string;
|
|
1559
|
+
readonly publicSlug: string | null;
|
|
1560
|
+
readonly description: string;
|
|
1561
|
+
readonly priceKind: BillingPriceKind;
|
|
1562
|
+
readonly selfServe: boolean;
|
|
1563
|
+
readonly baseAmountCents: number;
|
|
1564
|
+
readonly currency: string;
|
|
1565
|
+
readonly includedMau: number;
|
|
1566
|
+
readonly overagePer1kCents: number;
|
|
1567
|
+
readonly appLimit: number | null;
|
|
1568
|
+
readonly billingInterval: BillingInterval;
|
|
1569
|
+
readonly catalogVersion: number;
|
|
1570
|
+
readonly unlimited: boolean;
|
|
1571
|
+
readonly isActive: boolean;
|
|
1572
|
+
readonly sortOrder: number;
|
|
1573
|
+
readonly accessRank: number;
|
|
1574
|
+
readonly adminGrantable: boolean;
|
|
1575
|
+
}
|
|
1576
|
+
interface Subscription {
|
|
1577
|
+
readonly id: string;
|
|
1578
|
+
readonly workspaceId: string;
|
|
1579
|
+
readonly paddleSubscriptionId: string | null;
|
|
1580
|
+
readonly source: SubscriptionSource;
|
|
1581
|
+
readonly planId: string;
|
|
1582
|
+
readonly status: SubscriptionStatus;
|
|
1583
|
+
readonly currentPeriodStart: string;
|
|
1584
|
+
readonly currentPeriodEnd: string;
|
|
1585
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
1586
|
+
readonly canceledAt: string | null;
|
|
1587
|
+
readonly trialEndsAt: string | null;
|
|
1588
|
+
readonly pendingPlanId: string | null;
|
|
1589
|
+
readonly pendingPlanEffectiveAt: string | null;
|
|
1590
|
+
readonly pendingPlanConfirmedAt: string | null;
|
|
1591
|
+
}
|
|
1592
|
+
interface BillingUsage {
|
|
1593
|
+
readonly periodStart: string | null;
|
|
1594
|
+
readonly periodEnd: string | null;
|
|
1595
|
+
readonly mau: number;
|
|
1596
|
+
readonly includedMau: number | null;
|
|
1597
|
+
readonly overUnits: number;
|
|
1598
|
+
readonly overagePer1kCents: number;
|
|
1599
|
+
readonly projectedOverageCents: number;
|
|
1600
|
+
readonly projectedTotalCents: number;
|
|
1601
|
+
readonly unlimited: boolean;
|
|
1602
|
+
readonly finalized: boolean;
|
|
1603
|
+
readonly chargeStatus: BillingChargeStatus | null;
|
|
1604
|
+
}
|
|
1605
|
+
interface BillingTrial {
|
|
1606
|
+
readonly startedAt: string | null;
|
|
1607
|
+
readonly endsAt: string | null;
|
|
1608
|
+
readonly graceEndsAt: string | null;
|
|
1609
|
+
}
|
|
1610
|
+
interface BillingOfferAvailability {
|
|
1611
|
+
readonly code: string;
|
|
1612
|
+
readonly planId: string;
|
|
1613
|
+
readonly total: number;
|
|
1614
|
+
readonly claimed: number;
|
|
1615
|
+
readonly reserved: number;
|
|
1616
|
+
readonly remaining: number;
|
|
1617
|
+
}
|
|
1618
|
+
interface BillingCheckoutRequest {
|
|
1619
|
+
readonly planId: string;
|
|
1620
|
+
readonly retainedAppIds?: ReadonlyArray<string>;
|
|
1621
|
+
}
|
|
1622
|
+
interface BillingCheckoutResponse {
|
|
1623
|
+
readonly checkoutSessionId: string;
|
|
1624
|
+
readonly transactionId: string;
|
|
1625
|
+
readonly expiresAt: string;
|
|
1626
|
+
}
|
|
1627
|
+
interface BillingChangePlanRequest {
|
|
1628
|
+
readonly planId: string;
|
|
1629
|
+
readonly retainedAppIds?: ReadonlyArray<string>;
|
|
1630
|
+
}
|
|
1631
|
+
interface BillingChangePlanResponse {
|
|
1632
|
+
readonly planId: string;
|
|
1633
|
+
readonly effectiveAt: string;
|
|
1634
|
+
readonly prorationMode: 'immediate_prorated' | 'next_billing_period';
|
|
1635
|
+
}
|
|
1636
|
+
interface BillingPeriod {
|
|
1637
|
+
readonly id: string;
|
|
1638
|
+
readonly startsAt: string;
|
|
1639
|
+
readonly endsAt: string;
|
|
1640
|
+
readonly mau: number;
|
|
1641
|
+
readonly includedMau: number;
|
|
1642
|
+
readonly overageUnits: number;
|
|
1643
|
+
readonly overageAmountCents: number;
|
|
1644
|
+
readonly currency: string;
|
|
1645
|
+
readonly status: 'open' | 'finalizing' | 'finalized' | 'billed' | 'review_required';
|
|
1646
|
+
readonly chargeStatus: BillingChargeStatus | null;
|
|
1647
|
+
}
|
|
1648
|
+
interface AdminWorkspaceSummary {
|
|
1649
|
+
readonly id: string;
|
|
1650
|
+
readonly name: string;
|
|
1651
|
+
readonly slug: string;
|
|
1652
|
+
readonly created_at: string;
|
|
1653
|
+
readonly owner_email: string | null;
|
|
1654
|
+
readonly subscription: {
|
|
1655
|
+
readonly workspace_id: string;
|
|
1656
|
+
readonly plan_id: string;
|
|
1657
|
+
readonly status: SubscriptionStatus;
|
|
1658
|
+
readonly source: SubscriptionSource;
|
|
1659
|
+
readonly current_period_end: string;
|
|
1660
|
+
readonly cancel_at_period_end: boolean;
|
|
1661
|
+
} | null;
|
|
1662
|
+
readonly mau: number;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
type AdminGrantStatus = 'active' | 'expired' | 'revoked';
|
|
1666
|
+
interface WorkspacePlanGrant {
|
|
1667
|
+
readonly id: string;
|
|
1668
|
+
readonly workspaceId: string;
|
|
1669
|
+
readonly planId: string;
|
|
1670
|
+
readonly startsAt: string;
|
|
1671
|
+
readonly endsAt: string;
|
|
1672
|
+
readonly reason: string;
|
|
1673
|
+
readonly createdByUserId: string;
|
|
1674
|
+
readonly createdByEmail: string | null;
|
|
1675
|
+
readonly revokedAt: string | null;
|
|
1676
|
+
readonly revokedByUserId: string | null;
|
|
1677
|
+
readonly revokedByEmail: string | null;
|
|
1678
|
+
readonly revokeReason: string | null;
|
|
1679
|
+
readonly version: number;
|
|
1680
|
+
readonly createdAt: string;
|
|
1681
|
+
readonly updatedAt: string;
|
|
1682
|
+
readonly status: AdminGrantStatus;
|
|
1683
|
+
}
|
|
1684
|
+
interface EffectivePlanAccess {
|
|
1685
|
+
readonly billingPlan: BillingPlan | null;
|
|
1686
|
+
readonly subscription: Subscription | null;
|
|
1687
|
+
readonly activeGrant: WorkspacePlanGrant | null;
|
|
1688
|
+
readonly grantPlan: BillingPlan | null;
|
|
1689
|
+
readonly effectivePlan: BillingPlan | null;
|
|
1690
|
+
readonly source: 'subscription' | 'grant' | 'none';
|
|
1691
|
+
readonly state: BillingAccessState;
|
|
1692
|
+
readonly reason: string | null;
|
|
1693
|
+
readonly canCollect: boolean;
|
|
1694
|
+
readonly canDeliver: boolean;
|
|
1695
|
+
readonly canMutateProduct: boolean;
|
|
1696
|
+
readonly canManageBilling: boolean;
|
|
1697
|
+
readonly activeAppLimit: number | null;
|
|
1698
|
+
readonly deadlineAt: string | null;
|
|
1699
|
+
readonly trial: BillingTrial | null;
|
|
1700
|
+
}
|
|
1701
|
+
interface AdminSession {
|
|
1702
|
+
readonly user: {
|
|
1703
|
+
readonly id: string;
|
|
1704
|
+
readonly email: string;
|
|
1705
|
+
readonly name: string | null;
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
interface AdminCustomerSummary {
|
|
1709
|
+
readonly workspaceId: string;
|
|
1710
|
+
readonly name: string;
|
|
1711
|
+
readonly slug: string;
|
|
1712
|
+
readonly region: string;
|
|
1713
|
+
readonly owner: {
|
|
1714
|
+
readonly userId: string;
|
|
1715
|
+
readonly email: string;
|
|
1716
|
+
readonly name: string | null;
|
|
1717
|
+
};
|
|
1718
|
+
readonly memberCount: number;
|
|
1719
|
+
readonly appCount: number;
|
|
1720
|
+
readonly mau: number;
|
|
1721
|
+
readonly subscriptionStatus: SubscriptionStatus | null;
|
|
1722
|
+
readonly billingPlan: BillingPlan | null;
|
|
1723
|
+
readonly effectivePlan: BillingPlan | null;
|
|
1724
|
+
readonly activeGrant: WorkspacePlanGrant | null;
|
|
1725
|
+
readonly accessState: BillingAccessState;
|
|
1726
|
+
readonly accessDeadlineAt: string | null;
|
|
1727
|
+
readonly createdAt: string;
|
|
1728
|
+
}
|
|
1729
|
+
interface AdminCustomerMember {
|
|
1730
|
+
readonly userId: string;
|
|
1731
|
+
readonly email: string;
|
|
1732
|
+
readonly name: string | null;
|
|
1733
|
+
readonly role: WorkspaceRole;
|
|
1734
|
+
readonly joinedAt: string;
|
|
1735
|
+
}
|
|
1736
|
+
interface AdminCustomerApp {
|
|
1737
|
+
readonly id: string;
|
|
1738
|
+
readonly name: string;
|
|
1739
|
+
readonly slug: string;
|
|
1740
|
+
readonly platforms: ReadonlyArray<string>;
|
|
1741
|
+
readonly billingSuspendedAt: string | null;
|
|
1742
|
+
readonly createdAt: string;
|
|
1743
|
+
}
|
|
1744
|
+
interface AdminBillingEvent {
|
|
1745
|
+
readonly id: string;
|
|
1746
|
+
readonly eventType: string;
|
|
1747
|
+
readonly receivedAt: string;
|
|
1748
|
+
readonly processedAt: string | null;
|
|
1749
|
+
readonly processingError: string | null;
|
|
1750
|
+
readonly processingStatus: 'pending' | 'processing' | 'processed' | 'failed' | 'review_required';
|
|
1751
|
+
readonly attemptCount: number;
|
|
1752
|
+
}
|
|
1753
|
+
interface AdminBillingNotification {
|
|
1754
|
+
readonly id: string;
|
|
1755
|
+
readonly kind: 'trial_ending' | 'trial_grace' | 'trial_suspended' | 'payment_past_due';
|
|
1756
|
+
readonly status: 'pending' | 'sent' | 'canceled' | 'dead_lettered';
|
|
1757
|
+
readonly attempts: number;
|
|
1758
|
+
readonly referenceAt: string;
|
|
1759
|
+
readonly sentAt: string | null;
|
|
1760
|
+
readonly lastError: string | null;
|
|
1761
|
+
readonly createdAt: string;
|
|
1762
|
+
}
|
|
1763
|
+
interface AdminActivityEntry {
|
|
1764
|
+
readonly id: string;
|
|
1765
|
+
readonly workspaceId: string | null;
|
|
1766
|
+
readonly workspaceName: string | null;
|
|
1767
|
+
readonly actorEmail: string | null;
|
|
1768
|
+
readonly action: string;
|
|
1769
|
+
readonly targetType: string;
|
|
1770
|
+
readonly targetId: string | null;
|
|
1771
|
+
readonly payload: Record<string, unknown>;
|
|
1772
|
+
readonly createdAt: string;
|
|
1773
|
+
}
|
|
1774
|
+
interface AdminCustomerDetail {
|
|
1775
|
+
readonly workspace: {
|
|
1776
|
+
readonly id: string;
|
|
1777
|
+
readonly name: string;
|
|
1778
|
+
readonly slug: string;
|
|
1779
|
+
readonly region: string;
|
|
1780
|
+
readonly createdAt: string;
|
|
1781
|
+
};
|
|
1782
|
+
readonly owner: AdminCustomerMember;
|
|
1783
|
+
readonly members: ReadonlyArray<AdminCustomerMember>;
|
|
1784
|
+
readonly apps: ReadonlyArray<AdminCustomerApp>;
|
|
1785
|
+
readonly mau: number;
|
|
1786
|
+
readonly access: EffectivePlanAccess;
|
|
1787
|
+
readonly grantHistory: ReadonlyArray<WorkspacePlanGrant>;
|
|
1788
|
+
readonly billingEvents: ReadonlyArray<AdminBillingEvent>;
|
|
1789
|
+
readonly billingNotifications: ReadonlyArray<AdminBillingNotification>;
|
|
1790
|
+
readonly billingPeriods: ReadonlyArray<BillingPeriod>;
|
|
1791
|
+
readonly foundingOffer: {
|
|
1792
|
+
readonly code: string;
|
|
1793
|
+
readonly slotNumber: number;
|
|
1794
|
+
readonly status: 'reserved' | 'claimed' | 'expired';
|
|
1795
|
+
readonly reservedUntil: string | null;
|
|
1796
|
+
readonly claimedAt: string | null;
|
|
1797
|
+
} | null;
|
|
1798
|
+
readonly recentActivity: ReadonlyArray<AdminActivityEntry>;
|
|
1799
|
+
}
|
|
1800
|
+
interface AdminCustomerListRequest {
|
|
1801
|
+
readonly search?: string;
|
|
1802
|
+
readonly planId?: string;
|
|
1803
|
+
readonly subscriptionStatus?: SubscriptionStatus | 'none';
|
|
1804
|
+
readonly grantStatus?: 'active' | 'expiring' | 'none';
|
|
1805
|
+
readonly cursor?: string;
|
|
1806
|
+
readonly limit?: number;
|
|
1807
|
+
}
|
|
1808
|
+
interface AdminCustomerListResponse {
|
|
1809
|
+
readonly customers: ReadonlyArray<AdminCustomerSummary>;
|
|
1810
|
+
readonly nextCursor: string | null;
|
|
1811
|
+
}
|
|
1812
|
+
interface CreateWorkspacePlanGrantRequest {
|
|
1813
|
+
readonly planId: string;
|
|
1814
|
+
readonly durationDays?: number;
|
|
1815
|
+
readonly endsAt?: string;
|
|
1816
|
+
readonly reason: string;
|
|
1817
|
+
}
|
|
1818
|
+
interface ExtendWorkspacePlanGrantRequest {
|
|
1819
|
+
readonly endsAt: string;
|
|
1820
|
+
readonly reason: string;
|
|
1821
|
+
readonly expectedVersion: number;
|
|
1822
|
+
}
|
|
1823
|
+
interface RevokeWorkspacePlanGrantRequest {
|
|
1824
|
+
readonly reason: string;
|
|
1825
|
+
readonly expectedVersion: number;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
declare const INTEGRATION_PROVIDERS: readonly ["amplitude", "mixpanel"];
|
|
1829
|
+
type IntegrationProvider = (typeof INTEGRATION_PROVIDERS)[number];
|
|
1830
|
+
declare const INTEGRATION_CATEGORIES: readonly ["feedback", "surveys", "inapp", "push", "requests", "lifecycle"];
|
|
1831
|
+
type IntegrationCategory = (typeof INTEGRATION_CATEGORIES)[number];
|
|
1832
|
+
type IntegrationStatus = 'connected' | 'paused' | 'needs_attention' | 'disconnected';
|
|
1833
|
+
type AmplitudeIntegrationRegion = 'us' | 'eu';
|
|
1834
|
+
type MixpanelIntegrationRegion = 'us' | 'eu' | 'in';
|
|
1835
|
+
type IntegrationRegion = 'us' | 'eu' | 'in';
|
|
1836
|
+
type IntegrationDeliveryStatus = 'pending' | 'leased' | 'retrying' | 'delivered' | 'dead_lettered' | 'skipped';
|
|
1837
|
+
type CoreEventSubjectRole = 'actor' | 'affected_user';
|
|
1838
|
+
interface CoreIntegrationEventDefinition {
|
|
1839
|
+
readonly key: string;
|
|
1840
|
+
readonly name: string;
|
|
1841
|
+
readonly category: IntegrationCategory | 'identity';
|
|
1842
|
+
readonly subjectRole: CoreEventSubjectRole;
|
|
1843
|
+
readonly required?: boolean;
|
|
1844
|
+
/** Stable output property key -> accepted source property aliases. */
|
|
1845
|
+
readonly properties: Readonly<Record<string, ReadonlyArray<string>>>;
|
|
1846
|
+
}
|
|
1847
|
+
declare const USER_IDENTIFIED_EVENT_NAME: "$user_identified";
|
|
1848
|
+
declare const CORE_INTEGRATION_EVENTS: ReadonlyArray<CoreIntegrationEventDefinition>;
|
|
1849
|
+
declare function getCoreIntegrationEvent(key: string): CoreIntegrationEventDefinition | null;
|
|
1850
|
+
declare function sanitizeCoreIntegrationProperties(definition: CoreIntegrationEventDefinition, input: Readonly<Record<string, unknown>> | null | undefined): Readonly<Record<string, EventPropertyValue>>;
|
|
1851
|
+
interface IntegrationSummary {
|
|
1852
|
+
readonly id: string;
|
|
1853
|
+
readonly provider: IntegrationProvider;
|
|
1854
|
+
readonly status: IntegrationStatus;
|
|
1855
|
+
readonly region: IntegrationRegion;
|
|
1856
|
+
readonly categories: ReadonlyArray<IntegrationCategory>;
|
|
1857
|
+
readonly credentialHint: string | null;
|
|
1858
|
+
readonly connectedAt: string | null;
|
|
1859
|
+
readonly pausedAt: string | null;
|
|
1860
|
+
readonly lastVerifiedAt: string | null;
|
|
1861
|
+
readonly lastSuccessAt: string | null;
|
|
1862
|
+
readonly lastFailureAt: string | null;
|
|
1863
|
+
readonly lastErrorCode: string | null;
|
|
1864
|
+
readonly lastErrorMessage: string | null;
|
|
1865
|
+
}
|
|
1866
|
+
type ConnectIntegrationRequest = {
|
|
1867
|
+
readonly provider: 'amplitude';
|
|
1868
|
+
readonly apiKey: string;
|
|
1869
|
+
readonly region: 'us' | 'eu';
|
|
1870
|
+
readonly categories: ReadonlyArray<IntegrationCategory>;
|
|
1871
|
+
} | {
|
|
1872
|
+
readonly provider: 'mixpanel';
|
|
1873
|
+
readonly projectToken: string;
|
|
1874
|
+
readonly region: 'us' | 'eu' | 'in';
|
|
1875
|
+
readonly categories: ReadonlyArray<IntegrationCategory>;
|
|
1876
|
+
readonly identityMode: 'simplified';
|
|
1877
|
+
};
|
|
1878
|
+
interface UpdateIntegrationRequest {
|
|
1879
|
+
readonly categories: ReadonlyArray<IntegrationCategory>;
|
|
1880
|
+
}
|
|
1881
|
+
interface IntegrationTestResult {
|
|
1882
|
+
readonly accepted: true;
|
|
1883
|
+
readonly eventName: 'UserGist Integration Connected';
|
|
1884
|
+
readonly deviceId: string;
|
|
1885
|
+
readonly acceptedAt: string;
|
|
1886
|
+
}
|
|
1887
|
+
interface IntegrationDeliverySummary {
|
|
1888
|
+
readonly id: string;
|
|
1889
|
+
readonly eventKey: string;
|
|
1890
|
+
readonly eventName: string;
|
|
1891
|
+
readonly status: IntegrationDeliveryStatus;
|
|
1892
|
+
readonly identity: {
|
|
1893
|
+
readonly anonymousId: string;
|
|
1894
|
+
readonly externalId: string | null;
|
|
1895
|
+
};
|
|
1896
|
+
readonly occurredAt: string;
|
|
1897
|
+
readonly attempts: number;
|
|
1898
|
+
readonly providerStatusCode: number | null;
|
|
1899
|
+
readonly lastErrorMessage: string | null;
|
|
1900
|
+
}
|
|
1901
|
+
interface IntegrationDeliveriesResponse {
|
|
1902
|
+
readonly items: ReadonlyArray<IntegrationDeliverySummary>;
|
|
1903
|
+
readonly nextCursor: string | null;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* Canonical event names emitted by the push pillar. These land in the
|
|
1908
|
+
* events pipeline so segments can query them like any other event.
|
|
1909
|
+
*/
|
|
1910
|
+
declare const PUSH_EVENTS: {
|
|
1911
|
+
readonly SENT: "$push_sent";
|
|
1912
|
+
readonly DELIVERED: "$push_delivered";
|
|
1913
|
+
readonly DISPLAYED: "$push_displayed";
|
|
1914
|
+
readonly RECEIVED: "$push_received";
|
|
1915
|
+
readonly OPENED: "$push_opened";
|
|
1916
|
+
readonly DISMISSED: "$push_dismissed";
|
|
1917
|
+
readonly CLICKED: "$push_clicked";
|
|
1918
|
+
readonly ACTION_CLICKED: "$push_action_clicked";
|
|
1919
|
+
readonly BOUNCED: "$push_bounced";
|
|
1920
|
+
readonly SILENT_ACK: "$push_silent_ack";
|
|
1921
|
+
};
|
|
1922
|
+
type PushEventName = (typeof PUSH_EVENTS)[keyof typeof PUSH_EVENTS];
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* Runtime types shared by the React Native, iOS, and Android SDKs for
|
|
1926
|
+
* the "under the hood" push primitives:
|
|
1927
|
+
* • Silent reachability ping payloads
|
|
1928
|
+
* • Delivery beacon contract (delivered / displayed / dismissed)
|
|
1929
|
+
* • Channel registry (Android NotificationChannel + iOS category)
|
|
1930
|
+
* • App-open beacon
|
|
1931
|
+
*/
|
|
1932
|
+
interface SilentPushPayload {
|
|
1933
|
+
readonly usergist_silent: '1';
|
|
1934
|
+
readonly usergist_ping_id: string;
|
|
1935
|
+
}
|
|
1936
|
+
type AndroidImportance = 0 | 1 | 2 | 3 | 4;
|
|
1937
|
+
type ChannelCategory = 'transactional' | 'marketing' | 'silent' | 'digest' | 'alert';
|
|
1938
|
+
interface PushChannelDef {
|
|
1939
|
+
readonly app_id: string;
|
|
1940
|
+
readonly channel_id: string;
|
|
1941
|
+
readonly display_name: string;
|
|
1942
|
+
readonly description: string | null;
|
|
1943
|
+
readonly importance: AndroidImportance;
|
|
1944
|
+
readonly default_sound: string | null;
|
|
1945
|
+
readonly default_vibrate: boolean;
|
|
1946
|
+
readonly default_badge: boolean;
|
|
1947
|
+
readonly category: ChannelCategory;
|
|
1948
|
+
}
|
|
1949
|
+
interface DeliveryBeacon {
|
|
1950
|
+
readonly deliveryId: string;
|
|
1951
|
+
readonly occurredAt?: string;
|
|
1952
|
+
readonly attemptId?: string;
|
|
1953
|
+
readonly actionButton?: string;
|
|
1954
|
+
}
|
|
1955
|
+
type DeliveryBeaconKind = 'delivered' | 'displayed' | 'dismissed';
|
|
1956
|
+
interface SilentAck {
|
|
1957
|
+
readonly pingId: string;
|
|
1958
|
+
readonly anonymousId: string;
|
|
1959
|
+
readonly receivedAt?: string;
|
|
1960
|
+
}
|
|
1961
|
+
interface RebindRequest {
|
|
1962
|
+
readonly anonymousId: string;
|
|
1963
|
+
readonly externalId: string;
|
|
1964
|
+
readonly token: string;
|
|
1965
|
+
}
|
|
1966
|
+
interface AppOpenBeacon {
|
|
1967
|
+
readonly anonymousId: string;
|
|
1968
|
+
readonly occurredAt?: string;
|
|
1969
|
+
}
|
|
1970
|
+
/**
|
|
1971
|
+
* SDK-side recognized payload after parsing a server-sent push. Both
|
|
1972
|
+
* APNs (via NSE) and FCM (via FirebaseMessagingService) decode into
|
|
1973
|
+
* this shape so the cross-platform UI/behaviour layer can stay
|
|
1974
|
+
* platform-agnostic.
|
|
1975
|
+
*/
|
|
1976
|
+
interface ParsedPushPayload {
|
|
1977
|
+
readonly campaignId: string;
|
|
1978
|
+
readonly variantId: string;
|
|
1979
|
+
readonly deliveryId: string;
|
|
1980
|
+
readonly title: string;
|
|
1981
|
+
readonly body: string;
|
|
1982
|
+
readonly imageUrl: string | null;
|
|
1983
|
+
readonly deepLink: string | null;
|
|
1984
|
+
readonly language: string | null;
|
|
1985
|
+
readonly actionButtons: ReadonlyArray<{
|
|
1986
|
+
readonly label: string;
|
|
1987
|
+
readonly action: 'open_app' | 'deep_link' | 'url' | 'dismiss';
|
|
1988
|
+
readonly target?: string;
|
|
1989
|
+
}>;
|
|
1990
|
+
readonly androidChannelId: string | null;
|
|
1991
|
+
readonly silent: boolean;
|
|
1992
|
+
readonly silentPingId: string | null;
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* Helper used by the data-only Android branch and the iOS NSE to
|
|
1996
|
+
* detect a silent reachability ping.
|
|
1997
|
+
*/
|
|
1998
|
+
declare function isSilentPushPayload(raw: Record<string, unknown> | null | undefined): boolean;
|
|
1999
|
+
|
|
2000
|
+
interface UserState {
|
|
2001
|
+
readonly properties: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
2002
|
+
readonly eventCounts: Readonly<Record<string, Readonly<Record<number, number>>>>;
|
|
2003
|
+
readonly lastEventAt: Readonly<Record<string, string | undefined>>;
|
|
2004
|
+
}
|
|
2005
|
+
/**
|
|
2006
|
+
* Evaluate a segment DSL against a user snapshot.
|
|
2007
|
+
*
|
|
2008
|
+
* @param now - Reference timestamp (ms since epoch) used for time-window
|
|
2009
|
+
* predicates. MUST be supplied explicitly so evaluation is deterministic
|
|
2010
|
+
* across processes (server trigger engine + client SDK), independent of
|
|
2011
|
+
* wall-clock skew. Defaults to `Date.now()` for backwards compatibility,
|
|
2012
|
+
* but callers that care about parity should pass the same `now` they pass
|
|
2013
|
+
* to the matching server-side call.
|
|
2014
|
+
*/
|
|
2015
|
+
declare function evaluateSegment(dsl: SegmentDsl, user: UserState, now?: number): boolean;
|
|
2016
|
+
declare function evaluateSerializedSegmentRules(rules: SerializedSegmentRules | null | undefined, user: UserState, now?: number): boolean;
|
|
2017
|
+
declare function serializedRulesToDsl(rules: SerializedSegmentRules): SegmentDsl;
|
|
2018
|
+
|
|
2019
|
+
declare function evaluateBranchCondition(cond: SurveyBranchCondition, answer: SurveyAnswerValue | undefined): boolean;
|
|
2020
|
+
declare function nextQuestionId(flow: SurveyFlow, currentQuestionId: string, answers: SurveyAnswerRecord): string | null;
|
|
2021
|
+
declare function findQuestion(flow: SurveyFlow, questionId: string): SurveyQuestion | undefined;
|
|
2022
|
+
declare function findQuestionIndex(flow: SurveyFlow, questionId: string): number;
|
|
2023
|
+
declare function estimateProgress(flow: SurveyFlow, currentQuestionId: string | null): number;
|
|
2024
|
+
declare function reachableQuestions(flow: SurveyFlow, startId?: string): ReadonlySet<string>;
|
|
2025
|
+
|
|
2026
|
+
interface PeriodicSchedule {
|
|
2027
|
+
readonly frequency: PeriodicFrequency;
|
|
2028
|
+
readonly hourLocal: number;
|
|
2029
|
+
readonly minuteLocal: number;
|
|
2030
|
+
/** 0..6 (Sun=0). Required for `weekly`. */
|
|
2031
|
+
readonly weekday?: number;
|
|
2032
|
+
/** 1..31. Required for `monthly`. */
|
|
2033
|
+
readonly dayOfMonth?: number;
|
|
2034
|
+
/** IANA timezone the hour/minute are expressed in. Defaults to UTC. */
|
|
2035
|
+
readonly tz?: string;
|
|
2036
|
+
}
|
|
2037
|
+
/**
|
|
2038
|
+
* Returns the next firing instant (as a Date in UTC) for a structured
|
|
2039
|
+
* periodic schedule, strictly after `now`.
|
|
2040
|
+
*
|
|
2041
|
+
* Pure / dependency-free. Used both server-side (push-scheduler `isDue`
|
|
2042
|
+
* check) and client-side (dashboard "Next occurrence" preview). Keep
|
|
2043
|
+
* deterministic for a given (schedule, now) tuple — no randomness.
|
|
2044
|
+
*
|
|
2045
|
+
* The walk is bounded — daily 2 iters, weekly 8, monthly 13 — so DST
|
|
2046
|
+
* gaps and short-month overflows can't loop forever.
|
|
2047
|
+
*/
|
|
2048
|
+
declare function nextPeriodicFire(schedule: PeriodicSchedule, now?: Date): Date;
|
|
2049
|
+
/**
|
|
2050
|
+
* Minutes east of UTC for `tz` at instant `at`. Falls back to 0 (UTC)
|
|
2051
|
+
* for invalid input. Exported so server-side callers can share the
|
|
2052
|
+
* same offset math the periodic walker uses (avoids a separate
|
|
2053
|
+
* implementation in push-scheduler.ts).
|
|
2054
|
+
*/
|
|
2055
|
+
declare function tzOffsetMinutes(at: Date, tz: string): number;
|
|
2056
|
+
|
|
2057
|
+
interface CreateWorkspaceRequest {
|
|
2058
|
+
readonly name: string;
|
|
2059
|
+
readonly slug?: string;
|
|
2060
|
+
}
|
|
2061
|
+
interface InviteMemberRequest {
|
|
2062
|
+
readonly email: string;
|
|
2063
|
+
readonly role: Exclude<WorkspaceRole, 'owner'>;
|
|
2064
|
+
}
|
|
2065
|
+
interface CreateAppRequest {
|
|
2066
|
+
readonly name: string;
|
|
2067
|
+
readonly slug?: string;
|
|
2068
|
+
readonly platforms: App['platforms'];
|
|
2069
|
+
readonly environment?: WriteKey['environment'];
|
|
2070
|
+
}
|
|
2071
|
+
interface UpdateAppRequest {
|
|
2072
|
+
readonly name?: string;
|
|
2073
|
+
readonly platforms?: App['platforms'];
|
|
2074
|
+
readonly piiAllowList?: ReadonlyArray<string>;
|
|
2075
|
+
readonly lifecycleEventsEnabled?: boolean;
|
|
2076
|
+
}
|
|
2077
|
+
interface CreateWriteKeyRequest {
|
|
2078
|
+
readonly label?: string;
|
|
2079
|
+
readonly environment?: WriteKey['environment'];
|
|
2080
|
+
}
|
|
2081
|
+
interface RegisterEventDefinitionRequest {
|
|
2082
|
+
readonly name: string;
|
|
2083
|
+
readonly description?: string;
|
|
2084
|
+
readonly properties?: ReadonlyArray<EventPropertySchema>;
|
|
2085
|
+
}
|
|
2086
|
+
interface UpdateEventDefinitionRequest {
|
|
2087
|
+
readonly description?: string;
|
|
2088
|
+
readonly properties?: ReadonlyArray<EventPropertySchema>;
|
|
2089
|
+
readonly status?: EventDefinition['status'];
|
|
2090
|
+
}
|
|
2091
|
+
interface CreateSegmentRequest {
|
|
2092
|
+
readonly name: string;
|
|
2093
|
+
readonly description?: string;
|
|
2094
|
+
readonly definition?: AudienceSpec;
|
|
2095
|
+
readonly rules?: SegmentDsl;
|
|
2096
|
+
readonly refreshMode?: 'hot' | 'cold' | 'manual';
|
|
2097
|
+
}
|
|
2098
|
+
interface AppUserSummary {
|
|
2099
|
+
readonly subjectId: string;
|
|
2100
|
+
readonly anonymousId: string;
|
|
2101
|
+
readonly anonymousIds: ReadonlyArray<string>;
|
|
2102
|
+
readonly externalId?: string | null;
|
|
2103
|
+
readonly firstSeenAt: string;
|
|
2104
|
+
readonly lastSeenAt: string;
|
|
2105
|
+
readonly eventCount?: number;
|
|
2106
|
+
readonly topProperties?: Readonly<Record<string, string | number | boolean | null>>;
|
|
2107
|
+
readonly country?: string | null;
|
|
2108
|
+
readonly platform?: string | null;
|
|
2109
|
+
}
|
|
2110
|
+
interface AppUserDetail {
|
|
2111
|
+
readonly subjectId: string;
|
|
2112
|
+
readonly anonymousId: string;
|
|
2113
|
+
readonly anonymousIds: ReadonlyArray<string>;
|
|
2114
|
+
readonly externalId?: string | null;
|
|
2115
|
+
readonly firstSeenAt: string;
|
|
2116
|
+
readonly lastSeenAt: string;
|
|
2117
|
+
readonly properties: Readonly<Record<string, string | number | boolean | null>>;
|
|
2118
|
+
readonly eventCount: number;
|
|
2119
|
+
readonly country?: string | null;
|
|
2120
|
+
readonly platform?: string | null;
|
|
2121
|
+
}
|
|
2122
|
+
interface AppUserEvent {
|
|
2123
|
+
readonly id: string;
|
|
2124
|
+
readonly name: string;
|
|
2125
|
+
readonly occurredAt: string;
|
|
2126
|
+
readonly properties: Readonly<Record<string, unknown>>;
|
|
2127
|
+
readonly platform?: string | null;
|
|
2128
|
+
readonly appVersion?: string | null;
|
|
2129
|
+
}
|
|
2130
|
+
interface PaginatedAppUsers {
|
|
2131
|
+
readonly items: ReadonlyArray<AppUserSummary>;
|
|
2132
|
+
readonly total: number;
|
|
2133
|
+
readonly nextCursor: string | null;
|
|
2134
|
+
}
|
|
2135
|
+
interface PaginatedAppUserEvents {
|
|
2136
|
+
readonly items: ReadonlyArray<AppUserEvent>;
|
|
2137
|
+
readonly nextCursor: string | null;
|
|
2138
|
+
}
|
|
2139
|
+
interface ListUsersQuery {
|
|
2140
|
+
readonly q?: string;
|
|
2141
|
+
readonly cursor?: string;
|
|
2142
|
+
readonly limit?: number;
|
|
2143
|
+
}
|
|
2144
|
+
interface ListUserEventsQuery {
|
|
2145
|
+
readonly from?: string;
|
|
2146
|
+
readonly to?: string;
|
|
2147
|
+
readonly cursor?: string;
|
|
2148
|
+
readonly limit?: number;
|
|
2149
|
+
}
|
|
2150
|
+
interface GenerateSegmentRulesRequest {
|
|
2151
|
+
readonly name?: string;
|
|
2152
|
+
readonly description?: string;
|
|
2153
|
+
}
|
|
2154
|
+
interface GenerateSegmentRulesResponse {
|
|
2155
|
+
readonly rules: SegmentDsl;
|
|
2156
|
+
readonly rationale: string;
|
|
2157
|
+
}
|
|
2158
|
+
interface GenerateSegmentNameRequest {
|
|
2159
|
+
readonly rules: SegmentDsl;
|
|
2160
|
+
}
|
|
2161
|
+
interface GenerateSegmentNameResponse {
|
|
2162
|
+
readonly name: string;
|
|
2163
|
+
readonly description: string;
|
|
2164
|
+
}
|
|
2165
|
+
interface SegmentPreview {
|
|
2166
|
+
readonly estimatedCount: number;
|
|
2167
|
+
readonly sampleUsers: ReadonlyArray<{
|
|
2168
|
+
readonly anonymousId: string;
|
|
2169
|
+
readonly externalId?: string | null;
|
|
2170
|
+
readonly properties: Record<string, unknown>;
|
|
2171
|
+
}>;
|
|
2172
|
+
}
|
|
2173
|
+
interface CreatePromptRequest {
|
|
2174
|
+
readonly name: string;
|
|
2175
|
+
readonly triggerEventName: string;
|
|
2176
|
+
readonly segmentId?: string | null;
|
|
2177
|
+
readonly questions: ReadonlyArray<Question>;
|
|
2178
|
+
readonly themeMode?: ThemeMode;
|
|
2179
|
+
readonly theme?: PromptTheme;
|
|
2180
|
+
readonly frequency?: FrequencyCaps;
|
|
2181
|
+
readonly startAt?: string | null;
|
|
2182
|
+
readonly endAt?: string | null;
|
|
2183
|
+
readonly status?: PromptStatus;
|
|
2184
|
+
}
|
|
2185
|
+
interface UpdatePromptRequest {
|
|
2186
|
+
readonly name?: string;
|
|
2187
|
+
readonly triggerEventName?: string;
|
|
2188
|
+
readonly segmentId?: string | null;
|
|
2189
|
+
readonly questions?: ReadonlyArray<Question>;
|
|
2190
|
+
readonly themeMode?: ThemeMode;
|
|
2191
|
+
readonly theme?: PromptTheme;
|
|
2192
|
+
readonly frequency?: FrequencyCaps;
|
|
2193
|
+
readonly startAt?: string | null;
|
|
2194
|
+
readonly endAt?: string | null;
|
|
2195
|
+
readonly status?: PromptStatus;
|
|
2196
|
+
}
|
|
2197
|
+
interface TestPromptOnDeviceRequest {
|
|
2198
|
+
readonly anonymousId: string;
|
|
2199
|
+
}
|
|
2200
|
+
interface ListResponsesQuery {
|
|
2201
|
+
readonly promptId?: string;
|
|
2202
|
+
readonly from?: string;
|
|
2203
|
+
readonly to?: string;
|
|
2204
|
+
readonly page?: number;
|
|
2205
|
+
readonly limit?: number;
|
|
2206
|
+
readonly segmentId?: string;
|
|
2207
|
+
}
|
|
2208
|
+
interface PromptAnalytics {
|
|
2209
|
+
readonly promptId: string;
|
|
2210
|
+
readonly shown: number;
|
|
2211
|
+
readonly responded: number;
|
|
2212
|
+
readonly dismissed: number;
|
|
2213
|
+
readonly completionRate: number;
|
|
2214
|
+
readonly perQuestion: ReadonlyArray<{
|
|
2215
|
+
readonly questionId: string;
|
|
2216
|
+
readonly type: Question['type'];
|
|
2217
|
+
readonly distribution: Readonly<Record<string, number>>;
|
|
2218
|
+
readonly average?: number;
|
|
2219
|
+
readonly npsScore?: number;
|
|
2220
|
+
}>;
|
|
2221
|
+
}
|
|
2222
|
+
interface SdkIngestRequest extends IngestBatch {
|
|
2223
|
+
}
|
|
2224
|
+
interface SdkIngestResponse {
|
|
2225
|
+
readonly accepted: number;
|
|
2226
|
+
readonly rejected: number;
|
|
2227
|
+
readonly errors?: ReadonlyArray<{
|
|
2228
|
+
index: number;
|
|
2229
|
+
reason: string;
|
|
2230
|
+
}>;
|
|
2231
|
+
}
|
|
2232
|
+
interface SdkArmedTriggersResponse {
|
|
2233
|
+
readonly triggers: ReadonlyArray<ArmedTrigger>;
|
|
2234
|
+
readonly serverTime: string;
|
|
2235
|
+
readonly nextSyncMs: number;
|
|
2236
|
+
}
|
|
2237
|
+
interface SdkArmedInAppMessagesResponse {
|
|
2238
|
+
readonly messages: ReadonlyArray<ArmedInAppMessage>;
|
|
2239
|
+
readonly serverTime: string;
|
|
2240
|
+
readonly nextSyncMs: number;
|
|
2241
|
+
}
|
|
2242
|
+
interface SdkArmedSurveysResponse {
|
|
2243
|
+
readonly surveys: ReadonlyArray<ArmedSurvey>;
|
|
2244
|
+
readonly serverTime: string;
|
|
2245
|
+
readonly nextSyncMs: number;
|
|
2246
|
+
}
|
|
2247
|
+
interface SdkConsentPayload {
|
|
2248
|
+
readonly anonymousId: string;
|
|
2249
|
+
readonly externalId?: string | null;
|
|
2250
|
+
readonly purposes: Consent;
|
|
2251
|
+
readonly version: number;
|
|
2252
|
+
readonly effectiveAt: string;
|
|
2253
|
+
}
|
|
2254
|
+
interface SdkSessionResponse {
|
|
2255
|
+
readonly subjectToken: string;
|
|
2256
|
+
readonly subjectId: string;
|
|
2257
|
+
readonly expiresAt: string;
|
|
2258
|
+
}
|
|
2259
|
+
interface SdkIdentifyPayload {
|
|
2260
|
+
readonly anonymousId: string;
|
|
2261
|
+
readonly externalId: string;
|
|
2262
|
+
readonly properties?: Record<string, string | number | boolean | null>;
|
|
2263
|
+
}
|
|
2264
|
+
interface GdprDeleteRequest {
|
|
2265
|
+
readonly externalId?: string;
|
|
2266
|
+
readonly anonymousId?: string;
|
|
2267
|
+
}
|
|
2268
|
+
interface GdprExportRequest {
|
|
2269
|
+
readonly externalId?: string;
|
|
2270
|
+
readonly anonymousId?: string;
|
|
2271
|
+
}
|
|
2272
|
+
type Endpoint<Req, Res> = {
|
|
2273
|
+
readonly __req?: Req;
|
|
2274
|
+
readonly __res: Res;
|
|
2275
|
+
};
|
|
2276
|
+
declare const endpoints: {
|
|
2277
|
+
readonly 'GET /v1/me': Endpoint<void, {
|
|
2278
|
+
user: User;
|
|
2279
|
+
workspaces: ReadonlyArray<WorkspaceWithRole>;
|
|
2280
|
+
}>;
|
|
2281
|
+
readonly 'GET /v1/workspaces': Endpoint<void, ReadonlyArray<Workspace>>;
|
|
2282
|
+
readonly 'POST /v1/workspaces': Endpoint<CreateWorkspaceRequest, Workspace>;
|
|
2283
|
+
readonly 'GET /v1/workspaces/:wid/members': Endpoint<void, ReadonlyArray<WorkspaceMember>>;
|
|
2284
|
+
readonly 'GET /v1/workspaces/:wid/invites': Endpoint<void, ReadonlyArray<WorkspaceInvite>>;
|
|
2285
|
+
readonly 'POST /v1/workspaces/:wid/invites': Endpoint<InviteMemberRequest, {
|
|
2286
|
+
queued: true;
|
|
2287
|
+
}>;
|
|
2288
|
+
readonly 'DELETE /v1/workspaces/:wid/invites/:inviteId': Endpoint<void, {
|
|
2289
|
+
revoked: true;
|
|
2290
|
+
}>;
|
|
2291
|
+
readonly 'POST /v1/invites/accept': Endpoint<AcceptWorkspaceInviteRequest, AcceptWorkspaceInviteResponse>;
|
|
2292
|
+
readonly 'GET /v1/workspaces/:wid/apps': Endpoint<void, ReadonlyArray<App>>;
|
|
2293
|
+
readonly 'POST /v1/workspaces/:wid/apps': Endpoint<CreateAppRequest, CreatedApp>;
|
|
2294
|
+
readonly 'GET /v1/workspaces/:wid/api-tokens': Endpoint<void, ReadonlyArray<ApiToken>>;
|
|
2295
|
+
readonly 'POST /v1/workspaces/:wid/api-tokens': Endpoint<CreateApiTokenRequest, CreatedApiToken>;
|
|
2296
|
+
readonly 'DELETE /v1/workspaces/:wid/api-tokens/:tokenId': Endpoint<void, {
|
|
2297
|
+
revoked: true;
|
|
2298
|
+
}>;
|
|
2299
|
+
readonly 'GET /v1/apps/:appId': Endpoint<void, App>;
|
|
2300
|
+
readonly 'PATCH /v1/apps/:appId': Endpoint<UpdateAppRequest, App>;
|
|
2301
|
+
readonly 'DELETE /v1/apps/:appId': Endpoint<void, {
|
|
2302
|
+
ok: true;
|
|
2303
|
+
}>;
|
|
2304
|
+
readonly 'POST /v1/apps/:appId/sdk/subject-tokens': Endpoint<{
|
|
2305
|
+
externalId: string;
|
|
2306
|
+
}, SdkSessionResponse>;
|
|
2307
|
+
readonly 'GET /v1/apps/:appId/integrations': Endpoint<void, ReadonlyArray<IntegrationSummary>>;
|
|
2308
|
+
readonly 'PUT /v1/apps/:appId/integrations/:provider': Endpoint<ConnectIntegrationRequest, {
|
|
2309
|
+
integration: IntegrationSummary;
|
|
2310
|
+
test: IntegrationTestResult;
|
|
2311
|
+
}>;
|
|
2312
|
+
readonly 'PATCH /v1/apps/:appId/integrations/:provider': Endpoint<UpdateIntegrationRequest, IntegrationSummary>;
|
|
2313
|
+
readonly 'POST /v1/apps/:appId/integrations/:provider/test': Endpoint<Record<string, never>, IntegrationTestResult>;
|
|
2314
|
+
readonly 'POST /v1/apps/:appId/integrations/:provider/pause': Endpoint<Record<string, never>, IntegrationSummary>;
|
|
2315
|
+
readonly 'POST /v1/apps/:appId/integrations/:provider/resume': Endpoint<Record<string, never>, IntegrationSummary>;
|
|
2316
|
+
readonly 'DELETE /v1/apps/:appId/integrations/:provider': Endpoint<void, {
|
|
2317
|
+
disconnected: true;
|
|
2318
|
+
}>;
|
|
2319
|
+
readonly 'GET /v1/apps/:appId/integrations/:provider/deliveries': Endpoint<{
|
|
2320
|
+
cursor?: string;
|
|
2321
|
+
limit?: number;
|
|
2322
|
+
}, IntegrationDeliveriesResponse>;
|
|
2323
|
+
readonly 'GET /v1/apps/:appId/brand-settings': Endpoint<void, AppBrandSettings>;
|
|
2324
|
+
readonly 'POST /v1/apps/:appId/brand-themes': Endpoint<CreateBrandThemeRequest, BrandTheme>;
|
|
2325
|
+
readonly 'PATCH /v1/apps/:appId/brand-themes/:themeId': Endpoint<UpdateBrandThemeRequest, BrandTheme>;
|
|
2326
|
+
readonly 'DELETE /v1/apps/:appId/brand-themes/:themeId': Endpoint<void, {
|
|
2327
|
+
ok: true;
|
|
2328
|
+
}>;
|
|
2329
|
+
readonly 'PUT /v1/apps/:appId/brand-theme-defaults': Endpoint<UpdateBrandThemeDefaultsRequest, AppBrandSettings>;
|
|
2330
|
+
readonly 'GET /v1/apps/:appId/write-keys': Endpoint<void, ReadonlyArray<WriteKey>>;
|
|
2331
|
+
readonly 'POST /v1/apps/:appId/write-keys': Endpoint<CreateWriteKeyRequest, CreatedWriteKey>;
|
|
2332
|
+
readonly 'POST /v1/apps/:appId/write-keys/:keyId/rotate': Endpoint<RotateWriteKeyRequest, RotateWriteKeyResponse>;
|
|
2333
|
+
readonly 'DELETE /v1/apps/:appId/write-keys/:keyId': Endpoint<void, {
|
|
2334
|
+
ok: true;
|
|
2335
|
+
}>;
|
|
2336
|
+
readonly 'GET /v1/apps/:appId/event-definitions': Endpoint<void, ReadonlyArray<EventDefinition>>;
|
|
2337
|
+
readonly 'POST /v1/apps/:appId/event-definitions': Endpoint<RegisterEventDefinitionRequest, EventDefinition>;
|
|
2338
|
+
readonly 'PATCH /v1/apps/:appId/event-definitions/:defId': Endpoint<UpdateEventDefinitionRequest, EventDefinition>;
|
|
2339
|
+
readonly 'GET /v1/apps/:appId/segments': Endpoint<void, ReadonlyArray<Segment>>;
|
|
2340
|
+
readonly 'POST /v1/apps/:appId/segments': Endpoint<CreateSegmentRequest, Segment>;
|
|
2341
|
+
readonly 'GET /v1/apps/:appId/segments/:segId': Endpoint<void, Segment>;
|
|
2342
|
+
readonly 'PATCH /v1/apps/:appId/segments/:segId': Endpoint<Partial<CreateSegmentRequest>, Segment>;
|
|
2343
|
+
readonly 'DELETE /v1/apps/:appId/segments/:segId': Endpoint<void, {
|
|
2344
|
+
ok: true;
|
|
2345
|
+
}>;
|
|
2346
|
+
readonly 'POST /v1/apps/:appId/segments/:segId/preview': Endpoint<void, SegmentPreview>;
|
|
2347
|
+
readonly 'POST /v1/apps/:appId/segments/:segId/rebuild': Endpoint<void, {
|
|
2348
|
+
scheduled: true;
|
|
2349
|
+
}>;
|
|
2350
|
+
readonly 'GET /v1/apps/:appId/users': Endpoint<ListUsersQuery, PaginatedAppUsers>;
|
|
2351
|
+
readonly 'GET /v1/apps/:appId/users/:anonymousId': Endpoint<void, AppUserDetail>;
|
|
2352
|
+
readonly 'GET /v1/apps/:appId/users/:anonymousId/events': Endpoint<ListUserEventsQuery, PaginatedAppUserEvents>;
|
|
2353
|
+
readonly 'GET /v1/apps/:appId/users/:anonymousId/push': Endpoint<void, {
|
|
2354
|
+
consent: {
|
|
2355
|
+
push: boolean;
|
|
2356
|
+
feedback: boolean;
|
|
2357
|
+
analytics: boolean;
|
|
2358
|
+
recordedAt: string | null;
|
|
2359
|
+
};
|
|
2360
|
+
devices: ReadonlyArray<{
|
|
2361
|
+
id: string;
|
|
2362
|
+
platform: "ios" | "android";
|
|
2363
|
+
environment: "production" | "sandbox";
|
|
2364
|
+
language: string | null;
|
|
2365
|
+
timezone: string | null;
|
|
2366
|
+
appVersion: string | null;
|
|
2367
|
+
sdkVersion: string | null;
|
|
2368
|
+
optIn: boolean;
|
|
2369
|
+
lastSeenAt: string;
|
|
2370
|
+
invalidatedAt: string | null;
|
|
2371
|
+
createdAt: string;
|
|
2372
|
+
}>;
|
|
2373
|
+
}>;
|
|
2374
|
+
readonly 'POST /v1/apps/:appId/users/:anonymousId/push/test-send': Endpoint<{
|
|
2375
|
+
title: string;
|
|
2376
|
+
body: string;
|
|
2377
|
+
imageUrl?: string;
|
|
2378
|
+
deepLink?: string;
|
|
2379
|
+
}, {
|
|
2380
|
+
dispatched: number;
|
|
2381
|
+
held: number;
|
|
2382
|
+
dropped: number;
|
|
2383
|
+
errors: ReadonlyArray<{
|
|
2384
|
+
reason: string;
|
|
2385
|
+
}>;
|
|
2386
|
+
}>;
|
|
2387
|
+
readonly 'POST /v1/apps/:appId/segments/ai-generate-rules': Endpoint<GenerateSegmentRulesRequest, GenerateSegmentRulesResponse>;
|
|
2388
|
+
readonly 'POST /v1/apps/:appId/segments/ai-generate-name': Endpoint<GenerateSegmentNameRequest, GenerateSegmentNameResponse>;
|
|
2389
|
+
readonly 'GET /v1/apps/:appId/prompts': Endpoint<void, ReadonlyArray<Prompt>>;
|
|
2390
|
+
readonly 'POST /v1/apps/:appId/prompts': Endpoint<CreatePromptRequest, Prompt>;
|
|
2391
|
+
readonly 'GET /v1/apps/:appId/prompts/:promptId': Endpoint<void, Prompt>;
|
|
2392
|
+
readonly 'PATCH /v1/apps/:appId/prompts/:promptId': Endpoint<UpdatePromptRequest, Prompt>;
|
|
2393
|
+
readonly 'DELETE /v1/apps/:appId/prompts/:promptId': Endpoint<void, {
|
|
2394
|
+
ok: true;
|
|
2395
|
+
}>;
|
|
2396
|
+
readonly 'POST /v1/apps/:appId/prompts/:promptId/test-on-device': Endpoint<TestPromptOnDeviceRequest, {
|
|
2397
|
+
dispatched: true;
|
|
2398
|
+
}>;
|
|
2399
|
+
readonly 'GET /v1/apps/:appId/prompts/:promptId/responses': Endpoint<ListResponsesQuery, ReadonlyArray<PromptResponse>>;
|
|
2400
|
+
readonly 'GET /v1/apps/:appId/prompts/:promptId/recipients': Endpoint<{
|
|
2401
|
+
from?: string;
|
|
2402
|
+
to?: string;
|
|
2403
|
+
}, RecipientList<FeedbackRecipient>>;
|
|
2404
|
+
readonly 'GET /v1/apps/:appId/prompts/:promptId/analytics': Endpoint<{
|
|
2405
|
+
from?: string;
|
|
2406
|
+
to?: string;
|
|
2407
|
+
}, PromptAnalytics>;
|
|
2408
|
+
readonly 'GET /v1/apps/:appId/analytics/overview': Endpoint<{
|
|
2409
|
+
range?: "24h" | "7d" | "30d";
|
|
2410
|
+
}, {
|
|
2411
|
+
readonly range: "24h" | "7d" | "30d";
|
|
2412
|
+
readonly bucket: "hour" | "day";
|
|
2413
|
+
readonly buckets: ReadonlyArray<{
|
|
2414
|
+
readonly bucket: string;
|
|
2415
|
+
readonly push: {
|
|
2416
|
+
sent: number;
|
|
2417
|
+
opened: number;
|
|
2418
|
+
clicked: number;
|
|
2419
|
+
};
|
|
2420
|
+
readonly inapp: {
|
|
2421
|
+
impressions: number;
|
|
2422
|
+
dismissed: number;
|
|
2423
|
+
ctaClicked: number;
|
|
2424
|
+
};
|
|
2425
|
+
readonly prompts: {
|
|
2426
|
+
shown: number;
|
|
2427
|
+
responded: number;
|
|
2428
|
+
dismissed: number;
|
|
2429
|
+
};
|
|
2430
|
+
readonly surveys: {
|
|
2431
|
+
started: number;
|
|
2432
|
+
completed: number;
|
|
2433
|
+
};
|
|
2434
|
+
}>;
|
|
2435
|
+
readonly totals: {
|
|
2436
|
+
readonly push: {
|
|
2437
|
+
sent: number;
|
|
2438
|
+
opened: number;
|
|
2439
|
+
clicked: number;
|
|
2440
|
+
};
|
|
2441
|
+
readonly inapp: {
|
|
2442
|
+
impressions: number;
|
|
2443
|
+
dismissed: number;
|
|
2444
|
+
ctaClicked: number;
|
|
2445
|
+
};
|
|
2446
|
+
readonly prompts: {
|
|
2447
|
+
shown: number;
|
|
2448
|
+
responded: number;
|
|
2449
|
+
dismissed: number;
|
|
2450
|
+
};
|
|
2451
|
+
readonly surveys: {
|
|
2452
|
+
started: number;
|
|
2453
|
+
completed: number;
|
|
2454
|
+
};
|
|
2455
|
+
};
|
|
2456
|
+
}>;
|
|
2457
|
+
readonly 'POST /v1/apps/:appId/audience/preview': Endpoint<AudienceSpec, {
|
|
2458
|
+
matching: number;
|
|
2459
|
+
sampleUsers: ReadonlyArray<AppUserSummary>;
|
|
2460
|
+
}>;
|
|
2461
|
+
readonly 'POST /v1/sdk/ingest': Endpoint<SdkIngestRequest, SdkIngestResponse>;
|
|
2462
|
+
readonly 'GET /v1/sdk/armed-triggers': Endpoint<{
|
|
2463
|
+
anonymousId: string;
|
|
2464
|
+
externalId?: string;
|
|
2465
|
+
}, SdkArmedTriggersResponse>;
|
|
2466
|
+
readonly 'POST /v1/sdk/consent': Endpoint<SdkConsentPayload, {
|
|
2467
|
+
ok: true;
|
|
2468
|
+
}>;
|
|
2469
|
+
readonly 'POST /v1/sdk/identify': Endpoint<SdkIdentifyPayload, {
|
|
2470
|
+
ok: true;
|
|
2471
|
+
}>;
|
|
2472
|
+
readonly 'POST /v1/sdk/responses': Endpoint<SubmitResponsePayload, {
|
|
2473
|
+
ok: true;
|
|
2474
|
+
}>;
|
|
2475
|
+
readonly 'POST /v1/apps/:appId/gdpr/delete': Endpoint<GdprDeleteRequest, {
|
|
2476
|
+
scheduled: true;
|
|
2477
|
+
}>;
|
|
2478
|
+
readonly 'POST /v1/apps/:appId/gdpr/export': Endpoint<GdprExportRequest, {
|
|
2479
|
+
scheduled: true;
|
|
2480
|
+
exportId: string;
|
|
2481
|
+
}>;
|
|
2482
|
+
readonly 'GET /v1/apps/:appId/gdpr/exports/:exportId': Endpoint<void, {
|
|
2483
|
+
status: "pending" | "running" | "completed" | "failed";
|
|
2484
|
+
downloadUrl?: string;
|
|
2485
|
+
}>;
|
|
2486
|
+
readonly 'GET /v1/apps/:appId/campaigns': Endpoint<void, ReadonlyArray<Campaign>>;
|
|
2487
|
+
readonly 'POST /v1/apps/:appId/campaigns': Endpoint<CreateCampaignRequest, CampaignWithVariants>;
|
|
2488
|
+
readonly 'GET /v1/apps/:appId/campaigns/:cid': Endpoint<void, CampaignWithVariants>;
|
|
2489
|
+
readonly 'PATCH /v1/apps/:appId/campaigns/:cid': Endpoint<UpdateCampaignRequest, CampaignWithVariants>;
|
|
2490
|
+
readonly 'DELETE /v1/apps/:appId/campaigns/:cid': Endpoint<void, {
|
|
2491
|
+
ok: true;
|
|
2492
|
+
}>;
|
|
2493
|
+
readonly 'POST /v1/apps/:appId/campaigns/:cid/activate': Endpoint<void, Campaign>;
|
|
2494
|
+
readonly 'POST /v1/apps/:appId/campaigns/:cid/pause': Endpoint<void, Campaign>;
|
|
2495
|
+
readonly 'POST /v1/apps/:appId/campaigns/:cid/resend': Endpoint<void, {
|
|
2496
|
+
queued: number;
|
|
2497
|
+
}>;
|
|
2498
|
+
readonly 'POST /v1/apps/:appId/campaigns/:cid/preview': Endpoint<{
|
|
2499
|
+
anonymousId?: string;
|
|
2500
|
+
mergeTags?: Record<string, unknown>;
|
|
2501
|
+
}, ReadonlyArray<{
|
|
2502
|
+
variantId: string;
|
|
2503
|
+
language: string | null;
|
|
2504
|
+
title: string;
|
|
2505
|
+
body: string;
|
|
2506
|
+
}>>;
|
|
2507
|
+
readonly 'POST /v1/apps/:appId/campaigns/:cid/test-send': Endpoint<{
|
|
2508
|
+
anonymousId: string;
|
|
2509
|
+
}, {
|
|
2510
|
+
queued: true;
|
|
2511
|
+
}>;
|
|
2512
|
+
readonly 'GET /v1/apps/:appId/campaigns/:cid/analytics': Endpoint<{
|
|
2513
|
+
from?: string;
|
|
2514
|
+
to?: string;
|
|
2515
|
+
}, CampaignAnalytics>;
|
|
2516
|
+
readonly 'GET /v1/apps/:appId/campaigns/:cid/deliveries': Endpoint<{
|
|
2517
|
+
limit?: number;
|
|
2518
|
+
}, ReadonlyArray<{
|
|
2519
|
+
delivery_id: string;
|
|
2520
|
+
variant_id: string;
|
|
2521
|
+
language: string | null;
|
|
2522
|
+
anonymous_id: string;
|
|
2523
|
+
external_id: string | null;
|
|
2524
|
+
platform: string;
|
|
2525
|
+
sent_at: string;
|
|
2526
|
+
delivered_at: string | null;
|
|
2527
|
+
displayed_at: string | null;
|
|
2528
|
+
opened_at: string | null;
|
|
2529
|
+
dismissed_at: string | null;
|
|
2530
|
+
clicked_at: string | null;
|
|
2531
|
+
error_code: string | null;
|
|
2532
|
+
bounce_class: string;
|
|
2533
|
+
provider_latency_ms: number;
|
|
2534
|
+
}>>;
|
|
2535
|
+
readonly 'GET /v1/apps/:appId/push/credentials': Endpoint<void, ReadonlyArray<PushCredentialSummary>>;
|
|
2536
|
+
readonly 'POST /v1/apps/:appId/push/credentials': Endpoint<UploadCredentialRequest, PushCredentialSummary>;
|
|
2537
|
+
readonly 'DELETE /v1/apps/:appId/push/credentials/:credId': Endpoint<void, {
|
|
2538
|
+
ok: true;
|
|
2539
|
+
}>;
|
|
2540
|
+
readonly 'GET /v1/apps/:appId/push/stats': Endpoint<void, {
|
|
2541
|
+
credentials: {
|
|
2542
|
+
ios: boolean;
|
|
2543
|
+
android: boolean;
|
|
2544
|
+
};
|
|
2545
|
+
deviceTokens: {
|
|
2546
|
+
total: number;
|
|
2547
|
+
ios: number;
|
|
2548
|
+
android: number;
|
|
2549
|
+
};
|
|
2550
|
+
campaignCount: number;
|
|
2551
|
+
}>;
|
|
2552
|
+
readonly 'GET /v1/apps/:appId/push/audience-estimate': Endpoint<{
|
|
2553
|
+
segmentId?: string;
|
|
2554
|
+
}, {
|
|
2555
|
+
audienceSize: number;
|
|
2556
|
+
withPush: number;
|
|
2557
|
+
iosCount: number;
|
|
2558
|
+
androidCount: number;
|
|
2559
|
+
}>;
|
|
2560
|
+
readonly 'GET /v1/apps/:appId/push/reachability': Endpoint<void, {
|
|
2561
|
+
optedIn: number;
|
|
2562
|
+
reachable: number;
|
|
2563
|
+
unreachable: number;
|
|
2564
|
+
bouncedToday: number;
|
|
2565
|
+
pingedToday: number;
|
|
2566
|
+
}>;
|
|
2567
|
+
readonly 'GET /v1/apps/:appId/push/channels': Endpoint<void, {
|
|
2568
|
+
channels: ReadonlyArray<{
|
|
2569
|
+
readonly app_id: string;
|
|
2570
|
+
readonly channel_id: string;
|
|
2571
|
+
readonly display_name: string;
|
|
2572
|
+
readonly description: string | null;
|
|
2573
|
+
readonly importance: number;
|
|
2574
|
+
readonly default_sound: string | null;
|
|
2575
|
+
readonly default_vibrate: boolean;
|
|
2576
|
+
readonly default_badge: boolean;
|
|
2577
|
+
readonly category: string;
|
|
2578
|
+
}>;
|
|
2579
|
+
}>;
|
|
2580
|
+
readonly 'PUT /v1/apps/:appId/push/channels': Endpoint<{
|
|
2581
|
+
channelId: string;
|
|
2582
|
+
displayName: string;
|
|
2583
|
+
description?: string | null;
|
|
2584
|
+
importance?: number;
|
|
2585
|
+
defaultSound?: string | null;
|
|
2586
|
+
defaultVibrate?: boolean;
|
|
2587
|
+
defaultBadge?: boolean;
|
|
2588
|
+
category?: "transactional" | "marketing" | "silent" | "digest" | "alert";
|
|
2589
|
+
}, {
|
|
2590
|
+
saved: true;
|
|
2591
|
+
}>;
|
|
2592
|
+
readonly 'DELETE /v1/apps/:appId/push/channels/:channelId': Endpoint<void, {
|
|
2593
|
+
archived: true;
|
|
2594
|
+
}>;
|
|
2595
|
+
readonly 'GET /v1/apps/:appId/push/webhooks': Endpoint<void, {
|
|
2596
|
+
webhooks: ReadonlyArray<{
|
|
2597
|
+
id: string;
|
|
2598
|
+
url: string;
|
|
2599
|
+
event_types: ReadonlyArray<string>;
|
|
2600
|
+
active: boolean;
|
|
2601
|
+
description: string | null;
|
|
2602
|
+
last_success_at: string | null;
|
|
2603
|
+
last_failure_at: string | null;
|
|
2604
|
+
last_failure_reason: string | null;
|
|
2605
|
+
created_at: string;
|
|
2606
|
+
updated_at: string;
|
|
2607
|
+
}>;
|
|
2608
|
+
}>;
|
|
2609
|
+
readonly 'POST /v1/apps/:appId/push/webhooks': Endpoint<{
|
|
2610
|
+
url: string;
|
|
2611
|
+
eventTypes: ReadonlyArray<string>;
|
|
2612
|
+
active?: boolean;
|
|
2613
|
+
description?: string | null;
|
|
2614
|
+
}, {
|
|
2615
|
+
id: string;
|
|
2616
|
+
secret: string;
|
|
2617
|
+
}>;
|
|
2618
|
+
readonly 'PATCH /v1/apps/:appId/push/webhooks/:webhookId': Endpoint<Partial<{
|
|
2619
|
+
url: string;
|
|
2620
|
+
eventTypes: ReadonlyArray<string>;
|
|
2621
|
+
active: boolean;
|
|
2622
|
+
description: string | null;
|
|
2623
|
+
}>, {
|
|
2624
|
+
saved: true;
|
|
2625
|
+
}>;
|
|
2626
|
+
readonly 'DELETE /v1/apps/:appId/push/webhooks/:webhookId': Endpoint<void, {
|
|
2627
|
+
deleted: true;
|
|
2628
|
+
}>;
|
|
2629
|
+
readonly 'POST /v1/apps/:appId/push/webhooks/:webhookId/rotate': Endpoint<void, {
|
|
2630
|
+
secret: string;
|
|
2631
|
+
}>;
|
|
2632
|
+
readonly 'POST /v1/apps/:appId/push/webhooks/:webhookId/test': Endpoint<void, {
|
|
2633
|
+
success: boolean;
|
|
2634
|
+
statusCode: number;
|
|
2635
|
+
attempts: number;
|
|
2636
|
+
error?: string;
|
|
2637
|
+
}>;
|
|
2638
|
+
readonly 'POST /v1/sdk/push/register-token': Endpoint<RegisterDeviceTokenPayload, {
|
|
2639
|
+
registered: true;
|
|
2640
|
+
} | {
|
|
2641
|
+
skipped: "consent";
|
|
2642
|
+
}>;
|
|
2643
|
+
readonly 'POST /v1/sdk/push/update-token': Endpoint<UpdateDeviceTokenPayload, {
|
|
2644
|
+
updated: true;
|
|
2645
|
+
}>;
|
|
2646
|
+
readonly 'POST /v1/sdk/push/invalidate-token': Endpoint<InvalidateDeviceTokenPayload, {
|
|
2647
|
+
invalidated: true;
|
|
2648
|
+
}>;
|
|
2649
|
+
readonly 'POST /v1/sdk/push/rebind': Endpoint<{
|
|
2650
|
+
anonymousId: string;
|
|
2651
|
+
externalId: string;
|
|
2652
|
+
token: string;
|
|
2653
|
+
}, {
|
|
2654
|
+
rebound: boolean;
|
|
2655
|
+
}>;
|
|
2656
|
+
readonly 'POST /v1/sdk/push/app-open': Endpoint<{
|
|
2657
|
+
anonymousId: string;
|
|
2658
|
+
occurredAt?: string;
|
|
2659
|
+
}, {
|
|
2660
|
+
recorded: true;
|
|
2661
|
+
}>;
|
|
2662
|
+
readonly 'POST /v1/sdk/push/delivered': Endpoint<{
|
|
2663
|
+
deliveryId: string;
|
|
2664
|
+
occurredAt?: string;
|
|
2665
|
+
attemptId?: string;
|
|
2666
|
+
actionButton?: string;
|
|
2667
|
+
}, {
|
|
2668
|
+
recorded: true;
|
|
2669
|
+
}>;
|
|
2670
|
+
readonly 'POST /v1/sdk/push/displayed': Endpoint<{
|
|
2671
|
+
deliveryId: string;
|
|
2672
|
+
occurredAt?: string;
|
|
2673
|
+
attemptId?: string;
|
|
2674
|
+
actionButton?: string;
|
|
2675
|
+
}, {
|
|
2676
|
+
recorded: true;
|
|
2677
|
+
}>;
|
|
2678
|
+
readonly 'POST /v1/sdk/push/dismissed': Endpoint<{
|
|
2679
|
+
deliveryId: string;
|
|
2680
|
+
occurredAt?: string;
|
|
2681
|
+
attemptId?: string;
|
|
2682
|
+
actionButton?: string;
|
|
2683
|
+
}, {
|
|
2684
|
+
recorded: true;
|
|
2685
|
+
}>;
|
|
2686
|
+
readonly 'POST /v1/sdk/push/silent-ack': Endpoint<{
|
|
2687
|
+
pingId: string;
|
|
2688
|
+
anonymousId: string;
|
|
2689
|
+
receivedAt?: string;
|
|
2690
|
+
}, {
|
|
2691
|
+
recorded: true;
|
|
2692
|
+
pingId: string;
|
|
2693
|
+
}>;
|
|
2694
|
+
readonly 'GET /v1/sdk/push/channels': Endpoint<void, {
|
|
2695
|
+
channels: ReadonlyArray<unknown>;
|
|
2696
|
+
}>;
|
|
2697
|
+
readonly 'POST /v1/sdk/push/channels/subscription': Endpoint<{
|
|
2698
|
+
anonymousId: string;
|
|
2699
|
+
channelId: string;
|
|
2700
|
+
subscribed: boolean;
|
|
2701
|
+
}, {
|
|
2702
|
+
saved: true;
|
|
2703
|
+
}>;
|
|
2704
|
+
readonly 'POST /v1/apps/:appId/push/transactional': Endpoint<PushTransactionalRequest, {
|
|
2705
|
+
queued: true;
|
|
2706
|
+
deliveryId: string;
|
|
2707
|
+
idempotent?: boolean;
|
|
2708
|
+
}>;
|
|
2709
|
+
readonly 'GET /v1/apps/:appId/surveys': Endpoint<void, ReadonlyArray<SurveyCampaign>>;
|
|
2710
|
+
readonly 'POST /v1/apps/:appId/surveys': Endpoint<CreateSurveyRequest, SurveyCampaignWithFlow>;
|
|
2711
|
+
readonly 'GET /v1/apps/:appId/surveys/:sid': Endpoint<void, SurveyCampaignWithFlow>;
|
|
2712
|
+
readonly 'PATCH /v1/apps/:appId/surveys/:sid': Endpoint<UpdateSurveyRequest, SurveyCampaignWithFlow>;
|
|
2713
|
+
readonly 'DELETE /v1/apps/:appId/surveys/:sid': Endpoint<void, {
|
|
2714
|
+
ok: true;
|
|
2715
|
+
}>;
|
|
2716
|
+
readonly 'POST /v1/apps/:appId/surveys/:sid/activate': Endpoint<void, SurveyCampaign>;
|
|
2717
|
+
readonly 'POST /v1/apps/:appId/surveys/:sid/pause': Endpoint<void, SurveyCampaign>;
|
|
2718
|
+
readonly 'POST /v1/apps/:appId/surveys/:sid/archive': Endpoint<void, SurveyCampaign>;
|
|
2719
|
+
readonly 'POST /v1/apps/:appId/surveys/:sid/preview': Endpoint<{
|
|
2720
|
+
anonymousId?: string;
|
|
2721
|
+
mergeTags?: Record<string, unknown>;
|
|
2722
|
+
language?: string;
|
|
2723
|
+
}, SurveyCampaignWithFlow>;
|
|
2724
|
+
readonly 'POST /v1/apps/:appId/surveys/:sid/test-on-device': Endpoint<{
|
|
2725
|
+
anonymousId: string;
|
|
2726
|
+
}, {
|
|
2727
|
+
dispatched: true;
|
|
2728
|
+
}>;
|
|
2729
|
+
readonly 'GET /v1/apps/:appId/surveys/:sid/analytics': Endpoint<{
|
|
2730
|
+
from?: string;
|
|
2731
|
+
to?: string;
|
|
2732
|
+
}, SurveyAnalytics>;
|
|
2733
|
+
readonly 'GET /v1/apps/:appId/surveys/:sid/responses': Endpoint<{
|
|
2734
|
+
from?: string;
|
|
2735
|
+
to?: string;
|
|
2736
|
+
page?: number;
|
|
2737
|
+
limit?: number;
|
|
2738
|
+
segmentId?: string;
|
|
2739
|
+
language?: string;
|
|
2740
|
+
}, ReadonlyArray<SurveyResponseRecord>>;
|
|
2741
|
+
readonly 'GET /v1/apps/:appId/surveys/:sid/recipients': Endpoint<{
|
|
2742
|
+
from?: string;
|
|
2743
|
+
to?: string;
|
|
2744
|
+
}, RecipientList<SurveyRecipient>>;
|
|
2745
|
+
readonly 'GET /v1/apps/:appId/surveys/:sid/attempts': Endpoint<void, ReadonlyArray<{
|
|
2746
|
+
id: string;
|
|
2747
|
+
campaignId: string;
|
|
2748
|
+
anonymousId: string;
|
|
2749
|
+
externalId: string | null;
|
|
2750
|
+
startedAt: string;
|
|
2751
|
+
completedAt: string | null;
|
|
2752
|
+
abandonedAt: string | null;
|
|
2753
|
+
currentQuestionId: string | null;
|
|
2754
|
+
progressSnapshot: unknown;
|
|
2755
|
+
source: string;
|
|
2756
|
+
language: string | null;
|
|
2757
|
+
}>>;
|
|
2758
|
+
readonly 'GET /v1/apps/:appId/surveys/:sid/share-link': Endpoint<void, SurveyShareLinkResponse>;
|
|
2759
|
+
readonly 'GET /v1/apps/:appId/survey-templates': Endpoint<void, ReadonlyArray<SurveyTemplate>>;
|
|
2760
|
+
readonly 'POST /v1/apps/:appId/surveys/from-template/:slug': Endpoint<CloneSurveyFromTemplateRequest, SurveyCampaignWithFlow>;
|
|
2761
|
+
readonly 'GET /v1/sdk/surveys/available': Endpoint<{
|
|
2762
|
+
anonymousId: string;
|
|
2763
|
+
externalId?: string;
|
|
2764
|
+
}, {
|
|
2765
|
+
surveys: ReadonlyArray<SurveySummary>;
|
|
2766
|
+
}>;
|
|
2767
|
+
readonly 'POST /v1/sdk/surveys/resolve-link': Endpoint<ResolveSurveyLinkRequest, ResolveSurveyLinkResponse>;
|
|
2768
|
+
readonly 'GET /v1/sdk/surveys/:sid': Endpoint<{
|
|
2769
|
+
anonymousId: string;
|
|
2770
|
+
externalId?: string;
|
|
2771
|
+
language?: string;
|
|
2772
|
+
}, SurveyCampaignWithFlow>;
|
|
2773
|
+
readonly 'POST /v1/sdk/surveys/:sid/attempts': Endpoint<CreateSurveyAttemptRequest, CreateSurveyAttemptResponse>;
|
|
2774
|
+
readonly 'PATCH /v1/sdk/surveys/attempts/:attemptId': Endpoint<UpdateSurveyAttemptProgressRequest, {
|
|
2775
|
+
ok: true;
|
|
2776
|
+
}>;
|
|
2777
|
+
readonly 'POST /v1/sdk/surveys/attempts/:attemptId/responses': Endpoint<SubmitSurveyAnswersRequest, {
|
|
2778
|
+
ok: true;
|
|
2779
|
+
}>;
|
|
2780
|
+
readonly 'POST /v1/sdk/surveys/attempts/:attemptId/complete': Endpoint<CompleteSurveyAttemptRequest, {
|
|
2781
|
+
ok: true;
|
|
2782
|
+
}>;
|
|
2783
|
+
readonly 'POST /v1/sdk/surveys/attempts/:attemptId/abandon': Endpoint<void, {
|
|
2784
|
+
ok: true;
|
|
2785
|
+
}>;
|
|
2786
|
+
readonly 'GET /v1/apps/:appId/inapp-messages': Endpoint<void, ReadonlyArray<InAppMessage>>;
|
|
2787
|
+
readonly 'POST /v1/apps/:appId/inapp-messages': Endpoint<CreateInAppMessageRequest, InAppMessage>;
|
|
2788
|
+
readonly 'GET /v1/apps/:appId/inapp-messages/:id': Endpoint<void, InAppMessage>;
|
|
2789
|
+
readonly 'PATCH /v1/apps/:appId/inapp-messages/:id': Endpoint<UpdateInAppMessageRequest, InAppMessage>;
|
|
2790
|
+
readonly 'DELETE /v1/apps/:appId/inapp-messages/:id': Endpoint<void, {
|
|
2791
|
+
ok: true;
|
|
2792
|
+
}>;
|
|
2793
|
+
readonly 'POST /v1/apps/:appId/inapp-messages/:id/activate': Endpoint<void, InAppMessage>;
|
|
2794
|
+
readonly 'POST /v1/apps/:appId/inapp-messages/:id/pause': Endpoint<void, InAppMessage>;
|
|
2795
|
+
readonly 'GET /v1/apps/:appId/inapp-messages/:id/analytics': Endpoint<{
|
|
2796
|
+
from?: string;
|
|
2797
|
+
to?: string;
|
|
2798
|
+
}, InAppMessageAnalytics>;
|
|
2799
|
+
readonly 'GET /v1/apps/:appId/inapp-messages/:id/recipients': Endpoint<{
|
|
2800
|
+
from?: string;
|
|
2801
|
+
to?: string;
|
|
2802
|
+
}, RecipientList<InAppRecipient>>;
|
|
2803
|
+
readonly 'GET /v1/sdk/armed-inapp-messages': Endpoint<{
|
|
2804
|
+
anonymousId: string;
|
|
2805
|
+
externalId?: string;
|
|
2806
|
+
}, SdkArmedInAppMessagesResponse>;
|
|
2807
|
+
readonly 'GET /v1/apps/:appId/requests': Endpoint<ListRequestsQuery, ReadonlyArray<RequestSummary>>;
|
|
2808
|
+
readonly 'GET /v1/apps/:appId/requests/:requestId': Endpoint<void, RequestDetail>;
|
|
2809
|
+
readonly 'PATCH /v1/apps/:appId/requests/:requestId/status': Endpoint<UpdateRequestStatusRequest, RequestDetail>;
|
|
2810
|
+
readonly 'PUT /v1/apps/:appId/requests/:requestId/response': Endpoint<UpdateRequestResponseRequest, RequestDetail>;
|
|
2811
|
+
readonly 'PATCH /v1/apps/:appId/requests/:requestId/moderation': Endpoint<UpdateRequestModerationRequest, RequestDetail>;
|
|
2812
|
+
readonly 'POST /v1/apps/:appId/requests/merge': Endpoint<MergeRequestsRequest, {
|
|
2813
|
+
canonicalId: string;
|
|
2814
|
+
mergedCount: number;
|
|
2815
|
+
}>;
|
|
2816
|
+
readonly 'POST /v1/apps/:appId/requests/bulk/status': Endpoint<BulkUpdateStatusRequest, {
|
|
2817
|
+
updated: number;
|
|
2818
|
+
}>;
|
|
2819
|
+
readonly 'GET /v1/apps/:appId/requests/:requestId/upvoter-segments': Endpoint<void, RequestUpvoterSegmentBreakdown>;
|
|
2820
|
+
readonly 'GET /v1/apps/:appId/requests/:requestId/timeline': Endpoint<void, ReadonlyArray<RequestTimelineEntry>>;
|
|
2821
|
+
readonly 'GET /v1/apps/:appId/requests/:requestId/analytics': Endpoint<{
|
|
2822
|
+
from?: string;
|
|
2823
|
+
to?: string;
|
|
2824
|
+
}, RequestAnalytics>;
|
|
2825
|
+
readonly 'GET /v1/apps/:appId/requests/:requestId/audience-spec': Endpoint<void, {
|
|
2826
|
+
audience: AudienceSpec;
|
|
2827
|
+
}>;
|
|
2828
|
+
readonly 'GET /v1/apps/:appId/request-settings': Endpoint<void, RequestSettings>;
|
|
2829
|
+
readonly 'PUT /v1/apps/:appId/request-settings': Endpoint<UpdateRequestSettingsRequest, RequestSettings>;
|
|
2830
|
+
readonly 'GET /v1/apps/:appId/request-settings/slug-available': Endpoint<{
|
|
2831
|
+
slug: string;
|
|
2832
|
+
}, {
|
|
2833
|
+
available: boolean;
|
|
2834
|
+
}>;
|
|
2835
|
+
readonly 'POST /v1/apps/:appId/requests/seed-segments': Endpoint<void, {
|
|
2836
|
+
created: number;
|
|
2837
|
+
}>;
|
|
2838
|
+
readonly 'GET /v1/sdk/requests': Endpoint<GetRequestsOptions & {
|
|
2839
|
+
anonymousId: string;
|
|
2840
|
+
externalId?: string;
|
|
2841
|
+
}, GetRequestsResult>;
|
|
2842
|
+
readonly 'GET /v1/sdk/request-branding': Endpoint<void, {
|
|
2843
|
+
readonly entryLabel: string;
|
|
2844
|
+
readonly accentColor: string | null;
|
|
2845
|
+
readonly logoUrl: string | null;
|
|
2846
|
+
readonly introCopy: string | null;
|
|
2847
|
+
}>;
|
|
2848
|
+
readonly 'GET /v1/sdk/requests/search': Endpoint<{
|
|
2849
|
+
q: string;
|
|
2850
|
+
anonymousId: string;
|
|
2851
|
+
externalId?: string;
|
|
2852
|
+
limit?: number;
|
|
2853
|
+
}, {
|
|
2854
|
+
results: ReadonlyArray<RequestSearchResult>;
|
|
2855
|
+
}>;
|
|
2856
|
+
readonly 'GET /v1/sdk/requests/:requestId': Endpoint<{
|
|
2857
|
+
anonymousId: string;
|
|
2858
|
+
externalId?: string;
|
|
2859
|
+
}, Request>;
|
|
2860
|
+
readonly 'POST /v1/sdk/requests': Endpoint<SubmitRequestPayload, Request>;
|
|
2861
|
+
readonly 'POST /v1/sdk/requests/:requestId/vote': Endpoint<{
|
|
2862
|
+
anonymousId: string;
|
|
2863
|
+
externalId?: string | null;
|
|
2864
|
+
vote: boolean;
|
|
2865
|
+
}, RequestVote>;
|
|
2866
|
+
readonly 'POST /v1/sdk/requests/:requestId/follow': Endpoint<{
|
|
2867
|
+
anonymousId: string;
|
|
2868
|
+
externalId?: string | null;
|
|
2869
|
+
follow: boolean;
|
|
2870
|
+
}, RequestFollow>;
|
|
2871
|
+
readonly 'GET /v1/apps/:appId/requests/:requestId/comments': Endpoint<void, {
|
|
2872
|
+
items: ReadonlyArray<RequestComment>;
|
|
2873
|
+
}>;
|
|
2874
|
+
readonly 'DELETE /v1/apps/:appId/requests/:requestId/comments/:commentId': Endpoint<void, {
|
|
2875
|
+
ok: true;
|
|
2876
|
+
}>;
|
|
2877
|
+
readonly 'GET /v1/sdk/requests/:requestId/comments': Endpoint<{
|
|
2878
|
+
anonymousId: string;
|
|
2879
|
+
externalId?: string | null;
|
|
2880
|
+
}, {
|
|
2881
|
+
items: ReadonlyArray<RequestComment>;
|
|
2882
|
+
}>;
|
|
2883
|
+
readonly 'POST /v1/sdk/requests/:requestId/comments': Endpoint<PostCommentPayload, RequestComment>;
|
|
2884
|
+
readonly 'PATCH /v1/sdk/requests/:requestId/comments/:commentId': Endpoint<EditCommentPayload, RequestComment>;
|
|
2885
|
+
readonly 'DELETE /v1/sdk/requests/:requestId/comments/:commentId': Endpoint<{
|
|
2886
|
+
anonymousId: string;
|
|
2887
|
+
}, {
|
|
2888
|
+
ok: true;
|
|
2889
|
+
}>;
|
|
2890
|
+
readonly 'GET /v1/workspaces/:wid/billing/plans': Endpoint<void, {
|
|
2891
|
+
plans: ReadonlyArray<BillingPlan>;
|
|
2892
|
+
foundingOffer: BillingOfferAvailability;
|
|
2893
|
+
}>;
|
|
2894
|
+
readonly 'GET /v1/workspaces/:wid/billing/subscription': Endpoint<void, {
|
|
2895
|
+
subscription: Subscription | null;
|
|
2896
|
+
plan: BillingPlan | null;
|
|
2897
|
+
usage: BillingUsage;
|
|
2898
|
+
access: EffectivePlanAccess;
|
|
2899
|
+
trial: BillingTrial | null;
|
|
2900
|
+
}>;
|
|
2901
|
+
readonly 'POST /v1/workspaces/:wid/billing/checkout': Endpoint<BillingCheckoutRequest, BillingCheckoutResponse>;
|
|
2902
|
+
readonly 'POST /v1/workspaces/:wid/billing/portal': Endpoint<void, {
|
|
2903
|
+
url: string;
|
|
2904
|
+
}>;
|
|
2905
|
+
readonly 'POST /v1/workspaces/:wid/billing/change-plan': Endpoint<BillingChangePlanRequest, BillingChangePlanResponse>;
|
|
2906
|
+
readonly 'GET /v1/workspaces/:wid/billing/periods': Endpoint<void, {
|
|
2907
|
+
periods: ReadonlyArray<BillingPeriod>;
|
|
2908
|
+
}>;
|
|
2909
|
+
readonly 'GET /v1/admin/session': Endpoint<void, AdminSession>;
|
|
2910
|
+
readonly 'GET /v1/admin/customers': Endpoint<AdminCustomerListRequest, AdminCustomerListResponse>;
|
|
2911
|
+
readonly 'GET /v1/admin/customers/:workspaceId': Endpoint<void, AdminCustomerDetail>;
|
|
2912
|
+
readonly 'POST /v1/admin/customers/:workspaceId/billing-events/:eventId/replay': Endpoint<Record<string, never>, {
|
|
2913
|
+
replayed: true;
|
|
2914
|
+
}>;
|
|
2915
|
+
readonly 'POST /v1/admin/customers/:workspaceId/grants': Endpoint<CreateWorkspacePlanGrantRequest, {
|
|
2916
|
+
grant: WorkspacePlanGrant;
|
|
2917
|
+
}>;
|
|
2918
|
+
readonly 'POST /v1/admin/customers/:workspaceId/grants/:grantId/extend': Endpoint<ExtendWorkspacePlanGrantRequest, {
|
|
2919
|
+
grant: WorkspacePlanGrant;
|
|
2920
|
+
}>;
|
|
2921
|
+
readonly 'POST /v1/admin/customers/:workspaceId/grants/:grantId/revoke': Endpoint<RevokeWorkspacePlanGrantRequest, {
|
|
2922
|
+
grant: WorkspacePlanGrant;
|
|
2923
|
+
}>;
|
|
2924
|
+
readonly 'GET /v1/admin/activity': Endpoint<{
|
|
2925
|
+
workspaceId?: string;
|
|
2926
|
+
action?: string;
|
|
2927
|
+
cursor?: string;
|
|
2928
|
+
limit?: number;
|
|
2929
|
+
}, {
|
|
2930
|
+
entries: ReadonlyArray<AdminActivityEntry>;
|
|
2931
|
+
nextCursor: string | null;
|
|
2932
|
+
}>;
|
|
2933
|
+
readonly 'GET /v1/admin/workspaces': Endpoint<void, {
|
|
2934
|
+
workspaces: ReadonlyArray<AdminWorkspaceSummary>;
|
|
2935
|
+
}>;
|
|
2936
|
+
readonly 'GET /v1/admin/plans': Endpoint<{
|
|
2937
|
+
grantable?: boolean;
|
|
2938
|
+
}, {
|
|
2939
|
+
plans: ReadonlyArray<BillingPlan>;
|
|
2940
|
+
foundingOffer: BillingOfferAvailability;
|
|
2941
|
+
paddleEnvironment: "sandbox" | "production";
|
|
2942
|
+
configuration: {
|
|
2943
|
+
apiKeyConfigured: boolean;
|
|
2944
|
+
clientTokenConfigured: boolean;
|
|
2945
|
+
webhookSecretConfigured: boolean;
|
|
2946
|
+
enforcementMode: "observe" | "warn" | "enforce";
|
|
2947
|
+
overageMode: "observe" | "charge";
|
|
2948
|
+
};
|
|
2949
|
+
bindings: ReadonlyArray<{
|
|
2950
|
+
planId: string;
|
|
2951
|
+
baseReady: boolean;
|
|
2952
|
+
overageReady: boolean;
|
|
2953
|
+
}>;
|
|
2954
|
+
}>;
|
|
2955
|
+
readonly 'GET /v1/admin/workspaces/:wid': Endpoint<void, {
|
|
2956
|
+
workspace: {
|
|
2957
|
+
id: string;
|
|
2958
|
+
name: string;
|
|
2959
|
+
slug: string;
|
|
2960
|
+
};
|
|
2961
|
+
subscription: Subscription | null;
|
|
2962
|
+
plan: BillingPlan | null;
|
|
2963
|
+
mau: number;
|
|
2964
|
+
events: ReadonlyArray<{
|
|
2965
|
+
id: string;
|
|
2966
|
+
event_type: string;
|
|
2967
|
+
received_at: string;
|
|
2968
|
+
processed_at: string | null;
|
|
2969
|
+
processing_error: string | null;
|
|
2970
|
+
}>;
|
|
2971
|
+
}>;
|
|
2972
|
+
readonly 'POST /v1/admin/workspaces/:wid/plan': Endpoint<{
|
|
2973
|
+
planId: string;
|
|
2974
|
+
}, {
|
|
2975
|
+
subscription: Subscription;
|
|
2976
|
+
}>;
|
|
2977
|
+
readonly 'GET /v1/public/roadmap/:slug': Endpoint<{
|
|
2978
|
+
status?: RequestStatus | ReadonlyArray<RequestStatus>;
|
|
2979
|
+
sort?: "top" | "newest" | "recently_updated";
|
|
2980
|
+
page?: number;
|
|
2981
|
+
limit?: number;
|
|
2982
|
+
}, {
|
|
2983
|
+
items: ReadonlyArray<RequestPublicSummary>;
|
|
2984
|
+
total: number;
|
|
2985
|
+
}>;
|
|
2986
|
+
readonly 'GET /v1/public/roadmap/:slug/r/:requestId': Endpoint<void, RequestPublicDetail>;
|
|
2987
|
+
readonly 'GET /v1/public/roadmap/:slug/branding': Endpoint<void, RequestPublicBranding>;
|
|
2988
|
+
};
|
|
2989
|
+
type EndpointKey = keyof typeof endpoints;
|
|
2990
|
+
|
|
2991
|
+
export { type BillingCheckoutResponse as $, APP_OPEN_EVENT_NAME as A, type BillingPriceKind as B, type ApiTokenScope as C, type App as D, type AppBrandSettings as E, type AppOpenBeacon as F, type AppOpenTrigger as G, type AppUserDetail as H, type AppUserEvent as I, type AppUserSummary as J, type AppVersionChangedTrigger as K, type AppVersionCondition as L, type ArmedInAppMessage as M, type ArmedSurvey as N, type ArmedTrigger as O, type AudienceCombinator as P, type AudienceCondition as Q, type AudienceConditionKind as R, type AudienceJoinTrigger as S, type AudienceMode as T, type AudienceSpec as U, type BaseSurveyQuestion as V, type BillingAccessState as W, type BillingChangePlanRequest as X, type BillingChangePlanResponse as Y, type BillingChargeStatus as Z, type BillingCheckoutRequest as _, type BillingInterval as a, type EventPropertyValue as a$, type BillingOfferAvailability as a0, type BillingPeriod as a1, type BillingPlan as a2, type BillingTrial as a3, type BillingUsage as a4, type BrandPillar as a5, type BrandTheme as a6, type BrandThemeDefaults as a7, type BrandThemeRef as a8, type BrandThemeTokens as a9, type CreateInAppMessageRequest as aA, type CreatePromptRequest as aB, type CreateSegmentRequest as aC, type CreateSurveyAttemptRequest as aD, type CreateSurveyAttemptResponse as aE, type CreateSurveyRequest as aF, type CreateWorkspacePlanGrantRequest as aG, type CreateWorkspaceRequest as aH, type CreateWriteKeyRequest as aI, type CreatedApiToken as aJ, type CreatedApp as aK, type CreatedWriteKey as aL, type DeliveryBeacon as aM, type DeliveryBeaconKind as aN, type EditCommentPayload as aO, type EffectivePlanAccess as aP, type Endpoint as aQ, type EndpointKey as aR, type EventCountPredicate as aS, type EventCountRule as aT, type EventDefinition as aU, type EventOccurredPredicate as aV, type EventPerformedCondition as aW, type EventProperties as aX, type EventPropertyFilter as aY, type EventPropertySchema as aZ, type EventPropertyType as a_, type BulkUpdateStatusRequest as aa, CORE_INTEGRATION_EVENTS as ab, type Campaign as ac, type CampaignAnalytics as ad, type CampaignMode as ae, type CampaignStatus as af, type CampaignType as ag, type CampaignWithVariants as ah, type ChannelCategory as ai, type ClientPrompt as aj, type CloneSurveyFromTemplateRequest as ak, type Combinator as al, type ComparisonOp as am, type CompleteSurveyAttemptRequest as an, type ConnectIntegrationRequest as ao, type Consent as ap, type ConsentPurpose as aq, type CoreEventSubjectRole as ar, type CoreIntegrationEventDefinition as as, type CornerRadiusPreset as at, type CountOp as au, type CountryCondition as av, type CreateApiTokenRequest as aw, type CreateAppRequest as ax, type CreateBrandThemeRequest as ay, type CreateCampaignRequest as az, APP_VERSION_CHANGED_EVENT_NAME as b, type Platform as b$, type EventTrigger as b0, type ExtendWorkspacePlanGrantRequest as b1, type FeedbackRecipient as b2, type FrequencyCaps as b3, type GdprDeleteRequest as b4, type GdprExportRequest as b5, type GenerateSegmentNameRequest as b6, type GenerateSegmentNameResponse as b7, type GenerateSegmentRulesRequest as b8, type GenerateSegmentRulesResponse as b9, type IntegrationDeliverySummary as bA, type IntegrationProvider as bB, type IntegrationRegion as bC, type IntegrationStatus as bD, type IntegrationSummary as bE, type IntegrationTestResult as bF, type InvalidateDeviceTokenPayload as bG, type InviteMemberRequest as bH, type JsonAction as bI, type LastActiveCondition as bJ, type LikertQuestion as bK, type ListRequestsQuery as bL, type ListResponsesQuery as bM, type ListUserEventsQuery as bN, type ListUsersQuery as bO, type LongTextQuestion as bP, type MergeRequestsRequest as bQ, type MixpanelIntegrationRegion as bR, type MultiChoiceQuestion as bS, type MultipleChoiceQuestion as bT, type NpsQuestion as bU, PUSH_EVENTS as bV, type PaginatedAppUserEvents as bW, type PaginatedAppUsers as bX, type ParsedPushPayload as bY, type PeriodicFrequency as bZ, type PeriodicSchedule as b_, type GetRequestsOptions as ba, type GetRequestsResult as bb, INAPP_AUTO_DISMISSED_EVENT_NAME as bc, INAPP_CTA_CLICKED_EVENT_NAME as bd, INAPP_DISMISSED_EVENT_NAME as be, INAPP_SHOWN_EVENT_NAME as bf, INTEGRATION_CATEGORIES as bg, INTEGRATION_PROVIDERS as bh, type InAppCta as bi, type InAppCtaAction as bj, type InAppFrequency as bk, type InAppMessage as bl, type InAppMessageAnalytics as bm, type InAppMessageFormat as bn, type InAppMessageMode as bo, type InAppMessageStatus as bp, type InAppRecipient as bq, type InAppRecipientStatus as br, type InfoScreenQuestion as bs, type IngestBatch as bt, type IngestContext as bu, type IngestEvent as bv, type InstallDateCondition as bw, type IntegrationCategory as bx, type IntegrationDeliveriesResponse as by, type IntegrationDeliveryStatus as bz, AUDIENCE_JOIN_EVENT_NAME as c, type RequestStatusChangedNotice as c$, type PlatformCondition as c0, type PostCommentPayload as c1, type Predicate as c2, type PredicateGroup as c3, type Prompt as c4, type PromptAnalytics as c5, type PromptResponse as c6, type PromptStatus as c7, type PromptTheme as c8, type PushABConfig as c9, REQUEST_UNUPVOTED_EVENT_NAME as cA, REQUEST_UPVOTED_EVENT_NAME as cB, type RankingQuestion as cC, type RatingDisplayMode as cD, type RatingQuestion as cE, type RebindRequest as cF, type RecipientIdentity as cG, type RecipientList as cH, type RegisterDeviceTokenPayload as cI, type RegisterEventDefinitionRequest as cJ, type Request as cK, type RequestAnalytics as cL, type RequestBranding as cM, type RequestComment as cN, type RequestDetail as cO, type RequestFollow as cP, type RequestFollowPayload as cQ, type RequestFollowSource as cR, type RequestNotificationRules as cS, type RequestPersonalFilter as cT, type RequestPublicBranding as cU, type RequestPublicDetail as cV, type RequestPublicSummary as cW, type RequestSearchResult as cX, type RequestSettings as cY, type RequestSort as cZ, type RequestStatus as c_, type PushActionButton as ca, type PushActionType as cb, type PushChannelDef as cc, type PushCredentialSummary as cd, type PushDeliveryMode as ce, type PushEventName as cf, type PushFrequencyCap as cg, type PushInterruptionLevel as ch, type PushPlatformFilter as ci, type PushQuietHours as cj, type PushSchedule as ck, type PushTransactionalRequest as cl, type PushUrgency as cm, type PushVariant as cn, type Question as co, type QuestionType as cp, RADIUS_PRESETS as cq, RECIPIENTS_LIMIT as cr, REQUEST_COMMENTED_EVENT_NAME as cs, REQUEST_COMMENT_DELETED_EVENT_NAME as ct, REQUEST_COMMENT_EDITED_EVENT_NAME as cu, REQUEST_FOLLOWED_EVENT_NAME as cv, REQUEST_RESPONDED_EVENT_NAME as cw, REQUEST_STATUS_CHANGED_EVENT_NAME as cx, REQUEST_SUBMITTED_EVENT_NAME as cy, REQUEST_UNFOLLOWED_EVENT_NAME as cz, AUDIENCE_JOIN_TRIGGER_KIND as d, type SurveyNpsQuestion as d$, type RequestSummary as d0, type RequestTimelineEntry as d1, type RequestTimelineEntryKind as d2, type RequestUpvoterSegmentBreakdown as d3, type RequestVote as d4, type RequestVotePayload as d5, type RequestsHandlers as d6, type ResolveSurveyLinkRequest as d7, type ResolveSurveyLinkResponse as d8, type ResponseAnswer as d9, type SingleDateQuestion as dA, type SubmitRequestPayload as dB, type SubmitResponsePayload as dC, type SubmitSurveyAnswersRequest as dD, type Subscription as dE, type SubscriptionSource as dF, type SubscriptionStatus as dG, type SurveyAnalytics as dH, type SurveyAnswerRecord as dI, type SurveyAnswerValue as dJ, type SurveyAttempt as dK, type SurveyAttemptSource as dL, type SurveyBranch as dM, type SurveyBranchCondition as dN, type SurveyBranchOp as dO, type SurveyBranchValue as dP, type SurveyCampaign as dQ, type SurveyCampaignWithFlow as dR, type SurveyChoiceOption as dS, type SurveyDeliveryMode as dT, type SurveyEndCta as dU, type SurveyEndCtaKind as dV, type SurveyEndScreen as dW, type SurveyFlow as dX, type SurveyFollowUp as dY, type SurveyFunnelStep as dZ, type SurveyLocalization as d_, type RevokeWorkspacePlanGrantRequest as da, type RotateWriteKeyRequest as db, type RotateWriteKeyResponse as dc, SURVEY_END_SENTINEL as dd, type ScalarList as de, type ScalarValue as df, type SdkArmedInAppMessagesResponse as dg, type SdkArmedSurveysResponse as dh, type SdkArmedTriggersResponse as di, type SdkConfig as dj, type SdkConsentPayload as dk, type SdkIdentifyPayload as dl, type SdkIngestRequest as dm, type SdkIngestResponse as dn, type SdkPlatform as dp, type SdkSessionResponse as dq, type Segment as dr, type SegmentCondition as ds, type SegmentDsl as dt, type SegmentPreview as du, type SerializedSegmentRules as dv, type ShortTextQuestion as dw, type SilentAck as dx, type SilentPushPayload as dy, type SingleChoiceQuestion as dz, type AcceptWorkspaceInviteRequest as e, evaluateBranchCondition as e$, type SurveyOfferInstruction as e0, type SurveyProgressStyle as e1, type SurveyQuestion as e2, type SurveyQuestionDistribution as e3, type SurveyQuestionType as e4, type SurveyRatingQuestion as e5, type SurveyRecipient as e6, type SurveyRecipientStatus as e7, type SurveyResponseRecord as e8, type SurveyShareLinkResponse as e9, type UpdateRequestStatusRequest as eA, type UpdateSurveyAttemptProgressRequest as eB, type UpdateSurveyRequest as eC, type UploadApnsCredentialRequest as eD, type UploadCredentialRequest as eE, type UploadFcmCredentialRequest as eF, type User as eG, type UserPropertyCondition as eH, type UserPropertyPredicate as eI, type UserPropertyRule as eJ, type UserState as eK, type Workspace as eL, type WorkspaceInvite as eM, type WorkspaceMember as eN, type WorkspacePlanGrant as eO, type WorkspaceRole as eP, type WorkspaceWithRole as eQ, type WriteKey as eR, brandTokensFromPreset as eS, defaultEventTrigger as eT, defaultThemePreset as eU, defaultTriggerSpec as eV, emptyAudienceSpec as eW, emptySegmentDsl as eX, endpoints as eY, err as eZ, estimateProgress as e_, type SurveyShortTextQuestion as ea, type SurveySummary as eb, type SurveyTemplate as ec, type SurveyTextValidation as ed, THEME_PRESETS as ee, type TestPromptOnDeviceRequest as ef, type ThemeColors as eg, type ThemeMode as eh, type ThemePreset as ei, type TriggerKind as ej, type TriggerOccurrence as ek, type TriggerOccurrenceMode as el, type TriggerSpec as em, USER_IDENTIFIED_EVENT_NAME as en, type UpdateAppRequest as eo, type UpdateBrandThemeDefaultsRequest as ep, type UpdateBrandThemeRequest as eq, type UpdateCampaignRequest as er, type UpdateDeviceTokenPayload as es, type UpdateEventDefinitionRequest as et, type UpdateInAppMessageRequest as eu, type UpdateIntegrationRequest as ev, type UpdatePromptRequest as ew, type UpdateRequestModerationRequest as ex, type UpdateRequestResponseRequest as ey, type UpdateRequestSettingsRequest as ez, type AcceptWorkspaceInviteResponse as f, evaluateSegment as f0, evaluateSerializedSegmentRules as f1, findQuestion as f2, findQuestionIndex as f3, getCoreIntegrationEvent as f4, getThemePresetById as f5, inAppColorsFromBrandTokens as f6, isSilentPushPayload as f7, nextPeriodicFire as f8, nextQuestionId as f9, ok as fa, promptThemeFromBrandTokens as fb, reachableQuestions as fc, requestAccentFromBrandTokens as fd, sanitizeCoreIntegrationProperties as fe, serializedRulesToDsl as ff, tzOffsetMinutes as fg, type ActiveWindow as g, type AdminActivityEntry as h, type AdminBillingEvent as i, type AdminBillingNotification as j, type AdminCustomerApp as k, type AdminCustomerDetail as l, type AdminCustomerListRequest as m, type AdminCustomerListResponse as n, type AdminCustomerMember as o, type AdminCustomerSummary as p, type AdminGrantStatus as q, type AdminSession as r, type AdminWorkspaceSummary as s, type AmplitudeIntegrationRegion as t, type AndroidImportance as u, type AnswerValue as v, type ApiError as w, type ApiMeta as x, type ApiResponse as y, type ApiToken as z };
|