@zenglobal/api-client 5.0.3 → 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 +1378 -257
- 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.
|
|
@@ -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]: unknown;
|
|
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
|
-
*
|
|
1616
|
-
*/
|
|
1617
|
-
memberstatus: 'A' | 'C' | 'S';
|
|
1618
|
-
/**
|
|
1619
|
-
* Member status description
|
|
1620
|
-
*/
|
|
1621
|
-
memberstatusdescription: 'Active' | 'Cancelled' | 'Suspended';
|
|
1622
|
-
/**
|
|
1623
|
-
* Home site code
|
|
1624
|
-
*/
|
|
1625
|
-
homesite: string;
|
|
1626
|
-
/**
|
|
1627
|
-
* Home site name
|
|
1934
|
+
* Staff member who created the card
|
|
1628
1935
|
*/
|
|
1629
|
-
|
|
1630
|
-
/**
|
|
1631
|
-
* Custom soft fields
|
|
1632
|
-
*/
|
|
1633
|
-
softfields: SoftFields;
|
|
1936
|
+
staffmember: string;
|
|
1634
1937
|
/**
|
|
1635
|
-
*
|
|
1636
|
-
*/
|
|
1637
|
-
groups?: Array<LoyaltyGroup>;
|
|
1638
|
-
/**
|
|
1639
|
-
* Purchase groups available to member
|
|
1640
|
-
*/
|
|
1641
|
-
purchasegroups?: Array<PurchaseGroup>;
|
|
1642
|
-
/**
|
|
1643
|
-
* Available offers (when includeoffers requested)
|
|
1938
|
+
* Occupation
|
|
1644
1939
|
*/
|
|
1645
|
-
|
|
1940
|
+
occupation: string;
|
|
1646
1941
|
/**
|
|
1647
|
-
*
|
|
1942
|
+
* Favourite item or preference
|
|
1648
1943
|
*/
|
|
1649
|
-
|
|
1944
|
+
favourite: string;
|
|
1650
1945
|
/**
|
|
1651
|
-
*
|
|
1946
|
+
* Income bracket
|
|
1652
1947
|
*/
|
|
1653
|
-
|
|
1948
|
+
income: string | null;
|
|
1654
1949
|
/**
|
|
1655
|
-
*
|
|
1950
|
+
* Referral source
|
|
1656
1951
|
*/
|
|
1657
|
-
|
|
1658
|
-
};
|
|
1659
|
-
/**
|
|
1660
|
-
* Compact loyalty card structure containing only essential fields
|
|
1661
|
-
*/
|
|
1662
|
-
export type LoyaltyCardCompact = {
|
|
1952
|
+
referralfrom: string;
|
|
1663
1953
|
/**
|
|
1664
|
-
*
|
|
1954
|
+
* External reference
|
|
1665
1955
|
*/
|
|
1666
|
-
|
|
1956
|
+
reference: string;
|
|
1667
1957
|
/**
|
|
1668
|
-
*
|
|
1958
|
+
* App push notification token
|
|
1669
1959
|
*/
|
|
1670
|
-
|
|
1960
|
+
apptoken: string | null;
|
|
1671
1961
|
/**
|
|
1672
|
-
*
|
|
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
|
*/
|
|
@@ -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.
|
|
@@ -3592,52 +4186,117 @@ export type OfferApplyTo = 'item_any' | 'item_same' | 'sale';
|
|
|
3592
4186
|
*/
|
|
3593
4187
|
export type OfferConditions = {
|
|
3594
4188
|
/**
|
|
3595
|
-
* Date the offer is active from (inclusive)
|
|
4189
|
+
* Date the offer is active from (inclusive)
|
|
4190
|
+
*/
|
|
4191
|
+
active_on?: string;
|
|
4192
|
+
/**
|
|
4193
|
+
* Date the offer is active to (inclusive)
|
|
4194
|
+
*/
|
|
4195
|
+
expires_on?: string;
|
|
4196
|
+
/**
|
|
4197
|
+
* Set to have only apply to transactions over a minimum amount
|
|
4198
|
+
*/
|
|
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
|
|
3596
4258
|
*/
|
|
3597
|
-
|
|
4259
|
+
loyaltyonly: boolean;
|
|
3598
4260
|
/**
|
|
3599
|
-
*
|
|
4261
|
+
* Whether offer is linked to another offer
|
|
3600
4262
|
*/
|
|
3601
|
-
|
|
4263
|
+
linkedto: boolean;
|
|
3602
4264
|
/**
|
|
3603
|
-
*
|
|
4265
|
+
* Whether this is a birthday offer
|
|
3604
4266
|
*/
|
|
3605
|
-
|
|
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
|
*/
|
|
@@ -5546,191 +6214,430 @@ export type TransactionCreateItem = {
|
|
|
5546
6214
|
/**
|
|
5547
6215
|
* Discount amount
|
|
5548
6216
|
*/
|
|
5549
|
-
discount?: string;
|
|
6217
|
+
discount?: string;
|
|
6218
|
+
/**
|
|
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;
|
|
5550
6463
|
/**
|
|
5551
|
-
*
|
|
6464
|
+
* Customer name
|
|
5552
6465
|
*/
|
|
5553
|
-
|
|
6466
|
+
CustomerName?: string;
|
|
5554
6467
|
/**
|
|
5555
|
-
*
|
|
6468
|
+
* Customer address
|
|
5556
6469
|
*/
|
|
5557
|
-
|
|
6470
|
+
CustomerAddress?: string;
|
|
5558
6471
|
/**
|
|
5559
|
-
*
|
|
6472
|
+
* Customer phone
|
|
5560
6473
|
*/
|
|
5561
|
-
|
|
6474
|
+
CustomerPhone?: string;
|
|
5562
6475
|
/**
|
|
5563
|
-
*
|
|
6476
|
+
* Loyalty information
|
|
5564
6477
|
*/
|
|
5565
|
-
|
|
6478
|
+
Loyalty?: WebhookTransactionLoyalty;
|
|
5566
6479
|
/**
|
|
5567
|
-
* Sales
|
|
6480
|
+
* Sales items
|
|
5568
6481
|
*/
|
|
5569
|
-
|
|
6482
|
+
Sales?: Array<TransactionItem>;
|
|
5570
6483
|
/**
|
|
5571
|
-
*
|
|
6484
|
+
* Tender information
|
|
5572
6485
|
*/
|
|
5573
|
-
|
|
6486
|
+
Tender?: Array<TransactionTender>;
|
|
5574
6487
|
/**
|
|
5575
|
-
*
|
|
6488
|
+
* Sales discount
|
|
5576
6489
|
*/
|
|
5577
|
-
|
|
6490
|
+
SalesDiscount?: TransactionDiscount;
|
|
5578
6491
|
/**
|
|
5579
|
-
*
|
|
6492
|
+
* Rounding amount
|
|
5580
6493
|
*/
|
|
5581
|
-
|
|
6494
|
+
Rounding?: TransactionRounding;
|
|
5582
6495
|
};
|
|
5583
6496
|
/**
|
|
5584
|
-
* Transaction
|
|
6497
|
+
* Transaction discount
|
|
5585
6498
|
*/
|
|
5586
|
-
export type
|
|
6499
|
+
export type TransactionDiscount = {
|
|
5587
6500
|
/**
|
|
5588
|
-
*
|
|
6501
|
+
* Discount amount
|
|
5589
6502
|
*/
|
|
5590
|
-
|
|
6503
|
+
Amount: number;
|
|
6504
|
+
/**
|
|
6505
|
+
* Tax amount on discount
|
|
6506
|
+
*/
|
|
6507
|
+
Tax: number;
|
|
5591
6508
|
};
|
|
5592
6509
|
/**
|
|
5593
|
-
*
|
|
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.
|
|
5594
6517
|
*/
|
|
5595
|
-
export type
|
|
6518
|
+
export type TransactionEventResponse = {
|
|
6519
|
+
[key: string]: unknown;
|
|
6520
|
+
};
|
|
6521
|
+
/**
|
|
6522
|
+
* Transaction item
|
|
6523
|
+
*/
|
|
6524
|
+
export type TransactionItem = {
|
|
5596
6525
|
/**
|
|
5597
|
-
*
|
|
6526
|
+
* Item transaction date and time
|
|
5598
6527
|
*/
|
|
5599
|
-
|
|
6528
|
+
DateTime: string;
|
|
5600
6529
|
/**
|
|
5601
|
-
*
|
|
6530
|
+
* Item code
|
|
5602
6531
|
*/
|
|
5603
|
-
|
|
6532
|
+
Item: string;
|
|
5604
6533
|
/**
|
|
5605
|
-
*
|
|
6534
|
+
* Item barcode
|
|
5606
6535
|
*/
|
|
5607
|
-
|
|
5608
|
-
};
|
|
5609
|
-
/**
|
|
5610
|
-
* Transaction tender structure for creation requests
|
|
5611
|
-
*/
|
|
5612
|
-
export type TransactionCreateTender = {
|
|
6536
|
+
Barcode: string;
|
|
5613
6537
|
/**
|
|
5614
|
-
*
|
|
6538
|
+
* Item description
|
|
5615
6539
|
*/
|
|
5616
|
-
|
|
6540
|
+
Description: string;
|
|
5617
6541
|
/**
|
|
5618
|
-
*
|
|
6542
|
+
* Price level
|
|
5619
6543
|
*/
|
|
5620
|
-
|
|
6544
|
+
PriceLevel: number;
|
|
5621
6545
|
/**
|
|
5622
|
-
*
|
|
6546
|
+
* Item price
|
|
5623
6547
|
*/
|
|
5624
|
-
|
|
6548
|
+
Price: number;
|
|
5625
6549
|
/**
|
|
5626
|
-
*
|
|
6550
|
+
* Original price before discounts
|
|
5627
6551
|
*/
|
|
5628
|
-
|
|
6552
|
+
OriginalPrice?: number;
|
|
5629
6553
|
/**
|
|
5630
|
-
*
|
|
6554
|
+
* Item cost
|
|
5631
6555
|
*/
|
|
5632
|
-
|
|
6556
|
+
Cost: number;
|
|
5633
6557
|
/**
|
|
5634
|
-
*
|
|
6558
|
+
* Quantity sold
|
|
5635
6559
|
*/
|
|
5636
|
-
|
|
6560
|
+
Quantity: number;
|
|
5637
6561
|
/**
|
|
5638
|
-
*
|
|
6562
|
+
* Line total amount
|
|
5639
6563
|
*/
|
|
5640
|
-
|
|
6564
|
+
LineTotal: number;
|
|
5641
6565
|
/**
|
|
5642
|
-
*
|
|
6566
|
+
* Line tax amount
|
|
5643
6567
|
*/
|
|
5644
|
-
|
|
6568
|
+
LineTAX: number;
|
|
5645
6569
|
/**
|
|
5646
|
-
*
|
|
6570
|
+
* Discount amount
|
|
5647
6571
|
*/
|
|
5648
|
-
|
|
6572
|
+
Discount: number;
|
|
5649
6573
|
/**
|
|
5650
|
-
*
|
|
6574
|
+
* Department code
|
|
5651
6575
|
*/
|
|
5652
|
-
|
|
6576
|
+
Department: number;
|
|
5653
6577
|
/**
|
|
5654
|
-
*
|
|
6578
|
+
* Department name
|
|
5655
6579
|
*/
|
|
5656
|
-
|
|
6580
|
+
DepartmentName?: string;
|
|
5657
6581
|
/**
|
|
5658
|
-
*
|
|
6582
|
+
* Whether item is on special
|
|
5659
6583
|
*/
|
|
5660
|
-
|
|
6584
|
+
Special: boolean;
|
|
5661
6585
|
/**
|
|
5662
|
-
*
|
|
6586
|
+
* Loyalty points earned
|
|
5663
6587
|
*/
|
|
5664
|
-
|
|
6588
|
+
Points?: number;
|
|
5665
6589
|
/**
|
|
5666
|
-
*
|
|
6590
|
+
* Bonus points earned
|
|
5667
6591
|
*/
|
|
5668
|
-
|
|
5669
|
-
};
|
|
5670
|
-
/**
|
|
5671
|
-
* Transaction customer information for creation requests
|
|
5672
|
-
*/
|
|
5673
|
-
export type TransactionCustomer = {
|
|
6592
|
+
Bonus?: number;
|
|
5674
6593
|
/**
|
|
5675
|
-
*
|
|
6594
|
+
* Whether item was scanned
|
|
5676
6595
|
*/
|
|
5677
|
-
|
|
6596
|
+
Scanned: boolean;
|
|
5678
6597
|
/**
|
|
5679
|
-
*
|
|
6598
|
+
* Scan terminal number
|
|
5680
6599
|
*/
|
|
5681
|
-
|
|
6600
|
+
ScanTerminal?: number;
|
|
5682
6601
|
/**
|
|
5683
|
-
*
|
|
6602
|
+
* Brand code
|
|
5684
6603
|
*/
|
|
5685
|
-
|
|
6604
|
+
Brand?: string;
|
|
5686
6605
|
/**
|
|
5687
|
-
*
|
|
6606
|
+
* Brand name
|
|
5688
6607
|
*/
|
|
5689
|
-
|
|
6608
|
+
BrandName?: string;
|
|
5690
6609
|
/**
|
|
5691
|
-
*
|
|
6610
|
+
* Sub-department code
|
|
5692
6611
|
*/
|
|
5693
|
-
|
|
6612
|
+
SubDepartment?: number;
|
|
5694
6613
|
/**
|
|
5695
|
-
*
|
|
6614
|
+
* Sub-department name
|
|
5696
6615
|
*/
|
|
5697
|
-
|
|
6616
|
+
SubDepartmentName?: string;
|
|
5698
6617
|
/**
|
|
5699
|
-
*
|
|
6618
|
+
* Category code
|
|
5700
6619
|
*/
|
|
5701
|
-
|
|
6620
|
+
Category?: number;
|
|
5702
6621
|
/**
|
|
5703
|
-
*
|
|
6622
|
+
* Category name
|
|
5704
6623
|
*/
|
|
5705
|
-
|
|
6624
|
+
CategoryName?: string;
|
|
5706
6625
|
/**
|
|
5707
|
-
*
|
|
6626
|
+
* Sub-category code
|
|
5708
6627
|
*/
|
|
5709
|
-
|
|
6628
|
+
SubCategory?: number;
|
|
5710
6629
|
/**
|
|
5711
|
-
*
|
|
6630
|
+
* Sub-category name
|
|
5712
6631
|
*/
|
|
5713
|
-
|
|
6632
|
+
SubCategoryName?: string;
|
|
5714
6633
|
/**
|
|
5715
|
-
*
|
|
6634
|
+
* Range code
|
|
5716
6635
|
*/
|
|
5717
|
-
|
|
6636
|
+
Range?: number;
|
|
5718
6637
|
/**
|
|
5719
|
-
*
|
|
6638
|
+
* Range name
|
|
5720
6639
|
*/
|
|
5721
|
-
|
|
5722
|
-
};
|
|
5723
|
-
/**
|
|
5724
|
-
* Event format transaction response (for format=event query parameter).
|
|
5725
|
-
*
|
|
5726
|
-
* When `?format=event` is specified, the response is a JMS-serialized JournalCreatedEvent
|
|
5727
|
-
* object returned directly via `json_encode()`, without `result`/`errormessage` wrapper fields.
|
|
5728
|
-
* The exact structure depends on the JournalCreatedEvent serialization and includes
|
|
5729
|
-
* fields such as company, site, location, terminal, journal details, sale items,
|
|
5730
|
-
* tenders, discounts, loyalty information, and offers.
|
|
5731
|
-
*/
|
|
5732
|
-
export type TransactionEventResponse = {
|
|
5733
|
-
[key: string]: unknown;
|
|
6640
|
+
RangeName?: string;
|
|
5734
6641
|
};
|
|
5735
6642
|
/**
|
|
5736
6643
|
* Transaction offer structure for creation requests
|
|
@@ -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
|
*/
|
|
@@ -7165,6 +8107,75 @@ export type VoucherTypeResponse = {
|
|
|
7165
8107
|
version: string;
|
|
7166
8108
|
};
|
|
7167
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
|
+
};
|
|
7168
8179
|
/**
|
|
7169
8180
|
* Not found error (404)
|
|
7170
8181
|
*/
|
|
@@ -7887,9 +8898,7 @@ export type LoyaltyGetCardData = {
|
|
|
7887
8898
|
path: {
|
|
7888
8899
|
cardNumber: string;
|
|
7889
8900
|
};
|
|
7890
|
-
query?:
|
|
7891
|
-
format?: 'compact';
|
|
7892
|
-
};
|
|
8901
|
+
query?: never;
|
|
7893
8902
|
url: '/v1/loyalty/card/{cardNumber}';
|
|
7894
8903
|
};
|
|
7895
8904
|
export type LoyaltyGetCardErrors = {
|
|
@@ -7907,7 +8916,7 @@ export type LoyaltyGetCardResponses = {
|
|
|
7907
8916
|
/**
|
|
7908
8917
|
* The request has succeeded.
|
|
7909
8918
|
*/
|
|
7910
|
-
200: LoyaltyCardResponse
|
|
8919
|
+
200: LoyaltyCardResponse;
|
|
7911
8920
|
};
|
|
7912
8921
|
export type LoyaltyGetCardResponse = LoyaltyGetCardResponses[keyof LoyaltyGetCardResponses];
|
|
7913
8922
|
export type LoyaltyUpdateCardData = {
|
|
@@ -8530,9 +9539,11 @@ export type LoyaltyGetCardTypesResponses = {
|
|
|
8530
9539
|
*/
|
|
8531
9540
|
200: {
|
|
8532
9541
|
/**
|
|
8533
|
-
*
|
|
9542
|
+
* Card types keyed by numeric string index. Also contains version and loyaltyVersion as pseudo-elements.
|
|
8534
9543
|
*/
|
|
8535
|
-
cardTypes:
|
|
9544
|
+
cardTypes: {
|
|
9545
|
+
[key: string]: unknown;
|
|
9546
|
+
};
|
|
8536
9547
|
};
|
|
8537
9548
|
};
|
|
8538
9549
|
export type LoyaltyGetCardTypesResponse = LoyaltyGetCardTypesResponses[keyof LoyaltyGetCardTypesResponses];
|
|
@@ -8542,7 +9553,13 @@ export type LoyaltyGetCoffeeCardStatsData = {
|
|
|
8542
9553
|
cardNumber: string;
|
|
8543
9554
|
};
|
|
8544
9555
|
query?: {
|
|
9556
|
+
/**
|
|
9557
|
+
* Site code. Either this or customer_reference_id is required.
|
|
9558
|
+
*/
|
|
8545
9559
|
site?: number;
|
|
9560
|
+
/**
|
|
9561
|
+
* Customer reference ID for site lookup. Either this or site is required.
|
|
9562
|
+
*/
|
|
8546
9563
|
customer_reference_id?: string;
|
|
8547
9564
|
};
|
|
8548
9565
|
url: '/v1/loyalty/coffeecard/{cardNumber}';
|
|
@@ -8676,9 +9693,11 @@ export type LoyaltyGetMemberGroupsResponses = {
|
|
|
8676
9693
|
*/
|
|
8677
9694
|
200: {
|
|
8678
9695
|
/**
|
|
8679
|
-
*
|
|
9696
|
+
* Member groups keyed by numeric string index. Also contains version and loyaltyVersion as pseudo-elements.
|
|
8680
9697
|
*/
|
|
8681
|
-
membergroups:
|
|
9698
|
+
membergroups: {
|
|
9699
|
+
[key: string]: unknown;
|
|
9700
|
+
};
|
|
8682
9701
|
};
|
|
8683
9702
|
};
|
|
8684
9703
|
export type LoyaltyGetMemberGroupsResponse = LoyaltyGetMemberGroupsResponses[keyof LoyaltyGetMemberGroupsResponses];
|
|
@@ -9559,7 +10578,8 @@ export type OfferListData = {
|
|
|
9559
10578
|
query?: {
|
|
9560
10579
|
/**
|
|
9561
10580
|
* The unique site code at which the offer check is occurring.
|
|
9562
|
-
* Required when
|
|
10581
|
+
* Required when cardNumber is not `all` — omitting this for a specific
|
|
10582
|
+
* card will return a validation error.
|
|
9563
10583
|
*/
|
|
9564
10584
|
site?: number;
|
|
9565
10585
|
/**
|
|
@@ -9894,11 +10914,11 @@ export type SitesSearchSitesData = {
|
|
|
9894
10914
|
path?: never;
|
|
9895
10915
|
query: {
|
|
9896
10916
|
/**
|
|
9897
|
-
* 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).
|
|
9898
10918
|
*/
|
|
9899
10919
|
q: string;
|
|
9900
10920
|
/**
|
|
9901
|
-
* Restrict search to a specific field.
|
|
10921
|
+
* Restrict search to a specific field. Required when using comma-separated values in q.
|
|
9902
10922
|
*/
|
|
9903
10923
|
field?: 'name' | 'ccode' | 'sitecode';
|
|
9904
10924
|
/**
|
|
@@ -10036,9 +11056,9 @@ export type TransactionLookupSearchJournalsData = {
|
|
|
10036
11056
|
*/
|
|
10037
11057
|
journal: string;
|
|
10038
11058
|
/**
|
|
10039
|
-
*
|
|
11059
|
+
* Site code
|
|
10040
11060
|
*/
|
|
10041
|
-
site
|
|
11061
|
+
site: number;
|
|
10042
11062
|
/**
|
|
10043
11063
|
* Optional start date filter (Y-m-d)
|
|
10044
11064
|
*/
|
|
@@ -10518,6 +11538,35 @@ export type LoyaltyV2GetGroupsResponses = {
|
|
|
10518
11538
|
};
|
|
10519
11539
|
};
|
|
10520
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];
|
|
10521
11570
|
export type PingV2ShowData = {
|
|
10522
11571
|
body?: never;
|
|
10523
11572
|
path?: never;
|
|
@@ -10531,4 +11580,76 @@ export type PingV2ShowResponses = {
|
|
|
10531
11580
|
200: PingV2PingResult;
|
|
10532
11581
|
};
|
|
10533
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
|
+
};
|
|
10534
11655
|
//# sourceMappingURL=types.gen.d.ts.map
|