@compassdigital/sdk.typescript 4.528.1-beta.0 → 4.529.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 +44 -315
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +50 -376
- package/lib/index.js.map +1 -1
- package/lib/interface/centricos.d.ts +9 -3
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +36 -1
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/location.d.ts +0 -1
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +8 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/user.d.ts +20 -0
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/messages/events/AuditEvent.d.ts +39 -0
- package/lib/messages/events/AuditEvent.d.ts.map +1 -0
- package/lib/{interface/loyalty.js → messages/events/AuditEvent.js} +1 -2
- package/lib/messages/events/AuditEvent.js.map +1 -0
- package/lib/messages/events/DiscountCreatedEvent.d.ts +1 -0
- package/lib/messages/events/DiscountCreatedEvent.d.ts.map +1 -1
- package/lib/messages/events/DiscountPublishedEvent.d.ts +1 -0
- package/lib/messages/events/DiscountPublishedEvent.d.ts.map +1 -1
- package/lib/messages/events/DiscountUpdatedEvent.d.ts +1 -0
- package/lib/messages/events/DiscountUpdatedEvent.d.ts.map +1 -1
- package/lib/messages/events/FrictionlessOrderFailureEvent.d.ts +23 -0
- package/lib/messages/events/FrictionlessOrderFailureEvent.d.ts.map +1 -0
- package/lib/messages/events/FrictionlessOrderFailureEvent.js +4 -0
- package/lib/messages/events/FrictionlessOrderFailureEvent.js.map +1 -0
- package/lib/messages/events/index.d.ts +2 -0
- package/lib/messages/events/index.d.ts.map +1 -1
- package/manifest.json +0 -7
- package/package.json +1 -1
- package/src/index.ts +109 -921
- package/src/interface/centricos.ts +16 -6
- package/src/interface/consumer.ts +59 -1
- package/src/interface/location.ts +0 -1
- package/src/interface/menu.ts +8 -0
- package/src/interface/user.ts +27 -0
- package/src/messages/events/AuditEvent.ts +52 -0
- package/src/messages/events/DiscountCreatedEvent.ts +1 -0
- package/src/messages/events/DiscountPublishedEvent.ts +1 -0
- package/src/messages/events/DiscountUpdatedEvent.ts +1 -0
- package/src/messages/events/FrictionlessOrderFailureEvent.ts +34 -0
- package/src/messages/events/index.ts +4 -0
- package/lib/interface/loyalty.d.ts +0 -402
- package/lib/interface/loyalty.d.ts.map +0 -1
- package/lib/interface/loyalty.js.map +0 -1
- package/src/interface/loyalty.ts +0 -659
|
@@ -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
|
|
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 =
|
|
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;
|
package/src/interface/menu.ts
CHANGED
|
@@ -719,6 +719,7 @@ export interface LocalMenuGroupDTO {
|
|
|
719
719
|
show_v4?: boolean;
|
|
720
720
|
menuworks_unit_ids?: string[];
|
|
721
721
|
append_ingredients_nutrition_to_description?: boolean;
|
|
722
|
+
visibility?: Record<string, any>;
|
|
722
723
|
id: string;
|
|
723
724
|
created_at?: string;
|
|
724
725
|
updated_at?: string;
|
|
@@ -2738,6 +2739,7 @@ export interface PostMenuV3LocalMenuGroupBody {
|
|
|
2738
2739
|
show_v4?: boolean;
|
|
2739
2740
|
menuworks_unit_ids?: string[];
|
|
2740
2741
|
append_ingredients_nutrition_to_description?: boolean;
|
|
2742
|
+
visibility?: Record<string, any>;
|
|
2741
2743
|
vendor_metadata?: VendorMetadataDTO[];
|
|
2742
2744
|
permissions?: Record<string, any>;
|
|
2743
2745
|
[index: string]: any;
|
|
@@ -2753,6 +2755,7 @@ export interface PostMenuV3LocalMenuGroupResponse {
|
|
|
2753
2755
|
show_v4?: boolean;
|
|
2754
2756
|
menuworks_unit_ids?: string[];
|
|
2755
2757
|
append_ingredients_nutrition_to_description?: boolean;
|
|
2758
|
+
visibility?: Record<string, any>;
|
|
2756
2759
|
id: string;
|
|
2757
2760
|
created_at?: string;
|
|
2758
2761
|
updated_at?: string;
|
|
@@ -2794,6 +2797,7 @@ export interface GetMenuV3LocalMenuGroupResponse {
|
|
|
2794
2797
|
show_v4?: boolean;
|
|
2795
2798
|
menuworks_unit_ids?: string[];
|
|
2796
2799
|
append_ingredients_nutrition_to_description?: boolean;
|
|
2800
|
+
visibility?: Record<string, any>;
|
|
2797
2801
|
id: string;
|
|
2798
2802
|
created_at?: string;
|
|
2799
2803
|
updated_at?: string;
|
|
@@ -2825,6 +2829,7 @@ export interface PatchMenuV3LocalMenuGroupBody {
|
|
|
2825
2829
|
show_v4?: boolean;
|
|
2826
2830
|
menuworks_unit_ids?: string[];
|
|
2827
2831
|
append_ingredients_nutrition_to_description?: boolean;
|
|
2832
|
+
visibility?: Record<string, any>;
|
|
2828
2833
|
id?: string;
|
|
2829
2834
|
version?: number;
|
|
2830
2835
|
vendor_metadata?: VendorMetadataDTO[];
|
|
@@ -2842,6 +2847,7 @@ export interface PatchMenuV3LocalMenuGroupResponse {
|
|
|
2842
2847
|
show_v4?: boolean;
|
|
2843
2848
|
menuworks_unit_ids?: string[];
|
|
2844
2849
|
append_ingredients_nutrition_to_description?: boolean;
|
|
2850
|
+
visibility?: Record<string, any>;
|
|
2845
2851
|
id: string;
|
|
2846
2852
|
created_at?: string;
|
|
2847
2853
|
updated_at?: string;
|
|
@@ -2879,6 +2885,7 @@ export interface DeleteMenuV3LocalMenuGroupResponse {
|
|
|
2879
2885
|
show_v4?: boolean;
|
|
2880
2886
|
menuworks_unit_ids?: string[];
|
|
2881
2887
|
append_ingredients_nutrition_to_description?: boolean;
|
|
2888
|
+
visibility?: Record<string, any>;
|
|
2882
2889
|
id: string;
|
|
2883
2890
|
created_at?: string;
|
|
2884
2891
|
updated_at?: string;
|
|
@@ -2935,6 +2942,7 @@ export type PostMenuV3LocalMenuGroupsBody = {
|
|
|
2935
2942
|
show_v4?: boolean;
|
|
2936
2943
|
menuworks_unit_ids?: string[];
|
|
2937
2944
|
append_ingredients_nutrition_to_description?: boolean;
|
|
2945
|
+
visibility?: Record<string, any>;
|
|
2938
2946
|
vendor_metadata?: VendorMetadataDTO[];
|
|
2939
2947
|
permissions?: Record<string, any>;
|
|
2940
2948
|
[index: string]: any;
|
package/src/interface/user.ts
CHANGED
|
@@ -316,6 +316,27 @@ export interface PingResponse {
|
|
|
316
316
|
service?: string;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
+
export interface HealthResponse {
|
|
320
|
+
status: 'healthy' | 'unhealthy';
|
|
321
|
+
timestamp: string;
|
|
322
|
+
version: string;
|
|
323
|
+
dependencies: HealthDependency[];
|
|
324
|
+
metadata: HealthMetadata;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export interface HealthDependency {
|
|
328
|
+
name: string;
|
|
329
|
+
status: 'healthy' | 'unhealthy';
|
|
330
|
+
responseTimeMs: number;
|
|
331
|
+
// Error or status details when unhealthy, null when healthy
|
|
332
|
+
details?: string;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface HealthMetadata {
|
|
336
|
+
region: string;
|
|
337
|
+
service: string;
|
|
338
|
+
}
|
|
339
|
+
|
|
319
340
|
// GET /user/auth - Gets the JWT token for a user
|
|
320
341
|
|
|
321
342
|
export interface GetUserAuthQuery {
|
|
@@ -808,3 +829,9 @@ export interface GetUserProfileRequest extends BaseRequest, RequestQuery<GetUser
|
|
|
808
829
|
export type GetUserPingResponse = PingResponse;
|
|
809
830
|
|
|
810
831
|
export interface GetUserPingRequest extends BaseRequest {}
|
|
832
|
+
|
|
833
|
+
// GET /user/health - User Service health check with dependency validation
|
|
834
|
+
|
|
835
|
+
export type GetUserHealthResponse = HealthResponse;
|
|
836
|
+
|
|
837
|
+
export interface GetUserHealthRequest extends BaseRequest {}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
+
|
|
3
|
+
export interface AuditActor {
|
|
4
|
+
id: string;
|
|
5
|
+
display_name: string;
|
|
6
|
+
type: 'human' | 'service' | 'system';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface AuditEntityRef {
|
|
10
|
+
type: string;
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface AuditResource {
|
|
15
|
+
type: string;
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface AuditChanges {
|
|
21
|
+
// Sparse — only changed fields. For removed items, key present only here.
|
|
22
|
+
old?: Record<string, any>;
|
|
23
|
+
// Sparse — only changed fields. For added items, key present only here.
|
|
24
|
+
new?: Record<string, any>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface AuditEvent {
|
|
28
|
+
// UUID, producer-assigned. Stable across EventBridge retries — used for deduplication.
|
|
29
|
+
id: string;
|
|
30
|
+
type: 'AuditEvent';
|
|
31
|
+
version: '0.0.1';
|
|
32
|
+
// ISO 8601 — when the action occurred, not when emitted
|
|
33
|
+
timestamp: string;
|
|
34
|
+
traceContext: {
|
|
35
|
+
traceId: string;
|
|
36
|
+
};
|
|
37
|
+
payload: {
|
|
38
|
+
// e.g. calendar_created, calendar_updated, calendar_deleted
|
|
39
|
+
action: string;
|
|
40
|
+
actor: AuditActor;
|
|
41
|
+
outcome: 'success' | 'failure';
|
|
42
|
+
// Present when outcome is failure
|
|
43
|
+
error_message?: string;
|
|
44
|
+
// Primary entity plus known ancestors (e.g. calendar, brand, location)
|
|
45
|
+
entity_refs: AuditEntityRef[];
|
|
46
|
+
resource: AuditResource;
|
|
47
|
+
changes?: AuditChanges;
|
|
48
|
+
correlation_id?: string;
|
|
49
|
+
};
|
|
50
|
+
// Producer service name (e.g. calendar-service)
|
|
51
|
+
source: string;
|
|
52
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
+
|
|
3
|
+
export interface FrictionlessOrderFailureEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'FrictionlessOrderFailureEvent';
|
|
6
|
+
version: '0.0.1';
|
|
7
|
+
timestamp: string;
|
|
8
|
+
traceContext: {
|
|
9
|
+
traceId?: string;
|
|
10
|
+
};
|
|
11
|
+
payload: {
|
|
12
|
+
// The frictionless checkin identifier
|
|
13
|
+
checkinID: string;
|
|
14
|
+
// Shopping cart ID of the failed transaction
|
|
15
|
+
shoppingCartID: string;
|
|
16
|
+
// Order ID when available
|
|
17
|
+
orderID?: string;
|
|
18
|
+
// User ID of the failed transaction
|
|
19
|
+
userID: string;
|
|
20
|
+
// User email
|
|
21
|
+
userEmail: string;
|
|
22
|
+
// Meal plan ID when payment was mealplan
|
|
23
|
+
mealPlanID?: string;
|
|
24
|
+
// Site ID of the transaction
|
|
25
|
+
siteID: string;
|
|
26
|
+
// Brand ID of the transaction
|
|
27
|
+
brandID: string;
|
|
28
|
+
// Human-readable failure reason e.g. INSUFFICIENT_BALANCE, PAYMENT_DID_NOT_GO_THROUGH, PROCESSING_FAILED
|
|
29
|
+
failReason: string;
|
|
30
|
+
// Unpaid balance amount for insufficient balance failures
|
|
31
|
+
unpaidAmount: number;
|
|
32
|
+
};
|
|
33
|
+
source: string;
|
|
34
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
2
|
|
|
3
|
+
export { AuditEvent } from './AuditEvent';
|
|
4
|
+
|
|
3
5
|
export { DiscountCreatedEvent } from './DiscountCreatedEvent';
|
|
4
6
|
|
|
5
7
|
export { DiscountDeactivatedEvent } from './DiscountDeactivatedEvent';
|
|
@@ -16,6 +18,8 @@ export { ExternalRewardRedeemedEvent } from './ExternalRewardRedeemedEvent';
|
|
|
16
18
|
|
|
17
19
|
export { FakeEvent } from './FakeEvent';
|
|
18
20
|
|
|
21
|
+
export { FrictionlessOrderFailureEvent } from './FrictionlessOrderFailureEvent';
|
|
22
|
+
|
|
19
23
|
export { LocationBrandCreatedEvent } from './LocationBrandCreatedEvent';
|
|
20
24
|
|
|
21
25
|
export { LocationBrandUpdatedEvent } from './LocationBrandUpdatedEvent';
|