@imbricate/core 3.12.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.
Files changed (114) hide show
  1. package/author/export.d.ts +6 -0
  2. package/author/export.js +22 -0
  3. package/database/export.d.ts +16 -0
  4. package/database/export.js +32 -0
  5. package/database-manager/base-class/full-feature.d.ts +17 -0
  6. package/database-manager/base-class/full-feature.js +19 -0
  7. package/database-manager/base-class/readonly.d.ts +16 -0
  8. package/database-manager/base-class/readonly.js +26 -0
  9. package/database-manager/database-manager.d.ts +52 -0
  10. package/{static/manager.js → database-manager/database-manager.js} +2 -2
  11. package/database-manager/export.d.ts +10 -0
  12. package/database-manager/export.js +26 -0
  13. package/database-manager/feature.d.ts +11 -0
  14. package/database-manager/feature.js +18 -0
  15. package/database-manager/outcome.d.ts +26 -0
  16. package/database-manager/outcome.js +16 -0
  17. package/document/export.d.ts +22 -0
  18. package/document/export.js +38 -0
  19. package/error/database-manager/database-manager-error.d.ts +9 -0
  20. package/error/database-manager/database-manager-error.js +16 -0
  21. package/error/database-manager/feature-not-supported.d.ts +12 -0
  22. package/error/database-manager/feature-not-supported.js +19 -0
  23. package/error/export.d.ts +22 -0
  24. package/error/export.js +38 -0
  25. package/error/origin/feature-not-supported.d.ts +12 -0
  26. package/error/origin/feature-not-supported.js +20 -0
  27. package/error/origin/origin-error.d.ts +9 -0
  28. package/error/origin/origin-error.js +16 -0
  29. package/error/static/feature-not-supported.d.ts +12 -0
  30. package/error/static/feature-not-supported.js +19 -0
  31. package/error/static/static-error.d.ts +9 -0
  32. package/error/static/static-error.js +16 -0
  33. package/error/static-manager/feature-not-supported.d.ts +12 -0
  34. package/error/static-manager/feature-not-supported.js +19 -0
  35. package/error/static-manager/static-manager-error.d.ts +9 -0
  36. package/error/static-manager/static-manager-error.js +16 -0
  37. package/error/text/feature-not-supported.d.ts +12 -0
  38. package/error/text/feature-not-supported.js +19 -0
  39. package/error/text/text-error.d.ts +9 -0
  40. package/error/text/text-error.js +16 -0
  41. package/error/text-manager/feature-not-supported.d.ts +12 -0
  42. package/error/text-manager/feature-not-supported.js +19 -0
  43. package/error/text-manager/text-manager-error.d.ts +9 -0
  44. package/error/text-manager/text-manager-error.js +16 -0
  45. package/index.d.ts +11 -42
  46. package/index.js +11 -42
  47. package/loader/export.d.ts +8 -0
  48. package/loader/export.js +24 -0
  49. package/origin/base-class/essential.d.ts +15 -0
  50. package/origin/base-class/essential.js +27 -0
  51. package/origin/base-class/exclude-static.d.ts +13 -0
  52. package/origin/base-class/exclude-static.js +25 -0
  53. package/origin/base-class/full-feature.d.ts +21 -0
  54. package/origin/base-class/full-feature.js +20 -0
  55. package/origin/export.d.ts +12 -0
  56. package/origin/export.js +28 -0
  57. package/origin/feature.d.ts +12 -0
  58. package/origin/feature.js +19 -0
  59. package/origin/interface.d.ts +12 -5
  60. package/origin/outcome.d.ts +11 -0
  61. package/origin/outcome.js +10 -0
  62. package/origin/search.d.ts +0 -3
  63. package/package.json +1 -1
  64. package/static/base-class/author-only.d.ts +13 -0
  65. package/static/base-class/author-only.js +23 -0
  66. package/static/base-class/content-only.d.ts +12 -0
  67. package/static/base-class/content-only.js +23 -0
  68. package/static/base-class/full-feature.d.ts +15 -0
  69. package/static/base-class/full-feature.js +18 -0
  70. package/static/export.d.ts +12 -0
  71. package/static/export.js +28 -0
  72. package/static/feature.d.ts +10 -0
  73. package/static/feature.js +17 -0
  74. package/static/interface.d.ts +9 -2
  75. package/static/outcome.d.ts +10 -0
  76. package/static/outcome.js +10 -0
  77. package/static-manager/base-class/full-feature.d.ts +14 -0
  78. package/static-manager/base-class/full-feature.js +18 -0
  79. package/static-manager/base-class/readonly.d.ts +14 -0
  80. package/static-manager/base-class/readonly.js +23 -0
  81. package/static-manager/export.d.ts +10 -0
  82. package/static-manager/export.js +26 -0
  83. package/static-manager/feature.d.ts +10 -0
  84. package/static-manager/feature.js +17 -0
  85. package/static-manager/outcome.d.ts +16 -0
  86. package/static-manager/outcome.js +12 -0
  87. package/{static/manager.d.ts → static-manager/static-manager.d.ts} +8 -6
  88. package/{database/manager.js → static-manager/static-manager.js} +2 -2
  89. package/text/base-class/author-only.d.ts +13 -0
  90. package/text/base-class/author-only.js +23 -0
  91. package/text/base-class/content-only.d.ts +12 -0
  92. package/text/base-class/content-only.js +23 -0
  93. package/text/base-class/full-feature.d.ts +15 -0
  94. package/text/base-class/full-feature.js +18 -0
  95. package/text/export.d.ts +12 -0
  96. package/text/export.js +28 -0
  97. package/text/feature.d.ts +10 -0
  98. package/text/feature.js +17 -0
  99. package/text/interface.d.ts +9 -2
  100. package/text/outcome.d.ts +10 -0
  101. package/text/outcome.js +10 -0
  102. package/text-manager/base-class/full-feature.d.ts +14 -0
  103. package/text-manager/base-class/full-feature.js +18 -0
  104. package/text-manager/base-class/readonly.d.ts +14 -0
  105. package/text-manager/base-class/readonly.js +23 -0
  106. package/text-manager/export.d.ts +10 -0
  107. package/text-manager/export.js +26 -0
  108. package/text-manager/feature.d.ts +10 -0
  109. package/text-manager/feature.js +17 -0
  110. package/text-manager/outcome.d.ts +16 -0
  111. package/text-manager/outcome.js +12 -0
  112. package/{text/manager.d.ts → text-manager/text-manager.d.ts} +8 -6
  113. package/{text/manager.js → text-manager/text-manager.js} +2 -2
  114. package/database/manager.d.ts +0 -41
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Static
4
+ * @description Author Only
5
+ */
6
+ import { IMBRICATE_STATIC_FEATURE } from "../feature";
7
+ import { IImbricateStatic } from "../interface";
8
+ import { ImbricateStaticGetContentOutcome } from "../outcome";
9
+ import { ImbricateStaticFullFeatureBase } from "./full-feature";
10
+ export declare abstract class ImbricateStaticAuthorOnlyBase extends ImbricateStaticFullFeatureBase implements IImbricateStatic {
11
+ readonly features: IMBRICATE_STATIC_FEATURE[];
12
+ getContentInBase64(): PromiseLike<ImbricateStaticGetContentOutcome<string>>;
13
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Static
5
+ * @description Author Only
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateStaticAuthorOnlyBase = void 0;
9
+ const feature_not_supported_1 = require("../../error/static/feature-not-supported");
10
+ const feature_1 = require("../feature");
11
+ const full_feature_1 = require("./full-feature");
12
+ class ImbricateStaticAuthorOnlyBase extends full_feature_1.ImbricateStaticFullFeatureBase {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.features = [
16
+ feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_AUTHOR,
17
+ ];
18
+ }
19
+ getContentInBase64() {
20
+ throw feature_not_supported_1.ImbricateStaticFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_CONTENT);
21
+ }
22
+ }
23
+ exports.ImbricateStaticAuthorOnlyBase = ImbricateStaticAuthorOnlyBase;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Static
4
+ * @description Content Only
5
+ */
6
+ import { ImbricateAuthor } from "../../author/definition";
7
+ import { IMBRICATE_STATIC_FEATURE } from "../feature";
8
+ import { ImbricateStaticFullFeatureBase } from "./full-feature";
9
+ export declare abstract class ImbricateStaticContentOnlyBase extends ImbricateStaticFullFeatureBase {
10
+ readonly features: IMBRICATE_STATIC_FEATURE[];
11
+ get author(): ImbricateAuthor;
12
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Static
5
+ * @description Content Only
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateStaticContentOnlyBase = void 0;
9
+ const feature_not_supported_1 = require("../../error/static/feature-not-supported");
10
+ const feature_1 = require("../feature");
11
+ const full_feature_1 = require("./full-feature");
12
+ class ImbricateStaticContentOnlyBase extends full_feature_1.ImbricateStaticFullFeatureBase {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.features = [
16
+ feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_CONTENT,
17
+ ];
18
+ }
19
+ get author() {
20
+ throw feature_not_supported_1.ImbricateStaticFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_AUTHOR);
21
+ }
22
+ }
23
+ exports.ImbricateStaticContentOnlyBase = ImbricateStaticContentOnlyBase;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Static
4
+ * @description Base Class
5
+ */
6
+ import { ImbricateAuthor } from "../../author/definition";
7
+ import { IMBRICATE_STATIC_FEATURE } from "../feature";
8
+ import { IImbricateStatic } from "../interface";
9
+ import { ImbricateStaticGetContentOutcome } from "../outcome";
10
+ export declare abstract class ImbricateStaticFullFeatureBase implements IImbricateStatic {
11
+ abstract readonly uniqueIdentifier: string;
12
+ readonly features: IMBRICATE_STATIC_FEATURE[];
13
+ abstract readonly author: ImbricateAuthor;
14
+ abstract getContentInBase64(): PromiseLike<ImbricateStaticGetContentOutcome<string>>;
15
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Static
5
+ * @description Base Class
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateStaticFullFeatureBase = void 0;
9
+ const feature_1 = require("../feature");
10
+ class ImbricateStaticFullFeatureBase {
11
+ constructor() {
12
+ this.features = [
13
+ feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_AUTHOR,
14
+ feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_CONTENT,
15
+ ];
16
+ }
17
+ }
18
+ exports.ImbricateStaticFullFeatureBase = ImbricateStaticFullFeatureBase;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Static
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";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Static
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 Static
4
+ * @description Feature
5
+ */
6
+ export declare enum IMBRICATE_STATIC_FEATURE {
7
+ STATIC_GET_AUTHOR = "STATIC_GET_AUTHOR",
8
+ STATIC_GET_CONTENT = "STATIC_GET_CONTENT"
9
+ }
10
+ export declare const checkImbricateStaticFeatureSupported: (features: IMBRICATE_STATIC_FEATURE[], feature: IMBRICATE_STATIC_FEATURE) => boolean;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Static
5
+ * @description Feature
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.checkImbricateStaticFeatureSupported = exports.IMBRICATE_STATIC_FEATURE = void 0;
9
+ var IMBRICATE_STATIC_FEATURE;
10
+ (function (IMBRICATE_STATIC_FEATURE) {
11
+ IMBRICATE_STATIC_FEATURE["STATIC_GET_AUTHOR"] = "STATIC_GET_AUTHOR";
12
+ IMBRICATE_STATIC_FEATURE["STATIC_GET_CONTENT"] = "STATIC_GET_CONTENT";
13
+ })(IMBRICATE_STATIC_FEATURE || (exports.IMBRICATE_STATIC_FEATURE = IMBRICATE_STATIC_FEATURE = {}));
14
+ const checkImbricateStaticFeatureSupported = (features, feature) => {
15
+ return features.includes(feature);
16
+ };
17
+ exports.checkImbricateStaticFeatureSupported = checkImbricateStaticFeatureSupported;
@@ -4,19 +4,26 @@
4
4
  * @description Interface
5
5
  */
6
6
  import { ImbricateAuthor } from "../author/definition";
7
+ import { IMBRICATE_STATIC_FEATURE } from "./feature";
8
+ import { ImbricateStaticGetContentOutcome } from "./outcome";
7
9
  export interface IImbricateStatic {
8
10
  /**
9
11
  * Unique identifier of the static object
10
12
  */
11
13
  readonly uniqueIdentifier: string;
14
+ /**
15
+ * Features supported by the static object
16
+ */
17
+ readonly features: IMBRICATE_STATIC_FEATURE[];
12
18
  /**
13
19
  * Author of the text object
14
20
  */
15
- readonly author?: ImbricateAuthor;
21
+ readonly author: ImbricateAuthor;
16
22
  /**
17
23
  * Get the content of the static object
18
24
  *
19
25
  * @returns a promise of the content of the text, encoded in base64
26
+ * Symbol: S_Static_GetContent_NotFound - if the content is not found
20
27
  */
21
- getContentInBase64(): PromiseLike<string>;
28
+ getContentInBase64(): PromiseLike<ImbricateStaticGetContentOutcome<string>>;
22
29
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Static
4
+ * @description Outcome
5
+ */
6
+ export declare const S_Static_GetContent_NotFound: unique symbol;
7
+ export type ImbricateStaticGetContentOutcomeSymbol = typeof S_Static_GetContent_NotFound;
8
+ export type ImbricateStaticGetContentOutcome<ContentFormat> = {
9
+ readonly content: ContentFormat;
10
+ } | ImbricateStaticGetContentOutcomeSymbol;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Static
5
+ * @description Outcome
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.S_Static_GetContent_NotFound = void 0;
9
+ // Get Content
10
+ exports.S_Static_GetContent_NotFound = Symbol("Static_GetContent_NotFound");
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace StaticManager
4
+ * @description Full Feature
5
+ */
6
+ import { ImbricateStaticAuditOptions } from "../../static/definition";
7
+ import { IMBRICATE_STATIC_MANAGER_FEATURE } from "../feature";
8
+ import { ImbricateStaticManagerCreateStaticOutcome, ImbricateStaticManagerGetStaticOutcome } from "../outcome";
9
+ import { IImbricateStaticManager } from "../static-manager";
10
+ export declare abstract class ImbricateStaticManagerFullFeatureBase implements IImbricateStaticManager {
11
+ readonly supportedFeatures: IMBRICATE_STATIC_MANAGER_FEATURE[];
12
+ abstract getStatic(uniqueIdentifier: string): PromiseLike<ImbricateStaticManagerGetStaticOutcome>;
13
+ abstract createInBase64(content: string, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
14
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace StaticManager
5
+ * @description Full Feature
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateStaticManagerFullFeatureBase = void 0;
9
+ const feature_1 = require("../feature");
10
+ class ImbricateStaticManagerFullFeatureBase {
11
+ constructor() {
12
+ this.supportedFeatures = [
13
+ feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_GET_STATIC,
14
+ feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_CREATE_STATIC,
15
+ ];
16
+ }
17
+ }
18
+ exports.ImbricateStaticManagerFullFeatureBase = ImbricateStaticManagerFullFeatureBase;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace StaticManager
4
+ * @description Readonly
5
+ */
6
+ import { ImbricateStaticAuditOptions } from "../../static/definition";
7
+ import { IMBRICATE_STATIC_MANAGER_FEATURE } from "../feature";
8
+ import { ImbricateStaticManagerCreateStaticOutcome } from "../outcome";
9
+ import { IImbricateStaticManager } from "../static-manager";
10
+ import { ImbricateStaticManagerFullFeatureBase } from "./full-feature";
11
+ export declare abstract class ImbricateStaticManagerReadonlyBase extends ImbricateStaticManagerFullFeatureBase implements IImbricateStaticManager {
12
+ readonly supportedFeatures: IMBRICATE_STATIC_MANAGER_FEATURE[];
13
+ createInBase64(_content: string, _auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
14
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace StaticManager
5
+ * @description Readonly
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateStaticManagerReadonlyBase = void 0;
9
+ const feature_not_supported_1 = require("../../error/static-manager/feature-not-supported");
10
+ const feature_1 = require("../feature");
11
+ const full_feature_1 = require("./full-feature");
12
+ class ImbricateStaticManagerReadonlyBase extends full_feature_1.ImbricateStaticManagerFullFeatureBase {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.supportedFeatures = [
16
+ feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_GET_STATIC,
17
+ ];
18
+ }
19
+ createInBase64(_content, _auditOptions) {
20
+ throw feature_not_supported_1.ImbricateStaticManagerFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_CREATE_STATIC);
21
+ }
22
+ }
23
+ exports.ImbricateStaticManagerReadonlyBase = ImbricateStaticManagerReadonlyBase;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace StaticManager
4
+ * @description Export
5
+ */
6
+ export * from "./base-class/full-feature";
7
+ export * from "./base-class/readonly";
8
+ export * from "./feature";
9
+ export * from "./outcome";
10
+ export * from "./static-manager";
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace StaticManager
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("./static-manager"), exports);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace StaticManager
4
+ * @description Feature
5
+ */
6
+ export declare enum IMBRICATE_STATIC_MANAGER_FEATURE {
7
+ STATIC_MANAGER_GET_STATIC = "STATIC_MANAGER_GET_STATIC",
8
+ STATIC_MANAGER_CREATE_STATIC = "STATIC_MANAGER_CREATE_STATIC"
9
+ }
10
+ export declare const checkImbricateStaticManagerFeatureSupported: (features: IMBRICATE_STATIC_MANAGER_FEATURE[], feature: IMBRICATE_STATIC_MANAGER_FEATURE) => boolean;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace StaticManager
5
+ * @description Feature
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.checkImbricateStaticManagerFeatureSupported = exports.IMBRICATE_STATIC_MANAGER_FEATURE = void 0;
9
+ var IMBRICATE_STATIC_MANAGER_FEATURE;
10
+ (function (IMBRICATE_STATIC_MANAGER_FEATURE) {
11
+ IMBRICATE_STATIC_MANAGER_FEATURE["STATIC_MANAGER_GET_STATIC"] = "STATIC_MANAGER_GET_STATIC";
12
+ IMBRICATE_STATIC_MANAGER_FEATURE["STATIC_MANAGER_CREATE_STATIC"] = "STATIC_MANAGER_CREATE_STATIC";
13
+ })(IMBRICATE_STATIC_MANAGER_FEATURE || (exports.IMBRICATE_STATIC_MANAGER_FEATURE = IMBRICATE_STATIC_MANAGER_FEATURE = {}));
14
+ const checkImbricateStaticManagerFeatureSupported = (features, feature) => {
15
+ return features.includes(feature);
16
+ };
17
+ exports.checkImbricateStaticManagerFeatureSupported = checkImbricateStaticManagerFeatureSupported;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace StaticManager
4
+ * @description Outcome
5
+ */
6
+ import { IImbricateStatic } from "../static/interface";
7
+ export declare const S_StaticManager_GetStatic_NotFound: unique symbol;
8
+ export type ImbricateStaticManagerGetStaticOutcomeSymbol = typeof S_StaticManager_GetStatic_NotFound;
9
+ export type ImbricateStaticManagerGetStaticOutcome = {
10
+ readonly static: IImbricateStatic;
11
+ } | ImbricateStaticManagerGetStaticOutcomeSymbol;
12
+ export declare const S_StaticManager_CreateStatic_IdentifierDuplicated: unique symbol;
13
+ export type ImbricateStaticManagerCreateStaticOutcomeSymbol = typeof S_StaticManager_CreateStatic_IdentifierDuplicated;
14
+ export type ImbricateStaticManagerCreateStaticOutcome = {
15
+ readonly static: IImbricateStatic;
16
+ } | ImbricateStaticManagerCreateStaticOutcomeSymbol;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace StaticManager
5
+ * @description Outcome
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.S_StaticManager_CreateStatic_IdentifierDuplicated = exports.S_StaticManager_GetStatic_NotFound = void 0;
9
+ // Manager Get Static
10
+ exports.S_StaticManager_GetStatic_NotFound = Symbol("StaticManager_GetStatic_NotFound");
11
+ // Manager Create Static
12
+ exports.S_StaticManager_CreateStatic_IdentifierDuplicated = Symbol("StaticManager_CreateStatic_IdentifierDuplicated");
@@ -1,17 +1,18 @@
1
1
  /**
2
2
  * @author WMXPY
3
- * @namespace Static
4
- * @description Manager
3
+ * @namespace StaticManager
4
+ * @description Static Manager
5
5
  */
6
- import { ImbricateStaticAuditOptions } from "./definition";
7
- import { IImbricateStatic } from "./interface";
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<IImbricateStatic | null>;
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<IImbricateStatic>;
27
+ createInBase64(content: string, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
26
28
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * @author WMXPY
4
- * @namespace Database
5
- * @description Manager
4
+ * @namespace StaticManager
5
+ * @description Static Manager
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -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;
@@ -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;
@@ -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;