@zenglobal/api-client 5.0.2 → 5.0.4
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.
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/sdk.gen.d.ts +33 -27
- package/dist/client/sdk.gen.d.ts.map +1 -1
- package/dist/client/sdk.gen.js +36 -26
- package/dist/client/sdk.gen.js.map +1 -1
- package/dist/client/types.gen.d.ts +1392 -255
- package/dist/client/types.gen.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -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.
|
|
@@ -731,7 +761,7 @@ export type CompulsoryFields = {
|
|
|
731
761
|
* Additional compulsory settings
|
|
732
762
|
*/
|
|
733
763
|
settings?: {
|
|
734
|
-
[key: string]:
|
|
764
|
+
[key: string]: unknown;
|
|
735
765
|
};
|
|
736
766
|
};
|
|
737
767
|
/**
|
|
@@ -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:
|
|
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
|
|
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
|
|
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]: string;
|
|
1565
|
-
};
|
|
1884
|
+
cardmovement?: LoyaltyCardMovement;
|
|
1566
1885
|
/**
|
|
1567
1886
|
* Opted in for mail marketing
|
|
1568
1887
|
*/
|
|
@@ -1612,120 +1931,89 @@ export type LoyaltyCard = {
|
|
|
1612
1931
|
*/
|
|
1613
1932
|
purged: boolean;
|
|
1614
1933
|
/**
|
|
1615
|
-
*
|
|
1934
|
+
* Staff member who created the card
|
|
1616
1935
|
*/
|
|
1617
|
-
|
|
1936
|
+
staffmember: string;
|
|
1618
1937
|
/**
|
|
1619
|
-
*
|
|
1938
|
+
* Occupation
|
|
1620
1939
|
*/
|
|
1621
|
-
|
|
1940
|
+
occupation: string;
|
|
1622
1941
|
/**
|
|
1623
|
-
*
|
|
1942
|
+
* Favourite item or preference
|
|
1624
1943
|
*/
|
|
1625
|
-
|
|
1944
|
+
favourite: string;
|
|
1626
1945
|
/**
|
|
1627
|
-
*
|
|
1946
|
+
* Income bracket
|
|
1628
1947
|
*/
|
|
1629
|
-
|
|
1630
|
-
/**
|
|
1631
|
-
* Custom soft fields
|
|
1632
|
-
*/
|
|
1633
|
-
softfields: SoftFields;
|
|
1948
|
+
income: string | null;
|
|
1634
1949
|
/**
|
|
1635
|
-
*
|
|
1950
|
+
* Referral source
|
|
1636
1951
|
*/
|
|
1637
|
-
|
|
1952
|
+
referralfrom: string;
|
|
1638
1953
|
/**
|
|
1639
|
-
*
|
|
1954
|
+
* External reference
|
|
1640
1955
|
*/
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* Available offers (when includeoffers requested)
|
|
1644
|
-
*/
|
|
1645
|
-
offers?: Array<Offer>;
|
|
1646
|
-
/**
|
|
1647
|
-
* Recently redeemed offers (when includeoffers requested)
|
|
1648
|
-
*/
|
|
1649
|
-
redeemed_offers?: Array<OfferRedemption>;
|
|
1650
|
-
/**
|
|
1651
|
-
* Transaction history (when requested)
|
|
1652
|
-
*/
|
|
1653
|
-
transactions?: Array<LoyaltyTransaction>;
|
|
1654
|
-
/**
|
|
1655
|
-
* Digital wallet link URL
|
|
1656
|
-
*/
|
|
1657
|
-
wallet: string;
|
|
1658
|
-
};
|
|
1659
|
-
/**
|
|
1660
|
-
* Compact loyalty card structure containing only essential fields
|
|
1661
|
-
*/
|
|
1662
|
-
export type LoyaltyCardCompact = {
|
|
1956
|
+
reference: string;
|
|
1663
1957
|
/**
|
|
1664
|
-
*
|
|
1958
|
+
* App push notification token
|
|
1665
1959
|
*/
|
|
1666
|
-
|
|
1960
|
+
apptoken: string | null;
|
|
1667
1961
|
/**
|
|
1668
|
-
*
|
|
1669
|
-
*/
|
|
1670
|
-
email: string;
|
|
1671
|
-
/**
|
|
1672
|
-
* Date of birth (Y-m-d format or null)
|
|
1962
|
+
* Delivery instructions
|
|
1673
1963
|
*/
|
|
1674
|
-
|
|
1964
|
+
deliveryinstructions: string | null;
|
|
1675
1965
|
/**
|
|
1676
|
-
*
|
|
1966
|
+
* Member status code. Null for non-members.
|
|
1677
1967
|
*/
|
|
1678
|
-
|
|
1968
|
+
memberstatus: 'A' | 'C' | 'S' | null;
|
|
1679
1969
|
/**
|
|
1680
|
-
*
|
|
1970
|
+
* Member status description
|
|
1681
1971
|
*/
|
|
1682
|
-
|
|
1972
|
+
memberstatusdescription: 'Active' | 'Cancelled' | 'Suspended' | 'Non Member';
|
|
1683
1973
|
/**
|
|
1684
|
-
*
|
|
1974
|
+
* Home site code
|
|
1685
1975
|
*/
|
|
1686
|
-
|
|
1976
|
+
homesite: string;
|
|
1687
1977
|
/**
|
|
1688
|
-
*
|
|
1978
|
+
* Home site name
|
|
1689
1979
|
*/
|
|
1690
|
-
|
|
1980
|
+
homesitename: string;
|
|
1691
1981
|
/**
|
|
1692
|
-
*
|
|
1982
|
+
* Custom soft fields
|
|
1693
1983
|
*/
|
|
1694
|
-
|
|
1984
|
+
softfields: SoftFields;
|
|
1695
1985
|
/**
|
|
1696
|
-
*
|
|
1986
|
+
* API version
|
|
1697
1987
|
*/
|
|
1698
|
-
|
|
1988
|
+
version: string;
|
|
1699
1989
|
/**
|
|
1700
|
-
*
|
|
1990
|
+
* Loyalty system version
|
|
1701
1991
|
*/
|
|
1702
|
-
|
|
1992
|
+
loyaltyversion: string;
|
|
1703
1993
|
/**
|
|
1704
|
-
*
|
|
1994
|
+
* Loyalty groups assigned to card
|
|
1705
1995
|
*/
|
|
1706
|
-
|
|
1996
|
+
groups?: Array<LoyaltyGroup>;
|
|
1707
1997
|
/**
|
|
1708
|
-
*
|
|
1998
|
+
* Purchase groups available to member
|
|
1709
1999
|
*/
|
|
1710
|
-
|
|
2000
|
+
purchasegroups?: Array<PurchaseGroup>;
|
|
1711
2001
|
/**
|
|
1712
|
-
*
|
|
2002
|
+
* Available offers (when includeoffers requested)
|
|
1713
2003
|
*/
|
|
1714
|
-
|
|
2004
|
+
offers?: Array<Offer>;
|
|
1715
2005
|
/**
|
|
1716
|
-
*
|
|
2006
|
+
* Recently redeemed offers (when includeoffers requested)
|
|
1717
2007
|
*/
|
|
1718
|
-
|
|
2008
|
+
redeemed_offers?: Array<OfferRedemption>;
|
|
1719
2009
|
/**
|
|
1720
|
-
*
|
|
2010
|
+
* Transaction history (when requested)
|
|
1721
2011
|
*/
|
|
1722
|
-
|
|
1723
|
-
};
|
|
1724
|
-
export type LoyaltyCardCompactResponse = {
|
|
2012
|
+
transactions?: Array<LoyaltyTransaction>;
|
|
1725
2013
|
/**
|
|
1726
|
-
*
|
|
2014
|
+
* Digital wallet link URL
|
|
1727
2015
|
*/
|
|
1728
|
-
|
|
2016
|
+
wallet: string;
|
|
1729
2017
|
};
|
|
1730
2018
|
/**
|
|
1731
2019
|
* Loyalty card creation request body.
|
|
@@ -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
|
*/
|
|
@@ -1913,7 +2444,7 @@ export type LoyaltyCardType = {
|
|
|
1913
2444
|
* Card type settings
|
|
1914
2445
|
*/
|
|
1915
2446
|
settings?: {
|
|
1916
|
-
[key: string]:
|
|
2447
|
+
[key: string]: unknown;
|
|
1917
2448
|
};
|
|
1918
2449
|
};
|
|
1919
2450
|
/**
|
|
@@ -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.
|
|
@@ -3602,42 +4196,107 @@ export type OfferConditions = {
|
|
|
3602
4196
|
/**
|
|
3603
4197
|
* Set to have only apply to transactions over a minimum amount
|
|
3604
4198
|
*/
|
|
3605
|
-
minimum_trigger_amount?: number;
|
|
4199
|
+
minimum_trigger_amount?: number;
|
|
4200
|
+
/**
|
|
4201
|
+
* Set to have only apply to transactions below a maximum amount
|
|
4202
|
+
*/
|
|
4203
|
+
maximum_trigger_amount?: number;
|
|
4204
|
+
/**
|
|
4205
|
+
* Limit the usage of a given offer
|
|
4206
|
+
*/
|
|
4207
|
+
limits?: OfferLimits;
|
|
4208
|
+
};
|
|
4209
|
+
export type OfferCreateRequest = {
|
|
4210
|
+
/**
|
|
4211
|
+
* Name of the Offer
|
|
4212
|
+
*/
|
|
4213
|
+
description: string;
|
|
4214
|
+
/**
|
|
4215
|
+
* Enable or Disable the offer
|
|
4216
|
+
*/
|
|
4217
|
+
enabled: boolean;
|
|
4218
|
+
/**
|
|
4219
|
+
* A reference identifier for external systems
|
|
4220
|
+
*/
|
|
4221
|
+
reference?: string;
|
|
4222
|
+
/**
|
|
4223
|
+
* Detailed description of the offer
|
|
4224
|
+
*/
|
|
4225
|
+
comment?: string;
|
|
4226
|
+
/**
|
|
4227
|
+
* Describe the conditions under which the offer
|
|
4228
|
+
* is valid.
|
|
4229
|
+
*/
|
|
4230
|
+
conditions?: OfferConditions;
|
|
4231
|
+
/**
|
|
4232
|
+
* Describe how the offer is applied at Point of Sale
|
|
4233
|
+
*/
|
|
4234
|
+
effect?: OfferEffect;
|
|
4235
|
+
};
|
|
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;
|
|
3606
4268
|
/**
|
|
3607
|
-
*
|
|
4269
|
+
* Whether card must be active
|
|
3608
4270
|
*/
|
|
3609
|
-
|
|
4271
|
+
cardactive: boolean;
|
|
3610
4272
|
/**
|
|
3611
|
-
*
|
|
4273
|
+
* Whether card details must be complete
|
|
3612
4274
|
*/
|
|
3613
|
-
|
|
3614
|
-
};
|
|
3615
|
-
export type OfferCreateRequest = {
|
|
4275
|
+
cardcomplete: boolean;
|
|
3616
4276
|
/**
|
|
3617
|
-
*
|
|
4277
|
+
* Date offer was last changed
|
|
3618
4278
|
*/
|
|
3619
|
-
|
|
4279
|
+
changedate: string;
|
|
3620
4280
|
/**
|
|
3621
|
-
*
|
|
4281
|
+
* Date offer becomes active
|
|
3622
4282
|
*/
|
|
3623
|
-
|
|
4283
|
+
dateactive: string;
|
|
3624
4284
|
/**
|
|
3625
|
-
*
|
|
4285
|
+
* Date offer expires
|
|
3626
4286
|
*/
|
|
3627
|
-
|
|
4287
|
+
dateexpire: string;
|
|
3628
4288
|
/**
|
|
3629
|
-
*
|
|
4289
|
+
* Whether this is a redemption event
|
|
3630
4290
|
*/
|
|
3631
|
-
|
|
4291
|
+
redeem: boolean;
|
|
3632
4292
|
/**
|
|
3633
|
-
*
|
|
3634
|
-
* is valid.
|
|
4293
|
+
* Whether this is a deletion event
|
|
3635
4294
|
*/
|
|
3636
|
-
|
|
4295
|
+
delete: boolean;
|
|
3637
4296
|
/**
|
|
3638
|
-
*
|
|
4297
|
+
* Card data for redemption events
|
|
3639
4298
|
*/
|
|
3640
|
-
|
|
4299
|
+
card?: LoyaltyCardData;
|
|
3641
4300
|
};
|
|
3642
4301
|
export type OfferDeleteResult = {
|
|
3643
4302
|
result: number;
|
|
@@ -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
|
*/
|
|
@@ -5163,6 +5831,22 @@ export type SiteSearchResult = {
|
|
|
5163
5831
|
* Whether POS support is enabled
|
|
5164
5832
|
*/
|
|
5165
5833
|
point_of_sale_support: boolean;
|
|
5834
|
+
/**
|
|
5835
|
+
* Site IANA timezone identifier
|
|
5836
|
+
*/
|
|
5837
|
+
timezone: string | null;
|
|
5838
|
+
/**
|
|
5839
|
+
* Date and time of the first sale at this site (UTC, ISO 8601)
|
|
5840
|
+
*/
|
|
5841
|
+
first_sale: string | null;
|
|
5842
|
+
/**
|
|
5843
|
+
* Date and time of the most recent sale at this site (UTC, ISO 8601)
|
|
5844
|
+
*/
|
|
5845
|
+
last_sale: string | null;
|
|
5846
|
+
/**
|
|
5847
|
+
* When Zen last received data from this site (UTC, ISO 8601 with offset)
|
|
5848
|
+
*/
|
|
5849
|
+
last_connected_at: string | null;
|
|
5166
5850
|
};
|
|
5167
5851
|
/**
|
|
5168
5852
|
* Sites endpoint response.
|
|
@@ -5532,189 +6216,428 @@ export type TransactionCreateItem = {
|
|
|
5532
6216
|
*/
|
|
5533
6217
|
discount?: string;
|
|
5534
6218
|
/**
|
|
5535
|
-
* Discount department number
|
|
6219
|
+
* Discount department number
|
|
6220
|
+
*/
|
|
6221
|
+
discountnumber?: number;
|
|
6222
|
+
/**
|
|
6223
|
+
* Item is on special
|
|
6224
|
+
*/
|
|
6225
|
+
onspecial?: boolean;
|
|
6226
|
+
/**
|
|
6227
|
+
* Points earned for this item
|
|
6228
|
+
*/
|
|
6229
|
+
points?: string;
|
|
6230
|
+
/**
|
|
6231
|
+
* Bonus points earned for this item
|
|
6232
|
+
*/
|
|
6233
|
+
bonuspoints?: string;
|
|
6234
|
+
/**
|
|
6235
|
+
* Sales discount split applied to this item
|
|
6236
|
+
*/
|
|
6237
|
+
salediscount?: string;
|
|
6238
|
+
/**
|
|
6239
|
+
* Item was weighed
|
|
6240
|
+
*/
|
|
6241
|
+
weighed?: boolean;
|
|
6242
|
+
/**
|
|
6243
|
+
* Item was scanned via barcode
|
|
6244
|
+
*/
|
|
6245
|
+
scanned?: boolean;
|
|
6246
|
+
/**
|
|
6247
|
+
* Table cover attribution
|
|
6248
|
+
*/
|
|
6249
|
+
cover?: string;
|
|
6250
|
+
};
|
|
6251
|
+
/**
|
|
6252
|
+
* Transaction creation request - wrapper object
|
|
6253
|
+
*/
|
|
6254
|
+
export type TransactionCreateRequest = {
|
|
6255
|
+
/**
|
|
6256
|
+
* Transaction data
|
|
6257
|
+
*/
|
|
6258
|
+
transaction: TransactionCreateData;
|
|
6259
|
+
};
|
|
6260
|
+
/**
|
|
6261
|
+
* Successful transaction creation response
|
|
6262
|
+
*/
|
|
6263
|
+
export type TransactionCreateSuccessResponse = {
|
|
6264
|
+
/**
|
|
6265
|
+
* Result code (0 = success)
|
|
6266
|
+
*/
|
|
6267
|
+
result: 0;
|
|
6268
|
+
/**
|
|
6269
|
+
* Result message
|
|
6270
|
+
*/
|
|
6271
|
+
errormessage: 'OK';
|
|
6272
|
+
/**
|
|
6273
|
+
* Processing comment
|
|
6274
|
+
*/
|
|
6275
|
+
comment: string;
|
|
6276
|
+
};
|
|
6277
|
+
/**
|
|
6278
|
+
* Transaction tender structure for creation requests
|
|
6279
|
+
*/
|
|
6280
|
+
export type TransactionCreateTender = {
|
|
6281
|
+
/**
|
|
6282
|
+
* Tender type code
|
|
6283
|
+
*/
|
|
6284
|
+
tendertype: string;
|
|
6285
|
+
/**
|
|
6286
|
+
* Tender description
|
|
6287
|
+
*/
|
|
6288
|
+
description: string;
|
|
6289
|
+
/**
|
|
6290
|
+
* Tender amount
|
|
6291
|
+
*/
|
|
6292
|
+
amount: string;
|
|
6293
|
+
/**
|
|
6294
|
+
* Shift number
|
|
6295
|
+
*/
|
|
6296
|
+
shiftnumber?: string;
|
|
6297
|
+
/**
|
|
6298
|
+
* Obfuscated credit card number
|
|
6299
|
+
*/
|
|
6300
|
+
creditcard?: string;
|
|
6301
|
+
/**
|
|
6302
|
+
* Card holder's name
|
|
6303
|
+
*/
|
|
6304
|
+
cardname?: string;
|
|
6305
|
+
/**
|
|
6306
|
+
* Payment authorization platform
|
|
6307
|
+
*/
|
|
6308
|
+
authorisation?: string;
|
|
6309
|
+
/**
|
|
6310
|
+
* Card expiry date (MM/YY)
|
|
6311
|
+
*/
|
|
6312
|
+
expirydate?: string;
|
|
6313
|
+
/**
|
|
6314
|
+
* Voucher serial number (for voucher redemption)
|
|
6315
|
+
*/
|
|
6316
|
+
voucher?: string;
|
|
6317
|
+
/**
|
|
6318
|
+
* Voucher type (for voucher redemption)
|
|
6319
|
+
*/
|
|
6320
|
+
type?: string;
|
|
6321
|
+
/**
|
|
6322
|
+
* EFT surcharge amount (ex. tax)
|
|
6323
|
+
*/
|
|
6324
|
+
surcharge?: ApiNumeric;
|
|
6325
|
+
/**
|
|
6326
|
+
* EFT surcharge tax
|
|
6327
|
+
*/
|
|
6328
|
+
surchargetax?: ApiNumeric;
|
|
6329
|
+
/**
|
|
6330
|
+
* Tips amount
|
|
6331
|
+
*/
|
|
6332
|
+
tips?: ApiNumeric;
|
|
6333
|
+
/**
|
|
6334
|
+
* Tips tax
|
|
6335
|
+
*/
|
|
6336
|
+
tipstax?: ApiNumeric;
|
|
6337
|
+
};
|
|
6338
|
+
/**
|
|
6339
|
+
* Transaction customer information for creation requests
|
|
6340
|
+
*/
|
|
6341
|
+
export type TransactionCustomer = {
|
|
6342
|
+
/**
|
|
6343
|
+
* Customer card number
|
|
6344
|
+
*/
|
|
6345
|
+
cardnumber?: string;
|
|
6346
|
+
/**
|
|
6347
|
+
* Customer first name
|
|
6348
|
+
*/
|
|
6349
|
+
firstname: string;
|
|
6350
|
+
/**
|
|
6351
|
+
* Customer last name
|
|
6352
|
+
*/
|
|
6353
|
+
lastname: string;
|
|
6354
|
+
/**
|
|
6355
|
+
* Card type
|
|
6356
|
+
*/
|
|
6357
|
+
cardtype?: string;
|
|
6358
|
+
/**
|
|
6359
|
+
* Number of loyalty points being redeemed
|
|
6360
|
+
*/
|
|
6361
|
+
redeempoints?: string;
|
|
6362
|
+
/**
|
|
6363
|
+
* Dollar value of points being redeemed (inc. tax)
|
|
6364
|
+
*/
|
|
6365
|
+
redeemamount?: string;
|
|
6366
|
+
/**
|
|
6367
|
+
* Debtor account number
|
|
6368
|
+
*/
|
|
6369
|
+
account?: string;
|
|
6370
|
+
/**
|
|
6371
|
+
* Amount to charge to debtor account
|
|
6372
|
+
*/
|
|
6373
|
+
charge?: string;
|
|
6374
|
+
/**
|
|
6375
|
+
* Amount being paid on debtor account
|
|
6376
|
+
*/
|
|
6377
|
+
payment?: string;
|
|
6378
|
+
/**
|
|
6379
|
+
* Tender number for the debtor charge
|
|
6380
|
+
*/
|
|
6381
|
+
tendernumber?: string;
|
|
6382
|
+
/**
|
|
6383
|
+
* Department for charge attribution
|
|
6384
|
+
*/
|
|
6385
|
+
department?: number;
|
|
6386
|
+
/**
|
|
6387
|
+
* Purchase order reference
|
|
6388
|
+
*/
|
|
6389
|
+
purchaseorder?: string;
|
|
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
|
|
5536
6465
|
*/
|
|
5537
|
-
|
|
6466
|
+
CustomerName?: string;
|
|
5538
6467
|
/**
|
|
5539
|
-
*
|
|
6468
|
+
* Customer address
|
|
5540
6469
|
*/
|
|
5541
|
-
|
|
6470
|
+
CustomerAddress?: string;
|
|
5542
6471
|
/**
|
|
5543
|
-
*
|
|
6472
|
+
* Customer phone
|
|
5544
6473
|
*/
|
|
5545
|
-
|
|
6474
|
+
CustomerPhone?: string;
|
|
5546
6475
|
/**
|
|
5547
|
-
*
|
|
6476
|
+
* Loyalty information
|
|
5548
6477
|
*/
|
|
5549
|
-
|
|
6478
|
+
Loyalty?: WebhookTransactionLoyalty;
|
|
5550
6479
|
/**
|
|
5551
|
-
* Sales
|
|
6480
|
+
* Sales items
|
|
5552
6481
|
*/
|
|
5553
|
-
|
|
6482
|
+
Sales?: Array<TransactionItem>;
|
|
5554
6483
|
/**
|
|
5555
|
-
*
|
|
6484
|
+
* Tender information
|
|
5556
6485
|
*/
|
|
5557
|
-
|
|
6486
|
+
Tender?: Array<TransactionTender>;
|
|
5558
6487
|
/**
|
|
5559
|
-
*
|
|
6488
|
+
* Sales discount
|
|
5560
6489
|
*/
|
|
5561
|
-
|
|
6490
|
+
SalesDiscount?: TransactionDiscount;
|
|
5562
6491
|
/**
|
|
5563
|
-
*
|
|
6492
|
+
* Rounding amount
|
|
5564
6493
|
*/
|
|
5565
|
-
|
|
6494
|
+
Rounding?: TransactionRounding;
|
|
5566
6495
|
};
|
|
5567
6496
|
/**
|
|
5568
|
-
* Transaction
|
|
6497
|
+
* Transaction discount
|
|
5569
6498
|
*/
|
|
5570
|
-
export type
|
|
6499
|
+
export type TransactionDiscount = {
|
|
5571
6500
|
/**
|
|
5572
|
-
*
|
|
6501
|
+
* Discount amount
|
|
5573
6502
|
*/
|
|
5574
|
-
|
|
6503
|
+
Amount: number;
|
|
6504
|
+
/**
|
|
6505
|
+
* Tax amount on discount
|
|
6506
|
+
*/
|
|
6507
|
+
Tax: number;
|
|
5575
6508
|
};
|
|
5576
6509
|
/**
|
|
5577
|
-
*
|
|
6510
|
+
* Event format transaction response (for format=event query parameter).
|
|
6511
|
+
*
|
|
6512
|
+
* When `?format=event` is specified, the response is a JMS-serialized JournalCreatedEvent
|
|
6513
|
+
* object returned directly via `json_encode()`, without `result`/`errormessage` wrapper fields.
|
|
6514
|
+
* The exact structure depends on the JournalCreatedEvent serialization and includes
|
|
6515
|
+
* fields such as company, site, location, terminal, journal details, sale items,
|
|
6516
|
+
* tenders, discounts, loyalty information, and offers.
|
|
5578
6517
|
*/
|
|
5579
|
-
export type
|
|
6518
|
+
export type TransactionEventResponse = {
|
|
6519
|
+
[key: string]: unknown;
|
|
6520
|
+
};
|
|
6521
|
+
/**
|
|
6522
|
+
* Transaction item
|
|
6523
|
+
*/
|
|
6524
|
+
export type TransactionItem = {
|
|
5580
6525
|
/**
|
|
5581
|
-
*
|
|
6526
|
+
* Item transaction date and time
|
|
5582
6527
|
*/
|
|
5583
|
-
|
|
6528
|
+
DateTime: string;
|
|
5584
6529
|
/**
|
|
5585
|
-
*
|
|
6530
|
+
* Item code
|
|
5586
6531
|
*/
|
|
5587
|
-
|
|
6532
|
+
Item: string;
|
|
5588
6533
|
/**
|
|
5589
|
-
*
|
|
6534
|
+
* Item barcode
|
|
5590
6535
|
*/
|
|
5591
|
-
|
|
5592
|
-
};
|
|
5593
|
-
/**
|
|
5594
|
-
* Transaction tender structure for creation requests
|
|
5595
|
-
*/
|
|
5596
|
-
export type TransactionCreateTender = {
|
|
6536
|
+
Barcode: string;
|
|
5597
6537
|
/**
|
|
5598
|
-
*
|
|
6538
|
+
* Item description
|
|
5599
6539
|
*/
|
|
5600
|
-
|
|
6540
|
+
Description: string;
|
|
5601
6541
|
/**
|
|
5602
|
-
*
|
|
6542
|
+
* Price level
|
|
5603
6543
|
*/
|
|
5604
|
-
|
|
6544
|
+
PriceLevel: number;
|
|
5605
6545
|
/**
|
|
5606
|
-
*
|
|
6546
|
+
* Item price
|
|
5607
6547
|
*/
|
|
5608
|
-
|
|
6548
|
+
Price: number;
|
|
5609
6549
|
/**
|
|
5610
|
-
*
|
|
6550
|
+
* Original price before discounts
|
|
5611
6551
|
*/
|
|
5612
|
-
|
|
6552
|
+
OriginalPrice?: number;
|
|
5613
6553
|
/**
|
|
5614
|
-
*
|
|
6554
|
+
* Item cost
|
|
5615
6555
|
*/
|
|
5616
|
-
|
|
6556
|
+
Cost: number;
|
|
5617
6557
|
/**
|
|
5618
|
-
*
|
|
6558
|
+
* Quantity sold
|
|
5619
6559
|
*/
|
|
5620
|
-
|
|
6560
|
+
Quantity: number;
|
|
5621
6561
|
/**
|
|
5622
|
-
*
|
|
6562
|
+
* Line total amount
|
|
5623
6563
|
*/
|
|
5624
|
-
|
|
6564
|
+
LineTotal: number;
|
|
5625
6565
|
/**
|
|
5626
|
-
*
|
|
6566
|
+
* Line tax amount
|
|
5627
6567
|
*/
|
|
5628
|
-
|
|
6568
|
+
LineTAX: number;
|
|
5629
6569
|
/**
|
|
5630
|
-
*
|
|
6570
|
+
* Discount amount
|
|
5631
6571
|
*/
|
|
5632
|
-
|
|
6572
|
+
Discount: number;
|
|
5633
6573
|
/**
|
|
5634
|
-
*
|
|
6574
|
+
* Department code
|
|
5635
6575
|
*/
|
|
5636
|
-
|
|
6576
|
+
Department: number;
|
|
5637
6577
|
/**
|
|
5638
|
-
*
|
|
6578
|
+
* Department name
|
|
5639
6579
|
*/
|
|
5640
|
-
|
|
6580
|
+
DepartmentName?: string;
|
|
5641
6581
|
/**
|
|
5642
|
-
*
|
|
6582
|
+
* Whether item is on special
|
|
5643
6583
|
*/
|
|
5644
|
-
|
|
6584
|
+
Special: boolean;
|
|
5645
6585
|
/**
|
|
5646
|
-
*
|
|
6586
|
+
* Loyalty points earned
|
|
5647
6587
|
*/
|
|
5648
|
-
|
|
6588
|
+
Points?: number;
|
|
5649
6589
|
/**
|
|
5650
|
-
*
|
|
6590
|
+
* Bonus points earned
|
|
5651
6591
|
*/
|
|
5652
|
-
|
|
5653
|
-
};
|
|
5654
|
-
/**
|
|
5655
|
-
* Transaction customer information for creation requests
|
|
5656
|
-
*/
|
|
5657
|
-
export type TransactionCustomer = {
|
|
6592
|
+
Bonus?: number;
|
|
5658
6593
|
/**
|
|
5659
|
-
*
|
|
6594
|
+
* Whether item was scanned
|
|
5660
6595
|
*/
|
|
5661
|
-
|
|
6596
|
+
Scanned: boolean;
|
|
5662
6597
|
/**
|
|
5663
|
-
*
|
|
6598
|
+
* Scan terminal number
|
|
5664
6599
|
*/
|
|
5665
|
-
|
|
6600
|
+
ScanTerminal?: number;
|
|
5666
6601
|
/**
|
|
5667
|
-
*
|
|
6602
|
+
* Brand code
|
|
5668
6603
|
*/
|
|
5669
|
-
|
|
6604
|
+
Brand?: string;
|
|
5670
6605
|
/**
|
|
5671
|
-
*
|
|
6606
|
+
* Brand name
|
|
5672
6607
|
*/
|
|
5673
|
-
|
|
6608
|
+
BrandName?: string;
|
|
5674
6609
|
/**
|
|
5675
|
-
*
|
|
6610
|
+
* Sub-department code
|
|
5676
6611
|
*/
|
|
5677
|
-
|
|
6612
|
+
SubDepartment?: number;
|
|
5678
6613
|
/**
|
|
5679
|
-
*
|
|
6614
|
+
* Sub-department name
|
|
5680
6615
|
*/
|
|
5681
|
-
|
|
6616
|
+
SubDepartmentName?: string;
|
|
5682
6617
|
/**
|
|
5683
|
-
*
|
|
6618
|
+
* Category code
|
|
5684
6619
|
*/
|
|
5685
|
-
|
|
6620
|
+
Category?: number;
|
|
5686
6621
|
/**
|
|
5687
|
-
*
|
|
6622
|
+
* Category name
|
|
5688
6623
|
*/
|
|
5689
|
-
|
|
6624
|
+
CategoryName?: string;
|
|
5690
6625
|
/**
|
|
5691
|
-
*
|
|
6626
|
+
* Sub-category code
|
|
5692
6627
|
*/
|
|
5693
|
-
|
|
6628
|
+
SubCategory?: number;
|
|
5694
6629
|
/**
|
|
5695
|
-
*
|
|
6630
|
+
* Sub-category name
|
|
5696
6631
|
*/
|
|
5697
|
-
|
|
6632
|
+
SubCategoryName?: string;
|
|
5698
6633
|
/**
|
|
5699
|
-
*
|
|
6634
|
+
* Range code
|
|
5700
6635
|
*/
|
|
5701
|
-
|
|
6636
|
+
Range?: number;
|
|
5702
6637
|
/**
|
|
5703
|
-
*
|
|
6638
|
+
* Range name
|
|
5704
6639
|
*/
|
|
5705
|
-
|
|
5706
|
-
};
|
|
5707
|
-
/**
|
|
5708
|
-
* Event format transaction response (for format=event query parameter).
|
|
5709
|
-
*
|
|
5710
|
-
* When `?format=event` is specified, the response is a JMS-serialized JournalCreatedEvent
|
|
5711
|
-
* object returned directly via `json_encode()`, without `result`/`errormessage` wrapper fields.
|
|
5712
|
-
* The exact structure depends on the JournalCreatedEvent serialization and includes
|
|
5713
|
-
* fields such as company, site, location, terminal, journal details, sale items,
|
|
5714
|
-
* tenders, discounts, loyalty information, and offers.
|
|
5715
|
-
*/
|
|
5716
|
-
export type TransactionEventResponse = {
|
|
5717
|
-
[key: string]: unknown;
|
|
6640
|
+
RangeName?: string;
|
|
5718
6641
|
};
|
|
5719
6642
|
/**
|
|
5720
6643
|
* Transaction offer structure for creation requests
|
|
@@ -5890,6 +6813,15 @@ export type TransactionResponseOffer = {
|
|
|
5890
6813
|
*/
|
|
5891
6814
|
customer_loyalty_id?: string;
|
|
5892
6815
|
};
|
|
6816
|
+
/**
|
|
6817
|
+
* Transaction rounding
|
|
6818
|
+
*/
|
|
6819
|
+
export type TransactionRounding = {
|
|
6820
|
+
/**
|
|
6821
|
+
* Rounding amount
|
|
6822
|
+
*/
|
|
6823
|
+
Amount: number;
|
|
6824
|
+
};
|
|
5893
6825
|
/**
|
|
5894
6826
|
* Transaction sales discount structure.
|
|
5895
6827
|
* The Sales Discount node activates the sales discount reports in the Portal.
|
|
@@ -5926,6 +6858,23 @@ export type TransactionTableInfo = {
|
|
|
5926
6858
|
*/
|
|
5927
6859
|
covers?: string;
|
|
5928
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
|
+
};
|
|
5929
6878
|
/**
|
|
5930
6879
|
* Transaction tracking information
|
|
5931
6880
|
*/
|
|
@@ -5976,6 +6925,15 @@ export type TransactionVoucher = {
|
|
|
5976
6925
|
*/
|
|
5977
6926
|
voiditem?: boolean;
|
|
5978
6927
|
};
|
|
6928
|
+
/**
|
|
6929
|
+
* Transaction webhook data payload
|
|
6930
|
+
*/
|
|
6931
|
+
export type TransactionWebhookData = {
|
|
6932
|
+
/**
|
|
6933
|
+
* Transaction data container
|
|
6934
|
+
*/
|
|
6935
|
+
AMC_POSPortal: TransactionData;
|
|
6936
|
+
};
|
|
5979
6937
|
/**
|
|
5980
6938
|
* Validation error for various validation failures (400)
|
|
5981
6939
|
*/
|
|
@@ -6159,7 +7117,7 @@ export type VersionResponse = {
|
|
|
6159
7117
|
* Available API function sections and their allowed methods
|
|
6160
7118
|
*/
|
|
6161
7119
|
functions: {
|
|
6162
|
-
[key: string]:
|
|
7120
|
+
[key: string]: unknown;
|
|
6163
7121
|
};
|
|
6164
7122
|
};
|
|
6165
7123
|
export type Versions = '1.0.0' | '2.0.0';
|
|
@@ -7149,6 +8107,75 @@ export type VoucherTypeResponse = {
|
|
|
7149
8107
|
version: string;
|
|
7150
8108
|
};
|
|
7151
8109
|
};
|
|
8110
|
+
/**
|
|
8111
|
+
* Outbound Webhook Models
|
|
8112
|
+
*
|
|
8113
|
+
* Zen sends webhooks to external systems when various events occur.
|
|
8114
|
+
* All webhooks are sent as HTTP POST requests with JSON payloads.Base webhook payload structure
|
|
8115
|
+
*/
|
|
8116
|
+
export type WebhookPayload = {
|
|
8117
|
+
/**
|
|
8118
|
+
* Webhook function/event type
|
|
8119
|
+
*/
|
|
8120
|
+
function: string;
|
|
8121
|
+
/**
|
|
8122
|
+
* Authentication key for webhook verification
|
|
8123
|
+
*/
|
|
8124
|
+
key: string;
|
|
8125
|
+
/**
|
|
8126
|
+
* Company/chain code
|
|
8127
|
+
*/
|
|
8128
|
+
chain: string;
|
|
8129
|
+
/**
|
|
8130
|
+
* Whether HTML trace is enabled
|
|
8131
|
+
*/
|
|
8132
|
+
traceHtml: boolean;
|
|
8133
|
+
/**
|
|
8134
|
+
* Whether trace logging is enabled
|
|
8135
|
+
*/
|
|
8136
|
+
trace: boolean;
|
|
8137
|
+
/**
|
|
8138
|
+
* Target webhook URL
|
|
8139
|
+
*/
|
|
8140
|
+
url: string;
|
|
8141
|
+
/**
|
|
8142
|
+
* Whether data is sent via POST body
|
|
8143
|
+
*/
|
|
8144
|
+
viaBody: boolean;
|
|
8145
|
+
};
|
|
8146
|
+
/**
|
|
8147
|
+
* Transaction loyalty information
|
|
8148
|
+
*/
|
|
8149
|
+
export type WebhookTransactionLoyalty = {
|
|
8150
|
+
/**
|
|
8151
|
+
* Loyalty card number
|
|
8152
|
+
*/
|
|
8153
|
+
Card: string;
|
|
8154
|
+
/**
|
|
8155
|
+
* Opening points balance
|
|
8156
|
+
*/
|
|
8157
|
+
OpeningPoints?: string;
|
|
8158
|
+
/**
|
|
8159
|
+
* Card holder name
|
|
8160
|
+
*/
|
|
8161
|
+
Name: string;
|
|
8162
|
+
/**
|
|
8163
|
+
* First name
|
|
8164
|
+
*/
|
|
8165
|
+
FirstName?: string;
|
|
8166
|
+
/**
|
|
8167
|
+
* Last name
|
|
8168
|
+
*/
|
|
8169
|
+
LastName?: string;
|
|
8170
|
+
/**
|
|
8171
|
+
* Points from rounding
|
|
8172
|
+
*/
|
|
8173
|
+
RoundPoints?: string;
|
|
8174
|
+
/**
|
|
8175
|
+
* Card type
|
|
8176
|
+
*/
|
|
8177
|
+
CardType: string;
|
|
8178
|
+
};
|
|
7152
8179
|
/**
|
|
7153
8180
|
* Not found error (404)
|
|
7154
8181
|
*/
|
|
@@ -7871,9 +8898,7 @@ export type LoyaltyGetCardData = {
|
|
|
7871
8898
|
path: {
|
|
7872
8899
|
cardNumber: string;
|
|
7873
8900
|
};
|
|
7874
|
-
query?:
|
|
7875
|
-
format?: 'compact';
|
|
7876
|
-
};
|
|
8901
|
+
query?: never;
|
|
7877
8902
|
url: '/v1/loyalty/card/{cardNumber}';
|
|
7878
8903
|
};
|
|
7879
8904
|
export type LoyaltyGetCardErrors = {
|
|
@@ -7891,7 +8916,7 @@ export type LoyaltyGetCardResponses = {
|
|
|
7891
8916
|
/**
|
|
7892
8917
|
* The request has succeeded.
|
|
7893
8918
|
*/
|
|
7894
|
-
200: LoyaltyCardResponse
|
|
8919
|
+
200: LoyaltyCardResponse;
|
|
7895
8920
|
};
|
|
7896
8921
|
export type LoyaltyGetCardResponse = LoyaltyGetCardResponses[keyof LoyaltyGetCardResponses];
|
|
7897
8922
|
export type LoyaltyUpdateCardData = {
|
|
@@ -8383,7 +9408,7 @@ export type LoyaltyRenewCardResponses = {
|
|
|
8383
9408
|
result: number;
|
|
8384
9409
|
errormessage: string;
|
|
8385
9410
|
data?: {
|
|
8386
|
-
[key: string]:
|
|
9411
|
+
[key: string]: unknown;
|
|
8387
9412
|
};
|
|
8388
9413
|
};
|
|
8389
9414
|
};
|
|
@@ -8514,9 +9539,11 @@ export type LoyaltyGetCardTypesResponses = {
|
|
|
8514
9539
|
*/
|
|
8515
9540
|
200: {
|
|
8516
9541
|
/**
|
|
8517
|
-
*
|
|
9542
|
+
* Card types keyed by numeric string index. Also contains version and loyaltyVersion as pseudo-elements.
|
|
8518
9543
|
*/
|
|
8519
|
-
cardTypes:
|
|
9544
|
+
cardTypes: {
|
|
9545
|
+
[key: string]: unknown;
|
|
9546
|
+
};
|
|
8520
9547
|
};
|
|
8521
9548
|
};
|
|
8522
9549
|
export type LoyaltyGetCardTypesResponse = LoyaltyGetCardTypesResponses[keyof LoyaltyGetCardTypesResponses];
|
|
@@ -8526,7 +9553,13 @@ export type LoyaltyGetCoffeeCardStatsData = {
|
|
|
8526
9553
|
cardNumber: string;
|
|
8527
9554
|
};
|
|
8528
9555
|
query?: {
|
|
9556
|
+
/**
|
|
9557
|
+
* Site code. Either this or customer_reference_id is required.
|
|
9558
|
+
*/
|
|
8529
9559
|
site?: number;
|
|
9560
|
+
/**
|
|
9561
|
+
* Customer reference ID for site lookup. Either this or site is required.
|
|
9562
|
+
*/
|
|
8530
9563
|
customer_reference_id?: string;
|
|
8531
9564
|
};
|
|
8532
9565
|
url: '/v1/loyalty/coffeecard/{cardNumber}';
|
|
@@ -8660,9 +9693,11 @@ export type LoyaltyGetMemberGroupsResponses = {
|
|
|
8660
9693
|
*/
|
|
8661
9694
|
200: {
|
|
8662
9695
|
/**
|
|
8663
|
-
*
|
|
9696
|
+
* Member groups keyed by numeric string index. Also contains version and loyaltyVersion as pseudo-elements.
|
|
8664
9697
|
*/
|
|
8665
|
-
membergroups:
|
|
9698
|
+
membergroups: {
|
|
9699
|
+
[key: string]: unknown;
|
|
9700
|
+
};
|
|
8666
9701
|
};
|
|
8667
9702
|
};
|
|
8668
9703
|
export type LoyaltyGetMemberGroupsResponse = LoyaltyGetMemberGroupsResponses[keyof LoyaltyGetMemberGroupsResponses];
|
|
@@ -9543,7 +10578,8 @@ export type OfferListData = {
|
|
|
9543
10578
|
query?: {
|
|
9544
10579
|
/**
|
|
9545
10580
|
* The unique site code at which the offer check is occurring.
|
|
9546
|
-
* Required when
|
|
10581
|
+
* Required when cardNumber is not `all` — omitting this for a specific
|
|
10582
|
+
* card will return a validation error.
|
|
9547
10583
|
*/
|
|
9548
10584
|
site?: number;
|
|
9549
10585
|
/**
|
|
@@ -9878,11 +10914,11 @@ export type SitesSearchSitesData = {
|
|
|
9878
10914
|
path?: never;
|
|
9879
10915
|
query: {
|
|
9880
10916
|
/**
|
|
9881
|
-
* Search query (required, minimum 1 character).
|
|
10917
|
+
* 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).
|
|
9882
10918
|
*/
|
|
9883
10919
|
q: string;
|
|
9884
10920
|
/**
|
|
9885
|
-
* Restrict search to a specific field.
|
|
10921
|
+
* Restrict search to a specific field. Required when using comma-separated values in q.
|
|
9886
10922
|
*/
|
|
9887
10923
|
field?: 'name' | 'ccode' | 'sitecode';
|
|
9888
10924
|
/**
|
|
@@ -10020,9 +11056,9 @@ export type TransactionLookupSearchJournalsData = {
|
|
|
10020
11056
|
*/
|
|
10021
11057
|
journal: string;
|
|
10022
11058
|
/**
|
|
10023
|
-
*
|
|
11059
|
+
* Site code
|
|
10024
11060
|
*/
|
|
10025
|
-
site
|
|
11061
|
+
site: number;
|
|
10026
11062
|
/**
|
|
10027
11063
|
* Optional start date filter (Y-m-d)
|
|
10028
11064
|
*/
|
|
@@ -10502,6 +11538,35 @@ export type LoyaltyV2GetGroupsResponses = {
|
|
|
10502
11538
|
};
|
|
10503
11539
|
};
|
|
10504
11540
|
export type LoyaltyV2GetGroupsResponse = LoyaltyV2GetGroupsResponses[keyof LoyaltyV2GetGroupsResponses];
|
|
11541
|
+
export type LoyaltyV2GetMemberGroupsData = {
|
|
11542
|
+
body?: never;
|
|
11543
|
+
path?: never;
|
|
11544
|
+
query?: never;
|
|
11545
|
+
url: '/v2/loyalty/membergroups';
|
|
11546
|
+
};
|
|
11547
|
+
export type LoyaltyV2GetMemberGroupsErrors = {
|
|
11548
|
+
/**
|
|
11549
|
+
* Access is unauthorized.
|
|
11550
|
+
*/
|
|
11551
|
+
401: InvalidAccessKeyError;
|
|
11552
|
+
/**
|
|
11553
|
+
* The server cannot find the requested resource.
|
|
11554
|
+
*/
|
|
11555
|
+
404: ZenNotFoundError;
|
|
11556
|
+
};
|
|
11557
|
+
export type LoyaltyV2GetMemberGroupsError = LoyaltyV2GetMemberGroupsErrors[keyof LoyaltyV2GetMemberGroupsErrors];
|
|
11558
|
+
export type LoyaltyV2GetMemberGroupsResponses = {
|
|
11559
|
+
/**
|
|
11560
|
+
* The request has succeeded.
|
|
11561
|
+
*/
|
|
11562
|
+
200: {
|
|
11563
|
+
/**
|
|
11564
|
+
* Purchase member groups
|
|
11565
|
+
*/
|
|
11566
|
+
member_groups: Array<MemberGroupV2>;
|
|
11567
|
+
};
|
|
11568
|
+
};
|
|
11569
|
+
export type LoyaltyV2GetMemberGroupsResponse = LoyaltyV2GetMemberGroupsResponses[keyof LoyaltyV2GetMemberGroupsResponses];
|
|
10505
11570
|
export type PingV2ShowData = {
|
|
10506
11571
|
body?: never;
|
|
10507
11572
|
path?: never;
|
|
@@ -10515,4 +11580,76 @@ export type PingV2ShowResponses = {
|
|
|
10515
11580
|
200: PingV2PingResult;
|
|
10516
11581
|
};
|
|
10517
11582
|
export type PingV2ShowResponse = PingV2ShowResponses[keyof PingV2ShowResponses];
|
|
11583
|
+
export type WebhookLoyaltyWebhookPayload = WebhookPayload & {
|
|
11584
|
+
data: LoyaltyWebhookData;
|
|
11585
|
+
};
|
|
11586
|
+
export type WebhookLoyaltyWebhookRequest = {
|
|
11587
|
+
body: WebhookLoyaltyWebhookPayload;
|
|
11588
|
+
key: 'loyalty';
|
|
11589
|
+
path?: never;
|
|
11590
|
+
query?: never;
|
|
11591
|
+
};
|
|
11592
|
+
export type WebhookCustomerWebhookPayload = WebhookPayload & {
|
|
11593
|
+
data: CustomerWebhookData;
|
|
11594
|
+
};
|
|
11595
|
+
export type WebhookCustomerWebhookRequest = {
|
|
11596
|
+
body: WebhookCustomerWebhookPayload;
|
|
11597
|
+
key: 'customer';
|
|
11598
|
+
path?: never;
|
|
11599
|
+
query?: never;
|
|
11600
|
+
};
|
|
11601
|
+
export type WebhookOfferWebhookPayload = WebhookPayload & {
|
|
11602
|
+
data: OfferWebhookData;
|
|
11603
|
+
};
|
|
11604
|
+
export type WebhookOfferWebhookRequest = {
|
|
11605
|
+
body: WebhookOfferWebhookPayload;
|
|
11606
|
+
key: 'offer';
|
|
11607
|
+
path?: never;
|
|
11608
|
+
query?: never;
|
|
11609
|
+
};
|
|
11610
|
+
export type WebhookRedeemWebhookPayload = WebhookPayload & {
|
|
11611
|
+
data: OfferWebhookData;
|
|
11612
|
+
};
|
|
11613
|
+
export type WebhookRedeemWebhookRequest = {
|
|
11614
|
+
body: WebhookRedeemWebhookPayload;
|
|
11615
|
+
key: 'redeem';
|
|
11616
|
+
path?: never;
|
|
11617
|
+
query?: never;
|
|
11618
|
+
};
|
|
11619
|
+
export type WebhookDeleteWebhookPayload = WebhookPayload & {
|
|
11620
|
+
data: OfferWebhookData;
|
|
11621
|
+
};
|
|
11622
|
+
export type WebhookDeleteWebhookRequest = {
|
|
11623
|
+
body: WebhookDeleteWebhookPayload;
|
|
11624
|
+
key: 'delete';
|
|
11625
|
+
path?: never;
|
|
11626
|
+
query?: never;
|
|
11627
|
+
};
|
|
11628
|
+
export type WebhookItemWebhookPayload = WebhookPayload & {
|
|
11629
|
+
data: InventoryWebhookData;
|
|
11630
|
+
};
|
|
11631
|
+
export type WebhookItemWebhookRequest = {
|
|
11632
|
+
body: WebhookItemWebhookPayload;
|
|
11633
|
+
key: 'item';
|
|
11634
|
+
path?: never;
|
|
11635
|
+
query?: never;
|
|
11636
|
+
};
|
|
11637
|
+
export type WebhookPriceWebhookPayload = WebhookPayload & {
|
|
11638
|
+
data: InventoryWebhookData;
|
|
11639
|
+
};
|
|
11640
|
+
export type WebhookPriceWebhookRequest = {
|
|
11641
|
+
body: WebhookPriceWebhookPayload;
|
|
11642
|
+
key: 'price';
|
|
11643
|
+
path?: never;
|
|
11644
|
+
query?: never;
|
|
11645
|
+
};
|
|
11646
|
+
export type WebhookTransactionWebhookPayload = WebhookPayload & {
|
|
11647
|
+
data: TransactionWebhookData;
|
|
11648
|
+
};
|
|
11649
|
+
export type WebhookTransactionWebhookRequest = {
|
|
11650
|
+
body: WebhookTransactionWebhookPayload;
|
|
11651
|
+
key: 'transaction';
|
|
11652
|
+
path?: never;
|
|
11653
|
+
query?: never;
|
|
11654
|
+
};
|
|
10518
11655
|
//# sourceMappingURL=types.gen.d.ts.map
|