@cravery/types 0.0.7 → 0.0.9

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 (193) hide show
  1. package/dist/common/currency.d.ts +2 -1
  2. package/dist/common/currency.d.ts.map +1 -1
  3. package/dist/common/currency.js +9 -0
  4. package/dist/common/currency.js.map +1 -1
  5. package/dist/common/index.d.ts +1 -3
  6. package/dist/common/index.d.ts.map +1 -1
  7. package/dist/common/index.js +1 -3
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/common/meal_type.d.ts +1 -1
  10. package/dist/common/meal_type.d.ts.map +1 -1
  11. package/dist/common/meal_type.js +3 -1
  12. package/dist/common/meal_type.js.map +1 -1
  13. package/dist/common/measurement.d.ts +3 -0
  14. package/dist/common/measurement.d.ts.map +1 -0
  15. package/dist/common/measurement.js +5 -0
  16. package/dist/common/measurement.js.map +1 -0
  17. package/dist/common/temperature.d.ts +2 -1
  18. package/dist/common/temperature.d.ts.map +1 -1
  19. package/dist/common/temperature.js +2 -0
  20. package/dist/common/temperature.js.map +1 -1
  21. package/dist/common/unit.d.ts +1 -1
  22. package/dist/common/unit.d.ts.map +1 -1
  23. package/dist/common/unit.js +1 -0
  24. package/dist/common/unit.js.map +1 -1
  25. package/dist/core/entity.d.ts +6 -4
  26. package/dist/core/entity.d.ts.map +1 -1
  27. package/dist/core/entity.js +8 -0
  28. package/dist/core/entity.js.map +1 -1
  29. package/dist/core/errors.d.ts +65 -25
  30. package/dist/core/errors.d.ts.map +1 -1
  31. package/dist/core/errors.js +114 -57
  32. package/dist/core/errors.js.map +1 -1
  33. package/dist/core/index.d.ts +0 -1
  34. package/dist/core/index.d.ts.map +1 -1
  35. package/dist/core/index.js +0 -1
  36. package/dist/core/index.js.map +1 -1
  37. package/dist/core/locale.d.ts +3 -0
  38. package/dist/core/locale.d.ts.map +1 -1
  39. package/dist/core/timestamp.d.ts +1 -4
  40. package/dist/core/timestamp.d.ts.map +1 -1
  41. package/dist/equipment/entity.d.ts +4 -9
  42. package/dist/equipment/entity.d.ts.map +1 -1
  43. package/dist/equipment/user.d.ts +4 -5
  44. package/dist/equipment/user.d.ts.map +1 -1
  45. package/dist/feed/recipe.d.ts +3 -3
  46. package/dist/feed/recipe.d.ts.map +1 -1
  47. package/dist/index.d.ts +2 -2
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +2 -2
  50. package/dist/index.js.map +1 -1
  51. package/dist/ingredients/entity.d.ts +4 -9
  52. package/dist/ingredients/entity.d.ts.map +1 -1
  53. package/dist/ingredients/user.d.ts +4 -5
  54. package/dist/ingredients/user.d.ts.map +1 -1
  55. package/dist/limits/limits.d.ts +1 -1
  56. package/dist/limits/limits.d.ts.map +1 -1
  57. package/dist/limits/usage.d.ts +7 -2
  58. package/dist/limits/usage.d.ts.map +1 -1
  59. package/dist/recipes/index.d.ts +0 -1
  60. package/dist/recipes/index.d.ts.map +1 -1
  61. package/dist/recipes/index.js +0 -1
  62. package/dist/recipes/index.js.map +1 -1
  63. package/dist/recipes/meta.d.ts +0 -2
  64. package/dist/recipes/meta.d.ts.map +1 -1
  65. package/dist/recipes/recipe.d.ts +0 -2
  66. package/dist/recipes/recipe.d.ts.map +1 -1
  67. package/dist/recipes/request.d.ts +2 -2
  68. package/dist/recipes/request.d.ts.map +1 -1
  69. package/dist/recipes/stats.d.ts +2 -1
  70. package/dist/recipes/stats.d.ts.map +1 -1
  71. package/dist/recipes/user.d.ts +3 -3
  72. package/dist/recipes/user.d.ts.map +1 -1
  73. package/dist/reports/report.d.ts +0 -2
  74. package/dist/reports/report.d.ts.map +1 -1
  75. package/dist/settings/settings.d.ts +1 -0
  76. package/dist/settings/settings.d.ts.map +1 -1
  77. package/dist/shopping/equipment.d.ts +6 -1
  78. package/dist/shopping/equipment.d.ts.map +1 -1
  79. package/dist/shopping/ingredient.d.ts +10 -3
  80. package/dist/shopping/ingredient.d.ts.map +1 -1
  81. package/dist/subscription/billing.d.ts +3 -0
  82. package/dist/subscription/billing.d.ts.map +1 -0
  83. package/dist/subscription/billing.js +5 -0
  84. package/dist/subscription/billing.js.map +1 -0
  85. package/dist/subscription/index.d.ts +10 -0
  86. package/dist/subscription/index.d.ts.map +1 -0
  87. package/dist/subscription/index.js +26 -0
  88. package/dist/subscription/index.js.map +1 -0
  89. package/dist/subscription/member.d.ts +10 -0
  90. package/dist/subscription/member.d.ts.map +1 -0
  91. package/dist/subscription/member.js +3 -0
  92. package/dist/subscription/member.js.map +1 -0
  93. package/dist/subscription/member_status.d.ts +3 -0
  94. package/dist/subscription/member_status.d.ts.map +1 -0
  95. package/dist/subscription/member_status.js +10 -0
  96. package/dist/subscription/member_status.js.map +1 -0
  97. package/dist/subscription/role.d.ts +3 -0
  98. package/dist/subscription/role.d.ts.map +1 -0
  99. package/dist/subscription/role.js +5 -0
  100. package/dist/subscription/role.js.map +1 -0
  101. package/dist/subscription/sharing.d.ts +6 -0
  102. package/dist/subscription/sharing.d.ts.map +1 -0
  103. package/dist/subscription/sharing.js +3 -0
  104. package/dist/subscription/sharing.js.map +1 -0
  105. package/dist/subscription/status.d.ts +3 -0
  106. package/dist/subscription/status.d.ts.map +1 -0
  107. package/dist/subscription/status.js +14 -0
  108. package/dist/subscription/status.js.map +1 -0
  109. package/dist/subscription/store.d.ts +3 -0
  110. package/dist/subscription/store.d.ts.map +1 -0
  111. package/dist/subscription/store.js +10 -0
  112. package/dist/subscription/store.js.map +1 -0
  113. package/dist/subscription/subscription.d.ts +24 -0
  114. package/dist/subscription/subscription.d.ts.map +1 -0
  115. package/dist/subscription/subscription.js +3 -0
  116. package/dist/subscription/subscription.js.map +1 -0
  117. package/dist/subscription/tier.d.ts +3 -0
  118. package/dist/subscription/tier.d.ts.map +1 -0
  119. package/dist/subscription/tier.js +5 -0
  120. package/dist/subscription/tier.js.map +1 -0
  121. package/dist/users/index.d.ts +4 -0
  122. package/dist/users/index.d.ts.map +1 -0
  123. package/dist/users/index.js +20 -0
  124. package/dist/users/index.js.map +1 -0
  125. package/dist/users/role.d.ts +5 -0
  126. package/dist/users/role.d.ts.map +1 -0
  127. package/dist/users/role.js +18 -0
  128. package/dist/users/role.js.map +1 -0
  129. package/dist/users/status.d.ts +3 -0
  130. package/dist/users/status.d.ts.map +1 -0
  131. package/dist/users/status.js +12 -0
  132. package/dist/users/status.js.map +1 -0
  133. package/dist/users/user.d.ts +16 -0
  134. package/dist/users/user.d.ts.map +1 -0
  135. package/dist/users/user.js +3 -0
  136. package/dist/users/user.js.map +1 -0
  137. package/package.json +1 -1
  138. package/src/common/currency.ts +9 -1
  139. package/src/common/index.ts +1 -3
  140. package/src/common/meal_type.ts +3 -1
  141. package/src/common/temperature.ts +2 -1
  142. package/src/common/unit.ts +1 -0
  143. package/src/core/entity.ts +13 -4
  144. package/src/core/errors.ts +207 -52
  145. package/src/core/index.ts +0 -1
  146. package/src/core/locale.ts +4 -0
  147. package/src/core/timestamp.ts +1 -4
  148. package/src/equipment/entity.ts +4 -11
  149. package/src/equipment/user.ts +4 -6
  150. package/src/feed/recipe.ts +3 -3
  151. package/src/index.ts +2 -2
  152. package/src/ingredients/entity.ts +4 -11
  153. package/src/ingredients/user.ts +4 -6
  154. package/src/limits/limits.ts +1 -1
  155. package/src/limits/usage.ts +8 -2
  156. package/src/recipes/index.ts +0 -1
  157. package/src/recipes/meta.ts +0 -2
  158. package/src/recipes/recipe.ts +0 -2
  159. package/src/recipes/request.ts +2 -2
  160. package/src/recipes/stats.ts +3 -1
  161. package/src/recipes/user.ts +3 -3
  162. package/src/reports/report.ts +0 -3
  163. package/src/settings/settings.ts +1 -0
  164. package/src/shopping/equipment.ts +6 -1
  165. package/src/shopping/ingredient.ts +10 -3
  166. package/src/subscription/index.ts +9 -0
  167. package/src/{subscriptions → subscription}/member.ts +3 -3
  168. package/src/subscription/sharing.ts +5 -0
  169. package/src/subscription/subscription.ts +24 -0
  170. package/src/{iam → users}/role.ts +8 -0
  171. package/src/{iam → users}/user.ts +2 -0
  172. package/src/common/currency_code.ts +0 -10
  173. package/src/common/temperature_unit.ts +0 -2
  174. package/src/core/region.ts +0 -11
  175. package/src/interactions/collection.ts +0 -7
  176. package/src/interactions/cooked.ts +0 -6
  177. package/src/interactions/event.ts +0 -11
  178. package/src/interactions/event_type.ts +0 -9
  179. package/src/interactions/index.ts +0 -6
  180. package/src/interactions/rated.ts +0 -6
  181. package/src/interactions/saved.ts +0 -6
  182. package/src/recipes/status.ts +0 -8
  183. package/src/subscriptions/index.ts +0 -8
  184. package/src/subscriptions/subscription.ts +0 -22
  185. /package/src/common/{measurement_system.ts → measurement.ts} +0 -0
  186. /package/src/{subscriptions/billing_period.ts → subscription/billing.ts} +0 -0
  187. /package/src/{subscriptions → subscription}/member_status.ts +0 -0
  188. /package/src/{subscriptions/subscription_role.ts → subscription/role.ts} +0 -0
  189. /package/src/{subscriptions/subscription_status.ts → subscription/status.ts} +0 -0
  190. /package/src/{subscriptions → subscription}/store.ts +0 -0
  191. /package/src/{subscriptions/subscription_tier.ts → subscription/tier.ts} +0 -0
  192. /package/src/{iam → users}/index.ts +0 -0
  193. /package/src/{iam → users}/status.ts +0 -0
