|
|
@ -1,16 +1,19 @@ |
|
|
|
import type messages from '@intlify/vite-plugin-vue-i18n/messages' |
|
|
|
import type { Api as BaseAPI } from 'nocodb-sdk' |
|
|
|
import type { RemovableRef } from '@vueuse/core' |
|
|
|
|
|
|
|
import type { Api, FormType, GalleryType, GridType, RequestParams } from 'nocodb-sdk' |
|
|
|
|
|
|
|
import type { I18n } from 'vue-i18n' |
|
|
|
import type { I18n } from 'vue-i18n' |
|
|
|
import type { GlobalState } from './src/lib/types' |
|
|
|
import type { GlobalState } from './src/lib/types' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import type en from './lang/en.json' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type MessageSchema = typeof en |
|
|
|
|
|
|
|
|
|
|
|
declare module '#app/nuxt' { |
|
|
|
declare module '#app/nuxt' { |
|
|
|
interface NuxtApp { |
|
|
|
interface NuxtApp { |
|
|
|
$api: Api<any> |
|
|
|
$api: BaseAPI<any> |
|
|
|
|
|
|
|
/** {@link import('./plugins/tele') Telemetry} */ |
|
|
|
$tele: { |
|
|
|
$tele: { |
|
|
|
emit: (event: string, data: any) => void |
|
|
|
emit: (event: string, data: any) => void |
|
|
|
} |
|
|
|
} |
|
|
|
// tele.emit
|
|
|
|
/** {@link import('./plugins/tele') Telemetry} Emit telemetry event */ |
|
|
|
$e: (event: string, data?: any) => void |
|
|
|
$e: (event: string, data?: any) => void |
|
|
|
$state: GlobalState |
|
|
|
$state: GlobalState |
|
|
|
} |
|
|
|
} |
|
|
@ -18,15 +21,6 @@ declare module '#app/nuxt' { |
|
|
|
|
|
|
|
|
|
|
|
declare module '@vue/runtime-core' { |
|
|
|
declare module '@vue/runtime-core' { |
|
|
|
interface App { |
|
|
|
interface App { |
|
|
|
i18n: I18n<messages, unknown, unknown, false>['global'] |
|
|
|
i18n: I18n<MessageSchema, unknown, unknown, false>['global'] |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
declare module 'nocodb-sdk' { |
|
|
|
|
|
|
|
interface Api<T> { |
|
|
|
|
|
|
|
// todo: update swagger to accept correct data type
|
|
|
|
|
|
|
|
gridCreate: (tableId: string, data: GridType & { copy_from_id: string }, params?: RequestParams) => Promise<GridType> |
|
|
|
|
|
|
|
formCreate: (tableId: string, data: FormType, params?: RequestParams) => Promise<FormType> |
|
|
|
|
|
|
|
galleryCreate: (tableId: string, data: GalleryType, params?: RequestParams) => Promise<any> |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|