@neuralinnovations/dataisland-sdk 0.6.35 → 0.6.37

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.
Files changed (27) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/commands/startCommandHandler.js +6 -6
  3. package/dist/src/commands/startCommandHandler.js.map +1 -1
  4. package/dist/src/dto/queryFlowResponse.d.ts +8 -9
  5. package/dist/src/dto/queryFlowResponse.d.ts.map +1 -1
  6. package/dist/src/dto/queryFlowResponse.js +8 -10
  7. package/dist/src/dto/queryFlowResponse.js.map +1 -1
  8. package/dist/src/storages/queryFlows/queryFlow.d.ts +3 -2
  9. package/dist/src/storages/queryFlows/queryFlow.d.ts.map +1 -1
  10. package/dist/src/storages/queryFlows/queryFlow.impl.d.ts +3 -2
  11. package/dist/src/storages/queryFlows/queryFlow.impl.d.ts.map +1 -1
  12. package/dist/src/storages/queryFlows/queryFlow.impl.js +16 -8
  13. package/dist/src/storages/queryFlows/queryFlow.impl.js.map +1 -1
  14. package/dist/src/storages/queryFlows/queryFlow.js.map +1 -1
  15. package/dist/src/storages/queryFlows/queryFlows.d.ts +2 -2
  16. package/dist/src/storages/queryFlows/queryFlows.d.ts.map +1 -1
  17. package/dist/src/storages/queryFlows/queryFlows.impl.d.ts +2 -2
  18. package/dist/src/storages/queryFlows/queryFlows.impl.d.ts.map +1 -1
  19. package/dist/src/storages/queryFlows/queryFlows.impl.js +4 -6
  20. package/dist/src/storages/queryFlows/queryFlows.impl.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/commands/startCommandHandler.ts +6 -6
  23. package/src/dto/queryFlowResponse.ts +13 -10
  24. package/src/storages/queryFlows/queryFlow.impl.ts +17 -9
  25. package/src/storages/queryFlows/queryFlow.ts +4 -3
  26. package/src/storages/queryFlows/queryFlows.impl.ts +6 -8
  27. package/src/storages/queryFlows/queryFlows.ts +2 -2
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuralinnovations/dataisland-sdk",
3
- "version": "0.6.35",
3
+ "version": "0.6.37",
4
4
  "description": "SDK for DataIsland project",
