@cravery/firebase 0.0.33 → 0.0.34
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/dist/repository/equipment.d.ts.map +1 -1
- package/dist/repository/equipment.js +1 -12
- package/dist/repository/equipment.js.map +1 -1
- package/dist/repository/ingredient.d.ts.map +1 -1
- package/dist/repository/ingredient.js +2 -16
- package/dist/repository/ingredient.js.map +1 -1
- package/package.json +1 -1
- package/src/repository/equipment.ts +1 -15
- package/src/repository/ingredient.ts +2 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equipment.d.ts","sourceRoot":"","sources":["../../src/repository/equipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,MAAM,EACX,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"equipment.d.ts","sourceRoot":"","sources":["../../src/repository/equipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,MAAM,EACX,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EAEzB,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErD,qBAAa,mBAAoB,SAAQ,cAAc,CACrD,eAAe,EACf,mBAAmB,EACnB,sBAAsB,CACvB;IACC,SAAS,CAAC,QAAQ,CAAC,cAAc,SAAyB;IAC1D,SAAS,CAAC,QAAQ,CAAC,UAAU,eAAe;IAC5C,SAAS,CAAC,QAAQ,CAAC,aAAa,gGAA0B;IAC1D,SAAS,CAAC,QAAQ,CAAC,gBAAgB,mGAA6B;gBAEpD,EAAE,EAAE,SAAS;IAIzB,SAAS,CAAC,KAAK,CACb,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAE,sBAAsB,GAC9B,eAAe;IAIlB,SAAS,CAAC,KAAK,CACb,SAAS,EAAE,eAAe,GACzB,WAAW,CAAC,mBAAmB,EAAE,sBAAsB,CAAC;IA4BrD,aAAa,CACjB,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,MAAM,EACd,KAAK,SAAK,EACV,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,GAAE,mBAA+B,GACzC,OAAO,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC;CAInD"}
|
|
@@ -4,14 +4,6 @@ exports.EquipmentRepository = void 0;
|
|
|
4
4
|
const core_1 = require("@cravery/core");
|
|
5
5
|
const converter_1 = require("../converter");
|
|
6
6
|
const base_1 = require("./base");
|
|
7
|
-
// All statuses except "deleted" - used for filtering
|
|
8
|
-
const ACTIVE_STATUSES = [
|
|
9
|
-
"active",
|
|
10
|
-
"archived",
|
|
11
|
-
"flagged",
|
|
12
|
-
"pending",
|
|
13
|
-
"suspended",
|
|
14
|
-
];
|
|
15
7
|
class EquipmentRepository extends base_1.BaseRepository {
|
|
16
8
|
constructor(db) {
|
|
17
9
|
super(db);
|
|
@@ -40,10 +32,7 @@ class EquipmentRepository extends base_1.BaseRepository {
|
|
|
40
32
|
};
|
|
41
33
|
}
|
|
42
34
|
async getByCategory(category, locale, limit = 20, cursor, direction = "forward") {
|
|
43
|
-
|
|
44
|
-
const baseQuery = this.metaCollection
|
|
45
|
-
.where("category", "==", category)
|
|
46
|
-
.where("status", "in", ACTIVE_STATUSES);
|
|
35
|
+
const baseQuery = this.metaCollection.where("category", "==", category);
|
|
47
36
|
return this.executePaginatedQuery(baseQuery, locale, limit, cursor, direction);
|
|
48
37
|
}
|
|
49
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equipment.js","sourceRoot":"","sources":["../../src/repository/equipment.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"equipment.js","sourceRoot":"","sources":["../../src/repository/equipment.ts"],"names":[],"mappings":";;;AACA,wCASuB;AACvB,4CAGsB;AACtB,iCAAqD;AAErD,MAAa,mBAAoB,SAAQ,qBAIxC;IAMC,YAAY,EAAa;QACvB,KAAK,CAAC,EAAE,CAAC,CAAC;QANO,mBAAc,GAAG,kBAAW,CAAC,SAAS,CAAC;QACvC,eAAU,GAAG,WAAW,CAAC;QACzB,kBAAa,GAAG,kCAAsB,CAAC;QACvC,qBAAgB,GAAG,qCAAyB,CAAC;IAIhE,CAAC;IAES,KAAK,CACb,IAAyB,EACzB,OAA+B;QAE/B,uCAAY,IAAI,GAAK,OAAO,EAAG;IACjC,CAAC;IAES,KAAK,CACb,SAA0B;QAE1B,MAAM,EACJ,EAAE,EAAE,GAAG,EACP,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,GACL,GAAG,SAAS,CAAC;QACd,OAAO;YACL,IAAI,EAAE;gBACJ,QAAQ;gBACR,QAAQ;gBACR,IAAI;gBACJ,KAAK;gBACL,MAAM;gBACN,SAAS;gBACT,SAAS;gBACT,SAAS;aACV;YACD,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;SACxB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,QAA2B,EAC3B,MAAc,EACd,KAAK,GAAG,EAAE,EACV,MAAe,EACf,YAAiC,SAAS;QAE1C,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACjF,CAAC;CACF;AA7DD,kDA6DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingredient.d.ts","sourceRoot":"","sources":["../../src/repository/ingredient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ingredient.d.ts","sourceRoot":"","sources":["../../src/repository/ingredient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EAEzB,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErD,qBAAa,oBAAqB,SAAQ,cAAc,CACtD,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,CACxB;IACC,SAAS,CAAC,QAAQ,CAAC,cAAc,SAA2B;IAC5D,SAAS,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IAC7C,SAAS,CAAC,QAAQ,CAAC,aAAa,iGAA2B;IAC3D,SAAS,CAAC,QAAQ,CAAC,gBAAgB,oGAA8B;gBAErD,EAAE,EAAE,SAAS;IAIzB,SAAS,CAAC,KAAK,CACb,IAAI,EAAE,oBAAoB,EAC1B,OAAO,EAAE,uBAAuB,GAC/B,gBAAgB;IAInB,SAAS,CAAC,KAAK,CACb,UAAU,EAAE,gBAAgB,GAC3B,WAAW,CAAC,oBAAoB,EAAE,uBAAuB,CAAC;IAgCvD,aAAa,CACjB,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,EAAE,MAAM,EACd,KAAK,SAAK,EACV,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,GAAE,mBAA+B,GACzC,OAAO,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IAK7C,UAAU,CACd,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,SAAK,EACV,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,GAAE,mBAA+B,GACzC,OAAO,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;CAIpD"}
|
|
@@ -2,14 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IngredientRepository = void 0;
|
|
4
4
|
const core_1 = require("@cravery/core");
|
|
5
|
-
// All statuses except "deleted" - used for filtering
|
|
6
|
-
const ACTIVE_STATUSES = [
|
|
7
|
-
"active",
|
|
8
|
-
"archived",
|
|
9
|
-
"flagged",
|
|
10
|
-
"pending",
|
|
11
|
-
"suspended",
|
|
12
|
-
];
|
|
13
5
|
const converter_1 = require("../converter");
|
|
14
6
|
const base_1 = require("./base");
|
|
15
7
|
class IngredientRepository extends base_1.BaseRepository {
|
|
@@ -42,17 +34,11 @@ class IngredientRepository extends base_1.BaseRepository {
|
|
|
42
34
|
};
|
|
43
35
|
}
|
|
44
36
|
async getByCategory(category, locale, limit = 20, cursor, direction = "forward") {
|
|
45
|
-
|
|
46
|
-
const baseQuery = this.metaCollection
|
|
47
|
-
.where("category", "==", category)
|
|
48
|
-
.where("status", "in", ACTIVE_STATUSES);
|
|
37
|
+
const baseQuery = this.metaCollection.where("category", "==", category);
|
|
49
38
|
return this.executePaginatedQuery(baseQuery, locale, limit, cursor, direction);
|
|
50
39
|
}
|
|
51
40
|
async getByGroup(group, locale, limit = 20, cursor, direction = "forward") {
|
|
52
|
-
|
|
53
|
-
const baseQuery = this.metaCollection
|
|
54
|
-
.where("group", "==", group)
|
|
55
|
-
.where("status", "in", ACTIVE_STATUSES);
|
|
41
|
+
const baseQuery = this.metaCollection.where("group", "==", group);
|
|
56
42
|
return this.executePaginatedQuery(baseQuery, locale, limit, cursor, direction);
|
|
57
43
|
}
|
|
58
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingredient.js","sourceRoot":"","sources":["../../src/repository/ingredient.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"ingredient.js","sourceRoot":"","sources":["../../src/repository/ingredient.ts"],"names":[],"mappings":";;;AACA,wCAUuB;AACvB,4CAGsB;AACtB,iCAAqD;AAErD,MAAa,oBAAqB,SAAQ,qBAIzC;IAMC,YAAY,EAAa;QACvB,KAAK,CAAC,EAAE,CAAC,CAAC;QANO,mBAAc,GAAG,kBAAW,CAAC,WAAW,CAAC;QACzC,eAAU,GAAG,YAAY,CAAC;QAC1B,kBAAa,GAAG,mCAAuB,CAAC;QACxC,qBAAgB,GAAG,sCAA0B,CAAC;IAIjE,CAAC;IAES,KAAK,CACb,IAA0B,EAC1B,OAAgC;QAEhC,uCAAY,IAAI,GAAK,OAAO,EAAG;IACjC,CAAC;IAES,KAAK,CACb,UAA4B;QAE5B,MAAM,EACJ,EAAE,EAAE,GAAG,EACP,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,IAAI,GACL,GAAG,UAAU,CAAC;QACf,OAAO;YACL,IAAI,EAAE;gBACJ,QAAQ;gBACR,KAAK;gBACL,QAAQ;gBACR,KAAK;gBACL,IAAI;gBACJ,YAAY;gBACZ,MAAM;gBACN,SAAS;gBACT,SAAS;gBACT,SAAS;aACV;YACD,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;SACxB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,QAA4B,EAC5B,MAAc,EACd,KAAK,GAAG,EAAE,EACV,MAAe,EACf,YAAiC,SAAS;QAE1C,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACjF,CAAC;IAED,KAAK,CAAC,UAAU,CACd,KAAsB,EACtB,MAAc,EACd,KAAK,GAAG,EAAE,EACV,MAAe,EACf,YAAiC,SAAS;QAE1C,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACjF,CAAC;CACF;AA5ED,oDA4EC"}
|
package/package.json
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
type Locale,
|
|
8
8
|
type CursorPaginatedResult,
|
|
9
9
|
type PaginationDirection,
|
|
10
|
-
type EntityStatus,
|
|
11
10
|
COLLECTIONS,
|
|
12
11
|
} from "@cravery/core";
|
|
13
12
|
import {
|
|
@@ -16,15 +15,6 @@ import {
|
|
|
16
15
|
} from "../converter";
|
|
17
16
|
import { BaseRepository, SplitResult } from "./base";
|
|
18
17
|
|
|
19
|
-
// All statuses except "deleted" - used for filtering
|
|
20
|
-
const ACTIVE_STATUSES: EntityStatus[] = [
|
|
21
|
-
"active",
|
|
22
|
-
"archived",
|
|
23
|
-
"flagged",
|
|
24
|
-
"pending",
|
|
25
|
-
"suspended",
|
|
26
|
-
];
|
|
27
|
-
|
|
28
18
|
export class EquipmentRepository extends BaseRepository<
|
|
29
19
|
EquipmentEntity,
|
|
30
20
|
EquipmentEntityMeta,
|
|
@@ -83,11 +73,7 @@ export class EquipmentRepository extends BaseRepository<
|
|
|
83
73
|
cursor?: string,
|
|
84
74
|
direction: PaginationDirection = "forward",
|
|
85
75
|
): Promise<CursorPaginatedResult<EquipmentEntity>> {
|
|
86
|
-
|
|
87
|
-
const baseQuery = this.metaCollection
|
|
88
|
-
.where("category", "==", category)
|
|
89
|
-
.where("status", "in", ACTIVE_STATUSES);
|
|
90
|
-
|
|
76
|
+
const baseQuery = this.metaCollection.where("category", "==", category);
|
|
91
77
|
return this.executePaginatedQuery(baseQuery, locale, limit, cursor, direction);
|
|
92
78
|
}
|
|
93
79
|
}
|
|
@@ -8,18 +8,8 @@ import {
|
|
|
8
8
|
type Locale,
|
|
9
9
|
type CursorPaginatedResult,
|
|
10
10
|
type PaginationDirection,
|
|
11
|
-
type EntityStatus,
|
|
12
11
|
COLLECTIONS,
|
|
13
12
|
} from "@cravery/core";
|
|
14
|
-
|
|
15
|
-
// All statuses except "deleted" - used for filtering
|
|
16
|
-
const ACTIVE_STATUSES: EntityStatus[] = [
|
|
17
|
-
"active",
|
|
18
|
-
"archived",
|
|
19
|
-
"flagged",
|
|
20
|
-
"pending",
|
|
21
|
-
"suspended",
|
|
22
|
-
];
|
|
23
13
|
import {
|
|
24
14
|
ingredientMetaConverter,
|
|
25
15
|
ingredientContentConverter,
|
|
@@ -88,11 +78,7 @@ export class IngredientRepository extends BaseRepository<
|
|
|
88
78
|
cursor?: string,
|
|
89
79
|
direction: PaginationDirection = "forward",
|
|
90
80
|
): Promise<CursorPaginatedResult<IngredientEntity>> {
|
|
91
|
-
|
|
92
|
-
const baseQuery = this.metaCollection
|
|
93
|
-
.where("category", "==", category)
|
|
94
|
-
.where("status", "in", ACTIVE_STATUSES);
|
|
95
|
-
|
|
81
|
+
const baseQuery = this.metaCollection.where("category", "==", category);
|
|
96
82
|
return this.executePaginatedQuery(baseQuery, locale, limit, cursor, direction);
|
|
97
83
|
}
|
|
98
84
|
|
|
@@ -103,11 +89,7 @@ export class IngredientRepository extends BaseRepository<
|
|
|
103
89
|
cursor?: string,
|
|
104
90
|
direction: PaginationDirection = "forward",
|
|
105
91
|
): Promise<CursorPaginatedResult<IngredientEntity>> {
|
|
106
|
-
|
|
107
|
-
const baseQuery = this.metaCollection
|
|
108
|
-
.where("group", "==", group)
|
|
109
|
-
.where("status", "in", ACTIVE_STATUSES);
|
|
110
|
-
|
|
92
|
+
const baseQuery = this.metaCollection.where("group", "==", group);
|
|
111
93
|
return this.executePaginatedQuery(baseQuery, locale, limit, cursor, direction);
|
|
112
94
|
}
|
|
113
95
|
}
|