@webiny/api-headless-cms-tasks-ddb-es 0.0.0-unstable.e53eceafb5

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Webiny
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # @webiny/api-headless-cms-tasks-ddb-es
2
+ [![](https://img.shields.io/npm/dw/@webiny/api-headless-cms-tasks-ddb-es.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-tasks-ddb-es)
3
+ [![](https://img.shields.io/npm/v/@webiny/api-headless-cms-tasks-ddb-es.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-tasks-ddb-es)
4
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
5
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
6
+
7
+ ## Install
8
+ ```
9
+ npm install --save @webiny/api-headless-cms-tasks-ddb-es
10
+ ```
11
+
12
+ Or if you prefer yarn:
13
+ ```
14
+ yarn add @webiny/api-headless-cms-tasks-ddb-es
15
+ ```
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const createHcmsTasks: () => (import("@webiny/tasks").TaskDefinitionPlugin<import("@webiny/api-headless-cms-bulk-actions/types").HcmsBulkActionsContext, import("@webiny/api-headless-cms-bulk-actions/types").IEmptyTrashBinsInput, import("@webiny/tasks").ITaskResponseDoneResultOutput> | (import("@webiny/api").ContextPlugin<import("@webiny/api-headless-cms-tasks/types").HcmsTasksContext> | import("@webiny/tasks").TaskDefinitionPlugin<import("@webiny/api-headless-cms-tasks/types").HcmsTasksContext, import("@webiny/api-headless-cms-tasks/tasks/deleteModel/types").IDeleteModelTaskInput, import("@webiny/api-headless-cms-tasks/tasks/deleteModel/types").IDeleteModelTaskOutput>)[] | (import("@webiny/api").ContextPlugin<import("@webiny/api-headless-cms-bulk-actions/types").HcmsBulkActionsContext> | (import("@webiny/handler-aws").EventBridgeEventHandler<"WebinyEmptyTrashBin", Record<string, any>, any> | import("@webiny/handler").HandlerOnRequestPlugin<import("@webiny/handler/types").Context>)[])[] | (import("@webiny/api").ContextPlugin<import("@webiny/api-headless-cms-bulk-actions/types").HcmsBulkActionsContext> | (import("@webiny/tasks").TaskDefinitionPlugin<import("@webiny/api-headless-cms-bulk-actions/types").HcmsBulkActionsContext, import("@webiny/api-headless-cms-bulk-actions/types").IBulkActionOperationByModelInput, import("@webiny/api-headless-cms-bulk-actions/types").IBulkActionOperationByModelOutput> | import("@webiny/tasks").TaskDefinitionPlugin<import("@webiny/api-headless-cms-bulk-actions/types").HcmsBulkActionsContext, import("@webiny/api-headless-cms-bulk-actions/types").IBulkActionOperationInput, import("@webiny/api-headless-cms-bulk-actions/types").IBulkActionOperationOutput>)[])[][] | import("@webiny/plugins/types").Plugin[])[];
package/index.js ADDED
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createHcmsTasks = void 0;
7
+ var _apiHeadlessCmsBulkActions = require("@webiny/api-headless-cms-bulk-actions");
8
+ var _apiHeadlessCmsImportExport = require("@webiny/api-headless-cms-import-export");
9
+ var _apiHeadlessCmsTasks = require("@webiny/api-headless-cms-tasks");
10
+ const createEsBulkActionEntriesTasks = () => {
11
+ return [(0, _apiHeadlessCmsBulkActions.createBulkAction)({
12
+ name: "delete",
13
+ dataLoader: _apiHeadlessCmsBulkActions.createListDeletedEntries,
14
+ dataProcessor: _apiHeadlessCmsBulkActions.createDeleteEntry,
15
+ batchSize: 1000
16
+ }), (0, _apiHeadlessCmsBulkActions.createBulkAction)({
17
+ name: "moveToFolder",
18
+ dataLoader: _apiHeadlessCmsBulkActions.createListLatestEntries,
19
+ dataProcessor: _apiHeadlessCmsBulkActions.createMoveEntryToFolder,
20
+ batchSize: 1000
21
+ }), (0, _apiHeadlessCmsBulkActions.createBulkAction)({
22
+ name: "moveToTrash",
23
+ dataLoader: _apiHeadlessCmsBulkActions.createListLatestEntries,
24
+ dataProcessor: _apiHeadlessCmsBulkActions.createMoveEntryToTrash,
25
+ batchSize: 1000
26
+ }), (0, _apiHeadlessCmsBulkActions.createBulkAction)({
27
+ name: "publish",
28
+ dataLoader: _apiHeadlessCmsBulkActions.createListNotPublishedEntries,
29
+ dataProcessor: _apiHeadlessCmsBulkActions.createPublishEntry,
30
+ batchSize: 1000
31
+ }), (0, _apiHeadlessCmsBulkActions.createBulkAction)({
32
+ name: "unpublish",
33
+ dataLoader: _apiHeadlessCmsBulkActions.createListPublishedEntries,
34
+ dataProcessor: _apiHeadlessCmsBulkActions.createUnpublishEntry,
35
+ batchSize: 1000
36
+ }), (0, _apiHeadlessCmsBulkActions.createBulkAction)({
37
+ name: "restore",
38
+ dataLoader: _apiHeadlessCmsBulkActions.createListDeletedEntries,
39
+ dataProcessor: _apiHeadlessCmsBulkActions.createRestoreEntryFromTrash,
40
+ batchSize: 1000
41
+ })];
42
+ };
43
+ const createHcmsTasks = () => {
44
+ return [(0, _apiHeadlessCmsBulkActions.createHcmsBulkActions)(), createEsBulkActionEntriesTasks(), (0, _apiHeadlessCmsBulkActions.createEmptyTrashBinsTask)(), (0, _apiHeadlessCmsImportExport.createHeadlessCmsImportExport)(), (0, _apiHeadlessCmsTasks.createDeleteModelTask)()];
45
+ };
46
+ exports.createHcmsTasks = createHcmsTasks;
47
+
48
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_apiHeadlessCmsBulkActions","require","_apiHeadlessCmsImportExport","_apiHeadlessCmsTasks","createEsBulkActionEntriesTasks","createBulkAction","name","dataLoader","createListDeletedEntries","dataProcessor","createDeleteEntry","batchSize","createListLatestEntries","createMoveEntryToFolder","createMoveEntryToTrash","createListNotPublishedEntries","createPublishEntry","createListPublishedEntries","createUnpublishEntry","createRestoreEntryFromTrash","createHcmsTasks","createHcmsBulkActions","createEmptyTrashBinsTask","createHeadlessCmsImportExport","createDeleteModelTask","exports"],"sources":["index.ts"],"sourcesContent":["import {\n createBulkAction,\n createDeleteEntry,\n createEmptyTrashBinsTask,\n createHcmsBulkActions,\n createListDeletedEntries,\n createListLatestEntries,\n createListNotPublishedEntries,\n createListPublishedEntries,\n createMoveEntryToFolder,\n createMoveEntryToTrash,\n createPublishEntry,\n createRestoreEntryFromTrash,\n createUnpublishEntry\n} from \"@webiny/api-headless-cms-bulk-actions\";\nimport { createHeadlessCmsImportExport } from \"@webiny/api-headless-cms-import-export\";\nimport { createDeleteModelTask } from \"@webiny/api-headless-cms-tasks\";\n\nconst createEsBulkActionEntriesTasks = () => {\n return [\n createBulkAction({\n name: \"delete\",\n dataLoader: createListDeletedEntries,\n dataProcessor: createDeleteEntry,\n batchSize: 1000\n }),\n createBulkAction({\n name: \"moveToFolder\",\n dataLoader: createListLatestEntries,\n dataProcessor: createMoveEntryToFolder,\n batchSize: 1000\n }),\n createBulkAction({\n name: \"moveToTrash\",\n dataLoader: createListLatestEntries,\n dataProcessor: createMoveEntryToTrash,\n batchSize: 1000\n }),\n createBulkAction({\n name: \"publish\",\n dataLoader: createListNotPublishedEntries,\n dataProcessor: createPublishEntry,\n batchSize: 1000\n }),\n createBulkAction({\n name: \"unpublish\",\n dataLoader: createListPublishedEntries,\n dataProcessor: createUnpublishEntry,\n batchSize: 1000\n }),\n createBulkAction({\n name: \"restore\",\n dataLoader: createListDeletedEntries,\n dataProcessor: createRestoreEntryFromTrash,\n batchSize: 1000\n })\n ];\n};\n\nexport const createHcmsTasks = () => {\n return [\n createHcmsBulkActions(),\n createEsBulkActionEntriesTasks(),\n createEmptyTrashBinsTask(),\n createHeadlessCmsImportExport(),\n createDeleteModelTask()\n ];\n};\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAeA,IAAAC,2BAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAEA,MAAMG,8BAA8B,GAAGA,CAAA,KAAM;EACzC,OAAO,CACH,IAAAC,2CAAgB,EAAC;IACbC,IAAI,EAAE,QAAQ;IACdC,UAAU,EAAEC,mDAAwB;IACpCC,aAAa,EAAEC,4CAAiB;IAChCC,SAAS,EAAE;EACf,CAAC,CAAC,EACF,IAAAN,2CAAgB,EAAC;IACbC,IAAI,EAAE,cAAc;IACpBC,UAAU,EAAEK,kDAAuB;IACnCH,aAAa,EAAEI,kDAAuB;IACtCF,SAAS,EAAE;EACf,CAAC,CAAC,EACF,IAAAN,2CAAgB,EAAC;IACbC,IAAI,EAAE,aAAa;IACnBC,UAAU,EAAEK,kDAAuB;IACnCH,aAAa,EAAEK,iDAAsB;IACrCH,SAAS,EAAE;EACf,CAAC,CAAC,EACF,IAAAN,2CAAgB,EAAC;IACbC,IAAI,EAAE,SAAS;IACfC,UAAU,EAAEQ,wDAA6B;IACzCN,aAAa,EAAEO,6CAAkB;IACjCL,SAAS,EAAE;EACf,CAAC,CAAC,EACF,IAAAN,2CAAgB,EAAC;IACbC,IAAI,EAAE,WAAW;IACjBC,UAAU,EAAEU,qDAA0B;IACtCR,aAAa,EAAES,+CAAoB;IACnCP,SAAS,EAAE;EACf,CAAC,CAAC,EACF,IAAAN,2CAAgB,EAAC;IACbC,IAAI,EAAE,SAAS;IACfC,UAAU,EAAEC,mDAAwB;IACpCC,aAAa,EAAEU,sDAA2B;IAC1CR,SAAS,EAAE;EACf,CAAC,CAAC,CACL;AACL,CAAC;AAEM,MAAMS,eAAe,GAAGA,CAAA,KAAM;EACjC,OAAO,CACH,IAAAC,gDAAqB,EAAC,CAAC,EACvBjB,8BAA8B,CAAC,CAAC,EAChC,IAAAkB,mDAAwB,EAAC,CAAC,EAC1B,IAAAC,yDAA6B,EAAC,CAAC,EAC/B,IAAAC,0CAAqB,EAAC,CAAC,CAC1B;AACL,CAAC;AAACC,OAAA,CAAAL,eAAA,GAAAA,eAAA","ignoreList":[]}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@webiny/api-headless-cms-tasks-ddb-es",
3
+ "version": "0.0.0-unstable.e53eceafb5",
4
+ "main": "index.js",
5
+ "description": "Background tasks for Webiny Headless CMS - DDB+ES",
6
+ "keywords": [
7
+ "api-headless-cms-tasks:base"
8
+ ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/webiny/webiny-js.git",
12
+ "directory": "packages/api-headless-cms-tasks-ddb-es"
13
+ },
14
+ "license": "MIT",
15
+ "dependencies": {
16
+ "@webiny/api-headless-cms-bulk-actions": "0.0.0-unstable.e53eceafb5",
17
+ "@webiny/api-headless-cms-import-export": "0.0.0-unstable.e53eceafb5",
18
+ "@webiny/api-headless-cms-tasks": "0.0.0-unstable.e53eceafb5"
19
+ },
20
+ "devDependencies": {
21
+ "@webiny/project-utils": "0.0.0-unstable.e53eceafb5",
22
+ "typescript": "5.3.3"
23
+ },
24
+ "scripts": {
25
+ "build": "node ../cli/bin.js run build",
26
+ "watch": "node ../cli/bin.js run watch"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public",
30
+ "directory": "dist"
31
+ },
32
+ "gitHead": "e53eceafb5ce1a3872c9b4548939bb2eae5b1aef"
33
+ }
package/types.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import type { HcmsBulkActionsContext } from "@webiny/api-headless-cms-bulk-actions/types";
2
+ export type HcmsTasksContext = HcmsBulkActionsContext;
package/types.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ //# sourceMappingURL=types.js.map
package/types.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { HcmsBulkActionsContext } from \"@webiny/api-headless-cms-bulk-actions/types\";\n\nexport type HcmsTasksContext = HcmsBulkActionsContext;\n"],"mappings":"","ignoreList":[]}