@monorise/core 0.1.1 → 0.1.3
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/base/utils/index.js +2 -9
- package/dist/base/utils/index.js.map +1 -1
- package/dist/core/controllers/entity/create-entity.controller.js +39 -32
- package/dist/core/controllers/entity/create-entity.controller.js.map +1 -1
- package/dist/core/controllers/entity/delete-entity.controller.js +26 -20
- package/dist/core/controllers/entity/delete-entity.controller.js.map +1 -1
- package/dist/core/controllers/entity/get-entity-by-unique-field-value.controller.js +25 -17
- package/dist/core/controllers/entity/get-entity-by-unique-field-value.controller.js.map +1 -1
- package/dist/core/controllers/entity/get-entity.controller.js +25 -17
- package/dist/core/controllers/entity/get-entity.controller.js.map +1 -1
- package/dist/core/controllers/entity/list-entities.controller.js +39 -36
- package/dist/core/controllers/entity/list-entities.controller.js.map +1 -1
- package/dist/core/controllers/entity/update-entity.controller.js +40 -33
- package/dist/core/controllers/entity/update-entity.controller.js.map +1 -1
- package/dist/core/controllers/entity/upsert-entity.controller.js +64 -59
- package/dist/core/controllers/entity/upsert-entity.controller.js.map +1 -1
- package/dist/core/controllers/mutual/create-mutual.controller.js +42 -38
- package/dist/core/controllers/mutual/create-mutual.controller.js.map +1 -1
- package/dist/core/controllers/mutual/delete-mutual.controller.js +28 -22
- package/dist/core/controllers/mutual/delete-mutual.controller.js.map +1 -1
- package/dist/core/controllers/mutual/get-mutual.controller.js +25 -17
- package/dist/core/controllers/mutual/get-mutual.controller.js.map +1 -1
- package/dist/core/controllers/mutual/list-entities-by-entity.controller.js +52 -44
- package/dist/core/controllers/mutual/list-entities-by-entity.controller.js.map +1 -1
- package/dist/core/controllers/mutual/update-mutual.controller.js +38 -32
- package/dist/core/controllers/mutual/update-mutual.controller.js.map +1 -1
- package/dist/core/controllers/tag/list-tags.controller.js +39 -31
- package/dist/core/controllers/tag/list-tags.controller.js.map +1 -1
- package/dist/core/data/DbUtils.js +23 -12
- package/dist/core/data/DbUtils.js.map +1 -1
- package/dist/core/data/Entity.js +298 -334
- package/dist/core/data/Entity.js.map +1 -1
- package/dist/core/data/EventUtils.js +35 -27
- package/dist/core/data/EventUtils.js.map +1 -1
- package/dist/core/data/Mutual.js +282 -342
- package/dist/core/data/Mutual.js.map +1 -1
- package/dist/core/data/Tag.js +225 -228
- package/dist/core/data/Tag.js.map +1 -1
- package/dist/core/data/abstract/Repository.base.js +4 -7
- package/dist/core/data/abstract/Repository.base.js.map +1 -1
- package/dist/core/errors/extendable-error.js +0 -7
- package/dist/core/errors/extendable-error.js.map +1 -1
- package/dist/core/errors/standard-error.js +0 -3
- package/dist/core/errors/standard-error.js.map +1 -1
- package/dist/core/helpers/event.js +35 -34
- package/dist/core/helpers/event.js.map +1 -1
- package/dist/core/helpers/test/test-utils.js +60 -58
- package/dist/core/helpers/test/test-utils.js.map +1 -1
- package/dist/core/index.js +0 -8
- package/dist/core/index.js.map +1 -1
- package/dist/core/processors/create-entity-processor.js +12 -3
- package/dist/core/processors/create-entity-processor.js.map +1 -1
- package/dist/core/processors/mutual-processor.js +33 -23
- package/dist/core/processors/mutual-processor.js.map +1 -1
- package/dist/core/processors/prejoin-processor.js +117 -105
- package/dist/core/processors/prejoin-processor.js.map +1 -1
- package/dist/core/processors/replication-processor.js +27 -26
- package/dist/core/processors/replication-processor.js.map +1 -1
- package/dist/core/processors/tag-processor.js +47 -35
- package/dist/core/processors/tag-processor.js.map +1 -1
- package/dist/core/services/DependencyContainer.js +0 -4
- package/dist/core/services/DependencyContainer.js.map +1 -1
- package/dist/core/services/entity-service-lifecycle.js +29 -20
- package/dist/core/services/entity-service-lifecycle.js.map +1 -1
- package/dist/core/services/entity.service.js +95 -92
- package/dist/core/services/entity.service.js.map +1 -1
- package/dist/core/services/mutual.service.js +117 -113
- package/dist/core/services/mutual.service.js.map +1 -1
- package/package.json +1 -1
package/dist/base/utils/index.js
CHANGED
|
@@ -2,19 +2,12 @@ import { z } from 'zod';
|
|
|
2
2
|
function makeSchema(config) {
|
|
3
3
|
const { baseSchema, createSchema, mutual, effect } = config;
|
|
4
4
|
const { mutualSchema } = mutual || {};
|
|
5
|
-
const finalSchema = z.object({
|
|
6
|
-
...baseSchema.shape,
|
|
7
|
-
...createSchema?.shape,
|
|
8
|
-
...mutualSchema?.shape,
|
|
9
|
-
});
|
|
5
|
+
const finalSchema = z.object(Object.assign(Object.assign(Object.assign({}, baseSchema.shape), createSchema === null || createSchema === void 0 ? void 0 : createSchema.shape), mutualSchema === null || mutualSchema === void 0 ? void 0 : mutualSchema.shape));
|
|
10
6
|
if (effect) {
|
|
11
7
|
return effect(finalSchema);
|
|
12
8
|
}
|
|
13
9
|
return finalSchema;
|
|
14
10
|
}
|
|
15
|
-
const createEntityConfig = (config) => ({
|
|
16
|
-
...config,
|
|
17
|
-
finalSchema: makeSchema(config),
|
|
18
|
-
});
|
|
11
|
+
const createEntityConfig = (config) => (Object.assign(Object.assign({}, config), { finalSchema: makeSchema(config) }));
|
|
19
12
|
export { createEntityConfig };
|
|
20
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../base/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,SAAS,UAAU,CAOjB,MAAgD;IAChD,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC5D,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAUtC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../base/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,SAAS,UAAU,CAOjB,MAAgD;IAChD,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC5D,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAUtC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,+CACvB,UAAU,CAAC,KAAK,GAChB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,GACnB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,EACH,CAAC;IAEtB,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAC,WAAW,CAAkC,CAAC;IAC9D,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,kBAAkB,GAAG,CAQzB,MAAgD,EAChD,EAAE,CAAC,iCACA,MAAM,KACT,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,IAC/B,CAAC;AAEH,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,43 +1,50 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import httpStatus from 'http-status';
|
|
2
11
|
import { StandardError } from '../../errors/standard-error';
|
|
3
12
|
export class CreateEntityController {
|
|
4
|
-
entityService;
|
|
5
13
|
constructor(entityService) {
|
|
6
14
|
this.entityService = entityService;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
return res.status(httpStatus.OK).json(entity);
|
|
21
|
-
}
|
|
22
|
-
catch (err) {
|
|
23
|
-
if (err.constructor?.name === 'ZodError') {
|
|
24
|
-
return res.status(httpStatus.BAD_REQUEST).json({
|
|
25
|
-
code: 'API_VALIDATION_ERROR',
|
|
26
|
-
message: 'API validation failed',
|
|
27
|
-
details: err.flatten(),
|
|
15
|
+
this.controller = (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
var _a;
|
|
17
|
+
const accountId = req.headers['account-id'];
|
|
18
|
+
const { entityType } = req.params;
|
|
19
|
+
try {
|
|
20
|
+
const entity = yield this.entityService.createEntity({
|
|
21
|
+
entityType,
|
|
22
|
+
entityPayload: req.body,
|
|
23
|
+
accountId,
|
|
24
|
+
options: {
|
|
25
|
+
createAndUpdateDatetime: req.body.createdAt,
|
|
26
|
+
},
|
|
28
27
|
});
|
|
28
|
+
return res.status(httpStatus.OK).json(entity);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
catch (err) {
|
|
31
|
+
if (((_a = err.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'ZodError') {
|
|
32
|
+
return res.status(httpStatus.BAD_REQUEST).json({
|
|
33
|
+
code: 'API_VALIDATION_ERROR',
|
|
34
|
+
message: 'API validation failed',
|
|
35
|
+
details: err.flatten(),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if (err instanceof StandardError && err.code === 'EMAIL_EXISTS') {
|
|
39
|
+
return res.status(httpStatus.BAD_REQUEST).json(Object.assign({}, err.toJSON()));
|
|
40
|
+
}
|
|
41
|
+
console.log('===create-entity error:', {
|
|
42
|
+
err,
|
|
43
|
+
errorContext: JSON.stringify({ body: req.body, headers: req.headers }),
|
|
33
44
|
});
|
|
45
|
+
throw err;
|
|
34
46
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
errorContext: JSON.stringify({ body: req.body, headers: req.headers }),
|
|
38
|
-
});
|
|
39
|
-
throw err;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
47
|
+
});
|
|
48
|
+
}
|
|
42
49
|
}
|
|
43
50
|
//# sourceMappingURL=create-entity.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-entity.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/create-entity.controller.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,MAAM,OAAO,sBAAsB;
|
|
1
|
+
{"version":3,"file":"create-entity.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/create-entity.controller.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,MAAM,OAAO,sBAAsB;IACjC,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAEhD,eAAU,GAA0C,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;;YACrE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAC5C,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,MAE1B,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC;oBACnD,UAAU;oBACV,aAAa,EAAE,GAAG,CAAC,IAAI;oBACvB,SAAS;oBACT,OAAO,EAAE;wBACP,uBAAuB,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS;qBAC5C;iBACF,CAAC,CAAC;gBAEH,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,CAAA,MAAC,GAAgB,CAAC,WAAW,0CAAE,IAAI,MAAK,UAAU,EAAE,CAAC;oBACvD,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;wBAC7C,IAAI,EAAE,sBAAsB;wBAC5B,OAAO,EAAE,uBAAuB;wBAChC,OAAO,EAAG,GAAgB,CAAC,OAAO,EAAE;qBACrC,CAAC,CAAC;gBACL,CAAC;gBAED,IAAI,GAAG,YAAY,aAAa,IAAI,GAAG,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;oBAChE,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,mBACzC,GAAG,CAAC,MAAM,EAAE,EACf,CAAC;gBACL,CAAC;gBAED,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE;oBACrC,GAAG;oBACH,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;iBACvE,CAAC,CAAC;gBAEH,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC,CAAA,CAAC;IAzCiD,CAAC;CA0CrD"}
|
|
@@ -1,29 +1,35 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import httpStatus from 'http-status';
|
|
2
11
|
import { StandardError } from '../../errors/standard-error';
|
|
3
12
|
export class DeleteEntityController {
|
|
4
|
-
entityService;
|
|
5
13
|
constructor(entityService) {
|
|
6
14
|
this.entityService = entityService;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
accountId,
|
|
16
|
-
});
|
|
17
|
-
return res.json({ message: 'entity deleted' });
|
|
18
|
-
}
|
|
19
|
-
catch (err) {
|
|
20
|
-
if (err instanceof StandardError && err.code === 'ENTITY_NOT_FOUND') {
|
|
21
|
-
return res.status(httpStatus.NOT_FOUND).json({
|
|
22
|
-
...err.toJSON(),
|
|
15
|
+
this.controller = (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const accountId = req.headers['account-id'];
|
|
17
|
+
const { entityType, entityId } = req.params;
|
|
18
|
+
try {
|
|
19
|
+
yield this.entityService.deleteEntity({
|
|
20
|
+
entityType,
|
|
21
|
+
entityId,
|
|
22
|
+
accountId,
|
|
23
23
|
});
|
|
24
|
+
return res.json({ message: 'entity deleted' });
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
if (err instanceof StandardError && err.code === 'ENTITY_NOT_FOUND') {
|
|
28
|
+
return res.status(httpStatus.NOT_FOUND).json(Object.assign({}, err.toJSON()));
|
|
29
|
+
}
|
|
30
|
+
throw err;
|
|
24
31
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
32
|
+
});
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
//# sourceMappingURL=delete-entity.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-entity.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/delete-entity.controller.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,MAAM,OAAO,sBAAsB;
|
|
1
|
+
{"version":3,"file":"delete-entity.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/delete-entity.controller.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,MAAM,OAAO,sBAAsB;IACjC,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAEzD,eAAU,GAA0C,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;YACrE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAC5C,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,MAGpC,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC;oBACpC,UAAU;oBACV,QAAQ;oBACR,SAAS;iBACV,CAAC,CAAC;gBAEH,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC,CAAC;YACjD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,GAAG,YAAY,aAAa,IAAI,GAAG,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;oBACpE,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,IAAI,mBACvC,GAAG,CAAC,MAAM,EAAE,EACf,CAAC;gBACL,CAAC;gBAED,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC,CAAA,CAAC;IA1B0D,CAAC;CA2B9D"}
|
|
@@ -1,24 +1,32 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import httpStatus from 'http-status';
|
|
2
11
|
export class GetEntityByUniqueFieldValueController {
|
|
3
|
-
entityRepository;
|
|
4
12
|
constructor(entityRepository) {
|
|
5
13
|
this.entityRepository = entityRepository;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
14
|
+
this.controller = (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const { entityType, uniqueField, uniqueFieldValue } = req.params;
|
|
16
|
+
try {
|
|
17
|
+
const entity = yield this.entityRepository.getEntityByUniqueField(entityType, uniqueField, uniqueFieldValue);
|
|
18
|
+
return res.status(httpStatus.OK).json(entity);
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
if (err.code === 'ENTITY_IS_UNDEFINED') {
|
|
22
|
+
return res.status(httpStatus.NOT_FOUND).json({
|
|
23
|
+
code: 'ENTITY_NOT_FOUND',
|
|
24
|
+
message: 'Entity not found',
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
throw err;
|
|
19
28
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
29
|
+
});
|
|
30
|
+
}
|
|
23
31
|
}
|
|
24
32
|
//# sourceMappingURL=get-entity-by-unique-field-value.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-entity-by-unique-field-value.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/get-entity-by-unique-field-value.controller.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AAGrC,MAAM,OAAO,qCAAqC;
|
|
1
|
+
{"version":3,"file":"get-entity-by-unique-field-value.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/get-entity-by-unique-field-value.controller.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AAGrC,MAAM,OAAO,qCAAqC;IAChD,YAAoB,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAEtD,eAAU,GAA0C,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;YACrE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,GACjD,GAAG,CAAC,MAIH,CAAC;YAEJ,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAC/D,UAAU,EACV,WAAW,EACX,gBAAgB,CACjB,CAAC;gBAEF,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAK,GAAW,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;oBAChD,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC;wBAC3C,IAAI,EAAE,kBAAkB;wBACxB,OAAO,EAAE,kBAAkB;qBAC5B,CAAC,CAAC;gBACL,CAAC;gBAED,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC,CAAA,CAAC;IA5BuD,CAAC;CA6B3D"}
|
|
@@ -1,24 +1,32 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import httpStatus from 'http-status';
|
|
2
11
|
export class GetEntityController {
|
|
3
|
-
entityRepository;
|
|
4
12
|
constructor(entityRepository) {
|
|
5
13
|
this.entityRepository = entityRepository;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
14
|
+
this.controller = (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const { entityType, entityId } = req.params;
|
|
16
|
+
try {
|
|
17
|
+
const entity = yield this.entityRepository.getEntity(entityType, entityId);
|
|
18
|
+
return res.status(httpStatus.OK).json(entity);
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
if (err.code === 'ENTITY_IS_UNDEFINED') {
|
|
22
|
+
return res.status(httpStatus.NOT_FOUND).json({
|
|
23
|
+
code: 'ENTITY_NOT_FOUND',
|
|
24
|
+
message: 'Entity not found',
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
throw err;
|
|
19
28
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
29
|
+
});
|
|
30
|
+
}
|
|
23
31
|
}
|
|
24
32
|
//# sourceMappingURL=get-entity.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-entity.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/get-entity.controller.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AAGrC,MAAM,OAAO,mBAAmB;
|
|
1
|
+
{"version":3,"file":"get-entity.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/get-entity.controller.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AAGrC,MAAM,OAAO,mBAAmB;IAC9B,YAAoB,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAEtD,eAAU,GAA0C,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;YACrE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,MAGpC,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAClD,UAAU,EACV,QAAQ,CACT,CAAC;gBAEF,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAK,GAAW,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;oBAChD,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC;wBAC3C,IAAI,EAAE,kBAAkB;wBACxB,OAAO,EAAE,kBAAkB;qBAC5B,CAAC,CAAC;gBACL,CAAC;gBAED,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC,CAAA,CAAC;IAzBuD,CAAC;CA0B3D"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { z } from 'zod';
|
|
2
11
|
import { fromLastKeyQuery } from '../../helpers/fromLastKeyQuery';
|
|
3
12
|
import { toLastKeyResponse } from '../../helpers/toLastKeyResponse';
|
|
@@ -9,48 +18,42 @@ const querySchema = z.object({
|
|
|
9
18
|
end: z.string().optional(),
|
|
10
19
|
});
|
|
11
20
|
export class ListEntitiesController {
|
|
12
|
-
entityRepository;
|
|
13
21
|
constructor(entityRepository) {
|
|
14
22
|
this.entityRepository = entityRepository;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
this.controller = (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const errorContext = {};
|
|
25
|
+
try {
|
|
26
|
+
const accountId = req.headers['account-id'] || '';
|
|
27
|
+
if (Array.isArray(accountId)) {
|
|
28
|
+
throw new Error('multiple account-id detected');
|
|
29
|
+
}
|
|
30
|
+
errorContext.accountId = accountId;
|
|
31
|
+
errorContext.params = req.params;
|
|
32
|
+
errorContext.query = req.query;
|
|
33
|
+
const { entityType } = req.params;
|
|
34
|
+
const { lastKey, query, limit, start, end } = querySchema.parse(req.query);
|
|
35
|
+
if (query) {
|
|
36
|
+
const results = yield this.entityRepository.queryEntities(entityType, query);
|
|
37
|
+
return res.json({
|
|
38
|
+
data: results.items.map((item) => item.toJSON()),
|
|
39
|
+
totalCount: results.totalCount,
|
|
40
|
+
filteredCount: results.filteredCount,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const results = yield this.entityRepository.listEntities(Object.assign({ entityType, limit: Number(limit), options: {
|
|
44
|
+
lastKey: fromLastKeyQuery(lastKey),
|
|
45
|
+
} }, (start && end ? { between: { start, end } } : {})));
|
|
30
46
|
return res.json({
|
|
31
47
|
data: results.items.map((item) => item.toJSON()),
|
|
32
48
|
totalCount: results.totalCount,
|
|
33
|
-
|
|
49
|
+
lastKey: toLastKeyResponse(results.lastKey),
|
|
34
50
|
});
|
|
35
51
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
...(start && end ? { between: { start, end } } : {}),
|
|
43
|
-
});
|
|
44
|
-
return res.json({
|
|
45
|
-
data: results.items.map((item) => item.toJSON()),
|
|
46
|
-
totalCount: results.totalCount,
|
|
47
|
-
lastKey: toLastKeyResponse(results.lastKey),
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
console.log({ error, errorContext });
|
|
52
|
-
return res.status(500).json({ message: error });
|
|
53
|
-
}
|
|
54
|
-
};
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.log({ error, errorContext });
|
|
54
|
+
return res.status(500).json({ message: error });
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
55
58
|
}
|
|
56
59
|
//# sourceMappingURL=list-entities.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-entities.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/list-entities.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,MAAM,WAAW,GAAG,CAAC,CAAC,MAA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E,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACpD,CAAC;gBACH,OAAO,GAAG,CAAC,IAAI,CAAC;oBACd,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;oBAChD,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC,OAAO,CAAC;iBAC5C,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;gBACrC,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,CAAA,CAAC;IAnDuD,CAAC;CAoD3D"}
|
|
@@ -1,44 +1,51 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import httpStatus from 'http-status';
|
|
2
11
|
import { StandardError } from '../../errors/standard-error';
|
|
3
12
|
export class UpdateEntityController {
|
|
4
|
-
entityService;
|
|
5
13
|
constructor(entityService) {
|
|
6
14
|
this.entityService = entityService;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
accountId,
|
|
13
|
-
'req.params': req.params,
|
|
14
|
-
'req.body': req.body,
|
|
15
|
-
};
|
|
16
|
-
try {
|
|
17
|
-
const entity = await this.entityService.updateEntity({
|
|
18
|
-
entityType,
|
|
19
|
-
entityId,
|
|
20
|
-
entityPayload: req.body,
|
|
15
|
+
this.controller = (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
var _a;
|
|
17
|
+
const accountId = req.headers['account-id'];
|
|
18
|
+
const { entityType, entityId } = req.params;
|
|
19
|
+
const errorContext = {
|
|
21
20
|
accountId,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
details: err.flatten(),
|
|
21
|
+
'req.params': req.params,
|
|
22
|
+
'req.body': req.body,
|
|
23
|
+
};
|
|
24
|
+
try {
|
|
25
|
+
const entity = yield this.entityService.updateEntity({
|
|
26
|
+
entityType,
|
|
27
|
+
entityId,
|
|
28
|
+
entityPayload: req.body,
|
|
29
|
+
accountId,
|
|
32
30
|
});
|
|
31
|
+
errorContext.entity = entity;
|
|
32
|
+
return res.status(httpStatus.OK).json(entity);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
catch (err) {
|
|
35
|
+
if (((_a = err.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'ZodError') {
|
|
36
|
+
return res.status(httpStatus.BAD_REQUEST).json({
|
|
37
|
+
code: 'API_VALIDATION_ERROR',
|
|
38
|
+
message: 'API validation failed',
|
|
39
|
+
details: err.flatten(),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (err instanceof StandardError && err.code === 'ENTITY_NOT_FOUND') {
|
|
43
|
+
return res.status(httpStatus.NOT_FOUND).json(Object.assign({}, err.toJSON()));
|
|
44
|
+
}
|
|
45
|
+
console.log('====UPDATE_ENTITY_CONTROLLER_ERROR', err, JSON.stringify({ errorContext }, null, 2));
|
|
46
|
+
throw err;
|
|
38
47
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
};
|
|
48
|
+
});
|
|
49
|
+
}
|
|
43
50
|
}
|
|
44
51
|
//# sourceMappingURL=update-entity.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-entity.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/update-entity.controller.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,MAAM,OAAO,sBAAsB;
|
|
1
|
+
{"version":3,"file":"update-entity.controller.js","sourceRoot":"","sources":["../../../../controllers/entity/update-entity.controller.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,MAAM,OAAO,sBAAsB;IACjC,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAEhD,eAAU,GAA0C,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;;YACrE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAC5C,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,MAGpC,CAAC;YACF,MAAM,YAAY,GAAQ;gBACxB,SAAS;gBACT,YAAY,EAAE,GAAG,CAAC,MAAM;gBACxB,UAAU,EAAE,GAAG,CAAC,IAAI;aACrB,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC;oBACnD,UAAU;oBACV,QAAQ;oBACR,aAAa,EAAE,GAAG,CAAC,IAAI;oBACvB,SAAS;iBACV,CAAC,CAAC;gBACH,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