From 123c2b81c945a0ca6922221598aa73c42cc298d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Drobn=C3=ADk?= Date: Wed, 27 Nov 2024 15:10:01 +0100 Subject: [PATCH] feat(actor-build): add actorDefinition type for actor build detail, deprecate inputSchema and readme. (#611) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/resource_clients/actor.ts | 19 +++++++++++++++++++ src/resource_clients/build.ts | 8 ++++++++ 2 files changed, 27 insertions(+) diff --git a/src/resource_clients/actor.ts b/src/resource_clients/actor.ts index 18c23d38..1b988057 100644 --- a/src/resource_clients/actor.ts +++ b/src/resource_clients/actor.ts @@ -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; + dockerfile?: string; + dockerContextDir?: string; + readme?: string | null; + input?: object | null; + changelog?: string | null; + storages?: { + dataset?: object; + }; + minMemoryMbytes?: number; + maxMemoryMbytes?: number; + usesStandbyMode?: boolean; +} diff --git a/src/resource_clients/build.ts b/src/resource_clients/build.ts index d6be2d8f..a0220397 100644 --- a/src/resource_clients/build.ts +++ b/src/resource_clients/build.ts @@ -9,6 +9,7 @@ import { parseDateFields, pluckData, } from '../utils'; +import { ActorDefinition } from './actor'; export class BuildClient extends ResourceClient { /** @@ -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 {