@imbricate/core 1.19.2 → 1.20.1

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.
@@ -5,5 +5,17 @@
5
5
  */
6
6
  import { PromiseOr } from "../definition/promise";
7
7
  export interface IImbricateBinaryStorage {
8
+ /**
9
+ * Store a binary file
10
+ *
11
+ * @param binary Base64 encoded binary
12
+ * @param fileName File name
13
+ */
8
14
  putBinaryBase64(binary: string, fileName: string): PromiseOr<string>;
15
+ /**
16
+ * Validate if the binary is a valid base64 to be stored
17
+ *
18
+ * @param binary Base64 encoded binary
19
+ */
20
+ validateBinaryBase64(binary: string): PromiseOr<boolean>;
9
21
  }
@@ -12,20 +12,62 @@ import { ImbricateScriptMetadata, ImbricateScriptSearchResult, ImbricateScriptSn
12
12
  import { IImbricateScript } from "../script/interface";
13
13
  import { ImbricateOriginCapability, ImbricateOriginMetadata } from "./definition";
14
14
  export interface IImbricateOrigin {
15
+ /**
16
+ * Origin type
17
+ */
15
18
  readonly originType: string;
19
+ /**
20
+ * Unique identifier of the origin
21
+ */
16
22
  readonly uniqueIdentifier: string;
23
+ /**
24
+ * Metadata of the origin
25
+ */
17
26
  readonly metadata: ImbricateOriginMetadata;
27
+ /**
28
+ * Payloads of the origin
29
+ */
18
30
  readonly payloads: Record<string, any>;
31
+ /**
32
+ * Capabilities of the origin
33
+ */
19
34
  readonly capabilities: ImbricateOriginCapability;
35
+ /**
36
+ * Get function manager
37
+ *
38
+ * @returns Function manager
39
+ */
20
40
  getFunctionManger(): IImbricateFunctionManager;
41
+ /**
42
+ * Get binary storage
43
+ *
44
+ * @returns Binary storage
45
+ */
21
46
  getBinaryStorage(): IImbricateBinaryStorage;
22
- createCollection(collectionName: string, description?: string): PromiseOr<void>;
47
+ /**
48
+ * Create a collection
49
+ *
50
+ * @param collectionName Collection name
51
+ * @param description Collection description
52
+ *
53
+ * @returns Created collection
54
+ */
55
+ createCollection(collectionName: string, description?: string): PromiseOr<IImbricateOriginCollection>;
23
56
  renameCollection(collectionUniqueIdentifier: string, newCollectionName: string): PromiseOr<void>;
24
57
  deleteCollection(collectionUniqueIdentifier: string): PromiseOr<void>;
25
58
  hasCollection(collectionName: string): PromiseOr<boolean>;
26
59
  findCollection(collectionName: string): PromiseOr<IImbricateOriginCollection | null>;
27
60
  getCollection(collectionUniqueIdentifier: string): PromiseOr<IImbricateOriginCollection | null>;
28
61
  listCollections(): PromiseOr<IImbricateOriginCollection[]>;
62
+ /**
63
+ * Create a script
64
+ *
65
+ * @param scriptName Script name
66
+ * @param initialScript Initial script content
67
+ * @param description Script description
68
+ *
69
+ * @returns Created script
70
+ */
29
71
  createScript(scriptName: string, initialScript: string, description?: string): PromiseOr<IImbricateScript>;
30
72
  putScript(scriptMetadata: ImbricateScriptMetadata, script: string): PromiseOr<IImbricateScript>;
31
73
  renameScript(identifier: string, newScriptName: string): PromiseOr<void>;
@@ -35,4 +77,9 @@ export interface IImbricateOrigin {
35
77
  listScripts(): PromiseOr<ImbricateScriptSnapshot[]>;
36
78
  searchScripts(keyword: string, config: ImbricateSearchScriptConfig): PromiseOr<ImbricateScriptSearchResult[]>;
37
79
  queryScripts(query: ImbricateScriptQuery, config: ImbricateScriptQueryConfig): PromiseOr<IImbricateScript[]>;
80
+ /**
81
+ * Dispose the origin, optional
82
+ * This method will be called when the origin is no longer needed
83
+ */
84
+ dispose?(): PromiseOr<void>;
38
85
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imbricate/core",
3
3
  "main": "index.js",
4
- "version": "1.19.2",
4
+ "version": "1.20.1",
5
5
  "description": "Imbricate Core, Notebook for Engineers",
6
6
  "repository": {
7
7
  "type": "git",