@webiny/api-headless-cms-workflows 0.0.0-unstable.ac6ebf63c6 → 0.0.0-unstable.b6d7105cee

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 (59) hide show
  1. package/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.d.ts +15 -0
  2. package/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.js +35 -0
  3. package/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.js.map +1 -0
  4. package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.d.ts +13 -0
  5. package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.js +45 -0
  6. package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.js.map +1 -0
  7. package/features/EntryWorkflows/errors.d.ts +11 -0
  8. package/features/EntryWorkflows/errors.js +12 -0
  9. package/features/EntryWorkflows/errors.js.map +1 -0
  10. package/features/EntryWorkflows/feature.d.ts +4 -1
  11. package/features/EntryWorkflows/feature.js +19 -10
  12. package/features/EntryWorkflows/feature.js.map +1 -1
  13. package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.d.ts +11 -0
  14. package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.js +37 -0
  15. package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.js.map +1 -0
  16. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.d.ts +1 -1
  17. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.js +24 -22
  18. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.js.map +1 -1
  19. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.d.ts +13 -0
  20. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.js +35 -0
  21. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.js.map +1 -0
  22. package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.d.ts +1 -1
  23. package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.js +16 -19
  24. package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.js.map +1 -1
  25. package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.d.ts +1 -1
  26. package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.js +28 -32
  27. package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.js.map +1 -1
  28. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.d.ts +1 -1
  29. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.js +25 -23
  30. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.js.map +1 -1
  31. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.d.ts +1 -1
  32. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.js +24 -23
  33. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.js.map +1 -1
  34. package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.d.ts +1 -1
  35. package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.js +34 -36
  36. package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.js.map +1 -1
  37. package/features/EntryWorkflows/index.js +0 -2
  38. package/features/Workflows/feature.d.ts +4 -1
  39. package/features/Workflows/feature.js +6 -5
  40. package/features/Workflows/feature.js.map +1 -1
  41. package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.d.ts +1 -1
  42. package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.js +17 -22
  43. package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.js.map +1 -1
  44. package/features/Workflows/index.js +0 -2
  45. package/graphql/entrySystemSchema.d.ts +2 -0
  46. package/graphql/entrySystemSchema.js +18 -0
  47. package/graphql/entrySystemSchema.js.map +1 -0
  48. package/index.js +12 -13
  49. package/index.js.map +1 -1
  50. package/package.json +25 -18
  51. package/utils/appName.js +6 -11
  52. package/utils/appName.js.map +1 -1
  53. package/utils/modelAllowed.js +5 -9
  54. package/utils/modelAllowed.js.map +1 -1
  55. package/utils/state.d.ts +2 -2
  56. package/utils/state.js +9 -8
  57. package/utils/state.js.map +1 -1
  58. package/features/EntryWorkflows/index.js.map +0 -1
  59. package/features/Workflows/index.js.map +0 -1
package/utils/state.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import type { IEntryState } from "@webiny/api-headless-cms/types/index.js";
1
+ import type { ICmsEntryWorkflowState } from "@webiny/api-workflows/types.js";
2
2
  import type { WorkflowState } from "@webiny/api-workflows/domain/workflowState/WorkflowState.js";
3
- export declare const getStateValues: (state: WorkflowState) => IEntryState;
3
+ export declare const getStateValues: (state: WorkflowState) => ICmsEntryWorkflowState;
package/utils/state.js CHANGED
@@ -1,11 +1,12 @@
1
- export const getStateValues = state => {
2
- const activeStep = state.currentStep;
3
- return {
4
- workflowId: state.workflowId,
5
- stepId: activeStep.id,
6
- stepName: activeStep.title,
7
- state: activeStep.state
8
- };
1
+ const getStateValues = (state)=>{
2
+ const activeStep = state.currentStep;
3
+ return {
4
+ workflowId: state.workflowId,
5
+ stepId: activeStep.id,
6
+ stepName: activeStep.title,
7
+ state: activeStep.state
8
+ };
9
9
  };
10
+ export { getStateValues };
10
11
 
11
12
  //# sourceMappingURL=state.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getStateValues","state","activeStep","currentStep","workflowId","stepId","id","stepName","title"],"sources":["state.ts"],"sourcesContent":["import type { IEntryState } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { WorkflowState } from \"@webiny/api-workflows/domain/workflowState/WorkflowState.js\";\n\nexport const getStateValues = (state: WorkflowState): IEntryState => {\n const activeStep = state.currentStep;\n\n return {\n workflowId: state.workflowId,\n stepId: activeStep.id,\n stepName: activeStep.title,\n state: activeStep.state\n };\n};\n"],"mappings":"AAGA,OAAO,MAAMA,cAAc,GAAIC,KAAoB,IAAkB;EACjE,MAAMC,UAAU,GAAGD,KAAK,CAACE,WAAW;EAEpC,OAAO;IACHC,UAAU,EAAEH,KAAK,CAACG,UAAU;IAC5BC,MAAM,EAAEH,UAAU,CAACI,EAAE;IACrBC,QAAQ,EAAEL,UAAU,CAACM,KAAK;IAC1BP,KAAK,EAAEC,UAAU,CAACD;EACtB,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"utils/state.js","sources":["../../src/utils/state.ts"],"sourcesContent":["import type { ICmsEntryWorkflowState } from \"@webiny/api-workflows/types.js\";\nimport type { WorkflowState } from \"@webiny/api-workflows/domain/workflowState/WorkflowState.js\";\n\nexport const getStateValues = (state: WorkflowState): ICmsEntryWorkflowState => {\n const activeStep = state.currentStep;\n\n return {\n workflowId: state.workflowId,\n stepId: activeStep.id,\n stepName: activeStep.title,\n state: activeStep.state\n };\n};\n"],"names":["getStateValues","state","activeStep"],"mappings":"AAGO,MAAMA,iBAAiB,CAACC;IAC3B,MAAMC,aAAaD,MAAM,WAAW;IAEpC,OAAO;QACH,YAAYA,MAAM,UAAU;QAC5B,QAAQC,WAAW,EAAE;QACrB,UAAUA,WAAW,KAAK;QAC1B,OAAOA,WAAW,KAAK;IAC3B;AACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["EntryWorkflowsFeature"],"sources":["index.ts"],"sourcesContent":["export { EntryWorkflowsFeature } from \"./feature.js\";\n"],"mappings":"AAAA,SAASA,qBAAqB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["WorkflowsFeature"],"sources":["index.ts"],"sourcesContent":["export { WorkflowsFeature } from \"./feature.js\";\n"],"mappings":"AAAA,SAASA,gBAAgB","ignoreList":[]}