@webiny/api-scheduler 6.2.0-beta.0 → 6.3.0-beta.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.
@@ -4,4 +4,7 @@
4
4
  * Provides the ability to cancel a scheduled action.
5
5
  * Removes both the EventBridge schedule and the CMS entry.
6
6
  */
7
- export declare const CancelScheduledActionFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
7
+ export declare const CancelScheduledActionFeature: {
8
+ name: string;
9
+ register(container: import("@webiny/di").Container): void;
10
+ };
@@ -4,4 +4,7 @@
4
4
  * Provides the ability to execute a scheduled action when triggered by EventBridge.
5
5
  * Finds the appropriate handler and executes it, then cleans up the schedule entry.
6
6
  */
7
- export declare const ExecuteScheduledActionFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
7
+ export declare const ExecuteScheduledActionFeature: {
8
+ name: string;
9
+ register(container: import("@webiny/di").Container): void;
10
+ };
@@ -4,4 +4,7 @@
4
4
  * Provides the ability to retrieve a scheduled action by ID.
5
5
  * Used for checking if schedules exist and displaying schedule details.
6
6
  */
7
- export declare const GetScheduledActionFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
7
+ export declare const GetScheduledActionFeature: {
8
+ name: string;
9
+ register(container: import("@webiny/di").Container): void;
10
+ };
@@ -4,4 +4,7 @@
4
4
  * Provides the ability to retrieve a target scheduled action by ID.
5
5
  * Used for checking if schedules exist and displaying schedule details.
6
6
  */
7
- export declare const GetTargetScheduledActionFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
7
+ export declare const GetTargetScheduledActionFeature: {
8
+ name: string;
9
+ register(container: import("@webiny/di").Container): void;
10
+ };
@@ -4,4 +4,7 @@
4
4
  * Provides the ability to list scheduled actions with optional filtering by namespace or actionType.
5
5
  * Critical for CMS CRUD views showing all scheduled actions for a content model.
6
6
  */
7
- export declare const ListScheduledActionsFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
7
+ export declare const ListScheduledActionsFeature: {
8
+ name: string;
9
+ register(container: import("@webiny/di").Container): void;
10
+ };
@@ -4,4 +4,7 @@
4
4
  * Provides the ability to schedule actions for future execution.
5
5
  * Handles both creating new schedules and updating existing ones (reschedule).
6
6
  */
7
- export declare const ScheduleActionFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
7
+ export declare const ScheduleActionFeature: {
8
+ name: string;
9
+ register(container: import("@webiny/di").Container): void;
10
+ };
@@ -5,4 +5,7 @@
5
5
  * Individual handler implementations are registered by consumer packages
6
6
  * (e.g., api-headless-cms-scheduler registers CMS-specific handlers).
7
7
  */
8
- export declare const SchedulerFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
8
+ export declare const SchedulerFeature: {
9
+ name: string;
10
+ register(container: import("@webiny/di").Container): void;
11
+ };
@@ -1 +1,4 @@
1
- export declare const SchedulerPermissionsFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const SchedulerPermissionsFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-scheduler",
3
- "version": "6.2.0-beta.0",
3
+ "version": "6.3.0-beta.0",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -15,34 +15,34 @@
15
15
  "description": "A generic action scheduler.",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@webiny/api": "6.2.0-beta.0",
19
- "@webiny/api-core": "6.2.0-beta.0",
20
- "@webiny/api-headless-cms": "6.2.0-beta.0",
21
- "@webiny/aws-sdk": "6.2.0-beta.0",
22
- "@webiny/error": "6.2.0-beta.0",
23
- "@webiny/feature": "6.2.0-beta.0",
24
- "@webiny/handler-graphql": "6.2.0-beta.0",
25
- "@webiny/plugins": "6.2.0-beta.0",
26
- "@webiny/utils": "6.2.0-beta.0",
18
+ "@webiny/api": "6.3.0-beta.0",
19
+ "@webiny/api-core": "6.3.0-beta.0",
20
+ "@webiny/api-headless-cms": "6.3.0-beta.0",
21
+ "@webiny/aws-sdk": "6.3.0-beta.0",
22
+ "@webiny/error": "6.3.0-beta.0",
23
+ "@webiny/feature": "6.3.0-beta.0",
24
+ "@webiny/handler-graphql": "6.3.0-beta.0",
25
+ "@webiny/plugins": "6.3.0-beta.0",
26
+ "@webiny/utils": "6.3.0-beta.0",
27
27
  "zod": "4.3.6"
28
28
  },
