@imbricate/core 3.24.4 → 3.25.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/package.json +1 -1
- package/static/base-class/full-feature.d.ts +2 -0
- package/static/definition.d.ts +11 -0
- package/static/definition.js +13 -0
- package/static/interface.d.ts +5 -0
- package/static-manager/base-class/full-feature.d.ts +2 -2
- package/static-manager/base-class/readonly.d.ts +2 -2
- package/static-manager/base-class/readonly.js +1 -1
- package/static-manager/static-manager.d.ts +3 -2
package/package.json
CHANGED
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
* @description Base Class
|
|
5
5
|
*/
|
|
6
6
|
import { ImbricateAuthor } from "../../author/definition";
|
|
7
|
+
import { IMBRICATE_STATIC_MIME_TYPE } from "../definition";
|
|
7
8
|
import { IMBRICATE_STATIC_FEATURE } from "../feature";
|
|
8
9
|
import { IImbricateStatic } from "../interface";
|
|
9
10
|
import { ImbricateStaticGetContentOutcome } from "../outcome";
|
|
10
11
|
export declare abstract class ImbricateStaticFullFeatureBase implements IImbricateStatic {
|
|
11
12
|
abstract readonly uniqueIdentifier: string;
|
|
13
|
+
abstract readonly mimeType: IMBRICATE_STATIC_MIME_TYPE;
|
|
12
14
|
readonly supportedFeatures: IMBRICATE_STATIC_FEATURE[];
|
|
13
15
|
abstract readonly author: ImbricateAuthor;
|
|
14
16
|
abstract getContentInBase64(): PromiseLike<ImbricateStaticGetContentOutcome<string>>;
|
package/static/definition.d.ts
CHANGED
|
@@ -10,3 +10,14 @@ export type ImbricateStaticAuditOptions = {
|
|
|
10
10
|
*/
|
|
11
11
|
readonly author?: ImbricateAuthor;
|
|
12
12
|
};
|
|
13
|
+
export declare enum IMBRICATE_STATIC_MIME_TYPE {
|
|
14
|
+
IMAGE_PNG = "image/png",
|
|
15
|
+
IMAGE_JPEG = "image/jpeg",
|
|
16
|
+
IMAGE_GIF = "image/gif",
|
|
17
|
+
IMAGE_WEBP = "image/webp",
|
|
18
|
+
VIDEO_MP4 = "video/mp4",
|
|
19
|
+
VIDEO_WEBM = "video/webm",
|
|
20
|
+
AUDIO_MP3 = "audio/mpeg",
|
|
21
|
+
AUDIO_WAV = "audio/wav",
|
|
22
|
+
TEXT_PLAIN = "text/plain"
|
|
23
|
+
}
|
package/static/definition.js
CHANGED
|
@@ -5,3 +5,16 @@
|
|
|
5
5
|
* @description Definition
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.IMBRICATE_STATIC_MIME_TYPE = void 0;
|
|
9
|
+
var IMBRICATE_STATIC_MIME_TYPE;
|
|
10
|
+
(function (IMBRICATE_STATIC_MIME_TYPE) {
|
|
11
|
+
IMBRICATE_STATIC_MIME_TYPE["IMAGE_PNG"] = "image/png";
|
|
12
|
+
IMBRICATE_STATIC_MIME_TYPE["IMAGE_JPEG"] = "image/jpeg";
|
|
13
|
+
IMBRICATE_STATIC_MIME_TYPE["IMAGE_GIF"] = "image/gif";
|
|
14
|
+
IMBRICATE_STATIC_MIME_TYPE["IMAGE_WEBP"] = "image/webp";
|
|
15
|
+
IMBRICATE_STATIC_MIME_TYPE["VIDEO_MP4"] = "video/mp4";
|
|
16
|
+
IMBRICATE_STATIC_MIME_TYPE["VIDEO_WEBM"] = "video/webm";
|
|
17
|
+
IMBRICATE_STATIC_MIME_TYPE["AUDIO_MP3"] = "audio/mpeg";
|
|
18
|
+
IMBRICATE_STATIC_MIME_TYPE["AUDIO_WAV"] = "audio/wav";
|
|
19
|
+
IMBRICATE_STATIC_MIME_TYPE["TEXT_PLAIN"] = "text/plain";
|
|
20
|
+
})(IMBRICATE_STATIC_MIME_TYPE || (exports.IMBRICATE_STATIC_MIME_TYPE = IMBRICATE_STATIC_MIME_TYPE = {}));
|
package/static/interface.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
6
|
import { ImbricateAuthor } from "../author/definition";
|
|
7
|
+
import { IMBRICATE_STATIC_MIME_TYPE } from "./definition";
|
|
7
8
|
import { IMBRICATE_STATIC_FEATURE } from "./feature";
|
|
8
9
|
import { ImbricateStaticGetContentOutcome } from "./outcome";
|
|
9
10
|
export interface IImbricateStatic {
|
|
@@ -11,6 +12,10 @@ export interface IImbricateStatic {
|
|
|
11
12
|
* Unique identifier of the static object
|
|
12
13
|
*/
|
|
13
14
|
readonly uniqueIdentifier: string;
|
|
15
|
+
/**
|
|
16
|
+
* Mime type of the static object
|
|
17
|
+
*/
|
|
18
|
+
readonly mimeType: IMBRICATE_STATIC_MIME_TYPE;
|
|
14
19
|
/**
|
|
15
20
|
* Features supported by the static object
|
|
16
21
|
*/
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* @namespace StaticManager
|
|
4
4
|
* @description Full Feature
|
|
5
5
|
*/
|
|
6
|
-
import { ImbricateStaticAuditOptions } from "../../static/definition";
|
|
6
|
+
import { IMBRICATE_STATIC_MIME_TYPE, ImbricateStaticAuditOptions } from "../../static/definition";
|
|
7
7
|
import { IMBRICATE_STATIC_MANAGER_FEATURE } from "../feature";
|
|
8
8
|
import { ImbricateStaticManagerCreateStaticOutcome, ImbricateStaticManagerGetStaticOutcome } from "../outcome";
|
|
9
9
|
import { IImbricateStaticManager } from "../static-manager";
|
|
10
10
|
export declare abstract class ImbricateStaticManagerFullFeatureBase implements IImbricateStaticManager {
|
|
11
11
|
readonly supportedFeatures: IMBRICATE_STATIC_MANAGER_FEATURE[];
|
|
12
12
|
abstract getStatic(uniqueIdentifier: string): PromiseLike<ImbricateStaticManagerGetStaticOutcome>;
|
|
13
|
-
abstract createInBase64(content: string, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
13
|
+
abstract createInBase64(content: string, mimeType: IMBRICATE_STATIC_MIME_TYPE, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
14
14
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* @namespace StaticManager
|
|
4
4
|
* @description Readonly
|
|
5
5
|
*/
|
|
6
|
-
import { ImbricateStaticAuditOptions } from "../../static/definition";
|
|
6
|
+
import { IMBRICATE_STATIC_MIME_TYPE, ImbricateStaticAuditOptions } from "../../static/definition";
|
|
7
7
|
import { IMBRICATE_STATIC_MANAGER_FEATURE } from "../feature";
|
|
8
8
|
import { ImbricateStaticManagerCreateStaticOutcome } from "../outcome";
|
|
9
9
|
import { IImbricateStaticManager } from "../static-manager";
|
|
10
10
|
import { ImbricateStaticManagerFullFeatureBase } from "./full-feature";
|
|
11
11
|
export declare abstract class ImbricateStaticManagerReadonlyBase extends ImbricateStaticManagerFullFeatureBase implements IImbricateStaticManager {
|
|
12
12
|
readonly supportedFeatures: IMBRICATE_STATIC_MANAGER_FEATURE[];
|
|
13
|
-
createInBase64(_content: string, _auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
13
|
+
createInBase64(_content: string, _mimeType: IMBRICATE_STATIC_MIME_TYPE, _auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
14
14
|
}
|
|
@@ -16,7 +16,7 @@ class ImbricateStaticManagerReadonlyBase extends full_feature_1.ImbricateStaticM
|
|
|
16
16
|
feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_GET_STATIC,
|
|
17
17
|
];
|
|
18
18
|
}
|
|
19
|
-
createInBase64(_content, _auditOptions) {
|
|
19
|
+
createInBase64(_content, _mimeType, _auditOptions) {
|
|
20
20
|
throw feature_not_supported_1.ImbricateStaticManagerFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_CREATE_STATIC);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @namespace StaticManager
|
|
4
4
|
* @description Static Manager
|
|
5
5
|
*/
|
|
6
|
-
import { ImbricateStaticAuditOptions } from "../static/definition";
|
|
6
|
+
import { IMBRICATE_STATIC_MIME_TYPE, ImbricateStaticAuditOptions } from "../static/definition";
|
|
7
7
|
import { ImbricateStaticManagerCreateStaticOutcome, ImbricateStaticManagerGetStaticOutcome } from "./outcome";
|
|
8
8
|
export interface IImbricateStaticManager {
|
|
9
9
|
/**
|
|
@@ -19,10 +19,11 @@ export interface IImbricateStaticManager {
|
|
|
19
19
|
* Patch a new static object if you want to change the content
|
|
20
20
|
*
|
|
21
21
|
* @param content content of the static object, encoded in base64
|
|
22
|
+
* @param mimeType mime type of the static object
|
|
22
23
|
* @param auditOptions audit options of the static object
|
|
23
24
|
*
|
|
24
25
|
* @returns a promise of the created static object
|
|
25
26
|
* Symbol: S_StaticManager_CreateStatic_IdentifierDuplicated - if the identifier is duplicated
|
|
26
27
|
*/
|
|
27
|
-
createInBase64(content: string, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
28
|
+
createInBase64(content: string, mimeType: IMBRICATE_STATIC_MIME_TYPE, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
28
29
|
}
|