@zenglobal/api-client 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -422,10 +422,8 @@ export type CoffeeCardResultItem = {
422
422
  purchased: number;
423
423
  };
424
424
  /**
425
- * Site and company information modelsComplete company information structure.
426
- * Fields are sourced from CHAIN, SBU, CHAININFO, CHAINDEFAULT, and CHAINLOCALE tables.
427
- * All T/F varchar fields are converted to booleans.
428
- * All integer/decimal values are converted to strings by JsonTransformer.
425
+ * Site and company information models.Complete company information structure.
426
+ * Boolean fields are native booleans. Numeric values are returned as strings.
429
427
  */
430
428
  export type CompanyInfo = {
431
429
  /**
@@ -433,11 +431,11 @@ export type CompanyInfo = {
433
431
  */
434
432
  company: ApiNumeric;
435
433
  /**
436
- * Company description/name
434
+ * Company name
437
435
  */
438
436
  description: string;
439
437
  /**
440
- * SBU (Strategic Business Unit) number
438
+ * Strategic Business Unit number
441
439
  */
442
440
  sbunumber: string;
443
441
  /**
@@ -457,7 +455,7 @@ export type CompanyInfo = {
457
455
  */
458
456
  phone: string;
459
457
  /**
460
- * Company active status (T/F converted to boolean)
458
+ * Whether the company is active
461
459
  */
462
460
  active: boolean;
463
461
  /**
@@ -521,7 +519,7 @@ export type CompanyInfo = {
521
519
  */
522
520
  acn: string;
523
521
  /**
524
- * Department levels setting
522
+ * Department hierarchy levels
525
523
  */
526
524
  deptlevels: ApiNumeric;
527
525
  /**
@@ -533,11 +531,11 @@ export type CompanyInfo = {
533
531
  */
534
532
  mastersite: ApiNumeric;
535
533
  /**
536
- * Districts enabled flag (T/F converted to boolean)
534
+ * Whether district grouping is enabled
537
535
  */
538
536
  districts: boolean;
539
537
  /**
540
- * Chain URL for loyalty portal
538
+ * Loyalty portal URL
541
539
  */
542
540
  chainurl: string;
543
541
  /**
@@ -553,7 +551,7 @@ export type CompanyInfo = {
553
551
  */
554
552
  discount: ApiNumeric;
555
553
  /**
556
- * Year renewal month
554
+ * Year renewal setting
557
555
  */
558
556
  yearrenew: ApiNumeric;
559
557
  /**
@@ -565,7 +563,7 @@ export type CompanyInfo = {
565
563
  */
566
564
  weekstartday: ApiNumeric;
567
565
  /**
568
- * Year start month
566
+ * Fiscal year start month
569
567
  */
570
568
  yearstartmonth: ApiNumeric;
571
569
  /**
@@ -573,7 +571,7 @@ export type CompanyInfo = {
573
571
  */
574
572
  defaultmenu: ApiNumeric;
575
573
  /**
576
- * Default image (business) path
574
+ * Default business image path
577
575
  */
578
576
  defaultimageb: string;
579
577
  /**
@@ -585,75 +583,67 @@ export type CompanyInfo = {
585
583
  */
586
584
  loyaltyname: string;
587
585
  /**
588
- * Singular site descriptor label
586
+ * Singular site label
589
587
  */
590
588
  sitedesc: string;
591
589
  /**
592
- * Plural site descriptor label
590
+ * Plural site label
593
591
  */
594
592
  sitedescs: string;
595
593
  /**
596
- * Fashion mode setting
597
- */
598
- fashion: string;
599
- /**
600
- * Brand lab setting
594
+ * Brand label
601
595
  */
602
596
  brandlab: string;
603
597
  /**
604
- * Group financial summary enabled (T/F converted to boolean)
598
+ * Whether loyalty is grouped across sites
605
599
  */
606
600
  groupfs: boolean;
607
601
  /**
608
- * Card management enabled (T/F converted to boolean)
602
+ * Whether card management is enabled
609
603
  */
610
604
  enablecard: boolean;
611
605
  /**
612
- * Card expiry enabled (T/F converted to boolean)
613
- */
614
- enableexpiry: boolean;
615
- /**
616
- * Warning grace period (days)
606
+ * Warning grace period in days
617
607
  */
618
608
  warninggrace: ApiNumeric;
619
609
  /**
620
- * Expiry grace period (days)
610
+ * Expiry grace period in days
621
611
  */
622
612
  expirygrace: ApiNumeric;
623
613
  /**
624
- * Password expiry warning period (days)
614
+ * Password expiry warning period in days
625
615
  */
626
616
  warningpwdexpiry: ApiNumeric;
627
617
  /**
628
- * Tax description label
618
+ * Tax description label (e.g. GST)
629
619
  */
630
620
  taxdesc: string;
631
621
  /**
632
- * Default active status for new records (T/F converted to boolean)
622
+ * Whether new records are active by default
633
623
  */
634
624
  defaultactive: boolean;
635
625
  /**
636
- * Follow active status from parent (T/F converted to boolean)
626
+ * Whether child records follow parent active status
637
627
  */
638
628
  followactive: boolean;
639
629
  /**
640
- * Recalculate points enabled (T/F converted to boolean)
630
+ * Whether points are recalculated on changes
641
631
  */
642
632
  recalculatepoints: boolean;
643
633
  /**
644
- * Loyalty period type
634
+ * Loyalty period type (e.g. man, quart, 4-4-5)
645
635
  */
646
636
  periodtype: string;
647
637
  /**
648
- * SMS sub-accounts enabled (T/F converted to boolean)
638
+ * Whether SMS sub-accounts are enabled
649
639
  */
650
640
  smssubaccounts: boolean;
651
641
  /**
652
- * Currency symbol
642
+ * Currency symbol (e.g. $)
653
643
  */
654
644
  currencysym: string;
655
645
  /**
656
- * Decimal places for currency
646
+ * Decimal places for currency display
657
647
  */
658
648
  decimals: ApiNumeric;
659
649
  /**
@@ -669,35 +659,35 @@ export type CompanyInfo = {
669
659
  */
670
660
  maxterminals: ApiNumeric;
671
661
  /**
672
- * Currency code (e.g., AUD)
662
+ * Currency code (e.g. AUD)
673
663
  */
674
664
  currency: string;
675
665
  /**
676
- * Web voucher module enabled (always true)
666
+ * Whether the web voucher module is enabled
677
667
  */
678
668
  webvoucherenabled: boolean;
679
669
  /**
680
- * Web loyalty module enabled (always true)
670
+ * Whether the web loyalty module is enabled
681
671
  */
682
672
  webloyaltyenabled: boolean;
683
673
  /**
684
- * Web debtor module enabled (always false)
674
+ * Whether the web debtor module is enabled
685
675
  */
686
676
  webdebtorenabled: boolean;
687
677
  /**
688
- * Web member module enabled (always true)
678
+ * Whether the web member module is enabled
689
679
  */
690
680
  webmemberenabled: boolean;
691
681
  /**
692
- * Web customer order module enabled (always true)
682
+ * Whether the web customer order module is enabled
693
683
  */
694
684
  webcustomerorderenabled: boolean;
695
685
  /**
696
- * Web voucher URL
686
+ * Web voucher purchase URL
697
687
  */
698
688
  webvoucherurl: string;
699
689
  /**
700
- * Array of sites belonging to this company
690
+ * Sites belonging to this company
701
691
  */
702
692
  sites: Array<SiteInfo>;
703
693
  };
