@cravery/types 0.0.5 → 0.0.7

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.
@@ -7,4 +7,7 @@ export interface UserEquipment extends Entity {
7
7
  quantity: number;
8
8
  slug: string;
9
9
  }
10
+ export interface LocalizedUserEquipment extends UserEquipment {
11
+ name: string;
12
+ }
10
13
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/equipment/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/equipment/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,IAAI,EAAE,MAAM,CAAC;CACd"}
package/dist/iam/role.js CHANGED
@@ -7,6 +7,6 @@ exports.USER_ROLE_VALUES = [
7
7
  "moderator",
8
8
  "translator",
9
9
  "user",
10
- "guest"
10
+ "guest",
11
11
  ];
12
12
  //# sourceMappingURL=role.js.map
@@ -11,4 +11,7 @@ export interface UserIngredient extends Entity {
11
11
  quantity: number;
12
12
  unit: Unit;
13
13
  }
14
+ export interface LocalizedUserIngredient extends UserIngredient {
15
+ name: string;
16
+ }
14
17
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/ingredients/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/ingredients/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -1,5 +1,11 @@
1
+ export * from "./admin";
2
+ export * from "./content";
1
3
  export * from "./instruction";
4
+ export * from "./meta";
2
5
  export * from "./recipe";
6
+ export * from "./request";
3
7
  export * from "./source";
4
8
  export * from "./stats";
9
+ export * from "./status";
10
+ export * from "./user";
5
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
@@ -14,8 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./admin"), exports);
18
+ __exportStar(require("./content"), exports);
17
19
  __exportStar(require("./instruction"), exports);
20
+ __exportStar(require("./meta"), exports);
18
21
  __exportStar(require("./recipe"), exports);
22
+ __exportStar(require("./request"), exports);
19
23
  __exportStar(require("./source"), exports);
20
24
  __exportStar(require("./stats"), exports);
25
+ __exportStar(require("./status"), exports);
26
+ __exportStar(require("./user"), exports);
21
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B;AAC1B,gDAA8B;AAC9B,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,yCAAuB"}
@@ -0,0 +1,19 @@
1
+ import { Entity, Timestamp } from "../core";
2
+ import { Locale } from "../core/locale";
3
+ import { RecipeSource } from "./source";
4
+ export declare const REQUEST_STATUS_VALUES: readonly ["pending", "processing", "success", "failed"];
5
+ export type RequestStatus = (typeof REQUEST_STATUS_VALUES)[number];
6
+ export interface RecipeRequestInput {
7
+ type: RecipeSource;
8
+ value: string;
9
+ locale: Locale;
10
+ }
11
+ export interface RecipeRequest extends Entity {
12
+ input: RecipeRequestInput;
13
+ recipeId: string | null;
14
+ status: RequestStatus;
15
+ userId: string;
16
+ error?: string;
17
+ processedAt: Timestamp | null;
18
+ }
19
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/recipes/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,qBAAqB,yDAKxB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,SAAS,GAAG,IAAI,CAAC;CAC/B"}
@@ -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
+ "success",
8
+ "failed",
9
+ ];
10
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/recipes/request.ts"],"names":[],"mappings":";;;AAIa,QAAA,qBAAqB,GAAG;IACnC,SAAS;IACT,YAAY;IACZ,SAAS;IACT,QAAQ;CACA,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Entity, Timestamp } from "../core";
2
+ export interface UserRecipe extends Entity {
3
+ recipeId: string;
4
+ cookedAt: Timestamp | null;
5
+ cookedCount: number;
6
+ notes?: string;
7
+ rating?: number;
8
+ savedAt: Timestamp | null;
9
+ }
10
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/recipes/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,UAAW,SAAQ,MAAM;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/recipes/user.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cravery/types",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Core types for Cravery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,3 +8,7 @@ export interface UserEquipment extends Entity {
8
8
  quantity: number;
9
9
  slug: string;
10
10
  }
11
+
12
+ export interface LocalizedUserEquipment extends UserEquipment {
13
+ name: string;
14
+ }
package/src/iam/role.ts CHANGED
@@ -4,6 +4,6 @@ export const USER_ROLE_VALUES = [
4
4
  "moderator",
5
5
  "translator",
6
6
  "user",
7
- "guest"
7
+ "guest",
8
8
  ] as const;
9
9
  export type UserRole = (typeof USER_ROLE_VALUES)[number];
@@ -12,3 +12,7 @@ export interface UserIngredient extends Entity {
12
12
  quantity: number;
13
13
  unit: Unit;
14
14
  }
15
+
16
+ export interface LocalizedUserIngredient extends UserIngredient {
17
+ name: string;
18
+ }
@@ -1,4 +1,10 @@
1
+ export * from "./admin";
2
+ export * from "./content";
1
3
  export * from "./instruction";
4
+ export * from "./meta";
2
5
  export * from "./recipe";
6
+ export * from "./request";
3
7
  export * from "./source";
4
8
  export * from "./stats";
9
+ export * from "./status";
10
+ export * from "./user";
@@ -0,0 +1,26 @@
1
+ import { Entity, Timestamp } from "../core";
2
+ import { Locale } from "../core/locale";
3
+ import { RecipeSource } from "./source";
4
+
5
+ export const REQUEST_STATUS_VALUES = [
6
+ "pending",
7
+ "processing",
8
+ "success",
9
+ "failed",
10
+ ] as const;
11
+ export type RequestStatus = (typeof REQUEST_STATUS_VALUES)[number];
12
+
13
+ export interface RecipeRequestInput {
14
+ type: RecipeSource;
15
+ value: string;
16
+ locale: Locale;
17
+ }
18
+
19
+ export interface RecipeRequest extends Entity {
20
+ input: RecipeRequestInput;
21
+ recipeId: string | null;
22
+ status: RequestStatus;
23
+ userId: string;
24
+ error?: string;
25
+ processedAt: Timestamp | null;
26
+ }
@@ -0,0 +1,10 @@
1
+ import { Entity, Timestamp } from "../core";
2
+
3
+ export interface UserRecipe extends Entity {
4
+ recipeId: string;
5
+ cookedAt: Timestamp | null;
6
+ cookedCount: number;
7
+ notes?: string;
8
+ rating?: number;
9
+ savedAt: Timestamp | null;
10
+ }