@compassdigital/sdk.typescript 4.833.0 → 4.835.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.
@@ -666,10 +666,18 @@ export interface DeleteStationIntegrationResponse {
666
666
  success: boolean;
667
667
  }
668
668
 
669
+ export const DiscountMethodName = {
670
+ FIXED_PRICE: 'FIXED_PRICE',
671
+ AMOUNT_OFF: 'AMOUNT_OFF',
672
+ PERCENT_OFF: 'PERCENT_OFF',
673
+ FREE: 'FREE',
674
+ } as const;
675
+ export type DiscountMethodName = (typeof DiscountMethodName)[keyof typeof DiscountMethodName];
676
+
669
677
  export interface CentricDiscountMethod {
670
- // How the discount is applied: FIXED_PRICE (fixed bundle price), AMOUNT_OFF (dollar amount off) or PERCENT_OFF (percentage off)
671
- name: 'FIXED_PRICE' | 'AMOUNT_OFF' | 'PERCENT_OFF';
672
- // The discount value: a dollar amount stored in cents for FIXED_PRICE and AMOUNT_OFF, or a percentage for PERCENT_OFF
678
+ // How the discount is applied: FIXED_PRICE (fixed bundle price), AMOUNT_OFF (dollar amount off), PERCENT_OFF (percentage off) or FREE (free item)
679
+ name: DiscountMethodName;
680
+ // The discount value: a dollar amount stored in cents for FIXED_PRICE and AMOUNT_OFF, a percentage for PERCENT_OFF, or 0 for FREE
673
681
  value: number;
674
682
  }
675
683
 
