@neuralinnovations/dataisland-sdk 0.0.1-dev7 → 0.0.1-dev71
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/LICENSE +201 -0
- package/README.md +204 -6
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +103 -0
- package/dist/src/appBuilder.d.ts +44 -0
- package/dist/src/appBuilder.d.ts.map +1 -0
- package/dist/src/appBuilder.js +10 -0
- package/dist/src/appBuilder.js.map +1 -0
- package/dist/src/commands/deleteUserFullCommandHandler.d.ts +7 -0
- package/dist/src/commands/deleteUserFullCommandHandler.d.ts.map +1 -0
- package/dist/src/commands/deleteUserFullCommandHandler.js +21 -0
- package/dist/src/commands/deleteUserFullCommandHandler.js.map +1 -0
- package/dist/src/commands/startCommandHandler.d.ts +7 -0
- package/dist/src/commands/startCommandHandler.d.ts.map +1 -0
- package/dist/src/commands/startCommandHandler.js +30 -0
- package/dist/src/commands/startCommandHandler.js.map +1 -0
- package/dist/src/context.d.ts +24 -0
- package/dist/src/context.d.ts.map +1 -0
- package/dist/src/context.js +31 -0
- package/dist/src/context.js.map +1 -0
- package/dist/src/credentials.d.ts +39 -0
- package/dist/src/credentials.d.ts.map +1 -0
- package/dist/src/credentials.js +105 -0
- package/dist/src/credentials.js.map +1 -0
- package/dist/src/dataIslandApp.d.ts +55 -0
- package/dist/src/dataIslandApp.d.ts.map +1 -0
- package/dist/src/dataIslandApp.js +10 -0
- package/dist/src/dataIslandApp.js.map +1 -0
- package/dist/src/disposable.d.ts +84 -0
- package/dist/src/disposable.d.ts.map +1 -0
- package/dist/src/disposable.js +147 -0
- package/dist/src/disposable.js.map +1 -0
- package/dist/src/dto/accessGroupResponse.d.ts +27 -0
- package/dist/src/dto/accessGroupResponse.d.ts.map +1 -0
- package/dist/src/dto/accessGroupResponse.js +3 -0
- package/dist/src/dto/accessGroupResponse.js.map +1 -0
- package/dist/src/dto/acquiringResponse.d.ts +46 -0
- package/dist/src/dto/acquiringResponse.d.ts.map +1 -0
- package/dist/src/dto/acquiringResponse.js +11 -0
- package/dist/src/dto/acquiringResponse.js.map +1 -0
- package/dist/src/dto/apiKeyResponse.d.ts +19 -0
- package/dist/src/dto/apiKeyResponse.d.ts.map +1 -0
- package/dist/src/dto/apiKeyResponse.js +3 -0
- package/dist/src/dto/apiKeyResponse.js.map +1 -0
- package/dist/src/dto/badRequestResponse.d.ts +6 -0
- package/dist/src/dto/badRequestResponse.d.ts.map +1 -0
- package/dist/src/dto/badRequestResponse.js +3 -0
- package/dist/src/dto/badRequestResponse.js.map +1 -0
- package/dist/src/dto/chatResponse.d.ts +84 -0
- package/dist/src/dto/chatResponse.d.ts.map +1 -0
- package/dist/src/dto/chatResponse.js +45 -0
- package/dist/src/dto/chatResponse.js.map +1 -0
- package/dist/src/dto/invitesResponse.d.ts +21 -0
- package/dist/src/dto/invitesResponse.d.ts.map +1 -0
- package/dist/src/dto/invitesResponse.js +3 -0
- package/dist/src/dto/invitesResponse.js.map +1 -0
- package/dist/src/dto/limitsResponse.d.ts +29 -0
- package/dist/src/dto/limitsResponse.d.ts.map +1 -0
- package/dist/src/dto/limitsResponse.js +13 -0
- package/dist/src/dto/limitsResponse.js.map +1 -0
- package/dist/src/dto/quizResponse.d.ts +11 -0
- package/dist/src/dto/quizResponse.d.ts.map +1 -0
- package/dist/src/dto/quizResponse.js +3 -0
- package/dist/src/dto/quizResponse.js.map +1 -0
- package/dist/src/dto/statisticsResponse.d.ts +11 -0
- package/dist/src/dto/statisticsResponse.d.ts.map +1 -0
- package/dist/src/dto/statisticsResponse.js +3 -0
- package/dist/src/dto/statisticsResponse.js.map +1 -0
- package/dist/src/dto/userInfoResponse.d.ts +92 -0
- package/dist/src/dto/userInfoResponse.d.ts.map +1 -0
- package/dist/src/dto/userInfoResponse.js +3 -0
- package/dist/src/dto/userInfoResponse.js.map +1 -0
- package/dist/src/dto/workspacesResponse.d.ts +68 -0
- package/dist/src/dto/workspacesResponse.d.ts.map +1 -0
- package/dist/src/dto/workspacesResponse.js +21 -0
- package/dist/src/dto/workspacesResponse.js.map +1 -0
- package/dist/src/events.d.ts +17 -0
- package/dist/src/events.d.ts.map +1 -0
- package/dist/src/events.js +52 -0
- package/dist/src/events.js.map +1 -0
- package/dist/src/index.d.ts +75 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +124 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/internal/app.impl.d.ts +30 -0
- package/dist/src/internal/app.impl.d.ts.map +1 -0
- package/dist/src/internal/app.impl.js +180 -0
- package/dist/src/internal/app.impl.js.map +1 -0
- package/dist/src/internal/appBuilder.impl.d.ts +27 -0
- package/dist/src/internal/appBuilder.impl.d.ts.map +1 -0
- package/dist/src/internal/appBuilder.impl.js +71 -0
- package/dist/src/internal/appBuilder.impl.js.map +1 -0
- package/dist/src/internal/createApp.impl.d.ts +4 -0
- package/dist/src/internal/createApp.impl.d.ts.map +1 -0
- package/dist/src/internal/createApp.impl.js +11 -0
- package/dist/src/internal/createApp.impl.js.map +1 -0
- package/dist/src/internal/registry.d.ts +66 -0
- package/dist/src/internal/registry.d.ts.map +1 -0
- package/dist/src/internal/registry.js +114 -0
- package/dist/src/internal/registry.js.map +1 -0
- package/dist/src/middleware.d.ts +6 -0
- package/dist/src/middleware.d.ts.map +1 -0
- package/dist/src/middleware.js +3 -0
- package/dist/src/middleware.js.map +1 -0
- package/dist/src/services/acquiringService.d.ts +9 -0
- package/dist/src/services/acquiringService.d.ts.map +1 -0
- package/dist/src/services/acquiringService.js +19 -0
- package/dist/src/services/acquiringService.js.map +1 -0
- package/dist/src/services/anonymousService.d.ts +8 -0
- package/dist/src/services/anonymousService.d.ts.map +1 -0
- package/dist/src/services/anonymousService.js +41 -0
- package/dist/src/services/anonymousService.js.map +1 -0
- package/dist/src/services/commandService.d.ts +18 -0
- package/dist/src/services/commandService.d.ts.map +1 -0
- package/dist/src/services/commandService.js +40 -0
- package/dist/src/services/commandService.js.map +1 -0
- package/dist/src/services/cookieService.d.ts +7 -0
- package/dist/src/services/cookieService.d.ts.map +1 -0
- package/dist/src/services/cookieService.js +18 -0
- package/dist/src/services/cookieService.js.map +1 -0
- package/dist/src/services/credentialService.d.ts +9 -0
- package/dist/src/services/credentialService.d.ts.map +1 -0
- package/dist/src/services/credentialService.js +26 -0
- package/dist/src/services/credentialService.js.map +1 -0
- package/dist/src/services/httpMethod.d.ts +2 -0
- package/dist/src/services/httpMethod.d.ts.map +1 -0
- package/dist/src/services/httpMethod.js +3 -0
- package/dist/src/services/httpMethod.js.map +1 -0
- package/dist/src/services/middlewareService.d.ts +10 -0
- package/dist/src/services/middlewareService.d.ts.map +1 -0
- package/dist/src/services/middlewareService.js +34 -0
- package/dist/src/services/middlewareService.js.map +1 -0
- package/dist/src/services/organizationService.d.ts +10 -0
- package/dist/src/services/organizationService.d.ts.map +1 -0
- package/dist/src/services/organizationService.js +19 -0
- package/dist/src/services/organizationService.js.map +1 -0
- package/dist/src/services/requestBuilder.d.ts +19 -0
- package/dist/src/services/requestBuilder.d.ts.map +1 -0
- package/dist/src/services/requestBuilder.js +133 -0
- package/dist/src/services/requestBuilder.js.map +1 -0
- package/dist/src/services/responseUtils.d.ts +8 -0
- package/dist/src/services/responseUtils.d.ts.map +1 -0
- package/dist/src/services/responseUtils.js +40 -0
- package/dist/src/services/responseUtils.js.map +1 -0
- package/dist/src/services/rpcService.d.ts +77 -0
- package/dist/src/services/rpcService.d.ts.map +1 -0
- package/dist/src/services/rpcService.js +125 -0
- package/dist/src/services/rpcService.js.map +1 -0
- package/dist/src/services/service.d.ts +21 -0
- package/dist/src/services/service.d.ts.map +1 -0
- package/dist/src/services/service.js +41 -0
- package/dist/src/services/service.js.map +1 -0
- package/dist/src/services/userProfileService.d.ts +10 -0
- package/dist/src/services/userProfileService.d.ts.map +1 -0
- package/dist/src/services/userProfileService.js +59 -0
- package/dist/src/services/userProfileService.js.map +1 -0
- package/dist/src/storages/acquirings/acquiring.d.ts +41 -0
- package/dist/src/storages/acquirings/acquiring.d.ts.map +1 -0
- package/dist/src/storages/acquirings/acquiring.impl.d.ts +20 -0
- package/dist/src/storages/acquirings/acquiring.impl.d.ts.map +1 -0
- package/dist/src/storages/acquirings/acquiring.impl.js +92 -0
- package/dist/src/storages/acquirings/acquiring.impl.js.map +1 -0
- package/dist/src/storages/acquirings/acquiring.js +10 -0
- package/dist/src/storages/acquirings/acquiring.js.map +1 -0
- package/dist/src/storages/chats/answer.d.ts +41 -0
- package/dist/src/storages/chats/answer.d.ts.map +1 -0
- package/dist/src/storages/chats/answer.impl.d.ts +29 -0
- package/dist/src/storages/chats/answer.impl.d.ts.map +1 -0
- package/dist/src/storages/chats/answer.impl.js +134 -0
- package/dist/src/storages/chats/answer.impl.js.map +1 -0
- package/dist/src/storages/chats/answer.js +15 -0
- package/dist/src/storages/chats/answer.js.map +1 -0
- package/dist/src/storages/chats/chat.d.ts +55 -0
- package/dist/src/storages/chats/chat.d.ts.map +1 -0
- package/dist/src/storages/chats/chat.impl.d.ts +28 -0
- package/dist/src/storages/chats/chat.impl.d.ts.map +1 -0
- package/dist/src/storages/chats/chat.impl.js +106 -0
- package/dist/src/storages/chats/chat.impl.js.map +1 -0
- package/dist/src/storages/chats/chat.js +12 -0
- package/dist/src/storages/chats/chat.js.map +1 -0
- package/dist/src/storages/chats/chats.d.ts +51 -0
- package/dist/src/storages/chats/chats.d.ts.map +1 -0
- package/dist/src/storages/chats/chats.impl.d.ts +20 -0
- package/dist/src/storages/chats/chats.impl.d.ts.map +1 -0
- package/dist/src/storages/chats/chats.impl.js +184 -0
- package/dist/src/storages/chats/chats.impl.js.map +1 -0
- package/dist/src/storages/chats/chats.js +16 -0
- package/dist/src/storages/chats/chats.js.map +1 -0
- package/dist/src/storages/files/file.d.ts +59 -0
- package/dist/src/storages/files/file.d.ts.map +1 -0
- package/dist/src/storages/files/file.impl.d.ts +28 -0
- package/dist/src/storages/files/file.impl.d.ts.map +1 -0
- package/dist/src/storages/files/file.impl.js +130 -0
- package/dist/src/storages/files/file.impl.js.map +1 -0
- package/dist/src/storages/files/file.js +17 -0
- package/dist/src/storages/files/file.js.map +1 -0
- package/dist/src/storages/files/files.d.ts +39 -0
- package/dist/src/storages/files/files.d.ts.map +1 -0
- package/dist/src/storages/files/files.impl.d.ts +24 -0
- package/dist/src/storages/files/files.impl.d.ts.map +1 -0
- package/dist/src/storages/files/files.impl.js +168 -0
- package/dist/src/storages/files/files.impl.js.map +1 -0
- package/dist/src/storages/files/files.js +20 -0
- package/dist/src/storages/files/files.js.map +1 -0
- package/dist/src/storages/files/filesPage.d.ts +28 -0
- package/dist/src/storages/files/filesPage.d.ts.map +1 -0
- package/dist/src/storages/files/filesPage.impl.d.ts +15 -0
- package/dist/src/storages/files/filesPage.impl.d.ts.map +1 -0
- package/dist/src/storages/files/filesPage.impl.js +38 -0
- package/dist/src/storages/files/filesPage.impl.js.map +1 -0
- package/dist/src/storages/files/filesPage.js +10 -0
- package/dist/src/storages/files/filesPage.js.map +1 -0
- package/dist/src/storages/groups/group.d.ts +63 -0
- package/dist/src/storages/groups/group.d.ts.map +1 -0
- package/dist/src/storages/groups/group.impl.d.ts +38 -0
- package/dist/src/storages/groups/group.impl.d.ts.map +1 -0
- package/dist/src/storages/groups/group.impl.js +210 -0
- package/dist/src/storages/groups/group.impl.js.map +1 -0
- package/dist/src/storages/groups/group.js +15 -0
- package/dist/src/storages/groups/group.js.map +1 -0
- package/dist/src/storages/groups/groups.d.ts +43 -0
- package/dist/src/storages/groups/groups.d.ts.map +1 -0
- package/dist/src/storages/groups/groups.impl.d.ts +31 -0
- package/dist/src/storages/groups/groups.impl.d.ts.map +1 -0
- package/dist/src/storages/groups/groups.impl.js +136 -0
- package/dist/src/storages/groups/groups.impl.js.map +1 -0
- package/dist/src/storages/groups/groups.js +20 -0
- package/dist/src/storages/groups/groups.js.map +1 -0
- package/dist/src/storages/organizations/organization.d.ts +137 -0
- package/dist/src/storages/organizations/organization.d.ts.map +1 -0
- package/dist/src/storages/organizations/organization.impl.d.ts +55 -0
- package/dist/src/storages/organizations/organization.impl.d.ts.map +1 -0
- package/dist/src/storages/organizations/organization.impl.js +362 -0
- package/dist/src/storages/organizations/organization.impl.js.map +1 -0
- package/dist/src/storages/organizations/organization.js +18 -0
- package/dist/src/storages/organizations/organization.js.map +1 -0
- package/dist/src/storages/organizations/organizations.d.ts +77 -0
- package/dist/src/storages/organizations/organizations.d.ts.map +1 -0
- package/dist/src/storages/organizations/organizations.impl.d.ts +45 -0
- package/dist/src/storages/organizations/organizations.impl.d.ts.map +1 -0
- package/dist/src/storages/organizations/organizations.impl.js +242 -0
- package/dist/src/storages/organizations/organizations.impl.js.map +1 -0
- package/dist/src/storages/organizations/organizations.js +20 -0
- package/dist/src/storages/organizations/organizations.js.map +1 -0
- package/dist/src/storages/user/userProfile.d.ts +64 -0
- package/dist/src/storages/user/userProfile.d.ts.map +1 -0
- package/dist/src/storages/user/userProfile.impl.d.ts +24 -0
- package/dist/src/storages/user/userProfile.impl.d.ts.map +1 -0
- package/dist/src/storages/user/userProfile.impl.js +129 -0
- package/dist/src/storages/user/userProfile.impl.js.map +1 -0
- package/dist/src/storages/user/userProfile.js +12 -0
- package/dist/src/storages/user/userProfile.js.map +1 -0
- package/dist/src/storages/workspaces/workspace.d.ts +44 -0
- package/dist/src/storages/workspaces/workspace.d.ts.map +1 -0
- package/dist/src/storages/workspaces/workspace.impl.d.ts +23 -0
- package/dist/src/storages/workspaces/workspace.impl.d.ts.map +1 -0
- package/dist/src/storages/workspaces/workspace.impl.js +98 -0
- package/dist/src/storages/workspaces/workspace.impl.js.map +1 -0
- package/dist/src/storages/workspaces/workspace.js +18 -0
- package/dist/src/storages/workspaces/workspace.js.map +1 -0
- package/dist/src/storages/workspaces/workspaces.d.ts +47 -0
- package/dist/src/storages/workspaces/workspaces.d.ts.map +1 -0
- package/dist/src/storages/workspaces/workspaces.impl.d.ts +33 -0
- package/dist/src/storages/workspaces/workspaces.impl.d.ts.map +1 -0
- package/dist/src/storages/workspaces/workspaces.impl.js +153 -0
- package/dist/src/storages/workspaces/workspaces.impl.js.map +1 -0
- package/dist/src/storages/workspaces/workspaces.js +19 -0
- package/dist/src/storages/workspaces/workspaces.js.map +1 -0
- package/dist/src/unitTest.d.ts +12 -0
- package/dist/src/unitTest.d.ts.map +1 -0
- package/dist/src/unitTest.js +44 -0
- package/dist/src/unitTest.js.map +1 -0
- package/dist/src/utils/browserUtils.d.ts +4 -0
- package/dist/src/utils/browserUtils.d.ts.map +1 -0
- package/dist/src/utils/browserUtils.js +64 -0
- package/dist/src/utils/browserUtils.js.map +1 -0
- package/dist/src/utils/request.d.ts +6 -0
- package/dist/src/utils/request.d.ts.map +1 -0
- package/dist/src/utils/request.js +3 -0
- package/dist/src/utils/request.js.map +1 -0
- package/dist/src/utils/utils.d.ts +3 -0
- package/dist/src/utils/utils.d.ts.map +1 -0
- package/dist/src/utils/utils.js +13 -0
- package/dist/src/utils/utils.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +44 -5
- package/src/commands/deleteUserFullCommandHandler.ts +19 -0
- package/src/commands/startCommandHandler.ts +19 -5
- package/src/context.ts +4 -2
- package/src/credentials.ts +46 -0
- package/src/dataIslandApp.ts +8 -2
- package/src/disposable.ts +18 -5
- package/src/dto/accessGroupResponse.ts +17 -16
- package/src/dto/acquiringResponse.ts +54 -0
- package/src/dto/apiKeyResponse.ts +23 -0
- package/src/dto/badRequestResponse.ts +6 -0
- package/src/dto/chatResponse.ts +60 -54
- package/src/dto/invitesResponse.ts +25 -0
- package/src/dto/limitsResponse.ts +32 -0
- package/src/dto/quizResponse.ts +12 -0
- package/src/dto/statisticsResponse.ts +12 -0
- package/src/dto/userInfoResponse.ts +64 -2
- package/src/dto/workspacesResponse.ts +38 -3
- package/src/index.ts +59 -16
- package/src/internal/app.impl.ts +54 -12
- package/src/internal/registry.ts +54 -6
- package/src/middleware.ts +2 -0
- package/src/services/acquiringService.ts +21 -0
- package/src/services/anonymousService.ts +43 -0
- package/src/services/commandService.ts +4 -2
- package/src/services/cookieService.ts +16 -0
- package/src/services/httpMethod.ts +1 -0
- package/src/services/middlewareService.ts +1 -0
- package/src/services/organizationService.ts +2 -2
- package/src/services/requestBuilder.ts +48 -8
- package/src/services/responseUtils.ts +12 -0
- package/src/services/rpcService.ts +1 -0
- package/src/services/userProfileService.ts +36 -4
- package/src/storages/acquirings/acquiring.impl.ts +132 -0
- package/src/storages/acquirings/acquiring.ts +54 -0
- package/src/storages/chats/answer.impl.ts +178 -0
- package/src/storages/chats/answer.ts +53 -0
- package/src/storages/chats/chat.impl.ts +139 -0
- package/src/storages/chats/chat.ts +70 -0
- package/src/storages/chats/chats.impl.ts +255 -0
- package/src/storages/chats/chats.ts +60 -0
- package/src/storages/files/file.impl.ts +162 -0
- package/src/storages/files/file.ts +74 -0
- package/src/storages/{files.impl.ts → files/files.impl.ts} +89 -67
- package/src/storages/{files.ts → files/files.ts} +14 -7
- package/src/storages/files/filesPage.impl.ts +37 -0
- package/src/storages/{filesPage.ts → files/filesPage.ts} +6 -0
- package/src/storages/groups/group.impl.ts +276 -0
- package/src/storages/groups/group.ts +73 -0
- package/src/storages/groups/groups.impl.ts +180 -0
- package/src/storages/groups/groups.ts +50 -0
- package/src/storages/organizations/organization.impl.ts +555 -0
- package/src/storages/organizations/organization.ts +168 -0
- package/src/storages/{organizations.impl.ts → organizations/organizations.impl.ts} +161 -12
- package/src/storages/organizations/organizations.ts +93 -0
- package/src/storages/user/userProfile.impl.ts +157 -0
- package/src/storages/user/userProfile.ts +81 -0
- package/src/storages/{workspace.impl.ts → workspaces/workspace.impl.ts} +27 -7
- package/src/storages/{workspace.ts → workspaces/workspace.ts} +8 -3
- package/src/storages/{workspaces.impl.ts → workspaces/workspaces.impl.ts} +29 -32
- package/src/storages/{workspaces.ts → workspaces/workspaces.ts} +6 -2
- package/src/unitTest.ts +3 -3
- package/src/utils/browserUtils.ts +68 -0
- package/src/utils/request.ts +6 -0
- package/src/utils/utils.ts +8 -0
- package/.browserslistrc +0 -5
- package/.editorconfig +0 -25
- package/.eslintrc.json +0 -44
- package/.github/workflows/publish-npm.yml +0 -41
- package/.prettierignore +0 -1
- package/.prettierrc +0 -11
- package/.yarnrc +0 -2
- package/babel.config.js +0 -6
- package/docs/.nojekyll +0 -1
- package/docs/classes/BasicCredential.md +0 -80
- package/docs/classes/BearerCredential.md +0 -72
- package/docs/classes/Chat.md +0 -69
- package/docs/classes/Chats.md +0 -90
- package/docs/classes/CredentialBase.md +0 -54
- package/docs/classes/DataIslandApp.md +0 -168
- package/docs/classes/DebugCredential.md +0 -72
- package/docs/classes/DefaultCredential.md +0 -56
- package/docs/classes/DisposableContainer.md +0 -177
- package/docs/classes/EventDispatcher.md +0 -109
- package/docs/classes/File.md +0 -79
- package/docs/classes/Files.md +0 -136
- package/docs/classes/FilesPage.md +0 -76
- package/docs/classes/Group.md +0 -191
- package/docs/classes/Groups.md +0 -130
- package/docs/classes/Lifetime.md +0 -108
- package/docs/classes/Organization.md +0 -89
- package/docs/classes/Organizations.md +0 -195
- package/docs/classes/UserProfile.md +0 -156
- package/docs/classes/Workspace.md +0 -165
- package/docs/classes/Workspaces.md +0 -189
- package/docs/enums/ChatAnswer.md +0 -22
- package/docs/enums/ChatsEvent.md +0 -22
- package/docs/enums/FilesEvent.md +0 -24
- package/docs/enums/GroupEvent.md +0 -29
- package/docs/enums/OrganizationsEvent.md +0 -31
- package/docs/enums/UserEvent.md +0 -15
- package/docs/enums/WorkspaceEvent.md +0 -17
- package/docs/enums/WorkspacesEvent.md +0 -24
- package/docs/interfaces/Disposable.md +0 -25
- package/docs/interfaces/Event.md +0 -58
- package/docs/interfaces/EventSubscriber.md +0 -41
- package/docs/interfaces/Input.md +0 -35
- package/docs/modules.md +0 -205
- package/jest.config.ts +0 -199
- package/jest.setup.ts +0 -2
- package/scripts/docs/index.js +0 -15
- package/src/storages/chat.ts +0 -21
- package/src/storages/chats.ts +0 -17
- package/src/storages/file.impl.ts +0 -69
- package/src/storages/file.ts +0 -28
- package/src/storages/groups.impl.ts +0 -337
- package/src/storages/groups.ts +0 -43
- package/src/storages/organization.impl.ts +0 -68
- package/src/storages/organization.ts +0 -33
- package/src/storages/organizations.ts +0 -56
- package/src/storages/userProfile.impl.ts +0 -56
- package/src/storages/userProfile.ts +0 -42
- package/test/commands.test.ts +0 -24
- package/test/data/test_file.pdf +0 -0
- package/test/disposable.test.ts +0 -39
- package/test/events.test.ts +0 -151
- package/test/files.test.ts +0 -52
- package/test/index.test.ts +0 -122
- package/test/organization.test.ts +0 -57
- package/test/registry.test.ts +0 -44
- package/test/services.test.ts +0 -56
- package/test/setup.ts +0 -54
- package/test/unitTest.test.ts +0 -21
- package/test/workspace.test.ts +0 -71
- package/tsconfig.json +0 -31
package/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
@neuralinnovations/dataisland-sdk/[Exports](./docs/modules.md)
|
2
2
|
|
3
|
+