29
29
  "devDependencies": {
30
- "@webiny/build-tools": "6.2.0-beta.0",
31
- "@webiny/db-dynamodb": "6.2.0-beta.0",
32
- "@webiny/handler": "6.2.0-beta.0",
33
- "@webiny/handler-aws": "6.2.0-beta.0",
34
- "@webiny/project-utils": "6.2.0-beta.0",
35
- "@webiny/testing": "6.2.0-beta.0",
36
- "@webiny/wcp": "6.2.0-beta.0",
30
+ "@webiny/build-tools": "6.3.0-beta.0",
31
+ "@webiny/db-dynamodb": "6.3.0-beta.0",
32
+ "@webiny/handler": "6.3.0-beta.0",
33
+ "@webiny/handler-aws": "6.3.0-beta.0",
34
+ "@webiny/project-utils": "6.3.0-beta.0",
35
+ "@webiny/testing": "6.3.0-beta.0",
36
+ "@webiny/wcp": "6.3.0-beta.0",
37
37
  "aws-sdk-client-mock": "4.1.0",
38
38
  "jest-dynalite": "3.6.1",
39
39
  "rimraf": "6.1.3",
40
- "typescript": "5.9.3",
40
+ "typescript": "6.0.3",
41
41
  "vitest": "4.1.4"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public",
45
45
  "directory": "dist"
46
46
  },
