NotificationsDataSource
Defined in: src/dapi.ts:1287
Common functionality for handling collections of entities stored on the server. Works with Datagrok REST API, allows to get filtered and paginated lists of entities, Can be extended with specific methods. (i.e. UsersDataSource)
Extends
Constructors
Constructor
new NotificationsDataSource(
s):NotificationsDataSource
Defined in: src/dapi.ts:1288
Parameters
| Parameter | Type |
|---|---|
s | any |
Returns
NotificationsDataSource
Overrides
Properties
| Property | Type | Inherited from | Defined in |
|---|---|---|---|
clsName | string | HttpDataSource.clsName | src/dapi.ts:252 |
dart | any | HttpDataSource.dart | src/dapi.ts:251 |
Methods
allPackageVersions()
allPackageVersions():
HttpDataSource<UserNotification>
Defined in: src/dapi.ts:307
Turns off package versions isolation. This DataSource will return all entities in all versions, not only the current one *
Returns
HttpDataSource<UserNotification>
Inherited from
HttpDataSource.allPackageVersions
by()
by(
i):HttpDataSource<UserNotification>
Defined in: src/dapi.ts:312
Parameters
| Parameter | Type |
|---|---|
i | number |
Returns
HttpDataSource<UserNotification>
Inherited from
count()
count():
Promise<number>
Defined in: src/dapi.ts:278
Counts entities that satisfy the filtering criteria (see filter). See examples: https://public.datagrok.ai/js/samples/dapi/projects-list Smart filter: https://datagrok.ai/help/datagrok/smart-search
Returns
Promise<number>
Inherited from
countUnread()
countUnread():
Promise<number>
Defined in: src/dapi.ts:1296
Returns
Promise<number>
delete()
delete(
e):Promise<void>
Defined in: src/dapi.ts:302
Deletes an entity.
Parameters
| Parameter | Type |
|---|---|
e | Entity |
Returns
Promise<void>
Inherited from
filter()
filter(
w):HttpDataSource<UserNotification>
Defined in: src/dapi.ts:335
Applies filter to current request. Also can be set with list method "options" parameter See example: https://public.datagrok.ai/js/samples/dapi/projects-list Smart filter: https://datagrok.ai/help/datagrok/navigation/views/browse#entity-search
Parameters
| Parameter | Type |
|---|---|
w | string |
Returns
HttpDataSource<UserNotification>
Inherited from
find()
find(
id):Promise<UserNotification>
Defined in: src/dapi.ts:292
Returns an entity with the specified id. Throws an exception if an entity does not exist, or is not accessible in the current context. Sample: https://public.datagrok.ai/js/samples/data-access/save-and-load-df
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | GUID of the corresponding object |
Returns
Promise<UserNotification>
{Promise<object>} - entity.
Inherited from
first()
first():
Promise<UserNotification>
Defined in: src/dapi.ts:283
Returns fist entity that satisfies the filtering criteria (see filter).
Returns
Promise<UserNotification>
Inherited from
forCurrentUser()
forCurrentUser():
NotificationsDataSource
Defined in: src/dapi.ts:1292
Returns
NotificationsDataSource
include()
include(
include):HttpDataSource<UserNotification>
Defined in: src/dapi.ts:347
Includes entity in the result
Parameters
| Parameter | Type |
|---|---|
include | string |
Returns
HttpDataSource<UserNotification>
Inherited from
list()
list(
options?):Promise<UserNotification[]>
Defined in: src/dapi.ts:263
Returns all entities that satisfy the filtering criteria (see filter). See examples: https://public.datagrok.ai/js/samples/dapi/projects-list Smart filter: https://datagrok.ai/help/datagrok/smart-search
Parameters
| Parameter | Type |
|---|---|
options | { filter?: string; order?: string; pageNumber?: number; pageSize?: number; } |
options.filter? | string |
options.order? | string |
options.pageNumber? | number |
options.pageSize? | number |
Returns
Promise<UserNotification[]>
Inherited from
markAllAsRead()
markAllAsRead():
Promise<void>
Defined in: src/dapi.ts:1300
Returns
Promise<void>
markAsRead()
markAsRead(
notificationId):Promise<void>
Defined in: src/dapi.ts:1304
Parameters
| Parameter | Type |
|---|---|
notificationId | string |
Returns
Promise<void>
nextPage()
nextPage():
HttpDataSource<UserNotification>
Defined in: src/dapi.ts:326
Returns next page of all entities that satisfy the filtering criteria (see filter). Works only if pageSize was set during previous list() call See examples: https://public.datagrok.ai/js/samples/dapi/projects-list
Returns
HttpDataSource<UserNotification>
Inherited from
order()
order(
fieldName,desc?):HttpDataSource<UserNotification>
Defined in: src/dapi.ts:341
Instructs data source to return results in the specified order.
Parameters
| Parameter | Type | Default value |
|---|---|---|
fieldName | string | undefined |
desc | boolean | false |
Returns
HttpDataSource<UserNotification>
Inherited from
page()
page(
i):HttpDataSource<UserNotification>
Defined in: src/dapi.ts:318
Restricts results to the specified page number. See also nextPage.
Parameters
| Parameter | Type |
|---|---|
i | number |
Returns
HttpDataSource<UserNotification>
Inherited from
save()
save(
e):Promise<UserNotification>
Defined in: src/dapi.ts:297
Saves an entity.
Parameters
| Parameter | Type |
|---|---|
e | Entity |
Returns
Promise<UserNotification>