@imbricate/core 1.18.2 → 1.19.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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace BinaryStorage
|
|
4
|
+
* @description Definition
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateCapability } from "../capability/definition";
|
|
7
|
+
export type ImbricateBinaryStorageCapability = Record<IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY, ImbricateCapability>;
|
|
8
|
+
export declare enum IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY {
|
|
9
|
+
UPLOAD_FILE = "imbricate.binary.storage.upload"
|
|
10
|
+
}
|
|
11
|
+
export declare const createAllAllowImbricateBinaryStorageCapability: () => ImbricateBinaryStorageCapability;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace BinaryStorage
|
|
5
|
+
* @description Definition
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.createAllAllowImbricateBinaryStorageCapability = exports.IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY = void 0;
|
|
9
|
+
const definition_1 = require("../capability/definition");
|
|
10
|
+
var IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY;
|
|
11
|
+
(function (IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY) {
|
|
12
|
+
IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY["UPLOAD_FILE"] = "imbricate.binary.storage.upload";
|
|
13
|
+
})(IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY || (exports.IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY = IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY = {}));
|
|
14
|
+
const createAllAllowImbricateBinaryStorageCapability = () => {
|
|
15
|
+
return {
|
|
16
|
+
[IMBRICATE_BINARY_STORAGE_CAPABILITY_KEY.UPLOAD_FILE]: {
|
|
17
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.createAllAllowImbricateBinaryStorageCapability = createAllAllowImbricateBinaryStorageCapability;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -18,6 +18,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
__exportStar(require("./binary-storage/definition"), exports);
|
|
22
|
+
__exportStar(require("./binary-storage/interface"), exports);
|
|
21
23
|
__exportStar(require("./capability/definition"), exports);
|
|
22
24
|
__exportStar(require("./capability/validate"), exports);
|
|
23
25
|
__exportStar(require("./collection/definition"), exports);
|
package/origin/interface.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @namespace Origin
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
|
+
import { IImbricateBinaryStorage } from "../binary-storage/interface";
|
|
6
7
|
import { IImbricateOriginCollection } from "../collection/interface";
|
|
7
8
|
import { PromiseOr } from "../definition/promise";
|
|
8
9
|
import { IImbricateFunctionManager } from "../function/interface";
|
|
@@ -17,6 +18,7 @@ export interface IImbricateOrigin {
|
|
|
17
18
|
readonly payloads: Record<string, any>;
|
|
18
19
|
readonly capabilities: ImbricateOriginCapability;
|
|
19
20
|
getFunctionManger(): IImbricateFunctionManager;
|
|
21
|
+
getBinaryStorage(): IImbricateBinaryStorage;
|
|
20
22
|
createCollection(collectionName: string, description?: string): PromiseOr<void>;
|
|
21
23
|
renameCollection(collectionUniqueIdentifier: string, newCollectionName: string): PromiseOr<void>;
|
|
22
24
|
deleteCollection(collectionUniqueIdentifier: string): PromiseOr<void>;
|