mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org> Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org> Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
62 lines
1.5 KiB
TypeScript
62 lines
1.5 KiB
TypeScript
export type Route =
|
|
| FaucetRoute
|
|
| ProjectRoute
|
|
| RegistrationRoute
|
|
| { resource: "home" }
|
|
| { resource: "404"; params: { url: string } }
|
|
| { resource: "profile"; params: { addressOrName: string } }
|
|
| { resource: "seeds"; params: { host: string } }
|
|
| { resource: "vesting" };
|
|
|
|
export interface ProjectsParams {
|
|
urn: string;
|
|
view:
|
|
| { resource: "tree" }
|
|
| { resource: "commits" }
|
|
| { resource: "history" }
|
|
| { resource: "issue"; params: { issue: string } }
|
|
| { resource: "issues" }
|
|
| { resource: "patch"; params: { patch: string } }
|
|
| { resource: "patches" };
|
|
hash?: string;
|
|
path?: string;
|
|
peer?: string;
|
|
profile?: string;
|
|
revision?: string;
|
|
route?: string;
|
|
search?: string;
|
|
seed?: string;
|
|
}
|
|
|
|
export interface FaucetParams {
|
|
view:
|
|
| { resource: "form" }
|
|
| { resource: "withdraw"; params: { amount: string | null } };
|
|
}
|
|
|
|
export interface RegistrationParams {
|
|
view:
|
|
| {
|
|
resource: "validateName";
|
|
}
|
|
| {
|
|
resource: "checkNameAvailability";
|
|
params: { nameOrDomain: string; owner: string | null };
|
|
}
|
|
| {
|
|
resource: "register";
|
|
params: { nameOrDomain: string; owner: string | null };
|
|
}
|
|
| {
|
|
resource: "view";
|
|
params: { nameOrDomain: string; retry: boolean };
|
|
};
|
|
}
|
|
|
|
export type ProjectRoute = { resource: "projects"; params: ProjectsParams };
|
|
export type FaucetRoute = { resource: "faucet"; params: FaucetParams };
|
|
export type RegistrationRoute = {
|
|
resource: "registrations";
|
|
params: RegistrationParams;
|
|
};
|