flowgrid-sdk 1.1.0 → 1.2.1

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 (65) hide show
  1. package/README.md +320 -8
  2. package/dist/browser.d.ts +6 -7
  3. package/dist/flowgrid.min.js +1 -1
  4. package/dist/flowgrid.min.js.map +1 -1
  5. package/dist/index.d.ts +11 -4
  6. package/dist/index.js +1 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/lib/client/transport.d.ts +175 -0
  9. package/dist/lib/consent/index.d.ts +37 -0
  10. package/dist/lib/consent/manager.d.ts +197 -0
  11. package/dist/lib/consent/types.d.ts +162 -0
  12. package/dist/lib/features/analytics/attribution.d.ts +3 -3
  13. package/dist/lib/features/analytics/events.d.ts +3 -3
  14. package/dist/lib/features/analytics/funnels.d.ts +3 -3
  15. package/dist/lib/features/analytics/heatmaps.d.ts +9 -3
  16. package/dist/lib/features/analytics/identify.d.ts +3 -3
  17. package/dist/lib/features/analytics/page-views.d.ts +3 -3
  18. package/dist/lib/features/analytics/performance.d.ts +3 -3
  19. package/dist/lib/features/analytics/retention.d.ts +3 -3
  20. package/dist/lib/features/analytics/sessions.d.ts +3 -3
  21. package/dist/lib/features/core/activation.d.ts +3 -3
  22. package/dist/lib/features/core/experiment.d.ts +86 -70
  23. package/dist/lib/features/core/index.d.ts +1 -3
  24. package/dist/lib/features/core/track-feature.d.ts +3 -3
  25. package/dist/lib/features/core/track-prompt.d.ts +3 -3
  26. package/dist/lib/features/ecommerce/cart.d.ts +3 -3
  27. package/dist/lib/features/ecommerce/checkout.d.ts +3 -3
  28. package/dist/lib/features/ecommerce/inventory.d.ts +3 -3
  29. package/dist/lib/features/ecommerce/ltv.d.ts +3 -3
  30. package/dist/lib/features/ecommerce/products.d.ts +3 -3
  31. package/dist/lib/features/ecommerce/promotions.d.ts +3 -3
  32. package/dist/lib/features/ecommerce/purchases.d.ts +3 -3
  33. package/dist/lib/features/ecommerce/refunds.d.ts +3 -3
  34. package/dist/lib/features/ecommerce/search.d.ts +3 -3
  35. package/dist/lib/features/ecommerce/subscriptions.d.ts +3 -3
  36. package/dist/lib/features/ecommerce/wishlist.d.ts +3 -3
  37. package/dist/lib/features/enterprise/acquisition.d.ts +2 -2
  38. package/dist/lib/features/enterprise/alerts.d.ts +2 -2
  39. package/dist/lib/features/enterprise/churn.d.ts +2 -2
  40. package/dist/lib/features/enterprise/cohorts.d.ts +2 -2
  41. package/dist/lib/features/enterprise/engagement.d.ts +24 -3
  42. package/dist/lib/features/enterprise/forecasting.d.ts +2 -2
  43. package/dist/lib/features/enterprise/monetization.d.ts +2 -2
  44. package/dist/lib/features/enterprise/multi-path-funnels.d.ts +2 -2
  45. package/dist/lib/features/enterprise/paths.d.ts +2 -2
  46. package/dist/lib/features/enterprise/security.d.ts +2 -2
  47. package/dist/lib/features/enterprise/support.d.ts +2 -2
  48. package/dist/lib/frameworks/nextjs/client.d.ts +7 -13
  49. package/dist/lib/frameworks/nextjs/server.d.ts +5 -15
  50. package/dist/lib/frameworks/node/index.d.ts +2 -6
  51. package/dist/lib/frameworks/nuxt/index.d.ts +7 -3
  52. package/dist/lib/frameworks/react/CookieBanner.d.ts +91 -0
  53. package/dist/lib/frameworks/react/index.d.ts +98 -136
  54. package/dist/lib/frameworks/vue/CookieBanner.d.ts +82 -0
  55. package/dist/lib/frameworks/vue/index.d.ts +30 -27
  56. package/dist/lib/types/analytics.d.ts +62 -0
  57. package/dist/lib/types/common.d.ts +2 -0
  58. package/dist/lib/utils/identity.d.ts +93 -0
  59. package/dist/lib/utils/storage.d.ts +69 -0
  60. package/package.json +13 -2
  61. package/dist/lib/client/enterprise-ftrpc.d.ts +0 -51
  62. package/dist/lib/client/ftrpc.d.ts +0 -132
  63. package/dist/lib/client/modules.d.ts +0 -104
  64. package/dist/lib/features/core/feature-flag.d.ts +0 -249
  65. package/dist/lib/utils/functions.d.ts +0 -1
