@xtr-dev/payload-automation 0.0.38 → 0.0.39

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 (64) hide show
  1. package/README.md +6 -1
  2. package/dist/collections/Workflow.js +2 -4
  3. package/dist/collections/Workflow.js.map +1 -1
  4. package/dist/components/WorkflowBuilder/StepConfigurationForm.js +316 -0
  5. package/dist/components/WorkflowBuilder/StepConfigurationForm.js.map +1 -0
  6. package/dist/components/WorkflowBuilder/WorkflowBuilder.js +211 -0
  7. package/dist/components/WorkflowBuilder/WorkflowBuilder.js.map +1 -0
  8. package/dist/components/WorkflowBuilder/WorkflowToolbar.js +107 -0
  9. package/dist/components/WorkflowBuilder/WorkflowToolbar.js.map +1 -0
  10. package/dist/components/WorkflowBuilder/index.js +6 -0
  11. package/dist/components/WorkflowBuilder/index.js.map +1 -0
  12. package/dist/components/WorkflowBuilder/nodes/StepNode.js +139 -0
  13. package/dist/components/WorkflowBuilder/nodes/StepNode.js.map +1 -0
  14. package/dist/core/workflow-executor.js +150 -116
  15. package/dist/core/workflow-executor.js.map +1 -1
  16. package/dist/fields/WorkflowBuilderField.js +119 -0
  17. package/dist/fields/WorkflowBuilderField.js.map +1 -0
  18. package/dist/plugin/collection-hook.js +34 -0
  19. package/dist/plugin/collection-hook.js.map +1 -1
  20. package/package.json +4 -3
  21. package/dist/collections/Workflow.d.ts +0 -3
  22. package/dist/collections/WorkflowRuns.d.ts +0 -2
  23. package/dist/components/ErrorDisplay.d.ts +0 -9
  24. package/dist/components/StatusCell.d.ts +0 -6
  25. package/dist/core/trigger-custom-workflow.d.ts +0 -52
  26. package/dist/core/workflow-executor.d.ts +0 -90
  27. package/dist/exports/client.d.ts +0 -2
  28. package/dist/exports/fields.d.ts +0 -1
  29. package/dist/exports/rsc.d.ts +0 -1
  30. package/dist/exports/server.d.ts +0 -5
  31. package/dist/exports/views.d.ts +0 -1
  32. package/dist/fields/parameter.d.ts +0 -4
  33. package/dist/index.d.ts +0 -2
  34. package/dist/plugin/collection-hook.d.ts +0 -1
  35. package/dist/plugin/config-types.d.ts +0 -18
  36. package/dist/plugin/global-hook.d.ts +0 -1
  37. package/dist/plugin/index.d.ts +0 -4
  38. package/dist/plugin/logger.d.ts +0 -20
  39. package/dist/steps/create-document-handler.d.ts +0 -2
  40. package/dist/steps/create-document.d.ts +0 -46
  41. package/dist/steps/delete-document-handler.d.ts +0 -2
  42. package/dist/steps/delete-document.d.ts +0 -39
  43. package/dist/steps/http-request-handler.d.ts +0 -2
  44. package/dist/steps/http-request.d.ts +0 -155
  45. package/dist/steps/index.d.ts +0 -12
  46. package/dist/steps/read-document-handler.d.ts +0 -2
  47. package/dist/steps/read-document.d.ts +0 -46
  48. package/dist/steps/send-email-handler.d.ts +0 -2
  49. package/dist/steps/send-email.d.ts +0 -44
  50. package/dist/steps/update-document-handler.d.ts +0 -2
  51. package/dist/steps/update-document.d.ts +0 -46
  52. package/dist/test/basic.test.js +0 -14
  53. package/dist/test/basic.test.js.map +0 -1
  54. package/dist/test/create-document-step.test.js +0 -378
  55. package/dist/test/create-document-step.test.js.map +0 -1
  56. package/dist/test/http-request-step.test.js +0 -361
  57. package/dist/test/http-request-step.test.js.map +0 -1
  58. package/dist/test/workflow-executor.test.js +0 -530
  59. package/dist/test/workflow-executor.test.js.map +0 -1
  60. package/dist/triggers/collection-trigger.d.ts +0 -2
  61. package/dist/triggers/global-trigger.d.ts +0 -2
  62. package/dist/triggers/index.d.ts +0 -2
  63. package/dist/triggers/types.d.ts +0 -5
  64. package/dist/types/index.d.ts +0 -31