47
- "gitHead": "3d3148358b6febbc857371930871743bec3b3939"
47
+ "gitHead": "94c21e58aebc9855bf1ae972423281faa0f5c135"
48
48
  }
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","ScheduledActionHandler","SchedulerService","ScheduledActionModel"],"sources":["abstractions.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/api-headless-cms/types/model.js\";\nimport { createAbstraction } from \"@webiny/feature/api\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\nimport type { CmsEntry } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { SCHEDULED_ACTION_PUBLISH, SCHEDULED_ACTION_UNPUBLISH } from \"~/constants.js\";\n\n/**\n * Identity type - represents who scheduled an action\n */\nexport interface Identity {\n id: string;\n type: string;\n displayName: string;\n}\n\nexport type ScheduledActionType =\n | typeof SCHEDULED_ACTION_PUBLISH\n | typeof SCHEDULED_ACTION_UNPUBLISH;\n/**\n * Scheduled Action Record - The data stored for a scheduled action\n */\n\nexport interface IScheduledActionEntryValues<T> {\n namespace: string; // Resource scope: \"Cms/Entry/Article\", \"Mailer/Email\"\n actionType: ScheduledActionType;\n targetId: string; // Resource identifier (entry ID, email ID, etc.)\n scheduledBy: Identity;\n scheduledFor: string;\n title: string;\n payload: T; // Action-specific data\n error: string | undefined; // Error if execution failed\n}\n\nexport interface IScheduledActionEntry<T extends GenericRecord = GenericRecord>\n extends CmsEntry<IScheduledActionEntryValues<T>> {}\n\nexport interface IScheduledAction<T extends GenericRecord = GenericRecord>\n extends Omit<IScheduledActionEntryValues<T>, \"scheduledFor\"> {\n id: string;\n scheduledFor: Date;\n}\n\n/**\n * ScheduledActionHandler - Similar to EventHandler pattern\n *\n * Each application (CMS, Mailer, etc.) implements handlers for their actions.\n * This is the ONLY action abstraction needed.\n */\nexport interface IScheduledActionHandler {\n /**\n * Determines if this handler can handle the given action\n *\n * @param namespace - Resource scope (e.g., \"Cms/Entry/Article\")\n * @param actionType - Operation type (e.g., \"Publish\")\n */\n canHandle(namespace: string, actionType: ScheduledActionType): boolean;\n\n /**\n * Executes the scheduled action\n */\n handle(action: IScheduledAction<any>): Promise<void>;\n}\n\n/** Handle execution of a scheduled action. */\nexport const ScheduledActionHandler =\n createAbstraction<IScheduledActionHandler>(\"ScheduledActionHandler\");\n\nexport namespace ScheduledActionHandler {\n export type Interface = IScheduledActionHandler;\n}\n\n/**\n * SchedulerService - Cloud-agnostic scheduler service\n *\n * Abstracts the underlying scheduling infrastructure (AWS EventBridge, Azure Logic Apps, etc.)\n */\n\nexport interface ISchedulerServiceCreateParams {\n id: string;\n namespace: string;\n scheduleFor: Date;\n}\nexport interface ISchedulerServiceUpdateParams {\n id: string;\n namespace: string;\n scheduleFor: Date;\n}\n\nexport interface ISchedulerService {\n create(params: ISchedulerServiceCreateParams): Promise<void>;\n update(params: ISchedulerServiceUpdateParams): Promise<void>;\n delete(id: string): Promise<void>;\n exists(id: string): Promise<boolean>;\n}\n\n/** Core service for managing scheduled actions. */\nexport const SchedulerService = createAbstraction<ISchedulerService>(\"SchedulerService\");\n\nexport namespace SchedulerService {\n export type Interface = ISchedulerService;\n}\n\n/**\n * ScheduledActionModel - A CMS model used by the scheduler for persistence.\n */\n/** Content model definition for scheduled actions. */\nexport const ScheduledActionModel = createAbstraction<CmsModel>(\"ScheduledActionModel\");\n\nexport namespace ScheduledActionModel {\n export type Interface = CmsModel;\n}\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,qBAAqB;;AAKvD;AACA;AACA;;AAUA;AACA;AACA;;AAsBA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA,OAAO,MAAMC,sBAAsB,GAC/BD,iBAAiB,CAA0B,wBAAwB,CAAC;;AAMxE;AACA;AACA;AACA;AACA;;AAoBA;AACA,OAAO,MAAME,gBAAgB,GAAGF,iBAAiB,CAAoB,kBAAkB,CAAC;AAMxF;AACA;AACA;AACA;AACA,OAAO,MAAMG,oBAAoB,GAAGH,iBAAiB,CAAW,sBAAsB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","ScheduledActionHandler","SchedulerService","ScheduledActionModel"],"sources":["abstractions.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/api-headless-cms/types/model.js\";\nimport { createAbstraction } from \"@webiny/feature/api\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\nimport type { CmsEntry } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { SCHEDULED_ACTION_PUBLISH, SCHEDULED_ACTION_UNPUBLISH } from \"~/constants.js\";\n\n/**\n * Identity type - represents who scheduled an action\n */\nexport interface Identity {\n id: string;\n type: string;\n displayName: string;\n}\n\nexport type ScheduledActionType =\n | typeof SCHEDULED_ACTION_PUBLISH\n | typeof SCHEDULED_ACTION_UNPUBLISH;\n/**\n * Scheduled Action Record - The data stored for a scheduled action\n */\n\nexport interface IScheduledActionEntryValues<T> {\n namespace: string; // Resource scope: \"Cms/Entry/Article\", \"Mailer/Email\"\n actionType: ScheduledActionType;\n targetId: string; // Resource identifier (entry ID, email ID, etc.)\n scheduledBy: Identity;\n scheduledFor: string;\n title: string;\n payload: T; // Action-specific data\n error: string | undefined; // Error if execution failed\n}\n\nexport interface IScheduledActionEntry<T extends GenericRecord = GenericRecord> extends CmsEntry<\n IScheduledActionEntryValues<T>\n> {}\n\nexport interface IScheduledAction<T extends GenericRecord = GenericRecord> extends Omit<\n IScheduledActionEntryValues<T>,\n \"scheduledFor\"\n> {\n id: string;\n scheduledFor: Date;\n}\n\n/**\n * ScheduledActionHandler - Similar to EventHandler pattern\n *\n * Each application (CMS, Mailer, etc.) implements handlers for their actions.\n * This is the ONLY action abstraction needed.\n */\nexport interface IScheduledActionHandler {\n /**\n * Determines if this handler can handle the given action\n *\n * @param namespace - Resource scope (e.g., \"Cms/Entry/Article\")\n * @param actionType - Operation type (e.g., \"Publish\")\n */\n canHandle(namespace: string, actionType: ScheduledActionType): boolean;\n\n /**\n * Executes the scheduled action\n */\n handle(action: IScheduledAction<any>): Promise<void>;\n}\n\n/** Handle execution of a scheduled action. */\nexport const ScheduledActionHandler =\n createAbstraction<IScheduledActionHandler>(\"ScheduledActionHandler\");\n\nexport namespace ScheduledActionHandler {\n export type Interface = IScheduledActionHandler;\n}\n\n/**\n * SchedulerService - Cloud-agnostic scheduler service\n *\n * Abstracts the underlying scheduling infrastructure (AWS EventBridge, Azure Logic Apps, etc.)\n */\n\nexport interface ISchedulerServiceCreateParams {\n id: string;\n namespace: string;\n scheduleFor: Date;\n}\nexport interface ISchedulerServiceUpdateParams {\n id: string;\n namespace: string;\n scheduleFor: Date;\n}\n\nexport interface ISchedulerService {\n create(params: ISchedulerServiceCreateParams): Promise<void>;\n update(params: ISchedulerServiceUpdateParams): Promise<void>;\n delete(id: string): Promise<void>;\n exists(id: string): Promise<boolean>;\n}\n\n/** Core service for managing scheduled actions. */\nexport const SchedulerService = createAbstraction<ISchedulerService>(\"SchedulerService\");\n\nexport namespace SchedulerService {\n export type Interface = ISchedulerService;\n}\n\n/**\n * ScheduledActionModel - A CMS model used by the scheduler for persistence.\n */\n/** Content model definition for scheduled actions. */\nexport const ScheduledActionModel = createAbstraction<CmsModel>(\"ScheduledActionModel\");\n\nexport namespace ScheduledActionModel {\n export type Interface = CmsModel;\n}\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,qBAAqB;;AAKvD;AACA;AACA;;AAUA;AACA;AACA;;AAyBA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA,OAAO,MAAMC,sBAAsB,GAC/BD,iBAAiB,CAA0B,wBAAwB,CAAC;;AAMxE;AACA;AACA;AACA;AACA;;AAoBA;AACA,OAAO,MAAME,gBAAgB,GAAGF,iBAAiB,CAAoB,kBAAkB,CAAC;AAMxF;AACA;AACA;AACA;AACA,OAAO,MAAMG,oBAAoB,GAAGH,iBAAiB,CAAW,sBAAsB,CAAC","ignoreList":[]}