@punks/backend-entity-manager 0.0.475 → 0.0.477
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 +7 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/actions.d.ts +2 -1
- package/dist/cjs/types/actions/search.d.ts +1 -1
- package/dist/cjs/types/platforms/nest/plugins/jobs/aws-batch/models/index.d.ts +1 -0
- package/dist/esm/index.js +7 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/actions.d.ts +2 -1
- package/dist/esm/types/actions/search.d.ts +1 -1
- package/dist/esm/types/platforms/nest/plugins/jobs/aws-batch/models/index.d.ts +1 -0
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
|
@@ -34,7 +34,8 @@ export interface IEntityUpdateAction<TEntity, TEntityId, TEntityUpdateDto, TEnti
|
|
|
34
34
|
export interface IEntityUpsertAction<TEntity, TEntityId, TEntityUpdateDto, TEntityDto> {
|
|
35
35
|
execute(id: TEntityId, input: TEntityUpdateDto): Promise<TEntityDto>;
|
|
36
36
|
}
|
|
37
|
-
export interface IEntitiesSearchActionOptions<TEntity, TEntitySearchParameters extends IEntitySearchParameters<TEntity, unknown, unknown
|
|
37
|
+
export interface IEntitiesSearchActionOptions<TEntity, TEntitySearchParameters extends IEntitySearchParameters<TEntity, unknown, unknown>, TListItemDto> extends IEntitiesSearchQueryOptions<TEntity, TEntitySearchParameters> {
|
|
38
|
+
converter?: (item: TEntity) => TListItemDto[];
|
|
38
39
|
}
|
|
39
40
|
export interface IEntitiesSearchAction<TEntity, TEntitySearchParameters extends IEntitySearchParameters<TEntity, TSorting, TCursor>, TEntityListItemDto, TSorting extends SortingType, TCursor, TFacets extends IEntityFacets> {
|
|
40
41
|
execute(request: TEntitySearchParameters, options?: IEntitiesSearchActionOptions<TEntity, TEntitySearchParameters>): Promise<IEntitiesSearchResults<TEntity, TEntitySearchParameters, TEntityListItemDto, TSorting, TCursor, TFacets>>;
|
|
@@ -7,5 +7,5 @@ import { EntityServiceLocator } from "../providers/services";
|
|
|
7
7
|
export declare class EntitiesSearchAction<TEntity, TEntityId, TEntitySearchParameters extends IEntitySearchParameters<TEntity, TSorting, TCursor>, TListItemDto, TSorting extends SortingType, TCursor, TFacets extends IEntityFacets> implements IEntitiesSearchAction<TEntity, TEntitySearchParameters, TListItemDto, TSorting, TCursor, TFacets> {
|
|
8
8
|
private readonly services;
|
|
9
9
|
constructor(services: EntityServiceLocator<TEntity, TEntityId>);
|
|
10
|
-
execute(request: TEntitySearchParameters, options?: IEntitiesSearchActionOptions<TEntity, TEntitySearchParameters>): Promise<IEntitiesSearchResults<TEntity, TEntitySearchParameters, TListItemDto, TSorting, TCursor, TFacets>>;
|
|
10
|
+
execute(request: TEntitySearchParameters, options?: IEntitiesSearchActionOptions<TEntity, TEntitySearchParameters, TListItemDto>): Promise<IEntitiesSearchResults<TEntity, TEntitySearchParameters, TListItemDto, TSorting, TCursor, TFacets>>;
|
|
11
11
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -653,7 +653,8 @@ class EntitiesSearchAction {
|
|
|
653
653
|
const results = await searchQuery.execute(request, options);
|
|
654
654
|
const converter = this.services.resolveConverter();
|
|
655
655
|
return {
|
|
656
|
-
items: await mapAsync(results.items, async (x) => ((await converter?.
|
|
656
|
+
items: await mapAsync(results.items, async (x) => ((await (options?.converter?.(x) ?? converter?.toListItemDto(x))) ??
|
|
657
|
+
x)),
|
|
657
658
|
paging: results.paging,
|
|
658
659
|
childrenMap: results.childrenMap,
|
|
659
660
|
facets: results.facets,
|
|
@@ -41657,6 +41658,11 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
|
|
|
41657
41658
|
command: definition.invocationParams.startCommand,
|
|
41658
41659
|
image: definition.infrastructureParams.dockerImage,
|
|
41659
41660
|
executionRoleArn: this.awsSettings.batchExecutionRole,
|
|
41661
|
+
ephemeralStorage: definition.infrastructureParams.ephemeralStorageGB
|
|
41662
|
+
? {
|
|
41663
|
+
sizeInGiB: definition.infrastructureParams.ephemeralStorageGB,
|
|
41664
|
+
}
|
|
41665
|
+
: undefined,
|
|
41660
41666
|
resourceRequirements: [
|
|
41661
41667
|
{
|
|
41662
41668
|
type: ResourceType.MEMORY,
|