|
4
|
+

|
5
|
+
|
3
6
|
# DataIsland Client SDK
|
4
7
|
|
5
8
|
The DataIsland Client SDK is a TypeScript library designed to seamlessly integrate DataIsland web services into websites.
|
@@ -12,9 +15,11 @@ The DataIsland Client SDK is a TypeScript library designed to seamlessly integra
|
|
12
15
|
4. [Use chat](#use-chat)
|
13
16
|
5. [Use workspaces](#use-workspaces)
|
14
17
|
6. [Use files](#use-files)
|
15
|
-
7. [Use
|
16
|
-
8. [Use
|
17
|
-
9. [
|
18
|
+
7. [Use acquiring](#use-acquiring)
|
19
|
+
8. [Use access groups](#use-access-groups)
|
20
|
+
9. [Use statistics](#use-statistics)
|
21
|
+
10. [Use invites](#use-invites)
|
22
|
+
11. [References](docs/modules.md)
|
18
23
|
|
19
24
|
---
|
20
25
|
|
@@ -52,7 +57,7 @@ _It is immpossible to create more than one app sdk intance with same name._
|
|
52
57
|
|
53
58
|
**HOST** is a DataIsland API url which can be passed using environment file.
|
54
59
|
|
55
|
-
Second required parameter for builder is Credentials. It is recomended to use Bearer credentials instance and pass your user **TOKEN** in order to get access to API.
|
60
|
+
Second required parameter for builder is Credentials. It is recomended to use Bearer credentials instance and pass your user **TOKEN** in order to get access to API. Use Custom credentials for different authentication types.
|
56
61
|
|
57
62
|
You can also add requests middlewares with builder options.
|
58
63
|
|
@@ -94,6 +99,7 @@ const org = await app.organizations.create(
|
|
94
99
|
'your-organization-description'
|
95
100
|
)
|
96
101
|
```
|
102
|
+
|
97
103
|
1. [Organization](docs/classes/Organization.md) is a main object for user data management. It contains of users, workspaces and chats.
|
98
104
|
2. [Organizations](docs/classes/Organizations.md) is a collection of organizations.
|
99
105
|
|
@@ -101,7 +107,7 @@ const org = await app.organizations.create(
|
|
101
107
|
|
102
108
|
### Use workspaces
|
103
109
|
|
104
|
-
Workspaces are folder-like objects used to store files and controll access to it using acces groups. During creation you must pass organization Id, name and description of new workspace and regulation options. You can pass existing group ID or ask to create new group for this workspace in regulation section.
|
110
|
+
Workspaces are folder-like objects used to store files and controll access to it using acces groups. During creation you must pass organization Id, name and description of new workspace and regulation options. You can pass existing group ID or ask to create new group for this workspace in regulation section.
|
105
111
|
|
106
112
|
Default workspace creation example:
|
107
113
|
|
@@ -130,16 +136,208 @@ const workspace = await org.workspaces.create(
|
|
130
136
|
}
|
131
137
|
)
|
132
138
|
```
|
133
|
-
1. [Workspace](docs/classes/Workspace.md) is a main object for files management. It contains of files, chats and access groups.
|
134
139
|
|
140
|
+
You can get workspace total file count with:
|
141
|
+
|
142
|
+
```
|
143
|
+
const count = workspace.totalCount()
|
144
|
+
```
|
145
|
+
|
146
|
+
1. [Workspace](docs/classes/Workspace.md) is a main object for files management. It contains of files, chats and access groups.
|
135
147
|
2. [Worskpaces](docs/classes/Workspaces.md) is a collection of workspaces.
|
136
148
|
|
137
149
|
---
|
138
150
|
|
139
151
|
### Use files
|
140
152
|
|
153
|
+
Files are part of workspaces and can be managed through workspace interface. You can upload, preview and delete files. Upload and delete operations are working with list parameters ( files list for upload, file ids list for delete )
|
154
|
+
|
155
|
+
Default file upload example:
|
156
|
+
|
157
|
+
```
|
158
|
+
const file = await workspace.files.upload([file])
|
159
|
+
```
|
160
|
+
|
161
|
+
The file uploading process always takes some time, so you can track its uploading status using subscription for files UPDATED event. Status tracking starts with "status" property of file. It can be UPLOADING, SUCCESS or FAILED. The "progress" property includes detailed view on file uploading progress, including a success indicator, the total count of file parts, the count of uploaded file parts, and an error field. The success indicator represents whether the last file part was uploaded successfully or not. If one of the parts fails, the uploading process is stopped, and the "error" field contains the text of the failure reason. Remeber to check file status before making a subscription, because it could be already SUCCESS or FAILED
|
162
|
+
|
163
|
+
```
|
164
|
+
if (file.status !== FileStatus.UPLOADING) {
|
165
|
+
// Show results
|
166
|
+
} else {
|
167
|
+
file.subscribe((event) => {
|
168
|
+
const progress = event.data.progress
|
169
|
+
})
|
170
|
+
}
|
171
|
+
```
|
172
|
+
|
173
|
+
You can get file simply using get method:
|
174
|
+
|
175
|
+
```
|
176
|
+
const file = await workspace.files.get(fileId)
|
177
|
+
```
|
178
|
+
|
179
|
+
File url's for preview or full view are available with url properties of file:
|
180
|
+
|
181
|
+
```
|
182
|
+
const url = file.url
|
183
|
+
const previewUrl = file.previewUrl
|
184
|
+
```
|
185
|
+
|
186
|
+
Delete file example:
|
187
|
+
|
188
|
+
```
|
189
|
+
await workspace.files.delete([file.id])
|
190
|
+
```
|
191
|
+
|
192
|
+
You can retrieve a list of files from a workspace using the "query" method. It involves several straightforward parameters: a search query for filtering files based on user input (if empty, no filter is applied), page number, and the number of files per page. The method returns an object containing the file list, selected page number, total page count, and other relevant information.
|
193
|
+
|
194
|
+
Here is an example:
|
195
|
+
|
196
|
+
```
|
197
|
+
const filesPage = await workspace.files.query(
|
198
|
+
"you-user-search-input",
|
199
|
+
0 - page number,
|
200
|
+
20 - files limit per page )
|
201
|
+
```
|
202
|
+
|
203
|
+
#### Events
|
204
|
+
|
205
|
+
You can subscribe to different file event in order to react for file status changes.
|
206
|
+
|
207
|
+
Available events:
|
208
|
+
|
209
|
+
* ADDED
|
210
|
+
* UPDATED
|
211
|
+
* REMOVED
|
212
|
+
|
213
|
+
Subscribe on event example:
|
214
|
+
|
215
|
+
```
|
216
|
+
workspace.files.subscribe((event) => { const file = event.data }, FilesEvent.ADDED)
|
217
|
+
```
|
218
|
+
|
219
|
+
---
|
220
|
+
|
141
221
|
### Use chat
|
142
222
|
|
223
|
+
Chat is object that stores one user-assistant chat with it's messages and other data. It can be easily created and deleted useing **chats** property of organization. Chat name is always generated by server. You also have to pass "model" during chat creation. Possible options are "search" and "chat". There is also additional parameter "clientContext", where you can pass additional info or instructions for the model.
|
224
|
+
|
225
|
+
```
|
226
|
+
const chat = await organization.chats.create("search", "My name is Gary")
|
227
|
+
|
228
|
+
await organization.chats.delete(your_chat_id)
|
229
|
+
```
|
230
|
+
|
231
|
+
You can access all chats list using **collection** property.
|
232
|
+
|
233
|
+
```
|
234
|
+
const chats = organization.chats.collection
|
235
|
+
```
|
236
|
+
|
237
|
+
Main chat functionality is answer handling. You can create and cancel answer in the chat. Answer is a data object which contains question, answer (tokens), and answer sources.
|
238
|
+
|
239
|
+
Here are some examples:
|
240
|
+
|
241
|
+
```
|
242
|
+
const answer = await chat.ask("Hello!", ChatAnswerType.SHORT)
|
243
|
+
|
244
|
+
await chat.getAnswer(answer.id).cancel()
|
245
|
+
```
|
246
|
+
|
247
|
+
Main statuses are RUNNING, SUCCESS, CANCELED, FAIL. You can use them to correctly draw answer in chat.
|
248
|
+
|
249
|
+
```
|
250
|
+
status = chat.getAnswer(answer.id).status
|
251
|
+
```
|
252
|
+
|
253
|
+
You can access answer for your question in "tokens" property, question is stored in "question' property.
|
254
|
+
|
255
|
+
```
|
256
|
+
const tokens = await chat.getAnswer(answer.id).tokens
|
257
|
+
const question = await chat.getAnswer(answer.id).question
|
258
|
+
```
|
259
|
+
|
260
|
+
Every step also includes Sources that were used during execution. Property "sources" contains all sources of all answer steps.
|
261
|
+
|
262
|
+
```
|
263
|
+
const sources = await chat.getAnswer(answer.id).sources
|
264
|
+
```
|
265
|
+
|
266
|
+
If you want to get chat history, you can access chat.collection property
|
267
|
+
|
268
|
+
```
|
269
|
+
const answers = chat.collection
|
270
|
+
```
|
271
|
+
|
272
|
+
#### Events
|
273
|
+
|
274
|
+
Chat object have a variety of events. You can track chat and answer creation and deletion. Answer also contains "update" event for updating answer view and stream answer tokens.
|
275
|
+
|
276
|
+
Chat events:
|
277
|
+
|
278
|
+
* ADDED
|
279
|
+
* REMOVED
|
280
|
+
|
281
|
+
Answer events:
|
282
|
+
|
283
|
+
* ADDED
|
284
|
+
* CANCELLED
|
285
|
+
* UPDATED
|
286
|
+
|
287
|
+
Event subscribe example:
|
288
|
+
|
289
|
+
```
|
290
|
+
chat.answer.subscribe((event) => { const answer = event.data }, AnswerEvent.UPDATED)
|
291
|
+
```
|
292
|
+
|
293
|
+
### Use acquiring
|
294
|
+
|
295
|
+
Users can buy subscriptions if they want to increase their limits. You can create an order for subscriptions passing key of selected plan. All available aubscription plans, as well as order creation and user active plan you can get in acquiring service.
|
296
|
+
|
297
|
+
```
|
298
|
+
const plans = app.acquiring.getPlans()
|
299
|
+
const subscription_request_data = app.acquiring.createOrder(selected_plan_key)
|
300
|
+
const userPlan = app.acquiring.getUserPlan()
|
301
|
+
```
|
302
|
+
|
143
303
|
### Use access groups
|
144
304
|
|
305
|
+
You can manage users access to workspaces and different features using access groups functionality. Group control methods are available in organization **groups** property. Also you can change workspaces available for group, change permits and control users.
|
306
|
+
|
307
|
+
```
|
308
|
+
const group = await organization.accessGroups.create(
|
309
|
+
"your_group_name",
|
310
|
+
permits: {
|
311
|
+
isAdmin: bool is user admin,
|
312
|
+
},
|
313
|
+
memberIds[] - array of group members ids,
|
314
|
+
)
|
315
|
+
|
316
|
+
await organization.accessGroups.delete(group.id)
|
317
|
+
```
|
318
|
+
|
319
|
+
### Use Statistics
|
320
|
+
|
321
|
+
Statistics access methods are stored in organization object. There are several methods for different statistics data, and all of them includes dateFrom and dateTo parameters. These parameters are numbers that represent current time in seconds ( UNIX Epoch) . Here are some examples:
|
322
|
+
|
323
|
+
```
|
324
|
+
const organizationStatistics = await org.statistics(dateFrom, dateTo)
|
325
|
+
const organizationMembersStatistics = await org.membersStatistics(dateFrom, dateTo)
|
326
|
+
const userStatistics = await org.userStatistic(userId, dateFrom, dateTo)
|
327
|
+
```
|
328
|
+
|
145
329
|
### Use Invites
|
330
|
+
|
331
|
+
You can invite users to organization with provided emails and selected access groups. Use invite users method of seleted organization.
|
332
|
+
|
333
|
+
```
|
334
|
+
await organization.inviteUsers(emails[], accessGroups[])
|
335
|
+
```
|
336
|
+
|
337
|
+
You can also use univarsal invite code, and then validate it to add user to group or organization.
|
338
|
+
|
339
|
+
```
|
340
|
+
await organization.createInviteCode(accessGroups[])
|
341
|
+
// Use app.organizations storage to validate invite codes
|
342
|
+
await organizations.validateInviteCode(inviteCode)
|
343
|
+
```
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA"}
|
@@ -0,0 +1,103 @@
|
|
1
|
+
{
|
2
|
+
"name": "@neuralinnovations/dataisland-sdk",
|
3
|
+
"version": "0.0.1-dev71",
|
4
|
+
"description": "SDK for DataIsland project",
|
5
|
+
"licenses": [
|
6
|
+
{
|
7
|
+
"type": "Apache-2.0",
|
8
|
+
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
|
9
|
+
}
|
10
|
+
],
|
11
|
+
"repository": {
|
12
|
+
"type": "git",
|
13
|
+
"url": "https://github.com/NeuralInnovations/dataisland-client-js-sdk.git"
|
14
|
+
},
|
15
|
+
"scripts": {
|
16
|
+
"build": "tsc",
|
17
|
+
"test": "jest",
|
18
|
+
"lint": "eslint --ext .ts,.tsx src test",
|
19
|
+
"lint:fix": "eslint --fix --ext .ts,.tsx src test",
|
20
|
+
"docs": "typedoc --disableSources --includeVersion --plugin typedoc-plugin-markdown --out docs src/index.ts && node scripts/docs/index.js",
|
21
|
+
"version-up-dev": "node scripts/version/up-dev.js && rm package-lock.json && npm install && npm run build && npm run lint:fix && npm run docs",
|
22
|
+
"release": "rm package-lock.json && npm install && npm run build && npm run lint:fix && npm run docs"
|
23
|
+
},
|
24
|
+
"publishConfig": {
|
25
|
+
"access": "public"
|
26
|
+
},
|
27
|
+
"exports": {
|
28
|
+
".": "./dist/index.js"
|
29
|
+
},
|
30
|
+
"main": "dist/index.js",
|
31
|
+
"types": "dist/index.d.ts",
|
32
|
+
"browser": "dist/index.js",
|
33
|
+
"directories": {
|
34
|
+
"test": "test"
|
35
|
+
},
|
36
|
+
"files": [
|
37
|
+
"dist",
|
38
|
+
"src",
|
39
|
+
"index.js",
|
40
|
+
"index.d.ts"
|
41
|
+
],
|
42
|
+
"engines": {
|
43
|
+
"node": ">=16"
|
44
|
+
},
|
45
|
+
"keywords": [
|
46
|
+
"dataisland",
|
47
|
+
"sdk",
|
48
|
+
"neuralinnovations",
|
49
|
+
"neural innovations",
|
50
|
+
"neural-innovations",
|
51
|
+
"neural"
|
52
|
+
],
|
53
|
+
"author": "Neural Innovations LTD",
|
54
|
+
"license": "Apache-2.0",
|
55
|
+
"bugs": {
|
56
|
+
"url": "https://github.com/NeuralInnovations/dataisland-client-js-sdk/issues"
|
57
|
+
},
|
58
|
+
"homepage": "https://github.com/NeuralInnovations/dataisland-client-js-sdk#readme",
|
59
|
+
"devDependencies": {
|
60
|
+
"@babel/core": "^7.22.11",
|
61
|
+
"@babel/plugin-transform-modules-commonjs": "7.22.11",
|
62
|
+
"@babel/preset-env": "^7.22.10",
|
63
|
+
"@babel/preset-typescript": "^7.23.3",
|
64
|
+
"@babel/register": "7.22.5",
|
65
|
+
"@jest/globals": "^29.7.0",
|
66
|
+
"@types/jest": "^29.5.11",
|
67
|
+
"@types/node": "^20.11.27",
|
68
|
+
"@types/node-fetch": "^2.6.11",
|
69
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
70
|
+
"@typescript-eslint/parser": "^6.19.0",
|
71
|
+
"babel-jest": "^29.7.0",
|
72
|
+
"babel-loader": "8.3.0",
|
73
|
+
"eslint": "^8.56.0",
|
74
|
+
"eslint-config-semistandard": "^17.0.0",
|
75
|
+
"eslint-config-standard": "^17.1.0",
|
76
|
+
"eslint-config-standard-with-typescript": "^43.0.0",
|
77
|
+
"eslint-config-xo": "^0.43.1",
|
78
|
+
"eslint-config-xo-typescript": "^1.0.1",
|
79
|
+
"eslint-plugin-import": "^2.29.1",
|
80
|
+
"eslint-plugin-n": "^15.7.0",
|
81
|
+
"eslint-plugin-promise": "^6.1.1",
|
82
|
+
"eslint-plugin-react": "^7.33.2",
|
83
|
+
"glob": "7.2.3",
|
84
|
+
"jest": "^29.7.0",
|
85
|
+
"jest-environment-jsdom": "^29.7.0",
|
86
|
+
"prettier": "2.8.7",
|
87
|
+
"ts-jest": "^29.1.1",
|
88
|
+
"ts-loader": "8.4.0",
|
89
|
+
"ts-node": "10.9.1",
|
90
|
+
"tslib": "^2.6.2",
|
91
|
+
"tslint": "6.1.3",
|
92
|
+
"typedoc": "^0.25.7",
|
93
|
+
"typedoc-plugin-markdown": "^3.17.1",
|
94
|
+
"typescript": "^5.3.3",
|
95
|
+
"watch": "^0.13.0",
|
96
|
+
"webpack": "5.76.0",
|
97
|
+
"yargs": "17.7.2"
|
98
|
+
},
|
99
|
+
"dependencies": {
|
100
|
+
"dotenv": "^16.3.2",
|
101
|
+
"jsdom": "^23.2.0"
|
102
|
+
}
|
103
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import type { Middleware } from "./middleware";
|
2
|
+
import type { CredentialBase } from "./credentials";
|
3
|
+
import type { Service, ServiceContext } from "./services/service";
|
4
|
+
import type { Constructor } from "./internal/registry";
|
5
|
+
import { CommandHandler, Command } from "./services/commandService";
|
6
|
+
import { Context } from "./context";
|
7
|
+
/**
|
8
|
+
* DataIsland App builder.
|
9
|
+
*/
|
10
|
+
export declare abstract class AppBuilder {
|
11
|
+
/**
|
12
|
+
* Set custom data.
|
13
|
+
*/
|
14
|
+
abstract get env(): Record<string, any>;
|
15
|
+
/**
|
16
|
+
* Add a middleware to the app.
|
17
|
+
*/
|
18
|
+
abstract registerMiddleware(middleware: Middleware): AppBuilder;
|
19
|
+
/**
|
20
|
+
* Host of the app.
|
21
|
+
*/
|
22
|
+
abstract useHost(host: string): AppBuilder;
|
23
|
+
/**
|
24
|
+
* GDPR compliant
|
25
|
+
*/
|
26
|
+
abstract useAutomaticDataCollectionEnabled(value: boolean): AppBuilder;
|
27
|
+
/**
|
28
|
+
* Credential of the app.
|
29
|
+
*/
|
30
|
+
abstract useCredential(credential: CredentialBase): AppBuilder;
|
31
|
+
/**
|
32
|
+
* Register a service to the app.
|
33
|
+
* @param type
|
34
|
+
* @param factory
|
35
|
+
*/
|
36
|
+
abstract registerService<T extends Service>(type: Constructor<T>, factory: (context: ServiceContext) => T): AppBuilder;
|
37
|
+
/**
|
38
|
+
* Register a command to the app.
|
39
|
+
* @param messageType
|
40
|
+
* @param commandFactory
|
41
|
+
*/
|
42
|
+
abstract registerCommand<T extends Command>(messageType: Constructor<T>, commandFactory: ((context: Context) => CommandHandler<T>) | ((context: Context) => (context: Context) => Promise<void>)): AppBuilder;
|
43
|
+
}
|
44
|
+
//# sourceMappingURL=appBuilder.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"appBuilder.d.ts","sourceRoot":"","sources":["../../src/appBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC;;GAEG;AACH,8BAAsB,UAAU;IAC9B;;OAEG;IACH,QAAQ,KAAK,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAEvC;;OAEG;IACH,QAAQ,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU;IAE/D;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAE1C;;OAEG;IACH,QAAQ,CAAC,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU;IAEtE;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,UAAU;IAE9D;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,CAAC,SAAS,OAAO,EACxC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EACpB,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,CAAC,GACtC,UAAU;IAEb;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,CAAC,SAAS,OAAO,EACxC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,EAC3B,cAAc,EACV,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,GACzC,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAC9D,UAAU;CACd"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"appBuilder.js","sourceRoot":"","sources":["../../src/appBuilder.ts"],"names":[],"mappings":";;;AAOA;;GAEG;AACH,MAAsB,UAAU;CA+C/B;AA/CD,gCA+CC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Command, CommandHandler } from "../services/commandService";
|
2
|
+
export declare class DeleteUserFullCommand extends Command {
|
3
|
+
}
|
4
|
+
export declare class DeleteUserFullCommandHandler extends CommandHandler<DeleteUserFullCommand> {
|
5
|
+
execute(message: DeleteUserFullCommand): Promise<void>;
|
6
|
+
}
|
7
|
+
//# sourceMappingURL=deleteUserFullCommandHandler.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deleteUserFullCommandHandler.d.ts","sourceRoot":"","sources":["../../../src/commands/deleteUserFullCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAIpE,qBAAa,qBAAsB,SAAQ,OAAO;CAEjD;AAED,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,qBAAqB,CAAC;IAE/E,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7D"}
|