@zenglobal/api-client 5.0.3 → 5.0.5

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.
@@ -1,6 +1,7 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: 'https://api-dev.zenglobal.au' | 'https://api.zenglobal.au' | (string & {});
3
3
  };
4
+ export type Webhooks = WebhookLoyaltyWebhookRequest | WebhookCustomerWebhookRequest | WebhookOfferWebhookRequest | WebhookRedeemWebhookRequest | WebhookDeleteWebhookRequest | WebhookItemWebhookRequest | WebhookPriceWebhookRequest | WebhookTransactionWebhookRequest;
4
5
  /**
5
6
  * Address structure used for billing and shipping addresses
6
7
  */
@@ -8,11 +9,11 @@ export type Address = {
8
9
  /**
9
10
  * Address line 1
10
11
  */
11
- address1: string;
12
+ address1: string | null;
12
13
  /**
13
14
  * Address line 2
14
15
  */
15
- address2: string;
16
+ address2: string | null;
16
17
  /**
17
18
  * Suburb/City
18
19
  */
@@ -20,15 +21,44 @@ export type Address = {
20
21
  /**
21
22
  * State/Province
22
23
  */
23
- state: string;
24
+ state: string | null;
24
25
  /**
25
26
  * Postal/ZIP code
26
27
  */
27
- postcode: string;
28
+ postcode: string | null;
28
29
  /**
29
30
  * Country
30
31
  */
31
- country: string;
32
+ country: string | null;
33
+ };
34
+ /**
35
+ * Address data structure
36
+ */
37
+ export type AddressData = {
38
+ /**
39
+ * Address line 1
40
+ */
41
+ address1?: string;
42
+ /**
43
+ * Address line 2
44
+ */
45
+ address2?: string;
46
+ /**
47
+ * Suburb
48
+ */
49
+ suburb?: string;
50
+ /**
51
+ * State
52
+ */
53
+ state?: string;
54
+ /**
55
+ * Postcode
56
+ */
57
+ postcode?: string;
58
+ /**
59
+ * Country
60
+ */
61
+ country?: string;
32
62
  };
33
63
  /**
34
64
  * Response for GET /lists.
@@ -755,6 +785,76 @@ export type CreateCardResponse = {
755
785
  */
756
786
  cardimage?: string;
757
787
  };
788
+ /**
789
+ * Customer data structure
790
+ */
791
+ export type CustomerData = {
792
+ /**
793
+ * Company/chain code
794
+ */
795
+ Company: string;
796
+ /**
797
+ * Customer number
798
+ */
799
+ customer: string;
800
+ /**
801
+ * Customer name
802
+ */
803
+ name: string;
804
+ /**
805
+ * Email address
806
+ */
807
+ email?: string;
808
+ /**
809
+ * Mobile number
810
+ */
811
+ mobile?: string;
812
+ /**
813
+ * Phone number
814
+ */
815
+ phone?: string;
816
+ /**
817
+ * Secondary phone number
818
+ */
819
+ phone1?: string;
820
+ /**
821
+ * Gender
822
+ */
823
+ gender?: string;
824
+ /**
825
+ * Date of birth
826
+ */
827
+ dateofbirth?: string;
828
+ /**
829
+ * WooCommerce customer ID
830
+ */
831
+ woocommerce?: string;
832
+ /**
833
+ * Shopify customer ID
834
+ */
835
+ shopify?: string;
836
+ /**
837
+ * Billing address
838
+ */
839
+ billing: AddressData;
840
+ /**
841
+ * Shipping address
842
+ */
843
+ shipping: AddressData;
844
+ /**
845
+ * Associated loyalty cards
846
+ */
847
+ cards?: Array<LoyaltyCardSummary>;
848
+ };
849
+ /**
850
+ * Customer webhook data payload
851
+ */
852
+ export type CustomerWebhookData = {
853
+ /**
854
+ * Customer information
855
+ */
856
+ customer: CustomerData;
857
+ };
758
858
  /**
759
859
  * Database error (500)
760
860
  */
@@ -1069,6 +1169,55 @@ export type InventoryLoyaltyGroup = {
1069
1169
  */
1070
1170
  description: string;
1071
1171
  };
1172
+ /**
1173
+ * Inventory webhook data payload
1174
+ */
1175
+ export type InventoryWebhookData = {
1176
+ /**
1177
+ * Item code
1178
+ */
1179
+ Item: string;
1180
+ /**
1181
+ * Company/chain code
1182
+ */
1183
+ chain: string;
1184
+ /**
1185
+ * Company/chain code (duplicate)
1186
+ */
1187
+ Company: string;
1188
+ /**
1189
+ * Whether stock on hand has changed
1190
+ */
1191
+ sohFlag: boolean;
1192
+ /**
1193
+ * Whether price has changed
1194
+ */
1195
+ priceFlag: boolean;
1196
+ /**
1197
+ * Current stock on hand
1198
+ */
1199
+ stockOnHand?: number;
1200
+ /**
1201
+ * Item price
1202
+ */
1203
+ price?: number;
1204
+ /**
1205
+ * Item cost
1206
+ */
1207
+ cost?: number;
1208
+ /**
1209
+ * Item description
1210
+ */
1211
+ description?: string;
1212
+ /**
1213
+ * Department code
1214
+ */
1215
+ department?: number;
1216
+ /**
1217
+ * Site code
1218
+ */
1219
+ sitecode?: string;
1220
+ };
1072
1221
  /**
1073
1222
  * Active jackpot information
1074
1223
  */
