@compassdigital/sdk.typescript 4.937.0 → 4.938.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/forecasting.d.ts +81 -1
- package/lib/interface/forecasting.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +22 -0
- package/src/interface/forecasting.ts +131 -2
|
@@ -5,6 +5,13 @@ export interface CreateProductionSheetDto {
|
|
|
5
5
|
responseId?: string;
|
|
6
6
|
autoGenerated?: boolean;
|
|
7
7
|
}
|
|
8
|
+
export interface SheetPlanDto {
|
|
9
|
+
planned_amount: number;
|
|
10
|
+
suggested_amount: number | null;
|
|
11
|
+
source: ('typed' | 'accepted') | null;
|
|
12
|
+
updated_by: string;
|
|
13
|
+
updated_at: string;
|
|
14
|
+
}
|
|
8
15
|
export interface ProductionSheetItemDto {
|
|
9
16
|
item_name: string;
|
|
10
17
|
pos_id: string;
|
|
@@ -20,6 +27,7 @@ export interface ProductionSheetItemDto {
|
|
|
20
27
|
description?: string;
|
|
21
28
|
accuracy?: ('good' | 'low' | 'pending' | 'error') | null;
|
|
22
29
|
accuracy_flags?: string[] | null;
|
|
30
|
+
plan?: SheetPlanDto;
|
|
23
31
|
}
|
|
24
32
|
export interface ProductionSheetModifierDto {
|
|
25
33
|
modifier_name: string;
|
|
@@ -62,10 +70,29 @@ export interface ProductionSheetFacetsDto {
|
|
|
62
70
|
brands: ProductionSheetBrandFacetDto[];
|
|
63
71
|
menus: ProductionSheetMenuFacetDto[];
|
|
64
72
|
}
|
|
73
|
+
export interface PlanDto {
|
|
74
|
+
brand_id?: string;
|
|
75
|
+
menu_id?: string;
|
|
76
|
+
menu_item_id?: string;
|
|
77
|
+
pos_id: string;
|
|
78
|
+
item_name: string;
|
|
79
|
+
site_id: string;
|
|
80
|
+
date: string;
|
|
81
|
+
planned_amount: number;
|
|
82
|
+
suggested_amount: number | null;
|
|
83
|
+
source: ('typed' | 'accepted') | null;
|
|
84
|
+
updated_by: string;
|
|
85
|
+
updated_at: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ProductionSheetPlansDto {
|
|
88
|
+
orphaned: PlanDto[];
|
|
89
|
+
unavailable: boolean;
|
|
90
|
+
}
|
|
65
91
|
export interface ProductionSheetPaginatedResponseDto {
|
|
66
92
|
meta: ProductionSheetPaginatedMetaDto;
|
|
67
93
|
results: ProductionSheetPaginatedResultsDto;
|
|
68
94
|
facets: ProductionSheetFacetsDto;
|
|
95
|
+
plans: ProductionSheetPlansDto;
|
|
69
96
|
}
|
|
70
97
|
export interface ProductionSheetItemForecastDiffDto {
|
|
71
98
|
item_name: string;
|
|
@@ -89,6 +116,57 @@ export interface ItemDiffOnSaveRequestDto {
|
|
|
89
116
|
export interface ItemForecastDiffResponse {
|
|
90
117
|
data: string;
|
|
91
118
|
}
|
|
119
|
+
export interface PlanInputDto {
|
|
120
|
+
brand_id?: string;
|
|
121
|
+
menu_id?: string;
|
|
122
|
+
menu_item_id?: string;
|
|
123
|
+
pos_id: string;
|
|
124
|
+
item_name: string;
|
|
125
|
+
planned_amount: number;
|
|
126
|
+
suggested_amount?: number | null;
|
|
127
|
+
source: 'typed' | 'accepted';
|
|
128
|
+
expected_updated_at?: string | null;
|
|
129
|
+
}
|
|
130
|
+
export interface PutPlansRequestDto {
|
|
131
|
+
siteId: string;
|
|
132
|
+
date: string;
|
|
133
|
+
items: PlanInputDto[];
|
|
134
|
+
}
|
|
135
|
+
export interface PutPlansResponseDto {
|
|
136
|
+
plans: PlanDto[];
|
|
137
|
+
}
|
|
138
|
+
export interface PlanConflictDto {
|
|
139
|
+
brand_id?: string;
|
|
140
|
+
menu_id?: string;
|
|
141
|
+
menu_item_id?: string;
|
|
142
|
+
pos_id: string;
|
|
143
|
+
item_name: string;
|
|
144
|
+
current: PlanDto;
|
|
145
|
+
}
|
|
146
|
+
export interface PlansConflictDataDto {
|
|
147
|
+
saved: PlanDto[];
|
|
148
|
+
conflicts: PlanConflictDto[];
|
|
149
|
+
}
|
|
150
|
+
export interface PlansConflictResponseDto {
|
|
151
|
+
message: string;
|
|
152
|
+
data: PlansConflictDataDto;
|
|
153
|
+
}
|
|
154
|
+
export interface PlanItemKeyDto {
|
|
155
|
+
brand_id?: string;
|
|
156
|
+
menu_id?: string;
|
|
157
|
+
menu_item_id?: string;
|
|
158
|
+
pos_id: string;
|
|
159
|
+
item_name: string;
|
|
160
|
+
}
|
|
161
|
+
export interface PlansFailedDataDto {
|
|
162
|
+
saved: PlanDto[];
|
|
163
|
+
conflicts: PlanConflictDto[];
|
|
164
|
+
failed: PlanItemKeyDto[];
|
|
165
|
+
}
|
|
166
|
+
export interface PlansFailedResponseDto {
|
|
167
|
+
message: string;
|
|
168
|
+
data: PlansFailedDataDto;
|
|
169
|
+
}
|
|
92
170
|
export interface ChatItemDto {
|
|
93
171
|
name: string;
|
|
94
172
|
posid: string;
|
|
@@ -140,7 +218,7 @@ export interface GetForecastingProductionSheetQuery {
|
|
|
140
218
|
includeBarcodeItems?: boolean;
|
|
141
219
|
responseId?: string;
|
|
142
220
|
nocache?: boolean;
|
|
143
|
-
sortBy?: 'item_name' | 'last_week_amount' | 'forecasted_amount' | 'actual_amount' | 'on_hand' | 'total_to_produce';
|
|
221
|
+
sortBy?: 'item_name' | 'last_week_amount' | 'forecasted_amount' | 'actual_amount' | 'on_hand' | 'total_to_produce' | 'planned_amount';
|
|
144
222
|
sortOrder?: 'asc' | 'desc';
|
|
145
223
|
}
|
|
146
224
|
export type GetForecastingProductionSheetResponse = ProductionSheetPaginatedResponseDto;
|
|
@@ -156,6 +234,8 @@ export interface GetForecastingForecastMetadataQuery {
|
|
|
156
234
|
}
|
|
157
235
|
export type GetForecastingForecastMetadataResponse = {};
|
|
158
236
|
export type GetForecastingPingResponse = {};
|
|
237
|
+
export type PutForecastingPlansBody = PutPlansRequestDto;
|
|
238
|
+
export type PutForecastingPlansResponse = PutPlansResponseDto;
|
|
159
239
|
export type PostForecastingChatBody = ChatMessageDto;
|
|
160
240
|
export type PostForecastingChatResponse = {};
|
|
161
241
|
export type PostForecastingChatFeedbackBody = ChatFeedbackDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forecasting.d.ts","sourceRoot":"","sources":["../../src/interface/forecasting.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,wBAAwB;IAExC,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC;IAEzD,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"forecasting.d.ts","sourceRoot":"","sources":["../../src/interface/forecasting.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,wBAAwB;IAExC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mB,CAAC;AAI9D,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD,MAAM,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAI7C,MAAM,MAAM,+BAA+B,GAAG,eAAe,CAAC;AAE9D,MAAM,MAAM,mCAAmC,GAAG,EAAE,CAAC;AAIrD,MAAM,MAAM,6BAA6B,GAAG,cAAc,CAAC;AAE3D,MAAM,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAInD,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1692,6 +1692,8 @@ import {
|
|
|
1692
1692
|
GetForecastingForecastMetadataQuery,
|
|
1693
1693
|
GetForecastingForecastMetadataResponse,
|
|
1694
1694
|
GetForecastingPingResponse,
|
|
1695
|
+
PutForecastingPlansBody,
|
|
1696
|
+
PutForecastingPlansResponse,
|
|
1695
1697
|
PostForecastingChatBody,
|
|
1696
1698
|
PostForecastingChatResponse,
|
|
1697
1699
|
PostForecastingChatFeedbackBody,
|
|
@@ -19627,6 +19629,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
19627
19629
|
);
|
|
19628
19630
|
}
|
|
19629
19631
|
|
|
19632
|
+
/**
|
|
19633
|
+
* PUT /forecasting/plans - Save planned amounts for production sheet rows
|
|
19634
|
+
*
|
|
19635
|
+
* @param body
|
|
19636
|
+
* @param options - additional request options
|
|
19637
|
+
*/
|
|
19638
|
+
put_forecasting_plans(
|
|
19639
|
+
body: PutForecastingPlansBody,
|
|
19640
|
+
options?: RequestOptions,
|
|
19641
|
+
): ResponsePromise<PutForecastingPlansResponse> {
|
|
19642
|
+
return this.request(
|
|
19643
|
+
'forecasting',
|
|
19644
|
+
'/forecasting/plans',
|
|
19645
|
+
'PUT',
|
|
19646
|
+
`/forecasting/plans`,
|
|
19647
|
+
body,
|
|
19648
|
+
options,
|
|
19649
|
+
);
|
|
19650
|
+
}
|
|
19651
|
+
|
|
19630
19652
|
/**
|
|
19631
19653
|
* POST /forecasting/chat - Relay a user chat message to Luna
|
|
19632
19654
|
*
|
|
@@ -16,6 +16,15 @@ export interface CreateProductionSheetDto {
|
|
|
16
16
|
autoGenerated?: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export interface SheetPlanDto {
|
|
20
|
+
planned_amount: number;
|
|
21
|
+
suggested_amount: number | null;
|
|
22
|
+
source: ('typed' | 'accepted') | null;
|
|
23
|
+
updated_by: string;
|
|
24
|
+
// Send back as expected_updated_at when saving this row
|
|
25
|
+
updated_at: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
19
28
|
export interface ProductionSheetItemDto {
|
|
20
29
|
item_name: string;
|
|
21
30
|
pos_id: string;
|
|
@@ -34,6 +43,8 @@ export interface ProductionSheetItemDto {
|
|
|
34
43
|
accuracy?: ('good' | 'low' | 'pending' | 'error') | null;
|
|
35
44
|
// Luna flags explaining reduced forecast accuracy for the item
|
|
36
45
|
accuracy_flags?: string[] | null;
|
|
46
|
+
// The saved plan; absent when none
|
|
47
|
+
plan?: SheetPlanDto;
|
|
37
48
|
}
|
|
38
49
|
|
|
39
50
|
export interface ProductionSheetModifierDto {
|
|
@@ -95,10 +106,39 @@ export interface ProductionSheetFacetsDto {
|
|
|
95
106
|
menus: ProductionSheetMenuFacetDto[];
|
|
96
107
|
}
|
|
97
108
|
|
|
109
|
+
export interface PlanDto {
|
|
110
|
+
// Absent on forecast-only rows Luna could not place
|
|
111
|
+
brand_id?: string;
|
|
112
|
+
// Absent on forecast-only rows Luna could not place
|
|
113
|
+
menu_id?: string;
|
|
114
|
+
// Absent on forecast-only rows
|
|
115
|
+
menu_item_id?: string;
|
|
116
|
+
// Empty on forecast-only rows with no POS id
|
|
117
|
+
pos_id: string;
|
|
118
|
+
item_name: string;
|
|
119
|
+
site_id: string;
|
|
120
|
+
// Service date, yyyy-mm-dd
|
|
121
|
+
date: string;
|
|
122
|
+
planned_amount: number;
|
|
123
|
+
suggested_amount: number | null;
|
|
124
|
+
// Null when the stored value is not a known source
|
|
125
|
+
source: ('typed' | 'accepted') | null;
|
|
126
|
+
updated_by: string;
|
|
127
|
+
updated_at: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface ProductionSheetPlansDto {
|
|
131
|
+
// Plans for the sheet's date whose row is no longer on the sheet
|
|
132
|
+
orphaned: PlanDto[];
|
|
133
|
+
// True when plans could not be read; rows carry no plan
|
|
134
|
+
unavailable: boolean;
|
|
135
|
+
}
|
|
136
|
+
|
|
98
137
|
export interface ProductionSheetPaginatedResponseDto {
|
|
99
138
|
meta: ProductionSheetPaginatedMetaDto;
|
|
100
139
|
results: ProductionSheetPaginatedResultsDto;
|
|
101
140
|
facets: ProductionSheetFacetsDto;
|
|
141
|
+
plans: ProductionSheetPlansDto;
|
|
102
142
|
}
|
|
103
143
|
|
|
104
144
|
export interface ProductionSheetItemForecastDiffDto {
|
|
@@ -142,6 +182,88 @@ export interface ItemForecastDiffResponse {
|
|
|
142
182
|
data: string;
|
|
143
183
|
}
|
|
144
184
|
|
|
185
|
+
export interface PlanInputDto {
|
|
186
|
+
// Absent on forecast-only rows Luna could not place
|
|
187
|
+
brand_id?: string;
|
|
188
|
+
// Absent on forecast-only rows Luna could not place
|
|
189
|
+
menu_id?: string;
|
|
190
|
+
// Absent on forecast-only rows
|
|
191
|
+
menu_item_id?: string;
|
|
192
|
+
// Empty on forecast-only rows with no POS id
|
|
193
|
+
pos_id: string;
|
|
194
|
+
item_name: string;
|
|
195
|
+
planned_amount: number;
|
|
196
|
+
// The suggested amount the operator saw when they saved
|
|
197
|
+
suggested_amount?: number | null;
|
|
198
|
+
source: 'typed' | 'accepted';
|
|
199
|
+
// The plan's updated_at when it was read; null or absent for a new plan
|
|
200
|
+
expected_updated_at?: string | null;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export interface PutPlansRequestDto {
|
|
204
|
+
// Site ID the plans are for
|
|
205
|
+
siteId: string;
|
|
206
|
+
// Service date of the sheet, yyyy-mm-dd
|
|
207
|
+
date: string;
|
|
208
|
+
items: PlanInputDto[];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface PutPlansResponseDto {
|
|
212
|
+
plans: PlanDto[];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface PlanConflictDto {
|
|
216
|
+
// Absent on forecast-only rows Luna could not place
|
|
217
|
+
brand_id?: string;
|
|
218
|
+
// Absent on forecast-only rows Luna could not place
|
|
219
|
+
menu_id?: string;
|
|
220
|
+
// Absent on forecast-only rows
|
|
221
|
+
menu_item_id?: string;
|
|
222
|
+
// Empty on forecast-only rows with no POS id
|
|
223
|
+
pos_id: string;
|
|
224
|
+
item_name: string;
|
|
225
|
+
// The stored plan; null if it was deleted
|
|
226
|
+
current: PlanDto;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface PlansConflictDataDto {
|
|
230
|
+
// Items in the request that were saved
|
|
231
|
+
saved: PlanDto[];
|
|
232
|
+
// Items another write changed first
|
|
233
|
+
conflicts: PlanConflictDto[];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface PlansConflictResponseDto {
|
|
237
|
+
message: string;
|
|
238
|
+
data: PlansConflictDataDto;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface PlanItemKeyDto {
|
|
242
|
+
// Absent on forecast-only rows Luna could not place
|
|
243
|
+
brand_id?: string;
|
|
244
|
+
// Absent on forecast-only rows Luna could not place
|
|
245
|
+
menu_id?: string;
|
|
246
|
+
// Absent on forecast-only rows
|
|
247
|
+
menu_item_id?: string;
|
|
248
|
+
// Empty on forecast-only rows with no POS id
|
|
249
|
+
pos_id: string;
|
|
250
|
+
item_name: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface PlansFailedDataDto {
|
|
254
|
+
// Items in the request that were saved
|
|
255
|
+
saved: PlanDto[];
|
|
256
|
+
// Items another write changed first
|
|
257
|
+
conflicts: PlanConflictDto[];
|
|
258
|
+
// Items whose write failed; safe to retry
|
|
259
|
+
failed: PlanItemKeyDto[];
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface PlansFailedResponseDto {
|
|
263
|
+
message: string;
|
|
264
|
+
data: PlansFailedDataDto;
|
|
265
|
+
}
|
|
266
|
+
|
|
145
267
|
export interface ChatItemDto {
|
|
146
268
|
// Item's display name
|
|
147
269
|
name: string;
|
|
@@ -230,14 +352,15 @@ export interface GetForecastingProductionSheetQuery {
|
|
|
230
352
|
responseId?: string;
|
|
231
353
|
// When true, skip S3 cache read and rebuild; write replaces any existing object
|
|
232
354
|
nocache?: boolean;
|
|
233
|
-
// Sort column before pagination (matches CentricOS DataTable). total_to_produce uses max(0, forecasted_amount - on_hand).
|
|
355
|
+
// Sort column before pagination (matches CentricOS DataTable). total_to_produce uses max(0, forecasted_amount - on_hand); planned_amount falls back to forecasted_amount on rows with no plan.
|
|
234
356
|
sortBy?:
|
|
235
357
|
| 'item_name'
|
|
236
358
|
| 'last_week_amount'
|
|
237
359
|
| 'forecasted_amount'
|
|
238
360
|
| 'actual_amount'
|
|
239
361
|
| 'on_hand'
|
|
240
|
-
| 'total_to_produce'
|
|
362
|
+
| 'total_to_produce'
|
|
363
|
+
| 'planned_amount';
|
|
241
364
|
// Sort direction; default desc matches CentricOS default on forecast column
|
|
242
365
|
sortOrder?: 'asc' | 'desc';
|
|
243
366
|
}
|
|
@@ -271,6 +394,12 @@ export type GetForecastingForecastMetadataResponse = {};
|
|
|
271
394
|
|
|
272
395
|
export type GetForecastingPingResponse = {};
|
|
273
396
|
|
|
397
|
+
// PUT /forecasting/plans - Save planned amounts for production sheet rows
|
|
398
|
+
|
|
399
|
+
export type PutForecastingPlansBody = PutPlansRequestDto;
|
|
400
|
+
|
|
401
|
+
export type PutForecastingPlansResponse = PutPlansResponseDto;
|
|
402
|
+
|
|
274
403
|
// POST /forecasting/chat - Relay a user chat message to Luna
|
|
275
404
|
|
|
276
405
|
export type PostForecastingChatBody = ChatMessageDto;
|