@strapi/review-workflows 0.0.0-experimental.a65a85fdea97faae8679d3ffc5f9d79af61abd26 → 0.0.0-experimental.abc

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 (60) hide show
  1. package/LICENSE +12 -17
  2. package/dist/_chunks/{Layout-2ZuobDLm.js → Layout-AREWDuuq.js} +11 -20
  3. package/dist/_chunks/Layout-AREWDuuq.js.map +1 -0
  4. package/dist/_chunks/{Layout-BlUjTO46.mjs → Layout-D5aa9iUm.mjs} +13 -20
  5. package/dist/_chunks/Layout-D5aa9iUm.mjs.map +1 -0
  6. package/dist/_chunks/{_id-yjWLof5q.js → _id-C7pCAzXV.js} +316 -371
  7. package/dist/_chunks/_id-C7pCAzXV.js.map +1 -0
  8. package/dist/_chunks/{_id-BuJ0Ud8T.mjs → _id-DDNHKV_W.mjs} +310 -363
  9. package/dist/_chunks/_id-DDNHKV_W.mjs.map +1 -0
  10. package/dist/_chunks/{index-CQGgid_7.js → index-Bv3cQ3c-.js} +16 -25
  11. package/dist/_chunks/index-Bv3cQ3c-.js.map +1 -0
  12. package/dist/_chunks/{index-qAnk2xH9.js → index-CIBLMG85.js} +163 -206
  13. package/dist/_chunks/index-CIBLMG85.js.map +1 -0
  14. package/dist/_chunks/{index-sU2Cg2WW.mjs → index-CeaoNBIP.mjs} +16 -23
  15. package/dist/_chunks/index-CeaoNBIP.mjs.map +1 -0
  16. package/dist/_chunks/{index-D91cCzpN.mjs → index-Cx5QECZI.mjs} +166 -207
  17. package/dist/_chunks/index-Cx5QECZI.mjs.map +1 -0
  18. package/dist/_chunks/{purchase-review-workflows-DyffLpyz.mjs → purchase-review-workflows-BN-5Ube7.mjs} +5 -4
  19. package/dist/_chunks/purchase-review-workflows-BN-5Ube7.mjs.map +1 -0
  20. package/dist/_chunks/{purchase-review-workflows-BaOk5p_m.js → purchase-review-workflows-DlCDg0fD.js} +4 -3
  21. package/dist/_chunks/purchase-review-workflows-DlCDg0fD.js.map +1 -0
  22. package/dist/_chunks/{router-DkLtLJRZ.mjs → router-BEoNwQZ1.mjs} +3 -3
  23. package/dist/_chunks/{router-DkLtLJRZ.mjs.map → router-BEoNwQZ1.mjs.map} +1 -1
  24. package/dist/_chunks/{router-n4oxCWpr.js → router-gRPIa2_c.js} +3 -3
  25. package/dist/_chunks/{router-n4oxCWpr.js.map → router-gRPIa2_c.js.map} +1 -1
  26. package/dist/admin/index.js +1 -1
  27. package/dist/admin/index.mjs +1 -1
  28. package/dist/admin/src/components/LimitsModal.d.ts +2 -4
  29. package/dist/admin/src/routes/settings/hooks/useDragAndDrop.d.ts +4 -4
  30. package/dist/admin/src/routes/settings/hooks/useKeyboardDragAndDrop.d.ts +1 -1
  31. package/dist/admin/src/routes/settings/hooks/useReviewWorkflows.d.ts +3 -3
  32. package/dist/admin/src/services/admin.d.ts +2 -2
  33. package/dist/admin/src/services/api.d.ts +2 -3
  34. package/dist/admin/src/services/content-manager.d.ts +6 -6
  35. package/dist/admin/src/services/settings.d.ts +1734 -8
  36. package/dist/admin/src/utils/api.d.ts +4 -19
  37. package/dist/server/index.js +0 -41
  38. package/dist/server/index.js.map +1 -1
  39. package/dist/server/index.mjs +0 -41
  40. package/dist/server/index.mjs.map +1 -1
  41. package/dist/server/src/controllers/index.d.ts +0 -1
  42. package/dist/server/src/controllers/index.d.ts.map +1 -1
  43. package/dist/server/src/controllers/workflows.d.ts +0 -7
  44. package/dist/server/src/controllers/workflows.d.ts.map +1 -1
  45. package/dist/server/src/index.d.ts +0 -1
  46. package/dist/server/src/index.d.ts.map +1 -1
  47. package/dist/server/src/routes/review-workflows.d.ts.map +1 -1
  48. package/dist/shared/contracts/review-workflows.d.ts +1 -14
  49. package/dist/shared/contracts/review-workflows.d.ts.map +1 -1
  50. package/package.json +14 -15
  51. package/dist/_chunks/Layout-2ZuobDLm.js.map +0 -1
  52. package/dist/_chunks/Layout-BlUjTO46.mjs.map +0 -1
  53. package/dist/_chunks/_id-BuJ0Ud8T.mjs.map +0 -1
  54. package/dist/_chunks/_id-yjWLof5q.js.map +0 -1
  55. package/dist/_chunks/index-CQGgid_7.js.map +0 -1
  56. package/dist/_chunks/index-D91cCzpN.mjs.map +0 -1
  57. package/dist/_chunks/index-qAnk2xH9.js.map +0 -1
  58. package/dist/_chunks/index-sU2Cg2WW.mjs.map +0 -1
  59. package/dist/_chunks/purchase-review-workflows-BaOk5p_m.js.map +0 -1
  60. package/dist/_chunks/purchase-review-workflows-DyffLpyz.mjs.map +0 -1