@@ -1375,7 +1365,7 @@ export type ListUpdateRequest = {
1375
1365
  };
1376
1366
  };
1377
1367
  /**
1378
- * Location information within a site
1368
+ * Location within a site.
1379
1369
  */
1380
1370
  export type LocationInfo = {
1381
1371
  /**
@@ -1383,7 +1373,7 @@ export type LocationInfo = {
1383
1373
  */
1384
1374
  location: ApiNumeric;
1385
1375
  /**
1386
- * Location description
1376
+ * Location name
1387
1377
  */
1388
1378
  description: string;
1389
1379
  /**
@@ -1391,7 +1381,7 @@ export type LocationInfo = {
1391
1381
  */
1392
1382
  locationtype: ApiNumeric;
1393
1383
  /**
1394
- * Location type description
1384
+ * Location type name
1395
1385
  */
1396
1386
  locationtypedescription: string;
1397
1387
  };
@@ -1652,11 +1642,11 @@ export type LoyaltyCard = {
1652
1642
  /**
1653
1643
  * Available offers (when includeoffers requested)
1654
1644
  */
1655
- offers?: Array<LoyaltyOffer>;
1645
+ offers?: Array<Offer>;
1656
1646
  /**
1657
1647
  * Recently redeemed offers (when includeoffers requested)
1658
1648
  */
1659
- redeemed_offers?: Array<RedeemedOffer>;
1649
+ redeemed_offers?: Array<OfferRedemption>;
1660
1650
  /**
1661
1651
  * Transaction history (when requested)
1662
1652
  */
@@ -2094,29 +2084,6 @@ export type LoyaltyGroup = {
2094
2084
  */
2095
2085
  sitelist: Array<string>;
2096
2086
  };
2097
- /**
2098
- * Loyalty offer information (simplified for card context)
2099
- */
2100
- export type LoyaltyOffer = {
2101
- /**
2102
- * Offer identifier
2103
- */
2104
- offer_id: number;
2105
- /**
2106
- * Offer description
2107
- */
2108
- offer_description: string;
2109
- /**
2110
- * Offer is active
2111
- */
2112
- active: boolean;
2113
- /**
2114
- * Offer details
2115
- */
2116
- details?: {
2117
- [key: string]: string;
2118
- };
2119
- };
2120
2087
  /**
2121
2088
  * Simplified loyalty card information returned by search endpoints
2122
2089
  */
@@ -3383,8 +3350,9 @@ export type Offer = {
3383
3350
  * * `P` - Before birthday
3384
3351
  * * `A` - After birthday
3385
3352
  * * `B` - Before or after birthday
3353
+ * Null when not a birthday offer.
3386
3354
  */
3387
- deltadir?: DeltaDir;
3355
+ deltadir?: DeltaDir | null;
3388
3356
  /**
3389
3357
  * Human-readable description of the card type flag setting
3390
3358
  */
@@ -3502,7 +3470,7 @@ export type Offer = {
3502
3470
  /**
3503
3471
  * Link scheduler value
3504
3472
  */
3505
- linksched?: ApiNumeric;
3473
+ linksched?: string;
3506
3474
  /**
3507
3475
  * Determine the range for which to look for purchased items.
3508
3476
  * * `-1` - ALL
@@ -4576,59 +4544,6 @@ export type PurchaseGroup = {
4576
4544
  */
4577
4545
  isdefault: string;
4578
4546
  };
4579
- /**
4580
- * Redeemed offer information
4581
- */
4582
- export type RedeemedOffer = {
4583
- /**
4584
- * Offer identifier
4585
- */
4586
- id: number;
4587
- /**
4588
- * Offer description
4589
- */
4590
- description: string;
4591
- /**
4592
- * Offer active date
4593
- */
4594
- dateactive?: ApiDate;
4595
- /**
4596
- * Offer expiry date
4597
- */
4598
- dateexpire?: ApiDate;
4599
- /**
4600
- * Offer points value
4601
- */
4602
- points?: ApiNumeric;
4603
- /**
4604
- * Offer discount value
4605
- */
4606
- discount?: ApiNumeric;
4607
- /**
4608
- * Offer amount
4609
- */
4610
- amount?: ApiNumeric;
4611
- /**
4612
- * Whether offer is enabled
4613
- */
4614
- enabled: boolean;
4615
- /**
4616
- * Date the offer was redeemed
4617
- */
4618
- redeemed_date?: ApiDate;
4619
- /**
4620
- * Points redeemed for this offer
4621
- */
4622
- redeemed_points?: ApiNumeric;
4623
- /**
4624
- * Amount redeemed for this offer
4625
- */
4626
- redeemed_amount?: ApiNumeric;
4627
- /**
4628
- * Tax on redeemed amount
4629
- */
4630
- redeemed_tax?: ApiNumeric;
4631
- };
4632
4547
  export type Result = {
4633
4548
  result: number;
4634
4549
  errormessage: string;
@@ -4847,11 +4762,6 @@ export type ShortCodeUpdateResponse = {
4847
4762
  };
4848
4763
  /**
4849
4764
  * Individual site information.
4850
- * All columns from the SITE table are included except: servernumber, netaddress,
4851
- * tillmastersite, servername, changedate, childid, chaincode, nmi, enableasp.
4852
- * T/F varchar fields are converted to booleans.
4853
- * Integer/decimal values are converted to strings by JsonTransformer.
4854
- * The `times` and `locations` fields are dynamically added.
4855
4765
  */
4856
4766
  export type SiteInfo = {
4857
4767
  /**
@@ -4859,69 +4769,13 @@ export type SiteInfo = {
4859
4769
  */
4860
4770
  sitecode: ApiNumeric;
4861
4771
  /**
4862
- * Site description/name
4772
+ * Site name
4863
4773
  */
4864
4774
  description: string;
4865
- /**
4866
- * Site type (single character code)
4867
- */
4868
- sitetype: string;
4869
- /**
4870
- * Region code
4871
- */
4872
- region: ApiNumeric;
4873
- /**
4874
- * Site locale setting
4875
- */
4876
- sitelocale: string;
4877
- /**
4878
- * Code page for character encoding
4879
- */
4880
- codepage: ApiNumeric;
4881
- /**
4882
- * Maximum terminals allowed at site
4883
- */
4884
- maxterminals: ApiNumeric;
4885
- /**
4886
- * Venue ID for external integrations
4887
- */
4888
- venue_id: ApiNumeric;
4889
- /**
4890
- * District code
4891
- */
4892
- district: ApiNumeric;
4893
- /**
4894
- * External store identifier
4895
- */
4896
- store_id: string;
4897
- /**
4898
- * Shopify store identifier
4899
- */
4900
- shopify_id: string;
4901
- /**
4902
- * Salesforce account identifier
4903
- */
4904
- salesforce_account_id: string;
4905
- /**
4906
- * Customer reference identifier
4907
- */
4908
- customer_reference_id: string;
4909
- /**
4910
- * Salesforce sync status
4911
- */
4912
- salesforce_sync_status: string;
4913
- /**
4914
- * Salesforce sync last updated timestamp
4915
- */
4916
- salesforce_sync_updated_at: string;
4917
4775
  /**
4918
4776
  * Registered business name
4919
4777
  */
4920
4778
  registeredname: string;
4921
- /**
4922
- * Site serial number for authentication
4923
- */
4924
- serialnumber: string;
4925
4779
  /**
4926
4780
  * Site address line 1
4927
4781
  */
@@ -4943,7 +4797,7 @@ export type SiteInfo = {
4943
4797
  */
4944
4798
  country: string;
4945
4799
  /**
4946
- * City/Suburb name
4800
+ * City or suburb
4947
4801
  */
4948
4802
  city: string;
4949
4803
  /**
@@ -4987,11 +4841,11 @@ export type SiteInfo = {
4987
4841
  */
4988
4842
  billcity: string;
4989
4843
  /**
4990
- * Contact person name
4844
+ * Contact person
4991
4845
  */
4992
4846
  contact: string;
4993
4847
  /**
4994
- * Site manager name
4848
+ * Site manager
4995
4849
  */
4996
4850
  manager: string;
4997
4851
  /**
@@ -4999,105 +4853,61 @@ export type SiteInfo = {
4999
4853
  */
5000
4854
  email: string;
5001
4855
  /**
5002
- * Last known IP address
5003
- */
5004
- lastipaddress: string;
5005
- /**
5006
- * Last IP address date
5007
- */
5008
- lastipdate: string;
5009
- /**
5010
- * Last billing date
5011
- */
5012
- lastbilldate: string;
5013
- /**
5014
- * License expiry date
5015
- */
5016
- licdate: string;
5017
- /**
5018
- * Date of first sale
5019
- */
5020
- firstsale: string;
5021
- /**
5022
- * Date of last sale
5023
- */
5024
- lastsale: string;
5025
- /**
5026
- * Store type classification
5027
- */
5028
- storetype: string;
5029
- /**
5030
- * Store number identifier
5031
- */
5032
- storenum: string;
5033
- /**
5034
- * Blind cash-up enabled (T/F converted to boolean)
5035
- */
5036
- blindcashup: boolean;
5037
- /**
5038
- * Location feature enabled (T/F converted to boolean)
5039
- */
5040
- enableloc: boolean;
5041
- /**
5042
- * Kiosk mode enabled (T/F converted to boolean)
5043
- */
5044
- enablekiosk: boolean;
5045
- /**
5046
- * Australian Company Number for site
4856
+ * Australian Company Number
5047
4857
  */
5048
4858
  acn: string;
5049
4859
  /**
5050
- * VNC password (internal)
5051
- */
5052
- _vncpassword: string;
5053
- /**
5054
- * Site active status (T/F converted to boolean)
4860
+ * Whether the site is active
5055
4861
  */
5056
4862
  siteactive: boolean;
5057
- /**
5058
- * Video port number
5059
- */
5060
- videoport: ApiNumeric;
5061
4863
  /**
5062
4864
  * Site currency code
5063
4865
  */
5064
4866
  currency: string;
5065
4867
  /**
5066
- * GPS latitude coordinate
4868
+ * GPS latitude
5067
4869
  */
5068
4870
  latitude: ApiNumeric;
5069
4871
  /**
5070
- * GPS longitude coordinate (note: column name has legacy typo)
4872
+ * GPS longitude (note: legacy spelling preserved)
5071
4873
  */
5072
4874
  longtitude: ApiNumeric;
5073
4875
  /**
5074
- * Base station identifier
4876
+ * Site timezone
5075
4877
  */
5076
- basestation: string;
4878
+ timezone: string;
5077
4879
  /**
5078
- * Use trade date instead of calendar date (T/F converted to boolean)
4880
+ * Region code
5079
4881
  */
5080
- usetradedate: boolean;
4882
+ region: ApiNumeric;
5081
4883
  /**
5082
- * Site passphrase for authentication
4884
+ * Region reference ID
5083
4885
  */
5084
- passphrase: string;
4886
+ region_id: ApiNumeric;
5085
4887
  /**
5086
- * Map cash drawer enabled (T/F converted to boolean)
4888
+ * District code
5087
4889
  */
5088
- mapcashdrawer: boolean;
4890
+ district: ApiNumeric;
5089
4891
  /**
5090
- * Compliance mode setting
4892
+ * District reference ID
5091
4893
  */
5092
- compliancemode: string;
4894
+ district_id: ApiNumeric;
5093
4895
  /**
5094
- * Region reference ID
4896
+ * External store identifier
5095
4897
  */
5096
- region_id: ApiNumeric;
4898
+ store_id: string;
5097
4899
  /**
5098
- * District reference ID
4900
+ * Shopify store identifier
5099
4901
  */
5100
- district_id: ApiNumeric;
4902
+ shopify_id: string;
4903
+ /**
4904
+ * Salesforce account identifier
4905
+ */
4906
+ salesforce_account_id: string;
4907
+ /**
4908
+ * Customer reference identifier
4909
+ */
4910
+ customer_reference_id: string;
5101
4911
  /**
5102
4912
  * POS provider reference ID
5103
4913
  */
@@ -5107,7 +4917,7 @@ export type SiteInfo = {
5107
4917
  */
5108
4918
  point_of_sale_reseller_id: ApiNumeric;
5109
4919
  /**
5110
- * POS support enabled
4920
+ * Whether POS support is enabled
5111
4921
  */
5112
4922
  point_of_sale_support: boolean;
5113
4923
  /**
@@ -5115,23 +4925,39 @@ export type SiteInfo = {
5115
4925
  */
5116
4926
  web_store_id: ApiNumeric;
5117
4927
  /**
5118
- * Site timezone (e.g., Australia/Adelaide)
4928
+ * Salesforce sync status
5119
4929
  */
5120
- timezone: string;
4930
+ salesforce_sync_status: string;
4931
+ /**
4932
+ * Salesforce sync last updated
4933
+ */
4934
+ salesforce_sync_updated_at: string;
5121
4935
  /**
5122
4936
  * Whether loyalty signup is allowed at this site
5123
4937
  */
5124
- allow_loyalty_signup: boolean;
4938
+ allow_loyalty_signup: string;
4939
+ /**
4940
+ * Date of first sale
4941
+ */
4942
+ firstsale: string;
4943
+ /**
4944
+ * Date of last sale
4945
+ */
4946
+ lastsale: string;
4947
+ /**
4948
+ * Store number
4949
+ */
4950
+ storenum: string;
5125
4951
  /**
5126
4952
  * Operating hours for today
5127
4953
  */
5128
4954
  times: {
5129
4955
  /**
5130
- * Opening time
4956
+ * Opening hour (0-23)
5131
4957
  */
5132
4958
  opening: string;
5133
4959
  /**
5134
- * Closing time
4960
+ * Closing hour (0-23)
5135
4961
  */
5136
4962
  closing: string;
5137
4963
  };
@@ -5141,8 +4967,7 @@ export type SiteInfo = {
5141
4967
  locations: Array<LocationInfo>;
5142
4968
  };
5143
4969
  /**
5144
- * Sites response model.
5145
- * This is a GET endpoint that returns raw JSON via prepareJson() without result/errormessage wrapper.
4970
+ * Sites endpoint response.
5146
4971
  */
5147
4972
  export type SitesResponse = {
5148
4973
  /**