Raw
1 import { NavigationItem, Product } from "types"
2
3 export const GITHUB_ISSUES_LINK =
4 "https://github.com/medusajs/medusa/issues/new/choose"
5
6 export const CLOUD_STATUS_PAGE_URL = "https://status.medusajs.com"
7
8 export const navDropdownItems: NavigationItem[] = [
9 {
10 type: "link",
11 link: `/learn`,
12 title: "Get Started",
13 sidebar_id: "docs",
14 },
15 {
16 type: "dropdown",
17 title: "Product",
18 children: [
19 {
20 type: "sub-menu",
21 title: "Framework",
22 link: "/learn/fundamentals/framework",
23 items: [
24 {
25 type: "link",
26 title: "API Routes",
27 link: "/learn/fundamentals/api-routes",
28 },
29 {
30 type: "link",
31 title: "Data Models",
32 link: "/learn/fundamentals/data-models",
33 },
34 {
35 type: "link",
36 title: "Events and Subscribers",
37 link: "/learn/fundamentals/events-and-subscribers",
38 },
39 {
40 type: "link",
41 title: "Index Module",
42 link: "/learn/fundamentals/query/index-module",
43 },
44 {
45 type: "link",
46 title: "Medusa Container",
47 link: "/learn/fundamentals/medusa-container",
48 },
49 {
50 type: "link",
51 title: "Modules",
52 link: "/learn/fundamentals/modules",
53 },
54 {
55 type: "link",
56 title: "Module Links",
57 link: "/learn/fundamentals/module-links",
58 },
59 {
60 type: "link",
61 title: "Plugins",
62 link: "/learn/fundamentals/plugins",
63 },
64 {
65 type: "link",
66 title: "Query",
67 link: "/learn/fundamentals/query",
68 },
69 {
70 type: "link",
71 title: "Scheduled Jobs",
72 link: "/learn/fundamentals/scheduled-jobs",
73 },
74 {
75 type: "link",
76 title: "Workflows",
77 link: "/learn/fundamentals/workflows",
78 },
79 ],
80 },
81 {
82 type: "link",
83 title: "Admin Extensions",
84 link: "/learn/fundamentals/admin",
85 },
86 {
87 type: "sub-menu",
88 title: "Commerce Modules",
89 link: "/resources/commerce-modules",
90 items: [
91 {
92 type: "link",
93 title: "API Key",
94 link: "/resources/commerce-modules/api-key",
95 },
96 {
97 type: "link",
98 title: "Auth",
99 link: "/resources/commerce-modules/auth",
100 },
101 {
102 type: "link",
103 title: "Cart",
104 link: "/resources/commerce-modules/cart",
105 },
106 {
107 type: "link",
108 title: "Currency",
109 link: "/resources/commerce-modules/currency",
110 },
111 {
112 type: "link",
113 title: "Customer",
114 link: "/resources/commerce-modules/customer",
115 },
116 {
117 type: "link",
118 title: "Fulfillment",
119 link: "/resources/commerce-modules/fulfillment",
120 },
121 {
122 type: "link",
123 title: "Inventory",
124 link: "/resources/commerce-modules/inventory",
125 },
126 {
127 type: "link",
128 title: "Loyalty",
129 link: "/resources/commerce-modules/loyalty",
130 },
131 {
132 type: "link",
133 title: "Order",
134 link: "/resources/commerce-modules/order",
135 },
136 {
137 type: "link",
138 title: "Payment",
139 link: "/resources/commerce-modules/payment",
140 },
141 {
142 type: "link",
143 title: "Pricing",
144 link: "/resources/commerce-modules/pricing",
145 },
146 {
147 type: "link",
148 title: "Product",
149 link: "/resources/commerce-modules/product",
150 },
151 {
152 type: "link",
153 title: "Promotion",
154 link: "/resources/commerce-modules/promotion",
155 },
156 {
157 type: "link",
158 title: "Region",
159 link: "/resources/commerce-modules/region",
160 },
161 {
162 type: "link",
163 title: "Sales Channel",
164 link: "/resources/commerce-modules/sales-channel",
165 },
166 {
167 type: "link",
168 title: "Settings",
169 link: "/resources/commerce-modules/settings",
170 },
171 {
172 type: "link",
173 title: "Stock Location",
174 link: "/resources/commerce-modules/stock-location",
175 },
176 {
177 type: "link",
178 title: "Store",
179 link: "/resources/commerce-modules/store",
180 },
181 {
182 type: "link",
183 title: "Store Credit",
184 link: "/resources/commerce-modules/store-credit",
185 },
186 {
187 type: "link",
188 title: "Tax",
189 link: "/resources/commerce-modules/tax",
190 },
191 {
192 type: "link",
193 title: "Translation",
194 link: "/resources/commerce-modules/translation",
195 },
196 {
197 type: "link",
198 title: "User",
199 link: "/resources/commerce-modules/user",
200 },
201 ],
202 },
203 {
204 type: "sub-menu",
205 title: "Infrastructure Modules",
206 link: "/resources/infrastructure-modules",
207 sidebar_id: "infrastructure-modules",
208 items: [
209 {
210 type: "link",
211 title: "Analytics",
212 link: "/resources/infrastructure-modules/analytics",
213 },
214 {
215 type: "link",
216 title: "Caching",
217 link: "/resources/infrastructure-modules/caching",
218 },
219 {
220 type: "link",
221 title: "Event",
222 link: "/resources/infrastructure-modules/event",
223 },
224 {
225 type: "link",
226 title: "File",
227 link: "/resources/infrastructure-modules/file",
228 },
229 {
230 type: "link",
231 title: "Locking",
232 link: "/resources/infrastructure-modules/locking",
233 },
234 {
235 type: "link",
236 title: "Notification",
237 link: "/resources/infrastructure-modules/notification",
238 },
239 {
240 type: "link",
241 title: "Search",
242 link: "/resources/infrastructure-modules/search",
243 },
244 {
245 type: "link",
246 title: "Workflow Engine",
247 link: "/resources/infrastructure-modules/workflow-engine",
248 },
249 ],
250 },
251 ],
252 },
253 {
254 type: "dropdown",
255 title: "Build",
256 children: [
257 {
258 type: "link",
259 title: "Recipes",
260 link: "/resources/recipes",
261 sidebar_id: "recipes",
262 },
263 {
264 type: "link",
265 title: "How-to & Tutorials",
266 link: "/resources/how-to-tutorials",
267 sidebar_id: "how-to-tutorials",
268 },
269 {
270 type: "link",
271 title: "Integrations",
272 link: "/resources/integrations",
273 sidebar_id: "integrations",
274 },
275 {
276 type: "link",
277 title: "Storefront",
278 link: "/resources/storefront-development",
279 sidebar_id: "storefront-development",
280 },
281 ],
282 },
283 {
284 type: "dropdown",
285 title: "Tools",
286 link: "/resources/tools",
287 children: [
288 {
289 type: "sub-menu",
290 title: "CLI Tools",
291 items: [
292 {
293 type: "link",
294 title: "create-medusa-app",
295 link: "/resources/create-medusa-app",
296 },
297 {
298 type: "link",
299 title: "Medusa CLI",
300 link: "/resources/medusa-cli",
301 },
302 {
303 type: "link",
304 title: "Medusa Cloud CLI",
305 link: "/cloud/cli",
306 },
307 ],
308 },
309 {
310 type: "link",
311 title: "InstantSearch Adapter",
312 link: "/resources/instantsearch",
313 },
314 {
315 type: "link",
316 title: "JS SDK",
317 link: "/resources/js-sdk",
318 sidebar_id: "js-sdk",
319 },
320 {
321 type: "link",
322 title: "Admin Components",
323 link: "/resources/admin-components",
324 sidebar_id: "admin-components",
325 },
326 {
327 type: "link",
328 title: "Next.js Starter",
329 link: "/resources/nextjs-starter",
330 sidebar_id: "nextjs-starter",
331 },
332 {
333 type: "link",
334 title: "Medusa UI",
335 link: "/ui",
336 sidebar_id: "ui",
337 },
338 {
339 type: "link",
340 title: "ESLint Plugin",
341 link: "/resources/lint",
342 sidebar_id: "lint",
343 },
344 ],
345 },
346 {
347 type: "dropdown",
348 title: "Reference",
349 link: "/resources/references-overview",
350 children: [
351 {
352 type: "link",
353 title: "Admin API",
354 link: "/api/admin",
355 sidebar_id: "admin",
356 },
357 {
358 type: "link",
359 title: "Store API",
360 link: "/api/store",
361 sidebar_id: "store",
362 },
363 {
364 type: "divider",
365 },
366 {
367 type: "link",
368 title: "Admin Injection Zones",
369 link: "/resources/admin-widget-injection-zones",
370 },
371 {
372 type: "link",
373 title: "Container Resources",
374 link: "/resources/medusa-container-resources",
375 },
376 {
377 type: "link",
378 title: "Core Workflows",
379 link: "/resources/medusa-workflows-reference",
380 sidebar_id: "core-flows",
381 },
382 {
383 type: "link",
384 title: "Data Model Language",
385 link: "/resources/references/data-model",
386 sidebar_id: "dml-reference",
387 },
388 {
389 type: "link",
390 title: "Data Model Repository",
391 link: "/resources/data-model-repository-reference",
392 sidebar_id: "data-model-repository-reference",
393 },
394 {
395 type: "link",
396 title: "Events Reference",
397 link: "/resources/references/events",
398 },
399 {
400 type: "link",
401 title: "Helper Steps",
402 link: "/resources/references/helper-steps",
403 sidebar_id: "helper-steps-reference",
404 },
405 {
406 type: "link",
407 title: "Service Factory",
408 link: "/resources/service-factory-reference",
409 sidebar_id: "service-factory-reference",
410 },
411 {
412 type: "link",
413 title: "Testing Framework",
414 link: "/resources/test-tools-reference",
415 sidebar_id: "test-tools-reference",
416 },
417 {
418 type: "link",
419 title: "Workflows SDK",
420 link: "/resources/references/workflows",
421 sidebar_id: "workflows-sdk-reference",
422 },
423 ],
424 },
425 {
426 type: "link",
427 title: "User Guide",
428 link: "/user-guide",
429 sidebar_id: "user-guide",
430 },
431 {
432 type: "link",
433 title: "Cloud",
434 link: "/cloud",
435 sidebar_id: "cloud",
436 },
437 ]
438
439 export const products: Product[] = [
440 {
441 type: "commerce",
442 name: "api key",
443 path: "/resources/commerce-modules/api-key",
444 title: "API Key",
445 image: "/images/api-key-icon.png",
446 },
447 {
448 type: "commerce",
449 name: "auth",
450 path: "/resources/commerce-modules/auth",
451 title: "Auth",
452 image: "/images/auth-icon.png",
453 },
454 {
455 type: "commerce",
456 name: "cart",
457 path: "/resources/commerce-modules/cart",
458 title: "Cart",
459 image: "/images/cart-icon.png",
460 },
461 {
462 type: "commerce",
463 name: "currency",
464 path: "/resources/commerce-modules/currency",
465 title: "Currency",
466 image: "/images/currency-icon.png",
467 },
468 {
469 type: "commerce",
470 name: "customer",
471 path: "/resources/commerce-modules/customer",
472 title: "Customer",
473 image: "/images/customer-icon.png",
474 },
475 {
476 type: "commerce",
477 name: "fulfillment",
478 path: "/resources/commerce-modules/fulfillment",
479 title: "Fulfillment",
480 image: "/images/fulfillment-icon.png",
481 },
482 {
483 type: "commerce",
484 name: "inventory",
485 path: "/resources/commerce-modules/inventory",
486 title: "Inventory",
487 image: "/images/inventory-icon.png",
488 },
489 {
490 type: "commerce",
491 name: "order",
492 path: "/resources/commerce-modules/order",
493 title: "Order",
494 image: "/images/order-icon.png",
495 },
496 {
497 type: "commerce",
498 name: "payment",
499 path: "/resources/commerce-modules/payment",
500 title: "Payment",
501 image: "/images/payment-icon.png",
502 },
503 {
504 type: "commerce",
505 name: "pricing",
506 path: "/resources/commerce-modules/pricing",
507 title: "Pricing",
508 image: "/images/pricing-icon.png",
509 },
510 {
511 type: "commerce",
512 name: "product",
513 path: "/resources/commerce-modules/product",
514 title: "Product",
515 image: "/images/product-icon.png",
516 },
517 {
518 type: "commerce",
519 name: "promotion",
520 path: "/resources/commerce-modules/promotion",
521 title: "Promotion",
522 image: "/images/promotion-icon.png",
523 },
524 {
525 type: "commerce",
526 name: "region",
527 path: "/resources/commerce-modules/region",
528 title: "Region",
529 image: "/images/region-icon.png",
530 },
531 {
532 type: "commerce",
533 name: "sales channel",
534 path: "/resources/commerce-modules/sales-channel",
535 title: "Sales Channel",
536 image: "/images/sales-channel-icon.png",
537 },
538 {
539 type: "commerce",
540 name: "stock location",
541 path: "/resources/commerce-modules/stock-location",
542 title: "Stock Location",
543 image: "/images/stock-location-icon.png",
544 },
545 // TODO need an image for this one
546 // {
547 // type: "commerce",
548 // name: "store",
549 // title: "Store",
550 // image: "/images/store-icon.png",
551 // },
552 {
553 type: "commerce",
554 name: "tax",
555 path: "/resources/commerce-modules/tax",
556 title: "Tax",
557 image: "/images/tax-icon.png",
558 },
559 {
560 type: "commerce",
561 name: "user",
562 path: "/resources/commerce-modules/user",
563 title: "User",
564 image: "/images/user-icon.png",
565 },
566 ]
567
568 export enum DocsTrackingEvents {
569 SURVEY = "survey",
570 SURVEY_API = "survey_api-ref",
571 CODE_BLOCK_COPY = "code_block_copy",
572 AI_ASSISTANT_START_CHAT = "ai_assistant_start_chat",
573 AI_ASSISTANT_CALLOUT_CLICK = "ai_assistant_callout_click",
574 SEARCH_CALLOUT_CLICK = "search_callout_click",
575 BLOOM_ACTION = "bloom_action",
576 WHATS_NEW_ITEM_CLICK = "whats_new_item_click",
577 }