@fiado/type-kit 3.512.0 → 3.514.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.
Files changed (64) hide show
  1. package/_test_/unit/retailPromotions/activeSalePromotionsBySkus.test.ts +58 -0
  2. package/_test_/unit/rewards/backoffice.test.ts +96 -0
  3. package/bin/retailCatalog/dtos/responses/GetInventorySkuResponse.d.ts +9 -0
  4. package/bin/retailCatalog/dtos/responses/InventoryLensResponse.d.ts +10 -0
  5. package/bin/retailCatalog/enums/CatalogSourceStatusEnum.d.ts +5 -0
  6. package/bin/retailCatalog/enums/CatalogSourceStatusEnum.js +9 -0
  7. package/bin/retailCatalog/index.d.ts +1 -0
  8. package/bin/retailCatalog/index.js +1 -0
  9. package/bin/retailPromotions/constants/activeSalePromotionsBySkus.d.ts +2 -0
  10. package/bin/retailPromotions/constants/activeSalePromotionsBySkus.js +5 -0
  11. package/bin/retailPromotions/dtos/requests/ActiveSalePromotionsBySkusRequest.d.ts +17 -0
  12. package/bin/retailPromotions/dtos/requests/ActiveSalePromotionsBySkusRequest.js +69 -0
  13. package/bin/retailPromotions/dtos/responses/ActiveSalePromotionsBySkusResponse.d.ts +26 -0
  14. package/bin/retailPromotions/dtos/responses/ActiveSalePromotionsBySkusResponse.js +2 -0
  15. package/bin/retailPromotions/enums/SkuSalePromotionLookupStatusEnum.d.ts +9 -0
  16. package/bin/retailPromotions/enums/SkuSalePromotionLookupStatusEnum.js +13 -0
  17. package/bin/retailPromotions/index.d.ts +4 -0
  18. package/bin/retailPromotions/index.js +4 -0
  19. package/bin/rewards/constants/BackofficeLimits.d.ts +6 -0
  20. package/bin/rewards/constants/BackofficeLimits.js +9 -0
  21. package/bin/rewards/dtos/backoffice/CatalogItemListResponse.d.ts +6 -0
  22. package/bin/rewards/dtos/backoffice/CatalogItemListResponse.js +6 -0
  23. package/bin/rewards/dtos/backoffice/CatalogItemRequest.d.ts +19 -0
  24. package/bin/rewards/dtos/backoffice/CatalogItemRequest.js +70 -0
  25. package/bin/rewards/dtos/backoffice/CatalogItemResponse.d.ts +23 -0
  26. package/bin/rewards/dtos/backoffice/CatalogItemResponse.js +6 -0
  27. package/bin/rewards/dtos/backoffice/PackageItemRequest.d.ts +4 -0
  28. package/bin/rewards/dtos/backoffice/PackageItemRequest.js +30 -0
  29. package/bin/rewards/dtos/backoffice/PackageListResponse.d.ts +6 -0
  30. package/bin/rewards/dtos/backoffice/PackageListResponse.js +6 -0
  31. package/bin/rewards/dtos/backoffice/PackageRequest.d.ts +9 -0
  32. package/bin/rewards/dtos/backoffice/PackageRequest.js +47 -0
  33. package/bin/rewards/dtos/backoffice/PackageResponse.d.ts +18 -0
  34. package/bin/rewards/dtos/backoffice/PackageResponse.js +9 -0
  35. package/bin/rewards/dtos/backoffice/RewardChargeToInput.d.ts +4 -0
  36. package/bin/rewards/dtos/backoffice/RewardChargeToInput.js +31 -0
  37. package/bin/rewards/dtos/backoffice/RewardCostInput.d.ts +5 -0
  38. package/bin/rewards/dtos/backoffice/RewardCostInput.js +29 -0
  39. package/bin/rewards/dtos/backoffice/RewardTypeResponse.d.ts +6 -0
  40. package/bin/rewards/dtos/backoffice/RewardTypeResponse.js +7 -0
  41. package/bin/rewards/index.d.ts +11 -0
  42. package/bin/rewards/index.js +13 -0
  43. package/package.json +1 -1
  44. package/src/retailCatalog/dtos/responses/GetInventorySkuResponse.ts +10 -0
  45. package/src/retailCatalog/dtos/responses/InventoryLensResponse.ts +12 -0
  46. package/src/retailCatalog/enums/CatalogSourceStatusEnum.ts +5 -0
  47. package/src/retailCatalog/index.ts +1 -0
  48. package/src/retailPromotions/constants/activeSalePromotionsBySkus.ts +2 -0
  49. package/src/retailPromotions/dtos/requests/ActiveSalePromotionsBySkusRequest.ts +50 -0
  50. package/src/retailPromotions/dtos/responses/ActiveSalePromotionsBySkusResponse.ts +29 -0
  51. package/src/retailPromotions/enums/SkuSalePromotionLookupStatusEnum.ts +9 -0
  52. package/src/retailPromotions/index.ts +4 -0
  53. package/src/rewards/constants/BackofficeLimits.ts +6 -0
  54. package/src/rewards/dtos/backoffice/CatalogItemListResponse.ts +7 -0
  55. package/src/rewards/dtos/backoffice/CatalogItemRequest.ts +52 -0
  56. package/src/rewards/dtos/backoffice/CatalogItemResponse.ts +22 -0
  57. package/src/rewards/dtos/backoffice/PackageItemRequest.ts +15 -0
  58. package/src/rewards/dtos/backoffice/PackageListResponse.ts +7 -0
  59. package/src/rewards/dtos/backoffice/PackageRequest.ts +31 -0
  60. package/src/rewards/dtos/backoffice/PackageResponse.ts +20 -0
  61. package/src/rewards/dtos/backoffice/RewardChargeToInput.ts +16 -0
  62. package/src/rewards/dtos/backoffice/RewardCostInput.ts +14 -0
  63. package/src/rewards/dtos/backoffice/RewardTypeResponse.ts +7 -0
  64. package/src/rewards/index.ts +15 -0
