@compassdigital/sdk.typescript 4.96.0 → 4.98.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 +140 -17
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +158 -22
- package/lib/index.js.map +1 -1
- package/lib/interface/announcement.d.ts +2 -2
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +1 -1
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +399 -59
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +554 -67
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/review.d.ts +74 -0
- package/lib/interface/review.d.ts.map +1 -0
- package/lib/interface/review.js +5 -0
- package/lib/interface/review.js.map +1 -0
- package/manifest.json +4 -0
- package/package.json +1 -1
- package/src/index.ts +368 -46
- package/src/interface/announcement.ts +2 -2
- package/src/interface/centricos.ts +1 -1
- package/src/interface/consumer.ts +531 -66
- package/src/interface/mealplan.ts +0 -3
- package/src/interface/menu.ts +644 -80
- package/src/interface/order.ts +0 -24
- package/src/interface/review.ts +103 -0
package/src/interface/order.ts
CHANGED
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
import { RequestQuery, BaseRequest } from './util';
|
|
5
5
|
|
|
6
6
|
export interface CreateOrder {
|
|
7
|
-
// brand
|
|
8
7
|
location_brand?: string;
|
|
9
|
-
// location
|
|
10
8
|
location?: string;
|
|
11
|
-
// shoppingcart
|
|
12
9
|
shoppingcart?: string;
|
|
13
10
|
payment?: {
|
|
14
11
|
token?: string;
|
|
@@ -19,7 +16,6 @@ export interface CreateOrder {
|
|
|
19
16
|
coupon_voucher?: CashlessPayment;
|
|
20
17
|
};
|
|
21
18
|
mealplan?: MealPlan;
|
|
22
|
-
// user
|
|
23
19
|
customer?: string;
|
|
24
20
|
is?: {
|
|
25
21
|
in_progress?: boolean;
|
|
@@ -56,7 +52,6 @@ export interface Error {
|
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
export interface Issue {
|
|
59
|
-
// issue
|
|
60
55
|
id?: string;
|
|
61
56
|
type?: string;
|
|
62
57
|
//@deprecated
|
|
@@ -72,16 +67,11 @@ export interface Issue {
|
|
|
72
67
|
}
|
|
73
68
|
|
|
74
69
|
export interface Order {
|
|
75
|
-
// order
|
|
76
70
|
id?: string;
|
|
77
|
-
// brand
|
|
78
71
|
location_brand?: string;
|
|
79
|
-
// location
|
|
80
72
|
location?: string;
|
|
81
|
-
// shoppingcart
|
|
82
73
|
shoppingcart?: string;
|
|
83
74
|
payment?: {
|
|
84
|
-
// payment
|
|
85
75
|
token?: string;
|
|
86
76
|
credit_card?: CreditCard;
|
|
87
77
|
digital_wallet_pay?: string;
|
|
@@ -91,23 +81,18 @@ export interface Order {
|
|
|
91
81
|
coupon_voucher?: CashlessPayment;
|
|
92
82
|
};
|
|
93
83
|
mealplan?: {
|
|
94
|
-
// mealplan
|
|
95
84
|
id?: string;
|
|
96
|
-
// tender
|
|
97
85
|
tender?: string;
|
|
98
86
|
name?: string;
|
|
99
87
|
};
|
|
100
88
|
meal_swipes?: {
|
|
101
|
-
// mealplan
|
|
102
89
|
id?: string;
|
|
103
|
-
// tender
|
|
104
90
|
tender?: string;
|
|
105
91
|
tender_name?: string;
|
|
106
92
|
swipes?: number;
|
|
107
93
|
total?: number;
|
|
108
94
|
};
|
|
109
95
|
meal_exchange?: MealPlan;
|
|
110
|
-
// user
|
|
111
96
|
customer?: string;
|
|
112
97
|
is?: {
|
|
113
98
|
accepted?: boolean;
|
|
@@ -203,7 +188,6 @@ export interface Order {
|
|
|
203
188
|
active_override?: boolean;
|
|
204
189
|
// Delivery details
|
|
205
190
|
delivery?: {
|
|
206
|
-
// provider
|
|
207
191
|
provider?: string;
|
|
208
192
|
tracker_url?: string;
|
|
209
193
|
loading_code?: string;
|
|
@@ -255,10 +239,8 @@ export interface Cancel {
|
|
|
255
239
|
}
|
|
256
240
|
|
|
257
241
|
export interface RefundTransaction {
|
|
258
|
-
// shoppingcart
|
|
259
242
|
original_shoppingcart?: string;
|
|
260
243
|
refund_date?: string;
|
|
261
|
-
// user
|
|
262
244
|
issued_by?: string;
|
|
263
245
|
amount?: number;
|
|
264
246
|
refund_amount?: number;
|
|
@@ -302,9 +284,7 @@ export interface CashlessPayment {
|
|
|
302
284
|
}
|
|
303
285
|
|
|
304
286
|
export interface MealPlan {
|
|
305
|
-
// mealplan
|
|
306
287
|
id?: string;
|
|
307
|
-
// tender
|
|
308
288
|
tender?: string;
|
|
309
289
|
name?: string;
|
|
310
290
|
}
|
|
@@ -323,9 +303,7 @@ export interface OrderIssue {
|
|
|
323
303
|
}
|
|
324
304
|
|
|
325
305
|
export interface OrderedItem {
|
|
326
|
-
// item
|
|
327
306
|
id: string;
|
|
328
|
-
// index
|
|
329
307
|
_index: string;
|
|
330
308
|
quantity?: number;
|
|
331
309
|
unit?: number;
|
|
@@ -346,9 +324,7 @@ export interface OrderedItem {
|
|
|
346
324
|
en?: string;
|
|
347
325
|
};
|
|
348
326
|
items?: {
|
|
349
|
-
// option
|
|
350
327
|
id?: string;
|
|
351
|
-
// index
|
|
352
328
|
_index?: string;
|
|
353
329
|
meta?: Record<string, any>;
|
|
354
330
|
}[];
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
3
|
+
|
|
4
|
+
import { RequestQuery, BaseRequest } from './util';
|
|
5
|
+
|
|
6
|
+
export interface ReviewDTO {
|
|
7
|
+
taxonomy?: Record<string, string>;
|
|
8
|
+
id: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
score?: number;
|
|
12
|
+
comment?: string;
|
|
13
|
+
reason?: string[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface GetReviewsResponseDTO {
|
|
17
|
+
reviews: ReviewDTO[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface BadRequestErrorDTO {
|
|
21
|
+
message: string;
|
|
22
|
+
code: number;
|
|
23
|
+
data: Record<string, any>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface UnauthorizedErrorDTO {
|
|
27
|
+
message: string;
|
|
28
|
+
code: number;
|
|
29
|
+
data: Record<string, any>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface GetReviewResponseDTO {
|
|
33
|
+
taxonomy?: Record<string, string>;
|
|
34
|
+
id: string;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
score?: number;
|
|
38
|
+
comment?: string;
|
|
39
|
+
reason?: string[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface NotFoundErrorDTO {
|
|
43
|
+
message: string;
|
|
44
|
+
code: number;
|
|
45
|
+
data: Record<string, any>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface PostReviewRequestDTO {
|
|
49
|
+
taxonomy?: Record<string, string>;
|
|
50
|
+
score?: number;
|
|
51
|
+
comment?: string;
|
|
52
|
+
reason?: string[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface PostReviewResponseDTO {
|
|
56
|
+
taxonomy?: Record<string, string>;
|
|
57
|
+
id: string;
|
|
58
|
+
createdAt: string;
|
|
59
|
+
updatedAt: string;
|
|
60
|
+
score?: number;
|
|
61
|
+
comment?: string;
|
|
62
|
+
reason?: string[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// GET /review - Get reviews by taxonomy
|
|
66
|
+
|
|
67
|
+
export interface GetReviewsQuery {
|
|
68
|
+
taxonomyFilter: string;
|
|
69
|
+
// Graphql query string
|
|
70
|
+
_query?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type GetReviewsResponse = GetReviewsResponseDTO;
|
|
74
|
+
|
|
75
|
+
export interface GetReviewsRequest extends BaseRequest, RequestQuery<GetReviewsQuery> {}
|
|
76
|
+
|
|
77
|
+
// POST /review - Post a review
|
|
78
|
+
|
|
79
|
+
export type PostReviewBody = PostReviewRequestDTO;
|
|
80
|
+
|
|
81
|
+
export type PostReviewResponse = PostReviewResponseDTO;
|
|
82
|
+
|
|
83
|
+
export interface PostReviewRequest extends BaseRequest {
|
|
84
|
+
body: PostReviewBody;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// GET /review/{id} - Get a review
|
|
88
|
+
|
|
89
|
+
export interface GetReviewPath {
|
|
90
|
+
id: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface GetReviewQuery {
|
|
94
|
+
// Graphql query string
|
|
95
|
+
_query?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type GetReviewResponse = GetReviewResponseDTO;
|
|
99
|
+
|
|
100
|
+
export interface GetReviewRequest
|
|
101
|
+
extends BaseRequest,
|
|
102
|
+
RequestQuery<GetReviewQuery>,
|
|
103
|
+
GetReviewPath {}
|