@mindstudio-ai/agent 0.1.82 → 0.1.83
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/cli.js +241 -7
- package/dist/index.d.ts +235 -2
- package/dist/index.js +231 -0
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +241 -7
- package/llms.txt +3 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1292,6 +1292,195 @@ interface Db {
|
|
|
1292
1292
|
batch(...queries: PromiseLike<unknown>[]): Promise<unknown[]>;
|
|
1293
1293
|
}
|
|
1294
1294
|
|
|
1295
|
+
/**
|
|
1296
|
+
* Access level of a file store. `private` (the default) → reads are signed /
|
|
1297
|
+
* session-authorized; `public` → CDN-served (public serving ships later).
|
|
1298
|
+
*/
|
|
1299
|
+
type FileAccess = 'public' | 'private';
|
|
1300
|
+
/** Options for {@link Store.put}. */
|
|
1301
|
+
interface PutOptions {
|
|
1302
|
+
/**
|
|
1303
|
+
* Object key within the store (nested paths allowed, e.g. `reports/q1.pdf`).
|
|
1304
|
+
* Omit to auto-generate a UUID key (with `filename`'s extension, if given).
|
|
1305
|
+
*/
|
|
1306
|
+
key?: string;
|
|
1307
|
+
/** MIME type stored on the object and returned on read. */
|
|
1308
|
+
contentType?: string;
|
|
1309
|
+
/** Original filename — used only to derive an extension when `key` is omitted. */
|
|
1310
|
+
filename?: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* When true (and no explicit `key`), derive the key from a content hash
|
|
1313
|
+
* (`<sha256>.<ext>`) instead of a random UUID — immutable + idempotent, so
|
|
1314
|
+
* re-uploading identical bytes yields the same key/URL. Ideal for public
|
|
1315
|
+
* assets baked into source.
|
|
1316
|
+
*/
|
|
1317
|
+
contentAddressed?: boolean;
|
|
1318
|
+
}
|
|
1319
|
+
/** Options for {@link Store.list}. */
|
|
1320
|
+
interface ListOptions {
|
|
1321
|
+
/** Restrict to keys under this prefix (relative to the store). */
|
|
1322
|
+
prefix?: string;
|
|
1323
|
+
/** Pagination cursor from a previous page. */
|
|
1324
|
+
cursor?: string;
|
|
1325
|
+
/** Max objects per page. */
|
|
1326
|
+
limit?: number;
|
|
1327
|
+
}
|
|
1328
|
+
/** A stored object plus a ready-to-use URL. */
|
|
1329
|
+
interface StoredFile {
|
|
1330
|
+
store: string;
|
|
1331
|
+
key: string;
|
|
1332
|
+
access: FileAccess;
|
|
1333
|
+
size?: number;
|
|
1334
|
+
contentType?: string;
|
|
1335
|
+
updatedAt?: string;
|
|
1336
|
+
/**
|
|
1337
|
+
* Stable, on-domain URL for the app's own frontend — drop straight into
|
|
1338
|
+
* `<img src>`, `fetch`, or `<a download>`. Relative (resolves against the
|
|
1339
|
+
* app's origin); a same-origin logged-in request authorizes automatically
|
|
1340
|
+
* via the app session, so there's nothing to await.
|
|
1341
|
+
*/
|
|
1342
|
+
url: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* Mint an ABSOLUTE, signed share URL that works with **no** active session —
|
|
1345
|
+
* email it, or embed it on another site. Expires (default 24h). Private
|
|
1346
|
+
* stores only.
|
|
1347
|
+
*/
|
|
1348
|
+
shareUrl(options?: {
|
|
1349
|
+
expiresIn?: number;
|
|
1350
|
+
}): Promise<string>;
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
* A token for a client-direct upload, from {@link Store.createUploadToken}.
|
|
1354
|
+
* Return it from a backend method and pass it straight to the frontend's
|
|
1355
|
+
* `platform.upload(token, file)` — the browser then POSTs the file directly to
|
|
1356
|
+
* storage (no bytes through the platform).
|
|
1357
|
+
*/
|
|
1358
|
+
interface UploadToken {
|
|
1359
|
+
/** The object key the upload will land at (within the store). */
|
|
1360
|
+
key: string;
|
|
1361
|
+
/** The stable on-domain URL the file will be readable at once uploaded. */
|
|
1362
|
+
url: string;
|
|
1363
|
+
/** @internal The scoped presigned POST the frontend submits to. */
|
|
1364
|
+
upload: {
|
|
1365
|
+
url: string;
|
|
1366
|
+
fields: Record<string, string>;
|
|
1367
|
+
};
|
|
1368
|
+
}
|
|
1369
|
+
/** @internal Per-store upload policy carried from `defineStore`. */
|
|
1370
|
+
interface StorePolicy {
|
|
1371
|
+
maxSize?: number;
|
|
1372
|
+
contentTypes?: string[];
|
|
1373
|
+
}
|
|
1374
|
+
/** @internal Transport: `POST /_internal/v2/files/<op>` with the hook token. */
|
|
1375
|
+
type FilesTransport = (op: string, body: unknown) => Promise<any>;
|
|
1376
|
+
/**
|
|
1377
|
+
* A typed handle to one named file store. Lazy — nothing executes until a
|
|
1378
|
+
* method is awaited, so it's safe to `defineStore()` at module scope and import
|
|
1379
|
+
* the handle into route handlers (same ergonomics as `db.defineTable`).
|
|
1380
|
+
*/
|
|
1381
|
+
declare class Store {
|
|
1382
|
+
private readonly _store;
|
|
1383
|
+
private readonly _access;
|
|
1384
|
+
private readonly _call;
|
|
1385
|
+
private readonly _policy;
|
|
1386
|
+
constructor(_store: string, _access: FileAccess, _call: FilesTransport, _policy?: StorePolicy);
|
|
1387
|
+
/** The store's access level. */
|
|
1388
|
+
get access(): FileAccess;
|
|
1389
|
+
/** Store bytes. Returns a {@link StoredFile} with a ready-to-use `url`. */
|
|
1390
|
+
put(content: Buffer | Uint8Array | string, options?: PutOptions): Promise<StoredFile>;
|
|
1391
|
+
/** Read an object's bytes (backend / trusted context). */
|
|
1392
|
+
get(key: string): Promise<Buffer>;
|
|
1393
|
+
/** Metadata without downloading. Rejects if the object doesn't exist. */
|
|
1394
|
+
head(key: string): Promise<StoredFile>;
|
|
1395
|
+
/** Whether an object exists. */
|
|
1396
|
+
exists(key: string): Promise<boolean>;
|
|
1397
|
+
/** List objects in the store (optionally under `prefix`), one page at a time. */
|
|
1398
|
+
list(options?: ListOptions): Promise<{
|
|
1399
|
+
files: StoredFile[];
|
|
1400
|
+
cursor?: string;
|
|
1401
|
+
}>;
|
|
1402
|
+
/** Delete an object. No-op if it doesn't exist. */
|
|
1403
|
+
delete(key: string): Promise<void>;
|
|
1404
|
+
/**
|
|
1405
|
+
* Mint an {@link UploadToken} for a **client-direct** upload — the browser
|
|
1406
|
+
* POSTs the file straight to storage, so the bytes never pass through the
|
|
1407
|
+
* platform. Return the token from a backend method and hand it to the
|
|
1408
|
+
* frontend's `platform.upload(token, file)`. Works for private + public stores.
|
|
1409
|
+
*
|
|
1410
|
+
* Enforced at upload time by the presigned POST: a max size (this call's
|
|
1411
|
+
* `maxSize`, else the store's, else the platform default) and — when
|
|
1412
|
+
* `contentType` is set — an exact content-type match. When the store declares
|
|
1413
|
+
* `contentTypes`, `contentType` must be one of them.
|
|
1414
|
+
*
|
|
1415
|
+
* @example
|
|
1416
|
+
* ```ts
|
|
1417
|
+
* // backend method
|
|
1418
|
+
* export async function getUploadSlot(input: { contentType: string }) {
|
|
1419
|
+
* return Uploads.createUploadToken({ contentType: input.contentType, maxSize: 50 * 1024 * 1024 });
|
|
1420
|
+
* }
|
|
1421
|
+
* ```
|
|
1422
|
+
*/
|
|
1423
|
+
createUploadToken(options?: {
|
|
1424
|
+
key?: string;
|
|
1425
|
+
contentType?: string;
|
|
1426
|
+
filename?: string;
|
|
1427
|
+
maxSize?: number;
|
|
1428
|
+
expiresIn?: number;
|
|
1429
|
+
}): Promise<UploadToken>;
|
|
1430
|
+
private _toFile;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* The `files` namespace — typed, private-by-default file storage for MindStudio
|
|
1435
|
+
* apps. The twin of `db`: define a store at module scope, import the handle into
|
|
1436
|
+
* route handlers.
|
|
1437
|
+
*
|
|
1438
|
+
* ```ts
|
|
1439
|
+
* // files/uploads.ts
|
|
1440
|
+
* import { files } from '@mindstudio-ai/agent';
|
|
1441
|
+
* export const Uploads = files.defineStore('uploads'); // private
|
|
1442
|
+
* export const Assets = files.defineStore('assets', { access: 'public' });
|
|
1443
|
+
*
|
|
1444
|
+
* // routes/upload.ts
|
|
1445
|
+
* import { Uploads } from '../files/uploads';
|
|
1446
|
+
* const f = await Uploads.put(buffer, { contentType, filename });
|
|
1447
|
+
* return { url: f.url }; // drop into <img src> / <a download>
|
|
1448
|
+
* ```
|
|
1449
|
+
*
|
|
1450
|
+
* `file.url` is a stable, on-domain URL a logged-in user's browser can load
|
|
1451
|
+
* directly. For a link that works without a session (email, cross-site embed),
|
|
1452
|
+
* use `await file.shareUrl({ expiresIn })`.
|
|
1453
|
+
*/
|
|
1454
|
+
|
|
1455
|
+
/** Options for `files.defineStore()`. */
|
|
1456
|
+
interface DefineStoreOptions {
|
|
1457
|
+
/**
|
|
1458
|
+
* Access level. **Defaults to `'private'`** (signed / session-authorized
|
|
1459
|
+
* reads). `'public'` marks the store CDN-served (public serving ships in a
|
|
1460
|
+
* later phase). Pinned at define-time — no `put()` can change it.
|
|
1461
|
+
*/
|
|
1462
|
+
access?: FileAccess;
|
|
1463
|
+
/**
|
|
1464
|
+
* Max upload size in bytes for client-direct uploads (the default for
|
|
1465
|
+
* `createUploadToken`; enforced by the presigned POST). Overridable per call;
|
|
1466
|
+
* capped at the platform ceiling.
|
|
1467
|
+
*/
|
|
1468
|
+
maxSize?: number;
|
|
1469
|
+
/**
|
|
1470
|
+
* Allowed content types for client-direct uploads. When set,
|
|
1471
|
+
* `createUploadToken({ contentType })` must pass one of these.
|
|
1472
|
+
*/
|
|
1473
|
+
contentTypes?: string[];
|
|
1474
|
+
}
|
|
1475
|
+
/** The `files` namespace object. */
|
|
1476
|
+
interface Files {
|
|
1477
|
+
/**
|
|
1478
|
+
* Define a typed file store. Lazy — nothing executes until you await a method
|
|
1479
|
+
* on the returned {@link Store}, so it's safe to call at module scope.
|
|
1480
|
+
*/
|
|
1481
|
+
defineStore(name: string, options?: DefineStoreOptions): Store;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1295
1484
|
/**
|
|
1296
1485
|
* Types for the task agent runtime.
|
|
1297
1486
|
*
|
|
@@ -1444,6 +1633,8 @@ declare class MindStudioAgent$1 {
|
|
|
1444
1633
|
private _auth;
|
|
1445
1634
|
/** @internal Cached Db namespace instance, created during context hydration. */
|
|
1446
1635
|
private _db;
|
|
1636
|
+
/** @internal Cached Files namespace instance (lazy; no context hydration needed). */
|
|
1637
|
+
private _files;
|
|
1447
1638
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
1448
1639
|
private _authType;
|
|
1449
1640
|
/** @internal Usage source sent on step executions (from MINDSTUDIO_REQUEST_SOURCE).
|
|
@@ -1710,6 +1901,24 @@ declare class MindStudioAgent$1 {
|
|
|
1710
1901
|
* - `ai.databases`: [{ id, name, tables[] }]
|
|
1711
1902
|
*/
|
|
1712
1903
|
private _trySandboxHydration;
|
|
1904
|
+
/**
|
|
1905
|
+
* The `files` namespace — typed, private-by-default file storage (the twin of
|
|
1906
|
+
* `db`). No context hydration needed: the hook token identifies the app
|
|
1907
|
+
* server-side and stores are code-defined (access travels per call).
|
|
1908
|
+
*
|
|
1909
|
+
* @example
|
|
1910
|
+
* ```ts
|
|
1911
|
+
* const Uploads = agent.files.defineStore('uploads');
|
|
1912
|
+
* const f = await Uploads.put(buffer, { contentType: 'image/png' });
|
|
1913
|
+
* return { url: f.url };
|
|
1914
|
+
* ```
|
|
1915
|
+
*/
|
|
1916
|
+
get files(): Files;
|
|
1917
|
+
/**
|
|
1918
|
+
* @internal Transport for the `files` namespace — POST /_internal/v2/files/<op>
|
|
1919
|
+
* with the raw hook token (mirrors `_executeDbBatch`).
|
|
1920
|
+
*/
|
|
1921
|
+
private _filesRequest;
|
|
1713
1922
|
/**
|
|
1714
1923
|
* @internal Execute a batch of SQL queries against a managed database.
|
|
1715
1924
|
* Used as the `executeBatch` callback for Table/Query instances.
|
|
@@ -5010,7 +5219,11 @@ interface SendEmailStepInput {
|
|
|
5010
5219
|
subject: string;
|
|
5011
5220
|
/** Email body content (plain text, markdown, HTML, or a CDN URL to an HTML file) */
|
|
5012
5221
|
body: string;
|
|
5013
|
-
/**
|
|
5222
|
+
/**
|
|
5223
|
+
* Direct recipient email address(es). On the shared Remy sender these must be verified app users or members of the app's org; unrestricted when the app sends from a domain it owns.
|
|
5224
|
+
*
|
|
5225
|
+
* Optional, but only because recipients can come from elsewhere: omit it and supply `cc`/`bcc` for a hidden-list send (the To: header is then addressed to the app's own sender), or omit all three and recipients resolve from an OAuth connection. Naming nobody at all is an error.
|
|
5226
|
+
*/
|
|
5014
5227
|
to?: string | string[];
|
|
5015
5228
|
/** Additional visible (Cc) recipient(s); same recipient rules as `to`. */
|
|
5016
5229
|
cc?: string | string[];
|
|
@@ -8193,6 +8406,9 @@ interface StepMethods {
|
|
|
8193
8406
|
* - Use the "to" field to send to one or more specific recipient email addresses directly. Allowed recipients depend on the sender: when the app sends from a domain it owns (a verified custom domain or its <slug>.madewithremy.com subdomain) any recipient is allowed; when it falls back to the shared Remy address, recipients must be verified app users or members of the app's organization. (v1 apps cannot use a direct "to" — they must resolve recipients via a connection.)
|
|
8194
8407
|
* - Alternatively, recipient email addresses can be resolved from OAuth connections configured by the app creator via connectionId. The user running the workflow does not specify the recipient directly.
|
|
8195
8408
|
* - Use "cc" and "bcc" to add visible / hidden recipients (a string or an array). They are subject to the same recipient rules as "to".
|
|
8409
|
+
* - "to" is optional only in the sense that recipients can come from elsewhere — omit it and supply "cc"/"bcc" for a hidden-list send, or omit all three and recipients are resolved from an OAuth connection. Naming nobody at all is an error.
|
|
8410
|
+
* - Bcc-only sends are supported: with no "to" or "cc", the To: header is addressed to the app's own sender address (the standard "undisclosed recipients" pattern) so recipients can't see each other. The returned "recipients" reflects that auto-filled address.
|
|
8411
|
+
* - Every recipient counts toward the app's daily outbound cap, including cc and bcc.
|
|
8196
8412
|
* - The sender defaults automatically: v2 apps send from the app's own identity — its verified custom domain if set, else its platform subdomain (noreply@<slug>.madewithremy.com), else the default Remy address.
|
|
8197
8413
|
* - Optionally set "from" to a custom handle, but ONLY if the app has a custom domain or subdomain: a bare handle ("support" → support@<app-domain>), a full "support@your-domain.com", or "Name <support@your-domain.com>". The domain must be one the app owns, or the step fails.
|
|
8198
8414
|
* - If the body is a URL to a hosted HTML file on the CDN, the HTML is fetched and used as the email body.
|
|
@@ -8959,6 +9175,23 @@ declare const auth: AuthContext;
|
|
|
8959
9175
|
* ```
|
|
8960
9176
|
*/
|
|
8961
9177
|
declare const db: Db;
|
|
9178
|
+
/**
|
|
9179
|
+
* Top-level `files` namespace bound to the default singleton.
|
|
9180
|
+
*
|
|
9181
|
+
* Private-by-default file storage — the twin of `db`. Use
|
|
9182
|
+
* `files.defineStore(name)` at module scope, then `.put/.get/.list/.delete`.
|
|
9183
|
+
* `file.url` is a stable on-domain URL for the app frontend; `file.shareUrl()`
|
|
9184
|
+
* mints a signed link that works without a session.
|
|
9185
|
+
*
|
|
9186
|
+
* @example
|
|
9187
|
+
* ```ts
|
|
9188
|
+
* import { files } from '@mindstudio-ai/agent';
|
|
9189
|
+
*
|
|
9190
|
+
* const Uploads = files.defineStore('uploads');
|
|
9191
|
+
* const f = await Uploads.put(buffer, { contentType: 'application/pdf' });
|
|
9192
|
+
* ```
|
|
9193
|
+
*/
|
|
9194
|
+
declare const files: Files;
|
|
8962
9195
|
/**
|
|
8963
9196
|
* Top-level `stream` function bound to the default singleton.
|
|
8964
9197
|
*
|
|
@@ -9022,4 +9255,4 @@ declare const prerender: {
|
|
|
9022
9255
|
}>;
|
|
9023
9256
|
};
|
|
9024
9257
|
|
|
9025
|
-
export { type Accessor, type ActiveCampaignAddNoteStepInput, type ActiveCampaignAddNoteStepOutput, type ActiveCampaignCreateContactStepInput, type ActiveCampaignCreateContactStepOutput, type AddSubtitlesToVideoStepInput, type AddSubtitlesToVideoStepOutput, type AgentInfo, type AgentOptions, type AirtableCreateUpdateRecordStepInput, type AirtableCreateUpdateRecordStepOutput, type AirtableDeleteRecordStepInput, type AirtableDeleteRecordStepOutput, type AirtableGetRecordStepInput, type AirtableGetRecordStepOutput, type AirtableGetTableRecordsStepInput, type AirtableGetTableRecordsStepOutput, type AnalyzeImageStepInput, type AnalyzeImageStepOutput, type AnalyzeVideoStepInput, type AnalyzeVideoStepOutput, type AppAuthContext, type AppContextResult, type AppDatabase, type AppDatabaseColumnSchema, type AppDatabaseTable, type AppRoleAssignment, AuthContext, type AuthTableConfig, type BatchStepInput, type BatchStepResult, type CaptureThumbnailStepInput, type CaptureThumbnailStepOutput, type CheckAppRoleStepInput, type CheckAppRoleStepOutput, type CodaCreateUpdatePageStepInput, type CodaCreateUpdatePageStepOutput, type CodaCreateUpdateRowStepInput, type CodaCreateUpdateRowStepOutput, type CodaFindRowStepInput, type CodaFindRowStepOutput, type CodaGetPageStepInput, type CodaGetPageStepOutput, type CodaGetTableRowsStepInput, type CodaGetTableRowsStepOutput, type Connection, type ConnectorActionDetail, type ConnectorService, type ConvertPdfToImagesStepInput, type ConvertPdfToImagesStepOutput, type CreateDataSourceStepInput, type CreateDataSourceStepOutput, type CreateGmailDraftStepInput, type CreateGmailDraftStepOutput, type CreateGoogleCalendarEventStepInput, type CreateGoogleCalendarEventStepOutput, type CreateGoogleDocStepInput, type CreateGoogleDocStepOutput, type CreateGoogleSheetStepInput, type CreateGoogleSheetStepOutput, type Db, type DefineTableOptions, type DeleteDataSourceDocumentStepInput, type DeleteDataSourceDocumentStepOutput, type DeleteDataSourceStepInput, type DeleteDataSourceStepOutput, type DeleteGmailEmailStepInput, type DeleteGmailEmailStepOutput, type DeleteGoogleCalendarEventStepInput, type DeleteGoogleCalendarEventStepOutput, type DeleteGoogleSheetRowsStepInput, type DeleteGoogleSheetRowsStepOutput, type DetectChangesStepInput, type DetectChangesStepOutput, type DetectPIIStepInput, type DetectPIIStepOutput, type DiscordEditMessageStepInput, type DiscordEditMessageStepOutput, type DiscordSendFollowUpStepInput, type DiscordSendFollowUpStepOutput, type DiscordSendMessageStepInput, type DiscordSendMessageStepOutput, type DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type ExecuteStepBatchOptions, type ExecuteStepBatchResult, type ExtractAudioFromVideoStepInput, type ExtractAudioFromVideoStepOutput, type ExtractTextStepInput, type ExtractTextStepOutput, type FetchDataSourceDocumentStepInput, type FetchDataSourceDocumentStepOutput, type FetchGoogleDocStepInput, type FetchGoogleDocStepOutput, type FetchGoogleSheetStepInput, type FetchGoogleSheetStepOutput, type FetchSlackChannelHistoryStepInput, type FetchSlackChannelHistoryStepOutput, type FetchYoutubeCaptionsStepInput, type FetchYoutubeCaptionsStepOutput, type FetchYoutubeChannelStepInput, type FetchYoutubeChannelStepOutput, type FetchYoutubeCommentsStepInput, type FetchYoutubeCommentsStepOutput, type FetchYoutubeVideoStepInput, type FetchYoutubeVideoStepOutput, type Generate3dModelStepInput, type Generate3dModelStepOutput, type GenerateAssetStepInput, type GenerateAssetStepOutput, type GenerateChartStepInput, type GenerateChartStepOutput, type GenerateImageStepInput, type GenerateImageStepOutput, type GenerateLipsyncStepInput, type GenerateLipsyncStepOutput, type GenerateMusicStepInput, type GenerateMusicStepOutput, type GeneratePdfStepInput, type GeneratePdfStepOutput, type GenerateStaticVideoFromImageStepInput, type GenerateStaticVideoFromImageStepOutput, type GenerateTextStepInput, type GenerateTextStepOutput, type GenerateVideoStepInput, type GenerateVideoStepOutput, type GetGmailAttachmentsStepInput, type GetGmailAttachmentsStepOutput, type GetGmailDraftStepInput, type GetGmailDraftStepOutput, type GetGmailEmailStepInput, type GetGmailEmailStepOutput, type GetGmailUnreadCountStepInput, type GetGmailUnreadCountStepOutput, type GetGoogleCalendarEventStepInput, type GetGoogleCalendarEventStepOutput, type GetGoogleDriveFileStepInput, type GetGoogleDriveFileStepOutput, type GetGoogleSheetInfoStepInput, type GetGoogleSheetInfoStepOutput, type GetMediaMetadataStepInput, type GetMediaMetadataStepOutput, type HubspotCreateCompanyStepInput, type HubspotCreateCompanyStepOutput, type HubspotCreateContactStepInput, type HubspotCreateContactStepOutput, type HubspotGetCompanyStepInput, type HubspotGetCompanyStepOutput, type HubspotGetContactStepInput, type HubspotGetContactStepOutput, type HunterApiCompanyEnrichmentStepInput, type HunterApiCompanyEnrichmentStepOutput, type HunterApiDomainSearchStepInput, type HunterApiDomainSearchStepOutput, type HunterApiEmailFinderStepInput, type HunterApiEmailFinderStepOutput, type HunterApiEmailVerificationStepInput, type HunterApiEmailVerificationStepOutput, type HunterApiPersonEnrichmentStepInput, type HunterApiPersonEnrichmentStepOutput, type ImageFaceSwapStepInput, type ImageFaceSwapStepOutput, type ImageRemoveWatermarkStepInput, type ImageRemoveWatermarkStepOutput, type InsertVideoClipsStepInput, type InsertVideoClipsStepOutput, type ListAgentsResult, type ListDataSourcesStepInput, type ListDataSourcesStepOutput, type ListGmailDraftsStepInput, type ListGmailDraftsStepOutput, type ListGmailLabelsStepInput, type ListGmailLabelsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type ListRecentGmailEmailsStepInput, type ListRecentGmailEmailsStepOutput, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, type MeshyAnimateStepInput, type MeshyAnimateStepOutput, type MeshyImageTo3dStepInput, type MeshyImageTo3dStepOutput, type MeshyRemeshStepInput, type MeshyRemeshStepOutput, type MeshyRigStepInput, type MeshyRigStepOutput, type MeshyTextTo3dStepInput, type MeshyTextTo3dStepOutput, type MeshyTextureStepInput, type MeshyTextureStepOutput, MindStudioAgent, MindStudioError, type MindStudioModel, type MindStudioModelSummary, type MixAudioIntoVideoStepInput, type MixAudioIntoVideoStepOutput, type ModelType, type MonacoSnippet, type MonacoSnippetField, type MonacoSnippetFieldType, type MuteVideoStepInput, type MuteVideoStepOutput, type N8nRunNodeStepInput, type N8nRunNodeStepOutput, type NotionCreatePageStepInput, type NotionCreatePageStepOutput, type NotionUpdatePageStepInput, type NotionUpdatePageStepOutput, type PackagedWorkflow, type PackagedWorkflowInput, type PackagedWorkflowSignature, type ParticlePodcastsFindMentionsStepInput, type ParticlePodcastsFindMentionsStepOutput, type ParticlePodcastsGetEpisodeStepInput, type ParticlePodcastsGetEpisodeStepOutput, type ParticlePodcastsGetEpisodeTranscriptStepInput, type ParticlePodcastsGetEpisodeTranscriptStepOutput, type ParticlePodcastsSearchCompaniesStepInput, type ParticlePodcastsSearchCompaniesStepOutput, type ParticlePodcastsSearchDialogueStepInput, type ParticlePodcastsSearchDialogueStepOutput, type ParticlePodcastsSearchPodcastsStepInput, type ParticlePodcastsSearchPodcastsStepOutput, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type Predicate, type PushInput, Query, type QueryAppDatabaseStepInput, type QueryAppDatabaseStepOutput, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type ReportIssueInput, type ReportedIssue, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFromConnectorRegistryStepInput, type RunFromConnectorRegistryStepOutput, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type RunTaskOptions, type RunTaskResult, type ScrapeLinkedInCompanyStepInput, type ScrapeLinkedInCompanyStepOutput, type ScrapeLinkedInProfileStepInput, type ScrapeLinkedInProfileStepOutput, type ScrapeUrlStepInput, type ScrapeUrlStepOutput, type ScrapeXPostStepInput, type ScrapeXPostStepOutput, type ScrapeXProfileStepInput, type ScrapeXProfileStepOutput, type ScreenshotUrlStepInput, type ScreenshotUrlStepOutput, type SearchGmailEmailsStepInput, type SearchGmailEmailsStepOutput, type SearchGoogleCalendarEventsStepInput, type SearchGoogleCalendarEventsStepOutput, type SearchGoogleDriveStepInput, type SearchGoogleDriveStepOutput, type SearchGoogleImagesStepInput, type SearchGoogleImagesStepOutput, type SearchGoogleNewsStepInput, type SearchGoogleNewsStepOutput, type SearchGoogleStepInput, type SearchGoogleStepOutput, type SearchGoogleTrendsStepInput, type SearchGoogleTrendsStepOutput, type SearchPerplexityStepInput, type SearchPerplexityStepOutput, type SearchXPostsStepInput, type SearchXPostsStepOutput, type SearchYoutubeStepInput, type SearchYoutubeStepOutput, type SearchYoutubeTrendsStepInput, type SearchYoutubeTrendsStepOutput, type SendEmailStepInput, type SendEmailStepOutput, type SendGmailDraftStepInput, type SendGmailDraftStepOutput, type SendGmailMessageStepInput, type SendGmailMessageStepOutput, type SendSMSStepInput, type SendSMSStepOutput, type SendSlackDirectMessageStepInput, type SendSlackDirectMessageStepOutput, type SetGmailReadStatusStepInput, type SetGmailReadStatusStepOutput, type SetRunTitleStepInput, type SetRunTitleStepOutput, type SetVariableStepInput, type SetVariableStepOutput, type StepCostEstimateEntry, type StepExecutionMeta, type StepExecutionOptions, type StepExecutionResult, type StepInputMap, type StepLogEvent, type StepMetadata, type StepMethods, type StepName, type StepOutputMap, type SystemFields, Table, type TaskEvent, type TaskToolCall, type TaskToolConfig, type TaskUsage, type TelegramEditMessageStepInput, type TelegramEditMessageStepOutput, type TelegramReplyToMessageStepInput, type TelegramReplyToMessageStepOutput, type TelegramSendAudioStepInput, type TelegramSendAudioStepOutput, type TelegramSendFileStepInput, type TelegramSendFileStepOutput, type TelegramSendImageStepInput, type TelegramSendImageStepOutput, type TelegramSendMessageStepInput, type TelegramSendMessageStepOutput, type TelegramSendVideoStepInput, type TelegramSendVideoStepOutput, type TelegramSetTypingStepInput, type TelegramSetTypingStepOutput, type TextToSpeechStepInput, type TextToSpeechStepOutput, type TranscribeAudioStepInput, type TranscribeAudioStepOutput, type TrimMediaStepInput, type TrimMediaStepOutput, type UpdateGmailLabelsStepInput, type UpdateGmailLabelsStepOutput, type UpdateGoogleCalendarEventStepInput, type UpdateGoogleCalendarEventStepOutput, type UpdateGoogleDocStepInput, type UpdateGoogleDocStepOutput, type UpdateGoogleSheetStepInput, type UpdateGoogleSheetStepOutput, type UpdateInput, type UploadDataSourceDocumentStepInput, type UploadDataSourceDocumentStepOutput, type UploadFileResult, type UpscaleImageStepInput, type UpscaleImageStepOutput, type UpscaleVideoStepInput, type UpscaleVideoStepOutput, type User, type UserInfoResult, type UserMessageStepInput, type UserMessageStepOutput, type VideoFaceSwapStepInput, type VideoFaceSwapStepOutput, type VideoRemoveBackgroundStepInput, type VideoRemoveBackgroundStepOutput, type VideoRemoveWatermarkStepInput, type VideoRemoveWatermarkStepOutput, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, type YouDotComFinanceResearchStepInput, type YouDotComFinanceResearchStepOutput, type YouDotComGetPageContentStepInput, type YouDotComGetPageContentStepOutput, type YouDotComLiveNewsStepInput, type YouDotComLiveNewsStepOutput, type YouDotComWebResearchStepInput, type YouDotComWebResearchStepOutput, type YouDotComWebSearchStepInput, type YouDotComWebSearchStepOutput, auth, blockTypeAliases, db, mindstudio as default, getRequestContext, mindstudio, monacoSnippets, prerender, reportIssue, resolveUser, runWithContext, stepMetadata, stream };
|
|
9258
|
+
export { type Accessor, type ActiveCampaignAddNoteStepInput, type ActiveCampaignAddNoteStepOutput, type ActiveCampaignCreateContactStepInput, type ActiveCampaignCreateContactStepOutput, type AddSubtitlesToVideoStepInput, type AddSubtitlesToVideoStepOutput, type AgentInfo, type AgentOptions, type AirtableCreateUpdateRecordStepInput, type AirtableCreateUpdateRecordStepOutput, type AirtableDeleteRecordStepInput, type AirtableDeleteRecordStepOutput, type AirtableGetRecordStepInput, type AirtableGetRecordStepOutput, type AirtableGetTableRecordsStepInput, type AirtableGetTableRecordsStepOutput, type AnalyzeImageStepInput, type AnalyzeImageStepOutput, type AnalyzeVideoStepInput, type AnalyzeVideoStepOutput, type AppAuthContext, type AppContextResult, type AppDatabase, type AppDatabaseColumnSchema, type AppDatabaseTable, type AppRoleAssignment, AuthContext, type AuthTableConfig, type BatchStepInput, type BatchStepResult, type CaptureThumbnailStepInput, type CaptureThumbnailStepOutput, type CheckAppRoleStepInput, type CheckAppRoleStepOutput, type CodaCreateUpdatePageStepInput, type CodaCreateUpdatePageStepOutput, type CodaCreateUpdateRowStepInput, type CodaCreateUpdateRowStepOutput, type CodaFindRowStepInput, type CodaFindRowStepOutput, type CodaGetPageStepInput, type CodaGetPageStepOutput, type CodaGetTableRowsStepInput, type CodaGetTableRowsStepOutput, type Connection, type ConnectorActionDetail, type ConnectorService, type ConvertPdfToImagesStepInput, type ConvertPdfToImagesStepOutput, type CreateDataSourceStepInput, type CreateDataSourceStepOutput, type CreateGmailDraftStepInput, type CreateGmailDraftStepOutput, type CreateGoogleCalendarEventStepInput, type CreateGoogleCalendarEventStepOutput, type CreateGoogleDocStepInput, type CreateGoogleDocStepOutput, type CreateGoogleSheetStepInput, type CreateGoogleSheetStepOutput, type Db, type DefineStoreOptions, type DefineTableOptions, type DeleteDataSourceDocumentStepInput, type DeleteDataSourceDocumentStepOutput, type DeleteDataSourceStepInput, type DeleteDataSourceStepOutput, type DeleteGmailEmailStepInput, type DeleteGmailEmailStepOutput, type DeleteGoogleCalendarEventStepInput, type DeleteGoogleCalendarEventStepOutput, type DeleteGoogleSheetRowsStepInput, type DeleteGoogleSheetRowsStepOutput, type DetectChangesStepInput, type DetectChangesStepOutput, type DetectPIIStepInput, type DetectPIIStepOutput, type DiscordEditMessageStepInput, type DiscordEditMessageStepOutput, type DiscordSendFollowUpStepInput, type DiscordSendFollowUpStepOutput, type DiscordSendMessageStepInput, type DiscordSendMessageStepOutput, type DownloadVideoStepInput, type DownloadVideoStepOutput, type EnhanceImageGenerationPromptStepInput, type EnhanceImageGenerationPromptStepOutput, type EnhanceVideoGenerationPromptStepInput, type EnhanceVideoGenerationPromptStepOutput, type EnrichPersonStepInput, type EnrichPersonStepOutput, type ExecuteStepBatchOptions, type ExecuteStepBatchResult, type ExtractAudioFromVideoStepInput, type ExtractAudioFromVideoStepOutput, type ExtractTextStepInput, type ExtractTextStepOutput, type FetchDataSourceDocumentStepInput, type FetchDataSourceDocumentStepOutput, type FetchGoogleDocStepInput, type FetchGoogleDocStepOutput, type FetchGoogleSheetStepInput, type FetchGoogleSheetStepOutput, type FetchSlackChannelHistoryStepInput, type FetchSlackChannelHistoryStepOutput, type FetchYoutubeCaptionsStepInput, type FetchYoutubeCaptionsStepOutput, type FetchYoutubeChannelStepInput, type FetchYoutubeChannelStepOutput, type FetchYoutubeCommentsStepInput, type FetchYoutubeCommentsStepOutput, type FetchYoutubeVideoStepInput, type FetchYoutubeVideoStepOutput, type FileAccess, type Files, type Generate3dModelStepInput, type Generate3dModelStepOutput, type GenerateAssetStepInput, type GenerateAssetStepOutput, type GenerateChartStepInput, type GenerateChartStepOutput, type GenerateImageStepInput, type GenerateImageStepOutput, type GenerateLipsyncStepInput, type GenerateLipsyncStepOutput, type GenerateMusicStepInput, type GenerateMusicStepOutput, type GeneratePdfStepInput, type GeneratePdfStepOutput, type GenerateStaticVideoFromImageStepInput, type GenerateStaticVideoFromImageStepOutput, type GenerateTextStepInput, type GenerateTextStepOutput, type GenerateVideoStepInput, type GenerateVideoStepOutput, type GetGmailAttachmentsStepInput, type GetGmailAttachmentsStepOutput, type GetGmailDraftStepInput, type GetGmailDraftStepOutput, type GetGmailEmailStepInput, type GetGmailEmailStepOutput, type GetGmailUnreadCountStepInput, type GetGmailUnreadCountStepOutput, type GetGoogleCalendarEventStepInput, type GetGoogleCalendarEventStepOutput, type GetGoogleDriveFileStepInput, type GetGoogleDriveFileStepOutput, type GetGoogleSheetInfoStepInput, type GetGoogleSheetInfoStepOutput, type GetMediaMetadataStepInput, type GetMediaMetadataStepOutput, type HubspotCreateCompanyStepInput, type HubspotCreateCompanyStepOutput, type HubspotCreateContactStepInput, type HubspotCreateContactStepOutput, type HubspotGetCompanyStepInput, type HubspotGetCompanyStepOutput, type HubspotGetContactStepInput, type HubspotGetContactStepOutput, type HunterApiCompanyEnrichmentStepInput, type HunterApiCompanyEnrichmentStepOutput, type HunterApiDomainSearchStepInput, type HunterApiDomainSearchStepOutput, type HunterApiEmailFinderStepInput, type HunterApiEmailFinderStepOutput, type HunterApiEmailVerificationStepInput, type HunterApiEmailVerificationStepOutput, type HunterApiPersonEnrichmentStepInput, type HunterApiPersonEnrichmentStepOutput, type ImageFaceSwapStepInput, type ImageFaceSwapStepOutput, type ImageRemoveWatermarkStepInput, type ImageRemoveWatermarkStepOutput, type InsertVideoClipsStepInput, type InsertVideoClipsStepOutput, type ListAgentsResult, type ListDataSourcesStepInput, type ListDataSourcesStepOutput, type ListGmailDraftsStepInput, type ListGmailDraftsStepOutput, type ListGmailLabelsStepInput, type ListGmailLabelsStepOutput, type ListGoogleCalendarEventsStepInput, type ListGoogleCalendarEventsStepOutput, type ListGoogleDriveFilesStepInput, type ListGoogleDriveFilesStepOutput, type ListOptions, type ListRecentGmailEmailsStepInput, type ListRecentGmailEmailsStepOutput, type LogicStepInput, type LogicStepOutput, type MakeDotComRunScenarioStepInput, type MakeDotComRunScenarioStepOutput, type MergeAudioStepInput, type MergeAudioStepOutput, type MergeVideosStepInput, type MergeVideosStepOutput, type MeshyAnimateStepInput, type MeshyAnimateStepOutput, type MeshyImageTo3dStepInput, type MeshyImageTo3dStepOutput, type MeshyRemeshStepInput, type MeshyRemeshStepOutput, type MeshyRigStepInput, type MeshyRigStepOutput, type MeshyTextTo3dStepInput, type MeshyTextTo3dStepOutput, type MeshyTextureStepInput, type MeshyTextureStepOutput, MindStudioAgent, MindStudioError, type MindStudioModel, type MindStudioModelSummary, type MixAudioIntoVideoStepInput, type MixAudioIntoVideoStepOutput, type ModelType, type MonacoSnippet, type MonacoSnippetField, type MonacoSnippetFieldType, type MuteVideoStepInput, type MuteVideoStepOutput, type N8nRunNodeStepInput, type N8nRunNodeStepOutput, type NotionCreatePageStepInput, type NotionCreatePageStepOutput, type NotionUpdatePageStepInput, type NotionUpdatePageStepOutput, type PackagedWorkflow, type PackagedWorkflowInput, type PackagedWorkflowSignature, type ParticlePodcastsFindMentionsStepInput, type ParticlePodcastsFindMentionsStepOutput, type ParticlePodcastsGetEpisodeStepInput, type ParticlePodcastsGetEpisodeStepOutput, type ParticlePodcastsGetEpisodeTranscriptStepInput, type ParticlePodcastsGetEpisodeTranscriptStepOutput, type ParticlePodcastsSearchCompaniesStepInput, type ParticlePodcastsSearchCompaniesStepOutput, type ParticlePodcastsSearchDialogueStepInput, type ParticlePodcastsSearchDialogueStepOutput, type ParticlePodcastsSearchPodcastsStepInput, type ParticlePodcastsSearchPodcastsStepOutput, type PeopleSearchStepInput, type PeopleSearchStepOutput, type PostToLinkedInStepInput, type PostToLinkedInStepOutput, type PostToSlackChannelStepInput, type PostToSlackChannelStepOutput, type PostToXStepInput, type PostToXStepOutput, type PostToZapierStepInput, type PostToZapierStepOutput, type Predicate, type PushInput, type PutOptions, Query, type QueryAppDatabaseStepInput, type QueryAppDatabaseStepOutput, type QueryDataSourceStepInput, type QueryDataSourceStepOutput, type QueryExternalDatabaseStepInput, type QueryExternalDatabaseStepOutput, type RedactPIIStepInput, type RedactPIIStepOutput, type RemoveBackgroundFromImageStepInput, type RemoveBackgroundFromImageStepOutput, type ReplyToGmailEmailStepInput, type ReplyToGmailEmailStepOutput, type ReportIssueInput, type ReportedIssue, type RequestContext, type ResizeVideoStepInput, type ResizeVideoStepOutput, type ResolvedUser, Roles, type RunAgentOptions, type RunAgentResult, type RunFromConnectorRegistryStepInput, type RunFromConnectorRegistryStepOutput, type RunPackagedWorkflowStepInput, type RunPackagedWorkflowStepOutput, type RunTaskOptions, type RunTaskResult, type ScrapeLinkedInCompanyStepInput, type ScrapeLinkedInCompanyStepOutput, type ScrapeLinkedInProfileStepInput, type ScrapeLinkedInProfileStepOutput, type ScrapeUrlStepInput, type ScrapeUrlStepOutput, type ScrapeXPostStepInput, type ScrapeXPostStepOutput, type ScrapeXProfileStepInput, type ScrapeXProfileStepOutput, type ScreenshotUrlStepInput, type ScreenshotUrlStepOutput, type SearchGmailEmailsStepInput, type SearchGmailEmailsStepOutput, type SearchGoogleCalendarEventsStepInput, type SearchGoogleCalendarEventsStepOutput, type SearchGoogleDriveStepInput, type SearchGoogleDriveStepOutput, type SearchGoogleImagesStepInput, type SearchGoogleImagesStepOutput, type SearchGoogleNewsStepInput, type SearchGoogleNewsStepOutput, type SearchGoogleStepInput, type SearchGoogleStepOutput, type SearchGoogleTrendsStepInput, type SearchGoogleTrendsStepOutput, type SearchPerplexityStepInput, type SearchPerplexityStepOutput, type SearchXPostsStepInput, type SearchXPostsStepOutput, type SearchYoutubeStepInput, type SearchYoutubeStepOutput, type SearchYoutubeTrendsStepInput, type SearchYoutubeTrendsStepOutput, type SendEmailStepInput, type SendEmailStepOutput, type SendGmailDraftStepInput, type SendGmailDraftStepOutput, type SendGmailMessageStepInput, type SendGmailMessageStepOutput, type SendSMSStepInput, type SendSMSStepOutput, type SendSlackDirectMessageStepInput, type SendSlackDirectMessageStepOutput, type SetGmailReadStatusStepInput, type SetGmailReadStatusStepOutput, type SetRunTitleStepInput, type SetRunTitleStepOutput, type SetVariableStepInput, type SetVariableStepOutput, type StepCostEstimateEntry, type StepExecutionMeta, type StepExecutionOptions, type StepExecutionResult, type StepInputMap, type StepLogEvent, type StepMetadata, type StepMethods, type StepName, type StepOutputMap, Store, type StoredFile, type SystemFields, Table, type TaskEvent, type TaskToolCall, type TaskToolConfig, type TaskUsage, type TelegramEditMessageStepInput, type TelegramEditMessageStepOutput, type TelegramReplyToMessageStepInput, type TelegramReplyToMessageStepOutput, type TelegramSendAudioStepInput, type TelegramSendAudioStepOutput, type TelegramSendFileStepInput, type TelegramSendFileStepOutput, type TelegramSendImageStepInput, type TelegramSendImageStepOutput, type TelegramSendMessageStepInput, type TelegramSendMessageStepOutput, type TelegramSendVideoStepInput, type TelegramSendVideoStepOutput, type TelegramSetTypingStepInput, type TelegramSetTypingStepOutput, type TextToSpeechStepInput, type TextToSpeechStepOutput, type TranscribeAudioStepInput, type TranscribeAudioStepOutput, type TrimMediaStepInput, type TrimMediaStepOutput, type UpdateGmailLabelsStepInput, type UpdateGmailLabelsStepOutput, type UpdateGoogleCalendarEventStepInput, type UpdateGoogleCalendarEventStepOutput, type UpdateGoogleDocStepInput, type UpdateGoogleDocStepOutput, type UpdateGoogleSheetStepInput, type UpdateGoogleSheetStepOutput, type UpdateInput, type UploadDataSourceDocumentStepInput, type UploadDataSourceDocumentStepOutput, type UploadFileResult, type UploadToken, type UpscaleImageStepInput, type UpscaleImageStepOutput, type UpscaleVideoStepInput, type UpscaleVideoStepOutput, type User, type UserInfoResult, type UserMessageStepInput, type UserMessageStepOutput, type VideoFaceSwapStepInput, type VideoFaceSwapStepOutput, type VideoRemoveBackgroundStepInput, type VideoRemoveBackgroundStepOutput, type VideoRemoveWatermarkStepInput, type VideoRemoveWatermarkStepOutput, type WatermarkImageStepInput, type WatermarkImageStepOutput, type WatermarkVideoStepInput, type WatermarkVideoStepOutput, type YouDotComFinanceResearchStepInput, type YouDotComFinanceResearchStepOutput, type YouDotComGetPageContentStepInput, type YouDotComGetPageContentStepOutput, type YouDotComLiveNewsStepInput, type YouDotComLiveNewsStepOutput, type YouDotComWebResearchStepInput, type YouDotComWebResearchStepOutput, type YouDotComWebSearchStepInput, type YouDotComWebSearchStepOutput, auth, blockTypeAliases, db, mindstudio as default, files, getRequestContext, mindstudio, monacoSnippets, prerender, reportIssue, resolveUser, runWithContext, stepMetadata, stream };
|
package/dist/index.js
CHANGED
|
@@ -1924,6 +1924,173 @@ function resolveTable(databases, tableName, databaseHint) {
|
|
|
1924
1924
|
);
|
|
1925
1925
|
}
|
|
1926
1926
|
|
|
1927
|
+
// src/files/store.ts
|
|
1928
|
+
import { createHash, randomUUID } from "crypto";
|
|
1929
|
+
function toBase64(content) {
|
|
1930
|
+
return Buffer.from(
|
|
1931
|
+
typeof content === "string" ? Buffer.from(content) : content
|
|
1932
|
+
).toString("base64");
|
|
1933
|
+
}
|
|
1934
|
+
function extensionFor(filename) {
|
|
1935
|
+
if (!filename) {
|
|
1936
|
+
return "";
|
|
1937
|
+
}
|
|
1938
|
+
const dot = filename.lastIndexOf(".");
|
|
1939
|
+
return dot > 0 ? filename.slice(dot) : "";
|
|
1940
|
+
}
|
|
1941
|
+
var Store = class {
|
|
1942
|
+
constructor(_store, _access, _call, _policy = {}) {
|
|
1943
|
+
this._store = _store;
|
|
1944
|
+
this._access = _access;
|
|
1945
|
+
this._call = _call;
|
|
1946
|
+
this._policy = _policy;
|
|
1947
|
+
}
|
|
1948
|
+
/** The store's access level. */
|
|
1949
|
+
get access() {
|
|
1950
|
+
return this._access;
|
|
1951
|
+
}
|
|
1952
|
+
/** Store bytes. Returns a {@link StoredFile} with a ready-to-use `url`. */
|
|
1953
|
+
async put(content, options) {
|
|
1954
|
+
const ext = extensionFor(options?.filename);
|
|
1955
|
+
const key = options?.key ?? (options?.contentAddressed ? `${createHash("sha256").update(content).digest("hex")}${ext}` : `${randomUUID()}${ext}`);
|
|
1956
|
+
const meta = await this._call("put", {
|
|
1957
|
+
store: this._store,
|
|
1958
|
+
access: this._access,
|
|
1959
|
+
key,
|
|
1960
|
+
body: toBase64(content),
|
|
1961
|
+
...options?.contentType ? { contentType: options.contentType } : {}
|
|
1962
|
+
});
|
|
1963
|
+
return this._toFile(key, meta);
|
|
1964
|
+
}
|
|
1965
|
+
/** Read an object's bytes (backend / trusted context). */
|
|
1966
|
+
async get(key) {
|
|
1967
|
+
const res = await this._call("get", {
|
|
1968
|
+
store: this._store,
|
|
1969
|
+
access: this._access,
|
|
1970
|
+
key
|
|
1971
|
+
});
|
|
1972
|
+
return Buffer.from(res.body, "base64");
|
|
1973
|
+
}
|
|
1974
|
+
/** Metadata without downloading. Rejects if the object doesn't exist. */
|
|
1975
|
+
async head(key) {
|
|
1976
|
+
const meta = await this._call("head", {
|
|
1977
|
+
store: this._store,
|
|
1978
|
+
access: this._access,
|
|
1979
|
+
key
|
|
1980
|
+
});
|
|
1981
|
+
return this._toFile(key, meta);
|
|
1982
|
+
}
|
|
1983
|
+
/** Whether an object exists. */
|
|
1984
|
+
async exists(key) {
|
|
1985
|
+
try {
|
|
1986
|
+
await this.head(key);
|
|
1987
|
+
return true;
|
|
1988
|
+
} catch {
|
|
1989
|
+
return false;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
/** List objects in the store (optionally under `prefix`), one page at a time. */
|
|
1993
|
+
async list(options) {
|
|
1994
|
+
const res = await this._call("list", {
|
|
1995
|
+
store: this._store,
|
|
1996
|
+
access: this._access,
|
|
1997
|
+
...options?.prefix ? { prefix: options.prefix } : {},
|
|
1998
|
+
...options?.cursor ? { cursor: options.cursor } : {},
|
|
1999
|
+
...options?.limit ? { limit: options.limit } : {}
|
|
2000
|
+
});
|
|
2001
|
+
return {
|
|
2002
|
+
files: (res.files ?? []).map((f) => this._toFile(f.key, f)),
|
|
2003
|
+
...res.cursor ? { cursor: res.cursor } : {}
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
/** Delete an object. No-op if it doesn't exist. */
|
|
2007
|
+
async delete(key) {
|
|
2008
|
+
await this._call("delete", {
|
|
2009
|
+
store: this._store,
|
|
2010
|
+
access: this._access,
|
|
2011
|
+
key
|
|
2012
|
+
});
|
|
2013
|
+
}
|
|
2014
|
+
/**
|
|
2015
|
+
* Mint an {@link UploadToken} for a **client-direct** upload — the browser
|
|
2016
|
+
* POSTs the file straight to storage, so the bytes never pass through the
|
|
2017
|
+
* platform. Return the token from a backend method and hand it to the
|
|
2018
|
+
* frontend's `platform.upload(token, file)`. Works for private + public stores.
|
|
2019
|
+
*
|
|
2020
|
+
* Enforced at upload time by the presigned POST: a max size (this call's
|
|
2021
|
+
* `maxSize`, else the store's, else the platform default) and — when
|
|
2022
|
+
* `contentType` is set — an exact content-type match. When the store declares
|
|
2023
|
+
* `contentTypes`, `contentType` must be one of them.
|
|
2024
|
+
*
|
|
2025
|
+
* @example
|
|
2026
|
+
* ```ts
|
|
2027
|
+
* // backend method
|
|
2028
|
+
* export async function getUploadSlot(input: { contentType: string }) {
|
|
2029
|
+
* return Uploads.createUploadToken({ contentType: input.contentType, maxSize: 50 * 1024 * 1024 });
|
|
2030
|
+
* }
|
|
2031
|
+
* ```
|
|
2032
|
+
*/
|
|
2033
|
+
async createUploadToken(options) {
|
|
2034
|
+
if (options?.contentType && this._policy.contentTypes && !this._policy.contentTypes.includes(options.contentType)) {
|
|
2035
|
+
throw new MindStudioError(
|
|
2036
|
+
`contentType "${options.contentType}" is not allowed by store "${this._store}".`,
|
|
2037
|
+
"content_type_not_allowed",
|
|
2038
|
+
400
|
|
2039
|
+
);
|
|
2040
|
+
}
|
|
2041
|
+
const key = options?.key ?? `${randomUUID()}${extensionFor(options?.filename)}`;
|
|
2042
|
+
const maxSize = options?.maxSize ?? this._policy.maxSize;
|
|
2043
|
+
const res = await this._call("create-upload", {
|
|
2044
|
+
store: this._store,
|
|
2045
|
+
access: this._access,
|
|
2046
|
+
key,
|
|
2047
|
+
...options?.contentType ? { contentType: options.contentType } : {},
|
|
2048
|
+
...maxSize ? { maxSize } : {},
|
|
2049
|
+
...options?.expiresIn ? { expiresIn: options.expiresIn } : {}
|
|
2050
|
+
});
|
|
2051
|
+
return {
|
|
2052
|
+
key,
|
|
2053
|
+
url: `/_/files/${this._access}/${this._store}/${key}`,
|
|
2054
|
+
upload: { url: res.uploadUrl, fields: res.uploadFields }
|
|
2055
|
+
};
|
|
2056
|
+
}
|
|
2057
|
+
_toFile(key, meta) {
|
|
2058
|
+
const store = this._store;
|
|
2059
|
+
const access = this._access;
|
|
2060
|
+
const call = this._call;
|
|
2061
|
+
return {
|
|
2062
|
+
store,
|
|
2063
|
+
key,
|
|
2064
|
+
access,
|
|
2065
|
+
url: `/_/files/${access}/${store}/${key}`,
|
|
2066
|
+
...typeof meta?.size === "number" ? { size: meta.size } : {},
|
|
2067
|
+
...meta?.contentType ? { contentType: meta.contentType } : {},
|
|
2068
|
+
...meta?.updatedAt ? { updatedAt: meta.updatedAt } : {},
|
|
2069
|
+
async shareUrl(options) {
|
|
2070
|
+
const res = await call("sign", {
|
|
2071
|
+
store,
|
|
2072
|
+
access,
|
|
2073
|
+
key,
|
|
2074
|
+
...options?.expiresIn ? { expiresIn: options.expiresIn } : {}
|
|
2075
|
+
});
|
|
2076
|
+
return res.url;
|
|
2077
|
+
}
|
|
2078
|
+
};
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
2081
|
+
|
|
2082
|
+
// src/files/index.ts
|
|
2083
|
+
function createFiles(call) {
|
|
2084
|
+
return {
|
|
2085
|
+
defineStore(name, options) {
|
|
2086
|
+
return new Store(name, options?.access ?? "private", call, {
|
|
2087
|
+
...options?.maxSize !== void 0 ? { maxSize: options.maxSize } : {},
|
|
2088
|
+
...options?.contentTypes ? { contentTypes: options.contentTypes } : {}
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
};
|
|
2092
|
+
}
|
|
2093
|
+
|
|
1927
2094
|
// src/generated/metadata.ts
|
|
1928
2095
|
var stepMetadata = {
|
|
1929
2096
|
"activeCampaignAddNote": {
|
|
@@ -2891,6 +3058,9 @@ var stepMetadata = {
|
|
|
2891
3058
|
usageNotes: `- Use the "to" field to send to one or more specific recipient email addresses directly. Allowed recipients depend on the sender: when the app sends from a domain it owns (a verified custom domain or its <slug>.madewithremy.com subdomain) any recipient is allowed; when it falls back to the shared Remy address, recipients must be verified app users or members of the app's organization. (v1 apps cannot use a direct "to" \u2014 they must resolve recipients via a connection.)
|
|
2892
3059
|
- Alternatively, recipient email addresses can be resolved from OAuth connections configured by the app creator via connectionId. The user running the workflow does not specify the recipient directly.
|
|
2893
3060
|
- Use "cc" and "bcc" to add visible / hidden recipients (a string or an array). They are subject to the same recipient rules as "to".
|
|
3061
|
+
- "to" is optional only in the sense that recipients can come from elsewhere \u2014 omit it and supply "cc"/"bcc" for a hidden-list send, or omit all three and recipients are resolved from an OAuth connection. Naming nobody at all is an error.
|
|
3062
|
+
- Bcc-only sends are supported: with no "to" or "cc", the To: header is addressed to the app's own sender address (the standard "undisclosed recipients" pattern) so recipients can't see each other. The returned "recipients" reflects that auto-filled address.
|
|
3063
|
+
- Every recipient counts toward the app's daily outbound cap, including cc and bcc.
|
|
2894
3064
|
- The sender defaults automatically: v2 apps send from the app's own identity \u2014 its verified custom domain if set, else its platform subdomain (noreply@<slug>.madewithremy.com), else the default Remy address.
|
|
2895
3065
|
- Optionally set "from" to a custom handle, but ONLY if the app has a custom domain or subdomain: a bare handle ("support" \u2192 support@<app-domain>), a full "support@your-domain.com", or "Name <support@your-domain.com>". The domain must be one the app owns, or the step fails.
|
|
2896
3066
|
- If the body is a URL to a hosted HTML file on the CDN, the HTML is fetched and used as the email body.
|
|
@@ -3933,6 +4103,8 @@ var MindStudioAgent = class {
|
|
|
3933
4103
|
_auth;
|
|
3934
4104
|
/** @internal Cached Db namespace instance, created during context hydration. */
|
|
3935
4105
|
_db;
|
|
4106
|
+
/** @internal Cached Files namespace instance (lazy; no context hydration needed). */
|
|
4107
|
+
_files;
|
|
3936
4108
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
3937
4109
|
_authType;
|
|
3938
4110
|
/** @internal Usage source sent on step executions (from MINDSTUDIO_REQUEST_SOURCE).
|
|
@@ -4809,6 +4981,54 @@ var MindStudioAgent = class {
|
|
|
4809
4981
|
});
|
|
4810
4982
|
}
|
|
4811
4983
|
}
|
|
4984
|
+
/**
|
|
4985
|
+
* The `files` namespace — typed, private-by-default file storage (the twin of
|
|
4986
|
+
* `db`). No context hydration needed: the hook token identifies the app
|
|
4987
|
+
* server-side and stores are code-defined (access travels per call).
|
|
4988
|
+
*
|
|
4989
|
+
* @example
|
|
4990
|
+
* ```ts
|
|
4991
|
+
* const Uploads = agent.files.defineStore('uploads');
|
|
4992
|
+
* const f = await Uploads.put(buffer, { contentType: 'image/png' });
|
|
4993
|
+
* return { url: f.url };
|
|
4994
|
+
* ```
|
|
4995
|
+
*/
|
|
4996
|
+
get files() {
|
|
4997
|
+
return this._files ??= createFiles(this._filesRequest.bind(this));
|
|
4998
|
+
}
|
|
4999
|
+
/**
|
|
5000
|
+
* @internal Transport for the `files` namespace — POST /_internal/v2/files/<op>
|
|
5001
|
+
* with the raw hook token (mirrors `_executeDbBatch`).
|
|
5002
|
+
*/
|
|
5003
|
+
async _filesRequest(op, body) {
|
|
5004
|
+
const url = `${this._currentHttpConfig.baseUrl}/_internal/v2/files/${op}`;
|
|
5005
|
+
const res = await fetch(url, {
|
|
5006
|
+
method: "POST",
|
|
5007
|
+
headers: {
|
|
5008
|
+
"Content-Type": "application/json",
|
|
5009
|
+
Authorization: this._token
|
|
5010
|
+
},
|
|
5011
|
+
body: JSON.stringify(body)
|
|
5012
|
+
});
|
|
5013
|
+
if (res.status === 204) {
|
|
5014
|
+
return void 0;
|
|
5015
|
+
}
|
|
5016
|
+
const text = await res.text();
|
|
5017
|
+
let json;
|
|
5018
|
+
if (text) {
|
|
5019
|
+
try {
|
|
5020
|
+
json = JSON.parse(text);
|
|
5021
|
+
} catch {
|
|
5022
|
+
}
|
|
5023
|
+
}
|
|
5024
|
+
if (!res.ok) {
|
|
5025
|
+
const rawMsg = json?.errorMessage ?? (typeof json?.error === "string" ? json.error : json?.error?.message);
|
|
5026
|
+
const message = typeof rawMsg === "string" ? rawMsg : `File operation failed: ${res.status} ${res.statusText}`;
|
|
5027
|
+
const code = json?.errorString ?? json?.code ?? "file_error";
|
|
5028
|
+
throw new MindStudioError(message, code, res.status);
|
|
5029
|
+
}
|
|
5030
|
+
return json;
|
|
5031
|
+
}
|
|
4812
5032
|
/**
|
|
4813
5033
|
* @internal Execute a batch of SQL queries against a managed database.
|
|
4814
5034
|
* Used as the `executeBatch` callback for Table/Query instances.
|
|
@@ -5475,6 +5695,16 @@ var db = new Proxy(
|
|
|
5475
5695
|
}
|
|
5476
5696
|
}
|
|
5477
5697
|
);
|
|
5698
|
+
var files = new Proxy(
|
|
5699
|
+
{},
|
|
5700
|
+
{
|
|
5701
|
+
get(_, prop) {
|
|
5702
|
+
const target = mindstudio.files;
|
|
5703
|
+
const value = Reflect.get(target, prop, target);
|
|
5704
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
5705
|
+
}
|
|
5706
|
+
}
|
|
5707
|
+
);
|
|
5478
5708
|
var stream = (data) => mindstudio.stream(data);
|
|
5479
5709
|
var resolveUser = (userId) => mindstudio.resolveUser(userId);
|
|
5480
5710
|
var reportIssue = (input) => mindstudio.reportIssue(input);
|
|
@@ -5490,6 +5720,7 @@ export {
|
|
|
5490
5720
|
blockTypeAliases,
|
|
5491
5721
|
db,
|
|
5492
5722
|
index_default as default,
|
|
5723
|
+
files,
|
|
5493
5724
|
getRequestContext,
|
|
5494
5725
|
mindstudio,
|
|
5495
5726
|
monacoSnippets,
|