The per-App ModelScope key authorization capability consumed by Project model routes.
API
@Interface()
export abstract class ModelScopeAuth {
abstract ensureFresh(input: {
projectId: string;
provider: string;
}): Promise<ModelScopeRefreshResult>;
abstract start(input: { projectId: string; userId: string }): Promise<{
flowId: string;
authorizeUrl: string;
expiresAt: string;
}>;
abstract status(input: {
flowId: string;
projectId: string;
userId: string;
}): Promise<ModelScopeAuthStatusResult>;
abstract retryApply(input: {
flowId: string;
projectId: string;
userId: string;
}): Promise<ModelScopeAuthStatusResult>;
abstract cancel(input: { flowId: string; projectId: string; userId: string }): void;
}Contract Topology
Static AST wiring across @Module / @Provide / @UseMembers (5)
ensureFresh
ensureFresh(input: { projectId: string; provider: string; }): Promise<ModelScopeRefreshResult>@paraminput
{ projectId: string; provider: string; }@returns
Promise<ModelScopeRefreshResult>start
start(input: { projectId: string; userId: string }): Promise<{ flowId: string; authorizeUrl: string; expiresAt: string; }>@paraminput
{ projectId: string; userId: string }@returns
Promise<{ flowId: string; authorizeUrl: string; expiresAt: string; }>status
status(input: { flowId: string; projectId: string; userId: string; }): Promise<ModelScopeAuthStatusResult>@paraminput
{ flowId: string; projectId: string; userId: string; }@returns
Promise<ModelScopeAuthStatusResult>retryApply
retryApply(input: { flowId: string; projectId: string; userId: string; }): Promise<ModelScopeAuthStatusResult>@paraminput
{ flowId: string; projectId: string; userId: string; }@returns
Promise<ModelScopeAuthStatusResult>cancel
cancel(input: { flowId: string; projectId: string; userId: string }): void@paraminput
{ flowId: string; projectId: string; userId: string }@returns
void