@imbricate/core 1.8.3 → 1.8.5

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.
@@ -6,12 +6,10 @@
6
6
  import { PromiseOr } from "../definition/promise";
7
7
  import { ImbricatePageMetadata, ImbricatePageSearchResult, ImbricatePageSnapshot } from "../page/definition";
8
8
  import { IImbricatePage } from "../page/interface";
9
+ import { ImbricatePageQuery, ImbricatePageQueryConfig } from "../query/page";
9
10
  export type ImbricateSearchPageConfig = {
10
11
  readonly exact?: boolean;
11
12
  };
12
- export type ImbricatePageQuery = {
13
- readonly limit?: number;
14
- };
15
13
  export interface IImbricateOriginCollection {
16
14
  readonly collectionName: string;
17
15
  readonly description?: string;
@@ -23,5 +21,5 @@ export interface IImbricateOriginCollection {
23
21
  getPage(identifier: string): PromiseOr<IImbricatePage | null>;
24
22
  listPages(): PromiseOr<ImbricatePageSnapshot[]>;
25
23
  searchPages(keyword: string, config: ImbricateSearchPageConfig): PromiseOr<ImbricatePageSearchResult[]>;
26
- queryPages(query: ImbricatePageQuery): PromiseOr<IImbricatePage[]>;
24
+ queryPages(query: ImbricatePageQuery, config: ImbricatePageQueryConfig): PromiseOr<IImbricatePage[]>;
27
25
  }
package/index.d.ts CHANGED
@@ -10,6 +10,9 @@ export * from "./origin/definition";
10
10
  export * from "./origin/interface";
11
11
  export * from "./page/definition";
12
12
  export * from "./page/interface";
13
+ export * from "./query/definition";
14
+ export * from "./query/page";
15
+ export * from "./query/script";
13
16
  export * from "./sandbox/definition/config";
14
17
  export * from "./sandbox/definition/environment";
15
18
  export * from "./sandbox/definition/implementation";
package/index.js CHANGED
@@ -26,6 +26,9 @@ __exportStar(require("./origin/definition"), exports);
26
26
  __exportStar(require("./origin/interface"), exports);
27
27
  __exportStar(require("./page/definition"), exports);
28
28
  __exportStar(require("./page/interface"), exports);
29
+ __exportStar(require("./query/definition"), exports);
30
+ __exportStar(require("./query/page"), exports);
31
+ __exportStar(require("./query/script"), exports);
29
32
  __exportStar(require("./sandbox/definition/config"), exports);
30
33
  __exportStar(require("./sandbox/definition/environment"), exports);
31
34
  __exportStar(require("./sandbox/definition/implementation"), exports);
@@ -5,15 +5,13 @@
5
5
  */
6
6
  import { IImbricateOriginCollection } from "../collection/interface";
7
7
  import { PromiseOr } from "../definition/promise";
8
+ import { ImbricateScriptQuery, ImbricateScriptQueryConfig } from "../query/script";
8
9
  import { ImbricateScriptMetadata, ImbricateScriptSearchResult, ImbricateScriptSnapshot } from "../script/definition";
9
10
  import { IImbricateScript } from "../script/interface";
10
11
  import { ImbricateOriginMetadata } from "./definition";
11
12
  export type ImbricateSearchScriptConfig = {
12
13
  readonly exact?: boolean;
13
14
  };
14
- export type ImbricateScriptQuery = {
15
- readonly limit?: number;
16
- };
17
15
  export interface IImbricateOrigin {
18
16
  readonly metadata: ImbricateOriginMetadata;
19
17
  readonly payloads: Record<string, any>;
@@ -31,5 +29,5 @@ export interface IImbricateOrigin {
31
29
  getScript(identifier: string): PromiseOr<IImbricateScript | null>;
32
30
  listScripts(): PromiseOr<ImbricateScriptSnapshot[]>;
33
31
  searchScripts(keyword: string, config: ImbricateSearchScriptConfig): PromiseOr<ImbricateScriptSearchResult[]>;
34
- queryScripts(query: ImbricateScriptQuery): PromiseOr<IImbricateScript[]>;
32
+ queryScripts(query: ImbricateScriptQuery, config: ImbricateScriptQueryConfig): PromiseOr<IImbricateScript[]>;
35
33
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imbricate/core",
3
3
  "main": "index.js",
4
- "version": "1.8.3",
4
+ "version": "1.8.5",
5
5
  "description": "Core for Imbricate",
6
6
  "repository": {
7
7
  "type": "git",
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Query
4
+ * @description Definition
5
+ */
6
+ export type ImbricateQueryTime = {
7
+ readonly before?: Date;
8
+ readonly after?: Date;
9
+ };
10
+ export type ImbricateQueryString = {
11
+ readonly equal?: string;
12
+ readonly include?: string;
13
+ readonly exclude?: string;
14
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Query
5
+ * @description Definition
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Query
4
+ * @description Page
5
+ */
6
+ import { ImbricateQueryString, ImbricateQueryTime } from "./definition";
7
+ export type ImbricatePageQuery = {
8
+ readonly title?: ImbricateQueryString;
9
+ readonly attributes?: Record<string, ImbricateQueryString>;
10
+ readonly createdAt?: ImbricateQueryTime;
11
+ readonly updatedAt?: ImbricateQueryTime;
12
+ };
13
+ export type ImbricatePageQueryConfig = {
14
+ readonly limit?: number;
15
+ readonly skip?: number;
16
+ };
package/query/page.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Query
5
+ * @description Page
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Query
4
+ * @description Script
5
+ */
6
+ import { ImbricateQueryString, ImbricateQueryTime } from "./definition";
7
+ export type ImbricateScriptQuery = {
8
+ readonly scriptName?: ImbricateQueryString;
9
+ readonly attributes?: Record<string, ImbricateQueryString>;
10
+ readonly createdAt?: ImbricateQueryTime;
11
+ readonly updatedAt?: ImbricateQueryTime;
12
+ };
13
+ export type ImbricateScriptQueryConfig = {
14
+ readonly limit?: number;
15
+ readonly skip?: number;
16
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Query
5
+ * @description Script
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });