@malloydata/db-publisher 0.0.381 → 0.0.382
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/api.d.ts +1762 -406
- package/dist/client/api.js +1190 -152
- package/dist/client/api.js.map +1 -1
- package/dist/publisher_connection.js +4 -2
- package/dist/publisher_connection.js.map +1 -1
- package/dist/publisher_connection.unit.spec.js +13 -4
- package/dist/publisher_connection.unit.spec.js.map +1 -1
- package/package.json +2 -2
- package/publisher-api-doc.yaml +1095 -91
- package/src/client/api.ts +2938 -1042
- package/src/publisher_connection.ts +5 -4
- package/src/publisher_connection.unit.spec.ts +13 -8
|
@@ -24,6 +24,7 @@ import type {
|
|
|
24
24
|
Connection,
|
|
25
25
|
ConnectionAttributes,
|
|
26
26
|
PostSqlsourceRequest,
|
|
27
|
+
PostQuerydataRequest,
|
|
27
28
|
RawAxiosRequestConfig,
|
|
28
29
|
} from './client';
|
|
29
30
|
import {Configuration, ConnectionsApi, ConnectionsTestApi} from './client';
|
|
@@ -214,14 +215,14 @@ export class PublisherConnection
|
|
|
214
215
|
try {
|
|
215
216
|
// TODO: Add support for abortSignal.
|
|
216
217
|
options.abortSignal = undefined;
|
|
217
|
-
const request:
|
|
218
|
+
const request: PostQuerydataRequest = {
|
|
218
219
|
sqlStatement: sql,
|
|
220
|
+
options: JSON.stringify(options),
|
|
219
221
|
};
|
|
220
222
|
const response = await this.connectionsApi.postQuerydata(
|
|
221
223
|
this.projectName,
|
|
222
224
|
this.name,
|
|
223
225
|
request,
|
|
224
|
-
JSON.stringify(options),
|
|
225
226
|
{
|
|
226
227
|
headers: PublisherConnection.getAuthHeaders(this.accessToken),
|
|
227
228
|
}
|
|
@@ -241,14 +242,14 @@ export class PublisherConnection
|
|
|
241
242
|
// TODO: Add support for abortSignal.
|
|
242
243
|
options.abortSignal = undefined;
|
|
243
244
|
// TODO: Add real streaming support to publisher API.
|
|
244
|
-
const request:
|
|
245
|
+
const request: PostQuerydataRequest = {
|
|
245
246
|
sqlStatement: sqlCommand,
|
|
247
|
+
options: JSON.stringify(options),
|
|
246
248
|
};
|
|
247
249
|
const response = await this.connectionsApi.postQuerydata(
|
|
248
250
|
this.projectName,
|
|
249
251
|
this.name,
|
|
250
252
|
request,
|
|
251
|
-
JSON.stringify(options),
|
|
252
253
|
{
|
|
253
254
|
headers: PublisherConnection.getAuthHeaders(this.accessToken),
|
|
254
255
|
}
|
|
@@ -602,8 +602,10 @@ describe('db:Publisher', () => {
|
|
|
602
602
|
expect(mockConnectionsApi.postQuerydata).toHaveBeenCalledWith(
|
|
603
603
|
'test-project',
|
|
604
604
|
'test-connection',
|
|
605
|
-
{
|
|
606
|
-
|
|
605
|
+
{
|
|
606
|
+
sqlStatement: 'SELECT * FROM test_table',
|
|
607
|
+
options: JSON.stringify({}),
|
|
608
|
+
},
|
|
607
609
|
{
|
|
608
610
|
headers: {
|
|
609
611
|
Authorization: 'Bearer test-token',
|
|
@@ -673,8 +675,10 @@ describe('db:Publisher', () => {
|
|
|
673
675
|
expect(mockConnectionsApi.postQuerydata).toHaveBeenCalledWith(
|
|
674
676
|
'test-project',
|
|
675
677
|
'test-connection',
|
|
676
|
-
{
|
|
677
|
-
|
|
678
|
+
{
|
|
679
|
+
sqlStatement: 'SELECT * FROM test_table',
|
|
680
|
+
options: JSON.stringify(options),
|
|
681
|
+
},
|
|
678
682
|
{
|
|
679
683
|
headers: {
|
|
680
684
|
Authorization: 'Bearer test-token',
|
|
@@ -775,8 +779,7 @@ describe('db:Publisher', () => {
|
|
|
775
779
|
expect(mockConnectionsApi.postQuerydata).toHaveBeenCalledWith(
|
|
776
780
|
'test-project',
|
|
777
781
|
'test-connection',
|
|
778
|
-
{sqlStatement: 'SELECT * FROM test_table'},
|
|
779
|
-
'{}',
|
|
782
|
+
{sqlStatement: 'SELECT * FROM test_table', options: '{}'},
|
|
780
783
|
{
|
|
781
784
|
headers: {
|
|
782
785
|
Authorization: 'Bearer test-token',
|
|
@@ -851,8 +854,10 @@ describe('db:Publisher', () => {
|
|
|
851
854
|
expect(mockConnectionsApi.postQuerydata).toHaveBeenCalledWith(
|
|
852
855
|
'test-project',
|
|
853
856
|
'test-connection',
|
|
854
|
-
{
|
|
855
|
-
|
|
857
|
+
{
|
|
858
|
+
sqlStatement: 'SELECT * FROM test_table',
|
|
859
|
+
options: JSON.stringify(options),
|
|
860
|
+
},
|
|
856
861
|
{
|
|
857
862
|
headers: {
|
|
858
863
|
Authorization: 'Bearer test-token',
|