@compassdigital/sdk.typescript 3.20.0 → 3.21.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/interface/announcement.d.ts +7 -13
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +7 -13
- package/lib/interface/calendar.d.ts.map +1 -1
- package/lib/interface/compassconnect.d.ts +2 -3
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/config.d.ts +10 -19
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/datalake.d.ts +3 -5
- package/lib/interface/datalake.d.ts.map +1 -1
- package/lib/interface/email.d.ts +2 -3
- package/lib/interface/email.d.ts.map +1 -1
- package/lib/interface/file.d.ts +3 -5
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/kds.d.ts +7 -13
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +53 -105
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +12 -23
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +27 -53
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/notification.d.ts +7 -13
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +15 -29
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +8 -15
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +15 -29
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/permission.d.ts +10 -19
- package/lib/interface/permission.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +17 -33
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/report.d.ts +8 -15
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +15 -29
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/task.d.ts +11 -21
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +29 -57
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/util.d.ts +9 -2
- package/lib/interface/util.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +17 -33
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/interface/announcement.ts +10 -18
- package/src/interface/calendar.ts +12 -19
- package/src/interface/compassconnect.ts +3 -4
- package/src/interface/config.ts +10 -24
- package/src/interface/datalake.ts +3 -6
- package/src/interface/email.ts +2 -3
- package/src/interface/file.ts +3 -5
- package/src/interface/kds.ts +7 -17
- package/src/interface/location.ts +105 -143
- package/src/interface/mealplan.ts +13 -27
- package/src/interface/menu.ts +42 -74
- package/src/interface/notification.ts +7 -16
- package/src/interface/order.ts +27 -43
- package/src/interface/partner.ts +8 -20
- package/src/interface/payment.ts +21 -35
- package/src/interface/permission.ts +14 -24
- package/src/interface/promo.ts +21 -41
- package/src/interface/report.ts +21 -23
- package/src/interface/shoppingcart.ts +27 -33
- package/src/interface/sms.ts +1 -1
- package/src/interface/task.ts +17 -31
- package/src/interface/user.ts +45 -72
- package/src/interface/util.ts +10 -2
- package/src/interface/vendor.ts +24 -42
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
2
|
|
|
3
|
-
import { RequestQuery,
|
|
3
|
+
import { RequestQuery, BaseRequest } from "./util";
|
|
4
4
|
|
|
5
5
|
export interface Error {
|
|
6
6
|
message?: string;
|
|
@@ -238,9 +238,8 @@ export type PostShoppingcartCartBody = ShoppingCart;
|
|
|
238
238
|
|
|
239
239
|
export type PostShoppingcartCartResponse = ShoppingCart;
|
|
240
240
|
|
|
241
|
-
export interface PostShoppingcartCartRequest {
|
|
241
|
+
export interface PostShoppingcartCartRequest extends BaseRequest {
|
|
242
242
|
body: PostShoppingcartCartBody;
|
|
243
|
-
context?: RequestContext;
|
|
244
243
|
}
|
|
245
244
|
|
|
246
245
|
// PUT /shoppingcart/{id} - Put a menu item into a ShoppingCart
|
|
@@ -254,9 +253,8 @@ export type PutShoppingcartCartItemsBody = Items;
|
|
|
254
253
|
|
|
255
254
|
export type PutShoppingcartCartItemsResponse = ShoppingCart;
|
|
256
255
|
|
|
257
|
-
export interface PutShoppingcartCartItemsRequest extends PutShoppingcartCartItemsPath {
|
|
256
|
+
export interface PutShoppingcartCartItemsRequest extends BaseRequest, PutShoppingcartCartItemsPath {
|
|
258
257
|
body: PutShoppingcartCartItemsBody;
|
|
259
|
-
context?: RequestContext;
|
|
260
258
|
}
|
|
261
259
|
|
|
262
260
|
// DELETE /shoppingcart/{id} - Delete a menu item from a ShoppingCart
|
|
@@ -270,9 +268,10 @@ export type DeleteShoppingcartCartItemsBody = Items;
|
|
|
270
268
|
|
|
271
269
|
export type DeleteShoppingcartCartItemsResponse = ShoppingCart;
|
|
272
270
|
|
|
273
|
-
export interface DeleteShoppingcartCartItemsRequest
|
|
271
|
+
export interface DeleteShoppingcartCartItemsRequest
|
|
272
|
+
extends BaseRequest,
|
|
273
|
+
DeleteShoppingcartCartItemsPath {
|
|
274
274
|
body: DeleteShoppingcartCartItemsBody;
|
|
275
|
-
context?: RequestContext;
|
|
276
275
|
}
|
|
277
276
|
|
|
278
277
|
// GET /shoppingcart/{id} - Get an individual ShoppingCart
|
|
@@ -284,9 +283,7 @@ export interface GetShoppingcartCartPath {
|
|
|
284
283
|
|
|
285
284
|
export type GetShoppingcartCartResponse = ShoppingCart;
|
|
286
285
|
|
|
287
|
-
export interface GetShoppingcartCartRequest extends GetShoppingcartCartPath {
|
|
288
|
-
context?: RequestContext;
|
|
289
|
-
}
|
|
286
|
+
export interface GetShoppingcartCartRequest extends BaseRequest, GetShoppingcartCartPath {}
|
|
290
287
|
|
|
291
288
|
// PATCH /shoppingcart/{id} - Update a ShoppingCart
|
|
292
289
|
|
|
@@ -299,9 +296,8 @@ export type PatchShoppingcartCartBody = ShoppingCart;
|
|
|
299
296
|
|
|
300
297
|
export type PatchShoppingcartCartResponse = ShoppingCart;
|
|
301
298
|
|
|
302
|
-
export interface PatchShoppingcartCartRequest extends PatchShoppingcartCartPath {
|
|
299
|
+
export interface PatchShoppingcartCartRequest extends BaseRequest, PatchShoppingcartCartPath {
|
|
303
300
|
body: PatchShoppingcartCartBody;
|
|
304
|
-
context?: RequestContext;
|
|
305
301
|
}
|
|
306
302
|
|
|
307
303
|
// PUT /shoppingcart/{id}/promo - Put a promo in a ShoppingCart
|
|
@@ -315,9 +311,8 @@ export type PutShoppingcartCartPromoBody = Promo;
|
|
|
315
311
|
|
|
316
312
|
export type PutShoppingcartCartPromoResponse = ShoppingCart;
|
|
317
313
|
|
|
318
|
-
export interface PutShoppingcartCartPromoRequest extends PutShoppingcartCartPromoPath {
|
|
314
|
+
export interface PutShoppingcartCartPromoRequest extends BaseRequest, PutShoppingcartCartPromoPath {
|
|
319
315
|
body: PutShoppingcartCartPromoBody;
|
|
320
|
-
context?: RequestContext;
|
|
321
316
|
}
|
|
322
317
|
|
|
323
318
|
// DELETE /shoppingcart/{id}/promo - Delete the promo in a ShoppingCart
|
|
@@ -329,9 +324,9 @@ export interface DeleteShoppingcartCartPromoPath {
|
|
|
329
324
|
|
|
330
325
|
export type DeleteShoppingcartCartPromoResponse = ShoppingCart;
|
|
331
326
|
|
|
332
|
-
export interface DeleteShoppingcartCartPromoRequest
|
|
333
|
-
|
|
334
|
-
}
|
|
327
|
+
export interface DeleteShoppingcartCartPromoRequest
|
|
328
|
+
extends BaseRequest,
|
|
329
|
+
DeleteShoppingcartCartPromoPath {}
|
|
335
330
|
|
|
336
331
|
// PUT /shoppingcart/{id}/paymentmethod/ - Change payment method used in shopping cart
|
|
337
332
|
|
|
@@ -344,9 +339,10 @@ export type PutShoppingcartCartPaymentBody = Payment;
|
|
|
344
339
|
|
|
345
340
|
export type PutShoppingcartCartPaymentResponse = ShoppingCart;
|
|
346
341
|
|
|
347
|
-
export interface PutShoppingcartCartPaymentRequest
|
|
342
|
+
export interface PutShoppingcartCartPaymentRequest
|
|
343
|
+
extends BaseRequest,
|
|
344
|
+
PutShoppingcartCartPaymentPath {
|
|
348
345
|
body: PutShoppingcartCartPaymentBody;
|
|
349
|
-
context?: RequestContext;
|
|
350
346
|
}
|
|
351
347
|
|
|
352
348
|
// PUT /shoppingcart/{id}/order/ - Store information about the order created with this shopping cart
|
|
@@ -360,9 +356,8 @@ export type PutShoppingcartCartOrderBody = OrderId;
|
|
|
360
356
|
|
|
361
357
|
export type PutShoppingcartCartOrderResponse = ShoppingCart;
|
|
362
358
|
|
|
363
|
-
export interface PutShoppingcartCartOrderRequest extends PutShoppingcartCartOrderPath {
|
|
359
|
+
export interface PutShoppingcartCartOrderRequest extends BaseRequest, PutShoppingcartCartOrderPath {
|
|
364
360
|
body: PutShoppingcartCartOrderBody;
|
|
365
|
-
context?: RequestContext;
|
|
366
361
|
}
|
|
367
362
|
|
|
368
363
|
// PUT /shoppingcart/{id}/loyalty/{user_id} - Apply a loyalty coupon in a ShoppingCart
|
|
@@ -378,9 +373,10 @@ export type PutShoppingcartCartLoyaltyBody = CouponCode;
|
|
|
378
373
|
|
|
379
374
|
export type PutShoppingcartCartLoyaltyResponse = ShoppingCart;
|
|
380
375
|
|
|
381
|
-
export interface PutShoppingcartCartLoyaltyRequest
|
|
376
|
+
export interface PutShoppingcartCartLoyaltyRequest
|
|
377
|
+
extends BaseRequest,
|
|
378
|
+
PutShoppingcartCartLoyaltyPath {
|
|
382
379
|
body: PutShoppingcartCartLoyaltyBody;
|
|
383
|
-
context?: RequestContext;
|
|
384
380
|
}
|
|
385
381
|
|
|
386
382
|
// DELETE /shoppingcart/{id}/loyalty/{user_id} - Delete loyalty coupon in shoppingCart
|
|
@@ -394,9 +390,9 @@ export interface DeleteShoppingcartCartLoyaltyPath {
|
|
|
394
390
|
|
|
395
391
|
export type DeleteShoppingcartCartLoyaltyResponse = ShoppingCart;
|
|
396
392
|
|
|
397
|
-
export interface DeleteShoppingcartCartLoyaltyRequest
|
|
398
|
-
|
|
399
|
-
}
|
|
393
|
+
export interface DeleteShoppingcartCartLoyaltyRequest
|
|
394
|
+
extends BaseRequest,
|
|
395
|
+
DeleteShoppingcartCartLoyaltyPath {}
|
|
400
396
|
|
|
401
397
|
// POST /shoppingcart/{id}/clone - Create a shopping cart from existing shopping cart
|
|
402
398
|
|
|
@@ -412,9 +408,10 @@ export interface PostShoppingcartCloneCartBody {
|
|
|
412
408
|
|
|
413
409
|
export type PostShoppingcartCloneCartResponse = ShoppingCart;
|
|
414
410
|
|
|
415
|
-
export interface PostShoppingcartCloneCartRequest
|
|
411
|
+
export interface PostShoppingcartCloneCartRequest
|
|
412
|
+
extends BaseRequest,
|
|
413
|
+
PostShoppingcartCloneCartPath {
|
|
416
414
|
body: PostShoppingcartCloneCartBody;
|
|
417
|
-
context?: RequestContext;
|
|
418
415
|
}
|
|
419
416
|
|
|
420
417
|
// PUT /shoppingcart/{id}/checkout - handle ui checkout flow and call taxjar for full tax breakdown
|
|
@@ -426,9 +423,7 @@ export interface PutShoppingcartCheckoutPath {
|
|
|
426
423
|
|
|
427
424
|
export type PutShoppingcartCheckoutResponse = ShoppingCart;
|
|
428
425
|
|
|
429
|
-
export interface PutShoppingcartCheckoutRequest extends PutShoppingcartCheckoutPath {
|
|
430
|
-
context?: RequestContext;
|
|
431
|
-
}
|
|
426
|
+
export interface PutShoppingcartCheckoutRequest extends BaseRequest, PutShoppingcartCheckoutPath {}
|
|
432
427
|
|
|
433
428
|
// POST /shoppingcart/bulk - Get multiple ShoppingCarts
|
|
434
429
|
|
|
@@ -439,7 +434,6 @@ export interface PostShoppingcartBulkBody {
|
|
|
439
434
|
|
|
440
435
|
export type PostShoppingcartBulkResponse = ShoppingCarts;
|
|
441
436
|
|
|
442
|
-
export interface PostShoppingcartBulkRequest {
|
|
437
|
+
export interface PostShoppingcartBulkRequest extends BaseRequest {
|
|
443
438
|
body: PostShoppingcartBulkBody;
|
|
444
|
-
context?: RequestContext;
|
|
445
439
|
}
|
package/src/interface/sms.ts
CHANGED
package/src/interface/task.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
2
|
|
|
3
|
-
import { RequestQuery,
|
|
3
|
+
import { RequestQuery, BaseRequest } from "./util";
|
|
4
4
|
|
|
5
5
|
export interface TaskLocation {
|
|
6
6
|
// Location ID
|
|
@@ -143,9 +143,8 @@ export type PostTaskBody = TaskCreate;
|
|
|
143
143
|
|
|
144
144
|
export type PostTaskResponse = Task;
|
|
145
145
|
|
|
146
|
-
export interface PostTaskRequest {
|
|
146
|
+
export interface PostTaskRequest extends BaseRequest {
|
|
147
147
|
body: PostTaskBody;
|
|
148
|
-
context?: RequestContext;
|
|
149
148
|
}
|
|
150
149
|
|
|
151
150
|
// GET /task/{id} - Get task based on passed ID
|
|
@@ -157,9 +156,7 @@ export interface GetTaskPath {
|
|
|
157
156
|
|
|
158
157
|
export type GetTaskResponse = Task;
|
|
159
158
|
|
|
160
|
-
export interface GetTaskRequest extends GetTaskPath {
|
|
161
|
-
context?: RequestContext;
|
|
162
|
-
}
|
|
159
|
+
export interface GetTaskRequest extends BaseRequest, GetTaskPath {}
|
|
163
160
|
|
|
164
161
|
// PATCH /task/{id} - Update Task
|
|
165
162
|
|
|
@@ -172,9 +169,8 @@ export type PatchTaskBody = TaskUpdate;
|
|
|
172
169
|
|
|
173
170
|
export type PatchTaskResponse = Task;
|
|
174
171
|
|
|
175
|
-
export interface PatchTaskRequest extends PatchTaskPath {
|
|
172
|
+
export interface PatchTaskRequest extends BaseRequest, PatchTaskPath {
|
|
176
173
|
body: PatchTaskBody;
|
|
177
|
-
context?: RequestContext;
|
|
178
174
|
}
|
|
179
175
|
|
|
180
176
|
// DELETE /task/{id} - Delete Task
|
|
@@ -186,9 +182,7 @@ export interface DeleteTaskPath {
|
|
|
186
182
|
|
|
187
183
|
export type DeleteTaskResponse = ActionResponse;
|
|
188
184
|
|
|
189
|
-
export interface DeleteTaskRequest extends DeleteTaskPath {
|
|
190
|
-
context?: RequestContext;
|
|
191
|
-
}
|
|
185
|
+
export interface DeleteTaskRequest extends BaseRequest, DeleteTaskPath {}
|
|
192
186
|
|
|
193
187
|
// GET /task/order/{id} - Get task based on passed order ID
|
|
194
188
|
|
|
@@ -199,9 +193,7 @@ export interface GetTaskOrderPath {
|
|
|
199
193
|
|
|
200
194
|
export type GetTaskOrderResponse = Task;
|
|
201
195
|
|
|
202
|
-
export interface GetTaskOrderRequest extends GetTaskOrderPath {
|
|
203
|
-
context?: RequestContext;
|
|
204
|
-
}
|
|
196
|
+
export interface GetTaskOrderRequest extends BaseRequest, GetTaskOrderPath {}
|
|
205
197
|
|
|
206
198
|
// GET /task/order/{id}/kds - Get KDS tasks based on passed order ID
|
|
207
199
|
|
|
@@ -212,9 +204,7 @@ export interface GetTaskOrderKdsPath {
|
|
|
212
204
|
|
|
213
205
|
export type GetTaskOrderKdsResponse = Tasks;
|
|
214
206
|
|
|
215
|
-
export interface GetTaskOrderKdsRequest extends GetTaskOrderKdsPath {
|
|
216
|
-
context?: RequestContext;
|
|
217
|
-
}
|
|
207
|
+
export interface GetTaskOrderKdsRequest extends BaseRequest, GetTaskOrderKdsPath {}
|
|
218
208
|
|
|
219
209
|
// PATCH /task/order/{id}/kds - Update an order and its associated tasks
|
|
220
210
|
|
|
@@ -227,9 +217,8 @@ export type PatchTaskOrderKdsBody = OrderUpdate;
|
|
|
227
217
|
|
|
228
218
|
export type PatchTaskOrderKdsResponse = Tasks;
|
|
229
219
|
|
|
230
|
-
export interface PatchTaskOrderKdsRequest extends PatchTaskOrderKdsPath {
|
|
220
|
+
export interface PatchTaskOrderKdsRequest extends BaseRequest, PatchTaskOrderKdsPath {
|
|
231
221
|
body: PatchTaskOrderKdsBody;
|
|
232
|
-
context?: RequestContext;
|
|
233
222
|
}
|
|
234
223
|
|
|
235
224
|
// GET /task/assignee/{id} - Get Assignee tasks
|
|
@@ -255,10 +244,9 @@ export interface GetTaskAssigneeQuery {
|
|
|
255
244
|
export type GetTaskAssigneeResponse = Tasks;
|
|
256
245
|
|
|
257
246
|
export interface GetTaskAssigneeRequest
|
|
258
|
-
extends
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
247
|
+
extends BaseRequest,
|
|
248
|
+
RequestQuery<GetTaskAssigneeQuery>,
|
|
249
|
+
GetTaskAssigneePath {}
|
|
262
250
|
|
|
263
251
|
// GET /task/location/brand/{id} - Get location brand tasks
|
|
264
252
|
|
|
@@ -287,10 +275,9 @@ export interface GetTaskLocationBrandQuery {
|
|
|
287
275
|
export type GetTaskLocationBrandResponse = Tasks;
|
|
288
276
|
|
|
289
277
|
export interface GetTaskLocationBrandRequest
|
|
290
|
-
extends
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
278
|
+
extends BaseRequest,
|
|
279
|
+
RequestQuery<GetTaskLocationBrandQuery>,
|
|
280
|
+
GetTaskLocationBrandPath {}
|
|
294
281
|
|
|
295
282
|
// GET /task/location/group/{id} - Get location group tasks
|
|
296
283
|
|
|
@@ -319,7 +306,6 @@ export interface GetTaskLocationGroupQuery {
|
|
|
319
306
|
export type GetTaskLocationGroupResponse = Tasks;
|
|
320
307
|
|
|
321
308
|
export interface GetTaskLocationGroupRequest
|
|
322
|
-
extends
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}
|
|
309
|
+
extends BaseRequest,
|
|
310
|
+
RequestQuery<GetTaskLocationGroupQuery>,
|
|
311
|
+
GetTaskLocationGroupPath {}
|
package/src/interface/user.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
2
|
|
|
3
|
-
import { RequestQuery,
|
|
3
|
+
import { RequestQuery, BaseRequest } from "./util";
|
|
4
4
|
|
|
5
5
|
export interface Error {
|
|
6
6
|
message?: string;
|
|
@@ -227,9 +227,7 @@ export interface GetUserAuthQuery {
|
|
|
227
227
|
|
|
228
228
|
export type GetUserAuthResponse = auth;
|
|
229
229
|
|
|
230
|
-
export interface GetUserAuthRequest extends RequestQuery<GetUserAuthQuery> {
|
|
231
|
-
context?: RequestContext;
|
|
232
|
-
}
|
|
230
|
+
export interface GetUserAuthRequest extends BaseRequest, RequestQuery<GetUserAuthQuery> {}
|
|
233
231
|
|
|
234
232
|
// POST /user/auth - Use refresh token to generate a new access token and refresh token
|
|
235
233
|
|
|
@@ -237,9 +235,8 @@ export type PostUserAuthBody = RefreshToken;
|
|
|
237
235
|
|
|
238
236
|
export type PostUserAuthResponse = auth;
|
|
239
237
|
|
|
240
|
-
export interface PostUserAuthRequest {
|
|
238
|
+
export interface PostUserAuthRequest extends BaseRequest {
|
|
241
239
|
body: PostUserAuthBody;
|
|
242
|
-
context?: RequestContext;
|
|
243
240
|
}
|
|
244
241
|
|
|
245
242
|
// GET /user/zendesk - Get zendesk JWT token to allow web widget to search restricted articles
|
|
@@ -248,9 +245,7 @@ export interface GetUserZendeskResponse {
|
|
|
248
245
|
token: string;
|
|
249
246
|
}
|
|
250
247
|
|
|
251
|
-
export interface GetUserZendeskRequest {
|
|
252
|
-
context?: RequestContext;
|
|
253
|
-
}
|
|
248
|
+
export interface GetUserZendeskRequest extends BaseRequest {}
|
|
254
249
|
|
|
255
250
|
// POST /user - Create an User
|
|
256
251
|
|
|
@@ -263,9 +258,8 @@ export type PostUserBody = User;
|
|
|
263
258
|
|
|
264
259
|
export type PostUserResponse = User;
|
|
265
260
|
|
|
266
|
-
export interface PostUserRequest extends RequestQuery<PostUserQuery> {
|
|
261
|
+
export interface PostUserRequest extends BaseRequest, RequestQuery<PostUserQuery> {
|
|
267
262
|
body: PostUserBody;
|
|
268
|
-
context?: RequestContext;
|
|
269
263
|
}
|
|
270
264
|
|
|
271
265
|
// GET /user/{id} - Get an individual user
|
|
@@ -282,9 +276,7 @@ export interface GetUserQuery {
|
|
|
282
276
|
|
|
283
277
|
export type GetUserResponse = User;
|
|
284
278
|
|
|
285
|
-
export interface GetUserRequest extends RequestQuery<GetUserQuery>, GetUserPath {
|
|
286
|
-
context?: RequestContext;
|
|
287
|
-
}
|
|
279
|
+
export interface GetUserRequest extends BaseRequest, RequestQuery<GetUserQuery>, GetUserPath {}
|
|
288
280
|
|
|
289
281
|
// PUT /user/{id} - Update an individual user
|
|
290
282
|
|
|
@@ -302,9 +294,8 @@ export type PutUserBody = User;
|
|
|
302
294
|
|
|
303
295
|
export type PutUserResponse = User;
|
|
304
296
|
|
|
305
|
-
export interface PutUserRequest extends RequestQuery<PutUserQuery>, PutUserPath {
|
|
297
|
+
export interface PutUserRequest extends BaseRequest, RequestQuery<PutUserQuery>, PutUserPath {
|
|
306
298
|
body: PutUserBody;
|
|
307
|
-
context?: RequestContext;
|
|
308
299
|
}
|
|
309
300
|
|
|
310
301
|
// PATCH /user/{id} - Update an individual user
|
|
@@ -323,9 +314,8 @@ export type PatchUserBody = User;
|
|
|
323
314
|
|
|
324
315
|
export type PatchUserResponse = User;
|
|
325
316
|
|
|
326
|
-
export interface PatchUserRequest extends RequestQuery<PatchUserQuery>, PatchUserPath {
|
|
317
|
+
export interface PatchUserRequest extends BaseRequest, RequestQuery<PatchUserQuery>, PatchUserPath {
|
|
327
318
|
body: PatchUserBody;
|
|
328
|
-
context?: RequestContext;
|
|
329
319
|
}
|
|
330
320
|
|
|
331
321
|
// DELETE /user/{id} - delete an individual user
|
|
@@ -342,9 +332,10 @@ export interface DeleteUserQuery {
|
|
|
342
332
|
|
|
343
333
|
export type DeleteUserResponse = success;
|
|
344
334
|
|
|
345
|
-
export interface DeleteUserRequest
|
|
346
|
-
|
|
347
|
-
|
|
335
|
+
export interface DeleteUserRequest
|
|
336
|
+
extends BaseRequest,
|
|
337
|
+
RequestQuery<DeleteUserQuery>,
|
|
338
|
+
DeleteUserPath {}
|
|
348
339
|
|
|
349
340
|
// POST /user/device/auth - Endpoint for generating/retrieving KDS device token
|
|
350
341
|
|
|
@@ -352,9 +343,8 @@ export type PostUserKdsTokenBody = UserDeviceAuthBody;
|
|
|
352
343
|
|
|
353
344
|
export type PostUserKdsTokenResponse = KDSToken;
|
|
354
345
|
|
|
355
|
-
export interface PostUserKdsTokenRequest {
|
|
346
|
+
export interface PostUserKdsTokenRequest extends BaseRequest {
|
|
356
347
|
body: PostUserKdsTokenBody;
|
|
357
|
-
context?: RequestContext;
|
|
358
348
|
}
|
|
359
349
|
|
|
360
350
|
// GET /user/device/auth - Endpoint retrieving KDS device token
|
|
@@ -365,9 +355,7 @@ export interface GetUserKdsTokenQuery {
|
|
|
365
355
|
|
|
366
356
|
export type GetUserKdsTokenResponse = KDSDevices;
|
|
367
357
|
|
|
368
|
-
export interface GetUserKdsTokenRequest extends RequestQuery<GetUserKdsTokenQuery> {
|
|
369
|
-
context?: RequestContext;
|
|
370
|
-
}
|
|
358
|
+
export interface GetUserKdsTokenRequest extends BaseRequest, RequestQuery<GetUserKdsTokenQuery> {}
|
|
371
359
|
|
|
372
360
|
// DELETE /user/device/auth/{device_id} - Endpoint for deleting a device by specified device_id
|
|
373
361
|
|
|
@@ -378,9 +366,7 @@ export interface DeleteUserDeviceAuthPath {
|
|
|
378
366
|
|
|
379
367
|
export type DeleteUserDeviceAuthResponse = Error;
|
|
380
368
|
|
|
381
|
-
export interface DeleteUserDeviceAuthRequest extends DeleteUserDeviceAuthPath {
|
|
382
|
-
context?: RequestContext;
|
|
383
|
-
}
|
|
369
|
+
export interface DeleteUserDeviceAuthRequest extends BaseRequest, DeleteUserDeviceAuthPath {}
|
|
384
370
|
|
|
385
371
|
// PATCH /user/device/auth/{device_id} - Endpoint for authorizing device to retrieve valid kds token
|
|
386
372
|
|
|
@@ -391,9 +377,7 @@ export interface PatchUserAuthKdsPath {
|
|
|
391
377
|
|
|
392
378
|
export type PatchUserAuthKdsResponse = KDSDevice;
|
|
393
379
|
|
|
394
|
-
export interface PatchUserAuthKdsRequest extends PatchUserAuthKdsPath {
|
|
395
|
-
context?: RequestContext;
|
|
396
|
-
}
|
|
380
|
+
export interface PatchUserAuthKdsRequest extends BaseRequest, PatchUserAuthKdsPath {}
|
|
397
381
|
|
|
398
382
|
// POST /user/{id}/changepassword - Change the users password
|
|
399
383
|
|
|
@@ -406,18 +390,15 @@ export type PostUserChangePasswordBody = Changepassword;
|
|
|
406
390
|
|
|
407
391
|
export type PostUserChangePasswordResponse = User;
|
|
408
392
|
|
|
409
|
-
export interface PostUserChangePasswordRequest extends PostUserChangePasswordPath {
|
|
393
|
+
export interface PostUserChangePasswordRequest extends BaseRequest, PostUserChangePasswordPath {
|
|
410
394
|
body: PostUserChangePasswordBody;
|
|
411
|
-
context?: RequestContext;
|
|
412
395
|
}
|
|
413
396
|
|
|
414
397
|
// DELETE /user/logout - Logs out current user
|
|
415
398
|
|
|
416
399
|
export type DeleteUserLogoutResponse = success;
|
|
417
400
|
|
|
418
|
-
export interface DeleteUserLogoutRequest {
|
|
419
|
-
context?: RequestContext;
|
|
420
|
-
}
|
|
401
|
+
export interface DeleteUserLogoutRequest extends BaseRequest {}
|
|
421
402
|
|
|
422
403
|
// POST /user/{id}/secret/{key} - Add a secret key
|
|
423
404
|
|
|
@@ -431,9 +412,8 @@ export type PostUserAddSecretBody = any;
|
|
|
431
412
|
|
|
432
413
|
export type PostUserAddSecretResponse = Key;
|
|
433
414
|
|
|
434
|
-
export interface PostUserAddSecretRequest extends PostUserAddSecretPath {
|
|
415
|
+
export interface PostUserAddSecretRequest extends BaseRequest, PostUserAddSecretPath {
|
|
435
416
|
body: PostUserAddSecretBody;
|
|
436
|
-
context?: RequestContext;
|
|
437
417
|
}
|
|
438
418
|
|
|
439
419
|
// GET /user/{id}/secret/{key} - Get back a secret key
|
|
@@ -448,9 +428,7 @@ export interface GetUserSecretResponse {
|
|
|
448
428
|
[index: string]: any;
|
|
449
429
|
}
|
|
450
430
|
|
|
451
|
-
export interface GetUserSecretRequest extends GetUserSecretPath {
|
|
452
|
-
context?: RequestContext;
|
|
453
|
-
}
|
|
431
|
+
export interface GetUserSecretRequest extends BaseRequest, GetUserSecretPath {}
|
|
454
432
|
|
|
455
433
|
// POST /user/forgotpassword - Reset the users password
|
|
456
434
|
|
|
@@ -465,9 +443,10 @@ export type PostUserResetPasswordBody = Forgotpassword;
|
|
|
465
443
|
|
|
466
444
|
export type PostUserResetPasswordResponse = success;
|
|
467
445
|
|
|
468
|
-
export interface PostUserResetPasswordRequest
|
|
446
|
+
export interface PostUserResetPasswordRequest
|
|
447
|
+
extends BaseRequest,
|
|
448
|
+
RequestQuery<PostUserResetPasswordQuery> {
|
|
469
449
|
body: PostUserResetPasswordBody;
|
|
470
|
-
context?: RequestContext;
|
|
471
450
|
}
|
|
472
451
|
|
|
473
452
|
// POST /user/{id}/resetpassword - Reset the users password using a reset token
|
|
@@ -487,10 +466,10 @@ export type PostUserResetPasswordTokenBody = Resetpassword;
|
|
|
487
466
|
export type PostUserResetPasswordTokenResponse = success;
|
|
488
467
|
|
|
489
468
|
export interface PostUserResetPasswordTokenRequest
|
|
490
|
-
extends
|
|
469
|
+
extends BaseRequest,
|
|
470
|
+
RequestQuery<PostUserResetPasswordTokenQuery>,
|
|
491
471
|
PostUserResetPasswordTokenPath {
|
|
492
472
|
body: PostUserResetPasswordTokenBody;
|
|
493
|
-
context?: RequestContext;
|
|
494
473
|
}
|
|
495
474
|
|
|
496
475
|
// GET /user/realm/{realm} - Get all the users in a realm
|
|
@@ -512,10 +491,9 @@ export interface GetUserRealmUsersQuery {
|
|
|
512
491
|
export type GetUserRealmUsersResponse = Users;
|
|
513
492
|
|
|
514
493
|
export interface GetUserRealmUsersRequest
|
|
515
|
-
extends
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
494
|
+
extends BaseRequest,
|
|
495
|
+
RequestQuery<GetUserRealmUsersQuery>,
|
|
496
|
+
GetUserRealmUsersPath {}
|
|
519
497
|
|
|
520
498
|
// GET /user/{id}/permissions - Get user permissions
|
|
521
499
|
|
|
@@ -532,10 +510,9 @@ export interface GetUserPermissionsQuery {
|
|
|
532
510
|
export type GetUserPermissionsResponse = User;
|
|
533
511
|
|
|
534
512
|
export interface GetUserPermissionsRequest
|
|
535
|
-
extends
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
513
|
+
extends BaseRequest,
|
|
514
|
+
RequestQuery<GetUserPermissionsQuery>,
|
|
515
|
+
GetUserPermissionsPath {}
|
|
539
516
|
|
|
540
517
|
// PUT /user/{id}/permissions - Update user permissions
|
|
541
518
|
|
|
@@ -556,10 +533,10 @@ export interface PutUserPermissionsBody {
|
|
|
556
533
|
export type PutUserPermissionsResponse = User;
|
|
557
534
|
|
|
558
535
|
export interface PutUserPermissionsRequest
|
|
559
|
-
extends
|
|
536
|
+
extends BaseRequest,
|
|
537
|
+
RequestQuery<PutUserPermissionsQuery>,
|
|
560
538
|
PutUserPermissionsPath {
|
|
561
539
|
body: PutUserPermissionsBody;
|
|
562
|
-
context?: RequestContext;
|
|
563
540
|
}
|
|
564
541
|
|
|
565
542
|
// POST /user/{id}/checkin - Create check-in for user
|
|
@@ -573,9 +550,8 @@ export type PostUserCheckInBody = CheckInUserInfo;
|
|
|
573
550
|
|
|
574
551
|
export type PostUserCheckInResponse = Checkin;
|
|
575
552
|
|
|
576
|
-
export interface PostUserCheckInRequest extends PostUserCheckInPath {
|
|
553
|
+
export interface PostUserCheckInRequest extends BaseRequest, PostUserCheckInPath {
|
|
577
554
|
body: PostUserCheckInBody;
|
|
578
|
-
context?: RequestContext;
|
|
579
555
|
}
|
|
580
556
|
|
|
581
557
|
// PATCH /user/{id}/checkin/{checkin_id} - Update check-in
|
|
@@ -591,9 +567,8 @@ export type PatchUserCheckinBody = PatchCheckin;
|
|
|
591
567
|
|
|
592
568
|
export type PatchUserCheckinResponse = Checkin;
|
|
593
569
|
|
|
594
|
-
export interface PatchUserCheckinRequest extends PatchUserCheckinPath {
|
|
570
|
+
export interface PatchUserCheckinRequest extends BaseRequest, PatchUserCheckinPath {
|
|
595
571
|
body: PatchUserCheckinBody;
|
|
596
|
-
context?: RequestContext;
|
|
597
572
|
}
|
|
598
573
|
|
|
599
574
|
// GET /user/checkin/search - Search check-in
|
|
@@ -607,9 +582,9 @@ export interface GetUserSearchCheckInQuery {
|
|
|
607
582
|
|
|
608
583
|
export type GetUserSearchCheckInResponse = Checkin;
|
|
609
584
|
|
|
610
|
-
export interface GetUserSearchCheckInRequest
|
|
611
|
-
|
|
612
|
-
}
|
|
585
|
+
export interface GetUserSearchCheckInRequest
|
|
586
|
+
extends BaseRequest,
|
|
587
|
+
RequestQuery<GetUserSearchCheckInQuery> {}
|
|
613
588
|
|
|
614
589
|
// POST /user/{id}/verification - Send email verification to user
|
|
615
590
|
|
|
@@ -620,9 +595,9 @@ export interface PostUserSendEmailVerificationPath {
|
|
|
620
595
|
|
|
621
596
|
export type PostUserSendEmailVerificationResponse = success;
|
|
622
597
|
|
|
623
|
-
export interface PostUserSendEmailVerificationRequest
|
|
624
|
-
|
|
625
|
-
}
|
|
598
|
+
export interface PostUserSendEmailVerificationRequest
|
|
599
|
+
extends BaseRequest,
|
|
600
|
+
PostUserSendEmailVerificationPath {}
|
|
626
601
|
|
|
627
602
|
// PUT /user/{id}/verification/confirm - Verify a users email
|
|
628
603
|
|
|
@@ -635,9 +610,8 @@ export type PutUserVerifyUserEmailBody = VerifyEmail;
|
|
|
635
610
|
|
|
636
611
|
export type PutUserVerifyUserEmailResponse = success;
|
|
637
612
|
|
|
638
|
-
export interface PutUserVerifyUserEmailRequest extends PutUserVerifyUserEmailPath {
|
|
613
|
+
export interface PutUserVerifyUserEmailRequest extends BaseRequest, PutUserVerifyUserEmailPath {
|
|
639
614
|
body: PutUserVerifyUserEmailBody;
|
|
640
|
-
context?: RequestContext;
|
|
641
615
|
}
|
|
642
616
|
|
|
643
617
|
// POST /user/{id}/verification/phone - Send phone verification to user
|
|
@@ -659,10 +633,10 @@ export interface PostUserVerificationPhoneBody {
|
|
|
659
633
|
export type PostUserVerificationPhoneResponse = success;
|
|
660
634
|
|
|
661
635
|
export interface PostUserVerificationPhoneRequest
|
|
662
|
-
extends
|
|
636
|
+
extends BaseRequest,
|
|
637
|
+
RequestQuery<PostUserVerificationPhoneQuery>,
|
|
663
638
|
PostUserVerificationPhonePath {
|
|
664
639
|
body: PostUserVerificationPhoneBody;
|
|
665
|
-
context?: RequestContext;
|
|
666
640
|
}
|
|
667
641
|
|
|
668
642
|
// PUT /user/{id}/verification/phone - Attempt phone verification for user
|
|
@@ -679,7 +653,6 @@ export interface PutUserVerificationPhoneBody {
|
|
|
679
653
|
|
|
680
654
|
export type PutUserVerificationPhoneResponse = success;
|
|
681
655
|
|
|
682
|
-
export interface PutUserVerificationPhoneRequest extends PutUserVerificationPhonePath {
|
|
656
|
+
export interface PutUserVerificationPhoneRequest extends BaseRequest, PutUserVerificationPhonePath {
|
|
683
657
|
body: PutUserVerificationPhoneBody;
|
|
684
|
-
context?: RequestContext;
|
|
685
658
|
}
|
package/src/interface/util.ts
CHANGED
|
@@ -6,8 +6,8 @@ export type RequestQuery<T extends object> = {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Provider request context.
|
|
10
|
+
*/
|
|
11
11
|
export interface RequestContext {
|
|
12
12
|
subject: string;
|
|
13
13
|
user_id: string;
|
|
@@ -17,3 +17,11 @@ export interface RequestContext {
|
|
|
17
17
|
sub: string;
|
|
18
18
|
domain?: string;
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* All requests implement this interface.
|
|
23
|
+
*/
|
|
24
|
+
export interface BaseRequest {
|
|
25
|
+
context?: RequestContext;
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
}
|