@cravery/core 0.0.61 → 0.0.63

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.
@@ -3,6 +3,7 @@ export * from "./entity_status";
3
3
  export * from "./errors";
4
4
  export * from "./locale";
5
5
  export * from "./measurement_system";
6
+ export * from "./pagination";
6
7
  export * from "./price";
7
8
  export * from "./theme";
8
9
  export * from "./timestamp";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
@@ -19,6 +19,7 @@ __exportStar(require("./entity_status"), exports);
19
19
  __exportStar(require("./errors"), exports);
20
20
  __exportStar(require("./locale"), exports);
21
21
  __exportStar(require("./measurement_system"), exports);
22
+ __exportStar(require("./pagination"), exports);
22
23
  __exportStar(require("./price"), exports);
23
24
  __exportStar(require("./theme"), exports);
24
25
  __exportStar(require("./timestamp"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,kDAAgC;AAChC,2CAAyB;AACzB,2CAAyB;AACzB,uDAAqC;AACrC,0CAAwB;AACxB,0CAAwB;AACxB,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,kDAAgC;AAChC,2CAAyB;AACzB,2CAAyB;AACzB,uDAAqC;AACrC,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;AACxB,8CAA4B"}
@@ -0,0 +1,14 @@
1
+ export type PaginationDirection = "forward" | "backward";
2
+ export interface PaginationParams {
3
+ limit?: number;
4
+ cursor?: string;
5
+ direction?: PaginationDirection;
6
+ }
7
+ export interface PaginatedResult<T> {
8
+ data: T[];
9
+ startCursor: string | null;
10
+ endCursor: string | null;
11
+ hasNextPage: boolean;
12
+ hasPreviousPage: boolean;
13
+ }
14
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/types/core/pagination.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC1B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../src/types/core/pagination.ts"],"names":[],"mappings":""}
@@ -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,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@cravery/core",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "description": "Clean architecture foundation for Cravery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -3,6 +3,7 @@ export * from "./entity_status";
3
3
  export * from "./errors";
4
4
  export * from "./locale";
5
5
  export * from "./measurement_system";
6
+ export * from "./pagination";
6
7
  export * from "./price";
7
8
  export * from "./theme";
8
9
  export * from "./timestamp";
@@ -0,0 +1,15 @@
1
+ export type PaginationDirection = "forward" | "backward";
2
+
3
+ export interface PaginationParams {
4
+ limit?: number;
5
+ cursor?: string;
6
+ direction?: PaginationDirection;
7
+ }
8
+
9
+ export interface PaginatedResult<T> {
10
+ data: T[];
11
+ startCursor: string | null;
12
+ endCursor: string | null;
13
+ hasNextPage: boolean;
14
+ hasPreviousPage: boolean;
15
+ }
@@ -2,8 +2,8 @@ import { Unit } from "../recipes";
2
2
 
3
3
  export interface IngredientMeta {
4
4
  slug: string;
5
+ optional?: boolean;
5
6
  quantity?: number;
6
- required?: boolean;
7
7
  unit?: Unit;
8
8
  }
9
9
 
@@ -1,4 +1,6 @@
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";
@@ -0,0 +1,12 @@
1
+ import { EntityBase, Locale } from "../core";
2
+ import { RequestStatus } from "./request_status";
3
+
4
+ export interface Request extends EntityBase {
5
+ status: RequestStatus;
6
+ locale: Locale;
7
+ url?: string;
8
+ images?: string[];
9
+ text?: string;
10
+ recipeId?: string;
11
+ error?: string;
12
+ }
@@ -0,0 +1,7 @@
1
+ export const REQUEST_STATUS_VALUES = [
2
+ "pending",
3
+ "processing",
4
+ "done",
5
+ "failed",
6
+ ] as const;
7
+ export type RequestStatus = (typeof REQUEST_STATUS_VALUES)[number];