@xtr-dev/payload-automation 0.0.43 → 0.0.45
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/README.md +221 -49
- package/dist/collections/Steps.d.ts +6 -0
- package/dist/collections/Steps.js +166 -0
- package/dist/collections/Steps.js.map +1 -0
- package/dist/collections/Triggers.d.ts +7 -0
- package/dist/collections/Triggers.js +224 -0
- package/dist/collections/Triggers.js.map +1 -0
- package/dist/collections/Workflow.d.ts +5 -2
- package/dist/collections/Workflow.js +179 -39
- package/dist/collections/Workflow.js.map +1 -1
- package/dist/collections/WorkflowRuns.d.ts +4 -0
- package/dist/collections/WorkflowRuns.js +219 -24
- package/dist/collections/WorkflowRuns.js.map +1 -1
- package/dist/components/WorkflowBuilder/WorkflowBuilder.js.map +1 -1
- package/dist/core/expression-engine.d.ts +58 -0
- package/dist/core/expression-engine.js +191 -0
- package/dist/core/expression-engine.js.map +1 -0
- package/dist/core/workflow-executor.d.ts +70 -56
- package/dist/core/workflow-executor.js +354 -677
- package/dist/core/workflow-executor.js.map +1 -1
- package/dist/exports/client.js +1 -3
- package/dist/exports/client.js.map +1 -1
- package/dist/exports/views.js +2 -4
- package/dist/exports/views.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin/config-types.d.ts +43 -5
- package/dist/plugin/config-types.js +3 -1
- package/dist/plugin/config-types.js.map +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/index.js +82 -28
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/trigger-hook.d.ts +13 -0
- package/dist/plugin/trigger-hook.js +184 -0
- package/dist/plugin/trigger-hook.js.map +1 -0
- package/dist/steps/create-step.d.ts +66 -0
- package/dist/steps/create-step.js +59 -0
- package/dist/steps/create-step.js.map +1 -0
- package/dist/steps/index.d.ts +2 -0
- package/dist/steps/index.js +3 -0
- package/dist/steps/index.js.map +1 -1
- package/dist/steps/read-document-handler.js +1 -1
- package/dist/steps/read-document-handler.js.map +1 -1
- package/dist/steps/update-document-handler.js +1 -1
- package/dist/steps/update-document-handler.js.map +1 -1
- package/dist/triggers/hook-options.d.ts +34 -0
- package/dist/triggers/hook-options.js +158 -0
- package/dist/triggers/hook-options.js.map +1 -0
- package/dist/triggers/index.d.ts +2 -2
- package/dist/triggers/index.js +1 -2
- package/dist/triggers/index.js.map +1 -1
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +4 -5
- package/dist/types/index.js.map +1 -1
- package/dist/utils/validation.d.ts +64 -0
- package/dist/utils/validation.js +107 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +2 -1
- package/dist/plugin/collection-hook.d.ts +0 -1
- package/dist/plugin/collection-hook.js +0 -92
- package/dist/plugin/collection-hook.js.map +0 -1
- package/dist/plugin/global-hook.d.ts +0 -1
- package/dist/plugin/global-hook.js +0 -83
- package/dist/plugin/global-hook.js.map +0 -1
- package/dist/triggers/collection-trigger.d.ts +0 -2
- package/dist/triggers/collection-trigger.js +0 -36
- package/dist/triggers/collection-trigger.js.map +0 -1
- package/dist/triggers/global-trigger.d.ts +0 -2
- package/dist/triggers/global-trigger.js +0 -29
- package/dist/triggers/global-trigger.js.map +0 -1
- package/dist/triggers/types.d.ts +0 -5
- package/dist/triggers/types.js +0 -3
- package/dist/triggers/types.js.map +0 -1
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export const collectionTrigger = ({ collectionTriggers })=>({
|
|
2
|
-
slug: 'collection-hook',
|
|
3
|
-
parameters: [
|
|
4
|
-
{
|
|
5
|
-
name: 'collectionSlug',
|
|
6
|
-
type: 'select',
|
|
7
|
-
options: Object.keys(collectionTriggers || {})
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'hook',
|
|
11
|
-
type: 'select',
|
|
12
|
-
options: [
|
|
13
|
-
"afterChange",
|
|
14
|
-
"afterDelete",
|
|
15
|
-
"afterError",
|
|
16
|
-
"afterForgotPassword",
|
|
17
|
-
"afterLogin",
|
|
18
|
-
"afterLogout",
|
|
19
|
-
"afterMe",
|
|
20
|
-
"afterOperation",
|
|
21
|
-
"afterRead",
|
|
22
|
-
"afterRefresh",
|
|
23
|
-
"beforeChange",
|
|
24
|
-
"beforeDelete",
|
|
25
|
-
"beforeLogin",
|
|
26
|
-
"beforeOperation",
|
|
27
|
-
"beforeRead",
|
|
28
|
-
"beforeValidate",
|
|
29
|
-
"me",
|
|
30
|
-
"refresh"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=collection-trigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/triggers/collection-trigger.ts"],"sourcesContent":["import type {TriggerConfig} from '../plugin/config-types.js'\n\nexport const collectionTrigger: TriggerConfig = ({collectionTriggers}) => ({\n slug: 'collection-hook',\n parameters: [\n {\n name: 'collectionSlug',\n type: 'select',\n options: Object.keys(collectionTriggers || {}),\n },\n {\n name: 'hook',\n type: 'select',\n options: [\n \"afterChange\",\n \"afterDelete\",\n \"afterError\",\n \"afterForgotPassword\",\n \"afterLogin\",\n \"afterLogout\",\n \"afterMe\",\n \"afterOperation\",\n \"afterRead\",\n \"afterRefresh\",\n \"beforeChange\",\n \"beforeDelete\",\n \"beforeLogin\",\n \"beforeOperation\",\n \"beforeRead\",\n \"beforeValidate\",\n \"me\",\n \"refresh\"\n ]\n }\n ]\n})\n"],"names":["collectionTrigger","collectionTriggers","slug","parameters","name","type","options","Object","keys"],"mappings":"AAEA,OAAO,MAAMA,oBAAmC,CAAC,EAACC,kBAAkB,EAAC,GAAM,CAAA;QACzEC,MAAM;QACNC,YAAY;YACV;gBACEC,MAAM;gBACNC,MAAM;gBACNC,SAASC,OAAOC,IAAI,CAACP,sBAAsB,CAAC;YAC9C;YACA;gBACEG,MAAM;gBACNC,MAAM;gBACNC,SAAS;oBACP;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;iBACD;YACH;SACD;IACH,CAAA,EAAE"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export const globalTrigger = ({ globalTriggers })=>({
|
|
2
|
-
slug: 'global-hook',
|
|
3
|
-
parameters: [
|
|
4
|
-
{
|
|
5
|
-
name: 'global',
|
|
6
|
-
type: 'select',
|
|
7
|
-
admin: {
|
|
8
|
-
description: 'Global that triggers the workflow'
|
|
9
|
-
},
|
|
10
|
-
options: Object.keys(globalTriggers || {})
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'operation',
|
|
14
|
-
type: 'select',
|
|
15
|
-
admin: {
|
|
16
|
-
description: 'Global hook that triggers the workflow'
|
|
17
|
-
},
|
|
18
|
-
options: [
|
|
19
|
-
"afterChange",
|
|
20
|
-
"afterRead",
|
|
21
|
-
"beforeChange",
|
|
22
|
-
"beforeRead",
|
|
23
|
-
"beforeValidate"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=global-trigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/triggers/global-trigger.ts"],"sourcesContent":["import type {TriggerConfig} from '../plugin/config-types.js'\n\nexport const globalTrigger: TriggerConfig = ({globalTriggers}) => ({\n slug: 'global-hook',\n parameters: [\n {\n name: 'global',\n type: 'select',\n admin: {\n description: 'Global that triggers the workflow',\n },\n options: Object.keys(globalTriggers || {}),\n },\n {\n name: 'operation',\n type: 'select',\n admin: {\n description: 'Global hook that triggers the workflow',\n },\n options: [\n \"afterChange\",\n \"afterRead\", \n \"beforeChange\",\n \"beforeRead\",\n \"beforeValidate\"\n ],\n }\n ]\n})\n"],"names":["globalTrigger","globalTriggers","slug","parameters","name","type","admin","description","options","Object","keys"],"mappings":"AAEA,OAAO,MAAMA,gBAA+B,CAAC,EAACC,cAAc,EAAC,GAAM,CAAA;QACjEC,MAAM;QACNC,YAAY;YACV;gBACEC,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBACLC,aAAa;gBACf;gBACAC,SAASC,OAAOC,IAAI,CAACT,kBAAkB,CAAC;YAC1C;YACA;gBACEG,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBACLC,aAAa;gBACf;gBACAC,SAAS;oBACP;oBACA;oBACA;oBACA;oBACA;iBACD;YACH;SACD;IACH,CAAA,EAAE"}
|
package/dist/triggers/types.d.ts
DELETED
package/dist/triggers/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/triggers/types.ts"],"sourcesContent":["import type {Field} from \"payload\"\n\nexport type Trigger = {\n slug: string\n parameters: Field[]\n}\n"],"names":[],"mappings":"AAEA,WAGC"}
|