modal 0.5.0-dev.7 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -4991,7 +4991,7 @@ declare class FunctionCallService {
4991
4991
  }
4992
4992
  /** Optional parameters for {@link FunctionCall#get FunctionCall.get()}. */
4993
4993
  type FunctionCallGetParams = {
4994
- timeout?: number;
4994
+ timeoutMs?: number;
4995
4995
  };
4996
4996
  /** Optional parameters for {@link FunctionCall#cancel FunctionCall.cancel()}. */
4997
4997
  type FunctionCallCancelParams = {
@@ -5049,7 +5049,7 @@ interface FunctionUpdateAutoscalerParams {
5049
5049
  minContainers?: number;
5050
5050
  maxContainers?: number;
5051
5051
  bufferContainers?: number;
5052
- scaledownWindow?: number;
5052
+ scaledownWindowMs?: number;
5053
5053
  }
5054
5054
  /** Represents a deployed Modal Function, which can be invoked remotely. */
5055
5055
  declare class Function_ {
@@ -5216,7 +5216,9 @@ declare class ClsService {
5216
5216
  }
5217
5217
  type ClsWithOptionsParams = {
5218
5218
  cpu?: number;
5219
- memory?: number;
5219
+ cpuLimit?: number;
5220
+ memoryMiB?: number;
5221
+ memoryLimitMiB?: number;
5220
5222
  gpu?: string;
5221
5223
  env?: Record<string, string>;
5222
5224
  secrets?: Secret[];
@@ -5224,8 +5226,8 @@ type ClsWithOptionsParams = {
5224
5226
  retries?: number | Retries;
5225
5227
  maxContainers?: number;
5226
5228
  bufferContainers?: number;
5227
- scaledownWindow?: number;
5228
- timeout?: number;
5229
+ scaledownWindowMs?: number;
5230
+ timeoutMs?: number;
5229
5231
  };
5230
5232
  type ClsWithConcurrencyParams = {
5231
5233
  maxInputs: number;
@@ -5457,8 +5459,8 @@ type QueueClearParams = {
5457
5459
  };
5458
5460
  /** Optional parameters for {@link Queue#get Queue.get()}. */
5459
5461
  type QueueGetParams = {
5460
- /** How long to wait if the Queue is empty (default: indefinite). */
5461
- timeout?: number;
5462
+ /** How long to wait if the Queue is empty in milliseconds (default: indefinite). */
5463
+ timeoutMs?: number;
5462
5464
  /** Partition to fetch values from, uses default partition if not set. */
5463
5465
  partition?: string;
5464
5466
  };
@@ -5466,12 +5468,12 @@ type QueueGetParams = {
5466
5468
  type QueueGetManyParams = QueueGetParams;
5467
5469
  /** Optional parameters for {@link Queue#put Queue.put()}. */
5468
5470
  type QueuePutParams = {
5469
- /** How long to wait if the Queue is full (default: indefinite). */
5470
- timeout?: number;
5471
+ /** How long to wait if the Queue is full in milliseconds (default: indefinite). */
5472
+ timeoutMs?: number;
5471
5473
  /** Partition to add items to, uses default partition if not set. */
5472
5474
  partition?: string;
5473
- /** TTL for the partition in seconds (default: 1 day). */
5474
- partitionTtl?: number;
5475
+ /** TTL for the partition in milliseconds (default: 1 day). */
5476
+ partitionTtlMs?: number;
5475
5477
  };
5476
5478
  /** Optional parameters for {@link Queue#putMany Queue.putMany()}. */
5477
5479
  type QueuePutManyParams = QueuePutParams;
@@ -5484,8 +5486,8 @@ type QueueLenParams = {
5484
5486
  };
5485
5487
  /** Optional parameters for {@link Queue#iterate Queue.iterate()}. */
5486
5488
  type QueueIterateParams = {
5487
- /** How long to wait between successive items before exiting iteration (default: 0). */
5488
- itemPollTimeout?: number;
5489
+ /** How long to wait between successive items before exiting iteration in milliseconds (default: 0). */
5490
+ itemPollTimeoutMs?: number;
5489
5491
  /** Partition to iterate, uses default partition if not set. */
5490
5492
  partition?: string;
5491
5493
  };
@@ -5520,7 +5522,7 @@ declare class Queue {
5520
5522
  * Remove and return the next object from the Queue.
5521
5523
  *
5522
5524
  * By default, this will wait until at least one item is present in the Queue.
5523
- * If `timeout` is set, raises `QueueEmptyError` if no items are available
5525
+ * If `timeoutMs` is set, raises `QueueEmptyError` if no items are available
5524
5526
  * within that timeout in milliseconds.
5525
5527
  */
5526
5528
  get(params?: QueueGetParams): Promise<any | null>;
@@ -5528,7 +5530,7 @@ declare class Queue {
5528
5530
  * Remove and return up to `n` objects from the Queue.
5529
5531
  *
5530
5532
  * By default, this will wait until at least one item is present in the Queue.
5531
- * If `timeout` is set, raises `QueueEmptyError` if no items are available
5533
+ * If `timeoutMs` is set, raises `QueueEmptyError` if no items are available
5532
5534
  * within that timeout in milliseconds.
5533
5535
  */
5534
5536
  getMany(n: number, params?: QueueGetManyParams): Promise<any[]>;
@@ -5536,7 +5538,7 @@ declare class Queue {
5536
5538
  * Add an item to the end of the Queue.
5537
5539
  *
5538
5540
  * If the Queue is full, this will retry with exponential backoff until the
5539
- * provided `timeout` is reached, or indefinitely if `timeout` is not set.
5541
+ * provided `timeoutMs` is reached, or indefinitely if `timeoutMs` is not set.
5540
5542
  * Raises {@link QueueFullError} if the Queue is still full after the timeout.
5541
5543
  */
5542
5544
  put(v: any, params?: QueuePutParams): Promise<void>;
@@ -5544,7 +5546,7 @@ declare class Queue {
5544
5546
  * Add several items to the end of the Queue.
5545
5547
  *
5546
5548
  * If the Queue is full, this will retry with exponential backoff until the
5547
- * provided `timeout` is reached, or indefinitely if `timeout` is not set.
5549
+ * provided `timeoutMs` is reached, or indefinitely if `timeoutMs` is not set.
5548
5550
  * Raises {@link QueueFullError} if the Queue is still full after the timeout.
5549
5551
  */
5550
5552
  putMany(values: any[], params?: QueuePutManyParams): Promise<void>;
@@ -5657,14 +5659,18 @@ type StreamMode = "text" | "binary";
5657
5659
  type SandboxCreateParams = {
5658
5660
  /** Reservation of physical CPU cores for the Sandbox, can be fractional. */
5659
5661
  cpu?: number;
5662
+ /** Hard limit of physical CPU cores for the Sandbox, can be fractional. */
5663
+ cpuLimit?: number;
5660
5664
  /** Reservation of memory in MiB. */
5661
- memory?: number;
5665
+ memoryMiB?: number;
5666
+ /** Hard limit of memory in MiB. */
5667
+ memoryLimitMiB?: number;
5662
5668
  /** GPU reservation for the Sandbox (e.g. "A100", "T4:2", "A100-80GB:4"). */
5663
5669
  gpu?: string;
5664
- /** Timeout of the Sandbox container, defaults to 10 minutes. */
5665
- timeout?: number;
5670
+ /** Timeout of the Sandbox container in milliseconds, defaults to 10 minutes. */
5671
+ timeoutMs?: number;
5666
5672
  /** The amount of time in milliseconds that a sandbox can be idle before being terminated. */
5667
- idleTimeout?: number;
5673
+ idleTimeoutMs?: number;
5668
5674
  /** Working directory of the Sandbox. */
5669
5675
  workdir?: string;
5670
5676
  /**
@@ -5765,7 +5771,7 @@ type SandboxExecParams = {
5765
5771
  /** Working directory to run the command in. */
5766
5772
  workdir?: string;
5767
5773
  /** Timeout for the process in milliseconds. Defaults to 0 (no timeout). */
5768
- timeout?: number;
5774
+ timeoutMs?: number;
5769
5775
  /** Environment variables to set for the command. */
5770
5776
  env?: Record<string, string>;
5771
5777
  /** {@link Secret}s to inject as environment variables for the commmand.*/
@@ -5830,16 +5836,16 @@ declare class Sandbox {
5830
5836
  *
5831
5837
  * @returns A dictionary of {@link Tunnel} objects which are keyed by the container port.
5832
5838
  */
5833
- tunnels(timeout?: number): Promise<Record<number, Tunnel>>;
5839
+ tunnels(timeoutMs?: number): Promise<Record<number, Tunnel>>;
5834
5840
  /**
5835
5841
  * Snapshot the filesystem of the Sandbox.
5836
5842
  *
5837
5843
  * Returns an {@link Image} object which can be used to spawn a new Sandbox with the same filesystem.
5838
5844
  *
5839
- * @param timeout - Timeout for the snapshot operation in milliseconds
5845
+ * @param timeoutMs - Timeout for the snapshot operation in milliseconds
5840
5846
  * @returns Promise that resolves to an {@link Image}
5841
5847
  */
5842
- snapshotFilesystem(timeout?: number): Promise<Image>;
5848
+ snapshotFilesystem(timeoutMs?: number): Promise<Image>;
5843
5849
  /**
5844
5850
  * Check if the Sandbox has finished running.
5845
5851
  *
@@ -5869,6 +5875,15 @@ interface Profile {
5869
5875
  tokenSecret?: string;
5870
5876
  environment?: string;
5871
5877
  imageBuilderVersion?: string;
5878
+ logLevel?: string;
5879
+ }
5880
+
5881
+ type LogLevel = "debug" | "info" | "warn" | "error";
5882
+ interface Logger {
5883
+ debug(message: string, ...args: any[]): void;
5884
+ info(message: string, ...args: any[]): void;
5885
+ warn(message: string, ...args: any[]): void;
5886
+ error(message: string, ...args: any[]): void;
5872
5887
  }
5873
5888
 
5874
5889
  interface ModalClientParams {
@@ -5876,8 +5891,10 @@ interface ModalClientParams {
5876
5891
  tokenSecret?: string;
5877
5892
  environment?: string;
5878
5893
  endpoint?: string;
5879
- timeout?: number;
5894
+ timeoutMs?: number;
5880
5895
  maxRetries?: number;
5896
+ logger?: Logger;
5897
+ logLevel?: LogLevel;
5881
5898
  /** @ignore */
5882
5899
  cpClient?: ModalGrpcClient;
5883
5900
  }
@@ -5914,6 +5931,7 @@ declare class ModalClient {
5914
5931
  /** @ignore */
5915
5932
  readonly cpClient: ModalGrpcClient;
5916
5933
  readonly profile: Profile;
5934
+ readonly logger: Logger;
5917
5935
  private ipClients;
5918
5936
  private authTokenManager;
5919
5937
  constructor(params?: ModalClientParams);
@@ -5924,11 +5942,13 @@ declare class ModalClient {
5924
5942
  close(): void;
5925
5943
  version(): string;
5926
5944
  private createClient;
5945
+ /** Middleware to retry transient errors and timeouts for unary requests. */
5946
+ private retryMiddleware;
5927
5947
  private authMiddleware;
5928
5948
  }
5929
5949
  type TimeoutOptions = {
5930
5950
  /** Timeout for this call, interpreted as a duration in milliseconds */
5931
- timeout?: number;
5951
+ timeoutMs?: number;
5932
5952
  };
5933
5953
  type RetryOptions = {
5934
5954
  /** Number of retries to take. */
@@ -6060,4 +6080,6 @@ declare class SandboxTimeoutError extends Error {
6060
6080
  constructor(message?: string);
6061
6081
  }
6062
6082
 
6063
- export { AlreadyExistsError, App, type AppFromNameParams, AppService, type ClientOptions, CloudBucketMount, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, SandboxTimeoutError, Secret, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, close, initializeClient };
6083
+ declare function checkForRenamedParams(params: any, renames: Record<string, string>): void;
6084
+
6085
+ export { AlreadyExistsError, App, type AppFromNameParams, AppService, type ClientOptions, CloudBucketMount, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, SandboxTimeoutError, Secret, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };
package/dist/index.d.ts CHANGED
@@ -4991,7 +4991,7 @@ declare class FunctionCallService {
4991
4991
  }
4992
4992
  /** Optional parameters for {@link FunctionCall#get FunctionCall.get()}. */
4993
4993
  type FunctionCallGetParams = {
4994
- timeout?: number;
4994
+ timeoutMs?: number;
4995
4995
  };
4996
4996
  /** Optional parameters for {@link FunctionCall#cancel FunctionCall.cancel()}. */
4997
4997
  type FunctionCallCancelParams = {
@@ -5049,7 +5049,7 @@ interface FunctionUpdateAutoscalerParams {
5049
5049
  minContainers?: number;
5050
5050
  maxContainers?: number;
5051
5051
  bufferContainers?: number;
5052
- scaledownWindow?: number;
5052
+ scaledownWindowMs?: number;
5053
5053
  }
5054
5054
  /** Represents a deployed Modal Function, which can be invoked remotely. */
5055
5055
  declare class Function_ {
@@ -5216,7 +5216,9 @@ declare class ClsService {
5216
5216
  }
5217
5217
  type ClsWithOptionsParams = {
5218
5218
  cpu?: number;
5219
- memory?: number;
5219
+ cpuLimit?: number;
5220
+ memoryMiB?: number;
5221
+ memoryLimitMiB?: number;
5220
5222
  gpu?: string;
5221
5223
  env?: Record<string, string>;
5222
5224
  secrets?: Secret[];
@@ -5224,8 +5226,8 @@ type ClsWithOptionsParams = {
5224
5226
  retries?: number | Retries;
5225
5227
  maxContainers?: number;
5226
5228
  bufferContainers?: number;
5227
- scaledownWindow?: number;
5228
- timeout?: number;
5229
+ scaledownWindowMs?: number;
5230
+ timeoutMs?: number;
5229
5231
  };
5230
5232
  type ClsWithConcurrencyParams = {
5231
5233
  maxInputs: number;
@@ -5457,8 +5459,8 @@ type QueueClearParams = {
5457
5459
  };
5458
5460
  /** Optional parameters for {@link Queue#get Queue.get()}. */
5459
5461
  type QueueGetParams = {
5460
- /** How long to wait if the Queue is empty (default: indefinite). */
5461
- timeout?: number;
5462
+ /** How long to wait if the Queue is empty in milliseconds (default: indefinite). */
5463
+ timeoutMs?: number;
5462
5464
  /** Partition to fetch values from, uses default partition if not set. */
5463
5465
  partition?: string;
5464
5466
  };
@@ -5466,12 +5468,12 @@ type QueueGetParams = {
5466
5468
  type QueueGetManyParams = QueueGetParams;
5467
5469
  /** Optional parameters for {@link Queue#put Queue.put()}. */
5468
5470
  type QueuePutParams = {
5469
- /** How long to wait if the Queue is full (default: indefinite). */
5470
- timeout?: number;
5471
+ /** How long to wait if the Queue is full in milliseconds (default: indefinite). */
5472
+ timeoutMs?: number;
5471
5473
  /** Partition to add items to, uses default partition if not set. */
5472
5474
  partition?: string;
5473
- /** TTL for the partition in seconds (default: 1 day). */
5474
- partitionTtl?: number;
5475
+ /** TTL for the partition in milliseconds (default: 1 day). */
5476
+ partitionTtlMs?: number;
5475
5477
  };
5476
5478
  /** Optional parameters for {@link Queue#putMany Queue.putMany()}. */
5477
5479
  type QueuePutManyParams = QueuePutParams;
@@ -5484,8 +5486,8 @@ type QueueLenParams = {
5484
5486
  };
5485
5487
  /** Optional parameters for {@link Queue#iterate Queue.iterate()}. */
5486
5488
  type QueueIterateParams = {
5487
- /** How long to wait between successive items before exiting iteration (default: 0). */
5488
- itemPollTimeout?: number;
5489
+ /** How long to wait between successive items before exiting iteration in milliseconds (default: 0). */
5490
+ itemPollTimeoutMs?: number;
5489
5491
  /** Partition to iterate, uses default partition if not set. */
5490
5492
  partition?: string;
5491
5493
  };
@@ -5520,7 +5522,7 @@ declare class Queue {
5520
5522
  * Remove and return the next object from the Queue.
5521
5523
  *
5522
5524
  * By default, this will wait until at least one item is present in the Queue.
5523
- * If `timeout` is set, raises `QueueEmptyError` if no items are available
5525
+ * If `timeoutMs` is set, raises `QueueEmptyError` if no items are available
5524
5526
  * within that timeout in milliseconds.
5525
5527
  */
5526
5528
  get(params?: QueueGetParams): Promise<any | null>;
@@ -5528,7 +5530,7 @@ declare class Queue {
5528
5530
  * Remove and return up to `n` objects from the Queue.
5529
5531
  *
5530
5532
  * By default, this will wait until at least one item is present in the Queue.
5531
- * If `timeout` is set, raises `QueueEmptyError` if no items are available
5533
+ * If `timeoutMs` is set, raises `QueueEmptyError` if no items are available
5532
5534
  * within that timeout in milliseconds.
5533
5535
  */
5534
5536
  getMany(n: number, params?: QueueGetManyParams): Promise<any[]>;
@@ -5536,7 +5538,7 @@ declare class Queue {
5536
5538
  * Add an item to the end of the Queue.
5537
5539
  *
5538
5540
  * If the Queue is full, this will retry with exponential backoff until the
5539
- * provided `timeout` is reached, or indefinitely if `timeout` is not set.
5541
+ * provided `timeoutMs` is reached, or indefinitely if `timeoutMs` is not set.
5540
5542
  * Raises {@link QueueFullError} if the Queue is still full after the timeout.
5541
5543
  */
5542
5544
  put(v: any, params?: QueuePutParams): Promise<void>;
@@ -5544,7 +5546,7 @@ declare class Queue {
5544
5546
  * Add several items to the end of the Queue.
5545
5547
  *
5546
5548
  * If the Queue is full, this will retry with exponential backoff until the
5547
- * provided `timeout` is reached, or indefinitely if `timeout` is not set.
5549
+ * provided `timeoutMs` is reached, or indefinitely if `timeoutMs` is not set.
5548
5550
  * Raises {@link QueueFullError} if the Queue is still full after the timeout.
5549
5551
  */
5550
5552
  putMany(values: any[], params?: QueuePutManyParams): Promise<void>;
@@ -5657,14 +5659,18 @@ type StreamMode = "text" | "binary";
5657
5659
  type SandboxCreateParams = {
5658
5660
  /** Reservation of physical CPU cores for the Sandbox, can be fractional. */
5659
5661
  cpu?: number;
5662
+ /** Hard limit of physical CPU cores for the Sandbox, can be fractional. */
5663
+ cpuLimit?: number;
5660
5664
  /** Reservation of memory in MiB. */
5661
- memory?: number;
5665
+ memoryMiB?: number;
5666
+ /** Hard limit of memory in MiB. */
5667
+ memoryLimitMiB?: number;
5662
5668
  /** GPU reservation for the Sandbox (e.g. "A100", "T4:2", "A100-80GB:4"). */
5663
5669
  gpu?: string;
5664
- /** Timeout of the Sandbox container, defaults to 10 minutes. */
5665
- timeout?: number;
5670
+ /** Timeout of the Sandbox container in milliseconds, defaults to 10 minutes. */
5671
+ timeoutMs?: number;
5666
5672
  /** The amount of time in milliseconds that a sandbox can be idle before being terminated. */
5667
- idleTimeout?: number;
5673
+ idleTimeoutMs?: number;
5668
5674
  /** Working directory of the Sandbox. */
5669
5675
  workdir?: string;
5670
5676
  /**
@@ -5765,7 +5771,7 @@ type SandboxExecParams = {
5765
5771
  /** Working directory to run the command in. */
5766
5772
  workdir?: string;
5767
5773
  /** Timeout for the process in milliseconds. Defaults to 0 (no timeout). */
5768
- timeout?: number;
5774
+ timeoutMs?: number;
5769
5775
  /** Environment variables to set for the command. */
5770
5776
  env?: Record<string, string>;
5771
5777
  /** {@link Secret}s to inject as environment variables for the commmand.*/
@@ -5830,16 +5836,16 @@ declare class Sandbox {
5830
5836
  *
5831
5837
  * @returns A dictionary of {@link Tunnel} objects which are keyed by the container port.
5832
5838
  */
5833
- tunnels(timeout?: number): Promise<Record<number, Tunnel>>;
5839
+ tunnels(timeoutMs?: number): Promise<Record<number, Tunnel>>;
5834
5840
  /**
5835
5841
  * Snapshot the filesystem of the Sandbox.
5836
5842
  *
5837
5843
  * Returns an {@link Image} object which can be used to spawn a new Sandbox with the same filesystem.
5838
5844
  *
5839
- * @param timeout - Timeout for the snapshot operation in milliseconds
5845
+ * @param timeoutMs - Timeout for the snapshot operation in milliseconds
5840
5846
  * @returns Promise that resolves to an {@link Image}
5841
5847
  */
5842
- snapshotFilesystem(timeout?: number): Promise<Image>;
5848
+ snapshotFilesystem(timeoutMs?: number): Promise<Image>;
5843
5849
  /**
5844
5850
  * Check if the Sandbox has finished running.
5845
5851
  *
@@ -5869,6 +5875,15 @@ interface Profile {
5869
5875
  tokenSecret?: string;
5870
5876
  environment?: string;
5871
5877
  imageBuilderVersion?: string;
5878
+ logLevel?: string;
5879
+ }
5880
+
5881
+ type LogLevel = "debug" | "info" | "warn" | "error";
5882
+ interface Logger {
5883
+ debug(message: string, ...args: any[]): void;
5884
+ info(message: string, ...args: any[]): void;
5885
+ warn(message: string, ...args: any[]): void;
5886
+ error(message: string, ...args: any[]): void;
5872
5887
  }
5873
5888
 
5874
5889
  interface ModalClientParams {
@@ -5876,8 +5891,10 @@ interface ModalClientParams {
5876
5891
  tokenSecret?: string;
5877
5892
  environment?: string;
5878
5893
  endpoint?: string;
5879
- timeout?: number;
5894
+ timeoutMs?: number;
5880
5895
  maxRetries?: number;
5896
+ logger?: Logger;
5897
+ logLevel?: LogLevel;
5881
5898
  /** @ignore */
5882
5899
  cpClient?: ModalGrpcClient;
5883
5900
  }
@@ -5914,6 +5931,7 @@ declare class ModalClient {
5914
5931
  /** @ignore */
5915
5932
  readonly cpClient: ModalGrpcClient;
5916
5933
  readonly profile: Profile;
5934
+ readonly logger: Logger;
5917
5935
  private ipClients;
5918
5936
  private authTokenManager;
5919
5937
  constructor(params?: ModalClientParams);
@@ -5924,11 +5942,13 @@ declare class ModalClient {
5924
5942
  close(): void;
5925
5943
  version(): string;
5926
5944
  private createClient;
5945
+ /** Middleware to retry transient errors and timeouts for unary requests. */
5946
+ private retryMiddleware;
5927
5947
  private authMiddleware;
5928
5948
  }
5929
5949
  type TimeoutOptions = {
5930
5950
  /** Timeout for this call, interpreted as a duration in milliseconds */
5931
- timeout?: number;
5951
+ timeoutMs?: number;
5932
5952
  };
5933
5953
  type RetryOptions = {
5934
5954
  /** Number of retries to take. */
@@ -6060,4 +6080,6 @@ declare class SandboxTimeoutError extends Error {
6060
6080
  constructor(message?: string);
6061
6081
  }
6062
6082
 
6063
- export { AlreadyExistsError, App, type AppFromNameParams, AppService, type ClientOptions, CloudBucketMount, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, SandboxTimeoutError, Secret, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, close, initializeClient };
6083
+ declare function checkForRenamedParams(params: any, renames: Record<string, string>): void;
6084
+
6085
+ export { AlreadyExistsError, App, type AppFromNameParams, AppService, type ClientOptions, CloudBucketMount, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, SandboxTimeoutError, Secret, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };