@gudhub/core 1.1.113 → 1.1.115
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/GUDHUB/FileManager/FileManager.js +1 -1
- package/GUDHUB/FileManager/file_manager.test.js +5 -5
- package/GUDHUB/GHConstructor/ghconstructor.test.js +1 -1
- package/GUDHUB/Storage/ModulesList.js +37 -37
- package/GUDHUB/Utils/AppsTemplateService/AppsTemplateService.js +4 -4
- package/GUDHUB/Utils/json_constructor/json_constructor.test.js +2 -2
- package/GUDHUB/config.js +6 -6
- package/Readme.md +115 -114
- package/fake_server/fake_java_server.js +1 -1
- package/fake_server/fake_server_data/app_132.js +7 -7
- package/fake_server/fake_server_data/app_16259.js +5 -5
- package/fake_server/fake_server_data/fake_server_data.js +5 -5
- package/package.json +1 -1
- package/umd/library.min.js +4 -4
- package/umd/library.min.js.map +1 -1
package/Readme.md
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
[](https://www.youtube.com/channel/UCMWp_jzMxMQbgYHtJdX8CiA/featured)
|
|
9
9
|
[](https://www.linkedin.com/company/gudhubplatform/about/) -->
|
|
10
10
|
|
|
11
|
-
[](https://gudhub.com/)
|
|
12
|
-
[](https://gudhub.com/docs/)
|
|
11
|
+
[](https://app.gudhub.com/)
|
|
12
|
+
[](https://app.gudhub.com/docs/)
|
|
13
13
|
|
|
14
14
|
[](https://www.npmjs.com/package/@gudhub/core)
|
|
15
15
|
[](https://www.npmjs.com/package/@gudhub/core)
|
|
@@ -20,66 +20,67 @@
|
|
|
20
20
|
|
|
21
21
|
I't a Library to simplify work with GudHub API. Also this Library contains utilities for better operation with `items`, `fields` and `apps`!
|
|
22
22
|
|
|
23
|
-
- [
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [
|
|
27
|
-
- [
|
|
28
|
-
- [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- [
|
|
36
|
-
- [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- [
|
|
40
|
-
- [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- [
|
|
53
|
-
- [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- [
|
|
58
|
-
- [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [
|
|
75
|
-
- [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
- [
|
|
80
|
-
- [
|
|
81
|
-
|
|
82
|
-
|
|
23
|
+
- [GUDHUB](#gudhub)
|
|
24
|
+
- [npm Package](#npm-package)
|
|
25
|
+
- [Publishing gudhub lib to npm](#publishing-gudhub-lib-to-npm)
|
|
26
|
+
- [Development gudhub lib](#development-gudhub-lib)
|
|
27
|
+
- [Initialization](#initialization)
|
|
28
|
+
- [Utils](#utils)
|
|
29
|
+
- [jsonConstructor()](#jsonconstructor)
|
|
30
|
+
- [jsonToItems()](#jsontoitems)
|
|
31
|
+
- [populateWithItemRef()](#populatewithitemref)
|
|
32
|
+
- [mergeItems()](#mergeitems)
|
|
33
|
+
- [compareItems()](#compareitems)
|
|
34
|
+
- [getDate()](#getdate)
|
|
35
|
+
- [makeNestedList()](#makenestedlist)
|
|
36
|
+
- [App Processor](#app-processor)
|
|
37
|
+
- [getAppInfo()](#getappinfo)
|
|
38
|
+
- [getApp()](#getapp)
|
|
39
|
+
- [getAppsList()](#getappslist)
|
|
40
|
+
- [Authentication](#authentication)
|
|
41
|
+
- [login()](#login)
|
|
42
|
+
- [logout()](#logout)
|
|
43
|
+
- [signup()](#signup)
|
|
44
|
+
- [getUserById()](#getuserbyid)
|
|
45
|
+
- [getUsersList()](#getuserslist)
|
|
46
|
+
- [updateUser()](#updateuser)
|
|
47
|
+
- [getToken()](#gettoken)
|
|
48
|
+
- [updateToken()](#updatetoken)
|
|
49
|
+
- [updateAvatar()](#updateavatar)
|
|
50
|
+
- [getUserFromStorage()](#getuserfromstorage)
|
|
51
|
+
- [saveUserToStorage()](#saveusertostorage)
|
|
52
|
+
- [getVersion()](#getversion)
|
|
53
|
+
- [Items Processor](#items-processor)
|
|
54
|
+
- [getItems()](#getitems)
|
|
55
|
+
- [addNewItems()](#addnewitems)
|
|
56
|
+
- [updateItems()](#updateitems)
|
|
57
|
+
- [deleteItems()](#deleteitems)
|
|
58
|
+
- [Field Processor](#field-processor)
|
|
59
|
+
- [getField()](#getfield)
|
|
60
|
+
- [updateField()](#updatefield)
|
|
61
|
+
- [deleteField()](#deletefield)
|
|
62
|
+
- [getFieldModels()](#getfieldmodels)
|
|
63
|
+
- [getFieldValue()](#getfieldvalue)
|
|
64
|
+
- [setFieldValue()](#setfieldvalue)
|
|
65
|
+
- [File Processor](#file-processor)
|
|
66
|
+
- [getFile()](#getfile)
|
|
67
|
+
- [getFiles()](#getfiles)
|
|
68
|
+
- [uploadFile()](#uploadfile)
|
|
69
|
+
- [uploadFileFromString()](#uploadfilefromstring)
|
|
70
|
+
- [isFileExists()](#isfileexists)
|
|
71
|
+
- [updateFileFromString()](#updatefilefromstring)
|
|
72
|
+
- [duplicateFile()](#duplicatefile)
|
|
73
|
+
- [downloadFileFromString()](#downloadfilefromstring)
|
|
74
|
+
- [deleteFile()](#deletefile)
|
|
75
|
+
- [Document Processor](#document-processor)
|
|
76
|
+
- [createDocument()](#createdocument)
|
|
77
|
+
- [getDocument()](#getdocument)
|
|
78
|
+
- [getDocuments()](#getdocuments)
|
|
79
|
+
- [deleteDocument()](#deletedocument)
|
|
80
|
+
- [PipeService](#pipeservice)
|
|
81
|
+
- [on()](#on)
|
|
82
|
+
- [emit()](#emit)
|
|
83
|
+
- [destroy()](#destroy)
|
|
83
84
|
|
|
84
85
|
## npm Package
|
|
85
86
|
|
|
@@ -125,16 +126,16 @@ The third way is initialization GudHub with additional parameters. It's useful f
|
|
|
125
126
|
import {GudHub} from '@gudhub/core';
|
|
126
127
|
const auth_key = 'JLKHKJSKJhkjsclkdjcijIOIoiuSTg';
|
|
127
128
|
const gudhub = new GudHub(auth_key,{
|
|
128
|
-
server_url : "https://gudhub.com/GudHub",
|
|
129
|
-
wss_url : "wss://gudhub.com/GudHub/ws/app/",
|
|
129
|
+
server_url : "https://app.gudhub.com/GudHub",
|
|
130
|
+
wss_url : "wss://app.gudhub.com/GudHub/ws/app/",
|
|
130
131
|
initWebsocket : false
|
|
131
132
|
});
|
|
132
133
|
```
|
|
133
134
|
|
|
134
135
|
Param Name|Description|Default Value
|
|
135
136
|
------------ | ------------- | -------------
|
|
136
|
-
*server_url*|All request will send to this url |https://gudhub.com/GudHub
|
|
137
|
-
*wss_url*|url to setup websoket connection |wss://gudhub.com/GudHub/ws/app/
|
|
137
|
+
*server_url*|All request will send to this url |https://app.gudhub.com/GudHub
|
|
138
|
+
*wss_url*|url to setup websoket connection |wss://app.gudhub.com/GudHub/ws/app/
|
|
138
139
|
*initWebsocket*|here we can turn off websoket connection|false
|
|
139
140
|
|
|
140
141
|
## Utils
|
|
@@ -147,7 +148,7 @@ With this method you can get json according to the scheme.
|
|
|
147
148
|
gudhub.jsonConstructor(scheme, item, variables)
|
|
148
149
|
```
|
|
149
150
|
|
|
150
|
-
Read more information about [jsonConstructor on GudHub](https://gudhub.com/docs/utils/json-constructor/json-constustor-overview/).
|
|
151
|
+
Read more information about [jsonConstructor on GudHub](https://app.gudhub.com/docs/utils/json-constructor/json-constustor-overview/).
|
|
151
152
|
|
|
152
153
|
### jsonToItems()
|
|
153
154
|
|
|
@@ -157,7 +158,7 @@ This method converts json to gudhub items. The conversion is made based on `fiel
|
|
|
157
158
|
gudhub.jsonToItems(json, fieldsMap);
|
|
158
159
|
```
|
|
159
160
|
|
|
160
|
-
Read more information about [jsonConstructor on GudHub](https://gudhub.com/docs/utils/json-to-item/jsontoitem-overview/).
|
|
161
|
+
Read more information about [jsonConstructor on GudHub](https://app.gudhub.com/docs/utils/json-to-item/jsontoitem-overview/).
|
|
161
162
|
|
|
162
163
|
### populateWithItemRef()
|
|
163
164
|
|
|
@@ -167,7 +168,7 @@ This method updates destination items with item_ref of source items. The connect
|
|
|
167
168
|
gudhub.populateWithItemRef(sorceItemsRef, srcFieldIdToCompare, destinationItems, destFieldIdToCompare, destFieldForRef, APPID)
|
|
168
169
|
```
|
|
169
170
|
|
|
170
|
-
Read more information about [populateWithItemRef on GudHub](https://gudhub.com/docs/utils/populate-with-item-reference/).
|
|
171
|
+
Read more information about [populateWithItemRef on GudHub](https://app.gudhub.com/docs/utils/populate-with-item-reference/).
|
|
171
172
|
|
|
172
173
|
### mergeItems()
|
|
173
174
|
|
|
@@ -177,7 +178,7 @@ The current method replaces all fields with values in destinationItems by values
|
|
|
177
178
|
gudhub.mergeItems(sorceItems, destinationItems, mergeByFieldId);
|
|
178
179
|
```
|
|
179
180
|
|
|
180
|
-
Read more information about [mergeItems on GudHub](https://gudhub.com/docs/utils/merge-items/).
|
|
181
|
+
Read more information about [mergeItems on GudHub](https://app.gudhub.com/docs/utils/merge-items/).
|
|
181
182
|
|
|
182
183
|
### compareItems()
|
|
183
184
|
|
|
@@ -187,7 +188,7 @@ This method compare fields of sorceItems with fields of destinationItems. This m
|
|
|
187
188
|
gudhub.compareItems(sorceItems, destinationItems, fieldToCompare);
|
|
188
189
|
```
|
|
189
190
|
|
|
190
|
-
Read more information about [compareItems on GudHub](https://gudhub.com/docs/utils/compare-items/).
|
|
191
|
+
Read more information about [compareItems on GudHub](https://app.gudhub.com/docs/utils/compare-items/).
|
|
191
192
|
|
|
192
193
|
### getDate()
|
|
193
194
|
|
|
@@ -197,7 +198,7 @@ This method will return a date according to specified namespace. The name space
|
|
|
197
198
|
gudhub.getDate(date_type);
|
|
198
199
|
```
|
|
199
200
|
|
|
200
|
-
Read more information about [getDate on GudHub](https://gudhub.com/docs/utils/date-utils/#get-date).
|
|
201
|
+
Read more information about [getDate on GudHub](https://app.gudhub.com/docs/utils/date-utils/#get-date).
|
|
201
202
|
|
|
202
203
|
### makeNestedList()
|
|
203
204
|
|
|
@@ -207,7 +208,7 @@ This method creates the list of fields with infinite nesting. It takes an array
|
|
|
207
208
|
gudhub.makeNestedList(arr, 'id', 'parent_id', 'children_property', 'priority')
|
|
208
209
|
```
|
|
209
210
|
|
|
210
|
-
Read more information about [makeNestedList on GudHub](https://gudhub.com/docs/utils/nested-list/).
|
|
211
|
+
Read more information about [makeNestedList on GudHub](https://app.gudhub.com/docs/utils/nested-list/).
|
|
211
212
|
|
|
212
213
|
## App Processor
|
|
213
214
|
|
|
@@ -219,7 +220,7 @@ This is the method that returns application with empty arrays: `field_list`, `it
|
|
|
219
220
|
gudhub.getAppInfo(app_id);
|
|
220
221
|
```
|
|
221
222
|
|
|
222
|
-
Read more information about [getAppInfo on GudHub](https://gudhub.com/docs/core-api/app-processor/#getappinfo).
|
|
223
|
+
Read more information about [getAppInfo on GudHub](https://app.gudhub.com/docs/core-api/app-processor/#getappinfo).
|
|
223
224
|
|
|
224
225
|
### getApp()
|
|
225
226
|
|
|
@@ -229,7 +230,7 @@ This method is called to get an application by its ID specified as an argument.
|
|
|
229
230
|
gudhub.getApp(app_id);
|
|
230
231
|
```
|
|
231
232
|
|
|
232
|
-
Read more information about [getApp on GudHub](https://gudhub.com/docs/core-api/app-processor/#getapp).
|
|
233
|
+
Read more information about [getApp on GudHub](https://app.gudhub.com/docs/core-api/app-processor/#getapp).
|
|
233
234
|
|
|
234
235
|
### getAppsList()
|
|
235
236
|
|
|
@@ -239,7 +240,7 @@ This method is called after logging in to get a list of user`s applications. It
|
|
|
239
240
|
gudhub.getAppsList();
|
|
240
241
|
```
|
|
241
242
|
|
|
242
|
-
Read more information about [getApp on GudHub](https://gudhub.com/docs/core-api/app-processor/#getappslist).
|
|
243
|
+
Read more information about [getApp on GudHub](https://app.gudhub.com/docs/core-api/app-processor/#getappslist).
|
|
243
244
|
|
|
244
245
|
## Authentication
|
|
245
246
|
|
|
@@ -251,7 +252,7 @@ This method is used for getting access to the account. It can be called with log
|
|
|
251
252
|
gudhub.login(data);
|
|
252
253
|
```
|
|
253
254
|
|
|
254
|
-
Read more information about [login on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#login-with-username-and-password).
|
|
255
|
+
Read more information about [login on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#login-with-username-and-password).
|
|
255
256
|
|
|
256
257
|
### logout()
|
|
257
258
|
|
|
@@ -261,7 +262,7 @@ This method is used when the user logs out of his/her account.
|
|
|
261
262
|
gudhub.logout(token);
|
|
262
263
|
```
|
|
263
264
|
|
|
264
|
-
Read more information about [logout on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#logout).
|
|
265
|
+
Read more information about [logout on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#logout).
|
|
265
266
|
|
|
266
267
|
### signup()
|
|
267
268
|
|
|
@@ -271,7 +272,7 @@ This method is used to register a user account in GudHub.
|
|
|
271
272
|
gudhub.signup(user);
|
|
272
273
|
```
|
|
273
274
|
|
|
274
|
-
Read more information about [signup on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#signup).
|
|
275
|
+
Read more information about [signup on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#signup).
|
|
275
276
|
|
|
276
277
|
### getUserById()
|
|
277
278
|
|
|
@@ -281,7 +282,7 @@ This method gets user from user list who have access to the application.
|
|
|
281
282
|
gudhub.getUserById(userId);
|
|
282
283
|
```
|
|
283
284
|
|
|
284
|
-
Read more information about [getUserById on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#getuserbyid).
|
|
285
|
+
Read more information about [getUserById on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#getuserbyid).
|
|
285
286
|
|
|
286
287
|
### getUsersList()
|
|
287
288
|
|
|
@@ -291,7 +292,7 @@ This method is called during the search for users to share. Namely, when you ent
|
|
|
291
292
|
gudhub.getUsersList(keyword);
|
|
292
293
|
```
|
|
293
294
|
|
|
294
|
-
Read more information about [getUsersList on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#getuserslist).
|
|
295
|
+
Read more information about [getUsersList on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#getuserslist).
|
|
295
296
|
|
|
296
297
|
### updateUser()
|
|
297
298
|
|
|
@@ -301,7 +302,7 @@ This is the method used to update user account data.
|
|
|
301
302
|
gudhub.updateUser(userData);
|
|
302
303
|
```
|
|
303
304
|
|
|
304
|
-
Read more information about [updateUser on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#updateuser).
|
|
305
|
+
Read more information about [updateUser on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#updateuser).
|
|
305
306
|
|
|
306
307
|
### getToken()
|
|
307
308
|
|
|
@@ -311,7 +312,7 @@ This method is used to get the current token.
|
|
|
311
312
|
gudhub.getToken();
|
|
312
313
|
```
|
|
313
314
|
|
|
314
|
-
Read more information about [getToken on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#gettoken).
|
|
315
|
+
Read more information about [getToken on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#gettoken).
|
|
315
316
|
|
|
316
317
|
### updateToken()
|
|
317
318
|
|
|
@@ -321,7 +322,7 @@ This method is called when the token is updated.
|
|
|
321
322
|
gudhub.updateToken(auth_key)
|
|
322
323
|
```
|
|
323
324
|
|
|
324
|
-
Read more information about [updateToken on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#updatetoken).
|
|
325
|
+
Read more information about [updateToken on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#updatetoken).
|
|
325
326
|
|
|
326
327
|
### updateAvatar()
|
|
327
328
|
|
|
@@ -331,7 +332,7 @@ This method is used when user changes his photo of the account.
|
|
|
331
332
|
gudhub.updateAvatar(imageData);
|
|
332
333
|
```
|
|
333
334
|
|
|
334
|
-
Read more information about [updateAvatar on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#updateavatar).
|
|
335
|
+
Read more information about [updateAvatar on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#updateavatar).
|
|
335
336
|
|
|
336
337
|
### getUserFromStorage()
|
|
337
338
|
|
|
@@ -341,7 +342,7 @@ This method is used for getting needed user from the user list during sharing.
|
|
|
341
342
|
gudhub.getUserFromStorage(id);
|
|
342
343
|
```
|
|
343
344
|
|
|
344
|
-
Read more information about [getUserFromStorage on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#getuserfromstorage).
|
|
345
|
+
Read more information about [getUserFromStorage on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#getuserfromstorage).
|
|
345
346
|
|
|
346
347
|
### saveUserToStorage()
|
|
347
348
|
|
|
@@ -351,7 +352,7 @@ This method allows you to add new user to the user list.
|
|
|
351
352
|
gudhub.saveUserToStorage(saveUser);
|
|
352
353
|
```
|
|
353
354
|
|
|
354
|
-
Read more information about [saveUserToStorage on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#saveusertostorage).
|
|
355
|
+
Read more information about [saveUserToStorage on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#saveusertostorage).
|
|
355
356
|
|
|
356
357
|
### getVersion()
|
|
357
358
|
|
|
@@ -361,7 +362,7 @@ Use this method to to find out the current version of the GudHub.
|
|
|
361
362
|
gudhub.getVersion();
|
|
362
363
|
```
|
|
363
364
|
|
|
364
|
-
Read more information about [getVersion on GudHub](https://gudhub.com/docs/core-api/auth-core-api/#getversion).
|
|
365
|
+
Read more information about [getVersion on GudHub](https://app.gudhub.com/docs/core-api/auth-core-api/#getversion).
|
|
365
366
|
|
|
366
367
|
## Items Processor
|
|
367
368
|
|
|
@@ -373,7 +374,7 @@ This method is used to get the items of the current application.
|
|
|
373
374
|
await gudhub.getItems(app_id, trash);
|
|
374
375
|
```
|
|
375
376
|
|
|
376
|
-
Read more information about [getItems on GudHub](https://gudhub.com/docs/core-api/item-processor/#getitems).
|
|
377
|
+
Read more information about [getItems on GudHub](https://app.gudhub.com/docs/core-api/item-processor/#getitems).
|
|
377
378
|
|
|
378
379
|
### addNewItems()
|
|
379
380
|
|
|
@@ -383,7 +384,7 @@ Use this method to add new items to the items list.
|
|
|
383
384
|
await gudhub.addNewItems(app_id, itemsList);
|
|
384
385
|
```
|
|
385
386
|
|
|
386
|
-
Read more information about [addNewItems on GudHub](https://gudhub.com/docs/core-api/item-processor/#addnewitems).
|
|
387
|
+
Read more information about [addNewItems on GudHub](https://app.gudhub.com/docs/core-api/item-processor/#addnewitems).
|
|
387
388
|
|
|
388
389
|
### updateItems()
|
|
389
390
|
|
|
@@ -393,7 +394,7 @@ This method is used to update certain items.
|
|
|
393
394
|
await gudhub.updateItems(app_id, itemsList);
|
|
394
395
|
```
|
|
395
396
|
|
|
396
|
-
Read more information about [updateItems on GudHub](https://gudhub.com/docs/core-api/item-processor/#updateitems).
|
|
397
|
+
Read more information about [updateItems on GudHub](https://app.gudhub.com/docs/core-api/item-processor/#updateitems).
|
|
397
398
|
|
|
398
399
|
### deleteItems()
|
|
399
400
|
|
|
@@ -403,7 +404,7 @@ Due to this method you can delete one and more items from thee application.
|
|
|
403
404
|
await gudhub.deleteItems(app_id, itemsIds);
|
|
404
405
|
```
|
|
405
406
|
|
|
406
|
-
Read more information about [deleteItems on GudHub](https://gudhub.com/docs/core-api/item-processor/#deleteitems).
|
|
407
|
+
Read more information about [deleteItems on GudHub](https://app.gudhub.com/docs/core-api/item-processor/#deleteitems).
|
|
407
408
|
|
|
408
409
|
## Field Processor
|
|
409
410
|
|
|
@@ -415,7 +416,7 @@ Due to this method you can get field from the relevant application.
|
|
|
415
416
|
await gudhub.getField(app_id, field_id);
|
|
416
417
|
```
|
|
417
418
|
|
|
418
|
-
Read more information about [getField on GudHub](https://gudhub.com/docs/core-api/field-processor/#getfield).
|
|
419
|
+
Read more information about [getField on GudHub](https://app.gudhub.com/docs/core-api/field-processor/#getfield).
|
|
419
420
|
|
|
420
421
|
### updateField()
|
|
421
422
|
|
|
@@ -425,7 +426,7 @@ This method allows you to update field model of the current application.
|
|
|
425
426
|
await gudhub.updateField(app_id, fieldModel);
|
|
426
427
|
```
|
|
427
428
|
|
|
428
|
-
Read more information about [updateField on GudHub](https://gudhub.com/docs/core-api/field-processor/#updatefield).
|
|
429
|
+
Read more information about [updateField on GudHub](https://app.gudhub.com/docs/core-api/field-processor/#updatefield).
|
|
429
430
|
|
|
430
431
|
### deleteField()
|
|
431
432
|
|
|
@@ -435,7 +436,7 @@ The method is created for deleting field from the application.
|
|
|
435
436
|
await gudhub.deleteField(app_id, field_id);
|
|
436
437
|
```
|
|
437
438
|
|
|
438
|
-
Read more information about [deleteField on GudHub](https://gudhub.com/docs/core-api/field-processor/#deletefield).
|
|
439
|
+
Read more information about [deleteField on GudHub](https://app.gudhub.com/docs/core-api/field-processor/#deletefield).
|
|
439
440
|
|
|
440
441
|
### getFieldModels()
|
|
441
442
|
|
|
@@ -445,7 +446,7 @@ This method is used for getting a list of field models.
|
|
|
445
446
|
await gudhub.getFieldModels(app_id);
|
|
446
447
|
```
|
|
447
448
|
|
|
448
|
-
Read more information about [getFieldModels on GudHub](https://gudhub.com/docs/core-api/field-processor/#getfieldmodels).
|
|
449
|
+
Read more information about [getFieldModels on GudHub](https://app.gudhub.com/docs/core-api/field-processor/#getfieldmodels).
|
|
449
450
|
|
|
450
451
|
### getFieldValue()
|
|
451
452
|
|
|
@@ -455,7 +456,7 @@ This method is responsible for getting the value from the desired field.
|
|
|
455
456
|
await gudhub.getFieldValue(app_id, item_id, field_id);
|
|
456
457
|
```
|
|
457
458
|
|
|
458
|
-
Read more information about [getFieldValue on GudHub](https://gudhub.com/docs/core-api/field-processor/#getfieldvalue).
|
|
459
|
+
Read more information about [getFieldValue on GudHub](https://app.gudhub.com/docs/core-api/field-processor/#getfieldvalue).
|
|
459
460
|
|
|
460
461
|
### setFieldValue()
|
|
461
462
|
|
|
@@ -465,7 +466,7 @@ This method is called to set value in the desired field.
|
|
|
465
466
|
await gudhub.setFieldValue(app_id, item_id, field_id, field_value);
|
|
466
467
|
```
|
|
467
468
|
|
|
468
|
-
Read more information about [setFieldValue on GudHub](https://gudhub.com/docs/core-api/field-processor/#setfieldvalue).
|
|
469
|
+
Read more information about [setFieldValue on GudHub](https://app.gudhub.com/docs/core-api/field-processor/#setfieldvalue).
|
|
469
470
|
|
|
470
471
|
## File Processor
|
|
471
472
|
|
|
@@ -477,7 +478,7 @@ This method is called to get file from the application.
|
|
|
477
478
|
gudhub.getFile(app_id, file_id);
|
|
478
479
|
```
|
|
479
480
|
|
|
480
|
-
Read more information about [getFile on GudHub](https://gudhub.com/docs/core-api/file-manager/#getfile).
|
|
481
|
+
Read more information about [getFile on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#getfile).
|
|
481
482
|
|
|
482
483
|
### getFiles()
|
|
483
484
|
|
|
@@ -487,7 +488,7 @@ This method is called for getting a list of files from current application.
|
|
|
487
488
|
gudhub.getFiles(app_id, filesId);
|
|
488
489
|
```
|
|
489
490
|
|
|
490
|
-
Read more information about [getFiles on GudHub](https://gudhub.com/docs/core-api/file-manager/#getfiles).
|
|
491
|
+
Read more information about [getFiles on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#getfiles).
|
|
491
492
|
|
|
492
493
|
### uploadFile()
|
|
493
494
|
|
|
@@ -497,7 +498,7 @@ The current method allows to upload files. It transfers the file through the for
|
|
|
497
498
|
await gudhub.uploadFile(fileData, app_id, file_id)
|
|
498
499
|
```
|
|
499
500
|
|
|
500
|
-
Read more information about [uploadFile on GudHub](https://gudhub.com/docs/core-api/file-manager/#uploadfile).
|
|
501
|
+
Read more information about [uploadFile on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#uploadfile).
|
|
501
502
|
|
|
502
503
|
### uploadFileFromString()
|
|
503
504
|
|
|
@@ -507,7 +508,7 @@ This is the method that allows to upload different files in base64 format to the
|
|
|
507
508
|
await gudhub.uploadFileFromString(fileObject);
|
|
508
509
|
```
|
|
509
510
|
|
|
510
|
-
Read more information about [uploadFileFromString on GudHub](https://gudhub.com/docs/core-api/file-manager/#uploadfilefromstring).
|
|
511
|
+
Read more information about [uploadFileFromString on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#uploadfilefromstring).
|
|
511
512
|
|
|
512
513
|
### isFileExists()
|
|
513
514
|
|
|
@@ -517,7 +518,7 @@ Due to this method you can check whether the file with the following ID exists i
|
|
|
517
518
|
await gudhub.isFileExists(app_id, file_id)
|
|
518
519
|
```
|
|
519
520
|
|
|
520
|
-
Read more information about [isFileExists on GudHub](https://gudhub.com/docs/core-api/file-manager/#isfileexists).
|
|
521
|
+
Read more information about [isFileExists on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#isfileexists).
|
|
521
522
|
|
|
522
523
|
### updateFileFromString()
|
|
523
524
|
|
|
@@ -527,7 +528,7 @@ The current method allows to update the data and name of the certain file.
|
|
|
527
528
|
await gudhub.updateFileFromString(data, file_id, file_name, extension, format)
|
|
528
529
|
```
|
|
529
530
|
|
|
530
|
-
Read more information about [updateFileFromString on GudHub](https://gudhub.com/docs/core-api/file-manager/#updatefilefromstring).
|
|
531
|
+
Read more information about [updateFileFromString on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#updatefilefromstring).
|
|
531
532
|
|
|
532
533
|
### duplicateFile()
|
|
533
534
|
|
|
@@ -537,7 +538,7 @@ This method is used to create the duplicate of the file.
|
|
|
537
538
|
await gudhub.duplicateFile(files)
|
|
538
539
|
```
|
|
539
540
|
|
|
540
|
-
Read more information about [duplicateFile on GudHub](https://gudhub.com/docs/core-api/file-manager/#duplicatefile).
|
|
541
|
+
Read more information about [duplicateFile on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#duplicatefile).
|
|
541
542
|
|
|
542
543
|
### downloadFileFromString()
|
|
543
544
|
|
|
@@ -547,7 +548,7 @@ Use this method to download the file from the fil list.
|
|
|
547
548
|
await gudhub.downloadFileFromString(app_id,file_id)
|
|
548
549
|
```
|
|
549
550
|
|
|
550
|
-
Read more information about [downloadFileFromString on GudHub](https://gudhub.com/docs/core-api/file-manager/#downloadfilefromstring).
|
|
551
|
+
Read more information about [downloadFileFromString on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#downloadfilefromstring).
|
|
551
552
|
|
|
552
553
|
### deleteFile()
|
|
553
554
|
|
|
@@ -557,7 +558,7 @@ Due to this method files can be deleted from the application.
|
|
|
557
558
|
gudhub.deleteFile(app_id, file_id);
|
|
558
559
|
```
|
|
559
560
|
|
|
560
|
-
Read more information about [deleteFile on GudHub](https://gudhub.com/docs/core-api/file-manager/#deletefile).
|
|
561
|
+
Read more information about [deleteFile on GudHub](https://app.gudhub.com/docs/core-api/file-manager/#deletefile).
|
|
561
562
|
|
|
562
563
|
## Document Processor
|
|
563
564
|
|
|
@@ -569,7 +570,7 @@ This method is called for creating a new document in the certain application.
|
|
|
569
570
|
gudhub.createDocument(documentObject);
|
|
570
571
|
```
|
|
571
572
|
|
|
572
|
-
Read more information about [createDocument on GudHub](https://gudhub.com/docs/core-api/document-manager/#createdocument).
|
|
573
|
+
Read more information about [createDocument on GudHub](https://app.gudhub.com/docs/core-api/document-manager/#createdocument).
|
|
573
574
|
|
|
574
575
|
### getDocument()
|
|
575
576
|
|
|
@@ -579,7 +580,7 @@ The method for getting needed document from the applications documents list.
|
|
|
579
580
|
gudhub.getDocument(documentAddress);
|
|
580
581
|
```
|
|
581
582
|
|
|
582
|
-
Read more information about [getDocument on GudHub](https://gudhub.com/docs/core-api/document-manager/#getdocument).
|
|
583
|
+
Read more information about [getDocument on GudHub](https://app.gudhub.com/docs/core-api/document-manager/#getdocument).
|
|
583
584
|
|
|
584
585
|
### getDocuments()
|
|
585
586
|
|
|
@@ -589,7 +590,7 @@ This method is called to get array of documents from the application.
|
|
|
589
590
|
gudhub.getDocuments(documentsAddresses);
|
|
590
591
|
```
|
|
591
592
|
|
|
592
|
-
Read more information about [getDocuments on GudHub](https://gudhub.com/docs/core-api/document-manager/#getdocuments).
|
|
593
|
+
Read more information about [getDocuments on GudHub](https://app.gudhub.com/docs/core-api/document-manager/#getdocuments).
|
|
593
594
|
|
|
594
595
|
### deleteDocument()
|
|
595
596
|
|
|
@@ -599,7 +600,7 @@ Due to this method you can delete document from the application.
|
|
|
599
600
|
gudhub.deleteDocumentApi(documentAddress);
|
|
600
601
|
```
|
|
601
602
|
|
|
602
|
-
Read more information about [deleteDocument on GudHub](https://gudhub.com/docs/core-api/document-manager/#deletedocument).
|
|
603
|
+
Read more information about [deleteDocument on GudHub](https://app.gudhub.com/docs/core-api/document-manager/#deletedocument).
|
|
603
604
|
|
|
604
605
|
## PipeService
|
|
605
606
|
|
|
@@ -611,7 +612,7 @@ This is the method that is called for getting subscription.
|
|
|
611
612
|
gudhub.on(event, address, myFunction);
|
|
612
613
|
```
|
|
613
614
|
|
|
614
|
-
Read more information about [On on GudHub](https://gudhub.com/docs/core-api/pipe-server/#on).
|
|
615
|
+
Read more information about [On on GudHub](https://app.gudhub.com/docs/core-api/pipe-server/#on).
|
|
615
616
|
|
|
616
617
|
### emit()
|
|
617
618
|
|
|
@@ -621,7 +622,7 @@ This is the method that is used by GudHub itself. It is called for getting exist
|
|
|
621
622
|
gudhub.on(event, address, myFunction);
|
|
622
623
|
```
|
|
623
624
|
|
|
624
|
-
Read more information about [Emit on GudHub](https://gudhub.com/docs/core-api/pipe-server/#emit).
|
|
625
|
+
Read more information about [Emit on GudHub](https://app.gudhub.com/docs/core-api/pipe-server/#emit).
|
|
625
626
|
|
|
626
627
|
### destroy()
|
|
627
628
|
|
|
@@ -631,4 +632,4 @@ This method exists for ruining extra subscriptions and for optimization the proc
|
|
|
631
632
|
gudhub.destroy('gh_app_views_update', address, myFunction);
|
|
632
633
|
```
|
|
633
634
|
|
|
634
|
-
Read more information about [Destroy on GudHub](https://gudhub.com/docs/core-api/pipe-server/#destroy).
|
|
635
|
+
Read more information about [Destroy on GudHub](https://app.gudhub.com/docs/core-api/pipe-server/#destroy).
|
|
@@ -174,7 +174,7 @@ export default function (app) {
|
|
|
174
174
|
|
|
175
175
|
app.post('/sharing/get-app-users', (req, res) => {
|
|
176
176
|
res.status(200).send([
|
|
177
|
-
{ user_id: "58", fullname: "Vasya Pupkin", sharing_permission: "4", avatar_128: "https://gudhub.com/avatars/58_5556_128.jpg", avatar_512: "https://gudhub.com/avatars/58_5556_512.jpg", app_id: "16259" },
|
|
177
|
+
{ user_id: "58", fullname: "Vasya Pupkin", sharing_permission: "4", avatar_128: "https://app.gudhub.com/avatars/58_5556_128.jpg", avatar_512: "https://app.gudhub.com/avatars/58_5556_512.jpg", app_id: "16259" },
|
|
178
178
|
]);
|
|
179
179
|
})
|
|
180
180
|
|
|
@@ -2968,7 +2968,7 @@ export const app_132 = {
|
|
|
2968
2968
|
"app_id": 132,
|
|
2969
2969
|
"item_id": 715,
|
|
2970
2970
|
"file_name": "document",
|
|
2971
|
-
"url": "https://gudhub.com/userdata/132/1254.html",
|
|
2971
|
+
"url": "https://app.gudhub.com/userdata/132/1254.html",
|
|
2972
2972
|
"extension": "html"
|
|
2973
2973
|
},
|
|
2974
2974
|
{
|
|
@@ -2976,7 +2976,7 @@ export const app_132 = {
|
|
|
2976
2976
|
"app_id": 132,
|
|
2977
2977
|
"item_id": 717,
|
|
2978
2978
|
"file_name": "document",
|
|
2979
|
-
"url": "https://gudhub.com/userdata/132/23160.html",
|
|
2979
|
+
"url": "https://app.gudhub.com/userdata/132/23160.html",
|
|
2980
2980
|
"extension": "html"
|
|
2981
2981
|
},
|
|
2982
2982
|
{
|
|
@@ -2984,7 +2984,7 @@ export const app_132 = {
|
|
|
2984
2984
|
"app_id": 132,
|
|
2985
2985
|
"item_id": 70332,
|
|
2986
2986
|
"file_name": "document",
|
|
2987
|
-
"url": "https://gudhub.com/userdata/132/23174.html",
|
|
2987
|
+
"url": "https://app.gudhub.com/userdata/132/23174.html",
|
|
2988
2988
|
"extension": "html"
|
|
2989
2989
|
},
|
|
2990
2990
|
{
|
|
@@ -2992,7 +2992,7 @@ export const app_132 = {
|
|
|
2992
2992
|
"app_id": 132,
|
|
2993
2993
|
"item_id": 80024,
|
|
2994
2994
|
"file_name": "document",
|
|
2995
|
-
"url": "https://gudhub.com/userdata/132/23163.html",
|
|
2995
|
+
"url": "https://app.gudhub.com/userdata/132/23163.html",
|
|
2996
2996
|
"extension": "html"
|
|
2997
2997
|
},
|
|
2998
2998
|
{
|
|
@@ -3000,7 +3000,7 @@ export const app_132 = {
|
|
|
3000
3000
|
"app_id": 132,
|
|
3001
3001
|
"item_id": 80047,
|
|
3002
3002
|
"file_name": "document",
|
|
3003
|
-
"url": "https://gudhub.com/userdata/132/23168.html",
|
|
3003
|
+
"url": "https://app.gudhub.com/userdata/132/23168.html",
|
|
3004
3004
|
"extension": "html"
|
|
3005
3005
|
},
|
|
3006
3006
|
{
|
|
@@ -3008,7 +3008,7 @@ export const app_132 = {
|
|
|
3008
3008
|
"app_id": 132,
|
|
3009
3009
|
"item_id": 80054,
|
|
3010
3010
|
"file_name": "document",
|
|
3011
|
-
"url": "https://gudhub.com/userdata/132/23171.html",
|
|
3011
|
+
"url": "https://app.gudhub.com/userdata/132/23171.html",
|
|
3012
3012
|
"extension": "html"
|
|
3013
3013
|
},
|
|
3014
3014
|
{
|
|
@@ -3016,7 +3016,7 @@ export const app_132 = {
|
|
|
3016
3016
|
"app_id": 132,
|
|
3017
3017
|
"item_id": 80125,
|
|
3018
3018
|
"file_name": "document",
|
|
3019
|
-
"url": "https://gudhub.com/userdata/132/23178.html",
|
|
3019
|
+
"url": "https://app.gudhub.com/userdata/132/23178.html",
|
|
3020
3020
|
"extension": "html"
|
|
3021
3021
|
}
|
|
3022
3022
|
],
|