@compassdigital/sdk.typescript 3.20.0 → 3.22.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 +177 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +192 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/announcement.d.ts +7 -13
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +7 -13
- package/lib/interface/calendar.d.ts.map +1 -1
- package/lib/interface/compassconnect.d.ts +2 -3
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/config.d.ts +10 -19
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/datalake.d.ts +3 -5
- package/lib/interface/datalake.d.ts.map +1 -1
- package/lib/interface/email.d.ts +2 -3
- package/lib/interface/email.d.ts.map +1 -1
- package/lib/interface/file.d.ts +3 -5
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/kds.d.ts +7 -13
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +53 -105
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/loyalty.d.ts +351 -0
- package/lib/interface/loyalty.d.ts.map +1 -0
- package/lib/interface/loyalty.js +4 -0
- package/lib/interface/loyalty.js.map +1 -0
- package/lib/interface/mealplan.d.ts +12 -23
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +27 -53
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/notification.d.ts +7 -13
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +15 -29
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +8 -15
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +15 -29
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/permission.d.ts +10 -19
- package/lib/interface/permission.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +17 -33
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/report.d.ts +8 -15
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +15 -29
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/task.d.ts +11 -21
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +29 -57
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/util.d.ts +9 -2
- package/lib/interface/util.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +17 -33
- package/lib/interface/vendor.d.ts.map +1 -1
- package/manifest.json +4 -0
- package/package.json +2 -2
- package/src/index.ts +481 -0
- package/src/interface/announcement.ts +10 -18
- package/src/interface/calendar.ts +12 -19
- package/src/interface/compassconnect.ts +3 -4
- package/src/interface/config.ts +10 -24
- package/src/interface/datalake.ts +3 -6
- package/src/interface/email.ts +2 -3
- package/src/interface/file.ts +3 -5
- package/src/interface/kds.ts +7 -17
- package/src/interface/location.ts +105 -143
- package/src/interface/loyalty.ts +558 -0
- package/src/interface/mealplan.ts +13 -27
- package/src/interface/menu.ts +42 -74
- package/src/interface/notification.ts +7 -16
- package/src/interface/order.ts +27 -43
- package/src/interface/partner.ts +8 -20
- package/src/interface/payment.ts +21 -35
- package/src/interface/permission.ts +14 -24
- package/src/interface/promo.ts +21 -41
- package/src/interface/report.ts +21 -23
- package/src/interface/shoppingcart.ts +27 -33
- package/src/interface/sms.ts +1 -1
- package/src/interface/task.ts +17 -31
- package/src/interface/user.ts +45 -72
- package/src/interface/util.ts +10 -2
- package/src/interface/vendor.ts +24 -42
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
+
|
|
3
|
+
import { RequestQuery, BaseRequest } 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 BaseRequest,
|
|
180
|
+
RequestQuery<PostLoyaltyEnrollQuery>,
|
|
181
|
+
PostLoyaltyEnrollPath {}
|
|
182
|
+
|
|
183
|
+
// GET /loyalty/{id}/points - Get potential points user could earn from certain event in Loyalty program
|
|
184
|
+
|
|
185
|
+
export interface GetLoyaltyPointsPath {
|
|
186
|
+
// Loyalty Provider id
|
|
187
|
+
id: string;
|
|
188
|
+
// CompassDigital User id
|
|
189
|
+
user_id: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface GetLoyaltyPointsQuery {
|
|
193
|
+
// event type
|
|
194
|
+
event: string;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type GetLoyaltyPointsResponse = Points;
|
|
198
|
+
|
|
199
|
+
export interface GetLoyaltyPointsRequest
|
|
200
|
+
extends BaseRequest,
|
|
201
|
+
RequestQuery<GetLoyaltyPointsQuery>,
|
|
202
|
+
GetLoyaltyPointsPath {}
|
|
203
|
+
|
|
204
|
+
// GET /loyalty/{id}/offers/{user_id} - Get offers for the logged in user
|
|
205
|
+
|
|
206
|
+
export interface GetLoyaltyOffersPath {
|
|
207
|
+
// Loyalty Provider id
|
|
208
|
+
id: string;
|
|
209
|
+
// CompassDigital User id
|
|
210
|
+
user_id: string;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface GetLoyaltyOffersResponse {
|
|
214
|
+
offers?: Offer[];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface GetLoyaltyOffersRequest extends BaseRequest, GetLoyaltyOffersPath {}
|
|
218
|
+
|
|
219
|
+
// GET /loyalty/{id}/enrollmentstatus/{user_id} - Get enrollment status for logged in user
|
|
220
|
+
|
|
221
|
+
export interface GetLoyaltyEnrollmentstatusPath {
|
|
222
|
+
// Loyalty Provider id
|
|
223
|
+
id: string;
|
|
224
|
+
// CompassDigital User id
|
|
225
|
+
user_id: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type GetLoyaltyEnrollmentstatusResponse = EnrollmentStatus;
|
|
229
|
+
|
|
230
|
+
export interface GetLoyaltyEnrollmentstatusRequest
|
|
231
|
+
extends BaseRequest,
|
|
232
|
+
GetLoyaltyEnrollmentstatusPath {}
|
|
233
|
+
|
|
234
|
+
// GET /loyalty/{id}/balance/{user_id} - Get loyalty point balance for logged in user
|
|
235
|
+
|
|
236
|
+
export interface GetLoyaltyBalancePath {
|
|
237
|
+
// Loyalty Provider id
|
|
238
|
+
id: string;
|
|
239
|
+
// CompassDigital User id
|
|
240
|
+
user_id: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type GetLoyaltyBalanceResponse = Points;
|
|
244
|
+
|
|
245
|
+
export interface GetLoyaltyBalanceRequest extends BaseRequest, GetLoyaltyBalancePath {}
|
|
246
|
+
|
|
247
|
+
// GET /loyalty/{id}/opportunities/{user_id} - Get earning opportunities for the logged in user
|
|
248
|
+
|
|
249
|
+
export interface GetLoyaltyOpportunitiesPath {
|
|
250
|
+
// Loyalty Provider id
|
|
251
|
+
id: string;
|
|
252
|
+
// CompassDigital User id
|
|
253
|
+
user_id: string;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface GetLoyaltyOpportunitiesQuery {
|
|
257
|
+
// Choose what opportunities should not be returned, can be several comma separated
|
|
258
|
+
filter?: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface GetLoyaltyOpportunitiesResponse {
|
|
262
|
+
opportunities?: EarningOpportunity[];
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface GetLoyaltyOpportunitiesRequest
|
|
266
|
+
extends BaseRequest,
|
|
267
|
+
RequestQuery<GetLoyaltyOpportunitiesQuery>,
|
|
268
|
+
GetLoyaltyOpportunitiesPath {}
|
|
269
|
+
|
|
270
|
+
// POST /loyalty/{id}/opportunities/{user_id} - Record an event for the logged in user
|
|
271
|
+
|
|
272
|
+
export interface PostLoyaltyOpportunitiesPath {
|
|
273
|
+
// Loyalty Provider id
|
|
274
|
+
id: string;
|
|
275
|
+
// CompassDigital User id
|
|
276
|
+
user_id: string;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface PostLoyaltyOpportunitiesQuery {
|
|
280
|
+
// Event type that should be recorded for the logged in user
|
|
281
|
+
event: string;
|
|
282
|
+
// Event occurence channel
|
|
283
|
+
channel?: string;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export type PostLoyaltyOpportunitiesResponse = RecordResponse;
|
|
287
|
+
|
|
288
|
+
export interface PostLoyaltyOpportunitiesRequest
|
|
289
|
+
extends BaseRequest,
|
|
290
|
+
RequestQuery<PostLoyaltyOpportunitiesQuery>,
|
|
291
|
+
PostLoyaltyOpportunitiesPath {}
|
|
292
|
+
|
|
293
|
+
// GET /loyalty/{id}/rewards/{user_id} - Get rewards available for the logged in user
|
|
294
|
+
|
|
295
|
+
export interface GetLoyaltyRewardsPath {
|
|
296
|
+
// Loyalty Provider id
|
|
297
|
+
id: string;
|
|
298
|
+
// CompassDigital User id
|
|
299
|
+
user_id: string;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface GetLoyaltyRewardsResponse {
|
|
303
|
+
rewards?: Reward[];
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface GetLoyaltyRewardsRequest extends BaseRequest, GetLoyaltyRewardsPath {}
|
|
307
|
+
|
|
308
|
+
// GET /loyalty/{id}/coupons/{user_id} - Get coupons available for the logged in user
|
|
309
|
+
|
|
310
|
+
export interface GetLoyaltyCouponsPath {
|
|
311
|
+
// Loyalty Provider id
|
|
312
|
+
id: string;
|
|
313
|
+
// CompassDigital User id
|
|
314
|
+
user_id: string;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface GetLoyaltyCouponsResponse {
|
|
318
|
+
coupons?: Coupon[];
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export interface GetLoyaltyCouponsRequest extends BaseRequest, GetLoyaltyCouponsPath {}
|
|
322
|
+
|
|
323
|
+
// GET /loyalty/{id}/orderpoints/{user_id} - Get potential loyalty point points for an order based on amount.
|
|
324
|
+
|
|
325
|
+
export interface GetLoyaltyOrderpointsPath {
|
|
326
|
+
// Loyalty Provider id
|
|
327
|
+
id: string;
|
|
328
|
+
// CompassDigital User id
|
|
329
|
+
user_id: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface GetLoyaltyOrderpointsQuery {
|
|
333
|
+
// Order amount before taxes to check potential loyalty points
|
|
334
|
+
order_amount: number;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export type GetLoyaltyOrderpointsResponse = Points;
|
|
338
|
+
|
|
339
|
+
export interface GetLoyaltyOrderpointsRequest
|
|
340
|
+
extends BaseRequest,
|
|
341
|
+
RequestQuery<GetLoyaltyOrderpointsQuery>,
|
|
342
|
+
GetLoyaltyOrderpointsPath {}
|
|
343
|
+
|
|
344
|
+
// POST /loyalty/{id}/orderpoints/{user_id} - Get potential loyalty point points for a order based on amount and items
|
|
345
|
+
|
|
346
|
+
export interface PostLoyaltyOrderpointsPath {
|
|
347
|
+
// Loyalty Provider id
|
|
348
|
+
id: string;
|
|
349
|
+
// CompassDigital User id
|
|
350
|
+
user_id: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface PostLoyaltyOrderpointsBody {
|
|
354
|
+
// Order total amount before taxes
|
|
355
|
+
order_amount: number;
|
|
356
|
+
// List of items in the cart
|
|
357
|
+
items?: {
|
|
358
|
+
items?: Item[];
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export type PostLoyaltyOrderpointsResponse = Points;
|
|
363
|
+
|
|
364
|
+
export interface PostLoyaltyOrderpointsRequest extends BaseRequest, PostLoyaltyOrderpointsPath {
|
|
365
|
+
body: PostLoyaltyOrderpointsBody;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// POST /loyalty/{id}/purchase/{user_id} - Record purchase event
|
|
369
|
+
|
|
370
|
+
export interface PostLoyaltyPurchasePath {
|
|
371
|
+
// Loyalty Provider id
|
|
372
|
+
id: string;
|
|
373
|
+
// CompassDigital User id
|
|
374
|
+
user_id: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface PostLoyaltyPurchaseQuery {
|
|
378
|
+
// Purchase Channel
|
|
379
|
+
channel?: string;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface PostLoyaltyPurchaseBody {
|
|
383
|
+
// Order id
|
|
384
|
+
order_id: string;
|
|
385
|
+
// Order total amount before taxes
|
|
386
|
+
order_total: number;
|
|
387
|
+
// List of order items
|
|
388
|
+
items: {
|
|
389
|
+
items?: Item[];
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export type PostLoyaltyPurchaseResponse = RecordResponse;
|
|
394
|
+
|
|
395
|
+
export interface PostLoyaltyPurchaseRequest
|
|
396
|
+
extends BaseRequest,
|
|
397
|
+
RequestQuery<PostLoyaltyPurchaseQuery>,
|
|
398
|
+
PostLoyaltyPurchasePath {
|
|
399
|
+
body: PostLoyaltyPurchaseBody;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// POST /loyalty/{id}/buyreward/{user_id} - Redeem rewards to coupons
|
|
403
|
+
|
|
404
|
+
export interface PostLoyaltyBuyrewardPath {
|
|
405
|
+
// Loyalty Provider id
|
|
406
|
+
id: string;
|
|
407
|
+
// CompassDigital User id
|
|
408
|
+
user_id: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export interface PostLoyaltyBuyrewardQuery {
|
|
412
|
+
// buy reward Channel
|
|
413
|
+
channel?: string;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export interface PostLoyaltyBuyrewardBody {
|
|
417
|
+
reward_id: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export type PostLoyaltyBuyrewardResponse = RewardInfo;
|
|
421
|
+
|
|
422
|
+
export interface PostLoyaltyBuyrewardRequest
|
|
423
|
+
extends BaseRequest,
|
|
424
|
+
RequestQuery<PostLoyaltyBuyrewardQuery>,
|
|
425
|
+
PostLoyaltyBuyrewardPath {
|
|
426
|
+
body: PostLoyaltyBuyrewardBody;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// GET /loyalty/{id}/history/{user_id} - Get history of loyalty transactions for user
|
|
430
|
+
|
|
431
|
+
export interface GetLoyaltyHistoryPath {
|
|
432
|
+
// Loyalty Provider id
|
|
433
|
+
id: string;
|
|
434
|
+
// CompassDigital User id
|
|
435
|
+
user_id: string;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export interface GetLoyaltyHistoryQuery {
|
|
439
|
+
// Page number to return for pagination. If not specified will return first 1000 events
|
|
440
|
+
page_number?: number;
|
|
441
|
+
// How many entries to return per request. If not specified will return first 1000 events
|
|
442
|
+
entries_per_page?: number;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export interface GetLoyaltyHistoryResponse {
|
|
446
|
+
transactions?: HistoryTransaction[];
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export interface GetLoyaltyHistoryRequest
|
|
450
|
+
extends BaseRequest,
|
|
451
|
+
RequestQuery<GetLoyaltyHistoryQuery>,
|
|
452
|
+
GetLoyaltyHistoryPath {}
|
|
453
|
+
|
|
454
|
+
// GET /loyalty/{id}/coupon/{user_id}/{coupon_id} - get coupon's information
|
|
455
|
+
|
|
456
|
+
export interface GetLoyaltyCouponPath {
|
|
457
|
+
// Loyalty Provider id
|
|
458
|
+
id: string;
|
|
459
|
+
// CompassDigital User id
|
|
460
|
+
user_id: string;
|
|
461
|
+
// Coupon code to get coupon information
|
|
462
|
+
coupon_id: string;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export interface GetLoyaltyCouponResponse {
|
|
466
|
+
coupon?: Coupon;
|
|
467
|
+
// This will be true if the coupon status is either 'redeemed' or 'reissued'
|
|
468
|
+
is_valid?: boolean;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export interface GetLoyaltyCouponRequest extends BaseRequest, GetLoyaltyCouponPath {}
|
|
472
|
+
|
|
473
|
+
// PATCH /loyalty/{id}/coupon/{user_id}/{coupon_id} - Update coupon's status
|
|
474
|
+
|
|
475
|
+
export interface PatchLoyaltyCouponPath {
|
|
476
|
+
// Loyalty Provider id
|
|
477
|
+
id: string;
|
|
478
|
+
// CompassDigital User id
|
|
479
|
+
user_id: string;
|
|
480
|
+
// Coupon code to update
|
|
481
|
+
coupon_id: string;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export interface PatchLoyaltyCouponBody {
|
|
485
|
+
// Coupon status to set
|
|
486
|
+
status: string;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export type PatchLoyaltyCouponResponse = Success;
|
|
490
|
+
|
|
491
|
+
export interface PatchLoyaltyCouponRequest extends BaseRequest, PatchLoyaltyCouponPath {
|
|
492
|
+
body: PatchLoyaltyCouponBody;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// GET /loyalty/{id}/search - Search CDL user id by internal 500friends id
|
|
496
|
+
|
|
497
|
+
export interface GetLoyaltySearchPath {
|
|
498
|
+
// Loyalty Provider id
|
|
499
|
+
id: string;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface GetLoyaltySearchQuery {
|
|
503
|
+
// User id in 500friends
|
|
504
|
+
search_id: number;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export type GetLoyaltySearchResponse = UserId;
|
|
508
|
+
|
|
509
|
+
export interface GetLoyaltySearchRequest
|
|
510
|
+
extends BaseRequest,
|
|
511
|
+
RequestQuery<GetLoyaltySearchQuery>,
|
|
512
|
+
GetLoyaltySearchPath {}
|
|
513
|
+
|
|
514
|
+
// GET /loyalty/{id}/users - Get all loyalty users updated after specific date
|
|
515
|
+
|
|
516
|
+
export interface GetLoyaltyUsersPath {
|
|
517
|
+
// Loyalty Provider id
|
|
518
|
+
id: string;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export interface GetLoyaltyUsersQuery {
|
|
522
|
+
// Page number if more than 1000 records available. Equal to 1 by default
|
|
523
|
+
page_number?: number;
|
|
524
|
+
// Start date to search from
|
|
525
|
+
from_date: string;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export interface GetLoyaltyUsersResponse {
|
|
529
|
+
users?: LoyaltyUser[];
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface GetLoyaltyUsersRequest
|
|
533
|
+
extends BaseRequest,
|
|
534
|
+
RequestQuery<GetLoyaltyUsersQuery>,
|
|
535
|
+
GetLoyaltyUsersPath {}
|
|
536
|
+
|
|
537
|
+
// GET /loyalty/{id}/events - Get all loyalty events updated after specific date
|
|
538
|
+
|
|
539
|
+
export interface GetLoyaltyEventsPath {
|
|
540
|
+
// Loyalty Provider id
|
|
541
|
+
id: string;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export interface GetLoyaltyEventsQuery {
|
|
545
|
+
// Page number if more than 1000 records available. Equal to 1 by default
|
|
546
|
+
page_number?: number;
|
|
547
|
+
// Start date to search from
|
|
548
|
+
from_date: string;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export interface GetLoyaltyEventsResponse {
|
|
552
|
+
events?: Event[];
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export interface GetLoyaltyEventsRequest
|
|
556
|
+
extends BaseRequest,
|
|
557
|
+
RequestQuery<GetLoyaltyEventsQuery>,
|
|
558
|
+
GetLoyaltyEventsPath {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
2
|
|
|
3
|
-
import { RequestQuery,
|
|
3
|
+
import { RequestQuery, BaseRequest } from "./util";
|
|
4
4
|
|
|
5
5
|
export interface Error {
|
|
6
6
|
code?: number;
|
|
@@ -76,9 +76,8 @@ export interface PostMealplanResponse {
|
|
|
76
76
|
tenders?: Tender[];
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export interface PostMealplanRequest extends PostMealplanPath {
|
|
79
|
+
export interface PostMealplanRequest extends BaseRequest, PostMealplanPath {
|
|
80
80
|
body: PostMealplanBody;
|
|
81
|
-
context?: RequestContext;
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
// PUT /mealplan/{id} - Save a token for access to the meal plan
|
|
@@ -96,9 +95,8 @@ export interface PutMealplanResponse {
|
|
|
96
95
|
tenders?: Tender[];
|
|
97
96
|
}
|
|
98
97
|
|
|
99
|
-
export interface PutMealplanRequest extends PutMealplanPath {
|
|
98
|
+
export interface PutMealplanRequest extends BaseRequest, PutMealplanPath {
|
|
100
99
|
body: PutMealplanBody;
|
|
101
|
-
context?: RequestContext;
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
// GET /mealplan/{id} - Check the user's meal plan tenders and get the authentication configuration
|
|
@@ -110,9 +108,7 @@ export interface GetMealplanPath {
|
|
|
110
108
|
|
|
111
109
|
export type GetMealplanResponse = TendersAndAuth;
|
|
112
110
|
|
|
113
|
-
export interface GetMealplanRequest extends GetMealplanPath {
|
|
114
|
-
context?: RequestContext;
|
|
115
|
-
}
|
|
111
|
+
export interface GetMealplanRequest extends BaseRequest, GetMealplanPath {}
|
|
116
112
|
|
|
117
113
|
// DELETE /mealplan/{id} - Delete a mealplan or a tender from the user's account
|
|
118
114
|
|
|
@@ -127,9 +123,8 @@ export interface DeleteMealplanBody {
|
|
|
127
123
|
|
|
128
124
|
export type DeleteMealplanResponse = TendersAndAuth;
|
|
129
125
|
|
|
130
|
-
export interface DeleteMealplanRequest extends DeleteMealplanPath {
|
|
126
|
+
export interface DeleteMealplanRequest extends BaseRequest, DeleteMealplanPath {
|
|
131
127
|
body: DeleteMealplanBody;
|
|
132
|
-
context?: RequestContext;
|
|
133
128
|
}
|
|
134
129
|
|
|
135
130
|
// POST /mealplan/{id}/callback - Callback endpoint for meal plans that make a call back from a webview workflow
|
|
@@ -145,9 +140,7 @@ export interface PostMealplanCallbackResponse {
|
|
|
145
140
|
cardNumber?: string;
|
|
146
141
|
}
|
|
147
142
|
|
|
148
|
-
export interface PostMealplanCallbackRequest extends PostMealplanCallbackPath {
|
|
149
|
-
context?: RequestContext;
|
|
150
|
-
}
|
|
143
|
+
export interface PostMealplanCallbackRequest extends BaseRequest, PostMealplanCallbackPath {}
|
|
151
144
|
|
|
152
145
|
// GET /mealplan/{id}/tender/{tender} - Check the user's tender balance
|
|
153
146
|
|
|
@@ -160,9 +153,7 @@ export interface GetMealplanTenderPath {
|
|
|
160
153
|
|
|
161
154
|
export type GetMealplanTenderResponse = Tender;
|
|
162
155
|
|
|
163
|
-
export interface GetMealplanTenderRequest extends GetMealplanTenderPath {
|
|
164
|
-
context?: RequestContext;
|
|
165
|
-
}
|
|
156
|
+
export interface GetMealplanTenderRequest extends BaseRequest, GetMealplanTenderPath {}
|
|
166
157
|
|
|
167
158
|
// DELETE /mealplan/{id}/tender/{tender} - Debit an amount from the tender balance
|
|
168
159
|
|
|
@@ -185,9 +176,7 @@ export interface DeleteMealplanTenderResponse {
|
|
|
185
176
|
transaction_amount?: number;
|
|
186
177
|
}
|
|
187
178
|
|
|
188
|
-
export interface DeleteMealplanTenderRequest extends DeleteMealplanTenderPath {
|
|
189
|
-
context?: RequestContext;
|
|
190
|
-
}
|
|
179
|
+
export interface DeleteMealplanTenderRequest extends BaseRequest, DeleteMealplanTenderPath {}
|
|
191
180
|
|
|
192
181
|
// PATCH /mealplan/{id}/tender/{tender} - Refund an amount to the tender balance
|
|
193
182
|
|
|
@@ -208,9 +197,8 @@ export interface PatchMealplanTenderBody {
|
|
|
208
197
|
|
|
209
198
|
export type PatchMealplanTenderResponse = Tender;
|
|
210
199
|
|
|
211
|
-
export interface PatchMealplanTenderRequest extends PatchMealplanTenderPath {
|
|
200
|
+
export interface PatchMealplanTenderRequest extends BaseRequest, PatchMealplanTenderPath {
|
|
212
201
|
body: PatchMealplanTenderBody;
|
|
213
|
-
context?: RequestContext;
|
|
214
202
|
}
|
|
215
203
|
|
|
216
204
|
// POST /mealplan/{id}/verify - Send verification email to user linking a mealplan
|
|
@@ -230,10 +218,10 @@ export type PostMealplanVerifyBody = VerifyEmail;
|
|
|
230
218
|
export type PostMealplanVerifyResponse = success;
|
|
231
219
|
|
|
232
220
|
export interface PostMealplanVerifyRequest
|
|
233
|
-
extends
|
|
221
|
+
extends BaseRequest,
|
|
222
|
+
RequestQuery<PostMealplanVerifyQuery>,
|
|
234
223
|
PostMealplanVerifyPath {
|
|
235
224
|
body: PostMealplanVerifyBody;
|
|
236
|
-
context?: RequestContext;
|
|
237
225
|
}
|
|
238
226
|
|
|
239
227
|
// PUT /mealplan/{id}/verify - Verify email address using provided payload
|
|
@@ -247,9 +235,8 @@ export type PutMealplanVerifyBody = string;
|
|
|
247
235
|
|
|
248
236
|
export type PutMealplanVerifyResponse = success;
|
|
249
237
|
|
|
250
|
-
export interface PutMealplanVerifyRequest extends PutMealplanVerifyPath {
|
|
238
|
+
export interface PutMealplanVerifyRequest extends BaseRequest, PutMealplanVerifyPath {
|
|
251
239
|
body: PutMealplanVerifyBody;
|
|
252
|
-
context?: RequestContext;
|
|
253
240
|
}
|
|
254
241
|
|
|
255
242
|
// POST /mealplan/{id}/authorize - Authorize Transaction
|
|
@@ -277,7 +264,6 @@ export interface PostMealplanAuthorizeResponse {
|
|
|
277
264
|
currency?: string;
|
|
278
265
|
}
|
|
279
266
|
|
|
280
|
-
export interface PostMealplanAuthorizeRequest extends PostMealplanAuthorizePath {
|
|
267
|
+
export interface PostMealplanAuthorizeRequest extends BaseRequest, PostMealplanAuthorizePath {
|
|
281
268
|
body: PostMealplanAuthorizeBody;
|
|
282
|
-
context?: RequestContext;
|
|
283
269
|
}
|