@webiny/api-file-manager-ddb 0.0.0-mt-3 → 0.0.0-unstable.06b2ede40f
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/index.d.ts +9 -5
- package/index.js +52 -10
- package/index.js.map +1 -0
- package/operations/AliasesStorageOperations.d.ts +16 -0
- package/operations/AliasesStorageOperations.js +103 -0
- package/operations/AliasesStorageOperations.js.map +1 -0
- package/operations/FilesStorageOperations.d.ts +15 -0
- package/operations/FilesStorageOperations.js +37 -0
- package/operations/FilesStorageOperations.js.map +1 -0
- package/operations/SettingsStorageOperations.d.ts +14 -0
- package/operations/SettingsStorageOperations.js +101 -0
- package/operations/SettingsStorageOperations.js.map +1 -0
- package/operations/SystemStorageOperations.d.ts +13 -0
- package/operations/SystemStorageOperations.js +93 -0
- package/operations/SystemStorageOperations.js.map +1 -0
- package/package.json +17 -27
- package/plugins/SettingsAttributePlugin.d.ts +3 -2
- package/plugins/SettingsAttributePlugin.js +6 -15
- package/plugins/SettingsAttributePlugin.js.map +1 -0
- package/plugins/SystemAttributePlugin.d.ts +3 -2
- package/plugins/SystemAttributePlugin.js +5 -14
- package/plugins/SystemAttributePlugin.js.map +1 -0
- package/plugins/index.d.ts +2 -0
- package/plugins/index.js +29 -0
- package/plugins/index.js.map +1 -0
- package/definitions/filesEntity.d.ts +0 -7
- package/definitions/filesEntity.js +0 -80
- package/definitions/settingsEntity.d.ts +0 -7
- package/definitions/settingsEntity.js +0 -56
- package/definitions/systemEntity.d.ts +0 -7
- package/definitions/systemEntity.js +0 -44
- package/definitions/table.d.ts +0 -6
- package/definitions/table.js +0 -28
- package/operations/configurations.d.ts +0 -14
- package/operations/configurations.js +0 -22
- package/operations/files/FilesStorageOperations.d.ts +0 -22
- package/operations/files/FilesStorageOperations.js +0 -345
- package/operations/files/fields.d.ts +0 -3
- package/operations/files/fields.js +0 -42
- package/operations/files/index.d.ts +0 -6
- package/operations/files/index.js +0 -35
- package/operations/settings/SettingsStorageOperations.d.ts +0 -15
- package/operations/settings/SettingsStorageOperations.js +0 -120
- package/operations/settings/index.d.ts +0 -8
- package/operations/settings/index.js +0 -32
- package/operations/system/SystemStorageOperations.d.ts +0 -14
- package/operations/system/SystemStorageOperations.js +0 -108
- package/operations/system/index.d.ts +0 -8
- package/operations/system/index.js +0 -32
- package/operations/utils.d.ts +0 -4
- package/operations/utils.js +0 -36
- package/plugins/FileAttributePlugin.d.ts +0 -4
- package/plugins/FileAttributePlugin.js +0 -27
- package/plugins/FileDynamoDbFieldPlugin.d.ts +0 -4
- package/plugins/FileDynamoDbFieldPlugin.js +0 -17
- package/types.d.ts +0 -0
- package/types.js +0 -1
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.SettingsAttributePlugin = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
7
|
var _AttributePlugin = require("@webiny/db-dynamodb/plugins/definitions/AttributePlugin");
|
|
13
|
-
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
17
|
-
|
|
18
8
|
class SettingsAttributePlugin extends _AttributePlugin.AttributePlugin {
|
|
19
9
|
constructor(params) {
|
|
20
|
-
super(
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
super({
|
|
11
|
+
...params,
|
|
12
|
+
entity: "FM.Settings"
|
|
13
|
+
});
|
|
23
14
|
}
|
|
24
|
-
|
|
25
15
|
}
|
|
16
|
+
exports.SettingsAttributePlugin = SettingsAttributePlugin;
|
|
26
17
|
|
|
27
|
-
|
|
18
|
+
//# sourceMappingURL=SettingsAttributePlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_AttributePlugin","require","SettingsAttributePlugin","AttributePlugin","constructor","params","entity","exports"],"sources":["SettingsAttributePlugin.ts"],"sourcesContent":["import type { AttributePluginParams } from \"@webiny/db-dynamodb/plugins/definitions/AttributePlugin\";\nimport { AttributePlugin } from \"@webiny/db-dynamodb/plugins/definitions/AttributePlugin\";\n\nexport class SettingsAttributePlugin extends AttributePlugin {\n public constructor(params: Omit<AttributePluginParams, \"entity\">) {\n super({\n ...params,\n entity: \"FM.Settings\"\n });\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAEO,MAAMC,uBAAuB,SAASC,gCAAe,CAAC;EAClDC,WAAWA,CAACC,MAA6C,EAAE;IAC9D,KAAK,CAAC;MACF,GAAGA,MAAM;MACTC,MAAM,EAAE;IACZ,CAAC,CAAC;EACN;AACJ;AAACC,OAAA,CAAAL,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AttributePluginParams } from "@webiny/db-dynamodb/plugins/definitions/AttributePlugin";
|
|
2
|
+
import { AttributePlugin } from "@webiny/db-dynamodb/plugins/definitions/AttributePlugin";
|
|
2
3
|
export declare class SystemAttributePlugin extends AttributePlugin {
|
|
3
|
-
constructor(params: Omit<
|
|
4
|
+
constructor(params: Omit<AttributePluginParams, "entity">);
|
|
4
5
|
}
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.SystemAttributePlugin = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
7
|
var _AttributePlugin = require("@webiny/db-dynamodb/plugins/definitions/AttributePlugin");
|
|
13
|
-
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
17
|
-
|
|
18
8
|
class SystemAttributePlugin extends _AttributePlugin.AttributePlugin {
|
|
19
9
|
constructor(params) {
|
|
20
|
-
super(
|
|
10
|
+
super({
|
|
11
|
+
...params,
|
|
21
12
|
entity: "System"
|
|
22
|
-
})
|
|
13
|
+
});
|
|
23
14
|
}
|
|
24
|
-
|
|
25
15
|
}
|
|
16
|
+
exports.SystemAttributePlugin = SystemAttributePlugin;
|
|
26
17
|
|
|
27
|
-
|
|
18
|
+
//# sourceMappingURL=SystemAttributePlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_AttributePlugin","require","SystemAttributePlugin","AttributePlugin","constructor","params","entity","exports"],"sources":["SystemAttributePlugin.ts"],"sourcesContent":["import type { AttributePluginParams } from \"@webiny/db-dynamodb/plugins/definitions/AttributePlugin\";\nimport { AttributePlugin } from \"@webiny/db-dynamodb/plugins/definitions/AttributePlugin\";\n\nexport class SystemAttributePlugin extends AttributePlugin {\n public constructor(params: Omit<AttributePluginParams, \"entity\">) {\n super({\n ...params,\n entity: \"System\"\n });\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAEO,MAAMC,qBAAqB,SAASC,gCAAe,CAAC;EAChDC,WAAWA,CAACC,MAA6C,EAAE;IAC9D,KAAK,CAAC;MACF,GAAGA,MAAM;MACTC,MAAM,EAAE;IACZ,CAAC,CAAC;EACN;AACJ;AAACC,OAAA,CAAAL,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
package/plugins/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _SettingsAttributePlugin = require("./SettingsAttributePlugin");
|
|
7
|
+
Object.keys(_SettingsAttributePlugin).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _SettingsAttributePlugin[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _SettingsAttributePlugin[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _SystemAttributePlugin = require("./SystemAttributePlugin");
|
|
18
|
+
Object.keys(_SystemAttributePlugin).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _SystemAttributePlugin[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _SystemAttributePlugin[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_SettingsAttributePlugin","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_SystemAttributePlugin"],"sources":["index.ts"],"sourcesContent":["export * from \"./SettingsAttributePlugin\";\nexport * from \"./SystemAttributePlugin\";\n"],"mappings":";;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,wBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,wBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,wBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,sBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,sBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,sBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,sBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
var _attributes = require("@webiny/db-dynamodb/utils/attributes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
var _default = params => {
|
|
21
|
-
const {
|
|
22
|
-
context,
|
|
23
|
-
table
|
|
24
|
-
} = params;
|
|
25
|
-
const entityName = "Files";
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
|
-
return new _dynamodbToolbox.Entity({
|
|
28
|
-
name: entityName,
|
|
29
|
-
table,
|
|
30
|
-
attributes: _objectSpread({
|
|
31
|
-
PK: {
|
|
32
|
-
partitionKey: true
|
|
33
|
-
},
|
|
34
|
-
SK: {
|
|
35
|
-
sortKey: true
|
|
36
|
-
},
|
|
37
|
-
TYPE: {
|
|
38
|
-
type: "string"
|
|
39
|
-
},
|
|
40
|
-
id: {
|
|
41
|
-
type: "string"
|
|
42
|
-
},
|
|
43
|
-
key: {
|
|
44
|
-
type: "string"
|
|
45
|
-
},
|
|
46
|
-
size: {
|
|
47
|
-
type: "number"
|
|
48
|
-
},
|
|
49
|
-
type: {
|
|
50
|
-
type: "string"
|
|
51
|
-
},
|
|
52
|
-
name: {
|
|
53
|
-
type: "string"
|
|
54
|
-
},
|
|
55
|
-
meta: {
|
|
56
|
-
type: "map"
|
|
57
|
-
},
|
|
58
|
-
tags: {
|
|
59
|
-
type: "list"
|
|
60
|
-
},
|
|
61
|
-
createdOn: {
|
|
62
|
-
type: "string"
|
|
63
|
-
},
|
|
64
|
-
createdBy: {
|
|
65
|
-
type: "map"
|
|
66
|
-
},
|
|
67
|
-
tenant: {
|
|
68
|
-
type: "string"
|
|
69
|
-
},
|
|
70
|
-
locale: {
|
|
71
|
-
type: "string"
|
|
72
|
-
},
|
|
73
|
-
webinyVersion: {
|
|
74
|
-
type: "string"
|
|
75
|
-
}
|
|
76
|
-
}, attributes)
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
exports.default = _default;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
var _attributes = require("@webiny/db-dynamodb/utils/attributes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
var _default = params => {
|
|
21
|
-
const {
|
|
22
|
-
context,
|
|
23
|
-
table
|
|
24
|
-
} = params;
|
|
25
|
-
const entityName = "Settings";
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
|
-
return new _dynamodbToolbox.Entity({
|
|
28
|
-
name: entityName,
|
|
29
|
-
table,
|
|
30
|
-
attributes: _objectSpread({
|
|
31
|
-
PK: {
|
|
32
|
-
partitionKey: true
|
|
33
|
-
},
|
|
34
|
-
SK: {
|
|
35
|
-
sortKey: true
|
|
36
|
-
},
|
|
37
|
-
TYPE: {
|
|
38
|
-
type: "string"
|
|
39
|
-
},
|
|
40
|
-
key: {
|
|
41
|
-
type: "string"
|
|
42
|
-
},
|
|
43
|
-
uploadMinFileSize: {
|
|
44
|
-
type: "number"
|
|
45
|
-
},
|
|
46
|
-
uploadMaxFileSize: {
|
|
47
|
-
type: "number"
|
|
48
|
-
},
|
|
49
|
-
srcPrefix: {
|
|
50
|
-
type: "string"
|
|
51
|
-
}
|
|
52
|
-
}, attributes)
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports.default = _default;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
var _attributes = require("@webiny/db-dynamodb/utils/attributes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
var _default = params => {
|
|
21
|
-
const {
|
|
22
|
-
context,
|
|
23
|
-
table
|
|
24
|
-
} = params;
|
|
25
|
-
const entityName = "System";
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
|
-
return new _dynamodbToolbox.Entity({
|
|
28
|
-
name: entityName,
|
|
29
|
-
table,
|
|
30
|
-
attributes: _objectSpread({
|
|
31
|
-
PK: {
|
|
32
|
-
partitionKey: true
|
|
33
|
-
},
|
|
34
|
-
SK: {
|
|
35
|
-
sortKey: true
|
|
36
|
-
},
|
|
37
|
-
version: {
|
|
38
|
-
type: "string"
|
|
39
|
-
}
|
|
40
|
-
}, attributes)
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
exports.default = _default;
|
package/definitions/table.d.ts
DELETED
package/definitions/table.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
11
|
-
|
|
12
|
-
var _configurations = _interopRequireDefault(require("../operations/configurations"));
|
|
13
|
-
|
|
14
|
-
var _utils = require("../operations/utils");
|
|
15
|
-
|
|
16
|
-
var _default = params => {
|
|
17
|
-
const {
|
|
18
|
-
context
|
|
19
|
-
} = params;
|
|
20
|
-
return new _dynamodbToolbox.Table({
|
|
21
|
-
name: _configurations.default.db().table || (0, _utils.getTable)(context),
|
|
22
|
-
partitionKey: "PK",
|
|
23
|
-
sortKey: "SK",
|
|
24
|
-
DocumentClient: (0, _utils.getDocumentClient)(context)
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
exports.default = _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = {
|
|
8
|
-
db: () => ({
|
|
9
|
-
table: process.env.DB_TABLE_FILE_MANGER || process.env.DB_TABLE,
|
|
10
|
-
keys: [{
|
|
11
|
-
primary: true,
|
|
12
|
-
unique: true,
|
|
13
|
-
name: "primary",
|
|
14
|
-
fields: [{
|
|
15
|
-
name: "PK"
|
|
16
|
-
}, {
|
|
17
|
-
name: "SK"
|
|
18
|
-
}]
|
|
19
|
-
}]
|
|
20
|
-
})
|
|
21
|
-
};
|
|
22
|
-
exports.default = _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { File, FileManagerContext, FileManagerFilesStorageOperations, FileManagerFilesStorageOperationsCreateBatchParams, FileManagerFilesStorageOperationsCreateParams, FileManagerFilesStorageOperationsDeleteParams, FileManagerFilesStorageOperationsGetParams, FileManagerFilesStorageOperationsListParams, FileManagerFilesStorageOperationsListResponse, FileManagerFilesStorageOperationsTagsParams, FileManagerFilesStorageOperationsTagsResponse, FileManagerFilesStorageOperationsUpdateParams } from "@webiny/api-file-manager/types";
|
|
2
|
-
interface ConstructorParams {
|
|
3
|
-
context: FileManagerContext;
|
|
4
|
-
}
|
|
5
|
-
export declare class FilesStorageOperations implements FileManagerFilesStorageOperations {
|
|
6
|
-
private readonly _context;
|
|
7
|
-
private readonly table;
|
|
8
|
-
private readonly entity;
|
|
9
|
-
private get context();
|
|
10
|
-
constructor({ context }: ConstructorParams);
|
|
11
|
-
get(params: FileManagerFilesStorageOperationsGetParams): Promise<File | null>;
|
|
12
|
-
create(params: FileManagerFilesStorageOperationsCreateParams): Promise<File>;
|
|
13
|
-
update(params: FileManagerFilesStorageOperationsUpdateParams): Promise<File>;
|
|
14
|
-
delete(params: FileManagerFilesStorageOperationsDeleteParams): Promise<void>;
|
|
15
|
-
createBatch(params: FileManagerFilesStorageOperationsCreateBatchParams): Promise<File[]>;
|
|
16
|
-
list(params: FileManagerFilesStorageOperationsListParams): Promise<FileManagerFilesStorageOperationsListResponse>;
|
|
17
|
-
tags(params: FileManagerFilesStorageOperationsTagsParams): Promise<FileManagerFilesStorageOperationsTagsResponse>;
|
|
18
|
-
private createQueryAllOptions;
|
|
19
|
-
private createPartitionKey;
|
|
20
|
-
private createSortKey;
|
|
21
|
-
}
|
|
22
|
-
export {};
|