860ebed68a
* chore(server): auth IoC 3 - getAllAppsCreatedByUserFactory * minor fix * chore(server): auth IoC 4 - getAllAppsAuthorizedByUserFactory --------- Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
31 lines
906 B
TypeScript
31 lines
906 B
TypeScript
import { DefaultAppWithUnwrappedScopes } from '@/modules/auth/defaultApps'
|
|
import {
|
|
FullServerApp,
|
|
ServerAppListItem,
|
|
UserServerApp
|
|
} from '@/modules/auth/domain/types'
|
|
import { ScopeRecord } from '@/modules/auth/helpers/types'
|
|
|
|
export type GetApp = (params: { id: string }) => Promise<FullServerApp | null>
|
|
|
|
export type GetAllPublicApps = () => Promise<ServerAppListItem[]>
|
|
|
|
export type GetAllAppsCreatedByUser = (params: {
|
|
userId: string
|
|
}) => Promise<UserServerApp[]>
|
|
|
|
export type GetAllAppsAuthorizedByUser = (params: {
|
|
userId: string
|
|
}) => Promise<ServerAppListItem[]>
|
|
|
|
export type GetAllScopes = () => Promise<ScopeRecord[]>
|
|
|
|
export type RegisterDefaultApp = (app: DefaultAppWithUnwrappedScopes) => Promise<void>
|
|
|
|
export type UpdateDefaultApp = (
|
|
app: DefaultAppWithUnwrappedScopes,
|
|
existingApp: FullServerApp
|
|
) => Promise<void>
|
|
|
|
export type InitializeDefaultApps = () => Promise<void>
|