@neuralinnovations/dataisland-sdk 0.2.0 → 0.3.0

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 (61) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/dataIslandApp.d.ts +5 -0
  3. package/dist/src/dataIslandApp.d.ts.map +1 -1
  4. package/dist/src/dataIslandApp.js.map +1 -1
  5. package/dist/src/dto/administration.d.ts +30 -0
  6. package/dist/src/dto/administration.d.ts.map +1 -0
  7. package/dist/src/dto/administration.js +3 -0
  8. package/dist/src/dto/administration.js.map +1 -0
  9. package/dist/src/index.d.ts +2 -1
  10. package/dist/src/index.d.ts.map +1 -1
  11. package/dist/src/index.js +3 -2
  12. package/dist/src/index.js.map +1 -1
  13. package/dist/src/internal/app.impl.d.ts +2 -0
  14. package/dist/src/internal/app.impl.d.ts.map +1 -1
  15. package/dist/src/internal/app.impl.js +7 -0
  16. package/dist/src/internal/app.impl.js.map +1 -1
  17. package/dist/src/services/statistics.d.ts +12 -0
  18. package/dist/src/services/statistics.d.ts.map +1 -0
  19. package/dist/src/services/statistics.js +21 -0
  20. package/dist/src/services/statistics.js.map +1 -0
  21. package/dist/src/storages/administration/administration.d.ts +7 -0
  22. package/dist/src/storages/administration/administration.d.ts.map +1 -0
  23. package/dist/src/storages/administration/administration.js +7 -0
  24. package/dist/src/storages/administration/administration.js.map +1 -0
  25. package/dist/src/storages/administration/library.administration.d.ts +29 -0
  26. package/dist/src/storages/administration/library.administration.d.ts.map +1 -0
  27. package/dist/src/storages/administration/library.administration.impl.d.ts +15 -0
  28. package/dist/src/storages/administration/library.administration.impl.d.ts.map +1 -0
  29. package/dist/src/storages/administration/library.administration.impl.js +118 -0
  30. package/dist/src/storages/administration/library.administration.impl.js.map +1 -0
  31. package/dist/src/storages/administration/library.administration.js +10 -0
  32. package/dist/src/storages/administration/library.administration.js.map +1 -0
  33. package/dist/src/storages/administration/statistics.administration.d.ts +16 -0
  34. package/dist/src/storages/administration/statistics.administration.d.ts.map +1 -0
  35. package/dist/src/storages/administration/statistics.administration.impl.d.ts +11 -0
  36. package/dist/src/storages/administration/statistics.administration.impl.d.ts.map +1 -0
  37. package/dist/src/storages/administration/statistics.administration.impl.js +32 -0
  38. package/dist/src/storages/administration/statistics.administration.impl.js.map +1 -0
  39. package/dist/src/storages/administration/statistics.administration.js +10 -0
  40. package/dist/src/storages/administration/statistics.administration.js.map +1 -0
  41. package/dist/src/storages/library/libraries.d.ts +0 -31
  42. package/dist/src/storages/library/libraries.d.ts.map +1 -1
  43. package/dist/src/storages/library/libraries.impl.d.ts +1 -14
  44. package/dist/src/storages/library/libraries.impl.d.ts.map +1 -1
  45. package/dist/src/storages/library/libraries.impl.js +1 -110
  46. package/dist/src/storages/library/libraries.impl.js.map +1 -1
  47. package/dist/src/storages/library/libraries.js +1 -7
  48. package/dist/src/storages/library/libraries.js.map +1 -1
  49. package/package.json +1 -1
  50. package/src/dataIslandApp.ts +7 -1
  51. package/src/dto/administration.ts +34 -0
  52. package/src/index.ts +4 -1
  53. package/src/internal/app.impl.ts +11 -2
  54. package/src/services/statistics.ts +31 -0
  55. package/src/storages/administration/administration.ts +8 -0
  56. package/src/storages/administration/library.administration.impl.ts +169 -0
  57. package/src/storages/administration/library.administration.ts +33 -0
  58. package/src/storages/administration/statistics.administration.impl.ts +51 -0
  59. package/src/storages/administration/statistics.administration.ts +21 -0
  60. package/src/storages/library/libraries.impl.ts +2 -161
  61. package/src/storages/library/libraries.ts +0 -37
