@compassdigital/sdk.typescript 4.51.0 → 4.53.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 +44 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +45 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/auth.d.ts +21 -0
- package/lib/interface/auth.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +80 -9
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +29 -0
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/user.d.ts +4 -4
- package/lib/interface/user.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/base.ts +3 -3
- package/src/index.ts +115 -0
- package/src/interface/auth.ts +36 -0
- package/src/interface/menu.ts +103 -9
- package/src/interface/promo.ts +31 -0
- package/src/interface/user.ts +4 -4
package/src/interface/menu.ts
CHANGED
|
@@ -137,6 +137,7 @@ export interface Item {
|
|
|
137
137
|
barcodes?: string[];
|
|
138
138
|
tax?: {
|
|
139
139
|
tax_tag_code?: string;
|
|
140
|
+
tax_jwo_code?: string;
|
|
140
141
|
};
|
|
141
142
|
[index: string]: any;
|
|
142
143
|
};
|
|
@@ -257,7 +258,6 @@ export interface Option {
|
|
|
257
258
|
sort_number?: number;
|
|
258
259
|
// menu sort order
|
|
259
260
|
menu_sort_number?: number;
|
|
260
|
-
plu?: string;
|
|
261
261
|
sizing?: {
|
|
262
262
|
name?: string;
|
|
263
263
|
posid?: string;
|
|
@@ -384,7 +384,7 @@ export interface DraftBrandDTO {
|
|
|
384
384
|
global_menu_group_id?: string;
|
|
385
385
|
posid_segment?: string;
|
|
386
386
|
is_simplified_view?: boolean;
|
|
387
|
-
frictionless_partner?:
|
|
387
|
+
frictionless_partner?: string;
|
|
388
388
|
applied_diff_snapshot?: Record<string, any>;
|
|
389
389
|
permissions?: Record<string, any>;
|
|
390
390
|
[index: string]: any;
|
|
@@ -401,7 +401,7 @@ export interface PublishedBrandDTO {
|
|
|
401
401
|
global_menu_group_id?: string;
|
|
402
402
|
posid_segment?: string;
|
|
403
403
|
is_simplified_view?: boolean;
|
|
404
|
-
frictionless_partner?:
|
|
404
|
+
frictionless_partner?: string;
|
|
405
405
|
permissions?: Record<string, any>;
|
|
406
406
|
[index: string]: any;
|
|
407
407
|
}
|
|
@@ -619,6 +619,7 @@ export interface DraftItemDTO {
|
|
|
619
619
|
tax_tag_code?: string;
|
|
620
620
|
tags?: string[];
|
|
621
621
|
is_featured?: boolean;
|
|
622
|
+
tax_jwo_code?: string;
|
|
622
623
|
applied_diff_snapshot?: Record<string, any>;
|
|
623
624
|
brand?: DraftBrandDTO;
|
|
624
625
|
categories?: Record<string, any>[];
|
|
@@ -855,6 +856,19 @@ export interface BrandStatusDTO {
|
|
|
855
856
|
[index: string]: any;
|
|
856
857
|
}
|
|
857
858
|
|
|
859
|
+
export interface AuditDTO {
|
|
860
|
+
process_id?: string;
|
|
861
|
+
brand_id?: string;
|
|
862
|
+
status_type?: string;
|
|
863
|
+
status?: string;
|
|
864
|
+
message?: string;
|
|
865
|
+
id?: string;
|
|
866
|
+
data?: Record<string, any>;
|
|
867
|
+
brand?: DraftBrandDTO;
|
|
868
|
+
permissions?: Record<string, any>;
|
|
869
|
+
[index: string]: any;
|
|
870
|
+
}
|
|
871
|
+
|
|
858
872
|
export interface SiteGroupWithMenuGroupNameResponseDTO {
|
|
859
873
|
site_id: string;
|
|
860
874
|
local_menu_group_id: string;
|
|
@@ -872,6 +886,23 @@ export interface SiteGroupDTO {
|
|
|
872
886
|
[index: string]: any;
|
|
873
887
|
}
|
|
874
888
|
|
|
889
|
+
export interface AuditListDraftItemDTO {
|
|
890
|
+
process_id: string;
|
|
891
|
+
brand_id: string;
|
|
892
|
+
status_type: string;
|
|
893
|
+
status: string;
|
|
894
|
+
message: string;
|
|
895
|
+
id: string;
|
|
896
|
+
created_at?: string;
|
|
897
|
+
updated_at?: string;
|
|
898
|
+
deleted_at?: string;
|
|
899
|
+
data?: Record<string, any>;
|
|
900
|
+
version?: number;
|
|
901
|
+
brand?: DraftBrandDTO;
|
|
902
|
+
permissions?: Record<string, any>;
|
|
903
|
+
[index: string]: any;
|
|
904
|
+
}
|
|
905
|
+
|
|
875
906
|
export interface ReportingCategorySuggestion {
|
|
876
907
|
category?: string;
|
|
877
908
|
occurrences?: number;
|
|
@@ -990,6 +1021,7 @@ export interface PublishedItemDTO {
|
|
|
990
1021
|
tax_tag_code?: string;
|
|
991
1022
|
tags?: string[];
|
|
992
1023
|
is_featured?: boolean;
|
|
1024
|
+
tax_jwo_code?: string;
|
|
993
1025
|
permissions?: Record<string, any>;
|
|
994
1026
|
[index: string]: any;
|
|
995
1027
|
}
|
|
@@ -1338,6 +1370,7 @@ export interface DraftItemEntityDTO {
|
|
|
1338
1370
|
tax_tag_code?: string;
|
|
1339
1371
|
tags?: string[];
|
|
1340
1372
|
is_featured?: boolean;
|
|
1373
|
+
tax_jwo_code?: string;
|
|
1341
1374
|
applied_diff_snapshot?: Record<string, any>;
|
|
1342
1375
|
version?: number;
|
|
1343
1376
|
brand?: DraftBrandDTO;
|
|
@@ -1613,6 +1646,25 @@ export interface GetMenuItemsRequest
|
|
|
1613
1646
|
RequestQuery<GetMenuItemsQuery>,
|
|
1614
1647
|
GetMenuItemsPath {}
|
|
1615
1648
|
|
|
1649
|
+
// POST /menu/{id}/recommended - get recommended items
|
|
1650
|
+
|
|
1651
|
+
export interface PostMenuRecommendedPath {
|
|
1652
|
+
// menu
|
|
1653
|
+
id: string;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
export interface PostMenuRecommendedBody {
|
|
1657
|
+
excluded_items?: string[];
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
export interface PostMenuRecommendedResponse {
|
|
1661
|
+
items?: Item[];
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
export interface PostMenuRecommendedRequest extends BaseRequest, PostMenuRecommendedPath {
|
|
1665
|
+
body: PostMenuRecommendedBody;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1616
1668
|
// POST /menu/items/import/{location} - trigger import items
|
|
1617
1669
|
|
|
1618
1670
|
export interface ImportItemsCanteenPath {
|
|
@@ -2609,6 +2661,7 @@ export interface PostMenuV3DraftBrandBody {
|
|
|
2609
2661
|
modifier_group_to_modifier_relationships?: DraftModifierGroupToModifierRelationshipDTO[];
|
|
2610
2662
|
modifiers?: DraftModifierDTO[];
|
|
2611
2663
|
statuses?: BrandStatusDTO[];
|
|
2664
|
+
audit_logs?: AuditDTO[];
|
|
2612
2665
|
name: string;
|
|
2613
2666
|
description?: string;
|
|
2614
2667
|
is_active?: boolean;
|
|
@@ -2618,7 +2671,7 @@ export interface PostMenuV3DraftBrandBody {
|
|
|
2618
2671
|
global_menu_group_id?: string;
|
|
2619
2672
|
posid_segment?: string;
|
|
2620
2673
|
is_simplified_view?: boolean;
|
|
2621
|
-
frictionless_partner?:
|
|
2674
|
+
frictionless_partner?: string;
|
|
2622
2675
|
applied_diff_snapshot?: Record<string, any>;
|
|
2623
2676
|
changes?: BrandChangeDTO[];
|
|
2624
2677
|
local_menu_group?: LocalMenuGroupDTO;
|
|
@@ -2675,6 +2728,7 @@ export interface PatchMenuV3DraftBrandBody {
|
|
|
2675
2728
|
modifier_group_to_modifier_relationships?: DraftModifierGroupToModifierRelationshipDTO[];
|
|
2676
2729
|
modifiers?: DraftModifierDTO[];
|
|
2677
2730
|
statuses?: BrandStatusDTO[];
|
|
2731
|
+
audit_logs?: AuditDTO[];
|
|
2678
2732
|
id?: string;
|
|
2679
2733
|
name?: string;
|
|
2680
2734
|
description?: string;
|
|
@@ -2685,7 +2739,7 @@ export interface PatchMenuV3DraftBrandBody {
|
|
|
2685
2739
|
global_menu_group_id?: string;
|
|
2686
2740
|
posid_segment?: string;
|
|
2687
2741
|
is_simplified_view?: boolean;
|
|
2688
|
-
frictionless_partner?:
|
|
2742
|
+
frictionless_partner?: string;
|
|
2689
2743
|
applied_diff_snapshot?: Record<string, any>;
|
|
2690
2744
|
version?: number;
|
|
2691
2745
|
changes?: BrandChangeDTO[];
|
|
@@ -2765,6 +2819,7 @@ export type PostMenuV3DraftBrandsBody = {
|
|
|
2765
2819
|
modifier_group_to_modifier_relationships?: DraftModifierGroupToModifierRelationshipDTO[];
|
|
2766
2820
|
modifiers?: DraftModifierDTO[];
|
|
2767
2821
|
statuses?: BrandStatusDTO[];
|
|
2822
|
+
audit_logs?: AuditDTO[];
|
|
2768
2823
|
name: string;
|
|
2769
2824
|
description?: string;
|
|
2770
2825
|
is_active?: boolean;
|
|
@@ -2774,7 +2829,7 @@ export type PostMenuV3DraftBrandsBody = {
|
|
|
2774
2829
|
global_menu_group_id?: string;
|
|
2775
2830
|
posid_segment?: string;
|
|
2776
2831
|
is_simplified_view?: boolean;
|
|
2777
|
-
frictionless_partner?:
|
|
2832
|
+
frictionless_partner?: string;
|
|
2778
2833
|
applied_diff_snapshot?: Record<string, any>;
|
|
2779
2834
|
changes?: BrandChangeDTO[];
|
|
2780
2835
|
local_menu_group?: LocalMenuGroupDTO;
|
|
@@ -2813,6 +2868,41 @@ export interface GetMenuV3DraftBrandsCountRequest
|
|
|
2813
2868
|
extends BaseRequest,
|
|
2814
2869
|
RequestQuery<GetMenuV3DraftBrandsCountQuery> {}
|
|
2815
2870
|
|
|
2871
|
+
// GET /menu/v3/draft/brand/{id}/audits
|
|
2872
|
+
|
|
2873
|
+
export interface GetMenuV3DraftBrandAuditsPath {
|
|
2874
|
+
id: string;
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
export interface GetMenuV3DraftBrandAuditsQuery {
|
|
2878
|
+
// If specified, only the selected fields will be returned
|
|
2879
|
+
select?: string[];
|
|
2880
|
+
// List of relationships to load alongside this entity. Can load nested relationships using the pattern 'children.grand_children.foo'
|
|
2881
|
+
relationships?: string[];
|
|
2882
|
+
filter?: string;
|
|
2883
|
+
// Number of records to load per page
|
|
2884
|
+
limit?: number;
|
|
2885
|
+
page?: number;
|
|
2886
|
+
// A field to sort the results based on
|
|
2887
|
+
sort_by?: string;
|
|
2888
|
+
sort_order?: "DESC" | "ASC";
|
|
2889
|
+
// How soft deleted records should be shown in the list
|
|
2890
|
+
soft_deleted?: "include" | "exclude" | "only";
|
|
2891
|
+
// Graphql query string
|
|
2892
|
+
_query?: string;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
export interface GetMenuV3DraftBrandAuditsResponse {
|
|
2896
|
+
results: AuditListDraftItemDTO[];
|
|
2897
|
+
meta?: ListResponseMetadataDTO;
|
|
2898
|
+
[index: string]: any;
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
export interface GetMenuV3DraftBrandAuditsRequest
|
|
2902
|
+
extends BaseRequest,
|
|
2903
|
+
RequestQuery<GetMenuV3DraftBrandAuditsQuery>,
|
|
2904
|
+
GetMenuV3DraftBrandAuditsPath {}
|
|
2905
|
+
|
|
2816
2906
|
// GET /menu/v3/draft/brand/{id}/menus
|
|
2817
2907
|
|
|
2818
2908
|
export interface GetMenuV3DraftBrandMenusPath {
|
|
@@ -3167,7 +3257,7 @@ export interface PostMenuV3BrandBody {
|
|
|
3167
3257
|
global_menu_group_id?: string;
|
|
3168
3258
|
posid_segment?: string;
|
|
3169
3259
|
is_simplified_view?: boolean;
|
|
3170
|
-
frictionless_partner?:
|
|
3260
|
+
frictionless_partner?: string;
|
|
3171
3261
|
local_menu_group?: LocalMenuGroupDTO;
|
|
3172
3262
|
global_menu_group?: GlobalMenuGroupDTO;
|
|
3173
3263
|
attachments?: FileAttachmentsDTO;
|
|
@@ -3235,7 +3325,7 @@ export interface PatchMenuV3BrandBody {
|
|
|
3235
3325
|
global_menu_group_id?: string;
|
|
3236
3326
|
posid_segment?: string;
|
|
3237
3327
|
is_simplified_view?: boolean;
|
|
3238
|
-
frictionless_partner?:
|
|
3328
|
+
frictionless_partner?: string;
|
|
3239
3329
|
version?: number;
|
|
3240
3330
|
local_menu_group?: LocalMenuGroupDTO;
|
|
3241
3331
|
global_menu_group?: GlobalMenuGroupDTO;
|
|
@@ -3327,7 +3417,7 @@ export type PostMenuV3BrandsBody = {
|
|
|
3327
3417
|
global_menu_group_id?: string;
|
|
3328
3418
|
posid_segment?: string;
|
|
3329
3419
|
is_simplified_view?: boolean;
|
|
3330
|
-
frictionless_partner?:
|
|
3420
|
+
frictionless_partner?: string;
|
|
3331
3421
|
local_menu_group?: LocalMenuGroupDTO;
|
|
3332
3422
|
global_menu_group?: GlobalMenuGroupDTO;
|
|
3333
3423
|
attachments?: FileAttachmentsDTO;
|
|
@@ -4363,6 +4453,7 @@ export interface PostMenuV3DraftItemBody {
|
|
|
4363
4453
|
tax_tag_code?: string;
|
|
4364
4454
|
tags?: string[];
|
|
4365
4455
|
is_featured?: boolean;
|
|
4456
|
+
tax_jwo_code?: string;
|
|
4366
4457
|
applied_diff_snapshot?: Record<string, any>;
|
|
4367
4458
|
brand?: DraftBrandDTO;
|
|
4368
4459
|
categories?: DraftCategoryToItemRelationshipDTO[];
|
|
@@ -4435,6 +4526,7 @@ export interface PatchMenuV3DraftItemBody {
|
|
|
4435
4526
|
tax_tag_code?: string;
|
|
4436
4527
|
tags?: string[];
|
|
4437
4528
|
is_featured?: boolean;
|
|
4529
|
+
tax_jwo_code?: string;
|
|
4438
4530
|
applied_diff_snapshot?: Record<string, any>;
|
|
4439
4531
|
version?: number;
|
|
4440
4532
|
brand?: DraftBrandDTO;
|
|
@@ -4529,6 +4621,7 @@ export type PostMenuV3DraftItemsBody = {
|
|
|
4529
4621
|
tax_tag_code?: string;
|
|
4530
4622
|
tags?: string[];
|
|
4531
4623
|
is_featured?: boolean;
|
|
4624
|
+
tax_jwo_code?: string;
|
|
4532
4625
|
applied_diff_snapshot?: Record<string, any>;
|
|
4533
4626
|
brand?: DraftBrandDTO;
|
|
4534
4627
|
categories?: DraftCategoryToItemRelationshipDTO[];
|
|
@@ -4619,6 +4712,7 @@ export interface PatchMenuV3DraftItemsBulkUpdateBody {
|
|
|
4619
4712
|
tax_tag_code?: string;
|
|
4620
4713
|
tags?: string[];
|
|
4621
4714
|
is_featured?: boolean;
|
|
4715
|
+
tax_jwo_code?: string;
|
|
4622
4716
|
applied_diff_snapshot?: Record<string, any>;
|
|
4623
4717
|
brand?: DraftBrandDTO;
|
|
4624
4718
|
categories?: DraftCategoryToItemRelationshipDTO[];
|
package/src/interface/promo.ts
CHANGED
|
@@ -144,6 +144,7 @@ export interface PromoValidateRequest {
|
|
|
144
144
|
location_brand?: string;
|
|
145
145
|
shoppingcart?: {
|
|
146
146
|
id?: string;
|
|
147
|
+
items?: Record<string, any>[];
|
|
147
148
|
date_created?: string;
|
|
148
149
|
};
|
|
149
150
|
totals?: {
|
|
@@ -160,6 +161,7 @@ export interface PromoRedeemRequest {
|
|
|
160
161
|
location_brand?: string;
|
|
161
162
|
shoppingcart?: {
|
|
162
163
|
id?: string;
|
|
164
|
+
items?: CartItem[];
|
|
163
165
|
date_created?: string;
|
|
164
166
|
};
|
|
165
167
|
totals?: {
|
|
@@ -303,6 +305,35 @@ export interface AppliedDiscount {
|
|
|
303
305
|
|
|
304
306
|
export type VoucherCode = PromoValidateRequest;
|
|
305
307
|
|
|
308
|
+
export interface CartItem {
|
|
309
|
+
id?: string;
|
|
310
|
+
quantity?: number;
|
|
311
|
+
price?: {
|
|
312
|
+
amount?: number;
|
|
313
|
+
};
|
|
314
|
+
category?: {
|
|
315
|
+
en?: string;
|
|
316
|
+
};
|
|
317
|
+
label?: {
|
|
318
|
+
en?: string;
|
|
319
|
+
};
|
|
320
|
+
menu_label?: {
|
|
321
|
+
en?: string;
|
|
322
|
+
};
|
|
323
|
+
meta?: {
|
|
324
|
+
plu?: string;
|
|
325
|
+
barcodes?: string[];
|
|
326
|
+
[index: string]: any;
|
|
327
|
+
};
|
|
328
|
+
options?: CartModifier[];
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface CartModifier {
|
|
332
|
+
price?: {
|
|
333
|
+
amount?: number;
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
|
|
306
337
|
// POST /promo - Create a new promotion
|
|
307
338
|
|
|
308
339
|
export type PostPromoBody = PromotionBody;
|
package/src/interface/user.ts
CHANGED
|
@@ -348,13 +348,13 @@ export interface PostUserAuthRequest extends BaseRequest {
|
|
|
348
348
|
|
|
349
349
|
export interface PostUserOauthBody {
|
|
350
350
|
// OMS code from commpass sso
|
|
351
|
-
code
|
|
351
|
+
code: string;
|
|
352
352
|
// the oms url for compass
|
|
353
|
-
oms_url
|
|
353
|
+
oms_url: string;
|
|
354
354
|
// the return uri for compassconnect
|
|
355
|
-
callback_uri
|
|
355
|
+
callback_uri: string;
|
|
356
356
|
// the id of the application for compassconnect
|
|
357
|
-
client_id
|
|
357
|
+
client_id: string;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
export type PostUserOauthResponse = omsauth;
|