@embracesql/client
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "@embracesql/client", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Connects to EmbraceSQL over HTTP/S from browser and node.", | ||
@@ -13,5 +13,5 @@ "type": "module", | ||
"dependencies": { | ||
"@embracesql/shared": "^0.1.0" | ||
"@embracesql/shared": "^0.1.1" | ||
}, | ||
"gitHead": "6f0191319a0be4f5ebddc92fe81fb0b729521e87" | ||
"gitHead": "8ea204346f819dd1a7cae4e0380f211b89eee243" | ||
} |
@@ -49,3 +49,3 @@ import { | ||
: `${node.index.table.type.typescriptNamespacedName}[] | undefined`; | ||
const optionType = `${node.index.table.typescriptNamespacedName}.Options`; | ||
const optionType = `${node.index.type.typescriptNamespacedName}.Options & ${node.index.table.typescriptNamespacedName}.Options`; | ||
const parametersPick = node.index.type.attributes | ||
@@ -173,2 +173,3 @@ .map( | ||
const valuesType = `Partial<${node.table.type.typescriptNamespacedName}>`; | ||
const optionType = `${node.table.typescriptNamespacedName}.Options`; | ||
const returnType = `${node.table.type.typescriptNamespacedName}`; | ||
@@ -182,6 +183,7 @@ const valuesPick = node.table.allColumns | ||
return ` | ||
public async create(values: ${valuesType}) : Promise<${returnType}|undefined> { | ||
const response = await this.client.invoke<never, ${valuesType}, ${returnType}, never>({ | ||
public async create(values: ${valuesType}, options?: ${optionType}) : Promise<${returnType}|undefined> { | ||
const response = await this.client.invoke<never, ${valuesType}, ${returnType}, ${optionType}>({ | ||
operation: "${node.typescriptNamespacedPropertyName}", | ||
values: {${valuesPick}} | ||
values: {${valuesPick}}, | ||
options | ||
}); | ||
@@ -219,2 +221,3 @@ return ${returnParsedRow(node.table)}; | ||
const parametersType = node.index.type.typescriptNamespacedName; | ||
const optionType = `${node.index.table.typescriptNamespacedName}.Options`; | ||
const valuesType = `Partial<${node.index.table.type.typescriptNamespacedName}>`; | ||
@@ -238,7 +241,8 @@ const resultType = node.index.unique | ||
` | ||
public async ${node.typescriptPropertyName}(parameters: ${parametersType}, values: ${valuesType}) { | ||
const response = await this.client.invoke<${parametersType}, ${valuesType}, ${resultType}, never>({ | ||
public async ${node.typescriptPropertyName}(parameters: ${parametersType}, values: ${valuesType}, options?: ${optionType}) { | ||
const response = await this.client.invoke<${parametersType}, ${valuesType}, ${resultType}, ${optionType}>({ | ||
operation: "${node.typescriptNamespacedPropertyName}", | ||
parameters: {${parametersPick}}, | ||
values: {${valuesPick}} | ||
values: {${valuesPick}}, | ||
options | ||
}); | ||
@@ -245,0 +249,0 @@ `, |
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
12117
327
Updated@embracesql/shared@^0.1.1