@compassdigital/sdk.typescript 4.434.0 → 4.436.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/centricos.d.ts +65 -0
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +35 -0
- package/lib/interface/consumer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +22 -0
- package/src/interface/centricos.ts +99 -0
- package/src/interface/consumer.ts +68 -0
|
@@ -294,6 +294,57 @@ export interface CentricDiscountChannelConfig {
|
|
|
294
294
|
agilysys: boolean;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
+
export interface CentricItem {
|
|
298
|
+
id: string;
|
|
299
|
+
name: string;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface CentricCategory {
|
|
303
|
+
id: string;
|
|
304
|
+
name: string;
|
|
305
|
+
items: CentricItem[];
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface CentricMenu {
|
|
309
|
+
id: string;
|
|
310
|
+
name: string;
|
|
311
|
+
categories: CentricCategory[];
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface CentricStation {
|
|
315
|
+
id: string;
|
|
316
|
+
name: string;
|
|
317
|
+
menus?: CentricMenu[];
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export interface CentricSite {
|
|
321
|
+
id: string;
|
|
322
|
+
name: string;
|
|
323
|
+
stations: CentricStation[];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export interface CentricMenuBrand {
|
|
327
|
+
id: string;
|
|
328
|
+
name: string;
|
|
329
|
+
menus: CentricMenu[];
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface CentricItemLevelConfigDetails {
|
|
333
|
+
// minimum number of items to satisfy the bundle
|
|
334
|
+
minimum: number;
|
|
335
|
+
bundleGroupName?: string;
|
|
336
|
+
sites?: CentricSite[];
|
|
337
|
+
menuBrands?: CentricMenuBrand[];
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export interface CentricItemLevelConfig {
|
|
341
|
+
// details of the item level config
|
|
342
|
+
details: CentricItemLevelConfigDetails[];
|
|
343
|
+
globalMenuGroupId?: string;
|
|
344
|
+
globalMenuGroupName?: string;
|
|
345
|
+
sectorName?: string;
|
|
346
|
+
}
|
|
347
|
+
|
|
297
348
|
export interface CentricVoucherifyMetaDataDiscount {
|
|
298
349
|
// The type of the voucherify discount
|
|
299
350
|
type: 'AMOUNT_OFF' | 'PERCENT_OFF';
|
|
@@ -324,12 +375,20 @@ export interface PutDiscountVoucherifyRequestDiscount {
|
|
|
324
375
|
channelConfig: CentricDiscountChannelConfig;
|
|
325
376
|
// what the discount applies to
|
|
326
377
|
appliesTo: 'order' | 'items';
|
|
378
|
+
// item level config of the discount
|
|
379
|
+
itemLevelConfig?: CentricItemLevelConfig;
|
|
327
380
|
// Voucherify metadata
|
|
328
381
|
meta?: CentricVoucherifyMetaDataDiscount;
|
|
329
382
|
// discount schedule
|
|
330
383
|
schedule?: CentricDiscountSchedule;
|
|
331
384
|
// discount active status flag
|
|
332
385
|
active?: boolean;
|
|
386
|
+
// type of the discount
|
|
387
|
+
type?: 'Total Order' | 'Single Items' | 'Bundle';
|
|
388
|
+
// number of sites associated with the discount
|
|
389
|
+
siteCount?: number;
|
|
390
|
+
// number of brands associated with the discount
|
|
391
|
+
brandCount?: number;
|
|
333
392
|
is?: CentricDiscountIs;
|
|
334
393
|
id?: string;
|
|
335
394
|
}
|
|
@@ -367,6 +426,14 @@ export interface DiscountResponseDTO {
|
|
|
367
426
|
channelConfig: CentricDiscountChannelConfig;
|
|
368
427
|
// what the discount applies to
|
|
369
428
|
appliesTo: 'order' | 'items';
|
|
429
|
+
// type of the discount
|
|
430
|
+
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
431
|
+
// item level config of the discount
|
|
432
|
+
itemLevelConfig?: CentricItemLevelConfig;
|
|
433
|
+
// number of sites associated with the discount
|
|
434
|
+
siteCount: number;
|
|
435
|
+
// number of brands associated with the discount
|
|
436
|
+
brandCount: number;
|
|
370
437
|
// Voucherify metadata
|
|
371
438
|
meta?: CentricVoucherifyMetaDataDiscount;
|
|
372
439
|
id: string;
|
|
@@ -419,6 +486,14 @@ export interface PutDiscountVoucherifyPublishResponseDTO {
|
|
|
419
486
|
channelConfig: CentricDiscountChannelConfig;
|
|
420
487
|
// what the discount applies to
|
|
421
488
|
appliesTo: 'order' | 'items';
|
|
489
|
+
// type of the discount
|
|
490
|
+
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
491
|
+
// item level config of the discount
|
|
492
|
+
itemLevelConfig?: CentricItemLevelConfig;
|
|
493
|
+
// number of sites associated with the discount
|
|
494
|
+
siteCount: number;
|
|
495
|
+
// number of brands associated with the discount
|
|
496
|
+
brandCount: number;
|
|
422
497
|
// Voucherify metadata
|
|
423
498
|
meta?: CentricDiscountMeta;
|
|
424
499
|
// List of sites where discount is published
|
|
@@ -447,6 +522,14 @@ export interface DiscountDTO {
|
|
|
447
522
|
channelConfig: CentricDiscountChannelConfig;
|
|
448
523
|
// what the discount applies to
|
|
449
524
|
appliesTo: 'order' | 'items';
|
|
525
|
+
// type of the discount
|
|
526
|
+
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
527
|
+
// item level config of the discount
|
|
528
|
+
itemLevelConfig?: CentricItemLevelConfig;
|
|
529
|
+
// number of sites associated with the discount
|
|
530
|
+
siteCount: number;
|
|
531
|
+
// number of brands associated with the discount
|
|
532
|
+
brandCount: number;
|
|
450
533
|
id: string;
|
|
451
534
|
createdAt: string;
|
|
452
535
|
updatedAt: string;
|
|
@@ -495,6 +578,14 @@ export interface PostDiscountActiveResponseDTO {
|
|
|
495
578
|
channelConfig: CentricDiscountChannelConfig;
|
|
496
579
|
// what the discount applies to
|
|
497
580
|
appliesTo: 'order' | 'items';
|
|
581
|
+
// type of the discount
|
|
582
|
+
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
583
|
+
// item level config of the discount
|
|
584
|
+
itemLevelConfig?: CentricItemLevelConfig;
|
|
585
|
+
// number of sites associated with the discount
|
|
586
|
+
siteCount: number;
|
|
587
|
+
// number of brands associated with the discount
|
|
588
|
+
brandCount: number;
|
|
498
589
|
id: string;
|
|
499
590
|
createdAt: string;
|
|
500
591
|
updatedAt: string;
|
|
@@ -516,6 +607,14 @@ export interface GetDiscountsDiscountResponseDTO {
|
|
|
516
607
|
channelConfig: CentricDiscountChannelConfig;
|
|
517
608
|
// what the discount applies to
|
|
518
609
|
appliesTo: 'order' | 'items';
|
|
610
|
+
// type of the discount
|
|
611
|
+
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
612
|
+
// item level config of the discount
|
|
613
|
+
itemLevelConfig?: CentricItemLevelConfig;
|
|
614
|
+
// number of sites associated with the discount
|
|
615
|
+
siteCount: number;
|
|
616
|
+
// number of brands associated with the discount
|
|
617
|
+
brandCount: number;
|
|
519
618
|
sites: string[];
|
|
520
619
|
brands: string[];
|
|
521
620
|
id: string;
|
|
@@ -2318,6 +2318,68 @@ export interface ConsumerGetPaymentTokenResponse {
|
|
|
2318
2318
|
sessionKey?: string;
|
|
2319
2319
|
}
|
|
2320
2320
|
|
|
2321
|
+
export interface TokenInfoDto {
|
|
2322
|
+
// Payment token
|
|
2323
|
+
token?: string;
|
|
2324
|
+
// Masked account number
|
|
2325
|
+
accountNumberMasked?: string;
|
|
2326
|
+
// Card expiration month
|
|
2327
|
+
cardExpirationMonth?: string;
|
|
2328
|
+
// Card expiration year
|
|
2329
|
+
cardExpirationYear?: string;
|
|
2330
|
+
// Card brand
|
|
2331
|
+
brand?: string;
|
|
2332
|
+
// POS card type
|
|
2333
|
+
posCardType?: string;
|
|
2334
|
+
// Card type
|
|
2335
|
+
cardType?: string;
|
|
2336
|
+
// Token expiration
|
|
2337
|
+
tokenExpiration?: string;
|
|
2338
|
+
// POS data
|
|
2339
|
+
posData?: string;
|
|
2340
|
+
// New token
|
|
2341
|
+
newToken?: string;
|
|
2342
|
+
// Session key
|
|
2343
|
+
sessionKey?: string;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
export interface PostConsumerPaymentTokenBody {
|
|
2347
|
+
// Token information
|
|
2348
|
+
tokenInfo: TokenInfoDto;
|
|
2349
|
+
// Name on credit card
|
|
2350
|
+
nameOnCard: string;
|
|
2351
|
+
// CDL Site Id
|
|
2352
|
+
siteId: string;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
export interface BillingAddressDto {
|
|
2356
|
+
// Postal code
|
|
2357
|
+
postalCode?: string;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
export interface PostConsumerPaymentTokenResponse {
|
|
2361
|
+
// Masked card number
|
|
2362
|
+
maskedCardNumber?: string;
|
|
2363
|
+
// Card type
|
|
2364
|
+
cardType?: string;
|
|
2365
|
+
// Card nickname
|
|
2366
|
+
nickname?: string;
|
|
2367
|
+
// Is preferred card
|
|
2368
|
+
isPreferred?: boolean;
|
|
2369
|
+
// Card expiry year
|
|
2370
|
+
expiryYear?: number;
|
|
2371
|
+
// Card expiry month
|
|
2372
|
+
expiryMonth?: number;
|
|
2373
|
+
// Name on card
|
|
2374
|
+
nameOnCard?: string;
|
|
2375
|
+
// Payment token
|
|
2376
|
+
token?: string;
|
|
2377
|
+
// Token expiration date
|
|
2378
|
+
tokenExpirationDate?: string;
|
|
2379
|
+
// Billing address
|
|
2380
|
+
billingAddress?: BillingAddressDto;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2321
2383
|
export interface PromoDetails {
|
|
2322
2384
|
code?: string;
|
|
2323
2385
|
provider?: Record<string, any>;
|
|
@@ -3768,6 +3830,12 @@ export interface GetPaymentTokenConsumerQuery {
|
|
|
3768
3830
|
|
|
3769
3831
|
export type GetPaymentTokenConsumerResponse = ConsumerGetPaymentTokenResponse;
|
|
3770
3832
|
|
|
3833
|
+
// POST /consumer/payment/token - Save payment token to user profile
|
|
3834
|
+
|
|
3835
|
+
export type PostConsumerPaymentTokenBody$0 = PostConsumerPaymentTokenBody;
|
|
3836
|
+
|
|
3837
|
+
export type PostConsumerPaymentTokenResponse$0 = PostConsumerPaymentTokenResponse;
|
|
3838
|
+
|
|
3771
3839
|
// GET /consumer/shoppingcart/{id} - Get a shopping cart by ID
|
|
3772
3840
|
|
|
3773
3841
|
export interface GetConsumerShoppingcartPath {
|