@compassdigital/sdk.typescript 3.44.3 → 3.45.1
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 +283 -74
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +312 -71
- package/lib/index.js.map +1 -1
- package/lib/interface/menu.d.ts +316 -88
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +11 -12
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +108 -54
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +754 -181
- package/src/interface/location.ts +1 -1
- package/src/interface/menu.ts +522 -129
- package/src/interface/partner.ts +18 -14
- package/src/interface/shoppingcart.ts +127 -54
package/src/interface/partner.ts
CHANGED
|
@@ -186,6 +186,7 @@ export interface ItemResponse {
|
|
|
186
186
|
added_on?: string;
|
|
187
187
|
meal_value?: IntegerValue;
|
|
188
188
|
category?: Label;
|
|
189
|
+
tax_rate?: MonetaryValue;
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
export type MonetaryValue = number;
|
|
@@ -742,22 +743,10 @@ export interface CognitionStore {
|
|
|
742
743
|
longitude?: number;
|
|
743
744
|
}
|
|
744
745
|
|
|
745
|
-
export interface
|
|
746
|
-
|
|
747
|
-
id?: string;
|
|
748
|
-
name?: string;
|
|
749
|
-
code?: string;
|
|
750
|
-
timezone?: string;
|
|
751
|
-
address?: string;
|
|
752
|
-
date?: {
|
|
753
|
-
created?: string;
|
|
754
|
-
modified?: string;
|
|
755
|
-
};
|
|
756
|
-
[index: string]: any;
|
|
746
|
+
export interface Success {
|
|
747
|
+
success?: boolean;
|
|
757
748
|
}
|
|
758
749
|
|
|
759
|
-
export type CoolrImages = any[];
|
|
760
|
-
|
|
761
750
|
// POST /partner/standardcognition/shoppingcart - Calculates a shoppingcart
|
|
762
751
|
|
|
763
752
|
export interface PostPartnerStandardcognitionShoppingcartBody {
|
|
@@ -828,6 +817,21 @@ export interface PostPartnerStandardcognitionMenuRequest extends BaseRequest {
|
|
|
828
817
|
body: PostPartnerStandardcognitionMenuBody;
|
|
829
818
|
}
|
|
830
819
|
|
|
820
|
+
// POST /partner/event/{id} - Send an event from 3rd party to our system
|
|
821
|
+
|
|
822
|
+
export interface PostPartnerEventPath {
|
|
823
|
+
// provider
|
|
824
|
+
id: string;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
export type PostPartnerEventBody = any;
|
|
828
|
+
|
|
829
|
+
export type PostPartnerEventResponse = Success;
|
|
830
|
+
|
|
831
|
+
export interface PostPartnerEventRequest extends BaseRequest, PostPartnerEventPath {
|
|
832
|
+
body: PostPartnerEventBody;
|
|
833
|
+
}
|
|
834
|
+
|
|
831
835
|
// GET /partner/swagger.json
|
|
832
836
|
|
|
833
837
|
export interface GetPartnerSwaggerQuery {
|
|
@@ -75,6 +75,7 @@ export interface ItemResponse {
|
|
|
75
75
|
meal_value?: IntegerValue;
|
|
76
76
|
category?: Label;
|
|
77
77
|
tax_rate?: MonetaryValue;
|
|
78
|
+
label?: Label;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
export interface ModifierGroupRequest {
|
|
@@ -150,35 +151,45 @@ export interface BadgePay {
|
|
|
150
151
|
name?: string;
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
export interface Mealplan {
|
|
155
|
+
id?: string;
|
|
156
|
+
tender?: string;
|
|
157
|
+
total?: MonetaryValue;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface CreditCard {
|
|
161
|
+
card_type?: string;
|
|
162
|
+
last4?: string;
|
|
163
|
+
total?: MonetaryValue;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface DigitalWalletPay {
|
|
167
|
+
wallet_type?: string;
|
|
168
|
+
total?: MonetaryValue;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface MealSwipes {
|
|
172
|
+
id?: string;
|
|
173
|
+
tender?: string;
|
|
174
|
+
tender_type?: string;
|
|
175
|
+
tender_name?: string;
|
|
176
|
+
swipes?: MonetaryValue;
|
|
177
|
+
rate?: MonetaryValue;
|
|
178
|
+
total?: MonetaryValue;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface MealExchange {
|
|
182
|
+
id?: string;
|
|
183
|
+
tender?: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
153
186
|
export interface Payment {
|
|
154
187
|
email?: string;
|
|
155
|
-
mealplan?:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
credit_card?: {
|
|
161
|
-
card_type?: string;
|
|
162
|
-
last4?: string;
|
|
163
|
-
total?: MonetaryValue;
|
|
164
|
-
};
|
|
165
|
-
digital_wallet_pay?: {
|
|
166
|
-
wallet_type?: string;
|
|
167
|
-
total?: MonetaryValue;
|
|
168
|
-
};
|
|
169
|
-
meal_swipes?: {
|
|
170
|
-
id?: string;
|
|
171
|
-
tender?: string;
|
|
172
|
-
tender_type?: string;
|
|
173
|
-
tender_name?: string;
|
|
174
|
-
swipes?: MonetaryValue;
|
|
175
|
-
rate?: MonetaryValue;
|
|
176
|
-
total?: MonetaryValue;
|
|
177
|
-
};
|
|
178
|
-
meal_exchange?: {
|
|
179
|
-
id?: string;
|
|
180
|
-
tender?: string;
|
|
181
|
-
};
|
|
188
|
+
mealplan?: Mealplan;
|
|
189
|
+
credit_card?: CreditCard;
|
|
190
|
+
digital_wallet_pay?: DigitalWalletPay;
|
|
191
|
+
meal_swipes?: MealSwipes;
|
|
192
|
+
meal_exchange?: MealExchange;
|
|
182
193
|
badge_pay?: BadgePay;
|
|
183
194
|
}
|
|
184
195
|
|
|
@@ -239,6 +250,7 @@ export interface ShoppingCartResponse {
|
|
|
239
250
|
percent_off?: MonetaryValue;
|
|
240
251
|
amount?: MonetaryValue;
|
|
241
252
|
app?: string;
|
|
253
|
+
discount?: any;
|
|
242
254
|
};
|
|
243
255
|
//@deprecated
|
|
244
256
|
loyalty?: {
|
|
@@ -256,36 +268,15 @@ export interface ShoppingCartResponse {
|
|
|
256
268
|
amount_off?: MonetaryValue;
|
|
257
269
|
percent_off?: MonetaryValue;
|
|
258
270
|
amount?: MonetaryValue;
|
|
271
|
+
discount?: any;
|
|
259
272
|
};
|
|
260
273
|
payment_method?: {
|
|
261
274
|
email?: string;
|
|
262
|
-
mealplan?:
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
credit_card?: {
|
|
268
|
-
card_type?: string;
|
|
269
|
-
last4?: string;
|
|
270
|
-
total?: MonetaryValue;
|
|
271
|
-
};
|
|
272
|
-
digital_wallet_pay?: {
|
|
273
|
-
wallet_type?: string;
|
|
274
|
-
total?: MonetaryValue;
|
|
275
|
-
};
|
|
276
|
-
meal_swipes?: {
|
|
277
|
-
id?: string;
|
|
278
|
-
tender?: string;
|
|
279
|
-
tender_type?: string;
|
|
280
|
-
tender_name?: string;
|
|
281
|
-
swipes?: MonetaryValue;
|
|
282
|
-
rate?: MonetaryValue;
|
|
283
|
-
total?: MonetaryValue;
|
|
284
|
-
};
|
|
285
|
-
meal_exchange?: {
|
|
286
|
-
id?: string;
|
|
287
|
-
tender?: string;
|
|
288
|
-
};
|
|
275
|
+
mealplan?: Mealplan;
|
|
276
|
+
credit_card?: CreditCard;
|
|
277
|
+
digital_wallet_pay?: DigitalWalletPay;
|
|
278
|
+
meal_swipes?: MealSwipes;
|
|
279
|
+
meal_exchange?: MealExchange;
|
|
289
280
|
badge_pay?: BadgePay;
|
|
290
281
|
};
|
|
291
282
|
taxes?: Taxes;
|
|
@@ -325,6 +316,69 @@ export interface ShoppingCartResponse {
|
|
|
325
316
|
|
|
326
317
|
export type ShoppingCart = ShoppingCartResponse;
|
|
327
318
|
|
|
319
|
+
export interface PaymentMethods {
|
|
320
|
+
mealplan: {
|
|
321
|
+
tenders: Tender[];
|
|
322
|
+
};
|
|
323
|
+
badge_pay: {
|
|
324
|
+
tenders: {
|
|
325
|
+
balance?: MonetaryValue;
|
|
326
|
+
id: string;
|
|
327
|
+
// name associated with badgepay tender, stored in site public config
|
|
328
|
+
name?: string;
|
|
329
|
+
is: {
|
|
330
|
+
eligible: boolean;
|
|
331
|
+
};
|
|
332
|
+
}[];
|
|
333
|
+
};
|
|
334
|
+
credit_cards: {
|
|
335
|
+
data: {
|
|
336
|
+
billing_address?: {
|
|
337
|
+
postal_code?: string;
|
|
338
|
+
};
|
|
339
|
+
card_type?: string;
|
|
340
|
+
expiry?: {
|
|
341
|
+
month?: number;
|
|
342
|
+
year?: number;
|
|
343
|
+
};
|
|
344
|
+
is: {
|
|
345
|
+
eligible: boolean;
|
|
346
|
+
preferred?: boolean;
|
|
347
|
+
};
|
|
348
|
+
masked_card_number?: string;
|
|
349
|
+
name_on_card?: string;
|
|
350
|
+
nickname?: string;
|
|
351
|
+
token: string;
|
|
352
|
+
token_expiration_date?: string;
|
|
353
|
+
}[];
|
|
354
|
+
};
|
|
355
|
+
digital_wallet_pay: {
|
|
356
|
+
applewallet: {
|
|
357
|
+
is: {
|
|
358
|
+
eligible: boolean;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
googlewallet: {
|
|
362
|
+
is: {
|
|
363
|
+
eligible: boolean;
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export interface Tender {
|
|
370
|
+
// tender
|
|
371
|
+
id: string;
|
|
372
|
+
name?: string;
|
|
373
|
+
balance?: MonetaryValue;
|
|
374
|
+
type: string;
|
|
375
|
+
is: {
|
|
376
|
+
eligible: boolean;
|
|
377
|
+
validated?: boolean;
|
|
378
|
+
};
|
|
379
|
+
currency?: string;
|
|
380
|
+
}
|
|
381
|
+
|
|
328
382
|
export interface Label {
|
|
329
383
|
en?: string;
|
|
330
384
|
fr?: string;
|
|
@@ -461,6 +515,25 @@ export interface PutShoppingcartCartPaymentRequest
|
|
|
461
515
|
body: PutShoppingcartCartPaymentBody;
|
|
462
516
|
}
|
|
463
517
|
|
|
518
|
+
// GET /shoppingcart/{id}/paymentmethods - Get a list of payment methods for cart
|
|
519
|
+
|
|
520
|
+
export interface GetShoppingcartPaymentMethodsPath {
|
|
521
|
+
// Shopping cart ID
|
|
522
|
+
id: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface GetShoppingcartPaymentMethodsQuery {
|
|
526
|
+
// Graphql query string
|
|
527
|
+
_query?: string;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export type GetShoppingcartPaymentMethodsResponse = PaymentMethods;
|
|
531
|
+
|
|
532
|
+
export interface GetShoppingcartPaymentMethodsRequest
|
|
533
|
+
extends BaseRequest,
|
|
534
|
+
RequestQuery<GetShoppingcartPaymentMethodsQuery>,
|
|
535
|
+
GetShoppingcartPaymentMethodsPath {}
|
|
536
|
+
|
|
464
537
|
// PUT /shoppingcart/{id}/order/ - Store information about the order created with this shopping cart
|
|
465
538
|
|
|
466
539
|
export interface PutShoppingcartCartOrderPath {
|