cogsbox-shape 0.5.124 → 0.5.126

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.
Files changed (2) hide show
  1. package/dist/schema.d.ts +4 -4
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -288,7 +288,7 @@ type _DeriveViewShape<TTableName extends keyof TRegistry, TSelection, TRegistry
288
288
  1
289
289
  ]>>> : never : never : never;
290
290
  }> : OmitRelationFields<BaseShape, TRegistry[TTableName]["rawSchema"]> : never;
291
- type DeriveViewDefaults<TTableName extends keyof TRegistry, TSelection, TRegistry extends RegistryShape, Depth extends any[] = []> = Prettify<TRegistry[TTableName]["zodSchemas"]["defaultValues"] & (TSelection extends Record<string, any> ? {
291
+ type _Internal_DeriveViewDefaults<TTableName extends keyof TRegistry, TSelection, TRegistry extends RegistryShape, Depth extends any[] = []> = Prettify<TRegistry[TTableName]["zodSchemas"]["defaultValues"] & (TSelection extends Record<string, any> ? {
292
292
  -readonly [K in keyof TSelection & keyof TRegistry[TTableName]["rawSchema"]]?: TRegistry[TTableName]["rawSchema"][K] extends {
293
293
  config: {
294
294
  sql: {
@@ -296,10 +296,10 @@ type DeriveViewDefaults<TTableName extends keyof TRegistry, TSelection, TRegistr
296
296
  schema: any;
297
297
  };
298
298
  };
299
- } ? GetRelationRegistryKey<TRegistry[TTableName]["rawSchema"][K], TRegistry> extends infer TargetKey ? TargetKey extends keyof TRegistry ? RelType extends "hasMany" | "manyToMany" ? DeriveViewDefaults<TargetKey, TSelection[K], TRegistry, [
299
+ } ? GetRelationRegistryKey<TRegistry[TTableName]["rawSchema"][K], TRegistry> extends infer TargetKey ? TargetKey extends keyof TRegistry ? RelType extends "hasMany" | "manyToMany" ? _Internal_DeriveViewDefaults<TargetKey, TSelection[K], TRegistry, [
300
300
  ...Depth,
301
301
  1
302
- ]>[] : DeriveViewDefaults<TargetKey, TSelection[K], TRegistry, [
302
+ ]>[] : _Internal_DeriveViewDefaults<TargetKey, TSelection[K], TRegistry, [
303
303
  ...Depth,
304
304
  1
305
305
  ]> | null : never : never : never;
@@ -308,7 +308,7 @@ export type DeriveViewResult<TTableName extends keyof TRegistry, TSelection, TRe
308
308
  sql: TRegistry[TTableName]["zodSchemas"]["sqlSchema"];
309
309
  client: z.ZodObject<_DeriveViewShape<TTableName, TSelection, TRegistry, "clientSchema">>;
310
310
  validation: z.ZodObject<_DeriveViewShape<TTableName, TSelection, TRegistry, "validationSchema">>;
311
- defaults: DeriveViewDefaults<TTableName, TSelection, TRegistry>;
311
+ defaults: _Internal_DeriveViewDefaults<TTableName, TSelection, TRegistry>;
312
312
  };
313
313
  type NavigationProxy<CurrentTable extends string, Registry extends RegistryShape> = CurrentTable extends keyof Registry ? {
314
314
  [K in keyof Registry[CurrentTable]["rawSchema"] as IsRelationField<Registry[CurrentTable]["rawSchema"][K]> extends true ? K : never]: GetRelationRegistryKey<Registry[CurrentTable]["rawSchema"][K], Registry> extends infer TargetKey ? TargetKey extends keyof Registry ? NavigationProxy<TargetKey & string, Registry> : never : never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogsbox-shape",
3
- "version": "0.5.124",
3
+ "version": "0.5.126",
4
4
  "description": "A TypeScript library for creating type-safe database schemas with Zod validation, SQL type definitions, and automatic client/server transformations. Unifies client, server, and database types through a single schema definition, with built-in support for relationships and serialization.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",