@cravery/types 0.0.4 → 0.0.6

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.
@@ -4,9 +4,11 @@ export interface Nutrition {
4
4
  cholesterol?: number;
5
5
  fat?: number;
6
6
  fiber?: number;
7
+ potassium?: number;
7
8
  protein?: number;
8
9
  saturatedFat?: number;
9
10
  sodium?: number;
10
11
  sugar?: number;
12
+ transFat?: number;
11
13
  }
12
14
  //# sourceMappingURL=nutrition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nutrition.d.ts","sourceRoot":"","sources":["../../src/common/nutrition.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"nutrition.d.ts","sourceRoot":"","sources":["../../src/common/nutrition.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -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"}
@@ -1,3 +1,3 @@
1
- export declare const USER_ROLE_VALUES: readonly ["admin", "developer", "moderator", "translator", "user"];
1
+ export declare const USER_ROLE_VALUES: readonly ["admin", "developer", "moderator", "translator", "user", "guest"];
2
2
  export type UserRole = (typeof USER_ROLE_VALUES)[number];
3
3
  //# sourceMappingURL=role.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../../src/iam/role.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,oEAMnB,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../../src/iam/role.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6EAOnB,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
package/dist/iam/role.js CHANGED
@@ -7,5 +7,6 @@ exports.USER_ROLE_VALUES = [
7
7
  "moderator",
8
8
  "translator",
9
9
  "user",
10
+ "guest",
10
11
  ];
11
12
  //# sourceMappingURL=role.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"role.js","sourceRoot":"","sources":["../../src/iam/role.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,OAAO;IACP,WAAW;IACX,WAAW;IACX,YAAY;IACZ,MAAM;CACE,CAAC"}
1
+ {"version":3,"file":"role.js","sourceRoot":"","sources":["../../src/iam/role.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,OAAO;IACP,WAAW;IACX,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;CACC,CAAC"}
@@ -2,7 +2,7 @@ import { Unit } from "../common";
2
2
  export interface RecipeIngredientMeta {
3
3
  slug: string;
4
4
  optional: boolean;
5
- quantity: number;
5
+ quantity?: number;
6
6
  unit: Unit;
7
7
  }
8
8
  export interface RecipeIngredientContent {
@@ -1 +1 @@
1
- {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/ingredients/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,EAAE,uBAAuB;CAAG"}
1
+ {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/ingredients/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,EAAE,uBAAuB;CAAG"}
@@ -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,4 +1,4 @@
1
- import { Entity } from "src/core";
1
+ import { Entity } from "../core";
2
2
  export interface RecipeCollection extends Entity {
3
3
  userId: string;
4
4
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/interactions/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB"}
1
+ {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/interactions/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB"}
@@ -1,3 +1,4 @@
1
+ export * from "./collection";
1
2
  export * from "./cooked";
2
3
  export * from "./event_type";
3
4
  export * from "./event";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -14,6 +14,7 @@ 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("./collection"), exports);
17
18
  __exportStar(require("./cooked"), exports);
18
19
  __exportStar(require("./event_type"), exports);
19
20
  __exportStar(require("./event"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB"}
@@ -5,7 +5,7 @@ export interface ShoppingList extends Entity {
5
5
  name: string;
6
6
  ingredients: ShoppingIngredient[];
7
7
  equipment: ShoppingEquipment[];
8
- planId: string;
8
+ planId: string | null;
9
9
  archived: boolean;
10
10
  }
11
11
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/shopping/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/shopping/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cravery/types",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Core types for Cravery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,8 +4,10 @@ export interface Nutrition {
4
4
  cholesterol?: number;
5
5
  fat?: number;
6
6
  fiber?: number;
7
+ potassium?: number;
7
8
  protein?: number;
8
9
  saturatedFat?: number;
9
10
  sodium?: number;
10
11
  sugar?: number;
12
+ transFat?: number;
11
13
  }
@@ -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,5 +4,6 @@ export const USER_ROLE_VALUES = [
4
4
  "moderator",
5
5
  "translator",
6
6
  "user",
7
+ "guest",
7
8
  ] as const;
8
9
  export type UserRole = (typeof USER_ROLE_VALUES)[number];
@@ -3,7 +3,7 @@ import { Unit } from "../common";
3
3
  export interface RecipeIngredientMeta {
4
4
  slug: string;
5
5
  optional: boolean;
6
- quantity: number;
6
+ quantity?: number;
7
7
  unit: Unit;
8
8
  }
9
9
 
@@ -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,4 @@
1
- import { Entity } from "src/core";
1
+ import { Entity } from "../core";
2
2
 
3
3
  export interface RecipeCollection extends Entity {
4
4
  userId: string;
@@ -1,3 +1,4 @@
1
+ export * from "./collection";
1
2
  export * from "./cooked";
2
3
  export * from "./event_type";
3
4
  export * from "./event";
@@ -6,6 +6,6 @@ export interface ShoppingList extends Entity {
6
6
  name: string;
7
7
  ingredients: ShoppingIngredient[];
8
8
  equipment: ShoppingEquipment[];
9
- planId: string;
9
+ planId: string | null;
10
10
  archived: boolean;
11
11
  }