@compassdigital/sdk.typescript 4.528.0 → 4.528.1-alpha.3

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.
Files changed (50) hide show
  1. package/lib/index.d.ts +361 -7
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +434 -3
  4. package/lib/index.js.map +1 -1
  5. package/lib/interface/centricos.d.ts +9 -3
  6. package/lib/interface/centricos.d.ts.map +1 -1
  7. package/lib/interface/consumer.d.ts +36 -1
  8. package/lib/interface/consumer.d.ts.map +1 -1
  9. package/lib/interface/location.d.ts +0 -1
  10. package/lib/interface/location.d.ts.map +1 -1
  11. package/lib/interface/loyalty.d.ts +833 -0
  12. package/lib/interface/loyalty.d.ts.map +1 -0
  13. package/lib/interface/loyalty.js +5 -0
  14. package/lib/interface/loyalty.js.map +1 -0
  15. package/lib/interface/menu.d.ts +8 -0
  16. package/lib/interface/menu.d.ts.map +1 -1
  17. package/lib/interface/user.d.ts +20 -0
  18. package/lib/interface/user.d.ts.map +1 -1
  19. package/lib/messages/events/AuditEvent.d.ts +39 -0
  20. package/lib/messages/events/AuditEvent.d.ts.map +1 -0
  21. package/lib/messages/events/AuditEvent.js +4 -0
  22. package/lib/messages/events/AuditEvent.js.map +1 -0
  23. package/lib/messages/events/DiscountCreatedEvent.d.ts +1 -0
  24. package/lib/messages/events/DiscountCreatedEvent.d.ts.map +1 -1
  25. package/lib/messages/events/DiscountPublishedEvent.d.ts +1 -0
  26. package/lib/messages/events/DiscountPublishedEvent.d.ts.map +1 -1
  27. package/lib/messages/events/DiscountUpdatedEvent.d.ts +1 -0
  28. package/lib/messages/events/DiscountUpdatedEvent.d.ts.map +1 -1
  29. package/lib/messages/events/FrictionlessOrderFailureEvent.d.ts +23 -0
  30. package/lib/messages/events/FrictionlessOrderFailureEvent.d.ts.map +1 -0
  31. package/lib/messages/events/FrictionlessOrderFailureEvent.js +4 -0
  32. package/lib/messages/events/FrictionlessOrderFailureEvent.js.map +1 -0
  33. package/lib/messages/events/index.d.ts +2 -0
  34. package/lib/messages/events/index.d.ts.map +1 -1
  35. package/manifest.json +7 -0
  36. package/package.json +1 -1
  37. package/src/index.ts +1051 -7
  38. package/src/interface/centricos.ts +16 -6
  39. package/src/interface/consumer.ts +59 -1
  40. package/src/interface/location.ts +0 -1
  41. package/src/interface/loyalty.ts +1158 -0
  42. package/src/interface/menu.ts +8 -0
  43. package/src/interface/user.ts +27 -0
  44. package/src/messages/events/AuditEvent.ts +52 -0
  45. package/src/messages/events/DiscountCreatedEvent.ts +1 -0
  46. package/src/messages/events/DiscountPublishedEvent.ts +1 -0
  47. package/src/messages/events/DiscountUpdatedEvent.ts +1 -0
  48. package/src/messages/events/FrictionlessOrderFailureEvent.ts +34 -0
  49. package/src/messages/events/index.ts +4 -0
  50. package/test/client.test.ts +23 -0
@@ -409,6 +409,10 @@ export interface DeleteStationResponse {
409
409
  success: boolean;
410
410
  }
411
411
 
