@compassdigital/sdk.typescript 3.18.0 → 3.20.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 +0 -300
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -334
- package/lib/index.js.map +1 -1
- package/lib/interface/announcement.d.ts +7 -1
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +9 -2
- package/lib/interface/calendar.d.ts.map +1 -1
- package/lib/interface/compassconnect.d.ts +2 -1
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/config.d.ts +12 -1
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/datalake.d.ts +5 -1
- package/lib/interface/datalake.d.ts.map +1 -1
- package/lib/interface/email.d.ts +2 -0
- package/lib/interface/email.d.ts.map +1 -1
- package/lib/interface/file.d.ts +3 -0
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/kds.d.ts +9 -2
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +57 -3
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +12 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +27 -1
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/notification.d.ts +9 -2
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +15 -1
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +16 -4
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +15 -1
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/permission.d.ts +10 -1
- package/lib/interface/permission.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +19 -2
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/report.d.ts +8 -1
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +15 -0
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/task.d.ts +12 -1
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +33 -3
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/util.d.ts +12 -0
- package/lib/interface/util.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +21 -3
- package/lib/interface/vendor.d.ts.map +1 -1
- package/manifest.json +4 -36
- package/package.json +8 -8
- package/src/index.ts +0 -733
- package/src/interface/announcement.ts +15 -5
- package/src/interface/calendar.ts +17 -6
- package/src/interface/compassconnect.ts +4 -2
- package/src/interface/config.ts +20 -6
- package/src/interface/datalake.ts +5 -2
- package/src/interface/email.ts +2 -1
- package/src/interface/file.ts +3 -1
- package/src/interface/kds.ts +15 -5
- package/src/interface/location.ts +103 -26
- package/src/interface/mealplan.ts +20 -5
- package/src/interface/menu.ts +65 -20
- package/src/interface/notification.ts +13 -4
- package/src/interface/order.ts +33 -10
- package/src/interface/partner.ts +18 -6
- package/src/interface/payment.ts +25 -6
- package/src/interface/permission.ts +18 -5
- package/src/interface/promo.ts +29 -7
- package/src/interface/report.ts +18 -6
- package/src/interface/shoppingcart.ts +23 -5
- package/src/interface/sms.ts +1 -1
- package/src/interface/task.ts +26 -8
- package/src/interface/user.ts +55 -14
- package/src/interface/util.ts +14 -1
- package/src/interface/vendor.ts +33 -9
- package/lib/interface/brand.d.ts +0 -16
- package/lib/interface/brand.d.ts.map +0 -1
- package/lib/interface/brand.js +0 -4
- package/lib/interface/brand.js.map +0 -1
- package/lib/interface/delivery.d.ts +0 -34
- package/lib/interface/delivery.d.ts.map +0 -1
- package/lib/interface/delivery.js +0 -4
- package/lib/interface/delivery.js.map +0 -1
- package/lib/interface/dh.d.ts +0 -9
- package/lib/interface/dh.d.ts.map +0 -1
- package/lib/interface/dh.js +0 -4
- package/lib/interface/dh.js.map +0 -1
- package/lib/interface/logger.d.ts +0 -30
- package/lib/interface/logger.d.ts.map +0 -1
- package/lib/interface/logger.js +0 -4
- package/lib/interface/logger.js.map +0 -1
- package/lib/interface/loyalty.d.ts +0 -351
- package/lib/interface/loyalty.d.ts.map +0 -1
- package/lib/interface/loyalty.js +0 -4
- package/lib/interface/loyalty.js.map +0 -1
- package/lib/interface/message.d.ts +0 -42
- package/lib/interface/message.d.ts.map +0 -1
- package/lib/interface/message.js +0 -4
- package/lib/interface/message.js.map +0 -1
- package/lib/interface/schedule.d.ts +0 -96
- package/lib/interface/schedule.d.ts.map +0 -1
- package/lib/interface/schedule.js +0 -4
- package/lib/interface/schedule.js.map +0 -1
- package/lib/interface/vote.d.ts +0 -57
- package/lib/interface/vote.d.ts.map +0 -1
- package/lib/interface/vote.js +0 -4
- package/lib/interface/vote.js.map +0 -1
- package/src/interface/brand.ts +0 -29
- package/src/interface/delivery.ts +0 -52
- package/src/interface/dh.ts +0 -16
- package/src/interface/logger.ts +0 -48
- package/src/interface/loyalty.ts +0 -545
- package/src/interface/message.ts +0 -58
- package/src/interface/schedule.ts +0 -139
- package/src/interface/vote.ts +0 -75
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
-
|
|
3
|
-
import { RequestQuery } from "./util";
|
|
4
|
-
|
|
5
|
-
export interface Error {
|
|
6
|
-
code?: number;
|
|
7
|
-
message?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// POST /delivery/order - make reservation
|
|
11
|
-
|
|
12
|
-
export interface PostDeliveryOrderBody {
|
|
13
|
-
lat?: number;
|
|
14
|
-
long?: number;
|
|
15
|
-
item?: any;
|
|
16
|
-
[index: string]: any;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface PostDeliveryOrderResponse {
|
|
20
|
-
success?: boolean;
|
|
21
|
-
[index: string]: any;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface PostDeliveryOrderRequest {
|
|
25
|
-
body: PostDeliveryOrderBody;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// PATCH /delivery/order/{order_id} - confirm order
|
|
29
|
-
|
|
30
|
-
export interface PatchDeliveryOrderPath {
|
|
31
|
-
// TODO: add parameter to swagger.json
|
|
32
|
-
order_id: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface PatchDeliveryOrderResponse {
|
|
36
|
-
[index: string]: any;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface PatchDeliveryOrderRequest extends PatchDeliveryOrderPath {}
|
|
40
|
-
|
|
41
|
-
// GET /delivery/order/{order_id} - get order
|
|
42
|
-
|
|
43
|
-
export interface GetDeliveryOrderPath {
|
|
44
|
-
// TODO: add parameter to swagger.json
|
|
45
|
-
order_id: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface GetDeliveryOrderResponse {
|
|
49
|
-
[index: string]: any;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface GetDeliveryOrderRequest extends GetDeliveryOrderPath {}
|
package/src/interface/dh.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
-
|
|
3
|
-
import { RequestQuery } from "./util";
|
|
4
|
-
|
|
5
|
-
export interface Error {
|
|
6
|
-
error?: string;
|
|
7
|
-
code?: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// POST /dh/sql
|
|
11
|
-
|
|
12
|
-
export interface PostDhSqlResponse {
|
|
13
|
-
[index: string]: any;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type PostDhSqlRequest = {};
|
package/src/interface/logger.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
-
|
|
3
|
-
import { RequestQuery } from "./util";
|
|
4
|
-
|
|
5
|
-
export interface Error {
|
|
6
|
-
error?: string;
|
|
7
|
-
code?: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface BrandStatusLog {
|
|
11
|
-
// action
|
|
12
|
-
id?: string;
|
|
13
|
-
// log creation date
|
|
14
|
-
date?: string;
|
|
15
|
-
// brand
|
|
16
|
-
location_brand?: string;
|
|
17
|
-
// user
|
|
18
|
-
user?: string;
|
|
19
|
-
status?: string;
|
|
20
|
-
// Date when brand will change status from closed to open
|
|
21
|
-
reopen_at?: string;
|
|
22
|
-
// Previous status and reopen date
|
|
23
|
-
_old?: {
|
|
24
|
-
status?: string;
|
|
25
|
-
// Date when brand will change status from closed to open
|
|
26
|
-
reopen_at?: string;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// GET /logger/{id}/brand/status - Get status changes of all brands
|
|
31
|
-
|
|
32
|
-
export interface GetLoggerBrandStatusPath {
|
|
33
|
-
// action
|
|
34
|
-
id: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface GetLoggerBrandStatusQuery {
|
|
38
|
-
start?: number;
|
|
39
|
-
end?: number;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface GetLoggerBrandStatusResponse {
|
|
43
|
-
logs?: BrandStatusLog[];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface GetLoggerBrandStatusRequest
|
|
47
|
-
extends RequestQuery<GetLoggerBrandStatusQuery>,
|
|
48
|
-
GetLoggerBrandStatusPath {}
|
package/src/interface/loyalty.ts
DELETED
|
@@ -1,545 +0,0 @@
|
|
|
1
|
-
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
-
|
|
3
|
-
import { RequestQuery } from "./util";
|
|
4
|
-
|
|
5
|
-
export interface Error {
|
|
6
|
-
message?: string;
|
|
7
|
-
code?: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface EnrollResponse {
|
|
11
|
-
points?: number;
|
|
12
|
-
loyalty_card_id?: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface Points {
|
|
16
|
-
points?: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface UserId {
|
|
20
|
-
user_id?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface Offer {
|
|
24
|
-
id?: number;
|
|
25
|
-
name?: string;
|
|
26
|
-
promotion_type?: string;
|
|
27
|
-
target?: string;
|
|
28
|
-
image_url?: string;
|
|
29
|
-
description?: string;
|
|
30
|
-
terms_and_conditions?: string;
|
|
31
|
-
instructions?: string;
|
|
32
|
-
pos_code?: string;
|
|
33
|
-
pos_instructions?: string;
|
|
34
|
-
destination_url?: string;
|
|
35
|
-
created_at?: string;
|
|
36
|
-
updated_at?: string;
|
|
37
|
-
start_date?: string;
|
|
38
|
-
end_date?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface EnrollmentStatus {
|
|
42
|
-
is_enrolled?: boolean;
|
|
43
|
-
loyalty_card_id?: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface Success {
|
|
47
|
-
success?: boolean;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface EarningOpportunity {
|
|
51
|
-
name?: string;
|
|
52
|
-
event_type?: string;
|
|
53
|
-
description?: string;
|
|
54
|
-
order_index?: number;
|
|
55
|
-
destination_url?: string;
|
|
56
|
-
image_url?: string;
|
|
57
|
-
points?: number;
|
|
58
|
-
cap_reached?: boolean;
|
|
59
|
-
rule_type?: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface Reward {
|
|
63
|
-
id?: number;
|
|
64
|
-
name?: string;
|
|
65
|
-
description?: string;
|
|
66
|
-
image_url?: string;
|
|
67
|
-
instructions?: string;
|
|
68
|
-
points_needed_to_redeem?: number;
|
|
69
|
-
status?: boolean;
|
|
70
|
-
expiration_date?: string;
|
|
71
|
-
points_remaining_to_redeem?: number;
|
|
72
|
-
dollar_value?: number;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface Coupon {
|
|
76
|
-
id?: string;
|
|
77
|
-
name?: string;
|
|
78
|
-
status?: string;
|
|
79
|
-
email?: string;
|
|
80
|
-
description?: string;
|
|
81
|
-
expiry_date?: string;
|
|
82
|
-
redeem_instructions?: string;
|
|
83
|
-
image_url?: string;
|
|
84
|
-
dollar_value?: number;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface RecordResponse {
|
|
88
|
-
points?: number;
|
|
89
|
-
event_id?: string;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface Item {
|
|
93
|
-
// item id
|
|
94
|
-
id: string;
|
|
95
|
-
label?: string;
|
|
96
|
-
quantity: number;
|
|
97
|
-
price: {
|
|
98
|
-
amount?: number;
|
|
99
|
-
};
|
|
100
|
-
[index: string]: any;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface HistoryTransaction {
|
|
104
|
-
event_type?: string;
|
|
105
|
-
created_at?: string;
|
|
106
|
-
points?: number;
|
|
107
|
-
value?: number;
|
|
108
|
-
channel?: string;
|
|
109
|
-
display_detail?: string;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export interface RewardInfo {
|
|
113
|
-
id?: number;
|
|
114
|
-
points?: number;
|
|
115
|
-
cost?: number;
|
|
116
|
-
description?: string;
|
|
117
|
-
expiry_date?: string;
|
|
118
|
-
event_id?: number;
|
|
119
|
-
image_url?: string;
|
|
120
|
-
name?: string;
|
|
121
|
-
pos_code?: string;
|
|
122
|
-
pos_instructions?: string;
|
|
123
|
-
redeem_instructions?: string;
|
|
124
|
-
reward_type?: string;
|
|
125
|
-
coupon_id?: string;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export interface LoyaltyUser {
|
|
129
|
-
id?: string;
|
|
130
|
-
channel?: string;
|
|
131
|
-
email?: string;
|
|
132
|
-
first_name?: string;
|
|
133
|
-
last_name?: string;
|
|
134
|
-
birthday?: string;
|
|
135
|
-
balance?: number;
|
|
136
|
-
lifetime_balance?: number;
|
|
137
|
-
loyalty_provider_user_id?: number;
|
|
138
|
-
enrolled_at?: string;
|
|
139
|
-
last_activity?: string;
|
|
140
|
-
updated_at?: string;
|
|
141
|
-
last_reward_date?: string;
|
|
142
|
-
last_reward_event_id?: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface Event {
|
|
146
|
-
id?: string;
|
|
147
|
-
external_id?: string;
|
|
148
|
-
created_at?: string;
|
|
149
|
-
updated_at?: string;
|
|
150
|
-
points?: number;
|
|
151
|
-
value?: number;
|
|
152
|
-
loyalty_provider_user_id?: number;
|
|
153
|
-
detail?: string;
|
|
154
|
-
display_detail?: string;
|
|
155
|
-
event_type?: string;
|
|
156
|
-
channel?: string;
|
|
157
|
-
status?: number;
|
|
158
|
-
email?: string;
|
|
159
|
-
expires_at?: string;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// POST /loyalty/{id}/enroll/{user_id} - Enroll logged in user in Loyalty program
|
|
163
|
-
|
|
164
|
-
export interface PostLoyaltyEnrollPath {
|
|
165
|
-
// Loyalty Provider id
|
|
166
|
-
id: string;
|
|
167
|
-
// CompassDigital User id
|
|
168
|
-
user_id: string;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export interface PostLoyaltyEnrollQuery {
|
|
172
|
-
// Enrollment Channel
|
|
173
|
-
channel?: string;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export type PostLoyaltyEnrollResponse = EnrollResponse;
|
|
177
|
-
|
|
178
|
-
export interface PostLoyaltyEnrollRequest
|
|
179
|
-
extends RequestQuery<PostLoyaltyEnrollQuery>,
|
|
180
|
-
PostLoyaltyEnrollPath {}
|
|
181
|
-
|
|
182
|
-
// GET /loyalty/{id}/points - Get potential points user could earn from certain event in Loyalty program
|
|
183
|
-
|
|
184
|
-
export interface GetLoyaltyPointsPath {
|
|
185
|
-
// Loyalty Provider id
|
|
186
|
-
id: string;
|
|
187
|
-
// CompassDigital User id
|
|
188
|
-
user_id: string;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface GetLoyaltyPointsQuery {
|
|
192
|
-
// event type
|
|
193
|
-
event: string;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export type GetLoyaltyPointsResponse = Points;
|
|
197
|
-
|
|
198
|
-
export interface GetLoyaltyPointsRequest
|
|
199
|
-
extends RequestQuery<GetLoyaltyPointsQuery>,
|
|
200
|
-
GetLoyaltyPointsPath {}
|
|
201
|
-
|
|
202
|
-
// GET /loyalty/{id}/offers/{user_id} - Get offers for the logged in user
|
|
203
|
-
|
|
204
|
-
export interface GetLoyaltyOffersPath {
|
|
205
|
-
// Loyalty Provider id
|
|
206
|
-
id: string;
|
|
207
|
-
// CompassDigital User id
|
|
208
|
-
user_id: string;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export interface GetLoyaltyOffersResponse {
|
|
212
|
-
offers?: Offer[];
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export interface GetLoyaltyOffersRequest extends GetLoyaltyOffersPath {}
|
|
216
|
-
|
|
217
|
-
// GET /loyalty/{id}/enrollmentstatus/{user_id} - Get enrollment status for logged in user
|
|
218
|
-
|
|
219
|
-
export interface GetLoyaltyEnrollmentstatusPath {
|
|
220
|
-
// Loyalty Provider id
|
|
221
|
-
id: string;
|
|
222
|
-
// CompassDigital User id
|
|
223
|
-
user_id: string;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export type GetLoyaltyEnrollmentstatusResponse = EnrollmentStatus;
|
|
227
|
-
|
|
228
|
-
export interface GetLoyaltyEnrollmentstatusRequest extends GetLoyaltyEnrollmentstatusPath {}
|
|
229
|
-
|
|
230
|
-
// GET /loyalty/{id}/balance/{user_id} - Get loyalty point balance for logged in user
|
|
231
|
-
|
|
232
|
-
export interface GetLoyaltyBalancePath {
|
|
233
|
-
// Loyalty Provider id
|
|
234
|
-
id: string;
|
|
235
|
-
// CompassDigital User id
|
|
236
|
-
user_id: string;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export type GetLoyaltyBalanceResponse = Points;
|
|
240
|
-
|
|
241
|
-
export interface GetLoyaltyBalanceRequest extends GetLoyaltyBalancePath {}
|
|
242
|
-
|
|
243
|
-
// GET /loyalty/{id}/opportunities/{user_id} - Get earning opportunities for the logged in user
|
|
244
|
-
|
|
245
|
-
export interface GetLoyaltyOpportunitiesPath {
|
|
246
|
-
// Loyalty Provider id
|
|
247
|
-
id: string;
|
|
248
|
-
// CompassDigital User id
|
|
249
|
-
user_id: string;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export interface GetLoyaltyOpportunitiesQuery {
|
|
253
|
-
// Choose what opportunities should not be returned, can be several comma separated
|
|
254
|
-
filter?: string;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export interface GetLoyaltyOpportunitiesResponse {
|
|
258
|
-
opportunities?: EarningOpportunity[];
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export interface GetLoyaltyOpportunitiesRequest
|
|
262
|
-
extends RequestQuery<GetLoyaltyOpportunitiesQuery>,
|
|
263
|
-
GetLoyaltyOpportunitiesPath {}
|
|
264
|
-
|
|
265
|
-
// POST /loyalty/{id}/opportunities/{user_id} - Record an event for the logged in user
|
|
266
|
-
|
|
267
|
-
export interface PostLoyaltyOpportunitiesPath {
|
|
268
|
-
// Loyalty Provider id
|
|
269
|
-
id: string;
|
|
270
|
-
// CompassDigital User id
|
|
271
|
-
user_id: string;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export interface PostLoyaltyOpportunitiesQuery {
|
|
275
|
-
// Event type that should be recorded for the logged in user
|
|
276
|
-
event: string;
|
|
277
|
-
// Event occurence channel
|
|
278
|
-
channel?: string;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export type PostLoyaltyOpportunitiesResponse = RecordResponse;
|
|
282
|
-
|
|
283
|
-
export interface PostLoyaltyOpportunitiesRequest
|
|
284
|
-
extends RequestQuery<PostLoyaltyOpportunitiesQuery>,
|
|
285
|
-
PostLoyaltyOpportunitiesPath {}
|
|
286
|
-
|
|
287
|
-
// GET /loyalty/{id}/rewards/{user_id} - Get rewards available for the logged in user
|
|
288
|
-
|
|
289
|
-
export interface GetLoyaltyRewardsPath {
|
|
290
|
-
// Loyalty Provider id
|
|
291
|
-
id: string;
|
|
292
|
-
// CompassDigital User id
|
|
293
|
-
user_id: string;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
export interface GetLoyaltyRewardsResponse {
|
|
297
|
-
rewards?: Reward[];
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export interface GetLoyaltyRewardsRequest extends GetLoyaltyRewardsPath {}
|
|
301
|
-
|
|
302
|
-
// GET /loyalty/{id}/coupons/{user_id} - Get coupons available for the logged in user
|
|
303
|
-
|
|
304
|
-
export interface GetLoyaltyCouponsPath {
|
|
305
|
-
// Loyalty Provider id
|
|
306
|
-
id: string;
|
|
307
|
-
// CompassDigital User id
|
|
308
|
-
user_id: string;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
export interface GetLoyaltyCouponsResponse {
|
|
312
|
-
coupons?: Coupon[];
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
export interface GetLoyaltyCouponsRequest extends GetLoyaltyCouponsPath {}
|
|
316
|
-
|
|
317
|
-
// GET /loyalty/{id}/orderpoints/{user_id} - Get potential loyalty point points for an order based on amount.
|
|
318
|
-
|
|
319
|
-
export interface GetLoyaltyOrderpointsPath {
|
|
320
|
-
// Loyalty Provider id
|
|
321
|
-
id: string;
|
|
322
|
-
// CompassDigital User id
|
|
323
|
-
user_id: string;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
export interface GetLoyaltyOrderpointsQuery {
|
|
327
|
-
// Order amount before taxes to check potential loyalty points
|
|
328
|
-
order_amount: number;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
export type GetLoyaltyOrderpointsResponse = Points;
|
|
332
|
-
|
|
333
|
-
export interface GetLoyaltyOrderpointsRequest
|
|
334
|
-
extends RequestQuery<GetLoyaltyOrderpointsQuery>,
|
|
335
|
-
GetLoyaltyOrderpointsPath {}
|
|
336
|
-
|
|
337
|
-
// POST /loyalty/{id}/orderpoints/{user_id} - Get potential loyalty point points for a order based on amount and items
|
|
338
|
-
|
|
339
|
-
export interface PostLoyaltyOrderpointsPath {
|
|
340
|
-
// Loyalty Provider id
|
|
341
|
-
id: string;
|
|
342
|
-
// CompassDigital User id
|
|
343
|
-
user_id: string;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
export interface PostLoyaltyOrderpointsBody {
|
|
347
|
-
// Order total amount before taxes
|
|
348
|
-
order_amount: number;
|
|
349
|
-
// List of items in the cart
|
|
350
|
-
items?: {
|
|
351
|
-
items?: Item[];
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
export type PostLoyaltyOrderpointsResponse = Points;
|
|
356
|
-
|
|
357
|
-
export interface PostLoyaltyOrderpointsRequest extends PostLoyaltyOrderpointsPath {
|
|
358
|
-
body: PostLoyaltyOrderpointsBody;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
// POST /loyalty/{id}/purchase/{user_id} - Record purchase event
|
|
362
|
-
|
|
363
|
-
export interface PostLoyaltyPurchasePath {
|
|
364
|
-
// Loyalty Provider id
|
|
365
|
-
id: string;
|
|
366
|
-
// CompassDigital User id
|
|
367
|
-
user_id: string;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export interface PostLoyaltyPurchaseQuery {
|
|
371
|
-
// Purchase Channel
|
|
372
|
-
channel?: string;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
export interface PostLoyaltyPurchaseBody {
|
|
376
|
-
// Order id
|
|
377
|
-
order_id: string;
|
|
378
|
-
// Order total amount before taxes
|
|
379
|
-
order_total: number;
|
|
380
|
-
// List of order items
|
|
381
|
-
items: {
|
|
382
|
-
items?: Item[];
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
export type PostLoyaltyPurchaseResponse = RecordResponse;
|
|
387
|
-
|
|
388
|
-
export interface PostLoyaltyPurchaseRequest
|
|
389
|
-
extends RequestQuery<PostLoyaltyPurchaseQuery>,
|
|
390
|
-
PostLoyaltyPurchasePath {
|
|
391
|
-
body: PostLoyaltyPurchaseBody;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
// POST /loyalty/{id}/buyreward/{user_id} - Redeem rewards to coupons
|
|
395
|
-
|
|
396
|
-
export interface PostLoyaltyBuyrewardPath {
|
|
397
|
-
// Loyalty Provider id
|
|
398
|
-
id: string;
|
|
399
|
-
// CompassDigital User id
|
|
400
|
-
user_id: string;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
export interface PostLoyaltyBuyrewardQuery {
|
|
404
|
-
// buy reward Channel
|
|
405
|
-
channel?: string;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
export interface PostLoyaltyBuyrewardBody {
|
|
409
|
-
reward_id: string;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
export type PostLoyaltyBuyrewardResponse = RewardInfo;
|
|
413
|
-
|
|
414
|
-
export interface PostLoyaltyBuyrewardRequest
|
|
415
|
-
extends RequestQuery<PostLoyaltyBuyrewardQuery>,
|
|
416
|
-
PostLoyaltyBuyrewardPath {
|
|
417
|
-
body: PostLoyaltyBuyrewardBody;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// GET /loyalty/{id}/history/{user_id} - Get history of loyalty transactions for user
|
|
421
|
-
|
|
422
|
-
export interface GetLoyaltyHistoryPath {
|
|
423
|
-
// Loyalty Provider id
|
|
424
|
-
id: string;
|
|
425
|
-
// CompassDigital User id
|
|
426
|
-
user_id: string;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export interface GetLoyaltyHistoryQuery {
|
|
430
|
-
// Page number to return for pagination. If not specified will return first 1000 events
|
|
431
|
-
page_number?: number;
|
|
432
|
-
// How many entries to return per request. If not specified will return first 1000 events
|
|
433
|
-
entries_per_page?: number;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
export interface GetLoyaltyHistoryResponse {
|
|
437
|
-
transactions?: HistoryTransaction[];
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
export interface GetLoyaltyHistoryRequest
|
|
441
|
-
extends RequestQuery<GetLoyaltyHistoryQuery>,
|
|
442
|
-
GetLoyaltyHistoryPath {}
|
|
443
|
-
|
|
444
|
-
// GET /loyalty/{id}/coupon/{user_id}/{coupon_id} - get coupon's information
|
|
445
|
-
|
|
446
|
-
export interface GetLoyaltyCouponPath {
|
|
447
|
-
// Loyalty Provider id
|
|
448
|
-
id: string;
|
|
449
|
-
// CompassDigital User id
|
|
450
|
-
user_id: string;
|
|
451
|
-
// Coupon code to get coupon information
|
|
452
|
-
coupon_id: string;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
export interface GetLoyaltyCouponResponse {
|
|
456
|
-
coupon?: Coupon;
|
|
457
|
-
// This will be true if the coupon status is either 'redeemed' or 'reissued'
|
|
458
|
-
is_valid?: boolean;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export interface GetLoyaltyCouponRequest extends GetLoyaltyCouponPath {}
|
|
462
|
-
|
|
463
|
-
// PATCH /loyalty/{id}/coupon/{user_id}/{coupon_id} - Update coupon's status
|
|
464
|
-
|
|
465
|
-
export interface PatchLoyaltyCouponPath {
|
|
466
|
-
// Loyalty Provider id
|
|
467
|
-
id: string;
|
|
468
|
-
// CompassDigital User id
|
|
469
|
-
user_id: string;
|
|
470
|
-
// Coupon code to update
|
|
471
|
-
coupon_id: string;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
export interface PatchLoyaltyCouponBody {
|
|
475
|
-
// Coupon status to set
|
|
476
|
-
status: string;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
export type PatchLoyaltyCouponResponse = Success;
|
|
480
|
-
|
|
481
|
-
export interface PatchLoyaltyCouponRequest extends PatchLoyaltyCouponPath {
|
|
482
|
-
body: PatchLoyaltyCouponBody;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
// GET /loyalty/{id}/search - Search CDL user id by internal 500friends id
|
|
486
|
-
|
|
487
|
-
export interface GetLoyaltySearchPath {
|
|
488
|
-
// Loyalty Provider id
|
|
489
|
-
id: string;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
export interface GetLoyaltySearchQuery {
|
|
493
|
-
// User id in 500friends
|
|
494
|
-
search_id: number;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
export type GetLoyaltySearchResponse = UserId;
|
|
498
|
-
|
|
499
|
-
export interface GetLoyaltySearchRequest
|
|
500
|
-
extends RequestQuery<GetLoyaltySearchQuery>,
|
|
501
|
-
GetLoyaltySearchPath {}
|
|
502
|
-
|
|
503
|
-
// GET /loyalty/{id}/users - Get all loyalty users updated after specific date
|
|
504
|
-
|
|
505
|
-
export interface GetLoyaltyUsersPath {
|
|
506
|
-
// Loyalty Provider id
|
|
507
|
-
id: string;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
export interface GetLoyaltyUsersQuery {
|
|
511
|
-
// Page number if more than 1000 records available. Equal to 1 by default
|
|
512
|
-
page_number?: number;
|
|
513
|
-
// Start date to search from
|
|
514
|
-
from_date: string;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
export interface GetLoyaltyUsersResponse {
|
|
518
|
-
users?: LoyaltyUser[];
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
export interface GetLoyaltyUsersRequest
|
|
522
|
-
extends RequestQuery<GetLoyaltyUsersQuery>,
|
|
523
|
-
GetLoyaltyUsersPath {}
|
|
524
|
-
|
|
525
|
-
// GET /loyalty/{id}/events - Get all loyalty events updated after specific date
|
|
526
|
-
|
|
527
|
-
export interface GetLoyaltyEventsPath {
|
|
528
|
-
// Loyalty Provider id
|
|
529
|
-
id: string;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
export interface GetLoyaltyEventsQuery {
|
|
533
|
-
// Page number if more than 1000 records available. Equal to 1 by default
|
|
534
|
-
page_number?: number;
|
|
535
|
-
// Start date to search from
|
|
536
|
-
from_date: string;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
export interface GetLoyaltyEventsResponse {
|
|
540
|
-
events?: Event[];
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
export interface GetLoyaltyEventsRequest
|
|
544
|
-
extends RequestQuery<GetLoyaltyEventsQuery>,
|
|
545
|
-
GetLoyaltyEventsPath {}
|
package/src/interface/message.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
-
|
|
3
|
-
import { RequestQuery } from "./util";
|
|
4
|
-
|
|
5
|
-
export interface Error {
|
|
6
|
-
message?: string;
|
|
7
|
-
code?: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface CreateMessage {
|
|
11
|
-
idfa?: string;
|
|
12
|
-
location?: {
|
|
13
|
-
latitude?: number;
|
|
14
|
-
longitude?: number;
|
|
15
|
-
id?: string;
|
|
16
|
-
};
|
|
17
|
-
meta?: {
|
|
18
|
-
[index: string]: any;
|
|
19
|
-
};
|
|
20
|
-
text?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface Message {
|
|
24
|
-
// message
|
|
25
|
-
id?: string;
|
|
26
|
-
idfa?: string;
|
|
27
|
-
location?: {
|
|
28
|
-
latitude?: number;
|
|
29
|
-
longitude?: number;
|
|
30
|
-
id?: string;
|
|
31
|
-
};
|
|
32
|
-
meta?: {
|
|
33
|
-
[index: string]: any;
|
|
34
|
-
};
|
|
35
|
-
text?: string;
|
|
36
|
-
timestamp?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// POST /message - Create a Message
|
|
40
|
-
|
|
41
|
-
export type PostMessageBody = CreateMessage;
|
|
42
|
-
|
|
43
|
-
export type PostMessageResponse = Message;
|
|
44
|
-
|
|
45
|
-
export interface PostMessageRequest {
|
|
46
|
-
body: PostMessageBody;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// GET /message/{id} - Get a Message
|
|
50
|
-
|
|
51
|
-
export interface GetMessagePath {
|
|
52
|
-
// Message CDL encoded id
|
|
53
|
-
id: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type GetMessageResponse = Message;
|
|
57
|
-
|
|
58
|
-
export interface GetMessageRequest extends GetMessagePath {}
|