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