@@ -1,4 +1,5 @@
1
- import { CurrencyCode } from "./currency_code";
1
+ export declare const CURRENCY_CODE_VALUES: readonly ["AED", "CAD", "EGP", "EUR", "SAR", "USD"];
2
+ export type CurrencyCode = (typeof CURRENCY_CODE_VALUES)[number];
2
3
  export interface Currency {
3
4
  amount: number;
4
5
  currency: CurrencyCode;
@@ -1 +1 @@
1
- {"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../src/common/currency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,YAAY,CAAC;CACxB"}
1
+ {"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../src/common/currency.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,qDAOvB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,YAAY,CAAC;CACxB"}
@@ -1,3 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CURRENCY_CODE_VALUES = void 0;
4
+ exports.CURRENCY_CODE_VALUES = [
5
+ "AED",
6
+ "CAD",
7
+ "EGP",
8
+ "EUR",
9
+ "SAR",
10
+ "USD",
11
+ ];
3
12
  //# sourceMappingURL=currency.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"currency.js","sourceRoot":"","sources":["../../src/common/currency.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"currency.js","sourceRoot":"","sources":["../../src/common/currency.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACG,CAAC"}
@@ -1,14 +1,12 @@
1
1
  export * from "./allergen";
2
2
  export * from "./cuisine";
3
3
  export * from "./currency";
4
- export * from "./currency_code";
5
4
  export * from "./dietary_tag";
6
5
  export * from "./difficulty";
7
6
  export * from "./meal_type";
8
- export * from "./measurement_system";
7
+ export * from "./measurement";
9
8
  export * from "./nutrition";
10
9
  export * from "./spiciness";
11
- export * from "./temperature_unit";
12
10
  export * from "./temperature";
13
11
  export * from "./unit";
14
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
@@ -17,14 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./allergen"), exports);
18
18
  __exportStar(require("./cuisine"), exports);
19
19
  __exportStar(require("./currency"), exports);
20
- __exportStar(require("./currency_code"), exports);
21
20
  __exportStar(require("./dietary_tag"), exports);
22
21
  __exportStar(require("./difficulty"), exports);
23
22
  __exportStar(require("./meal_type"), exports);
24
- __exportStar(require("./measurement_system"), exports);
23
+ __exportStar(require("./measurement"), exports);
25
24
  __exportStar(require("./nutrition"), exports);
26
25
  __exportStar(require("./spiciness"), exports);
27
- __exportStar(require("./temperature_unit"), exports);
28
26
  __exportStar(require("./temperature"), exports);
29
27
  __exportStar(require("./unit"), exports);
30
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B;AAC3B,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,uDAAqC;AACrC,8CAA4B;AAC5B,8CAA4B;AAC5B,qDAAmC;AACnC,gDAA8B;AAC9B,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,gDAA8B;AAC9B,yCAAuB"}
@@ -1,3 +1,3 @@
1
- export declare const MEAL_TYPE_VALUES: readonly ["appetizer", "breakfast", "brunch", "dessert", "dinner", "drink", "lunch", "sauce", "side", "snack"];
1
+ export declare const MEAL_TYPE_VALUES: readonly ["appetizer", "breakfast", "brunch", "condiment", "dessert", "dinner", "drink", "lunch", "salad", "side", "snack", "soup"];
2
2
  export type MealType = (typeof MEAL_TYPE_VALUES)[number];
3
3
  //# sourceMappingURL=meal_type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meal_type.d.ts","sourceRoot":"","sources":["../../src/common/meal_type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,gHAWnB,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"meal_type.d.ts","sourceRoot":"","sources":["../../src/common/meal_type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,qIAanB,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -5,12 +5,14 @@ exports.MEAL_TYPE_VALUES = [
5
5
  "appetizer",
6
6
  "breakfast",
7
7
  "brunch",
8
+ "condiment",
8
9
  "dessert",
9
10
  "dinner",
10
11
  "drink",
11
12
  "lunch",
12
- "sauce",
13
+ "salad",
13
14
  "side",
14
15
  "snack",
16
+ "soup",
15
17
  ];
