@vizzly/api-client 0.0.94 → 0.0.96

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.
@@ -215,7 +215,7 @@ export declare class VizzlyQueryEngineApi extends Api {
215
215
  previousWorkflowResults: Partial<DataOptimiser.InternalIngestExecuteResponse['workflowResults']>;
216
216
  warehouseOverrideMapping?: DataOptimiser.WarehouseOverrideMapping;
217
217
  }>): Promise<import("../types").Response<DataOptimiser.StatusResponse<{
218
- ingest_storage_to_snowflake: DataOptimiser.ActionStatus<{
218
+ internal_ingest_copy_to_snowflake: DataOptimiser.ActionStatus<{
219
219
  destinationAddress: string[];
220
220
  destinationFields: DataOptimiser.DataSourceFields;
221
221
  }>;
@@ -364,4 +364,6 @@ export declare class VizzlyQueryEngineApi extends Api {
364
364
  warehouseName: string;
365
365
  }>>;
366
366
  private buildCreateWarehouseRequest;
367
+ qaSetup(params: RequestParams<DataOptimiser.QASetupParams>): Promise<import("../types").Response<null>>;
368
+ private buildQASetupRequest;
367
369
  }
@@ -8,6 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
11
22
  Object.defineProperty(exports, "__esModule", { value: true });
12
23
  exports.VizzlyQueryEngineApi = void 0;
13
24
  const errors_1 = require("../errors");
@@ -526,7 +537,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
526
537
  externalSnowflakeConnection: params.externalSnowflakeConnection,
527
538
  instructions: params.instructions,
528
539
  fullTreeFields: params.fullTreeFields,
529
- warehouseOverrideMapping: params.warehouseOverrideMapping || {}
540
+ warehouseOverrideMapping: params.warehouseOverrideMapping || {},
530
541
  },
531
542
  acceptedAuthParams: ['queryEngineApiKey'],
532
543
  };
@@ -557,7 +568,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
557
568
  externalSnowflakeConnection: params.externalSnowflakeConnection,
558
569
  transformations: params.transformations,
559
570
  previousWorkflowResults: params.previousWorkflowResults,
560
- warehouseOverrideMapping: params.warehouseOverrideMapping || {}
571
+ warehouseOverrideMapping: params.warehouseOverrideMapping || {},
561
572
  },
562
573
  acceptedAuthParams: ['queryEngineApiKey'],
563
574
  };
@@ -585,7 +596,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
585
596
  ingestFields: params.ingestFields,
586
597
  transformations: params.transformations,
587
598
  previousWorkflowResults: params.previousWorkflowResults,
588
- warehouseOverrideMapping: params.warehouseOverrideMapping || {}
599
+ warehouseOverrideMapping: params.warehouseOverrideMapping || {},
589
600
  },
590
601
  acceptedAuthParams: ['queryEngineApiKey'],
591
602
  };
@@ -617,7 +628,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
617
628
  primaryDateFieldId: params.primaryDateFieldId,
618
629
  internalCompanyConnection: params.internalCompanyConnection,
619
630
  previousWorkflowResults: params.previousWorkflowResults,
620
- warehouseOverrideMapping: params.warehouseOverrideMapping || {}
631
+ warehouseOverrideMapping: params.warehouseOverrideMapping || {},
621
632
  },
622
633
  acceptedAuthParams: ['queryEngineApiKey'],
623
634
  };
@@ -676,7 +687,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
676
687
  ingestFields: params.ingestFields,
677
688
  transformations: params.transformations,
678
689
  previousWorkflowResults: params.previousWorkflowResults,
679
- warehouseOverrideMapping: params.warehouseOverrideMapping || {}
690
+ warehouseOverrideMapping: params.warehouseOverrideMapping || {},
680
691
  },
681
692
  acceptedAuthParams: ['queryEngineApiKey'],
682
693
  };
@@ -724,7 +735,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
724
735
  dataSourceId: params.dataSourceId,
725
736
  fileName: params.fileName,
726
737
  purpose: params.purpose,
