@octostar/platform-types 0.0.1 → 0.0.3-alpha.0

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Oleksandr Korzhov
3
+ Copyright (c) 2024 Octostar Limited
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -109,7 +109,7 @@ export declare type Behaviour = {
109
109
  };
110
110
 
111
111
  /** List of operators that require another operand that is a single value */
112
- declare const BINARY_OPERATORS: readonly ["==", "!=", ">", "<", ">=", "<=", "ILIKE", "LIKE", "REGEX", "TEMPORAL_RANGE"];
112
+ declare const BINARY_OPERATORS: readonly ["==", "!=", ">", "<", ">=", "<=", "ILIKE", "LIKE", "REGEX", "IN_POLYGON", "TEMPORAL_RANGE"];
113
113
 
114
114
  /** An operator that requires another operand that is a single value */
115
115
  declare type BinaryOperator = typeof BINARY_OPERATORS[number];
@@ -193,7 +193,7 @@ export declare type ConnectedEntity = Entity & {
193
193
  concept_name: string;
194
194
  };
195
195
 
196
- export declare type ContextMenuGroup = 'add' | 'addto' | 'edit' | 'transform' | 'general' | 'open' | 'danger' | 'tags';
196
+ export declare type ContextMenuGroup = 'add' | 'addto' | 'edit' | 'transform' | 'general' | 'open' | 'danger' | 'tags' | 'relations';
197
197
 
