Comparing version 0.0.13 to 0.0.14
import { ClientBase, Pool, QueryConfig } from 'pg'; | ||
import { Awaited, ResolvableValue } from '@duely/core'; | ||
import { ResourceTypes } from './types'; | ||
export * from './errors'; | ||
@@ -38,2 +39,3 @@ export declare const pool: Pool; | ||
export declare function queryResourceAccess(client: ClientBase, id: string): Promise<string>; | ||
export declare function queryResource<K extends keyof ResourceTypes, F extends Record<string, any> = Record<string, any>>(context: Context, id_or_resource_name: K, filter?: F): Promise<ResourceTypes[K]>; | ||
export declare function queryResource<R = any, F extends Record<string, any> = Record<string, any>>(context: Context, id_or_resource_name: string, filter?: F): Promise<R>; | ||
@@ -40,0 +42,0 @@ export declare function queryResource<R = any, F extends Record<string, any> = Record<string, any>>(client: ClientBase, id_or_resource_name: string, filter?: F): Promise<R>; |
{ | ||
"name": "@duely/db", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Client for querying duely-postgres database.", | ||
@@ -5,0 +5,0 @@ "repository": "github:uoleevi/duely", |
@@ -5,2 +5,3 @@ import { ClientBase, Pool, PoolClient, QueryConfig } from 'pg'; | ||
import { Awaited, ResolvableValue, Util } from '@duely/core'; | ||
import { ResourceTypes } from './types'; | ||
@@ -244,2 +245,7 @@ export * from './errors'; | ||
export async function queryResource<K extends keyof ResourceTypes, F extends Record<string, any> = Record<string, any>>( | ||
context: Context, | ||
id_or_resource_name: K, | ||
filter?: F | ||
): Promise<ResourceTypes[K]>; | ||
export async function queryResource<R = any, F extends Record<string, any> = Record<string, any>>( | ||
@@ -246,0 +252,0 @@ context: Context, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1084553
16
11182