@prismshadow/penguin-library-model · library/model/src/modelscope-auth-service.ts:624

ModelScopeAuth

interface

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 / @Use
@Moduleexported by
@Provideprovided by

Members (5)

ensureFresh

ensureFresh(input: { projectId: string; provider: string; }): Promise<ModelScopeRefreshResult>
@paraminput{ projectId: string; provider: string; }
@returnsPromise<ModelScopeRefreshResult>

start

start(input: { projectId: string; userId: string }): Promise<{ flowId: string; authorizeUrl: string; expiresAt: string; }>
@paraminput{ projectId: string; userId: string }
@returnsPromise<{ flowId: string; authorizeUrl: string; expiresAt: string; }>

status

status(input: { flowId: string; projectId: string; userId: string; }): Promise<ModelScopeAuthStatusResult>
@paraminput{ flowId: string; projectId: string; userId: string; }
@returnsPromise<ModelScopeAuthStatusResult>

retryApply

retryApply(input: { flowId: string; projectId: string; userId: string; }): Promise<ModelScopeAuthStatusResult>
@paraminput{ flowId: string; projectId: string; userId: string; }
@returnsPromise<ModelScopeAuthStatusResult>

cancel

cancel(input: { flowId: string; projectId: string; userId: string }): void
@paraminput{ flowId: string; projectId: string; userId: string }
@returnsvoid