cogsbox-shape 0.5.137 → 0.5.139

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 +3 -3
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -364,9 +364,9 @@ export type DeriveViewFromSchema<TSchema extends {
364
364
  type NavigationProxy<CurrentTable extends string, Registry extends RegistryShape> = CurrentTable extends keyof Registry ? {
365
365
  [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;
366
366
  } : {};
367
- type NavigationToSelection<Nav> = Nav extends object ? {
367
+ type NavigationToSelection<Nav> = {
368
368
  [K in keyof Nav]?: boolean | NavigationToSelection<Nav[K]>;
369
- } : never;
369
+ };
370
370
  export type OmitRelations<Shape, RawSchema> = Omit<Shape, {
371
371
  [K in keyof Shape]: K extends keyof RawSchema ? RawSchema[K] extends {
372
372
  config: {
@@ -402,7 +402,7 @@ type CreateSchemaBoxReturn<S extends Record<string, SchemaWithPlaceholders>, R e
402
402
  };
403
403
  defaults: Resolved[K]["zodSchemas"]["defaultValues"];
404
404
  nav: NavigationProxy<K & string, Resolved>;
405
- RelationSelection: NavigationToSelection<NavigationProxy<K & string, Resolved>>;
405
+ RelationSelection: Prettify<NavigationToSelection<NavigationProxy<K & string, Resolved>>>;
406
406
  createView: <const TSelection extends NavigationToSelection<NavigationProxy<K & string, Resolved>>>(selection: TSelection) => DeriveViewResult<K & string, TSelection, Resolved>;
407
407
  __registry: Resolved;
408
408
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogsbox-shape",
3
- "version": "0.5.137",
3
+ "version": "0.5.139",
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",