@@ -1375,7 +1524,7 @@ export type LocationInfo = {
1375
1524
  /**
1376
1525
  * Location name
1377
1526
  */
1378
- description: string;
1527
+ description: string | null;
1379
1528
  /**
1380
1529
  * Location type code (-1 if no type assigned)
1381
1530
  */
@@ -1480,7 +1629,7 @@ export type LoyaltyCard = {
1480
1629
  /**
1481
1630
  * User ID
1482
1631
  */
1483
- userid: string;
1632
+ userid: string | null;
1484
1633
  /**
1485
1634
  * Username for login
1486
1635
  */
@@ -1493,6 +1642,10 @@ export type LoyaltyCard = {
1493
1642
  * Last name
1494
1643
  */
1495
1644
  lastname: string;
1645
+ /**
1646
+ * Full name as stored (surname, firstname)
1647
+ */
1648
+ customername: string;
1496
1649
  /**
1497
1650
  * Email address
1498
1651
  */
@@ -1500,15 +1653,87 @@ export type LoyaltyCard = {
1500
1653
  /**
1501
1654
  * Date of birth (Y-m-d format)
1502
1655
  */
1503
- dateofbirth: ApiDate;
1656
+ dateofbirth: ApiDate | null;
1504
1657
  /**
1505
1658
  * Gender
1506
1659
  */
1507
- gender: string;
1660
+ gender: string | null;
1661
+ /**
1662
+ * Chain code
1663
+ */
1664
+ chaincode: string;
1665
+ /**
1666
+ * Title
1667
+ */
1668
+ title: string | null;
1669
+ /**
1670
+ * Initials
1671
+ */
1672
+ initials: string | null;
1673
+ /**
1674
+ * Comments
1675
+ */
1676
+ comments: string | null;
1677
+ /**
1678
+ * Customer ID
1679
+ */
1680
+ customerid: string;
1681
+ /**
1682
+ * Referring customer number
1683
+ */
1684
+ refercustomer: string | null;
1685
+ /**
1686
+ * Name prefix
1687
+ */
1688
+ prefix: string | null;
1689
+ /**
1690
+ * Name suffix
1691
+ */
1692
+ suffix: string | null;
1693
+ /**
1694
+ * Authentication token
1695
+ */
1696
+ token: string;
1697
+ /**
1698
+ * Freight provider
1699
+ */
1700
+ freightprovider: string | null;
1701
+ /**
1702
+ * Shopify customer ID
1703
+ */
1704
+ shopify: string | null;
1705
+ /**
1706
+ * Shopify store ID
1707
+ */
1708
+ shopify_id: string | null;
1709
+ /**
1710
+ * Payment provider name
1711
+ */
1712
+ payment_provider: string | null;
1713
+ /**
1714
+ * Payment provider customer ID
1715
+ */
1716
+ payment_customer_id: string | null;
1508
1717
  /**
1509
1718
  * Phone numbers
1510
1719
  */
1511
1720
  phones: PhoneNumbers;
1721
+ /**
1722
+ * Mobile phone number
1723
+ */
1724
+ mobile: string;
1725
+ /**
1726
+ * Mobile in E.164 format
1727
+ */
1728
+ mobile_e164: string | null;
1729
+ /**
1730
+ * Home phone
1731
+ */
1732
+ phone1: string;
1733
+ /**
1734
+ * Work phone
1735
+ */
1736
+ phone2: string;
1512
1737
  /**
1513
1738
  * Billing address
1514
1739
  */
@@ -1517,6 +1742,10 @@ export type LoyaltyCard = {
1517
1742
  * Shipping address
1518
1743
  */
1519
1744
  shipping: Address;
1745
+ /**
1746
+ * Postcode (top-level)
1747
+ */
1748
+ postcode: string | null;
1520
1749
  /**
1521
1750
  * Date joined loyalty program
1522
1751
  */
@@ -1526,9 +1755,9 @@ export type LoyaltyCard = {
1526
1755
  */
1527
1756
  createdate: ApiDate;
1528
1757
  /**
1529
- * Card expiry date
1758
+ * Card expiry date (empty string if no expiry)
1530
1759
  */
1531
- expirydate: ApiDate;
1760
+ expirydate: string;
1532
1761
  /**
1533
1762
  * Last changed date
1534
1763
  */
@@ -1536,15 +1765,47 @@ export type LoyaltyCard = {
1536
1765
  /**
1537
1766
  * Date of last sale
1538
1767
  */
1539
- datelastsale: ApiDate;
1768
+ datelastsale: ApiDate | null;
1540
1769
  /**
1541
1770
  * Welcome email sent date
1542
1771
  */
1543
- welcomeemaildate?: ApiDate;
1772
+ welcomeemaildate: ApiDate | null;
1773
+ /**
1774
+ * Welcome SMS sent date
1775
+ */
1776
+ welcomesmsdate: ApiDate | null;
1544
1777
  /**
1545
1778
  * Last expiry notification date
1546
1779
  */
1547
- lastexpiry?: ApiDate;
1780
+ lastexpiry: ApiDate | null;
1781
+ /**
1782
+ * Anniversary date
1783
+ */
1784
+ anniversary: ApiDate | null;
1785
+ /**
1786
+ * Next birthday date
1787
+ */
1788
+ nextbirthday: ApiDate | null;
1789
+ /**
1790
+ * Card anniversary date
1791
+ */
1792
+ cardanniversary: ApiDate | null;
1793
+ /**
1794
+ * Card next birthday date
1795
+ */
1796
+ cardnextbirthday: ApiDate | null;
1797
+ /**
1798
+ * Next visit prediction date
1799
+ */
1800
+ nextvisit: ApiDate | null;
1801
+ /**
1802
+ * Last visit date
1803
+ */
1804
+ lastvisit: ApiDate | null;
1805
+ /**
1806
+ * Last login date
1807
+ */
1808
+ lastlogin: ApiDate | null;
1548
1809
  /**
1549
1810
  * Total points earned
1550
1811
  */
@@ -1553,16 +1814,74 @@ export type LoyaltyCard = {
1553
1814
  * Total points redeemed
1554
1815
  */
1555
1816
  pointsredeemed: ApiNumeric;
1817
+ /**
1818
+ * Total points expired
1819
+ */
1820
+ pointsexpired: ApiNumeric;
1821
+ /**
1822
+ * Jackpot points
1823
+ */
1824
+ pointsjackpot: ApiNumeric;
1556
1825
  /**
1557
1826
  * Current points balance
1558
1827
  */
1559
1828
  pointsbalance: ApiNumeric;
1829
+ /**
1830
+ * Rolling balance
1831
+ */
1832
+ rollbalance: ApiNumeric;
1833
+ /**
1834
+ * Dollar to point ratio
1835
+ */
1836
+ dollarpointratio: ApiNumeric;
1837
+ /**
1838
+ * Redemption ratio
1839
+ */
1840
+ redemptionratio: ApiNumeric;
1841
+ /**
1842
+ * Total sales to date
1843
+ */
1844
+ salestodate: ApiNumeric;
1845
+ /**
1846
+ * Card stored value
1847
+ */
1848
+ cardvalue: ApiNumeric;
1849
+ /**
1850
+ * Amount of discount
1851
+ */
1852
+ amountofdiscount: ApiNumeric;
1853
+ /**
1854
+ * Type of discount
1855
+ */
1856
+ typeofdiscount: string | null;
1857
+ /**
1858
+ * Percentage discount
1859
+ */
1860
+ percentagediscount: ApiNumeric;
1861
+ /**
1862
+ * Number of visits
1863
+ */
1864
+ visits: ApiNumeric;
1865
+ /**
1866
+ * Average days between visits
1867
+ */
1868
+ averagedays: ApiNumeric;
1869
+ /**
1870
+ * Market ID
1871
+ */
1872
+ marketid: ApiNumeric;
1873
+ /**
1874
+ * Market chain code
1875
+ */
1876
+ marketchain: ApiNumeric;
1877
+ /**
1878
+ * Market name
1879
+ */
1880
+ market: string;
1560
1881
  /**
1561
1882
  * Card movement calculation result
1562
1883
  */
1563
- cardmovement?: {
1564
- [key: string]: unknown;
1565
- };
1884
+ cardmovement?: LoyaltyCardMovement;
1566
1885
  /**
1567
1886
  * Opted in for mail marketing
1568
1887
  */
@@ -1612,13 +1931,45 @@ export type LoyaltyCard = {
1612
1931
  */
1613
1932
  purged: boolean;
1614
1933
  /**
1615
- * Member status code
1934
+ * Staff member who created the card
1935
+ */
1936
+ staffmember: string;
1937
+ /**
1938
+ * Occupation
1939
+ */
1940
+ occupation: string;
1941
+ /**
1942
+ * Favourite item or preference
1616
1943
  */
1617
- memberstatus: 'A' | 'C' | 'S';
1944
+ favourite: string;
1945
+ /**
1946
+ * Income bracket
1947
+ */
1948
+ income: string | null;
1949
+ /**
1950
+ * Referral source
1951
+ */
1952
+ referralfrom: string;
1953
+ /**
1954
+ * External reference
1955
+ */
1956
+ reference: string;
1957
+ /**
1958
+ * App push notification token
1959
+ */
1960
+ apptoken: string | null;
1961
+ /**
1962
+ * Delivery instructions
1963
+ */
1964
+ deliveryinstructions: string | null;
1965
+ /**
1966
+ * Member status code. Null for non-members.
1967
+ */
1968
+ memberstatus: 'A' | 'C' | 'S' | null;
1618
1969
  /**
1619
1970
  * Member status description
1620
1971
  */
1621
- memberstatusdescription: 'Active' | 'Cancelled' | 'Suspended';
1972
+ memberstatusdescription: 'Active' | 'Cancelled' | 'Suspended' | 'Non Member';
1622
1973
  /**
1623
1974
  * Home site code
1624
1975
  */
@@ -1631,6 +1982,14 @@ export type LoyaltyCard = {
1631
1982
  * Custom soft fields
1632
1983
  */
1633
1984
  softfields: SoftFields;
1985
+ /**
1986
+ * API version
1987
+ */
1988
+ version: string;
1989
+ /**
1990
+ * Loyalty system version
1991
+ */
1992
+ loyaltyversion: string;
1634
1993
  /**
1635
1994
  * Loyalty groups assigned to card
1636
1995
  */
@@ -1657,81 +2016,10 @@ export type LoyaltyCard = {
1657
2016
  wallet: string;
1658
2017
  };
1659
2018
  /**
1660
- * Compact loyalty card structure containing only essential fields
1661
- */
1662
- export type LoyaltyCardCompact = {
1663
- /**
1664
- * Chain code
1665
- */
1666
- chaincode: string;
1667
- /**
1668
- * Email address
1669
- */
1670
- email: string;
1671
- /**
1672
- * Date of birth (Y-m-d format or null)
1673
- */
1674
- dateofbirth: ApiDate | null;
1675
- /**
1676
- * Mobile phone number
1677
- */
1678
- mobile: string;
1679
- /**
1680
- * Loyalty card number
1681
- */
1682
- cardnumber: string;
1683
- /**
1684
- * Card expiry date
1685
- */
1686
- expirydate: string;
1687
- /**
1688
- * Current points balance
1689
- */
1690
- pointsbalance: ApiNumeric;
1691
- /**
1692
- * Card reported as lost
1693
- */
1694
- cardlost: boolean;
1695
- /**
1696
- * Not allowed to redeem points
1697
- */
1698
- notallowredeem: boolean;
1699
- /**
1700
- * Card is active
1701
- */
1702
- cardactive: boolean;
1703
- /**
1704
- * Card has been purged
1705
- */
1706
- purged: boolean;
1707
- /**
1708
- * First name
1709
- */
1710
- firstname: string;
1711
- /**
1712
- * Last name
1713
- */
1714
- lastname: string;
1715
- /**
1716
- * Card type identifier
1717
- */
1718
- cardtype: string;
1719
- /**
1720
- * Home site code
1721
- */
1722
- homesite: string;
1723
- };
1724
- export type LoyaltyCardCompactResponse = {
1725
- /**
1726
- * Compact loyalty card details
1727
- */
1728
- card: LoyaltyCardCompact;
1729
- };
1730
- /**
1731
- * Loyalty card creation request body.
1732
- * The entire object is sent wrapped in a `card` key: `{ "card": { ... } }`.
1733
- * Fields marked as "conditional" are required based on the company's compulsory field settings
1734
- * (retrievable via GET /v1/loyalty/compulsory).
2019
+ * Loyalty card creation request body.
2020
+ * The entire object is sent wrapped in a `card` key: `{ "card": { ... } }`.
2021
+ * Fields marked as "conditional" are required based on the company's compulsory field settings
2022
+ * (retrievable via GET /v1/loyalty/compulsory).
1735
2023
  */
1736
2024
  export type LoyaltyCardCreateRequest = {
1737
2025
  card: {
@@ -1887,6 +2175,208 @@ export type LoyaltyCardCreateRequest = {
1887
2175
  deliveryinstructions?: string;
1888
2176
  };
1889
2177
  };
2178
+ /**
2179
+ * Loyalty card data structure
2180
+ */
2181
+ export type LoyaltyCardData = {
2182
+ /**
2183
+ * Company/chain code
2184
+ */
2185
+ Company: string;
2186
+ /**
2187
+ * Loyalty card number
2188
+ */
2189
+ Card: string;
2190
+ /**
2191
+ * Customer number
2192
+ */
2193
+ Customer: string;
2194
+ /**
2195
+ * Family card number (if linked)
2196
+ */
2197
+ FamilyCard: string;
2198
+ /**
2199
+ * Original card number before conversion
2200
+ */
2201
+ OriginalCard: string;
2202
+ /**
2203
+ * Card status
2204
+ */
2205
+ Status: string;
2206
+ /**
2207
+ * Customer salutation
2208
+ */
2209
+ Salutation?: string;
2210
+ /**
2211
+ * First name
2212
+ */
2213
+ First: string;
2214
+ /**
2215
+ * Last name
2216
+ */
2217
+ Last: string;
2218
+ /**
2219
+ * Card PIN
2220
+ */
2221
+ pin?: string;
2222
+ /**
2223
+ * Gender
2224
+ */
2225
+ Gender?: string;
2226
+ /**
2227
+ * Address line 1
2228
+ */
2229
+ Address1?: string;
2230
+ /**
2231
+ * Address line 2
2232
+ */
2233
+ Address2?: string;
2234
+ /**
2235
+ * Suburb
2236
+ */
2237
+ Suburb?: string;
2238
+ /**
2239
+ * State
2240
+ */
2241
+ State?: string;
2242
+ /**
2243
+ * Postcode
2244
+ */
2245
+ Postcode?: string;
2246
+ /**
2247
+ * Security token
2248
+ */
2249
+ Token?: string;
2250
+ /**
2251
+ * App token
2252
+ */
2253
+ AppToken?: string;
2254
+ /**
2255
+ * App operating system
2256
+ */
2257
+ AppSystem?: string;
2258
+ /**
2259
+ * Email address
2260
+ */
2261
+ Email?: string;
2262
+ /**
2263
+ * Phone number
2264
+ */
2265
+ Phone?: string;
2266
+ /**
2267
+ * Secondary phone number
2268
+ */
2269
+ Phone2?: string;
2270
+ /**
2271
+ * Mobile number
2272
+ */
2273
+ Mobile?: string;
2274
+ /**
2275
+ * Fax number
2276
+ */
2277
+ Fax?: string;
2278
+ /**
2279
+ * Occupation
2280
+ */
2281
+ Occupation?: string;
2282
+ /**
2283
+ * Date of birth
2284
+ */
2285
+ dateOfBirth?: string;
2286
+ /**
2287
+ * Card type ID
2288
+ */
2289
+ CARDTYPE: string;
2290
+ /**
2291
+ * Whether card follows default settings
2292
+ */
2293
+ FOLLOWCARD: 'T' | 'F';
2294
+ /**
2295
+ * Points earning ratio
2296
+ */
2297
+ PointsRatio: string;
2298
+ /**
2299
+ * Points redemption ratio
2300
+ */
2301
+ RedeemRatio: string;
2302
+ /**
2303
+ * Percentage discount
2304
+ */
2305
+ Discount: string;
2306
+ /**
2307
+ * Mail opt-in preference
2308
+ */
2309
+ mailOpt?: string;
2310
+ /**
2311
+ * Email opt-in preference
2312
+ */
2313
+ emailOpt?: string;
2314
+ /**
2315
+ * SMS opt-in preference
2316
+ */
2317
+ smsOpt?: string;
2318
+ /**
2319
+ * Whether card details are complete
2320
+ */
2321
+ CardComplete: string;
2322
+ /**
2323
+ * Whether card is active
2324
+ */
2325
+ CardActive: string;
2326
+ /**
2327
+ * Whether card is purged
2328
+ */
2329
+ Purged: string;
2330
+ /**
2331
+ * Current points balance
2332
+ */
2333
+ Points: string;
2334
+ /**
2335
+ * Home site ID
2336
+ */
2337
+ HomeSite: string;
2338
+ /**
2339
+ * Home site name
2340
+ */
2341
+ HomeSiteName: string;
2342
+ /**
2343
+ * Profile picture URL
2344
+ */
2345
+ Picture?: string;
2346
+ };
2347
+ /**
2348
+ * Card movement/tier progression information
2349
+ */
2350
+ export type LoyaltyCardMovement = {
2351
+ /**
2352
+ * Movement type description
2353
+ */
2354
+ type: string;
2355
+ /**
2356
+ * Whether card movement is enabled
2357
+ */
2358
+ enabled: boolean;
2359
+ /**
2360
+ * Date from which movement is calculated
2361
+ */
2362
+ datefrom: string;
2363
+ /**
2364
+ * Target card type for upgrade
2365
+ */
2366
+ bettercardtype: string;
2367
+ /**
2368
+ * Required value to trigger movement
2369
+ */
2370
+ requiredvalue: string;
2371
+ /**
2372
+ * Current progress value
2373
+ */
2374
+ currentvalue: string;
2375
+ /**
2376
+ * Remaining value needed to move
2377
+ */
2378
+ needtomove: string;
2379
+ };
1890
2380
  /**
1891
2381
  * GET /loyalty/card response — returned via prepareJson() without result/errormessage wrapper.
1892
2382
  * The version and loyaltyVersion fields are embedded inside the card object.
@@ -1897,6 +2387,47 @@ export type LoyaltyCardResponse = {
1897
2387
  */
1898
2388
  card: LoyaltyCard;
1899
2389
  };
2390
+ /**
2391
+ * Loyalty card summary for customer webhook
2392
+ */
2393
+ export type LoyaltyCardSummary = {
2394
+ /**
2395
+ * Card number
2396
+ */
2397
+ card: string;
2398
+ /**
2399
+ * Card holder name
2400
+ */
2401
+ name: string;
2402
+ /**
2403
+ * Join date
2404
+ */
2405
+ joindate: string;
2406
+ /**
2407
+ * Points earned to date
2408
+ */
2409
+ pointsearned: string;
2410
+ /**
2411
+ * Points redeemed to date
2412
+ */
2413
+ pointsredeemed: string;
2414
+ /**
2415
+ * Points expired to date
2416
+ */
2417
+ pointsexpired: string;
2418
+ /**
2419
+ * Current points balance
2420
+ */
2421
+ pointsbalance: string;
2422
+ /**
2423
+ * Total sales to date
2424
+ */
2425
+ salestodate: string;
2426
+ /**
2427
+ * Card type
2428
+ */
2429
+ cardtype: string;
2430
+ };
1900
2431
  /**
1901
2432
  * Loyalty card type information
1902
2433
  */
@@ -2282,6 +2813,20 @@ export type LoyaltyTransaction = {
2282
2813
  */
2283
2814
  bonus: ApiNumeric;
2284
2815
  };
2816
+ /**
2817
+ * Loyalty webhook data payload
2818
+ */
2819
+ export type LoyaltyWebhookData = {
2820
+ /**
2821
+ * Card data container
2822
+ */
2823
+ AMC_POSPortal: {
2824
+ /**
2825
+ * Loyalty card information
2826
+ */
2827
+ CardData: LoyaltyCardData;
2828
+ };
2829
+ };
2285
2830
  /**
2286
2831
  * Address update request body for the PUT address sub-function.
2287
2832
  * The request body must be wrapped: `{"member": {...}}`
@@ -2956,6 +3501,55 @@ export type MemberGroupDetail = {
2956
3501
  */
2957
3502
  url?: string;
2958
3503
  };
3504
+ /**
3505
+ * V2 member group with clean snake_case field names and proper types
3506
+ */
3507
+ export type MemberGroupV2 = {
3508
+ /**
3509
+ * Unique group identifier (database primary key)
3510
+ */
3511
+ id: number;
3512
+ /**
3513
+ * Legacy group reference number (GROUPID)
3514
+ */
3515
+ group_id: number;
3516
+ /**
3517
+ * Group description
3518
+ */
3519
+ description: string;
3520
+ /**
3521
+ * Points multiplier
3522
+ */
3523
+ points_multiplier: number;
3524
+ /**
3525
+ * Bonus amount
3526
+ */
3527
+ bonus: number;
3528
+ /**
3529
+ * Pack price
3530
+ */
3531
+ pack_price: number;
3532
+ /**
3533
+ * Whether this is the default group
3534
+ */
3535
+ is_default: boolean;
3536
+ /**
3537
+ * Web type
3538
+ */
3539
+ web_type: string;
3540
+ /**
3541
+ * Group image URL
3542
+ */
3543
+ url: string;
3544
+ /**
3545
+ * Site control setting
3546
+ */
3547
+ site_control: 'disabled' | 'in_site_list' | 'not_in_site_list';
3548
+ /**
3549
+ * Site list for group control
3550
+ */
3551
+ site_list: Array<string>;
3552
+ };
2959
3553
  /**
2960
3554
  * Member groups GET response.
2961
3555
  * The version and loyaltyVersion fields are embedded as pseudo-elements inside the groups array.
@@ -3639,12 +4233,77 @@ export type OfferCreateRequest = {
3639
4233
  */
3640
4234
  effect?: OfferEffect;
3641
4235
  };
3642
- export type OfferDeleteResult = {
3643
- result: number;
3644
- errormessage: string;
3645
- };
3646
- export type OfferDetailAmount = {
3647
- type: string;
4236
+ /**
4237
+ * Offer data structure
4238
+ */
4239
+ export type OfferData = {
4240
+ /**
4241
+ * Offer ID
4242
+ */
4243
+ offerid: string;
4244
+ /**
4245
+ * Company/chain code
4246
+ */
4247
+ chaincode: string;
4248
+ /**
4249
+ * Offer title
4250
+ */
4251
+ title?: string;
4252
+ /**
4253
+ * Offer description
4254
+ */
4255
+ description?: string;
4256
+ /**
4257
+ * Whether offer is loyalty-only
4258
+ */
4259
+ loyaltyonly: boolean;
4260
+ /**
4261
+ * Whether offer is linked to another offer
4262
+ */
4263
+ linkedto: boolean;
4264
+ /**
4265
+ * Whether this is a birthday offer
4266
+ */
4267
+ birthdayoffer: boolean;
4268
+ /**
4269
+ * Whether card must be active
4270
+ */
4271
+ cardactive: boolean;
4272
+ /**
4273
+ * Whether card details must be complete
4274
+ */
4275
+ cardcomplete: boolean;
4276
+ /**
4277
+ * Date offer was last changed
4278
+ */
4279
+ changedate: string;
4280
+ /**
4281
+ * Date offer becomes active
4282
+ */
4283
+ dateactive: string;
4284
+ /**
4285
+ * Date offer expires
4286
+ */
4287
+ dateexpire: string;
4288
+ /**
4289
+ * Whether this is a redemption event
4290
+ */
4291
+ redeem: boolean;
4292
+ /**
4293
+ * Whether this is a deletion event
4294
+ */
4295
+ delete: boolean;
4296
+ /**
4297
+ * Card data for redemption events
4298
+ */
4299
+ card?: LoyaltyCardData;
4300
+ };
4301
+ export type OfferDeleteResult = {
4302
+ result: number;
4303
+ errormessage: string;
4304
+ };
4305
+ export type OfferDetailAmount = {
4306
+ type: string;
3648
4307
  value: number;
3649
4308
  };
3650
4309
  export type OfferDetailBirthday = {
@@ -3909,6 +4568,15 @@ export type OfferUpdateRequest = {
3909
4568
  */
3910
4569
  effect?: OfferEffect;
3911
4570
  };
4571
+ /**
4572
+ * Offer webhook data payload
4573
+ */
4574
+ export type OfferWebhookData = {
4575
+ /**
4576
+ * Offer information
4577
+ */
4578
+ Offer: OfferData;
4579
+ };
3912
4580
  /**
3913
4581
  * Order detail structure as returned by GET /order/{orderNumber}/{site}.
3914
4582
  * The response is nested under an `order` key.
@@ -4957,23 +5625,23 @@ export type SiteInfo = {
4957
5625
  /**
4958
5626
  * Billing city
4959
5627
  */
4960
- billcity: string;
5628
+ billcity: string | null;
4961
5629
  /**
4962
5630
  * Contact person
4963
5631
  */
4964
- contact: string;
5632
+ contact: string | null;
4965
5633
  /**
4966
5634
  * Site manager
4967
5635
  */
4968
- manager: string;
5636
+ manager: string | null;
4969
5637
  /**
4970
5638
  * Site email address
4971
5639
  */
4972
- email: string;
5640
+ email: string | null;
4973
5641
  /**
4974
5642
  * Australian Company Number
4975
5643
  */
4976
- acn: string;
5644
+ acn: string | null;
4977
5645
  /**
4978
5646
  * Whether the site is active
4979
5647
  */
@@ -4981,75 +5649,75 @@ export type SiteInfo = {
4981
5649
  /**
4982
5650
  * Site currency code
4983
5651
  */
4984
- currency: string;
5652
+ currency: string | null;
4985
5653
  /**
4986
5654
  * GPS latitude
4987
5655
  */
4988
- latitude: ApiNumeric;
5656
+ latitude: ApiNumeric | null;
4989
5657
  /**
4990
5658
  * GPS longitude (note: legacy spelling preserved)
4991
5659
  */
4992
- longtitude: ApiNumeric;
5660
+ longtitude: ApiNumeric | null;
4993
5661
  /**
4994
5662
  * Site timezone
4995
5663
  */
4996
- timezone: string;
5664
+ timezone: string | null;
4997
5665
  /**
4998
5666
  * Region code
4999
5667
  */
5000
- region: ApiNumeric;
5668
+ region: ApiNumeric | null;
5001
5669
  /**
5002
5670
  * Region reference ID
5003
5671
  */
5004
- region_id: ApiNumeric;
5672
+ region_id: ApiNumeric | null;
5005
5673
  /**
5006
5674
  * District code
5007
5675
  */
5008
- district: ApiNumeric;
5676
+ district: ApiNumeric | null;
5009
5677
  /**
5010
5678
  * District reference ID
5011
5679
  */
5012
- district_id: ApiNumeric;
5680
+ district_id: ApiNumeric | null;
5013
5681
  /**
5014
5682
  * External store identifier
5015
5683
  */
5016
- store_id: string;
5684
+ store_id: string | null;
5017
5685
  /**
5018
5686
  * Shopify store identifier
5019
5687
  */
5020
- shopify_id: string;
5688
+ shopify_id: string | null;
5021
5689
  /**
5022
5690
  * Salesforce account identifier
5023
5691
  */
5024
- salesforce_account_id: string;
5692
+ salesforce_account_id: string | null;
5025
5693
  /**
5026
5694
  * Customer reference identifier
5027
5695
  */
5028
- customer_reference_id: string;
5696
+ customer_reference_id: string | null;
5029
5697
  /**
5030
5698
  * POS provider reference ID
5031
5699
  */
5032
- point_of_sale_provider_id: ApiNumeric;
5700
+ point_of_sale_provider_id: ApiNumeric | null;
5033
5701
  /**
5034
5702
  * POS reseller reference ID
5035
5703
  */
5036
- point_of_sale_reseller_id: ApiNumeric;
5704
+ point_of_sale_reseller_id: ApiNumeric | null;
5037
5705
  /**
5038
5706
  * Whether POS support is enabled
5039
5707
  */
5040
- point_of_sale_support: boolean;
5708
+ point_of_sale_support: boolean | null;
5041
5709
  /**
5042
5710
  * Web store reference ID
5043
5711
  */
5044
- web_store_id: ApiNumeric;
5712
+ web_store_id: ApiNumeric | null;
5045
5713
  /**
5046
5714
  * Salesforce sync status
5047
5715
  */
5048
- salesforce_sync_status: string;
5716
+ salesforce_sync_status: string | null;
5049
5717
  /**
5050
5718
  * Salesforce sync last updated
5051
5719
  */
5052
- salesforce_sync_updated_at: string;
5720
+ salesforce_sync_updated_at: string | null;
5053
5721
  /**
5054
5722
  * Whether loyalty signup is allowed at this site
5055
5723
  */
@@ -5057,15 +5725,15 @@ export type SiteInfo = {
5057
5725
  /**
5058
5726
  * Date of first sale
5059
5727
  */
5060
- firstsale: string;
5728
+ firstsale: string | null;
5061
5729
  /**
5062
5730
  * Date of last sale
5063
5731
  */
5064
- lastsale: string;
5732
+ lastsale: string | null;
5065
5733
  /**
5066
5734
  * Store number
5067
5735
  */
5068
- storenum: string;
5736
+ storenum: string | null;
5069
5737
  /**
5070
5738
  * Operating hours for today
5071
5739
  */
@@ -5720,6 +6388,124 @@ export type TransactionCustomer = {
5720
6388
  */
5721
6389
  purchaseorder?: string;
5722
6390
  };
6391
+ /**
6392
+ * Transaction data structure
6393
+ */
6394
+ export type TransactionData = {
6395
+ /**
6396
+ * Company/chain code
6397
+ */
6398
+ Company: string;
6399
+ /**
6400
+ * Site code
6401
+ */
6402
+ Site: string;
6403
+ /**
6404
+ * Location code
6405
+ */
6406
+ Location: string;
6407
+ /**
6408
+ * Terminal number
6409
+ */
6410
+ Terminal: string;
6411
+ /**
6412
+ * Journal number
6413
+ */
6414
+ Journal: string;
6415
+ /**
6416
+ * Invoice journal number
6417
+ */
6418
+ InvoiceJournal?: string;
6419
+ /**
6420
+ * Credit note journal number
6421
+ */
6422
+ CreditJournal?: string;
6423
+ /**
6424
+ * Transaction date and time
6425
+ */
6426
+ DateTime: string;
6427
+ /**
6428
+ * Trading date
6429
+ */
6430
+ TradingDate: string;
6431
+ /**
6432
+ * Whether this is a training transaction
6433
+ */
6434
+ isTraining: boolean;
6435
+ /**
6436
+ * Operator number
6437
+ */
6438
+ OperatorNumber: string;
6439
+ /**
6440
+ * Operator name
6441
+ */
6442
+ OperatorName: string;
6443
+ /**
6444
+ * Operator login
6445
+ */
6446
+ OperatorLogin: string;
6447
+ /**
6448
+ * Cash drawer number
6449
+ */
6450
+ Cashdrawer: string;
6451
+ /**
6452
+ * Email receipt address
6453
+ */
6454
+ EmailReceipt?: string;
6455
+ /**
6456
+ * Customer email
6457
+ */
6458
+ CustomerEmail?: string;
6459
+ /**
6460
+ * Customer postcode
6461
+ */
6462
+ Postcode?: string;
6463
+ /**
6464
+ * Customer name
6465
+ */
6466
+ CustomerName?: string;
6467
+ /**
6468
+ * Customer address
6469
+ */
6470
+ CustomerAddress?: string;
6471
+ /**
6472
+ * Customer phone
6473
+ */
6474
+ CustomerPhone?: string;
6475
+ /**
6476
+ * Loyalty information
6477
+ */
6478
+ Loyalty?: WebhookTransactionLoyalty;
6479
+ /**
6480
+ * Sales items
6481
+ */
6482
+ Sales?: Array<TransactionItem>;
6483
+ /**
6484
+ * Tender information
6485
+ */
6486
+ Tender?: Array<TransactionTender>;
6487
+ /**
6488
+ * Sales discount
6489
+ */
6490
+ SalesDiscount?: TransactionDiscount;
6491
+ /**
6492
+ * Rounding amount
6493
+ */
6494
+ Rounding?: TransactionRounding;
6495
+ };
6496
+ /**
6497
+ * Transaction discount
6498
+ */
6499
+ export type TransactionDiscount = {
6500
+ /**
6501
+ * Discount amount
6502
+ */
6503
+ Amount: number;
6504
+ /**
6505
+ * Tax amount on discount
6506
+ */
6507
+ Tax: number;
6508
+ };
5723
6509
  /**
5724
6510
  * Event format transaction response (for format=event query parameter).
5725
6511
  *
@@ -5732,6 +6518,127 @@ export type TransactionCustomer = {
5732
6518
  export type TransactionEventResponse = {
5733
6519
  [key: string]: unknown;
5734
6520
  };
6521
+ /**
6522
+ * Transaction item
6523
+ */
6524
+ export type TransactionItem = {
6525
+ /**
6526
+ * Item transaction date and time
6527
+ */
6528
+ DateTime: string;
6529
+ /**
6530
+ * Item code
6531
+ */
6532
+ Item: string;
6533
+ /**
6534
+ * Item barcode
6535
+ */
6536
+ Barcode: string;
6537
+ /**
6538
+ * Item description
6539
+ */
6540
+ Description: string;
6541
+ /**
6542
+ * Price level
6543
+ */
6544
+ PriceLevel: number;
6545
+ /**
6546
+ * Item price
6547
+ */
6548
+ Price: number;
6549
+ /**
6550
+ * Original price before discounts
6551
+ */
6552
+ OriginalPrice?: number;
6553
+ /**
6554
+ * Item cost
6555
+ */
6556
+ Cost: number;
6557
+ /**
6558
+ * Quantity sold
6559
+ */
6560
+ Quantity: number;
6561
+ /**
6562
+ * Line total amount
6563
+ */
6564
+ LineTotal: number;
6565
+ /**
6566
+ * Line tax amount
6567
+ */
6568
+ LineTAX: number;
6569
+ /**
6570
+ * Discount amount
6571
+ */
6572
+ Discount: number;
6573
+ /**
6574
+ * Department code
6575
+ */
6576
+ Department: number;
6577
+ /**
6578
+ * Department name
6579
+ */
6580
+ DepartmentName?: string;
6581
+ /**
6582
+ * Whether item is on special
6583
+ */
6584
+ Special: boolean;
6585
+ /**
6586
+ * Loyalty points earned
6587
+ */
6588
+ Points?: number;
6589
+ /**
6590
+ * Bonus points earned
6591
+ */
6592
+ Bonus?: number;
6593
+ /**
6594
+ * Whether item was scanned
6595
+ */
6596
+ Scanned: boolean;
6597
+ /**
6598
+ * Scan terminal number
6599
+ */
6600
+ ScanTerminal?: number;
6601
+ /**
6602
+ * Brand code
6603
+ */
6604
+ Brand?: string;
6605
+ /**
6606
+ * Brand name
6607
+ */
6608
+ BrandName?: string;
6609
+ /**
6610
+ * Sub-department code
6611
+ */
6612
+ SubDepartment?: number;
6613
+ /**
6614
+ * Sub-department name
6615
+ */
6616
+ SubDepartmentName?: string;
6617
+ /**
6618
+ * Category code
6619
+ */
6620
+ Category?: number;
6621
+ /**
6622
+ * Category name
6623
+ */
6624
+ CategoryName?: string;
6625
+ /**
6626
+ * Sub-category code
6627
+ */
6628
+ SubCategory?: number;
6629
+ /**
6630
+ * Sub-category name
6631
+ */
6632
+ SubCategoryName?: string;
6633
+ /**
6634
+ * Range code
6635
+ */
6636
+ Range?: number;
6637
+ /**
6638
+ * Range name
6639
+ */
6640
+ RangeName?: string;
6641
+ };
5735
6642
  /**
5736
6643
  * Transaction offer structure for creation requests
5737
6644
  */
@@ -5906,6 +6813,15 @@ export type TransactionResponseOffer = {
5906
6813
  */
5907
6814
  customer_loyalty_id?: string;
5908
6815
  };
6816
+ /**
6817
+ * Transaction rounding
6818
+ */
6819
+ export type TransactionRounding = {
6820
+ /**
6821
+ * Rounding amount
6822
+ */
6823
+ Amount: number;
6824
+ };
5909
6825
  /**
5910
6826
  * Transaction sales discount structure.
5911
6827
  * The Sales Discount node activates the sales discount reports in the Portal.
@@ -5942,6 +6858,23 @@ export type TransactionTableInfo = {
5942
6858
  */
5943
6859
  covers?: string;
5944
6860
  };
6861
+ /**
6862
+ * Transaction tender
6863
+ */
6864
+ export type TransactionTender = {
6865
+ /**
6866
+ * Tender type number
6867
+ */
6868
+ Number: string;
6869
+ /**
6870
+ * Tender name
6871
+ */
6872
+ Name: string;
6873
+ /**
6874
+ * Tender amount
6875
+ */
6876
+ Amount: number;
6877
+ };
5945
6878
  /**
5946
6879
  * Transaction tracking information
5947
6880
  */
@@ -5992,6 +6925,15 @@ export type TransactionVoucher = {
5992
6925
  */
5993
6926
  voiditem?: boolean;
5994
6927
  };
6928
+ /**
6929
+ * Transaction webhook data payload
6930
+ */
6931
+ export type TransactionWebhookData = {
6932
+ /**
6933
+ * Transaction data container
6934
+ */
6935
+ AMC_POSPortal: TransactionData;
6936
+ };
5995
6937
  /**
5996
6938
  * Validation error for various validation failures (400)
5997
6939
  */
@@ -6156,60 +7098,190 @@ export type VerifyCardResponse = {
6156
7098
  */
6157
7099
  export type VersionResponse = {
6158
7100
  /**
6159
- * Result code
7101
+ * Result code
7102
+ */
7103
+ result: number;
7104
+ /**
7105
+ * Result message
7106
+ */
7107
+ errormessage: string;
7108
+ /**
7109
+ * Current API version
7110
+ */
7111
+ version: string;
7112
+ /**
7113
+ * Loyalty system version
7114
+ */
7115
+ loyaltyVersion: string;
7116
+ /**
7117
+ * Available API function sections and their allowed methods
7118
+ */
7119
+ functions: {
7120
+ [key: string]: unknown;
7121
+ };
7122
+ };
7123
+ export type Versions = '1.0.0' | '2.0.0';
7124
+ /**
7125
+ * Response from voucher balance-affecting operations (redeem, reserve, release).
7126
+ * Uses setError()/setErrorLockClear() so includes result/errormessage.
7127
+ */
7128
+ export type VoucherBalanceResponse = {
7129
+ /**
7130
+ * Result code (0 = success)
7131
+ */
7132
+ result: number;
7133
+ /**
7134
+ * Result message
7135
+ */
7136
+ errormessage: string;
7137
+ /**
7138
+ * Human-readable balance information (e.g. 'Available balance 15.00')
7139
+ */
7140
+ information?: string;
7141
+ /**
7142
+ * Available balance after operation (as string)
7143
+ */
7144
+ balance?: string;
7145
+ /**
7146
+ * Transaction reference in format site:terminal:journal (POS redemptions only)
7147
+ */
7148
+ reference?: string;
7149
+ /**
7150
+ * Voucher type settings/configuration (included in reserve/release responses)
7151
+ */
7152
+ vouchersettings?: {
7153
+ [key: string]: unknown;
7154
+ };
7155
+ };
7156
+ /**
7157
+ * Individual cart item for multi-voucher operations.
7158
+ * Each item represents one voucher to be created.
7159
+ */
7160
+ export type VoucherCartItem = {
7161
+ /**
7162
+ * Cart item identifier
7163
+ */
7164
+ id: string;
7165
+ /**
7166
+ * Buyer's first name (from billing details)
7167
+ */
7168
+ firstname: string;
7169
+ /**
7170
+ * Buyer's surname (from billing details)
7171
+ */
7172
+ surname: string;
7173
+ /**
7174
+ * Buyer's surname only — legacy API concatenates as 'name, firstName'
7175
+ */
7176
+ name: string;
7177
+ /**
7178
+ * Buyer's first name (from billing details)
7179
+ */
7180
+ firstName: string;
7181
+ /**
7182
+ * Unit price per voucher after discount
7183
+ */
7184
+ unitPrice: number;
7185
+ /**
7186
+ * Number of vouchers for this line item
7187
+ */
7188
+ quantity: number;
7189
+ /**
7190
+ * Voucher face value per unit (includes bonus)
7191
+ */
7192
+ value: number;
7193
+ /**
7194
+ * Delivery method: 'email' or 'post'
7195
+ */
7196
+ sendBy: string;
7197
+ /**
7198
+ * Optional message to include with the voucher
7199
+ */
7200
+ message: string;
7201
+ /**
7202
+ * Sender name for the message
7203
+ */
7204
+ messageFrom: string;
7205
+ /**
7206
+ * Recipient name for the message
7207
+ */
7208
+ messageTo: string;
7209
+ /**
7210
+ * Delivery address
7211
+ */
7212
+ address: string;
7213
+ /**
7214
+ * Scheduled delivery date (YYYY-MM-DD format)
7215
+ */
7216
+ scheduledDate: string;
7217
+ /**
7218
+ * Buyer's email address
7219
+ */
7220
+ email: string;
7221
+ /**
7222
+ * Buyer's phone number
7223
+ */
7224
+ phone: string;
7225
+ /**
7226
+ * Buyer's mobile number
7227
+ */
7228
+ mobile: string;
7229
+ /**
7230
+ * Delivery postcode
6160
7231
  */
6161
- result: number;
7232
+ postcode: string;
6162
7233
  /**
6163
- * Result message
7234
+ * Recipient's first name
6164
7235
  */
6165
- errormessage: string;
7236
+ recipientFirstname: string;
6166
7237
  /**
6167
- * Current API version
7238
+ * Recipient's surname
6168
7239
  */
6169
- version: string;
7240
+ recipientSurname: string;
6170
7241
  /**
6171
- * Loyalty system version
7242
+ * Recipient's email address
6172
7243
  */
6173
- loyaltyVersion: string;
7244
+ recipientEmail: string;
6174
7245
  /**
6175
- * Available API function sections and their allowed methods
7246
+ * Postage type: '1' for express, '0' for standard
6176
7247
  */
6177
- functions: {
6178
- [key: string]: unknown;
6179
- };
6180
- };
6181
- export type Versions = '1.0.0' | '2.0.0';
6182
- /**
6183
- * Response from voucher balance-affecting operations (redeem, reserve, release).
6184
- * Uses setError()/setErrorLockClear() so includes result/errormessage.
6185
- */
6186
- export type VoucherBalanceResponse = {
7248
+ postage: string;
6187
7249
  /**
6188
- * Result code (0 = success)
7250
+ * Whether this item requires physical delivery
6189
7251
  */
6190
- result: number;
7252
+ sendPhysical: boolean;
6191
7253
  /**
6192
- * Result message
7254
+ * Postage charge amount for this item
6193
7255
  */
6194
- errormessage: string;
7256
+ postageCharge: number;
6195
7257
  /**
6196
- * Human-readable balance information (e.g. 'Available balance 15.00')
7258
+ * Whether this is a gift voucher
6197
7259
  */
6198
- information?: string;
7260
+ sendGift: boolean;
6199
7261
  /**
6200
- * Available balance after operation (as string)
7262
+ * Secondary email address (recipient's email)
6201
7263
  */
6202
- balance?: string;
7264
+ secondary_email: string;
6203
7265
  /**
6204
- * Transaction reference in format site:terminal:journal (POS redemptions only)
7266
+ * Gift recipient's first name
6205
7267
  */
6206
- reference?: string;
7268
+ giftfirst: string;
6207
7269
  /**
6208
- * Voucher type settings/configuration (included in reserve/release responses)
7270
+ * Gift recipient's last name
6209
7271
  */
6210
- vouchersettings?: {
6211
- [key: string]: unknown;
6212
- };
7272
+ giftlast: string;
7273
+ /**
7274
+ * Gift recipient's address
7275
+ */
7276
+ giftaddress: string;
7277
+ /**
7278
+ * Scheduled email delivery date
7279
+ */
7280
+ emailDate: string;
7281
+ /**
7282
+ * Line number (1-based index)
7283
+ */
7284
+ line: number;
6213
7285
  };
6214
7286
  /**
6215
7287
  * Payment charge information for web voucher operations
@@ -6219,6 +7291,28 @@ export type VoucherCharge = {
6219
7291
  * Payment process ID from payment gateway
6220
7292
  */
6221
7293
  processId: string;
7294
+ /**
7295
+ * Card identifier from payment method
7296
+ */
7297
+ cardID?: string;
7298
+ /**
7299
+ * Cardholder name from payment method billing details
7300
+ */
7301
+ cardName?: string;
7302
+ /**
7303
+ * Payment reference
7304
+ */
7305
+ reference?: string;
7306
+ /**
7307
+ * Payment token (e.g., charge ID from Stripe)
7308
+ */
7309
+ token?: string;
7310
+ /**
7311
+ * Raw charge payload from payment gateway
7312
+ */
7313
+ raw?: {
7314
+ [key: string]: unknown;
7315
+ };
6222
7316
  };
6223
7317
  /**
6224
7318
  * Voucher create body fields (inside the `voucher` wrapper).
@@ -6286,6 +7380,10 @@ export type VoucherCreateBody = {
6286
7380
  * Surcharge amount
6287
7381
  */
6288
7382
  surcharge?: number;
7383
+ /**
7384
+ * Currency code (e.g., 'aud')
7385
+ */
7386
+ currency?: string;
6289
7387
  /**
6290
7388
  * Whether this is a web voucher (requires charge.processId)
6291
7389
  */
@@ -6334,6 +7432,10 @@ export type VoucherCreateBody = {
6334
7432
  * Gift recipient's last name (when isgift is true)
6335
7433
  */
6336
7434
  giftlast?: string;
7435
+ /**
7436
+ * Scheduled date for gift email delivery (YYYY-MM-DD format)
7437
+ */
7438
+ giftEmailDate?: string;
6337
7439
  /**
6338
7440
  * Optional message to include with the voucher notification
6339
7441
  */
@@ -6346,10 +7448,26 @@ export type VoucherCreateBody = {
6346
7448
  * Recipient name for the voucher message
6347
7449
  */
6348
7450
  messageTo?: string;
7451
+ /**
7452
+ * Whether the customer opted in to marketing communications
7453
+ */
7454
+ marketingOptIn?: boolean;
6349
7455
  /**
6350
7456
  * When true, sets the voucher to Locked status instead of Sold (for sandbox/testing)
6351
7457
  */
6352
7458
  sandbox?: boolean;
7459
+ /**
7460
+ * Whether terms and conditions were accepted. Note: field name preserves legacy API typo.
7461
+ */
7462
+ condtionAccept?: boolean;
7463
+ /**
7464
+ * Client IP address for web voucher transactions
7465
+ */
7466
+ webVoucherIP?: string;
7467
+ /**
7468
+ * Client user agent string for web voucher transactions
7469
+ */
7470
+ webVoucherAgent?: string;
6353
7471
  /**
6354
7472
  * Voucher PIN
6355
7473
  */
@@ -6365,9 +7483,7 @@ export type VoucherCreateBody = {
6365
7483
  /**
6366
7484
  * Cart items for multi-voucher operations
6367
7485
  */
6368
- cart?: Array<{
6369
- [key: string]: unknown;
6370
- }>;
7486
+ cart?: Array<VoucherCartItem>;
6371
7487
  /**
6372
7488
  * Reason text for the voucher operation
6373
7489
  */
@@ -6375,9 +7491,7 @@ export type VoucherCreateBody = {
6375
7491
  /**
6376
7492
  * Voucher number tracking for multi-voucher operations
6377
7493
  */
6378
- voucherNumbers?: {
6379
- [key: string]: unknown;
6380
- };
7494
+ voucherNumbers?: VoucherNumbers;
6381
7495
  /**
6382
7496
  * Location number (used when ispos is true)
6383
7497
  */
@@ -6386,6 +7500,38 @@ export type VoucherCreateBody = {
6386
7500
  * Terminal number (used when ispos is true)
6387
7501
  */
6388
7502
  terminal?: number;
7503
+ /**
7504
+ * Chain/company code
7505
+ */
7506
+ company?: number;
7507
+ /**
7508
+ * Total amount paid by customer (after discounts and surcharges)
7509
+ */
7510
+ amountpaid?: number;
7511
+ /**
7512
+ * Discount amount applied
7513
+ */
7514
+ discount?: number;
7515
+ /**
7516
+ * Voucher type identifier (e.g., 'Gift', 'Loyalty')
7517
+ */
7518
+ vouchertype?: string;
7519
+ /**
7520
+ * Timestamp of web voucher creation (Y-m-d H:i:s format)
7521
+ */
7522
+ webVoucherDateTime?: string;
7523
+ /**
7524
+ * Unix timestamp of web voucher creation
7525
+ */
7526
+ webVoucherDateTimeRaw?: number;
7527
+ /**
7528
+ * Total postage charge amount
7529
+ */
7530
+ postageCharge?: number;
7531
+ /**
7532
+ * Cart workflow reference ID
7533
+ */
7534
+ reference?: string;
6389
7535
  };
6390
7536
  /**
6391
7537
  * Request body for creating a new voucher via POST /voucher/{voucherType}/create.
@@ -6435,43 +7581,14 @@ export type VoucherCreateResponse = {
6435
7581
  * Transaction reference in format site:terminal:journal (POS operations only)
6436
7582
  */
6437
7583
  reference?: string;
6438
- };
6439
- /**
6440
- * Voucher deletion request.
6441
- * Body must be wrapped in a `voucher` key: `{"voucher": {...}}`.
6442
- */
6443
- export type VoucherDeleteRequest = {
6444
- /**
6445
- * Voucher wrapper
6446
- */
6447
- voucher: {
6448
- /**
6449
- * Voucher serial number
6450
- */
6451
- serialnumber: string;
6452
- /**
6453
- * Voucher PIN for verification (required when PIN checking is enabled)
6454
- */
6455
- pin: string;
6456
- /**
6457
- * Site code where deletion occurs
6458
- */
6459
- site: number;
6460
- };
6461
- };
6462
- /**
6463
- * Voucher deletion response.
6464
- * Uses setError() so includes result/errormessage.
6465
- */
6466
- export type VoucherDeleteResponse = {
6467
7584
  /**
6468
- * Result code (0 = success)
7585
+ * Reason for failure or additional context
6469
7586
  */
6470
- result: number;
7587
+ reason?: string;
6471
7588
  /**
6472
- * Result message
7589
+ * Whether to show the view voucher link in the response
6473
7590
  */
6474
- errormessage: string;
7591
+ showViewLink?: boolean;
6475
7592
  };
6476
7593
  /**
6477
7594
  * Voucher enquire body fields (inside the `voucher` wrapper).
@@ -6660,6 +7777,23 @@ export type VoucherImageResponse = {
6660
7777
  voucherimage: string;
6661
7778
  };
6662
7779
  };
7780
+ /**
7781
+ * Voucher count tracking for multi-voucher operations
7782
+ */
7783
+ export type VoucherNumbers = {
7784
+ /**
7785
+ * Total number of vouchers in the cart
7786
+ */
7787
+ total: number;
7788
+ /**
7789
+ * Number of email (electronic) vouchers
7790
+ */
7791
+ totalE: number;
7792
+ /**
7793
+ * Number of physical (postal) vouchers
7794
+ */
7795
+ totalP: number;
7796
+ };
6663
7797
  /**
6664
7798
  * Voucher recharge body fields (inside the `voucher` wrapper).
6665
7799
  */
@@ -7165,6 +8299,75 @@ export type VoucherTypeResponse = {
7165
8299
  version: string;
7166
8300
  };
7167
8301
  };
8302
+ /**
8303
+ * Outbound Webhook Models
8304
+ *
8305
+ * Zen sends webhooks to external systems when various events occur.
8306
+ * All webhooks are sent as HTTP POST requests with JSON payloads.Base webhook payload structure
8307
+ */
8308
+ export type WebhookPayload = {
8309
+ /**
8310
+ * Webhook function/event type
8311
+ */
8312
+ function: string;
8313
+ /**
8314
+ * Authentication key for webhook verification
8315
+ */
8316
+ key: string;
8317
+ /**
8318
+ * Company/chain code
8319
+ */
8320
+ chain: string;
8321
+ /**
8322
+ * Whether HTML trace is enabled
8323
+ */
8324
+ traceHtml: boolean;
8325
+ /**
8326
+ * Whether trace logging is enabled
8327
+ */
8328
+ trace: boolean;
8329
+ /**
8330
+ * Target webhook URL
8331
+ */
8332
+ url: string;
8333
+ /**
8334
+ * Whether data is sent via POST body
8335
+ */
8336
+ viaBody: boolean;
8337
+ };
8338
+ /**
8339
+ * Transaction loyalty information
8340
+ */
8341
+ export type WebhookTransactionLoyalty = {
8342
+ /**
8343
+ * Loyalty card number
8344
+ */
8345
+ Card: string;
8346
+ /**
8347
+ * Opening points balance
8348
+ */
8349
+ OpeningPoints?: string;
8350
+ /**
8351
+ * Card holder name
8352
+ */
8353
+ Name: string;
8354
+ /**
8355
+ * First name
8356
+ */
8357
+ FirstName?: string;
8358
+ /**
8359
+ * Last name
8360
+ */
8361
+ LastName?: string;
8362
+ /**
8363
+ * Points from rounding
8364
+ */
8365
+ RoundPoints?: string;
8366
+ /**
8367
+ * Card type
8368
+ */
8369
+ CardType: string;
8370
+ };
7168
8371
  /**
7169
8372
  * Not found error (404)
7170
8373
  */
@@ -7887,9 +9090,7 @@ export type LoyaltyGetCardData = {
7887
9090
  path: {
7888
9091
  cardNumber: string;
7889
9092
  };
7890
- query?: {
7891
- format?: 'compact';
7892
- };
9093
+ query?: never;
7893
9094
  url: '/v1/loyalty/card/{cardNumber}';
7894
9095
  };
7895
9096
  export type LoyaltyGetCardErrors = {
@@ -7907,7 +9108,7 @@ export type LoyaltyGetCardResponses = {
7907
9108
  /**
7908
9109
  * The request has succeeded.
7909
9110
  */
7910
- 200: LoyaltyCardResponse | LoyaltyCardCompactResponse;
9111
+ 200: LoyaltyCardResponse;
7911
9112
  };
7912
9113
  export type LoyaltyGetCardResponse = LoyaltyGetCardResponses[keyof LoyaltyGetCardResponses];
7913
9114
  export type LoyaltyUpdateCardData = {
@@ -8530,9 +9731,11 @@ export type LoyaltyGetCardTypesResponses = {
8530
9731
  */
8531
9732
  200: {
8532
9733
  /**
8533
- * Available card types. Also contains version and loyaltyVersion as pseudo-elements.
9734
+ * Card types keyed by numeric string index. Also contains version and loyaltyVersion as pseudo-elements.
8534
9735
  */
8535
- cardTypes: Array<LoyaltyCardType>;
9736
+ cardTypes: {
9737
+ [key: string]: unknown;
9738
+ };
8536
9739
  };
8537
9740
  };
8538
9741
  export type LoyaltyGetCardTypesResponse = LoyaltyGetCardTypesResponses[keyof LoyaltyGetCardTypesResponses];
@@ -8542,7 +9745,13 @@ export type LoyaltyGetCoffeeCardStatsData = {
8542
9745
  cardNumber: string;
8543
9746
  };
8544
9747
  query?: {
9748
+ /**
9749
+ * Site code. Either this or customer_reference_id is required.
9750
+ */
8545
9751
  site?: number;
9752
+ /**
9753
+ * Customer reference ID for site lookup. Either this or site is required.
9754
+ */
8546
9755
  customer_reference_id?: string;
8547
9756
  };
8548
9757
  url: '/v1/loyalty/coffeecard/{cardNumber}';
@@ -8676,9 +9885,11 @@ export type LoyaltyGetMemberGroupsResponses = {
8676
9885
  */
8677
9886
  200: {
8678
9887
  /**
8679
- * Purchase loyalty groups. Also contains version and loyaltyVersion as pseudo-elements.
9888
+ * Member groups keyed by numeric string index. Also contains version and loyaltyVersion as pseudo-elements.
8680
9889
  */
8681
- membergroups: Array<MemberGroup>;
9890
+ membergroups: {
9891
+ [key: string]: unknown;
9892
+ };
8682
9893
  };
8683
9894
  };
8684
9895
  export type LoyaltyGetMemberGroupsResponse = LoyaltyGetMemberGroupsResponses[keyof LoyaltyGetMemberGroupsResponses];
@@ -9559,7 +10770,8 @@ export type OfferListData = {
9559
10770
  query?: {
9560
10771
  /**
9561
10772
  * The unique site code at which the offer check is occurring.
9562
- * Required when filtering by a specific card number.
10773
+ * Required when cardNumber is not `all` — omitting this for a specific
10774
+ * card will return a validation error.
9563
10775
  */
9564
10776
  site?: number;
9565
10777
  /**
@@ -9894,11 +11106,11 @@ export type SitesSearchSitesData = {
9894
11106
  path?: never;
9895
11107
  query: {
9896
11108
  /**
9897
- * Search query (required, minimum 1 character). Searches across site name (partial match), CCode (exact), and site code (exact).
11109
+ * Search query (required, minimum 1 character). Supports comma-separated values for batch lookup when field is 'ccode' or 'sitecode' (max 200 values). Single values search across site name (partial match), CCode (exact), and site code (exact).
9898
11110
  */
9899
11111
  q: string;
9900
11112
  /**
9901
- * Restrict search to a specific field. When omitted, searches all fields.
11113
+ * Restrict search to a specific field. Required when using comma-separated values in q.
9902
11114
  */
9903
11115
  field?: 'name' | 'ccode' | 'sitecode';
9904
11116
  /**
@@ -10036,9 +11248,9 @@ export type TransactionLookupSearchJournalsData = {
10036
11248
  */
10037
11249
  journal: string;
10038
11250
  /**
10039
- * Optional site code to narrow results
11251
+ * Site code
10040
11252
  */
10041
- site?: number;
11253
+ site: number;
10042
11254
  /**
10043
11255
  * Optional start date filter (Y-m-d)
10044
11256
  */
@@ -10158,32 +11370,6 @@ export type VersionGetVersionResponses = {
10158
11370
  200: VersionResponse;
10159
11371
  };
10160
11372
  export type VersionGetVersionResponse = VersionGetVersionResponses[keyof VersionGetVersionResponses];
10161
- export type VoucherDeleteVoucherData = {
10162
- body: VoucherDeleteRequest;
10163
- path: {
10164
- voucherType: string;
10165
- };
10166
- query?: never;
10167
- url: '/v1/voucher/{voucherType}';
10168
- };
10169
- export type VoucherDeleteVoucherErrors = {
10170
- /**
10171
- * The server could not understand the request due to invalid syntax.
10172
- */
10173
- 400: ValidationError;
10174
- /**
10175
- * Access is unauthorized.
10176
- */
10177
- 401: InvalidAccessKeyError;
10178
- };
10179
- export type VoucherDeleteVoucherError = VoucherDeleteVoucherErrors[keyof VoucherDeleteVoucherErrors];
10180
- export type VoucherDeleteVoucherResponses = {
10181
- /**
10182
- * The request has succeeded.
10183
- */
10184
- 200: VoucherDeleteResponse;
10185
- };
10186
- export type VoucherDeleteVoucherResponse = VoucherDeleteVoucherResponses[keyof VoucherDeleteVoucherResponses];
10187
11373
  export type VoucherGetVoucherTypeData = {
10188
11374
  body?: never;
10189
11375
  path: {
@@ -10518,6 +11704,35 @@ export type LoyaltyV2GetGroupsResponses = {
10518
11704
  };
10519
11705
  };
10520
11706
  export type LoyaltyV2GetGroupsResponse = LoyaltyV2GetGroupsResponses[keyof LoyaltyV2GetGroupsResponses];
11707
+ export type LoyaltyV2GetMemberGroupsData = {
11708
+ body?: never;
11709
+ path?: never;
11710
+ query?: never;
11711
+ url: '/v2/loyalty/membergroups';
11712
+ };
11713
+ export type LoyaltyV2GetMemberGroupsErrors = {
11714
+ /**
11715
+ * Access is unauthorized.
11716
+ */
11717
+ 401: InvalidAccessKeyError;
11718
+ /**
11719
+ * The server cannot find the requested resource.
11720
+ */
11721
+ 404: ZenNotFoundError;
11722
+ };
11723
+ export type LoyaltyV2GetMemberGroupsError = LoyaltyV2GetMemberGroupsErrors[keyof LoyaltyV2GetMemberGroupsErrors];
11724
+ export type LoyaltyV2GetMemberGroupsResponses = {
11725
+ /**
11726
+ * The request has succeeded.
11727
+ */
11728
+ 200: {
11729
+ /**
11730
+ * Purchase member groups
11731
+ */
11732
+ member_groups: Array<MemberGroupV2>;
11733
+ };
11734
+ };
11735
+ export type LoyaltyV2GetMemberGroupsResponse = LoyaltyV2GetMemberGroupsResponses[keyof LoyaltyV2GetMemberGroupsResponses];
10521
11736
  export type PingV2ShowData = {
10522
11737
  body?: never;
10523
11738
  path?: never;
@@ -10531,4 +11746,76 @@ export type PingV2ShowResponses = {
10531
11746
  200: PingV2PingResult;
10532
11747
  };
10533
11748
  export type PingV2ShowResponse = PingV2ShowResponses[keyof PingV2ShowResponses];
11749
+ export type WebhookLoyaltyWebhookPayload = WebhookPayload & {
11750
+ data: LoyaltyWebhookData;
11751
+ };
11752
+ export type WebhookLoyaltyWebhookRequest = {
11753
+ body: WebhookLoyaltyWebhookPayload;
11754
+ key: 'loyalty';
11755
+ path?: never;
11756
+ query?: never;
11757
+ };
11758
+ export type WebhookCustomerWebhookPayload = WebhookPayload & {
11759
+ data: CustomerWebhookData;
11760
+ };
11761
+ export type WebhookCustomerWebhookRequest = {
11762
+ body: WebhookCustomerWebhookPayload;
11763
+ key: 'customer';
11764
+ path?: never;
11765
+ query?: never;
11766
+ };
11767
+ export type WebhookOfferWebhookPayload = WebhookPayload & {
11768
+ data: OfferWebhookData;
11769
+ };
11770
+ export type WebhookOfferWebhookRequest = {
11771
+ body: WebhookOfferWebhookPayload;
11772
+ key: 'offer';
11773
+ path?: never;
11774
+ query?: never;
11775
+ };
11776
+ export type WebhookRedeemWebhookPayload = WebhookPayload & {
11777
+ data: OfferWebhookData;
11778
+ };
11779
+ export type WebhookRedeemWebhookRequest = {
11780
+ body: WebhookRedeemWebhookPayload;
11781
+ key: 'redeem';
11782
+ path?: never;
11783
+ query?: never;
11784
+ };
11785
+ export type WebhookDeleteWebhookPayload = WebhookPayload & {
11786
+ data: OfferWebhookData;
11787
+ };
11788
+ export type WebhookDeleteWebhookRequest = {
11789
+ body: WebhookDeleteWebhookPayload;
11790
+ key: 'delete';
11791
+ path?: never;
11792
+ query?: never;
11793
+ };
11794
+ export type WebhookItemWebhookPayload = WebhookPayload & {
11795
+ data: InventoryWebhookData;
11796
+ };
11797
+ export type WebhookItemWebhookRequest = {
11798
+ body: WebhookItemWebhookPayload;
11799
+ key: 'item';
11800
+ path?: never;
11801
+ query?: never;
11802
+ };
11803
+ export type WebhookPriceWebhookPayload = WebhookPayload & {
11804
+ data: InventoryWebhookData;
11805
+ };
11806
+ export type WebhookPriceWebhookRequest = {
11807
+ body: WebhookPriceWebhookPayload;
11808
+ key: 'price';
11809
+ path?: never;
11810
+ query?: never;
11811
+ };
11812
+ export type WebhookTransactionWebhookPayload = WebhookPayload & {
11813
+ data: TransactionWebhookData;
11814
+ };
11815
+ export type WebhookTransactionWebhookRequest = {
11816
+ body: WebhookTransactionWebhookPayload;
11817
+ key: 'transaction';
11818
+ path?: never;
11819
+ query?: never;
11820
+ };
10534
11821
  //# sourceMappingURL=types.gen.d.ts.map