tspace-mysql 1.9.0-beta.3 → 1.9.0-beta.4

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.
@@ -154,7 +154,7 @@ export declare namespace T {
154
154
  [K in keyof SRS]: true;
155
155
  }, SR>> & TRepositoryPrimitiveExtendType<G>) extends infer $Resolved ? S extends undefined ? E extends undefined ? TDeepExpand<$Resolved> : TDeepExpand<TDeepOmit<$Resolved, E>> : TDeepExpand<$Resolved> : never;
156
156
  type PaginateResultFiltered<M extends Model, K = {}, S = undefined, SR = undefined, E = undefined, SRS = undefined> = TDeepExpand<TPagination<ResultFiltered<M, K, S, SR, E, SRS>>>;
157
- type Result<M extends Model, K = {}> = TDeepExpand<TResultResolved<M, K>> & {
157
+ type Result<M extends Model, K = {}> = TDeepExpand<TResultResolved<M> & K> & {
158
158
  [customKey: string]: unknown;
159
159
  };
160
160
  type PaginateResult<M extends Model, K = {}> = TDeepExpand<TPagination<Result<M, K>>>;
@@ -168,10 +168,16 @@ export declare namespace T {
168
168
  [P in Exclude<K & keyof C, "id" | "_id" | "uuid"> as null extends C[P] ? never : P]: C[P] extends Date ? any : C[P] extends Record<string, unknown> ? string : C[P];
169
169
  } & {
170
170
  [P in Exclude<K & keyof C, "id" | "_id" | "uuid"> as null extends C[P] ? P : never]?: C[P] extends Date ? any : C[P] extends Record<string, unknown> ? string : C[P];
171
+ } & {
172
+ [P in Extract<K & keyof C, "id" | "_id" | "uuid">]?: C[P] extends Date ? any : C[P] extends Record<string, unknown> ? string : C[P];
171
173
  };
172
174
  type UpdateInput<K, C> = {
173
- [P in Exclude<K & keyof C, "id" | "_id" | "uuid">]?: C[P] extends Date ? any : C[P] extends Record<string, unknown> ? string : C[P];
174
- };
175
+ [P in Exclude<K & keyof C, "id" | "_id">]: {
176
+ [Q in P]-?: Q extends "uuid" ? string : C[Q] extends Date ? any : C[Q] extends Record<string, unknown> ? string : C[Q];
177
+ } & {
178
+ [Q in Exclude<K & keyof C, "id" | "_id" | P>]?: Q extends "uuid" ? string : C[Q] extends Date ? any : C[Q] extends Record<string, unknown> ? string : C[Q];
179
+ };
180
+ }[Exclude<K & keyof C, "id" | "_id">];
175
181
  type NoConflict<R extends readonly PropertyKey[], O extends readonly PropertyKey[]> = TConflictKeys<R, O> extends never ? {} : {
176
182
  ERROR_DUPLICATE_KEYS: TConflictKeys<R, O>;
177
183
  };
@@ -1 +1 @@
1
- {"version":3,"file":"UtilityTypes.js","sourceRoot":"","sources":["../../../src/lib/core/UtilityTypes.ts"],"names":[],"mappings":";;AAodC,CAAC"}
1
+ {"version":3,"file":"UtilityTypes.js","sourceRoot":"","sources":["../../../src/lib/core/UtilityTypes.ts"],"names":[],"mappings":";;AAmeC,CAAC"}
@@ -361,7 +361,7 @@ export type TDeepOmit<T, Filter> = T extends infer ObjectType ? {
361
361
  export type TDeepExpand<T> = T extends Date ? T : T extends Function ? T : T extends Model ? T : T extends (infer U)[] ? TDeepExpand<U>[] : T extends object ? {
362
362
  [K in keyof T]: TDeepExpand<T[K]>;
363
363
  } : T;
364
- export type TResultResolved<M extends Model, K = {}> = (unknown extends TResult<M> ? unknown extends TResultDecorator<M> ? Record<K & string, any> : {} extends TResultDecorator<M> ? Record<K & string, any> : TResultDecorator<K & M> : TResult<K & M>);
364
+ export type TResultResolved<M extends Model> = (unknown extends TResult<M> ? unknown extends TResultDecorator<M> ? Record<string, any> : {} extends TResultDecorator<M> ? Record<string, any> : TResultDecorator<M> : TResult<M>);
365
365
  export type TConflictKeys<R extends readonly PropertyKey[], O extends readonly PropertyKey[]> = Extract<R[number], O[number]>;
366
366
  type Normalize<T> = T extends object ? ((T extends {
367
367
  select: infer S;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tspace-mysql",
3
- "version": "1.9.0-beta.3",
3
+ "version": "1.9.0-beta.4",
4
4
  "description": "Tspace MySQL is a promise-based ORM for Node.js, designed with modern TypeScript and providing type safety for schema databases.",
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.ts",