727
- contentType: params.contentType
738
+ contentType: params.contentType,
728
739
  },
729
740
  acceptedAuthParams: ['queryEngineApiKey'],
730
741
  };
@@ -811,10 +822,26 @@ class VizzlyQueryEngineApi extends Api_1.Api {
811
822
  abortSignal: params.abortSignal,
812
823
  body: {
813
824
  company: { id: params.companyId },
814
- warehouseSize: params.warehouseSize
825
+ warehouseSize: params.warehouseSize,
815
826
  },
816
827
  acceptedAuthParams: ['queryEngineApiKey'],
817
828
  };
818
829
  }
830
+ //** QA setup */
831
+ qaSetup(params) {
832
+ return __awaiter(this, void 0, void 0, function* () {
833
+ return yield this.execute(this.buildQASetupRequest(params));
834
+ });
835
+ }
836
+ buildQASetupRequest(params) {
837
+ const { abortSignal } = params, body = __rest(params, ["abortSignal"]);
838
+ return {
839
+ path: Path_1.Path.buildPath('/api/v1/data-optimiser/qa-setup', ''),
840
+ method: 'post',
841
+ abortSignal: abortSignal,
842
+ body,
843
+ acceptedAuthParams: ['queryEngineApiKey'],
844
+ };
845
+ }
819
846
  }
820
847
  exports.VizzlyQueryEngineApi = VizzlyQueryEngineApi;
@@ -0,0 +1,38 @@
1
+ export type AddColumn = {
2
+ command: 'add_column';
3
+ database: string;
4
+ schema: string;
5
+ tableName: string;
6
+ columnName: string;
7
+ columnType: string;
8
+ };
9
+ export type RemoveColumn = {
10
+ command: 'remove_column';
11
+ database: string;
12
+ schema: string;
13
+ tableName: string;
14
+ columnName: string;
15
+ };
16
+ export type AddRow = {
17
+ command: 'add_row';
18
+ database: string;
19
+ schema: string;
20
+ tableName: string;
21
+ rowData: {
22
+ [key: string]: string | number | boolean | null;
23
+ };
24
+ };
25
+ export type RemoveRow = {
26
+ command: 'remove_row';
27
+ database: string;
28
+ schema: string;
29
+ tableName: string;
30
+ condition: string;
31
+ };
32
+ export type ResetTable = {
33
+ command: 'reset_table';
34
+ database: string;
35
+ schema: string;
36
+ targetTableName: string;
37
+ baseTableName: string;
38
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/types.d.ts CHANGED
@@ -6,6 +6,8 @@ import { VizzlyAppApi } from './models/VizzlyAppApi';
6
6
  import { VizzlyQueryEngineApi } from './models/VizzlyQueryEngineApi';
7
7
  import { DashboardDefinition, DashboardFromAPI } from './types/dashboard';
8
8
  import { UserFromAPI } from './types/user';
9
+ import { AddColumn, AddRow, RemoveColumn, RemoveRow, ResetTable } from './types/qa';
10
+ export * from './types/qa';
9
11
  export * from './types/dashboard';
10
12
  export * from './types/project';
11
13
  export * from './types/team';
@@ -655,6 +657,8 @@ export declare namespace DataOptimiser {
655
657
  uploadsTableAddress: [string, string, string];
656
658
  subsnapsTableAddress: [string, string, string];
657
659
  };
660
+ export type QASetupParams = AddColumn | RemoveColumn | AddRow | RemoveRow | ResetTable;
661
+ export type QASetupResponse = null;
658
662
  export type FileScanResult = 'malicious' | 'safe' | 'unknown' | 'in_progress';
659
663
  export {};
660
664
  }
package/dist/types.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types/qa"), exports);
17
18
  __exportStar(require("./types/dashboard"), exports);
18
19
  __exportStar(require("./types/project"), exports);
19
20
  __exportStar(require("./types/team"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly/api-client",
3
- "version": "0.0.94",
3
+ "version": "0.0.96",
4
4
  "private": false,
5
5
  "license": "NONE",
6
6
  "source": "src/index.ts",