@compassdigital/sdk.typescript 4.620.0 → 4.621.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 +131 -6
- package/lib/interface/consumer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +24 -0
- package/src/interface/consumer.ts +195 -8
|
@@ -160,6 +160,7 @@ export interface OrderDetails {
|
|
|
160
160
|
order_type?: string;
|
|
161
161
|
duration?: string;
|
|
162
162
|
destination?: string;
|
|
163
|
+
receiptEmail?: string;
|
|
163
164
|
}
|
|
164
165
|
export interface OrderMonetaryValue {
|
|
165
166
|
amount?: number;
|
|
@@ -181,6 +182,10 @@ export interface OrderCashlessPayment {
|
|
|
181
182
|
total?: number;
|
|
182
183
|
name?: string;
|
|
183
184
|
}
|
|
185
|
+
export interface OrderPOSPayment {
|
|
186
|
+
type?: string;
|
|
187
|
+
transaction?: Record<string, any>;
|
|
188
|
+
}
|
|
184
189
|
export interface OrderPayment {
|
|
185
190
|
token?: string;
|
|
186
191
|
credit_card?: OrderCreditCard;
|
|
@@ -189,6 +194,7 @@ export interface OrderPayment {
|
|
|
189
194
|
stipend?: OrderCashlessPayment;
|
|
190
195
|
voucher?: OrderCashlessPayment;
|
|
191
196
|
coupon_voucher?: OrderCashlessPayment;
|
|
197
|
+
pos?: OrderPOSPayment;
|
|
192
198
|
}
|
|
193
199
|
export interface OrderMealplan {
|
|
194
200
|
id?: string;
|
|
@@ -238,8 +244,14 @@ export interface OrderItemWithIssue {
|
|
|
238
244
|
meta?: Record<string, any>;
|
|
239
245
|
options?: OrderedItemOptionGroup[];
|
|
240
246
|
}
|
|
247
|
+
export interface OrderNoRefundMeta {
|
|
248
|
+
reason?: string;
|
|
249
|
+
no_refund_date?: string;
|
|
250
|
+
processed_by?: string;
|
|
251
|
+
}
|
|
241
252
|
export interface OrderIssueMeta {
|
|
242
253
|
created_at?: string;
|
|
254
|
+
no_refund?: OrderNoRefundMeta;
|
|
243
255
|
}
|
|
244
256
|
export interface OrderIssue {
|
|
245
257
|
id?: string;
|
|
@@ -247,6 +259,7 @@ export interface OrderIssue {
|
|
|
247
259
|
reason?: string;
|
|
248
260
|
meta?: OrderIssueMeta;
|
|
249
261
|
type?: string;
|
|
262
|
+
item?: Record<string, any>;
|
|
250
263
|
}
|
|
251
264
|
export interface ShoppingcartSalePrice {
|
|
252
265
|
active?: boolean;
|
|
@@ -600,6 +613,32 @@ export interface CustomerOrder {
|
|
|
600
613
|
export interface GetCustomerOrdersResponseDTO {
|
|
601
614
|
orders: CustomerOrder[];
|
|
602
615
|
}
|
|
616
|
+
export interface CustomerOrderV2 {
|
|
617
|
+
meta?: OrderMeta;
|
|
618
|
+
id?: string;
|
|
619
|
+
reorder_eligibility?: string;
|
|
620
|
+
location_brand?: string;
|
|
621
|
+
location?: string;
|
|
622
|
+
customer?: string;
|
|
623
|
+
date?: OrderDate;
|
|
624
|
+
details?: OrderDetails;
|
|
625
|
+
pickup?: string;
|
|
626
|
+
pickup_name?: string;
|
|
627
|
+
requested_date?: string;
|
|
628
|
+
refunds?: OrderRefundItem[];
|
|
629
|
+
pickup_id?: string;
|
|
630
|
+
payment?: OrderPayment;
|
|
631
|
+
mealplan?: OrderMealplan;
|
|
632
|
+
meal_swipes?: OrderMealSwipes;
|
|
633
|
+
is?: OrderIs;
|
|
634
|
+
issue?: OrderIssue;
|
|
635
|
+
past_issues?: OrderIssue[];
|
|
636
|
+
shoppingcart?: string;
|
|
637
|
+
runner?: string;
|
|
638
|
+
}
|
|
639
|
+
export interface GetCustomerOrdersV2ResponseDTO {
|
|
640
|
+
orders: CustomerOrderV2[];
|
|
641
|
+
}
|
|
603
642
|
export interface GooglePayToken {
|
|
604
643
|
signature?: string;
|
|
605
644
|
protocolVersion?: string;
|
|
@@ -631,12 +670,14 @@ export interface CreateOrderMeta {
|
|
|
631
670
|
export interface CreateOrderDetails {
|
|
632
671
|
name?: string;
|
|
633
672
|
contact_number?: string;
|
|
673
|
+
country_code?: string;
|
|
634
674
|
order_type?: string;
|
|
635
675
|
duration?: string;
|
|
636
676
|
destination?: string;
|
|
637
677
|
instructions?: string;
|
|
638
678
|
}
|
|
639
679
|
export interface PostOrderBodyDto {
|
|
680
|
+
id?: string;
|
|
640
681
|
location_brand?: string;
|
|
641
682
|
location?: string;
|
|
642
683
|
shoppingcart?: string;
|
|
@@ -650,6 +691,38 @@ export interface PostOrderBodyDto {
|
|
|
650
691
|
requested_date?: string;
|
|
651
692
|
details?: CreateOrderDetails;
|
|
652
693
|
}
|
|
694
|
+
export interface OrderDiscountEffect {
|
|
695
|
+
type?: string;
|
|
696
|
+
amount_off?: number;
|
|
697
|
+
percent_off?: number;
|
|
698
|
+
}
|
|
699
|
+
export interface OrderDiscountItem {
|
|
700
|
+
id?: string;
|
|
701
|
+
date?: string;
|
|
702
|
+
result?: boolean;
|
|
703
|
+
discount?: OrderDiscountEffect;
|
|
704
|
+
type?: string;
|
|
705
|
+
original_redemption?: string;
|
|
706
|
+
app?: string;
|
|
707
|
+
name?: string;
|
|
708
|
+
resource_id?: string;
|
|
709
|
+
}
|
|
710
|
+
export interface OrderDiscountsRefundItem {
|
|
711
|
+
source_id?: string;
|
|
712
|
+
quantity?: number;
|
|
713
|
+
price?: number;
|
|
714
|
+
}
|
|
715
|
+
export interface OrderDiscountsRefund {
|
|
716
|
+
app?: string;
|
|
717
|
+
date?: string;
|
|
718
|
+
order_created_at?: string;
|
|
719
|
+
order_id?: string;
|
|
720
|
+
order_items?: OrderDiscountsRefundItem[];
|
|
721
|
+
order_total?: number;
|
|
722
|
+
reason?: string;
|
|
723
|
+
redemption_id?: string;
|
|
724
|
+
result?: boolean;
|
|
725
|
+
}
|
|
653
726
|
export interface PlacedOrderMeta {
|
|
654
727
|
checkin_uuid?: string;
|
|
655
728
|
source?: 'web' | 'mobile' | 'centric_hub';
|
|
@@ -662,6 +735,14 @@ export interface PlacedOrderMeta {
|
|
|
662
735
|
type_of_kds?: string;
|
|
663
736
|
cancel_eligible?: boolean;
|
|
664
737
|
refunds?: OrderRefundTransaction[];
|
|
738
|
+
pickup_instruction?: MultiLanguageLabel;
|
|
739
|
+
market_place_label?: MultiLanguageLabel;
|
|
740
|
+
market_place_description?: MultiLanguageLabel;
|
|
741
|
+
apex_code?: string;
|
|
742
|
+
apex_qr?: string;
|
|
743
|
+
apex_codes?: ApexCodes;
|
|
744
|
+
discounts?: OrderDiscountItem[];
|
|
745
|
+
discounts_refund?: OrderDiscountsRefund;
|
|
665
746
|
}
|
|
666
747
|
export interface PostOrderResponseDTO {
|
|
667
748
|
id?: string;
|
|
@@ -1652,9 +1733,8 @@ export interface GetConsumerUserResponse {
|
|
|
1652
1733
|
export interface ConsumerCashlessTender {
|
|
1653
1734
|
balance?: number;
|
|
1654
1735
|
id?: string;
|
|
1655
|
-
name?: string;
|
|
1656
|
-
total?: number;
|
|
1657
1736
|
tender?: string;
|
|
1737
|
+
name?: string;
|
|
1658
1738
|
type?: 'badge_pay' | 'stipend' | 'voucher' | 'coupon_voucher';
|
|
1659
1739
|
}
|
|
1660
1740
|
export interface ConsumerGetPaymentCashlessResponse {
|
|
@@ -1903,8 +1983,8 @@ export interface ConsumerModifierRequest {
|
|
|
1903
1983
|
quantity?: number;
|
|
1904
1984
|
amount_off_exclusions?: Record<string, any>[];
|
|
1905
1985
|
meta?: ConsumerModifierRequestMeta;
|
|
1906
|
-
|
|
1907
|
-
|
|
1986
|
+
isSelected?: boolean;
|
|
1987
|
+
parentLabel?: ConsumerLabel;
|
|
1908
1988
|
price?: ConsumerPrice;
|
|
1909
1989
|
}
|
|
1910
1990
|
export interface ConsumerModifierGroupRequest {
|
|
@@ -2027,6 +2107,7 @@ export interface PostConsumerShoppingCartResponse {
|
|
|
2027
2107
|
}
|
|
2028
2108
|
export interface PostConsumerPromoValidateRequest {
|
|
2029
2109
|
code?: string;
|
|
2110
|
+
customer_id?: string;
|
|
2030
2111
|
email?: string;
|
|
2031
2112
|
app?: string;
|
|
2032
2113
|
realm?: string;
|
|
@@ -2047,6 +2128,19 @@ export interface ConsumerAppliedDiscount {
|
|
|
2047
2128
|
percent_off?: number;
|
|
2048
2129
|
amount_limit?: number;
|
|
2049
2130
|
}
|
|
2131
|
+
export interface RedeemableResult {
|
|
2132
|
+
discount?: ConsumerAppliedDiscount;
|
|
2133
|
+
}
|
|
2134
|
+
export interface RedeemableOrder {
|
|
2135
|
+
total_applied_discount_amount?: number;
|
|
2136
|
+
}
|
|
2137
|
+
export interface ConsumerRedeemable {
|
|
2138
|
+
status: string;
|
|
2139
|
+
id: string;
|
|
2140
|
+
object: Record<string, any>;
|
|
2141
|
+
result?: RedeemableResult;
|
|
2142
|
+
order?: RedeemableOrder;
|
|
2143
|
+
}
|
|
2050
2144
|
export interface ConsumerVoucher {
|
|
2051
2145
|
provider?: Record<string, any>;
|
|
2052
2146
|
code?: string;
|
|
@@ -2054,12 +2148,34 @@ export interface ConsumerVoucher {
|
|
|
2054
2148
|
discount?: ConsumerAppliedDiscount;
|
|
2055
2149
|
app?: string;
|
|
2056
2150
|
provider_data?: ShoppingcartFPValidationData;
|
|
2151
|
+
stacked_total?: number;
|
|
2152
|
+
redeemables?: ConsumerRedeemable[];
|
|
2153
|
+
stacked_vouchers?: ConsumerRedeemable[];
|
|
2154
|
+
inapplicable_redeemables?: ConsumerRedeemable[];
|
|
2155
|
+
}
|
|
2156
|
+
export interface PromoRedeemShoppingcart {
|
|
2157
|
+
id?: string;
|
|
2158
|
+
date_created?: string;
|
|
2159
|
+
items?: Record<string, any>[];
|
|
2160
|
+
}
|
|
2161
|
+
export interface PromoRedeemTotals {
|
|
2162
|
+
amount?: number;
|
|
2163
|
+
discount?: number;
|
|
2164
|
+
currency?: string;
|
|
2057
2165
|
}
|
|
2058
2166
|
export interface PostConsumerPromoRedeemRequest {
|
|
2059
2167
|
code: string;
|
|
2060
|
-
email
|
|
2061
|
-
app
|
|
2168
|
+
email?: string;
|
|
2169
|
+
app?: string;
|
|
2170
|
+
realm?: string;
|
|
2062
2171
|
location_brand?: string;
|
|
2172
|
+
customer_id?: string;
|
|
2173
|
+
order_id?: string;
|
|
2174
|
+
brand_id?: string;
|
|
2175
|
+
site_id?: string;
|
|
2176
|
+
payment_request_id?: string;
|
|
2177
|
+
shoppingcart?: PromoRedeemShoppingcart;
|
|
2178
|
+
totals?: PromoRedeemTotals;
|
|
2063
2179
|
}
|
|
2064
2180
|
export interface ConsumerRedemption {
|
|
2065
2181
|
id?: string;
|
|
@@ -2923,6 +3039,15 @@ export interface GetCustomerOrdersQuery {
|
|
|
2923
3039
|
reorderEligible?: boolean;
|
|
2924
3040
|
}
|
|
2925
3041
|
export type GetCustomerOrdersResponse = GetCustomerOrdersResponseDTO;
|
|
3042
|
+
export interface GetCustomerOrdersV2Path {
|
|
3043
|
+
userId: string;
|
|
3044
|
+
}
|
|
3045
|
+
export interface GetCustomerOrdersV2Query {
|
|
3046
|
+
start?: number;
|
|
3047
|
+
end?: number;
|
|
3048
|
+
reorderEligible?: boolean;
|
|
3049
|
+
}
|
|
3050
|
+
export type GetCustomerOrdersV2Response = GetCustomerOrdersV2ResponseDTO;
|
|
2926
3051
|
export type PostConsumerOrderBody = PostOrderBodyDto;
|
|
2927
3052
|
export type PostConsumerOrderResponse = PostOrderResponseDTO;
|
|
2928
3053
|
export interface PatchConsumerOrderCancelPath {
|