@fire-spark/types 0.2.0 → 0.3.0

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 (2) hide show
  1. package/dist/index.d.ts +787 -106
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -68,7 +68,11 @@ interface ChannelManifest {
68
68
  /** Port of `pnpm start`: 3000 for the server, 3001+ for channels. */
69
69
  port: number;
70
70
  platforms: ChannelPlatform[];
71
- /** Default locale first, then up to 2 extra locales. */
71
+ /**
72
+ * Canonical BCP 47 tags, deduped: the merchant's locale first (`es` or
73
+ * `es-EC`), then up to 2 extra locales. Apps without a catalog for a tag
74
+ * use its language one (`es-EC` → `es`), then the template default.
75
+ */
72
76
  locales: string[];
73
77
  web?: ChannelManifestWeb;
74
78
  native?: ChannelManifestNative;
@@ -705,6 +709,7 @@ type OrderFulfillment = {
705
709
  mappedStatus: string;
706
710
  milestone?: string | undefined;
707
711
  checkout_release?: boolean | undefined;
712
+ payment_scope?: "digital" | "in_person" | undefined;
708
713
  joinPolicy?: "all" | "any" | undefined;
709
714
  actions?: {
710
715
  id: string;
@@ -821,7 +826,7 @@ type OrderFulfillment = {
821
826
  channel_id: string;
822
827
  brand_id: string;
823
828
  primitive: "boolean";
824
- type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag";
829
+ type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag" | "Payment captured" | "Payment is mixed";
825
830
  operator: "is" | "is not";
826
831
  value: boolean;
827
832
  invalidMessage?: string | undefined;
@@ -914,6 +919,7 @@ type MerchantPayment = {
914
919
  id: string;
915
920
  payment_provider_id: string;
916
921
  payment_method_id: string;
922
+ name?: string | null | undefined;
917
923
  rules: {
918
924
  minimum_order_value: number;
919
925
  maximum_order_value: number;
@@ -969,7 +975,7 @@ type MerchantPayment = {
969
975
  channel_id: string;
970
976
  brand_id: string;
971
977
  primitive: "boolean";
972
- type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag";
978
+ type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag" | "Payment captured" | "Payment is mixed";
973
979
  operator: "is" | "is not";
974
980
  value: boolean;
975
981
  invalidMessage?: string | undefined;
@@ -1023,7 +1029,7 @@ type MerchantPayment = {
1023
1029
  };
1024
1030
  method: {
1025
1031
  id: string;
1026
- method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET";
1032
+ method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
1027
1033
  name: string;
1028
1034
  version: string;
1029
1035
  config?: {
@@ -1183,7 +1189,7 @@ type StorefrontAvailabilityInput = {
1183
1189
  channel_id?: string | undefined;
1184
1190
  brand_id?: string | undefined;
1185
1191
  payment_id?: string | undefined;
1186
- payment_method?: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET" | undefined;
1192
+ payment_method?: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET" | undefined;
1187
1193
  };
1188
1194
  /** Availability slice of `GET /storefront/v1/preferences`. */
1189
1195
  type StorefrontAvailability = {
@@ -1217,7 +1223,7 @@ type StorefrontPreferencesInput = {
1217
1223
  channel_id?: string | undefined;
1218
1224
  brand_id?: string | undefined;
1219
1225
  payment_id?: string | undefined;
1220
- payment_method?: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET" | undefined;
1226
+ payment_method?: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET" | undefined;
1221
1227
  };
1222
1228
  /** Resolved merchant preferences (`GET /storefront/v1/preferences` `data`). */
1223
1229
  type StorefrontPreferences = {
@@ -1273,6 +1279,17 @@ type StorefrontPreferences = {
1273
1279
  ios_store_url: string;
1274
1280
  android_store_url: string;
1275
1281
  };
1282
+ payments: {
1283
+ mixed: {
1284
+ max_methods: number;
1285
+ max_items_per_method: number | null;
1286
+ max_amount_per_method: number | null;
1287
+ per_method: Partial<Record<"BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET", {
1288
+ max_amount: number | null;
1289
+ max_items: number | null;
1290
+ }>>;
1291
+ } | null;
1292
+ };
1276
1293
  country?: string | undefined;
1277
1294
  locale?: string | undefined;
1278
1295
  currency?: {
@@ -1528,7 +1545,7 @@ type StorefrontRealtimeTokenInput = {
1528
1545
  channel_id?: string | undefined;
1529
1546
  brand_id?: string | undefined;
1530
1547
  payment_id?: string | undefined;
1531
- payment_method?: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET" | undefined;
1548
+ payment_method?: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET" | undefined;
1532
1549
  };
1533
1550
  /** Token payload (`POST /storefront/v1/realtime/token` `data`). */
1534
1551
  type StorefrontRealtimeToken = {
@@ -1784,6 +1801,10 @@ type OrderLine = {
1784
1801
  discount_amount?: number | undefined;
1785
1802
  before_taxes?: boolean | undefined;
1786
1803
  expires_at?: string | undefined;
1804
+ payment_id?: string | undefined;
1805
+ amount?: number | undefined;
1806
+ points?: number | undefined;
1807
+ program?: string | undefined;
1787
1808
  }[];
1788
1809
  quantity: number;
1789
1810
  tax_rate: number | null;
@@ -1813,6 +1834,10 @@ type OrderRedeem = {
1813
1834
  discount_amount?: number | undefined;
1814
1835
  before_taxes?: boolean | undefined;
1815
1836
  expires_at?: string | undefined;
1837
+ payment_id?: string | undefined;
1838
+ amount?: number | undefined;
1839
+ points?: number | undefined;
1840
+ program?: string | undefined;
1816
1841
  };
1817
1842
  /** Redeem as sent by callers (`quantity` defaults to 1). */
1818
1843
  type OrderRedeemInput = {
@@ -1822,6 +1847,10 @@ type OrderRedeemInput = {
1822
1847
  discount_amount?: number | undefined;
1823
1848
  before_taxes?: boolean | undefined;
1824
1849
  expires_at?: string | undefined;
1850
+ payment_id?: string | undefined;
1851
+ amount?: number | undefined;
1852
+ points?: number | undefined;
1853
+ program?: string | undefined;
1825
1854
  };
1826
1855
  /** Order or line snapshot before/after a redemption step. */
1827
1856
  type OrderRedemptionState = {
@@ -1908,6 +1937,10 @@ type Order = {
1908
1937
  discount_amount?: number | undefined;
1909
1938
  before_taxes?: boolean | undefined;
1910
1939
  expires_at?: string | undefined;
1940
+ payment_id?: string | undefined;
1941
+ amount?: number | undefined;
1942
+ points?: number | undefined;
1943
+ program?: string | undefined;
1911
1944
  }[];
1912
1945
  quantity: number;
1913
1946
  tax_rate: number | null;
@@ -1936,6 +1969,10 @@ type Order = {
1936
1969
  discount_amount?: number | undefined;
1937
1970
  before_taxes?: boolean | undefined;
1938
1971
  expires_at?: string | undefined;
1972
+ payment_id?: string | undefined;
1973
+ amount?: number | undefined;
1974
+ points?: number | undefined;
1975
+ program?: string | undefined;
1939
1976
  }[];
1940
1977
  redemption_steps: {
1941
1978
  reward_id: string;
@@ -2014,12 +2051,20 @@ type Order = {
2014
2051
  } | null | undefined;
2015
2052
  };
2016
2053
  payment_intents: {
2017
- id?: string | undefined;
2018
- payment_id?: string | undefined;
2019
- method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET";
2020
- provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2021
- collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2022
- status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2054
+ id: string;
2055
+ status: "ABANDONED" | "COMPLETED" | "DRAFT" | "LOCKED";
2056
+ is_mixed: boolean;
2057
+ rules_snapshot: {
2058
+ enabled: boolean;
2059
+ max_methods: number;
2060
+ max_items_per_method: number | null;
2061
+ max_amount_per_method: number | null;
2062
+ per_method: Partial<Record<"BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET", {
2063
+ max_amount: number | null;
2064
+ max_items: number | null;
2065
+ }>>;
2066
+ } | null;
2067
+ primary_tender_id: string | null;
2023
2068
  totals: {
2024
2069
  currency: string;
2025
2070
  subtotal: number;
@@ -2029,10 +2074,97 @@ type Order = {
2029
2074
  tax_total: number;
2030
2075
  total: number;
2031
2076
  };
2032
- error_message?: string | undefined;
2033
- placed_at: string;
2077
+ placed_at: string | null;
2034
2078
  resolved_at?: string | undefined;
2035
2079
  metadata: Record<string, unknown>;
2080
+ tenders: {
2081
+ id: string;
2082
+ sequence: number;
2083
+ attempt_reference: string;
2084
+ previous_attempt_references: string[];
2085
+ method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
2086
+ provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2087
+ payment_id?: string | undefined;
2088
+ collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2089
+ status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2090
+ amount: {
2091
+ currency: string;
2092
+ subtotal: number;
2093
+ discount_total: number;
2094
+ tax_total: number;
2095
+ fees: number;
2096
+ tip: number;
2097
+ delivery: number;
2098
+ redemptions_applied: number;
2099
+ total: number;
2100
+ };
2101
+ refunded_total: number;
2102
+ allocation: {
2103
+ lines: {
2104
+ line_uid: string;
2105
+ units?: number | undefined;
2106
+ }[];
2107
+ fees: string[];
2108
+ amounts: {
2109
+ line_uid: string;
2110
+ units?: number | undefined;
2111
+ subtotal: number;
2112
+ discount: number;
2113
+ tax: number;
2114
+ total: number;
2115
+ children: {
2116
+ line_uid: string;
2117
+ quantity: number;
2118
+ subtotal: number;
2119
+ discount: number;
2120
+ tax: number;
2121
+ total: number;
2122
+ }[];
2123
+ }[];
2124
+ } | null;
2125
+ details: {
2126
+ brand: string;
2127
+ last4: string;
2128
+ auth_code?: string | undefined;
2129
+ installments?: number | undefined;
2130
+ method: "CARD";
2131
+ } | {
2132
+ brand: string;
2133
+ last4: string;
2134
+ auth_code?: string | undefined;
2135
+ installments?: number | undefined;
2136
+ method: "PIN_PAD";
2137
+ terminal_id: string;
2138
+ } | {
2139
+ method: "CASH";
2140
+ tendered: number;
2141
+ change: number;
2142
+ } | {
2143
+ method: "BANK_TRANSFER";
2144
+ reference: string;
2145
+ bank?: string | undefined;
2146
+ } | {
2147
+ method: "WALLET";
2148
+ wallet: string;
2149
+ reference: string;
2150
+ } | {
2151
+ method: "FINANCING";
2152
+ provider_reference: string;
2153
+ installments: number;
2154
+ } | {
2155
+ method: "REDEMPTION";
2156
+ reward_id: string;
2157
+ program: string;
2158
+ points: number;
2159
+ points_value: number;
2160
+ loyalty_transaction_id?: string | undefined;
2161
+ } | null;
2162
+ replaces_tender_id?: string | undefined;
2163
+ error_message?: string | undefined;
2164
+ placed_at: string | null;
2165
+ resolved_at?: string | undefined;
2166
+ metadata: Record<string, unknown>;
2167
+ }[];
2036
2168
  }[];
2037
2169
  totals: {
2038
2170
  currency: string;
@@ -2079,17 +2211,25 @@ type BillingInfo = {
2079
2211
  metadata: Record<string, unknown> | null;
2080
2212
  };
2081
2213
  /** Payment method enum on order payment intents. */
2082
- type PaymentMethod = "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET";
2214
+ type PaymentMethod = "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
2083
2215
  /** Payment provider enum on order payment intents. */
2084
2216
  type PaymentProvider = "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2085
- /** A recorded payment intent on an order. */
2217
+ /** How an order is paid: one or more tenders (`orders.payment_intents[]`). */
2086
2218
  type PaymentIntent = {
2087
- id?: string | undefined;
2088
- payment_id?: string | undefined;
2089
- method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET";
2090
- provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2091
- collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2092
- status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2219
+ id: string;
2220
+ status: "ABANDONED" | "COMPLETED" | "DRAFT" | "LOCKED";
2221
+ is_mixed: boolean;
2222
+ rules_snapshot: {
2223
+ enabled: boolean;
2224
+ max_methods: number;
2225
+ max_items_per_method: number | null;
2226
+ max_amount_per_method: number | null;
2227
+ per_method: Partial<Record<"BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET", {
2228
+ max_amount: number | null;
2229
+ max_items: number | null;
2230
+ }>>;
2231
+ } | null;
2232
+ primary_tender_id: string | null;
2093
2233
  totals: {
2094
2234
  currency: string;
2095
2235
  subtotal: number;
@@ -2099,19 +2239,114 @@ type PaymentIntent = {
2099
2239
  tax_total: number;
2100
2240
  total: number;
2101
2241
  };
2102
- error_message?: string | undefined;
2103
- placed_at: string;
2242
+ placed_at: string | null;
2104
2243
  resolved_at?: string | undefined;
2105
2244
  metadata: Record<string, unknown>;
2245
+ tenders: {
2246
+ id: string;
2247
+ sequence: number;
2248
+ attempt_reference: string;
2249
+ previous_attempt_references: string[];
2250
+ method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
2251
+ provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2252
+ payment_id?: string | undefined;
2253
+ collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2254
+ status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2255
+ amount: {
2256
+ currency: string;
2257
+ subtotal: number;
2258
+ discount_total: number;
2259
+ tax_total: number;
2260
+ fees: number;
2261
+ tip: number;
2262
+ delivery: number;
2263
+ redemptions_applied: number;
2264
+ total: number;
2265
+ };
2266
+ refunded_total: number;
2267
+ allocation: {
2268
+ lines: {
2269
+ line_uid: string;
2270
+ units?: number | undefined;
2271
+ }[];
2272
+ fees: string[];
2273
+ amounts: {
2274
+ line_uid: string;
2275
+ units?: number | undefined;
2276
+ subtotal: number;
2277
+ discount: number;
2278
+ tax: number;
2279
+ total: number;
2280
+ children: {
2281
+ line_uid: string;
2282
+ quantity: number;
2283
+ subtotal: number;
2284
+ discount: number;
2285
+ tax: number;
2286
+ total: number;
2287
+ }[];
2288
+ }[];
2289
+ } | null;
2290
+ details: {
2291
+ brand: string;
2292
+ last4: string;
2293
+ auth_code?: string | undefined;
2294
+ installments?: number | undefined;
2295
+ method: "CARD";
2296
+ } | {
2297
+ brand: string;
2298
+ last4: string;
2299
+ auth_code?: string | undefined;
2300
+ installments?: number | undefined;
2301
+ method: "PIN_PAD";
2302
+ terminal_id: string;
2303
+ } | {
2304
+ method: "CASH";
2305
+ tendered: number;
2306
+ change: number;
2307
+ } | {
2308
+ method: "BANK_TRANSFER";
2309
+ reference: string;
2310
+ bank?: string | undefined;
2311
+ } | {
2312
+ method: "WALLET";
2313
+ wallet: string;
2314
+ reference: string;
2315
+ } | {
2316
+ method: "FINANCING";
2317
+ provider_reference: string;
2318
+ installments: number;
2319
+ } | {
2320
+ method: "REDEMPTION";
2321
+ reward_id: string;
2322
+ program: string;
2323
+ points: number;
2324
+ points_value: number;
2325
+ loyalty_transaction_id?: string | undefined;
2326
+ } | null;
2327
+ replaces_tender_id?: string | undefined;
2328
+ error_message?: string | undefined;
2329
+ placed_at: string | null;
2330
+ resolved_at?: string | undefined;
2331
+ metadata: Record<string, unknown>;
2332
+ }[];
2106
2333
  };
2107
- /** Input shape for `placeOrder` `payment.intents` (`metadata` optional). */
2334
+ /** Stored payment intent as accepted on input (defaults optional). */
2108
2335
  type PaymentIntentInput = {
2109
- id?: string | undefined;
2110
- payment_id?: string | undefined;
2111
- method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET";
2112
- provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2113
- collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2114
- status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2336
+ id: string;
2337
+ status: "ABANDONED" | "COMPLETED" | "DRAFT" | "LOCKED";
2338
+ is_mixed?: boolean | undefined;
2339
+ rules_snapshot?: {
2340
+ enabled?: boolean | undefined;
2341
+ max_methods?: number | undefined;
2342
+ max_items_per_method?: number | null | undefined;
2343
+ max_amount_per_method?: number | null | undefined;
2344
+ per_method?: Partial<Record<"BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET", {
2345
+ max_amount?: number | null | undefined;
2346
+ max_items?: number | null | undefined;
2347
+ }>> | undefined;
2348
+ } | null | undefined;
2349
+ primary_tender_id: string | null;
2115
2350
  totals: {
2116
2351
  currency: string;
2117
2352
  subtotal: number;
@@ -2121,11 +2356,431 @@ type PaymentIntentInput = {
2121
2356
  tax_total: number;
2122
2357
  total: number;
2123
2358
  };
2359
+ placed_at?: string | null | undefined;
2360
+ resolved_at?: string | undefined;
2361
+ metadata?: Record<string, unknown> | undefined;
2362
+ tenders: {
2363
+ id: string;
2364
+ sequence: number;
2365
+ attempt_reference: string;
2366
+ previous_attempt_references?: string[] | undefined;
2367
+ method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
2368
+ provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2369
+ payment_id?: string | undefined;
2370
+ collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2371
+ status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2372
+ amount: {
2373
+ currency: string;
2374
+ subtotal: number;
2375
+ discount_total: number;
2376
+ tax_total: number;
2377
+ fees?: number | undefined;
2378
+ tip?: number | undefined;
2379
+ delivery?: number | undefined;
2380
+ redemptions_applied?: number | undefined;
2381
+ total: number;
2382
+ };
2383
+ refunded_total?: number | undefined;
2384
+ allocation?: {
2385
+ lines?: {
2386
+ line_uid: string;
2387
+ units?: number | undefined;
2388
+ }[] | undefined;
2389
+ fees?: string[] | undefined;
2390
+ amounts?: {
2391
+ line_uid: string;
2392
+ units?: number | undefined;
2393
+ subtotal: number;
2394
+ discount: number;
2395
+ tax: number;
2396
+ total: number;
2397
+ children?: {
2398
+ line_uid: string;
2399
+ quantity: number;
2400
+ subtotal: number;
2401
+ discount: number;
2402
+ tax: number;
2403
+ total: number;
2404
+ }[] | undefined;
2405
+ }[] | undefined;
2406
+ } | null | undefined;
2407
+ details?: {
2408
+ brand: string;
2409
+ last4: string;
2410
+ auth_code?: string | undefined;
2411
+ installments?: number | undefined;
2412
+ method: "CARD";
2413
+ } | {
2414
+ brand: string;
2415
+ last4: string;
2416
+ auth_code?: string | undefined;
2417
+ installments?: number | undefined;
2418
+ method: "PIN_PAD";
2419
+ terminal_id: string;
2420
+ } | {
2421
+ method: "CASH";
2422
+ tendered: number;
2423
+ change: number;
2424
+ } | {
2425
+ method: "BANK_TRANSFER";
2426
+ reference: string;
2427
+ bank?: string | undefined;
2428
+ } | {
2429
+ method: "WALLET";
2430
+ wallet: string;
2431
+ reference: string;
2432
+ } | {
2433
+ method: "FINANCING";
2434
+ provider_reference: string;
2435
+ installments: number;
2436
+ } | {
2437
+ method: "REDEMPTION";
2438
+ reward_id: string;
2439
+ program: string;
2440
+ points: number;
2441
+ points_value: number;
2442
+ loyalty_transaction_id?: string | undefined;
2443
+ } | null | undefined;
2444
+ replaces_tender_id?: string | undefined;
2445
+ error_message?: string | undefined;
2446
+ placed_at?: string | null | undefined;
2447
+ resolved_at?: string | undefined;
2448
+ metadata?: Record<string, unknown> | undefined;
2449
+ }[];
2450
+ };
2451
+ /** Lifecycle of a payment intent (`DRAFT` → `LOCKED` → `COMPLETED`). */
2452
+ type PaymentIntentStatus = "ABANDONED" | "COMPLETED" | "DRAFT" | "LOCKED";
2453
+ /** Tender / order `payment_status`. */
2454
+ type PaymentStatus = "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2455
+ /** Where a tender is collected. */
2456
+ type PaymentCollectAt = "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2457
+ /** `payment_scope` of a `PAYING` workflow node. */
2458
+ type PaymentScope = "digital" | "in_person";
2459
+ /** One payment method inside an intent. */
2460
+ type PaymentTender = {
2461
+ id: string;
2462
+ sequence: number;
2463
+ attempt_reference: string;
2464
+ previous_attempt_references: string[];
2465
+ method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
2466
+ provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2467
+ payment_id?: string | undefined;
2468
+ collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2469
+ status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2470
+ amount: {
2471
+ currency: string;
2472
+ subtotal: number;
2473
+ discount_total: number;
2474
+ tax_total: number;
2475
+ fees: number;
2476
+ tip: number;
2477
+ delivery: number;
2478
+ redemptions_applied: number;
2479
+ total: number;
2480
+ };
2481
+ refunded_total: number;
2482
+ allocation: {
2483
+ lines: {
2484
+ line_uid: string;
2485
+ units?: number | undefined;
2486
+ }[];
2487
+ fees: string[];
2488
+ amounts: {
2489
+ line_uid: string;
2490
+ units?: number | undefined;
2491
+ subtotal: number;
2492
+ discount: number;
2493
+ tax: number;
2494
+ total: number;
2495
+ children: {
2496
+ line_uid: string;
2497
+ quantity: number;
2498
+ subtotal: number;
2499
+ discount: number;
2500
+ tax: number;
2501
+ total: number;
2502
+ }[];
2503
+ }[];
2504
+ } | null;
2505
+ details: {
2506
+ brand: string;
2507
+ last4: string;
2508
+ auth_code?: string | undefined;
2509
+ installments?: number | undefined;
2510
+ method: "CARD";
2511
+ } | {
2512
+ brand: string;
2513
+ last4: string;
2514
+ auth_code?: string | undefined;
2515
+ installments?: number | undefined;
2516
+ method: "PIN_PAD";
2517
+ terminal_id: string;
2518
+ } | {
2519
+ method: "CASH";
2520
+ tendered: number;
2521
+ change: number;
2522
+ } | {
2523
+ method: "BANK_TRANSFER";
2524
+ reference: string;
2525
+ bank?: string | undefined;
2526
+ } | {
2527
+ method: "WALLET";
2528
+ wallet: string;
2529
+ reference: string;
2530
+ } | {
2531
+ method: "FINANCING";
2532
+ provider_reference: string;
2533
+ installments: number;
2534
+ } | {
2535
+ method: "REDEMPTION";
2536
+ reward_id: string;
2537
+ program: string;
2538
+ points: number;
2539
+ points_value: number;
2540
+ loyalty_transaction_id?: string | undefined;
2541
+ } | null;
2542
+ replaces_tender_id?: string | undefined;
2124
2543
  error_message?: string | undefined;
2125
- placed_at: string;
2544
+ placed_at: string | null;
2126
2545
  resolved_at?: string | undefined;
2546
+ metadata: Record<string, unknown>;
2547
+ };
2548
+ /** Money one tender charges. */
2549
+ type TenderAmount = {
2550
+ currency: string;
2551
+ subtotal: number;
2552
+ discount_total: number;
2553
+ tax_total: number;
2554
+ fees: number;
2555
+ tip: number;
2556
+ delivery: number;
2557
+ redemptions_applied: number;
2558
+ total: number;
2559
+ };
2560
+ /** Lines / fees a tender covers, with server-computed amounts. */
2561
+ type TenderAllocation = {
2562
+ lines: {
2563
+ line_uid: string;
2564
+ units?: number | undefined;
2565
+ }[];
2566
+ fees: string[];
2567
+ amounts: {
2568
+ line_uid: string;
2569
+ units?: number | undefined;
2570
+ subtotal: number;
2571
+ discount: number;
2572
+ tax: number;
2573
+ total: number;
2574
+ children: {
2575
+ line_uid: string;
2576
+ quantity: number;
2577
+ subtotal: number;
2578
+ discount: number;
2579
+ tax: number;
2580
+ total: number;
2581
+ }[];
2582
+ }[];
2583
+ };
2584
+ /** Allocation sent by clients (no `amounts`). */
2585
+ type TenderAllocationInput = {
2586
+ lines?: {
2587
+ line_uid: string;
2588
+ units?: number | undefined;
2589
+ }[] | undefined;
2590
+ fees?: string[] | undefined;
2591
+ };
2592
+ /** Non-sensitive tender data, discriminated by `method`. */
2593
+ type TenderDetails = {
2594
+ brand: string;
2595
+ last4: string;
2596
+ auth_code?: string | undefined;
2597
+ installments?: number | undefined;
2598
+ method: "CARD";
2599
+ } | {
2600
+ brand: string;
2601
+ last4: string;
2602
+ auth_code?: string | undefined;
2603
+ installments?: number | undefined;
2604
+ method: "PIN_PAD";
2605
+ terminal_id: string;
2606
+ } | {
2607
+ method: "CASH";
2608
+ tendered: number;
2609
+ change: number;
2610
+ } | {
2611
+ method: "BANK_TRANSFER";
2612
+ reference: string;
2613
+ bank?: string | undefined;
2614
+ } | {
2615
+ method: "WALLET";
2616
+ wallet: string;
2617
+ reference: string;
2618
+ } | {
2619
+ method: "FINANCING";
2620
+ provider_reference: string;
2621
+ installments: number;
2622
+ } | {
2623
+ method: "REDEMPTION";
2624
+ reward_id: string;
2625
+ program: string;
2626
+ points: number;
2627
+ points_value: number;
2628
+ loyalty_transaction_id?: string | undefined;
2629
+ };
2630
+ /** One tender in `PUT /storefront/v1/orders/{id}/payment-intent`. */
2631
+ type PaymentTenderInput = {
2632
+ id?: string | undefined;
2633
+ attempt_reference?: string | undefined;
2634
+ method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
2635
+ provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2636
+ payment_id?: string | undefined;
2637
+ collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2638
+ allocation?: {
2639
+ lines?: {
2640
+ line_uid: string;
2641
+ units?: number | undefined;
2642
+ }[] | undefined;
2643
+ fees?: string[] | undefined;
2644
+ } | null | undefined;
2645
+ details?: {
2646
+ brand: string;
2647
+ last4: string;
2648
+ auth_code?: string | undefined;
2649
+ installments?: number | undefined;
2650
+ method: "CARD";
2651
+ } | {
2652
+ brand: string;
2653
+ last4: string;
2654
+ auth_code?: string | undefined;
2655
+ installments?: number | undefined;
2656
+ method: "PIN_PAD";
2657
+ terminal_id: string;
2658
+ } | {
2659
+ method: "CASH";
2660
+ tendered: number;
2661
+ change: number;
2662
+ } | {
2663
+ method: "BANK_TRANSFER";
2664
+ reference: string;
2665
+ bank?: string | undefined;
2666
+ } | {
2667
+ method: "WALLET";
2668
+ wallet: string;
2669
+ reference: string;
2670
+ } | {
2671
+ method: "FINANCING";
2672
+ provider_reference: string;
2673
+ installments: number;
2674
+ } | {
2675
+ method: "REDEMPTION";
2676
+ reward_id: string;
2677
+ program: string;
2678
+ points: number;
2679
+ points_value: number;
2680
+ loyalty_transaction_id?: string | undefined;
2681
+ } | null | undefined;
2682
+ };
2683
+ /** `PUT /storefront/v1/orders/{id}/payment-intent` body. */
2684
+ type PaymentIntentPutInput = {
2685
+ tenders: {
2686
+ id?: string | undefined;
2687
+ attempt_reference?: string | undefined;
2688
+ method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
2689
+ provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2690
+ payment_id?: string | undefined;
2691
+ collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2692
+ allocation?: {
2693
+ lines?: {
2694
+ line_uid: string;
2695
+ units?: number | undefined;
2696
+ }[] | undefined;
2697
+ fees?: string[] | undefined;
2698
+ } | null | undefined;
2699
+ details?: {
2700
+ brand: string;
2701
+ last4: string;
2702
+ auth_code?: string | undefined;
2703
+ installments?: number | undefined;
2704
+ method: "CARD";
2705
+ } | {
2706
+ brand: string;
2707
+ last4: string;
2708
+ auth_code?: string | undefined;
2709
+ installments?: number | undefined;
2710
+ method: "PIN_PAD";
2711
+ terminal_id: string;
2712
+ } | {
2713
+ method: "CASH";
2714
+ tendered: number;
2715
+ change: number;
2716
+ } | {
2717
+ method: "BANK_TRANSFER";
2718
+ reference: string;
2719
+ bank?: string | undefined;
2720
+ } | {
2721
+ method: "WALLET";
2722
+ wallet: string;
2723
+ reference: string;
2724
+ } | {
2725
+ method: "FINANCING";
2726
+ provider_reference: string;
2727
+ installments: number;
2728
+ } | {
2729
+ method: "REDEMPTION";
2730
+ reward_id: string;
2731
+ program: string;
2732
+ points: number;
2733
+ points_value: number;
2734
+ loyalty_transaction_id?: string | undefined;
2735
+ } | null | undefined;
2736
+ }[];
2127
2737
  metadata?: Record<string, unknown> | undefined;
2128
2738
  };
2739
+ /** `POST …/tenders/{tenderId}/replace` body. */
2740
+ type TenderReplaceInput = {
2741
+ method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
2742
+ payment_id: string;
2743
+ provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2744
+ collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2745
+ };
2746
+ /** `POST …/tenders/{tenderId}/void` body. */
2747
+ type TenderVoidInput = {
2748
+ idempotency_key: string;
2749
+ reason?: string | undefined;
2750
+ };
2751
+ /** `POST …/tenders/{tenderId}/refund` body. */
2752
+ type TenderRefundInput = {
2753
+ idempotency_key: string;
2754
+ amount?: number | undefined;
2755
+ items?: {
2756
+ line_uid: string;
2757
+ units?: number | undefined;
2758
+ }[] | undefined;
2759
+ reason?: string | undefined;
2760
+ };
2761
+ /** Mixed payments limits exposed in storefront preferences. */
2762
+ type MixedPaymentsLimits = {
2763
+ max_methods: number;
2764
+ max_items_per_method: number | null;
2765
+ max_amount_per_method: number | null;
2766
+ per_method: Partial<Record<"BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET", {
2767
+ max_amount: number | null;
2768
+ max_items: number | null;
2769
+ }>>;
2770
+ };
2771
+ /** Effect of a merchant `mixed_payments` rule. */
2772
+ type MixedPaymentsEffect = {
2773
+ enabled: boolean;
2774
+ max_methods: number;
2775
+ max_items_per_method: number | null;
2776
+ max_amount_per_method: number | null;
2777
+ per_method: Partial<Record<"BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET", {
2778
+ max_amount: number | null;
2779
+ max_items: number | null;
2780
+ }>>;
2781
+ };
2782
+ /** `details.code` of intent / tender API errors. */
2783
+ type PaymentErrorCode = "MIXED_PAYMENTS_DISABLED" | "PAYMENT_AMOUNT_EXCEEDED" | "PAYMENT_INTENT_LOCKED" | "PAYMENT_INTENT_STALE" | "PAYMENT_INVALID_ALLOCATION" | "PAYMENT_INVALID_COMBINATION" | "PAYMENT_INVALID_PRIMARY" | "PAYMENT_LINE_NOT_SPLITTABLE" | "PAYMENT_METHOD_UNAVAILABLE" | "PAYMENT_REDEMPTION_EXCEEDED" | "PAYMENT_REDEMPTION_MISMATCH" | "PAYMENT_TOO_MANY_ITEMS" | "PAYMENT_TOO_MANY_METHODS" | "PAYMENT_UNALLOCATED_LINES" | "REDEEM_PAYMENT_METHOD_NOT_CONFIGURED";
2129
2784
  /** `POST /storefront/v1/orders` body. */
2130
2785
  type OrderInsertInput = {
2131
2786
  id: string;
@@ -2201,6 +2856,10 @@ type OrderInsertInput = {
2201
2856
  discount_amount?: number | undefined;
2202
2857
  before_taxes?: boolean | undefined;
2203
2858
  expires_at?: string | undefined;
2859
+ payment_id?: string | undefined;
2860
+ amount?: number | undefined;
2861
+ points?: number | undefined;
2862
+ program?: string | undefined;
2204
2863
  }[] | undefined;
2205
2864
  quantity: number;
2206
2865
  tax_rate: number | null;
@@ -2229,6 +2888,10 @@ type OrderInsertInput = {
2229
2888
  discount_amount?: number | undefined;
2230
2889
  before_taxes?: boolean | undefined;
2231
2890
  expires_at?: string | undefined;
2891
+ payment_id?: string | undefined;
2892
+ amount?: number | undefined;
2893
+ points?: number | undefined;
2894
+ program?: string | undefined;
2232
2895
  }[] | undefined;
2233
2896
  redemption_steps?: {
2234
2897
  reward_id: string;
@@ -2273,28 +2936,6 @@ type OrderInsertInput = {
2273
2936
  total: number;
2274
2937
  } | undefined;
2275
2938
  metadata?: Record<string, unknown> | undefined;
2276
- payment_intents?: {
2277
- id?: string | undefined;
2278
- payment_id?: string | undefined;
2279
- method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET";
2280
- provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2281
- collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2282
- status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2283
- totals: {
2284
- currency: string;
2285
- subtotal: number;
2286
- discount_rate: number;
2287
- discount_total: number;
2288
- tax_rate: number;
2289
- tax_total: number;
2290
- total: number;
2291
- };
2292
- error_message?: string | undefined;
2293
- placed_at: string;
2294
- resolved_at?: string | undefined;
2295
- metadata?: Record<string, unknown> | undefined;
2296
- }[] | undefined;
2297
- payment_status?: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED" | undefined;
2298
2939
  };
2299
2940
  /** `PATCH /storefront/v1/orders/{id}` body. */
2300
2941
  type OrderUpdateInput = {
@@ -2369,6 +3010,10 @@ type OrderUpdateInput = {
2369
3010
  discount_amount?: number | undefined;
2370
3011
  before_taxes?: boolean | undefined;
2371
3012
  expires_at?: string | undefined;
3013
+ payment_id?: string | undefined;
3014
+ amount?: number | undefined;
3015
+ points?: number | undefined;
3016
+ program?: string | undefined;
2372
3017
  }[] | undefined;
2373
3018
  quantity: number;
2374
3019
  tax_rate: number | null;
@@ -2397,6 +3042,10 @@ type OrderUpdateInput = {
2397
3042
  discount_amount?: number | undefined;
2398
3043
  before_taxes?: boolean | undefined;
2399
3044
  expires_at?: string | undefined;
3045
+ payment_id?: string | undefined;
3046
+ amount?: number | undefined;
3047
+ points?: number | undefined;
3048
+ program?: string | undefined;
2400
3049
  }[] | undefined;
2401
3050
  redemption_steps?: {
2402
3051
  reward_id: string;
@@ -2441,28 +3090,6 @@ type OrderUpdateInput = {
2441
3090
  total: number;
2442
3091
  } | undefined;
2443
3092
  metadata?: Record<string, unknown> | undefined;
2444
- payment_intents?: {
2445
- id?: string | undefined;
2446
- payment_id?: string | undefined;
2447
- method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET";
2448
- provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2449
- collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2450
- status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2451
- totals: {
2452
- currency: string;
2453
- subtotal: number;
2454
- discount_rate: number;
2455
- discount_total: number;
2456
- tax_rate: number;
2457
- tax_total: number;
2458
- total: number;
2459
- };
2460
- error_message?: string | undefined;
2461
- placed_at: string;
2462
- resolved_at?: string | undefined;
2463
- metadata?: Record<string, unknown> | undefined;
2464
- }[] | undefined;
2465
- payment_status?: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED" | undefined;
2466
3093
  };
2467
3094
  /** `GET /storefront/v1/orders` query. */
2468
3095
  type OrderListInput = {
@@ -2505,6 +3132,10 @@ type OrderValidateInput = {
2505
3132
  discount_amount?: number | undefined;
2506
3133
  before_taxes?: boolean | undefined;
2507
3134
  expires_at?: string | undefined;
3135
+ payment_id?: string | undefined;
3136
+ amount?: number | undefined;
3137
+ points?: number | undefined;
3138
+ program?: string | undefined;
2508
3139
  }[] | undefined;
2509
3140
  quantity: number;
2510
3141
  tax_rate: number | null;
@@ -2533,6 +3164,10 @@ type OrderValidateInput = {
2533
3164
  discount_amount?: number | undefined;
2534
3165
  before_taxes?: boolean | undefined;
2535
3166
  expires_at?: string | undefined;
3167
+ payment_id?: string | undefined;
3168
+ amount?: number | undefined;
3169
+ points?: number | undefined;
3170
+ program?: string | undefined;
2536
3171
  }[] | undefined;
2537
3172
  redemption_steps?: {
2538
3173
  reward_id: string;
@@ -2577,7 +3212,7 @@ type OrderValidateInput = {
2577
3212
  total: number;
2578
3213
  };
2579
3214
  payment_id?: string | undefined;
2580
- payment_method?: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET" | undefined;
3215
+ payment_method?: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET" | undefined;
2581
3216
  };
2582
3217
  /** `POST /storefront/v1/orders/validate` success `data`. */
2583
3218
  type OrderValidateOutput = {
@@ -2589,30 +3224,50 @@ type OrderReorderInput = {
2589
3224
  };
2590
3225
  /** `POST /storefront/v1/orders/{id}/payments` body. */
2591
3226
  type OrderRecordPaymentInput = {
2592
- intent: {
2593
- id?: string | undefined;
2594
- payment_id?: string | undefined;
2595
- method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET";
2596
- provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
2597
- collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
2598
- status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
2599
- totals: {
2600
- currency: string;
2601
- subtotal: number;
2602
- discount_rate: number;
2603
- discount_total: number;
2604
- tax_rate: number;
2605
- tax_total: number;
2606
- total: number;
2607
- };
2608
- error_message?: string | undefined;
2609
- placed_at: string;
2610
- resolved_at?: string | undefined;
2611
- metadata: {
2612
- [x: string]: unknown;
2613
- attempt_reference: string;
2614
- };
2615
- };
3227
+ tender_id: string;
3228
+ attempt_reference: string;
3229
+ status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
3230
+ details?: {
3231
+ brand: string;
3232
+ last4: string;
3233
+ auth_code?: string | undefined;
3234
+ installments?: number | undefined;
3235
+ method: "CARD";
3236
+ } | {
3237
+ brand: string;
3238
+ last4: string;
3239
+ auth_code?: string | undefined;
3240
+ installments?: number | undefined;
3241
+ method: "PIN_PAD";
3242
+ terminal_id: string;
3243
+ } | {
3244
+ method: "CASH";
3245
+ tendered: number;
3246
+ change: number;
3247
+ } | {
3248
+ method: "BANK_TRANSFER";
3249
+ reference: string;
3250
+ bank?: string | undefined;
3251
+ } | {
3252
+ method: "WALLET";
3253
+ wallet: string;
3254
+ reference: string;
3255
+ } | {
3256
+ method: "FINANCING";
3257
+ provider_reference: string;
3258
+ installments: number;
3259
+ } | {
3260
+ method: "REDEMPTION";
3261
+ reward_id: string;
3262
+ program: string;
3263
+ points: number;
3264
+ points_value: number;
3265
+ loyalty_transaction_id?: string | undefined;
3266
+ } | null | undefined;
3267
+ approved_amount?: number | undefined;
3268
+ provider_reference?: string | undefined;
3269
+ error_message?: string | undefined;
3270
+ metadata?: Record<string, unknown> | undefined;
2616
3271
  };
2617
3272
  //#endregion
2618
3273
  //#region .flat/src/pos.d.ts
@@ -2756,6 +3411,10 @@ type PosOrderInput = {
2756
3411
  discount_amount?: number | undefined;
2757
3412
  before_taxes?: boolean | undefined;
2758
3413
  expires_at?: string | undefined;
3414
+ payment_id?: string | undefined;
3415
+ amount?: number | undefined;
3416
+ points?: number | undefined;
3417
+ program?: string | undefined;
2759
3418
  }[] | undefined;
2760
3419
  quantity: number;
2761
3420
  tax_rate: number | null;
@@ -2791,6 +3450,19 @@ type PosOrderInput = {
2791
3450
  tendered?: number | undefined;
2792
3451
  change?: number | undefined;
2793
3452
  };
3453
+ tenders?: {
3454
+ payment_id: string;
3455
+ method?: string | undefined;
3456
+ collect_at?: "COUNTER" | undefined;
3457
+ allocation: {
3458
+ lines?: {
3459
+ line_uid: string;
3460
+ units?: number | undefined;
3461
+ }[] | undefined;
3462
+ fees?: string[] | undefined;
3463
+ };
3464
+ attempt_reference?: string | undefined;
3465
+ }[] | undefined;
2794
3466
  occurred_at?: string | undefined;
2795
3467
  notes?: string | undefined;
2796
3468
  };
@@ -2824,6 +3496,7 @@ type PosKioskSettleInput = {
2824
3496
  authorizer_pin?: string | undefined;
2825
3497
  client_id?: string | undefined;
2826
3498
  order_id: string;
3499
+ tender_id?: string | undefined;
2827
3500
  };
2828
3501
  /** `POST /storefront/v1/pos/kiosk-orders/settle` `data`. */
2829
3502
  interface PosKioskSettleResult {
@@ -2884,7 +3557,7 @@ type Condition = {
2884
3557
  channel_id: string;
2885
3558
  brand_id: string;
2886
3559
  primitive: "boolean";
2887
- type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag";
3560
+ type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag" | "Payment captured" | "Payment is mixed";
2888
3561
  operator: "is" | "is not";
2889
3562
  value: boolean;
2890
3563
  invalidMessage?: string | undefined;
@@ -2980,7 +3653,7 @@ type AndConditions = ({
2980
3653
  channel_id: string;
2981
3654
  brand_id: string;
2982
3655
  primitive: "boolean";
2983
- type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag";
3656
+ type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag" | "Payment captured" | "Payment is mixed";
2984
3657
  operator: "is" | "is not";
2985
3658
  value: boolean;
2986
3659
  invalidMessage?: string | undefined;
@@ -3076,7 +3749,7 @@ type OrConditions = ({
3076
3749
  channel_id: string;
3077
3750
  brand_id: string;
3078
3751
  primitive: "boolean";
3079
- type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag";
3752
+ type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag" | "Payment captured" | "Payment is mixed";
3080
3753
  operator: "is" | "is not";
3081
3754
  value: boolean;
3082
3755
  invalidMessage?: string | undefined;
@@ -3163,9 +3836,17 @@ interface RulesEngineParams {
3163
3836
  };
3164
3837
  payment?: {
3165
3838
  id?: string;
3839
+ /** Single-tender facts; `collect_ats` / `methods` win when present. */
3166
3840
  collect_at?: string;
3167
3841
  method?: string;
3168
3842
  status?: string;
3843
+ /** Every live real tender (positive operators = some, negative = none). */
3844
+ collect_ats?: string[];
3845
+ methods?: string[];
3846
+ /** 2+ live real tenders (REDEMPTION excluded). */
3847
+ is_mixed?: boolean;
3848
+ /** Some live tender (real or REDEMPTION) is `PAID`. */
3849
+ captured?: boolean;
3169
3850
  };
3170
3851
  monitoring?: RulesEngineMonitoring;
3171
3852
  referenceDate?: string;
@@ -3197,4 +3878,4 @@ interface CheckoutResolved {
3197
3878
  billingFields: Record<string, CheckoutMode>;
3198
3879
  }
3199
3880
  //#endregion
3200
- export type { AddressInfo, AndConditions, BillingInfo, BillingProfile, BundledItem, Category, CategoryAvailability, CategoryItem, ChannelManifest, ChannelManifestNative, ChannelManifestWeb, ChannelPlatform, ChannelTemplate, CheckoutMode, CheckoutResolved, CmsBlock, CmsBlockItem, Condition, Customer, CustomerGender, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, DayOfWeek, DeliveryAddress, Fulfillment, FulfillmentListInput, GroupDisplayType, KioskAdminGesture, KioskAppState, KioskCommandPayload, KioskCommandType, KioskConfigChangedPayload, KioskDeviceConfig, KioskDeviceConfigDevice, KioskDeviceConfigPayment, KioskDeviceConfigScope, KioskDeviceConfigSettings, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHealthSample, KioskHeartbeatHealth, KioskHeartbeatInput, KioskHeartbeatResult, KioskOrderPager, KioskPagerSide, KioskPagersOverrides, KioskPagersSettings, KioskRealtimeToken, MatchResult, MatchableRule, Menu, MenuLookup, MerchantPayment, Metadata, ModifierControlType, ModifierGroup, MultiLanguageText, OrConditions, Order, OrderChangedCallback, OrderChangedCallbackError, OrderChangedCheckoutState, OrderChangedError, OrderChangedPayload, OrderChangedRunStatus, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedeemInput, OrderRedemptionState, OrderRedemptionStep, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, Payment, PaymentIntent, PaymentIntentInput, PaymentMethod, PaymentProvider, PlaceOrderResult, PosActorKind, PosCashBreakdownItem, PosCatalog, PosDenominationKind, PosDeviceConfigDevice, PosDeviceConfigScope, PosDeviceOverrides, PosErrorCode, PosHealthBatchInput, PosHealthBatchResult, PosHealthSample, PosHeartbeatHealth, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosStaff, PricingModifier, PricingVariant, Product, ProductAvailability, ProductPricing, ProductRecommendationLink, Recommendation, RecurringDateCronExpression, RecurringDateCronRepeat, RecurringDateCronResult, RecurringDateCronValues, RuleInterpretation, RulesEngineMonitoring, RulesEngineOrder, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, Schedule, ScheduleDay, SchedulePeriod, SdkLogContext, SdkLogEntry, SdkLogErrorInfo, SdkLogIngestResult, SdkLogLevel, SdkLogOptions, Store, StoreAvailabilityFilters, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontAvailabilityChangedPayload, StorefrontAvailabilityInput, StorefrontAvailabilityRule, StorefrontCmsChangedPayload, StorefrontMenu, StorefrontMenuChangedPayload, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, StorefrontPreferences, StorefrontPreferencesInput, StorefrontRealtimeToken, StorefrontRealtimeTokenInput, StorefrontWorkspaceChangedPayload, StringMatchCaseOptions, Variant, VariantGroup };
3881
+ export type { AddressInfo, AndConditions, BillingInfo, BillingProfile, BundledItem, Category, CategoryAvailability, CategoryItem, ChannelManifest, ChannelManifestNative, ChannelManifestWeb, ChannelPlatform, ChannelTemplate, CheckoutMode, CheckoutResolved, CmsBlock, CmsBlockItem, Condition, Customer, CustomerGender, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, DayOfWeek, DeliveryAddress, Fulfillment, FulfillmentListInput, GroupDisplayType, KioskAdminGesture, KioskAppState, KioskCommandPayload, KioskCommandType, KioskConfigChangedPayload, KioskDeviceConfig, KioskDeviceConfigDevice, KioskDeviceConfigPayment, KioskDeviceConfigScope, KioskDeviceConfigSettings, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHealthSample, KioskHeartbeatHealth, KioskHeartbeatInput, KioskHeartbeatResult, KioskOrderPager, KioskPagerSide, KioskPagersOverrides, KioskPagersSettings, KioskRealtimeToken, MatchResult, MatchableRule, Menu, MenuLookup, MerchantPayment, Metadata, MixedPaymentsEffect, MixedPaymentsLimits, ModifierControlType, ModifierGroup, MultiLanguageText, OrConditions, Order, OrderChangedCallback, OrderChangedCallbackError, OrderChangedCheckoutState, OrderChangedError, OrderChangedPayload, OrderChangedRunStatus, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedeemInput, OrderRedemptionState, OrderRedemptionStep, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, Payment, PaymentCollectAt, PaymentErrorCode, PaymentIntent, PaymentIntentInput, PaymentIntentPutInput, PaymentIntentStatus, PaymentMethod, PaymentProvider, PaymentScope, PaymentStatus, PaymentTender, PaymentTenderInput, PlaceOrderResult, PosActorKind, PosCashBreakdownItem, PosCatalog, PosDenominationKind, PosDeviceConfigDevice, PosDeviceConfigScope, PosDeviceOverrides, PosErrorCode, PosHealthBatchInput, PosHealthBatchResult, PosHealthSample, PosHeartbeatHealth, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosStaff, PricingModifier, PricingVariant, Product, ProductAvailability, ProductPricing, ProductRecommendationLink, Recommendation, RecurringDateCronExpression, RecurringDateCronRepeat, RecurringDateCronResult, RecurringDateCronValues, RuleInterpretation, RulesEngineMonitoring, RulesEngineOrder, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, Schedule, ScheduleDay, SchedulePeriod, SdkLogContext, SdkLogEntry, SdkLogErrorInfo, SdkLogIngestResult, SdkLogLevel, SdkLogOptions, Store, StoreAvailabilityFilters, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontAvailabilityChangedPayload, StorefrontAvailabilityInput, StorefrontAvailabilityRule, StorefrontCmsChangedPayload, StorefrontMenu, StorefrontMenuChangedPayload, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, StorefrontPreferences, StorefrontPreferencesInput, StorefrontRealtimeToken, StorefrontRealtimeTokenInput, StorefrontWorkspaceChangedPayload, StringMatchCaseOptions, TenderAllocation, TenderAllocationInput, TenderAmount, TenderDetails, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fire-spark/types",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Fire Spark public TypeScript types",
5
5
  "type": "module",
6
6
  "sideEffects": false,