Comparing version 0.0.19 to 0.0.20
import { ClientBase, Pool, QueryConfig } from 'pg'; | ||
import { Awaited, ResolvableValue } from '@duely/core'; | ||
import { Resources } from './types'; | ||
import { AccessLevel, Resources } from './types'; | ||
export * from './errors'; | ||
@@ -37,7 +37,6 @@ export declare const pool: Pool; | ||
export declare function query<R = any, I extends any[] = any[]>(client: ClientBase, sql: string | QueryConfig<I>, ...parameters: I): Promise<R>; | ||
export declare function queryResourceAccess(context: Context, id: string): Promise<string>; | ||
export declare function queryResourceAccess(client: ClientBase, id: string): Promise<string>; | ||
export declare function queryResource<K extends keyof Resources, F extends Record<string, any> = Record<string, any>>(context: Context, id_or_resource_name: K, filter?: F): Promise<Resources[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>; | ||
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>; | ||
export declare function queryResourceAccess(context: Context, id: string): Promise<AccessLevel>; | ||
export declare function queryResourceAccess(client: ClientBase, id: string): Promise<AccessLevel>; | ||
export declare function queryResource<K extends keyof Resources>(context: Context, resource_name: K, id_or_filter: string | Partial<Resources[K]>): Promise<Resources[K]>; | ||
export declare function queryResource<K extends keyof Resources>(client: ClientBase, resource_name: K, id_or_filter: string | Partial<Resources[K]>): Promise<Resources[K]>; | ||
export declare function queryResourceAll<R = any, F extends Record<string, any> = Record<string, any>>(client: ClientBase, resource_name: string, filter?: F): Promise<R[]>; | ||
@@ -57,9 +56,9 @@ export declare function queryResourceAll<R = any, F extends Record<string, any> = Record<string, any>>(context: Context, resource_name: string, filter?: F): Promise<R[]>; | ||
query<R_1 = any, I_1 extends any[] = any[]>(sql: string | QueryConfig<I_1>, ...parameters: I_1): Promise<R_1>; | ||
queryResourceAccess: import("@duely/core").GenericFunction<Promise<string>, [] | [client: ClientBase, id: string] | [id: string]>; | ||
queryResource<K extends string, R_2 = any, F extends Record<string, any> = Record<string, any>>(id_or_resource_name: K, filter?: F | undefined): Promise<K extends "subdomain" | "agency" | "theme" | "image" | "user" | "sign up" | "password reset" | "product" | "markdown" | "membership" | "notification definition" | "form" | "agency thank you page setting" | "page block definition" | "product thank you page setting" | "form field" | "page block" | "transaction fee" | "page definition" | "page" | "stripe account" | "subscription plan" | "customer" | "webhook event" | "price" | "order" | "credential" | "integration" | "order item" ? Resources[K] : R_2>; | ||
queryResourceAll<R_3 = any, F_1 extends Record<string, any> = Record<string, any>>(resource_name: string, filter?: F_1 | undefined): Promise<R_3[]>; | ||
createResource<R_4 = any, I_2 extends Record<string, any> = Record<string, any>>(resource_name: string, data: I_2): Promise<R_4>; | ||
upsertResource<R_5 = any, I_3 extends Record<string, any> = Record<string, any>>(resource_name: string, data: I_3): Promise<R_5>; | ||
updateResource<R_6 = any, I_4 extends Record<string, any> = Record<string, any>>(id: string, data: I_4): Promise<R_6>; | ||
deleteResource<R_7 = any>(id: string): Promise<R_7>; | ||
queryResourceAccess: import("@duely/core").GenericFunction<Promise<AccessLevel>, [] | [client: ClientBase, id: string] | [id: string]>; | ||
queryResource<K extends "subdomain" | "agency" | "theme" | "image" | "user" | "sign up" | "password reset" | "product" | "markdown" | "membership" | "notification definition" | "form" | "agency thank you page setting" | "page block definition" | "product thank you page setting" | "form field" | "page block" | "transaction fee" | "page definition" | "page" | "stripe account" | "subscription plan" | "customer" | "webhook event" | "price" | "order" | "credential" | "integration" | "order item">(resource_name: K, id_or_filter: string | Partial<Resources[K]>): Promise<Resources[K]>; | ||
queryResourceAll<R_2 = any, F extends Record<string, any> = Record<string, any>>(resource_name: string, filter?: F | undefined): Promise<R_2[]>; | ||
createResource<R_3 = any, I_2 extends Record<string, any> = Record<string, any>>(resource_name: string, data: I_2): Promise<R_3>; | ||
upsertResource<R_4 = any, I_3 extends Record<string, any> = Record<string, any>>(resource_name: string, data: I_3): Promise<R_4>; | ||
updateResource<R_5 = any, I_4 extends Record<string, any> = Record<string, any>>(id: string, data: I_4): Promise<R_5>; | ||
deleteResource<R_6 = any>(id: string): Promise<R_6>; | ||
}; | ||
@@ -66,0 +65,0 @@ export declare type ProcessingState = 'pending' | 'processing' | 'processed' | 'failed'; |
{ | ||
"name": "@duely/db", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "Client for querying duely-postgres database.", | ||
@@ -5,0 +5,0 @@ "repository": "github:uoleevi/duely", |
Sorry, the diff of this file is too big to display
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
1107412
11999