@compassdigital/sdk.typescript 4.156.0 → 4.158.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 +8 -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/announcement.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +10 -8
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +85 -2
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/discount.d.ts +4 -4
- package/lib/interface/discount.d.ts.map +1 -1
- package/lib/messages/commands/SendPushNotificationCommand.d.ts +1 -1
- package/lib/messages/commands/SendPushNotificationCommand.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +15 -0
- package/src/interface/announcement.ts +0 -3
- package/src/interface/centricos.ts +14 -8
- package/src/interface/consumer.ts +143 -3
- package/src/interface/discount.ts +4 -4
- package/src/messages/commands/SendPushNotificationCommand.ts +1 -1
|
@@ -235,7 +235,7 @@ export interface OrderRefundItem {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
export interface OrderCreditCard {
|
|
238
|
-
// The credit card type (Amex, Visa, Mastercard, etc...
|
|
238
|
+
// The credit card type (Amex, Visa, Mastercard, etc...)
|
|
239
239
|
card_type?: string;
|
|
240
240
|
// The last 4 digits of the card number
|
|
241
241
|
last4?: string;
|
|
@@ -267,6 +267,7 @@ export interface OrderMealplan {
|
|
|
267
267
|
id?: string;
|
|
268
268
|
// tender
|
|
269
269
|
tender?: string;
|
|
270
|
+
// mealplan name
|
|
270
271
|
name?: string;
|
|
271
272
|
}
|
|
272
273
|
|
|
@@ -553,7 +554,7 @@ export interface ConsumerDiscountIs {
|
|
|
553
554
|
}
|
|
554
555
|
|
|
555
556
|
export interface ConsumerVoucherifyMetaDataDiscount {
|
|
556
|
-
type:
|
|
557
|
+
type: 'AMOUNT_OFF' | 'PERCENT_OFF';
|
|
557
558
|
amountOff?: number;
|
|
558
559
|
percentOff?: number;
|
|
559
560
|
}
|
|
@@ -582,7 +583,7 @@ export interface ConsumerStackedDiscount {
|
|
|
582
583
|
status?: ConsumerDiscountStatus;
|
|
583
584
|
is?: ConsumerDiscountIs;
|
|
584
585
|
meta?: ConsumerDiscountMeta;
|
|
585
|
-
applied_amount
|
|
586
|
+
applied_amount: number;
|
|
586
587
|
}
|
|
587
588
|
|
|
588
589
|
export interface Discounts {
|
|
@@ -800,6 +801,139 @@ export interface GetCustomerOrdersResponseDTO {
|
|
|
800
801
|
orders: CustomerOrder[];
|
|
801
802
|
}
|
|
802
803
|
|
|
804
|
+
export interface CreateOrderPayment {
|
|
805
|
+
token?: string;
|
|
806
|
+
credit_card?: OrderCreditCard;
|
|
807
|
+
badge_pay?: OrderCashlessPayment;
|
|
808
|
+
stipend?: OrderCashlessPayment;
|
|
809
|
+
voucher?: OrderCashlessPayment;
|
|
810
|
+
coupon_voucher?: OrderCashlessPayment;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
export interface CreateOrderIs {
|
|
814
|
+
in_progress?: boolean;
|
|
815
|
+
ready?: boolean;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export interface CreateOrderMeta {
|
|
819
|
+
// which ui the order was placed on
|
|
820
|
+
source?: 'web' | 'mobile';
|
|
821
|
+
// Override for meta.active for testing purposes
|
|
822
|
+
active_override?: boolean;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export interface CreateOrderDetails {
|
|
826
|
+
name?: string;
|
|
827
|
+
contact_number?: string;
|
|
828
|
+
country_code?: string;
|
|
829
|
+
order_type?: string;
|
|
830
|
+
duration?: string;
|
|
831
|
+
destination?: string;
|
|
832
|
+
// Pickup or delivery instructions
|
|
833
|
+
instructions?: string;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
export interface PostOrderBodyDto {
|
|
837
|
+
// The location brand
|
|
838
|
+
location_brand?: string;
|
|
839
|
+
// The location
|
|
840
|
+
location?: string;
|
|
841
|
+
// The shoppingcart
|
|
842
|
+
shoppingcart?: string;
|
|
843
|
+
payment?: CreateOrderPayment;
|
|
844
|
+
mealplan?: OrderMealplan;
|
|
845
|
+
// User ID
|
|
846
|
+
customer?: string;
|
|
847
|
+
is?: CreateOrderIs;
|
|
848
|
+
meta?: {
|
|
849
|
+
[index: string]: any;
|
|
850
|
+
} & CreateOrderMeta;
|
|
851
|
+
// Pickup (deprecated)
|
|
852
|
+
pickup?: string;
|
|
853
|
+
// Pickup name (deprecated)
|
|
854
|
+
pickup_name?: string;
|
|
855
|
+
// Requested date
|
|
856
|
+
requested_date?: string;
|
|
857
|
+
details?: CreateOrderDetails;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
export interface PlacedOrderMeta {
|
|
861
|
+
// Check-in UUID for frictionless orders
|
|
862
|
+
checkin_uuid?: string;
|
|
863
|
+
// which ui the order was placed on
|
|
864
|
+
source?: 'web' | 'mobile';
|
|
865
|
+
transaction?: OrderTransaction;
|
|
866
|
+
shoppingcart?: OrderMetaShoppingcart;
|
|
867
|
+
// Indicate whether the order is active or inactive
|
|
868
|
+
active?: boolean;
|
|
869
|
+
// Override for meta.active for testing purposes
|
|
870
|
+
active_override?: boolean;
|
|
871
|
+
delivery?: OrderDelivery;
|
|
872
|
+
discount?: OrderDiscount;
|
|
873
|
+
// The type of kds that the brand uses
|
|
874
|
+
type_of_kds?: string;
|
|
875
|
+
// Indicate whether the order is eligible for cancellation
|
|
876
|
+
cancel_eligible?: boolean;
|
|
877
|
+
refunds?: OrderRefundTransaction[];
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
export interface PostOrderResponseDto {
|
|
881
|
+
// Order ID
|
|
882
|
+
id?: string;
|
|
883
|
+
// Brand/location ID
|
|
884
|
+
location_brand?: string;
|
|
885
|
+
// Location ID
|
|
886
|
+
location?: string;
|
|
887
|
+
// Shopping cart ID
|
|
888
|
+
shoppingcart?: string;
|
|
889
|
+
// Payment details
|
|
890
|
+
payment?: Record<string, any>;
|
|
891
|
+
mealplan?: OrderMealplan;
|
|
892
|
+
meal_swipes?: OrderMealSwipes;
|
|
893
|
+
meal_exchange?: OrderMealplan;
|
|
894
|
+
// User ID
|
|
895
|
+
customer?: string;
|
|
896
|
+
is?: OrderIs;
|
|
897
|
+
date?: OrderDate;
|
|
898
|
+
// Pickup (deprecated)
|
|
899
|
+
pickup?: string;
|
|
900
|
+
// Pickup name (deprecated)
|
|
901
|
+
pickup_name?: string;
|
|
902
|
+
// Pickup ID (deprecated)
|
|
903
|
+
pickup_id?: string;
|
|
904
|
+
// Requested date
|
|
905
|
+
requested_date?: string;
|
|
906
|
+
details?: OrderDetails;
|
|
907
|
+
meta?: {
|
|
908
|
+
[index: string]: any;
|
|
909
|
+
} & PlacedOrderMeta;
|
|
910
|
+
issue?: OrderIssue;
|
|
911
|
+
// Past issues
|
|
912
|
+
past_issues?: OrderIssue[];
|
|
913
|
+
// Delivery user
|
|
914
|
+
runner?: string;
|
|
915
|
+
// Reorder eligibility
|
|
916
|
+
reorder_eligibility?:
|
|
917
|
+
| 'eligible'
|
|
918
|
+
| 'order_type_ineligible'
|
|
919
|
+
| 'location_ineligible'
|
|
920
|
+
| 'active_order'
|
|
921
|
+
| 'old_order'
|
|
922
|
+
| 'marketplace_order'
|
|
923
|
+
| 'duplicate_order'
|
|
924
|
+
| 'brand_unavailable'
|
|
925
|
+
| 'menu_unavailable'
|
|
926
|
+
| 'items_unavailable'
|
|
927
|
+
| 'refunded_order'
|
|
928
|
+
| 'modifiers_unavailable'
|
|
929
|
+
| 'modified_items'
|
|
930
|
+
| 'cancelled_order';
|
|
931
|
+
// Refunds
|
|
932
|
+
refunds?: OrderRefundItem[];
|
|
933
|
+
// Latest refunds
|
|
934
|
+
latest_refunds?: OrderRefundItem[];
|
|
935
|
+
}
|
|
936
|
+
|
|
803
937
|
export interface PostReviewOrderItemRequest {
|
|
804
938
|
// rating score
|
|
805
939
|
score: number;
|
|
@@ -1987,6 +2121,12 @@ export interface GetCustomerOrdersQuery {
|
|
|
1987
2121
|
|
|
1988
2122
|
export type GetCustomerOrdersResponse = GetCustomerOrdersResponseDTO;
|
|
1989
2123
|
|
|
2124
|
+
// POST /consumer/order - Create a new order
|
|
2125
|
+
|
|
2126
|
+
export type PostConsumerOrderBody = PostOrderBodyDto;
|
|
2127
|
+
|
|
2128
|
+
export type PostConsumerOrderResponse = PostOrderResponseDto;
|
|
2129
|
+
|
|
1990
2130
|
// POST /consumer/review/order-items - Submit reviews for order items
|
|
1991
2131
|
|
|
1992
2132
|
export type PostReviewOrderItemsBody = PostReviewOrderItemsRequestDTO;
|
|
@@ -14,8 +14,6 @@ export interface DiscountStatus {
|
|
|
14
14
|
export interface DiscountIs {
|
|
15
15
|
badgepayPromo?: boolean;
|
|
16
16
|
mealplanPromo?: boolean;
|
|
17
|
-
decliningBalancePromo?: boolean;
|
|
18
|
-
voucherPromo?: boolean;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
export interface VoucherifyMetaDataDiscount {
|
|
@@ -45,7 +43,8 @@ export interface GetDiscountResponseDTO {
|
|
|
45
43
|
createdBy: string;
|
|
46
44
|
// user id of most recent update
|
|
47
45
|
updatedBy: string;
|
|
48
|
-
sites
|
|
46
|
+
sites?: string[];
|
|
47
|
+
brands?: string[];
|
|
49
48
|
createdAt: string;
|
|
50
49
|
updatedAt: string;
|
|
51
50
|
name: string;
|
|
@@ -110,7 +109,8 @@ export interface DiscountWithEntities {
|
|
|
110
109
|
status: DiscountStatus;
|
|
111
110
|
is?: DiscountIs;
|
|
112
111
|
meta?: DiscountMeta;
|
|
113
|
-
sites
|
|
112
|
+
sites?: string[];
|
|
113
|
+
brands?: string[];
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
export interface GetAllDiscountsResponseDTO {
|