@compassdigital/sdk.typescript 4.791.0 → 4.793.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 +24 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +30 -3
- package/lib/index.js.map +1 -1
- package/lib/interface/centricos.d.ts +58 -6
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/config.d.ts +45 -11
- package/lib/interface/config.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +70 -6
- package/src/interface/centricos.ts +104 -9
- package/src/interface/config.ts +60 -11
|
@@ -774,7 +774,7 @@ export interface CentricDiscountSchedule {
|
|
|
774
774
|
endTime: string;
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
-
export interface
|
|
777
|
+
export interface PutCentricDiscountRequestDiscount {
|
|
778
778
|
// name of the discount
|
|
779
779
|
name: string;
|
|
780
780
|
// Discount method configuration
|
|
@@ -784,7 +784,7 @@ export interface PutDiscountVoucherifyRequestDiscount {
|
|
|
784
784
|
// item level config of the discount
|
|
785
785
|
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
786
786
|
is?: CentricDiscountIs;
|
|
787
|
-
//
|
|
787
|
+
// discount metadata
|
|
788
788
|
meta?: CentricVoucherifyMetaDataDiscount;
|
|
789
789
|
// discount schedule
|
|
790
790
|
schedule?: CentricDiscountSchedule;
|
|
@@ -845,9 +845,9 @@ export interface DiscountBrand {
|
|
|
845
845
|
meta: DiscountBrandMeta;
|
|
846
846
|
}
|
|
847
847
|
|
|
848
|
-
export interface
|
|
848
|
+
export interface PutCentricDiscountRequestDTO {
|
|
849
849
|
// Discount to update
|
|
850
|
-
discount:
|
|
850
|
+
discount: PutCentricDiscountRequestDiscount;
|
|
851
851
|
// List of sites with metadata
|
|
852
852
|
sites?: DiscountSite[];
|
|
853
853
|
// List of brands with metadata
|
|
@@ -882,7 +882,7 @@ export interface DiscountResponseDTO {
|
|
|
882
882
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
883
883
|
// item level config of the discount
|
|
884
884
|
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
885
|
-
//
|
|
885
|
+
// discount metadata
|
|
886
886
|
meta?: CentricVoucherifyMetaDataDiscount;
|
|
887
887
|
id: string;
|
|
888
888
|
createdAt: string;
|
|
@@ -891,7 +891,7 @@ export interface DiscountResponseDTO {
|
|
|
891
891
|
schedule?: Record<string, any>;
|
|
892
892
|
}
|
|
893
893
|
|
|
894
|
-
export interface
|
|
894
|
+
export interface PutCentricDiscountResponseDTO {
|
|
895
895
|
// Discount details
|
|
896
896
|
discount: DiscountResponseDTO;
|
|
897
897
|
// List of sites with metadata
|
|
@@ -915,6 +915,73 @@ export interface CentricDiscountMeta {
|
|
|
915
915
|
provider: CentricMetaProvider;
|
|
916
916
|
}
|
|
917
917
|
|
|
918
|
+
export interface PutCentricDiscountPublishResponseDTO {
|
|
919
|
+
// user is of discount creator
|
|
920
|
+
createdBy: string;
|
|
921
|
+
// last user who updated the discount
|
|
922
|
+
updatedBy: string;
|
|
923
|
+
// name of the discount
|
|
924
|
+
name: string;
|
|
925
|
+
// status of the discount
|
|
926
|
+
status: CentricDiscountStatus;
|
|
927
|
+
// Discount method configuration
|
|
928
|
+
method: CentricDiscountMethod;
|
|
929
|
+
// channel config of the discount
|
|
930
|
+
channelConfig: CentricDiscountChannelConfig;
|
|
931
|
+
// type of the discount
|
|
932
|
+
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
933
|
+
// item level config of the discount
|
|
934
|
+
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
935
|
+
// discount metadata
|
|
936
|
+
meta?: CentricDiscountMeta;
|
|
937
|
+
// List of sites where discount is published
|
|
938
|
+
sites?: CentricDiscountEntityBase[];
|
|
939
|
+
id: string;
|
|
940
|
+
createdAt: string;
|
|
941
|
+
updatedAt: string;
|
|
942
|
+
is?: CentricDiscountIs;
|
|
943
|
+
schedule?: Record<string, any>;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
export interface PutDiscountVoucherifyRequestDiscount {
|
|
947
|
+
// name of the discount
|
|
948
|
+
name: string;
|
|
949
|
+
// Discount method configuration
|
|
950
|
+
method: CentricDiscountMethod;
|
|
951
|
+
// channel config of the discount
|
|
952
|
+
channelConfig: CentricDiscountChannelConfig;
|
|
953
|
+
// item level config of the discount
|
|
954
|
+
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
955
|
+
is?: CentricDiscountIs;
|
|
956
|
+
// discount metadata
|
|
957
|
+
meta?: CentricVoucherifyMetaDataDiscount;
|
|
958
|
+
// discount schedule
|
|
959
|
+
schedule?: CentricDiscountSchedule;
|
|
960
|
+
id?: string;
|
|
961
|
+
// discount active status flag
|
|
962
|
+
active?: boolean;
|
|
963
|
+
// type of the discount
|
|
964
|
+
type?: 'Total Order' | 'Single Items' | 'Bundle';
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
export interface PutDiscountVoucherifyRequestDTO {
|
|
968
|
+
// Discount to update
|
|
969
|
+
discount: PutDiscountVoucherifyRequestDiscount;
|
|
970
|
+
// List of sites with metadata
|
|
971
|
+
sites?: DiscountSite[];
|
|
972
|
+
// List of brands with metadata
|
|
973
|
+
brands?: DiscountBrand[];
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export interface PutDiscountVoucherifyResponseDTO {
|
|
977
|
+
// Discount details
|
|
978
|
+
discount: DiscountResponseDTO;
|
|
979
|
+
// List of sites with metadata
|
|
980
|
+
sites: DiscountSite[];
|
|
981
|
+
// List of brands with metadata
|
|
982
|
+
brands: DiscountBrand[];
|
|
983
|
+
}
|
|
984
|
+
|
|
918
985
|
export interface PutDiscountVoucherifyPublishResponseDTO {
|
|
919
986
|
// user is of discount creator
|
|
920
987
|
createdBy: string;
|
|
@@ -943,6 +1010,10 @@ export interface PutDiscountVoucherifyPublishResponseDTO {
|
|
|
943
1010
|
schedule?: Record<string, any>;
|
|
944
1011
|
}
|
|
945
1012
|
|
|
1013
|
+
export interface DeleteCentricDiscountResponseDTO {
|
|
1014
|
+
success: boolean;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
946
1017
|
export interface DeleteDiscountsVoucherifyResponseDTO {
|
|
947
1018
|
success: boolean;
|
|
948
1019
|
}
|
|
@@ -1734,6 +1805,21 @@ export interface DeleteCentricosStationIntegrationPath {
|
|
|
1734
1805
|
|
|
1735
1806
|
export type DeleteCentricosStationIntegrationResponse = DeleteStationIntegrationResponse;
|
|
1736
1807
|
|
|
1808
|
+
// PUT /centricos/discount - Add or Update a discount and assign it to multiple sites
|
|
1809
|
+
|
|
1810
|
+
export type PutCentricosDiscountBody = PutCentricDiscountRequestDTO;
|
|
1811
|
+
|
|
1812
|
+
export type PutCentricosDiscountResponse = PutCentricDiscountResponseDTO;
|
|
1813
|
+
|
|
1814
|
+
// PUT /centricos/discount/{id}/publish - Update and publish a discount and assign it to multiple sites
|
|
1815
|
+
|
|
1816
|
+
export interface PutCentricosDiscountPublishPath {
|
|
1817
|
+
// Discount ID
|
|
1818
|
+
id: string;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
export type PutCentricosDiscountPublishResponse = PutCentricDiscountPublishResponseDTO;
|
|
1822
|
+
|
|
1737
1823
|
// PUT /centricos/discount/voucherify - Add or Update a voucherify discount and assign it to multiple sites
|
|
1738
1824
|
|
|
1739
1825
|
export type PutCentricosDiscountVoucherifyBody = PutDiscountVoucherifyRequestDTO;
|
|
@@ -1749,14 +1835,14 @@ export interface PutCentricosDiscountVoucherifyPublishPath {
|
|
|
1749
1835
|
|
|
1750
1836
|
export type PutCentricosDiscountVoucherifyPublishResponse = PutDiscountVoucherifyPublishResponseDTO;
|
|
1751
1837
|
|
|
1752
|
-
// DELETE /centricos/discount/{id}
|
|
1838
|
+
// DELETE /centricos/discount/{id} - Delete a discount and all of its entity associations
|
|
1753
1839
|
|
|
1754
|
-
export interface
|
|
1840
|
+
export interface DeleteCentricosDiscountPath {
|
|
1755
1841
|
// Discount ID
|
|
1756
1842
|
id: string;
|
|
1757
1843
|
}
|
|
1758
1844
|
|
|
1759
|
-
export type
|
|
1845
|
+
export type DeleteCentricosDiscountResponse = DeleteCentricDiscountResponseDTO;
|
|
1760
1846
|
|
|
1761
1847
|
// GET /centricos/discount/{id} - Get discount information by ID
|
|
1762
1848
|
|
|
@@ -1767,6 +1853,15 @@ export interface GetCentricosDiscountPath {
|
|
|
1767
1853
|
|
|
1768
1854
|
export type GetCentricosDiscountResponse = GetDiscountResponseDTO;
|
|
1769
1855
|
|
|
1856
|
+
// DELETE /centricos/discount/{id}/voucherify - Delete a discount from voucherify and all of its entity associations
|
|
1857
|
+
|
|
1858
|
+
export interface DeleteCentricosDiscountsVoucherifyPath {
|
|
1859
|
+
// Discount ID
|
|
1860
|
+
id: string;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
export type DeleteCentricosDiscountsVoucherifyResponse = DeleteDiscountsVoucherifyResponseDTO;
|
|
1864
|
+
|
|
1770
1865
|
// GET /centricos/discounts - Get discounts with pagination and filtering
|
|
1771
1866
|
|
|
1772
1867
|
export interface GetCentricosDiscountsQuery {
|
package/src/interface/config.ts
CHANGED
|
@@ -111,7 +111,7 @@ export interface PublicMealplanConfig {
|
|
|
111
111
|
fr?: string;
|
|
112
112
|
};
|
|
113
113
|
// Provider terminal id. Some site (group) configs store this as an array of strings instead of a scalar.
|
|
114
|
-
terminal_id?: string;
|
|
114
|
+
terminal_id?: string | string[];
|
|
115
115
|
tax_exempt?: boolean;
|
|
116
116
|
// Meal-exchange brand flag (station configs).
|
|
117
117
|
isBrandMX?: boolean;
|
|
@@ -156,6 +156,8 @@ export interface PrivateMealplanConfig {
|
|
|
156
156
|
port?: number;
|
|
157
157
|
vendor_number?: number;
|
|
158
158
|
client?: string;
|
|
159
|
+
// Blackboard eAccounts institution uuid used for meal-plan SSO. Spelled in camelCase unlike its siblings; that is the stored key.
|
|
160
|
+
institutionId?: string;
|
|
159
161
|
restricted?: KeystoreRestricted;
|
|
160
162
|
};
|
|
161
163
|
}
|
|
@@ -202,6 +204,8 @@ export interface Tender {
|
|
|
202
204
|
hours?: string;
|
|
203
205
|
}[];
|
|
204
206
|
tender_number?: string;
|
|
207
|
+
// Cashless tender discriminator (`badge_pay`, `stipend`, `voucher`, `coupon_voucher`). Carried alongside `type` rather than replacing it.
|
|
208
|
+
tender_type?: string;
|
|
205
209
|
type?: string;
|
|
206
210
|
id?: string;
|
|
207
211
|
tax_exempt?: boolean;
|
|
@@ -266,6 +270,8 @@ export interface PublicStationConfig {
|
|
|
266
270
|
// Cashless provider account id; used as the tender lookup key at checkout.
|
|
267
271
|
id?: string;
|
|
268
272
|
};
|
|
273
|
+
// Minutes a checked-in order stays active before it is treated as stale. The order service falls back to a built-in default when this is unset.
|
|
274
|
+
checkin_buffer_time?: number;
|
|
269
275
|
// Named drop-off locations offered for delivery orders.
|
|
270
276
|
delivery_destinations?: string[];
|
|
271
277
|
// Drop-off locations that use automatic timeslot assignment.
|
|
@@ -305,9 +311,9 @@ export interface PublicStationConfig {
|
|
|
305
311
|
payment?: {
|
|
306
312
|
freedompay?: {
|
|
307
313
|
// FreedomPay store/terminal identifier.
|
|
308
|
-
freedompay_store_id?:
|
|
314
|
+
freedompay_store_id?: string;
|
|
309
315
|
// FreedomPay store/terminal identifier.
|
|
310
|
-
freedompay_terminal_id?:
|
|
316
|
+
freedompay_terminal_id?: string;
|
|
311
317
|
};
|
|
312
318
|
};
|
|
313
319
|
phone_number?: string;
|
|
@@ -334,6 +340,10 @@ export interface PublicStationConfig {
|
|
|
334
340
|
show_instructions?: boolean;
|
|
335
341
|
// Whether only a single fulfillment timeslot is offered.
|
|
336
342
|
show_single_timeslot?: boolean;
|
|
343
|
+
// Per-feature kill switch honoured by the web client only; the mobile apps ignore it.
|
|
344
|
+
web_features_disabled?: {
|
|
345
|
+
delivery?: boolean;
|
|
346
|
+
};
|
|
337
347
|
}
|
|
338
348
|
|
|
339
349
|
export interface PrivateStationConfig {
|
|
@@ -352,6 +362,8 @@ export interface PrivateStationConfig {
|
|
|
352
362
|
type?: string;
|
|
353
363
|
value?: number;
|
|
354
364
|
};
|
|
365
|
+
// Inbox that receives order-dispute notifications for this station, overriding the service-wide default. Distinct from `email`.
|
|
366
|
+
dispute_email?: string;
|
|
355
367
|
// Operator/admin notification email.
|
|
356
368
|
email?: string;
|
|
357
369
|
// Payment methods to reject or hide at checkout.
|
|
@@ -364,6 +376,12 @@ export interface PrivateStationConfig {
|
|
|
364
376
|
meal_swipes?: string[];
|
|
365
377
|
mealplan?: string[];
|
|
366
378
|
};
|
|
379
|
+
// Promo codes that cannot be redeemed at this station.
|
|
380
|
+
excluded_promocodes?: string[];
|
|
381
|
+
// Frictionless (scan-and-go / just-walk-out) settings for this station.
|
|
382
|
+
frictionless?: {
|
|
383
|
+
promo_code?: string;
|
|
384
|
+
};
|
|
367
385
|
id?: string;
|
|
368
386
|
// Whether guest check-in is enabled.
|
|
369
387
|
is_checkin_enabled?: boolean;
|
|
@@ -434,9 +452,12 @@ export interface PublicSiteConfig {
|
|
|
434
452
|
badge_pay?: {
|
|
435
453
|
id?: string;
|
|
436
454
|
name?: string;
|
|
455
|
+
tax_exempt?: boolean;
|
|
437
456
|
type?: string;
|
|
438
457
|
webview?: string;
|
|
439
458
|
};
|
|
459
|
+
// Whether the customer is prevented from choosing a timeslot.
|
|
460
|
+
block_timeslot_select?: boolean;
|
|
440
461
|
// Cashless tender configuration for the site.
|
|
441
462
|
cashless?: {
|
|
442
463
|
id?: string;
|
|
@@ -450,6 +471,17 @@ export interface PublicSiteConfig {
|
|
|
450
471
|
voucher_webview?: string;
|
|
451
472
|
webview?: string;
|
|
452
473
|
};
|
|
474
|
+
// Domain-based tax exemption: orders from these email domains are treated as tax-exempt.
|
|
475
|
+
email_tax_exempt?: {
|
|
476
|
+
domains?: string[];
|
|
477
|
+
enabled?: boolean;
|
|
478
|
+
};
|
|
479
|
+
// Whether frictionless (scan-and-go / just-walk-out) ordering is offered.
|
|
480
|
+
frictionless_supported?: boolean;
|
|
481
|
+
// Whether the entity has a Kitchen Display System.
|
|
482
|
+
has_kds?: boolean;
|
|
483
|
+
// Whether guest check-in is enabled.
|
|
484
|
+
is_checkin_enabled?: boolean;
|
|
453
485
|
// Just-Walk-Out configuration.
|
|
454
486
|
jwo?: {
|
|
455
487
|
enabled?: boolean;
|
|
@@ -461,8 +493,8 @@ export interface PublicSiteConfig {
|
|
|
461
493
|
// FreedomPay configuration for the site.
|
|
462
494
|
payment?: {
|
|
463
495
|
freedompay?: {
|
|
464
|
-
freedompay_store_id?:
|
|
465
|
-
freedompay_terminal_id?:
|
|
496
|
+
freedompay_store_id?: string;
|
|
497
|
+
freedompay_terminal_id?: string;
|
|
466
498
|
};
|
|
467
499
|
};
|
|
468
500
|
// Promotions available at this site.
|
|
@@ -477,6 +509,12 @@ export interface PublicSiteConfig {
|
|
|
477
509
|
is_mealplan_promo?: boolean;
|
|
478
510
|
name?: string;
|
|
479
511
|
}[];
|
|
512
|
+
// Whether delivery orders are routed to the runner app.
|
|
513
|
+
runner_app_enabled?: boolean;
|
|
514
|
+
// Whether only a single fulfillment timeslot is offered.
|
|
515
|
+
show_single_timeslot?: boolean;
|
|
516
|
+
// Item categories that stay taxable when the whole cart is otherwise exempt, keyed by the human-authored category name (which may contain spaces). Only categories mapped to true are applied.
|
|
517
|
+
tax_exemption_overrides?: Record<string, boolean>;
|
|
480
518
|
}
|
|
481
519
|
|
|
482
520
|
export interface PrivateSiteConfig {
|
|
@@ -507,6 +545,10 @@ export interface PrivateSiteConfig {
|
|
|
507
545
|
// Loyalty program configuration.
|
|
508
546
|
loyalty?: {
|
|
509
547
|
enabled?: boolean;
|
|
548
|
+
loyalty_emails?: {
|
|
549
|
+
email?: string;
|
|
550
|
+
}[];
|
|
551
|
+
provider_id?: string;
|
|
510
552
|
};
|
|
511
553
|
// Named service windows used for end-of-day reporting.
|
|
512
554
|
meal_periods?: {
|
|
@@ -539,15 +581,19 @@ export interface PrivateSiteConfig {
|
|
|
539
581
|
export interface PrivateStationKeystore {
|
|
540
582
|
// FreedomPay credentials (encrypted at rest).
|
|
541
583
|
payment?: {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
584
|
+
freedompay?: {
|
|
585
|
+
badge_pay_system_key?: string;
|
|
586
|
+
freedompay_store_id?: string;
|
|
587
|
+
freedompay_terminal_id?: string;
|
|
588
|
+
id?: string;
|
|
589
|
+
};
|
|
545
590
|
};
|
|
546
591
|
centric_hub?: {
|
|
547
592
|
// Card-present FreedomPay credentials for the merchant.
|
|
548
593
|
freedompay?: {
|
|
549
594
|
freedompay_store_id?: string;
|
|
550
595
|
freedompay_terminal_id?: string;
|
|
596
|
+
id?: string;
|
|
551
597
|
};
|
|
552
598
|
};
|
|
553
599
|
mealplan?: CbordMealplanConfig;
|
|
@@ -563,9 +609,12 @@ export interface PrivateStationKeystore {
|
|
|
563
609
|
export interface PrivateSiteKeystore {
|
|
564
610
|
// FreedomPay credentials (encrypted at rest).
|
|
565
611
|
payment?: {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
612
|
+
freedompay?: {
|
|
613
|
+
badge_pay_system_key?: string;
|
|
614
|
+
freedompay_store_id?: string;
|
|
615
|
+
freedompay_terminal_id?: string;
|
|
616
|
+
id?: string;
|
|
617
|
+
};
|
|
569
618
|
};
|
|
570
619
|
mealplan?: CbordMealplanConfig;
|
|
571
620
|
// Legacy pointer into the external keystore table.
|