@compassdigital/sdk.typescript 3.77.1 → 4.1.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/base.js.map +1 -1
- package/lib/index.d.ts +13 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -2
- package/lib/index.js.map +1 -1
- package/lib/interface/calendar.d.ts +1 -1
- package/lib/interface/delivery.d.ts +2 -2
- package/lib/interface/delivery.d.ts.map +1 -1
- package/lib/interface/file.d.ts +1 -1
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/frictionless.d.ts +3 -3
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/location.d.ts +15 -6
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/location.js +12 -0
- package/lib/interface/location.js.map +1 -1
- package/lib/interface/mealplan.d.ts +6 -5
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +498 -406
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/menu.js +6 -0
- package/lib/interface/menu.js.map +1 -1
- package/lib/interface/notification.d.ts +2 -2
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +8 -6
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +11 -6
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/partner.js +6 -0
- package/lib/interface/partner.js.map +1 -1
- package/lib/interface/payment.d.ts +23 -18
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +13 -6
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/promo.js +8 -0
- package/lib/interface/promo.js.map +1 -1
- package/lib/interface/report.d.ts +8 -8
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +14 -9
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/shoppingcart.js +5 -0
- package/lib/interface/shoppingcart.js.map +1 -1
- package/lib/interface/task.d.ts +14 -14
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +16 -21
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +5 -5
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +26 -5
- package/src/interface/announcement.ts +1 -1
- package/src/interface/calendar.ts +1 -1
- package/src/interface/delivery.ts +15 -2
- package/src/interface/file.ts +1 -1
- package/src/interface/frictionless.ts +3 -3
- package/src/interface/location.ts +16 -8
- package/src/interface/mealplan.ts +8 -6
- package/src/interface/menu.ts +511 -415
- package/src/interface/notification.ts +2 -2
- package/src/interface/order.ts +27 -12
- package/src/interface/partner.ts +10 -6
- package/src/interface/payment.ts +26 -18
- package/src/interface/promo.ts +12 -6
- package/src/interface/report.ts +8 -8
- package/src/interface/shoppingcart.ts +14 -9
- package/src/interface/task.ts +26 -14
- package/src/interface/user.ts +21 -27
- package/src/interface/vendor.ts +5 -5
package/src/index.ts
CHANGED
|
@@ -723,6 +723,7 @@ import {
|
|
|
723
723
|
PostMenuV3DraftModifierGroupsResponse,
|
|
724
724
|
GetMenuV3DraftModifierGroupsCountQuery,
|
|
725
725
|
GetMenuV3DraftModifierGroupsCountResponse,
|
|
726
|
+
PostMenuV3DraftModifierGroupDuplicateResponse,
|
|
726
727
|
GetMenuV3ModifierGroupQuery,
|
|
727
728
|
GetMenuV3ModifierGroupResponse,
|
|
728
729
|
GetMenuV3ModifierGroupsQuery,
|
|
@@ -3327,7 +3328,7 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
3327
3328
|
/**
|
|
3328
3329
|
* POST /mealplan/{id}/authorize - Authorize Transaction
|
|
3329
3330
|
*
|
|
3330
|
-
* @param id -
|
|
3331
|
+
* @param id - Meal plan ID
|
|
3331
3332
|
* @param body
|
|
3332
3333
|
* @param options - additional request options
|
|
3333
3334
|
*/
|
|
@@ -3828,7 +3829,7 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
3828
3829
|
/**
|
|
3829
3830
|
* GET /announcement/resource/{id} - Get Announcements
|
|
3830
3831
|
*
|
|
3831
|
-
* @param id - Id of the entity to which announcement is specifically related
|
|
3832
|
+
* @param id - Id of the entity to which announcement is specifically related.
|
|
3832
3833
|
* @param options - additional request options
|
|
3833
3834
|
*/
|
|
3834
3835
|
get_announcement_resource(
|
|
@@ -3940,7 +3941,7 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
3940
3941
|
*/
|
|
3941
3942
|
get_report_analytics_group(
|
|
3942
3943
|
location_group: string,
|
|
3943
|
-
report_type:
|
|
3944
|
+
report_type: "bills" | "sales" | "transactions" | "top-items",
|
|
3944
3945
|
options: {
|
|
3945
3946
|
query: GetReportAnalyticsGroupQuery;
|
|
3946
3947
|
} & RequestOptions
|
|
@@ -6084,7 +6085,7 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
6084
6085
|
*/
|
|
6085
6086
|
post_menu_v3_brand_attachment(
|
|
6086
6087
|
id: string,
|
|
6087
|
-
name:
|
|
6088
|
+
name: "thumbnail",
|
|
6088
6089
|
options?: {
|
|
6089
6090
|
query?: PostMenuV3BrandAttachmentQuery;
|
|
6090
6091
|
} & RequestOptions
|
|
@@ -7134,7 +7135,7 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
7134
7135
|
*/
|
|
7135
7136
|
post_menu_v3_item_attachment(
|
|
7136
7137
|
id: string,
|
|
7137
|
-
name:
|
|
7138
|
+
name: "thumbnail",
|
|
7138
7139
|
options?: {
|
|
7139
7140
|
query?: PostMenuV3ItemAttachmentQuery;
|
|
7140
7141
|
} & RequestOptions
|
|
@@ -7567,6 +7568,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
7567
7568
|
);
|
|
7568
7569
|
}
|
|
7569
7570
|
|
|
7571
|
+
/**
|
|
7572
|
+
* POST /menu/v3/draft/modifier-group/{id}/duplicate
|
|
7573
|
+
*
|
|
7574
|
+
* @param id
|
|
7575
|
+
* @param options - additional request options
|
|
7576
|
+
*/
|
|
7577
|
+
post_menu_v3_draft_modifier_group_duplicate(
|
|
7578
|
+
id: string,
|
|
7579
|
+
options?: RequestOptions
|
|
7580
|
+
): ResponsePromise<PostMenuV3DraftModifierGroupDuplicateResponse> {
|
|
7581
|
+
return this.request(
|
|
7582
|
+
"menu",
|
|
7583
|
+
"post_menu_v3_draft_modifier_group_duplicate",
|
|
7584
|
+
"post",
|
|
7585
|
+
`/menu/v3/draft/modifier-group/${id}/duplicate`,
|
|
7586
|
+
null,
|
|
7587
|
+
options
|
|
7588
|
+
);
|
|
7589
|
+
}
|
|
7590
|
+
|
|
7570
7591
|
/**
|
|
7571
7592
|
* GET /menu/v3/modifier-group/{id}
|
|
7572
7593
|
*
|
|
@@ -62,7 +62,7 @@ export interface PostAnnouncementRequest extends BaseRequest {
|
|
|
62
62
|
// GET /announcement/resource/{id} - Get Announcements
|
|
63
63
|
|
|
64
64
|
export interface GetAnnouncementResourcePath {
|
|
65
|
-
// Id of the entity to which announcement is specifically related
|
|
65
|
+
// Id of the entity to which announcement is specifically related.
|
|
66
66
|
id: string;
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -117,7 +117,7 @@ export interface GetCalendarCdlPath {
|
|
|
117
117
|
|
|
118
118
|
export interface GetCalendarCdlQuery {
|
|
119
119
|
// Start date in ms to get 7 day calendar from. Defaults now.
|
|
120
|
-
start_date?:
|
|
120
|
+
start_date?: string;
|
|
121
121
|
// Graphql query string
|
|
122
122
|
_query?: string;
|
|
123
123
|
}
|
|
@@ -57,13 +57,26 @@ export interface Delivery {
|
|
|
57
57
|
};
|
|
58
58
|
customer?: string;
|
|
59
59
|
loading_code?: string;
|
|
60
|
-
state?:
|
|
60
|
+
state?:
|
|
61
|
+
| "RESERVED"
|
|
62
|
+
| "CONFIRMED"
|
|
63
|
+
| "ENROUTE_LOADING_AREA"
|
|
64
|
+
| "ARRIVING_LOADING_AREA"
|
|
65
|
+
| "WAITING_LOADING"
|
|
66
|
+
| "LOADING"
|
|
67
|
+
| "ENROUTE_CUSTOMER"
|
|
68
|
+
| "ARRIVING_CUSTOMER"
|
|
69
|
+
| "WAITING_CUSTOMER"
|
|
70
|
+
| "UNLOADING"
|
|
71
|
+
| "COMPLETED"
|
|
72
|
+
| "CANCELLED"
|
|
73
|
+
| "CUSTOMER_NO_SHOW";
|
|
61
74
|
state_reason?: string;
|
|
62
75
|
tracker_url?: string;
|
|
63
76
|
}
|
|
64
77
|
|
|
65
78
|
export interface Available {
|
|
66
|
-
deliverable:
|
|
79
|
+
deliverable: true;
|
|
67
80
|
}
|
|
68
81
|
|
|
69
82
|
export interface PostAvailabilityBody {
|
package/src/interface/file.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface PostFileBody {
|
|
|
21
21
|
// If not specified, random name+timestamp will be generated, otherwise filename+timestamp format is used
|
|
22
22
|
file_name?: string;
|
|
23
23
|
// Set custom bucket to save in. Defaults to images.compassdigital.org
|
|
24
|
-
bucket_name?:
|
|
24
|
+
bucket_name?: "images.compassdigital.org" | "assets.compassdigital.org";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export type PostFileResponse = File;
|
|
@@ -13,7 +13,7 @@ export interface StandardCognitionEvent {
|
|
|
13
13
|
|
|
14
14
|
export interface FrictionlessSupportResponse {
|
|
15
15
|
supported: boolean;
|
|
16
|
-
version?:
|
|
16
|
+
version?: "NFC" | "QR";
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface ForbiddenErrorDTO {
|
|
@@ -67,14 +67,14 @@ export interface FailedCheckInDTO {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export interface CheckCheckInStatusResponseDTO {
|
|
70
|
-
status:
|
|
70
|
+
status: "CREATING" | "ACTIVE" | "ERROR" | "CANCELED" | "PROCESSING" | "COMPLETED";
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
// POST /frictionless/webhook/standardcognition - Receive frictionless standard cognition events
|
|
74
74
|
|
|
75
75
|
export type StandardCognitionEventWebhookControllerExecuteBody = StandardCognitionEvent;
|
|
76
76
|
|
|
77
|
-
export type StandardCognitionEventWebhookControllerExecuteResponse =
|
|
77
|
+
export type StandardCognitionEventWebhookControllerExecuteResponse = {};
|
|
78
78
|
|
|
79
79
|
export interface StandardCognitionEventWebhookControllerExecuteRequest extends BaseRequest {
|
|
80
80
|
body: StandardCognitionEventWebhookControllerExecuteBody;
|
|
@@ -416,7 +416,11 @@ export interface BadRequest {
|
|
|
416
416
|
error?: string;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
|
|
419
|
+
enum PartnerStatus {
|
|
420
|
+
AWAIT_PARTNER = "await_partner",
|
|
421
|
+
AWAIT_SCOUT = "await_scout",
|
|
422
|
+
COMPLETED = "completed",
|
|
423
|
+
}
|
|
420
424
|
|
|
421
425
|
export interface WaitTime {
|
|
422
426
|
// maxium wait time to the next time slot in minutes
|
|
@@ -427,7 +431,11 @@ export interface WaitTime {
|
|
|
427
431
|
ready_time: number;
|
|
428
432
|
}
|
|
429
433
|
|
|
430
|
-
|
|
434
|
+
enum BrandOrMenuState {
|
|
435
|
+
OPEN = "open",
|
|
436
|
+
CLOSED = "closed",
|
|
437
|
+
PREORDER = "preorder",
|
|
438
|
+
}
|
|
431
439
|
|
|
432
440
|
export interface MenuAssociations {
|
|
433
441
|
menu_associations?: MenuAssociation[];
|
|
@@ -470,9 +478,9 @@ export interface GetLocationsRequest extends BaseRequest, RequestQuery<GetLocati
|
|
|
470
478
|
// GET /location/search - Gets Location within a radius of the provided point
|
|
471
479
|
|
|
472
480
|
export interface GetLocationSearchQuery {
|
|
473
|
-
|
|
481
|
+
//@deprecated
|
|
474
482
|
lat?: number;
|
|
475
|
-
|
|
483
|
+
//@deprecated
|
|
476
484
|
long?: number;
|
|
477
485
|
// Operation id to be used
|
|
478
486
|
operation_id?: number;
|
|
@@ -1285,13 +1293,13 @@ export interface GetLocationV2GroupsQuery {
|
|
|
1285
1293
|
// Filter groups by multigroup id. Should be like an array of string
|
|
1286
1294
|
id_multigroups?: string;
|
|
1287
1295
|
// The number of items per page to return
|
|
1288
|
-
limit?:
|
|
1296
|
+
limit?: string;
|
|
1289
1297
|
// ASC or DESC
|
|
1290
|
-
sortOrder?:
|
|
1298
|
+
sortOrder?: "ASC" | "DESC";
|
|
1291
1299
|
// The page number to return
|
|
1292
|
-
page?:
|
|
1300
|
+
page?: string;
|
|
1293
1301
|
// Expand group results with children locations and brands
|
|
1294
|
-
expanded?:
|
|
1302
|
+
expanded?: string;
|
|
1295
1303
|
// Filter groups by given string
|
|
1296
1304
|
filter?: string;
|
|
1297
1305
|
// Graphql query string
|
|
@@ -19,12 +19,14 @@ export interface Tender {
|
|
|
19
19
|
balance?: number;
|
|
20
20
|
amount?: number;
|
|
21
21
|
type?: string;
|
|
22
|
-
is?:
|
|
23
|
-
validated?: boolean;
|
|
24
|
-
};
|
|
22
|
+
is?: TenderIs;
|
|
25
23
|
currency?: string;
|
|
26
24
|
}
|
|
27
25
|
|
|
26
|
+
export interface TenderIs {
|
|
27
|
+
validated?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
28
30
|
export interface TendersAndAuth {
|
|
29
31
|
tenders?: Tender[];
|
|
30
32
|
auth?: {
|
|
@@ -198,7 +200,7 @@ export interface DeleteMealplanTenderResponse {
|
|
|
198
200
|
id?: string;
|
|
199
201
|
name?: string;
|
|
200
202
|
balance?: number;
|
|
201
|
-
is?:
|
|
203
|
+
is?: TenderIs;
|
|
202
204
|
transaction_id?: string;
|
|
203
205
|
tender_id?: number;
|
|
204
206
|
currency?: string;
|
|
@@ -272,7 +274,7 @@ export interface PutMealplanVerifyRequest extends BaseRequest, PutMealplanVerify
|
|
|
272
274
|
// POST /mealplan/{id}/authorize - Authorize Transaction
|
|
273
275
|
|
|
274
276
|
export interface PostMealplanAuthorizePath {
|
|
275
|
-
//
|
|
277
|
+
// Meal plan ID
|
|
276
278
|
id: string;
|
|
277
279
|
}
|
|
278
280
|
|
|
@@ -288,7 +290,7 @@ export interface PostMealplanAuthorizeResponse {
|
|
|
288
290
|
id?: string;
|
|
289
291
|
name?: string;
|
|
290
292
|
balance?: number;
|
|
291
|
-
is?:
|
|
293
|
+
is?: TenderIs;
|
|
292
294
|
transaction_id?: string;
|
|
293
295
|
currency?: string;
|
|
294
296
|
}
|