@compassdigital/sdk.typescript 4.208.0 → 4.210.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 +73 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +78 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/forecasting.d.ts +72 -0
- package/lib/interface/forecasting.d.ts.map +1 -0
- package/lib/interface/forecasting.js +5 -0
- package/lib/interface/forecasting.js.map +1 -0
- package/lib/interface/order.d.ts +38 -1
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/search.d.ts +48 -1
- package/lib/interface/search.d.ts.map +1 -1
- package/manifest.json +7 -0
- package/package.json +1 -1
- package/src/index.ts +199 -0
- package/src/interface/forecasting.ts +148 -0
- package/src/interface/order.ts +51 -1
- package/src/interface/search.ts +61 -1
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
3
|
+
|
|
4
|
+
import { RequestQuery, BaseRequest } from './util';
|
|
5
|
+
|
|
6
|
+
export interface CreateProductionSheetDto {
|
|
7
|
+
// Site ID the production sheet is for
|
|
8
|
+
siteId: string;
|
|
9
|
+
// Start date of which scheduled menu items are being forecasted for
|
|
10
|
+
fromDate: string;
|
|
11
|
+
// End date of which scheduled menu items are being forecasted for
|
|
12
|
+
toDate: string;
|
|
13
|
+
// Response ID provided by Luna for session continuity
|
|
14
|
+
responseId?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ProductionSheetItemForecastDiffDto {
|
|
18
|
+
// Item name
|
|
19
|
+
item_name: string;
|
|
20
|
+
// Item posid
|
|
21
|
+
pos_id: string;
|
|
22
|
+
// Name of menu item belongs to
|
|
23
|
+
menu_name: string;
|
|
24
|
+
// ID of menu item belongs to
|
|
25
|
+
menu_id: string;
|
|
26
|
+
// Name of brand item belongs to
|
|
27
|
+
brand_name: string;
|
|
28
|
+
// ID of brand item belongs to
|
|
29
|
+
brand_id: string;
|
|
30
|
+
// Original forecasted amount from Luna
|
|
31
|
+
forecasted_amount: number;
|
|
32
|
+
// Manually updated forecast amount
|
|
33
|
+
updated_forecast_amount: number;
|
|
34
|
+
// Previous week's actual sale amount
|
|
35
|
+
last_week_amount: number;
|
|
36
|
+
// Manually updated 'on-hand' amount of the item
|
|
37
|
+
on_hand: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ItemDiffOnSaveRequestDto {
|
|
41
|
+
// Site ID
|
|
42
|
+
siteId: string;
|
|
43
|
+
// Date of the request
|
|
44
|
+
date: string;
|
|
45
|
+
// Date of the production sheet
|
|
46
|
+
production_sheet_date: string;
|
|
47
|
+
// Username of user who saved production sheet
|
|
48
|
+
username: string;
|
|
49
|
+
// Array of items with forecast diffs
|
|
50
|
+
items: ProductionSheetItemForecastDiffDto[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ItemForecastDiffResponse {
|
|
54
|
+
// Success message from Luna API
|
|
55
|
+
data: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ChatItemDto {
|
|
59
|
+
// Item's display name
|
|
60
|
+
name: string;
|
|
61
|
+
// Item's POSID
|
|
62
|
+
posid: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ChatMessageDto {
|
|
66
|
+
// Timestamp of chat request
|
|
67
|
+
created_at: string;
|
|
68
|
+
// User message for chat endpoint
|
|
69
|
+
message: string;
|
|
70
|
+
// Site ID associated with chat request
|
|
71
|
+
site_id: string;
|
|
72
|
+
// Username of the user sending the message
|
|
73
|
+
username: string;
|
|
74
|
+
// Production sheet date for context
|
|
75
|
+
production_sheet_date?: string;
|
|
76
|
+
// Feedback rating for Luna messages
|
|
77
|
+
feedback?: 'positive' | 'negative';
|
|
78
|
+
// Item the user wants context on
|
|
79
|
+
item: ChatItemDto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ChatFeedbackDto {
|
|
83
|
+
// Site ID associated with chat request
|
|
84
|
+
site_id: string;
|
|
85
|
+
// Username of the user sending the message
|
|
86
|
+
username: string;
|
|
87
|
+
// Feedback rating for Luna messages
|
|
88
|
+
feedback: 'positive' | 'negative';
|
|
89
|
+
// User message for chat endpoint
|
|
90
|
+
message: string;
|
|
91
|
+
// Timestamp of chat request
|
|
92
|
+
created_at: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// POST /forecasting/production-sheet - Create a new Production Sheet
|
|
96
|
+
|
|
97
|
+
export type ProductionSheetControllerCreateSheetBody = CreateProductionSheetDto;
|
|
98
|
+
|
|
99
|
+
export type ProductionSheetControllerCreateSheetResponse = {};
|
|
100
|
+
|
|
101
|
+
// GET /forecasting/scheduled-menu-data - Get scheduled menu data for a site for a given date
|
|
102
|
+
|
|
103
|
+
export interface ProductionSheetControllerGetScheduledMenuDataQuery {
|
|
104
|
+
siteId: string;
|
|
105
|
+
date: string;
|
|
106
|
+
// Graphql query string
|
|
107
|
+
_query?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type ProductionSheetControllerGetScheduledMenuDataResponse = {};
|
|
111
|
+
|
|
112
|
+
// POST /forecasting/item-forecast-diff - Send initial and updated forecast values for any items that had their forecast values manually updated in the centric UI prior to hitting 'Print and Save'
|
|
113
|
+
|
|
114
|
+
export type ProductionSheetControllerSaveItemForecastDifferentialBody = ItemDiffOnSaveRequestDto;
|
|
115
|
+
|
|
116
|
+
export type ProductionSheetControllerSaveItemForecastDifferentialResponse =
|
|
117
|
+
ItemForecastDiffResponse;
|
|
118
|
+
|
|
119
|
+
// POST /forecasting/chat - Relay a user chat message to Luna
|
|
120
|
+
|
|
121
|
+
export type ProductionSheetControllerSendChatMessageBody = ChatMessageDto;
|
|
122
|
+
|
|
123
|
+
export type ProductionSheetControllerSendChatMessageResponse = {};
|
|
124
|
+
|
|
125
|
+
// POST /forecasting/chat-feedback - Send user feedback for Luna chat messages
|
|
126
|
+
|
|
127
|
+
export type ProductionSheetControllerSendChatFeedbackBody = ChatFeedbackDto;
|
|
128
|
+
|
|
129
|
+
export type ProductionSheetControllerSendChatFeedbackResponse = {};
|
|
130
|
+
|
|
131
|
+
// GET /forecasting/forecast-metadata - Get forecast meta data from Luna
|
|
132
|
+
|
|
133
|
+
export interface ProductionSheetControllerGetForecastMetaDataQuery {
|
|
134
|
+
site_id: string;
|
|
135
|
+
// Graphql query string
|
|
136
|
+
_query?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type ProductionSheetControllerGetForecastMetaDataResponse = {};
|
|
140
|
+
|
|
141
|
+
// GET /forecasting/status
|
|
142
|
+
|
|
143
|
+
export interface ProductionSheetControllerServiceStatusQuery {
|
|
144
|
+
// Graphql query string
|
|
145
|
+
_query?: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export type ProductionSheetControllerServiceStatusResponse = {};
|
package/src/interface/order.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import { RequestQuery, BaseRequest } from './util';
|
|
5
5
|
|
|
6
6
|
export interface CreateOrder {
|
|
7
|
+
// For mealplan orders, the ID of the mealplan
|
|
8
|
+
id?: string;
|
|
7
9
|
location_brand?: string;
|
|
8
10
|
location?: string;
|
|
9
11
|
shoppingcart?: string;
|
|
@@ -45,6 +47,32 @@ export interface CreateOrder {
|
|
|
45
47
|
};
|
|
46
48
|
}
|
|
47
49
|
|
|
50
|
+
export interface CreatePOSOrder {
|
|
51
|
+
location_brand?: string;
|
|
52
|
+
location?: string;
|
|
53
|
+
shoppingcart?: string;
|
|
54
|
+
payment?: {
|
|
55
|
+
pos?: POSPayment;
|
|
56
|
+
};
|
|
57
|
+
customer?: string;
|
|
58
|
+
is?: {
|
|
59
|
+
in_progress?: boolean;
|
|
60
|
+
ready?: boolean;
|
|
61
|
+
};
|
|
62
|
+
meta?: {
|
|
63
|
+
// which ui the order was placed on
|
|
64
|
+
source?: 'pos';
|
|
65
|
+
// Override for meta.active for testing purposes
|
|
66
|
+
active_override?: boolean;
|
|
67
|
+
[index: string]: any;
|
|
68
|
+
};
|
|
69
|
+
requested_date?: string;
|
|
70
|
+
details?: {
|
|
71
|
+
name?: string;
|
|
72
|
+
order_type?: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
48
76
|
export interface Error {
|
|
49
77
|
error?: string;
|
|
50
78
|
code?: number;
|
|
@@ -79,6 +107,7 @@ export interface Order {
|
|
|
79
107
|
stipend?: CashlessPayment;
|
|
80
108
|
voucher?: CashlessPayment;
|
|
81
109
|
coupon_voucher?: CashlessPayment;
|
|
110
|
+
pos?: POSPayment;
|
|
82
111
|
};
|
|
83
112
|
mealplan?: {
|
|
84
113
|
id?: string;
|
|
@@ -157,7 +186,7 @@ export interface Order {
|
|
|
157
186
|
checkin_uuid?: string;
|
|
158
187
|
refunds?: RefundTransaction[];
|
|
159
188
|
// which ui the order was placed on
|
|
160
|
-
source?: 'web' | 'mobile';
|
|
189
|
+
source?: 'web' | 'mobile' | 'pos';
|
|
161
190
|
// details pertaining to the amount charged on the order
|
|
162
191
|
transaction?: {
|
|
163
192
|
// used in mx orders - cart totals in dollars and meal exchange value (meals)
|
|
@@ -325,6 +354,12 @@ export interface MealPlan {
|
|
|
325
354
|
name?: string;
|
|
326
355
|
}
|
|
327
356
|
|
|
357
|
+
export interface POSPayment {
|
|
358
|
+
type?: string;
|
|
359
|
+
// FreedomPay Transaction details
|
|
360
|
+
transaction?: Record<string, any>;
|
|
361
|
+
}
|
|
362
|
+
|
|
328
363
|
export interface OrderIssue {
|
|
329
364
|
// Type of issue
|
|
330
365
|
type?: string;
|
|
@@ -461,6 +496,21 @@ export interface PostOrderRequest extends BaseRequest, RequestQuery<PostOrderQue
|
|
|
461
496
|
body: PostOrderBody;
|
|
462
497
|
}
|
|
463
498
|
|
|
499
|
+
// POST /pos-order - Place a POS order
|
|
500
|
+
|
|
501
|
+
export interface PostPosOrderQuery {
|
|
502
|
+
// The language of the user ex en, fr
|
|
503
|
+
lang?: string;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export type PostPosOrderBody = CreatePOSOrder;
|
|
507
|
+
|
|
508
|
+
export type PostPosOrderResponse = Order;
|
|
509
|
+
|
|
510
|
+
export interface PostPosOrderRequest extends BaseRequest, RequestQuery<PostPosOrderQuery> {
|
|
511
|
+
body: PostPosOrderBody;
|
|
512
|
+
}
|
|
513
|
+
|
|
464
514
|
// GET /order/{id} - Get an individual order
|
|
465
515
|
|
|
466
516
|
export interface GetOrderPath {
|
package/src/interface/search.ts
CHANGED
|
@@ -138,6 +138,53 @@ export interface GetUserPaginatedResult {
|
|
|
138
138
|
results: GetUserDto[];
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
export interface DiscountStatus {
|
|
142
|
+
live?: boolean;
|
|
143
|
+
publishedTo3rdParty?: boolean;
|
|
144
|
+
readyToPublish?: boolean;
|
|
145
|
+
active?: boolean;
|
|
146
|
+
syncedWith3rdParty?: boolean;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface DiscountIs {
|
|
150
|
+
badgepayPromo?: boolean;
|
|
151
|
+
mealplanPromo?: boolean;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface VoucherifyMetaDataDiscount {
|
|
155
|
+
type: string;
|
|
156
|
+
amountOff?: number;
|
|
157
|
+
percentOff?: number;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface VoucherifyMetaData {
|
|
161
|
+
id?: string;
|
|
162
|
+
code?: string;
|
|
163
|
+
discount?: VoucherifyMetaDataDiscount;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface MetaProvider {
|
|
167
|
+
voucherify?: VoucherifyMetaData;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface DiscountMeta {
|
|
171
|
+
provider: MetaProvider;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface GetSearchDiscountResponseDTO {
|
|
175
|
+
id: string;
|
|
176
|
+
createdBy: string;
|
|
177
|
+
updatedBy?: string;
|
|
178
|
+
createdAt: string;
|
|
179
|
+
updatedAt: string;
|
|
180
|
+
name: string;
|
|
181
|
+
status?: DiscountStatus;
|
|
182
|
+
is?: DiscountIs;
|
|
183
|
+
meta?: DiscountMeta;
|
|
184
|
+
sites: string[];
|
|
185
|
+
brands: string[];
|
|
186
|
+
}
|
|
187
|
+
|
|
141
188
|
// GET /search/order
|
|
142
189
|
|
|
143
190
|
export interface GetSearchOrderQuery {
|
|
@@ -233,9 +280,22 @@ export interface GetSearchUserQuery {
|
|
|
233
280
|
// Filter entities with names or roles containing this value
|
|
234
281
|
filter?: string;
|
|
235
282
|
// Filter entities by realm
|
|
236
|
-
realm?: string;
|
|
283
|
+
realm?: string[];
|
|
237
284
|
// Graphql query string
|
|
238
285
|
_query?: string;
|
|
239
286
|
}
|
|
240
287
|
|
|
241
288
|
export type GetSearchUserResponse = GetUserPaginatedResult;
|
|
289
|
+
|
|
290
|
+
// GET /search/discounts/{id} - Get discounts from search
|
|
291
|
+
|
|
292
|
+
export interface GetSearchDiscountsPath {
|
|
293
|
+
id: string;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface GetSearchDiscountsQuery {
|
|
297
|
+
// Graphql query string
|
|
298
|
+
_query?: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export type GetSearchDiscountsResponse = GetSearchDiscountResponseDTO;
|