@mattisvensson/strapi-plugin-webatlas 0.13.0 → 0.14.0

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 (184) hide show
  1. package/dist/admin/{ContentBox-D4PGQ8eh.js → ContentBox-CHwpYMiB.js} +1 -1
  2. package/dist/admin/{ContentBox-KyQN2KGV.mjs → ContentBox-CYnyB_5a.mjs} +1 -1
  3. package/dist/admin/{RoutePicker-CgndSXoF.mjs → RoutePicker-43YnYCpH.mjs} +1 -1
  4. package/dist/admin/{RoutePicker-CwoMMhf_.js → RoutePicker-D9zf-VdN.js} +1 -1
  5. package/dist/admin/{de-Cl0vM1wA.js → de-DolV3m7M.js} +64 -1
  6. package/dist/admin/{de-DWs5ckOd.mjs → de-Dt3jjL3h.mjs} +64 -1
  7. package/dist/admin/{en-CyhISGZi.mjs → en-CCRmKJEV.mjs} +63 -0
  8. package/dist/admin/{en-DSmtmPYk.js → en-jWdO5RMZ.js} +63 -0
  9. package/dist/admin/{index-uOC1Clyv.js → index-7iO5UsYI.js} +2 -2
  10. package/dist/admin/{index-Bv5Ri-ri.mjs → index-B2k8Pikg.mjs} +2 -2
  11. package/dist/admin/{index-Ctm4TBT5.mjs → index-CK4JyItR.mjs} +63 -8
  12. package/dist/admin/{index-BKhrfzjO.mjs → index-CMuhLgfi.mjs} +16 -11
  13. package/dist/admin/{index-BxGPKxr_.js → index-Ciem6YTr.js} +2 -2
  14. package/dist/admin/{index-FvaXwOH0.mjs → index-DGYmrx3f.mjs} +2 -2
  15. package/dist/admin/index-Ddnt9W-v.mjs +1025 -0
  16. package/dist/admin/{index-JBUU7dE6.js → index-DfG_hSMk.js} +60 -5
  17. package/dist/admin/{index-DTrsl_uN.js → index-DmOWQK6g.js} +12 -7
  18. package/dist/admin/index-dB79zyxi.js +1025 -0
  19. package/dist/admin/index.js +1 -1
  20. package/dist/admin/index.mjs +1 -1
  21. package/dist/admin/src/components/CMEditViewAside/NewPathInfo.d.ts +5 -0
  22. package/dist/admin/src/components/CMEditViewAside/OverrideCheckbox.d.ts +7 -0
  23. package/dist/admin/src/components/CMEditViewAside/Panel.d.ts +5 -0
  24. package/dist/admin/src/components/CMEditViewAside/PathInput.d.ts +12 -0
  25. package/dist/admin/src/components/CMEditViewAside/RouteStructure.d.ts +3 -0
  26. package/dist/admin/src/components/CMEditViewAside/UidPathDisplay.d.ts +4 -0
  27. package/dist/admin/src/components/CMEditViewAside/index.d.ts +3 -0
  28. package/dist/admin/src/components/Initializer.d.ts +5 -0
  29. package/dist/admin/src/components/PathInfo.d.ts +8 -0
  30. package/dist/admin/src/components/PluginIcon.d.ts +3 -0
  31. package/dist/admin/src/components/Tooltip.d.ts +3 -0
  32. package/dist/admin/src/components/UI/Center.d.ts +4 -0
  33. package/dist/admin/src/components/UI/EmptyBox.d.ts +5 -0
  34. package/dist/admin/src/components/UI/FullLoader.d.ts +3 -0
  35. package/dist/admin/src/components/UI/WarningBox.d.ts +4 -0
  36. package/dist/admin/src/components/UI/index.d.ts +5 -0
  37. package/dist/admin/src/components/customFields/RoutePicker.d.ts +25 -0
  38. package/dist/admin/src/components/modals/Delete.d.ts +7 -0
  39. package/dist/admin/src/components/modals/DiscardChanges.d.ts +3 -0
  40. package/dist/admin/src/components/modals/NavCreate.d.ts +1 -0
  41. package/dist/admin/src/components/modals/NavEdit.d.ts +7 -0
  42. package/dist/admin/src/components/modals/NavModal.d.ts +16 -0
  43. package/dist/admin/src/components/modals/NavOverview.d.ts +10 -0
  44. package/dist/admin/src/components/modals/SaveConfirm.d.ts +8 -0
  45. package/dist/admin/src/components/modals/externalItem/index.d.ts +15 -0
  46. package/dist/admin/src/components/modals/index.d.ts +14 -0
  47. package/dist/admin/src/components/modals/internalItem/EntrySelection.d.ts +17 -0
  48. package/dist/admin/src/components/modals/internalItem/ItemDetails.d.ts +13 -0
  49. package/dist/admin/src/components/modals/internalItem/MultiItemReview.d.ts +23 -0
  50. package/dist/admin/src/components/modals/internalItem/internalItemCreate.d.ts +2 -0
  51. package/dist/admin/src/components/modals/internalItem/internalItemEdit.d.ts +2 -0
  52. package/dist/admin/src/components/modals/useModalSharedLogic.d.ts +2 -0
  53. package/dist/admin/src/components/modals/withModalSharedLogic.d.ts +3 -0
  54. package/dist/admin/src/components/modals/wrapperItem/index.d.ts +15 -0
  55. package/dist/admin/src/contexts/index.d.ts +17 -0
  56. package/dist/admin/src/hooks/index.d.ts +7 -0
  57. package/dist/admin/src/hooks/useAllContentTypes.d.ts +7 -0
  58. package/dist/admin/src/hooks/useAllEntities.d.ts +7 -0
  59. package/dist/admin/src/hooks/useApi.d.ts +23 -0
  60. package/dist/admin/src/hooks/useEntrySearch.d.ts +13 -0
  61. package/dist/admin/src/hooks/useErrorMessage.d.ts +8 -0
  62. package/dist/admin/src/hooks/usePluginConfig.d.ts +9 -0
  63. package/dist/admin/src/pages/Navigation/Page.d.ts +2 -0
  64. package/dist/admin/src/pages/Navigation/PageWrapper.d.ts +8 -0
  65. package/dist/admin/src/pages/Navigation/RouteItem.d.ts +2 -0
  66. package/dist/admin/src/pages/Navigation/RouteItemBadge.d.ts +4 -0
  67. package/dist/admin/src/pages/Navigation/RouteItemIcon.d.ts +5 -0
  68. package/dist/admin/src/pages/Navigation/RouteItemMenu.d.ts +12 -0
  69. package/dist/admin/src/pages/Navigation/RouteItemStatus.d.ts +5 -0
  70. package/dist/admin/src/pages/Navigation/SortableRouteItem.d.ts +2 -0
  71. package/dist/admin/src/pages/Navigation/UnsavedChangesBlocker.d.ts +8 -0
  72. package/dist/admin/src/pages/Navigation/index.d.ts +2 -0
  73. package/dist/admin/src/pages/Navigation/useCollapsedItems.d.ts +13 -0
  74. package/dist/admin/src/pages/Paths/HealthSummary.d.ts +8 -0
  75. package/dist/admin/src/pages/Paths/IssueBadges.d.ts +4 -0
  76. package/dist/admin/src/pages/Paths/PageWrapper.d.ts +5 -0
  77. package/dist/admin/src/pages/Paths/PathActionsMenu.d.ts +7 -0
  78. package/dist/admin/src/pages/Paths/PathFilters.d.ts +14 -0
  79. package/dist/admin/src/pages/Paths/PathTable.d.ts +18 -0
  80. package/dist/admin/src/pages/Paths/SearchInput.d.ts +5 -0
  81. package/dist/admin/src/pages/Paths/TableHeader.d.ts +6 -0
  82. package/dist/admin/src/pages/Paths/TableRow.d.ts +9 -0
  83. package/dist/admin/src/pages/Paths/compareBy.d.ts +3 -0
  84. package/dist/admin/src/pages/Paths/hasPathDeviation.d.ts +2 -0
  85. package/dist/admin/src/pages/Paths/healthMessages.d.ts +11 -0
  86. package/dist/admin/src/pages/Paths/index.d.ts +2 -0
  87. package/dist/admin/src/pages/Settings/ContentBox.d.ts +4 -0
  88. package/dist/admin/src/pages/Settings/General/ContentTypeAccordion.d.ts +9 -0
  89. package/dist/admin/src/pages/Settings/General/index.d.ts +2 -0
  90. package/dist/admin/src/pages/Settings/Navigation/index.d.ts +2 -0
  91. package/dist/admin/src/pages/Settings/PageWrapper.d.ts +7 -0
  92. package/dist/admin/src/pages/Settings/SettingTitle.d.ts +3 -0
  93. package/dist/admin/src/pages/Settings/index.d.ts +4 -0
  94. package/dist/admin/src/permissions.d.ts +51 -0
  95. package/dist/admin/src/types/index.d.ts +4 -0
  96. package/dist/admin/src/types/modal.d.ts +60 -0
  97. package/dist/admin/src/types/navigation.d.ts +24 -0
  98. package/dist/admin/src/types/panel.d.ts +50 -0
  99. package/dist/admin/src/types/route.d.ts +3 -0
  100. package/dist/admin/src/utils/buildBreadcrumbString.d.ts +16 -0
  101. package/dist/admin/src/utils/createTempNavItemObject.d.ts +22 -0
  102. package/dist/admin/src/utils/debounce.d.ts +1 -0
  103. package/dist/admin/src/utils/dnd.d.ts +13 -0
  104. package/dist/admin/src/utils/duplicateCheck.d.ts +19 -0
  105. package/dist/admin/src/utils/findParentNavItem.d.ts +13 -0
  106. package/dist/admin/src/utils/getRouteSourceFields.d.ts +2 -0
  107. package/dist/admin/src/utils/getTranslation.d.ts +2 -0
  108. package/dist/admin/src/utils/index.d.ts +11 -0
  109. package/dist/admin/src/utils/isAbortError.d.ts +5 -0
  110. package/dist/admin/src/utils/navTree.d.ts +39 -0
  111. package/dist/admin/src/utils/syncNavItemPaths.d.ts +12 -0
  112. package/dist/admin/src/utils/typeChecks.d.ts +3 -0
  113. package/dist/server/index.js +270 -2
  114. package/dist/server/index.mjs +270 -2
  115. package/dist/server/src/bootstrap/documentMiddleware.d.ts +18 -0
  116. package/dist/server/src/bootstrap/index.d.ts +5 -0
  117. package/dist/server/src/bootstrap/permissions.d.ts +2 -0
  118. package/dist/server/src/bootstrap/syncConfig.d.ts +3 -0
  119. package/dist/server/src/bootstrap/webatlasMiddleware.d.ts +2 -0
  120. package/dist/server/src/bootstrap.d.ts +5 -0
  121. package/dist/server/src/config/index.d.ts +8 -0
  122. package/dist/server/src/content-types/index.d.ts +208 -0
  123. package/dist/server/src/content-types/navigation/index.d.ts +56 -0
  124. package/dist/server/src/content-types/navigation/schema.d.ts +54 -0
  125. package/dist/server/src/content-types/navitem/index.d.ts +51 -0
  126. package/dist/server/src/content-types/navitem/schema.d.ts +49 -0
  127. package/dist/server/src/content-types/route/index.d.ts +101 -0
  128. package/dist/server/src/content-types/route/schema.d.ts +99 -0
  129. package/dist/server/src/controllers/admin.d.ts +19 -0
  130. package/dist/server/src/controllers/client.d.ts +8 -0
  131. package/dist/server/src/controllers/index.d.ts +27 -0
  132. package/dist/server/src/destroy.d.ts +5 -0
  133. package/dist/server/src/index.d.ts +15 -5
  134. package/dist/server/src/middlewares/addWebatlasField.d.ts +10 -0
  135. package/dist/server/src/middlewares/enrichRoutePicker.d.ts +10 -0
  136. package/dist/server/src/middlewares/index.d.ts +9 -0
  137. package/dist/server/src/migrations/001-canonical-path.d.ts +7 -0
  138. package/dist/server/src/migrations/002-webatlas-json-field.d.ts +7 -0
  139. package/dist/server/src/migrations/003-route-source-field.d.ts +7 -0
  140. package/dist/server/src/migrations/004-navigation-max-depth.d.ts +7 -0
  141. package/dist/server/src/migrations/index.d.ts +3 -0
  142. package/dist/server/src/policies/has-permissions.d.ts +2 -0
  143. package/dist/server/src/policies/index.d.ts +4 -0
  144. package/dist/server/src/register.d.ts +5 -0
  145. package/dist/server/src/routes/admin.d.ts +17 -0
  146. package/dist/server/src/routes/client.d.ts +12 -0
  147. package/dist/server/src/routes/index.d.ts +30 -0
  148. package/dist/server/src/services/admin.d.ts +33 -0
  149. package/dist/server/src/services/client.d.ts +48 -0
  150. package/dist/server/src/services/health.d.ts +5 -0
  151. package/dist/server/src/services/index.d.ts +83 -0
  152. package/dist/server/src/utils/addWebatlasBreadcrumb.d.ts +14 -0
  153. package/dist/server/src/utils/assertDescendantPathsAllowed.d.ts +19 -0
  154. package/dist/server/src/utils/assertPathAllowed.d.ts +2 -0
  155. package/dist/server/src/utils/buildCanonicalPath.d.ts +1 -0
  156. package/dist/server/src/utils/buildNavigationPath.d.ts +5 -0
  157. package/dist/server/src/utils/buildStructuredNavigation.d.ts +12 -0
  158. package/dist/server/src/utils/cascadePathUpdates.d.ts +6 -0
  159. package/dist/server/src/utils/cleanRootKeys.d.ts +1 -0
  160. package/dist/server/src/utils/duplicateCheck.d.ts +1 -0
  161. package/dist/server/src/utils/enrichRoutePickerFields.d.ts +7 -0
  162. package/dist/server/src/utils/enrichWebatlasData.d.ts +6 -0
  163. package/dist/server/src/utils/extractRouteAndItems.d.ts +32 -0
  164. package/dist/server/src/utils/getDocumentStatuses.d.ts +12 -0
  165. package/dist/server/src/utils/getNonInternalRouteIds.d.ts +1 -0
  166. package/dist/server/src/utils/getPublishedDocumentIds.d.ts +11 -0
  167. package/dist/server/src/utils/getRouteAncestors.d.ts +1 -0
  168. package/dist/server/src/utils/getRouteDescendants.d.ts +1 -0
  169. package/dist/server/src/utils/health/checks.d.ts +48 -0
  170. package/dist/server/src/utils/index.d.ts +29 -0
  171. package/dist/server/src/utils/isBlacklistedPath.d.ts +1 -0
  172. package/dist/server/src/utils/navItemHandler.d.ts +5 -0
  173. package/dist/server/src/utils/navigationItemStructure.d.ts +27 -0
  174. package/dist/server/src/utils/normalizeRouteBlacklist.d.ts +5 -0
  175. package/dist/server/src/utils/pluginHelpers.d.ts +4 -0
  176. package/dist/server/src/utils/populateDeep.d.ts +4 -0
  177. package/dist/server/src/utils/reduceDepthOfOrphanedItems.d.ts +2 -0
  178. package/dist/server/src/utils/removeUnpublishedNavItems.d.ts +7 -0
  179. package/dist/server/src/utils/removeWaFields.d.ts +1 -0
  180. package/dist/server/src/utils/routeHandler.d.ts +5 -0
  181. package/dist/server/src/utils/validateRouteDependencies.d.ts +4 -0
  182. package/package.json +5 -5
  183. package/dist/admin/index-D2O7sLKs.mjs +0 -249
  184. package/dist/admin/index-jOCO4_-k.js +0 -249
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  getConfig(ctx: any): Promise<any>;
22
22
  getRoute(ctx: any): Promise<any>;
