Socket
Socket
Sign inDemoInstall

@duely/db

Package Overview
Dependencies
37
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.22 to 0.0.23

14

dist/index.d.ts

@@ -41,4 +41,4 @@ import { ClientBase, Pool, QueryConfig } from 'pg';

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[]>;
export declare function queryResourceAll<R = any, F extends Record<string, any> = Record<string, any>>(context: Context, resource_name: string, filter?: F): Promise<R[]>;
export declare function queryResourceAll<K extends keyof Resources>(client: ClientBase, resource_name: K, filter?: Partial<Resources[K]>): Promise<Resources[K][]>;
export declare function queryResourceAll<K extends keyof Resources>(context: Context, resource_name: K, filter?: Partial<Resources[K]>): Promise<Resources[K][]>;
export declare function createResource<R = any, I extends Record<string, any> = Record<string, any>>(context: Context, resource_name: string, data: I): Promise<R>;

@@ -58,7 +58,7 @@ export declare function createResource<R = any, I extends Record<string, any> = Record<string, any>>(client: ClientBase, resource_name: string, data: I): Promise<R>;

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>;
queryResourceAll<K_1 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_1, filter?: Partial<Resources[K_1]> | undefined): Promise<Resources[K_1][]>;
createResource<R_2 = any, I_2 extends Record<string, any> = Record<string, any>>(resource_name: string, data: I_2): Promise<R_2>;
upsertResource<R_3 = any, I_3 extends Record<string, any> = Record<string, any>>(resource_name: string, data: I_3): Promise<R_3>;
updateResource<R_4 = any, I_4 extends Record<string, any> = Record<string, any>>(id: string, data: I_4): Promise<R_4>;
deleteResource<R_5 = any>(id: string): Promise<R_5>;
};

@@ -65,0 +65,0 @@ export declare type ProcessingState = 'pending' | 'processing' | 'processed' | 'failed';

{
"name": "@duely/db",
"version": "0.0.22",
"version": "0.0.23",
"description": "Client for querying duely-postgres database.",

@@ -5,0 +5,0 @@ "repository": "github:uoleevi/duely",

@@ -274,17 +274,20 @@ import { ClientBase, Pool, PoolClient, QueryConfig } from 'pg';

export async function queryResourceAll<
R = any,
F extends Record<string, any> = Record<string, any>
>(client: ClientBase, resource_name: string, filter?: F): Promise<R[]>;
export async function queryResourceAll<
R = any,
F extends Record<string, any> = Record<string, any>
>(context: Context, resource_name: string, filter?: F): Promise<R[]>;
export async function queryResourceAll<
R = any,
F extends Record<string, any> = Record<string, any>
>(arg: Context | ClientBase, resource_name: string, filter?: F): Promise<R[]> {
export async function queryResourceAll<K extends keyof Resources>(
client: ClientBase,
resource_name: K,
filter?: Partial<Resources[K]>
): Promise<Resources[K][]>;
export async function queryResourceAll<K extends keyof Resources>(
context: Context,
resource_name: K,
filter?: Partial<Resources[K]>
): Promise<Resources[K][]>;
export async function queryResourceAll<K extends keyof Resources>(
arg: Context | ClientBase,
resource_name: K,
filter?: Partial<Resources[K]>
): Promise<Resources[K][]> {
return await queryAll(
arg as any /* Context | ClientBase */,
'SELECT * FROM operation_.query_resource_all_($1::text, $2::jsonb)',
'SELECT * FROM operation_.query_resource_($1::text, $2::jsonb)',
resource_name,

@@ -396,6 +399,6 @@ filter

},
async queryResourceAll<R = any, F extends Record<string, any> = Record<string, any>>(
resource_name: string,
filter?: F
): Promise<R[]> {
async queryResourceAll<K extends keyof Resources>(
resource_name: K,
filter?: Partial<Resources[K]>
): Promise<Resources[K][]> {
return await queryResourceAll(client, resource_name, filter);

@@ -402,0 +405,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc