@neuralinnovations/dataisland-sdk 0.0.1-dev5 → 0.0.1-dev7

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 (39) hide show
  1. package/.github/workflows/publish-npm.yml +15 -2
  2. package/README.md +83 -34
  3. package/docs/.nojekyll +1 -0
  4. package/docs/classes/BasicCredential.md +80 -0
  5. package/docs/classes/BearerCredential.md +72 -0
  6. package/docs/classes/Chat.md +69 -0
  7. package/docs/classes/Chats.md +90 -0
  8. package/docs/classes/CredentialBase.md +54 -0
  9. package/docs/classes/DataIslandApp.md +168 -0
  10. package/docs/classes/DebugCredential.md +72 -0
  11. package/docs/classes/DefaultCredential.md +56 -0
  12. package/docs/classes/DisposableContainer.md +177 -0
  13. package/docs/classes/EventDispatcher.md +109 -0
  14. package/docs/classes/File.md +79 -0
  15. package/docs/classes/Files.md +136 -0
  16. package/docs/classes/FilesPage.md +76 -0
  17. package/docs/classes/Group.md +191 -0
  18. package/docs/classes/Groups.md +130 -0
  19. package/docs/classes/Lifetime.md +108 -0
  20. package/docs/classes/Organization.md +89 -0
  21. package/docs/classes/Organizations.md +195 -0
  22. package/docs/classes/UserProfile.md +156 -0
  23. package/docs/classes/Workspace.md +165 -0
  24. package/docs/classes/Workspaces.md +189 -0
  25. package/docs/enums/ChatAnswer.md +22 -0
  26. package/docs/enums/ChatsEvent.md +22 -0
  27. package/docs/enums/FilesEvent.md +24 -0
  28. package/docs/enums/GroupEvent.md +29 -0
  29. package/docs/enums/OrganizationsEvent.md +31 -0
  30. package/docs/enums/UserEvent.md +15 -0
  31. package/docs/enums/WorkspaceEvent.md +17 -0
  32. package/docs/enums/WorkspacesEvent.md +24 -0
  33. package/docs/interfaces/Disposable.md +25 -0
  34. package/docs/interfaces/Event.md +58 -0
  35. package/docs/interfaces/EventSubscriber.md +41 -0
  36. package/docs/interfaces/Input.md +35 -0
  37. package/docs/modules.md +205 -0
  38. package/package.json +4 -2
  39. package/scripts/docs/index.js +15 -0
