@tagadapay/plugin-sdk 3.1.12 → 3.1.24

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 (144) hide show
  1. package/build-cdn.js +397 -11
  2. package/dist/data/iso3166.d.ts +23 -33
  3. package/dist/data/iso3166.js +134 -198
  4. package/dist/data/languages.d.ts +5 -64
  5. package/dist/data/languages.js +23 -143
  6. package/dist/external-tracker.js +623 -3426
  7. package/dist/external-tracker.min.js +2 -25
  8. package/dist/external-tracker.min.js.map +4 -4
  9. package/dist/react/config/payment.d.ts +14 -4
  10. package/dist/react/config/payment.js +47 -9
  11. package/dist/react/hooks/useCheckout.d.ts +3 -0
  12. package/dist/react/hooks/useCheckout.js +4 -1
  13. package/dist/react/hooks/useISOData.js +1 -1
  14. package/dist/react/hooks/usePaymentPolling.d.ts +3 -3
  15. package/dist/react/hooks/usePluginConfig.js +9 -10
  16. package/dist/react/providers/TagadaProvider.js +1 -1
  17. package/dist/tagada-react-sdk-minimal.min.js +36 -0
  18. package/dist/tagada-react-sdk-minimal.min.js.map +7 -0
  19. package/dist/tagada-react-sdk.js +37821 -0
  20. package/dist/tagada-react-sdk.min.js +78 -0
  21. package/dist/tagada-react-sdk.min.js.map +7 -0
  22. package/dist/tagada-sdk.js +16044 -0
  23. package/dist/tagada-sdk.min.js +32 -0
  24. package/dist/tagada-sdk.min.js.map +7 -0
  25. package/dist/v2/cdn-react-minimal.d.ts +23 -0
  26. package/dist/v2/cdn-react-minimal.js +26 -0
  27. package/dist/v2/core/client.d.ts +4 -2
  28. package/dist/v2/core/client.js +5 -4
  29. package/dist/v2/core/config/environment.js +2 -1
  30. package/dist/v2/core/errors.d.ts +75 -0
  31. package/dist/v2/core/errors.js +104 -0
  32. package/dist/v2/core/funnelClient.d.ts +100 -10
  33. package/dist/v2/core/funnelClient.js +121 -27
  34. package/dist/v2/core/isoData.d.ts +4 -4
  35. package/dist/v2/core/isoData.js +7 -7
  36. package/dist/v2/core/pixelMapping.d.ts +49 -0
  37. package/dist/v2/core/pixelMapping.js +363 -0
  38. package/dist/v2/core/resources/apiClient.d.ts +2 -0
  39. package/dist/v2/core/resources/apiClient.js +52 -9
  40. package/dist/v2/core/resources/checkout.d.ts +99 -30
  41. package/dist/v2/core/resources/checkout.js +14 -0
  42. package/dist/v2/core/resources/customer.d.ts +20 -19
  43. package/dist/v2/core/resources/expressPaymentMethods.d.ts +1 -0
  44. package/dist/v2/core/resources/funnel.d.ts +17 -17
  45. package/dist/v2/core/resources/payments.d.ts +89 -13
  46. package/dist/v2/core/resources/payments.js +27 -9
  47. package/dist/v2/core/resources/postPurchases.d.ts +17 -0
  48. package/dist/v2/core/resources/postPurchases.js +20 -0
  49. package/dist/v2/core/types.d.ts +50 -12
  50. package/dist/v2/core/types.js +0 -3
  51. package/dist/v2/core/utils/checkout.d.ts +2 -2
  52. package/dist/v2/core/utils/checkout.js +7 -2
  53. package/dist/v2/core/utils/currency.d.ts +14 -0
  54. package/dist/v2/core/utils/currency.js +40 -0
  55. package/dist/v2/core/utils/deviceInfo.d.ts +0 -10
  56. package/dist/v2/core/utils/deviceInfo.js +152 -76
  57. package/dist/v2/core/utils/index.d.ts +1 -0
  58. package/dist/v2/core/utils/index.js +2 -0
  59. package/dist/v2/core/utils/order.d.ts +13 -9
  60. package/dist/v2/core/utils/pluginConfig.d.ts +8 -0
  61. package/dist/v2/core/utils/pluginConfig.js +36 -12
  62. package/dist/v2/index.d.ts +6 -3
  63. package/dist/v2/index.js +4 -2
  64. package/dist/v2/react/components/FunnelScriptInjector.js +166 -77
  65. package/dist/v2/react/components/StripeExpressButton.d.ts +13 -0
  66. package/dist/v2/react/components/StripeExpressButton.js +171 -0
  67. package/dist/v2/react/components/WhopCheckout.d.ts +24 -0
  68. package/dist/v2/react/components/WhopCheckout.js +237 -0
  69. package/dist/v2/react/hooks/__examples__/FunnelContextExample.js +1 -1
  70. package/dist/v2/react/hooks/payment-actions/useAirwallexRadarAction.d.ts +14 -0
  71. package/dist/v2/react/hooks/payment-actions/useAirwallexRadarAction.js +181 -0
  72. package/dist/v2/react/hooks/payment-actions/useErrorAction.d.ts +9 -0
  73. package/dist/v2/react/hooks/payment-actions/useErrorAction.js +21 -0
  74. package/dist/v2/react/hooks/payment-actions/useFinixRadarAction.d.ts +14 -0
  75. package/dist/v2/react/hooks/payment-actions/useFinixRadarAction.js +187 -0
  76. package/dist/v2/react/hooks/payment-actions/useKessPayAction.d.ts +11 -0
  77. package/dist/v2/react/hooks/payment-actions/useKessPayAction.js +91 -0
  78. package/dist/v2/react/hooks/payment-actions/useMasterCardAction.d.ts +24 -0
  79. package/dist/v2/react/hooks/payment-actions/useMasterCardAction.js +221 -0
  80. package/dist/v2/react/hooks/payment-actions/usePaymentActionHandler.d.ts +15 -0
  81. package/dist/v2/react/hooks/payment-actions/usePaymentActionHandler.js +142 -0
  82. package/dist/v2/react/hooks/payment-actions/useProcessorAuthAction.d.ts +3 -0
  83. package/dist/v2/react/hooks/payment-actions/useProcessorAuthAction.js +31 -0
  84. package/dist/v2/react/hooks/payment-actions/useRedirectAction.d.ts +10 -0
  85. package/dist/v2/react/hooks/payment-actions/useRedirectAction.js +35 -0
  86. package/dist/v2/react/hooks/payment-actions/useStripeRadarAction.d.ts +14 -0
  87. package/dist/v2/react/hooks/payment-actions/useStripeRadarAction.js +192 -0
  88. package/dist/v2/react/hooks/payment-actions/useThreedsAuthAction.d.ts +14 -0
  89. package/dist/v2/react/hooks/payment-actions/useThreedsAuthAction.js +81 -0
  90. package/dist/v2/react/hooks/payment-actions/useTrustFlowAction.d.ts +11 -0
  91. package/dist/v2/react/hooks/payment-actions/useTrustFlowAction.js +84 -0
  92. package/dist/v2/react/hooks/payment-processing/usePaymentInstruments.d.ts +14 -0
  93. package/dist/v2/react/hooks/payment-processing/usePaymentInstruments.js +36 -0
  94. package/dist/v2/react/hooks/payment-processing/usePaymentProcessors.d.ts +31 -0
  95. package/dist/v2/react/hooks/payment-processing/usePaymentProcessors.js +212 -0
  96. package/dist/v2/react/hooks/payment-redirect/useAirwallex3dsReturn.d.ts +14 -0
  97. package/dist/v2/react/hooks/payment-redirect/useAirwallex3dsReturn.js +207 -0
  98. package/dist/v2/react/hooks/payment-redirect/useGenericPaymentReturn.d.ts +12 -0
  99. package/dist/v2/react/hooks/payment-redirect/useGenericPaymentReturn.js +101 -0
  100. package/dist/v2/react/hooks/useApplePayCheckout.js +8 -8
  101. package/dist/v2/react/hooks/useCheckoutQuery.d.ts +16 -0
  102. package/dist/v2/react/hooks/useCheckoutQuery.js +63 -10
  103. package/dist/v2/react/hooks/useFunnel.d.ts +15 -4
  104. package/dist/v2/react/hooks/useFunnel.js +8 -4
  105. package/dist/v2/react/hooks/useGeoLocation.d.ts +2 -1
  106. package/dist/v2/react/hooks/useGeoLocation.js +4 -2
  107. package/dist/v2/react/hooks/useGoogleAutocomplete.d.ts +2 -0
  108. package/dist/v2/react/hooks/useGoogleAutocomplete.js +29 -15
  109. package/dist/v2/react/hooks/useISOData.d.ts +2 -5
  110. package/dist/v2/react/hooks/useISOData.js +26 -27
  111. package/dist/v2/react/hooks/usePaymentPolling.d.ts +3 -3
  112. package/dist/v2/react/hooks/usePaymentQuery.d.ts +18 -5
  113. package/dist/v2/react/hooks/usePaymentQuery.js +63 -1015
  114. package/dist/v2/react/hooks/usePaymentRetrieve.d.ts +3 -2
  115. package/dist/v2/react/hooks/usePaymentRetrieve.js +3 -1
  116. package/dist/v2/react/hooks/usePixelTracking.d.ts +5 -48
  117. package/dist/v2/react/hooks/usePixelTracking.js +283 -504
  118. package/dist/v2/react/hooks/usePostPurchasesQuery.js +34 -2
  119. package/dist/v2/react/hooks/useRemappableParams.d.ts +2 -6
  120. package/dist/v2/react/hooks/useRemappableParams.js +23 -23
  121. package/dist/v2/react/hooks/useSetPaymentMethod.d.ts +16 -0
  122. package/dist/v2/react/hooks/useSetPaymentMethod.js +33 -0
  123. package/dist/v2/react/hooks/useShippingRatesQuery.js +13 -5
  124. package/dist/v2/react/hooks/useStepConfig.d.ts +23 -6
  125. package/dist/v2/react/hooks/useStepConfig.js +14 -7
  126. package/dist/v2/react/hooks/useTranslation.js +23 -8
  127. package/dist/v2/react/hooks/useWhopPaymentPolling.d.ts +30 -0
  128. package/dist/v2/react/hooks/useWhopPaymentPolling.js +61 -0
  129. package/dist/v2/react/index.d.ts +15 -1
  130. package/dist/v2/react/index.js +7 -0
  131. package/dist/v2/react/providers/ExpressPaymentMethodsProvider.d.ts +3 -1
  132. package/dist/v2/react/providers/ExpressPaymentMethodsProvider.js +12 -2
  133. package/dist/v2/react/providers/TagadaProvider.js +74 -5
  134. package/dist/v2/standalone/external-tracker.d.ts +52 -46
  135. package/dist/v2/standalone/external-tracker.js +205 -98
  136. package/dist/v2/standalone/index.d.ts +40 -0
  137. package/dist/v2/standalone/index.js +148 -1
  138. package/dist/v2/standalone/payment-service.d.ts +134 -0
  139. package/dist/v2/standalone/payment-service.js +928 -0
  140. package/package.json +6 -4
  141. package/dist/react/utils/__tests__/urlUtils.test.d.ts +0 -1
  142. package/dist/react/utils/__tests__/urlUtils.test.js +0 -189
  143. package/dist/v2/core/__tests__/pathRemapping.test.d.ts +0 -11
  144. package/dist/v2/core/__tests__/pathRemapping.test.js +0 -776
