@xtr-dev/payload-automation 0.0.10 → 0.0.12

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/dist/index.d.ts CHANGED
@@ -1,3 +1 @@
1
- export type { CustomTriggerOptions, TriggerResult } from './core/trigger-custom-workflow.js';
2
- export type { ExecutionContext, Workflow, WorkflowStep, WorkflowTrigger } from './core/workflow-executor.js';
3
- export type { WorkflowsPluginConfig } from './plugin/config-types.js';
1
+ export type { CustomTriggerOptions, TriggerResult, ExecutionContext, Workflow, WorkflowStep, WorkflowTrigger, WorkflowsPluginConfig } from './types/index.js';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Main export contains only types and client-safe utilities
2
2
  // Server-side functions are exported via '@xtr-dev/payload-automation/server'
3
- // Types only - safe for client bundling
3
+ // Pure types only - completely safe for client bundling
4
4
  export { }; // Server-side functions are NOT re-exported here to avoid bundling issues
5
5
  // Import server-side functions from the /server export instead
6
6
  // Server functions and plugin should be imported from '/server':
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Main export contains only types and client-safe utilities\n// Server-side functions are exported via '@xtr-dev/payload-automation/server'\n\n// Types only - safe for client bundling\nexport type { CustomTriggerOptions, TriggerResult } from './core/trigger-custom-workflow.js'\nexport type { ExecutionContext, Workflow, WorkflowStep, WorkflowTrigger } from './core/workflow-executor.js'\nexport type { WorkflowsPluginConfig } from './plugin/config-types.js'\n\n// Server-side functions are NOT re-exported here to avoid bundling issues\n// Import server-side functions from the /server export instead\n\n// Server functions and plugin should be imported from '/server':\n// import { workflowsPlugin } from '@xtr-dev/payload-automation/server'\n// UI components should be imported from '/client':\n// import { TriggerWorkflowButton } from '@xtr-dev/payload-automation/client'\n"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,8EAA8E;AAE9E,wCAAwC;AAGxC,WAAqE,CAErE,0EAA0E;CAC1E,+DAA+D;CAE/D,iEAAiE;CACjE,uEAAuE;CACvE,mDAAmD;CACnD,6EAA6E"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Main export contains only types and client-safe utilities\n// Server-side functions are exported via '@xtr-dev/payload-automation/server'\n\n// Pure types only - completely safe for client bundling\nexport type {\n CustomTriggerOptions,\n TriggerResult,\n ExecutionContext,\n Workflow,\n WorkflowStep,\n WorkflowTrigger,\n WorkflowsPluginConfig\n} from './types/index.js'\n\n// Server-side functions are NOT re-exported here to avoid bundling issues\n// Import server-side functions from the /server export instead\n\n// Server functions and plugin should be imported from '/server':\n// import { workflowsPlugin } from '@xtr-dev/payload-automation/server'\n// UI components should be imported from '/client':\n// import { TriggerWorkflowButton } from '@xtr-dev/payload-automation/client'\n"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,8EAA8E;AAE9E,wDAAwD;AACxD,WAQyB,CAEzB,0EAA0E;CAC1E,+DAA+D;CAE/D,iEAAiE;CACjE,uEAAuE;CACvE,mDAAmD;CACnD,6EAA6E"}
@@ -0,0 +1,53 @@
1
+ export interface CustomTriggerOptions {
2
+ workflowId: string;
3
+ triggerData?: any;
4
+ req?: any;
5
+ }
6
+ export interface TriggerResult {
7
+ success: boolean;
8
+ runId?: string;
9
+ error?: string;
10
+ }
11
+ export interface ExecutionContext {
12
+ trigger: {
13
+ type: string;
14
+ doc?: any;
15
+ data?: any;
16
+ };
17
+ steps: Record<string, {
18
+ output?: any;
19
+ state: 'pending' | 'running' | 'succeeded' | 'failed';
20
+ }>;
21
+ payload: any;
22
+ req: any;
23
+ }
24
+ export interface WorkflowStep {
25
+ id: string;
26
+ type: string;
27
+ input: Record<string, any>;
28
+ dependencies?: string[];
29
+ }
30
+ export interface WorkflowTrigger {
31
+ type: 'collection' | 'global' | 'webhook' | 'cron' | 'manual';
32
+ collection?: string;
33
+ global?: string;
34
+ event?: 'create' | 'update' | 'delete' | 'read';
35
+ path?: string;
36
+ cron?: string;
37
+ }
38
+ export interface Workflow {
39
+ id: string;
40
+ name: string;
41
+ description?: string;
42
+ active: boolean;
43
+ triggers: WorkflowTrigger[];
44
+ steps: WorkflowStep[];
45
+ }
46
+ export interface WorkflowsPluginConfig {
47
+ collections?: string[];
48
+ globals?: string[];
49
+ logging?: {
50
+ level?: 'debug' | 'info' | 'warn' | 'error';
51
+ enabled?: boolean;
52
+ };
53
+ }
@@ -0,0 +1,5 @@
1
+ // Pure type definitions for client-safe exports
2
+ // This file contains NO runtime code and can be safely bundled
3
+ export { };
4
+
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Pure type definitions for client-safe exports\n// This file contains NO runtime code and can be safely bundled\n\nexport interface CustomTriggerOptions {\n workflowId: string\n triggerData?: any\n req?: any // PayloadRequest type, but avoiding import to keep this client-safe\n}\n\nexport interface TriggerResult {\n success: boolean\n runId?: string\n error?: string\n}\n\nexport interface ExecutionContext {\n trigger: {\n type: string\n doc?: any\n data?: any\n }\n steps: Record<string, {\n output?: any\n state: 'pending' | 'running' | 'succeeded' | 'failed'\n }>\n payload: any // Payload instance\n req: any // PayloadRequest\n}\n\nexport interface WorkflowStep {\n id: string\n type: string\n input: Record<string, any>\n dependencies?: string[]\n}\n\nexport interface WorkflowTrigger {\n type: 'collection' | 'global' | 'webhook' | 'cron' | 'manual'\n collection?: string\n global?: string\n event?: 'create' | 'update' | 'delete' | 'read'\n path?: string\n cron?: string\n}\n\nexport interface Workflow {\n id: string\n name: string\n description?: string\n active: boolean\n triggers: WorkflowTrigger[]\n steps: WorkflowStep[]\n}\n\nexport interface WorkflowsPluginConfig {\n collections?: string[]\n globals?: string[]\n logging?: {\n level?: 'debug' | 'info' | 'warn' | 'error'\n enabled?: boolean\n }\n}"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,+DAA+D;AAqD/D,WAOC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtr-dev/payload-automation",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "PayloadCMS Automation Plugin - Comprehensive workflow automation system with visual workflow building, execution tracking, and step types",
5
5
  "license": "MIT",
6
6
  "type": "module",