198
198
  export declare type ContextMenuLabels = {
199
199
  [group in ContextMenuGroup]?: string;
@@ -224,10 +224,30 @@ export declare type ContextMenuRequest = (ActionContext & {
224
224
  };
225
225
 
226
226
  export declare type CreateEntityFormProps = {
227
- os_workspace: string;
227
+ os_workspace?: string;
228
228
  concept?: string;
229
229
  };
230
230
 
231
+ export declare type CreateLinkChartFn = (params: CreateLinkChartParams) => Promise<WorkspaceItem | undefined>;
232
+
233
+ export declare type CreateLinkChartParams = {
234
+ path?: string;
235
+ name: string;
236
+ nodes?: Entity[];
237
+ edges?: EdgeSpec[];
238
+ draft?: boolean;
239
+ os_workspace?: string;
240
+ };
241
+
242
+ export declare type CreateRelationsDialogProps = {
243
+ source?: Entity;
244
+ os_workspace?: string;
245
+ target?: FocusListItem;
246
+ createRecord?: boolean;
247
+ relationName?: string;
248
+ defaultTargetConcept?: string;
249
+ };
250
+
231
251
  export declare type CustomEventListener<L> = (payload: L) => void;
232
252
 
233
253
  export declare type CustomTemplate = TemplateMetadata & {
@@ -613,7 +633,7 @@ export declare interface Desktop extends DesktopSettings, WorkspaceChangeEmitter
613
633
  setActiveWorkspace: (workspace: string | undefined) => Promise<void>;
614
634
  closeWorkspace: (ws: WorkspaceIdentifier) => Promise<void>;
615
635
  copy: (source: WorkspaceItem, target: WorkspaceItem) => Promise<WorkspaceItem[]>;
616
- listAllWorkspaces: () => Promise<WorkspaceItem[]>;
636
+ listAllWorkspaces: (permissions?: WorkspacePermissionValue) => Promise<WorkspaceItem[]>;
617
637
  /**
618
638
  * This might not be enough, add a listener to {@link Desktop.onOpenWorkspacesChanged} to keep getting updated.
619
639
  * In react components, prefer {@link useDesktopWorkspaces} hook.
@@ -653,6 +673,8 @@ export declare interface Desktop extends DesktopSettings, WorkspaceChangeEmitter
653
673
  getFilesTree: (workspace_or_folder: WorkspaceItem, options?: FileTreeOptions) => Promise<WorkspaceItem[]>;
654
674
  open(records: Entity | Entity[], options?: DesktopActionOptions): Promise<void>;
655
675
  delete: (item: WorkspaceRecordIdentifier | WorkspaceRecordIdentifier[], recurse?: boolean) => Promise<void>;
676
+ delete_workspace_records: (workspace_id: string) => Promise<void>;
677
+ delete_local_concept_records: (workspace_id: string, base_concept: string) => Promise<void>;
656
678
  searchXperience: (options?: SearchXperienceProps) => Promise<Entity[]>;
657
679
  showTab: (props: ShowTabProps) => Promise<void>;
658
680
  closeTab: (props: ShowTabProps) => Promise<void>;
@@ -665,6 +687,7 @@ export declare interface Desktop extends DesktopSettings, WorkspaceChangeEmitter
665
687
  showConfirm: (props: OsConfirmProps) => Promise<OS_CONFIRM_MODAL_RESPONSE>;
666
688
  showFileUpload: (folder: WorkspaceItem) => Promise<WorkspaceItem[]>;
667
689
  showCreateEntityForm: (props: CreateEntityFormProps) => Promise<OsWorkspaceEntity[]>;
690
+ showCreateRelationsDialog: (props: CreateRelationsDialogProps) => Promise<void>;
668
691
  getPasteContext: (options: PasteContextOptions) => Promise<Entity[]>;
669
692
  showModalTemplate: (props: ModalTemplateProps) => Promise<void>;
670
693
  addComment: (about: Entity, comment: AddCommentParams) => Promise<Entity>;
@@ -675,9 +698,14 @@ export declare interface Desktop extends DesktopSettings, WorkspaceChangeEmitter
675
698
  [os_workspace: string]: WorkspacePermission;
676
699
  }>;
677
700
  getUser: () => Promise<UserProfile>;
678
- deployApp: (app: WorkspaceItem) => Promise<WorkspaceItem>;
701
+ deployApp: (app: WorkspaceItem, initialSecrets?: {
702
+ [key: string]: string;
703
+ }) => Promise<WorkspaceItem>;
679
704
  undeployApp: (app: WorkspaceItem) => Promise<WorkspaceItem>;
680
705
  whoami: () => Promise<Whoami>;
706
+ getFocusList: () => Promise<FocusListItem[]>;
707
+ addToFocusList: (entities: Entity[], type?: 'single' | 'group', tabName?: string) => Promise<FocusListItem[]>;
708
+ removeFromFocusList: (entities: Entity[], type?: 'single' | 'group', tabName?: string) => Promise<FocusListItem[]>;
681
709
  }
682
710
 
683
711
  export declare type DesktopAction = (context: DesktopActionContext) => any;
@@ -835,6 +863,10 @@ export declare type ExportOptions = {
835
863
  filename?: string;
836
864
  };
837
865
 
866
+ export declare type ExtrasApi = {
867
+ createLinkChart: CreateLinkChartFn;
868
+ };
869
+
838
870
  declare type FileCode = {
839
871
  file: string;
840
872
  };
@@ -859,6 +891,13 @@ declare type FilterReference = string | {
859
891
  ['require_all']: FilterReference[];
860
892
  };
861
893
 
894
+ export declare type FocusListItem = {
895
+ entity: Entity;
896
+ count: number;
897
+ tabName?: string;
898
+ type?: 'single';
899
+ } | NamedEntityGroup;
900
+
862
901
  export declare type FolderPasteOptions = {
863
902
  folders?: boolean;
864
903
  files?: boolean;
@@ -960,7 +999,6 @@ declare interface IGlobalAttributes {
960
999
  borderMinSize?: number;
961
1000
  borderSize?: number;
962
1001
  enableEdgeDock?: boolean;
963
- enableRotateBorderIcons?: boolean;
964
1002
  enableUseVisibility?: boolean;
965
1003
  legacyOverflowMenu?: boolean;
966
1004
  marginInsets?: IInsets;
@@ -971,7 +1009,6 @@ declare interface IGlobalAttributes {
971
1009
  tabBorderWidth?: number;
972
1010
  tabClassName?: string;
973
1011
  tabCloseType?: ICloseType;
974
- tabContentClassName?: string;
975
1012
  tabDragSpeed?: number;
976
1013
  tabEnableClose?: boolean;
977
1014
  tabEnableDrag?: boolean;
@@ -989,7 +1026,6 @@ declare interface IGlobalAttributes {
989
1026
  tabSetEnableDrag?: boolean;
990
1027
  tabSetEnableDrop?: boolean;
991
1028
  tabSetEnableMaximize?: boolean;
992
- tabSetEnableSingleTabStretch?: boolean;
993
1029
  tabSetEnableTabStrip?: boolean;
994
1030
  tabSetHeaderHeight?: number;
995
1031
  tabSetMarginInsets?: IInsets;
@@ -1033,6 +1069,8 @@ declare interface IJsonTabSetNode extends ITabSetAttributes {
1033
1069
  export declare type ImportZipOptions = {
1034
1070
  overwrite?: boolean;
1035
1071
  target?: string;
1072
+ include_content?: boolean;
1073
+ include_dashboards?: boolean | 'if_missing';
1036
1074
  };
1037
1075
 
1038
1076
  export declare interface Inheritance {
@@ -1060,8 +1098,6 @@ declare interface ITabAttributes {
1060
1098
  closeType?: ICloseType;
1061
1099
  component?: string;
1062
1100
  config?: any;
1063
- contentClassName?: string;
1064
- tabsetClassName?: string;
1065
1101
  enableClose?: boolean;
1066
1102
  enableDrag?: boolean;
1067
1103
  enableFloat?: boolean;
@@ -1089,7 +1125,6 @@ declare interface ITabSetAttributes {
1089
1125
  enableDrag?: boolean;
1090
1126
  enableDrop?: boolean;
1091
1127
  enableMaximize?: boolean;
1092
- enableSingleTabStretch?: boolean;
1093
1128
  enableTabStrip?: boolean;
1094
1129
  headerHeight?: number;
1095
1130
  height?: number;
@@ -1104,8 +1139,6 @@ declare interface ITabSetAttributes {
1104
1139
  type: "tabset";
1105
1140
  weight?: number;
1106
1141
  width?: number;
1107
- maximized?: boolean;
1108
- active?: boolean;
1109
1142
  }
1110
1143
 
1111
1144
  declare interface ItemSharedProps {
@@ -1224,7 +1257,6 @@ declare class Model {
1224
1257
  getRoot(): RowNode;
1225
1258
  isRootOrientationVertical(): boolean;
1226
1259
  isUseVisibility(): boolean;
1227
- isEnableRotateBorderIcons(): boolean;
1228
1260
  /**
1229
1261
  * Gets the
1230
1262
  * @returns {BorderSet|*}
@@ -1240,12 +1272,6 @@ declare class Model {
1240
1272
  * @param id the id to find
1241
1273
  */
1242
1274
  getNodeById(id: string): Node_2 | undefined;
1243
- /**
1244
- * Finds the first/top left tab set of the given node.
1245
- * @param node The top node you want to begin searching from, deafults to the root node
1246
- * @returns The first Tab Set
1247
- */
1248
- getFirstTabSet(node?: Node_2): Node_2;
1249
1275
  /**
1250
1276
  * Update the node tree by performing the given action,
1251
1277
  * Actions should be generated via static methods on the Actions class
@@ -1278,6 +1304,13 @@ declare class Model {
1278
1304
  toString(): string;
1279
1305
  }
1280
1306
 
1307
+ export declare type NamedEntityGroup = {
1308
+ entity_label: string;
1309
+ query: ConceptFilter;
1310
+ count: number;
1311
+ type: 'group';
1312
+ };
1313
+
1281
1314
  declare abstract class Node_2 {
1282
1315
  getId(): string;
1283
1316
  getModel(): Model;
@@ -2371,7 +2404,7 @@ export declare interface Ontology {
2371
2404
  getConceptForEntity: (entity: Entity) => Promise<Concept | undefined>;
2372
2405
  getRelationshipsForEntity: (entity: Entity) => Promise<Relationship[]>;
2373
2406
  sendQuery: (query: string, options?: SendQueryOptions) => Promise<QueryResponse>;
2374
- sendQueryT: <T>(query: string, options?: SendQueryOptions) => Promise<T[]>;
2407
+ sendQueryT: <T>(query: string, options?: SendQueryOptions, force_refresh?: boolean) => Promise<T[]>;
2375
2408
  getSysInheritance(): Promise<Inheritance[]>;
2376
2409
  subscribe: <T>(entity: Entity, callback: Callback<T>) => Promise<Unsubscribe>;
2377
2410
  consistentUUID: (name: string, namespace?: string) => Promise<string>;
@@ -4299,7 +4332,7 @@ declare class Rect {
4299
4332
  constructor(x: number, y: number, width: number, height: number);
4300
4333
  static fromElement(element: Element): Rect;
4301
4334
  clone(): Rect;
4302
- equals(rect: Rect | null | undefined): boolean;
4335
+ equals(rect: Rect): boolean;
4303
4336
  getBottom(): number;
4304
4337
  getRight(): number;
4305
4338
  getCenter(): {
@@ -10627,7 +10660,6 @@ declare interface SubMenuType extends ItemSharedProps {
10627
10660
  onMouseLeave?: MenuHoverEventHandler;
10628
10661
  popupClassName?: string;
10629
10662
  popupOffset?: number[];
10630
- popupStyle?: React_2.CSSProperties;
10631
10663
  onClick?: MenuClickEventHandler;
10632
10664
  onTitleClick?: (info: MenuTitleInfo) => void;
10633
10665
  onTitleMouseEnter?: MenuHoverEventHandler;
@@ -10725,8 +10757,6 @@ declare class TabNode extends Node_2 implements IDraggable {
10725
10757
  isEnableDrag(): boolean;
10726
10758
  isEnableRename(): boolean;
10727
10759
  getClassName(): string | undefined;
10728
- getContentClassName(): string | undefined;
10729
- getTabSetClassName(): string | undefined;
10730
10760
  isEnableRenderOnDemand(): boolean;
10731
10761
  toJson(): IJsonTabNode;
10732
10762
  }
@@ -10757,7 +10787,6 @@ declare class TabSetNode extends Node_2 implements IDraggable, IDropTarget {
10757
10787
  isEnableDivide(): boolean;
10758
10788
  isEnableMaximize(): boolean;
10759
10789
  isEnableClose(): boolean;
10760
- isEnableSingleTabStretch(): boolean;
10761
10790
  canMaximize(): boolean;
10762
10791
  isEnableTabStrip(): boolean;
10763
10792
  isAutoSelectTab(): boolean;
@@ -12808,6 +12837,7 @@ export declare type Whoami = {
12808
12837
  email: string | null;
12809
12838
  os_jwt: string;
12810
12839
  username: string;
12840
+ timbr_roles: string[];
12811
12841
  };
12812
12842
 
12813
12843
  export declare type WithProgressBarOptions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octostar/platform-types",
3
- "version": "0.0.1",
3
+ "version": "0.0.3-alpha.0",
4
4
  "description": "Types for the API exposed by Octostar platform to third parties",
5
5
  "keywords": [
6
6
  "octostar",
@@ -29,7 +29,7 @@
29
29
  "antd": "^4.24.8",
30
30
  "antd5": "npm:antd@^5.10.3",
31
31
  "csstype": "^3.1.3",
32
- "flexlayout-react": "^0.7.15",
32
+ "flexlayout-react": "github:Octostarco/flexlayout-react#multi-window-drag-drop",
33
33
  "rc-menu": "^9.8.2",
34
34
  "rimraf": "^5.0.5"
35
35
  },
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "0b301a354cbacd253d138bcb828888ac4df82120"
43
+ "gitHead": "6229560d2720b2abcee261a956491db38113b048"
44
44
  }