@pipedream/platform
Advanced tools
Comparing version 2.0.0 to 3.0.0
import { JsonPrimitive } from "type-fest"; | ||
import { ExecuteQueryArgs } from "./sql"; | ||
export declare type ColumnSchema = { | ||
@@ -21,5 +22,17 @@ columnDefault: JsonPrimitive; | ||
}; | ||
export declare type SqlProp = { | ||
query: string; | ||
params?: string[]; | ||
}; | ||
declare const _default: { | ||
methods: { | ||
/** | ||
* A method that transforms the value of a prop of type `sql` so that it can | ||
* be fed to the `executeQuery` method. | ||
* | ||
* @param sqlProp - The prop of type `sql` | ||
* @returns The arguments to be passed to `executeQuery` | ||
*/ | ||
executeQueryAdapter(sqlProp: SqlProp): ExecuteQueryArgs; | ||
/** | ||
* A helper method to get the schema of the database. Used by other features | ||
@@ -26,0 +39,0 @@ * (like the `sql` prop) to enrich the code editor and provide the user with |
@@ -7,2 +7,13 @@ "use strict"; | ||
/** | ||
* A method that transforms the value of a prop of type `sql` so that it can | ||
* be fed to the `executeQuery` method. | ||
* | ||
* @param sqlProp - The prop of type `sql` | ||
* @returns The arguments to be passed to `executeQuery` | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
executeQueryAdapter(sqlProp) { | ||
throw new errors_1.ConfigurationError("executeQueryAdapter not implemented"); | ||
}, | ||
/** | ||
* A helper method to get the schema of the database. Used by other features | ||
@@ -9,0 +20,0 @@ * (like the `sql` prop) to enrich the code editor and provide the user with |
@@ -0,1 +1,2 @@ | ||
import { ExecuteQueryArgs } from "./sql"; | ||
export declare type ClientConfiguration = object; | ||
@@ -6,3 +7,2 @@ export declare type ProxyArgs = { | ||
}; | ||
export declare type ExecuteQueryArgs = object | string; | ||
export declare type Row = object; | ||
@@ -37,11 +37,4 @@ declare const _default: { | ||
proxyAdapter(args: ExecuteQueryArgs): ProxyArgs; | ||
/** | ||
* A method that performs the inverse transformation of `proxyAdapter`. | ||
* | ||
* @param args - The output of `proxyAdapter`. | ||
* @returns The query string or object to be sent to the DB. | ||
*/ | ||
executeQueryAdapter(args: ProxyArgs): ExecuteQueryArgs; | ||
}; | ||
}; | ||
export default _default; |
@@ -40,13 +40,3 @@ "use strict"; | ||
}, | ||
/** | ||
* A method that performs the inverse transformation of `proxyAdapter`. | ||
* | ||
* @param args - The output of `proxyAdapter`. | ||
* @returns The query string or object to be sent to the DB. | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
executeQueryAdapter(args) { | ||
throw new errors_1.ConfigurationError("executeQueryAdapter not implemented"); | ||
}, | ||
}, | ||
}; |
import { ConfigurationError } from "./errors"; | ||
import { JsonPrimitive } from "type-fest"; | ||
import { ExecuteQueryArgs } from "./sql"; | ||
@@ -28,5 +29,22 @@ export type ColumnSchema = { | ||
export type SqlProp = { | ||
query: string; | ||
params?: string[]; | ||
}; | ||
export default { | ||
methods: { | ||
/** | ||
* A method that transforms the value of a prop of type `sql` so that it can | ||
* be fed to the `executeQuery` method. | ||
* | ||
* @param sqlProp - The prop of type `sql` | ||
* @returns The arguments to be passed to `executeQuery` | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
executeQueryAdapter(sqlProp: SqlProp): ExecuteQueryArgs { | ||
throw new ConfigurationError("executeQueryAdapter not implemented"); | ||
}, | ||
/** | ||
* A helper method to get the schema of the database. Used by other features | ||
@@ -33,0 +51,0 @@ * (like the `sql` prop) to enrich the code editor and provide the user with |
import { ConfigurationError } from "./errors"; | ||
import { ExecuteQueryArgs } from "./sql"; | ||
@@ -8,3 +9,2 @@ export type ClientConfiguration = object; | ||
}; | ||
export type ExecuteQueryArgs = object | string; | ||
export type Row = object; | ||
@@ -50,14 +50,3 @@ | ||
}, | ||
/** | ||
* A method that performs the inverse transformation of `proxyAdapter`. | ||
* | ||
* @param args - The output of `proxyAdapter`. | ||
* @returns The query string or object to be sent to the DB. | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
executeQueryAdapter(args: ProxyArgs): ExecuteQueryArgs { | ||
throw new ConfigurationError("executeQueryAdapter not implemented"); | ||
}, | ||
}, | ||
}; |
{ | ||
"name": "@pipedream/platform", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Pipedream platform globals (typing and runtime type checking)", | ||
@@ -5,0 +5,0 @@ "homepage": "https://pipedream.com", |
57262
31
1549