@merkaly/api 0.2.2-12 → 0.2.2-13
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/package.json +1 -1
- package/.output/abstract/app.controller.d.ts +0 -11
- package/.output/abstract/app.controller.d.ts.map +0 -1
- package/.output/abstract/app.controller.js +0 -22
- package/.output/abstract/app.controller.js.map +0 -1
- package/.output/abstract/app.entity.d.ts +0 -9
- package/.output/abstract/app.entity.d.ts.map +0 -1
- package/.output/abstract/app.entity.js +0 -28
- package/.output/abstract/app.entity.js.map +0 -1
- package/.output/abstract/app.exception.d.ts +0 -11
- package/.output/abstract/app.exception.d.ts.map +0 -1
- package/.output/abstract/app.exception.js +0 -37
- package/.output/abstract/app.exception.js.map +0 -1
- package/.output/abstract/app.repository.d.ts +0 -20
- package/.output/abstract/app.repository.d.ts.map +0 -1
- package/.output/abstract/app.repository.js +0 -73
- package/.output/abstract/app.repository.js.map +0 -1
- package/.output/abstract/app.router.d.ts +0 -6
- package/.output/abstract/app.router.d.ts.map +0 -1
- package/.output/abstract/app.router.js +0 -8
- package/.output/abstract/app.router.js.map +0 -1
- package/.output/configs/app.controller.d.ts +0 -11
- package/.output/configs/app.controller.d.ts.map +0 -1
- package/.output/configs/app.controller.js +0 -22
- package/.output/configs/app.controller.js.map +0 -1
- package/.output/configs/app.entity.d.ts +0 -9
- package/.output/configs/app.entity.d.ts.map +0 -1
- package/.output/configs/app.entity.js +0 -28
- package/.output/configs/app.entity.js.map +0 -1
- package/.output/configs/app.exception.d.ts +0 -11
- package/.output/configs/app.exception.d.ts.map +0 -1
- package/.output/configs/app.exception.js +0 -37
- package/.output/configs/app.exception.js.map +0 -1
- package/.output/configs/app.repository.d.ts +0 -20
- package/.output/configs/app.repository.d.ts.map +0 -1
- package/.output/configs/app.repository.js +0 -73
- package/.output/configs/app.repository.js.map +0 -1
- package/.output/configs/app.router.d.ts +0 -6
- package/.output/configs/app.router.d.ts.map +0 -1
- package/.output/configs/app.router.js +0 -8
- package/.output/configs/app.router.js.map +0 -1
- package/.output/decorators/organization.decorator.d.ts +0 -2
- package/.output/decorators/organization.decorator.d.ts.map +0 -1
- package/.output/decorators/organization.decorator.js +0 -10
- package/.output/decorators/organization.decorator.js.map +0 -1
- package/.output/globals/global.controller.d.ts +0 -20
- package/.output/globals/global.controller.d.ts.map +0 -1
- package/.output/globals/global.controller.js +0 -76
- package/.output/globals/global.controller.js.map +0 -1
- package/.output/interceptors/logger.interceptor.d.ts +0 -9
- package/.output/interceptors/logger.interceptor.d.ts.map +0 -1
- package/.output/interceptors/logger.interceptor.js +0 -54
- package/.output/interceptors/logger.interceptor.js.map +0 -1
- package/.output/modules/app.module.d.ts +0 -12
- package/.output/modules/app.module.d.ts.map +0 -1
- package/.output/modules/app.module.js +0 -37
- package/.output/modules/app.module.js.map +0 -1
- package/.output/modules/auth/auth.controller.d.ts +0 -7
- package/.output/modules/auth/auth.controller.d.ts.map +0 -1
- package/.output/modules/auth/auth.controller.js +0 -31
- package/.output/modules/auth/auth.controller.js.map +0 -1
- package/.output/modules/auth/connections/connection.controller.d.ts +0 -8
- package/.output/modules/auth/connections/connection.controller.d.ts.map +0 -1
- package/.output/modules/auth/connections/connection.controller.js +0 -30
- package/.output/modules/auth/connections/connection.controller.js.map +0 -1
- package/.output/modules/auth/connections/connection.module.d.ts +0 -8
- package/.output/modules/auth/connections/connection.module.d.ts.map +0 -1
- package/.output/modules/auth/connections/connection.module.js +0 -22
- package/.output/modules/auth/connections/connection.module.js.map +0 -1
- package/.output/modules/auth/connections/connection.validator.d.ts +0 -10
- package/.output/modules/auth/connections/connection.validator.d.ts.map +0 -1
- package/.output/modules/auth/connections/connection.validator.js +0 -24
- package/.output/modules/auth/connections/connection.validator.js.map +0 -1
- package/.output/modules/auth/members/member.controller.d.ts +0 -8
- package/.output/modules/auth/members/member.controller.d.ts.map +0 -1
- package/.output/modules/auth/members/member.controller.js +0 -30
- package/.output/modules/auth/members/member.controller.js.map +0 -1
- package/.output/modules/auth/members/member.module.d.ts +0 -8
- package/.output/modules/auth/members/member.module.d.ts.map +0 -1
- package/.output/modules/auth/members/member.module.js +0 -22
- package/.output/modules/auth/members/member.module.js.map +0 -1
- package/.output/modules/auth/members/member.validator.d.ts +0 -4
- package/.output/modules/auth/members/member.validator.d.ts.map +0 -1
- package/.output/modules/auth/members/member.validator.js +0 -4
- package/.output/modules/auth/members/member.validator.js.map +0 -1
- package/.output/modules/auth/organizations/organization.controller.d.ts +0 -16
- package/.output/modules/auth/organizations/organization.controller.d.ts.map +0 -1
- package/.output/modules/auth/organizations/organization.controller.js +0 -101
- package/.output/modules/auth/organizations/organization.controller.js.map +0 -1
- package/.output/modules/auth/organizations/organization.module.d.ts +0 -9
- package/.output/modules/auth/organizations/organization.module.d.ts.map +0 -1
- package/.output/modules/auth/organizations/organization.module.js +0 -24
- package/.output/modules/auth/organizations/organization.module.js.map +0 -1
- package/.output/modules/auth/organizations/organization.repository.d.ts +0 -9
- package/.output/modules/auth/organizations/organization.repository.d.ts.map +0 -1
- package/.output/modules/auth/organizations/organization.repository.js +0 -42
- package/.output/modules/auth/organizations/organization.repository.js.map +0 -1
- package/.output/modules/auth/organizations/organization.validator.d.ts +0 -7
- package/.output/modules/auth/organizations/organization.validator.d.ts.map +0 -1
- package/.output/modules/auth/organizations/organization.validator.js +0 -22
- package/.output/modules/auth/organizations/organization.validator.js.map +0 -1
- package/.output/modules/health/health.controller.d.ts +0 -8
- package/.output/modules/health/health.controller.d.ts.map +0 -1
- package/.output/modules/health/health.controller.js +0 -29
- package/.output/modules/health/health.controller.js.map +0 -1
- package/.output/modules/health/health.module.d.ts +0 -9
- package/.output/modules/health/health.module.d.ts.map +0 -1
- package/.output/modules/health/health.module.js +0 -24
- package/.output/modules/health/health.module.js.map +0 -1
- package/.output/modules/health.module.d.ts +0 -3
- package/.output/modules/health.module.d.ts.map +0 -1
- package/.output/modules/health.module.js +0 -14
- package/.output/modules/health.module.js.map +0 -1
- package/.output/modules/settings/organization/organization.entity.d.ts +0 -10
- package/.output/modules/settings/organization/organization.entity.d.ts.map +0 -1
- package/.output/modules/settings/organization/organization.entity.js +0 -11
- package/.output/modules/settings/organization/organization.entity.js.map +0 -1
- package/.output/modules/settings/organizations/organization.controller.d.ts +0 -16
- package/.output/modules/settings/organizations/organization.controller.d.ts.map +0 -1
- package/.output/modules/settings/organizations/organization.controller.js +0 -101
- package/.output/modules/settings/organizations/organization.controller.js.map +0 -1
- package/.output/modules/settings/organizations/organization.module.d.ts +0 -9
- package/.output/modules/settings/organizations/organization.module.d.ts.map +0 -1
- package/.output/modules/settings/organizations/organization.module.js +0 -24
- package/.output/modules/settings/organizations/organization.module.js.map +0 -1
- package/.output/modules/settings/organizations/organization.repository.d.ts +0 -9
- package/.output/modules/settings/organizations/organization.repository.d.ts.map +0 -1
- package/.output/modules/settings/organizations/organization.repository.js +0 -42
- package/.output/modules/settings/organizations/organization.repository.js.map +0 -1
- package/.output/modules/settings/organizations/organization.validator.d.ts +0 -7
- package/.output/modules/settings/organizations/organization.validator.d.ts.map +0 -1
- package/.output/modules/settings/organizations/organization.validator.js +0 -22
- package/.output/modules/settings/organizations/organization.validator.js.map +0 -1
- package/.output/providers/mongo.provider.d.ts +0 -20
- package/.output/providers/mongo.provider.d.ts.map +0 -1
- package/.output/providers/mongo.provider.js +0 -41
- package/.output/providers/mongo.provider.js.map +0 -1
- package/.output/providers/schema.provider.d.ts +0 -12
- package/.output/providers/schema.provider.d.ts.map +0 -1
- package/.output/providers/schema.provider.js +0 -33
- package/.output/providers/schema.provider.js.map +0 -1
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrganizationRepository = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
const short_unique_id_1 = __importDefault(require("short-unique-id"));
|
|
6
|
-
const auth0_service_1 = require("../../../services/auth0.service");
|
|
7
|
-
let OrganizationRepository = class OrganizationRepository {
|
|
8
|
-
find(userId) {
|
|
9
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10
|
-
return this.$auth0.users.getUserOrganizations({ id: userId });
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
create(validator) {
|
|
14
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
-
const uid = new short_unique_id_1.default({ length: 10 });
|
|
16
|
-
const createOrg = {
|
|
17
|
-
name: uid(),
|
|
18
|
-
display_name: validator.name,
|
|
19
|
-
};
|
|
20
|
-
const organization = yield this.$auth0.organizations.create(createOrg);
|
|
21
|
-
const allConnections = yield this.$auth0.getConnections()
|
|
22
|
-
.then(connections => connections.filter(({ name }) => name !== 'sms'));
|
|
23
|
-
const connectionsPromise = [];
|
|
24
|
-
for (const connection of allConnections) {
|
|
25
|
-
connectionsPromise.push(this.$auth0.organizations.addEnabledConnection({ id: organization.id }, {
|
|
26
|
-
connection_id: connection.id,
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
return Promise.all(connectionsPromise)
|
|
30
|
-
.then(() => organization);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, common_1.Inject)(),
|
|
36
|
-
__metadata("design:type", auth0_service_1.Auth0Service)
|
|
37
|
-
], OrganizationRepository.prototype, "$auth0", void 0);
|
|
38
|
-
OrganizationRepository = __decorate([
|
|
39
|
-
(0, common_1.Injectable)()
|
|
40
|
-
], OrganizationRepository);
|
|
41
|
-
exports.OrganizationRepository = OrganizationRepository;
|
|
42
|
-
//# sourceMappingURL=organization.repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organization.repository.js","sourceRoot":"","sources":["../../../../src/modules/settings/organizations/organization.repository.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AAEpD,sEAA4C;AAC5C,mEAA+D;AAI/D,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IAGpB,IAAI,CAAC,MAAc;;YAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAChE,CAAC;KAAA;IAEY,MAAM,CAAC,SAAsC;;YACxD,MAAM,GAAG,GAAG,IAAI,yBAAa,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;YAE9C,MAAM,SAAS,GAAuB;gBACpC,IAAI,EAAE,GAAG,EAAE;gBACX,YAAY,EAAE,SAAS,CAAC,IAAI;aAC7B,CAAC;YAEF,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAGvE,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;iBACtD,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC;YAEzE,MAAM,kBAAkB,GAAG,EAAE,CAAC;YAE9B,KAAK,MAAM,UAAU,IAAI,cAAc,EAAE;gBACvC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,EAAE,EAAE,YAAY,CAAC,EAAE,EAAE,EAAE;oBAC9F,aAAa,EAAE,UAAU,CAAC,EAAE;iBAC7B,CAAC,CAAC,CAAC;aACL;YAED,OAAO,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;iBACnC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC;QAC9B,CAAC;KAAA;CACF,CAAA;AA/BW;IAAT,IAAA,eAAM,GAAE;8BAA4B,4BAAY;sDAAC;AADvC,sBAAsB;IADlC,IAAA,mBAAU,GAAE;GACA,sBAAsB,CAgClC;AAhCY,wDAAsB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organization.validator.d.ts","sourceRoot":"","sources":["../../../../src/modules/settings/organizations/organization.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAG3C,qBAAa,2BAA4B,YAAW,kBAAkB;IAG7D,IAAI,EAAE,MAAM,CAAC;IAIb,KAAK,EAAE,MAAM,CAAC;IAGd,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateOrganizationValidator = void 0;
|
|
4
|
-
const class_validator_1 = require("class-validator");
|
|
5
|
-
class CreateOrganizationValidator {
|
|
6
|
-
}
|
|
7
|
-
__decorate([
|
|
8
|
-
(0, class_validator_1.IsString)(),
|
|
9
|
-
(0, class_validator_1.Length)(3, 255),
|
|
10
|
-
__metadata("design:type", String)
|
|
11
|
-
], CreateOrganizationValidator.prototype, "name", void 0);
|
|
12
|
-
__decorate([
|
|
13
|
-
(0, class_validator_1.IsString)(),
|
|
14
|
-
(0, class_validator_1.IsEmail)(),
|
|
15
|
-
__metadata("design:type", String)
|
|
16
|
-
], CreateOrganizationValidator.prototype, "email", void 0);
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsString)(),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], CreateOrganizationValidator.prototype, "password", void 0);
|
|
21
|
-
exports.CreateOrganizationValidator = CreateOrganizationValidator;
|
|
22
|
-
//# sourceMappingURL=organization.validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organization.validator.js","sourceRoot":"","sources":["../../../../src/modules/settings/organizations/organization.validator.ts"],"names":[],"mappings":";;;AACA,qDAA4D;AAE5D,MAAa,2BAA2B;CAWvC;AARC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,GAAG,CAAC;;yDACK;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,yBAAO,GAAE;;0DACW;AAGrB;IADC,IAAA,0BAAQ,GAAE;;6DACc;AAV3B,kEAWC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { MongooseModuleAsyncOptions, MongooseModuleOptions } from '@nestjs/mongoose';
|
|
2
|
-
import { Organization } from 'auth0';
|
|
3
|
-
import { Request } from 'express';
|
|
4
|
-
import { Auth0Service } from '../services/auth0.service';
|
|
5
|
-
declare module 'http' {
|
|
6
|
-
interface IncomingHttpHeaders {
|
|
7
|
-
identity?: string;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
declare module 'express-session' {
|
|
11
|
-
interface SessionData {
|
|
12
|
-
organization?: Organization;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export declare class MongoProvider implements MongooseModuleAsyncOptions {
|
|
16
|
-
static orgRegExp: RegExp;
|
|
17
|
-
static inject: (string | typeof Auth0Service)[];
|
|
18
|
-
static useFactory(request: Request, $auth0: Auth0Service): Promise<MongooseModuleOptions>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=mongo.provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mongo.provider.d.ts","sourceRoot":"","sources":["../../src/providers/mongo.provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAU,mBAAmB;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,WAAW;QACnB,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B;CACF;AAED,qBAAa,aAAc,YAAW,0BAA0B;IAC9D,OAAc,SAAS,SAA2B;IAElD,OAAc,MAAM,mCAA2B;WAE3B,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAkCvG"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MongoProvider = void 0;
|
|
4
|
-
const core_1 = require("@nestjs/core");
|
|
5
|
-
const config_1 = require("../config");
|
|
6
|
-
const missing_identity_exception_1 = require("../exceptions/missing-identity.exception");
|
|
7
|
-
const auth0_service_1 = require("../services/auth0.service");
|
|
8
|
-
class MongoProvider {
|
|
9
|
-
static useFactory(request, $auth0) {
|
|
10
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11
|
-
const { host, pass, user, retryWrites, w } = config_1.AppConfig.mongo;
|
|
12
|
-
const uri = `mongodb+srv://${user}:${pass}@${host}`;
|
|
13
|
-
if (!request || !request.headers.identity) {
|
|
14
|
-
return !process.env.ORG_ID
|
|
15
|
-
? ({ uri })
|
|
16
|
-
: ({ uri: `${uri}/${process.env.ORG_ID}` });
|
|
17
|
-
}
|
|
18
|
-
const { identity } = request.headers;
|
|
19
|
-
if (!identity) {
|
|
20
|
-
throw new missing_identity_exception_1.MissingIdentityException();
|
|
21
|
-
}
|
|
22
|
-
if (!request.session.organization) {
|
|
23
|
-
request.session.organization = MongoProvider.orgRegExp.test(identity)
|
|
24
|
-
? yield $auth0.organizations.getByID({ id: identity })
|
|
25
|
-
: yield $auth0.organizations.getByName({ name: identity });
|
|
26
|
-
}
|
|
27
|
-
const DSN = new URL(`${uri}/${request.session.organization.id}`);
|
|
28
|
-
DSN.searchParams.set('retryWrites', String(retryWrites));
|
|
29
|
-
DSN.searchParams.set('w', String(w));
|
|
30
|
-
return ({
|
|
31
|
-
retryAttempts: 1,
|
|
32
|
-
maxConnecting: 1,
|
|
33
|
-
uri: DSN.toString(),
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.MongoProvider = MongoProvider;
|
|
39
|
-
MongoProvider.orgRegExp = /^org_[a-zA-z0-9]{16}$/;
|
|
40
|
-
MongoProvider.inject = [core_1.REQUEST, auth0_service_1.Auth0Service];
|
|
41
|
-
//# sourceMappingURL=mongo.provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mongo.provider.js","sourceRoot":"","sources":["../../src/providers/mongo.provider.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAIvC,sCAAsC;AACtC,yFAAoF;AACpF,6DAAyD;AAczD,MAAa,aAAa;IAKjB,MAAM,CAAO,UAAU,CAAC,OAAgB,EAAE,MAAoB;;YACnE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,GAAG,kBAAS,CAAC,KAAK,CAAC;YAC7D,MAAM,GAAG,GAAG,iBAAiB,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;YAGpD,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE;gBACzC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM;oBACxB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;oBACX,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;aAC/C;YAED,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;YAErC,IAAI,CAAC,QAAQ,EAAE;gBACb,MAAM,IAAI,qDAAwB,EAAE,CAAC;aACtC;YAED,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE;gBACjC,OAAO,CAAC,OAAO,CAAC,YAAY,GAAG,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;oBACnE,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;oBACtD,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;aAC9D;YAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;YAEjE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;YACzD,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAErC,OAAO,CAAC;gBACN,aAAa,EAAE,CAAC;gBAChB,aAAa,EAAE,CAAC;gBAChB,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE;aACpB,CAAC,CAAC;QACL,CAAC;KAAA;;AAtCH,sCAuCC;AAtCe,uBAAS,GAAG,uBAAuB,CAAC;AAEpC,oBAAM,GAAG,CAAC,cAAO,EAAE,4BAAY,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AssetEntity } from '../modules/assets/asset.entity';
|
|
2
|
-
import { BrandEntity } from '../modules/inventory/brands/brand.entity';
|
|
3
|
-
import { CategoryEntity } from '../modules/inventory/categories/category.entity';
|
|
4
|
-
import { ProductEntity } from '../modules/inventory/products/product.entity';
|
|
5
|
-
import { PaymentEntity } from '../modules/settings/payments/payment.entity';
|
|
6
|
-
import { CartEntity } from '../modules/store/cart/cart.entity';
|
|
7
|
-
import { OrderEntity } from '../modules/store/orders/order.entity';
|
|
8
|
-
export declare class SchemaModule {
|
|
9
|
-
protected static entities: (typeof AssetEntity | typeof PaymentEntity | typeof BrandEntity | typeof CategoryEntity | typeof ProductEntity | typeof CartEntity | typeof OrderEntity)[];
|
|
10
|
-
static register(): import("@nestjs/common").DynamicModule;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=schema.provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.provider.d.ts","sourceRoot":"","sources":["../../src/providers/schema.provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,qBAAa,YAAY;IACvB,SAAS,CAAC,MAAM,CAAC,QAAQ,6JAQvB;WAEY,QAAQ;CAWvB"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SchemaModule = void 0;
|
|
4
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
5
|
-
const asset_entity_1 = require("../modules/assets/asset.entity");
|
|
6
|
-
const brand_entity_1 = require("../modules/inventory/brands/brand.entity");
|
|
7
|
-
const category_entity_1 = require("../modules/inventory/categories/category.entity");
|
|
8
|
-
const product_entity_1 = require("../modules/inventory/products/product.entity");
|
|
9
|
-
const payment_entity_1 = require("../modules/settings/payments/payment.entity");
|
|
10
|
-
const cart_entity_1 = require("../modules/store/cart/cart.entity");
|
|
11
|
-
const order_entity_1 = require("../modules/store/orders/order.entity");
|
|
12
|
-
class SchemaModule {
|
|
13
|
-
static register() {
|
|
14
|
-
const features = SchemaModule.entities.map((entity) => ({
|
|
15
|
-
name: entity.$index,
|
|
16
|
-
useFactory: () => {
|
|
17
|
-
return mongoose_1.SchemaFactory.createForClass(entity);
|
|
18
|
-
},
|
|
19
|
-
}));
|
|
20
|
-
return mongoose_1.MongooseModule.forFeatureAsync(features);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.SchemaModule = SchemaModule;
|
|
24
|
-
SchemaModule.entities = [
|
|
25
|
-
brand_entity_1.BrandEntity,
|
|
26
|
-
category_entity_1.CategoryEntity,
|
|
27
|
-
product_entity_1.ProductEntity,
|
|
28
|
-
asset_entity_1.AssetEntity,
|
|
29
|
-
cart_entity_1.CartEntity,
|
|
30
|
-
order_entity_1.OrderEntity,
|
|
31
|
-
payment_entity_1.PaymentEntity,
|
|
32
|
-
];
|
|
33
|
-
//# sourceMappingURL=schema.provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.provider.js","sourceRoot":"","sources":["../../src/providers/schema.provider.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAEjE,iEAA6D;AAC7D,2EAAuE;AACvE,qFAAiF;AACjF,iFAA6E;AAC7E,gFAA4E;AAC5E,mEAA+D;AAC/D,uEAAmE;AAEnE,MAAa,YAAY;IAWhB,MAAM,CAAC,QAAQ;QACpB,MAAM,QAAQ,GAAwB,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,CAAC;YAChF,IAAI,EAAE,MAAM,CAAC,MAAM;YAEnB,UAAU,EAAE,GAAG,EAAE;gBACf,OAAO,wBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAC9C,CAAC;SACF,CAAC,CAAC,CAAC;QAEJ,OAAO,yBAAc,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;;AArBH,oCAsBC;AArBkB,qBAAQ,GAAG;IAC1B,0BAAW;IACX,gCAAc;IACd,8BAAa;IACb,0BAAW;IACX,wBAAU;IACV,0BAAW;IACX,8BAAa;CACd,CAAC"}
|