Files
speckle-server/packages/server/modules/auth/domain/operations.ts
T
Kristaps Fabians Geikins 860ebed68a chore(server): auth IoC 4 - getAllAppsAuthorizedByUserFactory (#3019)
* chore(server): auth IoC 3 - getAllAppsCreatedByUserFactory

* minor fix

* chore(server): auth IoC 4 - getAllAppsAuthorizedByUserFactory

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-09-19 09:22:12 +02:00

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>