412
+ export interface DeleteStationIntegrationResponse {
413
+ success: boolean;
414
+ }
415
+
412
416
  export interface CentricDiscountChannelConfig {
413
417
  thrive: boolean;
414
418
  boost: boolean;
@@ -1343,6 +1347,16 @@ export interface PutCentricosStationIntegrationPath {
1343
1347
 
1344
1348
  export type PutCentricosStationIntegrationResponse = PutStationIntegrationResponse;
1345
1349
 
1350
+ // DELETE /centricos/station/{station_id}/{integration_type} - Delete station integration
1351
+
1352
+ export interface DeleteCentricosStationIntegrationPath {
1353
+ // TODO: cannot use CompassLongID as path parameter
1354
+ station_id: string;
1355
+ integration_type: string;
1356
+ }
1357
+
1358
+ export type DeleteCentricosStationIntegrationResponse = DeleteStationIntegrationResponse;
1359
+
1346
1360
  // PUT /centricos/discount/voucherify - Add or Update a voucherify discount and assign it to multiple sites
1347
1361
 
1348
1362
  export type PutCentricosDiscountVoucherifyBody = PutDiscountVoucherifyRequestDTO;
@@ -1504,15 +1518,11 @@ export type ListSwapsBody = SwapListRequestDto;
1504
1518
 
1505
1519
  export type ListSwapsResponse = SwapListResponseDto;
1506
1520
 
1507
- // GET /centricos/swaps/details - Get detailed information about a swap recommendation
1521
+ // GET /centricos/swaps/details/{recommendation_id} - Get detailed information about a swap recommendation
1508
1522
 
1509
- export interface GetSwapDetailsQuery {
1523
+ export interface GetSwapDetailsPath {
1510
1524
  // Unique swap recommendation ID
1511
1525
  recommendation_id: string;
1512
- // Centric item ID
1513
- item_id: string;
1514
- // Centric item POSID
1515
- pos_id: string;
1516
1526
  }
1517
1527
 
1518
1528
  export type GetSwapDetailsResponse = SwapDetailsResponseDto;
@@ -3513,6 +3513,35 @@ export interface ConsumerPostPaymentCashlessBody {
3513
3513
  token: string;
3514
3514
  }
3515
3515
 
3516
+ export interface ReviewDTO {
3517
+ taxonomy?: Record<string, any>;
3518
+ id: string;
3519
+ createdAt: string;
3520
+ updatedAt: string;
3521
+ score?: number;
3522
+ comment?: string;
3523
+ reason?: [];
3524
+ }
3525
+
3526
+ export interface GetReviewOrderItemsRequestDTO {
3527
+ reviews: ReviewDTO[];
3528
+ }
3529
+
3530
+ export interface PostConsumerShoppingCartBulkBodyRequest {
3531
+ // ids of the shopping carts to get
3532
+ ids: string[];
3533
+ }
3534
+
3535
+ export interface PostConsumerShoppingCartBulkResponse {
3536
+ // shopping carts
3537
+ shoppingCarts: PostConsumerShoppingCartResponse[];
3538
+ }
3539
+
3540
+ export interface ConsumerDeleteMealplanBody {
3541
+ // mealplan tenders to delete
3542
+ tenders?: string[];
3543
+ }
3544
+
3516
3545
  // GET /consumer/v1/health-check
3517
3546
 
3518
3547
  export type HealthCheckControllerExecuteResponse = {};
@@ -4016,6 +4045,17 @@ export type PutConsumerMealplanBody = ConsumerPutMealplanBody;
4016
4045
 
4017
4046
  export type PutConsumerMealplanResponse = ConsumerPutMealplanResponse;
4018
4047
 
4048
+ // DELETE /consumer/mealplan/{mealplanId} - delete mealplan
4049
+
4050
+ export interface DeleteMealplanConsumerPath {
4051
+ // Mealplan ID
4052
+ mealplanId: string;
4053
+ }
4054
+
4055
+ export type DeleteMealplanConsumerBody = ConsumerDeleteMealplanBody;
4056
+
4057
+ export type DeleteMealplanConsumerResponse = ConsumerGetMealplanResponse;
4058
+
4019
4059
  // POST /consumer/mealplan/{mealplanId}/verify - Send mealplan verification email
4020
4060
 
4021
4061
  export interface PostMealplanVerifyConsumerPath {
@@ -4152,7 +4192,7 @@ export interface PostConsumerShoppingcartClonePath {
4152
4192
 
4153
4193
  export type PostConsumerShoppingcartCloneBody = PostConsumerShoppingCartCloneBodyRequest;
4154
4194
 
4155
- export type PostConsumerShoppingcartCloneResponse = PostConsumerShoppingCartCloneBodyRequest;
4195
+ export type PostConsumerShoppingcartCloneResponse = PostConsumerShoppingCartResponse;
4156
4196
 
4157
4197
  // GET /consumer/location-brand/{id} - Get location brand
4158
4198
 
@@ -4234,3 +4274,21 @@ export type PostConsumerOpenaiChatResponse = OpenAiChatResponse;
4234
4274
  export type PostPaymentValidateMerchantBody$0 = PostPaymentValidateMerchantBody;
4235
4275
 
4236
4276
  export type PostPaymentValidateMerchantResponse$0 = PostPaymentValidateMerchantResponse;
4277
+
4278
+ // GET /consumer/review/order/{orderId} - Get reviews for order items
4279
+
4280
+ export interface GetConsumerReviewOrderItemsPath {
4281
+ orderId: string;
4282
+ }
4283
+
4284
+ export interface GetConsumerReviewOrderItemsQuery {
4285
+ cartItemIds: string[];
4286
+ }
4287
+
4288
+ export type GetConsumerReviewOrderItemsResponse = GetReviewOrderItemsRequestDTO;
4289
+
4290
+ // POST /consumer/shoppingcart/bulk - get multiple shopping carts
4291
+
4292
+ export type PostConsumerShoppingcartBulkBody = PostConsumerShoppingCartBulkBodyRequest;
4293
+
4294
+ export type PostConsumerShoppingcartBulkResponse = PostConsumerShoppingCartBulkResponse;
@@ -578,7 +578,6 @@ export interface PingResponse {
578
578
  export interface HealthResponse {
579
579
  status: 'healthy' | 'unhealthy';
580
580
  timestamp: string;
581
- version: string;
582
581
  dependencies: HealthDependency[];
583
582
  metadata: HealthMetadata;
584
583
  }