@funnelsgrove/runtime 0.1.55 → 0.1.59

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.
Files changed (56) hide show
  1. package/dist/components/FunnelContext.d.ts +5 -1
  2. package/dist/components/FunnelContext.js +2 -1
  3. package/dist/components/ManageSubscriptionScreen.js +4 -1
  4. package/dist/components/SubscriptionHandoffScreen.d.ts +2 -1
  5. package/dist/components/SubscriptionHandoffScreen.js +11 -6
  6. package/dist/config/funnel.manifest.types.d.ts +4 -2
  7. package/dist/generated/step-contract-hash.d.ts +1 -0
  8. package/dist/generated/step-contract-hash.js +2 -0
  9. package/dist/index.d.ts +12 -0
  10. package/dist/index.js +10 -0
  11. package/dist/migrations/step-contract-v2.d.ts +50 -0
  12. package/dist/migrations/step-contract-v2.js +310 -0
  13. package/dist/migrations/step-contract-v3.d.ts +41 -0
  14. package/dist/migrations/step-contract-v3.js +26 -0
  15. package/dist/runtime/funnel-attribution.d.ts +1 -0
  16. package/dist/runtime/funnel-attribution.js +24 -0
  17. package/dist/runtime/funnel-manifest.validation.d.ts +7 -2
  18. package/dist/runtime/funnel-manifest.validation.js +24 -68
  19. package/dist/runtime/funnel-step-lifecycle.d.ts +35 -0
  20. package/dist/runtime/funnel-step-lifecycle.js +49 -0
  21. package/dist/runtime/funnel-step-metadata.validation.d.ts +7 -0
  22. package/dist/runtime/funnel-step-metadata.validation.js +88 -0
  23. package/dist/runtime/submit-email-capture.d.ts +23 -0
  24. package/dist/runtime/submit-email-capture.js +54 -0
  25. package/dist/runtime/use-funnel-flow-controller.d.ts +71 -5
  26. package/dist/runtime/use-funnel-flow-controller.js +850 -116
  27. package/dist/runtime/use-step-choices.d.ts +58 -0
  28. package/dist/runtime/use-step-choices.js +187 -0
  29. package/dist/sdk/userAnswers.d.ts +1 -0
  30. package/dist/services/api.service.d.ts +10 -0
  31. package/dist/services/api.service.js +32 -0
  32. package/dist/services/funnel-sdk.service.d.ts +17 -0
  33. package/dist/services/funnel-sdk.service.js +13 -0
  34. package/dist/steps/choice-contract.d.ts +33 -0
  35. package/dist/steps/choice-contract.js +302 -0
  36. package/dist/steps/step-contract.d.ts +498 -0
  37. package/dist/steps/step-contract.js +506 -0
  38. package/dist/steps/types.d.ts +7 -5
  39. package/dist/steps/types.js +1 -18
  40. package/dist/testing/funnel-contract-journey-driver.d.ts +35 -0
  41. package/dist/testing/funnel-contract-journey-driver.js +266 -0
  42. package/dist/testing/index.d.ts +1 -0
  43. package/dist/testing/index.js +1 -0
  44. package/dist/validation/fixtures/invalid-reserved-identities.d.ts +249 -0
  45. package/dist/validation/fixtures/invalid-reserved-identities.js +20 -0
  46. package/dist/validation/fixtures/valid-v2-project.d.ts +419 -0
  47. package/dist/validation/fixtures/valid-v2-project.js +228 -0
  48. package/dist/validation/fixtures/valid-v3-project.d.ts +419 -0
  49. package/dist/validation/fixtures/valid-v3-project.js +30 -0
  50. package/dist/validation/funnel-contract-diagnostics.d.ts +49 -0
  51. package/dist/validation/funnel-contract-diagnostics.js +67 -0
  52. package/dist/validation/funnel-contract-validator.d.ts +30 -0
  53. package/dist/validation/funnel-contract-validator.js +1458 -0
  54. package/dist/validation/funnel-manifest-input.normalization.d.ts +67 -0
  55. package/dist/validation/funnel-manifest-input.normalization.js +386 -0
  56. package/package.json +9 -1
