@usergist/sdk-core 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,5 @@
1
+ import { z } from 'zod';
2
+
1
3
  type EventPropertyValue = string | number | boolean | null;
2
4
  interface EventProperties {
3
5
  readonly [key: string]: EventPropertyValue;
@@ -213,6 +215,85 @@ declare const APP_VERSION_CHANGED_EVENT_NAME = "$app_version_changed";
213
215
  declare function defaultTriggerSpec(): TriggerSpec;
214
216
  declare function defaultEventTrigger(eventName?: string): EventTrigger;
215
217
 
218
+ /** Delivery platform is independent of the customer's integration framework. */
219
+ type DeliveryPlatform = 'ios' | 'android' | 'web';
220
+ type WebLayout = 'modal' | 'card' | 'panel';
221
+ interface WebPresentation {
222
+ readonly layout?: WebLayout;
223
+ readonly size?: 'compact' | 'standard' | 'wide';
224
+ readonly position?: 'left' | 'right';
225
+ readonly backdrop?: boolean;
226
+ }
227
+ interface CampaignDeliveryOptions {
228
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
229
+ readonly webPresentation?: WebPresentation | null;
230
+ }
231
+ interface WebAppConfig {
232
+ /** Exact origins, including scheme and non-default port. */
233
+ readonly allowedOrigins: ReadonlyArray<string>;
234
+ }
235
+ declare const DELIVERY_PROTOCOL_VERSION: 2;
236
+ declare function deliveryPlatformsForApp(platforms: ReadonlyArray<string>): DeliveryPlatform[];
237
+ declare function resolveWebPresentation(pillar: 'feedback' | 'survey' | 'inapp' | 'requests', override?: WebPresentation | null): {
238
+ readonly layout: WebLayout;
239
+ readonly size: "compact" | "standard" | "wide";
240
+ readonly position: "left" | "right";
241
+ readonly backdrop: boolean;
242
+ };
243
+
244
+ type PersonalizationScalar = string | number | boolean | null;
245
+ type PersonalizationFieldType = 'string' | 'number' | 'boolean' | 'date';
246
+ type PersonalizationSource = {
247
+ readonly id: string;
248
+ readonly label: string;
249
+ } & ({
250
+ readonly kind: 'user_property' | 'trigger_event' | 'send_data' | 'app' | 'now';
251
+ } | {
252
+ readonly kind: 'latest_event';
253
+ readonly eventName: string;
254
+ readonly lookbackDays: number;
255
+ readonly filters?: ReadonlyArray<EventPropertyFilter>;
256
+ });
257
+ interface PersonalizationBinding {
258
+ readonly id: string;
259
+ readonly label: string;
260
+ readonly sourceId: string;
261
+ /** Literal property key; dots are not interpreted as object traversal. */
262
+ readonly key: string;
263
+ readonly type: PersonalizationFieldType;
264
+ readonly fallback?: PersonalizationScalar;
265
+ }
266
+ interface PersonalizationSpec {
267
+ readonly version: 1;
268
+ readonly sources: ReadonlyArray<PersonalizationSource>;
269
+ readonly bindings: ReadonlyArray<PersonalizationBinding>;
270
+ readonly missingData: 'skip';
271
+ }
272
+ interface PersonalizationSourceValue {
273
+ readonly values: Readonly<Record<string, PersonalizationScalar>>;
274
+ readonly eventId?: string;
275
+ readonly occurredAt?: string;
276
+ }
277
+ interface PersonalizationIssue {
278
+ readonly code: 'missing' | 'type_mismatch' | 'unknown_binding' | 'invalid_template' | 'invalid_destination';
279
+ readonly bindingId?: string;
280
+ readonly path?: string;
281
+ readonly message: string;
282
+ }
283
+ interface PersonalizationResolution {
284
+ readonly status: 'ready' | 'using_fallback' | 'skipped';
285
+ readonly values: Readonly<Record<string, PersonalizationScalar>>;
286
+ readonly fallbackBindingIds: ReadonlyArray<string>;
287
+ readonly issues: ReadonlyArray<PersonalizationIssue>;
288
+ readonly sources: Readonly<Record<string, PersonalizationSourceValue>>;
289
+ }
290
+ type PersonalizationSurface = 'push' | 'inapp' | 'feedback' | 'survey';
291
+ interface UserPropertiesUpdate {
292
+ readonly set?: Readonly<Record<string, PersonalizationScalar>>;
293
+ readonly unset?: ReadonlyArray<string>;
294
+ readonly mutationId: string;
295
+ }
296
+
216
297
  interface ThemeColors {
217
298
  readonly primary: string;
218
299
  readonly background: string;
@@ -356,6 +437,9 @@ interface FrequencyCaps {
356
437
  }
357
438
  type PromptStatus = 'draft' | 'active' | 'paused' | 'archived';
358
439
  interface Prompt {
440
+ readonly personalization?: PersonalizationSpec | null;
441
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
442
+ readonly webPresentation?: WebPresentation | null;
359
443
  readonly id: string;
360
444
  readonly appId: string;
361
445
  readonly name: string;
@@ -389,6 +473,9 @@ interface ArmedTrigger {
389
473
  readonly prompt: ClientPrompt;
390
474
  }
391
475
  interface ClientPrompt {
476
+ readonly personalization?: PersonalizationSpec | null;
477
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
478
+ readonly webPresentation?: WebPresentation | null;
392
479
  readonly id: string;
393
480
  readonly questions: ReadonlyArray<Question>;
394
481
  readonly theme?: PromptTheme;
@@ -444,6 +531,9 @@ interface SubmitResponsePayload {
444
531
  readonly answers?: ReadonlyArray<ResponseAnswer>;
445
532
  readonly dismissed?: boolean;
446
533
  readonly latencyMs?: number;
534
+ readonly platform?: SdkPlatform;
535
+ readonly sdkVersion?: string;
536
+ readonly appVersion?: string;
447
537
  }
448
538
 
449
539
  declare const INAPP_SHOWN_EVENT_NAME = "$inapp_shown";
@@ -471,6 +561,9 @@ interface InAppFrequency {
471
561
  readonly perGlobalDays?: number;
472
562
  }
473
563
  interface InAppMessage {
564
+ readonly personalization?: PersonalizationSpec | null;
565
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
566
+ readonly webPresentation?: WebPresentation | null;
474
567
  readonly id: string;
475
568
  readonly appId: string;
476
569
  readonly name: string;
@@ -504,6 +597,9 @@ interface InAppMessage {
504
597
  readonly updatedAt: string;
505
598
  }
506
599
  interface CreateInAppMessageRequest {
600
+ readonly personalization?: PersonalizationSpec | null;
601
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
602
+ readonly webPresentation?: WebPresentation | null;
507
603
  readonly name: string;
508
604
  readonly audienceSegmentId?: string | null;
509
605
  readonly audience?: AudienceSpec;
@@ -548,6 +644,9 @@ interface InAppMessageAnalytics {
548
644
  }>;
549
645
  }
550
646
  interface ArmedInAppMessage {
647
+ readonly personalization?: PersonalizationSpec | null;
648
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
649
+ readonly webPresentation?: WebPresentation | null;
551
650
  readonly messageId: string;
552
651
  readonly eventName: string;
553
652
  /** True only when the SDK can make the same targeting decision locally. */
@@ -574,6 +673,11 @@ type CampaignType = 'push' | 'survey';
574
673
  type CampaignMode = 'broadcast' | 'scheduled' | 'triggered' | 'transactional' | 'on_demand' | 'link_only';
575
674
  type CampaignStatus = 'draft' | 'scheduled' | 'active' | 'paused' | 'completed' | 'archived';
576
675
  type PushActionType = 'open_app' | 'deep_link' | 'url' | 'dismiss' | 'json';
676
+ interface PushOpenAction {
677
+ readonly action: 'open_app' | 'deep_link' | 'url' | 'json';
678
+ readonly target?: string;
679
+ readonly actionJson?: JsonAction;
680
+ }
577
681
  interface PushActionButton {
578
682
  readonly label: string;
579
683
  readonly action: PushActionType;
@@ -584,6 +688,8 @@ interface PushActionButton {
584
688
  type PushUrgency = 'time_sensitive' | 'normal' | 'low';
585
689
  type PushInterruptionLevel = 'passive' | 'active' | 'time-sensitive' | 'critical';
586
690
  interface PushVariant {
691
+ readonly openAction?: PushOpenAction | null;
692
+ readonly personalization?: PersonalizationSpec | null;
587
693
  readonly id: string;
588
694
  readonly campaignId: string;
589
695
  readonly language: string | null;
@@ -713,6 +819,7 @@ interface UpdateCampaignRequest extends Partial<CreateCampaignRequest> {
713
819
  readonly status?: CampaignStatus;
714
820
  }
715
821
  interface PushTransactionalRequest {
822
+ readonly data?: Readonly<Record<string, PersonalizationScalar>>;
716
823
  readonly campaignId: string;
717
824
  readonly anonymousId?: string;
718
825
  readonly externalId?: string;
@@ -881,6 +988,7 @@ interface SurveyLocalization {
881
988
  }>>;
882
989
  }
883
990
  interface SurveyFlow {
991
+ readonly personalization?: PersonalizationSpec | null;
884
992
  readonly startQuestionId: string;
885
993
  readonly questions: ReadonlyArray<SurveyQuestion>;
886
994
  readonly branches: ReadonlyArray<SurveyBranch>;
@@ -892,6 +1000,8 @@ interface SurveyFlow {
892
1000
  type SurveyDeliveryMode = 'triggered' | 'scheduled' | 'on_demand' | 'link_only';
893
1001
  type SurveyAttemptSource = 'triggered' | 'scheduled' | 'link' | 'on_demand' | 'test';
894
1002
  interface SurveyCampaign {
1003
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
1004
+ readonly webPresentation?: WebPresentation | null;
895
1005
  readonly id: string;
896
1006
  readonly appId: string;
897
1007
  readonly name: string;
@@ -918,6 +1028,8 @@ interface SurveyCampaign {
918
1028
  readonly updatedAt: string;
919
1029
  }
920
1030
  interface SurveyCampaignWithFlow extends SurveyCampaign {
1031
+ /** Server-authorized content snapshot; present only on an SDK response. */
1032
+ readonly presentationId?: string;
921
1033
  readonly flow: SurveyFlow;
922
1034
  }
923
1035
  interface SurveyAnswerRecord {
@@ -962,6 +1074,13 @@ interface SurveyOfferInstruction {
962
1074
  readonly emittedAt: string;
963
1075
  }
964
1076
  interface CreateSurveyAttemptRequest {
1077
+ /** Stable ID for an explicitly new attempt; retained across offline retries. */
1078
+ readonly clientAttemptId?: string;
1079
+ readonly localStart?: {
1080
+ readonly token: string;
1081
+ readonly startedAt: string;
1082
+ };
1083
+ readonly presentationId?: string;
965
1084
  readonly anonymousId: string;
966
1085
  readonly externalId?: string | null;
967
1086
  readonly source: SurveyAttemptSource;
@@ -972,6 +1091,7 @@ interface CreateSurveyAttemptRequest {
972
1091
  readonly platform?: string;
973
1092
  }
974
1093
  interface CreateSurveyAttemptResponse {
1094
+ readonly resolvedContent?: SurveyCampaignWithFlow;
975
1095
  readonly attemptId: string;
976
1096
  readonly startQuestionId: string;
977
1097
  readonly progressSnapshot: SurveyAnswerRecord;
@@ -1023,6 +1143,8 @@ interface SurveyTemplate {
1023
1143
  readonly createdAt: string;
1024
1144
  }
1025
1145
  interface CreateSurveyRequest {
1146
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
1147
+ readonly webPresentation?: WebPresentation | null;
1026
1148
  readonly name: string;
1027
1149
  readonly mode: SurveyDeliveryMode;
1028
1150
  readonly flow: SurveyFlow;
@@ -1042,6 +1164,8 @@ interface CreateSurveyRequest {
1042
1164
  readonly status?: SurveyCampaign['status'];
1043
1165
  }
1044
1166
  interface UpdateSurveyRequest extends Partial<CreateSurveyRequest> {
1167
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
1168
+ readonly webPresentation?: WebPresentation | null;
1045
1169
  readonly status?: SurveyCampaign['status'];
1046
1170
  }
1047
1171
  interface CloneSurveyFromTemplateRequest {
@@ -1081,6 +1205,11 @@ interface SurveyAnalytics {
1081
1205
  readonly perLanguage?: Readonly<Record<string, number>>;
1082
1206
  }
1083
1207
  interface ArmedSurvey {
1208
+ /** Server-signed, non-personalized content for a safe local start. */
1209
+ readonly localStart?: {
1210
+ readonly token: string;
1211
+ readonly expiresAt: string;
1212
+ };
1084
1213
  readonly campaignId: string;
1085
1214
  readonly eventName: string;
1086
1215
  readonly segmentRules?: SerializedSegmentRules | null;
@@ -1093,16 +1222,32 @@ interface ArmedSurvey {
1093
1222
 
1094
1223
  declare const RECIPIENTS_LIMIT = 100;
1095
1224
  interface RecipientIdentity {
1225
+ readonly subjectId?: string | null;
1226
+ readonly identityKind?: 'anonymous' | 'identified';
1227
+ readonly identityOrigin?: 'sdk' | 'portal' | 'unknown';
1096
1228
  readonly anonymousId: string;
1097
1229
  readonly externalId: string | null;
1098
1230
  readonly country: string | null;
1099
1231
  readonly platform: string | null;
1100
1232
  }
1101
1233
  interface RecipientList<T> {
1234
+ readonly nextCursor?: string | null;
1235
+ readonly asOf?: string;
1236
+ readonly totalKind?: 'exact' | 'estimate';
1237
+ readonly warnings?: readonly string[];
1102
1238
  readonly items: ReadonlyArray<T>;
1103
1239
  readonly total: number;
1104
1240
  readonly limit: number;
1105
1241
  }
1242
+ interface RecipientPageQuery {
1243
+ from?: string;
1244
+ to?: string;
1245
+ cursor?: string;
1246
+ limit?: number;
1247
+ pagination?: 'cursor';
1248
+ platform?: 'ios' | 'android' | 'web';
1249
+ identity?: 'anonymous' | 'identified';
1250
+ }
1106
1251
  interface FeedbackRecipient extends RecipientIdentity {
1107
1252
  readonly receivedAt: string;
1108
1253
  readonly response: PromptResponse | null;
@@ -1158,6 +1303,8 @@ interface SdkConfig {
1158
1303
  readonly maxQueueSize?: number;
1159
1304
  readonly triggerSyncIntervalMs?: number;
1160
1305
  readonly debug?: boolean;
1306
+ /** Start analytics immediately while deferring campaign UI until resumePresentation(). */
1307
+ readonly presentationPaused?: boolean;
1161
1308
  /** Host app version used for lifecycle analytics and destination metadata. */
1162
1309
  readonly appVersion?: string;
1163
1310
  }
@@ -1168,6 +1315,7 @@ interface Workspace {
1168
1315
  readonly name: string;
1169
1316
  readonly slug: string;
1170
1317
  readonly region: string;
1318
+ readonly timezone: string;
1171
1319
  readonly createdAt: string;
1172
1320
  readonly updatedAt: string;
1173
1321
  }
@@ -1206,20 +1354,98 @@ interface User {
1206
1354
  readonly name?: string | null;
1207
1355
  readonly emailVerifiedAt?: string | null;
1208
1356
  readonly createdAt: string;
1357
+ readonly onboardingCompletedAt: string | null;
1209
1358
  readonly isSuperAdmin?: boolean;
1210
1359
  }
1211
1360
  interface App {
1361
+ readonly setupMode?: 'sdk' | 'portal';
1212
1362
  readonly id: string;
1213
1363
  readonly workspaceId: string;
1214
1364
  readonly name: string;
1215
1365
  readonly slug: string;
1216
- readonly platforms: ReadonlyArray<'ios' | 'android' | 'react-native' | 'flutter'>;
1366
+ readonly platforms: ReadonlyArray<'ios' | 'android' | 'react-native' | 'expo' | 'flutter' | 'web'>;
1367
+ readonly webConfig?: WebAppConfig;
1217
1368
  readonly piiAllowList: ReadonlyArray<string>;
1218
1369
  readonly lifecycleEventsEnabled: boolean;
1219
1370
  readonly billingSuspendedAt: string | null;
1371
+ readonly onboarding: AppOnboarding;
1220
1372
  readonly createdAt: string;
1221
1373
  readonly updatedAt: string;
1222
1374
  }
1375
+ type OnboardingGoal = 'feedback' | 'survey' | 'inapp' | 'push' | 'requests';
1376
+ type OnboardingStatus = 'in_progress' | 'deferred' | 'completed';
1377
+ type OnboardingStep = 'connect' | 'verify' | 'experience' | 'push' | 'launch';
1378
+ type OnboardingPushChoice = 'pending' | 'configured' | 'skipped';
1379
+ interface AppOnboarding {
1380
+ readonly goal: OnboardingGoal | null;
1381
+ readonly status: OnboardingStatus;
1382
+ readonly step: OnboardingStep;
1383
+ readonly pushChoice: OnboardingPushChoice;
1384
+ readonly startedAt: string;
1385
+ readonly deferredAt: string | null;
1386
+ readonly completedAt: string | null;
1387
+ }
1388
+ interface OnboardingEvent {
1389
+ readonly name: '$app_open';
1390
+ readonly occurredAt: string;
1391
+ readonly receivedAt: string;
1392
+ readonly anonymousId: string;
1393
+ readonly externalId: string | null;
1394
+ readonly identityType: 'anonymous' | 'identified';
1395
+ readonly platform: string | null;
1396
+ readonly sdkVersion: string | null;
1397
+ readonly appVersion: string | null;
1398
+ }
1399
+ interface OnboardingFirstFeedback {
1400
+ readonly promptId: string;
1401
+ readonly question: string;
1402
+ readonly status: 'draft' | 'active' | 'paused' | 'archived';
1403
+ readonly createdAt: string;
1404
+ readonly shownAt: string | null;
1405
+ readonly responseAt: string | null;
1406
+ readonly responseValue: number | string | ReadonlyArray<string> | null;
1407
+ readonly responseAnonymousId: string | null;
1408
+ readonly responseExternalId: string | null;
1409
+ readonly lastDismissedAt: string | null;
1410
+ }
1411
+ /** Small, ready-to-use first message; the full composer stays in the dashboard. */
1412
+ interface OnboardingInAppContent {
1413
+ readonly title: string;
1414
+ readonly body: string;
1415
+ readonly buttonLabel: string;
1416
+ readonly format: 'modal' | 'slideup';
1417
+ }
1418
+ declare function defaultOnboardingMessage(appName: string): OnboardingInAppContent;
1419
+ interface OnboardingFirstInApp extends Omit<OnboardingInAppContent, 'format'> {
1420
+ readonly format: 'modal' | 'modal_full' | 'slideup';
1421
+ readonly messageId: string;
1422
+ readonly status: 'draft' | 'scheduled' | 'active' | 'paused' | 'completed' | 'archived';
1423
+ readonly shownAt: string | null;
1424
+ readonly interactedAt: string | null;
1425
+ readonly interaction: 'cta_clicked' | 'dismissed' | null;
1426
+ readonly identityType: 'anonymous' | 'identified' | null;
1427
+ }
1428
+ interface AppOnboardingStatus extends AppOnboarding {
1429
+ readonly clientKeyAuthenticatedAt: string | null;
1430
+ readonly environment: WriteKey['environment'];
1431
+ readonly firstEvent: OnboardingEvent | null;
1432
+ readonly firstAudienceUserCreated: boolean;
1433
+ readonly firstFeedback: OnboardingFirstFeedback | null;
1434
+ readonly firstInApp?: OnboardingFirstInApp | null;
1435
+ readonly pushCredentials: {
1436
+ readonly ios: boolean;
1437
+ readonly android: boolean;
1438
+ };
1439
+ }
1440
+ interface UpdateAppOnboardingRequest {
1441
+ readonly action?: 'resume' | 'defer' | 'create_first_inapp' | 'first_inapp_completed' | 'create_first_feedback' | 'first_feedback_completed' | 'push_configured' | 'push_skipped' | 'complete';
1442
+ readonly step?: OnboardingStep;
1443
+ readonly question?: string;
1444
+ readonly message?: OnboardingInAppContent;
1445
+ }
1446
+ interface DeferCurrentUserOnboardingRequest {
1447
+ readonly action: 'defer';
1448
+ }
1223
1449
  interface WriteKey {
1224
1450
  readonly id: string;
1225
1451
  readonly appId: string;
@@ -1233,7 +1459,7 @@ interface WriteKey {
1233
1459
  interface CreatedWriteKey extends WriteKey {
1234
1460
  readonly plaintext: string;
1235
1461
  }
1236
- type ApiTokenScope = 'sdk:subjects' | 'push.transactional';
1462
+ type ApiTokenScope = 'sdk:subjects' | 'push.transactional' | 'users.properties.write';
1237
1463
  /**
1238
1464
  * Metadata for a workspace-scoped server credential. The plaintext secret is
1239
1465
  * deliberately absent and is only returned by the create endpoint.
@@ -1328,6 +1554,11 @@ interface RequestSummary {
1328
1554
  readonly statusChangedAt: string;
1329
1555
  readonly viewerHasUpvoted: boolean;
1330
1556
  readonly viewerIsFollowing: boolean;
1557
+ /** Dashboard-only publication metadata. Omitted from SDK responses. */
1558
+ readonly portalVisible?: boolean;
1559
+ readonly source?: 'sdk' | 'portal';
1560
+ readonly hidden?: boolean;
1561
+ readonly devResponse?: string | null;
1331
1562
  }
1332
1563
  /** Search-as-you-type result; the SDK shows up to 5. */
1333
1564
  interface RequestSearchResult {
@@ -1381,6 +1612,9 @@ interface RequestDetail extends Request {
1381
1612
  readonly submitterAnonymousId: string;
1382
1613
  readonly submitterExternalId: string | null;
1383
1614
  readonly hidden: boolean;
1615
+ readonly portalVisible?: boolean;
1616
+ readonly source?: 'sdk' | 'portal';
1617
+ readonly portalVisitorEmail?: string | null;
1384
1618
  }
1385
1619
  interface RequestUpvoterSegmentBreakdown {
1386
1620
  readonly requestId: string;
@@ -1663,6 +1897,24 @@ interface AdminWorkspaceSummary {
1663
1897
  }
1664
1898
 
1665
1899
  type AdminGrantStatus = 'active' | 'expired' | 'revoked';
1900
+ type GlobalFeatureFlagKey = 'onboarding_finish_later' | 'public_signup';
1901
+ interface PublicSignupStatus {
1902
+ readonly enabled: boolean;
1903
+ }
1904
+ interface GlobalFeatureFlag {
1905
+ readonly key: GlobalFeatureFlagKey;
1906
+ readonly enabled: boolean;
1907
+ readonly description: string;
1908
+ readonly updatedAt: string;
1909
+ readonly updatedBy: string | null;
1910
+ }
1911
+ interface ProductFeatureFlags {
1912
+ readonly portalContent: boolean;
1913
+ readonly onboardingFinishLater: boolean;
1914
+ }
1915
+ interface UpdateGlobalFeatureFlagRequest {
1916
+ readonly enabled: boolean;
1917
+ }
1666
1918
  interface WorkspacePlanGrant {
1667
1919
  readonly id: string;
1668
1920
  readonly workspaceId: string;
@@ -1705,6 +1957,47 @@ interface AdminSession {
1705
1957
  readonly name: string | null;
1706
1958
  };
1707
1959
  }
1960
+ type AdminDeletionKind = 'workspace' | 'dashboard_user';
1961
+ type AdminDeletionStatus = 'queued' | 'running' | 'failed' | 'completed';
1962
+ interface AdminDeletionJob {
1963
+ readonly id: string;
1964
+ readonly kind: AdminDeletionKind;
1965
+ readonly targetId: string;
1966
+ readonly targetLabel: string;
1967
+ readonly status: AdminDeletionStatus;
1968
+ readonly attempts: number;
1969
+ readonly error: string | null;
1970
+ readonly requestedByEmail: string | null;
1971
+ readonly createdAt: string;
1972
+ readonly updatedAt: string;
1973
+ readonly completedAt: string | null;
1974
+ }
1975
+ interface DeleteAdminWorkspaceRequest {
1976
+ readonly confirmationName: string;
1977
+ }
1978
+ interface DeleteAdminDashboardUserRequest {
1979
+ readonly confirmationEmail: string;
1980
+ }
1981
+ interface AdminDashboardUserSummary {
1982
+ readonly userId: string;
1983
+ readonly email: string;
1984
+ readonly name: string | null;
1985
+ readonly workosUserId: string | null;
1986
+ readonly isSuperAdmin: boolean;
1987
+ readonly deletionPending: boolean;
1988
+ readonly ownedWorkspaceCount: number;
1989
+ readonly membershipCount: number;
1990
+ readonly createdAt: string;
1991
+ }
1992
+ interface AdminDashboardUserListRequest {
1993
+ readonly search?: string;
1994
+ readonly cursor?: string;
1995
+ readonly limit?: number;
1996
+ }
1997
+ interface AdminDashboardUserListResponse {
1998
+ readonly users: ReadonlyArray<AdminDashboardUserSummary>;
1999
+ readonly nextCursor: string | null;
2000
+ }
1708
2001
  interface AdminCustomerSummary {
1709
2002
  readonly workspaceId: string;
1710
2003
  readonly name: string;
@@ -2054,21 +2347,512 @@ declare function nextPeriodicFire(schedule: PeriodicSchedule, now?: Date): Date;
2054
2347
  */
2055
2348
  declare function tzOffsetMinutes(at: Date, tz: string): number;
2056
2349
 
2350
+ /** Workspace-member MCP grants. These never replace workspace role checks. */
2351
+ declare const MCP_DOMAINS: readonly ["context", "users", "analytics", "requests", "roadmap", "content", "experiences", "segments", "brand", "portal", "push", "integrations", "sdk", "apps"];
2352
+ type McpDomain = typeof MCP_DOMAINS[number];
2353
+ declare const MCP_ACCESS_MODES: readonly ["read_only", "approve_changes", "automatic"];
2354
+ type McpAccessMode = typeof MCP_ACCESS_MODES[number];
2355
+ type McpCapability = `${McpDomain}:${'read' | 'manage' | 'publish' | 'send'}`;
2356
+ declare const MCP_CAPABILITIES: readonly McpCapability[];
2357
+ declare const MCP_DEFAULT_CAPABILITIES: readonly McpCapability[];
2358
+ type SubjectRef = {
2359
+ subjectId: string;
2360
+ externalId?: never;
2361
+ anonymousId?: never;
2362
+ } | {
2363
+ externalId: string;
2364
+ subjectId?: never;
2365
+ anonymousId?: never;
2366
+ } | {
2367
+ anonymousId: string;
2368
+ subjectId?: never;
2369
+ externalId?: never;
2370
+ };
2371
+ interface McpConnection {
2372
+ id: string;
2373
+ workspaceId: string;
2374
+ userId: string;
2375
+ name: string;
2376
+ appIds: string[];
2377
+ capabilities: McpCapability[];
2378
+ mode: McpAccessMode;
2379
+ policyVersion: number;
2380
+ createdAt: string;
2381
+ lastUsedAt: string | null;
2382
+ revokedAt: string | null;
2383
+ connected: boolean;
2384
+ }
2385
+ type McpOperationStatus = 'needs_approval' | 'queued' | 'running' | 'succeeded' | 'failed' | 'indeterminate' | 'cancelled' | 'expired';
2386
+ interface McpOperationResult {
2387
+ operationId: string;
2388
+ status: McpOperationStatus;
2389
+ proposalId?: string;
2390
+ expiresAt?: string;
2391
+ preview?: {
2392
+ action: string;
2393
+ arguments: unknown;
2394
+ effects: string[];
2395
+ asOf: string;
2396
+ impact?: unknown;
2397
+ };
2398
+ approvalSource?: 'mcp_form' | 'client_managed' | 'automatic' | null;
2399
+ result?: unknown;
2400
+ targets?: {
2401
+ kind: string;
2402
+ id: string;
2403
+ appId?: string;
2404
+ }[];
2405
+ error?: {
2406
+ code: string;
2407
+ message: string;
2408
+ };
2409
+ }
2410
+ interface McpPage<T> {
2411
+ items: T[];
2412
+ nextCursor: string | null;
2413
+ asOf: string;
2414
+ total?: number;
2415
+ totalKind?: 'exact' | 'estimate';
2416
+ }
2417
+ interface McpGrant {
2418
+ name: string;
2419
+ appIds: string[];
2420
+ capabilities: McpCapability[];
2421
+ mode: McpAccessMode;
2422
+ }
2423
+ interface McpConnectionSettings {
2424
+ enabled: boolean;
2425
+ resourceUrl: string | null;
2426
+ mutationsEnabled?: boolean;
2427
+ connections: McpConnection[];
2428
+ }
2429
+ interface McpActivity {
2430
+ id: string;
2431
+ app_id: string | null;
2432
+ tool: string;
2433
+ status: McpOperationStatus;
2434
+ approval_source: McpOperationResult['approvalSource'];
2435
+ error_code: string | null;
2436
+ created_at: string;
2437
+ updated_at: string;
2438
+ }
2439
+ type McpSearchSource = 'request' | 'feedback_answer' | 'survey_answer' | 'roadmap' | 'article' | 'changelog';
2440
+ interface AppSearchQuery {
2441
+ query: string;
2442
+ types?: McpSearchSource[];
2443
+ variant?: 'draft' | 'published' | 'record';
2444
+ cursor?: string;
2445
+ limit?: number;
2446
+ }
2447
+ interface AppSearchResult extends McpPage<{
2448
+ type: string;
2449
+ id: string;
2450
+ variant: string;
2451
+ title: string;
2452
+ excerpt: string;
2453
+ updatedAt: string;
2454
+ indexedAt: string;
2455
+ reference: {
2456
+ appId: string;
2457
+ type: string;
2458
+ id: string;
2459
+ variant: string;
2460
+ };
2461
+ url: string;
2462
+ }> {
2463
+ index: {
2464
+ ready: boolean;
2465
+ updatedAt: string | null;
2466
+ };
2467
+ warnings: string[];
2468
+ }
2469
+ interface DeliveryDiagnosticInput {
2470
+ kind: 'feedback' | 'survey' | 'inapp' | 'push';
2471
+ entityId: string;
2472
+ subject: SubjectRef;
2473
+ platform: 'ios' | 'android' | 'web';
2474
+ eventName?: string;
2475
+ }
2476
+ interface DeliveryDiagnosticResult {
2477
+ appId: string;
2478
+ entityId: string;
2479
+ kind: DeliveryDiagnosticInput['kind'];
2480
+ subject: unknown;
2481
+ asOf: string;
2482
+ checks: {
2483
+ check: string;
2484
+ status: 'pass' | 'fail' | 'unknown' | 'not_applicable';
2485
+ evidence: unknown;
2486
+ }[];
2487
+ warnings: string[];
2488
+ }
2489
+
2490
+ type PortalSection = 'requests' | 'roadmap' | 'help' | 'changelog';
2491
+ type DocumentKind = 'article' | 'changelog';
2492
+ type ContentState = 'draft' | 'published' | 'archived';
2493
+ type RoadmapStatus = 'planned' | 'in_progress' | 'shipped';
2494
+ type ChangelogCategory = 'new' | 'improved' | 'fixed';
2495
+ interface ContentMark {
2496
+ type: 'bold' | 'italic' | 'code' | 'link';
2497
+ attrs?: {
2498
+ href: string;
2499
+ };
2500
+ }
2501
+ interface ContentNode {
2502
+ type: 'doc' | 'paragraph' | 'heading' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'blockquote' | 'codeBlock' | 'hardBreak' | 'image';
2503
+ text?: string;
2504
+ attrs?: {
2505
+ level?: number;
2506
+ start?: number;
2507
+ language?: string | null;
2508
+ assetId?: string;
2509
+ alt?: string;
2510
+ };
2511
+ marks?: ContentMark[];
2512
+ content?: ContentNode[];
2513
+ }
2514
+ interface ContentLink {
2515
+ kind: 'request' | 'roadmap';
2516
+ id: string;
2517
+ }
2518
+ interface PublicContentLink extends ContentLink {
2519
+ title: string;
2520
+ url: string;
2521
+ }
2522
+ interface DocumentDraft {
2523
+ title: string;
2524
+ summary: string;
2525
+ body: ContentNode;
2526
+ collectionId: string | null;
2527
+ category: ChangelogCategory;
2528
+ releaseDate: string;
2529
+ version: string;
2530
+ links: ContentLink[];
2531
+ }
2532
+ interface PortalDocument {
2533
+ id: string;
2534
+ kind: DocumentKind;
2535
+ draft: DocumentDraft;
2536
+ state: ContentState;
2537
+ revision: number;
2538
+ slug: string | null;
2539
+ publishedAt: string | null;
2540
+ firstPublishedAt: string | null;
2541
+ updatedAt: string;
2542
+ hasChanges: boolean;
2543
+ url: string | null;
2544
+ canPublish: boolean;
2545
+ position: number;
2546
+ }
2547
+ interface PublicPortalDocument {
2548
+ id: string;
2549
+ title: string;
2550
+ summary: string;
2551
+ body: ContentNode;
2552
+ slug: string;
2553
+ url: string;
2554
+ updatedAt: string;
2555
+ category: ChangelogCategory;
2556
+ releaseDate: string;
2557
+ version: string;
2558
+ collection: HelpCollection | null;
2559
+ links: PublicContentLink[];
2560
+ }
2561
+ interface PublicDocumentSummary {
2562
+ id: string;
2563
+ title: string;
2564
+ summary: string;
2565
+ slug: string;
2566
+ url: string;
2567
+ updatedAt: string;
2568
+ category: ChangelogCategory;
2569
+ releaseDate: string;
2570
+ version: string;
2571
+ /** Full published body; present for changelog entries so the portal can show release notes inline. */
2572
+ body?: ContentNode;
2573
+ }
2574
+ interface HelpCollection {
2575
+ id: string;
2576
+ title: string;
2577
+ description: string;
2578
+ slug: string;
2579
+ position: number;
2580
+ revision: number;
2581
+ archived: boolean;
2582
+ articleCount: number;
2583
+ }
2584
+ interface ContentPage<T> {
2585
+ items: T[];
2586
+ nextCursor: string | null;
2587
+ }
2588
+ interface ContentQuery {
2589
+ q?: string;
2590
+ state?: ContentState;
2591
+ collectionId?: string;
2592
+ category?: ChangelogCategory;
2593
+ cursor?: string;
2594
+ limit?: number;
2595
+ }
2596
+ interface CreateDocument {
2597
+ idempotencyKey: string;
2598
+ title?: string;
2599
+ collectionId?: string | null;
2600
+ links?: ContentLink[];
2601
+ }
2602
+ type ContentPageQuery = Pick<ContentQuery, 'cursor' | 'limit'>;
2603
+ interface SaveDocument {
2604
+ revision: number;
2605
+ draft: DocumentDraft;
2606
+ }
2607
+ interface ContentAction {
2608
+ revision: number;
2609
+ action: 'publish' | 'unpublish' | 'archive' | 'restore';
2610
+ }
2611
+ interface CreateCollection {
2612
+ title: string;
2613
+ description: string;
2614
+ idempotencyKey: string;
2615
+ }
2616
+ interface UpdateCollection {
2617
+ revision: number;
2618
+ title?: string;
2619
+ description?: string;
2620
+ archived?: boolean;
2621
+ }
2622
+ interface ReorderContent {
2623
+ revision: number;
2624
+ direction: 'up' | 'down';
2625
+ }
2626
+ interface RoadmapRequestLink {
2627
+ id: string;
2628
+ title: string;
2629
+ status: string;
2630
+ updatedAt: string;
2631
+ hidden: boolean;
2632
+ portalVisible: boolean;
2633
+ }
2634
+ interface RoadmapItem {
2635
+ id: string;
2636
+ title: string;
2637
+ description: string;
2638
+ status: RoadmapStatus;
2639
+ state: ContentState;
2640
+ revision: number;
2641
+ statusChangedAt: string;
2642
+ updatedAt: string;
2643
+ requests: RoadmapRequestLink[];
2644
+ url: string | null;
2645
+ canPublish: boolean;
2646
+ }
2647
+ interface RoadmapCard {
2648
+ id: string;
2649
+ kind: 'request' | 'item';
2650
+ title: string;
2651
+ description: string;
2652
+ status: RoadmapStatus;
2653
+ statusChangedAt: string;
2654
+ published: boolean;
2655
+ url: string | null;
2656
+ upvoteCount?: number;
2657
+ }
2658
+ interface PublicRoadmapItem {
2659
+ id: string;
2660
+ title: string;
2661
+ description: string;
2662
+ status: RoadmapStatus;
2663
+ statusChangedAt: string;
2664
+ links: PublicContentLink[];
2665
+ changelog: ContentPage<PublicDocumentSummary>;
2666
+ }
2667
+ interface RoadmapQuery {
2668
+ status: RoadmapStatus;
2669
+ cursor?: string;
2670
+ limit?: number;
2671
+ archived?: boolean;
2672
+ }
2673
+ interface CreateRoadmapItem {
2674
+ idempotencyKey: string;
2675
+ title: string;
2676
+ description: string;
2677
+ status: RoadmapStatus;
2678
+ requestIds: string[];
2679
+ }
2680
+ interface SaveRoadmapItem {
2681
+ revision: number;
2682
+ title: string;
2683
+ description: string;
2684
+ requestIds: string[];
2685
+ }
2686
+ interface MoveRoadmapItem {
2687
+ revision: number;
2688
+ status: RoadmapStatus;
2689
+ requests: {
2690
+ id: string;
2691
+ updatedAt: string;
2692
+ }[];
2693
+ }
2694
+ interface PortalAsset {
2695
+ id: string;
2696
+ width: number;
2697
+ height: number;
2698
+ bytes: number;
2699
+ }
2700
+ /** Multipart file body with idempotencyKey sent in the Idempotency-Key header. */
2701
+ interface PortalAssetUpload {
2702
+ file: Blob;
2703
+ idempotencyKey: string;
2704
+ }
2705
+ declare function emptyDocumentDraft(): DocumentDraft;
2706
+ declare function contentText(node: ContentNode): string;
2707
+ declare function contentAssetIds(node: ContentNode): string[];
2708
+ declare function contentSlug(title: string): string;
2709
+ declare function safeContentHref(href: string): boolean;
2710
+ interface ContentLinkTarget extends ContentLink {
2711
+ title: string;
2712
+ status: string;
2713
+ }
2714
+ interface ContentLinkQuery {
2715
+ kind: 'request' | 'roadmap';
2716
+ q?: string;
2717
+ cursor?: string;
2718
+ limit?: number;
2719
+ ids?: string;
2720
+ }
2721
+
2722
+ interface PortalApp {
2723
+ appId: string;
2724
+ name: string;
2725
+ slug: string;
2726
+ enabled: boolean;
2727
+ firstPublishedAt: string | null;
2728
+ url: string | null;
2729
+ branding: {
2730
+ accentColor: string;
2731
+ logoUrl: string | null;
2732
+ introCopy: string | null;
2733
+ };
2734
+ }
2735
+ interface PortalSettings {
2736
+ baseDomain: string;
2737
+ workspaceId: string;
2738
+ displayName: string;
2739
+ slug: string | null;
2740
+ published: boolean;
2741
+ firstPublishedAt: string | null;
2742
+ url: string | null;
2743
+ hostingReady: boolean;
2744
+ setupDismissed: boolean;
2745
+ apps: PortalApp[];
2746
+ }
2747
+ interface PublicPortal {
2748
+ contentEnabled?: boolean;
2749
+ slug: string;
2750
+ displayName: string;
2751
+ url: string;
2752
+ apps: (Pick<PortalApp, 'name' | 'slug' | 'url' | 'branding'> & {
2753
+ sections?: PortalSection[];
2754
+ urls?: Record<PortalSection, string>;
2755
+ })[];
2756
+ }
2757
+ interface PortalRequest {
2758
+ id: string;
2759
+ title: string;
2760
+ description: string;
2761
+ status: RequestStatus;
2762
+ upvoteCount: number;
2763
+ createdAt: string;
2764
+ statusChangedAt: string;
2765
+ devResponse: string | null;
2766
+ mergedIntoId: string | null;
2767
+ }
2768
+ interface PortalRequestList {
2769
+ items: PortalRequest[];
2770
+ total: number;
2771
+ page: number;
2772
+ hasMore: boolean;
2773
+ }
2774
+ type PortalRequestCounts = {
2775
+ all: number;
2776
+ } & Partial<Record<RequestStatus, number>>;
2777
+ interface PortalRequestQuery {
2778
+ q?: string;
2779
+ status?: RequestStatus;
2780
+ sort?: 'top' | 'newest' | 'status_changed';
2781
+ page?: number;
2782
+ limit?: number;
2783
+ }
2784
+ interface PortalSession {
2785
+ email: string;
2786
+ expiresAt: string;
2787
+ }
2788
+ interface UpdatePortalRequest {
2789
+ displayName?: string;
2790
+ slug?: string;
2791
+ setupDismissed?: boolean;
2792
+ }
2793
+ interface UpdatePortalAppRequest {
2794
+ slug: string;
2795
+ enabled: boolean;
2796
+ }
2797
+ /** Reserve an app's public address as part of app creation, without publishing it. */
2798
+ interface CreateAppPortal {
2799
+ appSlug: string;
2800
+ company?: {
2801
+ displayName: string;
2802
+ slug: string;
2803
+ };
2804
+ }
2805
+ interface PortalAuthStart {
2806
+ email: string;
2807
+ }
2808
+ interface PortalAuthVerify {
2809
+ email: string;
2810
+ code: string;
2811
+ }
2812
+ interface PortalSubmission {
2813
+ title: string;
2814
+ description: string;
2815
+ idempotencyKey: string;
2816
+ feedbackConsent: true;
2817
+ }
2818
+ interface PortalVote {
2819
+ vote: boolean;
2820
+ feedbackConsent: true;
2821
+ }
2822
+ declare const PORTAL_RESERVED_SLUGS: readonly string[];
2823
+ declare const PORTAL_SLUG_PATTERN: RegExp;
2824
+ declare function validPortalSlug(slug: string): boolean;
2825
+ declare function suggestPortalSlug(name: string): string;
2826
+ declare function buildPortalUrl(slug: string, baseDomain?: string, appSlug?: string): string;
2827
+
2828
+ interface UpdateCurrentUserRequest {
2829
+ readonly name?: string;
2830
+ }
2057
2831
  interface CreateWorkspaceRequest {
2058
2832
  readonly name: string;
2059
2833
  readonly slug?: string;
2834
+ readonly timezone?: string;
2835
+ }
2836
+ interface UpdateWorkspaceRequest {
2837
+ readonly name?: string;
2838
+ readonly timezone?: string;
2060
2839
  }
2061
2840
  interface InviteMemberRequest {
2062
2841
  readonly email: string;
2063
2842
  readonly role: Exclude<WorkspaceRole, 'owner'>;
2064
2843
  }
2065
2844
  interface CreateAppRequest {
2845
+ readonly setupMode?: 'sdk' | 'portal';
2846
+ readonly portal?: CreateAppPortal;
2847
+ readonly webConfig?: App['webConfig'];
2066
2848
  readonly name: string;
2067
2849
  readonly slug?: string;
2068
2850
  readonly platforms: App['platforms'];
2069
2851
  readonly environment?: WriteKey['environment'];
2852
+ readonly onboardingGoal?: OnboardingGoal;
2070
2853
  }
2071
2854
  interface UpdateAppRequest {
2855
+ readonly webConfig?: App['webConfig'];
2072
2856
  readonly name?: string;
2073
2857
  readonly platforms?: App['platforms'];
2074
2858
  readonly piiAllowList?: ReadonlyArray<string>;
@@ -2096,6 +2880,7 @@ interface CreateSegmentRequest {
2096
2880
  readonly refreshMode?: 'hot' | 'cold' | 'manual';
2097
2881
  }
2098
2882
  interface AppUserSummary {
2883
+ readonly origin?: 'sdk' | 'portal';
2099
2884
  readonly subjectId: string;
2100
2885
  readonly anonymousId: string;
2101
2886
  readonly anonymousIds: ReadonlyArray<string>;
@@ -2108,6 +2893,7 @@ interface AppUserSummary {
2108
2893
  readonly platform?: string | null;
2109
2894
  }
2110
2895
  interface AppUserDetail {
2896
+ readonly origin?: 'sdk' | 'portal';
2111
2897
  readonly subjectId: string;
2112
2898
  readonly anonymousId: string;
2113
2899
  readonly anonymousIds: ReadonlyArray<string>;
@@ -2138,6 +2924,8 @@ interface PaginatedAppUserEvents {
2138
2924
  }
2139
2925
  interface ListUsersQuery {
2140
2926
  readonly q?: string;
2927
+ readonly identityKind?: 'anonymous' | 'identified';
2928
+ readonly origin?: 'sdk' | 'portal';
2141
2929
  readonly cursor?: string;
2142
2930
  readonly limit?: number;
2143
2931
  }
@@ -2171,10 +2959,13 @@ interface SegmentPreview {
2171
2959
  }>;
2172
2960
  }
2173
2961
  interface CreatePromptRequest {
2962
+ readonly personalization?: PersonalizationSpec | null;
2174
2963
  readonly name: string;
2175
2964
  readonly triggerEventName: string;
2176
2965
  readonly segmentId?: string | null;
2177
2966
  readonly questions: ReadonlyArray<Question>;
2967
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
2968
+ readonly webPresentation?: WebPresentation | null;
2178
2969
  readonly themeMode?: ThemeMode;
2179
2970
  readonly theme?: PromptTheme;
2180
2971
  readonly frequency?: FrequencyCaps;
@@ -2183,10 +2974,13 @@ interface CreatePromptRequest {
2183
2974
  readonly status?: PromptStatus;
2184
2975
  }
2185
2976
  interface UpdatePromptRequest {
2977
+ readonly personalization?: PersonalizationSpec | null;
2186
2978
  readonly name?: string;
2187
2979
  readonly triggerEventName?: string;
2188
2980
  readonly segmentId?: string | null;
2189
2981
  readonly questions?: ReadonlyArray<Question>;
2982
+ readonly deliveryPlatforms?: ReadonlyArray<DeliveryPlatform>;
2983
+ readonly webPresentation?: WebPresentation | null;
2190
2984
  readonly themeMode?: ThemeMode;
2191
2985
  readonly theme?: PromptTheme;
2192
2986
  readonly frequency?: FrequencyCaps;
@@ -2220,6 +3014,13 @@ interface PromptAnalytics {
2220
3014
  }>;
2221
3015
  }
2222
3016
  interface SdkIngestRequest extends IngestBatch {
3017
+ /** Resolve these persisted trigger events in this request, without waiting
3018
+ * for background projection and instruction polling. */
3019
+ readonly delivery?: {
3020
+ readonly eventIds: ReadonlyArray<string>;
3021
+ readonly clientId?: string;
3022
+ readonly screenName?: string;
3023
+ };
2223
3024
  }
2224
3025
  interface SdkIngestResponse {
2225
3026
  readonly accepted: number;
@@ -2228,18 +3029,23 @@ interface SdkIngestResponse {
2228
3029
  index: number;
2229
3030
  reason: string;
2230
3031
  }>;
3032
+ readonly instructions?: ReadonlyArray<SdkDeliveryInstruction>;
2231
3033
  }
2232
3034
  interface SdkArmedTriggersResponse {
3035
+ /** Event-name hints only; personalized content is resolved on the server. */
3036
+ readonly deliveryEventNames?: ReadonlyArray<string>;
2233
3037
  readonly triggers: ReadonlyArray<ArmedTrigger>;
2234
3038
  readonly serverTime: string;
2235
3039
  readonly nextSyncMs: number;
2236
3040
  }
2237
3041
  interface SdkArmedInAppMessagesResponse {
3042
+ readonly deliveryEventNames?: ReadonlyArray<string>;
2238
3043
  readonly messages: ReadonlyArray<ArmedInAppMessage>;
2239
3044
  readonly serverTime: string;
2240
3045
  readonly nextSyncMs: number;
2241
3046
  }
2242
3047
  interface SdkArmedSurveysResponse {
3048
+ readonly deliveryEventNames?: ReadonlyArray<string>;
2243
3049
  readonly surveys: ReadonlyArray<ArmedSurvey>;
2244
3050
  readonly serverTime: string;
2245
3051
  readonly nextSyncMs: number;
@@ -2261,6 +3067,44 @@ interface SdkIdentifyPayload {
2261
3067
  readonly externalId: string;
2262
3068
  readonly properties?: Record<string, string | number | boolean | null>;
2263
3069
  }
3070
+ interface RegisterSdkClientRequest {
3071
+ readonly anonymousId: string;
3072
+ readonly instanceId: string;
3073
+ readonly platform: DeliveryPlatform;
3074
+ readonly sdkVersion: string;
3075
+ readonly protocolVersion: 2;
3076
+ readonly capabilities?: ReadonlyArray<string>;
3077
+ readonly screenName?: string | null;
3078
+ }
3079
+ interface SdkDeliveryInstruction {
3080
+ readonly id: number;
3081
+ readonly type: string;
3082
+ readonly payload: Readonly<Record<string, unknown>>;
3083
+ readonly emittedAt: string;
3084
+ readonly expiresAt: string;
3085
+ }
3086
+ interface SdkDeliveryInstruction {
3087
+ readonly id: number;
3088
+ readonly type: string;
3089
+ readonly payload: Readonly<Record<string, unknown>>;
3090
+ readonly emittedAt: string;
3091
+ readonly expiresAt: string;
3092
+ }
3093
+ interface AuthorizePresentationRequest {
3094
+ readonly clientId: string;
3095
+ readonly pillar: 'feedback' | 'survey' | 'inapp';
3096
+ readonly campaignId: string;
3097
+ readonly idempotencyKey: string;
3098
+ readonly instructionId?: number;
3099
+ readonly screenName?: string;
3100
+ }
3101
+ type AuthorizePresentationResponse = {
3102
+ readonly status: 'authorized';
3103
+ readonly presentationId: string;
3104
+ readonly content: Prompt | SurveyCampaignWithFlow | InAppMessage;
3105
+ } | {
3106
+ readonly status: 'unavailable' | 'consent_required';
3107
+ };
2264
3108
  interface GdprDeleteRequest {
2265
3109
  readonly externalId?: string;
2266
3110
  readonly anonymousId?: string;
@@ -2274,12 +3118,78 @@ type Endpoint<Req, Res> = {
2274
3118
  readonly __res: Res;
2275
3119
  };
2276
3120
  declare const endpoints: {
3121
+ readonly 'GET /v1/apps/:appId/search': Endpoint<AppSearchQuery, AppSearchResult>;
3122
+ readonly 'POST /v1/apps/:appId/delivery-diagnostics': Endpoint<DeliveryDiagnosticInput, DeliveryDiagnosticResult>;
3123
+ readonly 'GET /v1/workspaces/:wid/portal': Endpoint<void, PortalSettings>;
3124
+ readonly 'PUT /v1/workspaces/:wid/portal': Endpoint<UpdatePortalRequest, PortalSettings>;
3125
+ readonly 'GET /v1/workspaces/:wid/portal/slug-available': Endpoint<{
3126
+ slug: string;
3127
+ }, {
3128
+ available: boolean;
3129
+ }>;
3130
+ readonly 'PUT /v1/workspaces/:wid/portal/apps/:appId': Endpoint<UpdatePortalAppRequest, PortalSettings>;
3131
+ readonly 'POST /v1/workspaces/:wid/portal/publish': Endpoint<void, PortalSettings>;
3132
+ readonly 'POST /v1/workspaces/:wid/portal/unpublish': Endpoint<void, PortalSettings>;
3133
+ readonly 'GET /v1/workspaces/:wid/portal/preview/:appId': Endpoint<PortalRequestQuery, PortalRequestList>;
3134
+ readonly 'PATCH /v1/apps/:appId/requests/portal-visibility': Endpoint<{
3135
+ ids: readonly string[];
3136
+ visible: boolean;
3137
+ }, {
3138
+ updated: number;
3139
+ }>;
3140
+ readonly 'GET /v1/portal/:portalSlug': Endpoint<void, PublicPortal>;
3141
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/requests': Endpoint<PortalRequestQuery, PortalRequestList>;
3142
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/requests/counts': Endpoint<void, PortalRequestCounts>;
3143
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/requests/:requestId': Endpoint<void, PortalRequest>;
3144
+ readonly 'POST /v1/portal/:portalSlug/auth/start': Endpoint<PortalAuthStart, {
3145
+ sent: true;
3146
+ retryAfter: number;
3147
+ }>;
3148
+ readonly 'POST /v1/portal/:portalSlug/auth/verify': Endpoint<PortalAuthVerify, PortalSession & {
3149
+ sessionToken: string;
3150
+ }>;
3151
+ readonly 'GET /v1/portal/:portalSlug/session': Endpoint<void, PortalSession | null>;
3152
+ readonly 'DELETE /v1/portal/:portalSlug/session': Endpoint<void, {
3153
+ signedOut: true;
3154
+ }>;
3155
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/votes': Endpoint<{
3156
+ ids: string;
3157
+ }, {
3158
+ votedIds: string[];
3159
+ }>;
3160
+ readonly 'POST /v1/portal/:portalSlug/apps/:appSlug/requests': Endpoint<PortalSubmission, PortalRequest>;
3161
+ readonly 'PUT /v1/portal/:portalSlug/apps/:appSlug/requests/:requestId/vote': Endpoint<PortalVote, {
3162
+ upvoted: boolean;
3163
+ upvoteCount: number;
3164
+ }>;
3165
+ readonly 'POST /v1/sdk/clients': Endpoint<RegisterSdkClientRequest, {
3166
+ clientId: string;
3167
+ protocolVersion: 2;
3168
+ }>;
3169
+ readonly 'POST /v1/sdk/clients/:id/end': Endpoint<Record<string, never>, {
3170
+ ok: true;
3171
+ }>;
3172
+ readonly 'GET /v1/sdk/clients/:id/instructions': Endpoint<void, {
3173
+ instructions: ReadonlyArray<SdkDeliveryInstruction>;
3174
+ }>;
3175
+ readonly 'POST /v1/sdk/presentations/authorize': Endpoint<AuthorizePresentationRequest, AuthorizePresentationResponse>;
3176
+ readonly 'POST /v1/sdk/presentations/:id/receipt': Endpoint<{
3177
+ clientId: string;
3178
+ event: "shown" | "dismissed" | "completed" | "cta_clicked";
3179
+ }, {
3180
+ recorded: boolean;
3181
+ }>;
2277
3182
  readonly 'GET /v1/me': Endpoint<void, {
2278
3183
  user: User;
2279
3184
  workspaces: ReadonlyArray<WorkspaceWithRole>;
2280
3185
  }>;
3186
+ readonly 'PATCH /v1/me': Endpoint<UpdateCurrentUserRequest, User>;
3187
+ readonly 'PATCH /v1/me/onboarding': Endpoint<DeferCurrentUserOnboardingRequest, User>;
3188
+ readonly 'GET /v1/features': Endpoint<void, ProductFeatureFlags>;
3189
+ readonly 'GET /v1/signup-status': Endpoint<void, PublicSignupStatus>;
2281
3190
  readonly 'GET /v1/workspaces': Endpoint<void, ReadonlyArray<Workspace>>;
2282
3191
  readonly 'POST /v1/workspaces': Endpoint<CreateWorkspaceRequest, Workspace>;
3192
+ readonly 'PATCH /v1/workspaces/:wid': Endpoint<UpdateWorkspaceRequest, Workspace>;
2283
3193
  readonly 'GET /v1/workspaces/:wid/members': Endpoint<void, ReadonlyArray<WorkspaceMember>>;
2284
3194
  readonly 'GET /v1/workspaces/:wid/invites': Endpoint<void, ReadonlyArray<WorkspaceInvite>>;
2285
3195
  readonly 'POST /v1/workspaces/:wid/invites': Endpoint<InviteMemberRequest, {
@@ -2292,6 +3202,23 @@ declare const endpoints: {
2292
3202
  readonly 'GET /v1/workspaces/:wid/apps': Endpoint<void, ReadonlyArray<App>>;
2293
3203
  readonly 'POST /v1/workspaces/:wid/apps': Endpoint<CreateAppRequest, CreatedApp>;
2294
3204
  readonly 'GET /v1/workspaces/:wid/api-tokens': Endpoint<void, ReadonlyArray<ApiToken>>;
3205
+ readonly 'GET /v1/workspaces/:wid/ai-connections': Endpoint<void, McpConnectionSettings>;
3206
+ readonly 'PATCH /v1/workspaces/:wid/ai-connections/:id': Endpoint<McpGrant & {
3207
+ policyVersion: number;
3208
+ }, McpConnection>;
3209
+ readonly 'POST /v1/workspaces/:wid/ai-connections/:id/revoke': Endpoint<void, {
3210
+ revoked: boolean;
3211
+ }>;
3212
+ readonly 'GET /v1/workspaces/:wid/ai-connections/:id/activity': Endpoint<void, {
3213
+ items: McpActivity[];
3214
+ limit: number;
3215
+ }>;
3216
+ readonly 'POST /v1/mcp/consent': Endpoint<McpGrant & {
3217
+ workspaceId: string;
3218
+ externalAuthId: string;
3219
+ }, {
3220
+ redirectUri: string;
3221
+ }>;
2295
3222
  readonly 'POST /v1/workspaces/:wid/api-tokens': Endpoint<CreateApiTokenRequest, CreatedApiToken>;
2296
3223
  readonly 'DELETE /v1/workspaces/:wid/api-tokens/:tokenId': Endpoint<void, {
2297
3224
  revoked: true;
@@ -2301,6 +3228,8 @@ declare const endpoints: {
2301
3228
  readonly 'DELETE /v1/apps/:appId': Endpoint<void, {
2302
3229
  ok: true;
2303
3230
  }>;
3231
+ readonly 'GET /v1/apps/:appId/onboarding': Endpoint<void, AppOnboardingStatus>;
3232
+ readonly 'PATCH /v1/apps/:appId/onboarding': Endpoint<UpdateAppOnboardingRequest, AppOnboardingStatus>;
2304
3233
  readonly 'POST /v1/apps/:appId/sdk/subject-tokens': Endpoint<{
2305
3234
  externalId: string;
2306
3235
  }, SdkSessionResponse>;
@@ -2397,10 +3326,7 @@ declare const endpoints: {
2397
3326
  dispatched: true;
2398
3327
  }>;
2399
3328
  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>>;
3329
+ readonly 'GET /v1/apps/:appId/prompts/:promptId/recipients': Endpoint<RecipientPageQuery, RecipientList<FeedbackRecipient>>;
2404
3330
  readonly 'GET /v1/apps/:appId/prompts/:promptId/analytics': Endpoint<{
2405
3331
  from?: string;
2406
3332
  to?: string;
@@ -2466,6 +3392,58 @@ declare const endpoints: {
2466
3392
  readonly 'POST /v1/sdk/consent': Endpoint<SdkConsentPayload, {
2467
3393
  ok: true;
2468
3394
  }>;
3395
+ readonly 'PATCH /v1/apps/:appId/users/properties': Endpoint<{
3396
+ subject: SubjectRef;
3397
+ update: UserPropertiesUpdate;
3398
+ }, {
3399
+ applied: boolean;
3400
+ filteredKeys: string[];
3401
+ }>;
3402
+ readonly 'POST /v1/sdk/user-properties': Endpoint<UserPropertiesUpdate & {
3403
+ anonymousId: string;
3404
+ }, {
3405
+ applied: boolean;
3406
+ filteredKeys: string[];
3407
+ }>;
3408
+ readonly 'GET /v1/apps/:appId/personalization/fields': Endpoint<{
3409
+ q?: string;
3410
+ eventName?: string;
3411
+ }, {
3412
+ userProperties: ReadonlyArray<{
3413
+ key: string;
3414
+ label: string;
3415
+ type: string;
3416
+ source: string;
3417
+ available: boolean;
3418
+ }>;
3419
+ events: ReadonlyArray<{
3420
+ name: string;
3421
+ description: string | null;
3422
+ status: string;
3423
+ properties: ReadonlyArray<{
3424
+ key: string;
3425
+ label: string;
3426
+ type: string;
3427
+ source: string;
3428
+ available: boolean;
3429
+ }>;
3430
+ }>;
3431
+ retentionDays: number;
3432
+ }>;
3433
+ readonly 'POST /v1/apps/:appId/personalization/preview': Endpoint<{
3434
+ surface: PersonalizationSurface;
3435
+ content: Record<string, unknown>;
3436
+ subject?: SubjectRef;
3437
+ triggerEventId?: string;
3438
+ examples?: Record<string, PersonalizationSourceValue>;
3439
+ data?: Record<string, PersonalizationScalar>;
3440
+ }, {
3441
+ content: Record<string, unknown>;
3442
+ resolution: PersonalizationResolution | null;
3443
+ example: boolean;
3444
+ previewId?: string;
3445
+ subjectId?: string;
3446
+ }>;
2469
3447
  readonly 'POST /v1/sdk/identify': Endpoint<SdkIdentifyPayload, {
2470
3448
  ok: true;
2471
3449
  }>;
@@ -2738,10 +3716,7 @@ declare const endpoints: {
2738
3716
  segmentId?: string;
2739
3717
  language?: string;
2740
3718
  }, ReadonlyArray<SurveyResponseRecord>>;
2741
- readonly 'GET /v1/apps/:appId/surveys/:sid/recipients': Endpoint<{
2742
- from?: string;
2743
- to?: string;
2744
- }, RecipientList<SurveyRecipient>>;
3719
+ readonly 'GET /v1/apps/:appId/surveys/:sid/recipients': Endpoint<RecipientPageQuery, RecipientList<SurveyRecipient>>;
2745
3720
  readonly 'GET /v1/apps/:appId/surveys/:sid/attempts': Endpoint<void, ReadonlyArray<{
2746
3721
  id: string;
2747
3722
  campaignId: string;
@@ -2796,10 +3771,7 @@ declare const endpoints: {
2796
3771
  from?: string;
2797
3772
  to?: string;
2798
3773
  }, InAppMessageAnalytics>;
2799
- readonly 'GET /v1/apps/:appId/inapp-messages/:id/recipients': Endpoint<{
2800
- from?: string;
2801
- to?: string;
2802
- }, RecipientList<InAppRecipient>>;
3774
+ readonly 'GET /v1/apps/:appId/inapp-messages/:id/recipients': Endpoint<RecipientPageQuery, RecipientList<InAppRecipient>>;
2803
3775
  readonly 'GET /v1/sdk/armed-inapp-messages': Endpoint<{
2804
3776
  anonymousId: string;
2805
3777
  externalId?: string;
@@ -2832,6 +3804,11 @@ declare const endpoints: {
2832
3804
  }, {
2833
3805
  available: boolean;
2834
3806
  }>;
3807
+ /** Multipart `file` field; the processed logo URL is saved into branding.logoUrl. */
3808
+ readonly 'POST /v1/apps/:appId/request-settings/logo': Endpoint<{
3809
+ file: Blob;
3810
+ }, RequestSettings>;
3811
+ readonly 'DELETE /v1/apps/:appId/request-settings/logo': Endpoint<void, RequestSettings>;
2835
3812
  readonly 'POST /v1/apps/:appId/requests/seed-segments': Endpoint<void, {
2836
3813
  created: number;
2837
3814
  }>;
@@ -2907,8 +3884,23 @@ declare const endpoints: {
2907
3884
  periods: ReadonlyArray<BillingPeriod>;
2908
3885
  }>;
2909
3886
  readonly 'GET /v1/admin/session': Endpoint<void, AdminSession>;
3887
+ readonly 'GET /v1/admin/feature-flags': Endpoint<void, ReadonlyArray<GlobalFeatureFlag>>;
3888
+ readonly 'PATCH /v1/admin/feature-flags/:key': Endpoint<UpdateGlobalFeatureFlagRequest, GlobalFeatureFlag>;
2910
3889
  readonly 'GET /v1/admin/customers': Endpoint<AdminCustomerListRequest, AdminCustomerListResponse>;
2911
3890
  readonly 'GET /v1/admin/customers/:workspaceId': Endpoint<void, AdminCustomerDetail>;
3891
+ readonly 'POST /v1/admin/customers/:workspaceId/permanent-deletion': Endpoint<DeleteAdminWorkspaceRequest, {
3892
+ job: AdminDeletionJob;
3893
+ }>;
3894
+ readonly 'GET /v1/admin/dashboard-users': Endpoint<AdminDashboardUserListRequest, AdminDashboardUserListResponse>;
3895
+ readonly 'POST /v1/admin/dashboard-users/:userId/permanent-deletion': Endpoint<DeleteAdminDashboardUserRequest, {
3896
+ job: AdminDeletionJob;
3897
+ }>;
3898
+ readonly 'GET /v1/admin/deletion-jobs/:jobId': Endpoint<void, {
3899
+ job: AdminDeletionJob;
3900
+ }>;
3901
+ readonly 'POST /v1/admin/deletion-jobs/:jobId/retry': Endpoint<Record<string, never>, {
3902
+ job: AdminDeletionJob;
3903
+ }>;
2912
3904
  readonly 'POST /v1/admin/customers/:workspaceId/billing-events/:eventId/replay': Endpoint<Record<string, never>, {
2913
3905
  replayed: true;
2914
3906
  }>;
@@ -2985,7 +3977,395 @@ declare const endpoints: {
2985
3977
  }>;
2986
3978
  readonly 'GET /v1/public/roadmap/:slug/r/:requestId': Endpoint<void, RequestPublicDetail>;
2987
3979
  readonly 'GET /v1/public/roadmap/:slug/branding': Endpoint<void, RequestPublicBranding>;
3980
+ readonly 'GET /v1/apps/:appId/help/articles': Endpoint<ContentQuery, ContentPage<PortalDocument>>;
3981
+ readonly 'POST /v1/apps/:appId/help/articles': Endpoint<CreateDocument, PortalDocument>;
3982
+ readonly 'GET /v1/apps/:appId/help/articles/:documentId': Endpoint<void, PortalDocument>;
3983
+ readonly 'PUT /v1/apps/:appId/help/articles/:documentId': Endpoint<SaveDocument, PortalDocument>;
3984
+ readonly 'POST /v1/apps/:appId/help/articles/:documentId/lifecycle': Endpoint<ContentAction, PortalDocument>;
3985
+ readonly 'GET /v1/apps/:appId/changelog': Endpoint<ContentQuery, ContentPage<PortalDocument>>;
3986
+ readonly 'POST /v1/apps/:appId/changelog': Endpoint<CreateDocument, PortalDocument>;
3987
+ readonly 'GET /v1/apps/:appId/changelog/:documentId': Endpoint<void, PortalDocument>;
3988
+ readonly 'PUT /v1/apps/:appId/changelog/:documentId': Endpoint<SaveDocument, PortalDocument>;
3989
+ readonly 'POST /v1/apps/:appId/changelog/:documentId/lifecycle': Endpoint<ContentAction, PortalDocument>;
3990
+ readonly 'GET /v1/apps/:appId/help/collections': Endpoint<ContentQuery, ContentPage<HelpCollection>>;
3991
+ readonly 'POST /v1/apps/:appId/help/collections': Endpoint<CreateCollection, HelpCollection>;
3992
+ readonly 'PATCH /v1/apps/:appId/help/collections/:collectionId': Endpoint<UpdateCollection, HelpCollection>;
3993
+ readonly 'POST /v1/apps/:appId/help/collections/:collectionId/position': Endpoint<ReorderContent, {
3994
+ updated: boolean;
3995
+ }>;
3996
+ readonly 'POST /v1/apps/:appId/help/articles/:documentId/position': Endpoint<ReorderContent, {
3997
+ updated: boolean;
3998
+ }>;
3999
+ readonly 'GET /v1/apps/:appId/roadmap': Endpoint<RoadmapQuery, ContentPage<RoadmapCard>>;
4000
+ readonly 'POST /v1/apps/:appId/roadmap': Endpoint<CreateRoadmapItem, RoadmapItem>;
4001
+ readonly 'GET /v1/apps/:appId/roadmap/:itemId': Endpoint<void, RoadmapItem>;
4002
+ readonly 'PUT /v1/apps/:appId/roadmap/:itemId': Endpoint<SaveRoadmapItem, RoadmapItem>;
4003
+ readonly 'POST /v1/apps/:appId/roadmap/:itemId/status': Endpoint<MoveRoadmapItem, RoadmapItem>;
4004
+ readonly 'POST /v1/apps/:appId/roadmap/:itemId/lifecycle': Endpoint<ContentAction, RoadmapItem>;
4005
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/help/collections': Endpoint<ContentQuery, ContentPage<HelpCollection>>;
4006
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/help/collections/:collectionId': Endpoint<void, HelpCollection>;
4007
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/help/articles': Endpoint<ContentQuery, ContentPage<PublicDocumentSummary>>;
4008
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/help/articles/:documentId': Endpoint<void, PublicPortalDocument>;
4009
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/changelog': Endpoint<ContentQuery, ContentPage<PublicDocumentSummary>>;
4010
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/changelog/:documentId': Endpoint<void, PublicPortalDocument>;
4011
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/roadmap': Endpoint<RoadmapQuery, ContentPage<RoadmapCard>>;
4012
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/roadmap/:itemId': Endpoint<void, PublicRoadmapItem>;
4013
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/requests/:requestId/changelog': Endpoint<ContentPageQuery, ContentPage<PublicDocumentSummary>>;
4014
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/roadmap/:itemId/changelog': Endpoint<ContentPageQuery, ContentPage<PublicDocumentSummary>>;
4015
+ readonly 'GET /v1/apps/:appId/portal-content/link-targets': Endpoint<ContentLinkQuery, ContentPage<ContentLinkTarget>>;
4016
+ readonly 'POST /v1/apps/:appId/portal-content/assets/:kind/:documentId': Endpoint<PortalAssetUpload, PortalAsset>;
4017
+ readonly 'GET /v1/apps/:appId/portal-content/assets/:assetId': Endpoint<void, Blob>;
4018
+ readonly 'GET /v1/portal/:portalSlug/apps/:appSlug/assets/:assetId': Endpoint<void, Blob>;
2988
4019
  };
2989
4020
  type EndpointKey = keyof typeof endpoints;
2990
4021
 
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 };
4022
+ declare const personalizationSpecSchema: z.ZodEffects<z.ZodObject<{
4023
+ version: z.ZodLiteral<1>;
4024
+ sources: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4025
+ kind: z.ZodLiteral<"user_property">;
4026
+ id: z.ZodString;
4027
+ label: z.ZodString;
4028
+ }, "strip", z.ZodTypeAny, {
4029
+ kind: "user_property";
4030
+ id: string;
4031
+ label: string;
4032
+ }, {
4033
+ kind: "user_property";
4034
+ id: string;
4035
+ label: string;
4036
+ }>, z.ZodObject<{
4037
+ kind: z.ZodLiteral<"trigger_event">;
4038
+ id: z.ZodString;
4039
+ label: z.ZodString;
4040
+ }, "strip", z.ZodTypeAny, {
4041
+ kind: "trigger_event";
4042
+ id: string;
4043
+ label: string;
4044
+ }, {
4045
+ kind: "trigger_event";
4046
+ id: string;
4047
+ label: string;
4048
+ }>, z.ZodObject<{
4049
+ kind: z.ZodLiteral<"send_data">;
4050
+ id: z.ZodString;
4051
+ label: z.ZodString;
4052
+ }, "strip", z.ZodTypeAny, {
4053
+ kind: "send_data";
4054
+ id: string;
4055
+ label: string;
4056
+ }, {
4057
+ kind: "send_data";
4058
+ id: string;
4059
+ label: string;
4060
+ }>, z.ZodObject<{
4061
+ kind: z.ZodLiteral<"app">;
4062
+ id: z.ZodString;
4063
+ label: z.ZodString;
4064
+ }, "strip", z.ZodTypeAny, {
4065
+ kind: "app";
4066
+ id: string;
4067
+ label: string;
4068
+ }, {
4069
+ kind: "app";
4070
+ id: string;
4071
+ label: string;
4072
+ }>, z.ZodObject<{
4073
+ kind: z.ZodLiteral<"now">;
4074
+ id: z.ZodString;
4075
+ label: z.ZodString;
4076
+ }, "strip", z.ZodTypeAny, {
4077
+ kind: "now";
4078
+ id: string;
4079
+ label: string;
4080
+ }, {
4081
+ kind: "now";
4082
+ id: string;
4083
+ label: string;
4084
+ }>, z.ZodObject<{
4085
+ kind: z.ZodLiteral<"latest_event">;
4086
+ eventName: z.ZodString;
4087
+ lookbackDays: z.ZodNumber;
4088
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
4089
+ key: z.ZodEffects<z.ZodString, string, string>;
4090
+ op: z.ZodEnum<["eq", "neq", "gt", "gte", "lt", "lte", "in", "nin", "contains", "starts_with", "exists", "not_exists"]>;
4091
+ value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">]>>;
4092
+ }, "strip", z.ZodTypeAny, {
4093
+ key: string;
4094
+ op: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "exists" | "not_exists";
4095
+ value?: string | number | boolean | (string | number)[] | undefined;
4096
+ }, {
4097
+ key: string;
4098
+ op: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "exists" | "not_exists";
4099
+ value?: string | number | boolean | (string | number)[] | undefined;
4100
+ }>, "many">>;
4101
+ id: z.ZodString;
4102
+ label: z.ZodString;
4103
+ }, "strip", z.ZodTypeAny, {
4104
+ kind: "latest_event";
4105
+ id: string;
4106
+ eventName: string;
4107
+ label: string;
4108
+ lookbackDays: number;
4109
+ filters?: {
4110
+ key: string;
4111
+ op: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "exists" | "not_exists";
4112
+ value?: string | number | boolean | (string | number)[] | undefined;
4113
+ }[] | undefined;
4114
+ }, {
4115
+ kind: "latest_event";
4116
+ id: string;
4117
+ eventName: string;
4118
+ label: string;
4119
+ lookbackDays: number;
4120
+ filters?: {
4121
+ key: string;
4122
+ op: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "exists" | "not_exists";
4123
+ value?: string | number | boolean | (string | number)[] | undefined;
4124
+ }[] | undefined;
4125
+ }>]>, "many">;
4126
+ bindings: z.ZodArray<z.ZodObject<{
4127
+ id: z.ZodString;
4128
+ label: z.ZodString;
4129
+ sourceId: z.ZodString;
4130
+ key: z.ZodEffects<z.ZodString, string, string>;
4131
+ type: z.ZodEnum<["string", "number", "boolean", "date"]>;
4132
+ fallback: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
4133
+ }, "strip", z.ZodTypeAny, {
4134
+ id: string;
4135
+ key: string;
4136
+ type: "string" | "number" | "boolean" | "date";
4137
+ label: string;
4138
+ sourceId: string;
4139
+ fallback?: string | number | boolean | null | undefined;
4140
+ }, {
4141
+ id: string;
4142
+ key: string;
4143
+ type: "string" | "number" | "boolean" | "date";
4144
+ label: string;
4145
+ sourceId: string;
4146
+ fallback?: string | number | boolean | null | undefined;
4147
+ }>, "many">;
4148
+ missingData: z.ZodLiteral<"skip">;
4149
+ }, "strip", z.ZodTypeAny, {
4150
+ version: 1;
4151
+ sources: ({
4152
+ kind: "user_property";
4153
+ id: string;
4154
+ label: string;
4155
+ } | {
4156
+ kind: "trigger_event";
4157
+ id: string;
4158
+ label: string;
4159
+ } | {
4160
+ kind: "send_data";
4161
+ id: string;
4162
+ label: string;
4163
+ } | {
4164
+ kind: "app";
4165
+ id: string;
4166
+ label: string;
4167
+ } | {
4168
+ kind: "now";
4169
+ id: string;
4170
+ label: string;
4171
+ } | {
4172
+ kind: "latest_event";
4173
+ id: string;
4174
+ eventName: string;
4175
+ label: string;
4176
+ lookbackDays: number;
4177
+ filters?: {
4178
+ key: string;
4179
+ op: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "exists" | "not_exists";
4180
+ value?: string | number | boolean | (string | number)[] | undefined;
4181
+ }[] | undefined;
4182
+ })[];
4183
+ bindings: {
4184
+ id: string;
4185
+ key: string;
4186
+ type: "string" | "number" | "boolean" | "date";
4187
+ label: string;
4188
+ sourceId: string;
4189
+ fallback?: string | number | boolean | null | undefined;
4190
+ }[];
4191
+ missingData: "skip";
4192
+ }, {
4193
+ version: 1;
4194
+ sources: ({
4195
+ kind: "user_property";
4196
+ id: string;
4197
+ label: string;
4198
+ } | {
4199
+ kind: "trigger_event";
4200
+ id: string;
4201
+ label: string;
4202
+ } | {
4203
+ kind: "send_data";
4204
+ id: string;
4205
+ label: string;
4206
+ } | {
4207
+ kind: "app";
4208
+ id: string;
4209
+ label: string;
4210
+ } | {
4211
+ kind: "now";
4212
+ id: string;
4213
+ label: string;
4214
+ } | {
4215
+ kind: "latest_event";
4216
+ id: string;
4217
+ eventName: string;
4218
+ label: string;
4219
+ lookbackDays: number;
4220
+ filters?: {
4221
+ key: string;
4222
+ op: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "exists" | "not_exists";
4223
+ value?: string | number | boolean | (string | number)[] | undefined;
4224
+ }[] | undefined;
4225
+ })[];
4226
+ bindings: {
4227
+ id: string;
4228
+ key: string;
4229
+ type: "string" | "number" | "boolean" | "date";
4230
+ label: string;
4231
+ sourceId: string;
4232
+ fallback?: string | number | boolean | null | undefined;
4233
+ }[];
4234
+ missingData: "skip";
4235
+ }>, {
4236
+ version: 1;
4237
+ sources: ({
4238
+ kind: "user_property";
4239
+ id: string;
4240
+ label: string;
4241
+ } | {
4242
+ kind: "trigger_event";
4243
+ id: string;
4244
+ label: string;
4245
+ } | {
4246
+ kind: "send_data";
4247
+ id: string;
4248
+ label: string;
4249
+ } | {
4250
+ kind: "app";
4251
+ id: string;
4252
+ label: string;
4253
+ } | {
4254
+ kind: "now";
4255
+ id: string;
4256
+ label: string;
4257
+ } | {
4258
+ kind: "latest_event";
4259
+ id: string;
4260
+ eventName: string;
4261
+ label: string;
4262
+ lookbackDays: number;
4263
+ filters?: {
4264
+ key: string;
4265
+ op: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "exists" | "not_exists";
4266
+ value?: string | number | boolean | (string | number)[] | undefined;
4267
+ }[] | undefined;
4268
+ })[];
4269
+ bindings: {
4270
+ id: string;
4271
+ key: string;
4272
+ type: "string" | "number" | "boolean" | "date";
4273
+ label: string;
4274
+ sourceId: string;
4275
+ fallback?: string | number | boolean | null | undefined;
4276
+ }[];
4277
+ missingData: "skip";
4278
+ }, {
4279
+ version: 1;
4280
+ sources: ({
4281
+ kind: "user_property";
4282
+ id: string;
4283
+ label: string;
4284
+ } | {
4285
+ kind: "trigger_event";
4286
+ id: string;
4287
+ label: string;
4288
+ } | {
4289
+ kind: "send_data";
4290
+ id: string;
4291
+ label: string;
4292
+ } | {
4293
+ kind: "app";
4294
+ id: string;
4295
+ label: string;
4296
+ } | {
4297
+ kind: "now";
4298
+ id: string;
4299
+ label: string;
4300
+ } | {
4301
+ kind: "latest_event";
4302
+ id: string;
4303
+ eventName: string;
4304
+ label: string;
4305
+ lookbackDays: number;
4306
+ filters?: {
4307
+ key: string;
4308
+ op: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "exists" | "not_exists";
4309
+ value?: string | number | boolean | (string | number)[] | undefined;
4310
+ }[] | undefined;
4311
+ })[];
4312
+ bindings: {
4313
+ id: string;
4314
+ key: string;
4315
+ type: "string" | "number" | "boolean" | "date";
4316
+ label: string;
4317
+ sourceId: string;
4318
+ fallback?: string | number | boolean | null | undefined;
4319
+ }[];
4320
+ missingData: "skip";
4321
+ }>;
4322
+ declare const userPropertiesUpdateSchema: z.ZodEffects<z.ZodObject<{
4323
+ mutationId: z.ZodString;
4324
+ set: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
4325
+ unset: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
4326
+ }, "strip", z.ZodTypeAny, {
4327
+ mutationId: string;
4328
+ set?: Record<string, string | number | boolean | null> | undefined;
4329
+ unset?: string[] | undefined;
4330
+ }, {
4331
+ mutationId: string;
4332
+ set?: Record<string, string | number | boolean | null> | undefined;
4333
+ unset?: string[] | undefined;
4334
+ }>, {
4335
+ mutationId: string;
4336
+ set?: Record<string, string | number | boolean | null> | undefined;
4337
+ unset?: string[] | undefined;
4338
+ }, {
4339
+ mutationId: string;
4340
+ set?: Record<string, string | number | boolean | null> | undefined;
4341
+ unset?: string[] | undefined;
4342
+ }>;
4343
+ declare function resolvePersonalizationBindings(spec: PersonalizationSpec, sources: Readonly<Record<string, PersonalizationSourceValue>>): PersonalizationResolution;
4344
+ declare function personalizationToken(bindingId: string): string;
4345
+ /** Resolve only explicit template values. JSON keys and substituted values are never evaluated. */
4346
+ declare function renderPersonalizedValue(input: unknown, values: Readonly<Record<string, PersonalizationScalar>>, issues: PersonalizationIssue[], path?: string, mode?: 'text' | 'json' | 'url'): unknown;
4347
+ /** Records where a field is used, excluding campaign metadata and targeting. */
4348
+ declare function personalizationUsage(content: unknown): Map<string, Set<string>>;
4349
+ declare function renderPersonalizedContent<T>(content: T, resolution: PersonalizationResolution): {
4350
+ content: T;
4351
+ resolution: PersonalizationResolution;
4352
+ };
4353
+
4354
+ /** Runtime-only readiness state. Pausing never stops analytics or dismisses active UI. */
4355
+ declare class PresentationGate {
4356
+ private paused;
4357
+ private identity;
4358
+ private revisions;
4359
+ private readonly listeners;
4360
+ constructor(paused?: boolean);
4361
+ get isPaused(): boolean;
4362
+ setPaused(paused: boolean): void;
4363
+ invalidate(purpose?: 'feedback' | 'survey'): void;
4364
+ validator(purpose: 'feedback' | 'survey'): () => boolean;
4365
+ subscribe(listener: () => void): () => void;
4366
+ runWhenReady(run: () => void, valid: () => boolean, cancel?: () => void): void;
4367
+ waitUntilReady(valid: () => boolean): Promise<boolean>;
4368
+ private notify;
4369
+ }
4370
+
4371
+ export { type AudienceCondition as $, APP_OPEN_EVENT_NAME as A, type BillingPriceKind as B, type ContentNode as C, type AndroidImportance as D, type AnswerValue as E, type ApiError as F, type ApiMeta as G, type ApiResponse as H, type ApiToken as I, type ApiTokenScope as J, type App as K, type AppBrandSettings as L, type AppOnboarding as M, type AppOnboardingStatus as N, type AppOpenBeacon as O, type AppOpenTrigger as P, type AppSearchQuery as Q, type AppSearchResult as R, type AppUserDetail as S, type AppUserEvent as T, type AppUserSummary as U, type AppVersionChangedTrigger as V, type AppVersionCondition as W, type ArmedInAppMessage as X, type ArmedSurvey as Y, type ArmedTrigger as Z, type AudienceCombinator as _, type BillingInterval as a, type CreateInAppMessageRequest as a$, type AudienceConditionKind as a0, type AudienceJoinTrigger as a1, type AudienceMode as a2, type AudienceSpec as a3, type AuthorizePresentationRequest as a4, type AuthorizePresentationResponse as a5, type BaseSurveyQuestion as a6, type BillingAccessState as a7, type BillingChangePlanRequest as a8, type BillingChangePlanResponse as a9, type Combinator as aA, type ComparisonOp as aB, type CompleteSurveyAttemptRequest as aC, type ConnectIntegrationRequest as aD, type Consent as aE, type ConsentPurpose as aF, type ContentAction as aG, type ContentLink as aH, type ContentLinkQuery as aI, type ContentLinkTarget as aJ, type ContentMark as aK, type ContentPage as aL, type ContentPageQuery as aM, type ContentQuery as aN, type ContentState as aO, type CoreEventSubjectRole as aP, type CoreIntegrationEventDefinition as aQ, type CornerRadiusPreset as aR, type CountOp as aS, type CountryCondition as aT, type CreateApiTokenRequest as aU, type CreateAppPortal as aV, type CreateAppRequest as aW, type CreateBrandThemeRequest as aX, type CreateCampaignRequest as aY, type CreateCollection as aZ, type CreateDocument as a_, type BillingChargeStatus as aa, type BillingCheckoutRequest as ab, type BillingCheckoutResponse as ac, type BillingOfferAvailability as ad, type BillingPeriod as ae, type BillingPlan as af, type BillingTrial as ag, type BillingUsage as ah, type BrandPillar as ai, type BrandTheme as aj, type BrandThemeDefaults as ak, type BrandThemeRef as al, type BrandThemeTokens as am, type BulkUpdateStatusRequest as an, CORE_INTEGRATION_EVENTS as ao, type Campaign as ap, type CampaignAnalytics as aq, type CampaignDeliveryOptions as ar, type CampaignMode as as, type CampaignStatus as at, type CampaignType as au, type CampaignWithVariants as av, type ChangelogCategory as aw, type ChannelCategory as ax, type ClientPrompt as ay, type CloneSurveyFromTemplateRequest as az, APP_VERSION_CHANGED_EVENT_NAME as b, type InAppMessageFormat as b$, type CreatePromptRequest as b0, type CreateRoadmapItem as b1, type CreateSegmentRequest as b2, type CreateSurveyAttemptRequest as b3, type CreateSurveyAttemptResponse as b4, type CreateSurveyRequest as b5, type CreateWorkspacePlanGrantRequest as b6, type CreateWorkspaceRequest as b7, type CreateWriteKeyRequest as b8, type CreatedApiToken as b9, type EventPropertyValue as bA, type EventTrigger as bB, type ExtendWorkspacePlanGrantRequest as bC, type FeedbackRecipient as bD, type FrequencyCaps as bE, type GdprDeleteRequest as bF, type GdprExportRequest as bG, type GenerateSegmentNameRequest as bH, type GenerateSegmentNameResponse as bI, type GenerateSegmentRulesRequest as bJ, type GenerateSegmentRulesResponse as bK, type GetRequestsOptions as bL, type GetRequestsResult as bM, type GlobalFeatureFlag as bN, type GlobalFeatureFlagKey as bO, type HelpCollection as bP, INAPP_AUTO_DISMISSED_EVENT_NAME as bQ, INAPP_CTA_CLICKED_EVENT_NAME as bR, INAPP_DISMISSED_EVENT_NAME as bS, INAPP_SHOWN_EVENT_NAME as bT, INTEGRATION_CATEGORIES as bU, INTEGRATION_PROVIDERS as bV, type InAppCta as bW, type InAppCtaAction as bX, type InAppFrequency as bY, type InAppMessage as bZ, type InAppMessageAnalytics as b_, type CreatedApp as ba, type CreatedWriteKey as bb, DELIVERY_PROTOCOL_VERSION as bc, type DeferCurrentUserOnboardingRequest as bd, type DeleteAdminDashboardUserRequest as be, type DeleteAdminWorkspaceRequest as bf, type DeliveryBeacon as bg, type DeliveryBeaconKind as bh, type DeliveryDiagnosticInput as bi, type DeliveryDiagnosticResult as bj, type DeliveryPlatform as bk, type DocumentDraft as bl, type DocumentKind as bm, type EditCommentPayload as bn, type EffectivePlanAccess as bo, type Endpoint as bp, type EndpointKey as bq, type EventCountPredicate as br, type EventCountRule as bs, type EventDefinition as bt, type EventOccurredPredicate as bu, type EventPerformedCondition as bv, type EventProperties as bw, type EventPropertyFilter as bx, type EventPropertySchema as by, type EventPropertyType as bz, AUDIENCE_JOIN_EVENT_NAME as c, type PeriodicFrequency as c$, type InAppMessageMode as c0, type InAppMessageStatus as c1, type InAppRecipient as c2, type InAppRecipientStatus as c3, type InfoScreenQuestion as c4, type IngestBatch as c5, type IngestContext as c6, type IngestEvent as c7, type InstallDateCondition as c8, type IntegrationCategory as c9, type McpConnectionSettings as cA, type McpDomain as cB, type McpGrant as cC, type McpOperationResult as cD, type McpOperationStatus as cE, type McpPage as cF, type McpSearchSource as cG, type MergeRequestsRequest as cH, type MixpanelIntegrationRegion as cI, type MoveRoadmapItem as cJ, type MultiChoiceQuestion as cK, type MultipleChoiceQuestion as cL, type NpsQuestion as cM, type OnboardingEvent as cN, type OnboardingFirstFeedback as cO, type OnboardingFirstInApp as cP, type OnboardingGoal as cQ, type OnboardingInAppContent as cR, type OnboardingPushChoice as cS, type OnboardingStatus as cT, type OnboardingStep as cU, PORTAL_RESERVED_SLUGS as cV, PORTAL_SLUG_PATTERN as cW, PUSH_EVENTS as cX, type PaginatedAppUserEvents as cY, type PaginatedAppUsers as cZ, type ParsedPushPayload as c_, type IntegrationDeliveriesResponse as ca, type IntegrationDeliveryStatus as cb, type IntegrationDeliverySummary as cc, type IntegrationProvider as cd, type IntegrationRegion as ce, type IntegrationStatus as cf, type IntegrationSummary as cg, type IntegrationTestResult as ch, type InvalidateDeviceTokenPayload as ci, type InviteMemberRequest as cj, type JsonAction as ck, type LastActiveCondition as cl, type LikertQuestion as cm, type ListRequestsQuery as cn, type ListResponsesQuery as co, type ListUserEventsQuery as cp, type ListUsersQuery as cq, type LongTextQuestion as cr, MCP_ACCESS_MODES as cs, MCP_CAPABILITIES as ct, MCP_DEFAULT_CAPABILITIES as cu, MCP_DOMAINS as cv, type McpAccessMode as cw, type McpActivity as cx, type McpCapability as cy, type McpConnection as cz, AUDIENCE_JOIN_TRIGGER_KIND as d, RECIPIENTS_LIMIT as d$, type PeriodicSchedule as d0, type PersonalizationBinding as d1, type PersonalizationFieldType as d2, type PersonalizationIssue as d3, type PersonalizationResolution as d4, type PersonalizationScalar as d5, type PersonalizationSource as d6, type PersonalizationSourceValue as d7, type PersonalizationSpec as d8, type PersonalizationSurface as d9, type PromptStatus as dA, type PromptTheme as dB, type PublicContentLink as dC, type PublicDocumentSummary as dD, type PublicPortal as dE, type PublicPortalDocument as dF, type PublicRoadmapItem as dG, type PublicSignupStatus as dH, type PushABConfig as dI, type PushActionButton as dJ, type PushActionType as dK, type PushChannelDef as dL, type PushCredentialSummary as dM, type PushDeliveryMode as dN, type PushEventName as dO, type PushFrequencyCap as dP, type PushInterruptionLevel as dQ, type PushOpenAction as dR, type PushPlatformFilter as dS, type PushQuietHours as dT, type PushSchedule as dU, type PushTransactionalRequest as dV, type PushUrgency as dW, type PushVariant as dX, type Question as dY, type QuestionType as dZ, RADIUS_PRESETS as d_, type Platform as da, type PlatformCondition as db, type PortalApp as dc, type PortalAsset as dd, type PortalAssetUpload as de, type PortalAuthStart as df, type PortalAuthVerify as dg, type PortalDocument as dh, type PortalRequest as di, type PortalRequestCounts as dj, type PortalRequestList as dk, type PortalRequestQuery as dl, type PortalSection as dm, type PortalSession as dn, type PortalSettings as dp, type PortalSubmission as dq, type PortalVote as dr, type PostCommentPayload as ds, type Predicate as dt, type PredicateGroup as du, PresentationGate as dv, type ProductFeatureFlags as dw, type Prompt as dx, type PromptAnalytics as dy, type PromptResponse as dz, type AcceptWorkspaceInviteRequest as e, type SdkArmedSurveysResponse as e$, REQUEST_COMMENTED_EVENT_NAME as e0, REQUEST_COMMENT_DELETED_EVENT_NAME as e1, REQUEST_COMMENT_EDITED_EVENT_NAME as e2, REQUEST_FOLLOWED_EVENT_NAME as e3, REQUEST_RESPONDED_EVENT_NAME as e4, REQUEST_STATUS_CHANGED_EVENT_NAME as e5, REQUEST_SUBMITTED_EVENT_NAME as e6, REQUEST_UNFOLLOWED_EVENT_NAME as e7, REQUEST_UNUPVOTED_EVENT_NAME as e8, REQUEST_UPVOTED_EVENT_NAME as e9, type RequestSort as eA, type RequestStatus as eB, type RequestStatusChangedNotice as eC, type RequestSummary as eD, type RequestTimelineEntry as eE, type RequestTimelineEntryKind as eF, type RequestUpvoterSegmentBreakdown as eG, type RequestVote as eH, type RequestVotePayload as eI, type RequestsHandlers as eJ, type ResolveSurveyLinkRequest as eK, type ResolveSurveyLinkResponse as eL, type ResponseAnswer as eM, type RevokeWorkspacePlanGrantRequest as eN, type RoadmapCard as eO, type RoadmapItem as eP, type RoadmapQuery as eQ, type RoadmapRequestLink as eR, type RoadmapStatus as eS, type RotateWriteKeyRequest as eT, type RotateWriteKeyResponse as eU, SURVEY_END_SENTINEL as eV, type SaveDocument as eW, type SaveRoadmapItem as eX, type ScalarList as eY, type ScalarValue as eZ, type SdkArmedInAppMessagesResponse as e_, type RankingQuestion as ea, type RatingDisplayMode as eb, type RatingQuestion as ec, type RebindRequest as ed, type RecipientIdentity as ee, type RecipientList as ef, type RecipientPageQuery as eg, type RegisterDeviceTokenPayload as eh, type RegisterEventDefinitionRequest as ei, type RegisterSdkClientRequest as ej, type ReorderContent as ek, type Request as el, type RequestAnalytics as em, type RequestBranding as en, type RequestComment as eo, type RequestDetail as ep, type RequestFollow as eq, type RequestFollowPayload as er, type RequestFollowSource as es, type RequestNotificationRules as et, type RequestPersonalFilter as eu, type RequestPublicBranding as ev, type RequestPublicDetail as ew, type RequestPublicSummary as ex, type RequestSearchResult as ey, type RequestSettings as ez, type AcceptWorkspaceInviteResponse as f, type ThemeColors as f$, type SdkArmedTriggersResponse as f0, type SdkConfig as f1, type SdkConsentPayload as f2, type SdkDeliveryInstruction as f3, type SdkIdentifyPayload as f4, type SdkIngestRequest as f5, type SdkIngestResponse as f6, type SdkPlatform as f7, type SdkSessionResponse as f8, type Segment as f9, type SurveyCampaignWithFlow as fA, type SurveyChoiceOption as fB, type SurveyDeliveryMode as fC, type SurveyEndCta as fD, type SurveyEndCtaKind as fE, type SurveyEndScreen as fF, type SurveyFlow as fG, type SurveyFollowUp as fH, type SurveyFunnelStep as fI, type SurveyLocalization as fJ, type SurveyNpsQuestion as fK, type SurveyOfferInstruction as fL, type SurveyProgressStyle as fM, type SurveyQuestion as fN, type SurveyQuestionDistribution as fO, type SurveyQuestionType as fP, type SurveyRatingQuestion as fQ, type SurveyRecipient as fR, type SurveyRecipientStatus as fS, type SurveyResponseRecord as fT, type SurveyShareLinkResponse as fU, type SurveyShortTextQuestion as fV, type SurveySummary as fW, type SurveyTemplate as fX, type SurveyTextValidation as fY, THEME_PRESETS as fZ, type TestPromptOnDeviceRequest as f_, type SegmentCondition as fa, type SegmentDsl as fb, type SegmentPreview as fc, type SerializedSegmentRules as fd, type ShortTextQuestion as fe, type SilentAck as ff, type SilentPushPayload as fg, type SingleChoiceQuestion as fh, type SingleDateQuestion as fi, type SubjectRef as fj, type SubmitRequestPayload as fk, type SubmitResponsePayload as fl, type SubmitSurveyAnswersRequest as fm, type Subscription as fn, type SubscriptionSource as fo, type SubscriptionStatus as fp, type SurveyAnalytics as fq, type SurveyAnswerRecord as fr, type SurveyAnswerValue as fs, type SurveyAttempt as ft, type SurveyAttemptSource as fu, type SurveyBranch as fv, type SurveyBranchCondition as fw, type SurveyBranchOp as fx, type SurveyBranchValue as fy, type SurveyCampaign as fz, type ActiveWindow as g, estimateProgress as g$, type ThemeMode as g0, type ThemePreset as g1, type TriggerKind as g2, type TriggerOccurrence as g3, type TriggerOccurrenceMode as g4, type TriggerSpec as g5, USER_IDENTIFIED_EVENT_NAME as g6, type UpdateAppOnboardingRequest as g7, type UpdateAppRequest as g8, type UpdateBrandThemeDefaultsRequest as g9, type UserPropertyRule as gA, type UserState as gB, type WebAppConfig as gC, type WebLayout as gD, type WebPresentation as gE, type Workspace as gF, type WorkspaceInvite as gG, type WorkspaceMember as gH, type WorkspacePlanGrant as gI, type WorkspaceRole as gJ, type WorkspaceWithRole as gK, type WriteKey as gL, brandTokensFromPreset as gM, buildPortalUrl as gN, contentAssetIds as gO, contentSlug as gP, contentText as gQ, defaultEventTrigger as gR, defaultOnboardingMessage as gS, defaultThemePreset as gT, defaultTriggerSpec as gU, deliveryPlatformsForApp as gV, emptyAudienceSpec as gW, emptyDocumentDraft as gX, emptySegmentDsl as gY, endpoints as gZ, err as g_, type UpdateBrandThemeRequest as ga, type UpdateCampaignRequest as gb, type UpdateCollection as gc, type UpdateCurrentUserRequest as gd, type UpdateDeviceTokenPayload as ge, type UpdateEventDefinitionRequest as gf, type UpdateGlobalFeatureFlagRequest as gg, type UpdateInAppMessageRequest as gh, type UpdateIntegrationRequest as gi, type UpdatePortalAppRequest as gj, type UpdatePortalRequest as gk, type UpdatePromptRequest as gl, type UpdateRequestModerationRequest as gm, type UpdateRequestResponseRequest as gn, type UpdateRequestSettingsRequest as go, type UpdateRequestStatusRequest as gp, type UpdateSurveyAttemptProgressRequest as gq, type UpdateSurveyRequest as gr, type UpdateWorkspaceRequest as gs, type UploadApnsCredentialRequest as gt, type UploadCredentialRequest as gu, type UploadFcmCredentialRequest as gv, type User as gw, type UserPropertiesUpdate as gx, type UserPropertyCondition as gy, type UserPropertyPredicate as gz, type AdminActivityEntry as h, evaluateBranchCondition as h0, evaluateSegment as h1, evaluateSerializedSegmentRules as h2, findQuestion as h3, findQuestionIndex as h4, getCoreIntegrationEvent as h5, getThemePresetById as h6, inAppColorsFromBrandTokens as h7, isSilentPushPayload as h8, nextPeriodicFire as h9, nextQuestionId as ha, ok as hb, personalizationSpecSchema as hc, personalizationToken as hd, personalizationUsage as he, promptThemeFromBrandTokens as hf, reachableQuestions as hg, renderPersonalizedContent as hh, renderPersonalizedValue as hi, requestAccentFromBrandTokens as hj, resolvePersonalizationBindings as hk, resolveWebPresentation as hl, safeContentHref as hm, sanitizeCoreIntegrationProperties as hn, serializedRulesToDsl as ho, suggestPortalSlug as hp, tzOffsetMinutes as hq, userPropertiesUpdateSchema as hr, validPortalSlug as hs, 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 AdminDashboardUserListRequest as q, type AdminDashboardUserListResponse as r, type AdminDashboardUserSummary as s, type AdminDeletionJob as t, type AdminDeletionKind as u, type AdminDeletionStatus as v, type AdminGrantStatus as w, type AdminSession as x, type AdminWorkspaceSummary as y, type AmplitudeIntegrationRegion as z };