Skip to content

Commit 123c2b8

Browse files
drobnikjfnesveda
andauthored
feat(actor-build): add actorDefinition type for actor build detail, deprecate 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]>
1 parent 0db323c commit 123c2b8

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/resource_clients/actor.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,3 +442,22 @@ export interface ActorBuildOptions {
442442
export interface ActorLastRunOptions {
443443
status?: keyof typeof ACT_JOB_STATUSES;
444444
}
445+
446+
export interface ActorDefinition {
447+
actorSpecification: number;
448+
name: string;
449+
version: string;
450+
buildTag?: string;
451+
environmentVariables?: Record<string, string>;
452+
dockerfile?: string;
453+
dockerContextDir?: string;
454+
readme?: string | null;
455+
input?: object | null;
456+
changelog?: string | null;
457+
storages?: {
458+
dataset?: object;
459+
};
460+
minMemoryMbytes?: number;
461+
maxMemoryMbytes?: number;
462+
usesStandbyMode?: boolean;
463+
}

src/resource_clients/build.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
parseDateFields,
1010
pluckData,
1111
} from '../utils';
12+
import { ActorDefinition } from './actor';
1213

1314
export class BuildClient extends ResourceClient {
1415
/**
@@ -110,12 +111,19 @@ export interface Build {
110111
meta: BuildMeta;
111112
stats?: BuildStats;
112113
options?: BuildOptions;
114+
/**
115+
* @deprecated This property is deprecated in favor of `actorDefinition.input`.
116+
*/
113117
inputSchema?: string;
118+
/**
119+
* @deprecated This property is deprecated in favor of `actorDefinition.readme`.
120+
*/
114121
readme?: string;
115122
buildNumber: string;
116123
usage?: BuildUsage;
117124
usageTotalUsd?: number;
118125
usageUsd?: BuildUsage;
126+
actorDefinitions?: ActorDefinition;
119127
}
120128

121129
export interface BuildUsage {

0 commit comments

Comments
 (0)