@compassdigital/sdk.typescript 4.911.0 → 4.913.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 +19 -0
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/centricos.js.map +1 -1
- package/lib/interface/menu.d.ts +3 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/menu.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +21 -0
- package/src/interface/centricos.ts +36 -0
- package/src/interface/menu.ts +8 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/interface/menu.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,sDAAsD;;;
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/interface/menu.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,sDAAsD;;;AA6bzC,QAAA,uBAAuB,GAAG;IACtC,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACL,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1434,6 +1434,7 @@ import {
|
|
|
1434
1434
|
GetCentricosSiteResponse,
|
|
1435
1435
|
GetCentricosSiteMenuHoursDetailsResponse,
|
|
1436
1436
|
GetCentricosSiteClientSettingsResponse,
|
|
1437
|
+
GetCentricosSiteFoodWasteResponse,
|
|
1437
1438
|
GetReviewOrderItemsResponse,
|
|
1438
1439
|
GetYesterdaysSnapshotResponse,
|
|
1439
1440
|
GetCentricosStationResponse,
|
|
@@ -16826,6 +16827,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
16826
16827
|
);
|
|
16827
16828
|
}
|
|
16828
16829
|
|
|
16830
|
+
/**
|
|
16831
|
+
* GET /centricos/site/{siteId}/food-waste - Get a site's food waste for the last 7 days, compared with the 7 days before
|
|
16832
|
+
*
|
|
16833
|
+
* @param siteId - ID of the site to summarize Topanga food waste for
|
|
16834
|
+
* @param options - additional request options
|
|
16835
|
+
*/
|
|
16836
|
+
get_centricos_site_food_waste(
|
|
16837
|
+
siteId: string,
|
|
16838
|
+
options?: RequestOptions,
|
|
16839
|
+
): ResponsePromise<GetCentricosSiteFoodWasteResponse> {
|
|
16840
|
+
return this.request(
|
|
16841
|
+
'centricos',
|
|
16842
|
+
'/centricos/site/{siteId}/food-waste',
|
|
16843
|
+
'GET',
|
|
16844
|
+
`/centricos/site/${siteId}/food-waste`,
|
|
16845
|
+
null,
|
|
16846
|
+
options,
|
|
16847
|
+
);
|
|
16848
|
+
}
|
|
16849
|
+
|
|
16829
16850
|
/**
|
|
16830
16851
|
* GET /centricos/review/{orderId}/order-items - Get reviews for items in a given order in an array format
|
|
16831
16852
|
*
|
|
@@ -311,6 +311,33 @@ export interface GetSiteClientSettingsResponse {
|
|
|
311
311
|
aggregate_view?: boolean;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
export interface FoodWasteWindow {
|
|
315
|
+
// First UTC day of the window.
|
|
316
|
+
start: string;
|
|
317
|
+
// Last UTC day of the window, inclusive.
|
|
318
|
+
end: string;
|
|
319
|
+
// Total net waste weight in grams.
|
|
320
|
+
total_grams: number;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export interface FoodWasteLocation {
|
|
324
|
+
// Topanga location name. Null for the one entry that groups records with no location name.
|
|
325
|
+
name: string | null;
|
|
326
|
+
// Net waste weight in grams in the current window.
|
|
327
|
+
total_grams: number;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export interface GetSiteFoodWasteResponse {
|
|
331
|
+
// The 7 UTC days ending yesterday. Null when the site has no valid waste records.
|
|
332
|
+
current: FoodWasteWindow;
|
|
333
|
+
// The 7 days before `current`. Null when the fetched records do not cover it.
|
|
334
|
+
previous: FoodWasteWindow;
|
|
335
|
+
// Change from the previous total to the current total, in whole percent. Null when `previous` is null or its total is 0.
|
|
336
|
+
percent_change: number | null;
|
|
337
|
+
// Up to 5 locations in the current window, heaviest first.
|
|
338
|
+
top_locations: FoodWasteLocation[];
|
|
339
|
+
}
|
|
340
|
+
|
|
314
341
|
export interface ReviewOrderItem {
|
|
315
342
|
// Order id
|
|
316
343
|
id: string;
|
|
@@ -1756,6 +1783,15 @@ export interface GetCentricosSiteClientSettingsPath {
|
|
|
1756
1783
|
|
|
1757
1784
|
export type GetCentricosSiteClientSettingsResponse = GetSiteClientSettingsResponse;
|
|
1758
1785
|
|
|
1786
|
+
// GET /centricos/site/{siteId}/food-waste - Get a site's food waste for the last 7 days, compared with the 7 days before
|
|
1787
|
+
|
|
1788
|
+
export interface GetCentricosSiteFoodWastePath {
|
|
1789
|
+
// ID of the site to summarize Topanga food waste for
|
|
1790
|
+
siteId: string;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
export type GetCentricosSiteFoodWasteResponse = GetSiteFoodWasteResponse;
|
|
1794
|
+
|
|
1759
1795
|
// GET /centricos/review/{orderId}/order-items - Get reviews for items in a given order in an array format
|
|
1760
1796
|
|
|
1761
1797
|
export interface GetReviewOrderItemsPath {
|
package/src/interface/menu.ts
CHANGED
|
@@ -48,6 +48,8 @@ export interface Menu {
|
|
|
48
48
|
id?: string;
|
|
49
49
|
name?: string;
|
|
50
50
|
jde_category?: string;
|
|
51
|
+
// Human-readable JDE category name decoded from jde_category
|
|
52
|
+
jde_category_label?: string;
|
|
51
53
|
};
|
|
52
54
|
// V3 Local Menu Group metadata if menu came from Centric
|
|
53
55
|
local_menu_group?: {
|
|
@@ -216,7 +218,10 @@ export interface Item {
|
|
|
216
218
|
primary?: string;
|
|
217
219
|
secondary?: string;
|
|
218
220
|
};
|
|
221
|
+
// JDE category ID: the item or modifier's own, falling back to the brand JDE category when not set
|
|
219
222
|
jde_category?: string;
|
|
223
|
+
// Human-readable JDE category name decoded from jde_category
|
|
224
|
+
jde_category_label?: string;
|
|
220
225
|
};
|
|
221
226
|
// @deprecated
|
|
222
227
|
is_deleted?: boolean;
|
|
@@ -287,7 +292,10 @@ export interface Option {
|
|
|
287
292
|
primary?: string;
|
|
288
293
|
secondary?: string;
|
|
289
294
|
};
|
|
295
|
+
// JDE category ID: the item or modifier's own, falling back to the brand JDE category when not set
|
|
290
296
|
jde_category?: string;
|
|
297
|
+
// Human-readable JDE category name decoded from jde_category
|
|
298
|
+
jde_category_label?: string;
|
|
291
299
|
};
|
|
292
300
|
weight?: {
|
|
293
301
|
unit?: string;
|