23
23
  getAllRoutes(ctx: any): Promise<any>;
24
+ getHealthReport(ctx: any): Promise<any>;
24
25
  getRelatedRoute(ctx: any): Promise<any>;
25
26
  getRelatedRoutes(ctx: any): Promise<any>;
26
27
  getNavigationDepths(ctx: any): Promise<any>;
@@ -79,7 +80,7 @@ declare const _default: {
79
80
  getAllRoutes(): Promise<any>;
80
81
  getRelatedRoute(documentId: string): Promise<any>;
81
82
  getRelatedRoutes(documentIds: string[]): Promise<any>;
82
- getProhibitedRouteIds(documentId: string): Promise<string[]>;
83
+ getProhibitedRouteIds(documentId: string | undefined): Promise<string[]>;
83
84
  getNavigation(documentId?: string, variant?: import('../../types').StructuredNavigationVariant | "namesOnly"): Promise<any>;
84
85
  createNavigation(name: string, visible: boolean): Promise<any>;
85
86
  updateNavigation(documentId: string, data: import('../../types').NavigationInput): Promise<any>;
@@ -93,7 +94,7 @@ declare const _default: {
93
94
  success: boolean;
94
95
  errors: string[];
95
96
  }>;
96
- checkUniquePath(initialPath: string, targetRouteDocumentId?: string): Promise<{
97
+ checkUniquePath(initialPath: string, targetRouteDocumentId?: string | null): Promise<{
97
98
  blacklisted: boolean;
98
99
  uniquePath?: undefined;
99
100
  } | {
@@ -104,7 +105,7 @@ declare const _default: {
104
105
  client: ({ strapi }: {
105
106
  strapi: any;
106
107
  }) => {
107
- getEntityByPath(slug: string, populate: string, populateDeepDepth: number, fields: any, status?: "published" | "draft", breadcrumb?: boolean, auth?: any): Promise<any>;
108
+ getEntityByPath(slug: string, populate: string, populateDeepDepth: number, fields: any, status?: "draft" | "published", breadcrumb?: boolean, auth?: any): Promise<any>;
108
109
  getNavigation(id: string, name: string, slug: string, documentId: string, variant?: import('../../types').StructuredNavigationVariant): Promise<{
109
110
  items: {
110
111
  depth: any;
@@ -122,9 +123,15 @@ declare const _default: {
122
123
  type: import('../../types').RouteType;
123
124
  active: boolean;
124
125
  isOverride: boolean;
125
- navitem: {
126
+ navitem?: {
126
127
  id: number;
127
- };
128
+ documentId: string;
129
+ navigation?: {
130
+ id: number;
131
+ documentId: string;
132
+ name: string;
133
+ } | null;
134
+ }[] | null;
128
135
  parent?: import('../../types').Route;
129
136
  children?: import('../../types').Route[];
130
137
  createdAt: string;
@@ -141,6 +148,9 @@ declare const _default: {
141
148
  createdAt: string;
142
149
  }>;
143
150
  };
151
+ health: () => {
152
+ getHealthReport(): Promise<import('../../types').HealthReport>;
153
+ };
144
154
  };
145
155
  contentTypes: {
146
156
  route: {
@@ -0,0 +1,10 @@
1
+ import { Core } from '@strapi/strapi';
2
+ /**
3
+ * Middleware to add a webatlas field in Content API responses
4
+ * Uses enrichWebatlasData utility to recursively enrich entities with webatlas data
5
+ * Works for nested relations, components, and dynamic zones
6
+ */
7
+ declare const _default: ({ strapi }: {
8
+ strapi: Core.Strapi;
9
+ }) => (ctx: any, next: any) => Promise<void>;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { Core } from '@strapi/strapi';
2
+ /**
3
+ * Middleware to enrich route-picker custom fields in Content API responses
4
+ * Replaces documentId values with actual route paths for internal routes
5
+ * Leaves external URLs unchanged
6
+ */
7
+ declare const _default: ({ strapi }: {
8
+ strapi: Core.Strapi;
9
+ }) => (ctx: any, next: any) => Promise<void>;
10
+ export default _default;
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ addWebatlasField: ({ strapi }: {
3
+ strapi: import('@strapi/types/dist/core').Strapi;
4
+ }) => (ctx: any, next: any) => Promise<void>;
5
+ enrichRoutePicker: ({ strapi }: {
6
+ strapi: import('@strapi/types/dist/core').Strapi;
7
+ }) => (ctx: any, next: any) => Promise<void>;
8
+ };
9
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Core } from '@strapi/strapi';
2
+ declare const _default: {
3
+ version: string;
4
+ description: string;
5
+ up(strapi: Core.Strapi): Promise<void>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Core } from '@strapi/strapi';
2
+ declare const _default: {
3
+ version: string;
4
+ description: string;
5
+ up(strapi: Core.Strapi): Promise<void>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Core } from '@strapi/strapi';
2
+ declare const _default: {
3
+ version: string;
4
+ description: string;
5
+ up(strapi: Core.Strapi): Promise<void>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Core } from '@strapi/strapi';
2
+ declare const _default: {
3
+ version: string;
4
+ description: string;
5
+ up(strapi: Core.Strapi): Promise<void>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { Core } from '@strapi/strapi';
2
+ export declare const runMigrations: (strapi: Core.Strapi) => Promise<void>;
3
+ export default runMigrations;
@@ -0,0 +1,2 @@
1
+ declare const _default: (policyContext: any, config: any, { strapi }: any) => boolean;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ 'has-permissions': (policyContext: any, config: any, { strapi }: any) => boolean;
3
+ };
4
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { Core } from '@strapi/strapi';
2
+ declare const _default: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => void;
5
+ export default _default;
@@ -0,0 +1,17 @@
1
+ declare const _default: {
2
+ type: string;
3
+ routes: {
4
+ method: string;
5
+ path: string;
6
+ handler: string;
7
+ config: {
8
+ policies: (string | {
9
+ name: string;
10
+ config: {
11
+ actions: string[];
12
+ };
13
+ })[];
14
+ };
15
+ }[];
16
+ };
17
+ export default _default;
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ type: string;
3
+ routes: {
4
+ method: string;
5
+ path: string;
6
+ handler: string;
7
+ config: {
8
+ policies: any[];
9
+ };
10
+ }[];
11
+ };
12
+ export default _default;
@@ -0,0 +1,30 @@
1
+ declare const _default: {
2
+ admin: {
3
+ type: string;
4
+ routes: {
5
+ method: string;
6
+ path: string;
7
+ handler: string;
8
+ config: {
9
+ policies: (string | {
10
+ name: string;
11
+ config: {
12
+ actions: string[];
13
+ };
14
+ })[];
15
+ };
16
+ }[];
17
+ };
18
+ 'content-api': {
19
+ type: string;
20
+ routes: {
21
+ method: string;
22
+ path: string;
23
+ handler: string;
24
+ config: {
25
+ policies: any[];
26
+ };
27
+ }[];
28
+ };
29
+ };
30
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import { NavigationInput, NavigationDepth, NestedNavItem, PluginConfig, StructuredNavigationVariant } from '../../../types';
2
+ declare const _default: ({ strapi }: {
3
+ strapi: any;
4
+ }) => {
5
+ updateConfig(newConfig: Partial<PluginConfig>): Promise<PluginConfig>;
6
+ getConfig(): Promise<any>;
7
+ getRoute(documentId: string): Promise<any>;
8
+ getAllRoutes(): Promise<any>;
9
+ getRelatedRoute(documentId: string): Promise<any>;
10
+ getRelatedRoutes(documentIds: string[]): Promise<any>;
11
+ getProhibitedRouteIds(documentId: string | undefined): Promise<string[]>;
12
+ getNavigation(documentId?: string, variant?: StructuredNavigationVariant | "namesOnly"): Promise<any>;
13
+ createNavigation(name: string, visible: boolean): Promise<any>;
14
+ updateNavigation(documentId: string, data: NavigationInput): Promise<any>;
15
+ getNavigationDepths(): Promise<NavigationDepth[]>;
16
+ updateNavigationDepths(depths: {
17
+ documentId: string;
18
+ maxDepth: number;
19
+ }[]): Promise<NavigationDepth[]>;
20
+ deleteNavigation(documentId: string): Promise<any>;
21
+ updateNavigationItemStructure(navigationId: string, navigationItems: NestedNavItem[]): Promise<{
22
+ success: boolean;
23
+ errors: string[];
24
+ }>;
25
+ checkUniquePath(initialPath: string, targetRouteDocumentId?: string | null): Promise<{
26
+ blacklisted: boolean;
27
+ uniquePath?: undefined;
28
+ } | {
29
+ uniquePath: string;
30
+ blacklisted?: undefined;
31
+ }>;
32
+ };
33
+ export default _default;
@@ -0,0 +1,48 @@
1
+ import { Route, StructuredNavigationVariant } from '../../../types';
2
+ declare const _default: ({ strapi }: {
3
+ strapi: any;
4
+ }) => {
5
+ getEntityByPath(slug: string, populate: string, populateDeepDepth: number, fields: any, status?: "draft" | "published", breadcrumb?: boolean, auth?: any): Promise<any>;
6
+ getNavigation(id: string, name: string, slug: string, documentId: string, variant?: StructuredNavigationVariant): Promise<{
7
+ items: {
8
+ depth: any;
9
+ items: any;
10
+ id: number;
11
+ documentId: string;
12
+ title: string;
13
+ slug: string;
14
+ path: string;
15
+ uidPath: string;
16
+ canonicalPath: string;
17
+ relatedContentType: string;
18
+ relatedId: number;
19
+ relatedDocumentId: string;
20
+ type: import('../../../types').RouteType;
21
+ active: boolean;
22
+ isOverride: boolean;
23
+ navitem?: {
24
+ id: number;
25
+ documentId: string;
26
+ navigation?: {
27
+ id: number;
28
+ documentId: string;
29
+ name: string;
30
+ } | null;
31
+ }[] | null;
32
+ parent?: Route;
33
+ children?: Route[];
34
+ createdAt: string;
35
+ updatedAt: string;
36
+ __component: string;
37
+ }[];
38
+ id: number;
39
+ documentId: string;
40
+ name: string;
41
+ slug: string;
42
+ visible: boolean;
43
+ maxDepth?: number;
44
+ updatedAt: string;
45
+ createdAt: string;
46
+ }>;
47
+ };
48
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { HealthReport } from '../../../types';
2
+ declare const _default: () => {
3
+ getHealthReport(): Promise<HealthReport>;
4
+ };
5
+ export default _default;
@@ -0,0 +1,83 @@
1
+ declare const _default: {
2
+ admin: ({ strapi }: {
3
+ strapi: any;
4
+ }) => {
5
+ updateConfig(newConfig: Partial<import('../../../types').PluginConfig>): Promise<import('../../../types').PluginConfig>;
6
+ getConfig(): Promise<any>;
7
+ getRoute(documentId: string): Promise<any>;
8
+ getAllRoutes(): Promise<any>;
9
+ getRelatedRoute(documentId: string): Promise<any>;
10
+ getRelatedRoutes(documentIds: string[]): Promise<any>;
11
+ getProhibitedRouteIds(documentId: string | undefined): Promise<string[]>;
12
+ getNavigation(documentId?: string, variant?: import('../../../types').StructuredNavigationVariant | "namesOnly"): Promise<any>;
13
+ createNavigation(name: string, visible: boolean): Promise<any>;
14
+ updateNavigation(documentId: string, data: import('../../../types').NavigationInput): Promise<any>;
15
+ getNavigationDepths(): Promise<import('../../../types').NavigationDepth[]>;
16
+ updateNavigationDepths(depths: {
17
+ documentId: string;
18
+ maxDepth: number;
19
+ }[]): Promise<import('../../../types').NavigationDepth[]>;
20
+ deleteNavigation(documentId: string): Promise<any>;
21
+ updateNavigationItemStructure(navigationId: string, navigationItems: import('../../../types').NestedNavItem[]): Promise<{
22
+ success: boolean;
23
+ errors: string[];
24
+ }>;
25
+ checkUniquePath(initialPath: string, targetRouteDocumentId?: string | null): Promise<{
26
+ blacklisted: boolean;
27
+ uniquePath?: undefined;
28
+ } | {
29
+ uniquePath: string;
30
+ blacklisted?: undefined;
31
+ }>;
32
+ };
33
+ client: ({ strapi }: {
34
+ strapi: any;
35
+ }) => {
36
+ getEntityByPath(slug: string, populate: string, populateDeepDepth: number, fields: any, status?: "draft" | "published", breadcrumb?: boolean, auth?: any): Promise<any>;
37
+ getNavigation(id: string, name: string, slug: string, documentId: string, variant?: import('../../../types').StructuredNavigationVariant): Promise<{
38
+ items: {
39
+ depth: any;
40
+ items: any;
41
+ id: number;
42
+ documentId: string;
43
+ title: string;
44
+ slug: string;
45
+ path: string;
46
+ uidPath: string;
47
+ canonicalPath: string;
48
+ relatedContentType: string;
49
+ relatedId: number;
50
+ relatedDocumentId: string;
51
+ type: import('../../../types').RouteType;
52
+ active: boolean;
53
+ isOverride: boolean;
54
+ navitem?: {
55
+ id: number;
56
+ documentId: string;
57
+ navigation?: {
58
+ id: number;
59
+ documentId: string;
60
+ name: string;
61
+ } | null;
62
+ }[] | null;
63
+ parent?: import('../../../types').Route;
64
+ children?: import('../../../types').Route[];
65
+ createdAt: string;
66
+ updatedAt: string;
67
+ __component: string;
68
+ }[];
69
+ id: number;
70
+ documentId: string;
71
+ name: string;
72
+ slug: string;
73
+ visible: boolean;
74
+ maxDepth?: number;
75
+ updatedAt: string;
76
+ createdAt: string;
77
+ }>;
78
+ };
79
+ health: () => {
80
+ getHealthReport(): Promise<import('../../../types').HealthReport>;
81
+ };
82
+ };
83
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { Route } from '../../../types';
2
+ /**
3
+ * Adds the ancestors of the entity's route plus the entity itself to `webatlas.breadcrumb`, ordered
4
+ * from the root to the current page:
5
+ *
6
+ * [{ path: 'page-1', canonicalPath: 'page-1', slug: 'page-1', uidPath: 'page/1', title: 'Page 1' },
7
+ * { path: 'page-1/page-2', canonicalPath: 'page-1/page-2', slug: 'page-2', … }]
8
+ *
9
+ * The hierarchy comes from `canonicalPath`, which is built from the entity titles and therefore
10
+ * unaffected by an overridden `path`.
11
+ *
12
+ * Ancestors without a published entry are left out, unless drafts are requested.
13
+ */
14
+ export declare function addWebatlasBreadcrumb(data: any, route: Route, status?: 'draft' | 'published'): Promise<any>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Checks the paths that descendants of a route will receive once the route itself moved (see
3
+ * cascadePathUpdates), so a move can be rejected before anything is written. Mirrors how
4
+ * cascadePathUpdates derives child paths: the canonical path always cascades, while `path` only
5
+ * follows `validatedParentPath` when the parent is an override and the child has no overridden
6
+ * path of its own.
7
+ *
8
+ * Every descendant path starts with `${validatedParentPath}/` resp. `${canonicalPath}/`, so a
9
+ * descendant can only be blocked by a blacklist entry starting with one of those prefixes —
10
+ * provided both parent paths already passed assertPathAllowed. If no entry does, the subtree cannot
11
+ * be affected and the walk is skipped.
12
+ */
13
+ export default function assertDescendantPathsAllowed({ validatedParentPath, parentRouteDocumentId, canonicalPath, isOverride, routeBlacklist, }: {
14
+ validatedParentPath: string;
15
+ parentRouteDocumentId: string;
16
+ canonicalPath: string;
17
+ isOverride: boolean;
18
+ routeBlacklist: string[];
19
+ }): Promise<void>;
@@ -0,0 +1,2 @@
1
+ export declare function getRouteBlacklist(): Promise<string[]>;
2
+ export default function assertPathAllowed(path: string, routeBlacklist: string[]): void;
@@ -0,0 +1 @@
1
+ export default function buildCanonicalPath(slug: string, parentDocumentId: string | null): Promise<string>;
@@ -0,0 +1,5 @@
1
+ export default function buildNavigationPath({ slug, routeDocumentId, calculatedParent, }: {
2
+ slug: string;
3
+ routeDocumentId?: string;
4
+ calculatedParent: string | null;
5
+ }): Promise<string>;
@@ -0,0 +1,12 @@
1
+ import { NestedNavigation, StructuredNavigationVariant } from '../../../types';
2
+ export default function buildStructuredNavigation(navigation: NestedNavigation, variant?: StructuredNavigationVariant): {
3
+ items: any[];
4
+ id: number;
5
+ documentId: string;
6
+ name: string;
7
+ slug: string;
8
+ visible: boolean;
9
+ maxDepth?: number;
10
+ updatedAt: string;
11
+ createdAt: string;
12
+ };
@@ -0,0 +1,6 @@
1
+ export default function cascadePathUpdates({ validatedParentPath, parentRouteDocumentId, canonicalPath, isOverride, }: {
2
+ validatedParentPath: string;
3
+ parentRouteDocumentId: string;
4
+ canonicalPath: string;
5
+ isOverride: boolean;
6
+ }): Promise<void>;
@@ -0,0 +1 @@
1
+ export default function cleanRootKeys(obj: any): any;
@@ -0,0 +1 @@
1
+ export default function duplicateCheck(initialPath: string, targetRouteDocumentId?: string | null): Promise<string>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Recursively enrich route-picker fields in the data
3
+ * Uses a two-pass approach: first collect all IDs, then fetch routes once, then enrich
4
+ * Accepts a single entity or an array of entities, the routes are fetched with a single query
5
+ * Links to pages without a published entry are set to null, unless drafts are requested
6
+ */
7
+ export declare function enrichRoutePickerFields(data: any, contentTypeUid: string, status?: 'draft' | 'published'): Promise<any>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Enriches response data with webatlas fields for all enabled content types
3
+ * Works recursively to handle nested relations, components, and dynamic zones
4
+ * Accepts a single entity or an array of entities, the routes are fetched with a single query
5
+ */
6
+ export declare function enrichWebatlasData(data: any, contentTypeUid?: string): Promise<any>;
@@ -0,0 +1,32 @@
1
+ import { NestedNavItem } from '../../../types';
2
+ export default function extractRouteAndItems(items: NestedNavItem[]): {
3
+ depth: any;
4
+ items: any;
5
+ id: number;
6
+ documentId: string;
7
+ title: string;
8
+ slug: string;
9
+ path: string;
10
+ uidPath: string;
11
+ canonicalPath: string;
12
+ relatedContentType: string;
13
+ relatedId: number;
14
+ relatedDocumentId: string;
15
+ type: import('../../../types').RouteType;
16
+ active: boolean;
17
+ isOverride: boolean;
18
+ navitem?: {
19
+ id: number;
20
+ documentId: string;
21
+ navigation?: {
22
+ id: number;
23
+ documentId: string;
24
+ name: string;
25
+ } | null;
26
+ }[] | null;
27
+ parent?: import('../../../types').Route;
28
+ children?: import('../../../types').Route[];
29
+ createdAt: string;
30
+ updatedAt: string;
31
+ __component: string;
32
+ }[];
@@ -0,0 +1,12 @@
1
+ type LinkedRoute = {
2
+ relatedContentType?: string;
3
+ relatedDocumentId?: string;
4
+ } | null | undefined;
5
+ type DocumentStatus = 'published' | 'draft' | 'modified';
6
+ /**
7
+ * Returns the content manager status of the entries linked to the given routes, keyed by documentId,
8
+ * fetched with two queries per content type. Entries of content types without draft and publish have
9
+ * no status, like in the content manager. External and wrapper routes are ignored.
10
+ */
11
+ export default function getDocumentStatuses(routes: LinkedRoute[]): Promise<Map<string, DocumentStatus>>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export default function getNonInternalRouteIds(): Promise<string[]>;
@@ -0,0 +1,11 @@
1
+ type LinkedRoute = {
2
+ relatedContentType?: string;
3
+ relatedDocumentId?: string;
4
+ } | null | undefined;
5
+ /**
6
+ * Returns the documentIds of the entries linked to the given routes that have a published version,
7
+ * fetched with one query per content type. External and wrapper routes are not linked to an entry and
8
+ * are ignored. Entries of content types that no longer exist are never returned.
9
+ */
10
+ export default function getPublishedDocumentIds(routes: LinkedRoute[]): Promise<Set<string>>;
11
+ export {};
@@ -0,0 +1 @@
1
+ export default function getRouteAncestors(routeId: string): Promise<string[]>;
@@ -0,0 +1 @@
1
+ export default function getRouteDescendants(routeId: string): Promise<string[]>;
@@ -0,0 +1,48 @@
1
+ import { HealthIssue, Route } from '../../../../types';
2
+ export type HealthRoute = Pick<Route, 'documentId' | 'title' | 'path' | 'canonicalPath' | 'uidPath' | 'type' | 'relatedContentType' | 'relatedDocumentId'>;
3
+ export type HealthNavItem = {
4
+ routeDocumentId: string;
5
+ navigationName: string;
6
+ depth: number;
7
+ maxDepth: number;
8
+ hasChildren: boolean;
9
+ };
10
+ export type HealthData = {
11
+ routes: HealthRoute[];
12
+ navItems: HealthNavItem[];
13
+ existingContentTypes: Set<string>;
14
+ enabledContentTypes: Set<string>;
15
+ existingDocumentIds: Map<string, Set<string>>;
16
+ draftOnlyDocumentIds: Set<string>;
17
+ routeBlacklist: string[];
18
+ };
19
+ /**
20
+ * The frontend API finds a route by path, canonicalPath or uidPath with findFirst. A value used by
21
+ * several routes therefore returns any one of them. External routes are skipped, their path is a
22
+ * URL that is never requested through the API and may be linked several times on purpose.
23
+ */
24
+ export declare function checkPathConflicts({ routes }: HealthData): HealthIssue[];
25
+ /**
26
+ * Internal routes whose entry or content type no longer exists, or whose content type is no longer
27
+ * selected in the plugin settings.
28
+ */
29
+ export declare function checkOrphanedRoutes({ routes, existingContentTypes, enabledContentTypes, existingDocumentIds, }: HealthData): HealthIssue[];
30
+ /**
31
+ * The blacklist only applies to paths created or updated after saving it, existing routes can
32
+ * still use a blocked path. The canonical path is checked too, the frontend API resolves it as well.
33
+ */
34
+ export declare function checkBlacklistedPaths({ routes, routeBlacklist }: HealthData): HealthIssue[];
35
+ export declare function checkInvalidExternalUrls({ routes }: HealthData): HealthIssue[];
36
+ /**
37
+ * Navigation items of entries that were never published. The frontend API removes them from the
38
+ * navigation, so they are missing in the navigation without a hint in the admin panel.
39
+ */
40
+ export declare function checkUnpublishedInNavigation({ routes, navItems, draftOnlyDocumentIds, }: HealthData): HealthIssue[];
41
+ /**
42
+ * Items deeper than the max depth of their navigation, e.g. after the max depth was reduced in the
43
+ * plugin settings.
44
+ */
45
+ export declare function checkTooDeepItems({ navItems }: HealthData): HealthIssue[];
46
+ export declare function checkNotInNavigation({ routes, navItems }: HealthData): HealthIssue[];
47
+ export declare function checkEmptyWrappers({ routes, navItems }: HealthData): HealthIssue[];
48
+ export default function runHealthChecks(data: HealthData): HealthIssue[];
@@ -0,0 +1,29 @@
1
+ import { default as duplicateCheck } from './duplicateCheck';
2
+ import { createNavItem, updateNavItem, deleteNavItem } from './navItemHandler';
3
+ import { getAdminService, getClientService } from './pluginHelpers';
4
+ import { default as reduceDepthOfOrphanedItems } from './reduceDepthOfOrphanedItems';
5
+ import { createExternalRoute, updateRoute, deleteRoute } from './routeHandler';
6
+ import { default as buildStructuredNavigation } from './buildStructuredNavigation';
7
+ import { default as extractRouteAndItems } from './extractRouteAndItems';
8
+ import { default as getFullPopulateObject } from './populateDeep';
9
+ import { default as cleanRootKeys } from './cleanRootKeys';
10
+ import { default as removeWaFields } from './removeWaFields';
11
+ import { default as buildCanonicalPath } from './buildCanonicalPath';
12
+ import { default as cascadePathUpdates } from './cascadePathUpdates';
13
+ import { default as getRouteAncestors } from './getRouteAncestors';
14
+ import { default as getRouteDescendants } from './getRouteDescendants';
15
+ import { default as getNonInternalRouteIds } from './getNonInternalRouteIds';
16
+ import { default as validateRouteDependencies } from './validateRouteDependencies';
17
+ import { default as buildNavigationPath } from './buildNavigationPath';
18
+ import { handleItemDeletion, handleItemUpdate, calculateParentAndOrder } from './navigationItemStructure';
19
+ import { enrichWebatlasData } from './enrichWebatlasData';
20
+ import { enrichRoutePickerFields } from './enrichRoutePickerFields';
21
+ import { default as isBlacklistedPath } from './isBlacklistedPath';
22
+ import { default as assertPathAllowed, getRouteBlacklist } from './assertPathAllowed';
23
+ import { default as assertDescendantPathsAllowed } from './assertDescendantPathsAllowed';
24
+ import { default as normalizeRouteBlacklist } from './normalizeRouteBlacklist';
25
+ import { addWebatlasBreadcrumb } from './addWebatlasBreadcrumb';
26
+ import { default as removeUnpublishedNavItems } from './removeUnpublishedNavItems';
27
+ import { default as getPublishedDocumentIds } from './getPublishedDocumentIds';
28
+ import { default as getDocumentStatuses } from './getDocumentStatuses';
29
+ export { duplicateCheck, createNavItem, updateNavItem, deleteNavItem, getAdminService, getClientService, reduceDepthOfOrphanedItems, createExternalRoute, updateRoute, deleteRoute, buildStructuredNavigation, extractRouteAndItems, getFullPopulateObject, cleanRootKeys, removeWaFields, buildCanonicalPath, cascadePathUpdates, getRouteAncestors, getRouteDescendants, getNonInternalRouteIds, validateRouteDependencies, buildNavigationPath, handleItemDeletion, handleItemUpdate, calculateParentAndOrder, enrichWebatlasData, enrichRoutePickerFields, isBlacklistedPath, assertPathAllowed, getRouteBlacklist, assertDescendantPathsAllowed, normalizeRouteBlacklist, addWebatlasBreadcrumb, removeUnpublishedNavItems, getPublishedDocumentIds, getDocumentStatuses, };
@@ -0,0 +1 @@
1
+ export default function isBlacklistedPath(url: string, routeBlacklist: string[]): boolean;
@@ -0,0 +1,5 @@
1
+ import { NavItemSettings, NestedNavItem } from '../../../types';
2
+ declare function createNavItem(data: NavItemSettings): Promise<null | NestedNavItem>;
3
+ declare function updateNavItem(documentId: string, data: Pick<NavItemSettings, 'parent' | 'order'>): Promise<import('@strapi/types/dist/modules/documents').AnyDocument>;
4
+ declare function deleteNavItem(documentId: string): Promise<boolean>;
5
+ export { createNavItem, updateNavItem, deleteNavItem };