@memberjunction/scheduling-actions 4.0.0 → 4.1.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.
Files changed (2) hide show
  1. package/README.md +133 -0
  2. package/package.json +7 -7
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # @memberjunction/scheduling-actions
2
+
3
+ MemberJunction Actions for managing scheduled jobs. These actions enable AI agents and workflow systems to query, create, update, delete, and execute scheduled jobs through MemberJunction's metadata-driven action framework.
4
+
5
+ ## Architecture
6
+
7
+ ```mermaid
8
+ graph TD
9
+ subgraph "@memberjunction/scheduling-actions"
10
+ A[BaseJobAction] --> B[QueryJobsAction]
11
+ A --> C[CreateJobAction]
12
+ A --> D[UpdateJobAction]
13
+ A --> E[DeleteJobAction]
14
+ A --> F[ExecuteJobNowAction]
15
+ A --> G[GetJobStatisticsAction]
16
+ end
17
+
18
+ subgraph "Consumers"
19
+ H[AI Agents]
20
+ I[Workflow Engine]
21
+ J[Low-Code Builders]
22
+ end
23
+
24
+ H --> A
25
+ I --> A
26
+ J --> A
27
+
28
+ subgraph "Data Layer"
29
+ K["MJ: Scheduled Jobs"]
30
+ L["MJ: Scheduled Job Runs"]
31
+ M["MJ: Scheduled Job Types"]
32
+ end
33
+
34
+ A --> K
35
+ A --> L
36
+ A --> M
37
+
38
+ style A fill:#2d6a9f,stroke:#1a4971,color:#fff
39
+ style B fill:#2d8659,stroke:#1a5c3a,color:#fff
40
+ style C fill:#2d8659,stroke:#1a5c3a,color:#fff
41
+ style D fill:#2d8659,stroke:#1a5c3a,color:#fff
42
+ style E fill:#2d8659,stroke:#1a5c3a,color:#fff
43
+ style F fill:#7c5295,stroke:#563a6b,color:#fff
44
+ style G fill:#7c5295,stroke:#563a6b,color:#fff
45
+ ```
46
+
47
+ ## Overview
48
+
49
+ This package provides MemberJunction Actions for scheduled job management. Actions are metadata-driven integration points designed for AI agents, workflow engines, and low-code environments -- they are NOT intended for direct code-to-code use.
50
+
51
+ **Available actions:**
52
+
53
+ | Action | Description |
54
+ |--------|-------------|
55
+ | `QueryJobsAction` | List and filter scheduled jobs with optional status filtering |
56
+ | `CreateJobAction` | Create a new scheduled job with cron expression and configuration |
57
+ | `UpdateJobAction` | Modify an existing scheduled job's schedule, status, or configuration |
58
+ | `DeleteJobAction` | Remove a scheduled job |
59
+ | `ExecuteJobNowAction` | Trigger immediate execution of a scheduled job |
60
+ | `GetJobStatisticsAction` | Retrieve execution statistics, success rates, and history |
61
+
62
+ ## Installation
63
+
64
+ ```bash
65
+ npm install @memberjunction/scheduling-actions
66
+ ```
67
+
68
+ ## Usage
69
+
70
+ These actions are registered with MemberJunction's class factory and are discovered automatically by AI agents and workflow systems. They are not typically called directly from code.
71
+
72
+ ### Action Registration
73
+
74
+ All actions extend `BaseJobAction`, which provides shared utilities for:
75
+ - Parameter extraction and validation
76
+ - Cron expression validation via `cron-parser`
77
+ - Common error handling patterns
78
+ - Result formatting
79
+
80
+ ### Example: Agent Using Schedule Actions
81
+
82
+ An AI agent can discover and use these actions to manage scheduled jobs:
83
+
84
+ ```
85
+ User: "Schedule my daily report agent to run every morning at 8 AM"
86
+
87
+ Agent discovers: CreateJobAction
88
+ Agent executes with:
89
+ - JobType: "Agent"
90
+ - CronExpression: "0 8 * * *"
91
+ - AgentID: "report-agent-guid"
92
+ - Name: "Daily Report Agent"
93
+ ```
94
+
95
+ ## Base Class
96
+
97
+ `BaseJobAction` provides shared functionality inherited by all scheduling actions:
98
+
99
+ ```mermaid
100
+ graph LR
101
+ A[BaseAction<br/>MJ Actions Framework] --> B[BaseJobAction<br/>Shared Scheduling Logic]
102
+ B --> C[QueryJobsAction]
103
+ B --> D[CreateJobAction]
104
+ B --> E[UpdateJobAction]
105
+ B --> F[DeleteJobAction]
106
+ B --> G[ExecuteJobNowAction]
107
+ B --> H[GetJobStatisticsAction]
108
+
109
+ style A fill:#2d6a9f,stroke:#1a4971,color:#fff
110
+ style B fill:#2d8659,stroke:#1a5c3a,color:#fff
111
+ style C fill:#7c5295,stroke:#563a6b,color:#fff
112
+ style D fill:#7c5295,stroke:#563a6b,color:#fff
113
+ style E fill:#7c5295,stroke:#563a6b,color:#fff
114
+ style F fill:#7c5295,stroke:#563a6b,color:#fff
115
+ style G fill:#b8762f,stroke:#8a5722,color:#fff
116
+ style H fill:#b8762f,stroke:#8a5722,color:#fff
117
+ ```
118
+
119
+ ## Dependencies
120
+
121
+ | Package | Purpose |
122
+ |---------|---------|
123
+ | `@memberjunction/actions` | MJ Actions framework |
124
+ | `@memberjunction/actions-base` | Base action classes |
125
+ | `@memberjunction/core` | Metadata, RunView |
126
+ | `@memberjunction/core-entities` | Entity types |
127
+ | `@memberjunction/global` | RegisterClass, class factory |
128
+ | `@memberjunction/scheduling-base-types` | Shared type definitions |
129
+ | `cron-parser` | Cron expression validation |
130
+
131
+ ## License
132
+
133
+ ISC
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/scheduling-actions",
3
3
  "type": "module",
4
- "version": "4.0.0",
4
+ "version": "4.1.0",
5
5
  "description": "MemberJunction: Scheduling Actions - agentic tools for managing scheduled jobs",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -15,12 +15,12 @@
15
15
  "author": "MemberJunction.com",
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@memberjunction/global": "4.0.0",
19
- "@memberjunction/core": "4.0.0",
20
- "@memberjunction/core-entities": "4.0.0",
21
- "@memberjunction/actions": "4.0.0",
22
- "@memberjunction/actions-base": "4.0.0",
23
- "@memberjunction/scheduling-base-types": "4.0.0",
18
+ "@memberjunction/global": "4.1.0",
19
+ "@memberjunction/core": "4.1.0",
20
+ "@memberjunction/core-entities": "4.1.0",
21
+ "@memberjunction/actions": "4.1.0",
22
+ "@memberjunction/actions-base": "4.1.0",
23
+ "@memberjunction/scheduling-base-types": "4.1.0",
24
24
  "cron-parser": "^4.9.0"
25
25
  },
26
26
  "devDependencies": {