@compassdigital/sdk.typescript 4.944.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.
- package/lib/index.d.ts +65 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +75 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/centricos.d.ts +228 -6
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/order.d.ts +3 -2
- package/lib/interface/order.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +186 -2
- package/src/interface/centricos.ts +330 -8
- package/src/interface/order.ts +4 -2
package/src/index.ts
CHANGED
|
@@ -1486,7 +1486,21 @@ import {
|
|
|
1486
1486
|
GetCentricosTrendingCpgProductsResponse,
|
|
1487
1487
|
GetCentricosUserLogsCsvResponse,
|
|
1488
1488
|
GetCentricosLoyaltyCampaignsQuery,
|
|
1489
|
-
GetCentricosLoyaltyCampaignsResponse
|
|
1489
|
+
GetCentricosLoyaltyCampaignsResponse,
|
|
1490
|
+
GetCentricosLoyaltyRewardsQuery,
|
|
1491
|
+
GetCentricosLoyaltyRewardsResponse,
|
|
1492
|
+
PostCentricosLoyaltyRewardBody,
|
|
1493
|
+
PostCentricosLoyaltyRewardResponse,
|
|
1494
|
+
GetCentricosLoyaltyRewardResponse,
|
|
1495
|
+
PutCentricosLoyaltyRewardBody,
|
|
1496
|
+
PutCentricosLoyaltyRewardResponse,
|
|
1497
|
+
PatchCentricosLoyaltyRewardStatusBody,
|
|
1498
|
+
PatchCentricosLoyaltyRewardStatusResponse,
|
|
1499
|
+
GetCentricosLoyaltyRewardCardsQuery,
|
|
1500
|
+
GetCentricosLoyaltyRewardCardsResponse,
|
|
1501
|
+
GetCentricosLoyaltyRewardCardResponse,
|
|
1502
|
+
PostCentricosLoyaltyRewardCardAdjustBody,
|
|
1503
|
+
PostCentricosLoyaltyRewardCardAdjustResponse,
|
|
1490
1504
|
} from './interface/centricos';
|
|
1491
1505
|
|
|
1492
1506
|
import { TaxHealthCheckResponse, PostQuoteTaxBody, PostQuoteTaxResponse } from './interface/tax';
|
|
@@ -17564,7 +17578,7 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
17564
17578
|
options?: {
|
|
17565
17579
|
query?: GetCentricosLoyaltyCampaignsQuery;
|
|
17566
17580
|
} & RequestOptions,
|
|
17567
|
-
): ResponsePromise<GetCentricosLoyaltyCampaignsResponse
|
|
17581
|
+
): ResponsePromise<GetCentricosLoyaltyCampaignsResponse> {
|
|
17568
17582
|
return this.request(
|
|
17569
17583
|
'centricos',
|
|
17570
17584
|
'/centricos/loyalty/campaigns',
|
|
@@ -17575,6 +17589,176 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
17575
17589
|
);
|
|
17576
17590
|
}
|
|
17577
17591
|
|
|
17592
|
+
/**
|
|
17593
|
+
* GET /centricos/loyalty/rewards - List loyalty rewards with filters and pagination for CentricOS
|
|
17594
|
+
*
|
|
17595
|
+
* @param options - additional request options
|
|
17596
|
+
*/
|
|
17597
|
+
get_centricos_loyalty_rewards(
|
|
17598
|
+
options?: {
|
|
17599
|
+
query?: GetCentricosLoyaltyRewardsQuery;
|
|
17600
|
+
} & RequestOptions,
|
|
17601
|
+
): ResponsePromise<GetCentricosLoyaltyRewardsResponse> {
|
|
17602
|
+
return this.request(
|
|
17603
|
+
'centricos',
|
|
17604
|
+
'/centricos/loyalty/rewards',
|
|
17605
|
+
'GET',
|
|
17606
|
+
`/centricos/loyalty/rewards`,
|
|
17607
|
+
null,
|
|
17608
|
+
options,
|
|
17609
|
+
);
|
|
17610
|
+
}
|
|
17611
|
+
|
|
17612
|
+
/**
|
|
17613
|
+
* POST /centricos/loyalty/rewards - Create a loyalty reward with earning rule conditions, associations and milestones for CentricOS
|
|
17614
|
+
*
|
|
17615
|
+
* @param body
|
|
17616
|
+
* @param options - additional request options
|
|
17617
|
+
*/
|
|
17618
|
+
post_centricos_loyalty_reward(
|
|
17619
|
+
body: PostCentricosLoyaltyRewardBody,
|
|
17620
|
+
options?: RequestOptions,
|
|
17621
|
+
): ResponsePromise<PostCentricosLoyaltyRewardResponse> {
|
|
17622
|
+
return this.request(
|
|
17623
|
+
'centricos',
|
|
17624
|
+
'/centricos/loyalty/rewards',
|
|
17625
|
+
'POST',
|
|
17626
|
+
`/centricos/loyalty/rewards`,
|
|
17627
|
+
body,
|
|
17628
|
+
options,
|
|
17629
|
+
);
|
|
17630
|
+
}
|
|
17631
|
+
|
|
17632
|
+
/**
|
|
17633
|
+
* GET /centricos/loyalty/rewards/{id} - Get loyalty reward detail with earning rule conditions, associations and milestones for CentricOS
|
|
17634
|
+
*
|
|
17635
|
+
* @param id
|
|
17636
|
+
* @param options - additional request options
|
|
17637
|
+
*/
|
|
17638
|
+
get_centricos_loyalty_reward(
|
|
17639
|
+
id: string,
|
|
17640
|
+
options?: RequestOptions,
|
|
17641
|
+
): ResponsePromise<GetCentricosLoyaltyRewardResponse> {
|
|
17642
|
+
return this.request(
|
|
17643
|
+
'centricos',
|
|
17644
|
+
'/centricos/loyalty/rewards/{id}',
|
|
17645
|
+
'GET',
|
|
17646
|
+
`/centricos/loyalty/rewards/${id}`,
|
|
17647
|
+
null,
|
|
17648
|
+
options,
|
|
17649
|
+
);
|
|
17650
|
+
}
|
|
17651
|
+
|
|
17652
|
+
/**
|
|
17653
|
+
* PUT /centricos/loyalty/rewards/{id} - Update a loyalty reward and replace its earning rule conditions, associations and milestones for CentricOS
|
|
17654
|
+
*
|
|
17655
|
+
* @param id
|
|
17656
|
+
* @param body
|
|
17657
|
+
* @param options - additional request options
|
|
17658
|
+
*/
|
|
17659
|
+
put_centricos_loyalty_reward(
|
|
17660
|
+
id: string,
|
|
17661
|
+
body: PutCentricosLoyaltyRewardBody,
|
|
17662
|
+
options?: RequestOptions,
|
|
17663
|
+
): ResponsePromise<PutCentricosLoyaltyRewardResponse> {
|
|
17664
|
+
return this.request(
|
|
17665
|
+
'centricos',
|
|
17666
|
+
'/centricos/loyalty/rewards/{id}',
|
|
17667
|
+
'PUT',
|
|
17668
|
+
`/centricos/loyalty/rewards/${id}`,
|
|
17669
|
+
body,
|
|
17670
|
+
options,
|
|
17671
|
+
);
|
|
17672
|
+
}
|
|
17673
|
+
|
|
17674
|
+
/**
|
|
17675
|
+
* PATCH /centricos/loyalty/rewards/{id}/status - Transition loyalty reward status for CentricOS
|
|
17676
|
+
*
|
|
17677
|
+
* @param id
|
|
17678
|
+
* @param body
|
|
17679
|
+
* @param options - additional request options
|
|
17680
|
+
*/
|
|
17681
|
+
patch_centricos_loyalty_reward_status(
|
|
17682
|
+
id: string,
|
|
17683
|
+
body: PatchCentricosLoyaltyRewardStatusBody,
|
|
17684
|
+
options?: RequestOptions,
|
|
17685
|
+
): ResponsePromise<PatchCentricosLoyaltyRewardStatusResponse> {
|
|
17686
|
+
return this.request(
|
|
17687
|
+
'centricos',
|
|
17688
|
+
'/centricos/loyalty/rewards/{id}/status',
|
|
17689
|
+
'PATCH',
|
|
17690
|
+
`/centricos/loyalty/rewards/${id}/status`,
|
|
17691
|
+
body,
|
|
17692
|
+
options,
|
|
17693
|
+
);
|
|
17694
|
+
}
|
|
17695
|
+
|
|
17696
|
+
/**
|
|
17697
|
+
* GET /centricos/loyalty/rewards/{id}/cards - List enrolled customer cards for a loyalty reward for CentricOS
|
|
17698
|
+
*
|
|
17699
|
+
* @param id
|
|
17700
|
+
* @param options - additional request options
|
|
17701
|
+
*/
|
|
17702
|
+
get_centricos_loyalty_reward_cards(
|
|
17703
|
+
id: string,
|
|
17704
|
+
options?: {
|
|
17705
|
+
query?: GetCentricosLoyaltyRewardCardsQuery;
|
|
17706
|
+
} & RequestOptions,
|
|
17707
|
+
): ResponsePromise<GetCentricosLoyaltyRewardCardsResponse> {
|
|
17708
|
+
return this.request(
|
|
17709
|
+
'centricos',
|
|
17710
|
+
'/centricos/loyalty/rewards/{id}/cards',
|
|
17711
|
+
'GET',
|
|
17712
|
+
`/centricos/loyalty/rewards/${id}/cards`,
|
|
17713
|
+
null,
|
|
17714
|
+
options,
|
|
17715
|
+
);
|
|
17716
|
+
}
|
|
17717
|
+
|
|
17718
|
+
/**
|
|
17719
|
+
* GET /centricos/loyalty/rewards/{id}/cards/{customerId} - Get loyalty reward card detail with transaction event history for CentricOS
|
|
17720
|
+
*
|
|
17721
|
+
* @param id
|
|
17722
|
+
* @param customerId
|
|
17723
|
+
* @param options - additional request options
|
|
17724
|
+
*/
|
|
17725
|
+
get_centricos_loyalty_reward_card(
|
|
17726
|
+
id: string,
|
|
17727
|
+
customerId: string,
|
|
17728
|
+
options?: RequestOptions,
|
|
17729
|
+
): ResponsePromise<GetCentricosLoyaltyRewardCardResponse> {
|
|
17730
|
+
return this.request(
|
|
17731
|
+
'centricos',
|
|
17732
|
+
'/centricos/loyalty/rewards/{id}/cards/{customerId}',
|
|
17733
|
+
'GET',
|
|
17734
|
+
`/centricos/loyalty/rewards/${id}/cards/${customerId}`,
|
|
17735
|
+
null,
|
|
17736
|
+
options,
|
|
17737
|
+
);
|
|
17738
|
+
}
|
|
17739
|
+
|
|
17740
|
+
/**
|
|
17741
|
+
* POST /centricos/loyalty/rewards/cards/{cardId}/adjust - Manually adjust points on a loyalty reward card for CentricOS
|
|
17742
|
+
*
|
|
17743
|
+
* @param cardId
|
|
17744
|
+
* @param body
|
|
17745
|
+
* @param options - additional request options
|
|
17746
|
+
*/
|
|
17747
|
+
post_centricos_loyalty_reward_card_adjust(
|
|
17748
|
+
cardId: string,
|
|
17749
|
+
body: PostCentricosLoyaltyRewardCardAdjustBody,
|
|
17750
|
+
options?: RequestOptions,
|
|
17751
|
+
): ResponsePromise<PostCentricosLoyaltyRewardCardAdjustResponse> {
|
|
17752
|
+
return this.request(
|
|
17753
|
+
'centricos',
|
|
17754
|
+
'/centricos/loyalty/rewards/cards/{cardId}/adjust',
|
|
17755
|
+
'POST',
|
|
17756
|
+
`/centricos/loyalty/rewards/cards/${cardId}/adjust`,
|
|
17757
|
+
body,
|
|
17758
|
+
options,
|
|
17759
|
+
);
|
|
17760
|
+
}
|
|
17761
|
+
|
|
17578
17762
|
/**
|
|
17579
17763
|
* GET /tax/v1/health-check - Health Check
|
|
17580
17764
|
*
|
|
@@ -1752,16 +1752,247 @@ export interface CentricosLoyaltyCampaignDTO {
|
|
|
1752
1752
|
redemptionCount: number;
|
|
1753
1753
|
}
|
|
1754
1754
|
|
|
1755
|
-
export interface
|
|
1755
|
+
export interface CentricosCampaignPaginationDTO {
|
|
1756
1756
|
cursor?: string | null;
|
|
1757
1757
|
hasMore: boolean;
|
|
1758
1758
|
limit: number;
|
|
1759
1759
|
}
|
|
1760
1760
|
|
|
1761
|
-
export interface
|
|
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:
|
|
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
|
|
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;
|
package/src/interface/order.ts
CHANGED
|
@@ -63,7 +63,7 @@ export interface CreatePOSOrder {
|
|
|
63
63
|
};
|
|
64
64
|
meta?: {
|
|
65
65
|
// which ui the order was placed on
|
|
66
|
-
source?: 'centric_hub';
|
|
66
|
+
source?: 'centric_hub' | 'time2eat';
|
|
67
67
|
// Override for meta.active for testing purposes
|
|
68
68
|
active_override?: boolean;
|
|
69
69
|
// Centric POS specific metadata
|
|
@@ -80,6 +80,8 @@ export interface CreatePOSOrder {
|
|
|
80
80
|
details?: {
|
|
81
81
|
name?: string;
|
|
82
82
|
order_type?: string;
|
|
83
|
+
// Order number shown on the kitchen display. Kept as sent only when meta.source is time2eat, 1 to 9 characters. Ignored for every other source, which gets a generated number.
|
|
84
|
+
display_id?: string;
|
|
83
85
|
};
|
|
84
86
|
}
|
|
85
87
|
|
|
@@ -237,7 +239,7 @@ export interface Order {
|
|
|
237
239
|
auth_request_id?: string;
|
|
238
240
|
refunds?: RefundTransaction[];
|
|
239
241
|
// which ui the order was placed on
|
|
240
|
-
source?: 'web' | 'mobile' | 'centric_hub';
|
|
242
|
+
source?: 'web' | 'mobile' | 'centric_hub' | 'time2eat';
|
|
241
243
|
// details pertaining to the amount charged on the order
|
|
242
244
|
transaction?: {
|
|
243
245
|
// used in mx orders - cart totals in dollars and meal exchange value (meals)
|