@compassdigital/sdk.typescript 4.945.0 → 4.946.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.
@@ -1752,16 +1752,247 @@ export interface CentricosLoyaltyCampaignDTO {
1752
1752
  redemptionCount: number;
1753
1753
  }
1754
1754
 
1755
- export interface CentricosCampaignPagination {
1755
+ export interface CentricosCampaignPaginationDTO {
1756
1756
  cursor?: string | null;
1757
1757
  hasMore: boolean;
1758
1758
  limit: number;
1759
1759
  }
1760
1760
 
1761
- export interface GetCentricosLoyaltyCampaignsResponse {
1761
+ export interface GetCentricosLoyaltyCampaignsResponseDTO {
1762
1762
  // Loyalty campaign list rows with redemptionCount composed from GET /loyalty/campaigns/:id/stats
1763
1763
  campaigns: CentricosLoyaltyCampaignDTO[];
1764
- pagination: CentricosCampaignPagination;
1764
+ pagination: CentricosCampaignPaginationDTO;
1765
+ }
1766
+
1767
+ export interface CentricosLoyaltyRewardDTO {
1768
+ id: string;
1769
+ createdAt: string;
1770
+ updatedAt: string;
1771
+ deletedAt?: string | null;
1772
+ createdBy: string;
1773
+ // Sector the reward is scoped to (location-service sector name, e.g. Eurest)
1774
+ sector: string;
1775
+ country: 'CA' | 'US';
1776
+ name: string;
1777
+ description?: string | null;
1778
+ status: 'active' | 'paused' | 'archived';
1779
+ // Number of conditions on the reward earning rule.
1780
+ earningRuleCount?: number;
1781
+ // Consumer app the reward belongs to, from the origin system of its milestone campaigns; null when the reward has no milestones
1782
+ realm: ('boost' | 'thrive') | null;
1783
+ }
1784
+
1785
+ export interface CentricosRewardPaginationDTO {
1786
+ cursor?: string | null;
1787
+ hasMore: boolean;
1788
+ limit: number;
1789
+ }
1790
+
1791
+ export interface GetCentricosLoyaltyRewardsResponseDTO {
1792
+ data: CentricosLoyaltyRewardDTO[];
1793
+ pagination: CentricosRewardPaginationDTO;
1794
+ }
1795
+
1796
+ export interface CentricosRewardEarningRuleConditionDTO {
1797
+ eventType: 'order_placed' | 'item_purchased' | 'amount_spent';
1798
+ points: number;
1799
+ // Required for amount_spent conditions and not allowed on other event types.
1800
+ spendThresholdCents?: number;
1801
+ // Required for item_purchased conditions and not allowed on other event types.
1802
+ itemId?: string;
1803
+ }
1804
+
1805
+ export interface CentricosRewardAssociationDTO {
1806
+ // Site the reward earns at.
1807
+ siteId: string;
1808
+ // Stations at the site the reward earns at. Omit or leave empty to earn at every station at the site.
1809
+ stationIds?: string[];
1810
+ }
1811
+
1812
+ export interface CentricosRewardMilestoneDTO {
1813
+ pointsRequired: number;
1814
+ campaignId: string;
1815
+ resetsAfterMilestone: boolean;
1816
+ maxRewardCount?: number;
1817
+ }
1818
+
1819
+ export interface GetCentricosLoyaltyRewardResponseDTO {
1820
+ id: string;
1821
+ createdAt: string;
1822
+ updatedAt: string;
1823
+ deletedAt?: string | null;
1824
+ createdBy: string;
1825
+ // Sector the reward is scoped to (location-service sector name, e.g. Eurest)
1826
+ sector: string;
1827
+ country: 'CA' | 'US';
1828
+ name: string;
1829
+ description?: string | null;
1830
+ status: 'active' | 'paused' | 'archived';
1831
+ // Number of conditions on the reward earning rule.
1832
+ earningRuleCount?: number;
1833
+ // Consumer app the reward belongs to, from the origin system of its milestone campaigns; null when the reward has no milestones
1834
+ realm: ('boost' | 'thrive') | null;
1835
+ earningRuleConditions: CentricosRewardEarningRuleConditionDTO[];
1836
+ // Sites and stations the reward earns at, grouped by site. Empty when the reward earns at every site in the sector and country.
1837
+ associations: CentricosRewardAssociationDTO[];
1838
+ milestones: CentricosRewardMilestoneDTO[];
1839
+ }
1840
+
1841
+ export interface PostCentricosLoyaltyRewardBodyDTO {
1842
+ // Sector the reward is scoped to (location-service sector name, e.g. Eurest)
1843
+ sector: string;
1844
+ country: 'CA' | 'US';
1845
+ name: string;
1846
+ description?: string;
1847
+ // Conditions of the reward earning rule. Each matching condition awards its points.
1848
+ earningRuleConditions: CentricosRewardEarningRuleConditionDTO[];
1849
+ // Sites and stations the reward earns at. Omit to earn at every site in the sector and country.
1850
+ associations?: CentricosRewardAssociationDTO[];
1851
+ milestones?: CentricosRewardMilestoneDTO[];
1852
+ }
1853
+
1854
+ export interface PostCentricosLoyaltyRewardResponseDTO {
1855
+ id: string;
1856
+ createdAt: string;
1857
+ updatedAt: string;
1858
+ deletedAt?: string | null;
1859
+ createdBy: string;
1860
+ // Sector the reward is scoped to (location-service sector name, e.g. Eurest)
1861
+ sector: string;
1862
+ country: 'CA' | 'US';
1863
+ name: string;
1864
+ description?: string | null;
1865
+ status: 'active' | 'paused' | 'archived';
1866
+ // Number of conditions on the reward earning rule.
1867
+ earningRuleCount?: number;
1868
+ // Consumer app the reward belongs to, from the origin system of its milestone campaigns; null when the reward has no milestones
1869
+ realm: ('boost' | 'thrive') | null;
1870
+ earningRuleConditions: CentricosRewardEarningRuleConditionDTO[];
1871
+ // Sites and stations the reward earns at, grouped by site. Empty when the reward earns at every site in the sector and country.
1872
+ associations: CentricosRewardAssociationDTO[];
1873
+ milestones: CentricosRewardMilestoneDTO[];
1874
+ }
1875
+
1876
+ export interface PutCentricosLoyaltyRewardBodyDTO {
1877
+ name?: string;
1878
+ description?: string;
1879
+ // Replaces every condition of the reward earning rule.
1880
+ earningRuleConditions?: CentricosRewardEarningRuleConditionDTO[];
1881
+ // Sites and stations the reward earns at. Overwrites the saved associations, so include every site to keep; omit the field to leave them unchanged. An empty list removes every association, and the reward then earns at every site in its sector and country.
1882
+ associations?: CentricosRewardAssociationDTO[];
1883
+ milestones?: CentricosRewardMilestoneDTO[];
1884
+ }
1885
+
1886
+ export interface PutCentricosLoyaltyRewardResponseDTO {
1887
+ id: string;
1888
+ createdAt: string;
1889
+ updatedAt: string;
1890
+ deletedAt?: string | null;
1891
+ createdBy: string;
1892
+ // Sector the reward is scoped to (location-service sector name, e.g. Eurest)
1893
+ sector: string;
1894
+ country: 'CA' | 'US';
1895
+ name: string;
1896
+ description?: string | null;
1897
+ status: 'active' | 'paused' | 'archived';
1898
+ // Number of conditions on the reward earning rule.
1899
+ earningRuleCount?: number;
1900
+ // Consumer app the reward belongs to, from the origin system of its milestone campaigns; null when the reward has no milestones
1901
+ realm: ('boost' | 'thrive') | null;
1902
+ earningRuleConditions: CentricosRewardEarningRuleConditionDTO[];
1903
+ // Sites and stations the reward earns at, grouped by site. Empty when the reward earns at every site in the sector and country.
1904
+ associations: CentricosRewardAssociationDTO[];
1905
+ milestones: CentricosRewardMilestoneDTO[];
1906
+ }
1907
+
1908
+ export interface PatchCentricosLoyaltyRewardStatusBodyDTO {
1909
+ status: 'active' | 'paused' | 'archived';
1910
+ }
1911
+
1912
+ export interface PatchCentricosLoyaltyRewardStatusResponseDTO {
1913
+ id: string;
1914
+ createdAt: string;
1915
+ updatedAt: string;
1916
+ deletedAt?: string | null;
1917
+ createdBy: string;
1918
+ // Sector the reward is scoped to (location-service sector name, e.g. Eurest)
1919
+ sector: string;
1920
+ country: 'CA' | 'US';
1921
+ name: string;
1922
+ description?: string | null;
1923
+ status: 'active' | 'paused' | 'archived';
1924
+ // Number of conditions on the reward earning rule.
1925
+ earningRuleCount?: number;
1926
+ // Consumer app the reward belongs to, from the origin system of its milestone campaigns; null when the reward has no milestones
1927
+ realm: ('boost' | 'thrive') | null;
1928
+ earningRuleConditions: CentricosRewardEarningRuleConditionDTO[];
1929
+ // Sites and stations the reward earns at, grouped by site. Empty when the reward earns at every site in the sector and country.
1930
+ associations: CentricosRewardAssociationDTO[];
1931
+ milestones: CentricosRewardMilestoneDTO[];
1932
+ }
1933
+
1934
+ export interface CentricosLoyaltyRewardCardDTO {
1935
+ id: string;
1936
+ createdAt: string;
1937
+ updatedAt: string;
1938
+ rewardId: string;
1939
+ customerId: string;
1940
+ pointsBalance: number;
1941
+ lifetimePoints: number;
1942
+ status: string;
1943
+ }
1944
+
1945
+ export interface GetCentricosLoyaltyRewardCardsResponseDTO {
1946
+ data: CentricosLoyaltyRewardCardDTO[];
1947
+ pagination: CentricosRewardPaginationDTO;
1948
+ }
1949
+
1950
+ export interface CentricosLoyaltyRewardEventDTO {
1951
+ id: string;
1952
+ createdAt: string;
1953
+ cardId: string;
1954
+ eventType:
1955
+ | 'order_placed'
1956
+ | 'item_purchased'
1957
+ | 'amount_spent'
1958
+ | 'manual_adjustment'
1959
+ | 'milestone_reached';
1960
+ pointsDelta: number;
1961
+ orderId?: string | null;
1962
+ description?: string | null;
1963
+ adjustedBy?: string | null;
1964
+ }
1965
+
1966
+ export interface GetCentricosLoyaltyRewardCardResponseDTO {
1967
+ id: string;
1968
+ createdAt: string;
1969
+ updatedAt: string;
1970
+ rewardId: string;
1971
+ customerId: string;
1972
+ pointsBalance: number;
1973
+ lifetimePoints: number;
1974
+ status: string;
1975
+ events: CentricosLoyaltyRewardEventDTO[];
1976
+ }
1977
+
1978
+ export interface PostCentricosLoyaltyRewardCardAdjustBodyDTO {
1979
+ // Positive to add, negative to deduct
1980
+ pointsDelta: number;
1981
+ description: string;
1982
+ // Client-generated id for this adjustment; send a new one for every distinct adjustment. A request whose adjustmentId the card has already applied is treated as a retry: it applies nothing and returns the card with the same 201, whatever its pointsDelta or description.
1983
+ adjustmentId?: string;
1984
+ }
1985
+
1986
+ export interface PostCentricosLoyaltyRewardCardAdjustResponseDTO {
1987
+ id: string;
1988
+ createdAt: string;
1989
+ updatedAt: string;
1990
+ rewardId: string;
1991
+ customerId: string;
1992
+ pointsBalance: number;
1993
+ lifetimePoints: number;
1994
+ status: string;
1995
+ events: CentricosLoyaltyRewardEventDTO[];
1765
1996
  }
1766
1997
 
1767
1998
  // POST /centricos/ai/item/description - Generate item description
@@ -2031,8 +2262,6 @@ export type PutCentricosSiteAgilysysIntegrationResponse = PutSiteIntegrationResp
2031
2262
  // PUT /centricos/sites/{siteId}/integration/{integration_type} - Connect an integration that has no site settings to the site
2032
2263
 
2033
2264
  export interface PutCentricosSiteIntegrationPath {
2034
- // ID of the site
2035
- siteId: string;
2036
2265
  // Integration to connect. Thrive, Boost and Agilysys have their own routes, because they take site settings.
2037
2266
  integration_type:
2038
2267
  | 'nextep'
@@ -2046,6 +2275,8 @@ export interface PutCentricosSiteIntegrationPath {
2046
2275
  | 'illumia'
2047
2276
  | 'amazon'
2048
2277
  | 'time2eat';
2278
+ // ID of the site
2279
+ siteId: string;
2049
2280
  }
2050
2281
 
2051
2282
  export type PutCentricosSiteIntegrationResponse = PutSiteIntegrationResponse;
@@ -2053,8 +2284,6 @@ export type PutCentricosSiteIntegrationResponse = PutSiteIntegrationResponse;
2053
2284
  // DELETE /centricos/sites/{siteId}/integration/{integration_type} - Disconnect an integration from the site
2054
2285
 
2055
2286
  export interface DeleteCentricosSiteIntegrationPath {
2056
- // ID of the site
2057
- siteId: string;
2058
2287
  // Integration to disconnect
2059
2288
  integration_type:
2060
2289
  | 'thrive'
@@ -2071,6 +2300,8 @@ export interface DeleteCentricosSiteIntegrationPath {
2071
2300
  | 'illumia'
2072
2301
  | 'amazon'
2073
2302
  | 'time2eat';
2303
+ // ID of the site
2304
+ siteId: string;
2074
2305
  }
2075
2306
 
2076
2307
  export type DeleteCentricosSiteIntegrationResponse = DeleteSiteIntegrationResponse;
@@ -2417,4 +2648,95 @@ export interface GetCentricosLoyaltyCampaignsQuery {
2417
2648
  hasRewards?: boolean;
2418
2649
  }
2419
2650
 
2420
- export type GetCentricosLoyaltyCampaignsResponse$0 = GetCentricosLoyaltyCampaignsResponse;
2651
+ export type GetCentricosLoyaltyCampaignsResponse = GetCentricosLoyaltyCampaignsResponseDTO;
2652
+
2653
+ // GET /centricos/loyalty/rewards - List loyalty rewards with filters and pagination for CentricOS
2654
+
2655
+ export interface GetCentricosLoyaltyRewardsQuery {
2656
+ // Max items to return
2657
+ limit?: number;
2658
+ // Opaque cursor from previous response
2659
+ cursor?: string;
2660
+ // Case-insensitive partial match across reward text fields
2661
+ query?: string;
2662
+ // Filter by sector (location-service sector name, e.g. Eurest)
2663
+ sector?: string;
2664
+ country?: string;
2665
+ // Only rewards that earn at this site: rewards with no associations plus rewards associated with the site
2666
+ siteId?: string;
2667
+ // Exact milestone-linked campaign match
2668
+ campaignId?: string;
2669
+ status?: string;
2670
+ }
2671
+
2672
+ export type GetCentricosLoyaltyRewardsResponse = GetCentricosLoyaltyRewardsResponseDTO;
2673
+
2674
+ // POST /centricos/loyalty/rewards - Create a loyalty reward with earning rule conditions, associations and milestones for CentricOS
2675
+
2676
+ export type PostCentricosLoyaltyRewardBody = PostCentricosLoyaltyRewardBodyDTO;
2677
+
2678
+ export type PostCentricosLoyaltyRewardResponse = PostCentricosLoyaltyRewardResponseDTO;
2679
+
2680
+ // GET /centricos/loyalty/rewards/{id} - Get loyalty reward detail with earning rule conditions, associations and milestones for CentricOS
2681
+
2682
+ export interface GetCentricosLoyaltyRewardPath {
2683
+ id: string;
2684
+ }
2685
+
2686
+ export type GetCentricosLoyaltyRewardResponse = GetCentricosLoyaltyRewardResponseDTO;
2687
+
2688
+ // PUT /centricos/loyalty/rewards/{id} - Update a loyalty reward and replace its earning rule conditions, associations and milestones for CentricOS
2689
+
2690
+ export interface PutCentricosLoyaltyRewardPath {
2691
+ id: string;
2692
+ }
2693
+
2694
+ export type PutCentricosLoyaltyRewardBody = PutCentricosLoyaltyRewardBodyDTO;
2695
+
2696
+ export type PutCentricosLoyaltyRewardResponse = PutCentricosLoyaltyRewardResponseDTO;
2697
+
2698
+ // PATCH /centricos/loyalty/rewards/{id}/status - Transition loyalty reward status for CentricOS
2699
+
2700
+ export interface PatchCentricosLoyaltyRewardStatusPath {
2701
+ id: string;
2702
+ }
2703
+
2704
+ export type PatchCentricosLoyaltyRewardStatusBody = PatchCentricosLoyaltyRewardStatusBodyDTO;
2705
+
2706
+ export type PatchCentricosLoyaltyRewardStatusResponse =
2707
+ PatchCentricosLoyaltyRewardStatusResponseDTO;
2708
+
2709
+ // GET /centricos/loyalty/rewards/{id}/cards - List enrolled customer cards for a loyalty reward for CentricOS
2710
+
2711
+ export interface GetCentricosLoyaltyRewardCardsPath {
2712
+ id: string;
2713
+ }
2714
+
2715
+ export interface GetCentricosLoyaltyRewardCardsQuery {
2716
+ // Max items to return
2717
+ limit?: number;
2718
+ // Opaque cursor from previous response
2719
+ cursor?: string;
2720
+ }
2721
+
2722
+ export type GetCentricosLoyaltyRewardCardsResponse = GetCentricosLoyaltyRewardCardsResponseDTO;
2723
+
2724
+ // GET /centricos/loyalty/rewards/{id}/cards/{customerId} - Get loyalty reward card detail with transaction event history for CentricOS
2725
+
2726
+ export interface GetCentricosLoyaltyRewardCardPath {
2727
+ id: string;
2728
+ customerId: string;
2729
+ }
2730
+
2731
+ export type GetCentricosLoyaltyRewardCardResponse = GetCentricosLoyaltyRewardCardResponseDTO;
2732
+
2733
+ // POST /centricos/loyalty/rewards/cards/{cardId}/adjust - Manually adjust points on a loyalty reward card for CentricOS
2734
+
2735
+ export interface PostCentricosLoyaltyRewardCardAdjustPath {
2736
+ cardId: string;
2737
+ }
2738
+
2739
+ export type PostCentricosLoyaltyRewardCardAdjustBody = PostCentricosLoyaltyRewardCardAdjustBodyDTO;
2740
+
2741
+ export type PostCentricosLoyaltyRewardCardAdjustResponse =
2742
+ PostCentricosLoyaltyRewardCardAdjustResponseDTO;