ModelOAuth: the mechanism ModelOAuthService implements.
API
@Interface()
export abstract class ModelOAuth {
abstract start(input: {
projectId: string;
userId: string;
provider: string;
mode: ModelOAuthMode;
callbackOrigin: string;
}): ModelOAuthStartResult;
abstract deposit(input: { flowId: string; projectId: string; code: string }): void;
abstract poll(input: { flowId: string; userId: string; projectId: string }): Promise<{
status: ModelOAuthStatus;
provider: string;
error?: ModelOAuthErrorCode;
applied?: number;
defaultOffer?: DefaultModelOffer;
}>;
abstract complete(input: {
flowId: string;
userId: string;
projectId: string;
code: string;
}): Promise<({ ok: true } & GroupKeyApplied) | { ok: false; error: ModelOAuthErrorCode }>;
}Contract Topology
Static AST wiring across @Module / @Provide / @UseMembers (4)
start
start(input: { projectId: string; userId: string; provider: string; mode: ModelOAuthMode; callbackOrigin: string; }): ModelOAuthStartResult@paraminput
{ projectId: string; userId: string; provider: string; mode: ModelOAuthMode; callbackOrigin: string; }@returns
ModelOAuthStartResultdeposit
deposit(input: { flowId: string; projectId: string; code: string }): void@paraminput
{ flowId: string; projectId: string; code: string }@returns
voidpoll
poll(input: { flowId: string; userId: string; projectId: string }): Promise<{ status: ModelOAuthStatus; provider: string; error?: ModelOAuthErrorCode; applied?: number; defaultOffer?: DefaultModelOffer; }>@paraminput
{ flowId: string; userId: string; projectId: string }@returns
Promise<{ status: ModelOAuthStatus; provider: string; error?: ModelOAuthErrorCode; applied?: number; defaultOffer?: DefaultModelOffer; }>complete
complete(input: { flowId: string; userId: string; projectId: string; code: string; }): Promise<({ ok: true } & GroupKeyApplied) | { ok: false; error: ModelOAuthErrorCode }>@paraminput
{ flowId: string; userId: string; projectId: string; code: string; }@returns
Promise<({ ok: true } & GroupKeyApplied) | { ok: false; error: ModelOAuthErrorCode }>