@compassdigital/sdk.typescript 3.44.0 → 3.44.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/README.md +1 -2
- package/lib/index.d.ts +75 -29
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +80 -26
- package/lib/index.js.map +1 -1
- package/lib/interface/location.d.ts +2 -0
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +101 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/order.d.ts +3 -0
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +0 -19
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +0 -12
- package/lib/interface/payment.d.ts.map +1 -1
- package/package.json +3 -3
- package/pipeline.yml +0 -2
- package/src/index.ts +185 -70
- package/src/interface/location.ts +4 -0
- package/src/interface/menu.ts +170 -0
- package/src/interface/order.ts +4 -0
- package/src/interface/partner.ts +0 -36
- package/src/interface/payment.ts +0 -23
- package/quicktest.json +0 -8
package/src/interface/menu.ts
CHANGED
|
@@ -12,6 +12,16 @@ export interface ModifierGroupsListResponse {
|
|
|
12
12
|
results?: ModifierGroup[];
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export interface ItemsListResponse {
|
|
16
|
+
meta?: Meta;
|
|
17
|
+
results?: LocalItem[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ModifierGroupToModifierRelationshipListResponse {
|
|
21
|
+
meta?: Meta;
|
|
22
|
+
results?: ModifierGroupToModifierRelationship[];
|
|
23
|
+
}
|
|
24
|
+
|
|
15
25
|
export interface Meta {
|
|
16
26
|
limit?: number;
|
|
17
27
|
page?: number;
|
|
@@ -54,6 +64,37 @@ export interface ModifierGroup {
|
|
|
54
64
|
[index: string]: any;
|
|
55
65
|
}
|
|
56
66
|
|
|
67
|
+
export interface LocalItem {
|
|
68
|
+
id?: string;
|
|
69
|
+
name?: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
label?: string;
|
|
72
|
+
price?: number;
|
|
73
|
+
calories?: number;
|
|
74
|
+
posid?: string;
|
|
75
|
+
barcode?: string;
|
|
76
|
+
tax_tags?: string[];
|
|
77
|
+
is_active?: boolean;
|
|
78
|
+
is_in_stock?: boolean;
|
|
79
|
+
created_at?: string;
|
|
80
|
+
updated_at?: string;
|
|
81
|
+
deleted_at?: string;
|
|
82
|
+
[index: string]: any;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface ModifierGroupToModifierRelationship {
|
|
86
|
+
id?: string;
|
|
87
|
+
modifier?: Modifier;
|
|
88
|
+
modifier_id?: string;
|
|
89
|
+
modifier_group?: ModifierGroup;
|
|
90
|
+
modifier_group_id?: string;
|
|
91
|
+
sequence?: number;
|
|
92
|
+
created_at?: string;
|
|
93
|
+
updated_at?: string;
|
|
94
|
+
deleted_at?: string;
|
|
95
|
+
[index: string]: any;
|
|
96
|
+
}
|
|
97
|
+
|
|
57
98
|
export interface Menu {
|
|
58
99
|
// menu
|
|
59
100
|
id?: string;
|
|
@@ -491,6 +532,135 @@ export interface GetMenuV2ModifierGroupCountRequest
|
|
|
491
532
|
extends BaseRequest,
|
|
492
533
|
RequestQuery<GetMenuV2ModifierGroupCountQuery> {}
|
|
493
534
|
|
|
535
|
+
// GET /menu/v2/modifier-group/relationships/modifiers
|
|
536
|
+
|
|
537
|
+
export interface GetMenuV2ModifierGroupRelationshipsModifiersQuery {
|
|
538
|
+
// Graphql query string
|
|
539
|
+
_query?: string;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export type GetMenuV2ModifierGroupRelationshipsModifiersResponse =
|
|
543
|
+
ModifierGroupToModifierRelationshipListResponse;
|
|
544
|
+
|
|
545
|
+
export interface GetMenuV2ModifierGroupRelationshipsModifiersRequest
|
|
546
|
+
extends BaseRequest,
|
|
547
|
+
RequestQuery<GetMenuV2ModifierGroupRelationshipsModifiersQuery> {}
|
|
548
|
+
|
|
549
|
+
// POST /menu/v2/modifier-group/relationships/modifier
|
|
550
|
+
|
|
551
|
+
export type PostMenuV2ModifierGroupRelationshipsModifierBody = ModifierGroupToModifierRelationship;
|
|
552
|
+
|
|
553
|
+
export type PostMenuV2ModifierGroupRelationshipsModifierResponse =
|
|
554
|
+
ModifierGroupToModifierRelationship;
|
|
555
|
+
|
|
556
|
+
export interface PostMenuV2ModifierGroupRelationshipsModifierRequest extends BaseRequest {
|
|
557
|
+
body: PostMenuV2ModifierGroupRelationshipsModifierBody;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
// GET /menu/v2/modifier-group/relationships/modifier/{id}
|
|
561
|
+
|
|
562
|
+
export interface GetMenuV2ModifierGroupRelationshipsModifierPath {
|
|
563
|
+
id: string;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export interface GetMenuV2ModifierGroupRelationshipsModifierQuery {
|
|
567
|
+
// Graphql query string
|
|
568
|
+
_query?: string;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
export type GetMenuV2ModifierGroupRelationshipsModifierResponse =
|
|
572
|
+
ModifierGroupToModifierRelationship;
|
|
573
|
+
|
|
574
|
+
export interface GetMenuV2ModifierGroupRelationshipsModifierRequest
|
|
575
|
+
extends BaseRequest,
|
|
576
|
+
RequestQuery<GetMenuV2ModifierGroupRelationshipsModifierQuery>,
|
|
577
|
+
GetMenuV2ModifierGroupRelationshipsModifierPath {}
|
|
578
|
+
|
|
579
|
+
// PATCH /menu/v2/modifier-group/relationships/modifier/{id}
|
|
580
|
+
|
|
581
|
+
export interface PatchMenuV2ModifierGroupRelationshipsModifierPath {
|
|
582
|
+
id: string;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export type PatchMenuV2ModifierGroupRelationshipsModifierBody = ModifierGroupToModifierRelationship;
|
|
586
|
+
|
|
587
|
+
export type PatchMenuV2ModifierGroupRelationshipsModifierResponse =
|
|
588
|
+
ModifierGroupToModifierRelationship;
|
|
589
|
+
|
|
590
|
+
export interface PatchMenuV2ModifierGroupRelationshipsModifierRequest
|
|
591
|
+
extends BaseRequest,
|
|
592
|
+
PatchMenuV2ModifierGroupRelationshipsModifierPath {
|
|
593
|
+
body: PatchMenuV2ModifierGroupRelationshipsModifierBody;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
// GET /menu/v2/items
|
|
597
|
+
|
|
598
|
+
export interface GetMenuV2ItemsQuery {
|
|
599
|
+
// Graphql query string
|
|
600
|
+
_query?: string;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export type GetMenuV2ItemsResponse = ItemsListResponse;
|
|
604
|
+
|
|
605
|
+
export interface GetMenuV2ItemsRequest extends BaseRequest, RequestQuery<GetMenuV2ItemsQuery> {}
|
|
606
|
+
|
|
607
|
+
// GET /menu/v2/item/{id}
|
|
608
|
+
|
|
609
|
+
export interface GetMenuV2ItemPath {
|
|
610
|
+
id: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export interface GetMenuV2ItemQuery {
|
|
614
|
+
// Graphql query string
|
|
615
|
+
_query?: string;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export type GetMenuV2ItemResponse = LocalItem;
|
|
619
|
+
|
|
620
|
+
export interface GetMenuV2ItemRequest
|
|
621
|
+
extends BaseRequest,
|
|
622
|
+
RequestQuery<GetMenuV2ItemQuery>,
|
|
623
|
+
GetMenuV2ItemPath {}
|
|
624
|
+
|
|
625
|
+
// PATCH /menu/v2/item/{id}
|
|
626
|
+
|
|
627
|
+
export interface PatchMenuV2ItemPath {
|
|
628
|
+
id: string;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
export type PatchMenuV2ItemBody = LocalItem;
|
|
632
|
+
|
|
633
|
+
export type PatchMenuV2ItemResponse = LocalItem;
|
|
634
|
+
|
|
635
|
+
export interface PatchMenuV2ItemRequest extends BaseRequest, PatchMenuV2ItemPath {
|
|
636
|
+
body: PatchMenuV2ItemBody;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
// POST /menu/v2/item
|
|
640
|
+
|
|
641
|
+
export type PostMenuV2ItemBody = LocalItem;
|
|
642
|
+
|
|
643
|
+
export type PostMenuV2ItemResponse = LocalItem;
|
|
644
|
+
|
|
645
|
+
export interface PostMenuV2ItemRequest extends BaseRequest {
|
|
646
|
+
body: PostMenuV2ItemBody;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// GET /menu/v2/items/count
|
|
650
|
+
|
|
651
|
+
export interface GetMenuV2ItemsCountQuery {
|
|
652
|
+
// Graphql query string
|
|
653
|
+
_query?: string;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
export interface GetMenuV2ItemsCountResponse {
|
|
657
|
+
count?: number;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export interface GetMenuV2ItemsCountRequest
|
|
661
|
+
extends BaseRequest,
|
|
662
|
+
RequestQuery<GetMenuV2ItemsCountQuery> {}
|
|
663
|
+
|
|
494
664
|
// GET /menu/client/{client_id} - Get menu client
|
|
495
665
|
|
|
496
666
|
export interface GetMenuClientPath {
|
package/src/interface/order.ts
CHANGED
|
@@ -153,6 +153,10 @@ export interface Order {
|
|
|
153
153
|
total?: {
|
|
154
154
|
amount?: number;
|
|
155
155
|
};
|
|
156
|
+
// Total of first cart on order. Carts can change after refunds, so this is original value
|
|
157
|
+
original_total?: {
|
|
158
|
+
amount?: number;
|
|
159
|
+
};
|
|
156
160
|
[index: string]: any;
|
|
157
161
|
};
|
|
158
162
|
[index: string]: any;
|
package/src/interface/partner.ts
CHANGED
|
@@ -828,42 +828,6 @@ export interface PostPartnerStandardcognitionMenuRequest extends BaseRequest {
|
|
|
828
828
|
body: PostPartnerStandardcognitionMenuBody;
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
-
// GET /partner/coolr/locations - Gets the locations where Coolr is available
|
|
832
|
-
|
|
833
|
-
export interface GetPartnerCoolrLocationsQuery {
|
|
834
|
-
// Graphql query string
|
|
835
|
-
_query?: string;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
export interface GetPartnerCoolrLocationsResponse {
|
|
839
|
-
locations?: CoolrLocations[];
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
export interface GetPartnerCoolrLocationsRequest
|
|
843
|
-
extends BaseRequest,
|
|
844
|
-
RequestQuery<GetPartnerCoolrLocationsQuery> {}
|
|
845
|
-
|
|
846
|
-
// GET /partner/coolr/{id}/images - Gets the latest images for Coolr Location AssetID
|
|
847
|
-
|
|
848
|
-
export interface GetPartnerCoolrImagesPath {
|
|
849
|
-
// location
|
|
850
|
-
id: string;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
export interface GetPartnerCoolrImagesQuery {
|
|
854
|
-
// Graphql query string
|
|
855
|
-
_query?: string;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
export interface GetPartnerCoolrImagesResponse {
|
|
859
|
-
images?: CoolrImages;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
export interface GetPartnerCoolrImagesRequest
|
|
863
|
-
extends BaseRequest,
|
|
864
|
-
RequestQuery<GetPartnerCoolrImagesQuery>,
|
|
865
|
-
GetPartnerCoolrImagesPath {}
|
|
866
|
-
|
|
867
831
|
// GET /partner/swagger.json
|
|
868
832
|
|
|
869
833
|
export interface GetPartnerSwaggerQuery {
|
package/src/interface/payment.ts
CHANGED
|
@@ -263,29 +263,6 @@ export interface PostPaymentMethodRequest extends BaseRequest {
|
|
|
263
263
|
body: PostPaymentMethodBody;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
// GET /payment/{id}/method - Get a users available payment methods
|
|
267
|
-
|
|
268
|
-
export interface GetPaymentMethodPath {
|
|
269
|
-
// TODO: add parameter to swagger.json
|
|
270
|
-
id: string;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export interface GetPaymentMethodQuery {
|
|
274
|
-
// The user id
|
|
275
|
-
user_id: string;
|
|
276
|
-
// Graphql query string
|
|
277
|
-
_query?: string;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export interface GetPaymentMethodResponse {
|
|
281
|
-
payment_methods?: PaymentMethod[];
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export interface GetPaymentMethodRequest
|
|
285
|
-
extends BaseRequest,
|
|
286
|
-
RequestQuery<GetPaymentMethodQuery>,
|
|
287
|
-
GetPaymentMethodPath {}
|
|
288
|
-
|
|
289
266
|
// DELETE /payment/{id}/method/{method_id}
|
|
290
267
|
|
|
291
268
|
export interface DeletePaymentMethodPath {
|