@@ -1,32 +1,5 @@
1
1
  import { Library } from "./library";
2
- import { OrganizationId } from "../organizations/organizations";
3
- import { LibraryDto } from "../../dto/libraryResponse";
4
2
  import { LibraryId } from "./libraryId";
5
- /**
6
- * Library management, you must have permissions to manage libraries
7
- */
8
- export declare abstract class LibraryManagement {
9
- /**
10
- * Create a new library
11
- */
12
- abstract createLibrary(name: string, region: number, isPublic: boolean): Promise<LibraryId>;
13
- /**
14
- * Add permission for an organization to share its data through the library
15
- */
16
- abstract addOrgToLibrary(libraryId: LibraryId, organizationId: OrganizationId): Promise<void>;
17
- /**
18
- * Get all libraries
19
- */
20
- abstract getLibraries(): Promise<LibraryDto[]>;
21
- /**
22
- * Delete permission for an organization to share its data through the library
23
- */
24
- abstract deleteOrgFromLibrary(libraryId: LibraryId, organizationId: OrganizationId): Promise<void>;
25
- /**
26
- * Delete a library by id
27
- */
28
- abstract deleteLibrary(libraryId: LibraryId): Promise<void>;
29
- }
30
3
  /**
31
4
  * Libraries
32
5
  */
@@ -40,9 +13,5 @@ export declare abstract class Libraries {
40
13
  * @param libraryId
41
14
  */
42
15
  abstract getLibraryById(libraryId: LibraryId): Library | undefined;
43
- /**
44
- * You must have permissions to manage libraries
45
- */
46
- abstract get management(): LibraryManagement;
47
16
  }
48
17
  //# sourceMappingURL=libraries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"libraries.d.ts","sourceRoot":"","sources":["../../../../src/storages/library/libraries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;GAEG;AACH,8BAAsB,iBAAiB;IACrC;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;IAE3F;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAE7F;;OAEG;IACH,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAE9C;;OAEG;IACH,QAAQ,CAAC,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAElG;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAC5D;AAED;;GAEG;AACH,8BAAsB,SAAS;IAE7B;;OAEG;IACH,QAAQ,KAAK,UAAU,IAAI,aAAa,CAAC,OAAO,CAAC,CAAA;IAEjD;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS;IAElE;;OAEG;IACH,QAAQ,KAAK,UAAU,IAAI,iBAAiB,CAAA;CAC7C"}
