Project
Defined in: js-api/src/entities/project.ts:22
Represents a project
Extends
Constructors
Constructor
new Project(
dart):Project
Defined in: js-api/src/entities/project.ts:23
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Project
Overrides
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
dart | public | any | - | Entity.dart | js-api/src/entities/entity.ts:19 |
meta | public | object | Project metadata (metaParams) — user-facing key:value bag, e.g. demoPath. | - | js-api/src/entities/project.ts:34 |
options | public | any | Project options as key-value pairs (a MapBag: indexed access plus the map methods; typed any so it can be cast to a package's own shape). | - | js-api/src/entities/project.ts:31 |
Accessors
author
Get Signature
get author():
any
Defined in: js-api/src/entities/entity.ts:57
Who created entity *
Returns
any
Inherited from
children
Get Signature
get children():
Entity[]
Defined in: js-api/src/entities/project.ts:127
Entities owned by the project.
Returns
Entity[]
createdOn
Get Signature
get createdOn():
Dayjs
Defined in: js-api/src/entities/entity.ts:48
Time when entity was created *
Returns
Dayjs
Inherited from
description
Get Signature
get description():
string
Defined in: js-api/src/entities/project.ts:72
Project description
Returns
string
Set Signature
set description(
s):void
Defined in: js-api/src/entities/project.ts:76
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
entityType
Get Signature
get entityType():
string
Defined in: js-api/src/entities/entity.ts:64
Entity type name *
Returns
string
Inherited from
friendlyName
Get Signature
get friendlyName():
string
Defined in: js-api/src/entities/entity.ts:34
Entity friendly name
Returns
string
Set Signature
set friendlyName(
x):void
Defined in: js-api/src/entities/entity.ts:35
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
id
Get Signature
get id():
string
Defined in: js-api/src/entities/entity.ts:27
Entity ID (GUID)
Returns
string
Set Signature
set id(
x):void
Defined in: js-api/src/entities/entity.ts:28
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
isDashboard
Get Signature
get isDashboard():
boolean
Defined in: js-api/src/entities/project.ts:91
Whether the project is a dashboard.
Returns
boolean
isDirty
Get Signature
get isDirty():
boolean
Defined in: js-api/src/entities/project.ts:81
Project changes flag
Returns
boolean
isEmpty
Get Signature
get isEmpty():
boolean
Defined in: js-api/src/entities/project.ts:86
Project is empty flag
Returns
boolean
isLocal
Get Signature
get isLocal():
string
Defined in: js-api/src/entities/project.ts:67
Whether the project exists only in this session.
Returns
string
isOnServer
Get Signature
get isOnServer():
string
Defined in: js-api/src/entities/project.ts:62
Whether the project has been saved to the server.
Returns
string
isPackage
Get Signature
get isPackage():
boolean
Defined in: js-api/src/entities/project.ts:96
Whether the project belongs to a package.
Returns
boolean
isSpace
Get Signature
get isSpace():
boolean
Defined in: js-api/src/entities/project.ts:101
True for Spaces — hierarchical containers with their own storage. See grok.dapi.spaces.
Returns
boolean
links
Get Signature
get links():
Entity[]
Defined in: js-api/src/entities/project.ts:122
Entities linked to the project (shared, not owned).
Returns
Entity[]
name
Get Signature
get name():
string
Defined in: js-api/src/entities/entity.ts:38
Entity short name
Returns
string
Set Signature
set name(
x):void
Defined in: js-api/src/entities/entity.ts:39
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
nqName
Get Signature
get nqName():
string
Defined in: js-api/src/entities/entity.ts:42
Entity full-qualified name
Returns
string
Inherited from
path
Get Signature
get path():
string
Defined in: js-api/src/entities/project.ts:57
Entity path
Returns
string
Overrides
pictureUrl
Get Signature
get pictureUrl():
string
Defined in: js-api/src/entities/project.ts:53
URL of the project picture.
Returns
string
updatedOn
Get Signature
get updatedOn():
Dayjs|null
Defined in: js-api/src/entities/entity.ts:51
Time when entity was updated *
Returns
Dayjs | null
Inherited from
Methods
addChild()
addChild(
entity):void
Defined in: js-api/src/entities/project.ts:139
Adds an entity (or the table info of a DataFrame) as a child of the project.
Parameters
| Parameter | Type |
|---|---|
entity | Entity | DataFrame |
Returns
void
addLink()
addLink(
entity):void
Defined in: js-api/src/entities/project.ts:132
Links an entity (or the table info of a DataFrame) to the project.
Parameters
| Parameter | Type |
|---|---|
entity | Entity | DataFrame |
Returns
void
addTableView()
addTableView(
table):TableView
Defined in: js-api/src/entities/project.ts:156
Adds a table to this project and opens it as a view
Parameters
| Parameter | Type |
|---|---|
table | DataFrame |
Returns
close()
close():
void
Defined in: js-api/src/entities/project.ts:117
Closes the project: removes its tables and views from the workspace.
Returns
void
getProperties()
getProperties():
Promise<{[index:string]:any; }>
Defined in: js-api/src/entities/entity.ts:67
Gets entity properties
Returns
Promise<{[index: string]: any; }>
Inherited from
hasTag()
hasTag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:79
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
newId()
newId():
void
Defined in: js-api/src/entities/entity.ts:31
Generates new id for this entity.
Returns
void
Inherited from
open()
open(
options?):Promise<Project>
Defined in: js-api/src/entities/project.ts:111
Opens the project in workspace
Parameters
| Parameter | Type |
|---|---|
options? | ProjectOpenOptions |
Returns
Promise<Project>
removeChild()
removeChild(
entity):void
Defined in: js-api/src/entities/project.ts:151
Removes a child.
Parameters
| Parameter | Type |
|---|---|
entity | Entity |
Returns
void
removeLink()
removeLink(
entity):void
Defined in: js-api/src/entities/project.ts:146
Removes a link.
Parameters
| Parameter | Type |
|---|---|
entity | Entity |
Returns
void
setProperties()
setProperties(
props):Promise<any>
Defined in: js-api/src/entities/entity.ts:72
Sets entity properties
Parameters
| Parameter | Type |
|---|---|
props | {[index: string]: any; } |
Returns
Promise<any>
Inherited from
tag()
tag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:82
Adds a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
toMarkup()
toMarkup():
string
Defined in: js-api/src/entities/project.ts:106
The markup that references this project.
Returns
string
toString()
toString():
string
Defined in: js-api/src/entities/entity.ts:77
Returns a string representing the object
Returns
string
Inherited from
unTag()
unTag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:85
Removes a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
create()
staticcreate():Project
Defined in: js-api/src/entities/project.ts:37
Creates a new, unsaved project.
Returns
Project
showSaveDialog()
staticshowSaveDialog(options):Promise<Project|null>
Defined in: js-api/src/entities/project.ts:41
Opens the "Save project" dialog for the given tables only (no workspace scan), with
views[i] or layouts[i] as the layout. Pass project to re-publish into it.
Parameters
| Parameter | Type |
|---|---|
options | { description?: string; layouts?: (string | null)[]; name?: string; project?: string | Project; tables: DataFrame[]; views?: (TableView | null)[]; } |
options.description? | string |
options.layouts? | (string | null)[] |
options.name? | string |
options.project? | string | Project |
options.tables | DataFrame[] |
options.views? | (TableView | null)[] |
Returns
Promise<Project | null>