@octostar/platform-types 0.2.0 → 0.2.2
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/dist/docs/enums/SortOrder.html +3 -3
- package/dist/docs/enums/WorkspacePermissionValue.html +3 -3
- package/dist/docs/hierarchy.html +1 -1
- package/dist/docs/index.html +2 -2
- package/dist/docs/interfaces/ActionContext.html +4 -4
- package/dist/docs/interfaces/Colorful.html +3 -3
- package/dist/docs/interfaces/Concept.html +12 -12
- package/dist/docs/interfaces/Desktop.html +77 -77
- package/dist/docs/interfaces/DesktopActionContext.html +7 -7
- package/dist/docs/interfaces/DesktopSettings.html +5 -5
- package/dist/docs/interfaces/GetAttachmentOptions.html +5 -5
- package/dist/docs/interfaces/IDataTransfer.html +11 -11
- package/dist/docs/interfaces/Inheritance.html +5 -5
- package/dist/docs/interfaces/Ontology.html +20 -20
- package/dist/docs/interfaces/Property.html +5 -5
- package/dist/docs/interfaces/QueryObjectFilterClause.html +3 -3
- package/dist/docs/interfaces/RecordProvider.html +6 -6
- package/dist/docs/interfaces/RefObject.html +3 -3
- package/dist/docs/interfaces/Relationship.html +20 -20
- package/dist/docs/interfaces/SearchProps.html +4 -4
- package/dist/docs/interfaces/SearchXperienceModalProps.html +9 -9
- package/dist/docs/interfaces/SearchXperienceProps.html +7 -7
- package/dist/docs/interfaces/StylerContext.html +11 -11
- package/dist/docs/interfaces/TagAttributes.html +7 -7
- package/dist/docs/interfaces/WorkspaceChangeEmitter.html +5 -5
- package/dist/docs/interfaces/WorkspaceItemConfig.html +6 -6
- package/dist/docs/interfaces/WorkspaceRecordIdentifier.html +5 -5
- package/dist/docs/modules.html +2 -2
- package/dist/docs/types/ActionHandler.html +2 -2
- package/dist/docs/types/AddCommentParams.html +2 -2
- package/dist/docs/types/AddListener.html +2 -2
- package/dist/docs/types/ApiErrorResult.html +2 -2
- package/dist/docs/types/ApiResult.html +2 -2
- package/dist/docs/types/ApiSuccessResult.html +2 -2
- package/dist/docs/types/App.html +2 -2
- package/dist/docs/types/AppRegistry.html +2 -2
- package/dist/docs/types/AppServiceCallOptions.html +2 -2
- package/dist/docs/types/AppServiceCallProps.html +2 -2
- package/dist/docs/types/AsyncFilter.html +2 -2
- package/dist/docs/types/AttachmentResponseType.html +2 -2
- package/dist/docs/types/AttachmentType.html +2 -2
- package/dist/docs/types/Behaviour.html +2 -2
- package/dist/docs/types/BinaryOperator.html +2 -2
- package/dist/docs/types/Callback.html +2 -2
- package/dist/docs/types/CommentWorkspaceItem.html +2 -2
- package/dist/docs/types/Comparator.html +2 -2
- package/dist/docs/types/ConceptFilter.html +2 -2
- package/dist/docs/types/ConceptMap.html +2 -2
- package/dist/docs/types/ConceptWithParents.html +2 -2
- package/dist/docs/types/ConnectedEntity.html +2 -2
- package/dist/docs/types/ContextMenuGroup.html +2 -2
- package/dist/docs/types/ContextMenuLabels.html +2 -2
- package/dist/docs/types/ContextMenuOptions.html +2 -2
- package/dist/docs/types/ContextMenuParams.html +2 -2
- package/dist/docs/types/ContextMenuRequest.html +2 -2
- package/dist/docs/types/CopyOptions.html +2 -2
- package/dist/docs/types/CreateEntityFormProps.html +2 -2
- package/dist/docs/types/CreateRelationsDialogProps.html +2 -2
- package/dist/docs/types/CustomEventListener.html +2 -2
- package/dist/docs/types/CustomTemplate.html +2 -2
- package/dist/docs/types/CustomTemplateIframeProps.html +2 -2
- package/dist/docs/types/DesktopAction.html +2 -2
- package/dist/docs/types/DesktopActionFilter.html +2 -2
- package/dist/docs/types/DesktopActionMenuItem.html +2 -2
- package/dist/docs/types/DesktopActionMenuItemGroup.html +2 -2
- package/dist/docs/types/DesktopActionOptions.html +2 -2
- package/dist/docs/types/DesktopOpenParams.html +2 -2
- package/dist/docs/types/DesktopStylerContext.html +2 -2
- package/dist/docs/types/DraftWorkspaceItem.html +2 -2
- package/dist/docs/types/DragEndParams.html +2 -2
- package/dist/docs/types/DragStartParams.html +2 -2
- package/dist/docs/types/EConnection.html +2 -2
- package/dist/docs/types/EdgeSpec.html +2 -2
- package/dist/docs/types/EmitEventTransformDefinition.html +2 -2
- package/dist/docs/types/Entity.html +2 -2
- package/dist/docs/types/EntityEdge.html +2 -2
- package/dist/docs/types/EntityOTM.html +2 -2
- package/dist/docs/types/EntityPasteContext.html +2 -2
- package/dist/docs/types/EventContextType.html +2 -2
- package/dist/docs/types/EventEmitterType.html +2 -2
- package/dist/docs/types/EventName.html +2 -2
- package/dist/docs/types/EventProducer.html +2 -2
- package/dist/docs/types/EventPublisher.html +2 -2
- package/dist/docs/types/EventSubscriber.html +2 -2
- package/dist/docs/types/EventUnsubscriber.html +2 -2
- package/dist/docs/types/ExportOptions.html +2 -2
- package/dist/docs/types/ExtractEntitiesOptions.html +2 -2
- package/dist/docs/types/FileCode.html +2 -2
- package/dist/docs/types/FileTreeOptions.html +2 -2
- package/dist/docs/types/FilterDefinition.html +2 -2
- package/dist/docs/types/FilterDefinitions.html +2 -2
- package/dist/docs/types/FilterName.html +2 -2
- package/dist/docs/types/FilterReference.html +2 -2
- package/dist/docs/types/FocusListItem.html +2 -2
- package/dist/docs/types/FolderPasteOptions.html +2 -2
- package/dist/docs/types/GraphSpec.html +2 -2
- package/dist/docs/types/HttpTransformDefinition.html +2 -2
- package/dist/docs/types/Icon.html +2 -2
- package/dist/docs/types/IconProps.html +2 -2
- package/dist/docs/types/IframeTransformDefinition.html +2 -2
- package/dist/docs/types/ImageInfo.html +2 -2
- package/dist/docs/types/ImportZipOptions.html +2 -2
- package/dist/docs/types/InlineCode.html +2 -2
- package/dist/docs/types/JavascriptFileStylerDefinition.html +2 -2
- package/dist/docs/types/JavascriptFileTransformDefinition.html +2 -2
- package/dist/docs/types/JavascriptFilterDefinition.html +2 -2
- package/dist/docs/types/JavascriptInlineStylerDefinition.html +2 -2
- package/dist/docs/types/JavascriptInlineTransformDefinition.html +2 -2
- package/dist/docs/types/JavascriptType.html +2 -2
- package/dist/docs/types/JobManifest.html +2 -2
- package/dist/docs/types/KnownCounts.html +2 -2
- package/dist/docs/types/ModalTemplateProps.html +2 -2
- package/dist/docs/types/NamedEntityGroup.html +2 -2
- package/dist/docs/types/NunjucksFileTransformDefinition.html +2 -2
- package/dist/docs/types/NunjucksInlineTransformDefinition.html +2 -2
- package/dist/docs/types/NunjucksType.html +2 -2
- package/dist/docs/types/OS_CONFIRM_MODAL_RESPONSE.html +2 -2
- package/dist/docs/types/OntologyTags.html +2 -2
- package/dist/docs/types/OsAuditFields.html +2 -2
- package/dist/docs/types/OsConfirmProps.html +2 -2
- package/dist/docs/types/OsNotification.html +2 -2
- package/dist/docs/types/OsProgress.html +2 -2
- package/dist/docs/types/OsTag.html +2 -2
- package/dist/docs/types/OsWorkspaceEntity.html +2 -2
- package/dist/docs/types/OsWorkspacePickerProps.html +2 -2
- package/dist/docs/types/PasteContextOptions.html +2 -2
- package/dist/docs/types/Permission.html +2 -2
- package/dist/docs/types/Point.html +2 -2
- package/dist/docs/types/ProvidedFilterDefinition.html +2 -2
- package/dist/docs/types/ProvidedTransformDefinition.html +2 -2
- package/dist/docs/types/PythonFileStylerDefinition.html +2 -2
- package/dist/docs/types/PythonFileTransformDefinition.html +2 -2
- package/dist/docs/types/PythonFilterDefinition.html +2 -2
- package/dist/docs/types/PythonInlineStylerDefinition.html +2 -2
- package/dist/docs/types/PythonInlineTransformDefinition.html +2 -2
- package/dist/docs/types/PythonType.html +2 -2
- package/dist/docs/types/Query.html +2 -2
- package/dist/docs/types/QueryBatchResult.html +2 -2
- package/dist/docs/types/QueryErrorResult.html +2 -2
- package/dist/docs/types/QueryExecutor.html +2 -2
- package/dist/docs/types/QueryResponse.html +2 -2
- package/dist/docs/types/QueryResult.html +2 -2
- package/dist/docs/types/QuerySuccessResult.html +2 -2
- package/dist/docs/types/ReactCssProperties.html +2 -2
- package/dist/docs/types/ReactNode.html +2 -2
- package/dist/docs/types/ReactRef.html +2 -2
- package/dist/docs/types/ReasonedBoolean.html +2 -2
- package/dist/docs/types/RefCallback.html +2 -2
- package/dist/docs/types/RelationshipCountResult.html +2 -2
- package/dist/docs/types/SaveAsModalProps.html +2 -2
- package/dist/docs/types/SaveFileOptions.html +2 -2
- package/dist/docs/types/SaveOptions.html +2 -2
- package/dist/docs/types/SavedTemplate.html +2 -2
- package/dist/docs/types/SemanticBindingType.html +2 -2
- package/dist/docs/types/SemanticBindings.html +2 -2
- package/dist/docs/types/SemanticallyBoundFilterDefinition.html +2 -2
- package/dist/docs/types/SendQueryOptions.html +2 -2
- package/dist/docs/types/ServiceDefinition.html +2 -2
- package/dist/docs/types/ServiceDefinitions.html +2 -2
- package/dist/docs/types/ServiceRole.html +2 -2
- package/dist/docs/types/ShowOntology.html +2 -2
- package/dist/docs/types/ShowTabProps.html +2 -2
- package/dist/docs/types/Styler.html +2 -2
- package/dist/docs/types/StylerConfig.html +2 -2
- package/dist/docs/types/StylerDefinition.html +2 -2
- package/dist/docs/types/StylerDefinitions.html +2 -2
- package/dist/docs/types/StylerOption.html +2 -2
- package/dist/docs/types/StylerProducer.html +2 -2
- package/dist/docs/types/Tag.html +2 -2
- package/dist/docs/types/TagInfo.html +2 -2
- package/dist/docs/types/TagWithRelationship.html +2 -2
- package/dist/docs/types/TaskCleanupReason.html +2 -2
- package/dist/docs/types/TemplateMetadata.html +2 -2
- package/dist/docs/types/TemplateType.html +2 -2
- package/dist/docs/types/TemplateVariant.html +2 -2
- package/dist/docs/types/TransformAction.html +2 -2
- package/dist/docs/types/TransformActionContext.html +2 -2
- package/dist/docs/types/TransformDefinition.html +2 -2
- package/dist/docs/types/TransformDefinitions.html +2 -2
- package/dist/docs/types/Unsubscribe.html +2 -2
- package/dist/docs/types/UserProfile.html +2 -2
- package/dist/docs/types/Watcher.html +2 -2
- package/dist/docs/types/Whoami.html +2 -2
- package/dist/docs/types/WithProgressBarOptions.html +2 -2
- package/dist/docs/types/Workspace.html +2 -2
- package/dist/docs/types/WorkspaceIdentifier.html +2 -2
- package/dist/docs/types/WorkspaceItem.html +2 -2
- package/dist/docs/types/WorkspaceItemBase.html +2 -2
- package/dist/docs/types/WorkspaceItemIdentifier.html +2 -2
- package/dist/docs/types/WorkspaceItemModel.html +2 -2
- package/dist/docs/types/WorkspaceItemTitleProps.html +2 -2
- package/dist/docs/types/WorkspaceItems.html +2 -2
- package/dist/docs/types/WorkspacePermission.html +2 -2
- package/dist/docs/types/WorkspaceRecord.html +2 -2
- package/dist/docs/types/WorkspaceRecordInfo.html +2 -2
- package/dist/docs/types/WorkspaceRecordWithRelationships.html +2 -2
- package/dist/docs/types/WorkspaceRecords.html +2 -2
- package/dist/docs/types/WorkspaceRelationship.html +2 -2
- package/dist/docs/types/WorkspaceSettings.html +2 -2
- package/dist/docs/types/trigger.html +2 -2
- package/dist/docs/types/uuid.html +2 -2
- package/dist/docs/variables/OS_CONFIRM_MODAL_CANCEL.html +2 -2
- package/dist/docs/variables/OS_CONFIRM_MODAL_NO.html +2 -2
- package/dist/docs/variables/OS_CONFIRM_MODAL_YES.html +2 -2
- package/lib/action.d.ts +130 -0
- package/lib/action.d.ts.map +1 -0
- package/lib/action.js +2 -0
- package/lib/action.js.map +1 -0
- package/lib/api.d.ts +30 -0
- package/lib/api.d.ts.map +1 -0
- package/lib/api.js +2 -0
- package/lib/api.js.map +1 -0
- package/lib/app.d.ts +56 -0
- package/lib/app.d.ts.map +1 -0
- package/lib/app.js +2 -0
- package/lib/app.js.map +1 -0
- package/lib/behaviour.d.ts +45 -0
- package/lib/behaviour.d.ts.map +1 -0
- package/lib/behaviour.js +14 -0
- package/lib/behaviour.js.map +1 -0
- package/lib/callback.d.ts +22 -0
- package/lib/callback.d.ts.map +1 -0
- package/lib/callback.js +2 -0
- package/lib/callback.js.map +1 -0
- package/lib/desktop.d.ts +1100 -0
- package/lib/desktop.d.ts.map +1 -0
- package/lib/desktop.js +16 -0
- package/lib/desktop.js.map +1 -0
- package/lib/event.d.ts +90 -0
- package/lib/event.d.ts.map +1 -0
- package/lib/event.js +2 -0
- package/lib/event.js.map +1 -0
- package/lib/filters.d.ts +49 -0
- package/lib/filters.d.ts.map +1 -0
- package/lib/filters.js +2 -0
- package/lib/filters.js.map +1 -0
- package/lib/graph.d.ts +67 -0
- package/lib/graph.d.ts.map +1 -0
- package/lib/graph.js +2 -0
- package/lib/graph.js.map +1 -0
- package/lib/index.d.ts +20 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/jobManifestTypes.d.ts +283 -0
- package/lib/jobManifestTypes.d.ts.map +1 -0
- package/lib/jobManifestTypes.js +2 -0
- package/lib/jobManifestTypes.js.map +1 -0
- package/lib/model.d.ts +647 -0
- package/lib/model.d.ts.map +1 -0
- package/lib/model.js +11 -0
- package/lib/model.js.map +1 -0
- package/lib/ontology.d.ts +176 -0
- package/lib/ontology.d.ts.map +1 -0
- package/lib/ontology.js +2 -0
- package/lib/ontology.js.map +1 -0
- package/lib/query.d.ts +70 -0
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js +2 -0
- package/lib/query.js.map +1 -0
- package/lib/react-types.d.ts +31 -0
- package/lib/react-types.d.ts.map +1 -0
- package/lib/react-types.js +2 -0
- package/lib/react-types.js.map +1 -0
- package/lib/search.d.ts +49 -0
- package/lib/search.d.ts.map +1 -0
- package/lib/search.js +2 -0
- package/lib/search.js.map +1 -0
- package/lib/styling.d.ts +87 -0
- package/lib/styling.d.ts.map +1 -0
- package/lib/styling.js +2 -0
- package/lib/styling.js.map +1 -0
- package/lib/templates.d.ts +107 -0
- package/lib/templates.d.ts.map +1 -0
- package/lib/templates.js +2 -0
- package/lib/templates.js.map +1 -0
- package/lib/user.d.ts +15 -0
- package/lib/user.d.ts.map +1 -0
- package/lib/user.js +2 -0
- package/lib/user.js.map +1 -0
- package/lib/workspace.d.ts +181 -0
- package/lib/workspace.d.ts.map +1 -0
- package/lib/workspace.js +12 -0
- package/lib/workspace.js.map +1 -0
- package/package.json +13 -12
package/lib/desktop.d.ts
ADDED
|
@@ -0,0 +1,1100 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TabNode } from 'flexlayout-react';
|
|
3
|
+
import { ButtonProps } from 'antd5';
|
|
4
|
+
import { AddListener } from './callback';
|
|
5
|
+
import { WorkspaceItem, Entity, WorkspaceItemModel, WorkspaceRecordIdentifier, OsWorkspaceEntity, Relationship, OsTag, TagAttributes, ConceptFilter, FocusListItem, Concept } from './model';
|
|
6
|
+
import { TagWithRelationship, Workspace, WorkspaceChangeEmitter, WorkspaceIdentifier, WorkspacePermission, WorkspacePermissionValue, WorkspaceRecordWithRelationships } from './workspace';
|
|
7
|
+
import { EventEmitterType } from './event';
|
|
8
|
+
import { ActionContext, ContextMenuGroup, ContextMenuOptions, ContextMenuRequest } from './action';
|
|
9
|
+
import { CustomTemplate, ModalTemplateProps, SavedTemplate } from './templates';
|
|
10
|
+
import { App, AppServiceCallProps } from './app';
|
|
11
|
+
import { SearchProps, SearchXperienceProps } from './search';
|
|
12
|
+
import { Styler, StylerConfig, StylerOption } from './styling';
|
|
13
|
+
import { GraphSpec } from './graph';
|
|
14
|
+
import { UserProfile } from './user';
|
|
15
|
+
import { ReactCssProperties, ReactRef, ReactNode } from './react-types';
|
|
16
|
+
import { Ontology } from './ontology';
|
|
17
|
+
/**
|
|
18
|
+
* Represents properties for an icon.
|
|
19
|
+
* @beta
|
|
20
|
+
*/
|
|
21
|
+
export type IconProps = {
|
|
22
|
+
/**
|
|
23
|
+
* Name of the icon.
|
|
24
|
+
*/
|
|
25
|
+
icon: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional class name for styling.
|
|
28
|
+
*/
|
|
29
|
+
className?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Rotation angle for the icon.
|
|
32
|
+
*/
|
|
33
|
+
rotate?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the icon should spin.
|
|
36
|
+
*/
|
|
37
|
+
spin?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* CSS properties for the icon.
|
|
40
|
+
*/
|
|
41
|
+
style?: ReactCssProperties;
|
|
42
|
+
/**
|
|
43
|
+
* Reference to the HTML span element.
|
|
44
|
+
*/
|
|
45
|
+
iconRef?: ReactRef<HTMLSpanElement>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Represents a watcher.
|
|
49
|
+
* @beta
|
|
50
|
+
*/
|
|
51
|
+
export type Watcher = {
|
|
52
|
+
/**
|
|
53
|
+
* Application ID.
|
|
54
|
+
*/
|
|
55
|
+
app_id: string;
|
|
56
|
+
/**
|
|
57
|
+
* Application name.
|
|
58
|
+
*/
|
|
59
|
+
app_name: string;
|
|
60
|
+
/**
|
|
61
|
+
* Watcher name.
|
|
62
|
+
*/
|
|
63
|
+
watcher_name: string;
|
|
64
|
+
/**
|
|
65
|
+
* Constants for the watcher.
|
|
66
|
+
*/
|
|
67
|
+
const: [key: string, value: any][];
|
|
68
|
+
/**
|
|
69
|
+
* Description of the watcher.
|
|
70
|
+
*/
|
|
71
|
+
description: string;
|
|
72
|
+
/**
|
|
73
|
+
* File associated with the watcher.
|
|
74
|
+
*/
|
|
75
|
+
file: string;
|
|
76
|
+
/**
|
|
77
|
+
* Interval for the watcher.
|
|
78
|
+
*/
|
|
79
|
+
interval: string;
|
|
80
|
+
/**
|
|
81
|
+
* Name of the watcher.
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
84
|
+
/**
|
|
85
|
+
* Parameters for the watcher.
|
|
86
|
+
*/
|
|
87
|
+
params: [key: string, value: any][];
|
|
88
|
+
/**
|
|
89
|
+
* Semantically bound items.
|
|
90
|
+
*/
|
|
91
|
+
semantically_bound: string[];
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Options for saving a file.
|
|
95
|
+
* @beta
|
|
96
|
+
*/
|
|
97
|
+
export type SaveFileOptions = {
|
|
98
|
+
/**
|
|
99
|
+
* Path to save the file.
|
|
100
|
+
*/
|
|
101
|
+
path?: string | undefined;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Options for saving an item.
|
|
105
|
+
* @beta
|
|
106
|
+
*/
|
|
107
|
+
export type SaveOptions = SaveFileOptions & {
|
|
108
|
+
/**
|
|
109
|
+
* Whether to save as a draft.
|
|
110
|
+
*/
|
|
111
|
+
draft?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Whether to save as a new file.
|
|
114
|
+
*/
|
|
115
|
+
saveAs?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Application related to the item.
|
|
118
|
+
*/
|
|
119
|
+
app?: WorkspaceItem;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Parameters for adding a comment.
|
|
123
|
+
* @beta
|
|
124
|
+
*/
|
|
125
|
+
export type AddCommentParams = {
|
|
126
|
+
/**
|
|
127
|
+
* Parent UID for the comment.
|
|
128
|
+
*/
|
|
129
|
+
os_parent_uid?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Contents of the comment.
|
|
132
|
+
*/
|
|
133
|
+
contents: string;
|
|
134
|
+
/**
|
|
135
|
+
* Slug for the comment.
|
|
136
|
+
*/
|
|
137
|
+
slug?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Workspace for the comment.
|
|
140
|
+
*/
|
|
141
|
+
os_workspace?: string;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Interface for desktop settings.
|
|
145
|
+
* @beta
|
|
146
|
+
*/
|
|
147
|
+
export interface DesktopSettings {
|
|
148
|
+
/**
|
|
149
|
+
* Gets the IDs of open workspaces.
|
|
150
|
+
*/
|
|
151
|
+
getOpenWorkspaceIds: () => Promise<string[]>;
|
|
152
|
+
/**
|
|
153
|
+
* Sets the IDs of open workspaces.
|
|
154
|
+
*/
|
|
155
|
+
setOpenWorkspaceIds: (ids: string[]) => Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Listener for changes in open workspace IDs.
|
|
158
|
+
*/
|
|
159
|
+
onOpenWorkspaceIdsChanged: AddListener<string[]>;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Options for desktop actions.
|
|
163
|
+
* @beta
|
|
164
|
+
*/
|
|
165
|
+
export type DesktopActionOptions = {
|
|
166
|
+
/**
|
|
167
|
+
* ID of the tab.
|
|
168
|
+
*/
|
|
169
|
+
tabId?: string;
|
|
170
|
+
/**
|
|
171
|
+
* ID of the tab to place beside.
|
|
172
|
+
*/
|
|
173
|
+
besideTabId?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Whether to auto-select the tab.
|
|
176
|
+
*/
|
|
177
|
+
autoSelectTab?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Function to call on closing the tab.
|
|
180
|
+
*/
|
|
181
|
+
onCloseTab?: () => void;
|
|
182
|
+
/**
|
|
183
|
+
* Additional options for the action.
|
|
184
|
+
*/
|
|
185
|
+
with?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Initial state for the action.
|
|
188
|
+
*/
|
|
189
|
+
initialState?: any;
|
|
190
|
+
/**
|
|
191
|
+
* Whether to open in a new tab.
|
|
192
|
+
*/
|
|
193
|
+
newTab?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Whether to open in a modal window.
|
|
196
|
+
*/
|
|
197
|
+
modal?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Whether to preserve the state of the tab after action is finished. Used with modal.
|
|
200
|
+
*/
|
|
201
|
+
preserve?: boolean;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Context for desktop actions.
|
|
205
|
+
* @beta
|
|
206
|
+
*/
|
|
207
|
+
export interface DesktopActionContext extends ActionContext {
|
|
208
|
+
/**
|
|
209
|
+
* Event emitter type.
|
|
210
|
+
*/
|
|
211
|
+
ee: EventEmitterType;
|
|
212
|
+
/**
|
|
213
|
+
* Prefix for event topics.
|
|
214
|
+
*/
|
|
215
|
+
eventTopicPrefix?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Options for the action.
|
|
218
|
+
*/
|
|
219
|
+
options?: DesktopActionOptions;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Type for icons.
|
|
223
|
+
* @beta
|
|
224
|
+
*/
|
|
225
|
+
export type Icon = IconProps | string;
|
|
226
|
+
/**
|
|
227
|
+
* Group for desktop action menu items.
|
|
228
|
+
* @beta
|
|
229
|
+
*/
|
|
230
|
+
export type DesktopActionMenuItemGroup = ContextMenuGroup;
|
|
231
|
+
/**
|
|
232
|
+
* Filter for desktop actions.
|
|
233
|
+
* @beta
|
|
234
|
+
*/
|
|
235
|
+
export type DesktopActionFilter = (context: DesktopActionContext) => boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Function for desktop actions.
|
|
238
|
+
* @beta
|
|
239
|
+
*/
|
|
240
|
+
export type DesktopAction = (context: DesktopActionContext) => any;
|
|
241
|
+
/**
|
|
242
|
+
* Menu item for desktop actions.
|
|
243
|
+
* @beta
|
|
244
|
+
*/
|
|
245
|
+
export type DesktopActionMenuItem = {
|
|
246
|
+
/**
|
|
247
|
+
* Label for the menu item.
|
|
248
|
+
*/
|
|
249
|
+
label: ReactNode;
|
|
250
|
+
/**
|
|
251
|
+
* Key for the menu item.
|
|
252
|
+
*/
|
|
253
|
+
key: string;
|
|
254
|
+
/**
|
|
255
|
+
* Icon for the menu item.
|
|
256
|
+
*/
|
|
257
|
+
icon: Icon;
|
|
258
|
+
/**
|
|
259
|
+
* Service related to the menu item.
|
|
260
|
+
*/
|
|
261
|
+
service?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Additional options for the menu item.
|
|
264
|
+
*/
|
|
265
|
+
with?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Group for the menu item. Default is 'general'.
|
|
268
|
+
*/
|
|
269
|
+
group?: DesktopActionMenuItemGroup;
|
|
270
|
+
/**
|
|
271
|
+
* Subgroup for the menu item.
|
|
272
|
+
*/
|
|
273
|
+
subgroup?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Order of the menu item.
|
|
276
|
+
*/
|
|
277
|
+
order?: number;
|
|
278
|
+
/**
|
|
279
|
+
* Children menu items.
|
|
280
|
+
*/
|
|
281
|
+
children?: DesktopActionMenuItem[] | ((props: DesktopActionContext) => DesktopActionMenuItem[]);
|
|
282
|
+
/**
|
|
283
|
+
* Filter for accepting the menu item.
|
|
284
|
+
*/
|
|
285
|
+
accepts: DesktopActionFilter;
|
|
286
|
+
/**
|
|
287
|
+
* Function to invoke the action.
|
|
288
|
+
*/
|
|
289
|
+
invoke: DesktopAction;
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Type for notifications.
|
|
293
|
+
* @beta
|
|
294
|
+
*/
|
|
295
|
+
export type OsNotification = string | {
|
|
296
|
+
/**
|
|
297
|
+
* ID of the notification.
|
|
298
|
+
*/
|
|
299
|
+
id?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Message of the notification.
|
|
302
|
+
*/
|
|
303
|
+
message: string | ReactNode;
|
|
304
|
+
/**
|
|
305
|
+
* Description of the notification.
|
|
306
|
+
*/
|
|
307
|
+
description?: string;
|
|
308
|
+
/**
|
|
309
|
+
* Level of the notification.
|
|
310
|
+
*/
|
|
311
|
+
level?: 'info' | 'success' | 'error' | 'warning';
|
|
312
|
+
/**
|
|
313
|
+
* Additional details for the notification.
|
|
314
|
+
*/
|
|
315
|
+
detail?: {
|
|
316
|
+
[key: string]: any;
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* Placement of the notification.
|
|
320
|
+
*/
|
|
321
|
+
placement?: 'top' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Properties for showing a tab.
|
|
325
|
+
* @beta
|
|
326
|
+
*/
|
|
327
|
+
export type ShowTabProps = {
|
|
328
|
+
/**
|
|
329
|
+
* Application related to the tab.
|
|
330
|
+
*/
|
|
331
|
+
app: WorkspaceItem;
|
|
332
|
+
/**
|
|
333
|
+
* Item related to the tab.
|
|
334
|
+
*/
|
|
335
|
+
item?: WorkspaceItem;
|
|
336
|
+
/**
|
|
337
|
+
* Options for showing the tab.
|
|
338
|
+
*/
|
|
339
|
+
options?: DesktopActionOptions;
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* Type for progress information.
|
|
343
|
+
* @beta
|
|
344
|
+
*/
|
|
345
|
+
export type OsProgress = {
|
|
346
|
+
/**
|
|
347
|
+
* Key for the progress item.
|
|
348
|
+
*/
|
|
349
|
+
key: string;
|
|
350
|
+
/**
|
|
351
|
+
* Label for the progress item.
|
|
352
|
+
*/
|
|
353
|
+
label?: ReactNode;
|
|
354
|
+
/**
|
|
355
|
+
* Type of job for the progress item.
|
|
356
|
+
*/
|
|
357
|
+
job_type?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Status of the progress item.
|
|
360
|
+
*/
|
|
361
|
+
status?: 'active' | 'success' | 'exception' | 'normal' | undefined;
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* Affirmative option for the confirmation modal.
|
|
365
|
+
* @beta
|
|
366
|
+
*/
|
|
367
|
+
export declare const OS_CONFIRM_MODAL_YES = true;
|
|
368
|
+
/**
|
|
369
|
+
* Negative option for the confirmation modal.
|
|
370
|
+
* @beta
|
|
371
|
+
*/
|
|
372
|
+
export declare const OS_CONFIRM_MODAL_NO = false;
|
|
373
|
+
/**
|
|
374
|
+
* Option to get out of the confirmation modal.
|
|
375
|
+
* @beta
|
|
376
|
+
*/
|
|
377
|
+
export declare const OS_CONFIRM_MODAL_CANCEL: undefined;
|
|
378
|
+
/**
|
|
379
|
+
* Response type for confirmation modal.
|
|
380
|
+
* @beta
|
|
381
|
+
*/
|
|
382
|
+
export type OS_CONFIRM_MODAL_RESPONSE = typeof OS_CONFIRM_MODAL_YES | typeof OS_CONFIRM_MODAL_NO | typeof OS_CONFIRM_MODAL_CANCEL;
|
|
383
|
+
/**
|
|
384
|
+
* Properties for confirmation modal.
|
|
385
|
+
* @beta
|
|
386
|
+
*/
|
|
387
|
+
export type OsConfirmProps = string | {
|
|
388
|
+
/**
|
|
389
|
+
* Title of the confirmation modal.
|
|
390
|
+
*/
|
|
391
|
+
title: string;
|
|
392
|
+
/**
|
|
393
|
+
* Icon for the confirmation modal.
|
|
394
|
+
*/
|
|
395
|
+
icon?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Content of the confirmation modal.
|
|
398
|
+
*/
|
|
399
|
+
content?: string;
|
|
400
|
+
/**
|
|
401
|
+
* Text for the OK button.
|
|
402
|
+
*/
|
|
403
|
+
okText?: string;
|
|
404
|
+
/**
|
|
405
|
+
* Properties for the OK button.
|
|
406
|
+
*/
|
|
407
|
+
okButtonProps?: ButtonProps;
|
|
408
|
+
/**
|
|
409
|
+
* Text for the cancel button.
|
|
410
|
+
*/
|
|
411
|
+
cancelText?: string;
|
|
412
|
+
/**
|
|
413
|
+
* Task ID related to the confirmation modal.
|
|
414
|
+
*/
|
|
415
|
+
taskID?: string;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Properties for creating an entity form.
|
|
419
|
+
* @beta
|
|
420
|
+
*/
|
|
421
|
+
export type CreateEntityFormProps = {
|
|
422
|
+
/**
|
|
423
|
+
* Entity for the form.
|
|
424
|
+
*/
|
|
425
|
+
entity?: Entity;
|
|
426
|
+
/**
|
|
427
|
+
* Workspace for the form.
|
|
428
|
+
*/
|
|
429
|
+
os_workspace?: string;
|
|
430
|
+
/**
|
|
431
|
+
* Concept related to the form.
|
|
432
|
+
*/
|
|
433
|
+
concept?: string;
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* Properties for creating relations dialog.
|
|
437
|
+
* @beta
|
|
438
|
+
*/
|
|
439
|
+
export type CreateRelationsDialogProps = {
|
|
440
|
+
/**
|
|
441
|
+
* Source entity for the relations.
|
|
442
|
+
*/
|
|
443
|
+
source?: Entity;
|
|
444
|
+
/**
|
|
445
|
+
* Workspace for the relations.
|
|
446
|
+
*/
|
|
447
|
+
os_workspace?: string;
|
|
448
|
+
/**
|
|
449
|
+
* Target item for the relations.
|
|
450
|
+
*/
|
|
451
|
+
target?: FocusListItem;
|
|
452
|
+
/**
|
|
453
|
+
* Whether to create a new record.
|
|
454
|
+
*/
|
|
455
|
+
createRecord?: boolean;
|
|
456
|
+
/**
|
|
457
|
+
* Name of the relation.
|
|
458
|
+
*/
|
|
459
|
+
relationName?: string;
|
|
460
|
+
/**
|
|
461
|
+
* Default target concept for the relations.
|
|
462
|
+
*/
|
|
463
|
+
defaultTargetConcept?: string;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Properties for saving as modal.
|
|
467
|
+
* @beta
|
|
468
|
+
*/
|
|
469
|
+
export type SaveAsModalProps = {
|
|
470
|
+
/**
|
|
471
|
+
* Item to be saved.
|
|
472
|
+
*/
|
|
473
|
+
item: WorkspaceItem;
|
|
474
|
+
/**
|
|
475
|
+
* Application related to the item.
|
|
476
|
+
*/
|
|
477
|
+
app?: WorkspaceItem;
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* Context for pasting entities.
|
|
481
|
+
* @beta
|
|
482
|
+
*/
|
|
483
|
+
export type EntityPasteContext = {
|
|
484
|
+
/**
|
|
485
|
+
* Counts the number of entities.
|
|
486
|
+
*/
|
|
487
|
+
count: () => Promise<number>;
|
|
488
|
+
/**
|
|
489
|
+
* Fetches entities with a limit.
|
|
490
|
+
*/
|
|
491
|
+
fetch: (limit?: number) => Promise<Entity[]>;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* Parameters for opening a desktop.
|
|
495
|
+
* @beta
|
|
496
|
+
*/
|
|
497
|
+
export type DesktopOpenParams = {
|
|
498
|
+
/**
|
|
499
|
+
* Options for the desktop action.
|
|
500
|
+
*/
|
|
501
|
+
options?: DesktopActionOptions;
|
|
502
|
+
/**
|
|
503
|
+
* Items to be opened.
|
|
504
|
+
*/
|
|
505
|
+
items: Entity[];
|
|
506
|
+
};
|
|
507
|
+
/**
|
|
508
|
+
* Reasons for task cleanup.
|
|
509
|
+
* @beta
|
|
510
|
+
*/
|
|
511
|
+
export type TaskCleanupReason = 'canceled' | 'completed';
|
|
512
|
+
/**
|
|
513
|
+
* Type for attachments.
|
|
514
|
+
* @beta
|
|
515
|
+
*/
|
|
516
|
+
export type AttachmentType = string | Blob | ArrayBuffer | Record<string, any>;
|
|
517
|
+
/**
|
|
518
|
+
* Response type for attachments.
|
|
519
|
+
* @beta
|
|
520
|
+
*/
|
|
521
|
+
export type AttachmentResponseType = 'text' | 'blob' | 'arrayBuffer' | 'json' | 'url';
|
|
522
|
+
/**
|
|
523
|
+
* Options for getting attachments.
|
|
524
|
+
* @beta
|
|
525
|
+
*/
|
|
526
|
+
export interface GetAttachmentOptions<T extends AttachmentType> {
|
|
527
|
+
/**
|
|
528
|
+
* Path to the attachment.
|
|
529
|
+
*/
|
|
530
|
+
path?: string;
|
|
531
|
+
/**
|
|
532
|
+
* Default value for the attachment.
|
|
533
|
+
*/
|
|
534
|
+
default?: T;
|
|
535
|
+
/**
|
|
536
|
+
* Response type for the attachment.
|
|
537
|
+
*/
|
|
538
|
+
responseType?: AttachmentResponseType;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Options for displaying a progress bar.
|
|
542
|
+
* @beta
|
|
543
|
+
*/
|
|
544
|
+
export type WithProgressBarOptions = {
|
|
545
|
+
/**
|
|
546
|
+
* Type of job for the progress bar.
|
|
547
|
+
*/
|
|
548
|
+
job_type: string;
|
|
549
|
+
/**
|
|
550
|
+
* Label for the progress bar.
|
|
551
|
+
*/
|
|
552
|
+
label?: string | JSX.Element;
|
|
553
|
+
/**
|
|
554
|
+
* Prefix for event topics.
|
|
555
|
+
*/
|
|
556
|
+
eventTopicPrefix?: string;
|
|
557
|
+
/**
|
|
558
|
+
* Error message for the progress bar.
|
|
559
|
+
*/
|
|
560
|
+
errorToast?: string | boolean;
|
|
561
|
+
};
|
|
562
|
+
/**
|
|
563
|
+
* Context for desktop styler.
|
|
564
|
+
* @beta
|
|
565
|
+
*/
|
|
566
|
+
export type DesktopStylerContext = {
|
|
567
|
+
/**
|
|
568
|
+
* Graph specification.
|
|
569
|
+
*/
|
|
570
|
+
graph: GraphSpec;
|
|
571
|
+
/**
|
|
572
|
+
* Selected graph specification.
|
|
573
|
+
*/
|
|
574
|
+
selected?: GraphSpec;
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* Options for exporting items.
|
|
578
|
+
* @beta
|
|
579
|
+
*/
|
|
580
|
+
export type ExportOptions = {
|
|
581
|
+
/**
|
|
582
|
+
* Filename for the export.
|
|
583
|
+
*/
|
|
584
|
+
filename?: string;
|
|
585
|
+
};
|
|
586
|
+
/**
|
|
587
|
+
* Options for importing ZIP files.
|
|
588
|
+
* @beta
|
|
589
|
+
*/
|
|
590
|
+
export type ImportZipOptions = {
|
|
591
|
+
/**
|
|
592
|
+
* Whether to overwrite existing items.
|
|
593
|
+
*/
|
|
594
|
+
overwrite?: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Target location for the import.
|
|
597
|
+
*/
|
|
598
|
+
target?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Whether to include content in the import.
|
|
601
|
+
*/
|
|
602
|
+
include_content?: boolean;
|
|
603
|
+
/**
|
|
604
|
+
* Whether to include dashboards in the import.
|
|
605
|
+
*/
|
|
606
|
+
include_dashboards?: boolean | 'if_missing';
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Options for pasting context.
|
|
610
|
+
* @beta
|
|
611
|
+
*/
|
|
612
|
+
export type PasteContextOptions = {
|
|
613
|
+
/**
|
|
614
|
+
* First limit for the context.
|
|
615
|
+
*/
|
|
616
|
+
limit1?: number;
|
|
617
|
+
/**
|
|
618
|
+
* Second limit for the context.
|
|
619
|
+
*/
|
|
620
|
+
limit2?: number;
|
|
621
|
+
/**
|
|
622
|
+
* Record for the context.
|
|
623
|
+
*/
|
|
624
|
+
record?: Entity;
|
|
625
|
+
/**
|
|
626
|
+
* Records for the context.
|
|
627
|
+
*/
|
|
628
|
+
records?: Entity[];
|
|
629
|
+
/**
|
|
630
|
+
* Query for the context.
|
|
631
|
+
*/
|
|
632
|
+
query?: ConceptFilter;
|
|
633
|
+
};
|
|
634
|
+
/**
|
|
635
|
+
* Parameters for drag start.
|
|
636
|
+
* @beta
|
|
637
|
+
*/
|
|
638
|
+
export type DragStartParams = {
|
|
639
|
+
/**
|
|
640
|
+
* Record being dragged.
|
|
641
|
+
*/
|
|
642
|
+
record: Entity;
|
|
643
|
+
/**
|
|
644
|
+
* Records being dragged.
|
|
645
|
+
*/
|
|
646
|
+
records: Entity[];
|
|
647
|
+
/**
|
|
648
|
+
* Topic for drag end event.
|
|
649
|
+
*/
|
|
650
|
+
dragEndTopic: string;
|
|
651
|
+
};
|
|
652
|
+
/**
|
|
653
|
+
* Parameters for drag end.
|
|
654
|
+
* @beta
|
|
655
|
+
*/
|
|
656
|
+
export type DragEndParams = {
|
|
657
|
+
/**
|
|
658
|
+
* Record being dragged.
|
|
659
|
+
*/
|
|
660
|
+
record: Entity;
|
|
661
|
+
/**
|
|
662
|
+
* Records being dragged.
|
|
663
|
+
*/
|
|
664
|
+
records: Entity[];
|
|
665
|
+
/**
|
|
666
|
+
* X-coordinate of the drag end position.
|
|
667
|
+
*/
|
|
668
|
+
x: number;
|
|
669
|
+
/**
|
|
670
|
+
* Y-coordinate of the drag end position.
|
|
671
|
+
*/
|
|
672
|
+
y: number;
|
|
673
|
+
};
|
|
674
|
+
/**
|
|
675
|
+
* Options for pasting folders.
|
|
676
|
+
* @beta
|
|
677
|
+
*/
|
|
678
|
+
export type FolderPasteOptions = {
|
|
679
|
+
/**
|
|
680
|
+
* Whether to include folders in the paste.
|
|
681
|
+
*/
|
|
682
|
+
folders?: boolean;
|
|
683
|
+
/**
|
|
684
|
+
* Whether to include files in the paste.
|
|
685
|
+
*/
|
|
686
|
+
files?: boolean;
|
|
687
|
+
/**
|
|
688
|
+
* Whether to paste recursively.
|
|
689
|
+
*/
|
|
690
|
+
recursive?: boolean;
|
|
691
|
+
};
|
|
692
|
+
/**
|
|
693
|
+
* Options for file tree.
|
|
694
|
+
* @beta
|
|
695
|
+
*/
|
|
696
|
+
export type FileTreeOptions = {
|
|
697
|
+
/**
|
|
698
|
+
* Whether to recurse in the file tree.
|
|
699
|
+
*/
|
|
700
|
+
recurse?: boolean;
|
|
701
|
+
/**
|
|
702
|
+
* Whether to exclude the root from the file tree.
|
|
703
|
+
*/
|
|
704
|
+
exclude_root?: boolean;
|
|
705
|
+
/**
|
|
706
|
+
* Whether to flatten the file tree.
|
|
707
|
+
*/
|
|
708
|
+
flat?: boolean;
|
|
709
|
+
/**
|
|
710
|
+
* Whether to show minimal information in the file tree.
|
|
711
|
+
*/
|
|
712
|
+
minimal?: boolean;
|
|
713
|
+
/**
|
|
714
|
+
* Whether to include structure in the file tree.
|
|
715
|
+
*/
|
|
716
|
+
structure?: boolean;
|
|
717
|
+
};
|
|
718
|
+
/**
|
|
719
|
+
* Represents information about the current user.
|
|
720
|
+
* @beta
|
|
721
|
+
*/
|
|
722
|
+
export type Whoami = {
|
|
723
|
+
/**
|
|
724
|
+
* Asynchronous channel for the user.
|
|
725
|
+
*/
|
|
726
|
+
async_channel: string;
|
|
727
|
+
/**
|
|
728
|
+
* Email of the user.
|
|
729
|
+
*/
|
|
730
|
+
email: string | null;
|
|
731
|
+
/**
|
|
732
|
+
* JWT token for the user.
|
|
733
|
+
*/
|
|
734
|
+
os_jwt: string;
|
|
735
|
+
/**
|
|
736
|
+
* Username of the user.
|
|
737
|
+
*/
|
|
738
|
+
username: string;
|
|
739
|
+
/**
|
|
740
|
+
* Roles of the user.
|
|
741
|
+
*/
|
|
742
|
+
timbr_roles: string[];
|
|
743
|
+
};
|
|
744
|
+
/**
|
|
745
|
+
* Options for copying items.
|
|
746
|
+
* @beta
|
|
747
|
+
*/
|
|
748
|
+
export type CopyOptions = {
|
|
749
|
+
/**
|
|
750
|
+
* Name of the item to be copied.
|
|
751
|
+
*/
|
|
752
|
+
os_item_name?: string;
|
|
753
|
+
};
|
|
754
|
+
/**
|
|
755
|
+
* Options for extracting entities.
|
|
756
|
+
* @beta
|
|
757
|
+
*/
|
|
758
|
+
export type ExtractEntitiesOptions = {
|
|
759
|
+
hydrate?: boolean;
|
|
760
|
+
};
|
|
761
|
+
/**
|
|
762
|
+
* Interface for desktop actions.
|
|
763
|
+
* @beta
|
|
764
|
+
*/
|
|
765
|
+
export interface Desktop extends DesktopSettings, WorkspaceChangeEmitter {
|
|
766
|
+
/**
|
|
767
|
+
* Refreshes the desktop.
|
|
768
|
+
*/
|
|
769
|
+
refresh: () => Promise<void>;
|
|
770
|
+
/**
|
|
771
|
+
* Opens a workspace.
|
|
772
|
+
*/
|
|
773
|
+
openWorkspace: (ws: WorkspaceIdentifier, showTab?: boolean) => Promise<void>;
|
|
774
|
+
/**
|
|
775
|
+
* Gets the active workspace.
|
|
776
|
+
*/
|
|
777
|
+
getActiveWorkspace: (prompt?: boolean) => Promise<string | undefined>;
|
|
778
|
+
/**
|
|
779
|
+
* Sets the active workspace.
|
|
780
|
+
*/
|
|
781
|
+
setActiveWorkspace: (workspace: string | undefined) => Promise<void>;
|
|
782
|
+
/**
|
|
783
|
+
* Closes a workspace.
|
|
784
|
+
*/
|
|
785
|
+
closeWorkspace: (ws: WorkspaceIdentifier) => Promise<void>;
|
|
786
|
+
/**
|
|
787
|
+
* Copies an item.
|
|
788
|
+
*/
|
|
789
|
+
copy: (source: WorkspaceItem, target: WorkspaceItem, options?: CopyOptions) => Promise<WorkspaceItem[]>;
|
|
790
|
+
/**
|
|
791
|
+
* Lists all workspaces with optional permissions.
|
|
792
|
+
*/
|
|
793
|
+
listAllWorkspaces: (permissions?: WorkspacePermissionValue) => Promise<WorkspaceItem[]>;
|
|
794
|
+
/**
|
|
795
|
+
* This might not be enough, add a listener to {@link WorkspaceChangeEmitter.onOpenWorkspacesChanged} to keep getting updated.
|
|
796
|
+
* In react components, prefer useDesktopWorkspaces hook.
|
|
797
|
+
*/
|
|
798
|
+
getOpenWorkspaces: () => Promise<Workspace[]>;
|
|
799
|
+
/**
|
|
800
|
+
* Gets the OntologyAPI.
|
|
801
|
+
* @returns a promise that resolves to the current ontology
|
|
802
|
+
*/
|
|
803
|
+
getOntology: () => Promise<Ontology>;
|
|
804
|
+
/**
|
|
805
|
+
* Fetches an attachment based on the provided workspace identifier and path or ID.
|
|
806
|
+
*
|
|
807
|
+
* @param entity - The entity to which the attachment belongs.
|
|
808
|
+
* @param options - Additional parameters
|
|
809
|
+
* @returns A promise that resolves to the attachment of type T.
|
|
810
|
+
*/
|
|
811
|
+
getAttachment: <T extends AttachmentType>(entity: Entity, options?: GetAttachmentOptions<T>) => Promise<T>;
|
|
812
|
+
/**
|
|
813
|
+
* @beta
|
|
814
|
+
* Gets options for stylers.
|
|
815
|
+
*/
|
|
816
|
+
getStylerOptions: () => Promise<StylerOption[]>;
|
|
817
|
+
/**
|
|
818
|
+
* @beta
|
|
819
|
+
* Gets a styler by name and context.
|
|
820
|
+
*/
|
|
821
|
+
getStyler: (name: string, context: DesktopStylerContext) => Promise<Styler>;
|
|
822
|
+
/**
|
|
823
|
+
* Gets a workspace by identifier.
|
|
824
|
+
*/
|
|
825
|
+
getWorkspace: (ws: WorkspaceIdentifier) => Promise<Workspace | undefined>;
|
|
826
|
+
/**
|
|
827
|
+
* Gets items in a workspace by name.
|
|
828
|
+
*/
|
|
829
|
+
getWorkspaceItems(os_item_name: string): Promise<WorkspaceItem[]>;
|
|
830
|
+
/**
|
|
831
|
+
* Applies a tag to an entity.
|
|
832
|
+
*/
|
|
833
|
+
applyTag: (os_workspace: string, tag: OsTag | TagAttributes, entity: Entity | Entity[]) => Promise<void>;
|
|
834
|
+
/**
|
|
835
|
+
* Removes a tag from an entity.
|
|
836
|
+
*/
|
|
837
|
+
removeTag: (os_workspace: string, tag: OsTag | TagAttributes, entity: Entity | Entity[]) => Promise<void>;
|
|
838
|
+
/**
|
|
839
|
+
* Updates a tag.
|
|
840
|
+
*/
|
|
841
|
+
updateTag: (tag: OsTag) => Promise<OsTag>;
|
|
842
|
+
/**
|
|
843
|
+
* Gets an item by workspace identifier.
|
|
844
|
+
*/
|
|
845
|
+
getItem: <T>(ws: WorkspaceIdentifier<T>) => Promise<WorkspaceItem<T>>;
|
|
846
|
+
/**
|
|
847
|
+
* Gets items by workspace identifiers.
|
|
848
|
+
*/
|
|
849
|
+
getItems: (ws: WorkspaceIdentifier[]) => Promise<WorkspaceItem[]>;
|
|
850
|
+
/**
|
|
851
|
+
* Gets tags for an entity.
|
|
852
|
+
*/
|
|
853
|
+
getTags: (entity: Entity) => Promise<TagWithRelationship[]>;
|
|
854
|
+
/**
|
|
855
|
+
* Gets available tags for an entity in a workspace.
|
|
856
|
+
*/
|
|
857
|
+
getAvailableTags: (entity: Entity, workspace?: string) => Promise<OsTag[]>;
|
|
858
|
+
/**
|
|
859
|
+
* Gets templates by layout.
|
|
860
|
+
*/
|
|
861
|
+
getTemplates: (layout?: string) => Promise<SavedTemplate[]>;
|
|
862
|
+
/**
|
|
863
|
+
* Gets a template by name with an optional default template.
|
|
864
|
+
*/
|
|
865
|
+
getTemplate: (name: string, defaultTemplate?: string) => Promise<CustomTemplate>;
|
|
866
|
+
/**
|
|
867
|
+
* Gets schema items by content type.
|
|
868
|
+
*/
|
|
869
|
+
getSchemaItems(os_item_content_type: string): Promise<WorkspaceItem[]>;
|
|
870
|
+
/**
|
|
871
|
+
* Creates a workspace by name.
|
|
872
|
+
*/
|
|
873
|
+
createWorkspace: (name: string) => Promise<WorkspaceItem>;
|
|
874
|
+
/**
|
|
875
|
+
* Connects two entities with a relationship in a workspace.
|
|
876
|
+
*/
|
|
877
|
+
connect: (relationship: Relationship | string, from: Entity, to: Entity, os_workspace?: string) => Promise<WorkspaceItem>;
|
|
878
|
+
/**
|
|
879
|
+
* Saves an item with optional save options.
|
|
880
|
+
*/
|
|
881
|
+
save: (item: (Partial<WorkspaceItem> & WorkspaceItemModel) | WorkspaceRecordIdentifier | WorkspaceRecordWithRelationships, options?: SaveOptions) => Promise<WorkspaceItem>;
|
|
882
|
+
/**
|
|
883
|
+
* Saves a file to an item with optional save options.
|
|
884
|
+
*/
|
|
885
|
+
saveFile: (item: WorkspaceItem, file: File | string, options?: SaveOptions) => Promise<WorkspaceItem>;
|
|
886
|
+
/**
|
|
887
|
+
* Imports items.
|
|
888
|
+
*/
|
|
889
|
+
import: (items: any[]) => Promise<void>;
|
|
890
|
+
/**
|
|
891
|
+
* Imports a ZIP file with optional import options.
|
|
892
|
+
*/
|
|
893
|
+
importZip: (file: File, options?: ImportZipOptions) => Promise<void>;
|
|
894
|
+
/**
|
|
895
|
+
* Exports an item or items with optional export options.
|
|
896
|
+
*/
|
|
897
|
+
export: (item: WorkspaceItem | WorkspaceItem[], options?: ExportOptions) => Promise<void>;
|
|
898
|
+
/**
|
|
899
|
+
* Extracts entities from some text which may be json or a list of urls.
|
|
900
|
+
*/
|
|
901
|
+
extractEntities: (text: string, options?: ExtractEntitiesOptions) => Promise<Entity[]>;
|
|
902
|
+
/**
|
|
903
|
+
* Gets a file tree for a workspace or folder with optional file tree options.
|
|
904
|
+
*/
|
|
905
|
+
getFilesTree: (workspace_or_folder: WorkspaceItem, options?: FileTreeOptions) => Promise<WorkspaceItem[]>;
|
|
906
|
+
/**
|
|
907
|
+
* Show the search modal and return the selected results.
|
|
908
|
+
*/
|
|
909
|
+
getSearchResults: (params: undefined | string | SearchProps) => Promise<Entity[] | undefined>;
|
|
910
|
+
/**
|
|
911
|
+
* Opens records with default action or as specified in the optional desktop action options.
|
|
912
|
+
*/
|
|
913
|
+
open(records: Entity | Entity[], options?: DesktopActionOptions): Promise<void>;
|
|
914
|
+
/**
|
|
915
|
+
* Deletes an item or items recursively.
|
|
916
|
+
*/
|
|
917
|
+
delete: (item: WorkspaceRecordIdentifier | WorkspaceRecordIdentifier[], recurse?: boolean) => Promise<void>;
|
|
918
|
+
/**
|
|
919
|
+
* Deletes records in a workspace by ID.
|
|
920
|
+
*/
|
|
921
|
+
delete_workspace_records: (workspace_id: string) => Promise<void>;
|
|
922
|
+
/**
|
|
923
|
+
* Deletes local concept records in a workspace by base concept.
|
|
924
|
+
*/
|
|
925
|
+
delete_local_concept_records: (workspace_id: string, base_concept: string) => Promise<void>;
|
|
926
|
+
/**
|
|
927
|
+
* Searches experience with optional search options.
|
|
928
|
+
*/
|
|
929
|
+
searchXperience: (options?: SearchXperienceProps) => Promise<Entity[]>;
|
|
930
|
+
/**
|
|
931
|
+
* Shows a tab with given properties.
|
|
932
|
+
*/
|
|
933
|
+
showTab: (props: ShowTabProps) => Promise<void>;
|
|
934
|
+
/**
|
|
935
|
+
* Closes a tab with given properties.
|
|
936
|
+
*/
|
|
937
|
+
closeTab: (props: ShowTabProps) => Promise<void>;
|
|
938
|
+
/**
|
|
939
|
+
* Calls an application service with given properties.
|
|
940
|
+
*/
|
|
941
|
+
callAppService: (props: AppServiceCallProps) => Promise<any>;
|
|
942
|
+
/**
|
|
943
|
+
* Shows a context menu with given properties.
|
|
944
|
+
*/
|
|
945
|
+
showContextMenu: (props: ContextMenuRequest) => Promise<void>;
|
|
946
|
+
/**
|
|
947
|
+
* Shows a toast notification.
|
|
948
|
+
*/
|
|
949
|
+
showToast: (notification: OsNotification) => Promise<void>;
|
|
950
|
+
/**
|
|
951
|
+
* Clears a toast notification by ID.
|
|
952
|
+
*/
|
|
953
|
+
clearToast: (id: string) => Promise<void>;
|
|
954
|
+
/**
|
|
955
|
+
* Shows a progress item.
|
|
956
|
+
*/
|
|
957
|
+
showProgress: (progress: OsProgress) => Promise<void>;
|
|
958
|
+
/**
|
|
959
|
+
* Wraps a promise with a progress bar.
|
|
960
|
+
*/
|
|
961
|
+
withProgressBar: <T>(promise: Promise<T>, options?: WithProgressBarOptions) => Promise<T>;
|
|
962
|
+
/**
|
|
963
|
+
* Shows a confirmation modal.
|
|
964
|
+
*/
|
|
965
|
+
showConfirm: (props: OsConfirmProps) => Promise<OS_CONFIRM_MODAL_RESPONSE>;
|
|
966
|
+
/**
|
|
967
|
+
* Shows a file upload dialog.
|
|
968
|
+
*/
|
|
969
|
+
showFileUpload: (folder: WorkspaceItem) => Promise<WorkspaceItem[]>;
|
|
970
|
+
/**
|
|
971
|
+
* Shows a form for creating an entity.
|
|
972
|
+
*/
|
|
973
|
+
showCreateEntityForm: (props: CreateEntityFormProps) => Promise<OsWorkspaceEntity[]>;
|
|
974
|
+
/**
|
|
975
|
+
* Shows a dialog for creating relations.
|
|
976
|
+
*/
|
|
977
|
+
showCreateRelationsDialog: (props: CreateRelationsDialogProps) => Promise<void>;
|
|
978
|
+
/**
|
|
979
|
+
* Shows a modal for saving as.
|
|
980
|
+
*/
|
|
981
|
+
showSaveAsModal: (props: SaveAsModalProps) => Promise<WorkspaceItem | undefined>;
|
|
982
|
+
/**
|
|
983
|
+
* Gets a paste context with optional options.
|
|
984
|
+
*/
|
|
985
|
+
getPasteContext: (options: PasteContextOptions) => Promise<Entity[]>;
|
|
986
|
+
/**
|
|
987
|
+
* Shows a modal template.
|
|
988
|
+
*/
|
|
989
|
+
showModalTemplate: (props: ModalTemplateProps) => Promise<void>;
|
|
990
|
+
/**
|
|
991
|
+
* Adds a comment to an entity.
|
|
992
|
+
*/
|
|
993
|
+
addComment: (about: Entity, comment: AddCommentParams) => Promise<Entity>;
|
|
994
|
+
/**
|
|
995
|
+
* Adds a watch intent to an entity.
|
|
996
|
+
*/
|
|
997
|
+
addWatchIntent: (entity: Entity, watcher: Watcher) => Promise<Entity>;
|
|
998
|
+
/**
|
|
999
|
+
* Removes a watch intent by workspace and intent ID.
|
|
1000
|
+
*/
|
|
1001
|
+
removeWatchIntent: (os_workspace: string, intent_id: string) => Promise<void>;
|
|
1002
|
+
/**
|
|
1003
|
+
* Gets workspace permissions by IDs.
|
|
1004
|
+
*/
|
|
1005
|
+
getWorkspacePermission: (os_worpsaces: string[]) => Promise<{
|
|
1006
|
+
[os_workspace: string]: WorkspacePermission;
|
|
1007
|
+
}>;
|
|
1008
|
+
/**
|
|
1009
|
+
* Gets the user profile.
|
|
1010
|
+
*/
|
|
1011
|
+
getUser: () => Promise<UserProfile>;
|
|
1012
|
+
/**
|
|
1013
|
+
* Deploys an application with optional initial secrets.
|
|
1014
|
+
*/
|
|
1015
|
+
deployApp: (app: WorkspaceItem | App, initialSecrets?: {
|
|
1016
|
+
[key: string]: string;
|
|
1017
|
+
}) => Promise<WorkspaceItem>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Undeploys an application.
|
|
1020
|
+
*/
|
|
1021
|
+
undeployApp: (app: WorkspaceItem | App) => Promise<WorkspaceItem>;
|
|
1022
|
+
/**
|
|
1023
|
+
* Gets information about the current user.
|
|
1024
|
+
*/
|
|
1025
|
+
whoami: () => Promise<Whoami>;
|
|
1026
|
+
/**
|
|
1027
|
+
* Gets the focus list.
|
|
1028
|
+
*/
|
|
1029
|
+
getFocusList: () => Promise<FocusListItem[]>;
|
|
1030
|
+
/**
|
|
1031
|
+
* Adds entities to the focus list with optional type and tab name.
|
|
1032
|
+
*/
|
|
1033
|
+
addToFocusList: (entities: Entity[], type?: 'single' | 'group', tabName?: string) => Promise<FocusListItem[]>;
|
|
1034
|
+
/**
|
|
1035
|
+
* Removes entities from the focus list with optional type and tab name.
|
|
1036
|
+
*/
|
|
1037
|
+
removeFromFocusList: (entities: Entity[], type?: 'single' | 'group', tabName?: string) => Promise<FocusListItem[]>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Gets images for an entity.
|
|
1040
|
+
*/
|
|
1041
|
+
getImages: (entity: Entity) => Promise<Entity[]>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Gets icon code for an entity, concept, or string.
|
|
1044
|
+
*/
|
|
1045
|
+
internalGetIconCode: (x: Entity | Concept | string, defaultIcon?: string) => Promise<string>;
|
|
1046
|
+
/**
|
|
1047
|
+
* Gets JSON schema for a concept.
|
|
1048
|
+
*/
|
|
1049
|
+
getJSONSchema: (concept: string) => Promise<{
|
|
1050
|
+
schema: string;
|
|
1051
|
+
schemaUI: string;
|
|
1052
|
+
}>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Connect an attachment to an entity as featured_in
|
|
1055
|
+
*/
|
|
1056
|
+
addAttachment: (entity: WorkspaceItem, file: WorkspaceItem) => void;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Interface for app registry.
|
|
1060
|
+
* @beta
|
|
1061
|
+
*/
|
|
1062
|
+
export type AppRegistry = {
|
|
1063
|
+
/**
|
|
1064
|
+
* Registers a tab component.
|
|
1065
|
+
*/
|
|
1066
|
+
registerTabComponent: ({ component, factory, }: {
|
|
1067
|
+
component: string;
|
|
1068
|
+
factory: (node: TabNode) => ReactNode;
|
|
1069
|
+
}) => void;
|
|
1070
|
+
/**
|
|
1071
|
+
* Registers an action.
|
|
1072
|
+
*/
|
|
1073
|
+
registerAction: (action: DesktopActionMenuItem) => void;
|
|
1074
|
+
/**
|
|
1075
|
+
* @beta
|
|
1076
|
+
* Registers a styler.
|
|
1077
|
+
*/
|
|
1078
|
+
registerStyler: (styler: StylerConfig) => () => void;
|
|
1079
|
+
};
|
|
1080
|
+
/**
|
|
1081
|
+
* Properties for workspace item title.
|
|
1082
|
+
* @beta
|
|
1083
|
+
*/
|
|
1084
|
+
export type WorkspaceItemTitleProps = DesktopActionContext & {
|
|
1085
|
+
/**
|
|
1086
|
+
* Whether to show hidden children in the workspace.
|
|
1087
|
+
*/
|
|
1088
|
+
showHiddenChildren?: 'workspace' | boolean;
|
|
1089
|
+
/**
|
|
1090
|
+
* Menu options with extra action items.
|
|
1091
|
+
*/
|
|
1092
|
+
menuOptions?: ContextMenuOptions & {
|
|
1093
|
+
extraActionItems?: DesktopActionMenuItem[];
|
|
1094
|
+
};
|
|
1095
|
+
/**
|
|
1096
|
+
* Whether the item is expanded.
|
|
1097
|
+
*/
|
|
1098
|
+
expanded?: boolean;
|
|
1099
|
+
};
|
|
1100
|
+
//# sourceMappingURL=desktop.d.ts.map
|