@cravery/types 0.0.6 → 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.
@@ -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.6",
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",
@@ -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
+ }