@@ -42,7 +42,7 @@
42
42
  * });
43
43
  * ```
44
44
  */
45
- import { FTRPC } from "../../client/ftrpc";
45
+ import { FlowGridTransport } from "../../client/transport";
46
46
  import { UserTraits, MoneyValue, DateRangeFilter, TimeSeriesData } from "../../types";
47
47
  /**
48
48
  * Configuration for identifying a user.
@@ -126,7 +126,7 @@ export interface UserAnalyticsData {
126
126
  /**
127
127
  * Identify - User identification and trait management.
128
128
  *
129
- * @extends FTRPC
129
+ * @extends FlowGridTransport
130
130
  *
131
131
  * @description
132
132
  * Provides user identification capabilities including:
@@ -160,7 +160,7 @@ export interface UserAnalyticsData {
160
160
  * });
161
161
  * ```
162
162
  */
163
- export declare class Identify extends FTRPC {
163
+ export declare class Identify extends FlowGridTransport {
164
164
  /**
165
165
  * Identifies a user with traits.
166
166
  *
@@ -46,7 +46,7 @@
46
46
  * });
47
47
  * ```
48
48
  */
49
- import { FTRPC } from "../../client/ftrpc";
49
+ import { FlowGridTransport } from "../../client/transport";
50
50
  import { TimeSeriesData, DateRangeFilter, PaginationParams } from "../../types";
51
51
  /**
52
52
  * Configuration for tracking a page view.
@@ -128,7 +128,7 @@ export interface PageAnalyticsData {
128
128
  /**
129
129
  * PageViews - Track and analyze page view events.
130
130
  *
131
- * @extends FTRPC
131
+ * @extends FlowGridTransport
132
132
  *
133
133
  * @description
134
134
  * Provides comprehensive page view tracking with support for:
@@ -161,7 +161,7 @@ export interface PageAnalyticsData {
161
161
  * }));
162
162
  * ```
163
163
  */
164
- export declare class PageViews extends FTRPC {
164
+ export declare class PageViews extends FlowGridTransport {
165
165
  /**
166
166
  * Tracks a page view event.
167
167
  *
@@ -39,7 +39,7 @@
39
39
  * });
40
40
  * ```
41
41
  */
42
- import { FTRPC } from "../../client/ftrpc";
42
+ import { FlowGridTransport } from "../../client/transport";
43
43
  import { DateRangeFilter, TimeSeriesData } from "../../types";
44
44
  /**
45
45
  * Core Web Vitals data.
@@ -190,7 +190,7 @@ export interface PerformanceAnalyticsData {
190
190
  /**
191
191
  * Performance - Track web performance metrics.
192
192
  *
193
- * @extends FTRPC
193
+ * @extends FlowGridTransport
194
194
  *
195
195
  * @description
196
196
  * Provides performance monitoring including:
@@ -219,7 +219,7 @@ export interface PerformanceAnalyticsData {
219
219
  * console.log(`Performance Score: ${report.performanceScore}`);
220
220
  * ```
221
221
  */
222
- export declare class PerformanceTracking extends FTRPC {
222
+ export declare class PerformanceTracking extends FlowGridTransport {
223
223
  /**
224
224
  * Tracks Core Web Vitals.
225
225
  *
@@ -43,7 +43,7 @@
43
43
  * });
44
44
  * ```
45
45
  */
46
- import { FTRPC } from "../../client/ftrpc";
46
+ import { FlowGridTransport } from "../../client/transport";
47
47
  import { RetentionCohort, UserLifecycleStage, LifecycleMetrics, DateRangeFilter, TimeGranularity, TimeSeriesData } from "../../types";
48
48
  /**
49
49
  * Configuration for tracking user activity.
@@ -152,7 +152,7 @@ export interface ChurnAnalysisData {
152
152
  /**
153
153
  * Retention - Track and analyze user retention.
154
154
  *
155
- * @extends FTRPC
155
+ * @extends FlowGridTransport
156
156
  *
157
157
  * @description
158
158
  * Provides retention analysis capabilities including:
@@ -182,7 +182,7 @@ export interface ChurnAnalysisData {
182
182
  * const heatmapData = analysis.matrix;
183
183
  * ```
184
184
  */
185
- export declare class Retention extends FTRPC {
185
+ export declare class Retention extends FlowGridTransport {
186
186
  /**
187
187
  * Tracks user activity for retention calculation.
188
188
  *
@@ -43,7 +43,7 @@
43
43
  * await sessions.end(session.sessionId);
44
44
  * ```
45
45
  */
46
- import { FTRPC } from "../../client/ftrpc";
46
+ import { FlowGridTransport } from "../../client/transport";
47
47
  import { DeviceInfo, GeoLocation, UTMParams, TimeSeriesData, DateRangeFilter, PaginationParams, UserIdentity } from "../../types";
48
48
  /**
49
49
  * Configuration for starting a new session.
@@ -156,7 +156,7 @@ export interface RealTimeSessionData {
156
156
  /**
157
157
  * Sessions - Track and analyze user sessions.
158
158
  *
159
- * @extends FTRPC
159
+ * @extends FlowGridTransport
160
160
  *
161
161
  * @description
162
162
  * Provides comprehensive session tracking including:
@@ -183,7 +183,7 @@ export interface RealTimeSessionData {
183
183
  * console.log(`${realTime.activeSessions} users online`);
184
184
  * ```
185
185
  */
186
- export declare class Sessions extends FTRPC {
186
+ export declare class Sessions extends FlowGridTransport {
187
187
  /**
188
188
  * Starts a new user session.
189
189
  *
@@ -37,7 +37,7 @@
37
37
  * });
38
38
  * ```
39
39
  */
40
- import { FTRPC } from "../../client/ftrpc";
40
+ import { FlowGridTransport } from "../../client/transport";
41
41
  import { DateRangeFilter, TimeSeriesData } from "../../types";
42
42
  /**
43
43
  * Base configuration for activation events.
@@ -139,7 +139,7 @@ export interface ActivationAnalyticsData {
139
139
  /**
140
140
  * Activation - Track user activation events.
141
141
  *
142
- * @extends FTRPC
142
+ * @extends FlowGridTransport
143
143
  *
144
144
  * @description
145
145
  * Provides activation tracking including:
@@ -170,7 +170,7 @@ export interface ActivationAnalyticsData {
170
170
  * });
171
171
  * ```
172
172
  */
173
- export declare class Activation extends FTRPC {
173
+ export declare class Activation extends FlowGridTransport {
174
174
  /**
175
175
  * Creates and tracks an activation event.
176
176
  *
@@ -37,7 +37,7 @@
37
37
  * });
38
38
  * ```
39
39
  */
40
- import { FTRPC } from "../../client/ftrpc";
40
+ import { FlowGridTransport } from "../../client/transport";
41
41
  import { DateRangeFilter, TimeSeriesData } from "../../types";
42
42
  /**
43
43
  * Configuration for tracking an experiment-related event.
@@ -235,10 +235,31 @@ export interface VariantResponse {
235
235
  variantId: string;
236
236
  assignedAt: string;
237
237
  }
238
+ /**
239
+ * Local experiment variant definition used by the client-side
240
+ * assignment engine (ported from sdk.js).
241
+ */
242
+ export interface ExperimentVariant {
243
+ /** Variant identifier */
244
+ id: string;
245
+ /** Traffic allocation weight */
246
+ weight: number;
247
+ }
248
+ /**
249
+ * Lightweight experiment config passed to `initExperiments()`.
250
+ */
251
+ export interface ExperimentInitConfig {
252
+ /** Unique experiment identifier */
253
+ id: string;
254
+ /** Weighted variant list */
255
+ variants: ExperimentVariant[];
256
+ /** Optional properties forwarded to the verify endpoint */
257
+ properties?: Record<string, unknown>;
258
+ }
238
259
  /**
239
260
  * Experiment - A/B Testing & Experimentation SDK
240
261
  *
241
- * @extends FTRPC
262
+ * @extends FlowGridTransport
242
263
  *
243
264
  * @description
244
265
  * Provides structured experiment lifecycle management including:
@@ -313,98 +334,93 @@ export interface VariantResponse {
313
334
  * const results = await experiment.getResults('checkout_v2');
314
335
  * ```
315
336
  */
316
- export declare class Experiment extends FTRPC {
337
+ export declare class Experiment extends FlowGridTransport {
338
+ /** Verified experiment configs: { [experiment_id]: { variants, properties, verified } } */
339
+ private experiments;
340
+ /** Local variant assignments: { [experiment_id]: variant_id } */
341
+ private assignments;
342
+ private loadAssignments;
343
+ private saveAssignments;
344
+ /**
345
+ * Inject assignments from server context (SSR/Node).
346
+ * Use this when assignments were resolved server-side and need to be
347
+ * available before localStorage is accessible.
348
+ */
349
+ injectAssignments(assignments: Record<string, string>): void;
350
+ /**
351
+ * Returns all current assignments (for SSR hydration).
352
+ */
353
+ getAssignments(): Record<string, string>;
354
+ private static readonly ANON_ID_KEY;
317
355
  /**
318
- * Tracks an experiment event.
356
+ * Returns a stable anonymous ID. Generates a UUID on first call and
357
+ * persists it in localStorage so the same anonymous visitor always
358
+ * receives a consistent variant assignment.
359
+ */
360
+ private getOrCreateAnonId;
361
+ /**
362
+ * Deterministic variant assignment using FNV-1a hash.
363
+ * Same userId + experimentId always produces the same variant.
364
+ */
365
+ private deterministicAssign;
366
+ private assignVariant;
367
+ private verifyExperiments;
368
+ /**
369
+ * Initialise the client-side experiment engine.
370
+ *
371
+ * Verifies experiment configs against the API, assigns variants using
372
+ * weighted random allocation, and persists assignments in localStorage
373
+ * under `fg_exp_assignments`.
319
374
  *
320
- * @param config - Experiment configuration
321
- * @returns Promise resolving to experiment response
375
+ * @param experiments - Array of experiment configs to register
376
+ */
377
+ initExperiments(experiments: ExperimentInitConfig[]): Promise<void>;
378
+ /**
379
+ * Returns the locally assigned variant for an experiment.
380
+ *
381
+ * Reads from the in-memory assignment map (backed by localStorage).
382
+ * Returns `null` if no assignment exists.
383
+ */
384
+ getLocalVariant(experimentId: string): string | null;
385
+ /**
386
+ * Track a conversion against the locally assigned variant.
387
+ *
388
+ * No-op if the visitor has no assignment for this experiment.
389
+ */
390
+ trackLocalConversion(experimentId: string, metricName?: string, metricValue?: number): Promise<void>;
391
+ /**
392
+ * @deprecated Use `assign()`, `trackExposure()`, or `trackConversion()` instead.
393
+ * The generic `track()` method sends events without a subtype, which the
394
+ * backend handler rejects. It is retained only for backwards compatibility
395
+ * and will be removed in a future major version.
322
396
  */
323
397
  track(config: ExperimentConfig): Promise<ExperimentResponse>;
324
398
  /**
325
399
  * Defines a new experiment.
326
- *
327
- * @param definition - Experiment definition
328
- * @returns Promise resolving to experiment response
329
400
  */
330
401
  define(definition: ExperimentDefinition): Promise<ExperimentResponse>;
331
402
  /**
332
- * Assigns a user to a variant.
333
- *
334
- * This operation records assignment.
335
- * Assignment should occur before exposure tracking.
336
- *
337
- * @param config - Assignment configuration
338
- * @returns Promise resolving to ExperimentResponse
339
- *
340
- * @notes
341
- * - Assignment does not imply exposure.
342
- * - Exposure must be tracked separately when the variant is rendered.
343
- */
403
+ * Assigns a user to a variant.
404
+ */
344
405
  assign(config: ExperimentAssignmentConfig): Promise<ExperimentResponse>;
345
406
  /**
346
407
  * Records a conversion event for an experiment.
347
- *
348
- * Conversion events are attributed to the user's assigned variant.
349
- * Supports primary and secondary metrics.
350
- *
351
- * @param config - Conversion configuration
352
- * @returns Promise resolving to ExperimentResponse
353
- *
354
- * @statistical_impact
355
- * Conversion data directly affects:
356
- * - Conversion rate calculations
357
- * - Variant improvement %
358
- * - Confidence intervals
359
- * - Statistical significance evaluation
360
- */
408
+ */
361
409
  trackConversion(config: ExperimentConversionConfig): Promise<ExperimentResponse>;
362
410
  /**
363
411
  * Records that a user was exposed to a variant.
364
- *
365
- * Exposure tracking is required for valid experiment analysis.
366
- * This ensures participants are counted correctly.
367
- *
368
- * @param experimentId - Experiment identifier
369
- * @param userId - Unique user identifier
370
- * @param variantId - Assigned variant identifier
371
- * @returns Promise resolving to ExperimentResponse
372
- *
373
- * @important
374
- * Exposure must only be tracked once per user per experiment.
375
- * Duplicate exposures may inflate participant counts.
376
- */
412
+ */
377
413
  trackExposure(experimentId: string, userId: string, variantId: string): Promise<ExperimentResponse>;
378
414
  /**
379
415
  * Retrieves statistical results for an experiment.
380
- *
381
- * No experiment state is modified.
382
- *
383
- * @param experimentId - Experiment identifier
384
- * @returns Promise resolving to ExperimentResultsData
385
- *
386
- * @returns_data
387
- * - Variant performance metrics
388
- * - Conversion rates
389
- * - Improvement vs control
390
- * - Statistical significance flags
391
- * - Confidence levels
392
- * - Recommendation engine output
393
- */
416
+ */
394
417
  getResults(experimentId: string): Promise<ExperimentResultsData>;
395
418
  /**
396
419
  * Gets experiment analytics overview.
397
- *
398
- * @param filter - Date range filter
399
- * @returns Promise resolving to experiment analytics
400
420
  */
401
421
  getAnalytics(filter?: DateRangeFilter): Promise<ExperimentAnalyticsData>;
402
422
  /**
403
- * Retrieves the variant assigned to a user for a specific experiment.
404
- *
405
- * @param experimentId - Experiment identifier
406
- * @param userId - Unique user identifier
407
- * @returns Promise resolving to VariantResponse, or null if no variant is assigned
423
+ * Retrieves the variant assigned to a user for a specific experiment (server-side).
408
424
  */
409
425
  getVariant(experimentId: string, userId: string): Promise<VariantResponse | null>;
410
426
  }
@@ -6,9 +6,7 @@ export { Activation } from './activation';
6
6
  export { TrackFeature } from './track-feature';
7
7
  export { TrackPrompt } from './track-prompt';
8
8
  export { Experiment } from './experiment';
9
- export { FeatureFlag } from './feature-flag';
10
9
  export type { ActivationConfig, OnboardingStepConfig, FirstActionConfig, ActivationResponse, ActivationAnalyticsData } from './activation';
11
10
  export type { FeatureConfig, FeatureUsageConfig, FeatureDiscoveryConfig, FeatureResponse, FeatureAnalyticsData } from './track-feature';
12
11
  export type { PromptConfig, PromptSubmissionConfig, PromptResponseConfig, PromptFeedbackConfig, PromptResponse, PromptAnalyticsData } from './track-prompt';
13
- export type { ExperimentConfig, ExperimentDefinition, ExperimentAssignmentConfig, ExperimentConversionConfig, ExperimentResponse, ExperimentResultsData, ExperimentAnalyticsData } from './experiment';
14
- export type { FlagConfig, FlagDefinition, FlagEvaluationConfig, FlagResponse, FlagAnalyticsData, AllFlagsAnalyticsData } from './feature-flag';
12
+ export type { ExperimentConfig, ExperimentDefinition, ExperimentAssignmentConfig, ExperimentConversionConfig, ExperimentResponse, ExperimentResultsData, ExperimentAnalyticsData, ExperimentVariant, ExperimentInitConfig, VariantResponse } from './experiment';
@@ -37,7 +37,7 @@
37
37
  * });
38
38
  * ```
39
39
  */
40
- import { FTRPC } from "../../client/ftrpc";
40
+ import { FlowGridTransport } from "../../client/transport";
41
41
  import { DateRangeFilter, TimeSeriesData } from "../../types";
42
42
  type FeatureConfigProperties = {
43
43
  featureId?: string;
@@ -145,7 +145,7 @@ export interface FeatureAnalyticsData {
145
145
  /**
146
146
  * TrackFeature - Track feature usage events.
147
147
  *
148
- * @extends FTRPC
148
+ * @extends FlowGridTransport
149
149
  *
150
150
  * @description
151
151
  * Provides feature tracking including:
@@ -176,7 +176,7 @@ export interface FeatureAnalyticsData {
176
176
  * });
177
177
  * ```
178
178
  */
179
- export declare class TrackFeature extends FTRPC {
179
+ export declare class TrackFeature extends FlowGridTransport {
180
180
  /**
181
181
  * Records a feature usage event.
182
182
  *
@@ -39,7 +39,7 @@
39
39
  * });
40
40
  * ```
41
41
  */
42
- import { FTRPC } from "../../client/ftrpc";
42
+ import { FlowGridTransport } from "../../client/transport";
43
43
  import { DateRangeFilter, TimeSeriesData } from "../../types";
44
44
  /**
45
45
  * Base configuration for prompt events.
@@ -158,7 +158,7 @@ export interface PromptAnalyticsData {
158
158
  /**
159
159
  * TrackPrompt - Track AI prompt interactions.
160
160
  *
161
- * @extends FTRPC
161
+ * @extends FlowGridTransport
162
162
  *
163
163
  * @description
164
164
  * Provides prompt tracking including:
@@ -197,7 +197,7 @@ export interface PromptAnalyticsData {
197
197
  * });
198
198
  * ```
199
199
  */
200
- export declare class TrackPrompt extends FTRPC {
200
+ export declare class TrackPrompt extends FlowGridTransport {
201
201
  /**
202
202
  * Creates and tracks a prompt event.
203
203
  *
@@ -38,7 +38,7 @@
38
38
  * });
39
39
  * ```
40
40
  */
41
- import { FTRPC } from "../../client/ftrpc";
41
+ import { FlowGridTransport } from "../../client/transport";
42
42
  import { Product, Cart, DateRangeFilter, TimeSeriesData } from "../../types";
43
43
  /**
44
44
  * Configuration for adding item to cart.
@@ -143,7 +143,7 @@ export interface CartAnalyticsData {
143
143
  /**
144
144
  * CartTracking - Track shopping cart interactions.
145
145
  *
146
- * @extends FTRPC
146
+ * @extends FlowGridTransport
147
147
  *
148
148
  * @description
149
149
  * Provides cart tracking capabilities including:
@@ -175,7 +175,7 @@ export interface CartAnalyticsData {
175
175
  * });
176
176
  * ```
177
177
  */
178
- export declare class CartTracking extends FTRPC {
178
+ export declare class CartTracking extends FlowGridTransport {
179
179
  /**
180
180
  * Tracks adding an item to cart.
181
181
  *
@@ -44,7 +44,7 @@
44
44
  * });
45
45
  * ```
46
46
  */
47
- import { FTRPC } from "../../client/ftrpc";
47
+ import { FlowGridTransport } from "../../client/transport";
48
48
  import { Cart, CheckoutStep, ShippingInfo, PaymentInfo, DateRangeFilter, TimeSeriesData } from "../../types";
49
49
  /**
50
50
  * Configuration for beginning checkout.
@@ -159,7 +159,7 @@ export interface CheckoutAnalyticsData {
159
159
  /**
160
160
  * Checkout - Track checkout flow and payments.
161
161
  *
162
- * @extends FTRPC
162
+ * @extends FlowGridTransport
163
163
  *
164
164
  * @description
165
165
  * Provides checkout tracking capabilities including:
@@ -196,7 +196,7 @@ export interface CheckoutAnalyticsData {
196
196
  * });
197
197
  * ```
198
198
  */
199
- export declare class Checkout extends FTRPC {
199
+ export declare class Checkout extends FlowGridTransport {
200
200
  /**
201
201
  * Tracks checkout initiation.
202
202
  *
@@ -39,7 +39,7 @@
39
39
  * });
40
40
  * ```
41
41
  */
42
- import { FTRPC } from "../../client/ftrpc";
42
+ import { FlowGridTransport } from "../../client/transport";
43
43
  import { DateRangeFilter, TimeSeriesData } from "../../types";
44
44
  /**
45
45
  * Stock update configuration.
@@ -129,7 +129,7 @@ export interface InventoryAnalyticsData {
129
129
  /**
130
130
  * Inventory - Track inventory and stock events.
131
131
  *
132
- * @extends FTRPC
132
+ * @extends FlowGridTransport
133
133
  *
134
134
  * @description
135
135
  * Provides inventory tracking including:
@@ -160,7 +160,7 @@ export interface InventoryAnalyticsData {
160
160
  * });
161
161
  * ```
162
162
  */
163
- export declare class Inventory extends FTRPC {
163
+ export declare class Inventory extends FlowGridTransport {
164
164
  /**
165
165
  * Tracks stock level update.
166
166
  *
@@ -37,7 +37,7 @@
37
37
  * const analytics = await ltv.getAnalytics({ range: 'last90days' });
38
38
  * ```
39
39
  */
40
- import { FTRPC } from "../../client/ftrpc";
40
+ import { FlowGridTransport } from "../../client/transport";
41
41
  import { MoneyValue, DateRangeFilter, TimeSeriesData } from "../../types";
42
42
  /**
43
43
  * Customer value data.
@@ -139,7 +139,7 @@ export interface LTVAnalyticsData {
139
139
  /**
140
140
  * CustomerLTV - Calculate and track customer lifetime value.
141
141
  *
142
- * @extends FTRPC
142
+ * @extends FlowGridTransport
143
143
  *
144
144
  * @description
145
145
  * Provides LTV tracking capabilities including:
@@ -170,7 +170,7 @@ export interface LTVAnalyticsData {
170
170
  * console.log(`LTV:CAC Ratio: ${analytics.summary.ltvCacRatio}`);
171
171
  * ```
172
172
  */
173
- export declare class CustomerLTV extends FTRPC {
173
+ export declare class CustomerLTV extends FlowGridTransport {
174
174
  /**
175
175
  * Gets lifetime value data for a specific customer.
176
176
  *
@@ -40,7 +40,7 @@
40
40
  * });
41
41
  * ```
42
42
  */
43
- import { FTRPC } from "../../client/ftrpc";
43
+ import { FlowGridTransport } from "../../client/transport";
44
44
  import { Product, ProductList, ProductPerformance, DateRangeFilter, PaginationParams, TimeSeriesData } from "../../types";
45
45
  /**
46
46
  * Configuration for tracking a product view.
@@ -124,7 +124,7 @@ export interface ProductAnalyticsData {
124
124
  /**
125
125
  * Products - Track product interactions.
126
126
  *
127
- * @extends FTRPC
127
+ * @extends FlowGridTransport
128
128
  *
129
129
  * @description
130
130
  * Provides product tracking capabilities including:
@@ -158,7 +158,7 @@ export interface ProductAnalyticsData {
158
158
  * });
159
159
  * ```
160
160
  */
161
- export declare class Products extends FTRPC {
161
+ export declare class Products extends FlowGridTransport {
162
162
  /**
163
163
  * Tracks a product page view.
164
164
  *
@@ -45,7 +45,7 @@
45
45
  * });
46
46
  * ```
47
47
  */
48
- import { FTRPC } from "../../client/ftrpc";
48
+ import { FlowGridTransport } from "../../client/transport";
49
49
  import { Promotion, MoneyValue, DateRangeFilter, TimeSeriesData } from "../../types";
50
50
  /**
51
51
  * Configuration for tracking promotion view.
@@ -140,7 +140,7 @@ export interface PromotionAnalyticsData {
140
140
  /**
141
141
  * Promotions - Track promotions and coupons.
142
142
  *
143
- * @extends FTRPC
143
+ * @extends FlowGridTransport
144
144
  *
145
145
  * @description
146
146
  * Provides promotion tracking capabilities including:
@@ -170,7 +170,7 @@ export interface PromotionAnalyticsData {
170
170
  * });
171
171
  * ```
172
172
  */
173
- export declare class Promotions extends FTRPC {
173
+ export declare class Promotions extends FlowGridTransport {
174
174
  /**
175
175
  * Tracks promotion view/impression.
176
176
  *
@@ -41,7 +41,7 @@
41
41
  * });
42
42
  * ```
43
43
  */
44
- import { FTRPC } from "../../client/ftrpc";
44
+ import { FlowGridTransport } from "../../client/transport";
45
45
  import { Order, ShippingInfo, MoneyValue, DateRangeFilter, TimeSeriesData, PaginationParams } from "../../types";
46
46
  /**
47
47
  * Configuration for tracking a purchase.
@@ -148,7 +148,7 @@ export interface RecentOrdersData {
148
148
  /**
149
149
  * Purchases - Track completed purchases and revenue.
150
150
  *
151
- * @extends FTRPC
151
+ * @extends FlowGridTransport
152
152
  *
153
153
  * @description
154
154
  * Provides purchase tracking capabilities including:
@@ -183,7 +183,7 @@ export interface RecentOrdersData {
183
183
  * const revenue = await purchases.getRevenue({ range: 'thisMonth' });
184
184
  * ```
185
185
  */
186
- export declare class Purchases extends FTRPC {
186
+ export declare class Purchases extends FlowGridTransport {
187
187
  /**
188
188
  * Tracks a completed purchase.
189
189
  *
@@ -41,7 +41,7 @@
41
41
  * });
42
42
  * ```
43
43
  */
44
- import { FTRPC } from "../../client/ftrpc";
44
+ import { FlowGridTransport } from "../../client/transport";
45
45
  import { Refund, CartItem, MoneyValue, DateRangeFilter, TimeSeriesData } from "../../types";
46
46
  /**
47
47
  * Configuration for tracking a refund.
@@ -109,7 +109,7 @@ export interface RefundAnalyticsData {
109
109
  /**
110
110
  * Refunds - Track refunds and returns.
111
111
  *
112
- * @extends FTRPC
112
+ * @extends FlowGridTransport
113
113
  *
114
114
  * @description
115
115
  * Provides refund tracking capabilities including:
@@ -145,7 +145,7 @@ export interface RefundAnalyticsData {
145
145
  * });
146
146
  * ```
147
147
  */
148
- export declare class Refunds extends FTRPC {
148
+ export declare class Refunds extends FlowGridTransport {
149
149
  /**
150
150
  * Tracks a refund event.
151
151
  *
@@ -38,7 +38,7 @@
38
38
  * });
39
39
  * ```
40
40
  */
41
- import { FTRPC } from "../../client/ftrpc";
41
+ import { FlowGridTransport } from "../../client/transport";
42
42
  import { Product, DateRangeFilter, TimeSeriesData } from "../../types";
43
43
  /**
44
44
  * Search query configuration.
@@ -135,7 +135,7 @@ export interface SearchAnalyticsData {
135
135
  /**
136
136
  * SearchAnalytics - Track site search behavior.
137
137
  *
138
- * @extends FTRPC
138
+ * @extends FlowGridTransport
139
139
  *
140
140
  * @description
141
141
  * Provides search analytics including:
@@ -165,7 +165,7 @@ export interface SearchAnalyticsData {
165
165
  * });
166
166
  * ```
167
167
  */
168
- export declare class SearchAnalytics extends FTRPC {
168
+ export declare class SearchAnalytics extends FlowGridTransport {
169
169
  /**
170
170
  * Tracks a search query.
171
171
  *