@cravery/core 0.0.60 → 0.0.62

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 (94) hide show
  1. package/README.md +80 -80
  2. package/dist/types/core/errors.d.ts +2 -2
  3. package/dist/types/core/errors.js +16 -16
  4. package/dist/types/ingredients/ingredient.d.ts +1 -1
  5. package/dist/types/ingredients/ingredient.d.ts.map +1 -1
  6. package/dist/types/recipes/difficulty.d.ts.map +1 -1
  7. package/dist/types/recipes/difficulty.js +1 -6
  8. package/dist/types/recipes/difficulty.js.map +1 -1
  9. package/dist/types/recipes/spiciness.d.ts.map +1 -1
  10. package/dist/types/recipes/spiciness.js +7 -1
  11. package/dist/types/recipes/spiciness.js.map +1 -1
  12. package/dist/types/reports/target.d.ts.map +1 -1
  13. package/dist/types/reports/update.d.ts.map +1 -1
  14. package/dist/types/reports/update_type.d.ts.map +1 -1
  15. package/dist/types/reports/update_type.js +1 -5
  16. package/dist/types/reports/update_type.js.map +1 -1
  17. package/dist/types/subscriptions/store.d.ts.map +1 -1
  18. package/dist/types/subscriptions/store.js +6 -1
  19. package/dist/types/subscriptions/store.js.map +1 -1
  20. package/dist/types/users/index.d.ts +2 -0
  21. package/dist/types/users/index.d.ts.map +1 -1
  22. package/dist/types/users/index.js +2 -0
  23. package/dist/types/users/index.js.map +1 -1
  24. package/dist/types/users/request.d.ts +12 -0
  25. package/dist/types/users/request.d.ts.map +1 -0
  26. package/dist/types/users/request.js +3 -0
  27. package/dist/types/users/request.js.map +1 -0
  28. package/dist/types/users/request_status.d.ts +3 -0
  29. package/dist/types/users/request_status.d.ts.map +1 -0
  30. package/dist/types/users/request_status.js +10 -0
  31. package/dist/types/users/request_status.js.map +1 -0
  32. package/package.json +34 -34
  33. package/src/index.ts +1 -1
  34. package/src/types/core/entity.ts +13 -13
  35. package/src/types/core/entity_status.ts +9 -9
  36. package/src/types/core/errors.ts +119 -119
  37. package/src/types/core/index.ts +8 -8
  38. package/src/types/core/locale.ts +2 -2
  39. package/src/types/core/measurement_system.ts +2 -2
  40. package/src/types/core/price.ts +4 -4
  41. package/src/types/core/theme.ts +2 -2
  42. package/src/types/core/timestamp.ts +4 -4
  43. package/src/types/equipment/category.ts +15 -15
  44. package/src/types/equipment/equipment.ts +12 -12
  45. package/src/types/equipment/equipment_entity.ts +17 -17
  46. package/src/types/equipment/index.ts +4 -4
  47. package/src/types/equipment/user_equipment.ts +9 -9
  48. package/src/types/ingredients/category.ts +28 -28
  49. package/src/types/ingredients/group.ts +8 -8
  50. package/src/types/ingredients/index.ts +6 -6
  51. package/src/types/ingredients/ingredient.ts +16 -16
  52. package/src/types/ingredients/ingredient_entity.ts +21 -21
  53. package/src/types/ingredients/ingredient_section.ts +18 -18
  54. package/src/types/ingredients/user_ingredient.ts +14 -14
  55. package/src/types/recipes/allergen.ts +16 -16
  56. package/src/types/recipes/comment.ts +8 -8
  57. package/src/types/recipes/cuisine.ts +90 -90
  58. package/src/types/recipes/dietary_tag.ts +18 -18
  59. package/src/types/recipes/difficulty.ts +2 -7
  60. package/src/types/recipes/index.ts +14 -14
  61. package/src/types/recipes/instruction.ts +19 -19
  62. package/src/types/recipes/meal_type.ts +13 -13
  63. package/src/types/recipes/nutrition.ts +11 -11
  64. package/src/types/recipes/recipe.ts +81 -81
  65. package/src/types/recipes/recipe_source.ts +2 -2
  66. package/src/types/recipes/recipe_stats.ts +8 -8
  67. package/src/types/recipes/spiciness.ts +8 -2
  68. package/src/types/recipes/temperature.ts +6 -6
  69. package/src/types/recipes/temperature_unit.ts +2 -2
  70. package/src/types/recipes/unit.ts +48 -48
  71. package/src/types/reports/category.ts +1 -1
  72. package/src/types/reports/index.ts +8 -8
  73. package/src/types/reports/priority.ts +7 -7
  74. package/src/types/reports/report.ts +18 -18
  75. package/src/types/reports/status.ts +9 -9
  76. package/src/types/reports/target.ts +23 -19
  77. package/src/types/reports/update.ts +4 -4
  78. package/src/types/reports/update_type.ts +1 -5
  79. package/src/types/settings/notification.ts +6 -6
  80. package/src/types/settings/settings.ts +26 -26
  81. package/src/types/subscriptions/cost.ts +5 -5
  82. package/src/types/subscriptions/index.ts +8 -8
  83. package/src/types/subscriptions/member.ts +11 -11
  84. package/src/types/subscriptions/store.ts +6 -1
  85. package/src/types/subscriptions/subscription.ts +21 -21
  86. package/src/types/subscriptions/subscription_role.ts +2 -2
  87. package/src/types/subscriptions/subscription_status.ts +11 -11
  88. package/src/types/subscriptions/subscription_tier.ts +2 -2
  89. package/src/types/users/index.ts +6 -4
  90. package/src/types/users/profile.ts +8 -8
  91. package/src/types/users/request.ts +12 -0
  92. package/src/types/users/request_status.ts +7 -0
  93. package/src/types/users/user.ts +11 -11
  94. package/src/types/users/user_role.ts +8 -8
