@punks/backend-entity-manager 0.0.19 → 0.0.21
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/cjs/index.js +16 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/adapters.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/platforms/nest/decorators/index.d.ts +1 -0
- package/dist/cjs/types/utils/index.d.ts +1 -0
- package/dist/cjs/types/utils/uid.d.ts +1 -0
- package/dist/esm/index.js +15 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/adapters.d.ts +1 -1
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/platforms/nest/decorators/index.d.ts +1 -0
- package/dist/esm/types/utils/index.d.ts +1 -0
- package/dist/esm/types/utils/uid.d.ts +1 -0
- package/dist/index.d.ts +9 -6
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ export interface IEntityCreateCommandAdapter<TEntity, TEntityCreateData> {
|
|
|
2
2
|
createDataToEntity(data: TEntityCreateData): Partial<TEntity>;
|
|
3
3
|
}
|
|
4
4
|
export interface IEntityUpdateCommandAdapter<TEntity, TEntityUpdateData> {
|
|
5
|
-
updateDataToEntity(
|
|
5
|
+
updateDataToEntity(data: TEntityUpdateData): Partial<TEntity>;
|
|
6
6
|
}
|
|
7
7
|
export interface IEntityAdapter<TEntity, TEntityCreateData, TEntityUpdateData> extends IEntityCreateCommandAdapter<TEntity, TEntityCreateData>, IEntityUpdateCommandAdapter<TEntity, TEntityUpdateData> {
|
|
8
8
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { WpEntityAuthMiddleware, EntityAuthMiddlewareProps, } from "./authorization";
|
|
2
2
|
export { WpEntityActions, EntityActionsProps } from "./actions";
|
|
3
|
+
export { WpEntityAdapter, EntityAdapterProps } from "./adapter";
|
|
3
4
|
export { WpEntityConnector, EntityConnectorProps } from "./connector";
|
|
4
5
|
export { WpEntityConverter, EntityConverterProps } from "./converter";
|
|
5
6
|
export { WpEntity, EntityProps } from "./entity";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { newUuid } from "./uid";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const newUuid: () => string;
|
package/dist/esm/index.js
CHANGED
|
@@ -29893,6 +29893,11 @@ const WpEntityActions = (entityName, props = {}) => common.applyDecorators(commo
|
|
|
29893
29893
|
...props,
|
|
29894
29894
|
}));
|
|
29895
29895
|
|
|
29896
|
+
const WpEntityAdapter = (entityName, props = {}) => common.applyDecorators(common.Injectable(), common.SetMetadata(EntityManagerSymbols.EntityAdapter, {
|
|
29897
|
+
entityName,
|
|
29898
|
+
...props,
|
|
29899
|
+
}));
|
|
29900
|
+
|
|
29896
29901
|
const WpEntityConnector = (entityName, props = {}) => common.applyDecorators(common.Injectable(), common.SetMetadata(EntityManagerSymbols.EntityConnector, {
|
|
29897
29902
|
entityName,
|
|
29898
29903
|
...props,
|
|
@@ -30225,6 +30230,13 @@ const toDict = (array, selector) => {
|
|
|
30225
30230
|
return data;
|
|
30226
30231
|
};
|
|
30227
30232
|
|
|
30233
|
+
const newUuid$1 = () => {
|
|
30234
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
|
|
30235
|
+
var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8;
|
|
30236
|
+
return v.toString(16);
|
|
30237
|
+
});
|
|
30238
|
+
};
|
|
30239
|
+
|
|
30228
30240
|
class EntityCreateAction {
|
|
30229
30241
|
constructor(services) {
|
|
30230
30242
|
this.services = services;
|
|
@@ -60621,5 +60633,7 @@ EntityManagerModule = __decorate$3([
|
|
|
60621
60633
|
})
|
|
60622
60634
|
], EntityManagerModule);
|
|
60623
60635
|
|
|
60624
|
-
|
|
60636
|
+
const newUuid = newUuid$1;
|
|
60637
|
+
|
|
60638
|
+
export { EntityManagerException, EntityManagerInitializer, EntityManagerModule, EntityManagerRegistry, EntityManagerSymbols, EntityNotFoundException, EntityOperationType, EntityOperationUnauthorizedException, ModulesContainerProvider, MultipleEntitiesFoundException, NestEntityActions, NestEntityManager, NestTypeOrmQueryBuilder, NestTypeOrmRepository, QueryBuilderBase, ReplicationMode, SortDirection, WpEntity, WpEntityActions, WpEntityAdapter, WpEntityAuthMiddleware, WpEntityConnector, WpEntityConverter, WpEntityManager, WpEntityQueryBuilder, WpEntityRepository, newUuid };
|
|
60625
60639
|
//# sourceMappingURL=index.js.map
|