@forklaunch/internal 0.0.5 → 0.0.7

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/lib/index.d.mts CHANGED
@@ -1,17 +1,17 @@
1
- import { AnySchemaValidator, IdiomaticSchema, Schema, UnboxedObjectSchema } from '@forklaunch/validator';
1
+ import { IdiomaticSchema, Schema, AnySchemaValidator, UnboxedObjectSchema } from '@forklaunch/validator';
2
2
  import { TypeboxSchemaValidator } from '@forklaunch/validator/typebox';
3
3
  import { ZodSchemaValidator } from '@forklaunch/validator/zod';
4
4
  import { InstanceTypeRecord } from '@forklaunch/common';
5
5
 
6
- declare class IdentityRequestMapper<T, SchemaValidator extends AnySchemaValidator> {
6
+ declare class IdentityRequestMapper<T> {
7
7
  dto: T;
8
8
  _Entity: T;
9
- deserializeDtoToEntity(schemaValidator: SchemaValidator, dto: T): Promise<T>;
9
+ deserializeDtoToEntity(dto: T): Promise<T>;
10
10
  }
11
- declare class IdentityResponseMapper<T, SchemaValidator extends AnySchemaValidator> {
11
+ declare class IdentityResponseMapper<T> {
12
12
  dto: T;
13
13
  _Entity: T;
14
- serializeEntityToDto(schemaValidator: SchemaValidator, entity: T): Promise<T>;
14
+ serializeEntityToDto(entity: T): Promise<T>;
15
15
  }
16
16
 
17
17
  declare function testSchemaEquality<Schematic>(): <Z extends IdiomaticSchema<ZodSchemaValidator>, T extends IdiomaticSchema<TypeboxSchemaValidator>>(zodSchema: Z, typeBoxSchema: T, testData: Schematic extends Schema<Z, ZodSchemaValidator> ? Schema<Z, ZodSchemaValidator> extends Schematic ? Schematic extends Schema<T, TypeboxSchemaValidator> ? Schema<T, TypeboxSchemaValidator> extends Schematic ? Schematic : {
@@ -88,7 +88,7 @@ type MapperSchemaValidatorObject<SV extends AnySchemaValidator> = SV['_ValidSche
88
88
  * @template Dto - The type of the DTO object.
89
89
  * @template Entity - The type of the entity object.
90
90
  */
91
- type ResponseMapperConstructor<SchemaValidator extends AnySchemaValidator, Dto, Entity, SerializeEntityToDto extends (schemaValidator: SchemaValidator, entity: Entity, ...additionalArgs: never[]) => Promise<Dto> = (schemaValidator: SchemaValidator, entity: Entity, ...additionalArgs: never[]) => Promise<Dto>> = new (schemaValidator: SchemaValidator) => {
91
+ type ResponseMapperConstructor<SchemaValidator extends AnySchemaValidator, Dto, Entity, SerializeEntityToDto extends (entity: Entity, ...additionalArgs: never[]) => Promise<Dto> = (entity: Entity, ...additionalArgs: never[]) => Promise<Dto>> = new (schemaValidator: SchemaValidator) => {
92
92
  dto: Dto;
93
93
  _Entity: Entity;
94
94
  serializeEntityToDto: SerializeEntityToDto;
package/lib/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { AnySchemaValidator, IdiomaticSchema, Schema, UnboxedObjectSchema } from '@forklaunch/validator';
1
+ import { IdiomaticSchema, Schema, AnySchemaValidator, UnboxedObjectSchema } from '@forklaunch/validator';
2
2
  import { TypeboxSchemaValidator } from '@forklaunch/validator/typebox';
3
3
  import { ZodSchemaValidator } from '@forklaunch/validator/zod';
4
4
  import { InstanceTypeRecord } from '@forklaunch/common';
5
5
 
6
- declare class IdentityRequestMapper<T, SchemaValidator extends AnySchemaValidator> {
6
+ declare class IdentityRequestMapper<T> {
7
7
  dto: T;
8
8
  _Entity: T;
9
- deserializeDtoToEntity(schemaValidator: SchemaValidator, dto: T): Promise<T>;
9
+ deserializeDtoToEntity(dto: T): Promise<T>;
10
10
  }
11
- declare class IdentityResponseMapper<T, SchemaValidator extends AnySchemaValidator> {
11
+ declare class IdentityResponseMapper<T> {
12
12
  dto: T;
13
13
  _Entity: T;
14
- serializeEntityToDto(schemaValidator: SchemaValidator, entity: T): Promise<T>;
14
+ serializeEntityToDto(entity: T): Promise<T>;
15
15
  }
16
16
 
17
17
  declare function testSchemaEquality<Schematic>(): <Z extends IdiomaticSchema<ZodSchemaValidator>, T extends IdiomaticSchema<TypeboxSchemaValidator>>(zodSchema: Z, typeBoxSchema: T, testData: Schematic extends Schema<Z, ZodSchemaValidator> ? Schema<Z, ZodSchemaValidator> extends Schematic ? Schematic extends Schema<T, TypeboxSchemaValidator> ? Schema<T, TypeboxSchemaValidator> extends Schematic ? Schematic : {
@@ -88,7 +88,7 @@ type MapperSchemaValidatorObject<SV extends AnySchemaValidator> = SV['_ValidSche
88
88
  * @template Dto - The type of the DTO object.
89
89
  * @template Entity - The type of the entity object.
90
90
  */
91
- type ResponseMapperConstructor<SchemaValidator extends AnySchemaValidator, Dto, Entity, SerializeEntityToDto extends (schemaValidator: SchemaValidator, entity: Entity, ...additionalArgs: never[]) => Promise<Dto> = (schemaValidator: SchemaValidator, entity: Entity, ...additionalArgs: never[]) => Promise<Dto>> = new (schemaValidator: SchemaValidator) => {
91
+ type ResponseMapperConstructor<SchemaValidator extends AnySchemaValidator, Dto, Entity, SerializeEntityToDto extends (entity: Entity, ...additionalArgs: never[]) => Promise<Dto> = (entity: Entity, ...additionalArgs: never[]) => Promise<Dto>> = new (schemaValidator: SchemaValidator) => {
92
92
  dto: Dto;
93
93
  _Entity: Entity;
94
94
  serializeEntityToDto: SerializeEntityToDto;
package/lib/index.js CHANGED
@@ -33,14 +33,14 @@ module.exports = __toCommonJS(index_exports);
33
33
  var IdentityRequestMapper = class {
34
34
  dto;
35
35
  _Entity;
36
- async deserializeDtoToEntity(schemaValidator, dto) {
36
+ async deserializeDtoToEntity(dto) {
37
37
  return dto;
38
38
  }
39
39
  };
40
40
  var IdentityResponseMapper = class {
41
41
  dto;
42
42
  _Entity;
43
- async serializeEntityToDto(schemaValidator, entity) {
43
+ async serializeEntityToDto(entity) {
44
44
  return entity;
45
45
  }
46
46
  };
package/lib/index.mjs CHANGED
@@ -2,14 +2,14 @@
2
2
  var IdentityRequestMapper = class {
3
3
  dto;
4
4
  _Entity;
5
- async deserializeDtoToEntity(schemaValidator, dto) {
5
+ async deserializeDtoToEntity(dto) {
6
6
  return dto;
7
7
  }
8
8
  };
9
9
  var IdentityResponseMapper = class {
10
10
  dto;
11
11
  _Entity;
12
- async serializeEntityToDto(schemaValidator, entity) {
12
+ async serializeEntityToDto(entity) {
13
13
  return entity;
14
14
  }
15
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/internal",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Internal package for utilities and other internal code.",
5
5
  "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
6
  "bugs": {