mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
477 lines
10 KiB
TypeScript
477 lines
10 KiB
TypeScript
// @ts-nocheck
|
|
/* eslint-disable */
|
|
// --------------------------------------------------
|
|
// This file is auto-generated by Tuyau. Do not edit manually !
|
|
// --------------------------------------------------
|
|
|
|
import type { MakeTuyauRequest, MakeTuyauResponse } from '@tuyau/utils/types';
|
|
import type { InferInput } from '@vinejs/vine/types';
|
|
|
|
type AdminGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/admin/controllers/admin_controller.ts').default['index'],
|
|
false
|
|
>;
|
|
};
|
|
type AuthCallbackGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/auth/controllers/auth_controller.ts').default['callbackAuth'],
|
|
false
|
|
>;
|
|
};
|
|
type AuthLogoutGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/auth/controllers/auth_controller.ts').default['logout'],
|
|
false
|
|
>;
|
|
};
|
|
type DashboardGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/collections/controllers/show_collections_controller.ts').default['render'],
|
|
false
|
|
>;
|
|
};
|
|
type CollectionsCreateGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/collections/controllers/create_collection_controller.ts').default['render'],
|
|
false
|
|
>;
|
|
};
|
|
type CollectionsPost = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/collections/validators/create_collection_validator.ts'))['createCollectionValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/collections/controllers/create_collection_controller.ts').default['execute'],
|
|
true
|
|
>;
|
|
};
|
|
type CollectionsEditGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/collections/controllers/update_collection_controller.ts').default['render'],
|
|
false
|
|
>;
|
|
};
|
|
type CollectionsIdPut = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/collections/validators/update_collection_validator.ts'))['updateCollectionValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/collections/controllers/update_collection_controller.ts').default['execute'],
|
|
true
|
|
>;
|
|
};
|
|
type CollectionsDeleteGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/collections/controllers/delete_collection_controller.ts').default['render'],
|
|
false
|
|
>;
|
|
};
|
|
type CollectionsIdDelete = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/collections/validators/delete_collection_validator.ts'))['deleteCollectionValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/collections/controllers/delete_collection_controller.ts').default['execute'],
|
|
true
|
|
>;
|
|
};
|
|
type FaviconGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/favicons/controllers/favicons_controller.ts').default['index'],
|
|
false
|
|
>;
|
|
};
|
|
type LinksCreateGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/links/controllers/delete_link_controller.js').default['showCreatePage'],
|
|
false
|
|
>;
|
|
};
|
|
type LinksPost = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/links/validators/create_link_validator.ts'))['createLinkValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/links/controllers/delete_link_controller.js').default['store'],
|
|
true
|
|
>;
|
|
};
|
|
type LinksEditGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/links/controllers/delete_link_controller.js').default['showEditPage'],
|
|
false
|
|
>;
|
|
};
|
|
type LinksIdPut = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/links/validators/update_link_validator.ts'))['updateLinkValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/links/controllers/delete_link_controller.js').default['update'],
|
|
true
|
|
>;
|
|
};
|
|
type LinksIdFavoritePut = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/links/validators/update_favorite_link_validator.ts'))['updateLinkFavoriteStatusValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/links/controllers/delete_link_controller.js').default['toggleFavorite'],
|
|
true
|
|
>;
|
|
};
|
|
type LinksDeleteGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/links/controllers/delete_link_controller.js').default['showDeletePage'],
|
|
false
|
|
>;
|
|
};
|
|
type LinksIdDelete = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/links/validators/delete_link_validator.ts'))['deleteLinkValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/links/controllers/delete_link_controller.js').default['execute'],
|
|
true
|
|
>;
|
|
};
|
|
type SearchGetHead = {
|
|
request: unknown;
|
|
response: MakeTuyauResponse<
|
|
import('../app/search/controllers/search_controller.ts').default['search'],
|
|
false
|
|
>;
|
|
};
|
|
type SharedIdGetHead = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/shared_collections/validators/shared_collection.ts'))['getSharedCollectionValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/shared_collections/controllers/shared_collections_controller.ts').default['index'],
|
|
true
|
|
>;
|
|
};
|
|
type UserThemePost = {
|
|
request: MakeTuyauRequest<
|
|
InferInput<
|
|
(typeof import('../app/user/validators/update_theme_validator.ts'))['updateThemeValidator']
|
|
>
|
|
>;
|
|
response: MakeTuyauResponse<
|
|
import('../app/user/controllers/theme_controller.ts').default['index'],
|
|
true
|
|
>;
|
|
};
|
|
export interface ApiDefinition {
|
|
admin: {
|
|
$url: {};
|
|
$get: AdminGetHead;
|
|
$head: AdminGetHead;
|
|
};
|
|
auth: {
|
|
callback: {
|
|
$url: {};
|
|
$get: AuthCallbackGetHead;
|
|
$head: AuthCallbackGetHead;
|
|
};
|
|
logout: {
|
|
$url: {};
|
|
$get: AuthLogoutGetHead;
|
|
$head: AuthLogoutGetHead;
|
|
};
|
|
};
|
|
dashboard: {
|
|
$url: {};
|
|
$get: DashboardGetHead;
|
|
$head: DashboardGetHead;
|
|
};
|
|
collections: {
|
|
create: {
|
|
$url: {};
|
|
$get: CollectionsCreateGetHead;
|
|
$head: CollectionsCreateGetHead;
|
|
};
|
|
$url: {};
|
|
$post: CollectionsPost;
|
|
edit: {
|
|
$url: {};
|
|
$get: CollectionsEditGetHead;
|
|
$head: CollectionsEditGetHead;
|
|
};
|
|
':id': {
|
|
$url: {};
|
|
$put: CollectionsIdPut;
|
|
$delete: CollectionsIdDelete;
|
|
};
|
|
delete: {
|
|
$url: {};
|
|
$get: CollectionsDeleteGetHead;
|
|
$head: CollectionsDeleteGetHead;
|
|
};
|
|
};
|
|
favicon: {
|
|
$url: {};
|
|
$get: FaviconGetHead;
|
|
$head: FaviconGetHead;
|
|
};
|
|
links: {
|
|
create: {
|
|
$url: {};
|
|
$get: LinksCreateGetHead;
|
|
$head: LinksCreateGetHead;
|
|
};
|
|
$url: {};
|
|
$post: LinksPost;
|
|
edit: {
|
|
$url: {};
|
|
$get: LinksEditGetHead;
|
|
$head: LinksEditGetHead;
|
|
};
|
|
':id': {
|
|
$url: {};
|
|
$put: LinksIdPut;
|
|
favorite: {
|
|
$url: {};
|
|
$put: LinksIdFavoritePut;
|
|
};
|
|
$delete: LinksIdDelete;
|
|
};
|
|
delete: {
|
|
$url: {};
|
|
$get: LinksDeleteGetHead;
|
|
$head: LinksDeleteGetHead;
|
|
};
|
|
};
|
|
search: {
|
|
$url: {};
|
|
$get: SearchGetHead;
|
|
$head: SearchGetHead;
|
|
};
|
|
shared: {
|
|
':id': {
|
|
$url: {};
|
|
$get: SharedIdGetHead;
|
|
$head: SharedIdGetHead;
|
|
};
|
|
};
|
|
user: {
|
|
theme: {
|
|
$url: {};
|
|
$post: UserThemePost;
|
|
};
|
|
};
|
|
}
|
|
const routes = [
|
|
{
|
|
params: [],
|
|
name: 'admin.dashboard',
|
|
path: '/admin',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as AdminGetHead,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'auth',
|
|
path: '/auth/google',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as unknown,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'auth.callback',
|
|
path: '/auth/callback',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as AuthCallbackGetHead,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'auth.logout',
|
|
path: '/auth/logout',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as AuthLogoutGetHead,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'dashboard',
|
|
path: '/dashboard',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as DashboardGetHead,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'collection.create-form',
|
|
path: '/collections/create',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as CollectionsCreateGetHead,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'collection.create',
|
|
path: '/collections',
|
|
method: ['POST'],
|
|
types: {} as CollectionsPost,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'collection.edit-form',
|
|
path: '/collections/edit',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as CollectionsEditGetHead,
|
|
},
|
|
{
|
|
params: ['id'],
|
|
name: 'collection.edit',
|
|
path: '/collections/:id',
|
|
method: ['PUT'],
|
|
types: {} as CollectionsIdPut,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'collection.delete-form',
|
|
path: '/collections/delete',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as CollectionsDeleteGetHead,
|
|
},
|
|
{
|
|
params: ['id'],
|
|
name: 'collection.delete',
|
|
path: '/collections/:id',
|
|
method: ['DELETE'],
|
|
types: {} as CollectionsIdDelete,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'favicon',
|
|
path: '/favicon',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as FaviconGetHead,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'home',
|
|
path: '/',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as unknown,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'terms',
|
|
path: '/terms',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as unknown,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'privacy',
|
|
path: '/privacy',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as unknown,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'link.create-form',
|
|
path: '/links/create',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as LinksCreateGetHead,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'link.create',
|
|
path: '/links',
|
|
method: ['POST'],
|
|
types: {} as LinksPost,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'link.edit-form',
|
|
path: '/links/edit',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as LinksEditGetHead,
|
|
},
|
|
{
|
|
params: ['id'],
|
|
name: 'link.edit',
|
|
path: '/links/:id',
|
|
method: ['PUT'],
|
|
types: {} as LinksIdPut,
|
|
},
|
|
{
|
|
params: ['id'],
|
|
name: 'link.toggle-favorite',
|
|
path: '/links/:id/favorite',
|
|
method: ['PUT'],
|
|
types: {} as LinksIdFavoritePut,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'link.delete-form',
|
|
path: '/links/delete',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as LinksDeleteGetHead,
|
|
},
|
|
{
|
|
params: ['id'],
|
|
name: 'link.delete',
|
|
path: '/links/:id',
|
|
method: ['DELETE'],
|
|
types: {} as LinksIdDelete,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'search',
|
|
path: '/search',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as SearchGetHead,
|
|
},
|
|
{
|
|
params: ['id'],
|
|
name: 'shared',
|
|
path: '/shared/:id',
|
|
method: ['GET', 'HEAD'],
|
|
types: {} as SharedIdGetHead,
|
|
},
|
|
{
|
|
params: [],
|
|
name: 'user.theme',
|
|
path: '/user/theme',
|
|
method: ['POST'],
|
|
types: {} as UserThemePost,
|
|
},
|
|
] as const;
|
|
export const api = {
|
|
routes,
|
|
definition: {} as ApiDefinition,
|
|
};
|
|
declare module '@tuyau/inertia/types' {
|
|
type InertiaApi = typeof api;
|
|
export interface Api extends InertiaApi {}
|
|
}
|