Skip to content

Commit

Permalink
feat(actor-build): add actorDefinition type for actor build detail, d…
Browse files Browse the repository at this point in the history
…eprecate inputSchema and readme. (#611)

The API was updated, based on changes we updated the types in client:
- add actorDefinitions for build detail
- deprecate inputSchema and readme

---------

Co-authored-by: František Nesveda <[email protected]>
  • Loading branch information
drobnikj and fnesveda authored Nov 27, 2024
1 parent 0db323c commit 123c2b8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/resource_clients/actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,22 @@ export interface ActorBuildOptions {
export interface ActorLastRunOptions {
status?: keyof typeof ACT_JOB_STATUSES;
}

export interface ActorDefinition {
actorSpecification: number;
name: string;
version: string;
buildTag?: string;
environmentVariables?: Record<string, string>;
dockerfile?: string;
dockerContextDir?: string;
readme?: string | null;
input?: object | null;
changelog?: string | null;
storages?: {
dataset?: object;
};
minMemoryMbytes?: number;
maxMemoryMbytes?: number;
usesStandbyMode?: boolean;
}
8 changes: 8 additions & 0 deletions src/resource_clients/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
parseDateFields,
pluckData,
} from '../utils';
import { ActorDefinition } from './actor';

export class BuildClient extends ResourceClient {
/**
Expand Down Expand Up @@ -110,12 +111,19 @@ export interface Build {
meta: BuildMeta;
stats?: BuildStats;
options?: BuildOptions;
/**
* @deprecated This property is deprecated in favor of `actorDefinition.input`.
*/
inputSchema?: string;
/**
* @deprecated This property is deprecated in favor of `actorDefinition.readme`.
*/
readme?: string;
buildNumber: string;
usage?: BuildUsage;
usageTotalUsd?: number;
usageUsd?: BuildUsage;
actorDefinitions?: ActorDefinition;
}

export interface BuildUsage {
Expand Down

0 comments on commit 123c2b8

Please sign in to comment.