5
5
  "licenses": [
6
6
  {
@@ -5,8 +5,8 @@ const commandService_1 = require("../services/commandService");
5
5
  const userProfileService_1 = require("../services/userProfileService");
6
6
  const cookieService_1 = require("../services/cookieService");
7
7
  const credentials_1 = require("../credentials");
8
- //import { AcquiringService } from "../services/acquiringService"
9
- //import {LibrariesService} from "../services/librariesService"
8
+ const acquiringService_1 = require("../services/acquiringService");
9
+ const librariesService_1 = require("../services/librariesService");
10
10
  class StartCommand extends commandService_1.Command {
11
11
  }
12
12
  exports.StartCommand = StartCommand;
@@ -14,8 +14,8 @@ class StartCommandHandler extends commandService_1.CommandHandler {
14
14
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
15
  async execute(message) {
16
16
  const userService = this.resolve(userProfileService_1.UserProfileService);
17
- //const acquiringService = this.resolve(AcquiringService)!
18
- //const librariesService = this.resolve(LibrariesService)!
17
+ const acquiringService = this.resolve(acquiringService_1.AcquiringService);
18
+ const librariesService = this.resolve(librariesService_1.LibrariesService);
19
19
  // Merge anonymous user if needed
20
20
  if (!(this.context.app.credential instanceof credentials_1.AnonymousCredential)) {
21
21
  const cookie = this.resolve(cookieService_1.CookieService);
@@ -24,9 +24,9 @@ class StartCommandHandler extends commandService_1.CommandHandler {
24
24
  cookie.anonymousToken = undefined;
25
25
  }
26
26
  }
27
- // await librariesService.initialize()
27
+ await librariesService.initialize();
28
28
  await userService.fetch();
29
- // await acquiringService.initialize()
29
+ await acquiringService.initialize();
30
30
  }
31
31
  }
32
32
  exports.StartCommandHandler = StartCommandHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"startCommandHandler.js","sourceRoot":"","sources":["../../../src/commands/startCommandHandler.ts"],"names":[],"mappings":";;;AAAA,+DAAoE;AACpE,uEAAmE;AACnE,6DAAyD;AACzD,gDAAoD;AACpD,iEAAiE;AACjE,+DAA+D;AAE/D,MAAa,YAAa,SAAQ,wBAAO;CACxC;AADD,oCACC;AAED,MAAa,mBAAoB,SAAQ,+BAA4B;IACnE,6DAA6D;IAC7D,KAAK,CAAC,OAAO,CAAC,OAAqB;QACjC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,uCAAkB,CAAE,CAAA;QACrD,0DAA0D;QAC1D,0DAA0D;QAE1D,iCAAiC;QACjC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,YAAY,iCAAmB,CAAC,EAAE,CAAC;YAClE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,6BAAa,CAAE,CAAA;YAC3C,IAAI,MAAM,CAAC,qBAAqB,EAAE,CAAC;gBACjC,MAAM,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,cAAe,CAAC,CAAA;gBAC/C,MAAM,CAAC,cAAc,GAAG,SAAS,CAAA;YACnC,CAAC;QACH,CAAC;QAED,sCAAsC;QACtC,MAAM,WAAW,CAAC,KAAK,EAAE,CAAA;QACzB,sCAAsC;IACxC,CAAC;CACF;AApBD,kDAoBC"}
1
+ {"version":3,"file":"startCommandHandler.js","sourceRoot":"","sources":["../../../src/commands/startCommandHandler.ts"],"names":[],"mappings":";;;AAAA,+DAAoE;AACpE,uEAAmE;AACnE,6DAAyD;AACzD,gDAAoD;AACpD,mEAA+D;AAC/D,mEAA6D;AAE7D,MAAa,YAAa,SAAQ,wBAAO;CACxC;AADD,oCACC;AAED,MAAa,mBAAoB,SAAQ,+BAA4B;IACnE,6DAA6D;IAC7D,KAAK,CAAC,OAAO,CAAC,OAAqB;QACjC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,uCAAkB,CAAE,CAAA;QACrD,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,mCAAgB,CAAE,CAAA;QACxD,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,mCAAgB,CAAE,CAAA;QAExD,iCAAiC;QACjC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,YAAY,iCAAmB,CAAC,EAAE,CAAC;YAClE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,6BAAa,CAAE,CAAA;YAC3C,IAAI,MAAM,CAAC,qBAAqB,EAAE,CAAC;gBACjC,MAAM,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,cAAe,CAAC,CAAA;gBAC/C,MAAM,CAAC,cAAc,GAAG,SAAS,CAAA;YACnC,CAAC;QACH,CAAC;QAED,MAAM,gBAAgB,CAAC,UAAU,EAAE,CAAA;QACnC,MAAM,WAAW,CAAC,KAAK,EAAE,CAAA;QACzB,MAAM,gBAAgB,CAAC,UAAU,EAAE,CAAA;IACrC,CAAC;CACF;AApBD,kDAoBC"}
@@ -3,14 +3,6 @@ export declare enum QueryFlowState {
3
3
  ERROR = 1,
4
4
  DONE = 100
5
5
  }
6
- export declare enum QueryFlowStatus {
7
- STARTED = 0,
8
- UPLOADING_FILE = 1,
9
- PROCESSING_FILE = 2,
10
- PREPARING_RESULTS = 3,
11
- DONE = 4,
12
- FAILED = 5
13
- }
14
6
  export interface QueryFileUrlDto {
15
7
  name: string;
16
8
  extension: string;
@@ -22,8 +14,10 @@ export interface QueryFlowResult {
22
14
  export interface QueryFlowDto {
23
15
  name: string;
24
16
  state: QueryFlowState;
25
- status: QueryFlowStatus;
17
+ totalRowsCount: number;
18
+ completedRowsCount: number;
26
19
  result: QueryFlowResult;
20
+ error: string;
27
21
  }
28
22
  export interface QueryFlowListResponse {
29
23
  flowIds: string[];
@@ -31,4 +25,9 @@ export interface QueryFlowListResponse {
31
25
  export interface QueryFlowResponse {
32
26
  flowId: string;
33
27
  }
28
+ export declare class SearchResource {
29
+ organizationId: string;
30
+ workspaceIds: string[];
31
+ constructor(organizationId: string, workspaceIds: string[]);
32
+ }
34
33
  //# sourceMappingURL=queryFlowResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlowResponse.d.ts","sourceRoot":"","sources":["../../../src/dto/queryFlowResponse.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,WAAW,IAAI;IACf,KAAK,IAAI;IACT,IAAI,MAAM;CACX;AAED,oBAAY,eAAe;IACzB,OAAO,IAAI;IACX,cAAc,IAAI;IAClB,eAAe,IAAI;IACnB,iBAAiB,IAAI;IACrB,IAAI,IAAI;IACR,MAAM,IAAI;CACX;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,EAAE,CAAA;CACzB;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,eAAe,CAAA;CACxB;AAGD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAGD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;CACf"}
1
+ {"version":3,"file":"queryFlowResponse.d.ts","sourceRoot":"","sources":["../../../src/dto/queryFlowResponse.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,WAAW,IAAI;IACf,KAAK,IAAI;IACT,IAAI,MAAM;CACX;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,EAAE,CAAA;CACzB;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,cAAc,CAAC;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;CACd;AAGD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAGD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,cAAc;IACzB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,EAAE,CAAA;gBAEV,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;CAI3D"}
@@ -1,19 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueryFlowStatus = exports.QueryFlowState = void 0;
3
+ exports.SearchResource = exports.QueryFlowState = void 0;
4
4
  var QueryFlowState;
5
5
  (function (QueryFlowState) {
6
6
  QueryFlowState[QueryFlowState["IN_PROGRESS"] = 0] = "IN_PROGRESS";
7
7
  QueryFlowState[QueryFlowState["ERROR"] = 1] = "ERROR";
8
8
  QueryFlowState[QueryFlowState["DONE"] = 100] = "DONE";
9
9
  })(QueryFlowState || (exports.QueryFlowState = QueryFlowState = {}));
10
- var QueryFlowStatus;
11
- (function (QueryFlowStatus) {
12
- QueryFlowStatus[QueryFlowStatus["STARTED"] = 0] = "STARTED";
13
- QueryFlowStatus[QueryFlowStatus["UPLOADING_FILE"] = 1] = "UPLOADING_FILE";
14
- QueryFlowStatus[QueryFlowStatus["PROCESSING_FILE"] = 2] = "PROCESSING_FILE";
15
- QueryFlowStatus[QueryFlowStatus["PREPARING_RESULTS"] = 3] = "PREPARING_RESULTS";
16
- QueryFlowStatus[QueryFlowStatus["DONE"] = 4] = "DONE";
17
- QueryFlowStatus[QueryFlowStatus["FAILED"] = 5] = "FAILED";
18
- })(QueryFlowStatus || (exports.QueryFlowStatus = QueryFlowStatus = {}));
10
+ class SearchResource {
11
+ constructor(organizationId, workspaceIds) {
12
+ this.organizationId = organizationId;
13
+ this.workspaceIds = workspaceIds;
14
+ }
15
+ }
16
+ exports.SearchResource = SearchResource;
19
17
  //# sourceMappingURL=queryFlowResponse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlowResponse.js","sourceRoot":"","sources":["../../../src/dto/queryFlowResponse.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iEAAe,CAAA;IACf,qDAAS,CAAA;IACT,qDAAU,CAAA;AACZ,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,2DAAW,CAAA;IACX,yEAAkB,CAAA;IAClB,2EAAmB,CAAA;IACnB,+EAAqB,CAAA;IACrB,qDAAQ,CAAA;IACR,yDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B"}
1
+ {"version":3,"file":"queryFlowResponse.js","sourceRoot":"","sources":["../../../src/dto/queryFlowResponse.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iEAAe,CAAA;IACf,qDAAS,CAAA;IACT,qDAAU,CAAA;AACZ,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAgCD,MAAa,cAAc;IAIzB,YAAY,cAAsB,EAAE,YAAsB;QACxD,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;CACF;AARD,wCAQC"}
@@ -1,6 +1,6 @@
1
1
  import { EventDispatcher } from "../../events";
2
2
  import { FlowId } from "./queryFlows";
3
- import { QueryFileUrlDto, QueryFlowState, QueryFlowStatus } from "../../dto/queryFlowResponse";
3
+ import { QueryFileUrlDto, QueryFlowState } from "../../dto/queryFlowResponse";
4
4
  export declare enum QueryFlowEvent {
5
5
  UPDATED = "updated"
6
6
  }
@@ -8,7 +8,8 @@ export declare abstract class QueryFlow extends EventDispatcher<QueryFlowEvent,
8
8
  abstract get id(): FlowId;
9
9
  abstract get name(): string;
10
10
  abstract get state(): QueryFlowState;
11
- abstract get status(): QueryFlowStatus;
11
+ abstract get error(): string;
12
+ abstract get progress(): number;
12
13
  abstract get urls(): QueryFileUrlDto[] | undefined;
13
14
  abstract fetch(): any;
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlow.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EAChB,MAAM,6BAA6B,CAAA;AAEpC,oBAAY,cAAc;IACxB,OAAO,YAAY;CACpB;AAED,8BAAsB,SAAU,SAAQ,eAAe,CACrD,cAAc,EACd,SAAS,CACV;IAEC,QAAQ,KAAK,EAAE,IAAI,MAAM,CAAA;IAEzB,QAAQ,KAAK,IAAI,IAAI,MAAM,CAAA;IAE3B,QAAQ,KAAK,KAAK,IAAI,cAAc,CAAA;IAEpC,QAAQ,KAAK,MAAM,IAAI,eAAe,CAAA;IAEtC,QAAQ,KAAK,IAAI,IAAI,eAAe,EAAE,GAAG,SAAS,CAAA;IAElD,QAAQ,CAAC,KAAK,IAAI,GAAG;CAEtB"}
1
+ {"version":3,"file":"queryFlow.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EACL,eAAe,EACf,cAAc,EACf,MAAM,6BAA6B,CAAA;AAEpC,oBAAY,cAAc;IACxB,OAAO,YAAY;CACpB;AAED,8BAAsB,SAAU,SAAQ,eAAe,CACrD,cAAc,EACd,SAAS,CACV;IAEC,QAAQ,KAAK,EAAE,IAAI,MAAM,CAAA;IAEzB,QAAQ,KAAK,IAAI,IAAI,MAAM,CAAA;IAE3B,QAAQ,KAAK,KAAK,IAAI,cAAc,CAAA;IAEpC,QAAQ,KAAK,KAAK,IAAI,MAAM,CAAA;IAE5B,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAA;IAE/B,QAAQ,KAAK,IAAI,IAAI,eAAe,EAAE,GAAG,SAAS,CAAA;IAElD,QAAQ,CAAC,KAAK,IAAI,GAAG;CAEtB"}
@@ -1,5 +1,5 @@
1
1
  import { QueryFlow } from "./queryFlow";
2
- import { QueryFileUrlDto, QueryFlowState, QueryFlowStatus } from "../../dto/queryFlowResponse";
2
+ import { QueryFileUrlDto, QueryFlowState } from "../../dto/queryFlowResponse";
3
3
  import { FlowId } from "./queryFlows";
4
4
  import { Context } from "../../context";
5
5
  export declare class QueryFlowImpl extends QueryFlow {
@@ -11,8 +11,9 @@ export declare class QueryFlowImpl extends QueryFlow {
11
11
  fetch(): Promise<void>;
12
12
  get id(): FlowId;
13
13
  get name(): string;
14
+ get error(): string;
15
+ get progress(): number;
14
16
  get urls(): QueryFileUrlDto[] | undefined;
15
17
  get state(): QueryFlowState;
16
- get status(): QueryFlowStatus;
17
18
  }
18
19
  //# sourceMappingURL=queryFlow.impl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlow.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAA;AACvD,OAAO,EACL,eAAe,EAEf,cAAc,EACd,eAAe,EAChB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvC,qBAAa,aAAc,SAAQ,SAAS;IAI9B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,QAAQ,CAAC,CAAc;IAC/B,OAAO,CAAC,GAAG,CAAC,CAAQ;gBAES,OAAO,EAAE,OAAO;IAIvC,QAAQ,CAAC,EAAE,EAAE,MAAM;IAKnB,KAAK;IA0BX,IAAI,EAAE,IAAI,MAAM,CAMf;IAED,IAAI,IAAI,IAAI,MAAM,CAMjB;IAED,IAAI,IAAI,IAAI,eAAe,EAAE,GAAG,SAAS,CAMxC;IAED,IAAI,KAAK,IAAI,cAAc,CAM1B;IAED,IAAI,MAAM,IAAI,eAAe,CAM5B;CAEF"}
1
+ {"version":3,"file":"queryFlow.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAA;AACvD,OAAO,EACL,eAAe,EAEf,cAAc,EACf,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvC,qBAAa,aAAc,SAAQ,SAAS;IAI9B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,QAAQ,CAAC,CAAc;IAC/B,OAAO,CAAC,GAAG,CAAC,CAAQ;gBAES,OAAO,EAAE,OAAO;IAIvC,QAAQ,CAAC,EAAE,EAAE,MAAM;IAKnB,KAAK;IA0BX,IAAI,EAAE,IAAI,MAAM,CAMf;IAED,IAAI,IAAI,IAAI,MAAM,CAMjB;IAED,IAAI,KAAK,IAAI,MAAM,CAMlB;IAED,IAAI,QAAQ,IAAI,MAAM,CAMrB;IAED,IAAI,IAAI,IAAI,eAAe,EAAE,GAAG,SAAS,CAMxC;IAED,IAAI,KAAK,IAAI,cAAc,CAM1B;CAGF"}
@@ -48,25 +48,33 @@ class QueryFlowImpl extends queryFlow_1.QueryFlow {
48
48
  throw new Error("Query flow is not loaded");
49
49
  }
50
50
  }
51
- get urls() {
52
- if (this._content && this._content.result.files) {
53
- return this._content.result.files;
51
+ get error() {
52
+ if (this._content) {
53
+ return this._content.error;
54
54
  }
55
55
  else {
56
- throw new Error("Query fLow is not loaded");
56
+ throw new Error("Query flow is not loaded");
57
57
  }
58
58
  }
59
- get state() {
59
+ get progress() {
60
60
  if (this._content) {
61
- return this._content.state;
61
+ return this._content.completedRowsCount / this._content.totalRowsCount;
62
+ }
63
+ else {
64
+ throw new Error("Query flow is not loaded");
65
+ }
66
+ }
67
+ get urls() {
68
+ if (this._content && this._content.result.files) {
69
+ return this._content.result.files;
62
70
  }
63
71
  else {
64
72
  throw new Error("Query fLow is not loaded");
65
73
  }
66
74
  }
67
- get status() {
75
+ get state() {
68
76
  if (this._content) {
69
- return this._content.status;
77
+ return this._content.state;
70
78
  }
71
79
  else {
72
80
  throw new Error("Query fLow is not loaded");
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlow.impl.js","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.impl.ts"],"names":[],"mappings":";;;AAAA,2CAAuD;AASvD,0DAAsD;AACtD,gEAA4D;AAE5D,MAAa,aAAc,SAAQ,qBAAS;IAI1C,YAA6B,OAAgB;QAC3C,KAAK,EAAE,CAAA;QADoB,YAAO,GAAP,OAAO,CAAS;IAE7C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;QACb,MAAM,IAAI,CAAC,KAAK,EAAE,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,KAAK;;QACT,MAAM,QAAQ,GAAG,MAAM,CAAA,MAAA,IAAI,CAAC,OAAO;aAChC,OAAO,CAAC,uBAAU,CAAC,0CAClB,cAAc,CAAC,mBAAmB,EACnC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAC7B,OAAO,EAAE,CAAA,CAAA;QAEZ,wBAAwB;QACxB,IAAI,6BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,MAAM,6BAAa,CAAC,UAAU,C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AAI,IAAI;QACN,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAChD,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAA;QACnC,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QAC7C,CAAC;IACH,CAAC;IAED,IAAI,KAAK;QACP,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAA;QAC5B,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QAC7C,CAAC;IACH,CAAC;CAGF;AAxFD,sCAwFC"}
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlow.js","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAQ9C,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qCAAmB,CAAA;AACrB,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAED,MAAsB,SAAU,SAAQ,wBAGvC;CAcA;AAjBD,8BAiBC"}
1
+ {"version":3,"file":"queryFlow.js","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAO9C,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qCAAmB,CAAA;AACrB,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAED,MAAsB,SAAU,SAAQ,wBAGvC;CAgBA;AAnBD,8BAmBC"}
@@ -1,7 +1,7 @@
1
1
  import { EventDispatcher } from "../../events";
2
2
  import { QueryFlow } from "./queryFlow";
3
- import { WorkspaceId } from "../workspaces/workspaces";
4
3
  import { UploadFile } from "../files/files";
4
+ import { SearchResource } from "../../dto/queryFlowResponse";
5
5
  /**
6
6
  * Query flow id.
7
7
  */
@@ -15,7 +15,7 @@ export declare enum QueryFlowsEvent {
15
15
  }
16
16
  export declare abstract class QueryFlows extends EventDispatcher<QueryFlowsEvent, QueryFlow> {
17
17
  abstract getQueryFlows(): Promise<QueryFlow[]>;
18
- abstract create(name: string, workspaceIds: WorkspaceId[], table: UploadFile): Promise<FlowId>;
18
+ abstract create(name: string, resources: SearchResource[], table: UploadFile): Promise<FlowId>;
19
19
  abstract delete(id: FlowId): Promise<void>;
20
20
  }
21
21
  //# sourceMappingURL=queryFlows.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlows.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAGzC;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAA;AAE3B;;GAEG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED,8BAAsB,UAAW,SAAQ,eAAe,CACtD,eAAe,EACf,SAAS,CACV;IAEC,QAAQ,CAAC,aAAa,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAE9C,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,UAAU,GAAI,OAAO,CAAC,MAAM,CAAC;IAE/F,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAE3C"}
1
+ {"version":3,"file":"queryFlows.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAG5D;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAA;AAE3B;;GAEG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED,8BAAsB,UAAW,SAAQ,eAAe,CACtD,eAAe,EACf,SAAS,CACV;IAEC,QAAQ,CAAC,aAAa,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAE9C,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,UAAU,GAAI,OAAO,CAAC,MAAM,CAAC;IAE/F,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAE3C"}
@@ -2,7 +2,7 @@ import { Context } from "../../context";
2
2
  import { FlowId, QueryFlows } from "./queryFlows";
3
3
  import { QueryFlow } from "./queryFlow";
4
4
  import { OrganizationImpl } from "../organizations/organization.impl";
5
- import { WorkspaceId } from "../workspaces/workspaces";
5
+ import { SearchResource } from "../../dto/queryFlowResponse";
6
6
  import { UploadFile } from "../files/files";
7
7
  export declare class QueryFlowsImpl extends QueryFlows {
8
8
  readonly organization: OrganizationImpl;
@@ -13,7 +13,7 @@ export declare class QueryFlowsImpl extends QueryFlows {
13
13
  constructor(organization: OrganizationImpl, context: Context);
14
14
  getQueryFlows(): Promise<QueryFlow[]>;
15
15
  internalFetchQueries(): Promise<void>;
16
- create(name: string, workspaceIds: WorkspaceId[], table: UploadFile): Promise<FlowId>;
16
+ create(name: string, resources: SearchResource[], table: UploadFile): Promise<FlowId>;
17
17
  delete(id: FlowId): Promise<void>;
18
18
  }
19
19
  //# sourceMappingURL=queryFlows.impl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlows.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlows.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AACrC,OAAO,EAAC,MAAM,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AAChE,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAA;AAGnE,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAA;AAOpD,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAEzC,qBAAa,cAAe,SAAQ,UAAU;aAS1B,YAAY,EAAE,gBAAgB;aAC9B,OAAO,EAAE,OAAO;IARlC,OAAO,CAAC,WAAW,CAAkB;IAErC,OAAO,CAAC,WAAW,CAAkB;IAErC,OAAO,CAAC,aAAa,CAAC,CAAgB;gBAGpB,YAAY,EAAE,gBAAgB,EAC9B,OAAO,EAAE,OAAO;IAI5B,aAAa,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IA4CrC,oBAAoB;IAcpB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAiDrF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA4CxC"}
1
+ {"version":3,"file":"queryFlows.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlows.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AACrC,OAAO,EAAC,MAAM,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AAChE,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAA;AAGnE,OAAO,EAIL,cAAc,EACf,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAEzC,qBAAa,cAAe,SAAQ,UAAU;aAS1B,YAAY,EAAE,gBAAgB;aAC9B,OAAO,EAAE,OAAO;IARlC,OAAO,CAAC,WAAW,CAAkB;IAErC,OAAO,CAAC,WAAW,CAAkB;IAErC,OAAO,CAAC,aAAa,CAAC,CAAgB;gBAGpB,YAAY,EAAE,gBAAgB,EAC9B,OAAO,EAAE,OAAO;IAI5B,aAAa,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IA4CrC,oBAAoB;IAcpB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IA+CrF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA4CxC"}
@@ -58,13 +58,13 @@ class QueryFlowsImpl extends queryFlows_1.QueryFlows {
58
58
  clearTimeout(this._fetchTimeout);
59
59
  }
60
60
  }
61
- async create(name, workspaceIds, table) {
61
+ async create(name, resources, table) {
62
62
  var _a;
63
63
  if (name === undefined || name === null || name.trim() === "") {
64
64
  throw new Error("Name is required, must be not empty");
65
65
  }
66
- if (workspaceIds === undefined || workspaceIds === null) {
67
- throw new Error("WorkspaceIds is required, must be not empty");
66
+ if (resources === undefined || resources === null) {
67
+ throw new Error("Resources is required, must be not empty");
68
68
  }
69
69
  if (table === undefined || table === null) {
70
70
  throw new Error("Create query flow, table is undefined or null");
@@ -74,9 +74,7 @@ class QueryFlowsImpl extends queryFlows_1.QueryFlows {
74
74
  form.append("organizationId", this.organization.id);
75
75
  form.append("name", name);
76
76
  form.append("tableFile", table, table.name);
77
- workspaceIds.forEach(item => {
78
- form.append("workspaceIds", item);
79
- });
77
+ form.append("resources", JSON.stringify(resources));
80
78
  // send request to the server
81
79
  const response = await ((_a = this.context
82
80
  .resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/QueryFlows").sendPostFormData(form));
@@ -1 +1 @@
1
- {"version":3,"file":"queryFlows.impl.js","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlows.impl.ts"],"names":[],"mappings":";;;AACA,6CAAgE;AAGhE,0DAAoD;AACpD,gEAA0D;AAE1D,mEAIoC;AACpC,qDAA8C;AAG9C,MAAa,cAAe,SAAQ,uBAAU;IAQ5C,YACkB,YAA8B,EAC9B,OAAgB;QAChC,KAAK,EAAE,CAAA;QAFS,iBAAY,GAAZ,YAAY,CAAkB;QAC9B,YAAO,GAAP,OAAO,CAAS;QAR1B,gBAAW,GAAgB,EAAE,CAAA;QAE7B,gBAAW,GAAgB,EAAE,CAAA;IAQrC,CAAC;IAED,KAAK,CAAC,aAAa;;QACjB,MAAM,QAAQ,GAAG,MAAM,CAAA,MAAA,IAAI,CAAC,OAAO;aAChC,OAAO,CAAC,uBAAU,CAAC,0CAClB,cAAc,CAAC,wBAAwB,EACxC,WAAW,CAAC,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,EAAE,EAClD,OAAO,EAAE,CAAA,CAAA;QAEZ,wBAAwB;QACxB,IAAI,6BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,MAAM,6BAAa,CAAC,UAAU,CAAC,uCAAuC,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;QACzG,CAAC;QAED,yCAAyC;QACzC,MAAM,KAAK,GAAI,CAAC,MAAM,QAAS,CAAC,IAAI,EAAE,CAA2B;aAC9D,OAAO,CAAA;QAEV,4CAA4C;QAC5C,IAAI,CAAC,WAAW,GAAG,EAAE,CAAA;QACrB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAA;QACrB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAEhC,wCAAwC;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CAAC,CAAA;QAC3C,CAAC;QAED,iBAAiB;QACjB,IAAI,CAAC,QAAQ,CAAC;YACZ,IAAI,EAAE,4BAAe,CAAC,OAAO;YAC7B,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CAEF;AAnKD,wCAmKC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuralinnovations/dataisland-sdk",
3
- "version": "0.6.35",
3
+ "version": "0.6.37",
4
4
  "description": "SDK for DataIsland project",
5
5
  "licenses": [
6
6
  {
@@ -2,8 +2,8 @@ import { CommandHandler, Command } from "../services/commandService"
2
2
  import { UserProfileService } from "../services/userProfileService"
3
3
  import { CookieService } from "../services/cookieService"
4
4
  import { AnonymousCredential } from "../credentials"
5
- //import { AcquiringService } from "../services/acquiringService"
6
- //import {LibrariesService} from "../services/librariesService"
5
+ import { AcquiringService } from "../services/acquiringService"
6
+ import {LibrariesService} from "../services/librariesService"
7
7
 
8
8
  export class StartCommand extends Command {
9
9
  }
@@ -12,8 +12,8 @@ export class StartCommandHandler extends CommandHandler<StartCommand> {
12
12
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
13
  async execute(message: StartCommand): Promise<void> {
14
14
  const userService = this.resolve(UserProfileService)!
15
- //const acquiringService = this.resolve(AcquiringService)!
16
- //const librariesService = this.resolve(LibrariesService)!
15
+ const acquiringService = this.resolve(AcquiringService)!
16
+ const librariesService = this.resolve(LibrariesService)!
17
17
 
18
18
  // Merge anonymous user if needed
19
19
  if (!(this.context.app.credential instanceof AnonymousCredential)) {
@@ -24,8 +24,8 @@ export class StartCommandHandler extends CommandHandler<StartCommand> {
24
24
  }
25
25
  }
26
26
 
27
- // await librariesService.initialize()
27
+ await librariesService.initialize()
28
28
  await userService.fetch()
29
- // await acquiringService.initialize()
29
+ await acquiringService.initialize()
30
30
  }
31
31
  }
@@ -4,15 +4,6 @@ export enum QueryFlowState {
4
4
  DONE = 100
5
5
  }
6
6
 
7
- export enum QueryFlowStatus {
8
- STARTED = 0,
9
- UPLOADING_FILE = 1,
10
- PROCESSING_FILE = 2,
11
- PREPARING_RESULTS = 3,
12
- DONE = 4,
13
- FAILED = 5
14
- }
15
-
16
7
  export interface QueryFileUrlDto {
17
8
  name: string
18
9
  extension: string
@@ -27,8 +18,10 @@ export interface QueryFlowResult {
27
18
  export interface QueryFlowDto {
28
19
  name: string
29
20
  state: QueryFlowState,
30
- status: QueryFlowStatus,
21
+ totalRowsCount: number
22
+ completedRowsCount: number
31
23
  result: QueryFlowResult
24
+ error: string
32
25
  }
33
26
 
34
27
  // GET org query flows
@@ -40,3 +33,13 @@ export interface QueryFlowListResponse {
40
33
  export interface QueryFlowResponse {
41
34
  flowId: string
42
35
  }
36
+
37
+ export class SearchResource {
38
+ organizationId: string
39
+ workspaceIds: string[]
40
+
41
+ constructor(organizationId: string, workspaceIds: string[]){
42
+ this.organizationId = organizationId
43
+ this.workspaceIds = workspaceIds
44
+ }
45
+ }
@@ -2,8 +2,7 @@ import { QueryFlow, QueryFlowEvent } from "./queryFlow"
2
2
  import {
3
3
  QueryFileUrlDto,
4
4
  QueryFlowDto,
5
- QueryFlowState,
6
- QueryFlowStatus
5
+ QueryFlowState
7
6
  } from "../../dto/queryFlowResponse"
8
7
  import { FlowId } from "./queryFlows"
9
8
  import { Context } from "../../context"
@@ -65,6 +64,22 @@ export class QueryFlowImpl extends QueryFlow {
65
64
  }
66
65
  }
67
66
 
67
+ get error(): string {
68
+ if (this._content) {
69
+ return this._content.error
70
+ } else {
71
+ throw new Error("Query flow is not loaded")
72
+ }
73
+ }
74
+
75
+ get progress(): number {
76
+ if (this._content) {
77
+ return this._content.completedRowsCount / this._content.totalRowsCount
78
+ } else {
79
+ throw new Error("Query flow is not loaded")
80
+ }
81
+ }
82
+
68
83
  get urls(): QueryFileUrlDto[] | undefined {
69
84
  if (this._content && this._content.result.files) {
70
85
  return this._content.result.files
@@ -81,12 +96,5 @@ export class QueryFlowImpl extends QueryFlow {
81
96
  }
82
97
  }
83
98
 
84
- get status(): QueryFlowStatus {
85
- if (this._content) {
86
- return this._content.status
87
- } else {
88
- throw new Error("Query fLow is not loaded")
89
- }
90
- }
91
99
 
92
100
  }
@@ -2,8 +2,7 @@ import { EventDispatcher } from "../../events"
2
2
  import { FlowId } from "./queryFlows"
3
3
  import {
4
4
  QueryFileUrlDto,
5
- QueryFlowState,
6
- QueryFlowStatus
5
+ QueryFlowState
7
6
  } from "../../dto/queryFlowResponse"
8
7
 
9
8
  export enum QueryFlowEvent {
@@ -21,7 +20,9 @@ export abstract class QueryFlow extends EventDispatcher<
21
20
 
22
21
  abstract get state(): QueryFlowState
23
22
 
24
- abstract get status(): QueryFlowStatus
23
+ abstract get error(): string
24
+
25
+ abstract get progress(): number
25
26
 
26
27
  abstract get urls(): QueryFileUrlDto[] | undefined
27
28
 
@@ -4,11 +4,11 @@ import {QueryFlow} from "./queryFlow"
4
4
  import {OrganizationImpl} from "../organizations/organization.impl"
5
5
  import {RpcService} from "../../services/rpcService"
6
6
  import {ResponseUtils} from "../../services/responseUtils"
7
- import {WorkspaceId} from "../workspaces/workspaces"
8
7
  import {
9
8
  QueryFlowListResponse,
10
9
  QueryFlowResponse,
11
- QueryFlowState
10
+ QueryFlowState,
11
+ SearchResource
12
12
  } from "../../dto/queryFlowResponse"
13
13
  import {QueryFlowImpl} from "./queryFlow.impl"
14
14
  import {UploadFile} from "../files/files"
@@ -85,12 +85,12 @@ export class QueryFlowsImpl extends QueryFlows {
85
85
  }
86
86
  }
87
87
 
88
- async create(name: string, workspaceIds: WorkspaceId[], table: UploadFile): Promise<FlowId> {
88
+ async create(name: string, resources: SearchResource[], table: UploadFile): Promise<FlowId> {
89
89
  if (name === undefined || name === null || name.trim() === "") {
90
90
  throw new Error("Name is required, must be not empty")
91
91
  }
92
- if (workspaceIds === undefined || workspaceIds === null) {
93
- throw new Error("WorkspaceIds is required, must be not empty")
92
+ if (resources === undefined || resources === null) {
93
+ throw new Error("Resources is required, must be not empty")
94
94
  }
95
95
  if (table === undefined || table === null) {
96
96
  throw new Error("Create query flow, table is undefined or null")
@@ -101,9 +101,7 @@ export class QueryFlowsImpl extends QueryFlows {
101
101
  form.append("organizationId", this.organization.id)
102
102
  form.append("name", name)
103
103
  form.append("tableFile", table, table.name)
104
- workspaceIds.forEach(item => {
105
- form.append("workspaceIds", item)
106
- })
104
+ form.append("resources", JSON.stringify(resources))
107
105
 
108
106
  // send request to the server
109
107
  const response = await this.context
@@ -1,7 +1,7 @@
1
1
  import {EventDispatcher} from "../../events"
2
2
  import {QueryFlow} from "./queryFlow"
3
- import {WorkspaceId} from "../workspaces/workspaces"
4
3
  import {UploadFile} from "../files/files"
4
+ import { SearchResource } from "../../dto/queryFlowResponse"
5
5
 
6
6
 
7
7
  /**
@@ -24,7 +24,7 @@ export abstract class QueryFlows extends EventDispatcher<
24
24
 
25
25
  abstract getQueryFlows(): Promise<QueryFlow[]>
26
26
 
27
- abstract create(name: string, workspaceIds: WorkspaceId[], table: UploadFile ): Promise<FlowId>
27
+ abstract create(name: string, resources: SearchResource[], table: UploadFile ): Promise<FlowId>
28
28
 
29
29
  abstract delete(id: FlowId): Promise<void>
30
30