@webiny/api-workflows 6.5.0-beta.3 → 6.5.0-beta.4
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.
|
@@ -5,7 +5,8 @@ class WorkflowModelImpl {
|
|
|
5
5
|
return [
|
|
6
6
|
builder.private({
|
|
7
7
|
modelId: WORKFLOW_MODEL_ID,
|
|
8
|
-
name: "Workflow"
|
|
8
|
+
name: "Workflow",
|
|
9
|
+
lifecycleEvents: false
|
|
9
10
|
}).fields((fields)=>({
|
|
10
11
|
name: fields.text().label("Name").required("Workflow name is required."),
|
|
11
12
|
app: fields.text().label("App").required("App is required."),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain/workflow/workflowModel.js","sources":["../../../src/domain/workflow/workflowModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport { WORKFLOW_MODEL_ID } from \"~/constants.js\";\n\nexport { WORKFLOW_MODEL_ID };\n\nclass WorkflowModelImpl implements ModelFactory.Interface {\n public async execute(builder: ModelFactory.Builder) {\n return [\n builder\n .private({\n modelId: WORKFLOW_MODEL_ID,\n name: \"Workflow\"\n })\n .fields(fields => ({\n name: fields.text().label(\"Name\").required(\"Workflow name is required.\"),\n app: fields.text().label(\"App\").required(\"App is required.\"),\n steps: fields\n .object()\n .label(\"Steps\")\n .list()\n .required(\"Steps are required.\")\n .listMinLength(1, \"At least one step is required.\")\n .fields(fields => ({\n id: fields.text().label(\"ID\").required(\"ID is required.\"),\n title: fields.text().label(\"Title\").required(\"Title is required.\"),\n color: fields.text().label(\"Color\"),\n description: fields.text().label(\"Description\"),\n teams: fields\n .object()\n .label(\"Teams\")\n .list()\n .fields(teamFields => ({\n id: teamFields.text().label(\"ID\").required(\"ID is required.\")\n })),\n notifications: fields\n .object()\n .list()\n .label(\"Notifications\")\n .fields(fields => ({\n id: fields.text().label(\"Id\").required(\"Id is required.\")\n }))\n }))\n }))\n ];\n }\n}\n\nexport const WorkflowModel = ModelFactory.createImplementation({\n implementation: WorkflowModelImpl,\n dependencies: []\n});\n"],"names":["WorkflowModelImpl","builder","WORKFLOW_MODEL_ID","fields","teamFields","WorkflowModel","ModelFactory"],"mappings":";;AAKA,MAAMA;IACF,MAAa,QAAQC,OAA6B,EAAE;QAChD,OAAO;YACHA,QACK,OAAO,CAAC;gBACL,SAASC;gBACT,MAAM;
|
|
1
|
+
{"version":3,"file":"domain/workflow/workflowModel.js","sources":["../../../src/domain/workflow/workflowModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport { WORKFLOW_MODEL_ID } from \"~/constants.js\";\n\nexport { WORKFLOW_MODEL_ID };\n\nclass WorkflowModelImpl implements ModelFactory.Interface {\n public async execute(builder: ModelFactory.Builder) {\n return [\n builder\n .private({\n modelId: WORKFLOW_MODEL_ID,\n name: \"Workflow\",\n lifecycleEvents: false\n })\n .fields(fields => ({\n name: fields.text().label(\"Name\").required(\"Workflow name is required.\"),\n app: fields.text().label(\"App\").required(\"App is required.\"),\n steps: fields\n .object()\n .label(\"Steps\")\n .list()\n .required(\"Steps are required.\")\n .listMinLength(1, \"At least one step is required.\")\n .fields(fields => ({\n id: fields.text().label(\"ID\").required(\"ID is required.\"),\n title: fields.text().label(\"Title\").required(\"Title is required.\"),\n color: fields.text().label(\"Color\"),\n description: fields.text().label(\"Description\"),\n teams: fields\n .object()\n .label(\"Teams\")\n .list()\n .fields(teamFields => ({\n id: teamFields.text().label(\"ID\").required(\"ID is required.\")\n })),\n notifications: fields\n .object()\n .list()\n .label(\"Notifications\")\n .fields(fields => ({\n id: fields.text().label(\"Id\").required(\"Id is required.\")\n }))\n }))\n }))\n ];\n }\n}\n\nexport const WorkflowModel = ModelFactory.createImplementation({\n implementation: WorkflowModelImpl,\n dependencies: []\n});\n"],"names":["WorkflowModelImpl","builder","WORKFLOW_MODEL_ID","fields","teamFields","WorkflowModel","ModelFactory"],"mappings":";;AAKA,MAAMA;IACF,MAAa,QAAQC,OAA6B,EAAE;QAChD,OAAO;YACHA,QACK,OAAO,CAAC;gBACL,SAASC;gBACT,MAAM;gBACN,iBAAiB;YACrB,GACC,MAAM,CAACC,CAAAA,SAAW;oBACf,MAAMA,OAAO,IAAI,GAAG,KAAK,CAAC,QAAQ,QAAQ,CAAC;oBAC3C,KAAKA,OAAO,IAAI,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC;oBACzC,OAAOA,OACF,MAAM,GACN,KAAK,CAAC,SACN,IAAI,GACJ,QAAQ,CAAC,uBACT,aAAa,CAAC,GAAG,kCACjB,MAAM,CAACA,CAAAA,SAAW;4BACf,IAAIA,OAAO,IAAI,GAAG,KAAK,CAAC,MAAM,QAAQ,CAAC;4BACvC,OAAOA,OAAO,IAAI,GAAG,KAAK,CAAC,SAAS,QAAQ,CAAC;4BAC7C,OAAOA,OAAO,IAAI,GAAG,KAAK,CAAC;4BAC3B,aAAaA,OAAO,IAAI,GAAG,KAAK,CAAC;4BACjC,OAAOA,OACF,MAAM,GACN,KAAK,CAAC,SACN,IAAI,GACJ,MAAM,CAACC,CAAAA,aAAe;oCACnB,IAAIA,WAAW,IAAI,GAAG,KAAK,CAAC,MAAM,QAAQ,CAAC;gCAC/C;4BACJ,eAAeD,OACV,MAAM,GACN,IAAI,GACJ,KAAK,CAAC,iBACN,MAAM,CAACA,CAAAA,SAAW;oCACf,IAAIA,OAAO,IAAI,GAAG,KAAK,CAAC,MAAM,QAAQ,CAAC;gCAC3C;wBACR;gBACR;SACP;IACL;AACJ;AAEO,MAAME,gBAAgBC,aAAa,oBAAoB,CAAC;IAC3D,gBAAgBN;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -24,7 +24,8 @@ class WorkflowStateModelImpl {
|
|
|
24
24
|
return [
|
|
25
25
|
builder.private({
|
|
26
26
|
modelId: WORKFLOW_STATE_MODEL_ID,
|
|
27
|
-
name: "RecordWorkflow State"
|
|
27
|
+
name: "RecordWorkflow State",
|
|
28
|
+
lifecycleEvents: false
|
|
28
29
|
}).fields((fields)=>({
|
|
29
30
|
workflowId: fields.text().label("Workflow ID"),
|
|
30
31
|
app: fields.text().label("App").required("App is required."),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain/workflowState/stateModel.js","sources":["../../../src/domain/workflowState/stateModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport { WorkflowStateRecordState } from \"~/domain/workflowState/abstractions.js\";\n\nexport const WORKFLOW_STATE_MODEL_ID = \"wbyWorkflowState\";\n\nconst states = [\n {\n label: \"Pending\",\n value: WorkflowStateRecordState.pending\n },\n {\n label: \"In Review\",\n value: WorkflowStateRecordState.inReview\n },\n {\n label: \"Approved\",\n value: WorkflowStateRecordState.approved\n },\n {\n label: \"Rejected\",\n value: WorkflowStateRecordState.rejected\n }\n];\n\nclass WorkflowStateModelImpl implements ModelFactory.Interface {\n public async execute(builder: ModelFactory.Builder) {\n return [\n builder\n .private({\n modelId: WORKFLOW_STATE_MODEL_ID,\n name: \"RecordWorkflow State\"\n })\n .fields(fields => ({\n workflowId: fields.text().label(\"Workflow ID\"),\n app: fields.text().label(\"App\").required(\"App is required.\"),\n title: fields.text().label(\"Title\").required(\"Title is required.\"),\n targetRevisionId: fields.text().label(\"Target Revision ID\"),\n targetId: fields.text().label(\"Target ID\"),\n isActive: fields.boolean().label(\"Is Active\"),\n comment: fields.text().label(\"Comment\"),\n state: fields.text().label(\"State\").predefinedValues(states),\n targetContext: fields.json().label(\"Target Context\"),\n steps: fields\n .object()\n .label(\"Steps\")\n .list()\n .required(\"Steps are required.\")\n .listMinLength(1, \"At least one step is required.\")\n .fields(stepFields => ({\n id: stepFields.text().label(\"ID\").required(\"ID is required.\"),\n title: stepFields.text().label(\"Title\").required(\"Title is required.\"),\n color: stepFields.text().label(\"Color\").required(\"Color is required.\"),\n description: stepFields.text().label(\"Description\"),\n teams: stepFields\n .object()\n .label(\"Teams\")\n .list()\n .required(\"At least one team is required.\")\n .listMinLength(1, \"At least one team is required.\")\n .fields(teamFields => ({\n id: teamFields.text().label(\"ID\").required(\"ID is required.\")\n })),\n notifications: stepFields\n .object()\n .label(\"Notifications\")\n .list()\n .fields(notificationFields => ({\n id: notificationFields\n .text()\n .label(\"ID\")\n .required(\"ID is required.\")\n })),\n state: stepFields.text().label(\"State\").predefinedValues(states),\n savedBy: stepFields\n .object()\n .label(\"User\")\n .fields(userFields => ({\n id: userFields.text().label(\"ID\").required(\"ID is required.\"),\n displayName: userFields\n .text()\n .label(\"Display Name\")\n .required(\"Display name is required.\"),\n type: userFields\n .text()\n .label(\"Type\")\n .required(\"Type is required.\")\n })),\n comment: stepFields.text().label(\"Comment\")\n }))\n }))\n ];\n }\n}\n\nexport const WorkflowStateModel = ModelFactory.createImplementation({\n implementation: WorkflowStateModelImpl,\n dependencies: []\n});\n"],"names":["WORKFLOW_STATE_MODEL_ID","states","WorkflowStateRecordState","WorkflowStateModelImpl","builder","fields","stepFields","teamFields","notificationFields","userFields","WorkflowStateModel","ModelFactory"],"mappings":";;AAGO,MAAMA,0BAA0B;AAEvC,MAAMC,SAAS;IACX;QACI,OAAO;QACP,OAAOC,yBAAyB,OAAO;IAC3C;IACA;QACI,OAAO;QACP,OAAOA,yBAAyB,QAAQ;IAC5C;IACA;QACI,OAAO;QACP,OAAOA,yBAAyB,QAAQ;IAC5C;IACA;QACI,OAAO;QACP,OAAOA,yBAAyB,QAAQ;IAC5C;CACH;AAED,MAAMC;IACF,MAAa,QAAQC,OAA6B,EAAE;QAChD,OAAO;YACHA,QACK,OAAO,CAAC;gBACL,SAASJ;gBACT,MAAM;
|
|
1
|
+
{"version":3,"file":"domain/workflowState/stateModel.js","sources":["../../../src/domain/workflowState/stateModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport { WorkflowStateRecordState } from \"~/domain/workflowState/abstractions.js\";\n\nexport const WORKFLOW_STATE_MODEL_ID = \"wbyWorkflowState\";\n\nconst states = [\n {\n label: \"Pending\",\n value: WorkflowStateRecordState.pending\n },\n {\n label: \"In Review\",\n value: WorkflowStateRecordState.inReview\n },\n {\n label: \"Approved\",\n value: WorkflowStateRecordState.approved\n },\n {\n label: \"Rejected\",\n value: WorkflowStateRecordState.rejected\n }\n];\n\nclass WorkflowStateModelImpl implements ModelFactory.Interface {\n public async execute(builder: ModelFactory.Builder) {\n return [\n builder\n .private({\n modelId: WORKFLOW_STATE_MODEL_ID,\n name: \"RecordWorkflow State\",\n lifecycleEvents: false\n })\n .fields(fields => ({\n workflowId: fields.text().label(\"Workflow ID\"),\n app: fields.text().label(\"App\").required(\"App is required.\"),\n title: fields.text().label(\"Title\").required(\"Title is required.\"),\n targetRevisionId: fields.text().label(\"Target Revision ID\"),\n targetId: fields.text().label(\"Target ID\"),\n isActive: fields.boolean().label(\"Is Active\"),\n comment: fields.text().label(\"Comment\"),\n state: fields.text().label(\"State\").predefinedValues(states),\n targetContext: fields.json().label(\"Target Context\"),\n steps: fields\n .object()\n .label(\"Steps\")\n .list()\n .required(\"Steps are required.\")\n .listMinLength(1, \"At least one step is required.\")\n .fields(stepFields => ({\n id: stepFields.text().label(\"ID\").required(\"ID is required.\"),\n title: stepFields.text().label(\"Title\").required(\"Title is required.\"),\n color: stepFields.text().label(\"Color\").required(\"Color is required.\"),\n description: stepFields.text().label(\"Description\"),\n teams: stepFields\n .object()\n .label(\"Teams\")\n .list()\n .required(\"At least one team is required.\")\n .listMinLength(1, \"At least one team is required.\")\n .fields(teamFields => ({\n id: teamFields.text().label(\"ID\").required(\"ID is required.\")\n })),\n notifications: stepFields\n .object()\n .label(\"Notifications\")\n .list()\n .fields(notificationFields => ({\n id: notificationFields\n .text()\n .label(\"ID\")\n .required(\"ID is required.\")\n })),\n state: stepFields.text().label(\"State\").predefinedValues(states),\n savedBy: stepFields\n .object()\n .label(\"User\")\n .fields(userFields => ({\n id: userFields.text().label(\"ID\").required(\"ID is required.\"),\n displayName: userFields\n .text()\n .label(\"Display Name\")\n .required(\"Display name is required.\"),\n type: userFields\n .text()\n .label(\"Type\")\n .required(\"Type is required.\")\n })),\n comment: stepFields.text().label(\"Comment\")\n }))\n }))\n ];\n }\n}\n\nexport const WorkflowStateModel = ModelFactory.createImplementation({\n implementation: WorkflowStateModelImpl,\n dependencies: []\n});\n"],"names":["WORKFLOW_STATE_MODEL_ID","states","WorkflowStateRecordState","WorkflowStateModelImpl","builder","fields","stepFields","teamFields","notificationFields","userFields","WorkflowStateModel","ModelFactory"],"mappings":";;AAGO,MAAMA,0BAA0B;AAEvC,MAAMC,SAAS;IACX;QACI,OAAO;QACP,OAAOC,yBAAyB,OAAO;IAC3C;IACA;QACI,OAAO;QACP,OAAOA,yBAAyB,QAAQ;IAC5C;IACA;QACI,OAAO;QACP,OAAOA,yBAAyB,QAAQ;IAC5C;IACA;QACI,OAAO;QACP,OAAOA,yBAAyB,QAAQ;IAC5C;CACH;AAED,MAAMC;IACF,MAAa,QAAQC,OAA6B,EAAE;QAChD,OAAO;YACHA,QACK,OAAO,CAAC;gBACL,SAASJ;gBACT,MAAM;gBACN,iBAAiB;YACrB,GACC,MAAM,CAACK,CAAAA,SAAW;oBACf,YAAYA,OAAO,IAAI,GAAG,KAAK,CAAC;oBAChC,KAAKA,OAAO,IAAI,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC;oBACzC,OAAOA,OAAO,IAAI,GAAG,KAAK,CAAC,SAAS,QAAQ,CAAC;oBAC7C,kBAAkBA,OAAO,IAAI,GAAG,KAAK,CAAC;oBACtC,UAAUA,OAAO,IAAI,GAAG,KAAK,CAAC;oBAC9B,UAAUA,OAAO,OAAO,GAAG,KAAK,CAAC;oBACjC,SAASA,OAAO,IAAI,GAAG,KAAK,CAAC;oBAC7B,OAAOA,OAAO,IAAI,GAAG,KAAK,CAAC,SAAS,gBAAgB,CAACJ;oBACrD,eAAeI,OAAO,IAAI,GAAG,KAAK,CAA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ED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-workflows",
|
|
3
|
-
"version": "6.5.0-beta.
|
|
3
|
+
"version": "6.5.0-beta.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@webiny/api": "6.5.0-beta.
|
|
21
|
-
"@webiny/api-core": "6.5.0-beta.
|
|
22
|
-
"@webiny/api-headless-cms": "6.5.0-beta.
|
|
23
|
-
"@webiny/api-mailer": "6.5.0-beta.
|
|
24
|
-
"@webiny/feature": "6.5.0-beta.
|
|
25
|
-
"@webiny/handler": "6.5.0-beta.
|
|
26
|
-
"@webiny/handler-graphql": "6.5.0-beta.
|
|
27
|
-
"@webiny/utils": "6.5.0-beta.
|
|
20
|
+
"@webiny/api": "6.5.0-beta.4",
|
|
21
|
+
"@webiny/api-core": "6.5.0-beta.4",
|
|
22
|
+
"@webiny/api-headless-cms": "6.5.0-beta.4",
|
|
23
|
+
"@webiny/api-mailer": "6.5.0-beta.4",
|
|
24
|
+
"@webiny/feature": "6.5.0-beta.4",
|
|
25
|
+
"@webiny/handler": "6.5.0-beta.4",
|
|
26
|
+
"@webiny/handler-graphql": "6.5.0-beta.4",
|
|
27
|
+
"@webiny/utils": "6.5.0-beta.4",
|
|
28
28
|
"zod": "4.4.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@webiny/build-tools": "6.5.0-beta.
|
|
32
|
-
"@webiny/plugins": "6.5.0-beta.
|
|
33
|
-
"@webiny/project-utils": "6.5.0-beta.
|
|
34
|
-
"@webiny/testing": "6.5.0-beta.
|
|
31
|
+
"@webiny/build-tools": "6.5.0-beta.4",
|
|
32
|
+
"@webiny/plugins": "6.5.0-beta.4",
|
|
33
|
+
"@webiny/project-utils": "6.5.0-beta.4",
|
|
34
|
+
"@webiny/testing": "6.5.0-beta.4",
|
|
35
35
|
"type-fest": "5.8.0",
|
|
36
36
|
"typescript": "7.0.2",
|
|
37
37
|
"vitest": "4.1.10"
|