@compassdigital/sdk.typescript 4.792.0 → 4.794.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 +31 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +38 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/config.d.ts +111 -11
- package/lib/interface/config.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +90 -0
- package/src/interface/config.ts +175 -11
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?: {
|
|
@@ -536,18 +578,77 @@ export interface PrivateSiteConfig {
|
|
|
536
578
|
};
|
|
537
579
|
}
|
|
538
580
|
|
|
581
|
+
export interface PublicBusinessUnitConfig {
|
|
582
|
+
// Badge-pay (campus card) configuration for the business unit.
|
|
583
|
+
badge_pay?: {
|
|
584
|
+
id?: string;
|
|
585
|
+
name?: string;
|
|
586
|
+
type?: string;
|
|
587
|
+
webview?: string;
|
|
588
|
+
};
|
|
589
|
+
// Whether the customer is prevented from choosing a timeslot.
|
|
590
|
+
block_timeslot_select?: boolean;
|
|
591
|
+
// Cashless tender configuration for the business unit.
|
|
592
|
+
cashless?: {
|
|
593
|
+
id?: string;
|
|
594
|
+
name?: string;
|
|
595
|
+
tenders?: {
|
|
596
|
+
name?: string;
|
|
597
|
+
tax_exempt?: boolean;
|
|
598
|
+
tender_type?: string;
|
|
599
|
+
}[];
|
|
600
|
+
type?: string;
|
|
601
|
+
voucher_webview?: string;
|
|
602
|
+
webview?: string;
|
|
603
|
+
};
|
|
604
|
+
// Whether in-app chat is offered.
|
|
605
|
+
chat_enabled?: boolean;
|
|
606
|
+
// Whether the entity has a Kitchen Display System.
|
|
607
|
+
has_kds?: boolean;
|
|
608
|
+
// Whether guest check-in is enabled.
|
|
609
|
+
is_checkin_enabled?: boolean;
|
|
610
|
+
// Meal-plan configuration offered at this business unit.
|
|
611
|
+
mealplan?: PublicMealplanConfig[];
|
|
612
|
+
// Whether delivery orders are routed to the runner app. Written by the centricos edge's business unit drop-off route.
|
|
613
|
+
runner_app_enabled?: boolean;
|
|
614
|
+
// Whether pickup/delivery instructions are shown to the customer. Written by the centricos edge's business unit drop-off route.
|
|
615
|
+
show_instructions?: boolean;
|
|
616
|
+
// Whether only a single fulfillment timeslot is offered. Written by the centricos edge's business unit drop-off route.
|
|
617
|
+
show_single_timeslot?: boolean;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export interface PrivateBusinessUnitConfig {
|
|
621
|
+
// Delivery fee applied to delivery orders from this business unit.
|
|
622
|
+
delivery_fee?: {
|
|
623
|
+
// Fee unit. The only writer, the centricos edge's business unit drop-off route, always writes `dollar`.
|
|
624
|
+
type?: string;
|
|
625
|
+
value?: number;
|
|
626
|
+
};
|
|
627
|
+
// KDS routing configuration. On a business unit document this array holds exactly one entry, the unit's own, whereas on a site document it holds one entry per unit in the site. That is why the task service (`src/service/kds.ts`) reads index `0` and comments that only the first entry matters: correct against a business unit key, wrong against a site key.
|
|
628
|
+
kds_configurations?: {
|
|
629
|
+
// Identifier of the business unit this entry applies to. Typed as a string or a number because the only writer, ap3's marketplace view, sets it from the cost-centre string on `location.meta.unit`, while numeric values also exist in stored records.
|
|
630
|
+
business_unit_id?: string | number;
|
|
631
|
+
// Whether this business unit routes to an expediter KDS.
|
|
632
|
+
has_expediter_kds?: boolean;
|
|
633
|
+
}[];
|
|
634
|
+
}
|
|
635
|
+
|
|
539
636
|
export interface PrivateStationKeystore {
|
|
540
637
|
// FreedomPay credentials (encrypted at rest).
|
|
541
638
|
payment?: {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
639
|
+
freedompay?: {
|
|
640
|
+
badge_pay_system_key?: string;
|
|
641
|
+
freedompay_store_id?: string;
|
|
642
|
+
freedompay_terminal_id?: string;
|
|
643
|
+
id?: string;
|
|
644
|
+
};
|
|
545
645
|
};
|
|
546
646
|
centric_hub?: {
|
|
547
647
|
// Card-present FreedomPay credentials for the merchant.
|
|
548
648
|
freedompay?: {
|
|
549
649
|
freedompay_store_id?: string;
|
|
550
650
|
freedompay_terminal_id?: string;
|
|
651
|
+
id?: string;
|
|
551
652
|
};
|
|
552
653
|
};
|
|
553
654
|
mealplan?: CbordMealplanConfig;
|
|
@@ -563,9 +664,12 @@ export interface PrivateStationKeystore {
|
|
|
563
664
|
export interface PrivateSiteKeystore {
|
|
564
665
|
// FreedomPay credentials (encrypted at rest).
|
|
565
666
|
payment?: {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
667
|
+
freedompay?: {
|
|
668
|
+
badge_pay_system_key?: string;
|
|
669
|
+
freedompay_store_id?: string;
|
|
670
|
+
freedompay_terminal_id?: string;
|
|
671
|
+
id?: string;
|
|
672
|
+
};
|
|
569
673
|
};
|
|
570
674
|
mealplan?: CbordMealplanConfig;
|
|
571
675
|
// Legacy pointer into the external keystore table.
|
|
@@ -787,6 +891,66 @@ export interface PutConfigSitePublicRequest extends BaseRequest, PutConfigSitePu
|
|
|
787
891
|
body: PutConfigSitePublicBody;
|
|
788
892
|
}
|
|
789
893
|
|
|
894
|
+
// GET /config/business-unit/{key}/private - Get a business unit's private configuration
|
|
895
|
+
|
|
896
|
+
export interface GetConfigBusinessUnitPrivatePath {
|
|
897
|
+
// business unit key (a location/location id)
|
|
898
|
+
key: string;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
export type GetConfigBusinessUnitPrivateResponse = PrivateBusinessUnitConfig;
|
|
902
|
+
|
|
903
|
+
export interface GetConfigBusinessUnitPrivateRequest
|
|
904
|
+
extends BaseRequest,
|
|
905
|
+
GetConfigBusinessUnitPrivatePath {}
|
|
906
|
+
|
|
907
|
+
// PUT /config/business-unit/{key}/private - Update a business unit's private configuration
|
|
908
|
+
|
|
909
|
+
export interface PutConfigBusinessUnitPrivatePath {
|
|
910
|
+
// business unit key (a location/location id)
|
|
911
|
+
key: string;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export type PutConfigBusinessUnitPrivateBody = PrivateBusinessUnitConfig;
|
|
915
|
+
|
|
916
|
+
export type PutConfigBusinessUnitPrivateResponse = PrivateBusinessUnitConfig;
|
|
917
|
+
|
|
918
|
+
export interface PutConfigBusinessUnitPrivateRequest
|
|
919
|
+
extends BaseRequest,
|
|
920
|
+
PutConfigBusinessUnitPrivatePath {
|
|
921
|
+
body: PutConfigBusinessUnitPrivateBody;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
// GET /config/business-unit/{key}/public - Get a business unit's public configuration
|
|
925
|
+
|
|
926
|
+
export interface GetConfigBusinessUnitPublicPath {
|
|
927
|
+
// business unit key (a location/location id)
|
|
928
|
+
key: string;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
export type GetConfigBusinessUnitPublicResponse = PublicBusinessUnitConfig;
|
|
932
|
+
|
|
933
|
+
export interface GetConfigBusinessUnitPublicRequest
|
|
934
|
+
extends BaseRequest,
|
|
935
|
+
GetConfigBusinessUnitPublicPath {}
|
|
936
|
+
|
|
937
|
+
// PUT /config/business-unit/{key}/public - Update a business unit's public configuration
|
|
938
|
+
|
|
939
|
+
export interface PutConfigBusinessUnitPublicPath {
|
|
940
|
+
// business unit key (a location/location id)
|
|
941
|
+
key: string;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
export type PutConfigBusinessUnitPublicBody = PublicBusinessUnitConfig;
|
|
945
|
+
|
|
946
|
+
export type PutConfigBusinessUnitPublicResponse = PublicBusinessUnitConfig;
|
|
947
|
+
|
|
948
|
+
export interface PutConfigBusinessUnitPublicRequest
|
|
949
|
+
extends BaseRequest,
|
|
950
|
+
PutConfigBusinessUnitPublicPath {
|
|
951
|
+
body: PutConfigBusinessUnitPublicBody;
|
|
952
|
+
}
|
|
953
|
+
|
|
790
954
|
// GET /config/health - Config Service readiness and dependency health check
|
|
791
955
|
|
|
792
956
|
export type GetConfigHealthResponse = HealthResponse;
|