@compassdigital/sdk.typescript 4.341.0 → 4.343.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 +10 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/consumer.d.ts +54 -6
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +4 -0
- package/lib/interface/promo.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +24 -0
- package/src/interface/consumer.ts +93 -6
- package/src/interface/promo.ts +4 -0
|
@@ -1296,9 +1296,9 @@ export interface ConsumerBrand {
|
|
|
1296
1296
|
hours?: ConsumerHours[];
|
|
1297
1297
|
deliveryHours?: ConsumerDeliveryHours[];
|
|
1298
1298
|
style?: {
|
|
1299
|
-
logo?: string
|
|
1300
|
-
main_logo?: string
|
|
1301
|
-
alt_logo?: string
|
|
1299
|
+
logo?: string;
|
|
1300
|
+
main_logo?: string;
|
|
1301
|
+
alt_logo?: string;
|
|
1302
1302
|
};
|
|
1303
1303
|
pos?: string;
|
|
1304
1304
|
terminals?: Record<string, any>[];
|
|
@@ -1397,9 +1397,9 @@ export interface ConsumerGroup {
|
|
|
1397
1397
|
address?: ConsumerAddress;
|
|
1398
1398
|
meta?: Record<string, any>;
|
|
1399
1399
|
style?: {
|
|
1400
|
-
logo?: string
|
|
1401
|
-
main_logo?: string
|
|
1402
|
-
alt_logo?: string
|
|
1400
|
+
logo?: string;
|
|
1401
|
+
main_logo?: string;
|
|
1402
|
+
alt_logo?: string;
|
|
1403
1403
|
};
|
|
1404
1404
|
timezone?: string;
|
|
1405
1405
|
date?: {
|
|
@@ -2853,6 +2853,77 @@ export interface PostConsumerShoppingCartCloneBodyRequest {
|
|
|
2853
2853
|
};
|
|
2854
2854
|
}
|
|
2855
2855
|
|
|
2856
|
+
export interface ConsumerRewardWindowDTO {
|
|
2857
|
+
// campaign start date
|
|
2858
|
+
startsAt: string;
|
|
2859
|
+
// campaign end date
|
|
2860
|
+
endsAt: string;
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2863
|
+
export interface ConsumerNextRewardDTO {
|
|
2864
|
+
// required points to earn the next reward
|
|
2865
|
+
requiredPoints: number;
|
|
2866
|
+
// progress towards the next reward
|
|
2867
|
+
progress: number;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
export interface ConsumerRewardDiscountDTO {
|
|
2871
|
+
// discount type
|
|
2872
|
+
type: 'AMOUNT_OFF' | 'PERCENT_OFF';
|
|
2873
|
+
// percentage off for the discount
|
|
2874
|
+
percentOff?: number;
|
|
2875
|
+
// amount off for the discount
|
|
2876
|
+
amountOff?: number;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
export interface ConsumerRewardDTO {
|
|
2880
|
+
// voucher id
|
|
2881
|
+
voucherId: string;
|
|
2882
|
+
// voucher code
|
|
2883
|
+
voucherCode: string;
|
|
2884
|
+
// campaign id
|
|
2885
|
+
campaignId?: string;
|
|
2886
|
+
// reward name
|
|
2887
|
+
name: string;
|
|
2888
|
+
// reward description
|
|
2889
|
+
description?: string;
|
|
2890
|
+
discount: ConsumerRewardDiscountDTO;
|
|
2891
|
+
// when the voucher was issued
|
|
2892
|
+
issuedAt: string;
|
|
2893
|
+
// points required for this reward
|
|
2894
|
+
requiredPoints: number;
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
export interface ConsumerRewardCampaignDTO {
|
|
2898
|
+
// campaign id
|
|
2899
|
+
campaignId: string;
|
|
2900
|
+
// campaign name
|
|
2901
|
+
name: string;
|
|
2902
|
+
// campaign description
|
|
2903
|
+
description?: string;
|
|
2904
|
+
// associated brands with the campaign
|
|
2905
|
+
associatedBrands?: string[];
|
|
2906
|
+
// campaign status
|
|
2907
|
+
active: boolean;
|
|
2908
|
+
window: ConsumerRewardWindowDTO;
|
|
2909
|
+
// number of points the customer has earned for this campaign
|
|
2910
|
+
customerPoints: number;
|
|
2911
|
+
nextReward: ConsumerNextRewardDTO;
|
|
2912
|
+
// campaign rewards
|
|
2913
|
+
rewards: ConsumerRewardDTO[];
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
export interface GetCustomerRewardsResponseDTO {
|
|
2917
|
+
// customer id
|
|
2918
|
+
customerId: string;
|
|
2919
|
+
// site id
|
|
2920
|
+
siteId: string;
|
|
2921
|
+
// total number of rewards
|
|
2922
|
+
rewardCount: number;
|
|
2923
|
+
// eligible campaigns
|
|
2924
|
+
campaigns: ConsumerRewardCampaignDTO[];
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2856
2927
|
// GET /consumer/v1/health-check
|
|
2857
2928
|
|
|
2858
2929
|
export interface HealthCheckControllerExecuteQuery {
|
|
@@ -3436,3 +3507,19 @@ export interface GetConsumerLocationBrandQuery {
|
|
|
3436
3507
|
}
|
|
3437
3508
|
|
|
3438
3509
|
export type GetConsumerLocationBrandResponse = ConsumerBrand;
|
|
3510
|
+
|
|
3511
|
+
// GET /consumer/site/{id}/rewards - Get customer rewards for a specific site and customer
|
|
3512
|
+
|
|
3513
|
+
export interface GetConsumerCustomerRewardsPath {
|
|
3514
|
+
// Site ID
|
|
3515
|
+
id: string;
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3518
|
+
export interface GetConsumerCustomerRewardsQuery {
|
|
3519
|
+
// Customer ID as Encoded CDL ID
|
|
3520
|
+
customerId?: string;
|
|
3521
|
+
// Graphql query string
|
|
3522
|
+
_query?: string;
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3525
|
+
export type GetConsumerCustomerRewardsResponse = GetCustomerRewardsResponseDTO;
|
package/src/interface/promo.ts
CHANGED
|
@@ -134,6 +134,7 @@ export interface Success {
|
|
|
134
134
|
|
|
135
135
|
export interface PromoValidateRequest {
|
|
136
136
|
code?: string;
|
|
137
|
+
customer_id?: string;
|
|
137
138
|
email?: string;
|
|
138
139
|
app?: string;
|
|
139
140
|
realm?: string;
|
|
@@ -151,6 +152,7 @@ export interface PromoValidateRequest {
|
|
|
151
152
|
|
|
152
153
|
export interface PromoVouchersValidateRequest {
|
|
153
154
|
codes?: string[];
|
|
155
|
+
customer_id?: string;
|
|
154
156
|
email?: string;
|
|
155
157
|
app?: string;
|
|
156
158
|
realm?: string;
|
|
@@ -169,6 +171,7 @@ export interface PromoVouchersValidateRequest {
|
|
|
169
171
|
|
|
170
172
|
export interface PromoRedeemRequest {
|
|
171
173
|
code?: string;
|
|
174
|
+
customer_id?: string;
|
|
172
175
|
email?: string;
|
|
173
176
|
app?: string;
|
|
174
177
|
realm?: string;
|
|
@@ -189,6 +192,7 @@ export interface PromoRedeemRequest {
|
|
|
189
192
|
|
|
190
193
|
export interface PromoRedeemVouchersRequest {
|
|
191
194
|
codes?: string[];
|
|
195
|
+
customer_id?: string;
|
|
192
196
|
email?: string;
|
|
193
197
|
app?: string;
|
|
194
198
|
realm?: string;
|