@@ -2,7 +2,9 @@
2
2
  * Checkout Resource Client
3
3
  * Axios-based API client for checkout endpoints
4
4
  */
5
+ import type { OrderAddress } from '../types';
5
6
  import { ApiClient } from './apiClient';
7
+ export type PaymentMethodName = 'paypal' | 'card' | 'klarna' | 'zelle';
6
8
  export interface CheckoutLineItem {
7
9
  externalProductId?: string | null;
8
10
  externalVariantId?: string | null;
@@ -25,6 +27,7 @@ export interface CheckoutInitParams {
25
27
  currency?: string;
26
28
  locale?: string;
27
29
  };
30
+ enabledOrderBumpOfferIds?: string[];
28
31
  }
29
32
  export interface UpsellTrigger {
30
33
  id: string;
@@ -91,7 +94,7 @@ export interface Store {
91
94
  chargeCurrencies: string[];
92
95
  upsells: Upsell[];
93
96
  emailDomains: string[];
94
- integrations: any[];
97
+ integrations: unknown[];
95
98
  }
96
99
  export interface CheckoutSession {
97
100
  id: string;
@@ -106,7 +109,56 @@ export interface CheckoutSession {
106
109
  updatedAt: string;
107
110
  lastActiveDate: string;
108
111
  selectedPresentmentCurrency: string;
109
- [key: string]: any;
112
+ shippingRate?: {
113
+ id: string;
114
+ [key: string]: unknown;
115
+ } | null;
116
+ shippingRateId?: string;
117
+ sessionLineItems?: Array<{
118
+ isOrderBump?: boolean;
119
+ [key: string]: unknown;
120
+ }>;
121
+ customer?: {
122
+ email?: string;
123
+ firstName?: string;
124
+ lastName?: string;
125
+ currency?: string;
126
+ [key: string]: unknown;
127
+ };
128
+ shippingAddress?: {
129
+ firstName?: string;
130
+ lastName?: string;
131
+ address1?: string;
132
+ address2?: string;
133
+ city?: string;
134
+ state?: string;
135
+ postal?: string;
136
+ country?: string;
137
+ phone?: string;
138
+ [key: string]: unknown;
139
+ };
140
+ billingAddress?: {
141
+ firstName?: string;
142
+ lastName?: string;
143
+ address1?: string;
144
+ address2?: string;
145
+ city?: string;
146
+ state?: string;
147
+ postal?: string;
148
+ country?: string;
149
+ phone?: string;
150
+ [key: string]: unknown;
151
+ };
152
+ metadata?: {
153
+ cartCustomAttributes?: Array<{
154
+ name?: string;
155
+ value?: string;
156
+ [key: string]: unknown;
157
+ }>;
158
+ clubProductId?: string;
159
+ [key: string]: unknown;
160
+ };
161
+ [key: string]: unknown;
110
162
  }
111
163
  export interface CheckoutSummaryItem {
112
164
  id: string;
@@ -129,12 +181,13 @@ export interface CheckoutSummaryItem {
129
181
  amount: number;
130
182
  adjustedAmount: number;
131
183
  currency: string;
132
- adjustments: any[];
184
+ adjustments: CheckoutSessionPreviewAdjustment[];
133
185
  recurring: boolean;
134
186
  interval?: 'day' | 'week' | 'month' | 'year';
135
187
  intervalCount?: number;
136
188
  totalBillingCycles?: number;
137
189
  unitAmountAfterFirstCycle?: number;
190
+ properties?: Record<string, unknown>;
138
191
  orderLineItemProduct: {
139
192
  name: string;
140
193
  };
@@ -169,6 +222,7 @@ export interface CheckoutSummary {
169
222
  }[];
170
223
  }
171
224
  export interface CheckoutSessionPreviewAdjustment {
225
+ id?: string;
172
226
  type: 'Promotion' | 'Tax' | 'Shipping';
173
227
  description: string;
174
228
  level: 'Order' | 'LineItem';
@@ -205,7 +259,8 @@ export interface CheckoutSessionPreviewItem {
205
259
  intervalCount?: number;
206
260
  totalBillingCycles?: number;
207
261
  unitAmountAfterFirstCycle?: number;
208
- subscriptionSettings?: any;
262
+ subscriptionSettings?: Record<string, unknown>;
263
+ properties?: Record<string, unknown>;
209
264
  orderLineItemProduct: {
210
265
  name: string | null;
211
266
  } | null;
@@ -221,13 +276,22 @@ export interface CheckoutSessionPreview {
221
276
  totalAdjustedAmount: number;
222
277
  totalPromotionAmount: number;
223
278
  }
279
+ export interface PromotionAction {
280
+ id: string;
281
+ adjustmentAmount?: Record<string, {
282
+ amount: number;
283
+ [key: string]: unknown;
284
+ }>;
285
+ adjustmentPercentage?: number;
286
+ [key: string]: unknown;
287
+ }
224
288
  export interface Promotion {
225
289
  id: string;
226
290
  name: string;
227
291
  description: string | null;
228
292
  type: string;
229
- rules: any[];
230
- actions: any[];
293
+ rules: Record<string, unknown>[];
294
+ actions: PromotionAction[];
231
295
  }
232
296
  export interface CheckoutData {
233
297
  checkoutSession: CheckoutSession;
@@ -236,14 +300,6 @@ export interface CheckoutData {
236
300
  summary: CheckoutSummary;
237
301
  availablePromotions: Promotion[];
238
302
  }
239
- export interface Promotion {
240
- id: string;
241
- name: string;
242
- description: string | null;
243
- type: string;
244
- rules: any[];
245
- actions: any[];
246
- }
247
303
  export declare class CheckoutResource {
248
304
  private apiClient;
249
305
  constructor(apiClient: ApiClient);
@@ -300,9 +356,9 @@ export declare class CheckoutResource {
300
356
  funnelVariantId?: string;
301
357
  navigationEvent?: string | {
302
358
  type: string;
303
- data?: any;
359
+ data?: Record<string, unknown>;
304
360
  };
305
- navigationOptions?: any;
361
+ navigationOptions?: Record<string, unknown>;
306
362
  }, getFunnelSessionId?: () => string | null | undefined): Promise<{
307
363
  checkoutToken: string;
308
364
  customerId: string;
@@ -338,8 +394,8 @@ export declare class CheckoutResource {
338
394
  * Update checkout address
339
395
  */
340
396
  updateAddress(checkoutSessionId: string, data: {
341
- shippingAddress: any;
342
- billingAddress?: any;
397
+ shippingAddress: Partial<OrderAddress>;
398
+ billingAddress?: Partial<OrderAddress>;
343
399
  }): Promise<{
344
400
  success: boolean;
345
401
  errors?: Record<string, {
@@ -353,8 +409,8 @@ export declare class CheckoutResource {
353
409
  * Set checkout info
354
410
  */
355
411
  setCheckoutInfo(checkoutSessionId: string, data: {
356
- shippingAddress: any;
357
- billingAddress?: any;
412
+ shippingAddress: Partial<OrderAddress>;
413
+ billingAddress?: Partial<OrderAddress>;
358
414
  differentBillingAddress?: boolean;
359
415
  }): Promise<{
360
416
  success: boolean;
@@ -370,32 +426,39 @@ export declare class CheckoutResource {
370
426
  */
371
427
  applyPromotionCode(checkoutSessionId: string, code: string): Promise<{
372
428
  success: boolean;
373
- error?: any;
429
+ error?: string;
374
430
  }>;
375
431
  /**
376
432
  * Remove promotion
377
433
  */
378
434
  removePromotion(checkoutSessionId: string, promotionId: string): Promise<{
379
435
  success: boolean;
380
- error?: any;
436
+ error?: string;
381
437
  }>;
382
438
  /**
383
439
  * Get applied promotions
384
440
  */
385
441
  getAppliedPromotions(checkoutSessionId: string): Promise<Promotion[]>;
442
+ /**
443
+ * Replace all session line items (full rewrite)
444
+ */
445
+ replaceSessionLineItems(checkoutSessionId: string, lineItems: CheckoutLineItem[]): Promise<{
446
+ success: boolean;
447
+ error?: string;
448
+ }>;
386
449
  /**
387
450
  * Update line items
388
451
  */
389
452
  updateLineItems(checkoutSessionId: string, lineItems: CheckoutLineItem[]): Promise<{
390
453
  success: boolean;
391
- error?: any;
454
+ error?: string;
392
455
  }>;
393
456
  /**
394
457
  * Add line items
395
458
  */
396
459
  addLineItems(checkoutSessionId: string, lineItems: CheckoutLineItem[]): Promise<{
397
460
  success: boolean;
398
- error?: any;
461
+ error?: string;
399
462
  }>;
400
463
  /**
401
464
  * Remove line items
@@ -405,21 +468,21 @@ export declare class CheckoutResource {
405
468
  quantity?: number;
406
469
  }[]): Promise<{
407
470
  success: boolean;
408
- error?: any;
471
+ error?: string;
409
472
  }>;
410
473
  /**
411
474
  * Set item quantity
412
475
  */
413
476
  setItemQuantity(checkoutSessionId: string, variantId: string, quantity: number, priceId?: string): Promise<{
414
477
  success: boolean;
415
- error?: any;
478
+ error?: string;
416
479
  }>;
417
480
  /**
418
481
  * Toggle order bump
419
482
  */
420
483
  toggleOrderBump(checkoutSessionId: string, orderBumpOfferId: string, selected: boolean): Promise<{
421
484
  success: boolean;
422
- error?: any;
485
+ error?: string;
423
486
  }>;
424
487
  /**
425
488
  * Update customer
@@ -429,7 +492,7 @@ export declare class CheckoutResource {
429
492
  acceptsMarketing?: boolean;
430
493
  }): Promise<{
431
494
  success: boolean;
432
- error?: any;
495
+ error?: string;
433
496
  }>;
434
497
  /**
435
498
  * Update customer and session info
@@ -439,8 +502,8 @@ export declare class CheckoutResource {
439
502
  email: string;
440
503
  acceptsMarketing?: boolean;
441
504
  };
442
- shippingAddress: any;
443
- billingAddress?: any;
505
+ shippingAddress: Partial<OrderAddress>;
506
+ billingAddress?: Partial<OrderAddress>;
444
507
  differentBillingAddress?: boolean;
445
508
  }): Promise<{
446
509
  success: boolean;
@@ -460,4 +523,10 @@ export declare class CheckoutResource {
460
523
  success: boolean;
461
524
  preview: CheckoutSessionPreview;
462
525
  }>;
526
+ /**
527
+ * Set selected payment method for a checkout session
528
+ */
529
+ setPaymentMethod(checkoutSessionId: string, paymentMethodName: PaymentMethodName): Promise<{
530
+ success: boolean;
531
+ }>;
463
532
  }
@@ -147,6 +147,14 @@ export class CheckoutResource {
147
147
  async getAppliedPromotions(checkoutSessionId) {
148
148
  return this.apiClient.get(`/api/v1/checkout-sessions/${checkoutSessionId}/promotions`);
149
149
  }
150
+ /**
151
+ * Replace all session line items (full rewrite)
152
+ */
153
+ async replaceSessionLineItems(checkoutSessionId, lineItems) {
154
+ return this.apiClient.post(`/api/v1/checkout-sessions/${checkoutSessionId}/line-items`, {
155
+ lineItems,
156
+ });
157
+ }
150
158
  /**
151
159
  * Update line items
152
160
  */
@@ -205,4 +213,10 @@ export class CheckoutResource {
205
213
  async previewCheckoutSession(params) {
206
214
  return this.apiClient.post('/api/v1/checkout-sessions/preview', params);
207
215
  }
216
+ /**
217
+ * Set selected payment method for a checkout session
218
+ */
219
+ async setPaymentMethod(checkoutSessionId, paymentMethodName) {
220
+ return this.apiClient.post(`/api/v1/checkout-sessions/${checkoutSessionId}/payment-method`, { paymentMethodName });
221
+ }
208
222
  }
@@ -3,6 +3,7 @@
3
3
  * Handles customer-related API operations
4
4
  */
5
5
  import { ApiClient } from './apiClient';
6
+ import type { Subscription as CoreSubscription, DeviceInfo, PromotionCode, OrderAddress, OrderSummary, PromotionSummary, PaymentSummary, OrderAdjustmentSummary } from '../types';
6
7
  export interface CustomerAddress {
7
8
  firstName: string | null;
8
9
  lastName: string | null;
@@ -40,12 +41,12 @@ export interface CustomerInfos {
40
41
  acceptsMarketing: boolean;
41
42
  createdAt: string;
42
43
  updatedAt: string;
43
- metadata: Record<string, any>;
44
- device: any | null;
44
+ metadata: Record<string, unknown>;
45
+ device: DeviceInfo | null;
45
46
  orders: CustomerOrderSummary[];
46
- subscriptions: any[];
47
+ subscriptions: CoreSubscription[];
47
48
  };
48
- promotionCodes: any[];
49
+ promotionCodes: PromotionCode[];
49
50
  }
50
51
  export interface OrderWithRelations {
51
52
  id: string;
@@ -53,27 +54,27 @@ export interface OrderWithRelations {
53
54
  paidAmount: number;
54
55
  status: string;
55
56
  createdAt: string;
56
- metadata?: Record<string, any>;
57
- items: any[];
58
- summaries?: any[];
59
- shippingAddress?: any;
60
- billingAddress?: any;
61
- pickupAddress?: any;
57
+ metadata?: Record<string, unknown>;
58
+ items: Record<string, unknown>[];
59
+ summaries?: OrderSummary[];
60
+ shippingAddress?: OrderAddress | null;
61
+ billingAddress?: OrderAddress | null;
62
+ pickupAddress?: Record<string, unknown> | null;
62
63
  checkoutSession?: {
63
64
  returnUrl?: string;
64
- [key: string]: any;
65
+ [key: string]: unknown;
65
66
  };
66
- relatedOrders?: any[];
67
- customer?: any;
68
- store?: any;
67
+ relatedOrders?: OrderWithRelations[];
68
+ customer?: Record<string, unknown>;
69
+ store?: Record<string, unknown>;
69
70
  account?: {
70
71
  id: string;
71
72
  name?: string;
72
73
  };
73
- payments?: any[];
74
- promotions?: any[];
75
- subscriptions?: any[];
76
- adjustments: any[];
74
+ payments?: PaymentSummary[];
75
+ promotions?: PromotionSummary[];
76
+ subscriptions?: CoreSubscription[];
77
+ adjustments: OrderAdjustmentSummary[];
77
78
  }
78
79
  export interface Subscription {
79
80
  id: string;
@@ -127,7 +128,7 @@ export declare class CustomerResource {
127
128
  firstName?: string;
128
129
  lastName?: string;
129
130
  acceptsMarketing?: boolean;
130
- metadata?: Record<string, any>;
131
+ metadata?: Record<string, unknown>;
131
132
  }): Promise<CustomerInfos>;
132
133
  /**
133
134
  * Get customer orders
@@ -9,6 +9,7 @@ export interface PaymentMethod {
9
9
  title: string;
10
10
  iconUrl: string;
11
11
  default: boolean;
12
+ settings?: Record<string, unknown>;
12
13
  metadata?: Record<string, unknown>;
13
14
  }
14
15
  export interface Address {
@@ -31,14 +31,14 @@ export declare enum FunnelActionType {
31
31
  * Data structures for specific action types
32
32
  */
33
33
  export type NextAction<T> = T & {
34
- [key: string]: any;
34
+ [key: string]: unknown;
35
35
  };
36
36
  /**
37
37
  * Base resource data type - all resources must have an id and optional metadata
38
38
  */
39
39
  export interface FunnelResourceData {
40
40
  id: string;
41
- [key: string]: any;
41
+ [key: string]: unknown;
42
42
  }
43
43
  /**
44
44
  * Resource metadata for tracking, versioning, and relationships
@@ -57,7 +57,7 @@ export interface ResourceMetadata {
57
57
  /** Related resource IDs (for relationships) */
58
58
  relatedTo?: string[];
59
59
  /** Custom metadata */
60
- [key: string]: any;
60
+ [key: string]: unknown;
61
61
  }
62
62
  /**
63
63
  * Wrapped resource with metadata
@@ -220,7 +220,7 @@ export interface FunnelActionResources<TCustom = {}> {
220
220
  * Legacy top-level data (backward compatible)
221
221
  * Will be automatically migrated to resources by orchestrator
222
222
  */
223
- [key: string]: any;
223
+ [key: string]: unknown;
224
224
  }
225
225
  export interface DirectNavigationActionData extends FunnelActionResources {
226
226
  targetStepId: string;
@@ -234,13 +234,13 @@ export interface PaymentSuccessActionData extends FunnelActionResources {
234
234
  status: string;
235
235
  transactionId?: string;
236
236
  timestamp?: string;
237
- [key: string]: any;
237
+ [key: string]: unknown;
238
238
  };
239
239
  order: {
240
240
  id: string;
241
241
  amount: number;
242
242
  currency: string;
243
- [key: string]: any;
243
+ [key: string]: unknown;
244
244
  };
245
245
  }
246
246
  export interface PaymentFailedActionData extends FunnelActionResources {
@@ -248,21 +248,21 @@ export interface PaymentFailedActionData extends FunnelActionResources {
248
248
  id: string;
249
249
  status: string;
250
250
  error?: string;
251
- [key: string]: any;
251
+ [key: string]: unknown;
252
252
  };
253
253
  }
254
254
  export interface OfferAcceptedActionData extends FunnelActionResources {
255
255
  offer: {
256
256
  accepted: boolean;
257
257
  offerId?: string;
258
- [key: string]: any;
258
+ [key: string]: unknown;
259
259
  };
260
260
  }
261
261
  export interface OfferDeclinedActionData extends FunnelActionResources {
262
262
  offer: {
263
263
  declined: boolean;
264
264
  offerId?: string;
265
- [key: string]: any;
265
+ [key: string]: unknown;
266
266
  };
267
267
  }
268
268
  export interface CartUpdatedActionData extends FunnelActionResources {
@@ -271,12 +271,12 @@ export interface CartUpdatedActionData extends FunnelActionResources {
271
271
  itemIds?: string[];
272
272
  variantIds?: string[];
273
273
  total?: number;
274
- [key: string]: any;
274
+ [key: string]: unknown;
275
275
  };
276
276
  }
277
277
  export interface FormSubmitActionData extends FunnelActionResources {
278
278
  form?: {
279
- [key: string]: any;
279
+ [key: string]: unknown;
280
280
  };
281
281
  }
282
282
  /**
@@ -305,10 +305,10 @@ export type FunnelAction = BaseFunnelAction & (({
305
305
  data: NextAction<BackNavigationActionData>;
306
306
  }) | ({
307
307
  type: FunnelActionType.CONTINUE_CLICKED;
308
- data: NextAction<any>;
308
+ data: NextAction<FunnelActionResources>;
309
309
  }) | ({
310
310
  type: FunnelActionType.BUTTON_CLICK;
311
- data: NextAction<any>;
311
+ data: NextAction<FunnelActionResources>;
312
312
  }) | ({
313
313
  type: FunnelActionType.FORM_SUBMIT;
314
314
  data: NextAction<FormSubmitActionData>;
@@ -340,7 +340,7 @@ export type FunnelAction = BaseFunnelAction & (({
340
340
  export interface FunnelNavigationAction {
341
341
  type: 'redirect' | 'replace' | 'push' | 'external' | 'none';
342
342
  url?: string;
343
- data?: any;
343
+ data?: Record<string, unknown>;
344
344
  }
345
345
  export interface FunnelNavigationResult {
346
346
  stepId?: string;
@@ -424,12 +424,12 @@ export interface SimpleFunnelContext<TCustom = {}> {
424
424
  * - Available at runtime as context.static
425
425
  * - Example: context.static.offer.id for statically configured offers
426
426
  */
427
- static?: Record<string, any>;
427
+ static?: Record<string, unknown>;
428
428
  /**
429
429
  * Legacy/Custom metadata
430
430
  * For backward compatibility and flexible unstructured data
431
431
  */
432
- metadata?: Record<string, any>;
432
+ metadata?: Record<string, unknown>;
433
433
  script?: string;
434
434
  }
435
435
  export interface FunnelInitializeRequest {
@@ -603,7 +603,7 @@ export declare class FunnelResource {
603
603
  getSession(sessionId: string, currentUrl?: string, includeDebugData?: boolean): Promise<{
604
604
  success: boolean;
605
605
  context?: SimpleFunnelContext;
606
- debugData?: any;
606
+ debugData?: Record<string, unknown>;
607
607
  error?: string;
608
608
  }>;
609
609
  }