@@ -1,22 +1,7 @@
1
1
  import { SerializedError } from '@reduxjs/toolkit';
2
- import { BaseQueryFn } from '@reduxjs/toolkit/query';
3
- import { ApiError } from '@strapi/admin/strapi-admin';
4
- import { type AxiosRequestConfig } from 'axios';
5
- export interface QueryArguments {
6
- url: string;
7
- method?: AxiosRequestConfig['method'];
8
- data?: AxiosRequestConfig['data'];
9
- config?: AxiosRequestConfig;
10
- }
11
- export interface UnknownApiError {
12
- name: 'UnknownError';
13
- message: string;
14
- details?: unknown;
15
- status?: number;
16
- }
17
- export type BaseQueryError = ApiError | UnknownApiError;
18
- declare const axiosBaseQuery: () => BaseQueryFn<string | QueryArguments, unknown, BaseQueryError>;
19
- declare const isBaseQueryError: (error: BaseQueryError | SerializedError) => error is BaseQueryError;
2
+ import { type UnknownApiError, type ApiError } from '@strapi/admin/strapi-admin';
3
+ export type BaseQueryError = ApiError | UnknownApiError | SerializedError;
4
+ declare const isBaseQueryError: (error: BaseQueryError) => error is ApiError | UnknownApiError;
20
5
  interface Query {
21
6
  plugins?: Record<string, unknown>;
22
7
  _q?: string;
@@ -35,4 +20,4 @@ type TransformedQuery<TQuery extends Query> = Omit<TQuery, 'plugins'> & {
35
20
  * ie. plugins[18n][locale]=en becomes locale=en
36
21
  */
37
22
  declare const buildValidParams: <TQuery extends Query>(query: TQuery) => TransformedQuery<TQuery>;
38
- export { axiosBaseQuery, isBaseQueryError, buildValidParams };
23
+ export { isBaseQueryError, buildValidParams };
@@ -6838,23 +6838,6 @@ const reviewWorkflows = {
6838
6838
  ]
6839
6839
  }
6840
6840
  },
6841
- {
6842
- method: "GET",
6843
- path: "/workflows/:id",
6844
- handler: "workflows.findById",
6845
- config: {
6846
- middlewares: [enableFeatureMiddleware("review-workflows")],
6847
- policies: [
6848
- "admin::isAuthenticatedAdmin",
6849
- {
6850
- name: "admin::hasPermissions",
6851
- config: {
6852
- actions: ["admin::review-workflows.read"]
6853
- }
6854
- }
6855
- ]
6856
- }
6857
- },
6858
6841
  {
6859
6842
  method: "GET",
6860
6843
  path: "/workflows/:workflow_id/stages",
@@ -8029,30 +8012,6 @@ const workflows = {
8029
8012
  workflowCount
8030
8013
  }
8031
8014
  };
8032
- },
8033
- /**
8034
- * Get one workflow based on its id contained in request parameters
8035
- * Returns count of workflows in meta, used to prevent workflow edition when
8036
- * max workflow count is reached for the current plan
8037
- * @param {import('koa').BaseContext} ctx - koa context
8038
- */
8039
- async findById(ctx) {
8040
- const { id } = ctx.params;
8041
- const { query } = ctx.request;
8042
- const { sanitizeOutput, sanitizedQuery } = getWorkflowsPermissionChecker(
8043
- { strapi },
8044
- ctx.state.userAbility
8045
- );
8046
- const { populate } = await sanitizedQuery.read(query);
8047
- const workflowService = getService("workflows");
8048
- const [workflow2, workflowCount] = await Promise.all([
8049
- workflowService.findById(id, { populate }).then(formatWorkflowToAdmin),
8050
- workflowService.count()
8051
- ]);
8052
- ctx.body = {
8053
- data: await sanitizeOutput(workflow2),
8054
- meta: { workflowCount }
8055
- };
8056
8015
  }
8057
8016
  };
8058
8017
  function sanitizeStage({ strapi: strapi2 }, userAbility) {