@@ -0,0 +1,22 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / ChatsEvent
2
+
3
+ # Enumeration: ChatsEvent
4
+
5
+ ## Table of contents
6
+
7
+ ### Enumeration Members
8
+
9
+ - [ADDED](ChatsEvent.md#added)
10
+ - [REMOVED](ChatsEvent.md#removed)
11
+
12
+ ## Enumeration Members
13
+
14
+ ### ADDED
15
+
16
+ • **ADDED** = ``"added"``
17
+
18
+ ___
19
+
20
+ ### REMOVED
21
+
22
+ • **REMOVED** = ``"removed"``
@@ -0,0 +1,24 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / FilesEvent
2
+
3
+ # Enumeration: FilesEvent
4
+
5
+ Files event.
6
+
7
+ ## Table of contents
8
+
9
+ ### Enumeration Members
10
+
11
+ - [ADDED](FilesEvent.md#added)
12
+ - [REMOVED](FilesEvent.md#removed)
13
+
14
+ ## Enumeration Members
15
+
16
+ ### ADDED
17
+
18
+ • **ADDED** = ``"added"``
19
+
20
+ ___
21
+
22
+ ### REMOVED
23
+
24
+ • **REMOVED** = ``"removed"``
@@ -0,0 +1,29 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / GroupEvent
2
+
3
+ # Enumeration: GroupEvent
4
+
5
+ ## Table of contents
6
+
7
+ ### Enumeration Members
8
+
9
+ - [ADDED](GroupEvent.md#added)
10
+ - [REMOVED](GroupEvent.md#removed)
11
+ - [UPDATED](GroupEvent.md#updated)
12
+
13
+ ## Enumeration Members
14
+
15
+ ### ADDED
16
+
17
+ • **ADDED** = ``"added"``
18
+
19
+ ___
20
+
21
+ ### REMOVED
22
+
23
+ • **REMOVED** = ``"removed"``
24
+
25
+ ___
26
+
27
+ ### UPDATED
28
+
29
+ • **UPDATED** = ``"updated"``
@@ -0,0 +1,31 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / OrganizationsEvent
2
+
3
+ # Enumeration: OrganizationsEvent
4
+
5
+ Organization event.
6
+
7
+ ## Table of contents
8
+
9
+ ### Enumeration Members
10
+
11
+ - [ADDED](OrganizationsEvent.md#added)
12
+ - [CURRENT\_CHANGED](OrganizationsEvent.md#current_changed)
13
+ - [REMOVED](OrganizationsEvent.md#removed)
14
+
15
+ ## Enumeration Members
16
+
17
+ ### ADDED
18
+
19
+ • **ADDED** = ``"added"``
20
+
21
+ ___
22
+
23
+ ### CURRENT\_CHANGED
24
+
25
+ • **CURRENT\_CHANGED** = ``"currentChanged"``
26
+
27
+ ___
28
+
29
+ ### REMOVED
30
+
31
+ • **REMOVED** = ``"removed"``
@@ -0,0 +1,15 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / UserEvent
2
+
3
+ # Enumeration: UserEvent
4
+
5
+ ## Table of contents
6
+
7
+ ### Enumeration Members
8
+
9
+ - [CHANGED](UserEvent.md#changed)
10
+
11
+ ## Enumeration Members
12
+
13
+ ### CHANGED
14
+
15
+ • **CHANGED** = ``"changed"``
@@ -0,0 +1,17 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / WorkspaceEvent
2
+
3
+ # Enumeration: WorkspaceEvent
4
+
5
+ Workspace event.
6
+
7
+ ## Table of contents
8
+
9
+ ### Enumeration Members
10
+
11
+ - [CHANGED](WorkspaceEvent.md#changed)
12
+
13
+ ## Enumeration Members
14
+
15
+ ### CHANGED
16
+
17
+ • **CHANGED** = ``"changed"``
@@ -0,0 +1,24 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / WorkspacesEvent
2
+
3
+ # Enumeration: WorkspacesEvent
4
+
5
+ Workspaces event.
6
+
7
+ ## Table of contents
8
+
9
+ ### Enumeration Members
10
+
11
+ - [ADDED](WorkspacesEvent.md#added)
12
+ - [REMOVED](WorkspacesEvent.md#removed)
13
+
14
+ ## Enumeration Members
15
+
16
+ ### ADDED
17
+
18
+ • **ADDED** = ``"added"``
19
+
20
+ ___
21
+
22
+ ### REMOVED
23
+
24
+ • **REMOVED** = ``"removed"``
@@ -0,0 +1,25 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / Disposable
2
+
3
+ # Interface: Disposable
4
+
5
+ Represents an object that can be disposed.
6
+
7
+ ## Implemented by
8
+
9
+ - [`DisposableContainer`](../classes/DisposableContainer.md)
10
+
11
+ ## Table of contents
12
+
13
+ ### Methods
14
+
15
+ - [dispose](Disposable.md#dispose)
16
+
17
+ ## Methods
18
+
19
+ ### dispose
20
+
21
+ ▸ **dispose**(): `void`
22
+
23
+ #### Returns
24
+
25
+ `void`
@@ -0,0 +1,58 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / Event
2
+
3
+ # Interface: Event\<EventType, DataType\>
4
+
5
+ ## Type parameters
6
+
7
+ | Name |
8
+ | :------ |
9
+ | `EventType` |
10
+ | `DataType` |
11
+
12
+ ## Hierarchy
13
+
14
+ - [`Input`](Input.md)\<`EventType`, `DataType`\>
15
+
16
+ ↳ **`Event`**
17
+
18
+ ## Table of contents
19
+
20
+ ### Properties
21
+
22
+ - [data](Event.md#data)
23
+ - [type](Event.md#type)
24
+ - [unsubscribe](Event.md#unsubscribe)
25
+
26
+ ## Properties
27
+
28
+ ### data
29
+
30
+ • **data**: `DataType`
31
+
32
+ #### Inherited from
33
+
34
+ [Input](Input.md).[data](Input.md#data)
35
+
36
+ ___
37
+
38
+ ### type
39
+
40
+ • `Optional` **type**: `EventType`
41
+
42
+ #### Inherited from
43
+
44
+ [Input](Input.md).[type](Input.md#type)
45
+
46
+ ___
47
+
48
+ ### unsubscribe
49
+
50
+ • **unsubscribe**: () => `void`
51
+
52
+ #### Type declaration
53
+
54
+ ▸ (): `void`
55
+
56
+ ##### Returns
57
+
58
+ `void`
@@ -0,0 +1,41 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / EventSubscriber
2
+
3
+ # Interface: EventSubscriber\<EventType, DataType\>
4
+
5
+ ## Type parameters
6
+
7
+ | Name |
8
+ | :------ |
9
+ | `EventType` |
10
+ | `DataType` |
11
+
12
+ ## Implemented by
13
+
14
+ - [`EventDispatcher`](../classes/EventDispatcher.md)
15
+
16
+ ## Table of contents
17
+
18
+ ### Properties
19
+
20
+ - [subscribe](EventSubscriber.md#subscribe)
21
+
22
+ ## Properties
23
+
24
+ ### subscribe
25
+
26
+ • **subscribe**: (`callback`: (`event`: [`Event`](Event.md)\<`EventType`, `DataType`\>) => `void`, `type?`: `EventType`) => [`Disposable`](Disposable.md)
27
+
28
+ #### Type declaration
29
+
30
+ ▸ (`callback`, `type?`): [`Disposable`](Disposable.md)
31
+
32
+ ##### Parameters
33
+
34
+ | Name | Type |
35
+ | :------ | :------ |
36
+ | `callback` | (`event`: [`Event`](Event.md)\<`EventType`, `DataType`\>) => `void` |
37
+ | `type?` | `EventType` |
38
+
39
+ ##### Returns
40
+
41
+ [`Disposable`](Disposable.md)
@@ -0,0 +1,35 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../../README.md) / [Exports](../modules.md) / Input
2
+
3
+ # Interface: Input\<EventType, DataType\>
4
+
5
+ ## Type parameters
6
+
7
+ | Name |
8
+ | :------ |
9
+ | `EventType` |
10
+ | `DataType` |
11
+
12
+ ## Hierarchy
13
+
14
+ - **`Input`**
15
+
16
+ ↳ [`Event`](Event.md)
17
+
18
+ ## Table of contents
19
+
20
+ ### Properties
21
+
22
+ - [data](Input.md#data)
23
+ - [type](Input.md#type)
24
+
25
+ ## Properties
26
+
27
+ ### data
28
+
29
+ • **data**: `DataType`
30
+
31
+ ___
32
+
33
+ ### type
34
+
35
+ • `Optional` **type**: `EventType`
@@ -0,0 +1,205 @@
1
+ [@neuralinnovations/dataisland-sdk - v0.0.1-dev7](../README.md) / Exports
2
+
3
+ # @neuralinnovations/dataisland-sdk - v0.0.1-dev7
4
+
5
+ ## Table of contents
6
+
7
+ ### Enumerations
8
+
9
+ - [ChatAnswer](enums/ChatAnswer.md)
10
+ - [ChatsEvent](enums/ChatsEvent.md)
11
+ - [FilesEvent](enums/FilesEvent.md)
12
+ - [GroupEvent](enums/GroupEvent.md)
13
+ - [OrganizationsEvent](enums/OrganizationsEvent.md)
14
+ - [UserEvent](enums/UserEvent.md)
15
+ - [WorkspaceEvent](enums/WorkspaceEvent.md)
16
+ - [WorkspacesEvent](enums/WorkspacesEvent.md)
17
+
18
+ ### Classes
19
+
20
+ - [BasicCredential](classes/BasicCredential.md)
21
+ - [BearerCredential](classes/BearerCredential.md)
22
+ - [Chat](classes/Chat.md)
23
+ - [Chats](classes/Chats.md)
24
+ - [CredentialBase](classes/CredentialBase.md)
25
+ - [DataIslandApp](classes/DataIslandApp.md)
26
+ - [DebugCredential](classes/DebugCredential.md)
27
+ - [DefaultCredential](classes/DefaultCredential.md)
28
+ - [DisposableContainer](classes/DisposableContainer.md)
29
+ - [EventDispatcher](classes/EventDispatcher.md)
30
+ - [File](classes/File.md)
31
+ - [Files](classes/Files.md)
32
+ - [FilesPage](classes/FilesPage.md)
33
+ - [Group](classes/Group.md)
34
+ - [Groups](classes/Groups.md)
35
+ - [Lifetime](classes/Lifetime.md)
36
+ - [Organization](classes/Organization.md)
37
+ - [Organizations](classes/Organizations.md)
38
+ - [UserProfile](classes/UserProfile.md)
39
+ - [Workspace](classes/Workspace.md)
40
+ - [Workspaces](classes/Workspaces.md)
41
+
42
+ ### Interfaces
43
+
44
+ - [Disposable](interfaces/Disposable.md)
45
+ - [Event](interfaces/Event.md)
46
+ - [EventSubscriber](interfaces/EventSubscriber.md)
47
+ - [Input](interfaces/Input.md)
48
+
49
+ ### Type Aliases
50
+
51
+ - [ChatId](modules.md#chatid)
52
+ - [FileId](modules.md#fileid)
53
+ - [GroupId](modules.md#groupid)
54
+ - [OrganizationId](modules.md#organizationid)
55
+ - [UploadFile](modules.md#uploadfile)
56
+ - [UserId](modules.md#userid)
57
+ - [WorkspaceId](modules.md#workspaceid)
58
+
59
+ ### Variables
60
+
61
+ - [DEFAULT\_HOST](modules.md#default_host)
62
+ - [DEFAULT\_NAME](modules.md#default_name)
63
+ - [SDK\_VERSION](modules.md#sdk_version)
64
+
65
+ ### Functions
66
+
67
+ - [dataIslandApp](modules.md#dataislandapp)
68
+ - [dataIslandInstances](modules.md#dataislandinstances)
69
+ - [disposable](modules.md#disposable)
70
+
71
+ ## Type Aliases
72
+
73
+ ### ChatId
74
+
75
+ Ƭ **ChatId**: `string`
76
+
77
+ ___
78
+
79
+ ### FileId
80
+
81
+ Ƭ **FileId**: `string`
82
+
83
+ ___
84
+
85
+ ### GroupId
86
+
87
+ Ƭ **GroupId**: `string`
88
+
89
+ ___
90
+
91
+ ### OrganizationId
92
+
93
+ Ƭ **OrganizationId**: `string`
94
+
95
+ Organization id.
96
+
97
+ ___
98
+
99
+ ### UploadFile
100
+
101
+ Ƭ **UploadFile**: `globalThis.File`
102
+
103
+ Upload file.
104
+
105
+ ___
106
+
107
+ ### UserId
108
+
109
+ Ƭ **UserId**: `string`
110
+
111
+ ___
112
+
113
+ ### WorkspaceId
114
+
115
+ Ƭ **WorkspaceId**: `string`
116
+
117
+ ## Variables
118
+
119
+ ### DEFAULT\_HOST
120
+
121
+ • `Const` **DEFAULT\_HOST**: ``"https://api.dataisland.com.ua"``
122
+
123
+ Default DataIsland App host.
124
+
125
+ ___
126
+
127
+ ### DEFAULT\_NAME
128
+
129
+ • `Const` **DEFAULT\_NAME**: ``"[DEFAULT]"``
130
+
131
+ Default DataIsland App name.
132
+
133
+ ___
134
+
135
+ ### SDK\_VERSION
136
+
137
+ • `Const` **SDK\_VERSION**: `string` = `version`
138
+
139
+ Current SDK version.
140
+
141
+ ## Functions
142
+
143
+ ### dataIslandApp
144
+
145
+ ▸ **dataIslandApp**(`name?`, `setup?`): `Promise`\<[`DataIslandApp`](classes/DataIslandApp.md)\>
146
+
147
+ Returns a DataIsland App instance.
148
+
149
+ #### Parameters
150
+
151
+ | Name | Type | Description |
152
+ | :------ | :------ | :------ |
153
+ | `name?` | `string` | Optional The name of the app. |
154
+ | `setup?` | (`builder`: `AppBuilder`) => `Promise`\<`void`\> | Optional setup function. |
155
+
156
+ #### Returns
157
+
158
+ `Promise`\<[`DataIslandApp`](classes/DataIslandApp.md)\>
159
+
160
+ A DataIsland App instance.
161
+
162
+ **`Example`**
163
+
164
+ ```js
165
+ import { dataIslandApp, DEFAULT_NAME } from '@neuralinnovations/dataisland-sdk'
166
+
167
+ const app = await dataIslandApp(DEFAULT_NAME, builder => {
168
+ builder.useHost("https://dataisland.com.ua")
169
+ builder.useAutomaticDataCollectionEnabled(true)
170
+ builder.useCredential(new BasicCredential("email", "password"))
171
+ })
172
+ ```
173
+
174
+ ___
175
+
176
+ ### dataIslandInstances
177
+
178
+ ▸ **dataIslandInstances**(): [`DataIslandApp`](classes/DataIslandApp.md)[]
179
+
180
+ Returns a list of DataIsland App instances.
181
+
182
+ #### Returns
183
+
184
+ [`DataIslandApp`](classes/DataIslandApp.md)[]
185
+
186
+ ___
187
+
188
+ ### disposable
189
+
190
+ ▸ **disposable**(`action`, `target`): [`Disposable`](interfaces/Disposable.md)
191
+
192
+ Creates a disposable.
193
+
194
+ #### Parameters
195
+
196
+ | Name | Type | Description |
197
+ | :------ | :------ | :------ |
198
+ | `action` | () => `void` | The action to execute when disposed. |
199
+ | `target` | `unknown` | The target to bind the action to. |
200
+
201
+ #### Returns
202
+
203
+ [`Disposable`](interfaces/Disposable.md)
204
+
205
+ The disposable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuralinnovations/dataisland-sdk",
3
- "version": "0.0.1-dev5",
3
+ "version": "0.0.1-dev7",
4
4
  "description": "SDK for DataIsland project",
5
5
  "licenses": [
6
6
  {
@@ -15,7 +15,8 @@
15
15
  "build": "tsc",
16
16
  "test": "jest",
17
17
  "lint": "eslint --ext .ts,.tsx src test",
18
- "lint:fix": "eslint --fix --ext .ts,.tsx src test"
18
+ "lint:fix": "eslint --fix --ext .ts,.tsx src test",
19
+ "docs": "typedoc --disableSources --includeVersion --plugin typedoc-plugin-markdown --out docs src/index.ts && node scripts/docs/index.js"
19
20
  },
20
21
  "author": "Neural Innovations LTD",
21
22
  "license": "Apache-2.0",
@@ -50,6 +51,7 @@
50
51
  "tslib": "^2.6.2",
51
52
  "tslint": "6.1.3",
52
53
  "typedoc": "^0.25.7",
54
+ "typedoc-plugin-markdown": "^3.17.1",
53
55
  "typescript": "^5.3.3",
54
56
  "watch": "^0.13.0",
55
57
  "webpack": "5.76.0",
@@ -0,0 +1,15 @@
1
+ const fs = require("fs")
2
+
3
+ fs.readdirSync("docs", {
4
+ recursive: true
5
+ }).forEach((file) => {
6
+ if (file.endsWith(".md")) {
7
+ const content = fs.readFileSync(`docs/${file}`, "utf8")
8
+ const newContent = content
9
+ .replaceAll("(../README.md)", "(../../README.md)")
10
+ .replaceAll("(README.md)", "(../README.md)")
11
+ fs.writeFileSync(`docs/${file}`, newContent, "utf8")
12
+ }
13
+ }
14
+ )
15
+ fs.rmSync("docs/README.md")