@@ -0,0 +1,498 @@
1
+ import type { FunnelAnswerKey } from '../sdk/userAnswers.js';
2
+ export declare const CURRENT_STEP_CONTRACT_VERSION: 3;
3
+ export declare const PREVIOUS_STEP_CONTRACT_VERSION: 2;
4
+ export declare const LEGACY_UNVERSIONED_STEP_CONTRACT_VERSION: 1;
5
+ export declare const SUPPORTED_STEP_CONTRACT_VERSIONS: readonly [1, 2, 3];
6
+ export type FunnelStepContractVersion = (typeof SUPPORTED_STEP_CONTRACT_VERSIONS)[number];
7
+ export type FunnelStepKind = 'paywall' | 'upsell' | 'manage-subscription' | 'subscription-handoff' | 'cancellation';
8
+ export type FunnelStepFamily = 'content' | 'choice' | 'form' | 'transition' | 'commerce' | 'terminal';
9
+ export type FunnelStepActionOwner = 'shared-shell' | 'step' | 'either';
10
+ export type FunnelStepCapability = 'choice-write' | 'email-capture' | 'checkout' | 'subscription-management' | 'subscription-handoff' | 'hardcoded-navigation' | 'provider-direct-analytics' | 'browser-registration-completed';
11
+ export type FunnelAnalyticsEventName = 'funnel_started' | 'step_started' | 'step_completed' | 'step_exited' | 'first_step_viewed' | 'first_step_clicked' | 'step_engaged' | 'email_captured' | 'checkout_started' | 'add_payment_info' | 'checkout_completed' | 'funnel_completed' | 'purchase_completed' | 'registration_completed';
12
+ export type FunnelChoiceDescriptor = {
13
+ answerKey: FunnelAnswerKey;
14
+ allowEmpty?: boolean;
15
+ };
16
+ export type FunnelChoiceOption = {
17
+ id: string;
18
+ label: string;
19
+ imageSrc?: string;
20
+ iconKey?: string;
21
+ };
22
+ export type FunnelEmojiChoiceOption = {
23
+ id: string;
24
+ label: string;
25
+ emoji: string;
26
+ };
27
+ export type FunnelStepChoiceContract = {
28
+ cardinality: 'one' | 'many';
29
+ presentation: 'standard' | 'emoji';
30
+ completion: 'selection' | 'explicit';
31
+ allowEmptyConfig: boolean;
32
+ };
33
+ export type FunnelStepContractDefinition = {
34
+ family: FunnelStepFamily;
35
+ description: string;
36
+ allowedKinds: readonly FunnelStepKind[];
37
+ requiredKind?: FunnelStepKind;
38
+ choice?: FunnelStepChoiceContract;
39
+ actionOwner: FunnelStepActionOwner;
40
+ allowedCustomEvents: readonly FunnelAnalyticsEventName[];
41
+ forbiddenCapabilities: readonly FunnelStepCapability[];
42
+ terminal: boolean;
43
+ analyticsRole?: 'paywall' | 'complete-registration' | 'purchase-completed';
44
+ };
45
+ export declare const FUNNEL_STEP_CONTRACTS: {
46
+ readonly intro_hero: {
47
+ readonly family: "content";
48
+ readonly description: "Opening promise or low-friction entry screen.";
49
+ readonly allowedKinds: readonly [];
50
+ readonly actionOwner: "shared-shell";
51
+ readonly allowedCustomEvents: readonly [];
52
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
53
+ readonly terminal: false;
54
+ };
55
+ readonly value_prop_story: {
56
+ readonly family: "content";
57
+ readonly description: "Benefit, explanation, motivation, or narrative value screen.";
58
+ readonly allowedKinds: readonly [];
59
+ readonly actionOwner: "shared-shell";
60
+ readonly allowedCustomEvents: readonly [];
61
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
62
+ readonly terminal: false;
63
+ };
64
+ readonly single_step_choice: {
65
+ readonly family: "choice";
66
+ readonly description: "Exactly one standard option is selected.";
67
+ readonly allowedKinds: readonly [];
68
+ readonly choice: {
69
+ readonly cardinality: "one";
70
+ readonly presentation: "standard";
71
+ readonly completion: "selection";
72
+ readonly allowEmptyConfig: false;
73
+ };
74
+ readonly actionOwner: "step";
75
+ readonly allowedCustomEvents: readonly [];
76
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
77
+ readonly terminal: false;
78
+ };
79
+ readonly single_step_choice_emoji: {
80
+ readonly family: "choice";
81
+ readonly description: "Exactly one emoji-led option is selected.";
82
+ readonly allowedKinds: readonly [];
83
+ readonly choice: {
84
+ readonly cardinality: "one";
85
+ readonly presentation: "emoji";
86
+ readonly completion: "selection";
87
+ readonly allowEmptyConfig: false;
88
+ };
89
+ readonly actionOwner: "step";
90
+ readonly allowedCustomEvents: readonly [];
91
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
92
+ readonly terminal: false;
93
+ };
94
+ readonly multi_select_choice: {
95
+ readonly family: "choice";
96
+ readonly description: "Multiple options are selected before explicit completion.";
97
+ readonly allowedKinds: readonly [];
98
+ readonly choice: {
99
+ readonly cardinality: "many";
100
+ readonly presentation: "standard";
101
+ readonly completion: "explicit";
102
+ readonly allowEmptyConfig: true;
103
+ };
104
+ readonly actionOwner: "either";
105
+ readonly allowedCustomEvents: readonly [];
106
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
107
+ readonly terminal: false;
108
+ };
109
+ readonly form_input: {
110
+ readonly family: "form";
111
+ readonly description: "Non-choice structured input, including reserved email capture.";
112
+ readonly allowedKinds: readonly [];
113
+ readonly actionOwner: "either";
114
+ readonly allowedCustomEvents: readonly ["email_captured"];
115
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
116
+ readonly terminal: false;
117
+ };
118
+ readonly social_proof: {
119
+ readonly family: "content";
120
+ readonly description: "Testimonials, reviews, credibility, or evidence.";
121
+ readonly allowedKinds: readonly [];
122
+ readonly actionOwner: "shared-shell";
123
+ readonly allowedCustomEvents: readonly [];
124
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
125
+ readonly terminal: false;
126
+ };
127
+ readonly progress_interstitial: {
128
+ readonly family: "transition";
129
+ readonly description: "Progress, calculation, loading, reveal, or transition screen.";
130
+ readonly allowedKinds: readonly [];
131
+ readonly actionOwner: "either";
132
+ readonly allowedCustomEvents: readonly [];
133
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
134
+ readonly terminal: false;
135
+ };
136
+ readonly paywall_offer: {
137
+ readonly family: "commerce";
138
+ readonly description: "A monetization offer that presents purchasable plans.";
139
+ readonly allowedKinds: readonly ["paywall"];
140
+ readonly requiredKind: "paywall";
141
+ readonly actionOwner: "step";
142
+ readonly allowedCustomEvents: readonly ["checkout_started", "add_payment_info", "checkout_completed"];
143
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
144
+ readonly terminal: false;
145
+ readonly analyticsRole: "paywall";
146
+ };
147
+ readonly upsell_offer: {
148
+ readonly family: "commerce";
149
+ readonly description: "A post-purchase or upgrade offer.";
150
+ readonly allowedKinds: readonly ["upsell"];
151
+ readonly requiredKind: "upsell";
152
+ readonly actionOwner: "step";
153
+ readonly allowedCustomEvents: readonly ["checkout_started", "add_payment_info", "checkout_completed"];
154
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
155
+ readonly terminal: false;
156
+ };
157
+ readonly checkout: {
158
+ readonly family: "commerce";
159
+ readonly description: "A dedicated payment-entry screen.";
160
+ readonly allowedKinds: readonly [];
161
+ readonly actionOwner: "step";
162
+ readonly allowedCustomEvents: readonly ["checkout_started", "add_payment_info", "checkout_completed"];
163
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
164
+ readonly terminal: false;
165
+ };
166
+ readonly subscription_management: {
167
+ readonly family: "commerce";
168
+ readonly description: "A screen for managing or inspecting an existing subscription.";
169
+ readonly allowedKinds: readonly ["manage-subscription"];
170
+ readonly requiredKind: "manage-subscription";
171
+ readonly actionOwner: "step";
172
+ readonly allowedCustomEvents: readonly [];
173
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
174
+ readonly terminal: false;
175
+ };
176
+ readonly subscription_handoff: {
177
+ readonly family: "commerce";
178
+ readonly description: "A non-terminal app, store, or deep-link handoff.";
179
+ readonly allowedKinds: readonly ["subscription-handoff"];
180
+ readonly requiredKind: "subscription-handoff";
181
+ readonly actionOwner: "step";
182
+ readonly allowedCustomEvents: readonly [];
183
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
184
+ readonly terminal: false;
185
+ };
186
+ readonly cancellation_offer: {
187
+ readonly family: "commerce";
188
+ readonly description: "A cancellation retention or downsell surface.";
189
+ readonly allowedKinds: readonly ["cancellation"];
190
+ readonly requiredKind: "cancellation";
191
+ readonly actionOwner: "step";
192
+ readonly allowedCustomEvents: readonly [];
193
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
194
+ readonly terminal: false;
195
+ };
196
+ readonly summary_confirmation: {
197
+ readonly family: "content";
198
+ readonly description: "A summary, review, or confirmation before the next action.";
199
+ readonly allowedKinds: readonly [];
200
+ readonly actionOwner: "either";
201
+ readonly allowedCustomEvents: readonly [];
202
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
203
+ readonly terminal: false;
204
+ };
205
+ readonly complete_registration: {
206
+ readonly family: "terminal";
207
+ readonly description: "The canonical post-purchase terminal that continues into the app.";
208
+ readonly allowedKinds: readonly ["subscription-handoff"];
209
+ readonly requiredKind: "subscription-handoff";
210
+ readonly actionOwner: "step";
211
+ readonly allowedCustomEvents: readonly ["funnel_completed"];
212
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
213
+ readonly terminal: true;
214
+ readonly analyticsRole: "complete-registration";
215
+ };
216
+ readonly purchase_completed: {
217
+ readonly family: "terminal";
218
+ readonly description: "The canonical terminal shown after a verified initial purchase.";
219
+ readonly allowedKinds: readonly ["subscription-handoff"];
220
+ readonly requiredKind: "subscription-handoff";
221
+ readonly actionOwner: "step";
222
+ readonly allowedCustomEvents: readonly ["funnel_completed"];
223
+ readonly forbiddenCapabilities: readonly FunnelStepCapability[];
224
+ readonly terminal: true;
225
+ readonly analyticsRole: "purchase-completed";
226
+ };
227
+ };
228
+ export type FunnelStepType = keyof typeof FUNNEL_STEP_CONTRACTS;
229
+ export declare const FUNNEL_STEP_TYPES: readonly ("intro_hero" | "purchase_completed" | "checkout" | "value_prop_story" | "single_step_choice" | "single_step_choice_emoji" | "multi_select_choice" | "form_input" | "social_proof" | "progress_interstitial" | "paywall_offer" | "upsell_offer" | "subscription_management" | "subscription_handoff" | "cancellation_offer" | "summary_confirmation" | "complete_registration")[];
230
+ export type FunnelReservedStepExactContract = {
231
+ match: 'exact';
232
+ id: string;
233
+ name: string;
234
+ type: FunnelStepType;
235
+ kind?: FunnelStepKind;
236
+ unique: boolean;
237
+ primary?: boolean;
238
+ };
239
+ export type FunnelReservedStepPatternContract = {
240
+ match: 'pattern';
241
+ idPattern: string;
242
+ namePattern: string;
243
+ type: FunnelStepType;
244
+ kind?: FunnelStepKind;
245
+ unique: boolean;
246
+ primary?: boolean;
247
+ };
248
+ export type FunnelReservedStepContract = FunnelReservedStepExactContract | FunnelReservedStepPatternContract;
249
+ export declare const FUNNEL_RESERVED_STEP_CONTRACTS: {
250
+ readonly 'email-capture': {
251
+ readonly match: "exact";
252
+ readonly id: "email-capture";
253
+ readonly name: "email-capture";
254
+ readonly type: "form_input";
255
+ readonly unique: true;
256
+ };
257
+ readonly paywall: {
258
+ readonly match: "exact";
259
+ readonly id: "paywall";
260
+ readonly name: "paywall";
261
+ readonly type: "paywall_offer";
262
+ readonly kind: "paywall";
263
+ readonly unique: true;
264
+ readonly primary: true;
265
+ };
266
+ readonly 'paywall-variant': {
267
+ readonly match: "pattern";
268
+ readonly idPattern: "^paywall-[a-z0-9-]+$";
269
+ readonly namePattern: "^paywall-[a-z0-9-]+$";
270
+ readonly type: "paywall_offer";
271
+ readonly kind: "paywall";
272
+ readonly unique: false;
273
+ readonly primary: false;
274
+ };
275
+ readonly 'subscription-started': {
276
+ readonly match: "exact";
277
+ readonly id: "subscription-started";
278
+ readonly name: "subscription-started";
279
+ readonly type: "purchase_completed";
280
+ readonly kind: "subscription-handoff";
281
+ readonly unique: true;
282
+ };
283
+ readonly 'manage-subscription': {
284
+ readonly match: "exact";
285
+ readonly id: "manage-subscription";
286
+ readonly name: "manage-subscription";
287
+ readonly type: "subscription_management";
288
+ readonly kind: "manage-subscription";
289
+ readonly unique: true;
290
+ };
291
+ };
292
+ export declare const resolveStepTypeContract: (version: number, type: string) => FunnelStepContractDefinition | undefined;
293
+ export declare const resolveReservedStepContract: (version: number, identity: string) => FunnelReservedStepContract | undefined;
294
+ export type FunnelStepTypeScope = readonly FunnelStepType[] | 'any';
295
+ export type FunnelStepIdentityScope = readonly string[] | 'any';
296
+ export type FunnelStepCapabilityRule = {
297
+ allowedStepTypes: FunnelStepTypeScope;
298
+ allowedStepIdentities: FunnelStepIdentityScope;
299
+ requiredOwner: string;
300
+ };
301
+ export declare const FUNNEL_STEP_CAPABILITY_RULES: {
302
+ readonly 'choice-write': {
303
+ readonly allowedStepTypes: readonly ["single_step_choice", "single_step_choice_emoji", "multi_select_choice"];
304
+ readonly allowedStepIdentities: "any";
305
+ readonly requiredOwner: "useStepChoices";
306
+ };
307
+ readonly 'email-capture': {
308
+ readonly allowedStepTypes: readonly ["form_input"];
309
+ readonly allowedStepIdentities: readonly ["email-capture"];
310
+ readonly requiredOwner: "submitEmailCapture";
311
+ };
312
+ readonly checkout: {
313
+ readonly allowedStepTypes: readonly ["paywall_offer", "upsell_offer", "checkout"];
314
+ readonly allowedStepIdentities: "any";
315
+ readonly requiredOwner: "named-payment-helpers";
316
+ };
317
+ readonly 'subscription-management': {
318
+ readonly allowedStepTypes: readonly ["subscription_management", "cancellation_offer"];
319
+ readonly allowedStepIdentities: "any";
320
+ readonly requiredOwner: "runtime-subscription-helpers";
321
+ };
322
+ readonly 'subscription-handoff': {
323
+ readonly allowedStepTypes: readonly ["subscription_handoff", "complete_registration", "purchase_completed"];
324
+ readonly allowedStepIdentities: "any";
325
+ readonly requiredOwner: "runtime-handoff-helper";
326
+ };
327
+ readonly 'hardcoded-navigation': {
328
+ readonly allowedStepTypes: readonly [];
329
+ readonly allowedStepIdentities: readonly [];
330
+ readonly requiredOwner: "manifest-flow-controller";
331
+ };
332
+ readonly 'provider-direct-analytics': {
333
+ readonly allowedStepTypes: readonly [];
334
+ readonly allowedStepIdentities: readonly [];
335
+ readonly requiredOwner: "analytics-adapter-outbox";
336
+ };
337
+ readonly 'browser-registration-completed': {
338
+ readonly allowedStepTypes: readonly [];
339
+ readonly allowedStepIdentities: readonly [];
340
+ readonly requiredOwner: "trusted-subscription-claim-server";
341
+ };
342
+ };
343
+ export type FunnelAnalyticsEventOwner = 'controller' | 'transactional-server' | 'named-helper' | 'terminal-helper' | 'trusted-server';
344
+ export type FunnelAnalyticsEventDedupeScope = 'funnel-run' | 'step-visit' | 'logical-email-conversion' | 'event-id' | 'subscription-claim' | 'provider-payment';
345
+ export type FunnelAnalyticsEventContract = {
346
+ rawName: string;
347
+ publicName: FunnelAnalyticsEventName;
348
+ owner: FunnelAnalyticsEventOwner;
349
+ automatic: boolean;
350
+ requiredMetadata: readonly string[];
351
+ allowedStepTypes: FunnelStepTypeScope;
352
+ allowedStepIdentities: FunnelStepIdentityScope;
353
+ dedupeScope: FunnelAnalyticsEventDedupeScope;
354
+ };
355
+ export declare const FUNNEL_ANALYTICS_EVENT_CONTRACTS: {
356
+ readonly funnel_started: {
357
+ readonly rawName: "funnel_start";
358
+ readonly publicName: "funnel_started";
359
+ readonly owner: "controller";
360
+ readonly automatic: true;
361
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion"];
362
+ readonly allowedStepTypes: "any";
363
+ readonly allowedStepIdentities: "any";
364
+ readonly dedupeScope: "funnel-run";
365
+ };
366
+ readonly step_started: {
367
+ readonly rawName: "step_start";
368
+ readonly publicName: "step_started";
369
+ readonly owner: "controller";
370
+ readonly automatic: true;
371
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType"];
372
+ readonly allowedStepTypes: "any";
373
+ readonly allowedStepIdentities: "any";
374
+ readonly dedupeScope: "step-visit";
375
+ };
376
+ readonly step_completed: {
377
+ readonly rawName: "step_end";
378
+ readonly publicName: "step_completed";
379
+ readonly owner: "controller";
380
+ readonly automatic: true;
381
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType"];
382
+ readonly allowedStepTypes: "any";
383
+ readonly allowedStepIdentities: "any";
384
+ readonly dedupeScope: "step-visit";
385
+ };
386
+ readonly step_exited: {
387
+ readonly rawName: "step_exit";
388
+ readonly publicName: "step_exited";
389
+ readonly owner: "controller";
390
+ readonly automatic: true;
391
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType"];
392
+ readonly allowedStepTypes: "any";
393
+ readonly allowedStepIdentities: "any";
394
+ readonly dedupeScope: "step-visit";
395
+ };
396
+ readonly first_step_viewed: {
397
+ readonly rawName: "first_step_viewed";
398
+ readonly publicName: "first_step_viewed";
399
+ readonly owner: "controller";
400
+ readonly automatic: true;
401
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType"];
402
+ readonly allowedStepTypes: "any";
403
+ readonly allowedStepIdentities: "any";
404
+ readonly dedupeScope: "step-visit";
405
+ };
406
+ readonly first_step_clicked: {
407
+ readonly rawName: "first_step_clicked";
408
+ readonly publicName: "first_step_clicked";
409
+ readonly owner: "controller";
410
+ readonly automatic: true;
411
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType"];
412
+ readonly allowedStepTypes: "any";
413
+ readonly allowedStepIdentities: "any";
414
+ readonly dedupeScope: "step-visit";
415
+ };
416
+ readonly step_engaged: {
417
+ readonly rawName: "step_engaged";
418
+ readonly publicName: "step_engaged";
419
+ readonly owner: "controller";
420
+ readonly automatic: false;
421
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType", "durationMs"];
422
+ readonly allowedStepTypes: "any";
423
+ readonly allowedStepIdentities: "any";
424
+ readonly dedupeScope: "step-visit";
425
+ };
426
+ readonly email_captured: {
427
+ readonly rawName: "email_captured";
428
+ readonly publicName: "email_captured";
429
+ readonly owner: "transactional-server";
430
+ readonly automatic: false;
431
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType", "projectId", "funnelEndUserId", "eventId"];
432
+ readonly allowedStepTypes: readonly ["form_input"];
433
+ readonly allowedStepIdentities: readonly ["email-capture"];
434
+ readonly dedupeScope: "logical-email-conversion";
435
+ };
436
+ readonly checkout_started: {
437
+ readonly rawName: "checkout_started";
438
+ readonly publicName: "checkout_started";
439
+ readonly owner: "named-helper";
440
+ readonly automatic: false;
441
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType", "eventId"];
442
+ readonly allowedStepTypes: readonly ["paywall_offer", "upsell_offer", "checkout"];
443
+ readonly allowedStepIdentities: "any";
444
+ readonly dedupeScope: "event-id";
445
+ };
446
+ readonly add_payment_info: {
447
+ readonly rawName: "add_payment_info";
448
+ readonly publicName: "add_payment_info";
449
+ readonly owner: "named-helper";
450
+ readonly automatic: false;
451
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType", "eventId"];
452
+ readonly allowedStepTypes: readonly ["paywall_offer", "upsell_offer", "checkout"];
453
+ readonly allowedStepIdentities: "any";
454
+ readonly dedupeScope: "event-id";
455
+ };
456
+ readonly checkout_completed: {
457
+ readonly rawName: "checkout_completed";
458
+ readonly publicName: "checkout_completed";
459
+ readonly owner: "named-helper";
460
+ readonly automatic: false;
461
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType", "eventId"];
462
+ readonly allowedStepTypes: readonly ["paywall_offer", "upsell_offer", "checkout"];
463
+ readonly allowedStepIdentities: "any";
464
+ readonly dedupeScope: "event-id";
465
+ };
466
+ readonly funnel_completed: {
467
+ readonly rawName: "funnel_completed";
468
+ readonly publicName: "funnel_completed";
469
+ readonly owner: "terminal-helper";
470
+ readonly automatic: false;
471
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "stepId", "stepName", "stepType", "eventId"];
472
+ readonly allowedStepTypes: readonly ["complete_registration", "purchase_completed"];
473
+ readonly allowedStepIdentities: "any";
474
+ readonly dedupeScope: "funnel-run";
475
+ };
476
+ readonly registration_completed: {
477
+ readonly rawName: "registration_completed";
478
+ readonly publicName: "registration_completed";
479
+ readonly owner: "trusted-server";
480
+ readonly automatic: false;
481
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "projectId", "funnelEndUserId", "eventId", "subscriptionClaimId"];
482
+ readonly allowedStepTypes: readonly [];
483
+ readonly allowedStepIdentities: readonly [];
484
+ readonly dedupeScope: "subscription-claim";
485
+ };
486
+ readonly purchase_completed: {
487
+ readonly rawName: "purchase_completed";
488
+ readonly publicName: "purchase_completed";
489
+ readonly owner: "trusted-server";
490
+ readonly automatic: false;
491
+ readonly requiredMetadata: readonly ["funnelId", "funnelVersionId", "environment", "stepContractVersion", "projectId", "funnelEndUserId", "eventId", "providerPaymentId", "purchaseKind"];
492
+ readonly allowedStepTypes: readonly [];
493
+ readonly allowedStepIdentities: readonly [];
494
+ readonly dedupeScope: "provider-payment";
495
+ };
496
+ };
497
+ export declare const DEFERRABLE_FUNNEL_CONTRACT_DIAGNOSTIC_CODES: readonly ["FG-PARITY-001", "FG-REGISTRY-001", "FG-CONTENT-001", "FG-FLOW-001"];
498
+ export type DeferrableFunnelContractDiagnosticCode = (typeof DEFERRABLE_FUNNEL_CONTRACT_DIAGNOSTIC_CODES)[number];