@@ -0,0 +1,16 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
3
+
4
+ export class RewardChargeToInput {
5
+ @Expose()
6
+ @IsString()
7
+ @IsNotEmpty()
8
+ @MaxLength(64)
9
+ partnerId: string;
10
+
11
+ @Expose()
12
+ @IsString()
13
+ @IsNotEmpty()
14
+ @MaxLength(120)
15
+ partnerName: string;
16
+ }
@@ -0,0 +1,14 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { IsEnum, IsNumber, Min } from 'class-validator';
3
+ import { CurrencyId } from '../../../currency';
4
+
5
+ export class RewardCostInput {
6
+ @Expose()
7
+ @IsNumber({ maxDecimalPlaces: 2 })
8
+ @Min(0)
9
+ amount: number;
10
+
11
+ @Expose()
12
+ @IsEnum(CurrencyId)
13
+ currency: CurrencyId;
14
+ }
@@ -0,0 +1,7 @@
1
+ import { InputField } from '../../../dynamicForm/dtos/InputField';
2
+
3
+ /** `GET /reward-types`: un tipo registrado y el formulario dinámico de su `config`. */
4
+ export class RewardTypeResponse {
5
+ type: string;
6
+ configFields: InputField[];
7
+ }
@@ -35,3 +35,18 @@ export * from './dtos/responses/PackageContractResponse';
35
35
  export * from './dtos/responses/GrantAttemptResponse';
36
36
  export * from './dtos/responses/GrantItemResponse';
37
37
  export * from './dtos/responses/GrantResponse';
38
+
39
+ //Constants backoffice
40
+ export * from './constants/BackofficeLimits';
41
+
42
+ //DTOs backoffice
43
+ export * from './dtos/backoffice/RewardCostInput';
44
+ export * from './dtos/backoffice/RewardChargeToInput';
45
+ export * from './dtos/backoffice/CatalogItemRequest';
46
+ export * from './dtos/backoffice/CatalogItemResponse';
47
+ export * from './dtos/backoffice/PackageItemRequest';
48
+ export * from './dtos/backoffice/PackageRequest';
49
+ export * from './dtos/backoffice/PackageResponse';
50
+ export * from './dtos/backoffice/RewardTypeResponse';
51
+ export * from './dtos/backoffice/CatalogItemListResponse';
52
+ export * from './dtos/backoffice/PackageListResponse';