@tinkerlandai/indiana-sdk 0.9.5 → 0.10.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +30 -41
  3. package/README.zh-CN.md +24 -22
  4. package/dist/{ai-usage-CUTIHAU0.d.ts → ai-usage-Cn7dhvFw.d.ts} +3 -3
  5. package/dist/{api-BXu6TAoB.d.ts → api-DC44FaTV.d.ts} +6354 -904
  6. package/dist/chunk-ACF2FBUB.js +1 -0
  7. package/dist/{chunk-XSOEA4A5.js → chunk-CWHJKWOD.js} +1 -1
  8. package/dist/chunk-EARSGITJ.js +1 -0
  9. package/dist/chunk-FYGXGMRB.js +1 -0
  10. package/dist/chunk-GHJ65ILJ.js +1 -0
  11. package/dist/chunk-JPV7F5XI.js +1 -0
  12. package/dist/{chunk-AOGPGUWE.js → chunk-LCLCG2I2.js} +1 -1
  13. package/dist/chunk-Q64VNSPV.js +6 -0
  14. package/dist/chunk-SBPTOOYB.js +1 -0
  15. package/dist/{chunk-MKV726FV.js → chunk-V3RAOCVQ.js} +1 -1
  16. package/dist/chunk-VZVUZWP2.js +1 -0
  17. package/dist/{chunk-M7JWCLYX.js → chunk-X6BCUINI.js} +1 -1
  18. package/dist/{chunk-4C3HUZ3B.js → chunk-XO42OH3M.js} +1 -1
  19. package/dist/{configuration-sync-DuJl4SbM.d.ts → configuration-sync-CywDxRkX.d.ts} +12 -12
  20. package/dist/{content-PQJYLAGQ.js → content-QM75T7JO.js} +1 -1
  21. package/dist/{funnel-local-client-BhHdi5_V.d.ts → funnel-local-client-DXamAj1-.d.ts} +18475 -2597
  22. package/dist/funnel-node-evaluation-P5B4fPfJ.d.ts +2054 -0
  23. package/dist/{funnel-resource-client-BoIhL_my.d.ts → funnel-resource-client-md62M8Rv.d.ts} +5977 -1126
  24. package/dist/funnel-runtime-host-BJZUVJAI.js +1 -0
  25. package/dist/index.d.ts +9924 -1958
  26. package/dist/index.js +1 -1
  27. package/dist/native-shell.js +1 -1
  28. package/dist/openrouter.d.ts +3 -3
  29. package/dist/openrouter.js +1 -1
  30. package/dist/page.d.ts +4 -4
  31. package/dist/page.js +1 -1
  32. package/dist/paywall-527RPFAX.js +1 -0
  33. package/dist/popup.d.ts +1 -1
  34. package/dist/popup.js +1 -1
  35. package/dist/react-native.d.ts +19930 -7179
  36. package/dist/react-native.js +1 -1
  37. package/dist/{screen-renderer-VAMWY7ID.js → screen-renderer-ZSAR7LPS.js} +1 -1
  38. package/dist/server.d.ts +2737 -573
  39. package/dist/server.js +1 -1
  40. package/dist/visual.d.ts +1 -1
  41. package/dist/visual.js +1 -1
  42. package/package.json +2 -2
  43. package/dist/chunk-5ZWSFE2C.js +0 -1
  44. package/dist/chunk-6ZZUNGNE.js +0 -1
  45. package/dist/chunk-HEGNIATD.js +0 -1
  46. package/dist/chunk-LMO3FXRT.js +0 -1
  47. package/dist/chunk-QYECMZJJ.js +0 -1
  48. package/dist/chunk-UBMPFTGE.js +0 -1
  49. package/dist/chunk-UWFYBRM2.js +0 -6
  50. package/dist/chunk-XRXI3DMZ.js +0 -1
  51. package/dist/funnel-node-evaluation-DuPmqIo1.d.ts +0 -998
  52. package/dist/funnel-runtime-host-3YUGXD3Y.js +0 -1
  53. package/dist/paywall-CSAGKPCP.js +0 -1
  54. package/dist/{screen-CvfI_L41.d.ts → screen-D81zCpfi.d.ts} +2 -2
package/dist/server.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { F as FoundationApi, I as InvoiceModeParams } from './api-BXu6TAoB.js';
2
- import { y as IndianaServerOptions, p as PaywallStartInput, P as PaywallSession, m as IndianaError, j as FeatureClientOptions, R as RemoteFeatureResult } from './funnel-local-client-BhHdi5_V.js';
3
- export { i as FeatureClient, c as FunnelStartInput, L as LocalFunnelClient, n as LocalFunnelClientOptions, t as createFeatureClient, z as createFunnelStartClient, u as createLocalFunnelClient } from './funnel-local-client-BhHdi5_V.js';
1
+ import { F as FoundationApi, I as InvoiceModeParams } from './api-DC44FaTV.js';
2
+ import { y as IndianaServerOptions, p as PaywallStartInput, P as PaywallSession, m as IndianaError, j as FeatureClientOptions, R as RemoteFeatureResult } from './funnel-local-client-DXamAj1-.js';
3
+ export { i as FeatureClient, c as FunnelStartInput, L as LocalFunnelClient, n as LocalFunnelClientOptions, t as createFeatureClient, z as createFunnelStartClient, u as createLocalFunnelClient } from './funnel-local-client-DXamAj1-.js';
4
4
  import * as zod from 'zod';
5
5
  import { z } from 'zod';
6
- import { S as StackNode } from './screen-CvfI_L41.js';
7
- import { a as ConfigurationSync } from './configuration-sync-DuJl4SbM.js';
8
- export { c as createConfigurationSync } from './configuration-sync-DuJl4SbM.js';
6
+ import { S as StackNode } from './screen-D81zCpfi.js';
7
+ import { a as ConfigurationSync } from './configuration-sync-CywDxRkX.js';
8
+ export { c as createConfigurationSync } from './configuration-sync-CywDxRkX.js';
9
9
  import { J as JsonValue, E as EvaluationContext, s as stickyAssignmentDocumentSchema, F as FeatureResult } from './growth-rules-B4YYy64R.js';
10
- import { a as FunnelLocalConfiguration, b as MerchantBridgeCommand, c as MerchantBridgeRequest, M as MerchantBridgeManifest, m as merchantBridgeCommandInputs, d as merchantBridgeCommandOutputs } from './funnel-node-evaluation-DuPmqIo1.js';
11
- export { F as FunnelNodeEvaluationContext, e as evaluateFunnelNode } from './funnel-node-evaluation-DuPmqIo1.js';
12
- export { d as AiPricingOptions, b as AiTokenQuote, a as AiTokenUsage, A as AiUsageContext, e as AiUsageMiddlewareOptions, f as AiUsageRecord, g as aiPriceSnapshotSchema, h as aiTokenQuoteSchema, c as createAiPricing, i as createAiUsageMiddleware, j as createConfiguredAiPricing } from './ai-usage-CUTIHAU0.js';
10
+ import { a as FunnelLocalConfiguration, b as MerchantBridgeCommand, c as MerchantBridgeRequest, m as merchantBridgeOperationAuthoritySchema, M as MerchantBridgeManifest, d as merchantBridgeCommandInputs, f as merchantBridgeCommandOutputs, g as merchantBridgeOperationInputSchema } from './funnel-node-evaluation-P5B4fPfJ.js';
11
+ export { F as FunnelNodeEvaluationContext, e as evaluateFunnelNode } from './funnel-node-evaluation-P5B4fPfJ.js';
12
+ export { d as AiPricingOptions, b as AiTokenQuote, a as AiTokenUsage, A as AiUsageContext, e as AiUsageMiddlewareOptions, f as AiUsageRecord, g as aiPriceSnapshotSchema, h as aiTokenQuoteSchema, c as createAiPricing, i as createAiUsageMiddleware, j as createConfiguredAiPricing } from './ai-usage-Cn7dhvFw.js';
13
13
  import 'zod/v4';
14
14
  import '@ai-sdk/provider';
15
15
 
@@ -283,7 +283,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
283
283
  primary: string;
284
284
  background: string;
285
285
  text: string;
286
- radius: "none" | "sm" | "md" | "lg" | "full";
286
+ radius: "none" | "full" | "sm" | "md" | "lg";
287
287
  font: "system" | "serif" | "rounded" | "mono";
288
288
  };
289
289
  pages: {
@@ -294,7 +294,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
294
294
  primary: string;
295
295
  background: string;
296
296
  text: string;
297
- radius: "none" | "sm" | "md" | "lg" | "full";
297
+ radius: "none" | "full" | "sm" | "md" | "lg";
298
298
  font: "system" | "serif" | "rounded" | "mono";
299
299
  } | undefined;
300
300
  editorPosition?: {
@@ -416,13 +416,13 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
416
416
  period: string;
417
417
  currency?: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON" | undefined;
418
418
  amountMinor?: number | undefined;
419
- interval?: "one_time" | "month" | "year" | "free" | "week" | undefined;
419
+ interval?: "week" | "month" | "year" | "one_time" | "free" | undefined;
420
420
  intervalCount?: number | undefined;
421
421
  prepaid?: {
422
422
  internalFeatureId: string;
423
423
  name: string;
424
424
  includedAmount: string;
425
- reset: "month" | "year" | "week" | "hour" | "day" | "lifetime";
425
+ reset: "week" | "month" | "year" | "hour" | "day" | "lifetime";
426
426
  resetCount: number;
427
427
  terms: {
428
428
  units: string;
@@ -464,11 +464,11 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
464
464
  productId: string;
465
465
  productVersionId: string;
466
466
  name: string;
467
- action: "upgrade" | "purchase" | "addon" | "topup";
467
+ action: "purchase" | "upgrade" | "addon" | "topup";
468
468
  membershipId: string | null;
469
469
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
470
470
  amountMinor: string;
471
- interval: "one_time" | "month" | "year" | "free" | "week";
471
+ interval: "week" | "month" | "year" | "one_time" | "free";
472
472
  intervalCount: number;
473
473
  }[];
474
474
  } | null;
@@ -568,7 +568,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
568
568
  cursor: {
569
569
  at: string;
570
570
  id: string;
571
- type: "invoice" | "source" | "usage" | "debt" | "transaction" | "settlement";
571
+ type: "invoice" | "usage" | "source" | "debt" | "transaction" | "settlement";
572
572
  };
573
573
  } | {
574
574
  kind: "billing";
@@ -636,7 +636,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
636
636
  primary: string;
637
637
  background: string;
638
638
  text: string;
639
- radius: "none" | "sm" | "md" | "lg" | "full";
639
+ radius: "none" | "full" | "sm" | "md" | "lg";
640
640
  font: "system" | "serif" | "rounded" | "mono";
641
641
  };
642
642
  pages: {
@@ -647,7 +647,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
647
647
  primary: string;
648
648
  background: string;
649
649
  text: string;
650
- radius: "none" | "sm" | "md" | "lg" | "full";
650
+ radius: "none" | "full" | "sm" | "md" | "lg";
651
651
  font: "system" | "serif" | "rounded" | "mono";
652
652
  } | undefined;
653
653
  editorPosition?: {
@@ -777,13 +777,13 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
777
777
  period: string;
778
778
  currency?: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON" | undefined;
779
779
  amountMinor?: number | undefined;
780
- interval?: "one_time" | "month" | "year" | "free" | "week" | undefined;
780
+ interval?: "week" | "month" | "year" | "one_time" | "free" | undefined;
781
781
  intervalCount?: number | undefined;
782
782
  prepaid?: {
783
783
  internalFeatureId: string;
784
784
  name: string;
785
785
  includedAmount: string;
786
- reset: "month" | "year" | "week" | "hour" | "day" | "lifetime";
786
+ reset: "week" | "month" | "year" | "hour" | "day" | "lifetime";
787
787
  resetCount: number;
788
788
  terms: {
789
789
  units: string;
@@ -825,11 +825,11 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
825
825
  productId: string;
826
826
  productVersionId: string;
827
827
  name: string;
828
- action: "upgrade" | "purchase" | "addon" | "topup";
828
+ action: "purchase" | "upgrade" | "addon" | "topup";
829
829
  membershipId: string | null;
830
830
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
831
831
  amountMinor: string;
832
- interval: "one_time" | "month" | "year" | "free" | "week";
832
+ interval: "week" | "month" | "year" | "one_time" | "free";
833
833
  intervalCount: number;
834
834
  }[];
835
835
  } | null;
@@ -856,11 +856,11 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
856
856
  productId: string;
857
857
  productVersionId: string;
858
858
  name: string;
859
- action: "upgrade" | "purchase" | "addon" | "topup";
859
+ action: "purchase" | "upgrade" | "addon" | "topup";
860
860
  membershipId: string | null;
861
861
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
862
862
  amountMinor: string;
863
- interval: "one_time" | "month" | "year" | "free" | "week";
863
+ interval: "week" | "month" | "year" | "one_time" | "free";
864
864
  intervalCount: number;
865
865
  }[];
866
866
  } | null;
@@ -891,16 +891,15 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
891
891
  productId: string;
892
892
  productVersionId: string;
893
893
  name: string;
894
- action: "upgrade" | "purchase" | "addon" | "topup";
894
+ action: "purchase" | "upgrade" | "addon" | "topup";
895
895
  membershipId: string | null;
896
896
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
897
897
  amountMinor: string;
898
- interval: "one_time" | "month" | "year" | "free" | "week";
898
+ interval: "week" | "month" | "year" | "one_time" | "free";
899
899
  intervalCount: number;
900
900
  }[];
901
901
  } | null;
902
902
  } | null;
