@imbricate/core 1.7.2 → 1.8.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.
|
@@ -9,6 +9,9 @@ import { IImbricatePage } from "../page/interface";
|
|
|
9
9
|
export type ImbricateSearchPageConfig = {
|
|
10
10
|
readonly exact?: boolean;
|
|
11
11
|
};
|
|
12
|
+
export type ImbricatePageQuery = {
|
|
13
|
+
readonly limit: number;
|
|
14
|
+
};
|
|
12
15
|
export interface IImbricateOriginCollection {
|
|
13
16
|
readonly collectionName: string;
|
|
14
17
|
readonly description?: string;
|
|
@@ -20,4 +23,5 @@ export interface IImbricateOriginCollection {
|
|
|
20
23
|
getPage(identifier: string): PromiseOr<IImbricatePage | null>;
|
|
21
24
|
listPages(): PromiseOr<ImbricatePageSnapshot[]>;
|
|
22
25
|
searchPages(keyword: string, config: ImbricateSearchPageConfig): PromiseOr<ImbricatePageSearchResult[]>;
|
|
26
|
+
queryPages(query: ImbricatePageQuery): PromiseOr<IImbricatePage[]>;
|
|
23
27
|
}
|
package/origin/interface.d.ts
CHANGED
|
@@ -11,6 +11,9 @@ import { ImbricateOriginMetadata } from "./definition";
|
|
|
11
11
|
export type ImbricateSearchScriptConfig = {
|
|
12
12
|
readonly exact?: boolean;
|
|
13
13
|
};
|
|
14
|
+
export type ImbricateScriptQuery = {
|
|
15
|
+
readonly limit: number;
|
|
16
|
+
};
|
|
14
17
|
export interface IImbricateOrigin {
|
|
15
18
|
readonly metadata: ImbricateOriginMetadata;
|
|
16
19
|
readonly payloads: Record<string, any>;
|
|
@@ -28,4 +31,5 @@ export interface IImbricateOrigin {
|
|
|
28
31
|
getScript(identifier: string): PromiseOr<IImbricateScript | null>;
|
|
29
32
|
listScripts(): PromiseOr<ImbricateScriptSnapshot[]>;
|
|
30
33
|
searchScripts(keyword: string, config: ImbricateSearchScriptConfig): PromiseOr<ImbricateScriptSearchResult[]>;
|
|
34
|
+
queryScripts(query: ImbricateScriptQuery): PromiseOr<IImbricateScript[]>;
|
|
31
35
|
}
|
package/package.json
CHANGED
package/page/definition.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @description Definition
|
|
5
5
|
*/
|
|
6
6
|
import { IMBRICATE_SEARCH_RESULT_TYPE, ImbricateSearchResult, ImbricateSearchSnippet } from "../search/snippet";
|
|
7
|
+
export type ImbricatePageAttributes = Record<string, string>;
|
|
7
8
|
export type ImbricatePageSearchResult = ImbricateSearchResult<IMBRICATE_SEARCH_RESULT_TYPE.PAGE>;
|
|
8
9
|
export type ImbricatePageSearchSnippet = ImbricateSearchSnippet<IMBRICATE_SEARCH_RESULT_TYPE.PAGE>;
|
|
9
10
|
export type ImbricatePageSnapshot = {
|
package/page/interface.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
6
|
import { PromiseOr } from "../definition/promise";
|
|
7
|
+
import { ImbricatePageAttributes } from "./definition";
|
|
7
8
|
export interface IImbricatePage {
|
|
8
9
|
readonly title: string;
|
|
9
10
|
readonly identifier: string;
|
|
@@ -11,5 +12,7 @@ export interface IImbricatePage {
|
|
|
11
12
|
readonly updatedAt: Date;
|
|
12
13
|
readContent(): PromiseOr<string>;
|
|
13
14
|
writeContent(content: string): PromiseOr<void>;
|
|
15
|
+
readAttributes(): PromiseOr<ImbricatePageAttributes>;
|
|
16
|
+
writeAttribute(key: string, value: string): PromiseOr<void>;
|
|
14
17
|
refreshUpdatedAt(updatedAt: Date): PromiseOr<void>;
|
|
15
18
|
}
|
package/script/definition.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @description Definition
|
|
5
5
|
*/
|
|
6
6
|
import { IMBRICATE_SEARCH_RESULT_TYPE, ImbricateSearchResult, ImbricateSearchSnippet } from "../search/snippet";
|
|
7
|
+
export type ImbricateScriptAttributes = Record<string, string>;
|
|
7
8
|
export type ImbricateScriptSearchResult = ImbricateSearchResult<IMBRICATE_SEARCH_RESULT_TYPE.SCRIPT>;
|
|
8
9
|
export type ImbricateScriptSearchSnippet = ImbricateSearchSnippet<IMBRICATE_SEARCH_RESULT_TYPE.SCRIPT>;
|
|
9
10
|
export type ImbricateScriptSnapshot = {
|
package/script/interface.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { MarkedResult } from "@sudoo/marked";
|
|
|
7
7
|
import { PromiseOr } from "../definition/promise";
|
|
8
8
|
import { SandboxExecuteConfig, SandboxExecuteParameter } from "../sandbox/definition/config";
|
|
9
9
|
import { SandboxFeature } from "../sandbox/feature/feature";
|
|
10
|
+
import { ImbricateScriptAttributes } from "./definition";
|
|
10
11
|
export interface IImbricateScript {
|
|
11
12
|
readonly scriptName: string;
|
|
12
13
|
readonly identifier: string;
|
|
@@ -14,6 +15,8 @@ export interface IImbricateScript {
|
|
|
14
15
|
readonly updatedAt: Date;
|
|
15
16
|
readScript(): PromiseOr<string>;
|
|
16
17
|
writeScript(script: string): PromiseOr<void>;
|
|
18
|
+
readAttributes(): PromiseOr<ImbricateScriptAttributes>;
|
|
19
|
+
writeAttribute(key: string, value: string): PromiseOr<void>;
|
|
17
20
|
refreshUpdatedAt(updatedAt: Date): PromiseOr<void>;
|
|
18
21
|
execute(features: SandboxFeature[], config: SandboxExecuteConfig, parameter: SandboxExecuteParameter): PromiseOr<MarkedResult>;
|
|
19
22
|
}
|