@prismshadow/penguin-library-model · library/model/src/model.ts:591

ModelPromotions

interface

Per-Project model promotions (web.db model_promotions).

API

@Interface()
export abstract class ModelPromotions {
  abstract get(projectId: string, provider: string, modelId: string): number | undefined;
  abstract list(projectId: string): ModelPromotion[];
  abstract replaceAll(projectId: string, rows: readonly ModelPromotion[]): void;
  abstract replaceProvider(
      projectId: string,
      provider: string,
      rows: readonly ModelPromotion[],
    ): void;
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use

Members (4)

get

get(projectId: string, provider: string, modelId: string): number | undefined
@paramprojectIdstring
@paramproviderstring
@parammodelIdstring
@returnsnumber | undefined

list

list(projectId: string): ModelPromotion[]
@paramprojectIdstring
@returnsModelPromotion[]

replaceAll

replaceAll(projectId: string, rows: readonly ModelPromotion[]): void

Replaces every promotion of the Project, in one transaction.

@paramprojectIdstring
@paramrowsreadonly ModelPromotion[]
@returnsvoid

replaceProvider

replaceProvider(projectId: string, provider: string, rows: readonly ModelPromotion[]): void

Replaces the promotions of one provider group, in one transaction.

@paramprojectIdstring
@paramproviderstring
@paramrowsreadonly ModelPromotion[]
@returnsvoid