16
18
  //# sourceMappingURL=meal_type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meal_type.js","sourceRoot":"","sources":["../../src/common/meal_type.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,WAAW;IACX,WAAW;IACX,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;CACC,CAAC"}
1
+ {"version":3,"file":"meal_type.js","sourceRoot":"","sources":["../../src/common/meal_type.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,WAAW;IACX,WAAW;IACX,QAAQ;IACR,WAAW;IACX,SAAS;IACT,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;CACE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const MEASUREMENT_SYSTEM_VALUES: readonly ["imperial", "metric"];
2
+ export type MeasurementSystem = (typeof MEASUREMENT_SYSTEM_VALUES)[number];
3
+ //# sourceMappingURL=measurement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../../src/common/measurement.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,iCAAkC,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MEASUREMENT_SYSTEM_VALUES = void 0;
4
+ exports.MEASUREMENT_SYSTEM_VALUES = ["imperial", "metric"];
5
+ //# sourceMappingURL=measurement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurement.js","sourceRoot":"","sources":["../../src/common/measurement.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAU,CAAC"}
@@ -1,4 +1,5 @@
1
- import { TemperatureUnit } from "./temperature_unit";
1
+ export declare const TEMPERATURE_UNIT_VALUES: readonly ["celsius", "fahrenheit"];
2
+ export type TemperatureUnit = (typeof TEMPERATURE_UNIT_VALUES)[number];
2
3
  export interface Temperature {
3
4
  unit: TemperatureUnit;
4
5
  value: number;
@@ -1 +1 @@
1
- {"version":3,"file":"temperature.d.ts","sourceRoot":"","sources":["../../src/common/temperature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"temperature.d.ts","sourceRoot":"","sources":["../../src/common/temperature.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,oCAAqC,CAAC;AAC1E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TEMPERATURE_UNIT_VALUES = void 0;
4
+ exports.TEMPERATURE_UNIT_VALUES = ["celsius", "fahrenheit"];
3
5
  //# sourceMappingURL=temperature.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"temperature.js","sourceRoot":"","sources":["../../src/common/temperature.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"temperature.js","sourceRoot":"","sources":["../../src/common/temperature.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU,CAAC"}
@@ -1,3 +1,3 @@
1
- export declare const UNIT_VALUES: readonly ["ml", "l", "tsp", "tbsp", "fl_oz", "cup", "pint", "quart", "gallon", "mg", "g", "kg", "oz", "lb", "piece", "whole", "half", "quarter", "slice", "serving", "clove", "stalk", "sprig", "leaf", "bunch", "head", "fillet", "stick", "sheet", "can", "package", "bottle", "jar", "handful", "pinch", "dash", "drop"];
1
+ export declare const UNIT_VALUES: readonly ["ml", "l", "tsp", "tbsp", "fl_oz", "cup", "pint", "quart", "gallon", "mg", "g", "kg", "oz", "lb", "piece", "whole", "half", "quarter", "scoop", "slice", "serving", "clove", "stalk", "sprig", "leaf", "bunch", "head", "fillet", "stick", "sheet", "can", "package", "bottle", "jar", "handful", "pinch", "dash", "drop"];
2
2
  export type Unit = (typeof UNIT_VALUES)[number];
3
3
  //# sourceMappingURL=unit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../src/common/unit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,6TA8Cd,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../src/common/unit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,sUA+Cd,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -25,6 +25,7 @@ exports.UNIT_VALUES = [
25
25
  "whole",
26
26
  "half",
27
27
  "quarter",
28
+ "scoop",
28
29
  "slice",
29
30
  "serving",
30
31
  // Produce-specific
@@ -1 +1 @@
1
- {"version":3,"file":"unit.js","sourceRoot":"","sources":["../../src/common/unit.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,kBAAkB;IAClB,IAAI;IACJ,GAAG;IACH,oBAAoB;IACpB,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,kBAAkB;IAClB,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,oBAAoB;IACpB,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,OAAO;IACP,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,SAAS;IACT,mBAAmB;IACnB,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,YAAY;IACZ,KAAK;IACL,SAAS;IACT,QAAQ;IACR,KAAK;IACL,YAAY;IACZ,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;CACE,CAAC"}
1
+ {"version":3,"file":"unit.js","sourceRoot":"","sources":["../../src/common/unit.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,kBAAkB;IAClB,IAAI;IACJ,GAAG;IACH,oBAAoB;IACpB,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,kBAAkB;IAClB,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,oBAAoB;IACpB,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,OAAO;IACP,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,OAAO;IACP,SAAS;IACT,mBAAmB;IACnB,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,YAAY;IACZ,KAAK;IACL,SAAS;IACT,QAAQ;IACR,KAAK;IACL,YAAY;IACZ,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;CACE,CAAC"}
@@ -1,8 +1,10 @@
1
- import { Timestamp } from "./timestamp";
1
+ import { UnixTimestamp } from "./timestamp";
2
+ export declare const ENTITY_STATUSES: readonly ["active", "archived", "deleted", "flagged", "pending"];
3
+ export type EntityStatus = (typeof ENTITY_STATUSES)[number];
2
4
  export interface Entity {
3
5
  id: string;
4
- createdAt: Timestamp;
5
- updatedAt: Timestamp;
6
- deletedAt: Timestamp | null;
6
+ createdAt: UnixTimestamp;
7
+ updatedAt: UnixTimestamp;
8
+ deletedAt: UnixTimestamp | null;
7
9
  }
8
10
  //# sourceMappingURL=entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/core/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC7B"}
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/core/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,eAAO,MAAM,eAAe,kEAMlB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;CACjC"}
@@ -1,3 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ENTITY_STATUSES = void 0;
4
+ exports.ENTITY_STATUSES = [
5
+ "active",
6
+ "archived",
7
+ "deleted",
8
+ "flagged",
9
+ "pending",
10
+ ];
3
11
  //# sourceMappingURL=entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/core/entity.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/core/entity.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG;IAC7B,QAAQ;IACR,UAAU;IACV,SAAS;IACT,SAAS;IACT,SAAS;CACD,CAAC"}
@@ -1,44 +1,84 @@
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
- export type AppErrorCode = (typeof APP_ERROR_CODE_VALUES)[number];
1
+ import { UnixTimestamp } from "./timestamp";
2
+ export declare const APP_ERROR_CODES: readonly ["bad-request", "unauthorized", "forbidden", "not-found", "conflict", "validation-error", "quota-exceeded", "rate-limited", "internal-error", "service-unavailable"];
3
+ export type AppErrorCode = (typeof APP_ERROR_CODES)[number];
4
+ export declare const HTTP_STATUS_MAP: Record<AppErrorCode, number>;
5
+ export interface BaseErrorContext {
6
+ requestId?: string;
7
+ [key: string]: unknown;
8
+ }
9
+ export interface ValidationErrorContext extends BaseErrorContext {
10
+ fields: Array<{
11
+ path: string;
12
+ message: string;
13
+ code?: string;
14
+ }>;
15
+ }
16
+ export interface QuotaErrorContext extends BaseErrorContext {
17
+ quotaType: "daily" | "monthly";
18
+ resource: string;
19
+ limit: number;
20
+ used: number;
21
+ resetsAt?: UnixTimestamp;
22
+ }
23
+ export interface RateLimitErrorContext extends BaseErrorContext {
24
+ retryAfterSeconds?: number;
25
+ }
26
+ export interface NotFoundErrorContext extends BaseErrorContext {
27
+ resourceType: string;
28
+ resourceId?: string;
29
+ }
3
30
  export declare class AppError extends Error {
4
31
  readonly code: AppErrorCode;
5
- readonly context?: Record<string, unknown>;
6
- constructor(code: AppErrorCode, message: string, context?: Record<string, unknown>);
32
+ readonly context: BaseErrorContext;
33
+ readonly statusCode: number;
34
+ constructor(code: AppErrorCode, message: string, context?: BaseErrorContext);
7
35
  toJSON(): {
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";
36
+ code: AppErrorCode;
10
37
  message: string;
11
- context: Record<string, unknown> | undefined;
38
+ details?: Record<string, unknown>;
39
+ requestId?: string;
12
40
  };
41
+ withRequestId(requestId: string): AppError;
13
42
  }
14
- export declare class ValidationError extends AppError {
15
- constructor(message: string, context?: Record<string, unknown>);
16
- }
17
- export declare class NotFoundError extends AppError {
18
- constructor(message: string, context?: Record<string, unknown>);
43
+ export declare function isAppError(error: unknown): error is AppError;
44
+ export declare function isAppErrorCode(code: unknown): code is AppErrorCode;
45
+ export declare class BadRequestError extends AppError {
46
+ constructor(message: string, context?: BaseErrorContext);
19
47
  }
20
48
  export declare class UnauthorizedError extends AppError {
21
- constructor(message: string, context?: Record<string, unknown>);
49
+ constructor(message?: string, context?: BaseErrorContext);
22
50
  }
23
51
  export declare class ForbiddenError extends AppError {
24
- constructor(message: string, context?: Record<string, unknown>);
52
+ constructor(message?: string, context?: BaseErrorContext);
53
+ }
54
+ export declare class NotFoundError extends AppError {
55
+ constructor(resourceType: string, resourceId?: string, context?: Omit<NotFoundErrorContext, "resourceType" | "resourceId">);
25
56
  }
26
57
  export declare class ConflictError extends AppError {
27
- constructor(message: string, context?: Record<string, unknown>);
58
+ constructor(message: string, context?: BaseErrorContext);
28
59
  }
29
- export declare class DailyLimitError extends AppError {
30
- constructor(message: string, context?: Record<string, unknown>);
60
+ export declare class ValidationError extends AppError {
61
+ readonly fields: ValidationErrorContext["fields"];
62
+ constructor(message: string, fields?: ValidationErrorContext["fields"], context?: Omit<ValidationErrorContext, "fields">);
63
+ static fromFieldErrors(fields: ValidationErrorContext["fields"], context?: Omit<ValidationErrorContext, "fields">): ValidationError;
31
64
  }
32
- export declare class MonthlyLimitError extends AppError {
33
- constructor(message: string, context?: Record<string, unknown>);
65
+ export declare class QuotaExceededError extends AppError {
66
+ readonly quotaType: "daily" | "monthly";
67
+ readonly resource: string;
68
+ readonly limit: number;
69
+ readonly used: number;
70
+ readonly resetsAt?: string;
71
+ constructor(quotaType: "daily" | "monthly", resource: string, limit: number, used: number, resetsAt?: string, context?: Omit<QuotaErrorContext, "quotaType" | "resource" | "limit" | "used" | "resetsAt">);
34
72
  }
35
- export declare class NoRecipeFoundError extends AppError {
36
- constructor(reason: string, context?: Record<string, unknown>);
73
+ export declare class RateLimitedError extends AppError {
74
+ readonly retryAfterSeconds?: number;
75
+ constructor(message?: string, retryAfterSeconds?: number, context?: Omit<RateLimitErrorContext, "retryAfterSeconds">);
37
76
  }
38
- export declare class LowConfidenceError extends AppError {
39
- constructor(confidence: number, context?: Record<string, unknown>);
77
+ export declare class InternalError extends AppError {
78
+ constructor(message?: string, context?: BaseErrorContext);
79
+ static wrap(error: unknown, context?: BaseErrorContext): InternalError;
40
80
  }
41
- export declare class UnsafeContentError extends AppError {
42
- constructor(context?: Record<string, unknown>);
81
+ export declare class ServiceUnavailableError extends AppError {
82
+ constructor(service: string, message?: string, context?: BaseErrorContext);
43
83
  }
44
84
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,6NAaxB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,qBAAa,QAAS,SAAQ,KAAK;IACjC,SAAgB,IAAI,EAAE,YAAY,CAAC;IACnC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAGhD,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAYnC,MAAM;;;;;;CAQP;AAED,qBAAa,eAAgB,SAAQ,QAAQ;gBAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D;AAED,qBAAa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AmB,SAAQ,QAAQ;IAC9C,SAAgB,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAGhC,SAAS,EAAE,OAAO,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,GAAE,IAAI,CACX,iBAAiB,EACjB,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CACpD;CAkBT;AAED,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,SAAgB,iBAAiB,CAAC,EAAE,MAAM,CAAC;gBAGzC,OAAO,GAAE,MAAqD,EAC9D,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,GAAE,IAAI,CAAC,qBAAqB,EAAE,mBAAmB,CAAM;CAMjE;AAED,qBAAa,aAAc,SAAQ,QAAQ;gBAEvC,OAAO,GAAE,MAAuC,EAChD,OAAO,GAAE,gBAAqB;IAMhC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,GAAE,gBAAqB,GAAG,aAAa;CAW3E;AAED,qBAAa,uBAAwB,SAAQ,QAAQ;gBAEjD,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,GAAE,gBAAqB;CASjC"}
@@ -1,108 +1,165 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
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
- exports.APP_ERROR_CODE_VALUES = [
14
+ exports.ServiceUnavailableError = exports.InternalError = exports.RateLimitedError = exports.QuotaExceededError = exports.ValidationError = exports.ConflictError = exports.NotFoundError = exports.ForbiddenError = exports.UnauthorizedError = exports.BadRequestError = exports.AppError = exports.HTTP_STATUS_MAP = exports.APP_ERROR_CODES = void 0;
15
+ exports.isAppError = isAppError;
16
+ exports.isAppErrorCode = isAppErrorCode;
17
+ exports.APP_ERROR_CODES = [
5
18
  "bad-request",
6
- "conflict",
7
- "daily-limit-reached",
19
+ "unauthorized",
8
20
  "forbidden",
9
- "internal-error",
10
- "low-confidence",
11
- "monthly-limit-reached",
12
21
  "not-found",
13
- "no-recipe-found",
14
- "unauthorized",
15
- "unsafe-content",
22
+ "conflict",
16
23
  "validation-error",
24
+ "quota-exceeded",
25
+ "rate-limited",
26
+ "internal-error",
27
+ "service-unavailable",
17
28
  ];
29
+ exports.HTTP_STATUS_MAP = {
30
+ "bad-request": 400,
31
+ unauthorized: 401,
32
+ forbidden: 403,
33
+ "not-found": 404,
34
+ conflict: 409,
35
+ "validation-error": 422,
36
+ "quota-exceeded": 429,
37
+ "rate-limited": 429,
38
+ "internal-error": 500,
39
+ "service-unavailable": 503,
40
+ };
18
41
  class AppError extends Error {
19
- constructor(code, message, context) {
42
+ constructor(code, message, context = {}) {
20
43
  super(message);
21
44
  this.name = "AppError";
22
45
  this.code = code;
23
46
  this.context = context;
47
+ this.statusCode = exports.HTTP_STATUS_MAP[code];
24
48
  if (Error.captureStackTrace) {
25
- Error.captureStackTrace(this, AppError);
49
+ Error.captureStackTrace(this, this.constructor);
26
50
  }
51
+ Object.setPrototypeOf(this, new.target.prototype);
27
52
  }
28
53
  toJSON() {
29
- return {
30
- name: this.name,
31
- code: this.code,
32
- message: this.message,
33
- context: this.context,
34
- };
54
+ const _a = this.context, { requestId } = _a, details = __rest(_a, ["requestId"]);
55
+ return Object.assign(Object.assign({ code: this.code, message: this.message }, (Object.keys(details).length > 0 && { details })), (requestId && { requestId }));
56
+ }
57
+ withRequestId(requestId) {
58
+ return new this.constructor(this.code, this.message, Object.assign(Object.assign({}, this.context), { requestId }));
35
59
  }
36
60
  }
37
61
  exports.AppError = AppError;
38
- class ValidationError extends AppError {
39
- constructor(message, context) {
40
- super("validation-error", message, context);
41
- this.name = "ValidationError";
42
- }
62
+ function isAppError(error) {
63
+ return error instanceof AppError;
43
64
  }
44
- exports.ValidationError = ValidationError;
45
- class NotFoundError extends AppError {
46
- constructor(message, context) {
47
- super("not-found", message, context);
48
- this.name = "NotFoundError";
65
+ function isAppErrorCode(code) {
66
+ return (typeof code === "string" && exports.APP_ERROR_CODES.includes(code));
67
+ }
68
+ class BadRequestError extends AppError {
69
+ constructor(message, context = {}) {
70
+ super("bad-request", message, context);
71
+ this.name = "BadRequestError";
49
72
  }
50
73
  }
51
- exports.NotFoundError = NotFoundError;
74
+ exports.BadRequestError = BadRequestError;
52
75
  class UnauthorizedError extends AppError {
53
- constructor(message, context) {
76
+ constructor(message = "Authentication required", context = {}) {
54
77
  super("unauthorized", message, context);
55
78
  this.name = "UnauthorizedError";
56
79
  }
57
80
  }
58
81
  exports.UnauthorizedError = UnauthorizedError;
59
82
  class ForbiddenError extends AppError {
60
- constructor(message, context) {
83
+ constructor(message = "You do not have permission to perform this action", context = {}) {
61
84
  super("forbidden", message, context);
62
85
  this.name = "ForbiddenError";
63
86
  }
64
87
  }
65
88
  exports.ForbiddenError = ForbiddenError;
89
+ class NotFoundError extends AppError {
90
+ constructor(resourceType, resourceId, context = {}) {
91
+ const message = resourceId
92
+ ? `${resourceType} not found: ${resourceId}`
93
+ : `${resourceType} not found`;
94
+ super("not-found", message, Object.assign(Object.assign({}, context), { resourceType, resourceId }));
95
+ this.name = "NotFoundError";
96
+ }
97
+ }
98
+ exports.NotFoundError = NotFoundError;
66
99
  class ConflictError extends AppError {
67
- constructor(message, context) {
100
+ constructor(message, context = {}) {
68
101
  super("conflict", message, context);
69
102
  this.name = "ConflictError";
70
103
  }
71
104
  }
72
105
  exports.ConflictError = ConflictError;
73
- class DailyLimitError extends AppError {
74
- constructor(message, context) {
75
- super("daily-limit-reached", message, context);
76
- this.name = "DailyLimitError";
106
+ class ValidationError extends AppError {
107
+ constructor(message, fields = [], context = {}) {
108
+ super("validation-error", message, Object.assign(Object.assign({}, context), { fields }));
109
+ this.name = "ValidationError";
110
+ this.fields = fields;
111
+ }
112
+ static fromFieldErrors(fields, context = {}) {
113
+ const message = fields.length === 1
114
+ ? fields[0].message
115
+ : `Validation failed: ${fields.length} errors`;
116
+ return new ValidationError(message, fields, context);
77
117
  }
78
118
  }
79
- exports.DailyLimitError = DailyLimitError;
80
- class MonthlyLimitError extends AppError {
81
- constructor(message, context) {
82
- super("monthly-limit-reached", message, context);
83
- this.name = "MonthlyLimitError";
119
+ exports.ValidationError = ValidationError;
120
+ class QuotaExceededError extends AppError {
121
+ constructor(quotaType, resource, limit, used, resetsAt, context = {}) {
122
+ const message = `${quotaType.charAt(0).toUpperCase() + quotaType.slice(1)} ${resource} limit reached (${used}/${limit})`;
123
+ super("quota-exceeded", message, Object.assign(Object.assign({}, context), { quotaType,
124
+ resource,
125
+ limit,
126
+ used,
127
+ resetsAt }));
128
+ this.name = "QuotaExceededError";
129
+ this.quotaType = quotaType;
130
+ this.resource = resource;
131
+ this.limit = limit;
132
+ this.used = used;
133
+ this.resetsAt = resetsAt;
84
134
  }
85
135
  }
86
- exports.MonthlyLimitError = MonthlyLimitError;
87
- class NoRecipeFoundError extends AppError {
88
- constructor(reason, context) {
89
- super("no-recipe-found", reason, context);
90
- this.name = "NoRecipeFoundError";
136
+ exports.QuotaExceededError = QuotaExceededError;
137
+ class RateLimitedError extends AppError {
138
+ constructor(message = "Too many requests. Please try again later.", retryAfterSeconds, context = {}) {
139
+ super("rate-limited", message, Object.assign(Object.assign({}, context), { retryAfterSeconds }));
140
+ this.name = "RateLimitedError";
141
+ this.retryAfterSeconds = retryAfterSeconds;
91
142
  }
92
143
  }
93
- exports.NoRecipeFoundError = NoRecipeFoundError;
94
- class LowConfidenceError extends AppError {
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 }));
97
- this.name = "LowConfidenceError";
144
+ exports.RateLimitedError = RateLimitedError;
145
+ class InternalError extends AppError {
146
+ constructor(message = "An unexpected error occurred", context = {}) {
147
+ super("internal-error", message, context);
148
+ this.name = "InternalError";
149
+ }
150
+ static wrap(error, context = {}) {
151
+ const message = error instanceof Error ? error.message : "An unexpected error occurred";
152
+ return new InternalError(message, Object.assign(Object.assign({}, context), { originalError: error instanceof Error
153
+ ? { name: error.name, message: error.message }
154
+ : String(error) }));
98
155
  }
99
156
  }
100
- exports.LowConfidenceError = LowConfidenceError;
101
- class UnsafeContentError extends AppError {
102
- constructor(context) {
103
- super("unsafe-content", "This content cannot be processed.", context);
104
- this.name = "UnsafeContentError";
157
+ exports.InternalError = InternalError;
158
+ class ServiceUnavailableError extends AppError {
159
+ constructor(service, message, context = {}) {
160
+ super("service-unavailable", message !== null && message !== void 0 ? message : `${service} is temporarily unavailable`, Object.assign(Object.assign({}, context), { service }));
161
+ this.name = "ServiceUnavailableError";
105
162
  }
106
163
  }
107
- exports.UnsafeContentError = UnsafeContentError;
164
+ exports.ServiceUnavailableError = ServiceUnavailableError;
108
165
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","s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,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC7C,CAAC;CACF;AAZD,4CAYC;AAED,MAAa,aAAc,SAAQ,QAAQ;IACzC,YACE,UAAkB,8BAA8B,EAChD,UAA4B,EAAE;QAE9B,KAAK,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,KAAc,EAAE,UAA4B,EAAE;QACxD,MAAM,OAAO,GACX,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC;QAC1E,OAAO,IAAI,aAAa,CAAC,OAAO,kCAC3B,OAAO,KACV,aAAa,EACX,KAAK,YAAY,KAAK;gBACpB,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;gBAC9C,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IACnB,CAAC;IACL,CAAC;CACF;AApBD,sCAoBC;AAED,MAAa,uBAAwB,SAAQ,QAAQ;IACnD,YACE,OAAe,EACf,OAAgB,EAChB,UAA4B,EAAE;QAE9B,KAAK,CACH,qBAAqB,EACrB,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,GAAG,OAAO,6BAA6B,kCAC7C,OAAO,KAAE,OAAO,IACtB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AAbD,0DAaC"}
@@ -2,7 +2,6 @@ export * from "./entity";
2
2
  export * from "./errors";
3
3
  export * from "./locale";
4
4
  export * from "./pagination";
5
- export * from "./region";
6
5
  export * from "./theme";
7
6
  export * from "./timestamp";
8
7
  //# sourceMappingURL=index.d.ts.map