@imbricate/core 3.11.0 → 3.14.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/author/export.d.ts +6 -0
- package/author/export.js +22 -0
- package/database/base-class/essential-readonly.d.ts +18 -0
- package/database/base-class/essential-readonly.js +29 -0
- package/database/base-class/essential.d.ts +18 -0
- package/database/base-class/essential.js +36 -0
- package/database/base-class/exclude-annotation.d.ts +16 -0
- package/database/base-class/exclude-annotation.js +32 -0
- package/database/base-class/exclude-edit-records.d.ts +15 -0
- package/database/base-class/exclude-edit-records.js +31 -0
- package/database/base-class/full-feature-readonly.d.ts +21 -0
- package/database/base-class/full-feature-readonly.js +39 -0
- package/database/base-class/full-feature.d.ts +29 -0
- package/database/base-class/full-feature.js +24 -0
- package/database/export.d.ts +16 -0
- package/database/export.js +32 -0
- package/database/feature.d.ts +2 -7
- package/database/feature.js +3 -38
- package/database/interface.d.ts +41 -32
- package/database/outcome.d.ts +58 -0
- package/database/outcome.js +28 -0
- package/database-manager/base-class/full-feature.d.ts +17 -0
- package/database-manager/base-class/full-feature.js +19 -0
- package/database-manager/base-class/readonly.d.ts +16 -0
- package/database-manager/base-class/readonly.js +26 -0
- package/database-manager/database-manager.d.ts +52 -0
- package/{static/manager.js → database-manager/database-manager.js} +2 -2
- package/database-manager/export.d.ts +10 -0
- package/database-manager/export.js +26 -0
- package/database-manager/feature.d.ts +11 -0
- package/database-manager/feature.js +18 -0
- package/database-manager/outcome.d.ts +26 -0
- package/database-manager/outcome.js +16 -0
- package/document/base-class/essential-readonly.d.ts +17 -0
- package/document/base-class/essential-readonly.js +25 -0
- package/document/base-class/essential.d.ts +18 -0
- package/document/base-class/essential.js +33 -0
- package/document/base-class/exclude-annotation.d.ts +16 -0
- package/document/base-class/exclude-annotation.js +29 -0
- package/document/base-class/exclude-edit-records.d.ts +15 -0
- package/document/base-class/exclude-edit-records.js +28 -0
- package/document/base-class/full-feature-readonly.d.ts +19 -0
- package/document/base-class/full-feature-readonly.js +35 -0
- package/document/base-class/full-feature.d.ts +23 -0
- package/document/base-class/full-feature.js +21 -0
- package/document/export.d.ts +22 -0
- package/document/export.js +38 -0
- package/document/feature.d.ts +1 -5
- package/document/feature.js +2 -24
- package/document/interface.d.ts +23 -21
- package/document/outcome.d.ts +32 -0
- package/document/outcome.js +19 -0
- package/error/database/database-error.d.ts +9 -0
- package/error/database/database-error.js +16 -0
- package/error/database/feature-not-supported.d.ts +12 -0
- package/error/database/feature-not-supported.js +19 -0
- package/error/database-manager/database-manager-error.d.ts +9 -0
- package/error/database-manager/database-manager-error.js +16 -0
- package/error/database-manager/feature-not-supported.d.ts +12 -0
- package/error/database-manager/feature-not-supported.js +19 -0
- package/error/document/document-error.d.ts +9 -0
- package/error/document/document-error.js +16 -0
- package/error/document/feature-not-supported.d.ts +12 -0
- package/error/document/feature-not-supported.js +20 -0
- package/error/export.d.ts +22 -0
- package/error/export.js +38 -0
- package/error/imbricate-error.d.ts +14 -0
- package/error/imbricate-error.js +27 -0
- package/error/origin/feature-not-supported.d.ts +12 -0
- package/error/origin/feature-not-supported.js +20 -0
- package/error/origin/origin-error.d.ts +9 -0
- package/error/origin/origin-error.js +16 -0
- package/error/static/feature-not-supported.d.ts +12 -0
- package/error/static/feature-not-supported.js +19 -0
- package/error/static/static-error.d.ts +9 -0
- package/error/static/static-error.js +16 -0
- package/error/static-manager/feature-not-supported.d.ts +12 -0
- package/error/static-manager/feature-not-supported.js +19 -0
- package/error/static-manager/static-manager-error.d.ts +9 -0
- package/error/static-manager/static-manager-error.js +16 -0
- package/error/text/feature-not-supported.d.ts +12 -0
- package/error/text/feature-not-supported.js +19 -0
- package/error/text/text-error.d.ts +9 -0
- package/error/text/text-error.js +16 -0
- package/error/text-manager/feature-not-supported.d.ts +12 -0
- package/error/text-manager/feature-not-supported.js +19 -0
- package/error/text-manager/text-manager-error.d.ts +9 -0
- package/error/text-manager/text-manager-error.js +16 -0
- package/index.d.ts +11 -29
- package/index.js +11 -29
- package/loader/export.d.ts +8 -0
- package/loader/export.js +24 -0
- package/origin/base-class/essential.d.ts +15 -0
- package/origin/base-class/essential.js +27 -0
- package/origin/base-class/exclude-static.d.ts +13 -0
- package/origin/base-class/exclude-static.js +25 -0
- package/origin/base-class/full-feature.d.ts +21 -0
- package/origin/base-class/full-feature.js +20 -0
- package/origin/export.d.ts +12 -0
- package/origin/export.js +28 -0
- package/origin/feature.d.ts +12 -0
- package/origin/feature.js +19 -0
- package/origin/interface.d.ts +12 -5
- package/origin/outcome.d.ts +11 -0
- package/origin/outcome.js +10 -0
- package/origin/search.d.ts +0 -3
- package/package.json +1 -1
- package/static/base-class/author-only.d.ts +13 -0
- package/static/base-class/author-only.js +23 -0
- package/static/base-class/content-only.d.ts +12 -0
- package/static/base-class/content-only.js +23 -0
- package/static/base-class/full-feature.d.ts +15 -0
- package/static/base-class/full-feature.js +18 -0
- package/static/export.d.ts +12 -0
- package/static/export.js +28 -0
- package/static/feature.d.ts +10 -0
- package/static/feature.js +17 -0
- package/static/interface.d.ts +9 -2
- package/static/outcome.d.ts +10 -0
- package/static/outcome.js +10 -0
- package/static-manager/base-class/full-feature.d.ts +14 -0
- package/static-manager/base-class/full-feature.js +18 -0
- package/static-manager/base-class/readonly.d.ts +14 -0
- package/static-manager/base-class/readonly.js +23 -0
- package/static-manager/export.d.ts +10 -0
- package/static-manager/export.js +26 -0
- package/static-manager/feature.d.ts +10 -0
- package/static-manager/feature.js +17 -0
- package/static-manager/outcome.d.ts +16 -0
- package/static-manager/outcome.js +12 -0
- package/{static/manager.d.ts → static-manager/static-manager.d.ts} +8 -6
- package/{database/manager.js → static-manager/static-manager.js} +2 -2
- package/text/base-class/author-only.d.ts +13 -0
- package/text/base-class/author-only.js +23 -0
- package/text/base-class/content-only.d.ts +12 -0
- package/text/base-class/content-only.js +23 -0
- package/text/base-class/full-feature.d.ts +15 -0
- package/text/base-class/full-feature.js +18 -0
- package/text/export.d.ts +12 -0
- package/text/export.js +28 -0
- package/text/feature.d.ts +10 -0
- package/text/feature.js +17 -0
- package/text/interface.d.ts +9 -2
- package/text/outcome.d.ts +10 -0
- package/text/outcome.js +10 -0
- package/text-manager/base-class/full-feature.d.ts +14 -0
- package/text-manager/base-class/full-feature.js +18 -0
- package/text-manager/base-class/readonly.d.ts +14 -0
- package/text-manager/base-class/readonly.js +23 -0
- package/text-manager/export.d.ts +10 -0
- package/text-manager/export.js +26 -0
- package/text-manager/feature.d.ts +10 -0
- package/text-manager/feature.js +17 -0
- package/text-manager/outcome.d.ts +16 -0
- package/text-manager/outcome.js +12 -0
- package/{text/manager.d.ts → text-manager/text-manager.d.ts} +8 -6
- package/{text/manager.js → text-manager/text-manager.js} +2 -2
- package/database/manager.d.ts +0 -41
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author WMXPY
|
|
3
|
-
* @namespace
|
|
4
|
-
* @description Manager
|
|
3
|
+
* @namespace StaticManager
|
|
4
|
+
* @description Static Manager
|
|
5
5
|
*/
|
|
6
|
-
import { ImbricateStaticAuditOptions } from "
|
|
7
|
-
import {
|
|
6
|
+
import { ImbricateStaticAuditOptions } from "../static/definition";
|
|
7
|
+
import { ImbricateStaticManagerCreateStaticOutcome, ImbricateStaticManagerGetStaticOutcome } from "./outcome";
|
|
8
8
|
export interface IImbricateStaticManager {
|
|
9
9
|
/**
|
|
10
10
|
* Get the static object from the origin
|
|
11
11
|
*
|
|
12
12
|
* @returns a promise of the static object, null if not found
|
|
13
|
+
* Symbol: S_StaticManager_GetStatic_NotFound - if the static object is not found
|
|
13
14
|
*/
|
|
14
|
-
getStatic(uniqueIdentifier: string): PromiseLike<
|
|
15
|
+
getStatic(uniqueIdentifier: string): PromiseLike<ImbricateStaticManagerGetStaticOutcome>;
|
|
15
16
|
/**
|
|
16
17
|
* Create a new static object in the origin, encoded in base64
|
|
17
18
|
* Static object is immutable, once created, it cannot be changed
|
|
@@ -21,6 +22,7 @@ export interface IImbricateStaticManager {
|
|
|
21
22
|
* @param auditOptions audit options of the static object
|
|
22
23
|
*
|
|
23
24
|
* @returns a promise of the created static object
|
|
25
|
+
* Symbol: S_StaticManager_CreateStatic_IdentifierDuplicated - if the identifier is duplicated
|
|
24
26
|
*/
|
|
25
|
-
createInBase64(content: string, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<
|
|
27
|
+
createInBase64(content: string, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
26
28
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Text
|
|
4
|
+
* @description Author Only
|
|
5
|
+
*/
|
|
6
|
+
import { IMBRICATE_TEXT_FEATURE } from "../feature";
|
|
7
|
+
import { IImbricateText } from "../interface";
|
|
8
|
+
import { ImbricateTextGetContentOutcome } from "../outcome";
|
|
9
|
+
import { ImbricateTextFullFeatureBase } from "./full-feature";
|
|
10
|
+
export declare abstract class ImbricateTextAuthorOnlyBase extends ImbricateTextFullFeatureBase implements IImbricateText {
|
|
11
|
+
readonly features: IMBRICATE_TEXT_FEATURE[];
|
|
12
|
+
getContent(): PromiseLike<ImbricateTextGetContentOutcome>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Text
|
|
5
|
+
* @description Author Only
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateTextAuthorOnlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/text/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateTextAuthorOnlyBase extends full_feature_1.ImbricateTextFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.features = [
|
|
16
|
+
feature_1.IMBRICATE_TEXT_FEATURE.TEXT_GET_AUTHOR,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
getContent() {
|
|
20
|
+
throw feature_not_supported_1.ImbricateTextFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_TEXT_FEATURE.TEXT_GET_CONTENT);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ImbricateTextAuthorOnlyBase = ImbricateTextAuthorOnlyBase;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Text
|
|
4
|
+
* @description Content Only
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateAuthor } from "../../author/definition";
|
|
7
|
+
import { IMBRICATE_TEXT_FEATURE } from "../feature";
|
|
8
|
+
import { ImbricateTextFullFeatureBase } from "./full-feature";
|
|
9
|
+
export declare abstract class ImbricateTextContentOnlyBase extends ImbricateTextFullFeatureBase {
|
|
10
|
+
readonly features: IMBRICATE_TEXT_FEATURE[];
|
|
11
|
+
get author(): ImbricateAuthor;
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Text
|
|
5
|
+
* @description Content Only
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateTextContentOnlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/text/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateTextContentOnlyBase extends full_feature_1.ImbricateTextFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.features = [
|
|
16
|
+
feature_1.IMBRICATE_TEXT_FEATURE.TEXT_GET_CONTENT,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
get author() {
|
|
20
|
+
throw feature_not_supported_1.ImbricateTextFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_TEXT_FEATURE.TEXT_GET_AUTHOR);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ImbricateTextContentOnlyBase = ImbricateTextContentOnlyBase;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Text
|
|
4
|
+
* @description Base Class
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateAuthor } from "../../author/definition";
|
|
7
|
+
import { IMBRICATE_TEXT_FEATURE } from "../feature";
|
|
8
|
+
import { IImbricateText } from "../interface";
|
|
9
|
+
import { ImbricateTextGetContentOutcome } from "../outcome";
|
|
10
|
+
export declare abstract class ImbricateTextFullFeatureBase implements IImbricateText {
|
|
11
|
+
abstract readonly uniqueIdentifier: string;
|
|
12
|
+
readonly features: IMBRICATE_TEXT_FEATURE[];
|
|
13
|
+
abstract readonly author: ImbricateAuthor;
|
|
14
|
+
abstract getContent(): PromiseLike<ImbricateTextGetContentOutcome>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Text
|
|
5
|
+
* @description Base Class
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateTextFullFeatureBase = void 0;
|
|
9
|
+
const feature_1 = require("../feature");
|
|
10
|
+
class ImbricateTextFullFeatureBase {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.features = [
|
|
13
|
+
feature_1.IMBRICATE_TEXT_FEATURE.TEXT_GET_AUTHOR,
|
|
14
|
+
feature_1.IMBRICATE_TEXT_FEATURE.TEXT_GET_CONTENT,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ImbricateTextFullFeatureBase = ImbricateTextFullFeatureBase;
|
package/text/export.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Text
|
|
4
|
+
* @description Export
|
|
5
|
+
*/
|
|
6
|
+
export * from "./base-class/author-only";
|
|
7
|
+
export * from "./base-class/content-only";
|
|
8
|
+
export * from "./base-class/full-feature";
|
|
9
|
+
export * from "./definition";
|
|
10
|
+
export * from "./feature";
|
|
11
|
+
export * from "./interface";
|
|
12
|
+
export * from "./outcome";
|
package/text/export.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Text
|
|
5
|
+
* @description Export
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
__exportStar(require("./base-class/author-only"), exports);
|
|
23
|
+
__exportStar(require("./base-class/content-only"), exports);
|
|
24
|
+
__exportStar(require("./base-class/full-feature"), exports);
|
|
25
|
+
__exportStar(require("./definition"), exports);
|
|
26
|
+
__exportStar(require("./feature"), exports);
|
|
27
|
+
__exportStar(require("./interface"), exports);
|
|
28
|
+
__exportStar(require("./outcome"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Text
|
|
4
|
+
* @description Feature
|
|
5
|
+
*/
|
|
6
|
+
export declare enum IMBRICATE_TEXT_FEATURE {
|
|
7
|
+
TEXT_GET_AUTHOR = "TEXT_GET_AUTHOR",
|
|
8
|
+
TEXT_GET_CONTENT = "TEXT_GET_CONTENT"
|
|
9
|
+
}
|
|
10
|
+
export declare const checkImbricateTextFeatureSupported: (features: IMBRICATE_TEXT_FEATURE[], feature: IMBRICATE_TEXT_FEATURE) => boolean;
|
package/text/feature.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Text
|
|
5
|
+
* @description Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.checkImbricateTextFeatureSupported = exports.IMBRICATE_TEXT_FEATURE = void 0;
|
|
9
|
+
var IMBRICATE_TEXT_FEATURE;
|
|
10
|
+
(function (IMBRICATE_TEXT_FEATURE) {
|
|
11
|
+
IMBRICATE_TEXT_FEATURE["TEXT_GET_AUTHOR"] = "TEXT_GET_AUTHOR";
|
|
12
|
+
IMBRICATE_TEXT_FEATURE["TEXT_GET_CONTENT"] = "TEXT_GET_CONTENT";
|
|
13
|
+
})(IMBRICATE_TEXT_FEATURE || (exports.IMBRICATE_TEXT_FEATURE = IMBRICATE_TEXT_FEATURE = {}));
|
|
14
|
+
const checkImbricateTextFeatureSupported = (features, feature) => {
|
|
15
|
+
return features.includes(feature);
|
|
16
|
+
};
|
|
17
|
+
exports.checkImbricateTextFeatureSupported = checkImbricateTextFeatureSupported;
|
package/text/interface.d.ts
CHANGED
|
@@ -4,19 +4,26 @@
|
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
6
|
import { ImbricateAuthor } from "../author/definition";
|
|
7
|
+
import { IMBRICATE_TEXT_FEATURE } from "./feature";
|
|
8
|
+
import { ImbricateTextGetContentOutcome } from "./outcome";
|
|
7
9
|
export interface IImbricateText {
|
|
8
10
|
/**
|
|
9
11
|
* Unique identifier of the text object
|
|
10
12
|
*/
|
|
11
13
|
readonly uniqueIdentifier: string;
|
|
14
|
+
/**
|
|
15
|
+
* Features supported by the text object
|
|
16
|
+
*/
|
|
17
|
+
readonly features: IMBRICATE_TEXT_FEATURE[];
|
|
12
18
|
/**
|
|
13
19
|
* Author of the text object
|
|
14
20
|
*/
|
|
15
|
-
readonly author
|
|
21
|
+
readonly author: ImbricateAuthor;
|
|
16
22
|
/**
|
|
17
23
|
* Get the content of the text object
|
|
18
24
|
*
|
|
19
25
|
* @returns a promise of the content of the text object
|
|
26
|
+
* Symbol: S_Text_GetContent_NotFound - if the content is not found
|
|
20
27
|
*/
|
|
21
|
-
getContent(): PromiseLike<
|
|
28
|
+
getContent(): PromiseLike<ImbricateTextGetContentOutcome>;
|
|
22
29
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Text
|
|
4
|
+
* @description Outcome
|
|
5
|
+
*/
|
|
6
|
+
export declare const S_Text_GetContent_NotFound: unique symbol;
|
|
7
|
+
export type ImbricateTextGetContentOutcomeSymbol = typeof S_Text_GetContent_NotFound;
|
|
8
|
+
export type ImbricateTextGetContentOutcome = {
|
|
9
|
+
readonly content: string;
|
|
10
|
+
} | ImbricateTextGetContentOutcomeSymbol;
|
package/text/outcome.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Text
|
|
5
|
+
* @description Outcome
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.S_Text_GetContent_NotFound = void 0;
|
|
9
|
+
// Get Content
|
|
10
|
+
exports.S_Text_GetContent_NotFound = Symbol("Text_GetContent_NotFound");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace TextManager
|
|
4
|
+
* @description Full Feature
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateTextAuditOptions } from "../../text/definition";
|
|
7
|
+
import { IMBRICATE_TEXT_MANAGER_FEATURE } from "../feature";
|
|
8
|
+
import { ImbricateTextManagerCreateTextOutcome, ImbricateTextManagerGetTextOutcome } from "../outcome";
|
|
9
|
+
import { IImbricateTextManager } from "../text-manager";
|
|
10
|
+
export declare abstract class ImbricateTextManagerFullFeatureBase implements IImbricateTextManager {
|
|
11
|
+
readonly supportedFeatures: IMBRICATE_TEXT_MANAGER_FEATURE[];
|
|
12
|
+
abstract getText(uniqueIdentifier: string): PromiseLike<ImbricateTextManagerGetTextOutcome>;
|
|
13
|
+
abstract createText(content: string, auditOptions?: ImbricateTextAuditOptions): PromiseLike<ImbricateTextManagerCreateTextOutcome>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace TextManager
|
|
5
|
+
* @description Full Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateTextManagerFullFeatureBase = void 0;
|
|
9
|
+
const feature_1 = require("../feature");
|
|
10
|
+
class ImbricateTextManagerFullFeatureBase {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.supportedFeatures = [
|
|
13
|
+
feature_1.IMBRICATE_TEXT_MANAGER_FEATURE.TEXT_MANAGER_GET_TEXT,
|
|
14
|
+
feature_1.IMBRICATE_TEXT_MANAGER_FEATURE.TEXT_MANAGER_CREATE_TEXT,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ImbricateTextManagerFullFeatureBase = ImbricateTextManagerFullFeatureBase;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace TextManager
|
|
4
|
+
* @description Readonly
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateTextAuditOptions } from "../../text/definition";
|
|
7
|
+
import { IMBRICATE_TEXT_MANAGER_FEATURE } from "../feature";
|
|
8
|
+
import { ImbricateTextManagerCreateTextOutcome } from "../outcome";
|
|
9
|
+
import { IImbricateTextManager } from "../text-manager";
|
|
10
|
+
import { ImbricateTextManagerFullFeatureBase } from "./full-feature";
|
|
11
|
+
export declare abstract class ImbricateTextManagerReadonlyBase extends ImbricateTextManagerFullFeatureBase implements IImbricateTextManager {
|
|
12
|
+
readonly supportedFeatures: IMBRICATE_TEXT_MANAGER_FEATURE[];
|
|
13
|
+
createInBase64(_content: string, _auditOptions?: ImbricateTextAuditOptions): PromiseLike<ImbricateTextManagerCreateTextOutcome>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace TextManager
|
|
5
|
+
* @description Readonly
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateTextManagerReadonlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/text-manager/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateTextManagerReadonlyBase extends full_feature_1.ImbricateTextManagerFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.supportedFeatures = [
|
|
16
|
+
feature_1.IMBRICATE_TEXT_MANAGER_FEATURE.TEXT_MANAGER_GET_TEXT,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
createInBase64(_content, _auditOptions) {
|
|
20
|
+
throw feature_not_supported_1.ImbricateTextManagerFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_TEXT_MANAGER_FEATURE.TEXT_MANAGER_CREATE_TEXT);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ImbricateTextManagerReadonlyBase = ImbricateTextManagerReadonlyBase;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace TextManager
|
|
5
|
+
* @description Export
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
__exportStar(require("./base-class/full-feature"), exports);
|
|
23
|
+
__exportStar(require("./base-class/readonly"), exports);
|
|
24
|
+
__exportStar(require("./feature"), exports);
|
|
25
|
+
__exportStar(require("./outcome"), exports);
|
|
26
|
+
__exportStar(require("./text-manager"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace TextManager
|
|
4
|
+
* @description Feature
|
|
5
|
+
*/
|
|
6
|
+
export declare enum IMBRICATE_TEXT_MANAGER_FEATURE {
|
|
7
|
+
TEXT_MANAGER_GET_TEXT = "TEXT_MANAGER_GET_TEXT",
|
|
8
|
+
TEXT_MANAGER_CREATE_TEXT = "TEXT_MANAGER_CREATE_TEXT"
|
|
9
|
+
}
|
|
10
|
+
export declare const checkImbricateTextManagerFeatureSupported: (features: IMBRICATE_TEXT_MANAGER_FEATURE[], feature: IMBRICATE_TEXT_MANAGER_FEATURE) => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace TextManager
|
|
5
|
+
* @description Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.checkImbricateTextManagerFeatureSupported = exports.IMBRICATE_TEXT_MANAGER_FEATURE = void 0;
|
|
9
|
+
var IMBRICATE_TEXT_MANAGER_FEATURE;
|
|
10
|
+
(function (IMBRICATE_TEXT_MANAGER_FEATURE) {
|
|
11
|
+
IMBRICATE_TEXT_MANAGER_FEATURE["TEXT_MANAGER_GET_TEXT"] = "TEXT_MANAGER_GET_TEXT";
|
|
12
|
+
IMBRICATE_TEXT_MANAGER_FEATURE["TEXT_MANAGER_CREATE_TEXT"] = "TEXT_MANAGER_CREATE_TEXT";
|
|
13
|
+
})(IMBRICATE_TEXT_MANAGER_FEATURE || (exports.IMBRICATE_TEXT_MANAGER_FEATURE = IMBRICATE_TEXT_MANAGER_FEATURE = {}));
|
|
14
|
+
const checkImbricateTextManagerFeatureSupported = (features, feature) => {
|
|
15
|
+
return features.includes(feature);
|
|
16
|
+
};
|
|
17
|
+
exports.checkImbricateTextManagerFeatureSupported = checkImbricateTextManagerFeatureSupported;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace TextManager
|
|
4
|
+
* @description Outcome
|
|
5
|
+
*/
|
|
6
|
+
import { IImbricateText } from "../text/interface";
|
|
7
|
+
export declare const S_TextManager_GetText_NotFound: unique symbol;
|
|
8
|
+
export type ImbricateTextManagerGetTextOutcomeSymbol = typeof S_TextManager_GetText_NotFound;
|
|
9
|
+
export type ImbricateTextManagerGetTextOutcome = {
|
|
10
|
+
readonly text: IImbricateText;
|
|
11
|
+
} | ImbricateTextManagerGetTextOutcomeSymbol;
|
|
12
|
+
export declare const S_TextManager_CreateText_IdentifierDuplicated: unique symbol;
|
|
13
|
+
export type ImbricateTextManagerCreateTextOutcomeSymbol = typeof S_TextManager_CreateText_IdentifierDuplicated;
|
|
14
|
+
export type ImbricateTextManagerCreateTextOutcome = {
|
|
15
|
+
readonly text: IImbricateText;
|
|
16
|
+
} | ImbricateTextManagerCreateTextOutcomeSymbol;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace TextManager
|
|
5
|
+
* @description Outcome
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.S_TextManager_CreateText_IdentifierDuplicated = exports.S_TextManager_GetText_NotFound = void 0;
|
|
9
|
+
// Manager Get Text
|
|
10
|
+
exports.S_TextManager_GetText_NotFound = Symbol("TextManager_GetText_NotFound");
|
|
11
|
+
// Manager Create Text
|
|
12
|
+
exports.S_TextManager_CreateText_IdentifierDuplicated = Symbol("TextManager_CreateText_IdentifierDuplicated");
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author WMXPY
|
|
3
|
-
* @namespace
|
|
4
|
-
* @description Manager
|
|
3
|
+
* @namespace TextManager
|
|
4
|
+
* @description Text Manager
|
|
5
5
|
*/
|
|
6
|
-
import { ImbricateTextAuditOptions } from "
|
|
7
|
-
import {
|
|
6
|
+
import { ImbricateTextAuditOptions } from "../text/definition";
|
|
7
|
+
import { ImbricateTextManagerCreateTextOutcome, ImbricateTextManagerGetTextOutcome } from "./outcome";
|
|
8
8
|
export interface IImbricateTextManager {
|
|
9
9
|
/**
|
|
10
10
|
* Get the text object from the origin
|
|
11
11
|
*
|
|
12
12
|
* @returns a promise of the text object, null if not found
|
|
13
|
+
* Symbol: S_TextManager_GetText_NotFound - if the text is not found
|
|
13
14
|
*/
|
|
14
|
-
getText(uniqueIdentifier: string): PromiseLike<
|
|
15
|
+
getText(uniqueIdentifier: string): PromiseLike<ImbricateTextManagerGetTextOutcome>;
|
|
15
16
|
/**
|
|
16
17
|
* Create a new text object in the origin
|
|
17
18
|
* Text object is immutable, once created, it cannot be changed
|
|
@@ -21,6 +22,7 @@ export interface IImbricateTextManager {
|
|
|
21
22
|
* @param auditOptions audit options of the text
|
|
22
23
|
*
|
|
23
24
|
* @returns a promise of the text object
|
|
25
|
+
* Symbol: S_TextManager_CreateText_IdentifierDuplicated - if the identifier is duplicated
|
|
24
26
|
*/
|
|
25
|
-
createText(content: string, auditOptions?: ImbricateTextAuditOptions): PromiseLike<
|
|
27
|
+
createText(content: string, auditOptions?: ImbricateTextAuditOptions): PromiseLike<ImbricateTextManagerCreateTextOutcome>;
|
|
26
28
|
}
|
package/database/manager.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author WMXPY
|
|
3
|
-
* @namespace Database
|
|
4
|
-
* @description Manager
|
|
5
|
-
*/
|
|
6
|
-
import { ImbricateDatabaseAuditOptions } from "./definition";
|
|
7
|
-
import { IImbricateDatabase } from "./interface";
|
|
8
|
-
import { ImbricateDatabaseSchemaForCreation } from "./schema";
|
|
9
|
-
export interface IImbricateDatabaseManager {
|
|
10
|
-
/**
|
|
11
|
-
* List all databases in the origin
|
|
12
|
-
*
|
|
13
|
-
* @returns a promise of the databases in the origin
|
|
14
|
-
*/
|
|
15
|
-
listDatabases(): PromiseLike<IImbricateDatabase[]>;
|
|
16
|
-
/**
|
|
17
|
-
* Get one database from the origin
|
|
18
|
-
*
|
|
19
|
-
* @param uniqueIdentifier unique identifier of the database
|
|
20
|
-
*
|
|
21
|
-
* @returns a promise of the database, null if not found
|
|
22
|
-
*/
|
|
23
|
-
getDatabase(uniqueIdentifier: string): PromiseLike<IImbricateDatabase | null>;
|
|
24
|
-
/**
|
|
25
|
-
* Create a new database
|
|
26
|
-
*
|
|
27
|
-
* @param databaseName name of the database
|
|
28
|
-
* @param schema schema of the database
|
|
29
|
-
* @param auditOptions audit options of the database
|
|
30
|
-
*
|
|
31
|
-
* @returns a promise of the created database
|
|
32
|
-
*/
|
|
33
|
-
createDatabase(databaseName: string, schema: ImbricateDatabaseSchemaForCreation, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<IImbricateDatabase>;
|
|
34
|
-
/**
|
|
35
|
-
* Remove a database from the origin
|
|
36
|
-
*
|
|
37
|
-
* @param uniqueIdentifier unique identifier of the database
|
|
38
|
-
* @param auditOptions audit options of deletion
|
|
39
|
-
*/
|
|
40
|
-
removeDatabase(uniqueIdentifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<void>;
|
|
41
|
-
}
|