postgresdk 0.18.30 → 0.19.0

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.
@@ -1,6 +1,8 @@
1
1
  import type { Table, Model } from "./introspect";
2
2
  import type { Graph } from "./rel-classify";
3
3
  export declare function emitClient(table: Table, graph: Graph, opts: {
4
+ softDeleteColumn?: string | null;
5
+ exposeHardDelete?: boolean;
4
6
  useJsExtensions?: boolean;
5
7
  includeMethodsDepth?: number;
6
8
  skipJunctionTables?: boolean;
@@ -2,4 +2,8 @@ import type { Table } from "./introspect";
2
2
  /**
3
3
  * Emits the Hono server router file that exports helper functions for route registration
4
4
  */
5
- export declare function emitHonoRouter(tables: Table[], hasAuth: boolean, useJsExtensions?: boolean, pullToken?: string): string;
5
+ export declare function emitHonoRouter(tables: Table[], hasAuth: boolean, useJsExtensions?: boolean, pullToken?: string, opts?: {
6
+ apiPathPrefix?: string;
7
+ softDeleteCols?: Record<string, string | null>;
8
+ includeMethodsDepth?: number;
9
+ }): string;
@@ -5,6 +5,7 @@ import type { Table } from "./introspect";
5
5
  import type { Graph } from "./rel-classify";
6
6
  export declare function emitHonoRoutes(table: Table, _graph: Graph, opts: {
7
7
  softDeleteColumn: string | null;
8
+ exposeHardDelete: boolean;
8
9
  includeMethodsDepth: number;
9
10
  authStrategy?: string;
10
11
  useJsExtensions?: boolean;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import "dotenv/config";
2
2
  import type { Config } from "./types";
3
3
  /** Resolves the effective soft delete column for a given table, respecting per-table overrides. */
4
- export declare function resolveSoftDeleteColumn(cfg: Pick<Config, "softDeleteColumn" | "softDeleteColumnOverrides">, tableName: string): string | null;
4
+ export declare function resolveSoftDeleteColumn(cfg: Pick<Config, "delete">, tableName: string): string | null;
5
+ /** Returns whether the hard delete endpoint/method should be exposed when soft deletes are configured. */
6
+ export declare function resolveExposeHardDelete(cfg: Pick<Config, "delete">): boolean;
5
7
  export declare function generate(configPath: string, options?: {
6
8
  force?: boolean;
7
9
  }): Promise<void>;