@@ -740,6 +748,10 @@ export interface CentricDiscountItemConfigSite {
740
748
  export interface CentricDiscountItemLevelConfigDetails {
741
749
  // minimum number of items to satisfy the bundle
742
750
  minimum: number;
751
+ // Marks the group that receives the discount for Buy X Get Y. At least one group must be true, but not all groups, when publishing.
752
+ isDiscounted?: boolean;
753
+ // How many extra items are discounted per qualified set for Buy X Get X. Required when publishing Buy X Get X; must be less than the group minimum. Applies to every method (PERCENT_OFF, AMOUNT_OFF, FREE).
754
+ discountedItemQuantity?: number;
743
755
  // Global menu groups for bundle / single-item scope; menu brands are nested per group
744
756
  globalMenuGroups?: CentricDiscountGlobalMenuGroup[];
745
757
  bundleGroupName?: string;
@@ -760,9 +772,17 @@ export interface CentricDiscountIs {
760
772
  mealplanPromo?: boolean;
761
773
  }
762
774
 
775
+ export const DiscountMetaType = {
776
+ AMOUNT_OFF: 'AMOUNT_OFF',
777
+ PERCENT_OFF: 'PERCENT_OFF',
778
+ FIXED_PRICE: 'FIXED_PRICE',
779
+ FREE: 'FREE',
780
+ } as const;
781
+ export type DiscountMetaType = (typeof DiscountMetaType)[keyof typeof DiscountMetaType];
782
+
763
783
  export interface CentricVoucherifyMetaDataDiscount {
764
784
  // The type of the voucherify discount
765
- type: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FIXED_PRICE';
785
+ type: DiscountMetaType;
766
786
  // The numeric value of discount for amount off
767
787
  amountOff?: number;
768
788
  // The fixed price value of the bundle for fixed price discounts
@@ -771,15 +791,35 @@ export interface CentricVoucherifyMetaDataDiscount {
771
791
  percentOff?: number;
772
792
  }
773
793
 
794
+ export const DiscountDay = {
795
+ MON: 'mon',
796
+ TUE: 'tue',
797
+ WED: 'wed',
798
+ THU: 'thu',
799
+ FRI: 'fri',
800
+ SAT: 'sat',
801
+ SUN: 'sun',
802
+ } as const;
803
+ export type DiscountDay = (typeof DiscountDay)[keyof typeof DiscountDay];
804
+
774
805
  export interface CentricDiscountSchedule {
775
806
  // The days of the week for the discount to be active
776
- days: ('mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun')[];
807
+ days: DiscountDay[];
777
808
  startDate?: string;
778
809
  endDate?: string;
779
810
  startTime: string;
780
811
  endTime: string;
781
812
  }
782
813
 
814
+ export const DiscountType = {
815
+ TOTAL_ORDER: 'Total Order',
816
+ SINGLE_ITEMS: 'Single Items',
817
+ BUNDLE: 'Bundle',
818
+ BUY_X_GET_Y: 'Buy X Get Y',
819
+ BUY_X_GET_X: 'Buy X Get X',
820
+ } as const;
821
+ export type DiscountType = (typeof DiscountType)[keyof typeof DiscountType];
822
+
783
823
  export interface PutCentricDiscountRequestDiscount {
784
824
  // name of the discount
785
825
  name: string;
@@ -798,7 +838,7 @@ export interface PutCentricDiscountRequestDiscount {
798
838
  // discount active status flag
799
839
  active?: boolean;
800
840
  // type of the discount
801
- type?: 'Total Order' | 'Single Items' | 'Bundle';
841
+ type?: DiscountType;
802
842
  }
803
843
 
804
844
  export interface DiscountBrandReference {
@@ -885,7 +925,7 @@ export interface DiscountResponseDTO {
885
925
  // channel config of the discount
886
926
  channelConfig: CentricDiscountChannelConfig;
887
927
  // type of the discount
888
- type: 'Total Order' | 'Single Items' | 'Bundle';
928
+ type: DiscountType;
889
929
  // item level config of the discount
890
930
  itemLevelConfig?: CentricDiscountItemLevelConfig;
891
931
  // discount metadata
@@ -935,7 +975,7 @@ export interface PutCentricDiscountPublishResponseDTO {
935
975
  // channel config of the discount
936
976
  channelConfig: CentricDiscountChannelConfig;
937
977
  // type of the discount
938
- type: 'Total Order' | 'Single Items' | 'Bundle';
978
+ type: DiscountType;
939
979
  // item level config of the discount
940
980
  itemLevelConfig?: CentricDiscountItemLevelConfig;
941
981
  // discount metadata
@@ -967,7 +1007,7 @@ export interface PutDiscountVoucherifyRequestDiscount {
967
1007
  // discount active status flag
968
1008
  active?: boolean;
969
1009
  // type of the discount
970
- type?: 'Total Order' | 'Single Items' | 'Bundle';
1010
+ type?: DiscountType;
971
1011
  }
972
1012
 
973
1013
  export interface PutDiscountVoucherifyRequestDTO {
@@ -1002,7 +1042,7 @@ export interface PutDiscountVoucherifyPublishResponseDTO {
1002
1042
  // channel config of the discount
1003
1043
  channelConfig: CentricDiscountChannelConfig;
1004
1044
  // type of the discount
1005
- type: 'Total Order' | 'Single Items' | 'Bundle';
1045
+ type: DiscountType;
1006
1046
  // item level config of the discount
1007
1047
  itemLevelConfig?: CentricDiscountItemLevelConfig;
1008
1048
  // Voucherify metadata
@@ -1038,7 +1078,7 @@ export interface DiscountDTO {
1038
1078
  // channel config of the discount
1039
1079
  channelConfig: CentricDiscountChannelConfig;
1040
1080
  // type of the discount
1041
- type: 'Total Order' | 'Single Items' | 'Bundle';
1081
+ type: DiscountType;
1042
1082
  // item level config of the discount
1043
1083
  itemLevelConfig?: CentricDiscountItemLevelConfig;
1044
1084
  id: string;
@@ -1070,7 +1110,7 @@ export interface GetDiscountsDiscountResponseDTO {
1070
1110
  // channel config of the discount
1071
1111
  channelConfig: CentricDiscountChannelConfig;
1072
1112
  // type of the discount
1073
- type: 'Total Order' | 'Single Items' | 'Bundle';
1113
+ type: DiscountType;
1074
1114
  // item level config of the discount
1075
1115
  itemLevelConfig?: CentricDiscountItemLevelConfig;
1076
1116
  sites: string[];
@@ -1421,118 +1461,6 @@ export interface PostMenuStationsMenusFetchResponseDTO {
1421
1461
  results: MenuStation[];
1422
1462
  }
1423
1463
 
1424
- export interface SwapListRequestDto {
1425
- // Menu Brand ID
1426
- brand_id: string;
1427
- // Array of Site IDs
1428
- site_ids: string[];
1429
- }
1430
-
1431
- export interface ProjectedRevenue {
1432
- // Revenue last 30 days
1433
- revenue: number;
1434
- // Projected revenue if selected swaps are not published
1435
- projected_revenue: number;
1436
- // Projected revenue if selected swaps are published
1437
- swaps_published_revenue: number;
1438
- }
1439
-
1440
- export interface RevenueImpact {
1441
- // Extra revenue per month if this swap is applied
1442
- extra_revenue_per_month: number;
1443
- // Percentage increase in revenue if this swap is applied
1444
- percentage_increase: number;
1445
- }
1446
-
1447
- export interface SwapItem {
1448
- // Centric item ID
1449
- item_id: string;
1450
- // Centric item name
1451
- name: string;
1452
- // Centric item POSID
1453
- posid: string;
1454
- }
1455
-
1456
- export interface SwapRecommendation {
1457
- // Unique swap recommendation identifier
1458
- recommendation_id: string;
1459
- // Revenue impact if this swap is applied
1460
- revenue_impact: RevenueImpact;
1461
- // Centric Brand ID
1462
- brand_id: string;
1463
- // Centric Menu ID
1464
- menu_id: string;
1465
- // IDs of the categories where this swap will be applied
1466
- categories: string[];
1467
- // Category item to swap out
1468
- swap_out: SwapItem;
1469
- // Category item to swap in
1470
- swap_in: SwapItem;
1471
- }
1472
-
1473
- export interface SwapListResponseDto {
1474
- // Projected revenue metrics if this swap is applied
1475
- projected_revenue: ProjectedRevenue;
1476
- // List of swap recommendations
1477
- swaps: SwapRecommendation[];
1478
- }
1479
-
1480
- export interface SwapRevenueOut {
1481
- // Item revenue from the last 30 days
1482
- revenue_last_30_days: number;
1483
- // Item projected revenue for the next 30 days
1484
- projected_revenue_next_30_days: number;
1485
- }
1486
-
1487
- export interface SwapRevenueIn {
1488
- // Projected revenue for the next 30 days if swap is applied
1489
- projected_revenue_next_30_days: number;
1490
- }
1491
-
1492
- export interface SwapRevenueDetails {
1493
- // Revenue data for the item being swapped out
1494
- swap_out: SwapRevenueOut;
1495
- // Revenue data for the item being swapped in
1496
- swap_in: SwapRevenueIn;
1497
- }
1498
-
1499
- export interface SwapOrderOut {
1500
- // Number of orders in the last 30 days
1501
- orders_last_30_days: number;
1502
- // Forecasted orders for the next 30 days
1503
- orders_forecast_next_30_days: number;
1504
- }
1505
-
1506
- export interface SwapOrderIn {
1507
- // Forecasted orders for the next 30 days
1508
- orders_forecast_next_30_days: number;
1509
- }
1510
-
1511
- export interface SwapOrderDetails {
1512
- // Order data for the item being removed
1513
- swap_out: SwapOrderOut;
1514
- // Order data for the item being added
1515
- swap_in: SwapOrderIn;
1516
- }
1517
-
1518
- export interface SwapPriceDetails {
1519
- // Price of the item being swapped out
1520
- swap_out: number;
1521
- // Price of the item being swapped in
1522
- swap_in: number;
1523
- }
1524
-
1525
- export interface SwapDetailsResponseDto {
1526
- // Revenue metrics for swap items
1527
- revenue: SwapRevenueDetails;
1528
- // Order volume metrics for swap items
1529
- orders: SwapOrderDetails;
1530
- // Price comparison for swap items
1531
- price: SwapPriceDetails;
1532
- // Site profile description explaining why this swap was recommended
1533
- site_profile: string;
1534
- }
1535
-
1536
1464
  export interface RecommendationItem {
1537
1465
  // Centric item id, or null when the upstream forecast could not resolve one
1538
1466
  item_id: string | null;
@@ -1938,7 +1866,7 @@ export interface GetCentricosDiscountsQuery {
1938
1866
  // Filter by updatedBy (partial match)
1939
1867
  updatedBy?: string;
1940
1868
  // Filter by amount off or percentage off
1941
- type?: string;
1869
+ type?: DiscountMetaType;
1942
1870
  // Filter by created date start (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss)
1943
1871
  createdAtStart?: string;
1944
1872
  // Filter by created date end (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss)
@@ -2069,21 +1997,6 @@ export type PostCentricosStationsMenusFetchBody = PostMenuStationsMenusFetchRequ
2069
1997
 
2070
1998
  export type PostCentricosStationsMenusFetchResponse = PostMenuStationsMenusFetchResponseDTO;
2071
1999
 
2072
- // POST /centricos/swaps/list - Fetch swap recommendations for a Centric brand
2073
-
2074
- export type ListSwapsBody = SwapListRequestDto;
2075
-
2076
- export type ListSwapsResponse = SwapListResponseDto;
2077
-
2078
- // GET /centricos/swaps/details/{recommendation_id} - Get detailed information about a swap recommendation
2079
-
2080
- export interface GetSwapDetailsPath {
2081
- // Unique swap recommendation ID
2082
- recommendation_id: string;
2083
- }
2084
-
2085
- export type GetSwapDetailsResponse = SwapDetailsResponseDto;
2086
-
2087
2000
  // GET /centricos/menu-optimizer/brand/{brand_id}/recommendations - Get the latest ROM recommendations for a brand
2088
2001
 
2089
2002
  export interface GetCentricosMenuOptimizerBrandRecommendationsPath {