134 lines
2.8 KiB
TypeScript
134 lines
2.8 KiB
TypeScript
import { defineRoutes } from "@sirou/core";
|
|
|
|
export const routes = defineRoutes({
|
|
// Root and Layouts
|
|
root: {
|
|
path: "/",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"(tabs)": {
|
|
path: "/(tabs)",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
// Tabs
|
|
"(tabs)/index": {
|
|
path: "/(tabs)/index",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"(tabs)/payments": {
|
|
path: "/(tabs)/payments",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"(tabs)/scan": {
|
|
path: "/(tabs)/scan",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"(tabs)/proforma": {
|
|
path: "/(tabs)/proforma",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"(tabs)/news": {
|
|
path: "/(tabs)/news",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
history: {
|
|
path: "/history",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
// Stacks
|
|
"proforma/[id]": {
|
|
path: "/proforma/:id",
|
|
params: { id: "string" },
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"proforma/create": {
|
|
path: "/proforma/create",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"payments/[id]": {
|
|
path: "/payments/:id",
|
|
params: { id: "string" },
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"invoices/[id]": {
|
|
path: "/invoices/:id",
|
|
params: { id: "string" },
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"notifications/index": {
|
|
path: "/notifications/index",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"notifications/settings": {
|
|
path: "/notifications/settings",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"reports/index": {
|
|
path: "/reports/index",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"documents/index": {
|
|
path: "/documents/index",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
profile: {
|
|
path: "/profile",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"edit-profile": {
|
|
path: "/edit-profile",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true, title: "Edit Profile" },
|
|
},
|
|
settings: {
|
|
path: "/settings",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
"sms-scan": {
|
|
path: "/sms-scan",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true },
|
|
},
|
|
company: {
|
|
path: "/company",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true, title: "Company" },
|
|
},
|
|
"user/create": {
|
|
path: "/user/create",
|
|
guards: ["auth"],
|
|
meta: { requiresAuth: true, title: "Add User" },
|
|
},
|
|
// Public
|
|
login: {
|
|
path: "/login",
|
|
guards: ["guest"],
|
|
meta: { requiresAuth: false, guestOnly: true },
|
|
},
|
|
register: {
|
|
path: "/register",
|
|
guards: ["guest"],
|
|
meta: { requiresAuth: false, guestOnly: true },
|
|
},
|
|
});
|
|
|
|
export type AppRoutes = typeof routes;
|