903
- id: string;
904
903
  capabilities: {
905
904
  nodes: Record<string, {
906
905
  base: {
@@ -956,13 +955,13 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
956
955
  period: string;
957
956
  currency?: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON" | undefined;
958
957
  amountMinor?: number | undefined;
959
- interval?: "one_time" | "month" | "year" | "free" | "week" | undefined;
958
+ interval?: "week" | "month" | "year" | "one_time" | "free" | undefined;
960
959
  intervalCount?: number | undefined;
961
960
  prepaid?: {
962
961
  internalFeatureId: string;
963
962
  name: string;
964
963
  includedAmount: string;
965
- reset: "month" | "year" | "week" | "hour" | "day" | "lifetime";
964
+ reset: "week" | "month" | "year" | "hour" | "day" | "lifetime";
966
965
  resetCount: number;
967
966
  terms: {
968
967
  units: string;
@@ -1004,11 +1003,11 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1004
1003
  productId: string;
1005
1004
  productVersionId: string;
1006
1005
  name: string;
1007
- action: "upgrade" | "purchase" | "addon" | "topup";
1006
+ action: "purchase" | "upgrade" | "addon" | "topup";
1008
1007
  membershipId: string | null;
1009
1008
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1010
1009
  amountMinor: string;
1011
- interval: "one_time" | "month" | "year" | "free" | "week";
1010
+ interval: "week" | "month" | "year" | "one_time" | "free";
1012
1011
  intervalCount: number;
1013
1012
  }[];
1014
1013
  } | null;
@@ -1022,6 +1021,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1022
1021
  available: boolean;
1023
1022
  }> | undefined;
1024
1023
  };
1024
+ id: string;
1025
1025
  version: number;
1026
1026
  paywallId: string;
1027
1027
  content: {
@@ -1076,13 +1076,13 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1076
1076
  totalMinor: number;
1077
1077
  } | null;
1078
1078
  expiresAt: string;
1079
- provider: "stripe" | "apple" | "google";
1079
+ provider: "merchant" | "stripe" | "apple" | "google";
1080
1080
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1081
1081
  lines: {
1082
1082
  lineId: string;
1083
1083
  productVersionId: string;
1084
1084
  productName: string;
1085
- interval: "one_time" | "month" | "year" | "free" | "week";
1085
+ interval: "week" | "month" | "year" | "one_time" | "free";
1086
1086
  baseAmountMinor: number;
1087
1087
  seats: {
1088
1088
  key: string;
@@ -1135,10 +1135,64 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1135
1135
  catalogAmountMinor: number;
1136
1136
  automaticTax: boolean;
1137
1137
  execution: {
1138
+ type: "purchase";
1139
+ mode: "payment" | "subscription";
1140
+ lineItems: {
1141
+ priceId: string;
1142
+ productVersionId: string;
1143
+ productId: string;
1144
+ quantity: number;
1145
+ unitAmountMinor: number;
1146
+ totalMinor: number;
1147
+ interval: "week" | "month" | "year" | "one_off";
1148
+ intervalCount: number;
1149
+ kind: "fixed" | "prepaid" | "seat";
1150
+ tiers: {
1151
+ mode: "graduated" | "volume";
1152
+ tiers: {
1153
+ upTo: number | null;
1154
+ unitAmountMinor: number;
1155
+ flatAmountMinor?: number | undefined;
1156
+ }[];
1157
+ } | null;
1158
+ }[];
1159
+ catalogAmountMinor: number;
1160
+ discount: {
1161
+ grantId: string;
1162
+ couponId: string;
1163
+ amountMinor: number;
1164
+ terms: {
1165
+ type: "percent";
1166
+ percentOff: number;
1167
+ } | {
1168
+ type: "amount";
1169
+ amountOffMinor: number;
1170
+ currency: string;
1171
+ };
1172
+ duration: {
1173
+ type: "once";
1174
+ } | {
1175
+ type: "forever";
1176
+ } | {
1177
+ type: "repeating";
1178
+ months: number;
1179
+ };
1180
+ } | null;
1181
+ trialPeriodDays: number | null;
1182
+ automaticTax: boolean;
1183
+ provider: "merchant";
1184
+ executor: "merchant";
1185
+ operationId: string;
1186
+ customerId: string;
1187
+ configurationRevision: number;
1188
+ connectionRevision: number;
1189
+ currency: string;
1190
+ expiresAt: string;
1191
+ } | {
1138
1192
  provider: "stripe";
1139
1193
  executor: "merchant" | "indiana";
1140
1194
  accountId: string;
1141
- mode: "subscription" | "payment";
1195
+ mode: "payment" | "subscription";
1142
1196
  lineItems: {
1143
1197
  price: string | null;
1144
1198
  quantity: number;
@@ -1146,7 +1200,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1146
1200
  productName: string;
1147
1201
  amountMinor: number;
1148
1202
  currency: string;
1149
- interval: "month" | "year" | "one_off" | "week";
1203
+ interval: "week" | "month" | "year" | "one_off";
1150
1204
  intervalCount: number;
1151
1205
  slot: "stripe_price_id" | "stripe_empty_price_id";
1152
1206
  tiers: {
@@ -1163,7 +1217,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1163
1217
  terms: {
1164
1218
  id: string;
1165
1219
  name: string;
1166
- duration: "forever" | "once" | "repeating";
1220
+ duration: "once" | "forever" | "repeating";
1167
1221
  percent_off?: number | undefined;
1168
1222
  amount_off?: number | undefined;
1169
1223
  currency?: string | undefined;
@@ -1207,14 +1261,68 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1207
1261
  operation: {
1208
1262
  operationId: string;
1209
1263
  orderId: string;
1210
- status: "failed" | "pending" | "complete" | "cancelled";
1264
+ status: "pending" | "failed" | "cancelled" | "complete";
1211
1265
  executor: "merchant" | "indiana";
1212
1266
  checkoutUrl: string | null;
1213
1267
  execution: {
1268
+ type: "purchase";
1269
+ mode: "payment" | "subscription";
1270
+ lineItems: {
1271
+ priceId: string;
1272
+ productVersionId: string;
1273
+ productId: string;
1274
+ quantity: number;
1275
+ unitAmountMinor: number;
1276
+ totalMinor: number;
1277
+ interval: "week" | "month" | "year" | "one_off";
1278
+ intervalCount: number;
1279
+ kind: "fixed" | "prepaid" | "seat";
1280
+ tiers: {
1281
+ mode: "graduated" | "volume";
1282
+ tiers: {
1283
+ upTo: number | null;
1284
+ unitAmountMinor: number;
1285
+ flatAmountMinor?: number | undefined;
1286
+ }[];
1287
+ } | null;
1288
+ }[];
1289
+ catalogAmountMinor: number;
1290
+ discount: {
1291
+ grantId: string;
1292
+ couponId: string;
1293
+ amountMinor: number;
1294
+ terms: {
1295
+ type: "percent";
1296
+ percentOff: number;
1297
+ } | {
1298
+ type: "amount";
1299
+ amountOffMinor: number;
1300
+ currency: string;
1301
+ };
1302
+ duration: {
1303
+ type: "once";
1304
+ } | {
1305
+ type: "forever";
1306
+ } | {
1307
+ type: "repeating";
1308
+ months: number;
1309
+ };
1310
+ } | null;
1311
+ trialPeriodDays: number | null;
1312
+ automaticTax: boolean;
1313
+ provider: "merchant";
1314
+ executor: "merchant";
1315
+ operationId: string;
1316
+ customerId: string;
1317
+ configurationRevision: number;
1318
+ connectionRevision: number;
1319
+ currency: string;
1320
+ expiresAt: string;
1321
+ } | {
1214
1322
  provider: "stripe";
1215
1323
  executor: "merchant" | "indiana";
1216
1324
  accountId: string;
1217
- mode: "subscription" | "payment";
1325
+ mode: "payment" | "subscription";
1218
1326
  lineItems: {
1219
1327
  price: string | null;
1220
1328
  quantity: number;
@@ -1222,7 +1330,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1222
1330
  productName: string;
1223
1331
  amountMinor: number;
1224
1332
  currency: string;
1225
- interval: "month" | "year" | "one_off" | "week";
1333
+ interval: "week" | "month" | "year" | "one_off";
1226
1334
  intervalCount: number;
1227
1335
  slot: "stripe_price_id" | "stripe_empty_price_id";
1228
1336
  tiers: {
@@ -1239,7 +1347,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1239
1347
  terms: {
1240
1348
  id: string;
1241
1349
  name: string;
1242
- duration: "forever" | "once" | "repeating";
1350
+ duration: "once" | "forever" | "repeating";
1243
1351
  percent_off?: number | undefined;
1244
1352
  amount_off?: number | undefined;
1245
1353
  currency?: string | undefined;
@@ -1316,154 +1424,769 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1316
1424
  } | null;
1317
1425
  append?: boolean | undefined;
1318
1426
  invoiceMode?: boolean | undefined;
1319
- } | null;
1320
- purchaseRequestId: string | null;
1321
- selectionGeneration?: number | undefined;
1322
- canReselect?: boolean | undefined;
1323
- } | null;
1324
- instruction: {
1325
- environmentId: string;
1326
- attributes: Record<string, zod.JSONType>;
1327
- sticky: Record<string, {
1328
- attributeName: string;
1329
- attributeValue: string;
1330
- assignments: Record<string, string>;
1331
- }>;
1332
- policyRevision: number;
1333
- type: "evaluate_segment";
1334
- } | {
1335
- type: "wait";
1336
- receiptId: string;
1337
- kind: "operation" | "event" | "timer";
1338
- deadline: string | null;
1339
- eventName?: string | undefined;
1340
- } | {
1341
- type: "open_url";
1342
- receiptId: string;
1343
- url: string;
1344
- openIn: "same_window" | "new_window";
1345
- } | {
1346
- type: "event";
1347
- receiptId: string;
1348
- event: string;
1349
- } | null;
1350
- pendingRequest: {
1351
- requestId: string;
1352
- authenticationRequired: boolean;
1353
- } | null;
1354
- runExpiresAt: string;
1355
- credentialExpiresAt: string | null;
1356
- };
1357
- settlement?: {
1358
- requestId: string;
1359
- state: "unknown" | "pending" | "settled";
1360
- operationId: string | null;
1361
- receiptId?: string | null | undefined;
1362
- } | undefined;
1363
- purchase?: {
1364
- receiptId: string;
1365
- quote: {
1366
- operationId: string;
1367
- entityId: string | null;
1368
- billingSubscriptionId: string | null;
1369
- discount: {
1370
- offerId: string;
1371
- couponId: string;
1372
- discount: {
1373
- type: "percent";
1374
- percentOff: number;
1375
- } | {
1376
- type: "amount";
1377
- amountOffCents: number;
1378
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1379
- };
1380
- duration: {
1381
- type: "once";
1382
- } | {
1383
- type: "repeating";
1384
- months: number;
1385
- } | {
1386
- type: "forever";
1387
- };
1388
- amountMinor: number;
1389
- allocations: {
1390
- productVersionId: string;
1391
- amountMinor: number;
1392
- }[];
1393
- expiresAt: string;
1394
- } | null;
1395
- charge: {
1396
- effectiveAt: string;
1397
- periodEndsAt: string;
1398
- debitMinor: number;
1399
- discountMinor: number;
1400
- taxMinor: number;
1401
- totalMinor: number;
1402
- } | null;
1403
- expiresAt: string;
1404
- provider: "stripe" | "apple" | "google";
1405
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1406
- lines: {
1407
- lineId: string;
1408
- productVersionId: string;
1409
- productName: string;
1410
- interval: "one_time" | "month" | "year" | "free" | "week";
1411
- baseAmountMinor: number;
1412
- seats: {
1413
- key: string;
1414
- quantity: number;
1415
- includedQuantity: number;
1416
- maximumQuantity: number;
1417
- unitAmountMinor: number;
1418
- }[];
1419
- catalogAmountMinor: number;
1420
- trial: {
1421
- days: number;
1422
- cardRequired: boolean;
1423
- } | null;
1424
- intervalCount?: number | undefined;
1425
- prepaid?: {
1426
- itemKey: string;
1427
- internal_feature_id: string;
1428
- includedAmount: string;
1429
- quantity: number;
1430
- terms: {
1431
- units: string;
1432
- prices: {
1427
+ confirmedAt?: string | null | undefined;
1428
+ quote?: {
1429
+ operationId: string;
1430
+ entityId: string | null;
1431
+ billingSubscriptionId: string | null;
1432
+ discount: {
1433
+ offerId: string;
1434
+ couponId: string;
1435
+ discount: {
1436
+ type: "percent";
1437
+ percentOff: number;
1438
+ } | {
1439
+ type: "amount";
1440
+ amountOffCents: number;
1433
1441
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1442
+ };
1443
+ duration: {
1444
+ type: "once";
1445
+ } | {
1446
+ type: "repeating";
1447
+ months: number;
1448
+ } | {
1449
+ type: "forever";
1450
+ };
1451
+ amountMinor: number;
1452
+ allocations: {
1453
+ productVersionId: string;
1434
1454
  amountMinor: number;
1435
- pricing?: {
1436
- kind: "graduated" | "volume";
1437
- tiers: {
1438
- upTo: number | null;
1439
- unitAmountMinor: number;
1440
- flatAmountMinor?: number | undefined;
1441
- }[];
1442
- } | undefined;
1443
- }[];
1444
- minimumQuantity: number;
1445
- maximumQuantity: number;
1446
- };
1447
- unitAmountMinor: number;
1448
- productId: string | null;
1449
- priceId: string | null;
1450
- pricing?: {
1451
- kind: "graduated" | "volume";
1452
- tiers: {
1453
- upTo: number | null;
1454
- unitAmountMinor: number;
1455
- flatAmountMinor?: number | undefined;
1456
1455
  }[];
1457
- } | undefined;
1458
- }[] | undefined;
1459
- }[];
1460
- catalogAmountMinor: number;
1461
- automaticTax: boolean;
1462
- execution: {
1463
- provider: "stripe";
1464
- executor: "merchant" | "indiana";
1465
- accountId: string;
1466
- mode: "subscription" | "payment";
1456
+ expiresAt: string;
1457
+ } | null;
1458
+ charge: {
1459
+ effectiveAt: string;
1460
+ periodEndsAt: string;
1461
+ debitMinor: number;
1462
+ discountMinor: number;
1463
+ taxMinor: number;
1464
+ totalMinor: number;
1465
+ } | null;
1466
+ expiresAt: string;
1467
+ provider: "merchant" | "stripe" | "apple" | "google";
1468
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1469
+ lines: {
1470
+ lineId: string;
1471
+ productVersionId: string;
1472
+ productName: string;
1473
+ interval: "week" | "month" | "year" | "one_time" | "free";
1474
+ baseAmountMinor: number;
1475
+ seats: {
1476
+ key: string;
1477
+ quantity: number;
1478
+ includedQuantity: number;
1479
+ maximumQuantity: number;
1480
+ unitAmountMinor: number;
1481
+ }[];
1482
+ catalogAmountMinor: number;
1483
+ trial: {
1484
+ days: number;
1485
+ cardRequired: boolean;
1486
+ } | null;
1487
+ intervalCount?: number | undefined;
1488
+ prepaid?: {
1489
+ itemKey: string;
1490
+ internal_feature_id: string;
1491
+ includedAmount: string;
1492
+ quantity: number;
1493
+ terms: {
1494
+ units: string;
1495
+ prices: {
1496
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1497
+ amountMinor: number;
1498
+ pricing?: {
1499
+ kind: "graduated" | "volume";
1500
+ tiers: {
1501
+ upTo: number | null;
1502
+ unitAmountMinor: number;
1503
+ flatAmountMinor?: number | undefined;
1504
+ }[];
1505
+ } | undefined;
1506
+ }[];
1507
+ minimumQuantity: number;
1508
+ maximumQuantity: number;
1509
+ };
1510
+ unitAmountMinor: number;
1511
+ productId: string | null;
1512
+ priceId: string | null;
1513
+ pricing?: {
1514
+ kind: "graduated" | "volume";
1515
+ tiers: {
1516
+ upTo: number | null;
1517
+ unitAmountMinor: number;
1518
+ flatAmountMinor?: number | undefined;
1519
+ }[];
1520
+ } | undefined;
1521
+ }[] | undefined;
1522
+ }[];
1523
+ catalogAmountMinor: number;
1524
+ automaticTax: boolean;
1525
+ execution: {
1526
+ type: "purchase";
1527
+ mode: "payment" | "subscription";
1528
+ lineItems: {
1529
+ priceId: string;
1530
+ productVersionId: string;
1531
+ productId: string;
1532
+ quantity: number;
1533
+ unitAmountMinor: number;
1534
+ totalMinor: number;
1535
+ interval: "week" | "month" | "year" | "one_off";
1536
+ intervalCount: number;
1537
+ kind: "fixed" | "prepaid" | "seat";
1538
+ tiers: {
1539
+ mode: "graduated" | "volume";
1540
+ tiers: {
1541
+ upTo: number | null;
1542
+ unitAmountMinor: number;
1543
+ flatAmountMinor?: number | undefined;
1544
+ }[];
1545
+ } | null;
1546
+ }[];
1547
+ catalogAmountMinor: number;
1548
+ discount: {
1549
+ grantId: string;
1550
+ couponId: string;
1551
+ amountMinor: number;
1552
+ terms: {
1553
+ type: "percent";
1554
+ percentOff: number;
1555
+ } | {
1556
+ type: "amount";
1557
+ amountOffMinor: number;
1558
+ currency: string;
1559
+ };
1560
+ duration: {
1561
+ type: "once";
1562
+ } | {
1563
+ type: "forever";
1564
+ } | {
1565
+ type: "repeating";
1566
+ months: number;
1567
+ };
1568
+ } | null;
1569
+ trialPeriodDays: number | null;
1570
+ automaticTax: boolean;
1571
+ provider: "merchant";
1572
+ executor: "merchant";
1573
+ operationId: string;
1574
+ customerId: string;
1575
+ configurationRevision: number;
1576
+ connectionRevision: number;
1577
+ currency: string;
1578
+ expiresAt: string;
1579
+ } | {
1580
+ provider: "stripe";
1581
+ executor: "merchant" | "indiana";
1582
+ accountId: string;
1583
+ mode: "payment" | "subscription";
1584
+ lineItems: {
1585
+ price: string | null;
1586
+ quantity: number;
1587
+ priceId: string;
1588
+ productName: string;
1589
+ amountMinor: number;
1590
+ currency: string;
1591
+ interval: "week" | "month" | "year" | "one_off";
1592
+ intervalCount: number;
1593
+ slot: "stripe_price_id" | "stripe_empty_price_id";
1594
+ tiers: {
1595
+ mode: "graduated" | "volume";
1596
+ tiers: {
1597
+ upTo: number | null;
1598
+ unitAmountMinor: number;
1599
+ flatAmountMinor?: number | undefined;
1600
+ }[];
1601
+ } | null;
1602
+ }[];
1603
+ discounts: {
1604
+ coupon: string;
1605
+ terms: {
1606
+ id: string;
1607
+ name: string;
1608
+ duration: "once" | "forever" | "repeating";
1609
+ percent_off?: number | undefined;
1610
+ amount_off?: number | undefined;
1611
+ currency?: string | undefined;
1612
+ duration_in_months?: number | undefined;
1613
+ };
1614
+ }[];
1615
+ trialPeriodDays: number | null;
1616
+ metadata: {
1617
+ grooveCheckoutId: string;
1618
+ grooveCustomerId: string;
1619
+ };
1620
+ expiresAt: string;
1621
+ invoiceMode?: InvoiceModeParams | undefined;
1622
+ append?: {
1623
+ subscriptionId: string;
1624
+ customerId: string;
1625
+ sourceItems: {
1626
+ id: string;
1627
+ price_id: string;
1628
+ quantity: number;
1629
+ discounts?: {
1630
+ id: string;
1631
+ coupon: string;
1632
+ start: number;
1633
+ end: number | null;
1634
+ }[] | undefined;
1635
+ }[];
1636
+ prorationDate: number;
1637
+ amountMinor: number;
1638
+ periodStartMs: number;
1639
+ periodEndMs: number;
1640
+ } | undefined;
1641
+ } | null;
1642
+ nativeOffer?: {
1643
+ offerKind: "none" | "introductory" | "promotional";
1644
+ offerId: string | null;
1645
+ discountMinor: number;
1646
+ trialDays: number | null;
1647
+ } | undefined;
1648
+ } | undefined;
1649
+ merchantExecution?: {
1650
+ type: "purchase";
1651
+ merchantOrderId: string | null;
1652
+ paymentStatus: "unknown" | "not_started" | "pending" | "failed" | "succeeded" | "not_required" | "expired";
1653
+ checkoutUrl: string | null;
1654
+ checkoutExpiresAt: string | null;
1655
+ operationId: string;
1656
+ customerId: string;
1657
+ merchantExecutionId: string;
1658
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
1659
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
1660
+ updatedAt: string;
1661
+ problem: {
1662
+ phase: "payment" | "execution" | "fulfillment" | "recording";
1663
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1664
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1665
+ retryable: boolean;
1666
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
1667
+ } | null;
1668
+ pollAfterMs: number | null;
1669
+ } | {
1670
+ type: "subscription_change";
1671
+ status: "unknown" | "pending" | "applied" | "failed" | "scheduled";
1672
+ merchantSubscriptionId: string;
1673
+ scheduledFor: string | null;
1674
+ operationId: string;
1675
+ customerId: string;
1676
+ merchantExecutionId: string;
1677
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
1678
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
1679
+ updatedAt: string;
1680
+ problem: {
1681
+ phase: "payment" | "execution" | "fulfillment" | "recording";
1682
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1683
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1684
+ retryable: boolean;
1685
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
1686
+ } | null;
1687
+ pollAfterMs: number | null;
1688
+ } | {
1689
+ type: "refund";
1690
+ status: "unknown" | "pending" | "failed" | "succeeded";
1691
+ merchantRefundId: string | null;
1692
+ operationId: string;
1693
+ customerId: string;
1694
+ merchantExecutionId: string;
1695
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
1696
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
1697
+ updatedAt: string;
1698
+ problem: {
1699
+ phase: "payment" | "execution" | "fulfillment" | "recording";
1700
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1701
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1702
+ retryable: boolean;
1703
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
1704
+ } | null;
1705
+ pollAfterMs: number | null;
1706
+ } | null | undefined;
1707
+ problem?: {
1708
+ phase: "payment" | "execution" | "fulfillment" | "recording";
1709
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1710
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1711
+ retryable: boolean;
1712
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
1713
+ } | null | undefined;
1714
+ authority?: {
1715
+ scope: {
1716
+ projectId: string;
1717
+ environmentId: string;
1718
+ environment: "sandbox" | "live";
1719
+ };
1720
+ operationId: string;
1721
+ customerId: string;
1722
+ confirmedAt: string | null;
1723
+ initialExecutionAllowed: boolean;
1724
+ instruction: {
1725
+ type: "purchase";
1726
+ mode: "payment" | "subscription";
1727
+ lineItems: {
1728
+ priceId: string;
1729
+ productVersionId: string;
1730
+ productId: string;
1731
+ quantity: number;
1732
+ unitAmountMinor: number;
1733
+ totalMinor: number;
1734
+ interval: "week" | "month" | "year" | "one_off";
1735
+ intervalCount: number;
1736
+ kind: "fixed" | "prepaid" | "seat";
1737
+ tiers: {
1738
+ mode: "graduated" | "volume";
1739
+ tiers: {
1740
+ upTo: number | null;
1741
+ unitAmountMinor: number;
1742
+ flatAmountMinor?: number | undefined;
1743
+ }[];
1744
+ } | null;
1745
+ }[];
1746
+ catalogAmountMinor: number;
1747
+ discount: {
1748
+ grantId: string;
1749
+ couponId: string;
1750
+ amountMinor: number;
1751
+ terms: {
1752
+ type: "percent";
1753
+ percentOff: number;
1754
+ } | {
1755
+ type: "amount";
1756
+ amountOffMinor: number;
1757
+ currency: string;
1758
+ };
1759
+ duration: {
1760
+ type: "once";
1761
+ } | {
1762
+ type: "forever";
1763
+ } | {
1764
+ type: "repeating";
1765
+ months: number;
1766
+ };
1767
+ } | null;
1768
+ trialPeriodDays: number | null;
1769
+ automaticTax: boolean;
1770
+ provider: "merchant";
1771
+ executor: "merchant";
1772
+ operationId: string;
1773
+ customerId: string;
1774
+ configurationRevision: number;
1775
+ connectionRevision: number;
1776
+ currency: string;
1777
+ expiresAt: string;
1778
+ } | {
1779
+ type: "subscription_change";
1780
+ subscriptionId: string;
1781
+ merchantSubscriptionId: string;
1782
+ membershipId: string;
1783
+ subscriptionAction: "update" | "cancel" | "schedule" | "release";
1784
+ supersedesOperationId: string | null;
1785
+ change: {
1786
+ type: "cancel";
1787
+ } | {
1788
+ type: "uncancel";
1789
+ } | {
1790
+ type: "plan";
1791
+ productVersionId: string;
1792
+ } | {
1793
+ type: "seats";
1794
+ licenseKey: string;
1795
+ quantity: number;
1796
+ } | {
1797
+ type: "quantity";
1798
+ internal_feature_id: string;
1799
+ quantity: number;
1800
+ } | {
1801
+ type: "billing_cycle";
1802
+ billingCycleAnchor: number | "now";
1803
+ };
1804
+ timing: "immediate" | "renewal";
1805
+ effectiveAt: string;
1806
+ creditMinor: number;
1807
+ debitMinor: number;
1808
+ totalMinor: number;
1809
+ discountMinor: number;
1810
+ taxMinor: number;
1811
+ proration: "none" | "create_prorations" | "always_invoice";
1812
+ lineItems: {
1813
+ priceId: string;
1814
+ productVersionId: string;
1815
+ productId: string;
1816
+ unitAmountMinor: number;
1817
+ totalMinor: number;
1818
+ interval: "week" | "month" | "year" | "one_off";
1819
+ intervalCount: number;
1820
+ kind: "fixed" | "prepaid" | "seat";
1821
+ tiers: {
1822
+ mode: "graduated" | "volume";
1823
+ tiers: {
1824
+ upTo: number | null;
1825
+ unitAmountMinor: number;
1826
+ flatAmountMinor?: number | undefined;
1827
+ }[];
1828
+ } | null;
1829
+ quantity: number;
1830
+ }[];
1831
+ removePriceIds: string[];
1832
+ provider: "merchant";
1833
+ executor: "merchant";
1834
+ operationId: string;
1835
+ customerId: string;
1836
+ configurationRevision: number;
1837
+ connectionRevision: number;
1838
+ currency: string;
1839
+ expiresAt: string;
1840
+ } | {
1841
+ type: "refund";
1842
+ invoiceId: string;
1843
+ merchantInvoiceId: string;
1844
+ amountMinor: number;
1845
+ mode: "full" | "partial";
1846
+ entitlementAction: "retain" | "revoke";
1847
+ cancelSubscriptions: string[];
1848
+ provider: "merchant";
1849
+ executor: "merchant";
1850
+ operationId: string;
1851
+ customerId: string;
1852
+ configurationRevision: number;
1853
+ connectionRevision: number;
1854
+ currency: string;
1855
+ expiresAt: string;
1856
+ };
1857
+ } | undefined;
1858
+ } | null;
1859
+ purchaseRequestId: string | null;
1860
+ selectionGeneration?: number | undefined;
1861
+ canReselect?: boolean | undefined;
1862
+ } | null;
1863
+ instruction: {
1864
+ environmentId: string;
1865
+ attributes: Record<string, zod.JSONType>;
1866
+ sticky: Record<string, {
1867
+ attributeName: string;
1868
+ attributeValue: string;
1869
+ assignments: Record<string, string>;
1870
+ }>;
1871
+ policyRevision: number;
1872
+ type: "evaluate_segment";
1873
+ } | {
1874
+ type: "wait";
1875
+ receiptId: string;
1876
+ kind: "operation" | "event" | "timer";
1877
+ deadline: string | null;
1878
+ eventName?: string | undefined;
1879
+ } | {
1880
+ type: "open_url";
1881
+ receiptId: string;
1882
+ url: string;
1883
+ openIn: "same_window" | "new_window";
1884
+ } | {
1885
+ type: "event";
1886
+ receiptId: string;
1887
+ event: string;
1888
+ } | null;
1889
+ pendingRequest: {
1890
+ requestId: string;
1891
+ authenticationRequired: boolean;
1892
+ } | null;
1893
+ runExpiresAt: string;
1894
+ credentialExpiresAt: string | null;
1895
+ };
1896
+ settlement?: {
1897
+ requestId: string;
1898
+ state: "unknown" | "pending" | "settled";
1899
+ operationId: string | null;
1900
+ receiptId?: string | null | undefined;
1901
+ } | undefined;
1902
+ purchase?: {
1903
+ receiptId: string;
1904
+ quote: {
1905
+ operationId: string;
1906
+ entityId: string | null;
1907
+ billingSubscriptionId: string | null;
1908
+ discount: {
1909
+ offerId: string;
1910
+ couponId: string;
1911
+ discount: {
1912
+ type: "percent";
1913
+ percentOff: number;
1914
+ } | {
1915
+ type: "amount";
1916
+ amountOffCents: number;
1917
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1918
+ };
1919
+ duration: {
1920
+ type: "once";
1921
+ } | {
1922
+ type: "repeating";
1923
+ months: number;
1924
+ } | {
1925
+ type: "forever";
1926
+ };
1927
+ amountMinor: number;
1928
+ allocations: {
1929
+ productVersionId: string;
1930
+ amountMinor: number;
1931
+ }[];
1932
+ expiresAt: string;
1933
+ } | null;
1934
+ charge: {
1935
+ effectiveAt: string;
1936
+ periodEndsAt: string;
1937
+ debitMinor: number;
1938
+ discountMinor: number;
1939
+ taxMinor: number;
1940
+ totalMinor: number;
1941
+ } | null;
1942
+ expiresAt: string;
1943
+ provider: "merchant" | "stripe" | "apple" | "google";
1944
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1945
+ lines: {
1946
+ lineId: string;
1947
+ productVersionId: string;
1948
+ productName: string;
1949
+ interval: "week" | "month" | "year" | "one_time" | "free";
1950
+ baseAmountMinor: number;
1951
+ seats: {
1952
+ key: string;
1953
+ quantity: number;
1954
+ includedQuantity: number;
1955
+ maximumQuantity: number;
1956
+ unitAmountMinor: number;
1957
+ }[];
1958
+ catalogAmountMinor: number;
1959
+ trial: {
1960
+ days: number;
1961
+ cardRequired: boolean;
1962
+ } | null;
1963
+ intervalCount?: number | undefined;
1964
+ prepaid?: {
1965
+ itemKey: string;
1966
+ internal_feature_id: string;
1967
+ includedAmount: string;
1968
+ quantity: number;
1969
+ terms: {
1970
+ units: string;
1971
+ prices: {
1972
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1973
+ amountMinor: number;
1974
+ pricing?: {
1975
+ kind: "graduated" | "volume";
1976
+ tiers: {
1977
+ upTo: number | null;
1978
+ unitAmountMinor: number;
1979
+ flatAmountMinor?: number | undefined;
1980
+ }[];
1981
+ } | undefined;
1982
+ }[];
1983
+ minimumQuantity: number;
1984
+ maximumQuantity: number;
1985
+ };
1986
+ unitAmountMinor: number;
1987
+ productId: string | null;
1988
+ priceId: string | null;
1989
+ pricing?: {
1990
+ kind: "graduated" | "volume";
1991
+ tiers: {
1992
+ upTo: number | null;
1993
+ unitAmountMinor: number;
1994
+ flatAmountMinor?: number | undefined;
1995
+ }[];
1996
+ } | undefined;
1997
+ }[] | undefined;
1998
+ }[];
1999
+ catalogAmountMinor: number;
2000
+ automaticTax: boolean;
2001
+ execution: {
2002
+ type: "purchase";
2003
+ mode: "payment" | "subscription";
2004
+ lineItems: {
2005
+ priceId: string;
2006
+ productVersionId: string;
2007
+ productId: string;
2008
+ quantity: number;
2009
+ unitAmountMinor: number;
2010
+ totalMinor: number;
2011
+ interval: "week" | "month" | "year" | "one_off";
2012
+ intervalCount: number;
2013
+ kind: "fixed" | "prepaid" | "seat";
2014
+ tiers: {
2015
+ mode: "graduated" | "volume";
2016
+ tiers: {
2017
+ upTo: number | null;
2018
+ unitAmountMinor: number;
2019
+ flatAmountMinor?: number | undefined;
2020
+ }[];
2021
+ } | null;
2022
+ }[];
2023
+ catalogAmountMinor: number;
2024
+ discount: {
2025
+ grantId: string;
2026
+ couponId: string;
2027
+ amountMinor: number;
2028
+ terms: {
2029
+ type: "percent";
2030
+ percentOff: number;
2031
+ } | {
2032
+ type: "amount";
2033
+ amountOffMinor: number;
2034
+ currency: string;
2035
+ };
2036
+ duration: {
2037
+ type: "once";
2038
+ } | {
2039
+ type: "forever";
2040
+ } | {
2041
+ type: "repeating";
2042
+ months: number;
2043
+ };
2044
+ } | null;
2045
+ trialPeriodDays: number | null;
2046
+ automaticTax: boolean;
2047
+ provider: "merchant";
2048
+ executor: "merchant";
2049
+ operationId: string;
2050
+ customerId: string;
2051
+ configurationRevision: number;
2052
+ connectionRevision: number;
2053
+ currency: string;
2054
+ expiresAt: string;
2055
+ } | {
2056
+ provider: "stripe";
2057
+ executor: "merchant" | "indiana";
2058
+ accountId: string;
2059
+ mode: "payment" | "subscription";
2060
+ lineItems: {
2061
+ price: string | null;
2062
+ quantity: number;
2063
+ priceId: string;
2064
+ productName: string;
2065
+ amountMinor: number;
2066
+ currency: string;
2067
+ interval: "week" | "month" | "year" | "one_off";
2068
+ intervalCount: number;
2069
+ slot: "stripe_price_id" | "stripe_empty_price_id";
2070
+ tiers: {
2071
+ mode: "graduated" | "volume";
2072
+ tiers: {
2073
+ upTo: number | null;
2074
+ unitAmountMinor: number;
2075
+ flatAmountMinor?: number | undefined;
2076
+ }[];
2077
+ } | null;
2078
+ }[];
2079
+ discounts: {
2080
+ coupon: string;
2081
+ terms: {
2082
+ id: string;
2083
+ name: string;
2084
+ duration: "once" | "forever" | "repeating";
2085
+ percent_off?: number | undefined;
2086
+ amount_off?: number | undefined;
2087
+ currency?: string | undefined;
2088
+ duration_in_months?: number | undefined;
2089
+ };
2090
+ }[];
2091
+ trialPeriodDays: number | null;
2092
+ metadata: {
2093
+ grooveCheckoutId: string;
2094
+ grooveCustomerId: string;
2095
+ };
2096
+ expiresAt: string;
2097
+ invoiceMode?: InvoiceModeParams | undefined;
2098
+ append?: {
2099
+ subscriptionId: string;
2100
+ customerId: string;
2101
+ sourceItems: {
2102
+ id: string;
2103
+ price_id: string;
2104
+ quantity: number;
2105
+ discounts?: {
2106
+ id: string;
2107
+ coupon: string;
2108
+ start: number;
2109
+ end: number | null;
2110
+ }[] | undefined;
2111
+ }[];
2112
+ prorationDate: number;
2113
+ amountMinor: number;
2114
+ periodStartMs: number;
2115
+ periodEndMs: number;
2116
+ } | undefined;
2117
+ } | null;
2118
+ nativeOffer?: {
2119
+ offerKind: "none" | "introductory" | "promotional";
2120
+ offerId: string | null;
2121
+ discountMinor: number;
2122
+ trialDays: number | null;
2123
+ } | undefined;
2124
+ } | null;
2125
+ operation: {
2126
+ operationId: string;
2127
+ orderId: string;
2128
+ status: "pending" | "failed" | "cancelled" | "complete";
2129
+ executor: "merchant" | "indiana";
2130
+ checkoutUrl: string | null;
2131
+ execution: {
2132
+ type: "purchase";
2133
+ mode: "payment" | "subscription";
2134
+ lineItems: {
2135
+ priceId: string;
2136
+ productVersionId: string;
2137
+ productId: string;
2138
+ quantity: number;
2139
+ unitAmountMinor: number;
2140
+ totalMinor: number;
2141
+ interval: "week" | "month" | "year" | "one_off";
2142
+ intervalCount: number;
2143
+ kind: "fixed" | "prepaid" | "seat";
2144
+ tiers: {
2145
+ mode: "graduated" | "volume";
2146
+ tiers: {
2147
+ upTo: number | null;
2148
+ unitAmountMinor: number;
2149
+ flatAmountMinor?: number | undefined;
2150
+ }[];
2151
+ } | null;
2152
+ }[];
2153
+ catalogAmountMinor: number;
2154
+ discount: {
2155
+ grantId: string;
2156
+ couponId: string;
2157
+ amountMinor: number;
2158
+ terms: {
2159
+ type: "percent";
2160
+ percentOff: number;
2161
+ } | {
2162
+ type: "amount";
2163
+ amountOffMinor: number;
2164
+ currency: string;
2165
+ };
2166
+ duration: {
2167
+ type: "once";
2168
+ } | {
2169
+ type: "forever";
2170
+ } | {
2171
+ type: "repeating";
2172
+ months: number;
2173
+ };
2174
+ } | null;
2175
+ trialPeriodDays: number | null;
2176
+ automaticTax: boolean;
2177
+ provider: "merchant";
2178
+ executor: "merchant";
2179
+ operationId: string;
2180
+ customerId: string;
2181
+ configurationRevision: number;
2182
+ connectionRevision: number;
2183
+ currency: string;
2184
+ expiresAt: string;
2185
+ } | {
2186
+ provider: "stripe";
2187
+ executor: "merchant" | "indiana";
2188
+ accountId: string;
2189
+ mode: "payment" | "subscription";
1467
2190
  lineItems: {
1468
2191
  price: string | null;
1469
2192
  quantity: number;
@@ -1471,7 +2194,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1471
2194
  productName: string;
1472
2195
  amountMinor: number;
1473
2196
  currency: string;
1474
- interval: "month" | "year" | "one_off" | "week";
2197
+ interval: "week" | "month" | "year" | "one_off";
1475
2198
  intervalCount: number;
1476
2199
  slot: "stripe_price_id" | "stripe_empty_price_id";
1477
2200
  tiers: {
@@ -1488,7 +2211,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1488
2211
  terms: {
1489
2212
  id: string;
1490
2213
  name: string;
1491
- duration: "forever" | "once" | "repeating";
2214
+ duration: "once" | "forever" | "repeating";
1492
2215
  percent_off?: number | undefined;
1493
2216
  amount_off?: number | undefined;
1494
2217
  currency?: string | undefined;
@@ -1521,126 +2244,481 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1521
2244
  periodStartMs: number;
1522
2245
  periodEndMs: number;
1523
2246
  } | undefined;
1524
- } | null;
1525
- nativeOffer?: {
1526
- offerKind: "none" | "introductory" | "promotional";
1527
- offerId: string | null;
1528
- discountMinor: number;
1529
- trialDays: number | null;
2247
+ } | null;
2248
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
2249
+ catalogAmountMinor: number;
2250
+ taxMinor: number;
2251
+ totalMinor: number | null;
2252
+ quoteFinalized: boolean;
2253
+ nativePurchase: {
2254
+ type: "native_purchase";
2255
+ receiptId: string;
2256
+ orderId: string;
2257
+ productVersionId: string;
2258
+ provider: "apple" | "google";
2259
+ productId: string;
2260
+ productKind: "credit_pack" | "lifetime" | "membership";
2261
+ replacement: {
2262
+ sourceOrderId: string;
2263
+ sourceProductId: string;
2264
+ policy: "apple_store" | "google_full_price";
2265
+ sourceAccountTokens: string[];
2266
+ } | null;
2267
+ offerKind: "none" | "introductory" | "promotional";
2268
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
2269
+ catalogAmountMinor: number;
2270
+ discountMinor: number;
2271
+ trialDays: number | null;
2272
+ seatBundle: {
2273
+ key: string;
2274
+ quantity: number;
2275
+ }[];
2276
+ applePromotionalOffer: {
2277
+ offerId: string;
2278
+ keyId: string;
2279
+ nonce: string;
2280
+ signature: string;
2281
+ timestamp: number;
2282
+ } | null;
2283
+ appAccountToken?: string | undefined;
2284
+ obfuscatedAccountId?: string | undefined;
2285
+ obfuscatedProfileId?: string | undefined;
2286
+ basePlanId?: string | undefined;
2287
+ offerId?: string | undefined;
2288
+ } | null;
2289
+ append?: boolean | undefined;
2290
+ invoiceMode?: boolean | undefined;
2291
+ confirmedAt?: string | null | undefined;
2292
+ quote?: {
2293
+ operationId: string;
2294
+ entityId: string | null;
2295
+ billingSubscriptionId: string | null;
2296
+ discount: {
2297
+ offerId: string;
2298
+ couponId: string;
2299
+ discount: {
2300
+ type: "percent";
2301
+ percentOff: number;
2302
+ } | {
2303
+ type: "amount";
2304
+ amountOffCents: number;
2305
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
2306
+ };
2307
+ duration: {
2308
+ type: "once";
2309
+ } | {
2310
+ type: "repeating";
2311
+ months: number;
2312
+ } | {
2313
+ type: "forever";
2314
+ };
2315
+ amountMinor: number;
2316
+ allocations: {
2317
+ productVersionId: string;
2318
+ amountMinor: number;
2319
+ }[];
2320
+ expiresAt: string;
2321
+ } | null;
2322
+ charge: {
2323
+ effectiveAt: string;
2324
+ periodEndsAt: string;
2325
+ debitMinor: number;
2326
+ discountMinor: number;
2327
+ taxMinor: number;
2328
+ totalMinor: number;
2329
+ } | null;
2330
+ expiresAt: string;
2331
+ provider: "merchant" | "stripe" | "apple" | "google";
2332
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
2333
+ lines: {
2334
+ lineId: string;
2335
+ productVersionId: string;
2336
+ productName: string;
2337
+ interval: "week" | "month" | "year" | "one_time" | "free";
2338
+ baseAmountMinor: number;
2339
+ seats: {
2340
+ key: string;
2341
+ quantity: number;
2342
+ includedQuantity: number;
2343
+ maximumQuantity: number;
2344
+ unitAmountMinor: number;
2345
+ }[];
2346
+ catalogAmountMinor: number;
2347
+ trial: {
2348
+ days: number;
2349
+ cardRequired: boolean;
2350
+ } | null;
2351
+ intervalCount?: number | undefined;
2352
+ prepaid?: {
2353
+ itemKey: string;
2354
+ internal_feature_id: string;
2355
+ includedAmount: string;
2356
+ quantity: number;
2357
+ terms: {
2358
+ units: string;
2359
+ prices: {
2360
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
2361
+ amountMinor: number;
2362
+ pricing?: {
2363
+ kind: "graduated" | "volume";
2364
+ tiers: {
2365
+ upTo: number | null;
2366
+ unitAmountMinor: number;
2367
+ flatAmountMinor?: number | undefined;
2368
+ }[];
2369
+ } | undefined;
2370
+ }[];
2371
+ minimumQuantity: number;
2372
+ maximumQuantity: number;
2373
+ };
2374
+ unitAmountMinor: number;
2375
+ productId: string | null;
2376
+ priceId: string | null;
2377
+ pricing?: {
2378
+ kind: "graduated" | "volume";
2379
+ tiers: {
2380
+ upTo: number | null;
2381
+ unitAmountMinor: number;
2382
+ flatAmountMinor?: number | undefined;
2383
+ }[];
2384
+ } | undefined;
2385
+ }[] | undefined;
2386
+ }[];
2387
+ catalogAmountMinor: number;
2388
+ automaticTax: boolean;
2389
+ execution: {
2390
+ type: "purchase";
2391
+ mode: "payment" | "subscription";
2392
+ lineItems: {
2393
+ priceId: string;
2394
+ productVersionId: string;
2395
+ productId: string;
2396
+ quantity: number;
2397
+ unitAmountMinor: number;
2398
+ totalMinor: number;
2399
+ interval: "week" | "month" | "year" | "one_off";
2400
+ intervalCount: number;
2401
+ kind: "fixed" | "prepaid" | "seat";
2402
+ tiers: {
2403
+ mode: "graduated" | "volume";
2404
+ tiers: {
2405
+ upTo: number | null;
2406
+ unitAmountMinor: number;
2407
+ flatAmountMinor?: number | undefined;
2408
+ }[];
2409
+ } | null;
2410
+ }[];
2411
+ catalogAmountMinor: number;
2412
+ discount: {
2413
+ grantId: string;
2414
+ couponId: string;
2415
+ amountMinor: number;
2416
+ terms: {
2417
+ type: "percent";
2418
+ percentOff: number;
2419
+ } | {
2420
+ type: "amount";
2421
+ amountOffMinor: number;
2422
+ currency: string;
2423
+ };
2424
+ duration: {
2425
+ type: "once";
2426
+ } | {
2427
+ type: "forever";
2428
+ } | {
2429
+ type: "repeating";
2430
+ months: number;
2431
+ };
2432
+ } | null;
2433
+ trialPeriodDays: number | null;
2434
+ automaticTax: boolean;
2435
+ provider: "merchant";
2436
+ executor: "merchant";
2437
+ operationId: string;
2438
+ customerId: string;
2439
+ configurationRevision: number;
2440
+ connectionRevision: number;
2441
+ currency: string;
2442
+ expiresAt: string;
2443
+ } | {
2444
+ provider: "stripe";
2445
+ executor: "merchant" | "indiana";
2446
+ accountId: string;
2447
+ mode: "payment" | "subscription";
2448
+ lineItems: {
2449
+ price: string | null;
2450
+ quantity: number;
2451
+ priceId: string;
2452
+ productName: string;
2453
+ amountMinor: number;
2454
+ currency: string;
2455
+ interval: "week" | "month" | "year" | "one_off";
2456
+ intervalCount: number;
2457
+ slot: "stripe_price_id" | "stripe_empty_price_id";
2458
+ tiers: {
2459
+ mode: "graduated" | "volume";
2460
+ tiers: {
2461
+ upTo: number | null;
2462
+ unitAmountMinor: number;
2463
+ flatAmountMinor?: number | undefined;
2464
+ }[];
2465
+ } | null;
2466
+ }[];
2467
+ discounts: {
2468
+ coupon: string;
2469
+ terms: {
2470
+ id: string;
2471
+ name: string;
2472
+ duration: "once" | "forever" | "repeating";
2473
+ percent_off?: number | undefined;
2474
+ amount_off?: number | undefined;
2475
+ currency?: string | undefined;
2476
+ duration_in_months?: number | undefined;
2477
+ };
2478
+ }[];
2479
+ trialPeriodDays: number | null;
2480
+ metadata: {
2481
+ grooveCheckoutId: string;
2482
+ grooveCustomerId: string;
2483
+ };
2484
+ expiresAt: string;
2485
+ invoiceMode?: InvoiceModeParams | undefined;
2486
+ append?: {
2487
+ subscriptionId: string;
2488
+ customerId: string;
2489
+ sourceItems: {
2490
+ id: string;
2491
+ price_id: string;
2492
+ quantity: number;
2493
+ discounts?: {
2494
+ id: string;
2495
+ coupon: string;
2496
+ start: number;
2497
+ end: number | null;
2498
+ }[] | undefined;
2499
+ }[];
2500
+ prorationDate: number;
2501
+ amountMinor: number;
2502
+ periodStartMs: number;
2503
+ periodEndMs: number;
2504
+ } | undefined;
2505
+ } | null;
2506
+ nativeOffer?: {
2507
+ offerKind: "none" | "introductory" | "promotional";
2508
+ offerId: string | null;
2509
+ discountMinor: number;
2510
+ trialDays: number | null;
2511
+ } | undefined;
1530
2512
  } | undefined;
1531
- } | null;
1532
- operation: {
1533
- operationId: string;
1534
- orderId: string;
1535
- status: "failed" | "pending" | "complete" | "cancelled";
1536
- executor: "merchant" | "indiana";
1537
- checkoutUrl: string | null;
1538
- execution: {
1539
- provider: "stripe";
1540
- executor: "merchant" | "indiana";
1541
- accountId: string;
1542
- mode: "subscription" | "payment";
1543
- lineItems: {
1544
- price: string | null;
1545
- quantity: number;
1546
- priceId: string;
1547
- productName: string;
1548
- amountMinor: number;
1549
- currency: string;
1550
- interval: "month" | "year" | "one_off" | "week";
1551
- intervalCount: number;
1552
- slot: "stripe_price_id" | "stripe_empty_price_id";
1553
- tiers: {
1554
- mode: "graduated" | "volume";
2513
+ merchantExecution?: {
2514
+ type: "purchase";
2515
+ merchantOrderId: string | null;
2516
+ paymentStatus: "unknown" | "not_started" | "pending" | "failed" | "succeeded" | "not_required" | "expired";
2517
+ checkoutUrl: string | null;
2518
+ checkoutExpiresAt: string | null;
2519
+ operationId: string;
2520
+ customerId: string;
2521
+ merchantExecutionId: string;
2522
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
2523
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
2524
+ updatedAt: string;
2525
+ problem: {
2526
+ phase: "payment" | "execution" | "fulfillment" | "recording";
2527
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
2528
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
2529
+ retryable: boolean;
2530
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
2531
+ } | null;
2532
+ pollAfterMs: number | null;
2533
+ } | {
2534
+ type: "subscription_change";
2535
+ status: "unknown" | "pending" | "applied" | "failed" | "scheduled";
2536
+ merchantSubscriptionId: string;
2537
+ scheduledFor: string | null;
2538
+ operationId: string;
2539
+ customerId: string;
2540
+ merchantExecutionId: string;
2541
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
2542
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
2543
+ updatedAt: string;
2544
+ problem: {
2545
+ phase: "payment" | "execution" | "fulfillment" | "recording";
2546
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
2547
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
2548
+ retryable: boolean;
2549
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
2550
+ } | null;
2551
+ pollAfterMs: number | null;
2552
+ } | {
2553
+ type: "refund";
2554
+ status: "unknown" | "pending" | "failed" | "succeeded";
2555
+ merchantRefundId: string | null;
2556
+ operationId: string;
2557
+ customerId: string;
2558
+ merchantExecutionId: string;
2559
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
2560
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
2561
+ updatedAt: string;
2562
+ problem: {
2563
+ phase: "payment" | "execution" | "fulfillment" | "recording";
2564
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
2565
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
2566
+ retryable: boolean;
2567
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
2568
+ } | null;
2569
+ pollAfterMs: number | null;
2570
+ } | null | undefined;
2571
+ problem?: {
2572
+ phase: "payment" | "execution" | "fulfillment" | "recording";
2573
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
2574
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
2575
+ retryable: boolean;
2576
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
2577
+ } | null | undefined;
2578
+ authority?: {
2579
+ scope: {
2580
+ projectId: string;
2581
+ environmentId: string;
2582
+ environment: "sandbox" | "live";
2583
+ };
2584
+ operationId: string;
2585
+ customerId: string;
2586
+ confirmedAt: string | null;
2587
+ initialExecutionAllowed: boolean;
2588
+ instruction: {
2589
+ type: "purchase";
2590
+ mode: "payment" | "subscription";
2591
+ lineItems: {
2592
+ priceId: string;
2593
+ productVersionId: string;
2594
+ productId: string;
2595
+ quantity: number;
2596
+ unitAmountMinor: number;
2597
+ totalMinor: number;
2598
+ interval: "week" | "month" | "year" | "one_off";
2599
+ intervalCount: number;
2600
+ kind: "fixed" | "prepaid" | "seat";
1555
2601
  tiers: {
1556
- upTo: number | null;
1557
- unitAmountMinor: number;
1558
- flatAmountMinor?: number | undefined;
1559
- }[];
2602
+ mode: "graduated" | "volume";
2603
+ tiers: {
2604
+ upTo: number | null;
2605
+ unitAmountMinor: number;
2606
+ flatAmountMinor?: number | undefined;
2607
+ }[];
2608
+ } | null;
2609
+ }[];
2610
+ catalogAmountMinor: number;
2611
+ discount: {
2612
+ grantId: string;
2613
+ couponId: string;
2614
+ amountMinor: number;
2615
+ terms: {
2616
+ type: "percent";
2617
+ percentOff: number;
2618
+ } | {
2619
+ type: "amount";
2620
+ amountOffMinor: number;
2621
+ currency: string;
2622
+ };
2623
+ duration: {
2624
+ type: "once";
2625
+ } | {
2626
+ type: "forever";
2627
+ } | {
2628
+ type: "repeating";
2629
+ months: number;
2630
+ };
1560
2631
  } | null;
1561
- }[];
1562
- discounts: {
1563
- coupon: string;
1564
- terms: {
1565
- id: string;
1566
- name: string;
1567
- duration: "forever" | "once" | "repeating";
1568
- percent_off?: number | undefined;
1569
- amount_off?: number | undefined;
1570
- currency?: string | undefined;
1571
- duration_in_months?: number | undefined;
1572
- };
1573
- }[];
1574
- trialPeriodDays: number | null;
1575
- metadata: {
1576
- grooveCheckoutId: string;
1577
- grooveCustomerId: string;
1578
- };
1579
- expiresAt: string;
1580
- invoiceMode?: InvoiceModeParams | undefined;
1581
- append?: {
1582
- subscriptionId: string;
2632
+ trialPeriodDays: number | null;
2633
+ automaticTax: boolean;
2634
+ provider: "merchant";
2635
+ executor: "merchant";
2636
+ operationId: string;
1583
2637
  customerId: string;
1584
- sourceItems: {
1585
- id: string;
1586
- price_id: string;
2638
+ configurationRevision: number;
2639
+ connectionRevision: number;
2640
+ currency: string;
2641
+ expiresAt: string;
2642
+ } | {
2643
+ type: "subscription_change";
2644
+ subscriptionId: string;
2645
+ merchantSubscriptionId: string;
2646
+ membershipId: string;
2647
+ subscriptionAction: "update" | "cancel" | "schedule" | "release";
2648
+ supersedesOperationId: string | null;
2649
+ change: {
2650
+ type: "cancel";
2651
+ } | {
2652
+ type: "uncancel";
2653
+ } | {
2654
+ type: "plan";
2655
+ productVersionId: string;
2656
+ } | {
2657
+ type: "seats";
2658
+ licenseKey: string;
2659
+ quantity: number;
2660
+ } | {
2661
+ type: "quantity";
2662
+ internal_feature_id: string;
2663
+ quantity: number;
2664
+ } | {
2665
+ type: "billing_cycle";
2666
+ billingCycleAnchor: number | "now";
2667
+ };
2668
+ timing: "immediate" | "renewal";
2669
+ effectiveAt: string;
2670
+ creditMinor: number;
2671
+ debitMinor: number;
2672
+ totalMinor: number;
2673
+ discountMinor: number;
2674
+ taxMinor: number;
2675
+ proration: "none" | "create_prorations" | "always_invoice";
2676
+ lineItems: {
2677
+ priceId: string;
2678
+ productVersionId: string;
2679
+ productId: string;
2680
+ unitAmountMinor: number;
2681
+ totalMinor: number;
2682
+ interval: "week" | "month" | "year" | "one_off";
2683
+ intervalCount: number;
2684
+ kind: "fixed" | "prepaid" | "seat";
2685
+ tiers: {
2686
+ mode: "graduated" | "volume";
2687
+ tiers: {
2688
+ upTo: number | null;
2689
+ unitAmountMinor: number;
2690
+ flatAmountMinor?: number | undefined;
2691
+ }[];
2692
+ } | null;
1587
2693
  quantity: number;
1588
- discounts?: {
1589
- id: string;
1590
- coupon: string;
1591
- start: number;
1592
- end: number | null;
1593
- }[] | undefined;
1594
2694
  }[];
1595
- prorationDate: number;
2695
+ removePriceIds: string[];
2696
+ provider: "merchant";
2697
+ executor: "merchant";
2698
+ operationId: string;
2699
+ customerId: string;
2700
+ configurationRevision: number;
2701
+ connectionRevision: number;
2702
+ currency: string;
2703
+ expiresAt: string;
2704
+ } | {
2705
+ type: "refund";
2706
+ invoiceId: string;
2707
+ merchantInvoiceId: string;
1596
2708
  amountMinor: number;
1597
- periodStartMs: number;
1598
- periodEndMs: number;
1599
- } | undefined;
1600
- } | null;
1601
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1602
- catalogAmountMinor: number;
1603
- taxMinor: number;
1604
- totalMinor: number | null;
1605
- quoteFinalized: boolean;
1606
- nativePurchase: {
1607
- type: "native_purchase";
1608
- receiptId: string;
1609
- orderId: string;
1610
- productVersionId: string;
1611
- provider: "apple" | "google";
1612
- productId: string;
1613
- productKind: "credit_pack" | "lifetime" | "membership";
1614
- replacement: {
1615
- sourceOrderId: string;
1616
- sourceProductId: string;
1617
- policy: "apple_store" | "google_full_price";
1618
- sourceAccountTokens: string[];
1619
- } | null;
1620
- offerKind: "none" | "introductory" | "promotional";
1621
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
1622
- catalogAmountMinor: number;
1623
- discountMinor: number;
1624
- trialDays: number | null;
1625
- seatBundle: {
1626
- key: string;
1627
- quantity: number;
1628
- }[];
1629
- applePromotionalOffer: {
1630
- offerId: string;
1631
- keyId: string;
1632
- nonce: string;
1633
- signature: string;
1634
- timestamp: number;
1635
- } | null;
1636
- appAccountToken?: string | undefined;
1637
- obfuscatedAccountId?: string | undefined;
1638
- obfuscatedProfileId?: string | undefined;
1639
- basePlanId?: string | undefined;
1640
- offerId?: string | undefined;
1641
- } | null;
1642
- append?: boolean | undefined;
1643
- invoiceMode?: boolean | undefined;
2709
+ mode: "full" | "partial";
2710
+ entitlementAction: "retain" | "revoke";
2711
+ cancelSubscriptions: string[];
2712
+ provider: "merchant";
2713
+ executor: "merchant";
2714
+ operationId: string;
2715
+ customerId: string;
2716
+ configurationRevision: number;
2717
+ connectionRevision: number;
2718
+ currency: string;
2719
+ expiresAt: string;
2720
+ };
2721
+ } | undefined;
1644
2722
  } | null;
1645
2723
  canReselect?: boolean | undefined;
1646
2724
  } | undefined;
@@ -1675,7 +2753,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1675
2753
  primary: string;
1676
2754
  background: string;
1677
2755
  text: string;
1678
- radius: "none" | "sm" | "md" | "lg" | "full";
2756
+ radius: "none" | "full" | "sm" | "md" | "lg";
1679
2757
  font: "system" | "serif" | "rounded" | "mono";
1680
2758
  };
1681
2759
  pages: {
@@ -1686,7 +2764,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1686
2764
  primary: string;
1687
2765
  background: string;
1688
2766
  text: string;
1689
- radius: "none" | "sm" | "md" | "lg" | "full";
2767
+ radius: "none" | "full" | "sm" | "md" | "lg";
1690
2768
  font: "system" | "serif" | "rounded" | "mono";
1691
2769
  } | undefined;
1692
2770
  editorPosition?: {
@@ -1750,7 +2828,7 @@ declare function renewFunnelRun(options: IndianaServerOptions, input: {
1750
2828
  purchases: {
1751
2829
  receiptId: string;
1752
2830
  operationId: string;
1753
- status: "unknown" | "failed" | "pending" | "complete" | "cancelled";
2831
+ status: "unknown" | "pending" | "failed" | "cancelled" | "complete";
1754
2832
  }[];
1755
2833
  } | undefined;
1756
2834
  runToken?: string | undefined;
@@ -3162,7 +4240,7 @@ declare function createFunnelDecisionClient(options: IndianaServerOptions & {
3162
4240
  };
3163
4241
  decisionId: string;
3164
4242
  requestId: string;
3165
- status: "failed" | "pending" | "completed";
4243
+ status: "pending" | "failed" | "completed";
3166
4244
  decision: {
3167
4245
  requestId: string;
3168
4246
  decisionId: string;
@@ -3216,7 +4294,7 @@ declare function createFunnelDecisionClient(options: IndianaServerOptions & {
3216
4294
  };
3217
4295
  decisionId: string;
3218
4296
  requestId: string;
3219
- status: "failed" | "pending" | "completed";
4297
+ status: "pending" | "failed" | "completed";
3220
4298
  decision: {
3221
4299
  requestId: string;
3222
4300
  decisionId: string;
@@ -3284,7 +4362,7 @@ declare function createNativeReceiptClient(options: IndianaServerOptions): {
3284
4362
  requestId: string;
3285
4363
  orderId: string;
3286
4364
  receiptId: string;
3287
- orderStatus: "failed" | "pending" | "cancelled" | "trialing" | "paid" | "created";
4365
+ orderStatus: "pending" | "failed" | "trialing" | "paid" | "cancelled" | "created";
3288
4366
  refunded: boolean;
3289
4367
  nativeCompletion?: {
3290
4368
  orderId: string;
@@ -3385,7 +4463,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3385
4463
  primary: string;
3386
4464
  background: string;
3387
4465
  text: string;
3388
- radius: "none" | "sm" | "md" | "lg" | "full";
4466
+ radius: "none" | "full" | "sm" | "md" | "lg";
3389
4467
  font: "system" | "serif" | "rounded" | "mono";
3390
4468
  };
3391
4469
  pages: {
@@ -3396,7 +4474,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3396
4474
  primary: string;
3397
4475
  background: string;
3398
4476
  text: string;
3399
- radius: "none" | "sm" | "md" | "lg" | "full";
4477
+ radius: "none" | "full" | "sm" | "md" | "lg";
3400
4478
  font: "system" | "serif" | "rounded" | "mono";
3401
4479
  } | undefined;
3402
4480
  editorPosition?: {
@@ -3518,13 +4596,13 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3518
4596
  period: string;
3519
4597
  currency?: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON" | undefined;
3520
4598
  amountMinor?: number | undefined;
3521
- interval?: "one_time" | "month" | "year" | "free" | "week" | undefined;
4599
+ interval?: "week" | "month" | "year" | "one_time" | "free" | undefined;
3522
4600
  intervalCount?: number | undefined;
3523
4601
  prepaid?: {
3524
4602
  internalFeatureId: string;
3525
4603
  name: string;
3526
4604
  includedAmount: string;
3527
- reset: "month" | "year" | "week" | "hour" | "day" | "lifetime";
4605
+ reset: "week" | "month" | "year" | "hour" | "day" | "lifetime";
3528
4606
  resetCount: number;
3529
4607
  terms: {
3530
4608
  units: string;
@@ -3566,11 +4644,11 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3566
4644
  productId: string;
3567
4645
  productVersionId: string;
3568
4646
  name: string;
3569
- action: "upgrade" | "purchase" | "addon" | "topup";
4647
+ action: "purchase" | "upgrade" | "addon" | "topup";
3570
4648
  membershipId: string | null;
3571
4649
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
3572
4650
  amountMinor: string;
3573
- interval: "one_time" | "month" | "year" | "free" | "week";
4651
+ interval: "week" | "month" | "year" | "one_time" | "free";
3574
4652
  intervalCount: number;
3575
4653
  }[];
3576
4654
  } | null;
@@ -3670,7 +4748,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3670
4748
  cursor: {
3671
4749
  at: string;
3672
4750
  id: string;
3673
- type: "invoice" | "source" | "usage" | "debt" | "transaction" | "settlement";
4751
+ type: "invoice" | "usage" | "source" | "debt" | "transaction" | "settlement";
3674
4752
  };
3675
4753
  } | {
3676
4754
  kind: "billing";
@@ -3738,7 +4816,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3738
4816
  primary: string;
3739
4817
  background: string;
3740
4818
  text: string;
3741
- radius: "none" | "sm" | "md" | "lg" | "full";
4819
+ radius: "none" | "full" | "sm" | "md" | "lg";
3742
4820
  font: "system" | "serif" | "rounded" | "mono";
3743
4821
  };
3744
4822
  pages: {
@@ -3749,7 +4827,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3749
4827
  primary: string;
3750
4828
  background: string;
3751
4829
  text: string;
3752
- radius: "none" | "sm" | "md" | "lg" | "full";
4830
+ radius: "none" | "full" | "sm" | "md" | "lg";
3753
4831
  font: "system" | "serif" | "rounded" | "mono";
3754
4832
  } | undefined;
3755
4833
  editorPosition?: {
@@ -3879,13 +4957,13 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3879
4957
  period: string;
3880
4958
  currency?: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON" | undefined;
3881
4959
  amountMinor?: number | undefined;
3882
- interval?: "one_time" | "month" | "year" | "free" | "week" | undefined;
4960
+ interval?: "week" | "month" | "year" | "one_time" | "free" | undefined;
3883
4961
  intervalCount?: number | undefined;
3884
4962
  prepaid?: {
3885
4963
  internalFeatureId: string;
3886
4964
  name: string;
3887
4965
  includedAmount: string;
3888
- reset: "month" | "year" | "week" | "hour" | "day" | "lifetime";
4966
+ reset: "week" | "month" | "year" | "hour" | "day" | "lifetime";
3889
4967
  resetCount: number;
3890
4968
  terms: {
3891
4969
  units: string;
@@ -3927,11 +5005,11 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3927
5005
  productId: string;
3928
5006
  productVersionId: string;
3929
5007
  name: string;
3930
- action: "upgrade" | "purchase" | "addon" | "topup";
5008
+ action: "purchase" | "upgrade" | "addon" | "topup";
3931
5009
  membershipId: string | null;
3932
5010
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
3933
5011
  amountMinor: string;
3934
- interval: "one_time" | "month" | "year" | "free" | "week";
5012
+ interval: "week" | "month" | "year" | "one_time" | "free";
3935
5013
  intervalCount: number;
3936
5014
  }[];
3937
5015
  } | null;
@@ -3958,11 +5036,11 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3958
5036
  productId: string;
3959
5037
  productVersionId: string;
3960
5038
  name: string;
3961
- action: "upgrade" | "purchase" | "addon" | "topup";
5039
+ action: "purchase" | "upgrade" | "addon" | "topup";
3962
5040
  membershipId: string | null;
3963
5041
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
3964
5042
  amountMinor: string;
3965
- interval: "one_time" | "month" | "year" | "free" | "week";
5043
+ interval: "week" | "month" | "year" | "one_time" | "free";
3966
5044
  intervalCount: number;
3967
5045
  }[];
3968
5046
  } | null;
@@ -3993,16 +5071,15 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
3993
5071
  productId: string;
3994
5072
  productVersionId: string;
3995
5073
  name: string;
3996
- action: "upgrade" | "purchase" | "addon" | "topup";
5074
+ action: "purchase" | "upgrade" | "addon" | "topup";
3997
5075
  membershipId: string | null;
3998
5076
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
3999
5077
  amountMinor: string;
4000
- interval: "one_time" | "month" | "year" | "free" | "week";
5078
+ interval: "week" | "month" | "year" | "one_time" | "free";
4001
5079
  intervalCount: number;
4002
5080
  }[];
4003
5081
  } | null;
4004
5082
  } | null;
4005
- id: string;
4006
5083
  capabilities: {
4007
5084
  nodes: Record<string, {
4008
5085
  base: {
@@ -4058,13 +5135,13 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4058
5135
  period: string;
4059
5136
  currency?: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON" | undefined;
4060
5137
  amountMinor?: number | undefined;
4061
- interval?: "one_time" | "month" | "year" | "free" | "week" | undefined;
5138
+ interval?: "week" | "month" | "year" | "one_time" | "free" | undefined;
4062
5139
  intervalCount?: number | undefined;
4063
5140
  prepaid?: {
4064
5141
  internalFeatureId: string;
4065
5142
  name: string;
4066
5143
  includedAmount: string;
4067
- reset: "month" | "year" | "week" | "hour" | "day" | "lifetime";
5144
+ reset: "week" | "month" | "year" | "hour" | "day" | "lifetime";
4068
5145
  resetCount: number;
4069
5146
  terms: {
4070
5147
  units: string;
@@ -4106,11 +5183,11 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4106
5183
  productId: string;
4107
5184
  productVersionId: string;
4108
5185
  name: string;
4109
- action: "upgrade" | "purchase" | "addon" | "topup";
5186
+ action: "purchase" | "upgrade" | "addon" | "topup";
4110
5187
  membershipId: string | null;
4111
5188
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
4112
5189
  amountMinor: string;
4113
- interval: "one_time" | "month" | "year" | "free" | "week";
5190
+ interval: "week" | "month" | "year" | "one_time" | "free";
4114
5191
  intervalCount: number;
4115
5192
  }[];
4116
5193
  } | null;
@@ -4124,6 +5201,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4124
5201
  available: boolean;
4125
5202
  }> | undefined;
4126
5203
  };
5204
+ id: string;
4127
5205
  version: number;
4128
5206
  paywallId: string;
4129
5207
  content: {
@@ -4178,13 +5256,13 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4178
5256
  totalMinor: number;
4179
5257
  } | null;
4180
5258
  expiresAt: string;
4181
- provider: "stripe" | "apple" | "google";
5259
+ provider: "merchant" | "stripe" | "apple" | "google";
4182
5260
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
4183
5261
  lines: {
4184
5262
  lineId: string;
4185
5263
  productVersionId: string;
4186
5264
  productName: string;
4187
- interval: "one_time" | "month" | "year" | "free" | "week";
5265
+ interval: "week" | "month" | "year" | "one_time" | "free";
4188
5266
  baseAmountMinor: number;
4189
5267
  seats: {
4190
5268
  key: string;
@@ -4237,10 +5315,64 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4237
5315
  catalogAmountMinor: number;
4238
5316
  automaticTax: boolean;
4239
5317
  execution: {
5318
+ type: "purchase";
5319
+ mode: "payment" | "subscription";
5320
+ lineItems: {
5321
+ priceId: string;
5322
+ productVersionId: string;
5323
+ productId: string;
5324
+ quantity: number;
5325
+ unitAmountMinor: number;
5326
+ totalMinor: number;
5327
+ interval: "week" | "month" | "year" | "one_off";
5328
+ intervalCount: number;
5329
+ kind: "fixed" | "prepaid" | "seat";
5330
+ tiers: {
5331
+ mode: "graduated" | "volume";
5332
+ tiers: {
5333
+ upTo: number | null;
5334
+ unitAmountMinor: number;
5335
+ flatAmountMinor?: number | undefined;
5336
+ }[];
5337
+ } | null;
5338
+ }[];
5339
+ catalogAmountMinor: number;
5340
+ discount: {
5341
+ grantId: string;
5342
+ couponId: string;
5343
+ amountMinor: number;
5344
+ terms: {
5345
+ type: "percent";
5346
+ percentOff: number;
5347
+ } | {
5348
+ type: "amount";
5349
+ amountOffMinor: number;
5350
+ currency: string;
5351
+ };
5352
+ duration: {
5353
+ type: "once";
5354
+ } | {
5355
+ type: "forever";
5356
+ } | {
5357
+ type: "repeating";
5358
+ months: number;
5359
+ };
5360
+ } | null;
5361
+ trialPeriodDays: number | null;
5362
+ automaticTax: boolean;
5363
+ provider: "merchant";
5364
+ executor: "merchant";
5365
+ operationId: string;
5366
+ customerId: string;
5367
+ configurationRevision: number;
5368
+ connectionRevision: number;
5369
+ currency: string;
5370
+ expiresAt: string;
5371
+ } | {
4240
5372
  provider: "stripe";
4241
5373
  executor: "merchant" | "indiana";
4242
5374
  accountId: string;
4243
- mode: "subscription" | "payment";
5375
+ mode: "payment" | "subscription";
4244
5376
  lineItems: {
4245
5377
  price: string | null;
4246
5378
  quantity: number;
@@ -4248,7 +5380,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4248
5380
  productName: string;
4249
5381
  amountMinor: number;
4250
5382
  currency: string;
4251
- interval: "month" | "year" | "one_off" | "week";
5383
+ interval: "week" | "month" | "year" | "one_off";
4252
5384
  intervalCount: number;
4253
5385
  slot: "stripe_price_id" | "stripe_empty_price_id";
4254
5386
  tiers: {
@@ -4265,7 +5397,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4265
5397
  terms: {
4266
5398
  id: string;
4267
5399
  name: string;
4268
- duration: "forever" | "once" | "repeating";
5400
+ duration: "once" | "forever" | "repeating";
4269
5401
  percent_off?: number | undefined;
4270
5402
  amount_off?: number | undefined;
4271
5403
  currency?: string | undefined;
@@ -4309,14 +5441,68 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4309
5441
  operation: {
4310
5442
  operationId: string;
4311
5443
  orderId: string;
4312
- status: "failed" | "pending" | "complete" | "cancelled";
5444
+ status: "pending" | "failed" | "cancelled" | "complete";
4313
5445
  executor: "merchant" | "indiana";
4314
5446
  checkoutUrl: string | null;
4315
5447
  execution: {
5448
+ type: "purchase";
5449
+ mode: "payment" | "subscription";
5450
+ lineItems: {
5451
+ priceId: string;
5452
+ productVersionId: string;
5453
+ productId: string;
5454
+ quantity: number;
5455
+ unitAmountMinor: number;
5456
+ totalMinor: number;
5457
+ interval: "week" | "month" | "year" | "one_off";
5458
+ intervalCount: number;
5459
+ kind: "fixed" | "prepaid" | "seat";
5460
+ tiers: {
5461
+ mode: "graduated" | "volume";
5462
+ tiers: {
5463
+ upTo: number | null;
5464
+ unitAmountMinor: number;
5465
+ flatAmountMinor?: number | undefined;
5466
+ }[];
5467
+ } | null;
5468
+ }[];
5469
+ catalogAmountMinor: number;
5470
+ discount: {
5471
+ grantId: string;
5472
+ couponId: string;
5473
+ amountMinor: number;
5474
+ terms: {
5475
+ type: "percent";
5476
+ percentOff: number;
5477
+ } | {
5478
+ type: "amount";
5479
+ amountOffMinor: number;
5480
+ currency: string;
5481
+ };
5482
+ duration: {
5483
+ type: "once";
5484
+ } | {
5485
+ type: "forever";
5486
+ } | {
5487
+ type: "repeating";
5488
+ months: number;
5489
+ };
5490
+ } | null;
5491
+ trialPeriodDays: number | null;
5492
+ automaticTax: boolean;
5493
+ provider: "merchant";
5494
+ executor: "merchant";
5495
+ operationId: string;
5496
+ customerId: string;
5497
+ configurationRevision: number;
5498
+ connectionRevision: number;
5499
+ currency: string;
5500
+ expiresAt: string;
5501
+ } | {
4316
5502
  provider: "stripe";
4317
5503
  executor: "merchant" | "indiana";
4318
5504
  accountId: string;
4319
- mode: "subscription" | "payment";
5505
+ mode: "payment" | "subscription";
4320
5506
  lineItems: {
4321
5507
  price: string | null;
4322
5508
  quantity: number;
@@ -4324,7 +5510,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4324
5510
  productName: string;
4325
5511
  amountMinor: number;
4326
5512
  currency: string;
4327
- interval: "month" | "year" | "one_off" | "week";
5513
+ interval: "week" | "month" | "year" | "one_off";
4328
5514
  intervalCount: number;
4329
5515
  slot: "stripe_price_id" | "stripe_empty_price_id";
4330
5516
  tiers: {
@@ -4335,89 +5521,520 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4335
5521
  flatAmountMinor?: number | undefined;
4336
5522
  }[];
4337
5523
  } | null;
4338
- }[];
4339
- discounts: {
4340
- coupon: string;
4341
- terms: {
4342
- id: string;
4343
- name: string;
4344
- duration: "forever" | "once" | "repeating";
4345
- percent_off?: number | undefined;
4346
- amount_off?: number | undefined;
4347
- currency?: string | undefined;
4348
- duration_in_months?: number | undefined;
4349
- };
4350
- }[];
4351
- trialPeriodDays: number | null;
4352
- metadata: {
4353
- grooveCheckoutId: string;
4354
- grooveCustomerId: string;
4355
- };
4356
- expiresAt: string;
4357
- invoiceMode?: InvoiceModeParams | undefined;
4358
- append?: {
4359
- subscriptionId: string;
5524
+ }[];
5525
+ discounts: {
5526
+ coupon: string;
5527
+ terms: {
5528
+ id: string;
5529
+ name: string;
5530
+ duration: "once" | "forever" | "repeating";
5531
+ percent_off?: number | undefined;
5532
+ amount_off?: number | undefined;
5533
+ currency?: string | undefined;
5534
+ duration_in_months?: number | undefined;
5535
+ };
5536
+ }[];
5537
+ trialPeriodDays: number | null;
5538
+ metadata: {
5539
+ grooveCheckoutId: string;
5540
+ grooveCustomerId: string;
5541
+ };
5542
+ expiresAt: string;
5543
+ invoiceMode?: InvoiceModeParams | undefined;
5544
+ append?: {
5545
+ subscriptionId: string;
5546
+ customerId: string;
5547
+ sourceItems: {
5548
+ id: string;
5549
+ price_id: string;
5550
+ quantity: number;
5551
+ discounts?: {
5552
+ id: string;
5553
+ coupon: string;
5554
+ start: number;
5555
+ end: number | null;
5556
+ }[] | undefined;
5557
+ }[];
5558
+ prorationDate: number;
5559
+ amountMinor: number;
5560
+ periodStartMs: number;
5561
+ periodEndMs: number;
5562
+ } | undefined;
5563
+ } | null;
5564
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
5565
+ catalogAmountMinor: number;
5566
+ taxMinor: number;
5567
+ totalMinor: number | null;
5568
+ quoteFinalized: boolean;
5569
+ nativePurchase: {
5570
+ type: "native_purchase";
5571
+ receiptId: string;
5572
+ orderId: string;
5573
+ productVersionId: string;
5574
+ provider: "apple" | "google";
5575
+ productId: string;
5576
+ productKind: "credit_pack" | "lifetime" | "membership";
5577
+ replacement: {
5578
+ sourceOrderId: string;
5579
+ sourceProductId: string;
5580
+ policy: "apple_store" | "google_full_price";
5581
+ sourceAccountTokens: string[];
5582
+ } | null;
5583
+ offerKind: "none" | "introductory" | "promotional";
5584
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
5585
+ catalogAmountMinor: number;
5586
+ discountMinor: number;
5587
+ trialDays: number | null;
5588
+ seatBundle: {
5589
+ key: string;
5590
+ quantity: number;
5591
+ }[];
5592
+ applePromotionalOffer: {
5593
+ offerId: string;
5594
+ keyId: string;
5595
+ nonce: string;
5596
+ signature: string;
5597
+ timestamp: number;
5598
+ } | null;
5599
+ appAccountToken?: string | undefined;
5600
+ obfuscatedAccountId?: string | undefined;
5601
+ obfuscatedProfileId?: string | undefined;
5602
+ basePlanId?: string | undefined;
5603
+ offerId?: string | undefined;
5604
+ } | null;
5605
+ append?: boolean | undefined;
5606
+ invoiceMode?: boolean | undefined;
5607
+ confirmedAt?: string | null | undefined;
5608
+ quote?: {
5609
+ operationId: string;
5610
+ entityId: string | null;
5611
+ billingSubscriptionId: string | null;
5612
+ discount: {
5613
+ offerId: string;
5614
+ couponId: string;
5615
+ discount: {
5616
+ type: "percent";
5617
+ percentOff: number;
5618
+ } | {
5619
+ type: "amount";
5620
+ amountOffCents: number;
5621
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
5622
+ };
5623
+ duration: {
5624
+ type: "once";
5625
+ } | {
5626
+ type: "repeating";
5627
+ months: number;
5628
+ } | {
5629
+ type: "forever";
5630
+ };
5631
+ amountMinor: number;
5632
+ allocations: {
5633
+ productVersionId: string;
5634
+ amountMinor: number;
5635
+ }[];
5636
+ expiresAt: string;
5637
+ } | null;
5638
+ charge: {
5639
+ effectiveAt: string;
5640
+ periodEndsAt: string;
5641
+ debitMinor: number;
5642
+ discountMinor: number;
5643
+ taxMinor: number;
5644
+ totalMinor: number;
5645
+ } | null;
5646
+ expiresAt: string;
5647
+ provider: "merchant" | "stripe" | "apple" | "google";
5648
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
5649
+ lines: {
5650
+ lineId: string;
5651
+ productVersionId: string;
5652
+ productName: string;
5653
+ interval: "week" | "month" | "year" | "one_time" | "free";
5654
+ baseAmountMinor: number;
5655
+ seats: {
5656
+ key: string;
5657
+ quantity: number;
5658
+ includedQuantity: number;
5659
+ maximumQuantity: number;
5660
+ unitAmountMinor: number;
5661
+ }[];
5662
+ catalogAmountMinor: number;
5663
+ trial: {
5664
+ days: number;
5665
+ cardRequired: boolean;
5666
+ } | null;
5667
+ intervalCount?: number | undefined;
5668
+ prepaid?: {
5669
+ itemKey: string;
5670
+ internal_feature_id: string;
5671
+ includedAmount: string;
5672
+ quantity: number;
5673
+ terms: {
5674
+ units: string;
5675
+ prices: {
5676
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
5677
+ amountMinor: number;
5678
+ pricing?: {
5679
+ kind: "graduated" | "volume";
5680
+ tiers: {
5681
+ upTo: number | null;
5682
+ unitAmountMinor: number;
5683
+ flatAmountMinor?: number | undefined;
5684
+ }[];
5685
+ } | undefined;
5686
+ }[];
5687
+ minimumQuantity: number;
5688
+ maximumQuantity: number;
5689
+ };
5690
+ unitAmountMinor: number;
5691
+ productId: string | null;
5692
+ priceId: string | null;
5693
+ pricing?: {
5694
+ kind: "graduated" | "volume";
5695
+ tiers: {
5696
+ upTo: number | null;
5697
+ unitAmountMinor: number;
5698
+ flatAmountMinor?: number | undefined;
5699
+ }[];
5700
+ } | undefined;
5701
+ }[] | undefined;
5702
+ }[];
5703
+ catalogAmountMinor: number;
5704
+ automaticTax: boolean;
5705
+ execution: {
5706
+ type: "purchase";
5707
+ mode: "payment" | "subscription";
5708
+ lineItems: {
5709
+ priceId: string;
5710
+ productVersionId: string;
5711
+ productId: string;
5712
+ quantity: number;
5713
+ unitAmountMinor: number;
5714
+ totalMinor: number;
5715
+ interval: "week" | "month" | "year" | "one_off";
5716
+ intervalCount: number;
5717
+ kind: "fixed" | "prepaid" | "seat";
5718
+ tiers: {
5719
+ mode: "graduated" | "volume";
5720
+ tiers: {
5721
+ upTo: number | null;
5722
+ unitAmountMinor: number;
5723
+ flatAmountMinor?: number | undefined;
5724
+ }[];
5725
+ } | null;
5726
+ }[];
5727
+ catalogAmountMinor: number;
5728
+ discount: {
5729
+ grantId: string;
5730
+ couponId: string;
5731
+ amountMinor: number;
5732
+ terms: {
5733
+ type: "percent";
5734
+ percentOff: number;
5735
+ } | {
5736
+ type: "amount";
5737
+ amountOffMinor: number;
5738
+ currency: string;
5739
+ };
5740
+ duration: {
5741
+ type: "once";
5742
+ } | {
5743
+ type: "forever";
5744
+ } | {
5745
+ type: "repeating";
5746
+ months: number;
5747
+ };
5748
+ } | null;
5749
+ trialPeriodDays: number | null;
5750
+ automaticTax: boolean;
5751
+ provider: "merchant";
5752
+ executor: "merchant";
5753
+ operationId: string;
5754
+ customerId: string;
5755
+ configurationRevision: number;
5756
+ connectionRevision: number;
5757
+ currency: string;
5758
+ expiresAt: string;
5759
+ } | {
5760
+ provider: "stripe";
5761
+ executor: "merchant" | "indiana";
5762
+ accountId: string;
5763
+ mode: "payment" | "subscription";
5764
+ lineItems: {
5765
+ price: string | null;
5766
+ quantity: number;
5767
+ priceId: string;
5768
+ productName: string;
5769
+ amountMinor: number;
5770
+ currency: string;
5771
+ interval: "week" | "month" | "year" | "one_off";
5772
+ intervalCount: number;
5773
+ slot: "stripe_price_id" | "stripe_empty_price_id";
5774
+ tiers: {
5775
+ mode: "graduated" | "volume";
5776
+ tiers: {
5777
+ upTo: number | null;
5778
+ unitAmountMinor: number;
5779
+ flatAmountMinor?: number | undefined;
5780
+ }[];
5781
+ } | null;
5782
+ }[];
5783
+ discounts: {
5784
+ coupon: string;
5785
+ terms: {
5786
+ id: string;
5787
+ name: string;
5788
+ duration: "once" | "forever" | "repeating";
5789
+ percent_off?: number | undefined;
5790
+ amount_off?: number | undefined;
5791
+ currency?: string | undefined;
5792
+ duration_in_months?: number | undefined;
5793
+ };
5794
+ }[];
5795
+ trialPeriodDays: number | null;
5796
+ metadata: {
5797
+ grooveCheckoutId: string;
5798
+ grooveCustomerId: string;
5799
+ };
5800
+ expiresAt: string;
5801
+ invoiceMode?: InvoiceModeParams | undefined;
5802
+ append?: {
5803
+ subscriptionId: string;
5804
+ customerId: string;
5805
+ sourceItems: {
5806
+ id: string;
5807
+ price_id: string;
5808
+ quantity: number;
5809
+ discounts?: {
5810
+ id: string;
5811
+ coupon: string;
5812
+ start: number;
5813
+ end: number | null;
5814
+ }[] | undefined;
5815
+ }[];
5816
+ prorationDate: number;
5817
+ amountMinor: number;
5818
+ periodStartMs: number;
5819
+ periodEndMs: number;
5820
+ } | undefined;
5821
+ } | null;
5822
+ nativeOffer?: {
5823
+ offerKind: "none" | "introductory" | "promotional";
5824
+ offerId: string | null;
5825
+ discountMinor: number;
5826
+ trialDays: number | null;
5827
+ } | undefined;
5828
+ } | undefined;
5829
+ merchantExecution?: {
5830
+ type: "purchase";
5831
+ merchantOrderId: string | null;
5832
+ paymentStatus: "unknown" | "not_started" | "pending" | "failed" | "succeeded" | "not_required" | "expired";
5833
+ checkoutUrl: string | null;
5834
+ checkoutExpiresAt: string | null;
5835
+ operationId: string;
5836
+ customerId: string;
5837
+ merchantExecutionId: string;
5838
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
5839
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
5840
+ updatedAt: string;
5841
+ problem: {
5842
+ phase: "payment" | "execution" | "fulfillment" | "recording";
5843
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
5844
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
5845
+ retryable: boolean;
5846
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
5847
+ } | null;
5848
+ pollAfterMs: number | null;
5849
+ } | {
5850
+ type: "subscription_change";
5851
+ status: "unknown" | "pending" | "applied" | "failed" | "scheduled";
5852
+ merchantSubscriptionId: string;
5853
+ scheduledFor: string | null;
5854
+ operationId: string;
5855
+ customerId: string;
5856
+ merchantExecutionId: string;
5857
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
5858
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
5859
+ updatedAt: string;
5860
+ problem: {
5861
+ phase: "payment" | "execution" | "fulfillment" | "recording";
5862
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
5863
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
5864
+ retryable: boolean;
5865
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
5866
+ } | null;
5867
+ pollAfterMs: number | null;
5868
+ } | {
5869
+ type: "refund";
5870
+ status: "unknown" | "pending" | "failed" | "succeeded";
5871
+ merchantRefundId: string | null;
5872
+ operationId: string;
5873
+ customerId: string;
5874
+ merchantExecutionId: string;
5875
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
5876
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
5877
+ updatedAt: string;
5878
+ problem: {
5879
+ phase: "payment" | "execution" | "fulfillment" | "recording";
5880
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
5881
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
5882
+ retryable: boolean;
5883
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
5884
+ } | null;
5885
+ pollAfterMs: number | null;
5886
+ } | null | undefined;
5887
+ problem?: {
5888
+ phase: "payment" | "execution" | "fulfillment" | "recording";
5889
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
5890
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
5891
+ retryable: boolean;
5892
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
5893
+ } | null | undefined;
5894
+ authority?: {
5895
+ scope: {
5896
+ projectId: string;
5897
+ environmentId: string;
5898
+ environment: "sandbox" | "live";
5899
+ };
5900
+ operationId: string;
5901
+ customerId: string;
5902
+ confirmedAt: string | null;
5903
+ initialExecutionAllowed: boolean;
5904
+ instruction: {
5905
+ type: "purchase";
5906
+ mode: "payment" | "subscription";
5907
+ lineItems: {
5908
+ priceId: string;
5909
+ productVersionId: string;
5910
+ productId: string;
5911
+ quantity: number;
5912
+ unitAmountMinor: number;
5913
+ totalMinor: number;
5914
+ interval: "week" | "month" | "year" | "one_off";
5915
+ intervalCount: number;
5916
+ kind: "fixed" | "prepaid" | "seat";
5917
+ tiers: {
5918
+ mode: "graduated" | "volume";
5919
+ tiers: {
5920
+ upTo: number | null;
5921
+ unitAmountMinor: number;
5922
+ flatAmountMinor?: number | undefined;
5923
+ }[];
5924
+ } | null;
5925
+ }[];
5926
+ catalogAmountMinor: number;
5927
+ discount: {
5928
+ grantId: string;
5929
+ couponId: string;
5930
+ amountMinor: number;
5931
+ terms: {
5932
+ type: "percent";
5933
+ percentOff: number;
5934
+ } | {
5935
+ type: "amount";
5936
+ amountOffMinor: number;
5937
+ currency: string;
5938
+ };
5939
+ duration: {
5940
+ type: "once";
5941
+ } | {
5942
+ type: "forever";
5943
+ } | {
5944
+ type: "repeating";
5945
+ months: number;
5946
+ };
5947
+ } | null;
5948
+ trialPeriodDays: number | null;
5949
+ automaticTax: boolean;
5950
+ provider: "merchant";
5951
+ executor: "merchant";
5952
+ operationId: string;
4360
5953
  customerId: string;
4361
- sourceItems: {
4362
- id: string;
4363
- price_id: string;
5954
+ configurationRevision: number;
5955
+ connectionRevision: number;
5956
+ currency: string;
5957
+ expiresAt: string;
5958
+ } | {
5959
+ type: "subscription_change";
5960
+ subscriptionId: string;
5961
+ merchantSubscriptionId: string;
5962
+ membershipId: string;
5963
+ subscriptionAction: "update" | "cancel" | "schedule" | "release";
5964
+ supersedesOperationId: string | null;
5965
+ change: {
5966
+ type: "cancel";
5967
+ } | {
5968
+ type: "uncancel";
5969
+ } | {
5970
+ type: "plan";
5971
+ productVersionId: string;
5972
+ } | {
5973
+ type: "seats";
5974
+ licenseKey: string;
5975
+ quantity: number;
5976
+ } | {
5977
+ type: "quantity";
5978
+ internal_feature_id: string;
5979
+ quantity: number;
5980
+ } | {
5981
+ type: "billing_cycle";
5982
+ billingCycleAnchor: number | "now";
5983
+ };
5984
+ timing: "immediate" | "renewal";
5985
+ effectiveAt: string;
5986
+ creditMinor: number;
5987
+ debitMinor: number;
5988
+ totalMinor: number;
5989
+ discountMinor: number;
5990
+ taxMinor: number;
5991
+ proration: "none" | "create_prorations" | "always_invoice";
5992
+ lineItems: {
5993
+ priceId: string;
5994
+ productVersionId: string;
5995
+ productId: string;
5996
+ unitAmountMinor: number;
5997
+ totalMinor: number;
5998
+ interval: "week" | "month" | "year" | "one_off";
5999
+ intervalCount: number;
6000
+ kind: "fixed" | "prepaid" | "seat";
6001
+ tiers: {
6002
+ mode: "graduated" | "volume";
6003
+ tiers: {
6004
+ upTo: number | null;
6005
+ unitAmountMinor: number;
6006
+ flatAmountMinor?: number | undefined;
6007
+ }[];
6008
+ } | null;
4364
6009
  quantity: number;
4365
- discounts?: {
4366
- id: string;
4367
- coupon: string;
4368
- start: number;
4369
- end: number | null;
4370
- }[] | undefined;
4371
6010
  }[];
4372
- prorationDate: number;
6011
+ removePriceIds: string[];
6012
+ provider: "merchant";
6013
+ executor: "merchant";
6014
+ operationId: string;
6015
+ customerId: string;
6016
+ configurationRevision: number;
6017
+ connectionRevision: number;
6018
+ currency: string;
6019
+ expiresAt: string;
6020
+ } | {
6021
+ type: "refund";
6022
+ invoiceId: string;
6023
+ merchantInvoiceId: string;
4373
6024
  amountMinor: number;
4374
- periodStartMs: number;
4375
- periodEndMs: number;
4376
- } | undefined;
4377
- } | null;
4378
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
4379
- catalogAmountMinor: number;
4380
- taxMinor: number;
4381
- totalMinor: number | null;
4382
- quoteFinalized: boolean;
4383
- nativePurchase: {
4384
- type: "native_purchase";
4385
- receiptId: string;
4386
- orderId: string;
4387
- productVersionId: string;
4388
- provider: "apple" | "google";
4389
- productId: string;
4390
- productKind: "credit_pack" | "lifetime" | "membership";
4391
- replacement: {
4392
- sourceOrderId: string;
4393
- sourceProductId: string;
4394
- policy: "apple_store" | "google_full_price";
4395
- sourceAccountTokens: string[];
4396
- } | null;
4397
- offerKind: "none" | "introductory" | "promotional";
4398
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
4399
- catalogAmountMinor: number;
4400
- discountMinor: number;
4401
- trialDays: number | null;
4402
- seatBundle: {
4403
- key: string;
4404
- quantity: number;
4405
- }[];
4406
- applePromotionalOffer: {
4407
- offerId: string;
4408
- keyId: string;
4409
- nonce: string;
4410
- signature: string;
4411
- timestamp: number;
4412
- } | null;
4413
- appAccountToken?: string | undefined;
4414
- obfuscatedAccountId?: string | undefined;
4415
- obfuscatedProfileId?: string | undefined;
4416
- basePlanId?: string | undefined;
4417
- offerId?: string | undefined;
4418
- } | null;
4419
- append?: boolean | undefined;
4420
- invoiceMode?: boolean | undefined;
6025
+ mode: "full" | "partial";
6026
+ entitlementAction: "retain" | "revoke";
6027
+ cancelSubscriptions: string[];
6028
+ provider: "merchant";
6029
+ executor: "merchant";
6030
+ operationId: string;
6031
+ customerId: string;
6032
+ configurationRevision: number;
6033
+ connectionRevision: number;
6034
+ currency: string;
6035
+ expiresAt: string;
6036
+ };
6037
+ } | undefined;
4421
6038
  } | null;
4422
6039
  purchaseRequestId: string | null;
4423
6040
  selectionGeneration?: number | undefined;
@@ -4503,13 +6120,13 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4503
6120
  totalMinor: number;
4504
6121
  } | null;
4505
6122
  expiresAt: string;
4506
- provider: "stripe" | "apple" | "google";
6123
+ provider: "merchant" | "stripe" | "apple" | "google";
4507
6124
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
4508
6125
  lines: {
4509
6126
  lineId: string;
4510
6127
  productVersionId: string;
4511
6128
  productName: string;
4512
- interval: "one_time" | "month" | "year" | "free" | "week";
6129
+ interval: "week" | "month" | "year" | "one_time" | "free";
4513
6130
  baseAmountMinor: number;
4514
6131
  seats: {
4515
6132
  key: string;
@@ -4529,43 +6146,227 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4529
6146
  internal_feature_id: string;
4530
6147
  includedAmount: string;
4531
6148
  quantity: number;
4532
- terms: {
4533
- units: string;
4534
- prices: {
4535
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
4536
- amountMinor: number;
4537
- pricing?: {
4538
- kind: "graduated" | "volume";
4539
- tiers: {
4540
- upTo: number | null;
4541
- unitAmountMinor: number;
4542
- flatAmountMinor?: number | undefined;
4543
- }[];
4544
- } | undefined;
4545
- }[];
4546
- minimumQuantity: number;
4547
- maximumQuantity: number;
4548
- };
6149
+ terms: {
6150
+ units: string;
6151
+ prices: {
6152
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
6153
+ amountMinor: number;
6154
+ pricing?: {
6155
+ kind: "graduated" | "volume";
6156
+ tiers: {
6157
+ upTo: number | null;
6158
+ unitAmountMinor: number;
6159
+ flatAmountMinor?: number | undefined;
6160
+ }[];
6161
+ } | undefined;
6162
+ }[];
6163
+ minimumQuantity: number;
6164
+ maximumQuantity: number;
6165
+ };
6166
+ unitAmountMinor: number;
6167
+ productId: string | null;
6168
+ priceId: string | null;
6169
+ pricing?: {
6170
+ kind: "graduated" | "volume";
6171
+ tiers: {
6172
+ upTo: number | null;
6173
+ unitAmountMinor: number;
6174
+ flatAmountMinor?: number | undefined;
6175
+ }[];
6176
+ } | undefined;
6177
+ }[] | undefined;
6178
+ }[];
6179
+ catalogAmountMinor: number;
6180
+ automaticTax: boolean;
6181
+ execution: {
6182
+ type: "purchase";
6183
+ mode: "payment" | "subscription";
6184
+ lineItems: {
6185
+ priceId: string;
6186
+ productVersionId: string;
6187
+ productId: string;
6188
+ quantity: number;
6189
+ unitAmountMinor: number;
6190
+ totalMinor: number;
6191
+ interval: "week" | "month" | "year" | "one_off";
6192
+ intervalCount: number;
6193
+ kind: "fixed" | "prepaid" | "seat";
6194
+ tiers: {
6195
+ mode: "graduated" | "volume";
6196
+ tiers: {
6197
+ upTo: number | null;
6198
+ unitAmountMinor: number;
6199
+ flatAmountMinor?: number | undefined;
6200
+ }[];
6201
+ } | null;
6202
+ }[];
6203
+ catalogAmountMinor: number;
6204
+ discount: {
6205
+ grantId: string;
6206
+ couponId: string;
6207
+ amountMinor: number;
6208
+ terms: {
6209
+ type: "percent";
6210
+ percentOff: number;
6211
+ } | {
6212
+ type: "amount";
6213
+ amountOffMinor: number;
6214
+ currency: string;
6215
+ };
6216
+ duration: {
6217
+ type: "once";
6218
+ } | {
6219
+ type: "forever";
6220
+ } | {
6221
+ type: "repeating";
6222
+ months: number;
6223
+ };
6224
+ } | null;
6225
+ trialPeriodDays: number | null;
6226
+ automaticTax: boolean;
6227
+ provider: "merchant";
6228
+ executor: "merchant";
6229
+ operationId: string;
6230
+ customerId: string;
6231
+ configurationRevision: number;
6232
+ connectionRevision: number;
6233
+ currency: string;
6234
+ expiresAt: string;
6235
+ } | {
6236
+ provider: "stripe";
6237
+ executor: "merchant" | "indiana";
6238
+ accountId: string;
6239
+ mode: "payment" | "subscription";
6240
+ lineItems: {
6241
+ price: string | null;
6242
+ quantity: number;
6243
+ priceId: string;
6244
+ productName: string;
6245
+ amountMinor: number;
6246
+ currency: string;
6247
+ interval: "week" | "month" | "year" | "one_off";
6248
+ intervalCount: number;
6249
+ slot: "stripe_price_id" | "stripe_empty_price_id";
6250
+ tiers: {
6251
+ mode: "graduated" | "volume";
6252
+ tiers: {
6253
+ upTo: number | null;
6254
+ unitAmountMinor: number;
6255
+ flatAmountMinor?: number | undefined;
6256
+ }[];
6257
+ } | null;
6258
+ }[];
6259
+ discounts: {
6260
+ coupon: string;
6261
+ terms: {
6262
+ id: string;
6263
+ name: string;
6264
+ duration: "once" | "forever" | "repeating";
6265
+ percent_off?: number | undefined;
6266
+ amount_off?: number | undefined;
6267
+ currency?: string | undefined;
6268
+ duration_in_months?: number | undefined;
6269
+ };
6270
+ }[];
6271
+ trialPeriodDays: number | null;
6272
+ metadata: {
6273
+ grooveCheckoutId: string;
6274
+ grooveCustomerId: string;
6275
+ };
6276
+ expiresAt: string;
6277
+ invoiceMode?: InvoiceModeParams | undefined;
6278
+ append?: {
6279
+ subscriptionId: string;
6280
+ customerId: string;
6281
+ sourceItems: {
6282
+ id: string;
6283
+ price_id: string;
6284
+ quantity: number;
6285
+ discounts?: {
6286
+ id: string;
6287
+ coupon: string;
6288
+ start: number;
6289
+ end: number | null;
6290
+ }[] | undefined;
6291
+ }[];
6292
+ prorationDate: number;
6293
+ amountMinor: number;
6294
+ periodStartMs: number;
6295
+ periodEndMs: number;
6296
+ } | undefined;
6297
+ } | null;
6298
+ nativeOffer?: {
6299
+ offerKind: "none" | "introductory" | "promotional";
6300
+ offerId: string | null;
6301
+ discountMinor: number;
6302
+ trialDays: number | null;
6303
+ } | undefined;
6304
+ } | null;
6305
+ operation: {
6306
+ operationId: string;
6307
+ orderId: string;
6308
+ status: "pending" | "failed" | "cancelled" | "complete";
6309
+ executor: "merchant" | "indiana";
6310
+ checkoutUrl: string | null;
6311
+ execution: {
6312
+ type: "purchase";
6313
+ mode: "payment" | "subscription";
6314
+ lineItems: {
6315
+ priceId: string;
6316
+ productVersionId: string;
6317
+ productId: string;
6318
+ quantity: number;
4549
6319
  unitAmountMinor: number;
4550
- productId: string | null;
4551
- priceId: string | null;
4552
- pricing?: {
4553
- kind: "graduated" | "volume";
6320
+ totalMinor: number;
6321
+ interval: "week" | "month" | "year" | "one_off";
6322
+ intervalCount: number;
6323
+ kind: "fixed" | "prepaid" | "seat";
6324
+ tiers: {
6325
+ mode: "graduated" | "volume";
4554
6326
  tiers: {
4555
6327
  upTo: number | null;
4556
6328
  unitAmountMinor: number;
4557
6329
  flatAmountMinor?: number | undefined;
4558
6330
  }[];
4559
- } | undefined;
4560
- }[] | undefined;
4561
- }[];
4562
- catalogAmountMinor: number;
4563
- automaticTax: boolean;
4564
- execution: {
6331
+ } | null;
6332
+ }[];
6333
+ catalogAmountMinor: number;
6334
+ discount: {
6335
+ grantId: string;
6336
+ couponId: string;
6337
+ amountMinor: number;
6338
+ terms: {
6339
+ type: "percent";
6340
+ percentOff: number;
6341
+ } | {
6342
+ type: "amount";
6343
+ amountOffMinor: number;
6344
+ currency: string;
6345
+ };
6346
+ duration: {
6347
+ type: "once";
6348
+ } | {
6349
+ type: "forever";
6350
+ } | {
6351
+ type: "repeating";
6352
+ months: number;
6353
+ };
6354
+ } | null;
6355
+ trialPeriodDays: number | null;
6356
+ automaticTax: boolean;
6357
+ provider: "merchant";
6358
+ executor: "merchant";
6359
+ operationId: string;
6360
+ customerId: string;
6361
+ configurationRevision: number;
6362
+ connectionRevision: number;
6363
+ currency: string;
6364
+ expiresAt: string;
6365
+ } | {
4565
6366
  provider: "stripe";
4566
6367
  executor: "merchant" | "indiana";
4567
6368
  accountId: string;
4568
- mode: "subscription" | "payment";
6369
+ mode: "payment" | "subscription";
4569
6370
  lineItems: {
4570
6371
  price: string | null;
4571
6372
  quantity: number;
@@ -4573,7 +6374,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4573
6374
  productName: string;
4574
6375
  amountMinor: number;
4575
6376
  currency: string;
4576
- interval: "month" | "year" | "one_off" | "week";
6377
+ interval: "week" | "month" | "year" | "one_off";
4577
6378
  intervalCount: number;
4578
6379
  slot: "stripe_price_id" | "stripe_empty_price_id";
4579
6380
  tiers: {
@@ -4590,7 +6391,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4590
6391
  terms: {
4591
6392
  id: string;
4592
6393
  name: string;
4593
- duration: "forever" | "once" | "repeating";
6394
+ duration: "once" | "forever" | "repeating";
4594
6395
  percent_off?: number | undefined;
4595
6396
  amount_off?: number | undefined;
4596
6397
  currency?: string | undefined;
@@ -4613,136 +6414,491 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4613
6414
  quantity: number;
4614
6415
  discounts?: {
4615
6416
  id: string;
4616
- coupon: string;
4617
- start: number;
4618
- end: number | null;
4619
- }[] | undefined;
6417
+ coupon: string;
6418
+ start: number;
6419
+ end: number | null;
6420
+ }[] | undefined;
6421
+ }[];
6422
+ prorationDate: number;
6423
+ amountMinor: number;
6424
+ periodStartMs: number;
6425
+ periodEndMs: number;
6426
+ } | undefined;
6427
+ } | null;
6428
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
6429
+ catalogAmountMinor: number;
6430
+ taxMinor: number;
6431
+ totalMinor: number | null;
6432
+ quoteFinalized: boolean;
6433
+ nativePurchase: {
6434
+ type: "native_purchase";
6435
+ receiptId: string;
6436
+ orderId: string;
6437
+ productVersionId: string;
6438
+ provider: "apple" | "google";
6439
+ productId: string;
6440
+ productKind: "credit_pack" | "lifetime" | "membership";
6441
+ replacement: {
6442
+ sourceOrderId: string;
6443
+ sourceProductId: string;
6444
+ policy: "apple_store" | "google_full_price";
6445
+ sourceAccountTokens: string[];
6446
+ } | null;
6447
+ offerKind: "none" | "introductory" | "promotional";
6448
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
6449
+ catalogAmountMinor: number;
6450
+ discountMinor: number;
6451
+ trialDays: number | null;
6452
+ seatBundle: {
6453
+ key: string;
6454
+ quantity: number;
6455
+ }[];
6456
+ applePromotionalOffer: {
6457
+ offerId: string;
6458
+ keyId: string;
6459
+ nonce: string;
6460
+ signature: string;
6461
+ timestamp: number;
6462
+ } | null;
6463
+ appAccountToken?: string | undefined;
6464
+ obfuscatedAccountId?: string | undefined;
6465
+ obfuscatedProfileId?: string | undefined;
6466
+ basePlanId?: string | undefined;
6467
+ offerId?: string | undefined;
6468
+ } | null;
6469
+ append?: boolean | undefined;
6470
+ invoiceMode?: boolean | undefined;
6471
+ confirmedAt?: string | null | undefined;
6472
+ quote?: {
6473
+ operationId: string;
6474
+ entityId: string | null;
6475
+ billingSubscriptionId: string | null;
6476
+ discount: {
6477
+ offerId: string;
6478
+ couponId: string;
6479
+ discount: {
6480
+ type: "percent";
6481
+ percentOff: number;
6482
+ } | {
6483
+ type: "amount";
6484
+ amountOffCents: number;
6485
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
6486
+ };
6487
+ duration: {
6488
+ type: "once";
6489
+ } | {
6490
+ type: "repeating";
6491
+ months: number;
6492
+ } | {
6493
+ type: "forever";
6494
+ };
6495
+ amountMinor: number;
6496
+ allocations: {
6497
+ productVersionId: string;
6498
+ amountMinor: number;
6499
+ }[];
6500
+ expiresAt: string;
6501
+ } | null;
6502
+ charge: {
6503
+ effectiveAt: string;
6504
+ periodEndsAt: string;
6505
+ debitMinor: number;
6506
+ discountMinor: number;
6507
+ taxMinor: number;
6508
+ totalMinor: number;
6509
+ } | null;
6510
+ expiresAt: string;
6511
+ provider: "merchant" | "stripe" | "apple" | "google";
6512
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
6513
+ lines: {
6514
+ lineId: string;
6515
+ productVersionId: string;
6516
+ productName: string;
6517
+ interval: "week" | "month" | "year" | "one_time" | "free";
6518
+ baseAmountMinor: number;
6519
+ seats: {
6520
+ key: string;
6521
+ quantity: number;
6522
+ includedQuantity: number;
6523
+ maximumQuantity: number;
6524
+ unitAmountMinor: number;
6525
+ }[];
6526
+ catalogAmountMinor: number;
6527
+ trial: {
6528
+ days: number;
6529
+ cardRequired: boolean;
6530
+ } | null;
6531
+ intervalCount?: number | undefined;
6532
+ prepaid?: {
6533
+ itemKey: string;
6534
+ internal_feature_id: string;
6535
+ includedAmount: string;
6536
+ quantity: number;
6537
+ terms: {
6538
+ units: string;
6539
+ prices: {
6540
+ currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
6541
+ amountMinor: number;
6542
+ pricing?: {
6543
+ kind: "graduated" | "volume";
6544
+ tiers: {
6545
+ upTo: number | null;
6546
+ unitAmountMinor: number;
6547
+ flatAmountMinor?: number | undefined;
6548
+ }[];
6549
+ } | undefined;
6550
+ }[];
6551
+ minimumQuantity: number;
6552
+ maximumQuantity: number;
6553
+ };
6554
+ unitAmountMinor: number;
6555
+ productId: string | null;
6556
+ priceId: string | null;
6557
+ pricing?: {
6558
+ kind: "graduated" | "volume";
6559
+ tiers: {
6560
+ upTo: number | null;
6561
+ unitAmountMinor: number;
6562
+ flatAmountMinor?: number | undefined;
6563
+ }[];
6564
+ } | undefined;
6565
+ }[] | undefined;
6566
+ }[];
6567
+ catalogAmountMinor: number;
6568
+ automaticTax: boolean;
6569
+ execution: {
6570
+ type: "purchase";
6571
+ mode: "payment" | "subscription";
6572
+ lineItems: {
6573
+ priceId: string;
6574
+ productVersionId: string;
6575
+ productId: string;
6576
+ quantity: number;
6577
+ unitAmountMinor: number;
6578
+ totalMinor: number;
6579
+ interval: "week" | "month" | "year" | "one_off";
6580
+ intervalCount: number;
6581
+ kind: "fixed" | "prepaid" | "seat";
6582
+ tiers: {
6583
+ mode: "graduated" | "volume";
6584
+ tiers: {
6585
+ upTo: number | null;
6586
+ unitAmountMinor: number;
6587
+ flatAmountMinor?: number | undefined;
6588
+ }[];
6589
+ } | null;
6590
+ }[];
6591
+ catalogAmountMinor: number;
6592
+ discount: {
6593
+ grantId: string;
6594
+ couponId: string;
6595
+ amountMinor: number;
6596
+ terms: {
6597
+ type: "percent";
6598
+ percentOff: number;
6599
+ } | {
6600
+ type: "amount";
6601
+ amountOffMinor: number;
6602
+ currency: string;
6603
+ };
6604
+ duration: {
6605
+ type: "once";
6606
+ } | {
6607
+ type: "forever";
6608
+ } | {
6609
+ type: "repeating";
6610
+ months: number;
6611
+ };
6612
+ } | null;
6613
+ trialPeriodDays: number | null;
6614
+ automaticTax: boolean;
6615
+ provider: "merchant";
6616
+ executor: "merchant";
6617
+ operationId: string;
6618
+ customerId: string;
6619
+ configurationRevision: number;
6620
+ connectionRevision: number;
6621
+ currency: string;
6622
+ expiresAt: string;
6623
+ } | {
6624
+ provider: "stripe";
6625
+ executor: "merchant" | "indiana";
6626
+ accountId: string;
6627
+ mode: "payment" | "subscription";
6628
+ lineItems: {
6629
+ price: string | null;
6630
+ quantity: number;
6631
+ priceId: string;
6632
+ productName: string;
6633
+ amountMinor: number;
6634
+ currency: string;
6635
+ interval: "week" | "month" | "year" | "one_off";
6636
+ intervalCount: number;
6637
+ slot: "stripe_price_id" | "stripe_empty_price_id";
6638
+ tiers: {
6639
+ mode: "graduated" | "volume";
6640
+ tiers: {
6641
+ upTo: number | null;
6642
+ unitAmountMinor: number;
6643
+ flatAmountMinor?: number | undefined;
6644
+ }[];
6645
+ } | null;
6646
+ }[];
6647
+ discounts: {
6648
+ coupon: string;
6649
+ terms: {
6650
+ id: string;
6651
+ name: string;
6652
+ duration: "once" | "forever" | "repeating";
6653
+ percent_off?: number | undefined;
6654
+ amount_off?: number | undefined;
6655
+ currency?: string | undefined;
6656
+ duration_in_months?: number | undefined;
6657
+ };
4620
6658
  }[];
4621
- prorationDate: number;
4622
- amountMinor: number;
4623
- periodStartMs: number;
4624
- periodEndMs: number;
6659
+ trialPeriodDays: number | null;
6660
+ metadata: {
6661
+ grooveCheckoutId: string;
6662
+ grooveCustomerId: string;
6663
+ };
6664
+ expiresAt: string;
6665
+ invoiceMode?: InvoiceModeParams | undefined;
6666
+ append?: {
6667
+ subscriptionId: string;
6668
+ customerId: string;
6669
+ sourceItems: {
6670
+ id: string;
6671
+ price_id: string;
6672
+ quantity: number;
6673
+ discounts?: {
6674
+ id: string;
6675
+ coupon: string;
6676
+ start: number;
6677
+ end: number | null;
6678
+ }[] | undefined;
6679
+ }[];
6680
+ prorationDate: number;
6681
+ amountMinor: number;
6682
+ periodStartMs: number;
6683
+ periodEndMs: number;
6684
+ } | undefined;
6685
+ } | null;
6686
+ nativeOffer?: {
6687
+ offerKind: "none" | "introductory" | "promotional";
6688
+ offerId: string | null;
6689
+ discountMinor: number;
6690
+ trialDays: number | null;
4625
6691
  } | undefined;
4626
- } | null;
4627
- nativeOffer?: {
4628
- offerKind: "none" | "introductory" | "promotional";
4629
- offerId: string | null;
4630
- discountMinor: number;
4631
- trialDays: number | null;
4632
6692
  } | undefined;
4633
- } | null;
4634
- operation: {
4635
- operationId: string;
4636
- orderId: string;
4637
- status: "failed" | "pending" | "complete" | "cancelled";
4638
- executor: "merchant" | "indiana";
4639
- checkoutUrl: string | null;
4640
- execution: {
4641
- provider: "stripe";
4642
- executor: "merchant" | "indiana";
4643
- accountId: string;
4644
- mode: "subscription" | "payment";
4645
- lineItems: {
4646
- price: string | null;
4647
- quantity: number;
4648
- priceId: string;
4649
- productName: string;
4650
- amountMinor: number;
4651
- currency: string;
4652
- interval: "month" | "year" | "one_off" | "week";
4653
- intervalCount: number;
4654
- slot: "stripe_price_id" | "stripe_empty_price_id";
4655
- tiers: {
4656
- mode: "graduated" | "volume";
6693
+ merchantExecution?: {
6694
+ type: "purchase";
6695
+ merchantOrderId: string | null;
6696
+ paymentStatus: "unknown" | "not_started" | "pending" | "failed" | "succeeded" | "not_required" | "expired";
6697
+ checkoutUrl: string | null;
6698
+ checkoutExpiresAt: string | null;
6699
+ operationId: string;
6700
+ customerId: string;
6701
+ merchantExecutionId: string;
6702
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
6703
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
6704
+ updatedAt: string;
6705
+ problem: {
6706
+ phase: "payment" | "execution" | "fulfillment" | "recording";
6707
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
6708
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
6709
+ retryable: boolean;
6710
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
6711
+ } | null;
6712
+ pollAfterMs: number | null;
6713
+ } | {
6714
+ type: "subscription_change";
6715
+ status: "unknown" | "pending" | "applied" | "failed" | "scheduled";
6716
+ merchantSubscriptionId: string;
6717
+ scheduledFor: string | null;
6718
+ operationId: string;
6719
+ customerId: string;
6720
+ merchantExecutionId: string;
6721
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
6722
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
6723
+ updatedAt: string;
6724
+ problem: {
6725
+ phase: "payment" | "execution" | "fulfillment" | "recording";
6726
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
6727
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
6728
+ retryable: boolean;
6729
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
6730
+ } | null;
6731
+ pollAfterMs: number | null;
6732
+ } | {
6733
+ type: "refund";
6734
+ status: "unknown" | "pending" | "failed" | "succeeded";
6735
+ merchantRefundId: string | null;
6736
+ operationId: string;
6737
+ customerId: string;
6738
+ merchantExecutionId: string;
6739
+ fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
6740
+ recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
6741
+ updatedAt: string;
6742
+ problem: {
6743
+ phase: "payment" | "execution" | "fulfillment" | "recording";
6744
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
6745
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
6746
+ retryable: boolean;
6747
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
6748
+ } | null;
6749
+ pollAfterMs: number | null;
6750
+ } | null | undefined;
6751
+ problem?: {
6752
+ phase: "payment" | "execution" | "fulfillment" | "recording";
6753
+ code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
6754
+ recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
6755
+ retryable: boolean;
6756
+ reason?: "CAPABILITY_NOT_ENABLED" | "INTEGRATION_MISSING" | "PROVIDER_CREDENTIAL_REJECTED" | "PRICE_BINDING_REQUIRED" | "IDEMPOTENCY_CONFLICT" | "RESULT_UNKNOWN" | "STATE_CHANGED" | "OPERATION_IN_PROGRESS" | "FUNNEL_VERSION_RETIRED" | undefined;
6757
+ } | null | undefined;
6758
+ authority?: {
6759
+ scope: {
6760
+ projectId: string;
6761
+ environmentId: string;
6762
+ environment: "sandbox" | "live";
6763
+ };
6764
+ operationId: string;
6765
+ customerId: string;
6766
+ confirmedAt: string | null;
6767
+ initialExecutionAllowed: boolean;
6768
+ instruction: {
6769
+ type: "purchase";
6770
+ mode: "payment" | "subscription";
6771
+ lineItems: {
6772
+ priceId: string;
6773
+ productVersionId: string;
6774
+ productId: string;
6775
+ quantity: number;
6776
+ unitAmountMinor: number;
6777
+ totalMinor: number;
6778
+ interval: "week" | "month" | "year" | "one_off";
6779
+ intervalCount: number;
6780
+ kind: "fixed" | "prepaid" | "seat";
4657
6781
  tiers: {
4658
- upTo: number | null;
4659
- unitAmountMinor: number;
4660
- flatAmountMinor?: number | undefined;
4661
- }[];
6782
+ mode: "graduated" | "volume";
6783
+ tiers: {
6784
+ upTo: number | null;
6785
+ unitAmountMinor: number;
6786
+ flatAmountMinor?: number | undefined;
6787
+ }[];
6788
+ } | null;
6789
+ }[];
6790
+ catalogAmountMinor: number;
6791
+ discount: {
6792
+ grantId: string;
6793
+ couponId: string;
6794
+ amountMinor: number;
6795
+ terms: {
6796
+ type: "percent";
6797
+ percentOff: number;
6798
+ } | {
6799
+ type: "amount";
6800
+ amountOffMinor: number;
6801
+ currency: string;
6802
+ };
6803
+ duration: {
6804
+ type: "once";
6805
+ } | {
6806
+ type: "forever";
6807
+ } | {
6808
+ type: "repeating";
6809
+ months: number;
6810
+ };
4662
6811
  } | null;
4663
- }[];
4664
- discounts: {
4665
- coupon: string;
4666
- terms: {
4667
- id: string;
4668
- name: string;
4669
- duration: "forever" | "once" | "repeating";
4670
- percent_off?: number | undefined;
4671
- amount_off?: number | undefined;
4672
- currency?: string | undefined;
4673
- duration_in_months?: number | undefined;
4674
- };
4675
- }[];
4676
- trialPeriodDays: number | null;
4677
- metadata: {
4678
- grooveCheckoutId: string;
4679
- grooveCustomerId: string;
4680
- };
4681
- expiresAt: string;
4682
- invoiceMode?: InvoiceModeParams | undefined;
4683
- append?: {
4684
- subscriptionId: string;
6812
+ trialPeriodDays: number | null;
6813
+ automaticTax: boolean;
6814
+ provider: "merchant";
6815
+ executor: "merchant";
6816
+ operationId: string;
4685
6817
  customerId: string;
4686
- sourceItems: {
4687
- id: string;
4688
- price_id: string;
6818
+ configurationRevision: number;
6819
+ connectionRevision: number;
6820
+ currency: string;
6821
+ expiresAt: string;
6822
+ } | {
6823
+ type: "subscription_change";
6824
+ subscriptionId: string;
6825
+ merchantSubscriptionId: string;
6826
+ membershipId: string;
6827
+ subscriptionAction: "update" | "cancel" | "schedule" | "release";
6828
+ supersedesOperationId: string | null;
6829
+ change: {
6830
+ type: "cancel";
6831
+ } | {
6832
+ type: "uncancel";
6833
+ } | {
6834
+ type: "plan";
6835
+ productVersionId: string;
6836
+ } | {
6837
+ type: "seats";
6838
+ licenseKey: string;
6839
+ quantity: number;
6840
+ } | {
6841
+ type: "quantity";
6842
+ internal_feature_id: string;
6843
+ quantity: number;
6844
+ } | {
6845
+ type: "billing_cycle";
6846
+ billingCycleAnchor: number | "now";
6847
+ };
6848
+ timing: "immediate" | "renewal";
6849
+ effectiveAt: string;
6850
+ creditMinor: number;
6851
+ debitMinor: number;
6852
+ totalMinor: number;
6853
+ discountMinor: number;
6854
+ taxMinor: number;
6855
+ proration: "none" | "create_prorations" | "always_invoice";
6856
+ lineItems: {
6857
+ priceId: string;
6858
+ productVersionId: string;
6859
+ productId: string;
6860
+ unitAmountMinor: number;
6861
+ totalMinor: number;
6862
+ interval: "week" | "month" | "year" | "one_off";
6863
+ intervalCount: number;
6864
+ kind: "fixed" | "prepaid" | "seat";
6865
+ tiers: {
6866
+ mode: "graduated" | "volume";
6867
+ tiers: {
6868
+ upTo: number | null;
6869
+ unitAmountMinor: number;
6870
+ flatAmountMinor?: number | undefined;
6871
+ }[];
6872
+ } | null;
4689
6873
  quantity: number;
4690
- discounts?: {
4691
- id: string;
4692
- coupon: string;
4693
- start: number;
4694
- end: number | null;
4695
- }[] | undefined;
4696
6874
  }[];
4697
- prorationDate: number;
6875
+ removePriceIds: string[];
6876
+ provider: "merchant";
6877
+ executor: "merchant";
6878
+ operationId: string;
6879
+ customerId: string;
6880
+ configurationRevision: number;
6881
+ connectionRevision: number;
6882
+ currency: string;
6883
+ expiresAt: string;
6884
+ } | {
6885
+ type: "refund";
6886
+ invoiceId: string;
6887
+ merchantInvoiceId: string;
4698
6888
  amountMinor: number;
4699
- periodStartMs: number;
4700
- periodEndMs: number;
4701
- } | undefined;
4702
- } | null;
4703
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
4704
- catalogAmountMinor: number;
4705
- taxMinor: number;
4706
- totalMinor: number | null;
4707
- quoteFinalized: boolean;
4708
- nativePurchase: {
4709
- type: "native_purchase";
4710
- receiptId: string;
4711
- orderId: string;
4712
- productVersionId: string;
4713
- provider: "apple" | "google";
4714
- productId: string;
4715
- productKind: "credit_pack" | "lifetime" | "membership";
4716
- replacement: {
4717
- sourceOrderId: string;
4718
- sourceProductId: string;
4719
- policy: "apple_store" | "google_full_price";
4720
- sourceAccountTokens: string[];
4721
- } | null;
4722
- offerKind: "none" | "introductory" | "promotional";
4723
- currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
4724
- catalogAmountMinor: number;
4725
- discountMinor: number;
4726
- trialDays: number | null;
4727
- seatBundle: {
4728
- key: string;
4729
- quantity: number;
4730
- }[];
4731
- applePromotionalOffer: {
4732
- offerId: string;
4733
- keyId: string;
4734
- nonce: string;
4735
- signature: string;
4736
- timestamp: number;
4737
- } | null;
4738
- appAccountToken?: string | undefined;
4739
- obfuscatedAccountId?: string | undefined;
4740
- obfuscatedProfileId?: string | undefined;
4741
- basePlanId?: string | undefined;
4742
- offerId?: string | undefined;
4743
- } | null;
4744
- append?: boolean | undefined;
4745
- invoiceMode?: boolean | undefined;
6889
+ mode: "full" | "partial";
6890
+ entitlementAction: "retain" | "revoke";
6891
+ cancelSubscriptions: string[];
6892
+ provider: "merchant";
6893
+ executor: "merchant";
6894
+ operationId: string;
6895
+ customerId: string;
6896
+ configurationRevision: number;
6897
+ connectionRevision: number;
6898
+ currency: string;
6899
+ expiresAt: string;
6900
+ };
6901
+ } | undefined;
4746
6902
  } | null;
4747
6903
  canReselect?: boolean | undefined;
4748
6904
  } | undefined;
@@ -4777,7 +6933,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4777
6933
  primary: string;
4778
6934
  background: string;
4779
6935
  text: string;
4780
- radius: "none" | "sm" | "md" | "lg" | "full";
6936
+ radius: "none" | "full" | "sm" | "md" | "lg";
4781
6937
  font: "system" | "serif" | "rounded" | "mono";
4782
6938
  };
4783
6939
  pages: {
@@ -4788,7 +6944,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4788
6944
  primary: string;
4789
6945
  background: string;
4790
6946
  text: string;
4791
- radius: "none" | "sm" | "md" | "lg" | "full";
6947
+ radius: "none" | "full" | "sm" | "md" | "lg";
4792
6948
  font: "system" | "serif" | "rounded" | "mono";
4793
6949
  } | undefined;
4794
6950
  editorPosition?: {
@@ -4852,7 +7008,7 @@ declare function createFunnelCampaignClient(options: IndianaServerOptions & {
4852
7008
  purchases: {
4853
7009
  receiptId: string;
4854
7010
  operationId: string;
4855
- status: "unknown" | "failed" | "pending" | "complete" | "cancelled";
7011
+ status: "unknown" | "pending" | "failed" | "cancelled" | "complete";
4856
7012
  }[];
4857
7013
  } | undefined;
4858
7014
  runToken?: string | undefined;
@@ -4884,6 +7040,8 @@ type MerchantBridgeHandlerContext = {
4884
7040
  command: BusinessCommand;
4885
7041
  scope: MerchantBridgeRequest["scope"];
4886
7042
  principal: MerchantBridgePrincipal;
7043
+ /** Fresh Indiana authority for the original confirmed operation. */
7044
+ authority?: z.output<typeof merchantBridgeOperationAuthoritySchema>;
4887
7045
  };
4888
7046
  type MerchantBridgeHandlers = {
4889
7047
  [C in BusinessCommand]?: (data: z.output<(typeof merchantBridgeCommandInputs)[C]>, context: MerchantBridgeHandlerContext) => z.input<(typeof merchantBridgeCommandOutputs)[C]> | Promise<z.input<(typeof merchantBridgeCommandOutputs)[C]>>;
@@ -4892,9 +7050,11 @@ type MerchantBridgeHandlerOptions = {
4892
7050
  manifest: MerchantBridgeManifest;
4893
7051
  /** Keep active and, during rotation, previously accepted keys on the merchant backend. */
4894
7052
  authentication: readonly MerchantBridgeAuthentication[];
4895
- /** Existing native login/CSRF/admin authorization. A service signature never substitutes for this. */
7053
+ /** Native login/CSRF/admin authorization; signed operation calls still require fresh Longplay authority. */
4896
7054
  authorize: (request: Request, input: MerchantBridgeRequest) => Promise<MerchantBridgePrincipal>;
4897
7055
  handlers: MerchantBridgeHandlers;
7056
+ /** Read current Indiana Server SDK authority; never derive it from the incoming request or a browser quote. */
7057
+ resolveOperationAuthority?: (input: z.output<typeof merchantBridgeOperationInputSchema>, context: MerchantBridgeHandlerContext) => Promise<z.input<typeof merchantBridgeOperationAuthoritySchema>>;
4898
7058
  };
4899
7059
  declare class MerchantBridgeHandlerError extends Error {
4900
7060
  readonly code: string;
@@ -4906,4 +7066,8 @@ declare class MerchantBridgeHandlerError extends Error {
4906
7066
  /** Framework-independent Request → Response receiver for one fixed POST path. */
4907
7067
  declare function createMerchantBridgeHandler(options: MerchantBridgeHandlerOptions): (request: Request) => Promise<Response>;
4908
7068
 
4909
- export { ConfigurationSync, FeatureClientOptions, type FunnelDecisionInput, FunnelDecisionTimeoutError, type FunnelDecisionUsedInput, type FunnelLocalEvaluation, type FunnelLocalEvaluator, type FunnelLocalEvaluatorOptions, type FunnelLocalSession, type FunnelLocalSessionOptions, type FunnelSignalInput, IndianaError, IndianaServerOptions, type MerchantBridgeAuthentication, type MerchantBridgeHandlerContext, MerchantBridgeHandlerError, type MerchantBridgeHandlerOptions, type MerchantBridgeHandlers, type MerchantBridgePrincipal, createFunnelCampaignClient, createFunnelDecisionClient, createFunnelLocalEvaluator, createFunnelOrchestrationClient, createGuestToken, createIndianaServer, createMerchantBridgeHandler, createNativeReceiptClient, createPaywallStartClient, createSynchronizedFunnelLocalEvaluator, renewFunnelRun, signMerchantBridgeMessage, verifyMerchantBridgeMessage };
7069
+ type OperationReader = Pick<FoundationApi, "readSubscriptionOperation" | "readSubscriptionUpdate" | "readRefund">;
7070
+ /** Reads fresh Indiana facts with the merchant's Server Key. No browser quote or local status can grant execution. */
7071
+ declare function createMerchantBridgeAuthorityResolver(server: OperationReader): NonNullable<MerchantBridgeHandlerOptions["resolveOperationAuthority"]>;
7072
+
7073
+ export { ConfigurationSync, FeatureClientOptions, type FunnelDecisionInput, FunnelDecisionTimeoutError, type FunnelDecisionUsedInput, type FunnelLocalEvaluation, type FunnelLocalEvaluator, type FunnelLocalEvaluatorOptions, type FunnelLocalSession, type FunnelLocalSessionOptions, type FunnelSignalInput, IndianaError, IndianaServerOptions, type MerchantBridgeAuthentication, type MerchantBridgeHandlerContext, MerchantBridgeHandlerError, type MerchantBridgeHandlerOptions, type MerchantBridgeHandlers, type MerchantBridgePrincipal, createFunnelCampaignClient, createFunnelDecisionClient, createFunnelLocalEvaluator, createFunnelOrchestrationClient, createGuestToken, createIndianaServer, createMerchantBridgeAuthorityResolver, createMerchantBridgeHandler, createNativeReceiptClient, createPaywallStartClient, createSynchronizedFunnelLocalEvaluator, renewFunnelRun, signMerchantBridgeMessage, verifyMerchantBridgeMessage };