1 /**
2 * @type {import("next").NextConfig["redirects"]}
3 */
4 const redirects = async () => {
5 return [
6 {
7 source: "/v2/learn/customization",
8 destination: "/learn/customization/custom-features",
9 permanent: true,
10 },
11 {
12 source: "/recipes/:path*",
13 destination: "/resources/recipes",
14 permanent: true,
15 },
16 {
17 source: "/plugins/:path*",
18 destination: "/v1/plugins/:path*",
19 permanent: true,
20 },
21 {
22 source: "/medusa-react/:path*",
23 destination: "/v1/medusa-react/:path*",
24 permanent: true,
25 },
26 {
27 source: "/learn/customization/extend-models/:path*",
28 destination: "/learn/customization/extend-features/:path*",
29 permanent: true,
30 },
31 {
32 source: "/learn/advanced-development/architecture/overview",
33 destination: "/learn/introduction/architecture",
34 permanent: true,
35 },
36 {
37 source: "/learn/first-customizations",
38 destination: "/learn/customization",
39 permanent: true,
40 },
41 {
42 source: "/learn/basics/medusa-container",
43 destination: "/learn/fundamentals/medusa-container",
44 permanent: true,
45 },
46 {
47 source: "/learn/basics/modules",
48 destination: "/learn/fundamentals/modules",
49 permanent: true,
50 },
51 {
52 source: "/learn/basics/modules-directory-structure",
53 destination: "/learn/fundamentals/modules/modules-directory-structure",
54 permanent: true,
55 },
56 {
57 source: "/learn/basics/loaders",
58 destination: "/learn/fundamentals/modules/loaders",
59 permanent: true,
60 },
61 {
62 source: "/learn/basics/commerce-modules",
63 destination: "/learn/fundamentals/modules/commerce-modules",
64 permanent: true,
65 },
66 {
67 source: "/commerce-modules",
68 destination: "/learn/fundamentals/modules/commerce-modules",
69 permanent: true,
70 },
71 {
72 source: "/learn/advanced-development/architecture/infrastructure-modules",
73 destination: "/learn/fundamentals/modules/infrastructure-modules",
74 permanent: true,
75 },
76 {
77 source: "/learn/basics/api-routes",
78 destination: "/learn/fundamentals/api-routes",
79 permanent: true,
80 },
81 {
82 source: "/learn/basics/workflows",
83 destination: "/learn/fundamentals/workflows",
84 permanent: true,
85 },
86 {
87 source: "/learn/basics/events-and-subscribers",
88 destination: "/learn/fundamentals/events-and-subscribers",
89 permanent: true,
90 },
91 {
92 source: "/learn/basics/scheduled-jobs",
93 destination: "/learn/fundamentals/scheduled-jobs",
94 permanent: true,
95 },
96 {
97 source: "/learn/basics/project-directories-files",
98 destination: "/learn/installation#project-files",
99 permanent: true,
100 },
101 {
102 source: "/learn/basics/admin-customizations",
103 destination: "/learn/fundamentals/admin/widgets",
104 permanent: true,
105 },
106 {
107 source: "/learn/advanced-development/:path*",
108 destination: "/learn/fundamentals/:path*",
109 permanent: true,
110 },
111 {
112 source: "/advanced-development/:path*",
113 destination: "/learn/fundamentals/:path*",
114 permanent: true,
115 },
116 {
117 source: "/learn/storefront-development/nextjs-starter",
118 destination: "/resources/nextjs-starter",
119 permanent: true,
120 },
121 {
122 source: "/learn/fundamentals/module-links/remote-link",
123 destination: "/learn/fundamentals/module-links/link",
124 permanent: true,
125 },
126 {
127 source: "/learn/debugging-and-testing",
128 destination: "/learn/debugging-and-testing/testing-tools",
129 permanent: true,
130 },
131 {
132 source: "/learn/more-resources",
133 destination: "/learn/resources/contribution-guidelines/docs",
134 permanent: true,
135 },
136 {
137 source: "/learn/conventions/:path*",
138 destination: "/learn/configurations/:path*",
139 permanent: true,
140 },
141 {
142 source: "/learn/fundamentals/data-models/configure-properties",
143 destination: "/learn/fundamentals/data-models/properties",
144 permanent: true,
145 },
146 {
147 source: "/learn/fundamentals/data-models/default-properties",
148 destination: "/learn/fundamentals/data-models/properties",
149 permanent: true,
150 },
151 {
152 source: "/learn/fundamentals/data-models/primary-key",
153 destination: "/learn/fundamentals/data-models/properties",
154 permanent: true,
155 },
156 {
157 source: "/learn/fundamentals/data-models/property-types",
158 destination: "/learn/fundamentals/data-models/properties",
159 permanent: true,
160 },
161 {
162 source: "/learn/fundamentals/data-models/searchable-property",
163 destination: "/learn/fundamentals/data-models/properties",
164 permanent: true,
165 },
166 {
167 source: "/starters/nextjs-medusa-starter",
168 destination: "/resources/nextjs-starter",
169 permanent: true,
170 },
171 {
172 source: "/learn/fundamentals/modules/architectural-modules",
173 destination: "/learn/fundamentals/modules/infrastructure-modules",
174 permanent: true,
175 },
176 {
177 source: "/v1/admin/quickstart",
178 destination: "/learn/fundamentals/admin",
179 permanent: true,
180 },
181 {
182 source: "/v1/development/entities/migrations/overview",
183 destination: "/learn/fundamentals/data-models/write-migration",
184 permanent: true,
185 },
186 {
187 source: "/v1/plugins/payment/stripe",
188 destination:
189 "/resources/commerce-modules/payment/payment-provider/stripe",
190 permanent: true,
191 },
192 {
193 source: "/v1/plugins/notifications/sendgrid",
194 destination: "/resources/infrastructure-modules/notification/sendgrid",
195 permanent: true,
196 },
197 {
198 source: "/v1/plugins/file-service/local",
199 destination: "/resources/infrastructure-modules/file/local",
200 permanent: true,
201 },
202 {
203 source: "/v1/modules/users/admin/manage-users",
204 destination: "/resources/commerce-modules/user/user-creation-flows",
205 permanent: true,
206 },
207 {
208 source: "/v1/modules/products/admin/import-products",
209 destination: "/user-guide/products/import",
210 permanent: true,
211 },
212 {
213 source: "/v1/deployments/server/general-guide",
214 destination: "/learn/deployment/general",
215 permanent: true,
216 },
217 {
218 source: "/v1/user-guide/products/manage",
219 destination: "/user-guide/products/edit",
220 permanent: true,
221 },
222 {
223 source: "/v1/plugins/payment",
224 destination: "/resources/integrations",
225 permanent: true,
226 },
227 {
228 source: "/v1/development/cache/modules/redis",
229 destination: "/resources/infrastructure-modules/cache/redis",
230 permanent: true,
231 },
232 {
233 source: "/v1/development/plugins/create",
234 destination: "/learn/fundamentals/plugins/create",
235 permanent: true,
236 },
237 {
238 source: "/v1/cli/reference",
239 destination: "/resources/medusa-cli",
240 permanent: true,
241 },
242 {
243 source: "/v1/modules/discounts",
244 destination: "/resources/commerce-modules/promotion",
245 permanent: true,
246 },
247 {
248 source: "/v1/deployments/server/deploying-on-digital-ocean",
249 destination: "/resources/deployment",
250 permanent: true,
251 },
252 {
253 source: "/v1/upgrade-guides",
254 destination: "/learn/update",
255 permanent: true,
256 },
257 {
258 source: "/v1/starters/nextjs-medusa-starter",
259 destination: "/resources/nextjs-starter",
260 permanent: true,
261 },
262 {
263 source: "/v1/development/entities/extend-entity",
264 destination: "/learn/customization/extend-features",
265 permanent: true,
266 },
267 {
268 source: "/v1/development/fundamentals/architecture-overview",
269 destination: "/learn/introduction/architecture",
270 permanent: true,
271 },
272 {
273 source: "/v1/development/fundamentals/local-development",
274 destination: "/learn/installation",
275 permanent: true,
276 },
277 {
278 source: "/v1/modules/products/admin/manage-products",
279 destination: "/user-guide/products/edit",
280 permanent: true,
281 },
282 {
283 source: "/v1/plugins/overview",
284 destination: "/resources/integrations",
285 permanent: true,
286 },
287 {
288 source: "/v1/modules/carts-and-checkout/shipping",
289 destination: "/resources/commerce-modules/fulfillment",
290 permanent: true,
291 },
292 {
293 source: "/v1/development/events/events-list",
294 destination: "/resources/references/events",
295 permanent: true,
296 },
297 {
298 source: "/v1/development/feature-flags/overview",
299 destination: "/learn/configurations/medusa-config",
300 permanent: true,
301 },
302 {
303 source: "/v1/modules/orders/overview",
304 destination: "/resources/commerce-modules/order",
305 permanent: true,
306 },
307 {
308 source: "/v1/modules/orders",
309 destination: "/resources/commerce-modules/order",
310 permanent: true,
311 },
312 {
313 source: "/v1/modules/customers/overview",
314 destination: "/resources/commerce-modules/customer",
315 permanent: true,
316 },
317 {
318 source: "/v1/modules/sales-channels",
319 destination: "/resources/commerce-modules/sales-channel",
320 permanent: true,
321 },
322 {
323 source: "/v1/plugins/search/algolia",
324 destination: "/resources/integrations/guides/algolia",
325 permanent: true,
326 },
327 {
328 source: "/v1/modules/customers/admin/manage-customers",
329 destination: "/user-guide/customers/manage",
330 permanent: true,
331 },
332 {
333 source: "/v1/modules/users/admin/manage-profile",
334 destination: "/user-guide/settings/profile",
335 permanent: true,
336 },
337 {
338 source: "/v1/modules/customers/customer-groups",
339 destination: "/resources/commerce-modules/customer",
340 permanent: true,
341 },
342 {
343 source: "/v1/modules/taxes/admin/manage-tax-rates",
344 destination: "/user-guide/settings/tax-regions",
345 permanent: true,
346 },
347 {
348 source: "/v1/modules/users/admin/manage-invites",
349 destination: "/user-guide/settings/users/invites",
350 permanent: true,
351 },
352 {
353 source: "/v1/user-guide/orders/fulfillments",
354 destination: "/user-guide/orders/fulfillments",
355 permanent: true,
356 },
357 {
358 source: "/v1/modules/multiwarehouse/admin/manage-inventory-items",
359 destination: "/user-guide/inventory/inventory",
360 permanent: true,
361 },
362 {
363 source: "/v1/user-guide/settings/publishable-api-keys",
364 destination: "/user-guide/settings/developer/publishable-api-keys",
365 permanent: true,
366 },
367 {
368 source: "/v1/modules/multiwarehouse/admin/manage-reservations",
369 destination: "/user-guide/inventory/reservations",
370 permanent: true,
371 },
372 {
373 source: "/v1/user-guide/multiwarehouse/locations",
374 destination: "/user-guide/settings/locations-and-shipping/locations",
375 permanent: true,
376 },
377 {
378 source: "/learn/fundamentals/workflows/access-workflow-errors",
379 destination: "/learn/fundamentals/workflows/errors",
380 permanent: true,
381 },
382 {
383 source: "/add-plugins/:path",
384 destination: "/v1/plugins/:path",
385 permanent: true,
386 },
387 {
388 source: "/usage/create-medusa-app",
389 destination: "/learn/installation",
390 permanent: true,
391 },
392 {
393 source: "/tutorial/set-up-your-development-environment",
394 destination: "/v1/development/backend/prepare-environmentt",
395 permanent: true,
396 },
397 {
398 source: "/api",
399 destination: "/v1/api",
400 permanent: true,
401 },
402 {
403 source: "/development/:path*",
404 destination: "/v1/development/:path*",
405 permanent: true,
406 },
407 {
408 source: "/modules/:path*",
409 destination: "/v1/modules/:path*",
410 permanent: true,
411 },
412 {
413 source: "/advanced/:path*",
414 destination: "/v1/development/overview",
415 permanent: true,
416 },
417 {
418 source: "/deployments/:path*",
419 destination: "/v1/deployments/:path*",
420 permanent: true,
421 },
422 {
423 source: "/guides/fulfillment-api",
424 destination: "/resources/commerce-modules/fulfillment",
425 permanent: true,
426 },
427 {
428 source: "/introduction",
429 destination: "/learn/introduction",
430 permanent: true,
431 },
432 {
433 source: "/admin/:path*",
434 destination: "/v1/admin/:path*",
435 permanent: true,
436 },
437 {
438 source: "/user-guide/regions/providers",
439 destination: "/user-guide/settings/regions",
440 permanent: true,
441 },
442 {
443 source: "/starters/gatsby-medusa-starter",
444 destination: "/resources/nextjs-starter",
445 permanent: true,
446 },
447 {
448 source: "/usage/configurations",
449 destination: "/learn/configurations/medusa-config",
450 permanent: true,
451 },
452 {
453 source: "/troubleshooting/:path",
454 destination: "/v1/troubleshooting/:path",
455 permanent: true,
456 },
457 {
458 source: "/quickstart/quick-start",
459 destination: "/learn/installation",
460 permanent: true,
461 },
462 {
463 source: "/guides/:path*",
464 destination: "/resources/how-to-tutorials",
465 permanent: true,
466 },
467 {
468 source: "/v2/:path*",
469 destination: "/:path*",
470 permanent: true,
471 },
472 {
473 source: "/js-client/:path*",
474 destination: "/resources/js-client/:path*",
475 permanent: true,
476 },
477 {
478 source:
479 "/learn/debugging-and-testing/testing-tools/modules-tests/module-example",
480 destination: "/learn/debugging-and-testing/testing-tools/modules-tests",
481 permanent: true,
482 },
483 {
484 source: "/learn/fundamentals/data-models/index",
485 destination: "/learn/fundamentals/data-models/indexes",
486 permanent: true,
487 },
488 {
489 source: "/learn/introduction/build-with-llms-ai/bloom",
490 destination: "/learn/introduction/build-with-llms-ai",
491 permanent: true,
492 },
493 {
494 source:
495 "/learn/introduction/build-with-llms-ai/mcp-server/migrate-from-platforms",
496 destination:
497 "/learn/introduction/build-with-llms-ai/docs-mcp-server/migrate-from-shopify",
498 permanent: true,
499 },
500 {
501 source: "/learn/fundamentals/module-links/query",
502 destination: "/learn/fundamentals/query",
503 permanent: true,
504 },
505 {
506 source: "/learn/fundamentals/module-links/query-context",
507 destination: "/learn/fundamentals/query/query-context",
508 permanent: true,
509 },
510 {
511 source: "/learn/fundamentals/module-links/index-module",
512 destination: "/learn/fundamentals/query/index-module",
513 permanent: true,
514 },
515 {
516 source: "/learn/introduction/build-with-llms-ai/mcp-server",
517 destination: "/learn/introduction/build-with-llms-ai/docs-mcp-server",
518 permanent: true,
519 },
520 {
521 source: "/learn/introduction/build-with-llms-ai/mcp-server/:path*",
522 destination:
523 "/learn/introduction/build-with-llms-ai/docs-mcp-server/:path*",
524 permanent: true,
525 },
526 ]
527 }
528
529 export default redirects