@cravery/core 0.0.37 → 0.0.39

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.
package/README.md CHANGED
@@ -25,7 +25,7 @@ npm install firebase-admin firebase-functions
25
25
  import { ... } from "@cravery/core";
26
26
 
27
27
  // Import types only
28
- import { ... } from "@cravery/core/types";
28
+ import { ... } from "@cravery/core";
29
29
 
30
30
  // Import config only
31
31
  import { ... } from "@cravery/core/config";
@@ -1,4 +1,5 @@
1
1
  export declare const COLLECTIONS: {
2
+ Comments: string;
2
3
  Content: string;
3
4
  Equipment: string;
4
5
  Feedback: string;
@@ -1 +1 @@
1
- {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/config/collections.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAavB,CAAC"}
1
+ {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/config/collections.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAcvB,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.COLLECTIONS = void 0;
4
4
  exports.COLLECTIONS = {
5
+ Comments: "comments",
5
6
  Content: "content",
6
7
  Equipment: "equipment",
7
8
  Feedback: "feedback",
@@ -1 +1 @@
1
- {"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/config/collections.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;CACf,CAAC"}
1
+ {"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/config/collections.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;CACf,CAAC"}
@@ -4,6 +4,7 @@ export * from "./entity";
4
4
  export * from "./errors";
5
5
  export * from "./locale";
6
6
  export * from "./measurement_system";
7
+ export * from "./pagination";
7
8
  export * from "./settings";
8
9
  export * from "./theme";
9
10
  export * from "./timestamp";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,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,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
@@ -20,6 +20,7 @@ __exportStar(require("./entity"), exports);
20
20
  __exportStar(require("./errors"), exports);
21
21
  __exportStar(require("./locale"), exports);
22
22
  __exportStar(require("./measurement_system"), exports);
23
+ __exportStar(require("./pagination"), exports);
23
24
  __exportStar(require("./settings"), exports);
24
25
  __exportStar(require("./theme"), exports);
25
26
  __exportStar(require("./timestamp"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,uDAAqC;AACrC,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,uDAAqC;AACrC,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B"}
@@ -0,0 +1,18 @@
1
+ export interface CursorData {
2
+ sortValue: number;
3
+ id: string;
4
+ }
5
+ export type PaginationDirection = "forward" | "backward";
6
+ export interface CursorPaginationParams {
7
+ limit?: number;
8
+ cursor?: string;
9
+ direction?: PaginationDirection;
10
+ }
11
+ export interface CursorPaginatedResult<T> {
12
+ data: T[];
13
+ startCursor: string | null;
14
+ endCursor: string | null;
15
+ hasNextPage: boolean;
16
+ hasPreviousPage: boolean;
17
+ }
18
+ //# 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,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,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":""}
@@ -0,0 +1,9 @@
1
+ import { Entity, Timestamp } from "../core";
2
+ export interface RecipeComment extends Entity {
3
+ recipeId: string;
4
+ userId: string;
5
+ content: string;
6
+ parentId?: string;
7
+ deletedAt?: Timestamp;
8
+ }
9
+ //# sourceMappingURL=comment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/types/recipe/comment.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  export * from "./allergen";
2
+ export * from "./comment";
2
3
  export * from "./cuisine";
3
4
  export * from "./dietary_tag";
4
5
  export * from "./difficulty";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,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/types/recipe/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./allergen"), exports);
18
+ __exportStar(require("./comment"), exports);
18
19
  __exportStar(require("./cuisine"), exports);
19
20
  __exportStar(require("./dietary_tag"), exports);
20
21
  __exportStar(require("./difficulty"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/recipe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,4CAA0B;AAC1B,+CAA6B;AAC7B,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,kDAAgC;AAChC,kDAAgC;AAChC,2CAAyB;AACzB,8CAA4B;AAC5B,qDAAmC;AACnC,gDAA8B;AAC9B,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/recipe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,4CAA0B;AAC1B,+CAA6B;AAC7B,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,kDAAgC;AAChC,kDAAgC;AAChC,2CAAyB;AACzB,8CAA4B;AAC5B,qDAAmC;AACnC,gDAA8B;AAC9B,yCAAuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cravery/core",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "Clean architecture foundation for Cravery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,4 +1,5 @@
1
1
  export const COLLECTIONS = {
2
+ Comments: "comments",
2
3
  Content: "content",
3
4
  Equipment: "equipment",
4
5
  Feedback: "feedback",
@@ -4,6 +4,7 @@ export * from "./entity";
4
4
  export * from "./errors";
5
5
  export * from "./locale";
6
6
  export * from "./measurement_system";
7
+ export * from "./pagination";
7
8
  export * from "./settings";
8
9
  export * from "./theme";
9
10
  export * from "./timestamp";
@@ -0,0 +1,20 @@
1
+ export interface CursorData {
2
+ sortValue: number;
3
+ id: string;
4
+ }
5
+
6
+ export type PaginationDirection = "forward" | "backward";
7
+
8
+ export interface CursorPaginationParams {
9
+ limit?: number;
10
+ cursor?: string;
11
+ direction?: PaginationDirection;
12
+ }
13
+
14
+ export interface CursorPaginatedResult<T> {
15
+ data: T[];
16
+ startCursor: string | null;
17
+ endCursor: string | null;
18
+ hasNextPage: boolean;
19
+ hasPreviousPage: boolean;
20
+ }
@@ -0,0 +1,9 @@
1
+ import { Entity, Timestamp } from "../core";
2
+
3
+ export interface RecipeComment extends Entity {
4
+ recipeId: string;
5
+ userId: string;
6
+ content: string;
7
+ parentId?: string;
8
+ deletedAt?: Timestamp;
9
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "./allergen";
2
+ export * from "./comment";
2
3
  export * from "./cuisine";
3
4
  export * from "./dietary_tag";
4
5
  export * from "./difficulty";