b2b-platform-utils 1.1.30 → 1.1.32

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 (2) hide show
  1. package/errorsMap.js +54 -0
  2. package/package.json +1 -1
package/errorsMap.js CHANGED
@@ -341,6 +341,60 @@ const STATIC_ERRORS = [
341
341
  httpCode: 422,
342
342
  description: "Free Spins could not be granted, try again later.",
343
343
  },
344
+ {
345
+ errorCode: 1055,
346
+ errorKey: "selectedUserBonusIdRequired",
347
+ httpCode: 422,
348
+ description: "selected_user_bonus_id missing or invalid",
349
+ },
350
+ {
351
+ errorCode: 1056,
352
+ errorKey: "selectedBalanceTypeRequired",
353
+ httpCode: 422,
354
+ description: "selected_balance_type missing or empty",
355
+ },
356
+ {
357
+ errorCode: 1057,
358
+ errorKey: "selectedBalanceTypeInvalid",
359
+ httpCode: 422,
360
+ description: "selected_balance_type must be \"real\" or \"bonus\"",
361
+ },
362
+ {
363
+ errorCode: 1058,
364
+ errorKey: "userBonusOwnershipMismatch",
365
+ httpCode: 403,
366
+ description: "Bonus does not belong to the user",
367
+ },
368
+ {
369
+ errorCode: 1059,
370
+ errorKey: "userBonusNotInWagering",
371
+ httpCode: 422,
372
+ description: "User bonus is not in wagering status",
373
+ },
374
+ {
375
+ errorCode: 1060,
376
+ errorKey: "userBonusWagerGamesListMismatch",
377
+ httpCode: 422,
378
+ description: "Bonus wager_games_list_id does not match request wager_games_list_id",
379
+ },
380
+ {
381
+ errorCode: 1061,
382
+ errorKey: "userBonusWageringStateNotFound",
383
+ httpCode: 422,
384
+ description: "Redis wagering snapshot missing for selected bonus",
385
+ },
386
+ {
387
+ errorCode: 1062,
388
+ errorKey: "userBonusBalanceNotAllowed",
389
+ httpCode: 422,
390
+ description: "Selected balance type not allowed by wagering rules (is_real_wagering / is_bonus_wagering)",
391
+ },
392
+ {
393
+ errorCode: 1063,
394
+ errorKey: "userBonusExpired",
395
+ httpCode: 422,
396
+ description: "Bonus already expired (now >= expiredAt in Redis)",
397
+ },
344
398
  ];
345
399
 
346
400
  const STATIC_BY_KEY = Object.fromEntries(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "b2b-platform-utils",
3
- "version": "1.1.30",
3
+ "version": "1.1.32",
4
4
  "description": "Shared utilities for Node.js microservices: errors map, local cache, logger, numbers, dates, filesystem, media optimization, paginator, slugger, crypto wrapper, sanitize HTML, sorting.",
5
5
  "type": "commonjs",
6
6
  "license": "KingSizer",