@compassdigital/sdk.typescript 4.56.0 → 4.58.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 +15 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/location.d.ts +10 -2
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +38 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/package.json +2 -2
- package/pipeline.yml +6 -0
- package/src/index.ts +44 -0
- package/src/interface/location.ts +10 -2
- package/src/interface/menu.ts +49 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compassdigital/sdk.typescript",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.58.0",
|
|
4
4
|
"description": "Compass Digital Labs TypeScript SDK",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@compassdigital/review": "^7.3.0",
|
|
49
|
-
"@compassdigital/sdk.typescript.cli": "^4.
|
|
49
|
+
"@compassdigital/sdk.typescript.cli": "^4.19.0",
|
|
50
50
|
"@swc/core": "^1.4.1",
|
|
51
51
|
"@swc/jest": "^0.2.36",
|
|
52
52
|
"@types/jest": "^29.2.4",
|
package/pipeline.yml
CHANGED
package/src/index.ts
CHANGED
|
@@ -705,6 +705,8 @@ import {
|
|
|
705
705
|
PatchMenuV3DraftItemResponse,
|
|
706
706
|
DeleteMenuV3DraftItemQuery,
|
|
707
707
|
DeleteMenuV3DraftItemResponse,
|
|
708
|
+
DeleteMenuV3DraftItemsBody,
|
|
709
|
+
DeleteMenuV3DraftItemsResponse,
|
|
708
710
|
GetMenuV3DraftItemsQuery,
|
|
709
711
|
GetMenuV3DraftItemsResponse,
|
|
710
712
|
PostMenuV3DraftItemsBody,
|
|
@@ -798,6 +800,8 @@ import {
|
|
|
798
800
|
PatchMenuV3DraftModifierResponse,
|
|
799
801
|
DeleteMenuV3DraftModifierQuery,
|
|
800
802
|
DeleteMenuV3DraftModifierResponse,
|
|
803
|
+
DeleteMenuV3DraftModifiersBody,
|
|
804
|
+
DeleteMenuV3DraftModifiersResponse,
|
|
801
805
|
GetMenuV3DraftModifiersQuery,
|
|
802
806
|
GetMenuV3DraftModifiersResponse,
|
|
803
807
|
PostMenuV3DraftModifiersBody,
|
|
@@ -7428,6 +7432,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
7428
7432
|
);
|
|
7429
7433
|
}
|
|
7430
7434
|
|
|
7435
|
+
/**
|
|
7436
|
+
* DELETE /menu/v3/draft/items
|
|
7437
|
+
*
|
|
7438
|
+
* @param body
|
|
7439
|
+
* @param options - additional request options
|
|
7440
|
+
*/
|
|
7441
|
+
delete_menu_v3_draft_items(
|
|
7442
|
+
body: DeleteMenuV3DraftItemsBody,
|
|
7443
|
+
options?: RequestOptions,
|
|
7444
|
+
): ResponsePromise<DeleteMenuV3DraftItemsResponse> {
|
|
7445
|
+
return this.request(
|
|
7446
|
+
"menu",
|
|
7447
|
+
"delete_menu_v3_draft_items",
|
|
7448
|
+
"delete",
|
|
7449
|
+
`/menu/v3/draft/items`,
|
|
7450
|
+
body,
|
|
7451
|
+
options,
|
|
7452
|
+
);
|
|
7453
|
+
}
|
|
7454
|
+
|
|
7431
7455
|
/**
|
|
7432
7456
|
* GET /menu/v3/draft/items
|
|
7433
7457
|
*
|
|
@@ -8392,6 +8416,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
8392
8416
|
);
|
|
8393
8417
|
}
|
|
8394
8418
|
|
|
8419
|
+
/**
|
|
8420
|
+
* DELETE /menu/v3/draft/modifiers
|
|
8421
|
+
*
|
|
8422
|
+
* @param body
|
|
8423
|
+
* @param options - additional request options
|
|
8424
|
+
*/
|
|
8425
|
+
delete_menu_v3_draft_modifiers(
|
|
8426
|
+
body: DeleteMenuV3DraftModifiersBody,
|
|
8427
|
+
options?: RequestOptions,
|
|
8428
|
+
): ResponsePromise<DeleteMenuV3DraftModifiersResponse> {
|
|
8429
|
+
return this.request(
|
|
8430
|
+
"menu",
|
|
8431
|
+
"delete_menu_v3_draft_modifiers",
|
|
8432
|
+
"delete",
|
|
8433
|
+
`/menu/v3/draft/modifiers`,
|
|
8434
|
+
body,
|
|
8435
|
+
options,
|
|
8436
|
+
);
|
|
8437
|
+
}
|
|
8438
|
+
|
|
8395
8439
|
/**
|
|
8396
8440
|
* GET /menu/v3/draft/modifiers
|
|
8397
8441
|
*
|
|
@@ -97,7 +97,11 @@ export interface Brand {
|
|
|
97
97
|
};
|
|
98
98
|
hours?: Hours[];
|
|
99
99
|
deliveryHours?: DeliveryHours[];
|
|
100
|
-
style?:
|
|
100
|
+
style?: {
|
|
101
|
+
logo?: string | null;
|
|
102
|
+
main_logo?: string | null;
|
|
103
|
+
alt_logo?: string | null;
|
|
104
|
+
};
|
|
101
105
|
// pos
|
|
102
106
|
pos?: string;
|
|
103
107
|
terminals?: Record<string, any>[];
|
|
@@ -294,7 +298,11 @@ export interface Group {
|
|
|
294
298
|
meta?: {
|
|
295
299
|
[index: string]: any;
|
|
296
300
|
};
|
|
297
|
-
style?:
|
|
301
|
+
style?: {
|
|
302
|
+
logo?: string | null;
|
|
303
|
+
main_logo?: string | null;
|
|
304
|
+
alt_logo?: string | null;
|
|
305
|
+
};
|
|
298
306
|
timezone?: string;
|
|
299
307
|
[index: string]: any;
|
|
300
308
|
}
|
package/src/interface/menu.ts
CHANGED
|
@@ -44,6 +44,11 @@ export interface Menu {
|
|
|
44
44
|
last_modified_user?: string;
|
|
45
45
|
centricos?: boolean;
|
|
46
46
|
version?: number;
|
|
47
|
+
// V3 Brand metadata if menu came from Centric
|
|
48
|
+
brand?: {
|
|
49
|
+
id?: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
};
|
|
47
52
|
[index: string]: any;
|
|
48
53
|
};
|
|
49
54
|
}
|
|
@@ -66,6 +71,8 @@ export interface Item {
|
|
|
66
71
|
price?: {
|
|
67
72
|
amount?: number;
|
|
68
73
|
currency?: string;
|
|
74
|
+
total_price?: number;
|
|
75
|
+
discount?: number;
|
|
69
76
|
};
|
|
70
77
|
// Meal exchange value of the item
|
|
71
78
|
meal_value?: number;
|
|
@@ -138,6 +145,8 @@ export interface Item {
|
|
|
138
145
|
tax?: {
|
|
139
146
|
tax_tag_code?: string;
|
|
140
147
|
tax_jwo_code?: string;
|
|
148
|
+
tax_rate?: number;
|
|
149
|
+
tax_amount?: number;
|
|
141
150
|
};
|
|
142
151
|
[index: string]: any;
|
|
143
152
|
};
|
|
@@ -345,6 +354,10 @@ export interface Menus {
|
|
|
345
354
|
}
|
|
346
355
|
|
|
347
356
|
export interface Items {
|
|
357
|
+
meta?: {
|
|
358
|
+
total_tax_amount?: number;
|
|
359
|
+
[index: string]: any;
|
|
360
|
+
};
|
|
348
361
|
items?: Item[];
|
|
349
362
|
}
|
|
350
363
|
|
|
@@ -864,6 +877,7 @@ export interface AuditDTO {
|
|
|
864
877
|
message?: string;
|
|
865
878
|
id?: string;
|
|
866
879
|
data?: Record<string, any>;
|
|
880
|
+
s3_link?: string;
|
|
867
881
|
brand?: DraftBrandDTO;
|
|
868
882
|
permissions?: Record<string, any>;
|
|
869
883
|
[index: string]: any;
|
|
@@ -897,6 +911,7 @@ export interface AuditListDraftItemDTO {
|
|
|
897
911
|
updated_at?: string;
|
|
898
912
|
deleted_at?: string;
|
|
899
913
|
data?: Record<string, any>;
|
|
914
|
+
s3_link?: string;
|
|
900
915
|
version?: number;
|
|
901
916
|
brand?: DraftBrandDTO;
|
|
902
917
|
permissions?: Record<string, any>;
|
|
@@ -4562,6 +4577,23 @@ export interface DeleteMenuV3DraftItemRequest
|
|
|
4562
4577
|
RequestQuery<DeleteMenuV3DraftItemQuery>,
|
|
4563
4578
|
DeleteMenuV3DraftItemPath {}
|
|
4564
4579
|
|
|
4580
|
+
// DELETE /menu/v3/draft/items
|
|
4581
|
+
|
|
4582
|
+
export interface DeleteMenuV3DraftItemsBody {
|
|
4583
|
+
id_list: string[];
|
|
4584
|
+
[index: string]: any;
|
|
4585
|
+
}
|
|
4586
|
+
|
|
4587
|
+
export interface DeleteMenuV3DraftItemsResponse {
|
|
4588
|
+
results: DraftItemDTO[];
|
|
4589
|
+
meta?: ListResponseMetadataDTO;
|
|
4590
|
+
[index: string]: any;
|
|
4591
|
+
}
|
|
4592
|
+
|
|
4593
|
+
export interface DeleteMenuV3DraftItemsRequest extends BaseRequest {
|
|
4594
|
+
body: DeleteMenuV3DraftItemsBody;
|
|
4595
|
+
}
|
|
4596
|
+
|
|
4565
4597
|
// GET /menu/v3/draft/items
|
|
4566
4598
|
|
|
4567
4599
|
export interface GetMenuV3DraftItemsQuery {
|
|
@@ -5837,6 +5869,23 @@ export interface DeleteMenuV3DraftModifierRequest
|
|
|
5837
5869
|
RequestQuery<DeleteMenuV3DraftModifierQuery>,
|
|
5838
5870
|
DeleteMenuV3DraftModifierPath {}
|
|
5839
5871
|
|
|
5872
|
+
// DELETE /menu/v3/draft/modifiers
|
|
5873
|
+
|
|
5874
|
+
export interface DeleteMenuV3DraftModifiersBody {
|
|
5875
|
+
id_list: string[];
|
|
5876
|
+
[index: string]: any;
|
|
5877
|
+
}
|
|
5878
|
+
|
|
5879
|
+
export interface DeleteMenuV3DraftModifiersResponse {
|
|
5880
|
+
results: DraftModifierDTO[];
|
|
5881
|
+
meta?: ListResponseMetadataDTO;
|
|
5882
|
+
[index: string]: any;
|
|
5883
|
+
}
|
|
5884
|
+
|
|
5885
|
+
export interface DeleteMenuV3DraftModifiersRequest extends BaseRequest {
|
|
5886
|
+
body: DeleteMenuV3DraftModifiersBody;
|
|
5887
|
+
}
|
|
5888
|
+
|
|
5840
5889
|
// GET /menu/v3/draft/modifiers
|
|
5841
5890
|
|
|
5842
5891
|
export interface GetMenuV3DraftModifiersQuery {
|