package/README.md CHANGED
@@ -1,80 +1,80 @@
1
- # @cravery/core
2
-
3
- [![Cravery](https://img.shields.io/badge/Cravery-Web-02569B?style=for-the-badge)](https://cravery.app)
4
-
5
- Core SDK for Cravery backend services.
6
-
7
- ## Installation
8
-
9
- ```bash
10
- npm install @cravery/core
11
- ```
12
-
13
- ### Peer Dependencies
14
-
15
- This package requires the following peer dependencies:
16
-
17
- ```bash
18
- npm install firebase-admin firebase-functions
19
- ```
20
-
21
- ## Usage
22
-
23
- ```typescript
24
- // Import everything
25
- import { ... } from "@cravery/core";
26
-
27
- // Import types only
28
- import { ... } from "@cravery/core";
29
-
30
- // Import config only
31
- import { ... } from "@cravery/core/config";
32
- ```
33
-
34
- ## Package Structure
35
-
36
- ### Types (`types/`)
37
-
38
- TypeScript type definitions:
39
-
40
- - **enums/** - Domain enums
41
- - `allergen` - Food allergens
42
- - `cuisine` - Cuisine types
43
- - `dietary_tag` - Dietary restrictions
44
- - `difficulty` - Recipe difficulty levels
45
- - `meal_type` - Meal categories
46
- - `spiciness` - Spice levels
47
- - `unit` - Measurement units
48
- - `locale` - Supported locales
49
- - And more...
50
-
51
- - **ai/** - AI-related types
52
- - `config` - AI configuration
53
- - `filters` - AI filter options
54
- - `recipe` - AI recipe generation types
55
- - `translation` - Translation types
56
- - `flow` - AI flow types
57
- - And more...
58
-
59
- - **recipe/** - Recipe domain types
60
- - `recipe` - Core recipe type
61
- - `ingredient` - Ingredient definitions
62
- - `instruction` - Cooking instructions
63
- - `equipment` - Kitchen equipment
64
- - `nutrition` - Nutritional information
65
- - And more...
66
-
67
- - **iam/** - Identity types
68
- - `user` - User entity
69
- - `profile` - User profile
70
- - `subscription` - Subscription details
71
-
72
- ### Config (`config/`)
73
-
74
- Application configuration:
75
-
76
- - `ai` - AI model and provider settings
77
- - `collections` - Firestore collection paths
78
- - `common` - Common configuration values
79
- - `limits` - Rate limits and quotas
80
- - `subscription` - Subscription tier configurations
1
+ # @cravery/core
2
+
3
+ [![Cravery](https://img.shields.io/badge/Cravery-Web-02569B?style=for-the-badge)](https://cravery.app)
4
+
5
+ Core SDK for Cravery backend services.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @cravery/core
11
+ ```
12
+
13
+ ### Peer Dependencies
14
+
15
+ This package requires the following peer dependencies:
16
+
17
+ ```bash
18
+ npm install firebase-admin firebase-functions
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```typescript
24
+ // Import everything
25
+ import { ... } from "@cravery/core";
26
+
27
+ // Import types only
28
+ import { ... } from "@cravery/core";
29
+
30
+ // Import config only
31
+ import { ... } from "@cravery/core/config";
32
+ ```
33
+
34
+ ## Package Structure
35
+
36
+ ### Types (`types/`)
37
+
38
+ TypeScript type definitions:
39
+
40
+ - **enums/** - Domain enums
41
+ - `allergen` - Food allergens
42
+ - `cuisine` - Cuisine types
43
+ - `dietary_tag` - Dietary restrictions
44
+ - `difficulty` - Recipe difficulty levels
45
+ - `meal_type` - Meal categories
46
+ - `spiciness` - Spice levels
47
+ - `unit` - Measurement units
48
+ - `locale` - Supported locales
49
+ - And more...
50
+
51
+ - **ai/** - AI-related types
52
+ - `config` - AI configuration
53
+ - `filters` - AI filter options
54
+ - `recipe` - AI recipe generation types
55
+ - `translation` - Translation types
56
+ - `flow` - AI flow types
57
+ - And more...
58
+
59
+ - **recipe/** - Recipe domain types
60
+ - `recipe` - Core recipe type
61
+ - `ingredient` - Ingredient definitions
62
+ - `instruction` - Cooking instructions
63
+ - `equipment` - Kitchen equipment
64
+ - `nutrition` - Nutritional information
65
+ - And more...
66
+
67
+ - **iam/** - Identity types
68
+ - `user` - User entity
69
+ - `profile` - User profile
70
+ - `subscription` - Subscription details
71
+
72
+ ### Config (`config/`)
73
+
74
+ Application configuration:
75
+
76
+ - `ai` - AI model and provider settings
77
+ - `collections` - Firestore collection paths
78
+ - `common` - Common configuration values
79
+ - `limits` - Rate limits and quotas
80
+ - `subscription` - Subscription tier configurations
@@ -1,4 +1,4 @@
1
- export declare const APP_ERROR_CODE_VALUES: readonly ["bad_request", "conflict", "daily_limit_reached", "forbidden", "internal_error", "low_confidence", "monthly_limit_reached", "not_found", "no_recipe_found", "unauthorized", "unsafe_content", "validation_error"];
1
+ export declare const APP_ERROR_CODE_VALUES: readonly ["bad-request", "conflict", "daily-limit-reached", "forbidden", "internal-error", "low-confidence", "monthly-limit-reached", "not-found", "no-recipe-found", "unauthorized", "unsafe-content", "validation-error"];
2
2
  export type AppErrorCode = (typeof APP_ERROR_CODE_VALUES)[number];
3
3
  export declare class AppError extends Error {
4
4
  readonly code: AppErrorCode;
@@ -6,7 +6,7 @@ export declare class AppError extends Error {
6
6
  constructor(code: AppErrorCode, message: string, context?: Record<string, unknown>);
7
7
  toJSON(): {
8
8
  name: string;
9
- code: "bad_request" | "conflict" | "daily_limit_reached" | "forbidden" | "internal_error" | "low_confidence" | "monthly_limit_reached" | "not_found" | "no_recipe_found" | "unauthorized" | "unsafe_content" | "validation_error";
9
+ code: "bad-request" | "conflict" | "daily-limit-reached" | "forbidden" | "internal-error" | "low-confidence" | "monthly-limit-reached" | "not-found" | "no-recipe-found" | "unauthorized" | "unsafe-content" | "validation-error";
10
10
  message: string;
11
11
  context: Record<string, unknown> | undefined;
12
12
  };
@@ -2,18 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UnsafeContentError = exports.LowConfidenceError = exports.NoRecipeFoundError = exports.MonthlyLimitError = exports.DailyLimitError = exports.ConflictError = exports.ForbiddenError = exports.UnauthorizedError = exports.NotFoundError = exports.ValidationError = exports.AppError = exports.APP_ERROR_CODE_VALUES = void 0;
4
4
  exports.APP_ERROR_CODE_VALUES = [
5
- "bad_request",
5
+ "bad-request",
6
6
  "conflict",
7
- "daily_limit_reached",
7
+ "daily-limit-reached",
8
8
  "forbidden",
9
- "internal_error",
10
- "low_confidence",
11
- "monthly_limit_reached",
12
- "not_found",
13
- "no_recipe_found",
9
+ "internal-error",
10
+ "low-confidence",
11
+ "monthly-limit-reached",
12
+ "not-found",
13
+ "no-recipe-found",
14
14
  "unauthorized",
15
- "unsafe_content",
16
- "validation_error",
15
+ "unsafe-content",
16
+ "validation-error",
17
17
  ];
18
18
  class AppError extends Error {
19
19
  constructor(code, message, context) {
@@ -37,14 +37,14 @@ class AppError extends Error {
37
37
  exports.AppError = AppError;
38
38
  class ValidationError extends AppError {
39
39
  constructor(message, context) {
40
- super("validation_error", message, context);
40
+ super("validation-error", message, context);
41
41
  this.name = "ValidationError";
42
42
  }
43
43
  }
44
44
  exports.ValidationError = ValidationError;
45
45
  class NotFoundError extends AppError {
46
46
  constructor(message, context) {
47
- super("not_found", message, context);
47
+ super("not-found", message, context);
48
48
  this.name = "NotFoundError";
49
49
  }
50
50
  }
@@ -72,35 +72,35 @@ class ConflictError extends AppError {
72
72
  exports.ConflictError = ConflictError;
73
73
  class DailyLimitError extends AppError {
74
74
  constructor(message, context) {
75
- super("daily_limit_reached", message, context);
75
+ super("daily-limit-reached", message, context);
76
76
  this.name = "DailyLimitError";
77
77
  }
78
78
  }
79
79
  exports.DailyLimitError = DailyLimitError;
80
80
  class MonthlyLimitError extends AppError {
81
81
  constructor(message, context) {
82
- super("monthly_limit_reached", message, context);
82
+ super("monthly-limit-reached", message, context);
83
83
  this.name = "MonthlyLimitError";
84
84
  }
85
85
  }
86
86
  exports.MonthlyLimitError = MonthlyLimitError;
87
87
  class NoRecipeFoundError extends AppError {
88
88
  constructor(reason, context) {
89
- super("no_recipe_found", reason, context);
89
+ super("no-recipe-found", reason, context);
90
90
  this.name = "NoRecipeFoundError";
91
91
  }
92
92
  }
93
93
  exports.NoRecipeFoundError = NoRecipeFoundError;
94
94
  class LowConfidenceError extends AppError {
95
95
  constructor(confidence, context) {
96
- super("low_confidence", "We couldn't extract a complete recipe. Try a clearer image or more detailed text.", Object.assign(Object.assign({}, context), { confidence }));
96
+ super("low-confidence", "We couldn't extract a complete recipe. Try a clearer image or more detailed text.", Object.assign(Object.assign({}, context), { confidence }));
97
97
  this.name = "LowConfidenceError";
98
98
  }
99
99
  }
100
100
  exports.LowConfidenceError = LowConfidenceError;
101
101
  class UnsafeContentError extends AppError {
102
102
  constructor(context) {
103
- super("unsafe_content", "This content cannot be processed.", context);
103
+ super("unsafe-content", "This content cannot be processed.", context);
104
104
  this.name = "UnsafeContentError";
105
105
  }
106
106
  }
@@ -1,8 +1,8 @@
1
1
  import { Unit } from "../recipes";
2
2
  export interface IngredientMeta {
3
3
  slug: string;
4
+ optional?: boolean;
4
5
  quantity?: number;
5
- required?: boolean;
6
6
  unit?: Unit;
7
7
  }
8
8
  export interface IngredientContent {
@@ -1 +1 @@
1
- {"version":3,"file":"ingredient.d.ts","sourceRoot":"","sources":["../../../src/types/ingredients/ingredient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc,EAAE,iBAAiB;CAAG"}
1
+ {"version":3,"file":"ingredient.d.ts","sourceRoot":"","sources":["../../../src/types/ingredients/ingredient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc,EAAE,iBAAiB;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"difficulty.d.ts","sourceRoot":"","sources":["../../../src/types/recipes/difficulty.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,+CAKpB,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"difficulty.d.ts","sourceRoot":"","sources":["../../../src/types/recipes/difficulty.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,+CAAgD,CAAC;AAC/E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,10 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DIFFICULTY_VALUES = void 0;
4
- exports.DIFFICULTY_VALUES = [
5
- "easy",
6
- "medium",
7
- "hard",
8
- "expert",
9
- ];
4
+ exports.DIFFICULTY_VALUES = ["easy", "medium", "hard", "expert"];
10
5
  //# sourceMappingURL=difficulty.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"difficulty.js","sourceRoot":"","sources":["../../../src/types/recipes/difficulty.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,MAAM;IACN,QAAQ;IACR,MAAM;IACN,QAAQ;CACA,CAAC"}
1
+ {"version":3,"file":"difficulty.js","sourceRoot":"","sources":["../../../src/types/recipes/difficulty.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"spiciness.d.ts","sourceRoot":"","sources":["../../../src/types/recipes/spiciness.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,uDAAwD,CAAC;AACtF,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"spiciness.d.ts","sourceRoot":"","sources":["../../../src/types/recipes/spiciness.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,uDAMnB,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,5 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SPICINESS_VALUES = void 0;
4
- exports.SPICINESS_VALUES = ["none", "mild", "medium", "hot", "extreme"];
4
+ exports.SPICINESS_VALUES = [
5
+ "none",
6
+ "mild",
7
+ "medium",
8
+ "hot",
9
+ "extreme",
10
+ ];
5
11
  //# sourceMappingURL=spiciness.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spiciness.js","sourceRoot":"","sources":["../../../src/types/recipes/spiciness.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAU,CAAC"}
1
+ {"version":3,"file":"spiciness.js","sourceRoot":"","sources":["../../../src/types/recipes/spiciness.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,MAAM;IACN,MAAM;IACN,QAAQ;IACR,KAAK;IACL,SAAS;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../src/types/reports/target.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,WAAW,GAAG,aAAa,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../src/types/reports/target.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,WAAW,GACX,aAAa,GACb,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/types/reports/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,QAAS,SAAQ,gBAAgB;IAChD,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,WAAW,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;CAC/E;AAED,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,gBAAgB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/types/reports/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAS,SAAQ,gBAAgB;IAChD,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,WAAW,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;CAC/E;AAED,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,gBAAgB,GAAG,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"update_type.d.ts","sourceRoot":"","sources":["../../../src/types/reports/update_type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,uCAI5B,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"update_type.d.ts","sourceRoot":"","sources":["../../../src/types/reports/update_type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,uCAAwC,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,9 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.REPORT_UPDATE_TYPE_VALUES = void 0;
4
- exports.REPORT_UPDATE_TYPE_VALUES = [
5
- "ai",
6
- "note",
7
- "resolution",
8
- ];
4
+ exports.REPORT_UPDATE_TYPE_VALUES = ["ai", "note", "resolution"];
9
5
  //# sourceMappingURL=update_type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update_type.js","sourceRoot":"","sources":["../../../src/types/reports/update_type.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;IACrC,IAAI;IACN,MAAM;IACN,YAAY;CACJ,CAAC"}
1
+ {"version":3,"file":"update_type.js","sourceRoot":"","sources":["../../../src/types/reports/update_type.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/types/subscriptions/store.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,+DAAgE,CAAC;AACvG,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/types/subscriptions/store.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,+DAK5B,CAAC;AACX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SUBSCRIPTION_STORE_VALUES = void 0;
4
- exports.SUBSCRIPTION_STORE_VALUES = ["app_store", "play_store", "promotional", "stripe"];
4
+ exports.SUBSCRIPTION_STORE_VALUES = [
5
+ "app_store",
6
+ "play_store",
7
+ "promotional",
8
+ "stripe",
9
+ ];
5
10
  //# sourceMappingURL=store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/types/subscriptions/store.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,CAAU,CAAC"}
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/types/subscriptions/store.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;IACvC,WAAW;IACX,YAAY;IACZ,aAAa;IACb,QAAQ;CACA,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export * from "./bookmark";
2
2
  export * from "./profile";
3
+ export * from "./request_status";
4
+ export * from "./request";
3
5
  export * from "./user_role";
4
6
  export * from "./user";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./bookmark"), exports);
18
18
  __exportStar(require("./profile"), exports);
19
+ __exportStar(require("./request_status"), exports);
20
+ __exportStar(require("./request"), exports);
19
21
  __exportStar(require("./user_role"), exports);
20
22
  __exportStar(require("./user"), exports);
21
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,mDAAiC;AACjC,4CAA0B;AAC1B,8CAA4B;AAC5B,yCAAuB"}
@@ -0,0 +1,12 @@
1
+ import { EntityBase, Locale } from "../core";
2
+ import { RequestStatus } from "./request_status";
3
+ export interface Request extends EntityBase {
4
+ status: RequestStatus;
5
+ locale: Locale;
6
+ url?: string;
7
+ images?: string[];
8
+ text?: string;
9
+ recipeId?: string;
10
+ error?: string;
11
+ }
12
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/types/users/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/types/users/request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export declare const REQUEST_STATUS_VALUES: readonly ["pending", "processing", "done", "failed"];
2
+ export type RequestStatus = (typeof REQUEST_STATUS_VALUES)[number];
3
+ //# sourceMappingURL=request_status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request_status.d.ts","sourceRoot":"","sources":["../../../src/types/users/request_status.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,sDAKxB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REQUEST_STATUS_VALUES = void 0;
4
+ exports.REQUEST_STATUS_VALUES = [
5
+ "pending",
6
+ "processing",
7
+ "done",
8
+ "failed",
9
+ ];
10
+ //# sourceMappingURL=request_status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request_status.js","sourceRoot":"","sources":["../../../src/types/users/request_status.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACnC,SAAS;IACT,YAAY;IACZ,MAAM;IACN,QAAQ;CACA,CAAC"}
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
- {
2
- "name": "@cravery/core",
3
- "version": "0.0.60",
4
- "description": "Clean architecture foundation for Cravery",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "default": "./dist/index.js"
11
- }
12
- },
13
- "typesVersions": {
14
- "*": {
15
- "types": [
16
- "dist/types/index.d.ts"
17
- ]
18
- }
19
- },
20
- "scripts": {
21
- "build": "tsc",
22
- "build:watch": "tsc --watch",
23
- "clean": "rimraf dist && npm run build"
24
- },
25
- "keywords": [],
26
- "devDependencies": {
27
- "rimraf": "^6.1.2",
28
- "typescript": "^5.9.3"
29
- },
30
- "files": [
31
- "dist/**/*",
32
- "src/**/*"
33
- ]
34
- }
1
+ {
2
+ "name": "@cravery/core",
3
+ "version": "0.0.62",
4
+ "description": "Clean architecture foundation for Cravery",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ }
12
+ },
13
+ "typesVersions": {
14
+ "*": {
15
+ "types": [
16
+ "dist/types/index.d.ts"
17
+ ]
18
+ }
19
+ },
20
+ "scripts": {
21
+ "build": "tsc",
22
+ "build:watch": "tsc --watch",
23
+ "clean": "rimraf dist && npm run build"
24
+ },
25
+ "keywords": [],
26
+ "devDependencies": {
27
+ "rimraf": "^6.1.2",
28
+ "typescript": "^5.9.3"
29
+ },
30
+ "files": [
31
+ "dist/**/*",
32
+ "src/**/*"
33
+ ]
34
+ }
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export * from "./types";
1
+ export * from "./types";
@@ -1,13 +1,13 @@
1
- import { EntityStatus } from "./entity_status";
2
- import { Timestamp } from "./timestamp";
3
-
4
- export interface EntityBase {
5
- id: string;
6
- createdAt: Timestamp;
7
- updatedAt: Timestamp;
8
- deletedAt?: Timestamp;
9
- }
10
-
11
- export interface Entity extends EntityBase {
12
- status: EntityStatus;
13
- }
1
+ import { EntityStatus } from "./entity_status";
2
+ import { Timestamp } from "./timestamp";
3
+
4
+ export interface EntityBase {
5
+ id: string;
6
+ createdAt: Timestamp;
7
+ updatedAt: Timestamp;
8
+ deletedAt?: Timestamp;
9
+ }
10
+
11
+ export interface Entity extends EntityBase {
12
+ status: EntityStatus;
13
+ }
@@ -1,9 +1,9 @@
1
- export const ENTITY_STATUS_VALUES = [
2
- "active",
3
- "archived",
4
- "deleted",
5
- "flagged",
6
- "pending",
7
- "suspended",
8
- ] as const;
9
- export type EntityStatus = (typeof ENTITY_STATUS_VALUES)[number];
1
+ export const ENTITY_STATUS_VALUES = [
2
+ "active",
3
+ "archived",
4
+ "deleted",
5
+ "flagged",
6
+ "pending",
7
+ "suspended",
8
+ ] as const;
9
+ export type EntityStatus = (typeof ENTITY_STATUS_VALUES)[number];