@octostar/platform-types 0.2.1 → 0.2.3
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/assets/navigation.js +1 -1
- package/dist/docs/assets/search.js +1 -1
- 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 +82 -80
- 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/SemanticBindingProps.html +9 -0
- 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 +9 -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 +3 -3
- package/dist/docs/types/ConceptMap.html +2 -2
- package/dist/docs/types/ConceptName.html +1 -0
- 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/DataContextType.html +12 -0
- 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 +3 -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/GraphDataSpec.html +1 -0
- 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 +4 -3
- 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/SemanticBinding.html +5 -0
- package/dist/docs/types/SemanticBindingType.html +2 -2
- package/dist/docs/types/SemanticBindings.html +2 -2
- package/dist/docs/types/SemanticallyBoundApp.html +3 -0
- 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 +4 -3
- 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 +3 -2
- package/dist/docs/types/WithProgressBarOptions.html +2 -2
- package/dist/docs/types/Workspace.html +3 -3
- package/dist/docs/types/WorkspaceFlags.html +2 -0
- 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 +7 -4
- 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/dist/platform-types.d.ts +127 -8
- 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 +65 -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 +1112 -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 +107 -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 +21 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -0
- package/lib/jobManifestTypes.d.ts +272 -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 +660 -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/semantic.d.ts +40 -0
- package/lib/semantic.d.ts.map +1 -0
- package/lib/semantic.js +2 -0
- package/lib/semantic.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 +110 -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 +193 -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/dist/platform-types.d.ts
CHANGED
|
@@ -323,7 +323,7 @@ export declare type ConceptFilter = {
|
|
|
323
323
|
/**
|
|
324
324
|
* The name of the concept.
|
|
325
325
|
*/
|
|
326
|
-
concept:
|
|
326
|
+
concept: ConceptName;
|
|
327
327
|
/**
|
|
328
328
|
* The filters to apply to the records of the concept.
|
|
329
329
|
*/
|
|
@@ -336,6 +336,8 @@ export declare type ConceptFilter = {
|
|
|
336
336
|
*/
|
|
337
337
|
export declare type ConceptMap = Map<string, Concept>;
|
|
338
338
|
|
|
339
|
+
export declare type ConceptName = string;
|
|
340
|
+
|
|
339
341
|
/**
|
|
340
342
|
* Represents a concept with parent concepts.
|
|
341
343
|
* @beta
|
|
@@ -513,6 +515,42 @@ export declare type CustomTemplateIframeProps = {
|
|
|
513
515
|
fullWidth?: boolean;
|
|
514
516
|
};
|
|
515
517
|
|
|
518
|
+
/**
|
|
519
|
+
* DataContext is a container for abstract data of graph/selection/superselection. It serves like as a bridge between ontology data and linkchart.
|
|
520
|
+
* Eg. linkchart uses *selection*, if it updates, it will cause linkchart to select elements with same ids to be selected on it.
|
|
521
|
+
* Vice versa, if user clicks on linkchart, it will call setSelection and thus here via setEntities/setEdges from RightSidebarControllerContext anything what uses it (eg Rightsidebar or Superselect table) will be updated.
|
|
522
|
+
* @param graph set of all items on graph
|
|
523
|
+
* @param setGraph use to update (overwrite by replacement) what's on graph, converts EdgeSpec(s) to EntityEdge(s) (if possible), no edge discovery will be performed later, for that use addToGraph
|
|
524
|
+
* @param selection set of all *selected* items on graph
|
|
525
|
+
* @param setSelection use to update what's *selected* on graph
|
|
526
|
+
* @param superSelection set of id of all *super selected (subselected)* items on graph
|
|
527
|
+
* @param setSuperSelection use to update what's *super selected (subselected)* on graph
|
|
528
|
+
* @param addToGraph add entities/relationships to graph, converts EdgeSpec(s) to EntityEdge(s) (if possible) and can also initialize discovery of all available relationships between new and existing entities
|
|
529
|
+
* @param removeFromGraph remove entities/relationships from graph
|
|
530
|
+
*/
|
|
531
|
+
export declare type DataContextType = {
|
|
532
|
+
graph: GraphDataSpec;
|
|
533
|
+
setGraph: (newGraph: {
|
|
534
|
+
entities: GraphDataSpec['entities'];
|
|
535
|
+
relationships: (EntityEdge | EdgeSpec)[];
|
|
536
|
+
}) => void;
|
|
537
|
+
selection: GraphDataSpec;
|
|
538
|
+
setSelection: React.Dispatch<React.SetStateAction<GraphDataSpec>>;
|
|
539
|
+
superSelection: {
|
|
540
|
+
entityIds: string[];
|
|
541
|
+
relationshipIds: string[];
|
|
542
|
+
};
|
|
543
|
+
setSuperSelection: React.Dispatch<React.SetStateAction<{
|
|
544
|
+
entityIds: string[];
|
|
545
|
+
relationshipIds: string[];
|
|
546
|
+
}>>;
|
|
547
|
+
addToGraph: (graphUpdates: {
|
|
548
|
+
entities: GraphDataSpec['entities'];
|
|
549
|
+
relationships: (EntityEdge | EdgeSpec)[];
|
|
550
|
+
}, getAllEdgesConnected?: boolean, forceUpdateEntities?: boolean) => void;
|
|
551
|
+
removeFromGraph: (graph: GraphDataSpec) => void;
|
|
552
|
+
};
|
|
553
|
+
|
|
516
554
|
/**
|
|
517
555
|
* Interface for desktop actions.
|
|
518
556
|
* @beta
|
|
@@ -809,6 +847,10 @@ export declare interface Desktop extends DesktopSettings, WorkspaceChangeEmitter
|
|
|
809
847
|
* Connect an attachment to an entity as featured_in
|
|
810
848
|
*/
|
|
811
849
|
addAttachment: (entity: WorkspaceItem, file: WorkspaceItem) => void;
|
|
850
|
+
/**
|
|
851
|
+
* Get config files
|
|
852
|
+
*/
|
|
853
|
+
getConfigFiles: (name: string) => Promise<WorkspaceItem[]>;
|
|
812
854
|
}
|
|
813
855
|
|
|
814
856
|
/**
|
|
@@ -940,6 +982,10 @@ export declare type DesktopActionOptions = {
|
|
|
940
982
|
* Whether to preserve the state of the tab after action is finished. Used with modal.
|
|
941
983
|
*/
|
|
942
984
|
preserve?: boolean;
|
|
985
|
+
/**
|
|
986
|
+
* Whether to raise the tab to the front.
|
|
987
|
+
*/
|
|
988
|
+
raiseOnly?: boolean;
|
|
943
989
|
};
|
|
944
990
|
|
|
945
991
|
/**
|
|
@@ -1366,6 +1412,11 @@ export declare interface GetAttachmentOptions<T extends AttachmentType> {
|
|
|
1366
1412
|
responseType?: AttachmentResponseType;
|
|
1367
1413
|
}
|
|
1368
1414
|
|
|
1415
|
+
export declare type GraphDataSpec = {
|
|
1416
|
+
entities: Entity[];
|
|
1417
|
+
relationships: EntityEdge[];
|
|
1418
|
+
};
|
|
1419
|
+
|
|
1369
1420
|
/**
|
|
1370
1421
|
* @beta
|
|
1371
1422
|
* Type representing the specification of a graph.
|
|
@@ -1545,11 +1596,11 @@ export declare interface Inheritance {
|
|
|
1545
1596
|
/**
|
|
1546
1597
|
* The base concept in the inheritance.
|
|
1547
1598
|
*/
|
|
1548
|
-
base_concept:
|
|
1599
|
+
base_concept: ConceptName;
|
|
1549
1600
|
/**
|
|
1550
1601
|
* The derived concept in the inheritance.
|
|
1551
1602
|
*/
|
|
1552
|
-
derived_concept:
|
|
1603
|
+
derived_concept: ConceptName;
|
|
1553
1604
|
/**
|
|
1554
1605
|
* The name will be displayed on ui
|
|
1555
1606
|
*/
|
|
@@ -2084,6 +2135,8 @@ export declare type Permission = WorkspaceItem & {
|
|
|
2084
2135
|
os_permission: number;
|
|
2085
2136
|
/** The role associated with the permission. */
|
|
2086
2137
|
os_role?: string;
|
|
2138
|
+
/** The flags associated with the permission */
|
|
2139
|
+
os_flags?: number;
|
|
2087
2140
|
};
|
|
2088
2141
|
|
|
2089
2142
|
/**
|
|
@@ -2105,7 +2158,7 @@ export declare interface Property {
|
|
|
2105
2158
|
/**
|
|
2106
2159
|
* The concept to which the property belongs.
|
|
2107
2160
|
*/
|
|
2108
|
-
concept:
|
|
2161
|
+
concept: ConceptName;
|
|
2109
2162
|
/**
|
|
2110
2163
|
* The name of the property.
|
|
2111
2164
|
*/
|
|
@@ -2339,11 +2392,11 @@ export declare interface Relationship {
|
|
|
2339
2392
|
/**
|
|
2340
2393
|
* Source concept in the relationship.
|
|
2341
2394
|
*/
|
|
2342
|
-
concept:
|
|
2395
|
+
concept: ConceptName;
|
|
2343
2396
|
/**
|
|
2344
2397
|
* Target concept in the relationship.
|
|
2345
2398
|
*/
|
|
2346
|
-
target_concept:
|
|
2399
|
+
target_concept: ConceptName;
|
|
2347
2400
|
/**
|
|
2348
2401
|
* Name of the relationship.
|
|
2349
2402
|
*/
|
|
@@ -2523,6 +2576,15 @@ export declare interface SearchXperienceProps {
|
|
|
2523
2576
|
};
|
|
2524
2577
|
}
|
|
2525
2578
|
|
|
2579
|
+
/**
|
|
2580
|
+
* @beta
|
|
2581
|
+
* Type representing an application with semantic bindings.
|
|
2582
|
+
*/
|
|
2583
|
+
export declare type SemanticallyBoundApp = App & {
|
|
2584
|
+
/** The semantic bindings associated with the application. */
|
|
2585
|
+
bindings: SemanticBindingProps[];
|
|
2586
|
+
};
|
|
2587
|
+
|
|
2526
2588
|
/**
|
|
2527
2589
|
* @beta
|
|
2528
2590
|
* Type representing a semantically bound filter definition.
|
|
@@ -2534,19 +2596,47 @@ export declare type SemanticallyBoundFilterDefinition = {
|
|
|
2534
2596
|
concepts: string[];
|
|
2535
2597
|
};
|
|
2536
2598
|
|
|
2599
|
+
/**
|
|
2600
|
+
* @beta
|
|
2601
|
+
* Type representing a template binding.
|
|
2602
|
+
*/
|
|
2603
|
+
export declare type SemanticBinding = {
|
|
2604
|
+
/** The concept to which the binding applies */
|
|
2605
|
+
concept: ConceptName;
|
|
2606
|
+
/** the role for which the binding applies */
|
|
2607
|
+
role?: SemanticBindingType;
|
|
2608
|
+
/** The actual binding properties */
|
|
2609
|
+
props?: SemanticBindingProps;
|
|
2610
|
+
};
|
|
2611
|
+
|
|
2612
|
+
/**
|
|
2613
|
+
* @beta
|
|
2614
|
+
* Type representing the properties for a template binding.
|
|
2615
|
+
*/
|
|
2616
|
+
export declare interface SemanticBindingProps {
|
|
2617
|
+
/** The concept to which the binding applies */
|
|
2618
|
+
concept: string;
|
|
2619
|
+
/** The priority for the template, lower value means higher priority */
|
|
2620
|
+
priority?: number;
|
|
2621
|
+
/** Whether the result should be shown in large mode by default */
|
|
2622
|
+
maximized?: boolean;
|
|
2623
|
+
/** Other properties */
|
|
2624
|
+
[key: string]: any;
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2537
2627
|
/**
|
|
2538
2628
|
* @beta
|
|
2539
2629
|
* Type representing multiple semantic bindings.
|
|
2540
2630
|
*/
|
|
2541
2631
|
export declare type SemanticBindings = {
|
|
2542
|
-
[k in SemanticBindingType]:
|
|
2632
|
+
[k in SemanticBindingType]: (ConceptName | SemanticBinding)[];
|
|
2543
2633
|
};
|
|
2544
2634
|
|
|
2545
2635
|
/**
|
|
2546
2636
|
* @beta
|
|
2547
2637
|
* Type representing a semantic binding type.
|
|
2548
2638
|
*/
|
|
2549
|
-
export declare type SemanticBindingType = 'record_viewer';
|
|
2639
|
+
export declare type SemanticBindingType = 'record_viewer' | string;
|
|
2550
2640
|
|
|
2551
2641
|
/**
|
|
2552
2642
|
* @beta
|
|
@@ -2859,6 +2949,8 @@ export declare type TemplateMetadata = {
|
|
|
2859
2949
|
rendersMultipleRecords?: boolean;
|
|
2860
2950
|
/** Whether the template is an app. */
|
|
2861
2951
|
isApp?: boolean;
|
|
2952
|
+
/** details for semantic bindings. These can be app-specific */
|
|
2953
|
+
bindings?: SemanticBinding[];
|
|
2862
2954
|
};
|
|
2863
2955
|
|
|
2864
2956
|
/**
|
|
@@ -3018,6 +3110,10 @@ export declare type Whoami = {
|
|
|
3018
3110
|
* Roles of the user.
|
|
3019
3111
|
*/
|
|
3020
3112
|
timbr_roles: string[];
|
|
3113
|
+
/**
|
|
3114
|
+
* Whether the user is a superuser (having the ADMIN_ALL_WORKSPACES username or role)
|
|
3115
|
+
*/
|
|
3116
|
+
is_superuser: boolean;
|
|
3021
3117
|
};
|
|
3022
3118
|
|
|
3023
3119
|
/**
|
|
@@ -3060,6 +3156,7 @@ export declare type Workspace = {
|
|
|
3060
3156
|
permission?: WorkspacePermission;
|
|
3061
3157
|
/** Whether the workspace is active. */
|
|
3062
3158
|
isActive?: boolean;
|
|
3159
|
+
os_flags?: number;
|
|
3063
3160
|
};
|
|
3064
3161
|
|
|
3065
3162
|
/**
|
|
@@ -3089,6 +3186,16 @@ export declare interface WorkspaceChangeEmitter {
|
|
|
3089
3186
|
onOpenWorkspacesChanged: AddListener<Workspace[]>;
|
|
3090
3187
|
}
|
|
3091
3188
|
|
|
3189
|
+
/**
|
|
3190
|
+
*
|
|
3191
|
+
* @beta
|
|
3192
|
+
* Type representing a workspace flags.
|
|
3193
|
+
*/
|
|
3194
|
+
export declare type WorkspaceFlags = {
|
|
3195
|
+
autoOpen?: boolean;
|
|
3196
|
+
isHidden?: boolean;
|
|
3197
|
+
};
|
|
3198
|
+
|
|
3092
3199
|
/**
|
|
3093
3200
|
* @beta
|
|
3094
3201
|
* Type representing a workspace identifier, which can be a UUID or a workspace item.
|
|
@@ -3218,6 +3325,18 @@ export declare type WorkspaceItemModel = {
|
|
|
3218
3325
|
* Indicates if the item is in draft mode.
|
|
3219
3326
|
*/
|
|
3220
3327
|
draft?: boolean;
|
|
3328
|
+
/**
|
|
3329
|
+
* Indicates if the item is auto open
|
|
3330
|
+
*/
|
|
3331
|
+
autoOpen?: boolean;
|
|
3332
|
+
/**
|
|
3333
|
+
* Indicates if the item is hidden
|
|
3334
|
+
*/
|
|
3335
|
+
isHidden?: boolean;
|
|
3336
|
+
/**
|
|
3337
|
+
* Indicates if the item is closable
|
|
3338
|
+
*/
|
|
3339
|
+
isClosable?: boolean;
|
|
3221
3340
|
};
|
|
3222
3341
|
/**
|
|
3223
3342
|
* Name of the workspace item.
|
package/lib/action.d.ts
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { ItemType } from 'rc-menu/lib/interface';
|
|
2
|
+
import { EdgeSpec, GraphSpec } from './graph';
|
|
3
|
+
import { Entity, WorkspaceItem } from './model';
|
|
4
|
+
import { Workspace } from './workspace';
|
|
5
|
+
/**
|
|
6
|
+
* @beta
|
|
7
|
+
* Interface for managing data transfer during drag and drop operations.
|
|
8
|
+
*/
|
|
9
|
+
export interface IDataTransfer {
|
|
10
|
+
/**
|
|
11
|
+
* Clears the data for the specified format or all formats if none is specified.
|
|
12
|
+
* @param format - The format of the data to clear.
|
|
13
|
+
*/
|
|
14
|
+
clearData(format?: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the data for the specified format.
|
|
17
|
+
* @param format - The format of the data.
|
|
18
|
+
* @param data - The data to be set.
|
|
19
|
+
*/
|
|
20
|
+
setData(format: string, data: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves the data for the specified format.
|
|
23
|
+
* @param format - The format of the data to retrieve.
|
|
24
|
+
* @returns The data for the specified format, or null if not found.
|
|
25
|
+
*/
|
|
26
|
+
getData(format: string): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the image to be used for dragging.
|
|
29
|
+
* @param img - The image element to be used.
|
|
30
|
+
* @param xOffset - The horizontal offset.
|
|
31
|
+
* @param yOffset - The vertical offset.
|
|
32
|
+
*/
|
|
33
|
+
setDragImage?(img: Element, xOffset: number, yOffset: number): void;
|
|
34
|
+
/** The drop effect for the drag operation. */
|
|
35
|
+
readonly dropEffect: string;
|
|
36
|
+
/** The effect allowed for the drag operation. */
|
|
37
|
+
readonly effectAllowed: string;
|
|
38
|
+
/** The list of files being transferred. */
|
|
39
|
+
readonly files: FileList;
|
|
40
|
+
/** The types of data being transferred. */
|
|
41
|
+
readonly types: string[];
|
|
42
|
+
/** The items being transferred. */
|
|
43
|
+
readonly items: DataTransferItemList;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @beta
|
|
47
|
+
* Interface representing the context for an action.
|
|
48
|
+
*/
|
|
49
|
+
export interface ActionContext {
|
|
50
|
+
concept?: string;
|
|
51
|
+
graph?: GraphSpec & any;
|
|
52
|
+
item?: WorkspaceItem;
|
|
53
|
+
items?: WorkspaceItem[];
|
|
54
|
+
workspace?: Workspace;
|
|
55
|
+
dataTransfer?: IDataTransfer;
|
|
56
|
+
eventTopicPrefix?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Callback function to be executed with the result of the action.
|
|
59
|
+
* @param result - The result object containing records and relationships.
|
|
60
|
+
*/
|
|
61
|
+
then?: (result?: {
|
|
62
|
+
records?: Entity[];
|
|
63
|
+
relationships?: EdgeSpec[];
|
|
64
|
+
}) => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @beta
|
|
68
|
+
* Type representing the possible triggers for a context menu.
|
|
69
|
+
*/
|
|
70
|
+
export type trigger = 'hover' | 'contextMenu' | 'click';
|
|
71
|
+
/**
|
|
72
|
+
* @beta
|
|
73
|
+
* Type representing the groups for a context menu.
|
|
74
|
+
*/
|
|
75
|
+
export type ContextMenuGroup = 'add' | 'addto' | 'copy' | 'edit' | 'transform' | 'general' | 'open' | 'danger' | 'tags' | 'relations';
|
|
76
|
+
/**
|
|
77
|
+
* @beta
|
|
78
|
+
* Type representing labels for context menu groups.
|
|
79
|
+
*/
|
|
80
|
+
export type ContextMenuLabels = {
|
|
81
|
+
[group in ContextMenuGroup]?: string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* @beta
|
|
85
|
+
* Options for configuring a context menu.
|
|
86
|
+
*/
|
|
87
|
+
export type ContextMenuOptions = {
|
|
88
|
+
mode?: 'edit' | 'default';
|
|
89
|
+
groups?: ContextMenuGroup[];
|
|
90
|
+
labels?: ContextMenuLabels;
|
|
91
|
+
extras?: ItemType[];
|
|
92
|
+
excludedKeys?: string[];
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* @beta
|
|
96
|
+
* Request object for opening or clearing a context menu.
|
|
97
|
+
*/
|
|
98
|
+
export type ContextMenuRequest = (ActionContext & {
|
|
99
|
+
x: number;
|
|
100
|
+
y: number;
|
|
101
|
+
openContextMenu?: boolean;
|
|
102
|
+
onCloseEmit?: string;
|
|
103
|
+
menuType?: 'default' | 'tags';
|
|
104
|
+
options?: ContextMenuOptions;
|
|
105
|
+
}) | {
|
|
106
|
+
clearContextMenu: true;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* @beta
|
|
110
|
+
* Parameters for a context menu.
|
|
111
|
+
*/
|
|
112
|
+
export type ContextMenuParams = ActionContext & {
|
|
113
|
+
children: any;
|
|
114
|
+
trigger?: trigger[];
|
|
115
|
+
onMenuToggle?: (isOpen: boolean) => void;
|
|
116
|
+
options?: ContextMenuOptions;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* @beta
|
|
120
|
+
* Type representing an asynchronous filter function.
|
|
121
|
+
*/
|
|
122
|
+
export type AsyncFilter = () => Promise<boolean>;
|
|
123
|
+
/**
|
|
124
|
+
* @beta
|
|
125
|
+
* Interface for handling actions with optional close behavior.
|
|
126
|
+
*/
|
|
127
|
+
export type ActionHandler = {
|
|
128
|
+
onClose?: AsyncFilter;
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../src/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9C,OA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AAO,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC"}
|
package/lib/action.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../src/action.ts"],"names":[],"mappings":""}
|
package/lib/api.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @beta
|
|
3
|
+
* Type representing a successful API result.
|
|
4
|
+
* @template T - The type of the data returned.
|
|
5
|
+
*/
|
|
6
|
+
export type ApiSuccessResult<T> = {
|
|
7
|
+
/** The status of the API result, always 'success' for this type. */
|
|
8
|
+
status: 'success';
|
|
9
|
+
/** The data returned by the API. */
|
|
10
|
+
data: T;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @beta
|
|
14
|
+
* Type representing an error API result.
|
|
15
|
+
*/
|
|
16
|
+
export type ApiErrorResult = {
|
|
17
|
+
/** The status of the API result, always 'error' for this type. */
|
|
18
|
+
status: 'error';
|
|
19
|
+
/** The error message or data. */
|
|
20
|
+
data: string;
|
|
21
|
+
/** The cause of the error, represented by a number. */
|
|
22
|
+
cause: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @beta
|
|
26
|
+
* Type representing a general API result which can be either success or error.
|
|
27
|
+
* @template T - The type of the data returned in case of success.
|
|
28
|
+
*/
|
|
29
|
+
export type ApiResult<T> = ApiSuccessResult<T> | ApiErrorResult;
|
|
30
|
+
//# sourceMappingURL=api.d.ts.map
|
package/lib/api.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,oEAAoE;IACpE,MAAM,EAAE,SAAS,CAAC;IAClB,oCAAoC;IACpC,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,kEAAkE;IAClE,MAAM,EAAE,OAAO,CAAC;IAChB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC"}
|
package/lib/api.js
ADDED
package/lib/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":""}
|
package/lib/app.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { JobManifest } from './jobManifestTypes';
|
|
2
|
+
import { DesktopActionContext } from './desktop';
|
|
3
|
+
import { WorkspaceItem } from './model';
|
|
4
|
+
import { SemanticBindingProps } from './semantic';
|
|
5
|
+
/**
|
|
6
|
+
* @beta
|
|
7
|
+
* Type representing an application with folder and optional manifest information.
|
|
8
|
+
*/
|
|
9
|
+
export type App = {
|
|
10
|
+
/** The folder associated with the application. */
|
|
11
|
+
folder: WorkspaceItem;
|
|
12
|
+
/** Optional manifest entity associated with the application. */
|
|
13
|
+
manifest_entity?: WorkspaceItem;
|
|
14
|
+
/** Optional job manifest associated with the application. */
|
|
15
|
+
manifest?: JobManifest;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @beta
|
|
19
|
+
* Type representing an application with semantic bindings.
|
|
20
|
+
*/
|
|
21
|
+
export type SemanticallyBoundApp = App & {
|
|
22
|
+
/** The semantic bindings associated with the application. */
|
|
23
|
+
bindings: SemanticBindingProps[];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @beta
|
|
27
|
+
* Options for an application service call.
|
|
28
|
+
*/
|
|
29
|
+
export type AppServiceCallOptions = {};
|
|
30
|
+
/**
|
|
31
|
+
* @beta
|
|
32
|
+
* Properties for making an application service call.
|
|
33
|
+
*/
|
|
34
|
+
export type AppServiceCallProps = {
|
|
35
|
+
/** The name of the service to be called. */
|
|
36
|
+
service: string;
|
|
37
|
+
/** Optional options for the service call. */
|
|
38
|
+
options?: AppServiceCallOptions;
|
|
39
|
+
/** Contextual data for the service call. */
|
|
40
|
+
context: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @beta
|
|
46
|
+
* Context for a transformation action within the desktop environment.
|
|
47
|
+
*/
|
|
48
|
+
export type TransformActionContext = DesktopActionContext & {
|
|
49
|
+
/** The task ID associated with the transformation. */
|
|
50
|
+
taskID: string;
|
|
51
|
+
/** Function to be called when the task is canceled. */
|
|
52
|
+
onTaskCanceled: () => Promise<void>;
|
|
53
|
+
/** Function to be called when the task is completed. */
|
|
54
|
+
onTaskComplete: (result: any) => Promise<void>;
|
|
55
|
+
/** Function to call a transformation with additional context. */
|
|
56
|
+
callTransform: (transform: string, extraContext: any) => Promise<any>;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* @beta
|
|
60
|
+
* Type representing a transformation action.
|
|
61
|
+
* @param context - The context for the transformation action.
|
|
62
|
+
* @returns The result of the transformation action.
|
|
63
|
+
*/
|
|
64
|
+
export type TransformAction = (context: TransformActionContext) => any;
|
|
65
|
+
//# sourceMappingURL=app.d.ts.map
|
package/lib/app.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,C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G,CAAC,OAAO,EAAE,sBAAsB,KAAK,GAAG,CAAC"}
|
package/lib/app.js
ADDED
package/lib/app.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { GraphSpec } from './graph';
|
|
2
|
+
import { Entity } from './model';
|
|
3
|
+
/**
|
|
4
|
+
* @beta
|
|
5
|
+
* Type representing a set of behaviors with various methods for entity and graph operations.
|
|
6
|
+
*/
|
|
7
|
+
export type Behaviour = {
|
|
8
|
+
/**
|
|
9
|
+
* Gets the count of entities.
|
|
10
|
+
* @returns A promise that resolves to the number of entities.
|
|
11
|
+
*/
|
|
12
|
+
getEntitiesCount?: () => Promise<number>;
|
|
13
|
+
/**
|
|
14
|
+
* Gets a list of entities.
|
|
15
|
+
* @param limit - Optional limit on the number of entities to retrieve.
|
|
16
|
+
* @returns A promise that resolves to an array of entities.
|
|
17
|
+
*/
|
|
18
|
+
getEntities?: (limit?: number) => Promise<Entity[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Gets a single entity.
|
|
21
|
+
* @returns A promise that resolves to an entity.
|
|
22
|
+
*/
|
|
23
|
+
getEntity?: () => Promise<Entity>;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the content associated with the behavior.
|
|
26
|
+
* @returns A promise that resolves to the content.
|
|
27
|
+
*/
|
|
28
|
+
getContent?: () => Promise<any>;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the graph specification.
|
|
31
|
+
* @returns A promise that resolves to the graph specification or undefined if not available.
|
|
32
|
+
*/
|
|
33
|
+
getGraph?: () => Promise<GraphSpec | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Opens the associated entity or content with the default action.
|
|
36
|
+
* @returns A promise that resolves when the operation is complete.
|
|
37
|
+
*/
|
|
38
|
+
open?: () => Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Edits the associated entity or content with the default edit action.
|
|
41
|
+
* @returns A promise that resolves when the operation is complete.
|
|
42
|
+
*/
|
|
43
|
+
edit?: () => Promise<void>;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=behaviour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"behaviour.d.ts","sourceRoot":"","sources":["../src/behaviour.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzC;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEpD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IAEhC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAEhD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC"}
|
package/lib/behaviour.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
/*
|
|
3
|
+
// For consideration.
|
|
4
|
+
export type BehaviourRegistry = {
|
|
5
|
+
registerBehaviour: (
|
|
6
|
+
entity_type: string,
|
|
7
|
+
behaviour: Partial<Behaviour>,
|
|
8
|
+
) => void;
|
|
9
|
+
withBehavior: (entity: Entity) => Promise<Entity & Behaviour>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type AppRegistry = BehaviourRegistry & {
|
|
13
|
+
*/
|
|
14
|
+
//# sourceMappingURL=behaviour.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"behaviour.js","sourceRoot":"","sources":["../src/behaviour.ts"],"names":[],"mappings":";AAoDA;;;;;;;;;;;IAWI"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @beta
|
|
3
|
+
* Type representing a callback function.
|
|
4
|
+
* @template T - The type of the parameter for the callback function.
|
|
5
|
+
* @param t - The parameter for the callback function.
|
|
6
|
+
*/
|
|
7
|
+
export type Callback<T> = (t: T) => void;
|
|
8
|
+
/**
|
|
9
|
+
* @beta
|
|
10
|
+
* Type representing an unsubscribe function.
|
|
11
|
+
* @returns A promise that resolves when the unsubscribe operation is complete.
|
|
12
|
+
*/
|
|
13
|
+
export type Unsubscribe = () => Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* @beta
|
|
16
|
+
* Type representing a function to add a listener.
|
|
17
|
+
* @template T - The type of the parameter for the callback function.
|
|
18
|
+
* @param callback - The callback function to be invoked.
|
|
19
|
+
* @returns A promise that resolves to an unsubscribe function.
|
|
20
|
+
*/
|
|
21
|
+
export type AddListener<T> = (callback: Callback<T>) => Promise<Unsubscribe>;
|
|
22
|
+
//# sourceMappingURL=callback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../src/callback.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC"}
|
package/lib/callback.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callback.js","sourceRoot":"","sources":["../src/callback.ts"],"names":[],"mappings":""}
|