From cc282374daf897511de5cd357327e58051790950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Novotn=C3=BD?= Date: Tue, 1 Oct 2024 14:27:13 +0200 Subject: [PATCH] chore: Rename maxCostPerRun (#589) --- src/resource_clients/actor.ts | 10 +++++----- src/resource_clients/task.ts | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/resource_clients/actor.ts b/src/resource_clients/actor.ts index 759af9a1..f8a28d43 100644 --- a/src/resource_clients/actor.ts +++ b/src/resource_clients/actor.ts @@ -68,10 +68,10 @@ export class ActorClient extends ResourceClient { waitForFinish: ow.optional.number, webhooks: ow.optional.array.ofType(ow.object), maxItems: ow.optional.number.not.negative, - maxCostPerRun: ow.optional.number.not.negative, + maxCostPerRunUsd: ow.optional.number.not.negative, })); - const { waitForFinish, timeout, memory, build, maxItems, maxCostPerRun } = options; + const { waitForFinish, timeout, memory, build, maxItems, maxCostPerRunUsd } = options; const params = { waitForFinish, @@ -80,7 +80,7 @@ export class ActorClient extends ResourceClient { build, webhooks: stringifyWebhooksToBase64(options.webhooks), maxItems, - maxCostPerRun, + maxCostPerRunUsd, }; const request: AxiosRequestConfig = { @@ -121,7 +121,7 @@ export class ActorClient extends ResourceClient { waitSecs: ow.optional.number.not.negative, webhooks: ow.optional.array.ofType(ow.object), maxItems: ow.optional.number.not.negative, - maxCostPerRun: ow.optional.number.not.negative, + maxCostPerRunUsd: ow.optional.number.not.negative, })); const { waitSecs, ...startOptions } = options; @@ -350,7 +350,7 @@ export interface ActorStartOptions { */ maxItems?: number; - // TODO(PPE): add maxCostPerRun after finished + // TODO(PPE): add maxCostPerRunUsd after finished } export interface ActorCallOptions extends Omit { diff --git a/src/resource_clients/task.ts b/src/resource_clients/task.ts index f6b75436..5dff3fc0 100644 --- a/src/resource_clients/task.ts +++ b/src/resource_clients/task.ts @@ -65,10 +65,10 @@ export class TaskClient extends ResourceClient { waitForFinish: ow.optional.number, webhooks: ow.optional.array.ofType(ow.object), maxItems: ow.optional.number.not.negative, - maxCostPerRun: ow.optional.number.not.negative, + maxCostPerRunUsd: ow.optional.number.not.negative, })); - const { waitForFinish, timeout, memory, build, maxItems, maxCostPerRun } = options; + const { waitForFinish, timeout, memory, build, maxItems, maxCostPerRunUsd } = options; const params = { waitForFinish, @@ -77,7 +77,7 @@ export class TaskClient extends ResourceClient { build, webhooks: stringifyWebhooksToBase64(options.webhooks), maxItems, - maxCostPerRun, + maxCostPerRunUsd, }; const request: ApifyRequestConfig = { @@ -111,7 +111,7 @@ export class TaskClient extends ResourceClient { waitSecs: ow.optional.number.not.negative, webhooks: ow.optional.array.ofType(ow.object), maxItems: ow.optional.number.not.negative, - maxCostPerRun: ow.optional.number.not.negative, + maxCostPerRunUsd: ow.optional.number.not.negative, })); const { waitSecs, ...startOptions } = options;