@drax/identity-back 0.5.4 → 0.5.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.
- package/dist/repository/mongo/RoleMongoRepository.js +24 -1
- package/dist/repository/mongo/TenantMongoRepository.js +14 -2
- package/dist/repository/mongo/UserMongoRepository.js +23 -0
- package/dist/repository/sqlite/TenantSqliteRepository.js +1 -1
- package/dist/routes/RoleRoutes.js +1 -0
- package/dist/routes/UserRoutes.js +1 -0
- package/package.json +5 -5
- package/src/interfaces/IRoleRepository.ts +2 -2
- package/src/repository/mongo/RoleMongoRepository.ts +65 -18
- package/src/repository/mongo/TenantMongoRepository.ts +25 -3
- package/src/repository/mongo/UserMongoRepository.ts +49 -2
- package/src/repository/sqlite/TenantSqliteRepository.ts +0 -1
- package/src/routes/RoleRoutes.ts +2 -0
- package/src/routes/UserRoutes.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/types/interfaces/IRoleRepository.d.ts +2 -2
- package/types/interfaces/IRoleRepository.d.ts.map +1 -1
- package/types/models/RoleModel.d.ts +5 -0
- package/types/models/RoleModel.d.ts.map +1 -1
- package/types/models/TenantModel.d.ts +5 -0
- package/types/models/TenantModel.d.ts.map +1 -1
- package/types/models/UserApiKeyModel.d.ts +5 -0
- package/types/models/UserApiKeyModel.d.ts.map +1 -1
- package/types/models/UserGroupModel.d.ts +5 -0
- package/types/models/UserGroupModel.d.ts.map +1 -1
- package/types/models/UserModel.d.ts +5 -0
- package/types/models/UserModel.d.ts.map +1 -1
- package/types/repository/mongo/RoleMongoRepository.d.ts +31 -1
- package/types/repository/mongo/RoleMongoRepository.d.ts.map +1 -1
- package/types/repository/mongo/TenantMongoRepository.d.ts +30 -1
- package/types/repository/mongo/TenantMongoRepository.d.ts.map +1 -1
- package/types/repository/mongo/UserMongoRepository.d.ts +31 -1
- package/types/repository/mongo/UserMongoRepository.d.ts.map +1 -1
- package/types/repository/sqlite/TenantSqliteRepository.d.ts +1 -1
- package/types/repository/sqlite/TenantSqliteRepository.d.ts.map +1 -1
- package/types/routes/RoleRoutes.d.ts.map +1 -1
- package/types/routes/UserRoutes.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRole, IRoleBase } from "@drax/identity-share";
|
|
2
|
-
import {
|
|
3
|
-
interface IRoleRepository extends
|
|
2
|
+
import { IDraxCrudRepository } from "@drax/crud-share";
|
|
3
|
+
interface IRoleRepository extends IDraxCrudRepository<IRole, IRoleBase, IRoleBase> {
|
|
4
4
|
findById(id: string): Promise<IRole | null>;
|
|
5
5
|
findByName(name: string): Promise<IRole | null>;
|
|
6
6
|
fetchAll(): Promise<IRole[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IRoleRepository.d.ts","sourceRoot":"","sources":["../../src/interfaces/IRoleRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"IRoleRepository.d.ts","sourceRoot":"","sources":["../../src/interfaces/IRoleRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAErD,UAAU,eAAgB,SAAQ,mBAAmB,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC;IAC9E,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAC5C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAChD,QAAQ,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;CAChC;AAED,OAAO,EAAC,eAAe,EAAC,CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/document" />
|
|
2
|
+
/// <reference types="mongoose/types/types" />
|
|
3
|
+
/// <reference types="mongoose/types/models" />
|
|
4
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
5
|
+
/// <reference types="mongoose/types/utility" />
|
|
1
6
|
import { mongoose } from '@drax/common-back';
|
|
2
7
|
import { IRole } from '@drax/identity-share';
|
|
3
8
|
declare const RoleSchema: mongoose.Schema<IRole, mongoose.Model<IRole, any, any, any, mongoose.Document<unknown, any, IRole> & IRole & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoleModel.d.ts","sourceRoot":"","sources":["../../src/models/RoleModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAA;AAK1C,QAAA,MAAM,UAAU;;;;EAWd,CAAC;AAWH,QAAA,MAAM,SAAS,uCAAgG,CAAC;AAEhH,OAAO,EACH,UAAU,EACV,SAAS,EACZ,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"RoleModel.d.ts","sourceRoot":"","sources":["../../src/models/RoleModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAA;AAK1C,QAAA,MAAM,UAAU;;;;EAWd,CAAC;AAWH,QAAA,MAAM,SAAS,uCAAgG,CAAC;AAEhH,OAAO,EACH,UAAU,EACV,SAAS,EACZ,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/document" />
|
|
2
|
+
/// <reference types="mongoose/types/types" />
|
|
3
|
+
/// <reference types="mongoose/types/models" />
|
|
4
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
5
|
+
/// <reference types="mongoose/types/utility" />
|
|
1
6
|
import { mongoose } from '@drax/common-back';
|
|
2
7
|
import { ITenant } from '@drax/identity-share';
|
|
3
8
|
declare const TenantSchema: mongoose.Schema<ITenant, mongoose.Model<ITenant, any, any, any, mongoose.Document<unknown, any, ITenant> & ITenant & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantModel.d.ts","sourceRoot":"","sources":["../../src/models/TenantModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAA;AAK5C,QAAA,MAAM,YAAY;;;;EAEI,CAAC;AAWvB,QAAA,MAAM,WAAW,yCAA0G,CAAC;AAE5H,OAAO,EACH,YAAY,EACZ,WAAW,EACd,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"TenantModel.d.ts","sourceRoot":"","sources":["../../src/models/TenantModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAA;AAK5C,QAAA,MAAM,YAAY;;;;EAEI,CAAC;AAWvB,QAAA,MAAM,WAAW,yCAA0G,CAAC;AAE5H,OAAO,EACH,YAAY,EACZ,WAAW,EACd,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/document" />
|
|
2
|
+
/// <reference types="mongoose/types/types" />
|
|
3
|
+
/// <reference types="mongoose/types/models" />
|
|
4
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
5
|
+
/// <reference types="mongoose/types/utility" />
|
|
1
6
|
import { mongoose } from '@drax/common-back';
|
|
2
7
|
import { IUserApiKey } from "@drax/identity-share";
|
|
3
8
|
declare const UserApiKeySchema: mongoose.Schema<IUserApiKey, mongoose.Model<IUserApiKey, any, any, any, mongoose.Document<unknown, any, IUserApiKey> & IUserApiKey & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserApiKeyModel.d.ts","sourceRoot":"","sources":["../../src/models/UserApiKeyModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAMjD,QAAA,MAAM,gBAAgB;;;;EA8BA,CAAC;AAYvB,QAAA,MAAM,eAAe,6CAAuG,CAAC;AAG7H,OAAO,EACH,gBAAgB,EAChB,eAAe,EAClB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"UserApiKeyModel.d.ts","sourceRoot":"","sources":["../../src/models/UserApiKeyModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAMjD,QAAA,MAAM,gBAAgB;;;;EA8BA,CAAC;AAYvB,QAAA,MAAM,eAAe,6CAAuG,CAAC;AAG7H,OAAO,EACH,gBAAgB,EAChB,eAAe,EAClB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/document" />
|
|
2
|
+
/// <reference types="mongoose/types/types" />
|
|
3
|
+
/// <reference types="mongoose/types/models" />
|
|
4
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
5
|
+
/// <reference types="mongoose/types/utility" />
|
|
1
6
|
import { mongoose } from '@drax/common-back';
|
|
2
7
|
import { IUserGroup } from "@drax/identity-share";
|
|
3
8
|
declare const UserGroupSchema: mongoose.Schema<IUserGroup, mongoose.Model<IUserGroup, any, any, any, mongoose.Document<unknown, any, IUserGroup> & IUserGroup & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserGroupModel.d.ts","sourceRoot":"","sources":["../../src/models/UserGroupModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAOhD,QAAA,MAAM,eAAe;;;;EAmBC,CAAC;AAYvB,QAAA,MAAM,cAAc,4CAAwH,CAAC;AAE7I,OAAO,EACH,eAAe,EACf,cAAc,EACjB,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"UserGroupModel.d.ts","sourceRoot":"","sources":["../../src/models/UserGroupModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAOhD,QAAA,MAAM,eAAe;;;;EAmBC,CAAC;AAYvB,QAAA,MAAM,cAAc,4CAAwH,CAAC;AAE7I,OAAO,EACH,eAAe,EACf,cAAc,EACjB,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/document" />
|
|
2
|
+
/// <reference types="mongoose/types/types" />
|
|
3
|
+
/// <reference types="mongoose/types/models" />
|
|
4
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
5
|
+
/// <reference types="mongoose/types/utility" />
|
|
1
6
|
import { mongoose } from '@drax/common-back';
|
|
2
7
|
import { IUser } from "@drax/identity-share";
|
|
3
8
|
declare const UserSchema: mongoose.Schema<IUser, mongoose.Model<IUser, any, any, any, mongoose.Document<unknown, any, IUser> & IUser & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserModel.d.ts","sourceRoot":"","sources":["../../src/models/UserModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAO3C,QAAA,MAAM,UAAU;;;;EA6DM,CAAC;AAYvB,QAAA,MAAM,SAAS,uCAA+F,CAAC;AAE/G,OAAO,EACH,UAAU,EACV,SAAS,EACZ,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"UserModel.d.ts","sourceRoot":"","sources":["../../src/models/UserModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAO3C,QAAA,MAAM,UAAU;;;;EA6DM,CAAC;AAYvB,QAAA,MAAM,SAAS,uCAA+F,CAAC;AAE/G,OAAO,EACH,UAAU,EACV,SAAS,EACZ,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,5 +1,33 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/cursor" />
|
|
2
|
+
/// <reference types="mongoose/types/aggregate.js" />
|
|
3
|
+
/// <reference types="mongoose/types/callback.js" />
|
|
4
|
+
/// <reference types="mongoose/types/collection.js" />
|
|
5
|
+
/// <reference types="mongoose/types/connection.js" />
|
|
6
|
+
/// <reference types="mongoose/types/cursor.js" />
|
|
7
|
+
/// <reference types="mongoose/types/document.js" />
|
|
8
|
+
/// <reference types="mongoose/types/error.js" />
|
|
9
|
+
/// <reference types="mongoose/types/expressions.js" />
|
|
10
|
+
/// <reference types="mongoose/types/helpers.js" />
|
|
11
|
+
/// <reference types="mongoose/types/middlewares.js" />
|
|
12
|
+
/// <reference types="mongoose/types/indexes.js" />
|
|
13
|
+
/// <reference types="mongoose/types/models.js" />
|
|
14
|
+
/// <reference types="mongoose/types/mongooseoptions.js" />
|
|
15
|
+
/// <reference types="mongoose/types/pipelinestage.js" />
|
|
16
|
+
/// <reference types="mongoose/types/populate.js" />
|
|
17
|
+
/// <reference types="mongoose/types/query.js" />
|
|
18
|
+
/// <reference types="mongoose/types/schemaoptions.js" />
|
|
19
|
+
/// <reference types="mongoose/types/schematypes.js" />
|
|
20
|
+
/// <reference types="mongoose/types/session.js" />
|
|
21
|
+
/// <reference types="mongoose/types/types.js" />
|
|
22
|
+
/// <reference types="mongoose/types/utility.js" />
|
|
23
|
+
/// <reference types="mongoose/types/validation.js" />
|
|
24
|
+
/// <reference types="mongoose/types/virtuals.js" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype.js" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype.js" />
|
|
27
|
+
/// <reference types="mongoose-paginate-v2" />
|
|
1
28
|
import { IRoleRepository } from '../../interfaces/IRoleRepository';
|
|
2
|
-
import {
|
|
29
|
+
import { Cursor } from "mongoose";
|
|
30
|
+
import { IDraxFindOptions, IDraxPaginateOptions, IDraxPaginateResult } from "@drax/crud-share";
|
|
3
31
|
import { IRoleBase, IRole } from "@drax/identity-share";
|
|
4
32
|
declare class RoleMongoRepository implements IRoleRepository {
|
|
5
33
|
_searchFields: string[];
|
|
@@ -11,6 +39,8 @@ declare class RoleMongoRepository implements IRoleRepository {
|
|
|
11
39
|
fetchAll(): Promise<IRole[]>;
|
|
12
40
|
search(value: string, limit?: number): Promise<IRole[]>;
|
|
13
41
|
paginate({ page, limit, orderBy, order, search, filters }: IDraxPaginateOptions): Promise<IDraxPaginateResult<IRole>>;
|
|
42
|
+
find({ limit, orderBy, order, search, filters }: IDraxFindOptions): Promise<IRole[]>;
|
|
43
|
+
findCursor({ limit, orderBy, order, search, filters }: IDraxFindOptions): Promise<Cursor>;
|
|
14
44
|
}
|
|
15
45
|
export default RoleMongoRepository;
|
|
16
46
|
//# sourceMappingURL=RoleMongoRepository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoleMongoRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/mongo/RoleMongoRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"RoleMongoRepository.d.ts","sourceRo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F,KAAS,EACT,OAAY,EACZ,KAAa,EACb,MAAW,EACX,OAAY,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;CAgBnD;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/cursor" />
|
|
2
|
+
/// <reference types="mongoose/types/aggregate.js" />
|
|
3
|
+
/// <reference types="mongoose/types/callback.js" />
|
|
4
|
+
/// <reference types="mongoose/types/collection.js" />
|
|
5
|
+
/// <reference types="mongoose/types/connection.js" />
|
|
6
|
+
/// <reference types="mongoose/types/cursor.js" />
|
|
7
|
+
/// <reference types="mongoose/types/document.js" />
|
|
8
|
+
/// <reference types="mongoose/types/error.js" />
|
|
9
|
+
/// <reference types="mongoose/types/expressions.js" />
|
|
10
|
+
/// <reference types="mongoose/types/helpers.js" />
|
|
11
|
+
/// <reference types="mongoose/types/middlewares.js" />
|
|
12
|
+
/// <reference types="mongoose/types/indexes.js" />
|
|
13
|
+
/// <reference types="mongoose/types/models.js" />
|
|
14
|
+
/// <reference types="mongoose/types/mongooseoptions.js" />
|
|
15
|
+
/// <reference types="mongoose/types/pipelinestage.js" />
|
|
16
|
+
/// <reference types="mongoose/types/populate.js" />
|
|
17
|
+
/// <reference types="mongoose/types/query.js" />
|
|
18
|
+
/// <reference types="mongoose/types/schemaoptions.js" />
|
|
19
|
+
/// <reference types="mongoose/types/schematypes.js" />
|
|
20
|
+
/// <reference types="mongoose/types/session.js" />
|
|
21
|
+
/// <reference types="mongoose/types/types.js" />
|
|
22
|
+
/// <reference types="mongoose/types/utility.js" />
|
|
23
|
+
/// <reference types="mongoose/types/validation.js" />
|
|
24
|
+
/// <reference types="mongoose/types/virtuals.js" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype.js" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype.js" />
|
|
27
|
+
/// <reference types="mongoose-paginate-v2" />
|
|
1
28
|
import { ITenantRepository } from '../../interfaces/ITenantRepository';
|
|
29
|
+
import { Cursor } from "mongoose";
|
|
2
30
|
import { IDraxFindOptions, IDraxPaginateOptions, IDraxPaginateResult } from "@drax/crud-share";
|
|
3
31
|
import { ITenant, ITenantBase } from "@drax/identity-share";
|
|
4
32
|
declare class TenantMongoRepository implements ITenantRepository {
|
|
@@ -11,7 +39,8 @@ declare class TenantMongoRepository implements ITenantRepository {
|
|
|
11
39
|
fetchAll(): Promise<ITenant[]>;
|
|
12
40
|
search(value: string, limit?: number): Promise<ITenant[]>;
|
|
13
41
|
paginate({ page, limit, orderBy, order, search, filters }: IDraxPaginateOptions): Promise<IDraxPaginateResult<ITenant>>;
|
|
14
|
-
find({
|
|
42
|
+
find({ limit, orderBy, order, search, filters }: IDraxFindOptions): Promise<ITenant[]>;
|
|
43
|
+
findCursor({ limit, orderBy, order, search, filters }: IDraxFindOptions): Promise<Cursor>;
|
|
15
44
|
}
|
|
16
45
|
export default TenantMongoRepository;
|
|
17
46
|
//# sourceMappingURL=TenantMongoRepository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantMongoRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/mongo/TenantMongoRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAA;
|
|
1
|
+
{"version":3,"file":"TenantMongoRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/mongo/TenantMongoRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAA;AAEpE,OAAO,EAAC,MAAM,EAAkC,MAAM,UAAU,CAAC;AAEjE,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAC,OAAO,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAE1D,cAAM,qBAAsB,YAAW,iBAAiB;IAEpD,aAAa,WAAiB;IAExB,MAAM,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAMjD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAK7D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAK7C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAKjD,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAK9B,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAa,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAS/D,QAAQ,CAAC,EACI,IAAQ,EACR,KAAS,EACT,OAAY,EACZ,KAAa,EACb,MAAW,EACX,OAAY,EACf,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAwBxE,IAAI,CAAC,EACI,KAAS,EACT,OAAY,EACZ,KAAa,EACb,MAAW,EACX,OAAY,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAiB7C,UAAU,CAAC,EACI,KAAS,EACT,OAAY,EACZ,KAAa,EACb,MAAW,EACX,OAAY,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;CAgBzD;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -1,6 +1,34 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/cursor" />
|
|
2
|
+
/// <reference types="mongoose/types/aggregate.js" />
|
|
3
|
+
/// <reference types="mongoose/types/callback.js" />
|
|
4
|
+
/// <reference types="mongoose/types/collection.js" />
|
|
5
|
+
/// <reference types="mongoose/types/connection.js" />
|
|
6
|
+
/// <reference types="mongoose/types/cursor.js" />
|
|
7
|
+
/// <reference types="mongoose/types/document.js" />
|
|
8
|
+
/// <reference types="mongoose/types/error.js" />
|
|
9
|
+
/// <reference types="mongoose/types/expressions.js" />
|
|
10
|
+
/// <reference types="mongoose/types/helpers.js" />
|
|
11
|
+
/// <reference types="mongoose/types/middlewares.js" />
|
|
12
|
+
/// <reference types="mongoose/types/indexes.js" />
|
|
13
|
+
/// <reference types="mongoose/types/models.js" />
|
|
14
|
+
/// <reference types="mongoose/types/mongooseoptions.js" />
|
|
15
|
+
/// <reference types="mongoose/types/pipelinestage.js" />
|
|
16
|
+
/// <reference types="mongoose/types/populate.js" />
|
|
17
|
+
/// <reference types="mongoose/types/query.js" />
|
|
18
|
+
/// <reference types="mongoose/types/schemaoptions.js" />
|
|
19
|
+
/// <reference types="mongoose/types/schematypes.js" />
|
|
20
|
+
/// <reference types="mongoose/types/session.js" />
|
|
21
|
+
/// <reference types="mongoose/types/types.js" />
|
|
22
|
+
/// <reference types="mongoose/types/utility.js" />
|
|
23
|
+
/// <reference types="mongoose/types/validation.js" />
|
|
24
|
+
/// <reference types="mongoose/types/virtuals.js" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype.js" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype.js" />
|
|
27
|
+
/// <reference types="mongoose-paginate-v2" />
|
|
1
28
|
import type { IUser, IUserCreate, IUserUpdate } from "@drax/identity-share";
|
|
2
29
|
import type { IUserRepository } from "../../interfaces/IUserRepository";
|
|
3
|
-
import {
|
|
30
|
+
import { Cursor } from "mongoose";
|
|
31
|
+
import { IDraxFindOptions, IDraxPaginateOptions, IDraxPaginateResult } from "@drax/crud-share";
|
|
4
32
|
declare class UserMongoRepository implements IUserRepository {
|
|
5
33
|
private roleRepository;
|
|
6
34
|
constructor();
|
|
@@ -12,6 +40,8 @@ declare class UserMongoRepository implements IUserRepository {
|
|
|
12
40
|
paginate({ page, limit, orderBy, order, search, filters }: IDraxPaginateOptions): Promise<IDraxPaginateResult<IUser>>;
|
|
13
41
|
changePassword(id: string, password: string): Promise<boolean>;
|
|
14
42
|
changeAvatar(id: string, avatar: string): Promise<boolean>;
|
|
43
|
+
find({ limit, orderBy, order, search, filters }: IDraxFindOptions): Promise<IUser[]>;
|
|
44
|
+
findCursor({ limit, orderBy, order, search, filters }: IDraxFindOptions): Promise<Cursor>;
|
|
15
45
|
}
|
|
16
46
|
export default UserMongoRepository;
|
|
17
47
|
//# sourceMappingURL=UserMongoRepository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMongoRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/mongo/UserMongoRepository.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,KAAK,EAAE,WAAW,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAE1E,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"UserMongoRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/mongo/UserMongoRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,OAAO,KAAK,EAAC,KAAK,EAAE,WAAW,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAE1E,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAC,MAAM,EAAiB,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAG7F,cAAM,mBAAoB,YAAW,eAAe;IAChD,OAAO,CAAC,cAAc,CAAsB;;IAOtC,MAAM,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;IAoB7C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;IAezD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMpC,QAAQ,CAAC,EAAE,EAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAKnC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAKhD,QAAQ,CAAC,EACI,IAAO,EACP,KAAQ,EACR,OAAW,EACX,KAAY,EACZ,MAAU,EACV,OAAW,EAAC,EAAG,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IA2BtF,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,CAAC;IAU7D,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,CAAC;IAUzD,IAAI,CAAC,EACI,KAAS,EACT,OAAY,EACZ,KAAa,EACb,MAAW,EACX,OAAY,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAiB3C,UAAU,CAAC,EACI,KAAS,EACT,OAAY,EACZ,KAAa,EACb,MAAW,EACX,OAAY,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;CAgBzD;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -14,7 +14,7 @@ declare class TenantSqliteRepository implements ITenantRepository {
|
|
|
14
14
|
deleteAll(): Promise<boolean>;
|
|
15
15
|
fetchAll(): Promise<ITenant[]>;
|
|
16
16
|
paginate({ page, limit, orderBy, order, search, filters }: IDraxPaginateOptions): Promise<IDraxPaginateResult<ITenant>>;
|
|
17
|
-
find({
|
|
17
|
+
find({ limit, orderBy, order, search, filters }: IDraxFindOptions): Promise<ITenant[]>;
|
|
18
18
|
}
|
|
19
19
|
export default TenantSqliteRepository;
|
|
20
20
|
//# sourceMappingURL=TenantSqliteRepository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantSqliteRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/sqlite/TenantSqliteRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAA;AAIpE,OAAO,EAAC,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAY7F,cAAM,sBAAuB,YAAW,iBAAiB;IAErD,OAAO,CAAC,EAAE,CAAM;IAChB,OAAO,CAAC,YAAY,CAAS;gBAEjB,YAAY,EAAC,MAAM,EAAE,OAAO,GAAC,OAAe;IAMxD,KAAK;IAWC,MAAM,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IA0BjD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAK7C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAKjD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAqB7D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMpC,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;IAM7B,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAQ9B,QAAQ,CAAC,EACI,IAAO,EACP,KAAQ,EACR,OAAW,EACX,KAAY,EACZ,MAAU,EACV,OAAW,EAAC,EAAG,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAuBxF,IAAI,CAAC,EACI,
|
|
1
|
+
{"version":3,"file":"TenantSqliteRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/sqlite/TenantSqliteRepository.ts"],"names":[],"mappings":"AAA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":"","sources":["../../src/routes/RoleRoutes.ts"],"names":[],"mappings":"AAIA,iBAAe,UAAU,CAAC,OAAO,KAAA,EAAE,OAAO,KAAA,
|
|
1
|
+
{"version":3,"file":"RoleRoutes.d.ts","sourceRoot":"","sources":["../../src/routes/RoleRoutes.ts"],"names":[],"mappings":"AAIA,iBAAe,UAAU,CAAC,OAAO,KAAA,EAAE,OAAO,KAAA,iBAwBzC;AAED,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserRoutes.d.ts","sourceRoot":"","sources":["../../src/routes/UserRoutes.ts"],"names":[],"mappings":"AAEA,iBAAe,UAAU,CAAC,OAAO,KAAA,EAAE,OAAO,KAAA,
|
|
1
|
+
{"version":3,"file":"UserRoutes.d.ts","sourceRoot":"","sources":["../../src/routes/UserRoutes.ts"],"names":[],"mappings":"AAEA,iBAAe,UAAU,CAAC,OAAO,KAAA,EAAE,OAAO,KAAA,iBA0BzC;AAED,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,CAAA"}
|