import { Scenario as BaseScenario, type ClientOptions as BaseClientOptions } from "../client.js"; import { EnhancedAssets } from "./asset.js"; import { EnhancedGenerate } from "./generate.js"; import { EnhancedJobs } from "./job.js"; import { EnhancedModels } from "./models.js"; import { EnhancedUploads } from "./upload.js"; import { EnhancedWorkflows } from "./workflow.js"; export interface ClientOptions extends BaseClientOptions { /** * Default project to scope every request to (sent as `?projectId=...`). * * Useful with `bearerAuth` when the user belongs to multiple projects — * the server derives the team from the project, so `teamId` doesn't need * to be configured at construction time. With `apiKey` auth, the project * is already implied by the key and this option is unnecessary. * * Per-call `options.query.projectId` overrides this default for a single * request. SDK helpers (`.wait()`, `model.run()`, ...) reuse the scope * effective on the originating call, so an action created in project A * keeps polling in project A even if the client default changes later. */ projectId?: string | null | undefined; } /** * Enhanced Scenario client. * * Extends the generated client — all original methods are inherited. * Job-producing methods return responses where `job` has `.wait()`. * Workflow retrieve returns a response where `workflow` has `.findNode()`. * * @example * ```ts * import Scenario from '@scenario-labs/sdk'; * * // With API key — project is implied by the key. * const client = new Scenario({ apiKey: '...', apiSecret: '...' }); * * // With bearer JWT — pin a default project for all requests. * const client = new Scenario({ bearerAuth: jwt, projectId: 'proj_abc' }); * * // Per-call override (one request only): * await client.uploads.uploadFile(params, { query: { projectId: 'proj_other' } }); * * // Enhanced: response.job.wait() — auto-reuses the scope of the call that produced the job * const run = await client.workflows.run(workflowId, { body }); * const completed = await run.job.wait(); * * // Enhanced: upload.wait() * const res = await client.uploads.retrieve(uploadId); * const imported = await res.upload.wait(); * * // Enhanced: asset.download() * const a = await client.assets.retrieve(assetId); * const bytes = await a.asset.download(); * ``` */ export declare class Scenario extends BaseScenario { workflows: EnhancedWorkflows; generate: EnhancedGenerate; models: EnhancedModels; uploads: EnhancedUploads; assets: EnhancedAssets; jobs: EnhancedJobs; /** The default project this client scopes every request to, or `null` if unset. */ readonly projectId: string | null; constructor(options?: ClientOptions); } //# sourceMappingURL=scenario.d.ts.map