@monorise/core 1.0.1 → 1.0.2
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/controllers/entity/create-entity.controller.ts +2 -2
- package/controllers/entity/delete-entity.controller.ts +2 -2
- package/controllers/entity/get-entity.controller.ts +1 -1
- package/controllers/entity/list-entities.controller.ts +3 -3
- package/controllers/entity/update-entity.controller.ts +2 -2
- package/controllers/entity/upsert-entity.controller.ts +4 -4
- package/controllers/mutual/create-mutual.controller.ts +4 -4
- package/controllers/mutual/delete-mutual.controller.ts +2 -2
- package/controllers/mutual/get-mutual.controller.ts +1 -1
- package/controllers/mutual/list-entities-by-entity.controller.ts +1 -1
- package/controllers/mutual/update-mutual.controller.ts +2 -2
- package/controllers/setupRoutes.ts +1 -1
- package/controllers/tag/list-tags.controller.ts +3 -3
- package/data/DbUtils.ts +1 -1
- package/data/Entity.ts +1 -1
- package/data/EventUtils.ts +2 -2
- package/data/Mutual.ts +3 -3
- package/data/Tag.ts +1 -1
- package/dist/controllers/entity/create-entity.controller.d.ts +1 -1
- package/dist/controllers/entity/create-entity.controller.d.ts.map +1 -1
- package/dist/controllers/entity/create-entity.controller.js +1 -1
- package/dist/controllers/entity/create-entity.controller.js.map +1 -1
- package/dist/controllers/entity/delete-entity.controller.d.ts +1 -1
- package/dist/controllers/entity/delete-entity.controller.d.ts.map +1 -1
- package/dist/controllers/entity/delete-entity.controller.js +1 -1
- package/dist/controllers/entity/delete-entity.controller.js.map +1 -1
- package/dist/controllers/entity/get-entity.controller.d.ts +1 -1
- package/dist/controllers/entity/get-entity.controller.d.ts.map +1 -1
- package/dist/controllers/entity/list-entities.controller.d.ts +1 -1
- package/dist/controllers/entity/list-entities.controller.d.ts.map +1 -1
- package/dist/controllers/entity/list-entities.controller.js +2 -2
- package/dist/controllers/entity/list-entities.controller.js.map +1 -1
- package/dist/controllers/entity/update-entity.controller.d.ts +1 -1
- package/dist/controllers/entity/update-entity.controller.d.ts.map +1 -1
- package/dist/controllers/entity/update-entity.controller.js +1 -1
- package/dist/controllers/entity/update-entity.controller.js.map +1 -1
- package/dist/controllers/entity/upsert-entity.controller.d.ts +2 -2
- package/dist/controllers/entity/upsert-entity.controller.d.ts.map +1 -1
- package/dist/controllers/entity/upsert-entity.controller.js +2 -2
- package/dist/controllers/entity/upsert-entity.controller.js.map +1 -1
- package/dist/controllers/mutual/create-mutual.controller.d.ts +2 -2
- package/dist/controllers/mutual/create-mutual.controller.d.ts.map +1 -1
- package/dist/controllers/mutual/create-mutual.controller.js +2 -2
- package/dist/controllers/mutual/create-mutual.controller.js.map +1 -1
- package/dist/controllers/mutual/delete-mutual.controller.d.ts +1 -1
- package/dist/controllers/mutual/delete-mutual.controller.d.ts.map +1 -1
- package/dist/controllers/mutual/delete-mutual.controller.js +1 -1
- package/dist/controllers/mutual/delete-mutual.controller.js.map +1 -1
- package/dist/controllers/mutual/get-mutual.controller.d.ts +1 -1
- package/dist/controllers/mutual/get-mutual.controller.d.ts.map +1 -1
- package/dist/controllers/mutual/list-entities-by-entity.controller.d.ts +1 -1
- package/dist/controllers/mutual/list-entities-by-entity.controller.d.ts.map +1 -1
- package/dist/controllers/mutual/update-mutual.controller.d.ts +1 -1
- package/dist/controllers/mutual/update-mutual.controller.d.ts.map +1 -1
- package/dist/controllers/mutual/update-mutual.controller.js +1 -1
- package/dist/controllers/mutual/update-mutual.controller.js.map +1 -1
- package/dist/controllers/setupRoutes.js +1 -1
- package/dist/controllers/setupRoutes.js.map +1 -1
- package/dist/controllers/tag/list-tags.controller.d.ts +1 -1
- package/dist/controllers/tag/list-tags.controller.d.ts.map +1 -1
- package/dist/controllers/tag/list-tags.controller.js +2 -2
- package/dist/controllers/tag/list-tags.controller.js.map +1 -1
- package/dist/data/DbUtils.js +1 -1
- package/dist/data/DbUtils.js.map +1 -1
- package/dist/data/Entity.js +1 -1
- package/dist/data/Entity.js.map +1 -1
- package/dist/data/EventUtils.d.ts +1 -1
- package/dist/data/EventUtils.d.ts.map +1 -1
- package/dist/data/EventUtils.js +1 -1
- package/dist/data/EventUtils.js.map +1 -1
- package/dist/data/Mutual.d.ts +1 -1
- package/dist/data/Mutual.d.ts.map +1 -1
- package/dist/data/Mutual.js +2 -2
- package/dist/data/Mutual.js.map +1 -1
- package/dist/data/Tag.js +1 -1
- package/dist/data/Tag.js.map +1 -1
- package/dist/helpers/event.d.ts +1 -1
- package/dist/helpers/event.d.ts.map +1 -1
- package/dist/helpers/event.js +2 -2
- package/dist/helpers/event.js.map +1 -1
- package/dist/mock/monorise/chapter.d.ts +91 -91
- package/dist/mock/monorise/course.d.ts +17 -17
- package/dist/mock/monorise/index.d.ts +186 -186
- package/dist/mock/monorise/video.d.ts +28 -28
- package/dist/processors/create-entity-processor.js +3 -3
- package/dist/processors/create-entity-processor.js.map +1 -1
- package/dist/processors/mutual-processor.js +5 -5
- package/dist/processors/mutual-processor.js.map +1 -1
- package/dist/processors/prejoin-processor.js +4 -4
- package/dist/processors/prejoin-processor.js.map +1 -1
- package/dist/processors/replication-processor.js +3 -3
- package/dist/processors/replication-processor.js.map +1 -1
- package/dist/processors/tag-processor.js +2 -2
- package/dist/processors/tag-processor.js.map +1 -1
- package/dist/services/DependencyContainer.d.ts +18 -18
- package/dist/services/DependencyContainer.d.ts.map +1 -1
- package/dist/services/DependencyContainer.js +19 -19
- package/dist/services/DependencyContainer.js.map +1 -1
- package/dist/services/entity-service-lifecycle.d.ts +3 -3
- package/dist/services/entity-service-lifecycle.d.ts.map +1 -1
- package/dist/services/entity-service-lifecycle.js +1 -1
- package/dist/services/entity-service-lifecycle.js.map +1 -1
- package/dist/services/entity.service.d.ts +5 -5
- package/dist/services/entity.service.d.ts.map +1 -1
- package/dist/services/entity.service.js +2 -2
- package/dist/services/entity.service.js.map +1 -1
- package/dist/services/mutual.service.d.ts +5 -5
- package/dist/services/mutual.service.d.ts.map +1 -1
- package/dist/services/mutual.service.js +3 -3
- package/dist/services/mutual.service.js.map +1 -1
- package/dist/types/entity.type.d.ts +1 -1
- package/dist/types/entity.type.d.ts.map +1 -1
- package/helpers/event.ts +2 -2
- package/package.json +1 -1
- package/processors/create-entity-processor.ts +3 -3
- package/processors/mutual-processor.ts +5 -5
- package/processors/prejoin-processor.ts +8 -8
- package/processors/replication-processor.ts +3 -3
- package/processors/tag-processor.ts +4 -4
- package/services/DependencyContainer.ts +22 -22
- package/services/entity-service-lifecycle.ts +4 -4
- package/services/entity.service.ts +6 -6
- package/services/mutual.service.ts +6 -6
- package/tsconfig.json +0 -1
- package/types/entity.type.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.service.d.ts","sourceRoot":"","sources":["../../services/entity.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"entity.service.d.ts","sourceRoot":"","sources":["../../services/entity.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAM9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAKzE,qBAAa,aAAa;IAEtB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;gBAFV,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,OAAO,gBAAgB,EACrC,UAAU,EAAE,UAAU;IAGhC,YAAY,GAAU,CAAC,SAAS,MAAM,EAAE,8DAMrC;QACD,UAAU,EAAE,CAAC,CAAC;QACd,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;QAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAC9B,OAAO,CAAC,EAAE;YACR,uBAAuB,CAAC,EAAE,MAAM,CAAC;YACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;SACnB,CAAC;KACH,iDAsDC;IAEF,YAAY,GAAU,CAAC,SAAS,MAAM,EAAE,qDAKrC;QACD,UAAU,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KAC/B,iDA4EC;IAEF,YAAY,GAAU,CAAC,SAAS,MAAM,EAAE,sCAIrC;QACD,UAAU,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KAC/B,mBAWC;CACH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { StandardError } from '#/errors/standard-error';
|
|
3
2
|
import { EmailAuthEnabledEntities, EntityConfig, } from '#/lambda-layer/monorise';
|
|
4
|
-
import {
|
|
3
|
+
import { StandardError } from '../errors/standard-error';
|
|
4
|
+
import { EVENT } from '../types/event';
|
|
5
5
|
import { afterCreateEntityHook } from './entity-service-lifecycle';
|
|
6
6
|
export class EntityService {
|
|
7
7
|
entityRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.service.js","sourceRoot":"","sources":["../../services/entity.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"entity.service.js","sourceRoot":"","sources":["../../services/entity.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,YAAY,GACb,MAAM,yBAAyB,CAAC;A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AAQ;oBACR,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,kBAAkB,EAAE,SAAS;oBAC7B,WAAW,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;iBAC1D;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACtC,KAAiC,CAAC,OAAO,GAAG,YAAY,CAAC;YAC5D,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC;IAEF,YAAY,GAAG,KAAK,EAAoB,EACtC,UAAU,EACV,QAAQ,EACR,SAAS,GAKV,EAAE,EAAE;QACH,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAE/D,MAAM,IAAI,CAAC,YAAY,CAAC;YACtB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,cAAc;YAChC,OAAO,EAAE;gBACP,UAAU;gBACV,QAAQ;gBACR,kBAAkB,EAAE,SAAS;aAC9B;SACF,CAAC,CAAC;IACL,CAAC,CAAC;CACH"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { AttributeValue } from '@aws-sdk/client-dynamodb';
|
|
2
2
|
import type { Entity as EntityType } from '@monorise/base';
|
|
3
|
-
import type { DbUtils } from '
|
|
4
|
-
import { type EntityRepository } from '
|
|
5
|
-
import type { EventUtils } from '
|
|
6
|
-
import { Mutual, type MutualRepository } from '
|
|
7
|
-
import type { publishEvent as publishEventType } from '
|
|
3
|
+
import type { DbUtils } from '../data/DbUtils';
|
|
4
|
+
import { type EntityRepository } from '../data/Entity';
|
|
5
|
+
import type { EventUtils } from '../data/EventUtils';
|
|
6
|
+
import { Mutual, type MutualRepository } from '../data/Mutual';
|
|
7
|
+
import type { publishEvent as publishEventType } from '../helpers/event';
|
|
8
8
|
export declare class MutualService {
|
|
9
9
|
private entityRepository;
|
|
10
10
|
private mutualRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutual.service.d.ts","sourceRoot":"","sources":["../../services/mutual.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAmB,MAAM,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mutual.service.d.ts","sourceRoot":"","sources":["../../services/mutual.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAmB,MAAM,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzE,qBAAa,aAAa;IAEtB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,QAAQ;gBAJR,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,OAAO,gBAAgB,EACrC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,OAAO;IAG3B,YAAY,GACV,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,UAAU,EACpB,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AE,MAAM,CAAC;QACnB,UAAU,EAAE,UAAU,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KAC/B,sEAoBC;CACH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ulid } from 'ulid';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { Entity } from '
|
|
4
|
-
import { Mutual } from '
|
|
5
|
-
import { EVENT } from '
|
|
3
|
+
import { Entity } from '../data/Entity';
|
|
4
|
+
import { Mutual } from '../data/Mutual';
|
|
5
|
+
import { EVENT } from '../types/event';
|
|
6
6
|
import { afterCreateEntityHook } from './entity-service-lifecycle';
|
|
7
7
|
export class MutualService {
|
|
8
8
|
entityRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutual.service.js","sourceRoot":"","sources":["../../services/mutual.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,EAAyB,MAAM,
|
|
1
|
+
{"version":3,"file":"mutual.service.js","sourceRoot":"","sources":["../../services/mutual.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,EAAyB,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAyB,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,OAAO,aAAa;IAEd;IACA;IACA;IACA;IACA;IALV,YACU,gBAAkC,EAClC,gBAAkC,EAClC,YAAqC,EACrC,UAAsB,EACtB,QAAiB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AM,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"entity.type.d.ts","sourceRoot":"","sources":["../../types/entity.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,MAAM,GAAG,GAAG;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,UAAU,CAAC;IAC7B,WAAW,EAAE;QACX,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,EAAE,UAAU,CAAC;QACvB,SAAS,CAAC,EAAE,CACV,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,EAChE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B;YACH,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;YACjE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACnC,CAAC;KACH,EAAE,CAAC;CACL,EAAE,CAAC;AAqCJ,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
package/helpers/event.ts
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
EventBridgeClient,
|
|
3
3
|
PutEventsCommand,
|
|
4
4
|
} from '@aws-sdk/client-eventbridge';
|
|
5
|
-
import { CORE_EVENT_BUS } from '
|
|
6
|
-
import { EVENT, type EventDetail } from '
|
|
5
|
+
import { CORE_EVENT_BUS } from '../configs/service.config';
|
|
6
|
+
import { EVENT, type EventDetail } from '../types/event';
|
|
7
7
|
|
|
8
8
|
const eventBridge = new EventBridgeClient();
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Entity } from '@monorise/base';
|
|
2
2
|
import type { SQSBatchItemFailure, SQSEvent } from 'aws-lambda';
|
|
3
|
-
import { StandardError } from '
|
|
4
|
-
import { parseSQSBusEvent } from '
|
|
5
|
-
import { DependencyContainer } from '
|
|
3
|
+
import { StandardError } from '../errors/standard-error';
|
|
4
|
+
import { parseSQSBusEvent } from '../helpers/event';
|
|
5
|
+
import { DependencyContainer } from '../services/DependencyContainer';
|
|
6
6
|
|
|
7
7
|
const container = new DependencyContainer();
|
|
8
8
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TransactionCanceledException } from '@aws-sdk/client-dynamodb';
|
|
2
2
|
import type { Entity } from '@monorise/base';
|
|
3
3
|
import type { SQSBatchItemFailure, SQSEvent } from 'aws-lambda';
|
|
4
|
-
import { Mutual } from '#/data/Mutual';
|
|
5
|
-
import { StandardError } from '#/errors/standard-error';
|
|
6
|
-
import { parseSQSBusEvent } from '#/helpers/event';
|
|
7
4
|
import { EntityConfig } from '#/lambda-layer/monorise';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { Mutual } from '../data/Mutual';
|
|
6
|
+
import { StandardError } from '../errors/standard-error';
|
|
7
|
+
import { parseSQSBusEvent } from '../helpers/event';
|
|
8
|
+
import { DependencyContainer } from '../services/DependencyContainer';
|
|
9
|
+
import { EVENT } from '../types/event';
|
|
10
10
|
|
|
11
11
|
export type EventDetailBody = {
|
|
12
12
|
mutualIds: string[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Entity } from '@monorise/base';
|
|
2
2
|
import type { SQSBatchItemFailure, SQSEvent } from 'aws-lambda';
|
|
3
|
-
import type { MutualRepository } from '#/data/Mutual';
|
|
4
|
-
import { PROJECTION_EXPRESSION } from '#/data/ProjectionExpression';
|
|
5
|
-
import { parseSQSBusEvent } from '#/helpers/event';
|
|
6
|
-
import type { publishEvent as publishEventType } from '#/helpers/event';
|
|
7
3
|
import { AllowedEntityTypes, EntityConfig } from '#/lambda-layer/monorise';
|
|
8
|
-
import type {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
4
|
+
import type { MutualRepository } from '../data/Mutual';
|
|
5
|
+
import { PROJECTION_EXPRESSION } from '../data/ProjectionExpression';
|
|
6
|
+
import { parseSQSBusEvent } from '../helpers/event';
|
|
7
|
+
import type { publishEvent as publishEventType } from '../helpers/event';
|
|
8
|
+
import type { EventDetailBody as MutualProcessorEventDetailBody } from '../processors/mutual-processor';
|
|
9
|
+
import { DependencyContainer } from '../services/DependencyContainer';
|
|
10
|
+
import type { Prejoins } from '../types/entity.type';
|
|
11
|
+
import { EVENT } from '../types/event';
|
|
12
12
|
|
|
13
13
|
export type EventDetailBody = {
|
|
14
14
|
byEntityType: Entity;
|
|
@@ -7,9 +7,9 @@ import type { DynamoDBBatchItemFailure } from 'aws-lambda';
|
|
|
7
7
|
import {
|
|
8
8
|
ENTITY_REPLICATION_INDEX,
|
|
9
9
|
MUTUAL_REPLICATION_INDEX,
|
|
10
|
-
} from '
|
|
11
|
-
import { StandardError } from '
|
|
12
|
-
import { DependencyContainer } from '
|
|
10
|
+
} from '../configs/service.config';
|
|
11
|
+
import { StandardError } from '../errors/standard-error';
|
|
12
|
+
import { DependencyContainer } from '../services/DependencyContainer';
|
|
13
13
|
|
|
14
14
|
const container = new DependencyContainer();
|
|
15
15
|
const TableName = process.env.DDB_TABLE;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CreatedEntity, Entity as EntityType } from '@monorise/base';
|
|
2
2
|
import type { SQSBatchItemFailure, SQSEvent } from 'aws-lambda';
|
|
3
|
-
import type { Entity } from '#/data/Entity';
|
|
4
|
-
import { parseSQSBusEvent } from '#/helpers/event';
|
|
5
3
|
import { EntityConfig } from '#/lambda-layer/monorise';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
4
|
+
import type { Entity } from '../data/Entity';
|
|
5
|
+
import { parseSQSBusEvent } from '../helpers/event';
|
|
6
|
+
import { DependencyContainer } from '../services/DependencyContainer';
|
|
7
|
+
import type { Tag } from '../types/entity.type';
|
|
8
8
|
|
|
9
9
|
export type EventDetailBody = {
|
|
10
10
|
entityType: EntityType;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { DynamoDB } from '@aws-sdk/client-dynamodb';
|
|
2
|
-
import { CORE_TABLE } from '
|
|
3
|
-
import { getDependencies } from '
|
|
4
|
-
import type { publishEvent as publishEventType } from '
|
|
5
|
-
|
|
6
|
-
import { DbUtils } from '
|
|
7
|
-
import { EntityRepository } from '
|
|
8
|
-
import { EventUtils } from '
|
|
9
|
-
import { MutualRepository } from '
|
|
10
|
-
import { TagRepository } from '
|
|
11
|
-
|
|
12
|
-
import { CreateEntityController } from '
|
|
13
|
-
import { DeleteEntityController } from '
|
|
14
|
-
import { GetEntityController } from '
|
|
15
|
-
import { ListEntitiesController } from '
|
|
16
|
-
import { UpdateEntityController } from '
|
|
17
|
-
import { UpsertEntityController } from '
|
|
18
|
-
import { CreateMutualController } from '
|
|
19
|
-
import { DeleteMutualController } from '
|
|
20
|
-
import { GetMutualController } from '
|
|
21
|
-
import { ListEntitiesByEntityController } from '
|
|
22
|
-
import { UpdateMutualController } from '
|
|
2
|
+
import { CORE_TABLE } from '../configs/service.config';
|
|
3
|
+
import { getDependencies } from '../helpers/dependencies';
|
|
4
|
+
import type { publishEvent as publishEventType } from '../helpers/event';
|
|
5
|
+
|
|
6
|
+
import { DbUtils } from '../data/DbUtils';
|
|
7
|
+
import { EntityRepository } from '../data/Entity';
|
|
8
|
+
import { EventUtils } from '../data/EventUtils';
|
|
9
|
+
import { MutualRepository } from '../data/Mutual';
|
|
10
|
+
import { TagRepository } from '../data/Tag';
|
|
11
|
+
|
|
12
|
+
import { CreateEntityController } from '../controllers/entity/create-entity.controller';
|
|
13
|
+
import { DeleteEntityController } from '../controllers/entity/delete-entity.controller';
|
|
14
|
+
import { GetEntityController } from '../controllers/entity/get-entity.controller';
|
|
15
|
+
import { ListEntitiesController } from '../controllers/entity/list-entities.controller';
|
|
16
|
+
import { UpdateEntityController } from '../controllers/entity/update-entity.controller';
|
|
17
|
+
import { UpsertEntityController } from '../controllers/entity/upsert-entity.controller';
|
|
18
|
+
import { CreateMutualController } from '../controllers/mutual/create-mutual.controller';
|
|
19
|
+
import { DeleteMutualController } from '../controllers/mutual/delete-mutual.controller';
|
|
20
|
+
import { GetMutualController } from '../controllers/mutual/get-mutual.controller';
|
|
21
|
+
import { ListEntitiesByEntityController } from '../controllers/mutual/list-entities-by-entity.controller';
|
|
22
|
+
import { UpdateMutualController } from '../controllers/mutual/update-mutual.controller';
|
|
23
23
|
import { EntityService } from './entity.service';
|
|
24
24
|
import { MutualService } from './mutual.service';
|
|
25
25
|
|
|
26
|
-
import { ListTagsController } from '
|
|
26
|
+
import { ListTagsController } from '../controllers/tag/list-tags.controller';
|
|
27
27
|
|
|
28
28
|
export class DependencyContainer {
|
|
29
29
|
private _instanceCache: Map<string, any>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Entity as EntityType } from '@monorise/base';
|
|
2
|
-
import type { Entity } from '#/data/Entity';
|
|
3
|
-
import type { EventUtils } from '#/data/EventUtils';
|
|
4
|
-
import type { publishEvent as publishEventType } from '#/helpers/event';
|
|
5
2
|
import { EntityConfig } from '#/lambda-layer/monorise';
|
|
6
|
-
import {
|
|
3
|
+
import type { Entity } from '../data/Entity';
|
|
4
|
+
import type { EventUtils } from '../data/EventUtils';
|
|
5
|
+
import type { publishEvent as publishEventType } from '../helpers/event';
|
|
6
|
+
import { EVENT } from '../types/event';
|
|
7
7
|
|
|
8
8
|
export const afterCreateEntityHook = async <T extends EntityType>({
|
|
9
9
|
entity,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { Entity, EntitySchemaMap } from '@monorise/base';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import type { EntityRepository } from '#/data/Entity';
|
|
4
|
-
import type { EventUtils } from '#/data/EventUtils';
|
|
5
|
-
import { StandardError } from '#/errors/standard-error';
|
|
6
|
-
import type { publishEvent as publishEventType } from '#/helpers/event';
|
|
7
3
|
import {
|
|
8
4
|
EmailAuthEnabledEntities,
|
|
9
5
|
EntityConfig,
|
|
10
6
|
} from '#/lambda-layer/monorise';
|
|
11
|
-
import type {
|
|
12
|
-
import {
|
|
7
|
+
import type { EntityRepository } from '../data/Entity';
|
|
8
|
+
import type { EventUtils } from '../data/EventUtils';
|
|
9
|
+
import { StandardError } from '../errors/standard-error';
|
|
10
|
+
import type { publishEvent as publishEventType } from '../helpers/event';
|
|
11
|
+
import type { EventDetailBody as MutualProcessorEventDetailBody } from '../processors/mutual-processor';
|
|
12
|
+
import { EVENT } from '../types/event';
|
|
13
13
|
import { afterCreateEntityHook } from './entity-service-lifecycle';
|
|
14
14
|
|
|
15
15
|
export class EntityService {
|
|
@@ -2,12 +2,12 @@ import type { AttributeValue } from '@aws-sdk/client-dynamodb';
|
|
|
2
2
|
import type { EntitySchemaMap, Entity as EntityType } from '@monorise/base';
|
|
3
3
|
import { ulid } from 'ulid';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import type { DbUtils } from '
|
|
6
|
-
import { Entity, type EntityRepository } from '
|
|
7
|
-
import type { EventUtils } from '
|
|
8
|
-
import { Mutual, type MutualRepository } from '
|
|
9
|
-
import type { publishEvent as publishEventType } from '
|
|
10
|
-
import { EVENT } from '
|
|
5
|
+
import type { DbUtils } from '../data/DbUtils';
|
|
6
|
+
import { Entity, type EntityRepository } from '../data/Entity';
|
|
7
|
+
import type { EventUtils } from '../data/EventUtils';
|
|
8
|
+
import { Mutual, type MutualRepository } from '../data/Mutual';
|
|
9
|
+
import type { publishEvent as publishEventType } from '../helpers/event';
|
|
10
|
+
import { EVENT } from '../types/event';
|
|
11
11
|
import { afterCreateEntityHook } from './entity-service-lifecycle';
|
|
12
12
|
|
|
13
13
|
export class MutualService {
|
package/tsconfig.json
CHANGED
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
|
33
33
|
"baseUrl": "./" /* Specify the base directory to resolve non-relative module names. */,
|
|
34
34
|
"paths": {
|
|
35
|
-
"#/*": ["./*"],
|
|
36
35
|
"#/lambda-layer/monorise": ["/opt/nodejs/monorise", "./mock/monorise"]
|
|
37
36
|
},
|
|
38
37
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
package/types/entity.type.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Entity as EntityType } from '@monorise/base';
|
|
2
2
|
// import type { z } from 'zod';
|
|
3
|
-
// import type { Entity } from '
|
|
4
|
-
import type { Mutual } from '
|
|
3
|
+
// import type { Entity } from '../data/Entity';
|
|
4
|
+
import type { Mutual } from '../data/Mutual';
|
|
5
5
|
|
|
6
6
|
export type Tag = {
|
|
7
7
|
group?: string;
|