@idapt/browser-app-sdk 0.1.0 → 0.2.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-KHPTFRT3.js} +660 -101
- package/dist/chunk-KHPTFRT3.js.map +1 -0
- package/dist/{chunk-6FSNLUVJ.js → chunk-OKOO2JCS.js} +4 -4
- package/dist/{chunk-6FSNLUVJ.js.map → chunk-OKOO2JCS.js.map} +1 -1
- package/dist/{client-CO-P-xYI.d.cts → client-CZAWglsD.d.ts} +170 -53
- package/dist/{client-h2Wsvn7a.d.ts → client-DjipcztO.d.cts} +170 -53
- package/dist/{data-Chus9wn2.d.cts → data-BuXXki1D.d.cts} +180 -38
- package/dist/{data-Chus9wn2.d.ts → data-BuXXki1D.d.ts} +180 -38
- package/dist/index.cjs +660 -100
- 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 +166 -56
- 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, d as BlobsApi, e as BlobsListOptions, C as COMMAND_BINDINGS, f as ChannelHandle, g as ChatsApi, h as
|
|
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-DjipcztO.cjs';
|
|
2
|
+
export { A as AddMemberInput, a as AgentsApi, b as ApiKeysApi, c as AudioApi, B as BlobMeta, d as BlobsApi, e as BlobsListOptions, C as COMMAND_BINDINGS, f as ChannelHandle, g as ChatsApi, h as CommandBinding, i as ComputersApi, j as CreateAgentInput, k as CreateApiKeyInput, l as CreateChatInput, m as CreateCollectionInput, n as CreateComputerInput, o as CreateComputerUserInput, p as CreateFolderInput, q as CreateFunctionInput, r as CreateInvitationInput, s as CreateInvitationResult, t as CreateProviderEndpointInput, u as CreateSecretInput, v as CreateShareInput, w as CreateUserEnvVarInput, x as CreateWorkspaceInput, D as DatastoreApi, y as DatastoreListOptions, z as DatastoreSetOptions, E as DeleteInvitationResult, F as DeletedResult, G as DeployFunctionFile, H as DeployFunctionInput, J as DocsApi, K as ExecCommandInput, L as ExecuteCommandOptions, M as FilesApi, N as FireTriggerInput, O as FunctionPermissionInput, P as FunctionsApi, Q as GenerateImageInput, R as GuideApi, S as GuideContent, T as IdaptClientDeps, U as ImagesApi, V as InstallStoreItemInput, W as InvokeFunctionInput, X as ListAgentsQuery, Y as ListApiKeysQuery, Z as ListChatsQuery, _ as ListComputersQuery, $ as ListFilesQuery, a0 as ListFunctionRunsQuery, a1 as ListFunctionsQuery, a2 as ListMessagesQuery, a3 as ListNotificationsQuery, a4 as ListResult, a5 as ListRunsQuery, a6 as ListSharedWithMeQuery, a7 as ListSharesQuery, a8 as ListTriggerRunsQuery, a9 as ListUsageHistoryQuery, aa as ModelsApi, ab as NotificationAudience, ac as NotificationPreferenceUpdate, ad as NotificationsApi, ae as PairComputerInput, af as PairComputerResult, ag as PatchFileInput, ah as PatchPortInput, ai as PresenceEntry, aj as PresenceHeartbeatOptions, ak as ProviderEndpointModelMappingInput, al as ProviderEndpointsApi, am as RealtimeApi, an as RealtimeEvent, ao as RemoveShareInput, ap as RepromptMessageInput, aq as RotateApiKeyInput, ar as RotateApiKeyResult, as as RunFileInput, at as RunFunctionInput, au as SearchApi, av as SearchInput, aw as SearchStoreQuery, ax as SecretsApi, ay as SendMessageInput, az as SendNotificationInput, aA as SendNotificationResult, aB as SettingsApi, aC as SftpInput, aD as SftpListResult, aE as SftpOp, aF as SftpUploadInput, aG as SharingApi, aH as SpeakInput, aI as SseEvent, aJ as StoreApi, aK as SubscribeOptions, aL as SubscriptionApi, aM as TableQuery, aN as TablesApi, aO as TmuxInput, aP as TmuxOp, aQ as TranscribeInput, aR as TriggersApi, 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-DjipcztO.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-BuXXki1D.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, B as BlobObject, r as BundleReader, s as Chat, t as ChatCost, u as ChatCostByCallType, v as ChatStopResult, w as ClientMeta, x as Computer, y as ComputerEnvVar, z as ComputerExecResult, E as ComputerLoggingLevel, G as ComputerPort, I as ComputerServerInfo, J as ComputerState, K as ComputerType, L as ComputerUser, M as CreateTriggerInput, N as DataCreateFolderInput, P as DataFolder, Q as DataUploadInput, R as DatastoreEntry, S as EscalateRequest, T as ExecutionBackend, U as ExecutionRun, X as ExecutionRunStatus, Y as FileList, Z as FunctionDeployment, _ as FunctionInvokeResult, $ as FunctionResource, a0 as FunctionRun, a1 as HttpRequest, a2 as ImageGenerationResult, a3 as ImageModel, a4 as ImageModelPricing, a5 as LLMModel, a6 as LLMModelCapabilities, a7 as LLMModelPricing, a8 as ListEnvelope, a9 as ManagedProviderPreset, aa as Message, ab as MessageCostEntry, ac as MessageCosts, ad as ModelBase, ae as ModelModality, af as Notification, ag as NotificationConfig, ah as NotificationPreference, ai as NotificationSenderKind, aj as Pagination, ak as Permission, al as ProviderEndpoint, am as ProviderEndpointConnectionType, an as ProviderEndpointKind, ao as ProviderEndpointModality, ap as ProviderEndpointModelMapping, aq as ProviderEndpointProtocol, ar as ProviderEndpointProviderKey, as as ProviderEndpointRuntime, at as ProviderEndpointTestResult, au as ProviderEndpointTransport, av as ProviderEndpointVisibility, aw as QueryInput, ax as RemoteBundleReader, ay as RepromptResult, az as RunCostMetrics, aA as RuntimeMode, aB as SearchResult, aC as Secret, aD as SecretWithValue, aE as SendMessageResult, aF as Settings, aG as SftpEntry, aH as Share, aI as ShareDeletedResult, aJ as SharePermission, aK as ShareResourceType, aL as SharedWithMeItem, aM as SingleEnvelope, aN as SpeechResult, aO as SpeechStreamEvent, aP as StoreInstallResult, aQ as StoreItem, aR as StoreItemType, aS as StoredCredential, aT as Subscription, aU as SubscriptionPlan, aV as TableCollection, aW as TableRecord, aX as TmuxWindow, aY as TranscriptionResult, aZ as TranscriptionStreamEvent, a_ as Trigger, a$ as TriggerActionType, b0 as TriggerCostStats, b1 as TriggerRun, b2 as TriggerType, b3 as TriggerWithSecret, b4 as TtsVoice, b5 as TtsVoiceGender, b6 as UpdateTriggerInput, 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-BuXXki1D.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, d as BlobsApi, e as BlobsListOptions, C as COMMAND_BINDINGS, f as ChannelHandle, g as ChatsApi, h as
|
|
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-CZAWglsD.js';
|
|
2
|
+
export { A as AddMemberInput, a as AgentsApi, b as ApiKeysApi, c as AudioApi, B as BlobMeta, d as BlobsApi, e as BlobsListOptions, C as COMMAND_BINDINGS, f as ChannelHandle, g as ChatsApi, h as CommandBinding, i as ComputersApi, j as CreateAgentInput, k as CreateApiKeyInput, l as CreateChatInput, m as CreateCollectionInput, n as CreateComputerInput, o as CreateComputerUserInput, p as CreateFolderInput, q as CreateFunctionInput, r as CreateInvitationInput, s as CreateInvitationResult, t as CreateProviderEndpointInput, u as CreateSecretInput, v as CreateShareInput, w as CreateUserEnvVarInput, x as CreateWorkspaceInput, D as DatastoreApi, y as DatastoreListOptions, z as DatastoreSetOptions, E as DeleteInvitationResult, F as DeletedResult, G as DeployFunctionFile, H as DeployFunctionInput, J as DocsApi, K as ExecCommandInput, L as ExecuteCommandOptions, M as FilesApi, N as FireTriggerInput, O as FunctionPermissionInput, P as FunctionsApi, Q as GenerateImageInput, R as GuideApi, S as GuideContent, T as IdaptClientDeps, U as ImagesApi, V as InstallStoreItemInput, W as InvokeFunctionInput, X as ListAgentsQuery, Y as ListApiKeysQuery, Z as ListChatsQuery, _ as ListComputersQuery, $ as ListFilesQuery, a0 as ListFunctionRunsQuery, a1 as ListFunctionsQuery, a2 as ListMessagesQuery, a3 as ListNotificationsQuery, a4 as ListResult, a5 as ListRunsQuery, a6 as ListSharedWithMeQuery, a7 as ListSharesQuery, a8 as ListTriggerRunsQuery, a9 as ListUsageHistoryQuery, aa as ModelsApi, ab as NotificationAudience, ac as NotificationPreferenceUpdate, ad as NotificationsApi, ae as PairComputerInput, af as PairComputerResult, ag as PatchFileInput, ah as PatchPortInput, ai as PresenceEntry, aj as PresenceHeartbeatOptions, ak as ProviderEndpointModelMappingInput, al as ProviderEndpointsApi, am as RealtimeApi, an as RealtimeEvent, ao as RemoveShareInput, ap as RepromptMessageInput, aq as RotateApiKeyInput, ar as RotateApiKeyResult, as as RunFileInput, at as RunFunctionInput, au as SearchApi, av as SearchInput, aw as SearchStoreQuery, ax as SecretsApi, ay as SendMessageInput, az as SendNotificationInput, aA as SendNotificationResult, aB as SettingsApi, aC as SftpInput, aD as SftpListResult, aE as SftpOp, aF as SftpUploadInput, aG as SharingApi, aH as SpeakInput, aI as SseEvent, aJ as StoreApi, aK as SubscribeOptions, aL as SubscriptionApi, aM as TableQuery, aN as TablesApi, aO as TmuxInput, aP as TmuxOp, aQ as TranscribeInput, aR as TriggersApi, 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-CZAWglsD.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-BuXXki1D.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, B as BlobObject, r as BundleReader, s as Chat, t as ChatCost, u as ChatCostByCallType, v as ChatStopResult, w as ClientMeta, x as Computer, y as ComputerEnvVar, z as ComputerExecResult, E as ComputerLoggingLevel, G as ComputerPort, I as ComputerServerInfo, J as ComputerState, K as ComputerType, L as ComputerUser, M as CreateTriggerInput, N as DataCreateFolderInput, P as DataFolder, Q as DataUploadInput, R as DatastoreEntry, S as EscalateRequest, T as ExecutionBackend, U as ExecutionRun, X as ExecutionRunStatus, Y as FileList, Z as FunctionDeployment, _ as FunctionInvokeResult, $ as FunctionResource, a0 as FunctionRun, a1 as HttpRequest, a2 as ImageGenerationResult, a3 as ImageModel, a4 as ImageModelPricing, a5 as LLMModel, a6 as LLMModelCapabilities, a7 as LLMModelPricing, a8 as ListEnvelope, a9 as ManagedProviderPreset, aa as Message, ab as MessageCostEntry, ac as MessageCosts, ad as ModelBase, ae as ModelModality, af as Notification, ag as NotificationConfig, ah as NotificationPreference, ai as NotificationSenderKind, aj as Pagination, ak as Permission, al as ProviderEndpoint, am as ProviderEndpointConnectionType, an as ProviderEndpointKind, ao as ProviderEndpointModality, ap as ProviderEndpointModelMapping, aq as ProviderEndpointProtocol, ar as ProviderEndpointProviderKey, as as ProviderEndpointRuntime, at as ProviderEndpointTestResult, au as ProviderEndpointTransport, av as ProviderEndpointVisibility, aw as QueryInput, ax as RemoteBundleReader, ay as RepromptResult, az as RunCostMetrics, aA as RuntimeMode, aB as SearchResult, aC as Secret, aD as SecretWithValue, aE as SendMessageResult, aF as Settings, aG as SftpEntry, aH as Share, aI as ShareDeletedResult, aJ as SharePermission, aK as ShareResourceType, aL as SharedWithMeItem, aM as SingleEnvelope, aN as SpeechResult, aO as SpeechStreamEvent, aP as StoreInstallResult, aQ as StoreItem, aR as StoreItemType, aS as StoredCredential, aT as Subscription, aU as SubscriptionPlan, aV as TableCollection, aW as TableRecord, aX as TmuxWindow, aY as TranscriptionResult, aZ as TranscriptionStreamEvent, a_ as Trigger, a$ as TriggerActionType, b0 as TriggerCostStats, b1 as TriggerRun, b2 as TriggerType, b3 as TriggerWithSecret, b4 as TtsVoice, b5 as TtsVoiceGender, b6 as UpdateTriggerInput, 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-BuXXki1D.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-OKOO2JCS.js';
|
|
2
|
+
export { AgentsApi, AiGatewayApi, ApiKeysApi, AppFolder, AudioApi, AuthError, 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, TriggersApi, UserApi, VERSION, VideosApi, WebSearchApi, WorkspacesApi, awaitOperation, buildUrl, errorFromStatus, executeCommand, getFileBlob, getFileText, listFiles, request, requestRaw } from './chunk-KHPTFRT3.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/react.cjs
CHANGED
|
@@ -1130,46 +1130,6 @@ var ChatsApi = class {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
};
|
|
1132
1132
|
|
|
1133
|
-
// ../sdk/src/api/code.ts
|
|
1134
|
-
var CodeRunsApi = class {
|
|
1135
|
-
constructor(ctx) {
|
|
1136
|
-
this.ctx = ctx;
|
|
1137
|
-
}
|
|
1138
|
-
/**
|
|
1139
|
-
* Execute a code file. Returns the full `ExecutionRun` row — `id`,
|
|
1140
|
-
* `status`, `stdout`, `stderr`, `exit_code`, and the run timestamps —
|
|
1141
|
-
* the same shape as `GET /code-runs/:id`.
|
|
1142
|
-
*/
|
|
1143
|
-
async run(input, opts = {}) {
|
|
1144
|
-
const res = await request(this.ctx, {
|
|
1145
|
-
method: "POST",
|
|
1146
|
-
path: "/api/v1/code-runs",
|
|
1147
|
-
body: input,
|
|
1148
|
-
signal: opts.signal
|
|
1149
|
-
});
|
|
1150
|
-
return res.data;
|
|
1151
|
-
}
|
|
1152
|
-
/** List recent execution runs. */
|
|
1153
|
-
async list(query = {}, opts = {}) {
|
|
1154
|
-
const res = await request(this.ctx, {
|
|
1155
|
-
method: "GET",
|
|
1156
|
-
path: "/api/v1/code-runs",
|
|
1157
|
-
query,
|
|
1158
|
-
signal: opts.signal
|
|
1159
|
-
});
|
|
1160
|
-
return res.data;
|
|
1161
|
-
}
|
|
1162
|
-
/** Get a single execution run by id. */
|
|
1163
|
-
async get(id, opts = {}) {
|
|
1164
|
-
const res = await request(this.ctx, {
|
|
1165
|
-
method: "GET",
|
|
1166
|
-
path: `/api/v1/code-runs/${id}`,
|
|
1167
|
-
signal: opts.signal
|
|
1168
|
-
});
|
|
1169
|
-
return res.data;
|
|
1170
|
-
}
|
|
1171
|
-
};
|
|
1172
|
-
|
|
1173
1133
|
// ../sdk/src/api/computers.ts
|
|
1174
1134
|
var ComputersApi = class {
|
|
1175
1135
|
constructor(ctx) {
|
|
@@ -1806,6 +1766,156 @@ var FilesApi = class {
|
|
|
1806
1766
|
}
|
|
1807
1767
|
};
|
|
1808
1768
|
|
|
1769
|
+
// ../sdk/src/api/functions.ts
|
|
1770
|
+
var enc3 = encodeURIComponent;
|
|
1771
|
+
var FunctionRunsApi = class {
|
|
1772
|
+
constructor(ctx) {
|
|
1773
|
+
this.ctx = ctx;
|
|
1774
|
+
}
|
|
1775
|
+
/** List one-off function runs (cursor-paginated). */
|
|
1776
|
+
async list(query = {}, opts = {}) {
|
|
1777
|
+
const res = await request(this.ctx, {
|
|
1778
|
+
method: "GET",
|
|
1779
|
+
path: "/api/v1/functions/runs",
|
|
1780
|
+
query,
|
|
1781
|
+
signal: opts.signal
|
|
1782
|
+
});
|
|
1783
|
+
return res.data;
|
|
1784
|
+
}
|
|
1785
|
+
/** Get a single one-off run by id. */
|
|
1786
|
+
async get(id, opts = {}) {
|
|
1787
|
+
const res = await request(this.ctx, {
|
|
1788
|
+
method: "GET",
|
|
1789
|
+
path: `/api/v1/functions/runs/${enc3(id)}`,
|
|
1790
|
+
signal: opts.signal
|
|
1791
|
+
});
|
|
1792
|
+
return res.data;
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Interrupt a running run. Only computer-backed runs can be interrupted;
|
|
1796
|
+
* Lambda-backed runs return 409 (`ConflictError`).
|
|
1797
|
+
*/
|
|
1798
|
+
async interrupt(id, opts = {}) {
|
|
1799
|
+
const res = await request(this.ctx, {
|
|
1800
|
+
method: "POST",
|
|
1801
|
+
path: `/api/v1/functions/runs/${enc3(id)}/interrupt`,
|
|
1802
|
+
body: {},
|
|
1803
|
+
signal: opts.signal
|
|
1804
|
+
});
|
|
1805
|
+
return res.data;
|
|
1806
|
+
}
|
|
1807
|
+
};
|
|
1808
|
+
var FunctionsApi = class {
|
|
1809
|
+
constructor(ctx) {
|
|
1810
|
+
this.ctx = ctx;
|
|
1811
|
+
this.runs = new FunctionRunsApi(ctx);
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Run a script ONCE in the sandbox. Pass EITHER inline `script` (+ optional
|
|
1815
|
+
* `language`) OR an existing Drive `file_id`. Returns the full `FunctionRun`
|
|
1816
|
+
* row — `id`, `status`, `stdout`, `stderr`, `exit_code`, the run timestamps,
|
|
1817
|
+
* and any `output_files` the script wrote under `/tmp/output/`.
|
|
1818
|
+
*/
|
|
1819
|
+
async run(input, opts = {}) {
|
|
1820
|
+
const res = await request(this.ctx, {
|
|
1821
|
+
method: "POST",
|
|
1822
|
+
path: "/api/v1/functions/runs",
|
|
1823
|
+
body: input,
|
|
1824
|
+
signal: opts.signal
|
|
1825
|
+
});
|
|
1826
|
+
return res.data;
|
|
1827
|
+
}
|
|
1828
|
+
/** List deployed functions in the workspace. */
|
|
1829
|
+
async list(query = {}, opts = {}) {
|
|
1830
|
+
const res = await request(this.ctx, {
|
|
1831
|
+
method: "GET",
|
|
1832
|
+
path: "/api/v1/functions",
|
|
1833
|
+
query,
|
|
1834
|
+
signal: opts.signal
|
|
1835
|
+
});
|
|
1836
|
+
return res.data;
|
|
1837
|
+
}
|
|
1838
|
+
/** Get a deployed function by its resourceId. */
|
|
1839
|
+
async get(id, opts = {}) {
|
|
1840
|
+
const res = await request(this.ctx, {
|
|
1841
|
+
method: "GET",
|
|
1842
|
+
path: `/api/v1/functions/${enc3(id)}`,
|
|
1843
|
+
signal: opts.signal
|
|
1844
|
+
});
|
|
1845
|
+
return res.data;
|
|
1846
|
+
}
|
|
1847
|
+
/** Create a deployed function (config only — `deploy` adds a bundle). */
|
|
1848
|
+
async create(input, opts = {}) {
|
|
1849
|
+
const res = await request(this.ctx, {
|
|
1850
|
+
method: "POST",
|
|
1851
|
+
path: "/api/v1/functions",
|
|
1852
|
+
body: input,
|
|
1853
|
+
signal: opts.signal
|
|
1854
|
+
});
|
|
1855
|
+
return res.data;
|
|
1856
|
+
}
|
|
1857
|
+
/** Update a deployed function's config. */
|
|
1858
|
+
async update(id, patch, opts = {}) {
|
|
1859
|
+
const res = await request(this.ctx, {
|
|
1860
|
+
method: "PATCH",
|
|
1861
|
+
path: `/api/v1/functions/${enc3(id)}`,
|
|
1862
|
+
body: patch,
|
|
1863
|
+
signal: opts.signal
|
|
1864
|
+
});
|
|
1865
|
+
return res.data;
|
|
1866
|
+
}
|
|
1867
|
+
/** Delete a deployed function + all its deployments. */
|
|
1868
|
+
async delete(id, opts = {}) {
|
|
1869
|
+
return request(this.ctx, {
|
|
1870
|
+
method: "DELETE",
|
|
1871
|
+
path: `/api/v1/functions/${enc3(id)}`,
|
|
1872
|
+
signal: opts.signal
|
|
1873
|
+
});
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* Deploy a new bundle (inline base64 files). Promotes the new deployment to
|
|
1877
|
+
* live immediately unless `promote: false`. Returns the new deployment.
|
|
1878
|
+
*/
|
|
1879
|
+
async deploy(id, input, opts = {}) {
|
|
1880
|
+
const res = await request(this.ctx, {
|
|
1881
|
+
method: "POST",
|
|
1882
|
+
path: `/api/v1/functions/${enc3(id)}/deploy`,
|
|
1883
|
+
body: input,
|
|
1884
|
+
signal: opts.signal
|
|
1885
|
+
});
|
|
1886
|
+
return res.data;
|
|
1887
|
+
}
|
|
1888
|
+
/** List a function's deployments (newest-first). */
|
|
1889
|
+
async deployments(id, opts = {}) {
|
|
1890
|
+
const res = await request(this.ctx, {
|
|
1891
|
+
method: "GET",
|
|
1892
|
+
path: `/api/v1/functions/${enc3(id)}/deployments`,
|
|
1893
|
+
signal: opts.signal
|
|
1894
|
+
});
|
|
1895
|
+
return res.data;
|
|
1896
|
+
}
|
|
1897
|
+
/** Promote (or roll back to) a deployment — flips the active one. */
|
|
1898
|
+
async promote(id, input, opts = {}) {
|
|
1899
|
+
const res = await request(this.ctx, {
|
|
1900
|
+
method: "POST",
|
|
1901
|
+
path: `/api/v1/functions/${enc3(id)}/promote`,
|
|
1902
|
+
body: input,
|
|
1903
|
+
signal: opts.signal
|
|
1904
|
+
});
|
|
1905
|
+
return res.data;
|
|
1906
|
+
}
|
|
1907
|
+
/** Invoke a deployed function synchronously; returns its response. */
|
|
1908
|
+
async invoke(id, input = {}, opts = {}) {
|
|
1909
|
+
const res = await request(this.ctx, {
|
|
1910
|
+
method: "POST",
|
|
1911
|
+
path: `/api/v1/functions/${enc3(id)}/invoke`,
|
|
1912
|
+
body: input,
|
|
1913
|
+
signal: opts.signal
|
|
1914
|
+
});
|
|
1915
|
+
return res.data;
|
|
1916
|
+
}
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1809
1919
|
// ../sdk/src/api/guide.ts
|
|
1810
1920
|
var GuideApi = class {
|
|
1811
1921
|
constructor(ctx) {
|
|
@@ -2108,7 +2218,7 @@ var ProviderEndpointsApi = class {
|
|
|
2108
2218
|
};
|
|
2109
2219
|
|
|
2110
2220
|
// ../sdk/src/api/realtime.ts
|
|
2111
|
-
var
|
|
2221
|
+
var enc4 = encodeURIComponent;
|
|
2112
2222
|
var RECONNECT_MIN_MS = 1e3;
|
|
2113
2223
|
var RECONNECT_MAX_MS = 3e4;
|
|
2114
2224
|
var RealtimeApi = class {
|
|
@@ -2119,7 +2229,7 @@ var RealtimeApi = class {
|
|
|
2119
2229
|
async broadcast(channel, message, opts = {}) {
|
|
2120
2230
|
const res = await request(this.ctx, {
|
|
2121
2231
|
method: "POST",
|
|
2122
|
-
path: `/api/v1/realtime/${
|
|
2232
|
+
path: `/api/v1/realtime/${enc4(channel)}/broadcast`,
|
|
2123
2233
|
body: { message },
|
|
2124
2234
|
signal: opts.signal
|
|
2125
2235
|
});
|
|
@@ -2129,7 +2239,7 @@ var RealtimeApi = class {
|
|
|
2129
2239
|
async heartbeat(channel, opts = {}) {
|
|
2130
2240
|
const res = await request(this.ctx, {
|
|
2131
2241
|
method: "POST",
|
|
2132
|
-
path: `/api/v1/realtime/${
|
|
2242
|
+
path: `/api/v1/realtime/${enc4(channel)}/presence`,
|
|
2133
2243
|
body: { meta: opts.meta, ttl_seconds: opts.ttlSeconds },
|
|
2134
2244
|
signal: opts.signal
|
|
2135
2245
|
});
|
|
@@ -2139,7 +2249,7 @@ var RealtimeApi = class {
|
|
|
2139
2249
|
async presence(channel, opts = {}) {
|
|
2140
2250
|
const res = await request(this.ctx, {
|
|
2141
2251
|
method: "GET",
|
|
2142
|
-
path: `/api/v1/realtime/${
|
|
2252
|
+
path: `/api/v1/realtime/${enc4(channel)}/presence`,
|
|
2143
2253
|
signal: opts.signal
|
|
2144
2254
|
});
|
|
2145
2255
|
return res.data;
|
|
@@ -2546,7 +2656,7 @@ var SubscriptionApi = class {
|
|
|
2546
2656
|
};
|
|
2547
2657
|
|
|
2548
2658
|
// ../sdk/src/api/tables.ts
|
|
2549
|
-
var
|
|
2659
|
+
var enc5 = encodeURIComponent;
|
|
2550
2660
|
var TablesApi = class {
|
|
2551
2661
|
constructor(ctx) {
|
|
2552
2662
|
this.ctx = ctx;
|
|
@@ -2567,7 +2677,7 @@ var TablesApi = class {
|
|
|
2567
2677
|
async get(id, opts = {}) {
|
|
2568
2678
|
const res = await request(this.ctx, {
|
|
2569
2679
|
method: "GET",
|
|
2570
|
-
path: `/api/v1/tables/${
|
|
2680
|
+
path: `/api/v1/tables/${enc5(id)}`,
|
|
2571
2681
|
signal: opts.signal
|
|
2572
2682
|
});
|
|
2573
2683
|
return res.data;
|
|
@@ -2584,7 +2694,7 @@ var TablesApi = class {
|
|
|
2584
2694
|
async update(id, input, opts = {}) {
|
|
2585
2695
|
const res = await request(this.ctx, {
|
|
2586
2696
|
method: "PATCH",
|
|
2587
|
-
path: `/api/v1/tables/${
|
|
2697
|
+
path: `/api/v1/tables/${enc5(id)}`,
|
|
2588
2698
|
body: input,
|
|
2589
2699
|
signal: opts.signal
|
|
2590
2700
|
});
|
|
@@ -2593,7 +2703,7 @@ var TablesApi = class {
|
|
|
2593
2703
|
async delete(id, opts = {}) {
|
|
2594
2704
|
return request(this.ctx, {
|
|
2595
2705
|
method: "DELETE",
|
|
2596
|
-
path: `/api/v1/tables/${
|
|
2706
|
+
path: `/api/v1/tables/${enc5(id)}`,
|
|
2597
2707
|
signal: opts.signal
|
|
2598
2708
|
});
|
|
2599
2709
|
}
|
|
@@ -2601,7 +2711,7 @@ var TablesApi = class {
|
|
|
2601
2711
|
async query(id, query = {}, opts = {}) {
|
|
2602
2712
|
const res = await request(this.ctx, {
|
|
2603
2713
|
method: "POST",
|
|
2604
|
-
path: `/api/v1/tables/${
|
|
2714
|
+
path: `/api/v1/tables/${enc5(id)}/query`,
|
|
2605
2715
|
body: query,
|
|
2606
2716
|
signal: opts.signal
|
|
2607
2717
|
});
|
|
@@ -2610,7 +2720,7 @@ var TablesApi = class {
|
|
|
2610
2720
|
async createRecord(id, values, opts = {}) {
|
|
2611
2721
|
const res = await request(this.ctx, {
|
|
2612
2722
|
method: "POST",
|
|
2613
|
-
path: `/api/v1/tables/${
|
|
2723
|
+
path: `/api/v1/tables/${enc5(id)}/records`,
|
|
2614
2724
|
body: { values },
|
|
2615
2725
|
signal: opts.signal
|
|
2616
2726
|
});
|
|
@@ -2619,7 +2729,7 @@ var TablesApi = class {
|
|
|
2619
2729
|
async getRecord(id, recordId, opts = {}) {
|
|
2620
2730
|
const res = await request(this.ctx, {
|
|
2621
2731
|
method: "GET",
|
|
2622
|
-
path: `/api/v1/tables/${
|
|
2732
|
+
path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
|
|
2623
2733
|
signal: opts.signal
|
|
2624
2734
|
});
|
|
2625
2735
|
return res.data;
|
|
@@ -2627,7 +2737,7 @@ var TablesApi = class {
|
|
|
2627
2737
|
async updateRecord(id, recordId, values, opts = {}) {
|
|
2628
2738
|
const res = await request(this.ctx, {
|
|
2629
2739
|
method: "PATCH",
|
|
2630
|
-
path: `/api/v1/tables/${
|
|
2740
|
+
path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
|
|
2631
2741
|
body: { values },
|
|
2632
2742
|
signal: opts.signal
|
|
2633
2743
|
});
|
|
@@ -2636,7 +2746,7 @@ var TablesApi = class {
|
|
|
2636
2746
|
async deleteRecord(id, recordId, opts = {}) {
|
|
2637
2747
|
return request(this.ctx, {
|
|
2638
2748
|
method: "DELETE",
|
|
2639
|
-
path: `/api/v1/tables/${
|
|
2749
|
+
path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
|
|
2640
2750
|
signal: opts.signal
|
|
2641
2751
|
});
|
|
2642
2752
|
}
|
|
@@ -2644,7 +2754,7 @@ var TablesApi = class {
|
|
|
2644
2754
|
async exportCsv(id, opts = {}) {
|
|
2645
2755
|
const res = await requestRaw(this.ctx, {
|
|
2646
2756
|
method: "GET",
|
|
2647
|
-
path: `/api/v1/tables/${
|
|
2757
|
+
path: `/api/v1/tables/${enc5(id)}/export`,
|
|
2648
2758
|
signal: opts.signal,
|
|
2649
2759
|
expectJson: false
|
|
2650
2760
|
});
|
|
@@ -2654,7 +2764,7 @@ var TablesApi = class {
|
|
|
2654
2764
|
async importCsv(id, csv, opts = {}) {
|
|
2655
2765
|
const res = await request(this.ctx, {
|
|
2656
2766
|
method: "POST",
|
|
2657
|
-
path: `/api/v1/tables/${
|
|
2767
|
+
path: `/api/v1/tables/${enc5(id)}/import`,
|
|
2658
2768
|
body: { csv },
|
|
2659
2769
|
signal: opts.signal
|
|
2660
2770
|
});
|
|
@@ -3523,7 +3633,7 @@ var IdaptClient2 = class {
|
|
|
3523
3633
|
this.providerEndpoints = new ProviderEndpointsApi(v1Ctx);
|
|
3524
3634
|
this.images = new ImagesApi(v1Ctx);
|
|
3525
3635
|
this.audio = new AudioApi(v1Ctx);
|
|
3526
|
-
this.
|
|
3636
|
+
this.functions = new FunctionsApi(v1Ctx);
|
|
3527
3637
|
this.search = new SearchApi(v1Ctx);
|
|
3528
3638
|
this.web = new WebSearchApi(v1Ctx);
|
|
3529
3639
|
this.guide = new GuideApi(v1Ctx);
|