postgresdk 0.18.6 → 0.18.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/dist/cli.js CHANGED
@@ -3460,6 +3460,7 @@ function emitClient(table, graph, opts, model) {
3460
3460
  }
3461
3461
  }
3462
3462
  const typeImports = `import type { Insert${Type}, Update${Type}, Select${Type} } from "./types/${table.name}${ext}";`;
3463
+ const includeSpecImport = `import type { ${Type}IncludeSpec } from "./include-spec${ext}";`;
3463
3464
  const otherTableImports = [];
3464
3465
  for (const target of Array.from(importedTypes)) {
3465
3466
  if (target !== table.name) {
@@ -3542,7 +3543,7 @@ function emitClient(table, graph, opts, model) {
3542
3543
  order?: "asc" | "desc";
3543
3544
  limit?: number;
3544
3545
  offset?: number;
3545
- include?: any;
3546
+ include?: ${Type}IncludeSpec;
3546
3547
  };
3547
3548
  }`;
3548
3549
  }
@@ -3650,6 +3651,7 @@ import { BaseClient } from "./base-client${ext}";
3650
3651
  import type { Where } from "./where-types${ext}";
3651
3652
  import type { PaginatedResponse } from "./types/shared${ext}";
3652
3653
  ${typeImports}
3654
+ ${includeSpecImport}
3653
3655
  ${otherTableImports.join(`
3654
3656
  `)}
3655
3657
 
@@ -3799,7 +3801,7 @@ ${hasJsonbColumns ? ` /**
3799
3801
  */
3800
3802
  async list<TJsonb extends Partial<Select${Type}> = {}>(params: {
3801
3803
  select: string[];
3802
- include?: any;
3804
+ include?: ${Type}IncludeSpec;
3803
3805
  limit?: number;
3804
3806
  offset?: number;
3805
3807
  where?: Where<Select${Type}<TJsonb>>;${hasVectorColumns ? `
@@ -3819,7 +3821,7 @@ ${hasJsonbColumns ? ` /**
3819
3821
  */
3820
3822
  async list<TJsonb extends Partial<Select${Type}> = {}>(params: {
3821
3823
  exclude: string[];
3822
- include?: any;
3824
+ include?: ${Type}IncludeSpec;
3823
3825
  limit?: number;
3824
3826
  offset?: number;
3825
3827
  where?: Where<Select${Type}<TJsonb>>;${hasVectorColumns ? `
@@ -3847,7 +3849,7 @@ ${hasJsonbColumns ? ` /**
3847
3849
  * const users = await client.list<{ metadata: Metadata }>({ where: { status: 'active' } });
3848
3850
  */
3849
3851
  async list<TJsonb extends Partial<Select${Type}> = {}>(params?: {
3850
- include?: any;
3852
+ include?: ${Type}IncludeSpec;
3851
3853
  limit?: number;
3852
3854
  offset?: number;
3853
3855
  where?: Where<Select${Type}<TJsonb>>;${hasVectorColumns ? `
@@ -3861,7 +3863,7 @@ ${hasJsonbColumns ? ` /**
3861
3863
  order?: "asc" | "desc" | ("asc" | "desc")[];
3862
3864
  }): Promise<PaginatedResponse<Select${Type}<TJsonb>${hasVectorColumns ? " & { _distance?: number }" : ""}>>;
3863
3865
  async list<TJsonb extends Partial<Select${Type}> = {}>(params?: {
3864
- include?: any;
3866
+ include?: ${Type}IncludeSpec;
3865
3867
  select?: string[];
3866
3868
  exclude?: string[];
3867
3869
  limit?: number;
@@ -3884,7 +3886,7 @@ ${hasJsonbColumns ? ` /**
3884
3886
  */
3885
3887
  async list(params: {
3886
3888
  select: string[];
3887
- include?: any;
3889
+ include?: ${Type}IncludeSpec;
3888
3890
  limit?: number;
3889
3891
  offset?: number;
3890
3892
  where?: Where<Select${Type}>;${hasVectorColumns ? `
@@ -3904,7 +3906,7 @@ ${hasJsonbColumns ? ` /**
3904
3906
  */
3905
3907
  async list(params: {
3906
3908
  exclude: string[];
3907
- include?: any;
3909
+ include?: ${Type}IncludeSpec;
3908
3910
  limit?: number;
3909
3911
  offset?: number;
3910
3912
  where?: Where<Select${Type}>;${hasVectorColumns ? `
@@ -3929,7 +3931,7 @@ ${hasJsonbColumns ? ` /**
3929
3931
  * @returns Paginated results with all fields
3930
3932
  */
3931
3933
  async list(params?: {
3932
- include?: any;
3934
+ include?: ${Type}IncludeSpec;
3933
3935
  limit?: number;
3934
3936
  offset?: number;
3935
3937
  where?: Where<Select${Type}>;${hasVectorColumns ? `
@@ -3943,7 +3945,7 @@ ${hasJsonbColumns ? ` /**
3943
3945
  order?: "asc" | "desc" | ("asc" | "desc")[];
3944
3946
  }): Promise<PaginatedResponse<Select${Type}${hasVectorColumns ? " & { _distance?: number }" : ""}>>;
3945
3947
  async list(params?: {
3946
- include?: any;
3948
+ include?: ${Type}IncludeSpec;
3947
3949
  select?: string[];
3948
3950
  exclude?: string[];
3949
3951
  limit?: number;
package/dist/index.js CHANGED
@@ -2499,6 +2499,7 @@ function emitClient(table, graph, opts, model) {
2499
2499
  }
2500
2500
  }
2501
2501
  const typeImports = `import type { Insert${Type}, Update${Type}, Select${Type} } from "./types/${table.name}${ext}";`;
2502
+ const includeSpecImport = `import type { ${Type}IncludeSpec } from "./include-spec${ext}";`;
2502
2503
  const otherTableImports = [];
2503
2504
  for (const target of Array.from(importedTypes)) {
2504
2505
  if (target !== table.name) {
@@ -2581,7 +2582,7 @@ function emitClient(table, graph, opts, model) {
2581
2582
  order?: "asc" | "desc";
2582
2583
  limit?: number;
2583
2584
  offset?: number;
2584
- include?: any;
2585
+ include?: ${Type}IncludeSpec;
2585
2586
  };
2586
2587
  }`;
2587
2588
  }
@@ -2689,6 +2690,7 @@ import { BaseClient } from "./base-client${ext}";
2689
2690
  import type { Where } from "./where-types${ext}";
2690
2691
  import type { PaginatedResponse } from "./types/shared${ext}";
2691
2692
  ${typeImports}
2693
+ ${includeSpecImport}
2692
2694
  ${otherTableImports.join(`
2693
2695
  `)}
2694
2696
 
@@ -2838,7 +2840,7 @@ ${hasJsonbColumns ? ` /**
2838
2840
  */
2839
2841
  async list<TJsonb extends Partial<Select${Type}> = {}>(params: {
2840
2842
  select: string[];
2841
- include?: any;
2843
+ include?: ${Type}IncludeSpec;
2842
2844
  limit?: number;
2843
2845
  offset?: number;
2844
2846
  where?: Where<Select${Type}<TJsonb>>;${hasVectorColumns ? `
@@ -2858,7 +2860,7 @@ ${hasJsonbColumns ? ` /**
2858
2860
  */
2859
2861
  async list<TJsonb extends Partial<Select${Type}> = {}>(params: {
2860
2862
  exclude: string[];
2861
- include?: any;
2863
+ include?: ${Type}IncludeSpec;
2862
2864
  limit?: number;
2863
2865
  offset?: number;
2864
2866
  where?: Where<Select${Type}<TJsonb>>;${hasVectorColumns ? `
@@ -2886,7 +2888,7 @@ ${hasJsonbColumns ? ` /**
2886
2888
  * const users = await client.list<{ metadata: Metadata }>({ where: { status: 'active' } });
2887
2889
  */
2888
2890
  async list<TJsonb extends Partial<Select${Type}> = {}>(params?: {
2889
- include?: any;
2891
+ include?: ${Type}IncludeSpec;
2890
2892
  limit?: number;
2891
2893
  offset?: number;
2892
2894
  where?: Where<Select${Type}<TJsonb>>;${hasVectorColumns ? `
@@ -2900,7 +2902,7 @@ ${hasJsonbColumns ? ` /**
2900
2902
  order?: "asc" | "desc" | ("asc" | "desc")[];
2901
2903
  }): Promise<PaginatedResponse<Select${Type}<TJsonb>${hasVectorColumns ? " & { _distance?: number }" : ""}>>;
2902
2904
  async list<TJsonb extends Partial<Select${Type}> = {}>(params?: {
2903
- include?: any;
2905
+ include?: ${Type}IncludeSpec;
2904
2906
  select?: string[];
2905
2907
  exclude?: string[];
2906
2908
  limit?: number;
@@ -2923,7 +2925,7 @@ ${hasJsonbColumns ? ` /**
2923
2925
  */
2924
2926
  async list(params: {
2925
2927
  select: string[];
2926
- include?: any;
2928
+ include?: ${Type}IncludeSpec;
2927
2929
  limit?: number;
2928
2930
  offset?: number;
2929
2931
  where?: Where<Select${Type}>;${hasVectorColumns ? `
@@ -2943,7 +2945,7 @@ ${hasJsonbColumns ? ` /**
2943
2945
  */
2944
2946
  async list(params: {
2945
2947
  exclude: string[];
2946
- include?: any;
2948
+ include?: ${Type}IncludeSpec;
2947
2949
  limit?: number;
2948
2950
  offset?: number;
2949
2951
  where?: Where<Select${Type}>;${hasVectorColumns ? `
@@ -2968,7 +2970,7 @@ ${hasJsonbColumns ? ` /**
2968
2970
  * @returns Paginated results with all fields
2969
2971
  */
2970
2972
  async list(params?: {
2971
- include?: any;
2973
+ include?: ${Type}IncludeSpec;
2972
2974
  limit?: number;
2973
2975
  offset?: number;
2974
2976
  where?: Where<Select${Type}>;${hasVectorColumns ? `
@@ -2982,7 +2984,7 @@ ${hasJsonbColumns ? ` /**
2982
2984
  order?: "asc" | "desc" | ("asc" | "desc")[];
2983
2985
  }): Promise<PaginatedResponse<Select${Type}${hasVectorColumns ? " & { _distance?: number }" : ""}>>;
2984
2986
  async list(params?: {
2985
- include?: any;
2987
+ include?: ${Type}IncludeSpec;
2986
2988
  select?: string[];
2987
2989
  exclude?: string[];
2988
2990
  limit?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postgresdk",
3
- "version": "0.18.6",
3
+ "version": "0.18.7",
4
4
  "description": "Generate a typed server/client SDK from a Postgres schema (includes, Zod, Hono).",
5
5
  "type": "module",
6
6
  "bin": {