@neuralinnovations/dataisland-sdk 0.0.1-dev73 → 0.0.1-dev74
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/package.json +1 -1
- package/dist/src/dto/queryFlowResponse.d.ts +19 -0
- package/dist/src/dto/queryFlowResponse.d.ts.map +1 -0
- package/dist/src/dto/queryFlowResponse.js +10 -0
- package/dist/src/dto/queryFlowResponse.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/storages/organizations/organization.d.ts +5 -0
- package/dist/src/storages/organizations/organization.d.ts.map +1 -1
- package/dist/src/storages/organizations/organization.impl.d.ts +3 -0
- package/dist/src/storages/organizations/organization.impl.d.ts.map +1 -1
- package/dist/src/storages/organizations/organization.impl.js +7 -1
- package/dist/src/storages/organizations/organization.impl.js.map +1 -1
- package/dist/src/storages/organizations/organization.js.map +1 -1
- package/dist/src/storages/queryFlows/queryFlow.d.ts +12 -0
- package/dist/src/storages/queryFlows/queryFlow.d.ts.map +1 -0
- package/dist/src/storages/queryFlows/queryFlow.impl.d.ts +16 -0
- package/dist/src/storages/queryFlows/queryFlow.impl.d.ts.map +1 -0
- package/dist/src/storages/queryFlows/queryFlow.impl.js +59 -0
- package/dist/src/storages/queryFlows/queryFlow.impl.js.map +1 -0
- package/dist/src/storages/queryFlows/queryFlow.js +12 -0
- package/dist/src/storages/queryFlows/queryFlow.js.map +1 -0
- package/dist/src/storages/queryFlows/queryFlows.d.ts +22 -0
- package/dist/src/storages/queryFlows/queryFlows.d.ts.map +1 -0
- package/dist/src/storages/queryFlows/queryFlows.impl.d.ts +18 -0
- package/dist/src/storages/queryFlows/queryFlows.impl.d.ts.map +1 -0
- package/dist/src/storages/queryFlows/queryFlows.impl.js +108 -0
- package/dist/src/storages/queryFlows/queryFlows.impl.js.map +1 -0
- package/dist/src/storages/queryFlows/queryFlows.js +16 -0
- package/dist/src/storages/queryFlows/queryFlows.js.map +1 -0
- package/package.json +1 -1
- package/src/dto/queryFlowResponse.ts +27 -0
- package/src/index.ts +3 -0
- package/src/storages/organizations/organization.impl.ts +10 -1
- package/src/storages/organizations/organization.ts +6 -0
- package/src/storages/queryFlows/queryFlow.impl.ts +74 -0
- package/src/storages/queryFlows/queryFlow.ts +20 -0
- package/src/storages/queryFlows/queryFlows.impl.ts +151 -0
- package/src/storages/queryFlows/queryFlows.ts +32 -0
package/dist/package.json
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
export declare enum QueryFlowStatus {
|
2
|
+
IN_PROGRESS = 0,
|
3
|
+
ERROR = 1,
|
4
|
+
DONE = 100
|
5
|
+
}
|
6
|
+
export interface QueryFlowResult {
|
7
|
+
fileUrl: string;
|
8
|
+
}
|
9
|
+
export interface QueryFlowDto {
|
10
|
+
state: QueryFlowStatus;
|
11
|
+
result: QueryFlowResult;
|
12
|
+
}
|
13
|
+
export interface QueryFlowListResponse {
|
14
|
+
flowIds: string[];
|
15
|
+
}
|
16
|
+
export interface QueryFlowResponse {
|
17
|
+
flowId: string;
|
18
|
+
}
|
19
|
+
//# sourceMappingURL=queryFlowResponse.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlowResponse.d.ts","sourceRoot":"","sources":["../../../src/dto/queryFlowResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,eAAe;IACzB,WAAW,IAAI;IACf,KAAK,IAAI;IACT,IAAI,MAAM;CACX;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;CAChB;AAGD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,eAAe,CAAC;IACvB,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"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.QueryFlowStatus = void 0;
|
4
|
+
var QueryFlowStatus;
|
5
|
+
(function (QueryFlowStatus) {
|
6
|
+
QueryFlowStatus[QueryFlowStatus["IN_PROGRESS"] = 0] = "IN_PROGRESS";
|
7
|
+
QueryFlowStatus[QueryFlowStatus["ERROR"] = 1] = "ERROR";
|
8
|
+
QueryFlowStatus[QueryFlowStatus["DONE"] = 100] = "DONE";
|
9
|
+
})(QueryFlowStatus || (exports.QueryFlowStatus = QueryFlowStatus = {}));
|
10
|
+
//# sourceMappingURL=queryFlowResponse.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlowResponse.js","sourceRoot":"","sources":["../../../src/dto/queryFlowResponse.ts"],"names":[],"mappings":";;;AAEA,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,mEAAe,CAAA;IACf,uDAAS,CAAA;IACT,uDAAU,CAAA;AACZ,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B"}
|
package/dist/src/index.d.ts
CHANGED
@@ -16,6 +16,7 @@ export * from "./dto/userInfoResponse";
|
|
16
16
|
export * from "./dto/workspacesResponse";
|
17
17
|
export * from "./dto/invitesResponse";
|
18
18
|
export * from "./dto/apiKeyResponse";
|
19
|
+
export * from "./dto/queryFlowResponse";
|
19
20
|
export * from "./events";
|
20
21
|
export * from "./middleware";
|
21
22
|
export * from "./storages/chats/answer";
|
@@ -30,6 +31,8 @@ export * from "./storages/organizations/organizations";
|
|
30
31
|
export * from "./storages/user/userProfile";
|
31
32
|
export * from "./storages/workspaces/workspace";
|
32
33
|
export * from "./storages/workspaces/workspaces";
|
34
|
+
export * from "./storages/queryFlows/queryFlow";
|
35
|
+
export * from "./storages/queryFlows/queryFlows";
|
33
36
|
export { OrganizationId, Organizations, OrganizationsEvent } from "./storages/organizations/organizations";
|
34
37
|
export { WorkspaceId, Workspaces, WorkspacesEvent } from "./storages/workspaces/workspaces";
|
35
38
|
export { FileId, File } from "./storages/files/file";
|
package/dist/src/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,uCAAuC,CAAA;AACrD,cAAc,wCAAwC,CAAA;AACtD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAEhD,OAAO,EACL,cAAc,EAAE,aAAa,EAAE,kBAAkB,EAClD,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EACL,WAAW,EAAE,UAAU,EAAE,eAAe,EACzC,M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,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC/E,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,YAAY,EACb,MAAM,sBAAsB,CAAA;AAO7B;;GAEG;AACH,eAAO,MAAM,WAAW,QAAU,CAAA;AAElC;;GAEG;AACH,eAAO,MAAM,YAAY,cAAc,CAAA;AAEvC;;GAEG;AACH,eAAO,MAAM,YAAY,kCAAkC,CAAA;AAE3D;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,aAAa,EAAE,CAErD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,aAAa,CACjC,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,GAC7C,OAAO,CAAC,aAAa,CAAC,CAuBxB"}
|
package/dist/src/index.js
CHANGED
@@ -20,6 +20,7 @@ tslib_1.__exportStar(require("./dto/userInfoResponse"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./dto/workspacesResponse"), exports);
|
21
21
|
tslib_1.__exportStar(require("./dto/invitesResponse"), exports);
|
22
22
|
tslib_1.__exportStar(require("./dto/apiKeyResponse"), exports);
|
23
|
+
tslib_1.__exportStar(require("./dto/queryFlowResponse"), exports);
|
23
24
|
tslib_1.__exportStar(require("./events"), exports);
|
24
25
|
tslib_1.__exportStar(require("./middleware"), exports);
|
25
26
|
tslib_1.__exportStar(require("./storages/chats/answer"), exports);
|
@@ -34,6 +35,8 @@ tslib_1.__exportStar(require("./storages/organizations/organizations"), exports)
|
|
34
35
|
tslib_1.__exportStar(require("./storages/user/userProfile"), exports);
|
35
36
|
tslib_1.__exportStar(require("./storages/workspaces/workspace"), exports);
|
36
37
|
tslib_1.__exportStar(require("./storages/workspaces/workspaces"), exports);
|
38
|
+
tslib_1.__exportStar(require("./storages/queryFlows/queryFlow"), exports);
|
39
|
+
tslib_1.__exportStar(require("./storages/queryFlows/queryFlows"), exports);
|
37
40
|
var organizations_1 = require("./storages/organizations/organizations");
|
38
41
|
Object.defineProperty(exports, "Organizations", { enumerable: true, get: function () { return organizations_1.Organizations; } });
|
39
42
|
Object.defineProperty(exports, "OrganizationsEvent", { enumerable: true, get: function () { return organizations_1.OrganizationsEvent; } });
|
package/dist/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,kDAAyC;AACzC,8DAAsD;AAItD,uDAA4B;AAC5B,oDAAyB;AACzB,wDAA6B;AAC7B,0DAA+B;AAC/B,uDAA4B;AAC5B,oEAAyC;AACzC,6DAAkC;AAClC,kEAAuC;AACvC,mEAAwC;AACxC,6DAAkC;AAClC,+DAAoC;AACpC,mEAAwC;AACxC,iEAAsC;AACtC,mEAAwC;AACxC,gEAAqC;AACrC,+DAAoC;AACpC,mDAAwB;AACxB,uDAA4B;AAC5B,kEAAuC;AACvC,gEAAqC;AACrC,iEAAsC;AACtC,gEAAqC;AACrC,iEAAsC;AACtC,qEAA0C;AAC1C,mEAAwC;AACxC,gFAAqD;AACrD,iFAAsD;AACtD,sEAA2C;AAC3C,0EAA+C;AAC/C,2EAAgD;AAEhD,wEAE+C;AAD7B,8GAAA,aAAa,OAAA;AAAE,mHAAA,kBAAkB,OAAA;AAEnD,+DAEyC;AAD1B,wGAAA,UAAU,OAAA;AAAE,6GAAA,eAAe,OAAA;AAE1C,8CAAoD;AAAnC,4FAAA,IAAI,OAAA;AACrB,gDAAsE;AAAjD,8FAAA,KAAK,OAAA;AAAE,mGAAA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AC;aACD,KAAK,CAAC,MAAM,CAAC,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,UAAU,MAAM,EAAE,CAAC,CAAA;YACjC,aAAa,CAAC,MAAM,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,oBAAY,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;QACJ,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACrC,CAAC;SAAM,CAAC;QACN,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,cAAc,IAAI,mDAAmD,CACtE,CAAA;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,UAAU,CAAA;AACzB,CAAC;AA1BD,sCA0BC"}
|
@@ -12,6 +12,7 @@ import { QuizData } from "../../dto/quizResponse";
|
|
12
12
|
import { InviteResponse } from "../../dto/invitesResponse";
|
13
13
|
import { OrganizationApiKey } from "../../dto/apiKeyResponse";
|
14
14
|
import { UploadFile } from "../files/files";
|
15
|
+
import { QueryFlows } from "../queryFlows/queryFlows";
|
15
16
|
/**
|
16
17
|
* Organization event.
|
17
18
|
*/
|
@@ -50,6 +51,10 @@ export declare abstract class Organization extends EventDispatcher<OrganizationE
|
|
50
51
|
* Groups.
|
51
52
|
*/
|
52
53
|
abstract get accessGroups(): Groups;
|
54
|
+
/**
|
55
|
+
* Query flows
|
56
|
+
*/
|
57
|
+
abstract get queryFlows(): QueryFlows;
|
53
58
|
/**
|
54
59
|
* Get organization members
|
55
60
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../../src/storages/organizations/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EACL,iBAAiB,EACjB,OAAO,EACP,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAA;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../../src/storages/organizations/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EACL,iBAAiB,EACjB,OAAO,EACP,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAA;AACpC,OAAO,EAAC,QAAQ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Q,CAAC,UAAU,CAAC,UAAU,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAC/I"}
|
@@ -13,6 +13,7 @@ import { QuizData } from "../../dto/quizResponse";
|
|
13
13
|
import { InviteResponse } from "../../dto/invitesResponse";
|
14
14
|
import { OrganizationApiKey, TokenResponse } from "../../dto/apiKeyResponse";
|
15
15
|
import { UploadFile } from "../files/files";
|
16
|
+
import { QueryFlows } from "../queryFlows/queryFlows";
|
16
17
|
export declare class OrganizationImpl extends Organization implements Disposable {
|
17
18
|
private readonly context;
|
18
19
|
private _isDisposed;
|
@@ -20,6 +21,7 @@ export declare class OrganizationImpl extends Organization implements Disposable
|
|
20
21
|
private _content?;
|
21
22
|
private readonly _workspaces;
|
22
23
|
private readonly _accessGroups;
|
24
|
+
private readonly _queryFlows;
|
23
25
|
private readonly _chats;
|
24
26
|
constructor(context: Context);
|
25
27
|
initFrom(content: OrganizationDto, isAdmin: boolean): Promise<OrganizationImpl>;
|
@@ -32,6 +34,7 @@ export declare class OrganizationImpl extends Organization implements Disposable
|
|
32
34
|
get icon(): string;
|
33
35
|
get workspaces(): Workspaces;
|
34
36
|
get accessGroups(): Groups;
|
37
|
+
get queryFlows(): QueryFlows;
|
35
38
|
get chats(): Chats;
|
36
39
|
members(): Promise<UserDto[]>;
|
37
40
|
change(name: string, description: string): Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"organization.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/organizations/organization.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAGL,iBAAiB,EACjB,eAAe,EAEf,OAAO,EAEP,uBAAuB,EACxB,M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AAC,kBAAkB,EAAE,CAAC;IAmB3C,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAoB5G,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBxC,UAAU,CAAC,UAAU,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAqB5I"}
|
@@ -7,6 +7,7 @@ const groups_impl_1 = require("../groups/groups.impl");
|
|
7
7
|
const chats_impl_1 = require("../chats/chats.impl");
|
8
8
|
const rpcService_1 = require("../../services/rpcService");
|
9
9
|
const responseUtils_1 = require("../../services/responseUtils");
|
10
|
+
const queryFlows_impl_1 = require("../queryFlows/queryFlows.impl");
|
10
11
|
class OrganizationImpl extends organization_1.Organization {
|
11
12
|
constructor(context) {
|
12
13
|
super();
|
@@ -16,6 +17,7 @@ class OrganizationImpl extends organization_1.Organization {
|
|
16
17
|
this._workspaces = new workspaces_impl_1.WorkspacesImpl(this, this.context);
|
17
18
|
this._accessGroups = new groups_impl_1.GroupsImpl(this, this.context);
|
18
19
|
this._chats = new chats_impl_1.ChatsImpl(this, this.context);
|
20
|
+
this._queryFlows = new queryFlows_impl_1.QueryFlowsImpl(this, this.context);
|
19
21
|
}
|
20
22
|
async initFrom(content, isAdmin) {
|
21
23
|
this._content = content;
|
@@ -24,7 +26,8 @@ class OrganizationImpl extends organization_1.Organization {
|
|
24
26
|
const promises = [
|
25
27
|
this._workspaces.initFrom(content.id),
|
26
28
|
this._chats.initFrom(content.id),
|
27
|
-
this._accessGroups.initialize()
|
29
|
+
this._accessGroups.initialize(),
|
30
|
+
this._queryFlows.init()
|
28
31
|
];
|
29
32
|
await Promise.all(promises);
|
30
33
|
return this;
|
@@ -60,6 +63,9 @@ class OrganizationImpl extends organization_1.Organization {
|
|
60
63
|
get accessGroups() {
|
61
64
|
return this._accessGroups;
|
62
65
|
}
|
66
|
+
get queryFlows() {
|
67
|
+
return this._queryFlows;
|
68
|
+
}
|
63
69
|
get chats() {
|
64
70
|
return this._chats;
|
65
71
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"organization.impl.js","sourceRoot":"","sources":["../../../../src/storages/organizations/organization.impl.ts"],"names":[],"mappings":";;;AAaA,mEAA4D;AAE5D,iDAA8D;AAC9D,uDAAgD;AAEhD,oDAA6C;AAE7C,0DAAoD;AACpD,gEAA0D;AAkB1D,MAAa,gBAAiB,SAAQ,2BAAY;IAQhD,YAA6B,OAAgB;QAC3C,KAAK,EAAE,CAAA;QADoB,YAAO,GAAP,OAAO,CAAS;QAPrC,gBAAW,GAAY,KAAK,CAAA;QAC5B,aAAQ,GAAY,KAAK,CAAA;QAQ/B,IAAI,CAAC,WAAW,GAAG,IAAI,gCAAc,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QACzD,IAAI,CAAC,aAAa,GAAG,IAAI,wBAAU,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QACvD,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAS,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IACjD,CAAC;IAEM,KAAK,CAAC,QAAQ,CACnB,OAAwB,EACxB,OAAgB;QAEhB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QAEvB,qCAAqC;QACrC,MAAM,QAAQ,GAAG;YACf,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC,aAAa,C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,GAAG,MAAM,CAAA,MAAA,IAAI,CAAC,OAAO;aAChC,OAAO,CAAC,uBAAU,CAAC,0CAClB,cAAc,CAAC,0BAA0B,EAC1C,WAAW,CAAC,QAAQ,EAAE,GAAG,EACzB,UAAU,EAAE,CAAA,CAAA;QAEf,IAAI,6BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,MAAM,6BAAa,CAAC,UAAU,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAA;QAClE,CAAC;IACH,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,UAAyB,EAAE,KAAa,EAAE,cAAsB,EAAE,YAAoB,EAAE,MAAc;;QACrH,MAAM,QAAQ,GAAG,MAAM,CAAA,MAAA,IAAI,CAAC,OAAO;aAChC,OAAO,CAAC,uBAAU,CAAC,0CAClB,cAAc,CAAC,aAAa,EAC7B,YAAY,CAAC;YACZ,KAAK,EAAE,KAAK;YACZ,cAAc,EAAE,cAAc;YAC9B,YAAY,EAAE,YAAY;YAC1B,cAAc,EAAE,IAAI,CAAC,EAAE;YACvB,YAAY,EAAE,UAAU;YACxB,MAAM,EAAE,MAAM;SACf,CAAC,CAAA,CAAA;QACJ,IAAI,6BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,MAAM,6BAAa,CAAC,UAAU,CAC5B,yCAAyC,IAAI,CAAC,EAAE,eAAe,KAAK,EAAE,EACtE,QAAQ,CACT,CAAA;QACH,CAAC;QAED,OAAO,CAAC,MAAM,QAAS,CAAC,IAAI,EAAE,CAAa,CAAA;IAC7C,CAAC;CACF;AAngBD,4CAmgBC"}
|
1
|
+
{"version":3,"file":"organization.impl.js","sourceRoot":"","sources":["../../../../src/storages/organizations/organization.impl.ts"],"names":[],"mappings":";;;AAaA,mEAA4D;AAE5D,iDAA8D;AAC9D,uDAAgD;AAEhD,oDAA6C;AAE7C,0DAAoD;AACpD,gEAA0D;AAiB1D,mEAA4D;AAG5D,MAAa,gBAAiB,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AAa,CAAC,UAAU,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAA;QAClE,CAAC;IACH,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,UAAyB,EAAE,KAAa,EAAE,cAAsB,EAAE,YAAoB,EAAE,MAAc;;QACrH,MAAM,QAAQ,GAAG,MAAM,CAAA,MAAA,IAAI,CAAC,OAAO;aAChC,OAAO,CAAC,uBAAU,CAAC,0CAClB,cAAc,CAAC,aAAa,EAC7B,YAAY,CAAC;YACZ,KAAK,EAAE,KAAK;YACZ,cAAc,EAAE,cAAc;YAC9B,YAAY,EAAE,YAAY;YAC1B,cAAc,EAAE,IAAI,CAAC,EAAE;YACvB,YAAY,EAAE,UAAU;YACxB,MAAM,EAAE,MAAM;SACf,CAAC,CAAA,CAAA;QACJ,IAAI,6BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,MAAM,6BAAa,CAAC,UAAU,CAC5B,yCAAyC,IAAI,CAAC,EAAE,eAAe,KAAK,EAAE,EACtE,QAAQ,CACT,CAAA;QACH,CAAC;QAED,OAAO,CAAC,MAAM,QAAS,CAAC,IAAI,EAAE,CAAa,CAAA;IAC7C,CAAC;CACF;AA1gBD,4CA0gBC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../../../src/storages/organizations/organization.ts"],"names":[],"mappings":";;;AAIA,yCAA8C;
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../../../src/storages/organizations/organization.ts"],"names":[],"mappings":";;;AAIA,yCAA8C;AAgB9C;;GAEG;AACH,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;AACrB,CAAC,EAFW,iBAAiB,iCAAjB,iBAAiB,QAE5B;AAED;;GAEG;AACH,MAAsB,YAAa,SAAQ,wBAG1C;CA4IA;AA/ID,oCA+IC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { EventDispatcher } from "../../events";
|
2
|
+
import { FlowId } from "./queryFlows";
|
3
|
+
import { QueryFlowStatus } from "../../dto/queryFlowResponse";
|
4
|
+
export declare enum QueryFlowEvent {
|
5
|
+
UPDATED = "updated"
|
6
|
+
}
|
7
|
+
export declare abstract class QueryFlow extends EventDispatcher<QueryFlowEvent, QueryFlow> {
|
8
|
+
abstract get id(): FlowId;
|
9
|
+
abstract get status(): QueryFlowStatus;
|
10
|
+
abstract get resultUrl(): string;
|
11
|
+
}
|
12
|
+
//# sourceMappingURL=queryFlow.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlow.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAA;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAE3D,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,MAAM,IAAI,eAAe,CAAA;IAEtC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAA;CAEjC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { QueryFlow } from "./queryFlow";
|
2
|
+
import { QueryFlowStatus } from "../../dto/queryFlowResponse";
|
3
|
+
import { FlowId } from "./queryFlows";
|
4
|
+
import { Context } from "../../context";
|
5
|
+
export declare class QueryFlowImpl extends QueryFlow {
|
6
|
+
private readonly context;
|
7
|
+
private _content?;
|
8
|
+
private _id?;
|
9
|
+
constructor(context: Context);
|
10
|
+
initFrom(id: FlowId): Promise<void>;
|
11
|
+
fetch(): Promise<void>;
|
12
|
+
get id(): FlowId;
|
13
|
+
get resultUrl(): string;
|
14
|
+
get status(): QueryFlowStatus;
|
15
|
+
}
|
16
|
+
//# sourceMappingURL=queryFlow.impl.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlow.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAiB,MAAM,aAAa,CAAA;AACrD,OAAO,EAAe,eAAe,EAAC,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAA;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AAKrC,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;IA+BX,IAAI,EAAE,IAAI,MAAM,CAKf;IAED,IAAI,SAAS,IAAI,MAAM,CAKtB;IAED,IAAI,MAAM,IAAI,eAAe,CAK5B;CAEF"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.QueryFlowImpl = void 0;
|
4
|
+
const queryFlow_1 = require("./queryFlow");
|
5
|
+
const queryFlowResponse_1 = require("../../dto/queryFlowResponse");
|
6
|
+
const rpcService_1 = require("../../services/rpcService");
|
7
|
+
const responseUtils_1 = require("../../services/responseUtils");
|
8
|
+
class QueryFlowImpl extends queryFlow_1.QueryFlow {
|
9
|
+
constructor(context) {
|
10
|
+
super();
|
11
|
+
this.context = context;
|
12
|
+
}
|
13
|
+
async initFrom(id) {
|
14
|
+
this._id = id;
|
15
|
+
await this.fetch();
|
16
|
+
}
|
17
|
+
async fetch() {
|
18
|
+
var _a, _b;
|
19
|
+
const response = await ((_a = this.context
|
20
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/QueryFlows").searchParam("flowId", this.id).sendGet());
|
21
|
+
// check response status
|
22
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
23
|
+
await responseUtils_1.ResponseUtils.throwError(`Failed to fetch query flow with id ${this.id}`, response);
|
24
|
+
}
|
25
|
+
// parse flow from the server's response
|
26
|
+
const flow = (await response.json());
|
27
|
+
const lastState = (_b = this._content) === null || _b === void 0 ? void 0 : _b.state;
|
28
|
+
this._content = flow;
|
29
|
+
if (lastState !== undefined && lastState !== this._content.state) {
|
30
|
+
this.dispatch({
|
31
|
+
type: queryFlow_1.QueryFlowEvent.UPDATED,
|
32
|
+
data: this
|
33
|
+
});
|
34
|
+
}
|
35
|
+
if (this._content.state === queryFlowResponse_1.QueryFlowStatus.IN_PROGRESS) {
|
36
|
+
setTimeout(async () => await this.fetch(), 2000);
|
37
|
+
}
|
38
|
+
}
|
39
|
+
get id() {
|
40
|
+
if (this._id)
|
41
|
+
return this._id;
|
42
|
+
else
|
43
|
+
throw new Error("Query fLow is not loaded");
|
44
|
+
}
|
45
|
+
get resultUrl() {
|
46
|
+
if (this._content && this._content.result.fileUrl)
|
47
|
+
return this._content.result.fileUrl;
|
48
|
+
else
|
49
|
+
throw new Error("Query fLow is not loaded");
|
50
|
+
}
|
51
|
+
get status() {
|
52
|
+
if (this._content)
|
53
|
+
return this._content.state;
|
54
|
+
else
|
55
|
+
throw new Error("Query fLow is not loaded");
|
56
|
+
}
|
57
|
+
}
|
58
|
+
exports.QueryFlowImpl = QueryFlowImpl;
|
59
|
+
//# sourceMappingURL=queryFlow.impl.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlow.impl.js","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.impl.ts"],"names":[],"mappings":";;;AAAA,2CAAqD;AACrD,mEAAyE;AAGzE,0DAAoD;AACpD,gEAA0D;AAG1D,MAAa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,CAAC,CAAA;QAClD,CAAC;IACH,CAAC;IAGD,IAAI,EAAE;QACJ,IAAI,IAAI,CAAC,GAAG;YACV,OAAO,IAAI,CAAC,GAAG,CAAA;;YAEf,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC/C,CAAC;IAED,IAAI,SAAS;QACX,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO;YAC/C,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAA;;YAEnC,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC/C,CAAC;IAED,IAAI,MAAM;QACR,IAAI,IAAI,CAAC,QAAQ;YACf,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAA;;YAE1B,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC/C,CAAC;CAEF;AAjED,sCAiEC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.QueryFlow = exports.QueryFlowEvent = void 0;
|
4
|
+
const events_1 = require("../../events");
|
5
|
+
var QueryFlowEvent;
|
6
|
+
(function (QueryFlowEvent) {
|
7
|
+
QueryFlowEvent["UPDATED"] = "updated";
|
8
|
+
})(QueryFlowEvent || (exports.QueryFlowEvent = QueryFlowEvent = {}));
|
9
|
+
class QueryFlow extends events_1.EventDispatcher {
|
10
|
+
}
|
11
|
+
exports.QueryFlow = QueryFlow;
|
12
|
+
//# sourceMappingURL=queryFlow.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlow.js","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlow.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAI5C,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qCAAmB,CAAA;AACrB,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAED,MAAsB,SAAU,SAAQ,wBAGvC;CAQA;AAXD,8BAWC"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { EventDispatcher } from "../../events";
|
2
|
+
import { QueryFlow } from "./queryFlow";
|
3
|
+
import { WorkspaceId } from "../workspaces/workspaces";
|
4
|
+
import { FileId } from "../files/file";
|
5
|
+
import { UploadFile } from "../files/files";
|
6
|
+
/**
|
7
|
+
* Query flow id.
|
8
|
+
*/
|
9
|
+
export type FlowId = string;
|
10
|
+
/**
|
11
|
+
* Query flow event.
|
12
|
+
*/
|
13
|
+
export declare enum QueryFlowsEvent {
|
14
|
+
ADDED = "added",
|
15
|
+
REMOVED = "removed"
|
16
|
+
}
|
17
|
+
export declare abstract class QueryFlows extends EventDispatcher<QueryFlowsEvent, QueryFlow> {
|
18
|
+
abstract get collection(): QueryFlow[];
|
19
|
+
abstract create(workspaceId: WorkspaceId, fileId: FileId, file: UploadFile): Promise<FlowId>;
|
20
|
+
abstract delete(id: FlowId): Promise<void>;
|
21
|
+
}
|
22
|
+
//# sourceMappingURL=queryFlows.d.ts.map
|
@@ -0,0 +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,MAAM,EAAC,MAAM,eAAe,CAAA;AACpC,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,KAAK,UAAU,IAAI,SAAS,EAAE,CAAA;IAEtC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAI,OAAO,CAAC,MAAM,CAAC;IAE7F,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAE3C"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Context } from "../../context";
|
2
|
+
import { FlowId, QueryFlows } from "./queryFlows";
|
3
|
+
import { QueryFlow } from "./queryFlow";
|
4
|
+
import { OrganizationImpl } from "../organizations/organization.impl";
|
5
|
+
import { WorkspaceId } from "../workspaces/workspaces";
|
6
|
+
import { FileId } from "../files/file";
|
7
|
+
import { UploadFile } from "../files/files";
|
8
|
+
export declare class QueryFlowsImpl extends QueryFlows {
|
9
|
+
readonly organization: OrganizationImpl;
|
10
|
+
readonly context: Context;
|
11
|
+
private _collection;
|
12
|
+
constructor(organization: OrganizationImpl, context: Context);
|
13
|
+
init(): Promise<void>;
|
14
|
+
get collection(): QueryFlow[];
|
15
|
+
create(workspaceId: WorkspaceId, fileId: FileId, file: UploadFile): Promise<FlowId>;
|
16
|
+
delete(id: FlowId): Promise<void>;
|
17
|
+
}
|
18
|
+
//# sourceMappingURL=queryFlows.impl.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlows.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlows.impl.ts"],"names":[],"mappings":"AACA,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;AAMpD,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAA;AACpC,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAGzC,qBAAa,cAAe,SAAQ,UAAU;aAK1B,YAAY,EAAE,gBAAgB;aAC9B,OAAO,EAAE,OAAO;IAJlC,OAAO,CAAC,WAAW,CAAkB;gBAGnB,YAAY,EAAE,gBAAgB,EAC9B,OAAO,EAAE,OAAO;IAI5B,IAAI;IAmCV,IAAI,UAAU,IAAI,SAAS,EAAE,CAE5B;IAEK,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAI,OAAO,CAAC,MAAM,CAAC;IAgDpF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAoCxC"}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.QueryFlowsImpl = void 0;
|
4
|
+
const queryFlows_1 = require("./queryFlows");
|
5
|
+
const rpcService_1 = require("../../services/rpcService");
|
6
|
+
const responseUtils_1 = require("../../services/responseUtils");
|
7
|
+
const queryFlow_impl_1 = require("./queryFlow.impl");
|
8
|
+
class QueryFlowsImpl extends queryFlows_1.QueryFlows {
|
9
|
+
constructor(organization, context) {
|
10
|
+
super();
|
11
|
+
this.organization = organization;
|
12
|
+
this.context = context;
|
13
|
+
this._collection = [];
|
14
|
+
}
|
15
|
+
async init() {
|
16
|
+
var _a;
|
17
|
+
const response = await ((_a = this.context
|
18
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/QueryFlows/list").searchParam("organizationId", this.organization.id).sendGet());
|
19
|
+
// check response status
|
20
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
21
|
+
await responseUtils_1.ResponseUtils.throwError(`Failed to fetch query flows for org ${this.organization.id}`, response);
|
22
|
+
}
|
23
|
+
// parse flows from the server's response
|
24
|
+
const flows = (await response.json())
|
25
|
+
.flowIds;
|
26
|
+
// init flows from the server's response
|
27
|
+
for (const flow of flows) {
|
28
|
+
// create workspace implementation
|
29
|
+
const flowImpl = new queryFlow_impl_1.QueryFlowImpl(this.context);
|
30
|
+
// init workspace from the server's response
|
31
|
+
await flowImpl.initFrom(flow);
|
32
|
+
// add workspace to the collection
|
33
|
+
this._collection.push(flowImpl);
|
34
|
+
// dispatch event
|
35
|
+
this.dispatch({
|
36
|
+
type: queryFlows_1.QueryFlowsEvent.ADDED,
|
37
|
+
data: flowImpl
|
38
|
+
});
|
39
|
+
}
|
40
|
+
}
|
41
|
+
get collection() {
|
42
|
+
return this._collection;
|
43
|
+
}
|
44
|
+
async create(workspaceId, fileId, file) {
|
45
|
+
var _a;
|
46
|
+
if (workspaceId === undefined || workspaceId === null || workspaceId.trim() === "") {
|
47
|
+
throw new Error("WorkspaceId is required, must be not empty");
|
48
|
+
}
|
49
|
+
if (fileId === undefined || fileId === null || fileId.trim() === "") {
|
50
|
+
throw new Error("FileId is required, must be not empty");
|
51
|
+
}
|
52
|
+
if (file === undefined || file === null) {
|
53
|
+
throw new Error("Create query flow, file is undefined or null");
|
54
|
+
}
|
55
|
+
// form data to send
|
56
|
+
const form = new FormData();
|
57
|
+
form.append("organizationId", this.organization.id);
|
58
|
+
form.append("workspaceId", workspaceId);
|
59
|
+
form.append("fileId", fileId);
|
60
|
+
form.append("file", file, file.name);
|
61
|
+
// send request to the server
|
62
|
+
const response = await ((_a = this.context
|
63
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/QueryFlows").sendPostFormData(form));
|
64
|
+
// check response status
|
65
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
66
|
+
await responseUtils_1.ResponseUtils.throwError(`Query flow creation for ${file.name}`, response);
|
67
|
+
}
|
68
|
+
const content = (await response.json());
|
69
|
+
// create workspace implementation
|
70
|
+
const queryFlow = new queryFlow_impl_1.QueryFlowImpl(this.context);
|
71
|
+
await queryFlow.initFrom(content.flowId);
|
72
|
+
// add workspace to the collection
|
73
|
+
this._collection.push(queryFlow);
|
74
|
+
// dispatch event
|
75
|
+
this.dispatch({
|
76
|
+
type: queryFlows_1.QueryFlowsEvent.ADDED,
|
77
|
+
data: queryFlow
|
78
|
+
});
|
79
|
+
return queryFlow.id;
|
80
|
+
}
|
81
|
+
async delete(id) {
|
82
|
+
var _a;
|
83
|
+
const flow = this._collection.find(flow => flow.id == id);
|
84
|
+
if (!flow) {
|
85
|
+
throw new Error(`Query flow ${id} is not found`);
|
86
|
+
}
|
87
|
+
// send delete request to the server
|
88
|
+
const response = await ((_a = this.context
|
89
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/QueryFlows").searchParam("flowId", id).sendDelete());
|
90
|
+
// check response status
|
91
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
92
|
+
await responseUtils_1.ResponseUtils.throwError(`Failed to delete query flow ${id} in organization: ${this.organization.id}`, response);
|
93
|
+
}
|
94
|
+
// remove query flow from the collection
|
95
|
+
const index = this._collection.indexOf(flow);
|
96
|
+
if (index < 0) {
|
97
|
+
throw new Error(`Query flow ${id} is not found`);
|
98
|
+
}
|
99
|
+
this._collection.splice(index, 1);
|
100
|
+
// dispatch event
|
101
|
+
this.dispatch({
|
102
|
+
type: queryFlows_1.QueryFlowsEvent.REMOVED,
|
103
|
+
data: flow
|
104
|
+
});
|
105
|
+
}
|
106
|
+
}
|
107
|
+
exports.QueryFlowsImpl = QueryFlowsImpl;
|
108
|
+
//# sourceMappingURL=queryFlows.impl.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlows.impl.js","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlows.impl.ts"],"names":[],"mappings":";;;AAEA,6CAAgE;AAGhE,0DAAoD;AACpD,gEAA0D;AAM1D,q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C;QACxC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAC5C,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;QAClD,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QAEjC,iBAAiB;QACjB,IAAI,CAAC,QAAQ,CAAC;YACZ,IAAI,EAAE,4BAAe,CAAC,OAAO;YAC7B,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CAEF;AArID,wCAqIC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.QueryFlows = exports.QueryFlowsEvent = void 0;
|
4
|
+
const events_1 = require("../../events");
|
5
|
+
/**
|
6
|
+
* Query flow event.
|
7
|
+
*/
|
8
|
+
var QueryFlowsEvent;
|
9
|
+
(function (QueryFlowsEvent) {
|
10
|
+
QueryFlowsEvent["ADDED"] = "added";
|
11
|
+
QueryFlowsEvent["REMOVED"] = "removed";
|
12
|
+
})(QueryFlowsEvent || (exports.QueryFlowsEvent = QueryFlowsEvent = {}));
|
13
|
+
class QueryFlows extends events_1.EventDispatcher {
|
14
|
+
}
|
15
|
+
exports.QueryFlows = QueryFlows;
|
16
|
+
//# sourceMappingURL=queryFlows.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryFlows.js","sourceRoot":"","sources":["../../../../src/storages/queryFlows/queryFlows.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAY5C;;GAEG;AACH,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,sCAAmB,CAAA;AACrB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAED,MAAsB,UAAW,SAAQ,wBAGxC;CAQA;AAXD,gCAWC"}
|
package/package.json
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
export enum QueryFlowStatus {
|
4
|
+
IN_PROGRESS = 0,
|
5
|
+
ERROR = 1,
|
6
|
+
DONE = 100
|
7
|
+
}
|
8
|
+
|
9
|
+
export interface QueryFlowResult {
|
10
|
+
fileUrl: string
|
11
|
+
}
|
12
|
+
|
13
|
+
// GET query flow by ID
|
14
|
+
export interface QueryFlowDto {
|
15
|
+
state: QueryFlowStatus,
|
16
|
+
result: QueryFlowResult
|
17
|
+
}
|
18
|
+
|
19
|
+
// GET org query flows
|
20
|
+
export interface QueryFlowListResponse {
|
21
|
+
flowIds: string[]
|
22
|
+
}
|
23
|
+
|
24
|
+
// POST Create query flow
|
25
|
+
export interface QueryFlowResponse {
|
26
|
+
flowId: string
|
27
|
+
}
|
package/src/index.ts
CHANGED
@@ -19,6 +19,7 @@ export * from "./dto/userInfoResponse"
|
|
19
19
|
export * from "./dto/workspacesResponse"
|
20
20
|
export * from "./dto/invitesResponse"
|
21
21
|
export * from "./dto/apiKeyResponse"
|
22
|
+
export * from "./dto/queryFlowResponse"
|
22
23
|
export * from "./events"
|
23
24
|
export * from "./middleware"
|
24
25
|
export * from "./storages/chats/answer"
|
@@ -33,6 +34,8 @@ export * from "./storages/organizations/organizations"
|
|
33
34
|
export * from "./storages/user/userProfile"
|
34
35
|
export * from "./storages/workspaces/workspace"
|
35
36
|
export * from "./storages/workspaces/workspaces"
|
37
|
+
export * from "./storages/queryFlows/queryFlow"
|
38
|
+
export * from "./storages/queryFlows/queryFlows"
|
36
39
|
|
37
40
|
export {
|
38
41
|
OrganizationId, Organizations, OrganizationsEvent
|
@@ -36,6 +36,8 @@ import {
|
|
36
36
|
} from "../../dto/apiKeyResponse"
|
37
37
|
import {IconResponse} from "../../dto/workspacesResponse"
|
38
38
|
import {UploadFile} from "../files/files"
|
39
|
+
import {QueryFlowsImpl} from "../queryFlows/queryFlows.impl"
|
40
|
+
import {QueryFlows} from "../queryFlows/queryFlows"
|
39
41
|
|
40
42
|
export class OrganizationImpl extends Organization implements Disposable {
|
41
43
|
private _isDisposed: boolean = false
|
@@ -43,6 +45,7 @@ export class OrganizationImpl extends Organization implements Disposable {
|
|
43
45
|
private _content?: OrganizationDto
|
44
46
|
private readonly _workspaces: WorkspacesImpl
|
45
47
|
private readonly _accessGroups: GroupsImpl
|
48
|
+
private readonly _queryFlows: QueryFlowsImpl
|
46
49
|
private readonly _chats: ChatsImpl
|
47
50
|
|
48
51
|
constructor(private readonly context: Context) {
|
@@ -50,6 +53,7 @@ export class OrganizationImpl extends Organization implements Disposable {
|
|
50
53
|
this._workspaces = new WorkspacesImpl(this, this.context)
|
51
54
|
this._accessGroups = new GroupsImpl(this, this.context)
|
52
55
|
this._chats = new ChatsImpl(this, this.context)
|
56
|
+
this._queryFlows = new QueryFlowsImpl(this, this.context)
|
53
57
|
}
|
54
58
|
|
55
59
|
public async initFrom(
|
@@ -63,7 +67,8 @@ export class OrganizationImpl extends Organization implements Disposable {
|
|
63
67
|
const promises = [
|
64
68
|
this._workspaces.initFrom(content.id),
|
65
69
|
this._chats.initFrom(content.id),
|
66
|
-
this._accessGroups.initialize()
|
70
|
+
this._accessGroups.initialize(),
|
71
|
+
this._queryFlows.init()
|
67
72
|
]
|
68
73
|
|
69
74
|
await Promise.all(promises)
|
@@ -107,6 +112,10 @@ export class OrganizationImpl extends Organization implements Disposable {
|
|
107
112
|
return this._accessGroups
|
108
113
|
}
|
109
114
|
|
115
|
+
get queryFlows(): QueryFlows {
|
116
|
+
return this._queryFlows
|
117
|
+
}
|
118
|
+
|
110
119
|
get chats(): Chats {
|
111
120
|
return this._chats
|
112
121
|
}
|
@@ -16,6 +16,7 @@ import {QuizData} from "../../dto/quizResponse"
|
|
16
16
|
import {InviteResponse} from "../../dto/invitesResponse"
|
17
17
|
import { OrganizationApiKey } from "../../dto/apiKeyResponse"
|
18
18
|
import {UploadFile} from "../files/files"
|
19
|
+
import {QueryFlows} from "../queryFlows/queryFlows"
|
19
20
|
|
20
21
|
/**
|
21
22
|
* Organization event.
|
@@ -66,6 +67,11 @@ export abstract class Organization extends EventDispatcher<
|
|
66
67
|
*/
|
67
68
|
abstract get accessGroups(): Groups
|
68
69
|
|
70
|
+
/**
|
71
|
+
* Query flows
|
72
|
+
*/
|
73
|
+
abstract get queryFlows(): QueryFlows
|
74
|
+
|
69
75
|
/**
|
70
76
|
* Get organization members
|
71
77
|
*/
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import {QueryFlow, QueryFlowEvent} from "./queryFlow"
|
2
|
+
import {QueryFlowDto, QueryFlowStatus} from "../../dto/queryFlowResponse"
|
3
|
+
import {FlowId} from "./queryFlows"
|
4
|
+
import {Context} from "../../context"
|
5
|
+
import {RpcService} from "../../services/rpcService"
|
6
|
+
import {ResponseUtils} from "../../services/responseUtils"
|
7
|
+
|
8
|
+
|
9
|
+
export class QueryFlowImpl extends QueryFlow {
|
10
|
+
private _content?: QueryFlowDto
|
11
|
+
private _id?: FlowId
|
12
|
+
|
13
|
+
constructor(private readonly context: Context) {
|
14
|
+
super()
|
15
|
+
}
|
16
|
+
|
17
|
+
async initFrom(id: FlowId) {
|
18
|
+
this._id = id
|
19
|
+
await this.fetch()
|
20
|
+
}
|
21
|
+
|
22
|
+
async fetch() {
|
23
|
+
const response = await this.context
|
24
|
+
.resolve(RpcService)
|
25
|
+
?.requestBuilder("api/v1/QueryFlows")
|
26
|
+
.searchParam("flowId", this.id)
|
27
|
+
.sendGet()
|
28
|
+
|
29
|
+
// check response status
|
30
|
+
if (ResponseUtils.isFail(response)) {
|
31
|
+
await ResponseUtils.throwError(`Failed to fetch query flow with id ${this.id}`, response)
|
32
|
+
}
|
33
|
+
|
34
|
+
// parse flow from the server's response
|
35
|
+
const flow = (await response!.json()) as QueryFlowDto
|
36
|
+
|
37
|
+
const lastState = this._content?.state
|
38
|
+
|
39
|
+
this._content = flow
|
40
|
+
if (lastState !== undefined && lastState !== this._content.state){
|
41
|
+
this.dispatch({
|
42
|
+
type: QueryFlowEvent.UPDATED,
|
43
|
+
data: this
|
44
|
+
})
|
45
|
+
}
|
46
|
+
|
47
|
+
if (this._content.state === QueryFlowStatus.IN_PROGRESS) {
|
48
|
+
setTimeout(async () => await this.fetch(), 2000)
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
get id(): FlowId {
|
54
|
+
if (this._id)
|
55
|
+
return this._id
|
56
|
+
else
|
57
|
+
throw new Error("Query fLow is not loaded")
|
58
|
+
}
|
59
|
+
|
60
|
+
get resultUrl(): string {
|
61
|
+
if (this._content && this._content.result.fileUrl)
|
62
|
+
return this._content.result.fileUrl
|
63
|
+
else
|
64
|
+
throw new Error("Query fLow is not loaded")
|
65
|
+
}
|
66
|
+
|
67
|
+
get status(): QueryFlowStatus {
|
68
|
+
if (this._content)
|
69
|
+
return this._content.state
|
70
|
+
else
|
71
|
+
throw new Error("Query fLow is not loaded")
|
72
|
+
}
|
73
|
+
|
74
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import {EventDispatcher} from "../../events"
|
2
|
+
import {FlowId} from "./queryFlows"
|
3
|
+
import {QueryFlowStatus} from "../../dto/queryFlowResponse"
|
4
|
+
|
5
|
+
export enum QueryFlowEvent {
|
6
|
+
UPDATED = "updated"
|
7
|
+
}
|
8
|
+
|
9
|
+
export abstract class QueryFlow extends EventDispatcher<
|
10
|
+
QueryFlowEvent,
|
11
|
+
QueryFlow
|
12
|
+
> {
|
13
|
+
|
14
|
+
abstract get id(): FlowId
|
15
|
+
|
16
|
+
abstract get status(): QueryFlowStatus
|
17
|
+
|
18
|
+
abstract get resultUrl(): string
|
19
|
+
|
20
|
+
}
|
@@ -0,0 +1,151 @@
|
|
1
|
+
|
2
|
+
import {Context} from "../../context"
|
3
|
+
import {FlowId, QueryFlows, QueryFlowsEvent} from "./queryFlows"
|
4
|
+
import {QueryFlow} from "./queryFlow"
|
5
|
+
import {OrganizationImpl} from "../organizations/organization.impl"
|
6
|
+
import {RpcService} from "../../services/rpcService"
|
7
|
+
import {ResponseUtils} from "../../services/responseUtils"
|
8
|
+
import {WorkspaceId} from "../workspaces/workspaces"
|
9
|
+
import {
|
10
|
+
QueryFlowListResponse,
|
11
|
+
QueryFlowResponse
|
12
|
+
} from "../../dto/queryFlowResponse"
|
13
|
+
import {QueryFlowImpl} from "./queryFlow.impl"
|
14
|
+
import {FileId} from "../files/file"
|
15
|
+
import {UploadFile} from "../files/files"
|
16
|
+
|
17
|
+
|
18
|
+
export class QueryFlowsImpl extends QueryFlows {
|
19
|
+
|
20
|
+
private _collection: QueryFlow[] = []
|
21
|
+
|
22
|
+
constructor(
|
23
|
+
public readonly organization: OrganizationImpl,
|
24
|
+
public readonly context: Context) {
|
25
|
+
super()
|
26
|
+
}
|
27
|
+
|
28
|
+
async init() {
|
29
|
+
const response = await this.context
|
30
|
+
.resolve(RpcService)
|
31
|
+
?.requestBuilder("api/v1/QueryFlows/list")
|
32
|
+
.searchParam("organizationId", this.organization.id)
|
33
|
+
.sendGet()
|
34
|
+
|
35
|
+
// check response status
|
36
|
+
if (ResponseUtils.isFail(response)) {
|
37
|
+
await ResponseUtils.throwError(`Failed to fetch query flows for org ${this.organization.id}`, response)
|
38
|
+
}
|
39
|
+
|
40
|
+
// parse flows from the server's response
|
41
|
+
const flows = ((await response!.json()) as QueryFlowListResponse)
|
42
|
+
.flowIds
|
43
|
+
|
44
|
+
// init flows from the server's response
|
45
|
+
for (const flow of flows) {
|
46
|
+
// create workspace implementation
|
47
|
+
const flowImpl = new QueryFlowImpl(this.context)
|
48
|
+
|
49
|
+
// init workspace from the server's response
|
50
|
+
await flowImpl.initFrom(flow)
|
51
|
+
|
52
|
+
// add workspace to the collection
|
53
|
+
this._collection.push(flowImpl)
|
54
|
+
|
55
|
+
// dispatch event
|
56
|
+
this.dispatch({
|
57
|
+
type: QueryFlowsEvent.ADDED,
|
58
|
+
data: flowImpl
|
59
|
+
})
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
get collection(): QueryFlow[] {
|
64
|
+
return this._collection
|
65
|
+
}
|
66
|
+
|
67
|
+
async create(workspaceId: WorkspaceId, fileId: FileId, file: UploadFile ): Promise<FlowId> {
|
68
|
+
if (workspaceId === undefined || workspaceId === null || workspaceId.trim() === "") {
|
69
|
+
throw new Error("WorkspaceId is required, must be not empty")
|
70
|
+
}
|
71
|
+
if (fileId === undefined || fileId === null || fileId.trim() === "") {
|
72
|
+
throw new Error("FileId is required, must be not empty")
|
73
|
+
}
|
74
|
+
if (file === undefined || file === null) {
|
75
|
+
throw new Error("Create query flow, file is undefined or null")
|
76
|
+
}
|
77
|
+
|
78
|
+
// form data to send
|
79
|
+
const form = new FormData()
|
80
|
+
form.append("organizationId", this.organization.id)
|
81
|
+
form.append("workspaceId", workspaceId)
|
82
|
+
form.append("fileId", fileId)
|
83
|
+
form.append("file", file, file.name)
|
84
|
+
|
85
|
+
// send request to the server
|
86
|
+
const response = await this.context
|
87
|
+
.resolve(RpcService)
|
88
|
+
?.requestBuilder("api/v1/QueryFlows")
|
89
|
+
.sendPostFormData(form)
|
90
|
+
|
91
|
+
// check response status
|
92
|
+
if (ResponseUtils.isFail(response)) {
|
93
|
+
|
94
|
+
await ResponseUtils.throwError(`Query flow creation for ${file.name}`, response)
|
95
|
+
}
|
96
|
+
|
97
|
+
const content = (await response!.json()) as QueryFlowResponse
|
98
|
+
// create workspace implementation
|
99
|
+
const queryFlow = new QueryFlowImpl(this.context)
|
100
|
+
await queryFlow.initFrom(content.flowId)
|
101
|
+
|
102
|
+
// add workspace to the collection
|
103
|
+
this._collection.push(queryFlow)
|
104
|
+
|
105
|
+
|
106
|
+
// dispatch event
|
107
|
+
this.dispatch({
|
108
|
+
type: QueryFlowsEvent.ADDED,
|
109
|
+
data: queryFlow
|
110
|
+
})
|
111
|
+
|
112
|
+
return queryFlow.id
|
113
|
+
}
|
114
|
+
|
115
|
+
async delete(id: FlowId): Promise<void> {
|
116
|
+
const flow = this._collection.find(flow => flow.id == id)
|
117
|
+
|
118
|
+
if (!flow) {
|
119
|
+
throw new Error(`Query flow ${id} is not found`)
|
120
|
+
}
|
121
|
+
|
122
|
+
// send delete request to the server
|
123
|
+
const response = await this.context
|
124
|
+
.resolve(RpcService)
|
125
|
+
?.requestBuilder("api/v1/QueryFlows")
|
126
|
+
.searchParam("flowId", id)
|
127
|
+
.sendDelete()
|
128
|
+
|
129
|
+
// check response status
|
130
|
+
if (ResponseUtils.isFail(response)) {
|
131
|
+
await ResponseUtils.throwError(
|
132
|
+
`Failed to delete query flow ${id} in organization: ${this.organization.id}`,
|
133
|
+
response
|
134
|
+
)
|
135
|
+
}
|
136
|
+
|
137
|
+
// remove query flow from the collection
|
138
|
+
const index = this._collection.indexOf(flow)
|
139
|
+
if (index < 0) {
|
140
|
+
throw new Error(`Query flow ${id} is not found`)
|
141
|
+
}
|
142
|
+
this._collection.splice(index, 1)
|
143
|
+
|
144
|
+
// dispatch event
|
145
|
+
this.dispatch({
|
146
|
+
type: QueryFlowsEvent.REMOVED,
|
147
|
+
data: flow
|
148
|
+
})
|
149
|
+
}
|
150
|
+
|
151
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import {EventDispatcher} from "../../events"
|
2
|
+
import {QueryFlow} from "./queryFlow"
|
3
|
+
import {WorkspaceId} from "../workspaces/workspaces"
|
4
|
+
import {FileId} from "../files/file"
|
5
|
+
import {UploadFile} from "../files/files"
|
6
|
+
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Query flow id.
|
10
|
+
*/
|
11
|
+
export type FlowId = string
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Query flow event.
|
15
|
+
*/
|
16
|
+
export enum QueryFlowsEvent {
|
17
|
+
ADDED = "added",
|
18
|
+
REMOVED = "removed"
|
19
|
+
}
|
20
|
+
|
21
|
+
export abstract class QueryFlows extends EventDispatcher<
|
22
|
+
QueryFlowsEvent,
|
23
|
+
QueryFlow
|
24
|
+
> {
|
25
|
+
|
26
|
+
abstract get collection(): QueryFlow[]
|
27
|
+
|
28
|
+
abstract create(workspaceId: WorkspaceId, fileId: FileId, file: UploadFile ): Promise<FlowId>
|
29
|
+
|
30
|
+
abstract delete(id: FlowId): Promise<void>
|
31
|
+
|
32
|
+
}
|