@idapt/browser-app-sdk 0.1.0 → 0.3.0
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/{chunk-AQZ2QVBK.js → chunk-KMLUFF4F.js} +1029 -466
- package/dist/chunk-KMLUFF4F.js.map +1 -0
- package/dist/{chunk-6FSNLUVJ.js → chunk-QWNGAONE.js} +5 -5
- package/dist/{chunk-6FSNLUVJ.js.map → chunk-QWNGAONE.js.map} +1 -1
- package/dist/{client-h2Wsvn7a.d.ts → client-CHsdQcgI.d.cts} +298 -159
- package/dist/{client-CO-P-xYI.d.cts → client-_Jvrbhz2.d.ts} +298 -159
- package/dist/{data-Chus9wn2.d.cts → data-DtOpB63U.d.cts} +235 -86
- package/dist/{data-Chus9wn2.d.ts → data-DtOpB63U.d.ts} +235 -86
- package/dist/index.cjs +1031 -467
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -5
- package/dist/index.d.ts +75 -5
- package/dist/index.js +2 -2
- package/dist/react.cjs +368 -235
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +2 -2
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AQZ2QVBK.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IdaptClient } from './client-
|
|
2
|
-
export { A as AddMemberInput, a as AgentsApi, b as ApiKeysApi, c as AudioApi, B as BlobMeta,
|
|
3
|
-
import { H as HttpContext, C as CallOptions, A as AiGatewayProvider, a as AiGatewayUsageRow, D as DataStore, F as File, W as WriteOptions,
|
|
4
|
-
export {
|
|
1
|
+
import { I as IdaptClient } from './client-CHsdQcgI.cjs';
|
|
2
|
+
export { A as AddMemberInput, a as AgentsApi, b as ApiKeysApi, c as AudioApi, d as AutomationsApi, B as BlobMeta, e as BlobsApi, f as BlobsListOptions, C as COMMAND_BINDINGS, g as ChannelHandle, h as ChatsApi, i as CommandBinding, j as ComputersApi, k as CreateAgentInput, l as CreateApiKeyInput, m as CreateChatInput, n as CreateCollectionInput, o as CreateComputerInput, p as CreateComputerUserInput, q as CreateFolderInput, r as CreateFunctionInput, s as CreateInvitationInput, t as CreateInvitationResult, u as CreateProviderEndpointInput, v as CreateSecretInput, w as CreateShareInput, x as CreateUserEnvVarInput, y as CreateWorkspaceInput, D as DatastoreApi, z as DatastoreListOptions, E as DatastoreSetOptions, F as DeleteInvitationResult, G as DeletedResult, H as DeployFunctionFile, J as DeployFunctionInput, K as DocsApi, L as ExecCommandInput, M as ExecuteCommandOptions, N as FilesApi, O as FireAutomationInput, P as FunctionPermissionInput, Q as FunctionsApi, R as GenerateImageInput, S as GuideApi, T as GuideContent, U as IdaptClientDeps, V as ImagesApi, W as InstallStoreItemInput, X as InvokeFunctionInput, Y as ListAgentsQuery, Z as ListApiKeysQuery, _ as ListAutomationRunsQuery, $ as ListChatsQuery, a0 as ListComputersQuery, a1 as ListFilesQuery, a2 as ListFunctionRunsQuery, a3 as ListFunctionsQuery, a4 as ListMessagesQuery, a5 as ListNotificationsQuery, a6 as ListResult, a7 as ListRunsQuery, a8 as ListSharedWithMeQuery, a9 as ListSharesQuery, aa as ListUsageHistoryQuery, ab as ModelsApi, ac as NotificationAudience, ad as NotificationPreferenceUpdate, ae as NotificationsApi, af as PairComputerInput, ag as PairComputerResult, ah as PatchFileInput, ai as PatchPortInput, aj as PresenceEntry, ak as PresenceHeartbeatOptions, al as ProviderEndpointModelMappingInput, am as ProviderEndpointsApi, an as RealtimeApi, ao as RealtimeEvent, ap as RemoveShareInput, aq as RepromptMessageInput, ar as RotateApiKeyInput, as as RotateApiKeyResult, at as RunFileInput, au as RunFunctionInput, av as SearchApi, aw as SearchInput, ax as SearchStoreQuery, ay as SecretsApi, az as SendMessageInput, aA as SendNotificationInput, aB as SendNotificationResult, aC as SettingsApi, aD as SftpInput, aE as SftpListResult, aF as SftpOp, aG as SftpUploadInput, aH as SharingApi, aI as SpeakInput, aJ as SseEvent, aK as StoreApi, aL as SubscribeOptions, aM as SubscriptionApi, aN as TableQuery, aO as TablesApi, aP as TmuxInput, aQ as TmuxOp, aR as TranscribeInput, aS as UpdateAgentInput, aT as UpdateApiKeyInput, aU as UpdateChatInput, aV as UpdateCollectionInput, aW as UpdateComputerInput, aX as UpdateComputerUserInput, aY as UpdateFunctionInput, aZ as UpdateMemberInput, a_ as UpdateNotificationInput, a$ as UpdateProviderEndpointInput, b0 as UpdateSecretInput, b1 as UpdateSettingsInput, b2 as UpdateShareInput, b3 as UpdateWorkspaceInput, b4 as UploadInput, b5 as UserApi, b6 as V1CommandName, b7 as WebSearchApi, b8 as WebSearchInput, b9 as WorkspacesApi, ba as WritableMemberRole, bb as awaitOperation, bc as executeCommand, bd as getFileBlob, be as getFileText, bf as listFiles } from './client-CHsdQcgI.cjs';
|
|
3
|
+
import { H as HttpContext, C as CallOptions, A as AiGatewayProvider, a as AiGatewayUsageRow, V as VideoModel, b as VideoModelSearchResult, O as OperationHandle, c as VideoGenerationResult, D as DataStore, F as File, W as WriteOptions, d as DeletedResponse, e as DataStoreUploadInput, f as FileUploadResult, g as DataStoreCreateFolderInput, h as ConnectOptions } from './data-DtOpB63U.cjs';
|
|
4
|
+
export { i as Agent, j as AgentRun, k as AgentRunState, l as ApiKey, m as AppFolder, n as AudioModel, o as AudioModelCapabilities, p as AudioModelPricing, q as AuthMode, r as Automation, s as AutomationActionType, t as AutomationCostStats, u as AutomationRun, v as AutomationWithSecret, B as BlobObject, w as BundleReader, x as Chat, y as ChatCost, z as ChatCostByCallType, E as ChatStopResult, G as ClientMeta, I as Computer, J as ComputerEnvVar, K as ComputerExecResult, L as ComputerLoggingLevel, M as ComputerPort, N as ComputerServerInfo, P as ComputerState, Q as ComputerType, R as ComputerUser, S as CreateAutomationInput, T as DataCreateFolderInput, U as DataFolder, X as DataUploadInput, Y as DatastoreEntry, Z as EscalateRequest, _ as ExecutionBackend, $ as ExecutionRun, a0 as ExecutionRunStatus, a1 as FileList, a2 as FunctionDeployment, a3 as FunctionInvokeResult, a4 as FunctionResource, a5 as FunctionRun, a6 as HttpRequest, a7 as ImageGenerationResult, a8 as ImageModel, a9 as ImageModelPricing, aa as LLMModel, ab as LLMModelCapabilities, ac as LLMModelPricing, ad as ListEnvelope, ae as ManagedProviderPreset, af as Message, ag as MessageCostEntry, ah as MessageCosts, ai as ModelBase, aj as ModelModality, ak as Notification, al as NotificationConfig, am as NotificationPreference, an as NotificationSenderKind, ao as Pagination, ap as Permission, aq as ProviderEndpoint, ar as ProviderEndpointConnectionType, as as ProviderEndpointKind, at as ProviderEndpointModality, au as ProviderEndpointModelMapping, av as ProviderEndpointProtocol, aw as ProviderEndpointProviderKey, ax as ProviderEndpointRuntime, ay as ProviderEndpointTestResult, az as ProviderEndpointTransport, aA as ProviderEndpointVisibility, aB as QueryInput, aC as RemoteBundleReader, aD as RepromptResult, aE as RunCostMetrics, aF as RuntimeMode, aG as SearchResult, aH as Secret, aI as SecretWithValue, aJ as SendMessageResult, aK as Settings, aL as SftpEntry, aM as Share, aN as ShareDeletedResult, aO as SharePermission, aP as ShareResourceType, aQ as SharedWithMeItem, aR as SingleEnvelope, aS as SpeechResult, aT as SpeechStreamEvent, aU as StoreInstallResult, aV as StoreItem, aW as StoreItemType, aX as StoredCredential, aY as Subscription, aZ as SubscriptionPlan, a_ as TableCollection, a$ as TableRecord, b0 as TmuxWindow, b1 as TranscriptionResult, b2 as TranscriptionStreamEvent, b3 as TriggerType, b4 as TtsVoice, b5 as TtsVoiceGender, b6 as UpdateAutomationInput, b7 as UsageRecord, b8 as UsageSummary, b9 as User, ba as VideoModelCapabilities, bb as VideoModelPricing, bc as VideoModelRate, bd as VideoModelSearchItem, be as WebSearchHit, bf as WebSearchResponse, bg as Workspace, bh as WorkspaceInvitation, bi as WorkspaceMember, bj as WorkspaceMemberRole, bk as buildUrl, bl as request, bm as requestRaw } from './data-DtOpB63U.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -33,6 +33,76 @@ declare class AiGatewayApi {
|
|
|
33
33
|
usage(opts?: AiGatewayUsageOptions): Promise<AiGatewayUsageRow[]>;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* VideosApi — `/api/v1/videos/*`.
|
|
38
|
+
*
|
|
39
|
+
* Video generation is ASYNC (renders take ~30s–several minutes):
|
|
40
|
+
* - `POST /videos/generations` → HTTP 202 with an OPERATION HANDLE
|
|
41
|
+
* (`{id: "mg_…", status: "pending"}`), never an inline result.
|
|
42
|
+
* - `GET /videos/models` / `GET /videos/models/search` → the catalogue
|
|
43
|
+
* (per-second pricing with a per-resolution rate table + fixed
|
|
44
|
+
* duration/resolution options).
|
|
45
|
+
*
|
|
46
|
+
* `generate()` polls the operation to completion by default (wide cadence —
|
|
47
|
+
* 5s × 240, a ~20-minute ceiling) and resolves with the completed payload
|
|
48
|
+
* `{file_id, path, url, model, cost_usd, duration_seconds, resolution}`.
|
|
49
|
+
* Pass `wait: false` to get the handle back immediately and poll yourself
|
|
50
|
+
* via `client.operations.get(id)` / cancel via `client.operations.cancel(id)`.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
interface GenerateVideoInput {
|
|
54
|
+
prompt: string;
|
|
55
|
+
workspace_id: string;
|
|
56
|
+
model?: string;
|
|
57
|
+
/** Must be one of the model's fixed duration options (see the catalog). */
|
|
58
|
+
duration_seconds?: number;
|
|
59
|
+
/** Must be a resolution the model advertises, e.g. "720p". */
|
|
60
|
+
resolution?: string;
|
|
61
|
+
aspect_ratio?: string;
|
|
62
|
+
/** Generate native audio (audio-capable models only). */
|
|
63
|
+
generate_audio?: boolean;
|
|
64
|
+
output_path?: string;
|
|
65
|
+
/** Reference images for image-to-video. */
|
|
66
|
+
reference_image_ids?: string[];
|
|
67
|
+
reference_image_paths?: string[];
|
|
68
|
+
/** Input video for video-to-video (e.g. model `runway-aleph-2`). */
|
|
69
|
+
video_reference_id?: string;
|
|
70
|
+
video_reference_path?: string;
|
|
71
|
+
}
|
|
72
|
+
interface GenerateVideoOptions extends CallOptions {
|
|
73
|
+
/** Default true — poll the operation to completion. False → return the handle. */
|
|
74
|
+
wait?: boolean;
|
|
75
|
+
/** Override the poll cadence (default: the contract's 5000ms). */
|
|
76
|
+
pollIntervalMs?: number;
|
|
77
|
+
/** Override the poll ceiling (default: the contract's 240 attempts). */
|
|
78
|
+
maxPollAttempts?: number;
|
|
79
|
+
}
|
|
80
|
+
interface SearchVideoModelsInput {
|
|
81
|
+
query?: string;
|
|
82
|
+
provider?: string;
|
|
83
|
+
mode?: "t2v" | "i2v" | "v2v";
|
|
84
|
+
resolution?: string;
|
|
85
|
+
audio?: boolean;
|
|
86
|
+
limit?: number;
|
|
87
|
+
offset?: number;
|
|
88
|
+
}
|
|
89
|
+
declare class VideosApi {
|
|
90
|
+
private readonly ctx;
|
|
91
|
+
constructor(ctx: HttpContext);
|
|
92
|
+
listModels(opts?: CallOptions): Promise<VideoModel[]>;
|
|
93
|
+
searchModels(input?: SearchVideoModelsInput, opts?: CallOptions): Promise<VideoModelSearchResult>;
|
|
94
|
+
/**
|
|
95
|
+
* Start a video generation. With `wait` (default) polls the operation to
|
|
96
|
+
* a terminal status and resolves the completed payload (throws a typed
|
|
97
|
+
* error on failure/cancel); with `wait: false` resolves the 202 handle
|
|
98
|
+
* immediately.
|
|
99
|
+
*/
|
|
100
|
+
generate(input: GenerateVideoInput, opts: GenerateVideoOptions & {
|
|
101
|
+
wait: false;
|
|
102
|
+
}): Promise<OperationHandle>;
|
|
103
|
+
generate(input: GenerateVideoInput, opts?: GenerateVideoOptions): Promise<VideoGenerationResult>;
|
|
104
|
+
}
|
|
105
|
+
|
|
36
106
|
/**
|
|
37
107
|
* IdaptClient — the generic, isomorphic Idapt v1 API client.
|
|
38
108
|
*
|
|
@@ -369,4 +439,4 @@ declare const Idapt: {
|
|
|
369
439
|
connect: typeof connect;
|
|
370
440
|
};
|
|
371
441
|
|
|
372
|
-
export { AiGatewayApi, AiGatewayProvider, type AiGatewayProvidersOptions, type AiGatewayUsageOptions, AiGatewayUsageRow, AuthError, CallOptions, ConflictError, ConnectOptions, DataStore, DataStoreCreateFolderInput, DataStoreUploadInput, type DefaultConnectConfig, DeletedResponse, File, FileUploadResult, HttpContext, Idapt, IdaptClient, type IdaptClientOptions, IdaptError, type IdaptErrorCode, type IdaptErrorInit, type IdaptErrorSubCode, type IdaptErrorType, type IdaptRedirectingError, InvalidRequestError, type LocationLike, NetworkError, NotFoundError, PermissionError, RateLimitError, RemoteDataStore, ServerError, ServiceUnavailableError, VERSION, WriteOptions, connect, detectAppId, errorFromStatus, getAppBaseUrl, makeConnect };
|
|
442
|
+
export { AiGatewayApi, AiGatewayProvider, type AiGatewayProvidersOptions, type AiGatewayUsageOptions, AiGatewayUsageRow, AuthError, CallOptions, ConflictError, ConnectOptions, DataStore, DataStoreCreateFolderInput, DataStoreUploadInput, type DefaultConnectConfig, DeletedResponse, File, FileUploadResult, type GenerateVideoInput, type GenerateVideoOptions, HttpContext, Idapt, IdaptClient, type IdaptClientOptions, IdaptError, type IdaptErrorCode, type IdaptErrorInit, type IdaptErrorSubCode, type IdaptErrorType, type IdaptRedirectingError, InvalidRequestError, type LocationLike, NetworkError, NotFoundError, OperationHandle, PermissionError, RateLimitError, RemoteDataStore, type SearchVideoModelsInput, ServerError, ServiceUnavailableError, VERSION, VideoGenerationResult, VideoModel, VideoModelSearchResult, VideosApi, WriteOptions, connect, detectAppId, errorFromStatus, getAppBaseUrl, makeConnect };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IdaptClient } from './client-
|
|
2
|
-
export { A as AddMemberInput, a as AgentsApi, b as ApiKeysApi, c as AudioApi, B as BlobMeta,
|
|
3
|
-
import { H as HttpContext, C as CallOptions, A as AiGatewayProvider, a as AiGatewayUsageRow, D as DataStore, F as File, W as WriteOptions,
|
|
4
|
-
export {
|
|
1
|
+
import { I as IdaptClient } from './client-_Jvrbhz2.js';
|
|
2
|
+
export { A as AddMemberInput, a as AgentsApi, b as ApiKeysApi, c as AudioApi, d as AutomationsApi, B as BlobMeta, e as BlobsApi, f as BlobsListOptions, C as COMMAND_BINDINGS, g as ChannelHandle, h as ChatsApi, i as CommandBinding, j as ComputersApi, k as CreateAgentInput, l as CreateApiKeyInput, m as CreateChatInput, n as CreateCollectionInput, o as CreateComputerInput, p as CreateComputerUserInput, q as CreateFolderInput, r as CreateFunctionInput, s as CreateInvitationInput, t as CreateInvitationResult, u as CreateProviderEndpointInput, v as CreateSecretInput, w as CreateShareInput, x as CreateUserEnvVarInput, y as CreateWorkspaceInput, D as DatastoreApi, z as DatastoreListOptions, E as DatastoreSetOptions, F as DeleteInvitationResult, G as DeletedResult, H as DeployFunctionFile, J as DeployFunctionInput, K as DocsApi, L as ExecCommandInput, M as ExecuteCommandOptions, N as FilesApi, O as FireAutomationInput, P as FunctionPermissionInput, Q as FunctionsApi, R as GenerateImageInput, S as GuideApi, T as GuideContent, U as IdaptClientDeps, V as ImagesApi, W as InstallStoreItemInput, X as InvokeFunctionInput, Y as ListAgentsQuery, Z as ListApiKeysQuery, _ as ListAutomationRunsQuery, $ as ListChatsQuery, a0 as ListComputersQuery, a1 as ListFilesQuery, a2 as ListFunctionRunsQuery, a3 as ListFunctionsQuery, a4 as ListMessagesQuery, a5 as ListNotificationsQuery, a6 as ListResult, a7 as ListRunsQuery, a8 as ListSharedWithMeQuery, a9 as ListSharesQuery, aa as ListUsageHistoryQuery, ab as ModelsApi, ac as NotificationAudience, ad as NotificationPreferenceUpdate, ae as NotificationsApi, af as PairComputerInput, ag as PairComputerResult, ah as PatchFileInput, ai as PatchPortInput, aj as PresenceEntry, ak as PresenceHeartbeatOptions, al as ProviderEndpointModelMappingInput, am as ProviderEndpointsApi, an as RealtimeApi, ao as RealtimeEvent, ap as RemoveShareInput, aq as RepromptMessageInput, ar as RotateApiKeyInput, as as RotateApiKeyResult, at as RunFileInput, au as RunFunctionInput, av as SearchApi, aw as SearchInput, ax as SearchStoreQuery, ay as SecretsApi, az as SendMessageInput, aA as SendNotificationInput, aB as SendNotificationResult, aC as SettingsApi, aD as SftpInput, aE as SftpListResult, aF as SftpOp, aG as SftpUploadInput, aH as SharingApi, aI as SpeakInput, aJ as SseEvent, aK as StoreApi, aL as SubscribeOptions, aM as SubscriptionApi, aN as TableQuery, aO as TablesApi, aP as TmuxInput, aQ as TmuxOp, aR as TranscribeInput, aS as UpdateAgentInput, aT as UpdateApiKeyInput, aU as UpdateChatInput, aV as UpdateCollectionInput, aW as UpdateComputerInput, aX as UpdateComputerUserInput, aY as UpdateFunctionInput, aZ as UpdateMemberInput, a_ as UpdateNotificationInput, a$ as UpdateProviderEndpointInput, b0 as UpdateSecretInput, b1 as UpdateSettingsInput, b2 as UpdateShareInput, b3 as UpdateWorkspaceInput, b4 as UploadInput, b5 as UserApi, b6 as V1CommandName, b7 as WebSearchApi, b8 as WebSearchInput, b9 as WorkspacesApi, ba as WritableMemberRole, bb as awaitOperation, bc as executeCommand, bd as getFileBlob, be as getFileText, bf as listFiles } from './client-_Jvrbhz2.js';
|
|
3
|
+
import { H as HttpContext, C as CallOptions, A as AiGatewayProvider, a as AiGatewayUsageRow, V as VideoModel, b as VideoModelSearchResult, O as OperationHandle, c as VideoGenerationResult, D as DataStore, F as File, W as WriteOptions, d as DeletedResponse, e as DataStoreUploadInput, f as FileUploadResult, g as DataStoreCreateFolderInput, h as ConnectOptions } from './data-DtOpB63U.js';
|
|
4
|
+
export { i as Agent, j as AgentRun, k as AgentRunState, l as ApiKey, m as AppFolder, n as AudioModel, o as AudioModelCapabilities, p as AudioModelPricing, q as AuthMode, r as Automation, s as AutomationActionType, t as AutomationCostStats, u as AutomationRun, v as AutomationWithSecret, B as BlobObject, w as BundleReader, x as Chat, y as ChatCost, z as ChatCostByCallType, E as ChatStopResult, G as ClientMeta, I as Computer, J as ComputerEnvVar, K as ComputerExecResult, L as ComputerLoggingLevel, M as ComputerPort, N as ComputerServerInfo, P as ComputerState, Q as ComputerType, R as ComputerUser, S as CreateAutomationInput, T as DataCreateFolderInput, U as DataFolder, X as DataUploadInput, Y as DatastoreEntry, Z as EscalateRequest, _ as ExecutionBackend, $ as ExecutionRun, a0 as ExecutionRunStatus, a1 as FileList, a2 as FunctionDeployment, a3 as FunctionInvokeResult, a4 as FunctionResource, a5 as FunctionRun, a6 as HttpRequest, a7 as ImageGenerationResult, a8 as ImageModel, a9 as ImageModelPricing, aa as LLMModel, ab as LLMModelCapabilities, ac as LLMModelPricing, ad as ListEnvelope, ae as ManagedProviderPreset, af as Message, ag as MessageCostEntry, ah as MessageCosts, ai as ModelBase, aj as ModelModality, ak as Notification, al as NotificationConfig, am as NotificationPreference, an as NotificationSenderKind, ao as Pagination, ap as Permission, aq as ProviderEndpoint, ar as ProviderEndpointConnectionType, as as ProviderEndpointKind, at as ProviderEndpointModality, au as ProviderEndpointModelMapping, av as ProviderEndpointProtocol, aw as ProviderEndpointProviderKey, ax as ProviderEndpointRuntime, ay as ProviderEndpointTestResult, az as ProviderEndpointTransport, aA as ProviderEndpointVisibility, aB as QueryInput, aC as RemoteBundleReader, aD as RepromptResult, aE as RunCostMetrics, aF as RuntimeMode, aG as SearchResult, aH as Secret, aI as SecretWithValue, aJ as SendMessageResult, aK as Settings, aL as SftpEntry, aM as Share, aN as ShareDeletedResult, aO as SharePermission, aP as ShareResourceType, aQ as SharedWithMeItem, aR as SingleEnvelope, aS as SpeechResult, aT as SpeechStreamEvent, aU as StoreInstallResult, aV as StoreItem, aW as StoreItemType, aX as StoredCredential, aY as Subscription, aZ as SubscriptionPlan, a_ as TableCollection, a$ as TableRecord, b0 as TmuxWindow, b1 as TranscriptionResult, b2 as TranscriptionStreamEvent, b3 as TriggerType, b4 as TtsVoice, b5 as TtsVoiceGender, b6 as UpdateAutomationInput, b7 as UsageRecord, b8 as UsageSummary, b9 as User, ba as VideoModelCapabilities, bb as VideoModelPricing, bc as VideoModelRate, bd as VideoModelSearchItem, be as WebSearchHit, bf as WebSearchResponse, bg as Workspace, bh as WorkspaceInvitation, bi as WorkspaceMember, bj as WorkspaceMemberRole, bk as buildUrl, bl as request, bm as requestRaw } from './data-DtOpB63U.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -33,6 +33,76 @@ declare class AiGatewayApi {
|
|
|
33
33
|
usage(opts?: AiGatewayUsageOptions): Promise<AiGatewayUsageRow[]>;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* VideosApi — `/api/v1/videos/*`.
|
|
38
|
+
*
|
|
39
|
+
* Video generation is ASYNC (renders take ~30s–several minutes):
|
|
40
|
+
* - `POST /videos/generations` → HTTP 202 with an OPERATION HANDLE
|
|
41
|
+
* (`{id: "mg_…", status: "pending"}`), never an inline result.
|
|
42
|
+
* - `GET /videos/models` / `GET /videos/models/search` → the catalogue
|
|
43
|
+
* (per-second pricing with a per-resolution rate table + fixed
|
|
44
|
+
* duration/resolution options).
|
|
45
|
+
*
|
|
46
|
+
* `generate()` polls the operation to completion by default (wide cadence —
|
|
47
|
+
* 5s × 240, a ~20-minute ceiling) and resolves with the completed payload
|
|
48
|
+
* `{file_id, path, url, model, cost_usd, duration_seconds, resolution}`.
|
|
49
|
+
* Pass `wait: false` to get the handle back immediately and poll yourself
|
|
50
|
+
* via `client.operations.get(id)` / cancel via `client.operations.cancel(id)`.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
interface GenerateVideoInput {
|
|
54
|
+
prompt: string;
|
|
55
|
+
workspace_id: string;
|
|
56
|
+
model?: string;
|
|
57
|
+
/** Must be one of the model's fixed duration options (see the catalog). */
|
|
58
|
+
duration_seconds?: number;
|
|
59
|
+
/** Must be a resolution the model advertises, e.g. "720p". */
|
|
60
|
+
resolution?: string;
|
|
61
|
+
aspect_ratio?: string;
|
|
62
|
+
/** Generate native audio (audio-capable models only). */
|
|
63
|
+
generate_audio?: boolean;
|
|
64
|
+
output_path?: string;
|
|
65
|
+
/** Reference images for image-to-video. */
|
|
66
|
+
reference_image_ids?: string[];
|
|
67
|
+
reference_image_paths?: string[];
|
|
68
|
+
/** Input video for video-to-video (e.g. model `runway-aleph-2`). */
|
|
69
|
+
video_reference_id?: string;
|
|
70
|
+
video_reference_path?: string;
|
|
71
|
+
}
|
|
72
|
+
interface GenerateVideoOptions extends CallOptions {
|
|
73
|
+
/** Default true — poll the operation to completion. False → return the handle. */
|
|
74
|
+
wait?: boolean;
|
|
75
|
+
/** Override the poll cadence (default: the contract's 5000ms). */
|
|
76
|
+
pollIntervalMs?: number;
|
|
77
|
+
/** Override the poll ceiling (default: the contract's 240 attempts). */
|
|
78
|
+
maxPollAttempts?: number;
|
|
79
|
+
}
|
|
80
|
+
interface SearchVideoModelsInput {
|
|
81
|
+
query?: string;
|
|
82
|
+
provider?: string;
|
|
83
|
+
mode?: "t2v" | "i2v" | "v2v";
|
|
84
|
+
resolution?: string;
|
|
85
|
+
audio?: boolean;
|
|
86
|
+
limit?: number;
|
|
87
|
+
offset?: number;
|
|
88
|
+
}
|
|
89
|
+
declare class VideosApi {
|
|
90
|
+
private readonly ctx;
|
|
91
|
+
constructor(ctx: HttpContext);
|
|
92
|
+
listModels(opts?: CallOptions): Promise<VideoModel[]>;
|
|
93
|
+
searchModels(input?: SearchVideoModelsInput, opts?: CallOptions): Promise<VideoModelSearchResult>;
|
|
94
|
+
/**
|
|
95
|
+
* Start a video generation. With `wait` (default) polls the operation to
|
|
96
|
+
* a terminal status and resolves the completed payload (throws a typed
|
|
97
|
+
* error on failure/cancel); with `wait: false` resolves the 202 handle
|
|
98
|
+
* immediately.
|
|
99
|
+
*/
|
|
100
|
+
generate(input: GenerateVideoInput, opts: GenerateVideoOptions & {
|
|
101
|
+
wait: false;
|
|
102
|
+
}): Promise<OperationHandle>;
|
|
103
|
+
generate(input: GenerateVideoInput, opts?: GenerateVideoOptions): Promise<VideoGenerationResult>;
|
|
104
|
+
}
|
|
105
|
+
|
|
36
106
|
/**
|
|
37
107
|
* IdaptClient — the generic, isomorphic Idapt v1 API client.
|
|
38
108
|
*
|
|
@@ -369,4 +439,4 @@ declare const Idapt: {
|
|
|
369
439
|
connect: typeof connect;
|
|
370
440
|
};
|
|
371
441
|
|
|
372
|
-
export { AiGatewayApi, AiGatewayProvider, type AiGatewayProvidersOptions, type AiGatewayUsageOptions, AiGatewayUsageRow, AuthError, CallOptions, ConflictError, ConnectOptions, DataStore, DataStoreCreateFolderInput, DataStoreUploadInput, type DefaultConnectConfig, DeletedResponse, File, FileUploadResult, HttpContext, Idapt, IdaptClient, type IdaptClientOptions, IdaptError, type IdaptErrorCode, type IdaptErrorInit, type IdaptErrorSubCode, type IdaptErrorType, type IdaptRedirectingError, InvalidRequestError, type LocationLike, NetworkError, NotFoundError, PermissionError, RateLimitError, RemoteDataStore, ServerError, ServiceUnavailableError, VERSION, WriteOptions, connect, detectAppId, errorFromStatus, getAppBaseUrl, makeConnect };
|
|
442
|
+
export { AiGatewayApi, AiGatewayProvider, type AiGatewayProvidersOptions, type AiGatewayUsageOptions, AiGatewayUsageRow, AuthError, CallOptions, ConflictError, ConnectOptions, DataStore, DataStoreCreateFolderInput, DataStoreUploadInput, type DefaultConnectConfig, DeletedResponse, File, FileUploadResult, type GenerateVideoInput, type GenerateVideoOptions, HttpContext, Idapt, IdaptClient, type IdaptClientOptions, IdaptError, type IdaptErrorCode, type IdaptErrorInit, type IdaptErrorSubCode, type IdaptErrorType, type IdaptRedirectingError, InvalidRequestError, type LocationLike, NetworkError, NotFoundError, OperationHandle, PermissionError, RateLimitError, RemoteDataStore, type SearchVideoModelsInput, ServerError, ServiceUnavailableError, VERSION, VideoGenerationResult, VideoModel, VideoModelSearchResult, VideosApi, WriteOptions, connect, detectAppId, errorFromStatus, getAppBaseUrl, makeConnect };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Idapt, IdaptClient, connect, detectAppId, getAppBaseUrl, makeConnect } from './chunk-
|
|
2
|
-
export { AgentsApi, AiGatewayApi, ApiKeysApi, AppFolder, AudioApi, AuthError, BlobsApi, COMMAND_BINDINGS, ChatsApi,
|
|
1
|
+
export { Idapt, IdaptClient, connect, detectAppId, getAppBaseUrl, makeConnect } from './chunk-QWNGAONE.js';
|
|
2
|
+
export { AgentsApi, AiGatewayApi, ApiKeysApi, AppFolder, AudioApi, AuthError, AutomationsApi, BlobsApi, COMMAND_BINDINGS, ChatsApi, ComputersApi, ConflictError, DataFolder, DatastoreApi, DocsApi, FilesApi, FunctionsApi, GuideApi, IdaptError, ImagesApi, InvalidRequestError, ModelsApi, NetworkError, NotFoundError, NotificationsApi, PermissionError, ProviderEndpointsApi, RateLimitError, RealtimeApi, RemoteBundleReader, RemoteDataStore, SearchApi, SecretsApi, ServerError, ServiceUnavailableError, SettingsApi, SharingApi, StoreApi, SubscriptionApi, TablesApi, UserApi, VERSION, VideosApi, WebSearchApi, WorkspacesApi, awaitOperation, buildUrl, errorFromStatus, executeCommand, getFileBlob, getFileText, listFiles, request, requestRaw } from './chunk-KMLUFF4F.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|