1
+ {"version":3,"file":"libraries.d.ts","sourceRoot":"","sources":["../../../../src/storages/library/libraries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;GAEG;AACH,8BAAsB,SAAS;IAE7B;;OAEG;IACH,QAAQ,KAAK,UAAU,IAAI,aAAa,CAAC,OAAO,CAAC,CAAA;IAEjD;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS;CACnE"}
@@ -1,26 +1,13 @@
1
- import { Libraries, LibraryManagement } from "./libraries";
1
+ import { Libraries } from "./libraries";
2
2
  import { Library } from "./library";
3
3
  import { Context } from "../../context";
4
- import { LibraryDto } from "../../dto/libraryResponse";
5
- import { OrganizationId } from "../organizations/organizations";
6
4
  import { LibraryId } from "./libraryId";
7
- export declare class LibraryManagementImpl extends LibraryManagement {
8
- private context;
9
- constructor(context: Context);
10
- createLibrary(name: string, region: number, isPublic: boolean): Promise<LibraryId>;
11
- addOrgToLibrary(libraryId: LibraryId, organizationId: OrganizationId): Promise<void>;
12
- getLibraries(): Promise<LibraryDto[]>;
13
- deleteOrgFromLibrary(libraryId: LibraryId, organizationId: OrganizationId): Promise<void>;
14
- deleteLibrary(libraryId: LibraryId): Promise<void>;
15
- }
16
5
  export declare class LibrariesImpl extends Libraries {
17
6
  private readonly context;
18
7
  private readonly _libraries;
19
- private readonly _management;
20
8
  constructor(context: Context);
21
9
  initialize(): Promise<void>;
22
10
  get collection(): readonly Library[];
23
11
  getLibraryById(libraryId: LibraryId): Library | undefined;
24
- get management(): LibraryManagement;
25
12
  }
26
13
  //# sourceMappingURL=libraries.impl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"libraries.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/library/libraries.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAEc,UAAU,EAC9B,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,OAAO;IAKtB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;IAoClF,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BpF,YAAY,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAoBrC,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BzF,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAuBzD;AAED,qBAAa,aAAc,SAAQ,SAAS;IAKxC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJ1B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;IAC/C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAA;gBAGT,OAAO,EAAE,OAAO;IAM7B,UAAU;IAwBhB,IAAI,UAAU,IAAI,SAAS,OAAO,EAAE,CAEnC;IAED,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS;IAIzD,IAAI,UAAU,IAAI,iBAAiB,CAElC;CAEF"}
1
+ {"version":3,"file":"libraries.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/library/libraries.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,qBAAa,aAAc,SAAQ,SAAS;IAIxC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAH1B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;gBAG5B,OAAO,EAAE,OAAO;IAK7B,UAAU;IAwBhB,IAAI,UAAU,IAAI,SAAS,OAAO,EAAE,CAEnC;IAED,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS;CAI1D"}
@@ -1,121 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LibrariesImpl = exports.LibraryManagementImpl = void 0;
3
+ exports.LibrariesImpl = void 0;
4
4
  const libraries_1 = require("./libraries");
5
5
  const library_impl_1 = require("./library.impl");
6
6
  const rpcService_1 = require("../../services/rpcService");
7
7
  const responseUtils_1 = require("../../services/responseUtils");
8
- class LibraryManagementImpl extends libraries_1.LibraryManagement {
9
- constructor(context) {
10
- super();
11
- this.context = context;
12
- }
13
- async createLibrary(name, region, isPublic) {
14
- var _a;
15
- if (name === undefined ||
16
- name === null ||
17
- name.trim() === "") {
18
- throw new Error("Name for library is required, must be not empty");
19
- }
20
- if (isPublic === undefined ||
21
- isPublic === null) {
22
- throw new Error("IsPublic is required, must be not empty");
23
- }
24
- // send create request to the server
25
- const response = await ((_a = this.context
26
- .resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/libraries/management").sendPostJson({
27
- name: name,
28
- region: region,
29
- isPublic: isPublic
30
- }));
31
- // check response status
32
- if (responseUtils_1.ResponseUtils.isFail(response)) {
33
- await responseUtils_1.ResponseUtils.throwError(`Failed to create library ${name}`, response);
34
- }
35
- const library = (await response.json());
36
- return library.libraryId;
37
- }
38
- async addOrgToLibrary(libraryId, organizationId) {
39
- var _a;
40
- if (libraryId === undefined || libraryId === null) {
41
- throw new Error("Organization add to library, libraryId is undefined or null");
42
- }
43
- if (libraryId.length === 0 || libraryId.trim().length === 0) {
44
- throw new Error("Organization add to from library, libraryId is empty");
45
- }
46
- if (organizationId === undefined || organizationId === null) {
47
- throw new Error("Organization add to from library, organizationId is undefined or null");
48
- }
49
- if (organizationId.length === 0 || organizationId.trim().length === 0) {
50
- throw new Error("Organization add to from library, organizationId is empty");
51
- }
52
- const response = await ((_a = this.context
53
- .resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/libraries/management/allowed/organization").sendPutJson({
54
- libraryId: libraryId,
55
- organizationId: organizationId
56
- }));
57
- if (responseUtils_1.ResponseUtils.isFail(response)) {
58
- await responseUtils_1.ResponseUtils.throwError(`Organization ${organizationId} add to library ${libraryId} failed`, response);
59
- }
60
- }
61
- async getLibraries() {
62
- var _a;
63
- const response = await ((_a = this.context
64
- .resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/libraries/management/allowed/organizations").sendGet());
65
- // check response status
66
- if (responseUtils_1.ResponseUtils.isFail(response)) {
67
- await responseUtils_1.ResponseUtils.throwError("Can not get libraries", response);
68
- }
69
- // parse libraries from the server's response
70
- const libraries = (await response.json());
71
- return libraries.libraries;
72
- }
73
- async deleteOrgFromLibrary(libraryId, organizationId) {
74
- var _a;
75
- if (libraryId === undefined || libraryId === null) {
76
- throw new Error("Organization delete from library, libraryId is undefined or null");
77
- }
78
- if (libraryId.length === 0 || libraryId.trim().length === 0) {
79
- throw new Error("Organization delete from library, libraryId is empty");
80
- }
81
- if (organizationId === undefined || organizationId === null) {
82
- throw new Error("Organization delete from library, organizationId is undefined or null");
83
- }
84
- if (organizationId.length === 0 || organizationId.trim().length === 0) {
85
- throw new Error("Organization delete from library, organizationId is empty");
86
- }
87
- // send 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/libraries/management/allowed/organization").searchParam("libraryId", libraryId).searchParam("organizationId", organizationId).sendDelete());
90
- // check response status
91
- if (responseUtils_1.ResponseUtils.isFail(response)) {
92
- await responseUtils_1.ResponseUtils.throwError(`Organization ${organizationId} delete from library ${libraryId}, failed`, response);
93
- }
94
- }
95
- async deleteLibrary(libraryId) {
96
- var _a;
97
- if (libraryId === undefined || libraryId === null) {
98
- throw new Error("Library delete, libraryId is undefined or null");
99
- }
100
- if (libraryId.length === 0 || libraryId.trim().length === 0) {
101
- throw new Error("Library delete, libraryId is empty");
102
- }
103
- // send request to the server
104
- const response = await ((_a = this.context
105
- .resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/libraries/management").searchParam("libraryId", libraryId).sendDelete());
106
- // check response status
107
- if (responseUtils_1.ResponseUtils.isFail(response)) {
108
- await responseUtils_1.ResponseUtils.throwError(`Library ${libraryId} delete, failed`, response);
109
- }
110
- }
111
- }
112
- exports.LibraryManagementImpl = LibraryManagementImpl;
113
8
  class LibrariesImpl extends libraries_1.Libraries {
114
9
  constructor(context) {
115
10
  super();
116
11
  this.context = context;
117
12
  this._libraries = [];
118
- this._management = new LibraryManagementImpl(context);
119
13
  }
120
14
  async initialize() {
121
15
  var _a;
@@ -141,9 +35,6 @@ class LibrariesImpl extends libraries_1.Libraries {
141
35
  getLibraryById(libraryId) {
142
36
  return this._libraries.find((library) => library.id === libraryId);
143
37
  }
144
- get management() {
145
- return this._management;
146
- }
147
38
  }
148
39
  exports.LibrariesImpl = LibrariesImpl;
149
40
  //# sourceMappingURL=libraries.impl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"libraries.impl.js","sourceRoot":"","sources":["../../../../src/storages/library/libraries.impl.ts"],"names":[],"mappings":";;;AAAA,2CAA0D;AAE1D,iDAA4C;AAM5C,0DAAsD;AACtD,gEAA4D;AAI5D,MAAa,qBAAsB,SAAQ,6BAAiB;IAG1D,YAAY,OAAgB;QAC1B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,MAAc,EAAE,QAAiB;;QACjE,IACE,IAAI,KAAK,SAAS;YAClB,IAAI,KAAK,IAAI;YACb,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAClB,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;QACpE,CAAC;QAED,IACE,QAAQ,KAAK,SAAS;YACtB,QAAQ,KAAK,IAAI,EACjB,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAA;QAC5D,CAAC;QAED,oCAAoC;QACpC,MAAM,QAAQ,GAAG,MAAM,CAAA,MAAA,IAAI,CAAC,OAAO;aAChC,OAAO,CAAC,uBAAU,CAAC,0CAClB,cAAc,CAAC,6BAA6B,EAC7C,YAAY,CAAC;YACZ,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAA,CAAA;QAEJ,wBAAw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AU,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,SAAS,CAAC,CAAA;IACpE,CAAC;CAEF;AAzCD,sCAyCC"}
@@ -1,12 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Libraries = exports.LibraryManagement = void 0;
4
- /**
5
- * Library management, you must have permissions to manage libraries
6
- */
7
- class LibraryManagement {
8
- }
9
- exports.LibraryManagement = LibraryManagement;
3
+ exports.Libraries = void 0;
10
4
  /**
11
5
  * Libraries
12
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"libraries.js","sourceRoot":"","sources":["../../../../src/storages/library/libraries.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,MAAsB,iBAAiB;CAyBtC;AAzBD,8CAyBC;AAED;;GAEG;AACH,MAAsB,SAAS;CAiB9B;AAjBD,8BAiBC"}
1
+ {"version":3,"file":"libraries.js","sourceRoot":"","sources":["../../../../src/storages/library/libraries.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAsB,SAAS;CAY9B;AAZD,8BAYC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuralinnovations/dataisland-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "SDK for DataIsland project",
5
5
  "licenses": [
6
6
  {
@@ -5,7 +5,8 @@ import type { Constructor } from "./internal/registry"
5
5
  import { Organizations } from "./storages/organizations/organizations"
6
6
  import { UserProfile } from "./storages/user/userProfile"
7
7
  import { Acquiring } from "./storages/acquirings/acquiring"
8
- import {Libraries} from "./storages/library/libraries"
8
+ import { Libraries } from "./storages/library/libraries"
9
+ import { Administration } from "./storages/administration/administration"
9
10
 
10
11
  /**
11
12
  * DataIsland App instance.
@@ -63,6 +64,11 @@ export abstract class DataIslandApp {
63
64
  */
64
65
  abstract get libraries(): Libraries
65
66
 
67
+ /**
68
+ * Administration.
69
+ */
70
+ abstract get administration(): Administration
71
+
66
72
  /**
67
73
  * Resolve a service from the app.
68
74
  * @param type
@@ -0,0 +1,34 @@
1
+ import { OrganizationId } from "../storages/organizations/organizations"
2
+ import { UserId } from "../storages/user/userProfile"
3
+
4
+ export interface OrganizationStatisticDataDto {
5
+ modelName: string,
6
+ promptUsage: 0,
7
+ completionUsage: 0
8
+ }
9
+
10
+ export interface OrganizationStatisticDto {
11
+ organizationId: OrganizationId
12
+ organizationName: string
13
+ totalUsage: number
14
+ data: OrganizationStatisticDataDto[]
15
+ }
16
+
17
+ export interface OrganizationStatisticResponse {
18
+ dateFrom: string,
19
+ dateTo: string,
20
+ organizationStats: OrganizationStatisticDto[]
21
+ }
22
+
23
+ export interface OrganizationMemberStatisticDto {
24
+ userId: UserId
25
+ userEmail: string
26
+ totalUsage: number
27
+ data: OrganizationStatisticDataDto[]
28
+ }
29
+
30
+ export interface OrganizationMembersStatisticResponse {
31
+ dateFrom: string,
32
+ dateTo: string,
33
+ organizationStats: OrganizationMemberStatisticDto[]
34
+ }
package/src/index.ts CHANGED
@@ -73,7 +73,7 @@ export {
73
73
  export { FolderId } from "./storages/library/folderId"
74
74
  export { LibraryId } from "./storages/library/libraryId"
75
75
  export { Library } from "./storages/library/library"
76
- export { Libraries, LibraryManagement } from "./storages/library/libraries"
76
+ export { Libraries } from "./storages/library/libraries"
77
77
  export { LibraryPage, LibraryParent } from "./storages/library/libraryPage"
78
78
  export { LibraryFolder } from "./storages/library/libraryFolder"
79
79
 
@@ -147,3 +147,6 @@ export async function dataIslandApp(
147
147
  }
148
148
  return await appPromise
149
149
  }
150
+ export {
151
+ LibraryAdministration
152
+ } from "./storages/administration/library.administration"
@@ -32,8 +32,10 @@ import { CookieService } from "../services/cookieService"
32
32
  import { AnonymousService } from "../services/anonymousService"
33
33
  import { Acquiring } from "../storages/acquirings/acquiring"
34
34
  import { AcquiringService } from "../services/acquiringService"
35
- import {Libraries} from "../storages/library/libraries"
36
- import {LibrariesService} from "../services/librariesService"
35
+ import { Libraries } from "../storages/library/libraries"
36
+ import { LibrariesService } from "../services/librariesService"
37
+ import { AdministrationService } from "../services/statistics"
38
+ import { Administration } from "../storages/administration/administration"
37
39
 
38
40
  export class DataIslandAppImpl extends DataIslandApp {
39
41
  readonly name: string
@@ -95,6 +97,10 @@ export class DataIslandAppImpl extends DataIslandApp {
95
97
  return (this.resolve(LibrariesService) as LibrariesService).libraries
96
98
  }
97
99
 
100
+ get administration(): Administration {
101
+ return this.resolve(AdministrationService) as Administration
102
+ }
103
+
98
104
  async invalidate(): Promise<void> {
99
105
  await this.context.execute(new StartCommand())
100
106
  }
@@ -144,6 +150,9 @@ export class DataIslandAppImpl extends DataIslandApp {
144
150
  builder.registerService(LibrariesService, (context: ServiceContext) => {
145
151
  return new LibrariesService(context)
146
152
  })
153
+ builder.registerService(AdministrationService, (context: ServiceContext) => {
154
+ return new AdministrationService(context)
155
+ })
147
156
 
148
157
  // call customer setup
149
158
  if (setup !== undefined) {
@@ -0,0 +1,31 @@
1
+ import { Service, ServiceContext } from "./service"
2
+ import {
3
+ LibraryAdministrationImpl
4
+ } from "../storages/administration/library.administration.impl"
5
+ import {
6
+ LibraryAdministration
7
+ } from "../storages/administration/library.administration"
8
+ import {
9
+ StatisticAdministrationImpl
10
+ } from "../storages/administration/statistics.administration.impl"
11
+ import { Administration } from "../storages/administration/administration"
12
+
13
+ export class AdministrationService extends Service implements Administration {
14
+ private readonly _libraries: LibraryAdministrationImpl
15
+ private readonly _statistic: StatisticAdministrationImpl
16
+
17
+ constructor(context: ServiceContext) {
18
+ super(context)
19
+
20
+ this._libraries = new LibraryAdministrationImpl(context.context)
21
+ this._statistic = new StatisticAdministrationImpl(context.context)
22
+ }
23
+
24
+ get libraries(): LibraryAdministration {
25
+ return this._libraries
26
+ }
27
+
28
+ get statistic(): StatisticAdministrationImpl {
29
+ return this._statistic
30
+ }
31
+ }
@@ -0,0 +1,8 @@
1
+ import { LibraryAdministration } from "./library.administration"
2
+ import { StatisticAdministration } from "./statistics.administration"
3
+
4
+ export abstract class Administration {
5
+ abstract get libraries(): LibraryAdministration ;
6
+
7
+ abstract get statistic(): StatisticAdministration;
8
+ }
@@ -0,0 +1,169 @@
1
+ import { LibraryAdministration } from "./library.administration"
2
+ import { Context } from "../../context"
3
+ import { LibraryId } from "../library/libraryId"
4
+ import { RpcService } from "../../services/rpcService"
5
+ import { ResponseUtils } from "../../services/responseUtils"
6
+ import {
7
+ CreateLibraryResponse,
8
+ LibraryDto,
9
+ LibraryResponse
10
+ } from "../../dto/libraryResponse"
11
+ import { OrganizationId } from "../organizations/organizations"
12
+
13
+ export class LibraryAdministrationImpl extends LibraryAdministration {
14
+ private context: Context
15
+
16
+ constructor(context: Context) {
17
+ super()
18
+ this.context = context
19
+ }
20
+
21
+ async createLibrary(name: string, description: string, region: number, isPublic: boolean): Promise<LibraryId> {
22
+ if (
23
+ name === undefined ||
24
+ name === null ||
25
+ name.trim() === ""
26
+ ) {
27
+ throw new Error("Name for library is required, must be not empty")
28
+ }
29
+
30
+ if (
31
+ description === undefined ||
32
+ description === null ||
33
+ description.trim() === ""
34
+ ) {
35
+ throw new Error("Description for library is required, must be not empty")
36
+ }
37
+
38
+ if (
39
+ isPublic === undefined ||
40
+ isPublic === null
41
+ ) {
42
+ throw new Error("IsPublic is required, must be not empty")
43
+ }
44
+
45
+ // send create request to the server
46
+ const response = await this.context
47
+ .resolve(RpcService)
48
+ ?.requestBuilder("api/v1/libraries/management")
49
+ .sendPostJson({
50
+ name: name,
51
+ description: description,
52
+ region: region,
53
+ isPublic: isPublic
54
+ })
55
+
56
+ // check response status
57
+ if (ResponseUtils.isFail(response)) {
58
+ await ResponseUtils.throwError(`Failed to create library ${name}`, response)
59
+ }
60
+
61
+ const library = (await response!.json()) as CreateLibraryResponse
62
+
63
+ return library.libraryId
64
+ }
65
+
66
+ async addOrgToLibrary(libraryId: LibraryId, organizationId: OrganizationId): Promise<void> {
67
+ if (libraryId === undefined || libraryId === null) {
68
+ throw new Error("Organization add to library, libraryId is undefined or null")
69
+ }
70
+ if (libraryId.length === 0 || libraryId.trim().length === 0) {
71
+ throw new Error("Organization add to from library, libraryId is empty")
72
+ }
73
+ if (organizationId === undefined || organizationId === null) {
74
+ throw new Error("Organization add to from library, organizationId is undefined or null")
75
+ }
76
+ if (organizationId.length === 0 || organizationId.trim().length === 0) {
77
+ throw new Error("Organization add to from library, organizationId is empty")
78
+ }
79
+
80
+ const response = await this.context
81
+ .resolve(RpcService)
82
+ ?.requestBuilder("api/v1/libraries/management/allowed/organization")
83
+ .sendPutJson({
84
+ libraryId: libraryId,
85
+ organizationId: organizationId
86
+ })
87
+ if (ResponseUtils.isFail(response)) {
88
+ await ResponseUtils.throwError(
89
+ `Organization ${organizationId} add to library ${libraryId} failed`,
90
+ response
91
+ )
92
+ }
93
+ }
94
+
95
+ async getLibraries(): Promise<LibraryDto[]> {
96
+ const response = await this.context
97
+ .resolve(RpcService)
98
+ ?.requestBuilder("api/v1/libraries/management/allowed/organizations")
99
+ .sendGet()
100
+
101
+ // check response status
102
+ if (ResponseUtils.isFail(response)) {
103
+ await ResponseUtils.throwError(
104
+ "Can not get libraries",
105
+ response
106
+ )
107
+ }
108
+
109
+ // parse libraries from the server's response
110
+ const libraries = (await response!.json()) as LibraryResponse
111
+
112
+ return libraries.libraries
113
+ }
114
+
115
+ async deleteOrgFromLibrary(libraryId: LibraryId, organizationId: OrganizationId): Promise<void> {
116
+ if (libraryId === undefined || libraryId === null) {
117
+ throw new Error("Organization delete from library, libraryId is undefined or null")
118
+ }
119
+ if (libraryId.length === 0 || libraryId.trim().length === 0) {
120
+ throw new Error("Organization delete from library, libraryId is empty")
121
+ }
122
+ if (organizationId === undefined || organizationId === null) {
123
+ throw new Error("Organization delete from library, organizationId is undefined or null")
124
+ }
125
+ if (organizationId.length === 0 || organizationId.trim().length === 0) {
126
+ throw new Error("Organization delete from library, organizationId is empty")
127
+ }
128
+
129
+ // send request to the server
130
+ const response = await this.context
131
+ .resolve(RpcService)
132
+ ?.requestBuilder("api/v1/libraries/management/allowed/organization")
133
+ .searchParam("libraryId", libraryId)
134
+ .searchParam("organizationId", organizationId)
135
+ .sendDelete()
136
+
137
+ // check response status
138
+ if (ResponseUtils.isFail(response)) {
139
+ await ResponseUtils.throwError(
140
+ `Organization ${organizationId} delete from library ${libraryId}, failed`,
141
+ response
142
+ )
143
+ }
144
+ }
145
+
146
+ async deleteLibrary(libraryId: LibraryId): Promise<void> {
147
+ if (libraryId === undefined || libraryId === null) {
148
+ throw new Error("Library delete, libraryId is undefined or null")
149
+ }
150
+ if (libraryId.length === 0 || libraryId.trim().length === 0) {
151
+ throw new Error("Library delete, libraryId is empty")
152
+ }
153
+
154
+ // send request to the server
155
+ const response = await this.context
156
+ .resolve(RpcService)
157
+ ?.requestBuilder("api/v1/libraries/management")
158
+ .searchParam("libraryId", libraryId)
159
+ .sendDelete()
160
+
161
+ // check response status
162
+ if (ResponseUtils.isFail(response)) {
163
+ await ResponseUtils.throwError(
164
+ `Library ${libraryId} delete, failed`,
165
+ response
166
+ )
167
+ }
168
+ }
169
+ }
@@ -0,0 +1,33 @@
1
+ import { LibraryId } from "../library/libraryId"
2
+ import { OrganizationId } from "../organizations/organizations"
3
+ import { LibraryDto } from "../../dto/libraryResponse"
4
+
5
+ /**
6
+ * Library management, you must have permissions to manage libraries
7
+ */
8
+ export abstract class LibraryAdministration {
9
+ /**
10
+ * Create a new library
11
+ */
12
+ abstract createLibrary(name: string, description: string, region: number, isPublic: boolean): Promise<LibraryId>
13
+
14
+ /**
15
+ * Add permission for an organization to share its data through the library
16
+ */
17
+ abstract addOrgToLibrary(libraryId: LibraryId, organizationId: OrganizationId): Promise<void>
18
+
19
+ /**
20
+ * Get all libraries
21
+ */
22
+ abstract getLibraries(): Promise<LibraryDto[]>
23
+
24
+ /**
25
+ * Delete permission for an organization to share its data through the library
26
+ */
27
+ abstract deleteOrgFromLibrary(libraryId: LibraryId, organizationId: OrganizationId): Promise<void>
28
+
29
+ /**
30
+ * Delete a library by id
31
+ */
32
+ abstract deleteLibrary(libraryId: LibraryId): Promise<void>
33
+ }