@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
package/src/index.ts
CHANGED
|
@@ -529,6 +529,43 @@ import {
|
|
|
529
529
|
DeletePermissionRoleUserResponse,
|
|
530
530
|
} from "./interface/permission";
|
|
531
531
|
|
|
532
|
+
import {
|
|
533
|
+
PostLoyaltyEnrollQuery,
|
|
534
|
+
PostLoyaltyEnrollResponse,
|
|
535
|
+
GetLoyaltyPointsQuery,
|
|
536
|
+
GetLoyaltyPointsResponse,
|
|
537
|
+
GetLoyaltyOffersResponse,
|
|
538
|
+
GetLoyaltyEnrollmentstatusResponse,
|
|
539
|
+
GetLoyaltyBalanceResponse,
|
|
540
|
+
GetLoyaltyOpportunitiesQuery,
|
|
541
|
+
GetLoyaltyOpportunitiesResponse,
|
|
542
|
+
PostLoyaltyOpportunitiesQuery,
|
|
543
|
+
PostLoyaltyOpportunitiesResponse,
|
|
544
|
+
GetLoyaltyRewardsResponse,
|
|
545
|
+
GetLoyaltyCouponsResponse,
|
|
546
|
+
GetLoyaltyOrderpointsQuery,
|
|
547
|
+
GetLoyaltyOrderpointsResponse,
|
|
548
|
+
PostLoyaltyOrderpointsBody,
|
|
549
|
+
PostLoyaltyOrderpointsResponse,
|
|
550
|
+
PostLoyaltyPurchaseQuery,
|
|
551
|
+
PostLoyaltyPurchaseBody,
|
|
552
|
+
PostLoyaltyPurchaseResponse,
|
|
553
|
+
PostLoyaltyBuyrewardQuery,
|
|
554
|
+
PostLoyaltyBuyrewardBody,
|
|
555
|
+
PostLoyaltyBuyrewardResponse,
|
|
556
|
+
GetLoyaltyHistoryQuery,
|
|
557
|
+
GetLoyaltyHistoryResponse,
|
|
558
|
+
GetLoyaltyCouponResponse,
|
|
559
|
+
PatchLoyaltyCouponBody,
|
|
560
|
+
PatchLoyaltyCouponResponse,
|
|
561
|
+
GetLoyaltySearchQuery,
|
|
562
|
+
GetLoyaltySearchResponse,
|
|
563
|
+
GetLoyaltyUsersQuery,
|
|
564
|
+
GetLoyaltyUsersResponse,
|
|
565
|
+
GetLoyaltyEventsQuery,
|
|
566
|
+
GetLoyaltyEventsResponse,
|
|
567
|
+
} from "./interface/loyalty";
|
|
568
|
+
|
|
532
569
|
import { BaseServiceClient, RequestOptions, ResponsePromise } from "./base";
|
|
533
570
|
export * from "./base";
|
|
534
571
|
|
|
@@ -5387,4 +5424,448 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
5387
5424
|
options
|
|
5388
5425
|
);
|
|
5389
5426
|
}
|
|
5427
|
+
|
|
5428
|
+
/**
|
|
5429
|
+
* POST /loyalty/{id}/enroll/{user_id} - Enroll logged in user in Loyalty program
|
|
5430
|
+
*
|
|
5431
|
+
* @param id - Loyalty Provider id
|
|
5432
|
+
* @param user_id - CompassDigital User id
|
|
5433
|
+
* @param options - additional request options
|
|
5434
|
+
*/
|
|
5435
|
+
post_loyalty_enroll(
|
|
5436
|
+
id: string,
|
|
5437
|
+
user_id: string,
|
|
5438
|
+
options?: {
|
|
5439
|
+
query?: PostLoyaltyEnrollQuery;
|
|
5440
|
+
} & RequestOptions
|
|
5441
|
+
): ResponsePromise<PostLoyaltyEnrollResponse> {
|
|
5442
|
+
return this.request(
|
|
5443
|
+
"loyalty",
|
|
5444
|
+
"post_loyalty_enroll",
|
|
5445
|
+
"post",
|
|
5446
|
+
`/loyalty/${id}/enroll/${user_id}`,
|
|
5447
|
+
null,
|
|
5448
|
+
options
|
|
5449
|
+
);
|
|
5450
|
+
}
|
|
5451
|
+
|
|
5452
|
+
/**
|
|
5453
|
+
* GET /loyalty/{id}/points - Get potential points user could earn from certain event in Loyalty program
|
|
5454
|
+
*
|
|
5455
|
+
* @param id - Loyalty Provider id
|
|
5456
|
+
* @param options - additional request options
|
|
5457
|
+
*/
|
|
5458
|
+
get_loyalty_points(
|
|
5459
|
+
id: string,
|
|
5460
|
+
options: {
|
|
5461
|
+
query: GetLoyaltyPointsQuery;
|
|
5462
|
+
} & RequestOptions
|
|
5463
|
+
): ResponsePromise<GetLoyaltyPointsResponse> {
|
|
5464
|
+
return this.request(
|
|
5465
|
+
"loyalty",
|
|
5466
|
+
"get_loyalty_points",
|
|
5467
|
+
"get",
|
|
5468
|
+
`/loyalty/${id}/points`,
|
|
5469
|
+
null,
|
|
5470
|
+
options
|
|
5471
|
+
);
|
|
5472
|
+
}
|
|
5473
|
+
|
|
5474
|
+
/**
|
|
5475
|
+
* GET /loyalty/{id}/offers/{user_id} - Get offers for the logged in user
|
|
5476
|
+
*
|
|
5477
|
+
* @param id - Loyalty Provider id
|
|
5478
|
+
* @param user_id - CompassDigital User id
|
|
5479
|
+
* @param options - additional request options
|
|
5480
|
+
*/
|
|
5481
|
+
get_loyalty_offers(
|
|
5482
|
+
id: string,
|
|
5483
|
+
user_id: string,
|
|
5484
|
+
options?: RequestOptions
|
|
5485
|
+
): ResponsePromise<GetLoyaltyOffersResponse> {
|
|
5486
|
+
return this.request(
|
|
5487
|
+
"loyalty",
|
|
5488
|
+
"get_loyalty_offers",
|
|
5489
|
+
"get",
|
|
5490
|
+
`/loyalty/${id}/offers/${user_id}`,
|
|
5491
|
+
null,
|
|
5492
|
+
options
|
|
5493
|
+
);
|
|
5494
|
+
}
|
|
5495
|
+
|
|
5496
|
+
/**
|
|
5497
|
+
* GET /loyalty/{id}/enrollmentstatus/{user_id} - Get enrollment status for logged in user
|
|
5498
|
+
*
|
|
5499
|
+
* @param id - Loyalty Provider id
|
|
5500
|
+
* @param user_id - CompassDigital User id
|
|
5501
|
+
* @param options - additional request options
|
|
5502
|
+
*/
|
|
5503
|
+
get_loyalty_enrollmentstatus(
|
|
5504
|
+
id: string,
|
|
5505
|
+
user_id: string,
|
|
5506
|
+
options?: RequestOptions
|
|
5507
|
+
): ResponsePromise<GetLoyaltyEnrollmentstatusResponse> {
|
|
5508
|
+
return this.request(
|
|
5509
|
+
"loyalty",
|
|
5510
|
+
"get_loyalty_enrollmentstatus",
|
|
5511
|
+
"get",
|
|
5512
|
+
`/loyalty/${id}/enrollmentstatus/${user_id}`,
|
|
5513
|
+
null,
|
|
5514
|
+
options
|
|
5515
|
+
);
|
|
5516
|
+
}
|
|
5517
|
+
|
|
5518
|
+
/**
|
|
5519
|
+
* GET /loyalty/{id}/balance/{user_id} - Get loyalty point balance for logged in user
|
|
5520
|
+
*
|
|
5521
|
+
* @param id - Loyalty Provider id
|
|
5522
|
+
* @param user_id - CompassDigital User id
|
|
5523
|
+
* @param options - additional request options
|
|
5524
|
+
*/
|
|
5525
|
+
get_loyalty_balance(
|
|
5526
|
+
id: string,
|
|
5527
|
+
user_id: string,
|
|
5528
|
+
options?: RequestOptions
|
|
5529
|
+
): ResponsePromise<GetLoyaltyBalanceResponse> {
|
|
5530
|
+
return this.request(
|
|
5531
|
+
"loyalty",
|
|
5532
|
+
"get_loyalty_balance",
|
|
5533
|
+
"get",
|
|
5534
|
+
`/loyalty/${id}/balance/${user_id}`,
|
|
5535
|
+
null,
|
|
5536
|
+
options
|
|
5537
|
+
);
|
|
5538
|
+
}
|
|
5539
|
+
|
|
5540
|
+
/**
|
|
5541
|
+
* GET /loyalty/{id}/opportunities/{user_id} - Get earning opportunities for the logged in user
|
|
5542
|
+
*
|
|
5543
|
+
* @param id - Loyalty Provider id
|
|
5544
|
+
* @param user_id - CompassDigital User id
|
|
5545
|
+
* @param options - additional request options
|
|
5546
|
+
*/
|
|
5547
|
+
get_loyalty_opportunities(
|
|
5548
|
+
id: string,
|
|
5549
|
+
user_id: string,
|
|
5550
|
+
options?: {
|
|
5551
|
+
query?: GetLoyaltyOpportunitiesQuery;
|
|
5552
|
+
} & RequestOptions
|
|
5553
|
+
): ResponsePromise<GetLoyaltyOpportunitiesResponse> {
|
|
5554
|
+
return this.request(
|
|
5555
|
+
"loyalty",
|
|
5556
|
+
"get_loyalty_opportunities",
|
|
5557
|
+
"get",
|
|
5558
|
+
`/loyalty/${id}/opportunities/${user_id}`,
|
|
5559
|
+
null,
|
|
5560
|
+
options
|
|
5561
|
+
);
|
|
5562
|
+
}
|
|
5563
|
+
|
|
5564
|
+
/**
|
|
5565
|
+
* POST /loyalty/{id}/opportunities/{user_id} - Record an event for the logged in user
|
|
5566
|
+
*
|
|
5567
|
+
* @param id - Loyalty Provider id
|
|
5568
|
+
* @param user_id - CompassDigital User id
|
|
5569
|
+
* @param options - additional request options
|
|
5570
|
+
*/
|
|
5571
|
+
post_loyalty_opportunities(
|
|
5572
|
+
id: string,
|
|
5573
|
+
user_id: string,
|
|
5574
|
+
options: {
|
|
5575
|
+
query: PostLoyaltyOpportunitiesQuery;
|
|
5576
|
+
} & RequestOptions
|
|
5577
|
+
): ResponsePromise<PostLoyaltyOpportunitiesResponse> {
|
|
5578
|
+
return this.request(
|
|
5579
|
+
"loyalty",
|
|
5580
|
+
"post_loyalty_opportunities",
|
|
5581
|
+
"post",
|
|
5582
|
+
`/loyalty/${id}/opportunities/${user_id}`,
|
|
5583
|
+
null,
|
|
5584
|
+
options
|
|
5585
|
+
);
|
|
5586
|
+
}
|
|
5587
|
+
|
|
5588
|
+
/**
|
|
5589
|
+
* GET /loyalty/{id}/rewards/{user_id} - Get rewards available for the logged in user
|
|
5590
|
+
*
|
|
5591
|
+
* @param id - Loyalty Provider id
|
|
5592
|
+
* @param user_id - CompassDigital User id
|
|
5593
|
+
* @param options - additional request options
|
|
5594
|
+
*/
|
|
5595
|
+
get_loyalty_rewards(
|
|
5596
|
+
id: string,
|
|
5597
|
+
user_id: string,
|
|
5598
|
+
options?: RequestOptions
|
|
5599
|
+
): ResponsePromise<GetLoyaltyRewardsResponse> {
|
|
5600
|
+
return this.request(
|
|
5601
|
+
"loyalty",
|
|
5602
|
+
"get_loyalty_rewards",
|
|
5603
|
+
"get",
|
|
5604
|
+
`/loyalty/${id}/rewards/${user_id}`,
|
|
5605
|
+
null,
|
|
5606
|
+
options
|
|
5607
|
+
);
|
|
5608
|
+
}
|
|
5609
|
+
|
|
5610
|
+
/**
|
|
5611
|
+
* GET /loyalty/{id}/coupons/{user_id} - Get coupons available for the logged in user
|
|
5612
|
+
*
|
|
5613
|
+
* @param id - Loyalty Provider id
|
|
5614
|
+
* @param user_id - CompassDigital User id
|
|
5615
|
+
* @param options - additional request options
|
|
5616
|
+
*/
|
|
5617
|
+
get_loyalty_coupons(
|
|
5618
|
+
id: string,
|
|
5619
|
+
user_id: string,
|
|
5620
|
+
options?: RequestOptions
|
|
5621
|
+
): ResponsePromise<GetLoyaltyCouponsResponse> {
|
|
5622
|
+
return this.request(
|
|
5623
|
+
"loyalty",
|
|
5624
|
+
"get_loyalty_coupons",
|
|
5625
|
+
"get",
|
|
5626
|
+
`/loyalty/${id}/coupons/${user_id}`,
|
|
5627
|
+
null,
|
|
5628
|
+
options
|
|
5629
|
+
);
|
|
5630
|
+
}
|
|
5631
|
+
|
|
5632
|
+
/**
|
|
5633
|
+
* GET /loyalty/{id}/orderpoints/{user_id} - Get potential loyalty point points for an order based on amount.
|
|
5634
|
+
*
|
|
5635
|
+
* @param id - Loyalty Provider id
|
|
5636
|
+
* @param user_id - CompassDigital User id
|
|
5637
|
+
* @param options - additional request options
|
|
5638
|
+
*/
|
|
5639
|
+
get_loyalty_orderpoints(
|
|
5640
|
+
id: string,
|
|
5641
|
+
user_id: string,
|
|
5642
|
+
options: {
|
|
5643
|
+
query: GetLoyaltyOrderpointsQuery;
|
|
5644
|
+
} & RequestOptions
|
|
5645
|
+
): ResponsePromise<GetLoyaltyOrderpointsResponse> {
|
|
5646
|
+
return this.request(
|
|
5647
|
+
"loyalty",
|
|
5648
|
+
"get_loyalty_orderpoints",
|
|
5649
|
+
"get",
|
|
5650
|
+
`/loyalty/${id}/orderpoints/${user_id}`,
|
|
5651
|
+
null,
|
|
5652
|
+
options
|
|
5653
|
+
);
|
|
5654
|
+
}
|
|
5655
|
+
|
|
5656
|
+
/**
|
|
5657
|
+
* POST /loyalty/{id}/orderpoints/{user_id} - Get potential loyalty point points for a order based on amount and items
|
|
5658
|
+
*
|
|
5659
|
+
* @param id - Loyalty Provider id
|
|
5660
|
+
* @param user_id - CompassDigital User id
|
|
5661
|
+
* @param body
|
|
5662
|
+
* @param options - additional request options
|
|
5663
|
+
*/
|
|
5664
|
+
post_loyalty_orderpoints(
|
|
5665
|
+
id: string,
|
|
5666
|
+
user_id: string,
|
|
5667
|
+
body: PostLoyaltyOrderpointsBody,
|
|
5668
|
+
options?: RequestOptions
|
|
5669
|
+
): ResponsePromise<PostLoyaltyOrderpointsResponse> {
|
|
5670
|
+
return this.request(
|
|
5671
|
+
"loyalty",
|
|
5672
|
+
"post_loyalty_orderpoints",
|
|
5673
|
+
"post",
|
|
5674
|
+
`/loyalty/${id}/orderpoints/${user_id}`,
|
|
5675
|
+
body,
|
|
5676
|
+
options
|
|
5677
|
+
);
|
|
5678
|
+
}
|
|
5679
|
+
|
|
5680
|
+
/**
|
|
5681
|
+
* POST /loyalty/{id}/purchase/{user_id} - Record purchase event
|
|
5682
|
+
*
|
|
5683
|
+
* @param id - Loyalty Provider id
|
|
5684
|
+
* @param user_id - CompassDigital User id
|
|
5685
|
+
* @param body
|
|
5686
|
+
* @param options - additional request options
|
|
5687
|
+
*/
|
|
5688
|
+
post_loyalty_purchase(
|
|
5689
|
+
id: string,
|
|
5690
|
+
user_id: string,
|
|
5691
|
+
body: PostLoyaltyPurchaseBody,
|
|
5692
|
+
options?: {
|
|
5693
|
+
query?: PostLoyaltyPurchaseQuery;
|
|
5694
|
+
} & RequestOptions
|
|
5695
|
+
): ResponsePromise<PostLoyaltyPurchaseResponse> {
|
|
5696
|
+
return this.request(
|
|
5697
|
+
"loyalty",
|
|
5698
|
+
"post_loyalty_purchase",
|
|
5699
|
+
"post",
|
|
5700
|
+
`/loyalty/${id}/purchase/${user_id}`,
|
|
5701
|
+
body,
|
|
5702
|
+
options
|
|
5703
|
+
);
|
|
5704
|
+
}
|
|
5705
|
+
|
|
5706
|
+
/**
|
|
5707
|
+
* POST /loyalty/{id}/buyreward/{user_id} - Redeem rewards to coupons
|
|
5708
|
+
*
|
|
5709
|
+
* @param id - Loyalty Provider id
|
|
5710
|
+
* @param user_id - CompassDigital User id
|
|
5711
|
+
* @param body
|
|
5712
|
+
* @param options - additional request options
|
|
5713
|
+
*/
|
|
5714
|
+
post_loyalty_buyreward(
|
|
5715
|
+
id: string,
|
|
5716
|
+
user_id: string,
|
|
5717
|
+
body: PostLoyaltyBuyrewardBody,
|
|
5718
|
+
options?: {
|
|
5719
|
+
query?: PostLoyaltyBuyrewardQuery;
|
|
5720
|
+
} & RequestOptions
|
|
5721
|
+
): ResponsePromise<PostLoyaltyBuyrewardResponse> {
|
|
5722
|
+
return this.request(
|
|
5723
|
+
"loyalty",
|
|
5724
|
+
"post_loyalty_buyreward",
|
|
5725
|
+
"post",
|
|
5726
|
+
`/loyalty/${id}/buyreward/${user_id}`,
|
|
5727
|
+
body,
|
|
5728
|
+
options
|
|
5729
|
+
);
|
|
5730
|
+
}
|
|
5731
|
+
|
|
5732
|
+
/**
|
|
5733
|
+
* GET /loyalty/{id}/history/{user_id} - Get history of loyalty transactions for user
|
|
5734
|
+
*
|
|
5735
|
+
* @param id - Loyalty Provider id
|
|
5736
|
+
* @param user_id - CompassDigital User id
|
|
5737
|
+
* @param options - additional request options
|
|
5738
|
+
*/
|
|
5739
|
+
get_loyalty_history(
|
|
5740
|
+
id: string,
|
|
5741
|
+
user_id: string,
|
|
5742
|
+
options?: {
|
|
5743
|
+
query?: GetLoyaltyHistoryQuery;
|
|
5744
|
+
} & RequestOptions
|
|
5745
|
+
): ResponsePromise<GetLoyaltyHistoryResponse> {
|
|
5746
|
+
return this.request(
|
|
5747
|
+
"loyalty",
|
|
5748
|
+
"get_loyalty_history",
|
|
5749
|
+
"get",
|
|
5750
|
+
`/loyalty/${id}/history/${user_id}`,
|
|
5751
|
+
null,
|
|
5752
|
+
options
|
|
5753
|
+
);
|
|
5754
|
+
}
|
|
5755
|
+
|
|
5756
|
+
/**
|
|
5757
|
+
* GET /loyalty/{id}/coupon/{user_id}/{coupon_id} - get coupon's information
|
|
5758
|
+
*
|
|
5759
|
+
* @param id - Loyalty Provider id
|
|
5760
|
+
* @param user_id - CompassDigital User id
|
|
5761
|
+
* @param coupon_id - Coupon code to get coupon information
|
|
5762
|
+
* @param options - additional request options
|
|
5763
|
+
*/
|
|
5764
|
+
get_loyalty_coupon(
|
|
5765
|
+
id: string,
|
|
5766
|
+
user_id: string,
|
|
5767
|
+
coupon_id: string,
|
|
5768
|
+
options?: RequestOptions
|
|
5769
|
+
): ResponsePromise<GetLoyaltyCouponResponse> {
|
|
5770
|
+
return this.request(
|
|
5771
|
+
"loyalty",
|
|
5772
|
+
"get_loyalty_coupon",
|
|
5773
|
+
"get",
|
|
5774
|
+
`/loyalty/${id}/coupon/${user_id}/${coupon_id}`,
|
|
5775
|
+
null,
|
|
5776
|
+
options
|
|
5777
|
+
);
|
|
5778
|
+
}
|
|
5779
|
+
|
|
5780
|
+
/**
|
|
5781
|
+
* PATCH /loyalty/{id}/coupon/{user_id}/{coupon_id} - Update coupon's status
|
|
5782
|
+
*
|
|
5783
|
+
* @param id - Loyalty Provider id
|
|
5784
|
+
* @param user_id - CompassDigital User id
|
|
5785
|
+
* @param coupon_id - Coupon code to update
|
|
5786
|
+
* @param body
|
|
5787
|
+
* @param options - additional request options
|
|
5788
|
+
*/
|
|
5789
|
+
patch_loyalty_coupon(
|
|
5790
|
+
id: string,
|
|
5791
|
+
user_id: string,
|
|
5792
|
+
coupon_id: string,
|
|
5793
|
+
body: PatchLoyaltyCouponBody,
|
|
5794
|
+
options?: RequestOptions
|
|
5795
|
+
): ResponsePromise<PatchLoyaltyCouponResponse> {
|
|
5796
|
+
return this.request(
|
|
5797
|
+
"loyalty",
|
|
5798
|
+
"patch_loyalty_coupon",
|
|
5799
|
+
"patch",
|
|
5800
|
+
`/loyalty/${id}/coupon/${user_id}/${coupon_id}`,
|
|
5801
|
+
body,
|
|
5802
|
+
options
|
|
5803
|
+
);
|
|
5804
|
+
}
|
|
5805
|
+
|
|
5806
|
+
/**
|
|
5807
|
+
* GET /loyalty/{id}/search - Search CDL user id by internal 500friends id
|
|
5808
|
+
*
|
|
5809
|
+
* @param id - Loyalty Provider id
|
|
5810
|
+
* @param options - additional request options
|
|
5811
|
+
*/
|
|
5812
|
+
get_loyalty_search(
|
|
5813
|
+
id: string,
|
|
5814
|
+
options: {
|
|
5815
|
+
query: GetLoyaltySearchQuery;
|
|
5816
|
+
} & RequestOptions
|
|
5817
|
+
): ResponsePromise<GetLoyaltySearchResponse> {
|
|
5818
|
+
return this.request(
|
|
5819
|
+
"loyalty",
|
|
5820
|
+
"get_loyalty_search",
|
|
5821
|
+
"get",
|
|
5822
|
+
`/loyalty/${id}/search`,
|
|
5823
|
+
null,
|
|
5824
|
+
options
|
|
5825
|
+
);
|
|
5826
|
+
}
|
|
5827
|
+
|
|
5828
|
+
/**
|
|
5829
|
+
* GET /loyalty/{id}/users - Get all loyalty users updated after specific date
|
|
5830
|
+
*
|
|
5831
|
+
* @param id - Loyalty Provider id
|
|
5832
|
+
* @param options - additional request options
|
|
5833
|
+
*/
|
|
5834
|
+
get_loyalty_users(
|
|
5835
|
+
id: string,
|
|
5836
|
+
options: {
|
|
5837
|
+
query: GetLoyaltyUsersQuery;
|
|
5838
|
+
} & RequestOptions
|
|
5839
|
+
): ResponsePromise<GetLoyaltyUsersResponse> {
|
|
5840
|
+
return this.request(
|
|
5841
|
+
"loyalty",
|
|
5842
|
+
"get_loyalty_users",
|
|
5843
|
+
"get",
|
|
5844
|
+
`/loyalty/${id}/users`,
|
|
5845
|
+
null,
|
|
5846
|
+
options
|
|
5847
|
+
);
|
|
5848
|
+
}
|
|
5849
|
+
|
|
5850
|
+
/**
|
|
5851
|
+
* GET /loyalty/{id}/events - Get all loyalty events updated after specific date
|
|
5852
|
+
*
|
|
5853
|
+
* @param id - Loyalty Provider id
|
|
5854
|
+
* @param options - additional request options
|
|
5855
|
+
*/
|
|
5856
|
+
get_loyalty_events(
|
|
5857
|
+
id: string,
|
|
5858
|
+
options: {
|
|
5859
|
+
query: GetLoyaltyEventsQuery;
|
|
5860
|
+
} & RequestOptions
|
|
5861
|
+
): ResponsePromise<GetLoyaltyEventsResponse> {
|
|
5862
|
+
return this.request(
|
|
5863
|
+
"loyalty",
|
|
5864
|
+
"get_loyalty_events",
|
|
5865
|
+
"get",
|
|
5866
|
+
`/loyalty/${id}/events`,
|
|
5867
|
+
null,
|
|
5868
|
+
options
|
|
5869
|
+
);
|
|
5870
|
+
}
|
|
5390
5871
|
}
|
|
@@ -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;
|
|
@@ -53,9 +53,8 @@ export type PostAnnouncementBody = Announcement;
|
|
|
53
53
|
|
|
54
54
|
export type PostAnnouncementResponse = Announcement;
|
|
55
55
|
|
|
56
|
-
export interface PostAnnouncementRequest {
|
|
56
|
+
export interface PostAnnouncementRequest extends BaseRequest {
|
|
57
57
|
body: PostAnnouncementBody;
|
|
58
|
-
context?: RequestContext;
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
// GET /announcement/resource/{id} - Get Announcements
|
|
@@ -74,10 +73,9 @@ export interface GetAnnouncementResourceQuery {
|
|
|
74
73
|
export type GetAnnouncementResourceResponse = Announcements;
|
|
75
74
|
|
|
76
75
|
export interface GetAnnouncementResourceRequest
|
|
77
|
-
extends
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
76
|
+
extends BaseRequest,
|
|
77
|
+
RequestQuery<GetAnnouncementResourceQuery>,
|
|
78
|
+
GetAnnouncementResourcePath {}
|
|
81
79
|
|
|
82
80
|
// GET /announcement/resource - Get Announcements
|
|
83
81
|
|
|
@@ -88,9 +86,8 @@ export interface GetAnnouncementResourcesQuery {
|
|
|
88
86
|
export type GetAnnouncementResourcesResponse = Announcements;
|
|
89
87
|
|
|
90
88
|
export interface GetAnnouncementResourcesRequest
|
|
91
|
-
extends
|
|
92
|
-
|
|
93
|
-
}
|
|
89
|
+
extends BaseRequest,
|
|
90
|
+
RequestQuery<GetAnnouncementResourcesQuery> {}
|
|
94
91
|
|
|
95
92
|
// GET /announcement/{id} - Get Announcement
|
|
96
93
|
|
|
@@ -101,9 +98,7 @@ export interface GetAnnouncementPath {
|
|
|
101
98
|
|
|
102
99
|
export type GetAnnouncementResponse = Announcement;
|
|
103
100
|
|
|
104
|
-
export interface GetAnnouncementRequest extends GetAnnouncementPath {
|
|
105
|
-
context?: RequestContext;
|
|
106
|
-
}
|
|
101
|
+
export interface GetAnnouncementRequest extends BaseRequest, GetAnnouncementPath {}
|
|
107
102
|
|
|
108
103
|
// PUT /announcement/{id} - Update Announcement
|
|
109
104
|
|
|
@@ -116,9 +111,8 @@ export type PutAnnouncementBody = Announcement;
|
|
|
116
111
|
|
|
117
112
|
export type PutAnnouncementResponse = Announcement;
|
|
118
113
|
|
|
119
|
-
export interface PutAnnouncementRequest extends PutAnnouncementPath {
|
|
114
|
+
export interface PutAnnouncementRequest extends BaseRequest, PutAnnouncementPath {
|
|
120
115
|
body: PutAnnouncementBody;
|
|
121
|
-
context?: RequestContext;
|
|
122
116
|
}
|
|
123
117
|
|
|
124
118
|
// DELETE /announcement/{id} - Delete announcement item
|
|
@@ -130,6 +124,4 @@ export interface DeleteAnnouncementPath {
|
|
|
130
124
|
|
|
131
125
|
export type DeleteAnnouncementResponse = Success;
|
|
132
126
|
|
|
133
|
-
export interface DeleteAnnouncementRequest extends DeleteAnnouncementPath {
|
|
134
|
-
context?: RequestContext;
|
|
135
|
-
}
|
|
127
|
+
export interface DeleteAnnouncementRequest extends BaseRequest, DeleteAnnouncementPath {}
|
|
@@ -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
|
message?: string;
|
|
@@ -73,9 +73,10 @@ export interface GetCalendarQuery {
|
|
|
73
73
|
|
|
74
74
|
export type GetCalendarResponse = Calendar;
|
|
75
75
|
|
|
76
|
-
export interface GetCalendarRequest
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
export interface GetCalendarRequest
|
|
77
|
+
extends BaseRequest,
|
|
78
|
+
RequestQuery<GetCalendarQuery>,
|
|
79
|
+
GetCalendarPath {}
|
|
79
80
|
|
|
80
81
|
// PUT /calendar/{id} - Set the calendar for an id. Overrides previous record
|
|
81
82
|
|
|
@@ -88,9 +89,8 @@ export type PutCalendarBody = UpdatedCalendar;
|
|
|
88
89
|
|
|
89
90
|
export type PutCalendarResponse = Calendar;
|
|
90
91
|
|
|
91
|
-
export interface PutCalendarRequest extends PutCalendarPath {
|
|
92
|
+
export interface PutCalendarRequest extends BaseRequest, PutCalendarPath {
|
|
92
93
|
body: PutCalendarBody;
|
|
93
|
-
context?: RequestContext;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
// DELETE /calendar/{id} - Delete a calendar.
|
|
@@ -102,9 +102,7 @@ export interface DeleteCalendarPath {
|
|
|
102
102
|
|
|
103
103
|
export type DeleteCalendarResponse = Success;
|
|
104
104
|
|
|
105
|
-
export interface DeleteCalendarRequest extends DeleteCalendarPath {
|
|
106
|
-
context?: RequestContext;
|
|
107
|
-
}
|
|
105
|
+
export interface DeleteCalendarRequest extends BaseRequest, DeleteCalendarPath {}
|
|
108
106
|
|
|
109
107
|
// GET /calendar/{id}/cdl - Get the calendar events in a CDL compatible format for next 7 days
|
|
110
108
|
|
|
@@ -121,10 +119,9 @@ export interface GetCalendarCdlQuery {
|
|
|
121
119
|
export type GetCalendarCdlResponse = CDLCalendar;
|
|
122
120
|
|
|
123
121
|
export interface GetCalendarCdlRequest
|
|
124
|
-
extends
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
122
|
+
extends BaseRequest,
|
|
123
|
+
RequestQuery<GetCalendarCdlQuery>,
|
|
124
|
+
GetCalendarCdlPath {}
|
|
128
125
|
|
|
129
126
|
// GET /calendar/swagger.json
|
|
130
127
|
|
|
@@ -132,9 +129,7 @@ export interface GetCalendarSwaggerResponse {
|
|
|
132
129
|
[index: string]: any;
|
|
133
130
|
}
|
|
134
131
|
|
|
135
|
-
export interface GetCalendarSwaggerRequest {
|
|
136
|
-
context?: RequestContext;
|
|
137
|
-
}
|
|
132
|
+
export interface GetCalendarSwaggerRequest extends BaseRequest {}
|
|
138
133
|
|
|
139
134
|
// POST /calendar/{id}/sync - Trigger synchronization of calendar to location API
|
|
140
135
|
|
|
@@ -145,6 +140,4 @@ export interface PostCalendarSyncPath {
|
|
|
145
140
|
|
|
146
141
|
export type PostCalendarSyncResponse = Success;
|
|
147
142
|
|
|
148
|
-
export interface PostCalendarSyncRequest extends PostCalendarSyncPath {
|
|
149
|
-
context?: RequestContext;
|
|
150
|
-
}
|
|
143
|
+
export interface PostCalendarSyncRequest extends BaseRequest, PostCalendarSyncPath {}
|
|
@@ -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 OMSRequest {
|
|
6
6
|
code: string;
|
|
@@ -50,6 +50,5 @@ export interface GetCompassconnectOmsTokenQuery {
|
|
|
50
50
|
export type GetCompassconnectOmsTokenResponse = Auth;
|
|
51
51
|
|
|
52
52
|
export interface GetCompassconnectOmsTokenRequest
|
|
53
|
-
extends
|
|
54
|
-
|
|
55
|
-
}
|
|
53
|
+
extends BaseRequest,
|
|
54
|
+
RequestQuery<GetCompassconnectOmsTokenQuery> {}
|