@compassdigital/sdk.typescript 3.45.1 → 3.45.2
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 +150 -47
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +158 -50
- package/lib/index.js.map +1 -1
- package/lib/interface/delivery.d.ts +73 -0
- package/lib/interface/delivery.d.ts.map +1 -0
- package/lib/interface/delivery.js +4 -0
- package/lib/interface/delivery.js.map +1 -0
- package/lib/interface/menu.d.ts +148 -40
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/order.d.ts +10 -0
- package/lib/interface/order.d.ts.map +1 -1
- package/manifest.json +4 -0
- package/package.json +1 -1
- package/quicktest.json +8 -0
- package/src/index.ts +366 -103
- package/src/interface/delivery.ts +101 -0
- package/src/interface/menu.ts +257 -71
- package/src/interface/order.ts +21 -0
package/src/interface/menu.ts
CHANGED
|
@@ -27,6 +27,16 @@ export interface LayoutListResponse {
|
|
|
27
27
|
results?: Layout[];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export interface BrandListResponse {
|
|
31
|
+
meta?: Meta;
|
|
32
|
+
results?: Brand[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface StationListResponse {
|
|
36
|
+
meta?: Meta;
|
|
37
|
+
results?: Station[];
|
|
38
|
+
}
|
|
39
|
+
|
|
30
40
|
export interface CategoryListResponse {
|
|
31
41
|
meta?: Meta;
|
|
32
42
|
results?: Category[];
|
|
@@ -80,6 +90,8 @@ export interface Modifier {
|
|
|
80
90
|
created_at?: string;
|
|
81
91
|
updated_at?: string;
|
|
82
92
|
deleted_at?: string;
|
|
93
|
+
brand_id?: string;
|
|
94
|
+
station_id?: string;
|
|
83
95
|
[index: string]: any;
|
|
84
96
|
}
|
|
85
97
|
|
|
@@ -94,6 +106,8 @@ export interface ModifierGroup {
|
|
|
94
106
|
created_at?: string;
|
|
95
107
|
updated_at?: string;
|
|
96
108
|
deleted_at?: string;
|
|
109
|
+
brand_id?: string;
|
|
110
|
+
station_id?: string;
|
|
97
111
|
[index: string]: any;
|
|
98
112
|
}
|
|
99
113
|
|
|
@@ -113,6 +127,8 @@ export interface LocalItem {
|
|
|
113
127
|
created_at?: string;
|
|
114
128
|
updated_at?: string;
|
|
115
129
|
deleted_at?: string;
|
|
130
|
+
brand_id?: string;
|
|
131
|
+
station_id?: string;
|
|
116
132
|
[index: string]: any;
|
|
117
133
|
}
|
|
118
134
|
|
|
@@ -131,6 +147,24 @@ export interface Layout {
|
|
|
131
147
|
created_at?: string;
|
|
132
148
|
updated_at?: string;
|
|
133
149
|
deleted_at?: string;
|
|
150
|
+
brand_id?: string;
|
|
151
|
+
station_id?: string;
|
|
152
|
+
[index: string]: any;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface Brand {
|
|
156
|
+
id?: string;
|
|
157
|
+
created_at?: string;
|
|
158
|
+
updated_at?: string;
|
|
159
|
+
deleted_at?: string;
|
|
160
|
+
[index: string]: any;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface Station {
|
|
164
|
+
id?: string;
|
|
165
|
+
created_at?: string;
|
|
166
|
+
updated_at?: string;
|
|
167
|
+
deleted_at?: string;
|
|
134
168
|
[index: string]: any;
|
|
135
169
|
}
|
|
136
170
|
|
|
@@ -827,94 +861,34 @@ export interface DeleteMenuV3ItemRelationshipsModifierGroupRequest
|
|
|
827
861
|
extends BaseRequest,
|
|
828
862
|
DeleteMenuV3ItemRelationshipsModifierGroupPath {}
|
|
829
863
|
|
|
830
|
-
// GET /menu/v3/
|
|
831
|
-
|
|
832
|
-
export interface GetMenuV3MenusQuery {
|
|
833
|
-
// Graphql query string
|
|
834
|
-
_query?: string;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
export type GetMenuV3MenusResponse = MenuV2ListResponse;
|
|
838
|
-
|
|
839
|
-
export interface GetMenuV3MenusRequest extends BaseRequest, RequestQuery<GetMenuV3MenusQuery> {}
|
|
840
|
-
|
|
841
|
-
// GET /menu/v3/menu/{id}
|
|
842
|
-
|
|
843
|
-
export interface GetMenuV3MenuPath {
|
|
844
|
-
id: string;
|
|
845
|
-
}
|
|
864
|
+
// GET /menu/v3/layouts
|
|
846
865
|
|
|
847
|
-
export interface
|
|
866
|
+
export interface GetMenuV3LayoutsQuery {
|
|
848
867
|
// Graphql query string
|
|
849
868
|
_query?: string;
|
|
850
869
|
}
|
|
851
870
|
|
|
852
|
-
export type
|
|
853
|
-
|
|
854
|
-
export interface GetMenuV3MenuRequest
|
|
855
|
-
extends BaseRequest,
|
|
856
|
-
RequestQuery<GetMenuV3MenuQuery>,
|
|
857
|
-
GetMenuV3MenuPath {}
|
|
858
|
-
|
|
859
|
-
// PATCH /menu/v3/menu/{id}
|
|
860
|
-
|
|
861
|
-
export interface PatchMenuV3MenuPath {
|
|
862
|
-
id: string;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
export type PatchMenuV3MenuBody = MenuV2;
|
|
866
|
-
|
|
867
|
-
export type PatchMenuV3MenuResponse = MenuV2;
|
|
871
|
+
export type GetMenuV3LayoutsResponse = LayoutListResponse;
|
|
868
872
|
|
|
869
|
-
export interface
|
|
870
|
-
body: PatchMenuV3MenuBody;
|
|
871
|
-
}
|
|
873
|
+
export interface GetMenuV3LayoutsRequest extends BaseRequest, RequestQuery<GetMenuV3LayoutsQuery> {}
|
|
872
874
|
|
|
873
|
-
//
|
|
875
|
+
// GET /menu/v3/layout/{id}/categories
|
|
874
876
|
|
|
875
|
-
export interface
|
|
877
|
+
export interface GetMenuV3LayoutCategoriesPath {
|
|
876
878
|
id: string;
|
|
877
879
|
}
|
|
878
880
|
|
|
879
|
-
export
|
|
880
|
-
|
|
881
|
-
export interface DeleteMenuV3MenuRequest extends BaseRequest, DeleteMenuV3MenuPath {}
|
|
882
|
-
|
|
883
|
-
// POST /menu/v3/menu
|
|
884
|
-
|
|
885
|
-
export type PostMenuV3MenuBody = MenuV2;
|
|
886
|
-
|
|
887
|
-
export type PostMenuV3MenuResponse = MenuV2;
|
|
888
|
-
|
|
889
|
-
export interface PostMenuV3MenuRequest extends BaseRequest {
|
|
890
|
-
body: PostMenuV3MenuBody;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
// GET /menu/v3/menus/count
|
|
894
|
-
|
|
895
|
-
export interface GetMenuV3MenusCountQuery {
|
|
881
|
+
export interface GetMenuV3LayoutCategoriesQuery {
|
|
896
882
|
// Graphql query string
|
|
897
883
|
_query?: string;
|
|
898
884
|
}
|
|
899
885
|
|
|
900
|
-
export
|
|
901
|
-
count?: number;
|
|
902
|
-
}
|
|
886
|
+
export type GetMenuV3LayoutCategoriesResponse = CategoryListResponse;
|
|
903
887
|
|
|
904
|
-
export interface
|
|
888
|
+
export interface GetMenuV3LayoutCategoriesRequest
|
|
905
889
|
extends BaseRequest,
|
|
906
|
-
RequestQuery<
|
|
907
|
-
|
|
908
|
-
// GET /menu/v3/layouts
|
|
909
|
-
|
|
910
|
-
export interface GetMenuV3LayoutsQuery {
|
|
911
|
-
// Graphql query string
|
|
912
|
-
_query?: string;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
export type GetMenuV3LayoutsResponse = LayoutListResponse;
|
|
916
|
-
|
|
917
|
-
export interface GetMenuV3LayoutsRequest extends BaseRequest, RequestQuery<GetMenuV3LayoutsQuery> {}
|
|
890
|
+
RequestQuery<GetMenuV3LayoutCategoriesQuery>,
|
|
891
|
+
GetMenuV3LayoutCategoriesPath {}
|
|
918
892
|
|
|
919
893
|
// GET /menu/v3/layout/{id}
|
|
920
894
|
|
|
@@ -1124,6 +1098,218 @@ export interface DeleteMenuV3CategoryRelationshipsItemRequest
|
|
|
1124
1098
|
extends BaseRequest,
|
|
1125
1099
|
DeleteMenuV3CategoryRelationshipsItemPath {}
|
|
1126
1100
|
|
|
1101
|
+
// GET /menu/v3/brands
|
|
1102
|
+
|
|
1103
|
+
export interface GetMenuV3BrandsQuery {
|
|
1104
|
+
// Graphql query string
|
|
1105
|
+
_query?: string;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
export type GetMenuV3BrandsResponse = BrandListResponse;
|
|
1109
|
+
|
|
1110
|
+
export interface GetMenuV3BrandsRequest extends BaseRequest, RequestQuery<GetMenuV3BrandsQuery> {}
|
|
1111
|
+
|
|
1112
|
+
// GET /menu/v3/brand/{id}/modifiers
|
|
1113
|
+
|
|
1114
|
+
export interface GetMenuV3BrandModifiersPath {
|
|
1115
|
+
id: string;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
export interface GetMenuV3BrandModifiersQuery {
|
|
1119
|
+
// Graphql query string
|
|
1120
|
+
_query?: string;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
export type GetMenuV3BrandModifiersResponse = ModifiersListResponse;
|
|
1124
|
+
|
|
1125
|
+
export interface GetMenuV3BrandModifiersRequest
|
|
1126
|
+
extends BaseRequest,
|
|
1127
|
+
RequestQuery<GetMenuV3BrandModifiersQuery>,
|
|
1128
|
+
GetMenuV3BrandModifiersPath {}
|
|
1129
|
+
|
|
1130
|
+
// GET /menu/v3/brand/{id}/modifier_groups
|
|
1131
|
+
|
|
1132
|
+
export interface GetMenuV3BrandModifier_groupsPath {
|
|
1133
|
+
id: string;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
export interface GetMenuV3BrandModifier_groupsQuery {
|
|
1137
|
+
// Graphql query string
|
|
1138
|
+
_query?: string;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
export type GetMenuV3BrandModifier_groupsResponse = ModifierGroupsListResponse;
|
|
1142
|
+
|
|
1143
|
+
export interface GetMenuV3BrandModifier_groupsRequest
|
|
1144
|
+
extends BaseRequest,
|
|
1145
|
+
RequestQuery<GetMenuV3BrandModifier_groupsQuery>,
|
|
1146
|
+
GetMenuV3BrandModifier_groupsPath {}
|
|
1147
|
+
|
|
1148
|
+
// GET /menu/v3/brand/{id}/items
|
|
1149
|
+
|
|
1150
|
+
export interface GetMenuV3BrandItemsPath {
|
|
1151
|
+
id: string;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
export interface GetMenuV3BrandItemsQuery {
|
|
1155
|
+
// Graphql query string
|
|
1156
|
+
_query?: string;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
export type GetMenuV3BrandItemsResponse = ItemsListResponse;
|
|
1160
|
+
|
|
1161
|
+
export interface GetMenuV3BrandItemsRequest
|
|
1162
|
+
extends BaseRequest,
|
|
1163
|
+
RequestQuery<GetMenuV3BrandItemsQuery>,
|
|
1164
|
+
GetMenuV3BrandItemsPath {}
|
|
1165
|
+
|
|
1166
|
+
// GET /menu/v3/brand/{id}
|
|
1167
|
+
|
|
1168
|
+
export interface GetMenuV3BrandPath {
|
|
1169
|
+
id: string;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
export interface GetMenuV3BrandQuery {
|
|
1173
|
+
// Graphql query string
|
|
1174
|
+
_query?: string;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
export type GetMenuV3BrandResponse = Brand;
|
|
1178
|
+
|
|
1179
|
+
export interface GetMenuV3BrandRequest
|
|
1180
|
+
extends BaseRequest,
|
|
1181
|
+
RequestQuery<GetMenuV3BrandQuery>,
|
|
1182
|
+
GetMenuV3BrandPath {}
|
|
1183
|
+
|
|
1184
|
+
// PATCH /menu/v3/brand/{id}
|
|
1185
|
+
|
|
1186
|
+
export interface PatchMenuV3BrandPath {
|
|
1187
|
+
id: string;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
export type PatchMenuV3BrandBody = Brand;
|
|
1191
|
+
|
|
1192
|
+
export type PatchMenuV3BrandResponse = Brand;
|
|
1193
|
+
|
|
1194
|
+
export interface PatchMenuV3BrandRequest extends BaseRequest, PatchMenuV3BrandPath {
|
|
1195
|
+
body: PatchMenuV3BrandBody;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// DELETE /menu/v3/brand/{id}
|
|
1199
|
+
|
|
1200
|
+
export interface DeleteMenuV3BrandPath {
|
|
1201
|
+
id: string;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
export type DeleteMenuV3BrandResponse = Brand;
|
|
1205
|
+
|
|
1206
|
+
export interface DeleteMenuV3BrandRequest extends BaseRequest, DeleteMenuV3BrandPath {}
|
|
1207
|
+
|
|
1208
|
+
// POST /menu/v3/brand
|
|
1209
|
+
|
|
1210
|
+
export type PostMenuV3BrandBody = Brand;
|
|
1211
|
+
|
|
1212
|
+
export type PostMenuV3BrandResponse = Brand;
|
|
1213
|
+
|
|
1214
|
+
export interface PostMenuV3BrandRequest extends BaseRequest {
|
|
1215
|
+
body: PostMenuV3BrandBody;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
// GET /menu/v3/brands/count
|
|
1219
|
+
|
|
1220
|
+
export interface GetMenuV3BrandsCountQuery {
|
|
1221
|
+
// Graphql query string
|
|
1222
|
+
_query?: string;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
export interface GetMenuV3BrandsCountResponse {
|
|
1226
|
+
count?: number;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
export interface GetMenuV3BrandsCountRequest
|
|
1230
|
+
extends BaseRequest,
|
|
1231
|
+
RequestQuery<GetMenuV3BrandsCountQuery> {}
|
|
1232
|
+
|
|
1233
|
+
// GET /menu/v3/stations
|
|
1234
|
+
|
|
1235
|
+
export interface GetMenuV3StationsQuery {
|
|
1236
|
+
// Graphql query string
|
|
1237
|
+
_query?: string;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
export type GetMenuV3StationsResponse = StationListResponse;
|
|
1241
|
+
|
|
1242
|
+
export interface GetMenuV3StationsRequest
|
|
1243
|
+
extends BaseRequest,
|
|
1244
|
+
RequestQuery<GetMenuV3StationsQuery> {}
|
|
1245
|
+
|
|
1246
|
+
// GET /menu/v3/station/{id}
|
|
1247
|
+
|
|
1248
|
+
export interface GetMenuV3StationPath {
|
|
1249
|
+
id: string;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
export interface GetMenuV3StationQuery {
|
|
1253
|
+
// Graphql query string
|
|
1254
|
+
_query?: string;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
export type GetMenuV3StationResponse = Station;
|
|
1258
|
+
|
|
1259
|
+
export interface GetMenuV3StationRequest
|
|
1260
|
+
extends BaseRequest,
|
|
1261
|
+
RequestQuery<GetMenuV3StationQuery>,
|
|
1262
|
+
GetMenuV3StationPath {}
|
|
1263
|
+
|
|
1264
|
+
// PATCH /menu/v3/station/{id}
|
|
1265
|
+
|
|
1266
|
+
export interface PatchMenuV3StationPath {
|
|
1267
|
+
id: string;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
export type PatchMenuV3StationBody = Station;
|
|
1271
|
+
|
|
1272
|
+
export type PatchMenuV3StationResponse = Station;
|
|
1273
|
+
|
|
1274
|
+
export interface PatchMenuV3StationRequest extends BaseRequest, PatchMenuV3StationPath {
|
|
1275
|
+
body: PatchMenuV3StationBody;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
// DELETE /menu/v3/station/{id}
|
|
1279
|
+
|
|
1280
|
+
export interface DeleteMenuV3StationPath {
|
|
1281
|
+
id: string;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
export type DeleteMenuV3StationResponse = Station;
|
|
1285
|
+
|
|
1286
|
+
export interface DeleteMenuV3StationRequest extends BaseRequest, DeleteMenuV3StationPath {}
|
|
1287
|
+
|
|
1288
|
+
// POST /menu/v3/station
|
|
1289
|
+
|
|
1290
|
+
export type PostMenuV3StationBody = Station;
|
|
1291
|
+
|
|
1292
|
+
export type PostMenuV3StationResponse = Station;
|
|
1293
|
+
|
|
1294
|
+
export interface PostMenuV3StationRequest extends BaseRequest {
|
|
1295
|
+
body: PostMenuV3StationBody;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
// GET /menu/v3/stations/count
|
|
1299
|
+
|
|
1300
|
+
export interface GetMenuV3StationsCountQuery {
|
|
1301
|
+
// Graphql query string
|
|
1302
|
+
_query?: string;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
export interface GetMenuV3StationsCountResponse {
|
|
1306
|
+
count?: number;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
export interface GetMenuV3StationsCountRequest
|
|
1310
|
+
extends BaseRequest,
|
|
1311
|
+
RequestQuery<GetMenuV3StationsCountQuery> {}
|
|
1312
|
+
|
|
1127
1313
|
// GET /menu/client/{client_id} - Get menu client
|
|
1128
1314
|
|
|
1129
1315
|
export interface GetMenuClientPath {
|
package/src/interface/order.ts
CHANGED
|
@@ -105,16 +105,29 @@ export interface Order {
|
|
|
105
105
|
out_for_delivery?: boolean;
|
|
106
106
|
delivered?: boolean;
|
|
107
107
|
checkin_order?: boolean;
|
|
108
|
+
no_show?: boolean;
|
|
108
109
|
};
|
|
109
110
|
date?: {
|
|
111
|
+
// Date order was accepted into our system and shown on kitchen apps
|
|
110
112
|
accepted?: string;
|
|
111
113
|
created?: string;
|
|
112
114
|
modified?: string;
|
|
115
|
+
// Date kitchen should start preparation ideally(not mandatory)
|
|
113
116
|
should_start?: string;
|
|
117
|
+
// Date kitchen should be half way preparation ideally(not mandatory)
|
|
114
118
|
completion_warning?: string;
|
|
119
|
+
// Date kitchen finished preparation
|
|
115
120
|
ready?: string;
|
|
121
|
+
// Date kitchen started preparation
|
|
116
122
|
started?: string;
|
|
123
|
+
// Date till which show orders as active
|
|
117
124
|
show_as_active_until?: string;
|
|
125
|
+
// For delivery orders - date customer did not pick the order
|
|
126
|
+
no_show?: string;
|
|
127
|
+
// For delivery orders - date order was delivered to destination(not picked by user)
|
|
128
|
+
delivered?: string;
|
|
129
|
+
// For delivery orders - date order was picked up from station for delivery(out_for_delivery)
|
|
130
|
+
pickup?: string;
|
|
118
131
|
};
|
|
119
132
|
pickup?: string;
|
|
120
133
|
pickup_name?: string;
|
|
@@ -161,6 +174,14 @@ export interface Order {
|
|
|
161
174
|
};
|
|
162
175
|
// Indicate whether the order is active or inactive
|
|
163
176
|
active?: boolean;
|
|
177
|
+
// Delivery details
|
|
178
|
+
delivery?: {
|
|
179
|
+
// provider
|
|
180
|
+
provider?: string;
|
|
181
|
+
tracker_url?: string;
|
|
182
|
+
loading_code?: string;
|
|
183
|
+
[index: string]: any;
|
|
184
|
+
};
|
|
164
185
|
[index: string]: any;
|
|
165
186
|
};
|
|
166
187
|
issue?: Issue;
|