@compassdigital/sdk.typescript 4.964.0 → 4.966.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.
@@ -33,8 +33,21 @@ export interface Success {
33
33
  }
34
34
 
35
35
  export interface AppConfig {
36
- min?: string;
37
- url?: string;
36
+ // The oldest version of the app a user may run, as `major.minor.patch` (e.g. `8.71.0`).
37
+ min: string;
38
+ // Where the user updates the app: an app store link or a store deep link such as `itms-apps://`.
39
+ url: string;
40
+ }
41
+
42
+ export interface AppConfigs {
43
+ ios?: PlatformAppConfigs;
44
+ android?: PlatformAppConfigs;
45
+ }
46
+
47
+ export interface PlatformAppConfigs {
48
+ boost?: AppConfig;
49
+ thrive?: AppConfig;
50
+ jjkitchen?: AppConfig;
38
51
  }
39
52
 
40
53
  export interface PublicMealplanConfig {
@@ -636,6 +649,22 @@ export type GetConfigAppconfigResponse = AppConfig;
636
649
 
637
650
  export interface GetConfigAppconfigRequest extends BaseRequest {}
638
651
 
652
+ // GET /config/appconfigs - Get the minimum app versions and app store links for every platform and app
653
+
654
+ export type GetConfigAppconfigsResponse = AppConfigs;
655
+
656
+ export interface GetConfigAppconfigsRequest extends BaseRequest {}
657
+
658
+ // PATCH /config/appconfigs - Update the minimum app versions and app store links of the apps sent
659
+
660
+ export type PatchConfigAppconfigsBody = AppConfigs;
661
+
662
+ export type PatchConfigAppconfigsResponse = AppConfigs;
663
+
664
+ export interface PatchConfigAppconfigsRequest extends BaseRequest {
665
+ body: PatchConfigAppconfigsBody;
666
+ }
667
+
639
668
  // GET /config/app-clients - Get the per-client exclusive access settings
640
669
 
641
670
  export type GetConfigAppClientsResponse = AppClientsConfig;
@@ -648,102 +648,6 @@ export interface VoucherOperationResponseDto {
648
648
  voucher?: VoucherRedemptionVoucherDto;
649
649
  }
650
650
 
651
- export interface SegmentRuleDto {
652
- // Attribute key to evaluate (e.g. points_balance, enrollment_date)
653
- attribute: string;
654
- // Operator key (eq, neq, gt, gte, lt, lte)
655
- operator: string;
656
- // Value to compare against
657
- value: string;
658
- }
659
-
660
- export interface SegmentResponseDto {
661
- id: string;
662
- createdAt: string;
663
- updatedAt: string;
664
- deletedAt?: string | null;
665
- createdBy: string;
666
- // Sector the segment is scoped to (location-service sector name, e.g. Eurest)
667
- sector: string;
668
- country: 'CA' | 'US';
669
- name: string;
670
- description?: string | null;
671
- type: 'static_list' | 'attribute_rule';
672
- ownership: 'system' | 'custom';
673
- editable: boolean;
674
- deletable: boolean;
675
- ruleJson?: SegmentRuleDto;
676
- memberCount?: number;
677
- }
678
-
679
- export interface SegmentPaginationDto {
680
- cursor?: string | null;
681
- hasMore: boolean;
682
- limit: number;
683
- }
684
-
685
- export interface SegmentListResponseDto {
686
- data: SegmentResponseDto[];
687
- pagination: SegmentPaginationDto;
688
- }
689
-
690
- export interface SegmentAttributeResponseDto {
691
- key: string;
692
- label: string;
693
- }
694
-
695
- export interface SegmentPreviewCountResponseDto {
696
- count: number;
697
- }
698
-
699
- export interface CreateSegmentDto {
700
- // Sector the segment is scoped to (location-service sector name, e.g. Eurest)
701
- sector: string;
702
- country: 'CA' | 'US';
703
- name: string;
704
- description?: string;
705
- type: 'static_list' | 'attribute_rule';
706
- // Required when type = attribute_rule
707
- ruleJson?: SegmentRuleDto;
708
- // Initial members for static_list segments
709
- customerIds?: string[];
710
- }
711
-
712
- export interface UpdateSegmentDto {
713
- name?: string;
714
- description?: string;
715
- ruleJson?: SegmentRuleDto;
716
- }
717
-
718
- export interface SegmentMemberResponseDto {
719
- customerId: string;
720
- addedAt: string;
721
- addedBy: string;
722
- }
723
-
724
- export interface SegmentMembersListResponseDto {
725
- data: SegmentMemberResponseDto[];
726
- pagination: SegmentPaginationDto;
727
- }
728
-
729
- export interface SegmentMembersDto {
730
- // List of customer IDs
731
- customerIds: string[];
732
- }
733
-
734
- export interface AddSegmentMembersResponseDto {
735
- added: number;
736
- }
737
-
738
- export interface RemoveSegmentMembersResponseDto {
739
- removed: number;
740
- }
741
-
742
- export interface RollbackRedemptionDto {
743
- // Reason for rolling back the redemption
744
- reason: string;
745
- }
746
-
747
651
  export interface RewardResponseDto {
748
652
  id: string;
749
653
  createdAt: string;
@@ -939,6 +843,102 @@ export interface EarnPointsFromOrderResponseDto {
939
843
  issuedVoucherCodes: string[];
940
844
  }
941
845
 
846
+ export interface SegmentRuleDto {
847
+ // Attribute key to evaluate (e.g. points_balance, enrollment_date)
848
+ attribute: string;
849
+ // Operator key (eq, neq, gt, gte, lt, lte)
850
+ operator: string;
851
+ // Value to compare against
852
+ value: string;
853
+ }
854
+
855
+ export interface SegmentResponseDto {
856
+ id: string;
857
+ createdAt: string;
858
+ updatedAt: string;
859
+ deletedAt?: string | null;
860
+ createdBy: string;
861
+ // Sector the segment is scoped to (location-service sector name, e.g. Eurest)
862
+ sector: string;
863
+ country: 'CA' | 'US';
864
+ name: string;
865
+ description?: string | null;
866
+ type: 'static_list' | 'attribute_rule';
867
+ ownership: 'system' | 'custom';
868
+ editable: boolean;
869
+ deletable: boolean;
870
+ ruleJson?: SegmentRuleDto;
871
+ memberCount?: number;
872
+ }
873
+
874
+ export interface SegmentPaginationDto {
875
+ cursor?: string | null;
876
+ hasMore: boolean;
877
+ limit: number;
878
+ }
879
+
880
+ export interface SegmentListResponseDto {
881
+ data: SegmentResponseDto[];
882
+ pagination: SegmentPaginationDto;
883
+ }
884
+
885
+ export interface SegmentAttributeResponseDto {
886
+ key: string;
887
+ label: string;
888
+ }
889
+
890
+ export interface SegmentPreviewCountResponseDto {
891
+ count: number;
892
+ }
893
+
894
+ export interface CreateSegmentDto {
895
+ // Sector the segment is scoped to (location-service sector name, e.g. Eurest)
896
+ sector: string;
897
+ country: 'CA' | 'US';
898
+ name: string;
899
+ description?: string;
900
+ type: 'static_list' | 'attribute_rule';
901
+ // Required when type = attribute_rule
902
+ ruleJson?: SegmentRuleDto;
903
+ // Initial members for static_list segments
904
+ customerIds?: string[];
905
+ }
906
+
907
+ export interface UpdateSegmentDto {
908
+ name?: string;
909
+ description?: string;
910
+ ruleJson?: SegmentRuleDto;
911
+ }
912
+
913
+ export interface SegmentMemberResponseDto {
914
+ customerId: string;
915
+ addedAt: string;
916
+ addedBy: string;
917
+ }
918
+
919
+ export interface SegmentMembersListResponseDto {
920
+ data: SegmentMemberResponseDto[];
921
+ pagination: SegmentPaginationDto;
922
+ }
923
+
924
+ export interface SegmentMembersDto {
925
+ // List of customer IDs
926
+ customerIds: string[];
927
+ }
928
+
929
+ export interface AddSegmentMembersResponseDto {
930
+ added: number;
931
+ }
932
+
933
+ export interface RemoveSegmentMembersResponseDto {
934
+ removed: number;
935
+ }
936
+
937
+ export interface RollbackRedemptionDto {
938
+ // Reason for rolling back the redemption
939
+ reason: string;
940
+ }
941
+
942
942
  // GET /loyalty/bundles - List bundles with optional filters
943
943
 
944
944
  export interface GetLoyaltyBundlesQuery {
@@ -1195,202 +1195,202 @@ export type PostLoyaltyVouchersRedeemBody = VoucherOperationDto;
1195
1195
 
1196
1196
  export type PostLoyaltyVouchersRedeemResponse = VoucherOperationResponseDto;
1197
1197
 
1198
- // GET /loyalty/segments - List segments with optional filters
1198
+ // GET /loyalty/rewards - List rewards with filters and pagination
1199
1199
 
1200
- export interface GetLoyaltySegmentsQuery {
1200
+ export interface GetLoyaltyRewardsQuery {
1201
1201
  // Max items to return
1202
1202
  limit?: number;
1203
1203
  // Opaque cursor from previous response
1204
1204
  cursor?: string;
1205
+ // Case-insensitive partial match across reward text fields
1206
+ query?: string;
1205
1207
  // Filter by sector (location-service sector name, e.g. Eurest)
1206
1208
  sector?: string;
1207
1209
  country?: 'CA' | 'US';
1208
- type?: 'static_list' | 'attribute_rule';
1209
- ownership?: 'system' | 'custom';
1210
- // Case-insensitive partial name match
1211
- name?: string;
1210
+ // Only rewards that earn at this site: rewards with no associations plus rewards associated with the site
1211
+ siteId?: string;
1212
+ // Exact milestone-linked campaign match
1213
+ campaignId?: string;
1214
+ status?: 'active' | 'paused' | 'archived';
1212
1215
  }
1213
1216
 
1214
- export type GetLoyaltySegmentsResponse = SegmentListResponseDto;
1215
-
1216
- // POST /loyalty/segments - Create a new segment
1217
-
1218
- export type PostLoyaltySegmentBody = CreateSegmentDto;
1219
-
1220
- export type PostLoyaltySegmentResponse = SegmentResponseDto;
1221
-
1222
- // GET /loyalty/segments/attributes - List available attributes for rule-based segments
1223
-
1224
- export type GetLoyaltySegmentAttributesResponse = SegmentAttributeResponseDto[];
1217
+ export type GetLoyaltyRewardsResponse = RewardListResponseDto;
1225
1218
 
1226
- // POST /loyalty/segments/preview-count - Preview how many customers match a segment rule
1219
+ // POST /loyalty/rewards - Create a reward with earning rules and milestones
1227
1220
 
1228
- export type PostLoyaltySegmentPreviewCountBody = SegmentRuleDto;
1221
+ export type PostLoyaltyRewardBody = CreateRewardDto;
1229
1222
 
1230
- export type PostLoyaltySegmentPreviewCountResponse = SegmentPreviewCountResponseDto;
1223
+ export type PostLoyaltyRewardResponse = RewardDetailResponseDto;
1231
1224
 
1232
- // GET /loyalty/segments/{id} - Get segment by ID
1225
+ // GET /loyalty/rewards/{id} - Get reward detail with earning rules and milestones
1233
1226
 
1234
- export interface GetLoyaltySegmentPath {
1227
+ export interface GetLoyaltyRewardPath {
1235
1228
  id: string;
1236
1229
  }
1237
1230
 
1238
- export type GetLoyaltySegmentResponse = SegmentResponseDto;
1231
+ export type GetLoyaltyRewardResponse = RewardDetailResponseDto;
1239
1232
 
1240
- // PATCH /loyalty/segments/{id} - Update a segment
1233
+ // PUT /loyalty/rewards/{id} - Update a reward and replace its earning rules and milestones
1241
1234
 
1242
- export interface PatchLoyaltySegmentPath {
1235
+ export interface PutLoyaltyRewardPath {
1243
1236
  id: string;
1244
1237
  }
1245
1238
 
1246
- export type PatchLoyaltySegmentBody = UpdateSegmentDto;
1239
+ export type PutLoyaltyRewardBody = UpdateRewardDto;
1247
1240
 
1248
- export type PatchLoyaltySegmentResponse = SegmentResponseDto;
1241
+ export type PutLoyaltyRewardResponse = RewardDetailResponseDto;
1249
1242
 
1250
- // DELETE /loyalty/segments/{id} - Soft-delete a segment
1243
+ // PATCH /loyalty/rewards/{id}/status - Transition reward status
1251
1244
 
1252
- export interface DeleteLoyaltySegmentPath {
1245
+ export interface PatchLoyaltyRewardStatusPath {
1253
1246
  id: string;
1254
1247
  }
1255
1248
 
1256
- export type DeleteLoyaltySegmentResponse = {};
1249
+ export type PatchLoyaltyRewardStatusBody = UpdateRewardStatusDto;
1257
1250
 
1258
- // GET /loyalty/segments/{id}/members - List members of a static_list segment
1251
+ export type PatchLoyaltyRewardStatusResponse = RewardDetailResponseDto;
1259
1252
 
1260
- export interface GetLoyaltySegmentMembersPath {
1253
+ // GET /loyalty/rewards/{id}/cards - List enrolled customer cards for a reward
1254
+
1255
+ export interface GetLoyaltyRewardCardsPath {
1261
1256
  id: string;
1262
1257
  }
1263
1258
 
1264
- export interface GetLoyaltySegmentMembersQuery {
1259
+ export interface GetLoyaltyRewardCardsQuery {
1265
1260
  // Max items to return
1266
1261
  limit?: number;
1267
1262
  // Opaque cursor from previous response
1268
1263
  cursor?: string;
1269
1264
  }
1270
1265
 
1271
- export type GetLoyaltySegmentMembersResponse = SegmentMembersListResponseDto;
1266
+ export type GetLoyaltyRewardCardsResponse = RewardCardListResponseDto;
1272
1267
 
1273
- // POST /loyalty/segments/{id}/members - Add members to a segment
1268
+ // GET /loyalty/rewards/{id}/cards/{customerId} - Get card detail with transaction event history
1274
1269
 
1275
- export interface PostLoyaltySegmentMembersPath {
1270
+ export interface GetLoyaltyRewardCardPath {
1276
1271
  id: string;
1272
+ customerId: string;
1277
1273
  }
1278
1274
 
1279
- export type PostLoyaltySegmentMembersBody = SegmentMembersDto;
1280
-
1281
- export type PostLoyaltySegmentMembersResponse = AddSegmentMembersResponseDto;
1275
+ export type GetLoyaltyRewardCardResponse = RewardCardDetailResponseDto;
1282
1276
 
1283
- // DELETE /loyalty/segments/{id}/members - Remove members from a segment
1277
+ // POST /loyalty/rewards/cards/{cardId}/adjust - Manual point adjustment on a reward card
1284
1278
 
1285
- export interface DeleteLoyaltySegmentMembersPath {
1286
- id: string;
1279
+ export interface PostLoyaltyRewardCardAdjustPath {
1280
+ cardId: string;
1287
1281
  }
1288
1282
 
1289
- export type DeleteLoyaltySegmentMembersBody = SegmentMembersDto;
1290
-
1291
- export type DeleteLoyaltySegmentMembersResponse = RemoveSegmentMembersResponseDto;
1283
+ export type PostLoyaltyRewardCardAdjustBody = AdjustPointsDto;
1292
1284
 
1293
- // POST /loyalty/redemptions/{id}/rollback - Roll back a redemption and restore the voucher
1285
+ export type PostLoyaltyRewardCardAdjustResponse = RewardCardDetailResponseDto;
1294
1286
 
1295
- export interface PostLoyaltyRedemptionRollbackPath {
1296
- id: string;
1297
- }
1287
+ // POST /loyalty/rewards/orders/earn - Evaluate an order against active reward rules and award points idempotently
1298
1288
 
1299
- export type PostLoyaltyRedemptionRollbackBody = RollbackRedemptionDto;
1289
+ export type PostLoyaltyRewardOrderEarnBody = EarnPointsFromOrderDto;
1300
1290
 
1301
- export type PostLoyaltyRedemptionRollbackResponse = RedemptionResponseDto;
1291
+ export type PostLoyaltyRewardOrderEarnResponse = EarnPointsFromOrderResponseDto;
1302
1292
 
1303
- // GET /loyalty/rewards - List rewards with filters and pagination
1293
+ // GET /loyalty/segments - List segments with optional filters
1304
1294
 
1305
- export interface GetLoyaltyRewardsQuery {
1295
+ export interface GetLoyaltySegmentsQuery {
1306
1296
  // Max items to return
1307
1297
  limit?: number;
1308
1298
  // Opaque cursor from previous response
1309
1299
  cursor?: string;
1310
- // Case-insensitive partial match across reward text fields
1311
- query?: string;
1312
1300
  // Filter by sector (location-service sector name, e.g. Eurest)
1313
1301
  sector?: string;
1314
1302
  country?: 'CA' | 'US';
1315
- // Only rewards that earn at this site: rewards with no associations plus rewards associated with the site
1316
- siteId?: string;
1317
- // Exact milestone-linked campaign match
1318
- campaignId?: string;
1319
- status?: 'active' | 'paused' | 'archived';
1303
+ type?: 'static_list' | 'attribute_rule';
1304
+ ownership?: 'system' | 'custom';
1305
+ // Case-insensitive partial name match
1306
+ name?: string;
1320
1307
  }
1321
1308
 
1322
- export type GetLoyaltyRewardsResponse = RewardListResponseDto;
1309
+ export type GetLoyaltySegmentsResponse = SegmentListResponseDto;
1323
1310
 
1324
- // POST /loyalty/rewards - Create a reward with earning rules and milestones
1311
+ // POST /loyalty/segments - Create a new segment
1325
1312
 
1326
- export type PostLoyaltyRewardBody = CreateRewardDto;
1313
+ export type PostLoyaltySegmentBody = CreateSegmentDto;
1327
1314
 
1328
- export type PostLoyaltyRewardResponse = RewardDetailResponseDto;
1315
+ export type PostLoyaltySegmentResponse = SegmentResponseDto;
1329
1316
 
1330
- // GET /loyalty/rewards/{id} - Get reward detail with earning rules and milestones
1317
+ // GET /loyalty/segments/attributes - List available attributes for rule-based segments
1331
1318
 
1332
- export interface GetLoyaltyRewardPath {
1319
+ export type GetLoyaltySegmentAttributesResponse = SegmentAttributeResponseDto[];
1320
+
1321
+ // POST /loyalty/segments/preview-count - Preview how many customers match a segment rule
1322
+
1323
+ export type PostLoyaltySegmentPreviewCountBody = SegmentRuleDto;
1324
+
1325
+ export type PostLoyaltySegmentPreviewCountResponse = SegmentPreviewCountResponseDto;
1326
+
1327
+ // GET /loyalty/segments/{id} - Get segment by ID
1328
+
1329
+ export interface GetLoyaltySegmentPath {
1333
1330
  id: string;
1334
1331
  }
1335
1332
 
1336
- export type GetLoyaltyRewardResponse = RewardDetailResponseDto;
1333
+ export type GetLoyaltySegmentResponse = SegmentResponseDto;
1337
1334
 
1338
- // PUT /loyalty/rewards/{id} - Update a reward and replace its earning rules and milestones
1335
+ // PATCH /loyalty/segments/{id} - Update a segment
1339
1336
 
1340
- export interface PutLoyaltyRewardPath {
1337
+ export interface PatchLoyaltySegmentPath {
1341
1338
  id: string;
1342
1339
  }
1343
1340
 
1344
- export type PutLoyaltyRewardBody = UpdateRewardDto;
1341
+ export type PatchLoyaltySegmentBody = UpdateSegmentDto;
1345
1342
 
1346
- export type PutLoyaltyRewardResponse = RewardDetailResponseDto;
1343
+ export type PatchLoyaltySegmentResponse = SegmentResponseDto;
1347
1344
 
1348
- // PATCH /loyalty/rewards/{id}/status - Transition reward status
1345
+ // DELETE /loyalty/segments/{id} - Soft-delete a segment
1349
1346
 
1350
- export interface PatchLoyaltyRewardStatusPath {
1347
+ export interface DeleteLoyaltySegmentPath {
1351
1348
  id: string;
1352
1349
  }
1353
1350
 
1354
- export type PatchLoyaltyRewardStatusBody = UpdateRewardStatusDto;
1355
-
1356
- export type PatchLoyaltyRewardStatusResponse = RewardDetailResponseDto;
1351
+ export type DeleteLoyaltySegmentResponse = {};
1357
1352
 
1358
- // GET /loyalty/rewards/{id}/cards - List enrolled customer cards for a reward
1353
+ // GET /loyalty/segments/{id}/members - List members of a static_list segment
1359
1354
 
1360
- export interface GetLoyaltyRewardCardsPath {
1355
+ export interface GetLoyaltySegmentMembersPath {
1361
1356
  id: string;
1362
1357
  }
1363
1358
 
1364
- export interface GetLoyaltyRewardCardsQuery {
1359
+ export interface GetLoyaltySegmentMembersQuery {
1365
1360
  // Max items to return
1366
1361
  limit?: number;
1367
1362
  // Opaque cursor from previous response
1368
1363
  cursor?: string;
1369
1364
  }
1370
1365
 
1371
- export type GetLoyaltyRewardCardsResponse = RewardCardListResponseDto;
1366
+ export type GetLoyaltySegmentMembersResponse = SegmentMembersListResponseDto;
1372
1367
 
1373
- // GET /loyalty/rewards/{id}/cards/{customerId} - Get card detail with transaction event history
1368
+ // POST /loyalty/segments/{id}/members - Add members to a segment
1374
1369
 
1375
- export interface GetLoyaltyRewardCardPath {
1370
+ export interface PostLoyaltySegmentMembersPath {
1376
1371
  id: string;
1377
- customerId: string;
1378
1372
  }
1379
1373
 
1380
- export type GetLoyaltyRewardCardResponse = RewardCardDetailResponseDto;
1374
+ export type PostLoyaltySegmentMembersBody = SegmentMembersDto;
1381
1375
 
1382
- // POST /loyalty/rewards/cards/{cardId}/adjust - Manual point adjustment on a reward card
1376
+ export type PostLoyaltySegmentMembersResponse = AddSegmentMembersResponseDto;
1383
1377
 
1384
- export interface PostLoyaltyRewardCardAdjustPath {
1385
- cardId: string;
1378
+ // DELETE /loyalty/segments/{id}/members - Remove members from a segment
1379
+
1380
+ export interface DeleteLoyaltySegmentMembersPath {
1381
+ id: string;
1386
1382
  }
1387
1383
 
1388
- export type PostLoyaltyRewardCardAdjustBody = AdjustPointsDto;
1384
+ export type DeleteLoyaltySegmentMembersBody = SegmentMembersDto;
1389
1385
 
1390
- export type PostLoyaltyRewardCardAdjustResponse = RewardCardDetailResponseDto;
1386
+ export type DeleteLoyaltySegmentMembersResponse = RemoveSegmentMembersResponseDto;
1391
1387
 
1392
- // POST /loyalty/rewards/orders/earn - Evaluate an order against active reward rules and award points idempotently
1388
+ // POST /loyalty/redemptions/{id}/rollback - Roll back a redemption and restore the voucher
1393
1389
 
1394
- export type PostLoyaltyRewardOrderEarnBody = EarnPointsFromOrderDto;
1390
+ export interface PostLoyaltyRedemptionRollbackPath {
1391
+ id: string;
1392
+ }
1395
1393
 
1396
- export type PostLoyaltyRewardOrderEarnResponse = EarnPointsFromOrderResponseDto;
1394
+ export type PostLoyaltyRedemptionRollbackBody = RollbackRedemptionDto;
1395
+
1396
+ export type PostLoyaltyRedemptionRollbackResponse = RedemptionResponseDto;