@@ -1,155 +0,0 @@
1
- export declare const HttpRequestStepTask: {
2
- slug: "http-request-step";
3
- handler: import("payload").TaskHandler<"http-request-step">;
4
- inputSchema: ({
5
- name: string;
6
- type: "text";
7
- admin: {
8
- description: string;
9
- condition?: undefined;
10
- };
11
- required: true;
12
- options?: undefined;
13
- defaultValue?: undefined;
14
- fields?: undefined;
15
- min?: undefined;
16
- max?: undefined;
17
- } | {
18
- name: string;
19
- type: "select";
20
- options: {
21
- label: string;
22
- value: string;
23
- }[];
24
- defaultValue: string;
25
- admin: {
26
- description: string;
27
- condition?: undefined;
28
- };
29
- required?: undefined;
30
- fields?: undefined;
31
- min?: undefined;
32
- max?: undefined;
33
- } | {
34
- name: string;
35
- type: "json";
36
- admin: {
37
- description: string;
38
- condition?: undefined;
39
- };
40
- required?: undefined;
41
- options?: undefined;
42
- defaultValue?: undefined;
43
- fields?: undefined;
44
- min?: undefined;
45
- max?: undefined;
46
- } | {
47
- name: string;
48
- type: "json";
49
- admin: {
50
- condition: (_: Partial<any>, siblingData: Partial<any>) => boolean;
51
- description: string;
52
- };
53
- required?: undefined;
54
- options?: undefined;
55
- defaultValue?: undefined;
56
- fields?: undefined;
57
- min?: undefined;
58
- max?: undefined;
59
- } | {
60
- name: string;
61
- type: "number";
62
- defaultValue: number;
63
- admin: {
64
- description: string;
65
- condition?: undefined;
66
- };
67
- required?: undefined;
68
- options?: undefined;
69
- fields?: undefined;
70
- min?: undefined;
71
- max?: undefined;
72
- } | {
73
- name: string;
74
- type: "group";
75
- fields: ({
76
- name: string;
77
- type: "select";
78
- options: {
79
- label: string;
80
- value: string;
81
- }[];
82
- defaultValue: string;
83
- admin: {
84
- description: string;
85
- condition?: undefined;
86
- };
87
- } | {
88
- name: string;
89
- type: "text";
90
- admin: {
91
- condition: (_: Partial<any>, siblingData: Partial<any>) => boolean;
92
- description: string;
93
- };
94
- options?: undefined;
95
- defaultValue?: undefined;
96
- })[];
97
- admin?: undefined;
98
- required?: undefined;
99
- options?: undefined;
100
- defaultValue?: undefined;
101
- min?: undefined;
102
- max?: undefined;
103
- } | {
104
- name: string;
105
- type: "number";
106
- defaultValue: number;
107
- min: number;
108
- max: number;
109
- admin: {
110
- description: string;
111
- condition?: undefined;
112
- };
113
- required?: undefined;
114
- options?: undefined;
115
- fields?: undefined;
116
- } | {
117
- name: string;
118
- type: "number";
119
- defaultValue: number;
120
- admin: {
121
- condition: (_: Partial<any>, siblingData: Partial<any>) => boolean;
122
- description: string;
123
- };
124
- required?: undefined;
125
- options?: undefined;
126
- fields?: undefined;
127
- min?: undefined;
128
- max?: undefined;
129
- })[];
130
- outputSchema: ({
131
- name: string;
132
- type: "number";
133
- admin: {
134
- description: string;
135
- };
136
- } | {
137
- name: string;
138
- type: "text";
139
- admin: {
140
- description: string;
141
- };
142
- } | {
143
- name: string;
144
- type: "json";
145
- admin: {
146
- description: string;
147
- };
148
- } | {
149
- name: string;
150
- type: "textarea";
151
- admin: {
152
- description: string;
153
- };
154
- })[];
155
- };
@@ -1,12 +0,0 @@
1
- export { CreateDocumentStepTask } from './create-document.js';
2
- export { createDocumentHandler } from './create-document-handler.js';
3
- export { DeleteDocumentStepTask } from './delete-document.js';
4
- export { deleteDocumentHandler } from './delete-document-handler.js';
5
- export { HttpRequestStepTask } from './http-request.js';
6
- export { httpStepHandler } from './http-request-handler.js';
7
- export { ReadDocumentStepTask } from './read-document.js';
8
- export { readDocumentHandler } from './read-document-handler.js';
9
- export { SendEmailStepTask } from './send-email.js';
10
- export { sendEmailHandler } from './send-email-handler.js';
11
- export { UpdateDocumentStepTask } from './update-document.js';
12
- export { updateDocumentHandler } from './update-document-handler.js';
@@ -1,2 +0,0 @@
1
- import type { TaskHandler } from "payload";
2
- export declare const readDocumentHandler: TaskHandler<'read-document'>;
@@ -1,46 +0,0 @@
1
- export declare const ReadDocumentStepTask: {
2
- slug: "read-document";
3
- handler: import("payload").TaskHandler<"read-document">;
4
- inputSchema: ({
5
- name: string;
6
- type: "text";
7
- admin: {
8
- description: string;
9
- };
10
- required: true;
11
- } | {
12
- name: string;
13
- type: "text";
14
- admin: {
15
- description: string;
16
- };
17
- required?: undefined;
18
- } | {
19
- name: string;
20
- type: "json";
21
- admin: {
22
- description: string;
23
- };
24
- required?: undefined;
25
- } | {
26
- name: string;
27
- type: "number";
28
- admin: {
29
- description: string;
30
- };
31
- required?: undefined;
32
- })[];
33
- outputSchema: ({
34
- name: string;
35
- type: "json";
36
- admin: {
37
- description: string;
38
- };
39
- } | {
40
- name: string;
41
- type: "number";
42
- admin: {
43
- description: string;
44
- };
45
- })[];
46
- };
@@ -1,2 +0,0 @@
1
- import type { TaskHandler } from "payload";
2
- export declare const sendEmailHandler: TaskHandler<'send-email'>;
@@ -1,44 +0,0 @@
1
- export declare const SendEmailStepTask: {
2
- slug: "send-email";
3
- handler: import("payload").TaskHandler<"send-email">;
4
- inputSchema: ({
5
- name: string;
6
- type: "text";
7
- admin: {
8
- description: string;
9
- };
10
- required: true;
11
- hasMany?: undefined;
12
- } | {
13
- name: string;
14
- type: "text";
15
- admin: {
16
- description: string;
17
- };
18
- required?: undefined;
19
- hasMany?: undefined;
20
- } | {
21
- name: string;
22
- type: "textarea";
23
- admin: {
24
- description: string;
25
- };
26
- required?: undefined;
27
- hasMany?: undefined;
28
- } | {
29
- name: string;
30
- type: "text";
31
- admin: {
32
- description: string;
33
- };
34
- hasMany: true;
35
- required?: undefined;
36
- })[];
37
- outputSchema: {
38
- name: string;
39
- type: "text";
40
- admin: {
41
- description: string;
42
- };
43
- }[];
44
- };
@@ -1,2 +0,0 @@
1
- import type { TaskHandler } from "payload";
2
- export declare const updateDocumentHandler: TaskHandler<'update-document'>;
@@ -1,46 +0,0 @@
1
- export declare const UpdateDocumentStepTask: {
2
- slug: "update-document";
3
- handler: import("payload").TaskHandler<"update-document">;
4
- inputSchema: ({
5
- name: string;
6
- type: "text";
7
- admin: {
8
- description: string;
9
- };
10
- required: true;
11
- } | {
12
- name: string;
13
- type: "json";
14
- admin: {
15
- description: string;
16
- };
17
- required: true;
18
- } | {
19
- name: string;
20
- type: "checkbox";
21
- admin: {
22
- description: string;
23
- };
24
- required?: undefined;
25
- } | {
26
- name: string;
27
- type: "text";
28
- admin: {
29
- description: string;
30
- };
31
- required?: undefined;
32
- })[];
33
- outputSchema: ({
34
- name: string;
35
- type: "json";
36
- admin: {
37
- description: string;
38
- };
39
- } | {
40
- name: string;
41
- type: "text";
42
- admin: {
43
- description: string;
44
- };
45
- })[];
46
- };
@@ -1,14 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- describe('PayloadCMS Automation Plugin', ()=>{
3
- it('should export the plugin function from server export', async ()=>{
4
- const { workflowsPlugin } = await import('../exports/server.js');
5
- expect(workflowsPlugin).toBeDefined();
6
- expect(typeof workflowsPlugin).toBe('function');
7
- });
8
- it('should have the correct package name', async ()=>{
9
- // Basic test to ensure the plugin can be imported
10
- expect(true).toBe(true);
11
- });
12
- });
13
-
14
- //# sourceMappingURL=basic.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/test/basic.test.ts"],"sourcesContent":["import { describe, it, expect } from 'vitest'\n\ndescribe('PayloadCMS Automation Plugin', () => {\n it('should export the plugin function from server export', async () => {\n const { workflowsPlugin } = await import('../exports/server.js')\n expect(workflowsPlugin).toBeDefined()\n expect(typeof workflowsPlugin).toBe('function')\n })\n\n it('should have the correct package name', async () => {\n // Basic test to ensure the plugin can be imported\n expect(true).toBe(true)\n })\n})"],"names":["describe","it","expect","workflowsPlugin","toBeDefined","toBe"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ,SAAQ;AAE7CF,SAAS,gCAAgC;IACvCC,GAAG,wDAAwD;QACzD,MAAM,EAAEE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC;QACzCD,OAAOC,iBAAiBC,WAAW;QACnCF,OAAO,OAAOC,iBAAiBE,IAAI,CAAC;IACtC;IAEAJ,GAAG,wCAAwC;QACzC,kDAAkD;QAClDC,OAAO,MAAMG,IAAI,CAAC;IACpB;AACF"}