@madewithremy/admin 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -808,7 +808,7 @@ interface CrashesStatsParams {
808
808
  * @example
809
809
  * const { errors } = await admin.crashes.list({ sort: 'frequent', limit: 10 });
810
810
  */
811
- declare function list$9(ctx: AdminContext, params?: CrashesListParams): Promise<CrashesListResult>;
811
+ declare function list$a(ctx: AdminContext, params?: CrashesListParams): Promise<CrashesListResult>;
812
812
  /**
813
813
  * Individual crash events for one fingerprint, cursor-paginated.
814
814
  *
@@ -829,7 +829,7 @@ declare function occurrences(ctx: AdminContext, fingerprint: string, params?: Cr
829
829
  * @example
830
830
  * const event = await admin.crashes.get('evt_xyz789');
831
831
  */
832
- declare function get$6(ctx: AdminContext, eventId: string): Promise<CrashesGetResult>;
832
+ declare function get$8(ctx: AdminContext, eventId: string): Promise<CrashesGetResult>;
833
833
  /**
834
834
  * Bucketed time series of total crash occurrence volume for the app.
835
835
  *
@@ -847,7 +847,7 @@ type crashes_CrashesStatsParams = CrashesStatsParams;
847
847
  declare const crashes_occurrences: typeof occurrences;
848
848
  declare const crashes_stats: typeof stats;
849
849
  declare namespace crashes {
850
- export { type crashes_CrashesListParams as CrashesListParams, type crashes_CrashesOccurrencesParams as CrashesOccurrencesParams, type crashes_CrashesStatsParams as CrashesStatsParams, get$6 as get, list$9 as list, crashes_occurrences as occurrences, crashes_stats as stats };
850
+ export { type crashes_CrashesListParams as CrashesListParams, type crashes_CrashesOccurrencesParams as CrashesOccurrencesParams, type crashes_CrashesStatsParams as CrashesStatsParams, get$8 as get, list$a as list, crashes_occurrences as occurrences, crashes_stats as stats };
851
851
  }
852
852
 
853
853
  /**
@@ -942,7 +942,7 @@ interface CronListParams {
942
942
  * const { jobs } = await admin.cron.list({ runs: 50 });
943
943
  * const blocked = jobs.filter((j) => j.status === 'blocked');
944
944
  */
945
- declare function list$8(ctx: AdminContext, params?: CronListParams): Promise<CronOverviewResult>;
945
+ declare function list$9(ctx: AdminContext, params?: CronListParams): Promise<CronOverviewResult>;
946
946
  /**
947
947
  * Trigger a job now (does not affect its schedule).
948
948
  *
@@ -957,12 +957,11 @@ declare function list$8(ctx: AdminContext, params?: CronListParams): Promise<Cro
957
957
  * @example
958
958
  * const { requestId } = await admin.cron.run('dailyDigest');
959
959
  */
960
- declare function run(ctx: AdminContext, route: string): Promise<CronRunResult>;
960
+ declare function run$1(ctx: AdminContext, route: string): Promise<CronRunResult>;
961
961
 
962
962
  type cron_CronListParams = CronListParams;
963
- declare const cron_run: typeof run;
964
963
  declare namespace cron {
965
- export { type cron_CronListParams as CronListParams, list$8 as list, cron_run as run };
964
+ export { type cron_CronListParams as CronListParams, list$9 as list, run$1 as run };
966
965
  }
967
966
 
968
967
  /**
@@ -1060,6 +1059,629 @@ declare namespace data {
1060
1059
  export { type data_LiftFromLiveParams as LiftFromLiveParams, data_liftFromDev as liftFromDev, data_liftFromLive as liftFromLive };
1061
1060
  }
1062
1061
 
1062
+ /**
1063
+ * Response types for bulk ingestion jobs.
1064
+ *
1065
+ * Transcribed from youai-api:
1066
+ * src/http/routes/V2Apps/manage/dataSourceJobs.ts (jobView)
1067
+ * src/common/DataSources/jobs/types.ts
1068
+ */
1069
+ /**
1070
+ * Where a job's documents come from. `store` is every object under a prefix of
1071
+ * one of the app's file stores (what `files put` fills); `manifest` is a JSONL
1072
+ * object the CLI uploaded, one `{ url, filename?, externalId?, metadata? }` per
1073
+ * line, for documents that live behind URLs; `connector` is a sync of the S3
1074
+ * bucket the source is connected to (`datasources sync`); `remap` runs the
1075
+ * live mapper over the source's own raw copies (`datasources remap`); `replay`
1076
+ * runs an earlier job's quarantined objects through the current mapper
1077
+ * (`datasources jobs replay`).
1078
+ */
1079
+ type DataSourceJobSource = {
1080
+ type: 'store';
1081
+ store: string;
1082
+ access: 'private' | 'public';
1083
+ prefix: string;
1084
+ } | {
1085
+ type: 'manifest';
1086
+ key: string;
1087
+ } | {
1088
+ type: 'connector';
1089
+ connectorId: string;
1090
+ } | {
1091
+ /** A random draw of another source's documents (`datasources sample`). */
1092
+ type: 'sample';
1093
+ fromDataSourceId: string;
1094
+ size: number;
1095
+ filter: Record<string, unknown> | null;
1096
+ stratify: string | null;
1097
+ } | {
1098
+ type: 'remap';
1099
+ } | {
1100
+ type: 'replay';
1101
+ fromJobId: string;
1102
+ kind: 'skip' | 'error' | null;
1103
+ };
1104
+ /**
1105
+ * planning → planned → running ⇄ paused → done | failed | cancelled.
1106
+ * `planned` waits for `approve` (or was started with `approve: true` and a
1107
+ * gate refused; the job's `error` says which).
1108
+ */
1109
+ type DataSourceJobState = 'planning' | 'planned' | 'running' | 'paused' | 'done' | 'failed' | 'cancelled';
1110
+ /**
1111
+ * What the corpus would cost before any of it is spent. Every number is an
1112
+ * extrapolation from a sample of about a hundred objects; credits are ledger
1113
+ * credits (nano-dollars) at today's catalog rates.
1114
+ */
1115
+ interface DataSourceJobPlan {
1116
+ objects: number;
1117
+ bytes: number;
1118
+ sample: {
1119
+ documents: number;
1120
+ failed: number;
1121
+ avgChunks: number;
1122
+ avgTokens: number;
1123
+ avgPages: number;
1124
+ modelExtractionShare: number;
1125
+ secondsPerDocument: number;
1126
+ };
1127
+ /**
1128
+ * Mapped sources only: what the mapper did with the sampled objects. The
1129
+ * skip share is the baseline the run's skip gate pauses against.
1130
+ */
1131
+ mapping: {
1132
+ objects: number;
1133
+ documentsPerObject: number;
1134
+ passthroughShare: number;
1135
+ skipShare: number;
1136
+ errorShare: number;
1137
+ deleteShare: number;
1138
+ secondsPerObject: number;
1139
+ } | null;
1140
+ projected: {
1141
+ documents: number;
1142
+ chunks: number;
1143
+ tokens: number;
1144
+ points: number;
1145
+ artifactBytes: number;
1146
+ credits: {
1147
+ embedding: number;
1148
+ extraction: number;
1149
+ contextual: number;
1150
+ total: number;
1151
+ };
1152
+ };
1153
+ capacity: {
1154
+ placement: 'shared' | 'dedicated';
1155
+ resourceId: string | null;
1156
+ maxPoints: number;
1157
+ heldPoints: number;
1158
+ /** False means approve is refused until the source moves or the resource grows. */
1159
+ fits: boolean;
1160
+ };
1161
+ durationMinutes: number;
1162
+ warnings: string[];
1163
+ computedAt: string;
1164
+ }
1165
+ interface DataSourceJob {
1166
+ id: string;
1167
+ dataSourceId: string;
1168
+ pipelineId: string;
1169
+ source: DataSourceJobSource;
1170
+ /**
1171
+ * Objects the mapper skipped or failed on. Counted on `jobs status`; on the
1172
+ * list and on unmapped sources' jobs both are zero.
1173
+ */
1174
+ quarantine: {
1175
+ skipped: number;
1176
+ errors: number;
1177
+ };
1178
+ state: DataSourceJobState;
1179
+ autoApprove: boolean;
1180
+ plan: DataSourceJobPlan | null;
1181
+ budgetCredits: number | null;
1182
+ budgetDollars: number | null;
1183
+ maxInflightBatches: number;
1184
+ limitObjects: number | null;
1185
+ enumerationDone: boolean;
1186
+ counts: {
1187
+ objectsSeen: number;
1188
+ bytesSeen: number;
1189
+ objectsDispatched: number;
1190
+ documentsDone: number;
1191
+ documentsSkipped: number;
1192
+ documentsFailed: number;
1193
+ chunks: number;
1194
+ embedTokens: number;
1195
+ extractionPages: number;
1196
+ };
1197
+ /** Model spend so far at catalog rates — an estimate, not the ledger. */
1198
+ estimatedCredits: number;
1199
+ estimatedDollars: number;
1200
+ /** Recent per-document failures, newest first, at most twenty. */
1201
+ samples: {
1202
+ ref: string;
1203
+ message: string;
1204
+ at: string;
1205
+ }[];
1206
+ error: string | null;
1207
+ /**
1208
+ * Why a running job stopped: the owner, the budget, repeated batch
1209
+ * failures, or (mapped sources) a skip share far above the plan's.
1210
+ */
1211
+ pauseReason: 'user' | 'budget' | 'errors' | 'skips' | null;
1212
+ stalled: boolean;
1213
+ createdAt: string;
1214
+ startedAt: string | null;
1215
+ finishedAt: string | null;
1216
+ lastProgressAt: string | null;
1217
+ }
1218
+ /** GET /datasources/jobs */
1219
+ interface DataSourceJobsListResult {
1220
+ jobs: DataSourceJob[];
1221
+ }
1222
+ /** GET /datasources/jobs/:id */
1223
+ interface DataSourceJobGetResult {
1224
+ job: DataSourceJob;
1225
+ dataSource: {
1226
+ id: string;
1227
+ slug: string;
1228
+ };
1229
+ batches: Record<'pending' | 'queued' | 'running' | 'done' | 'failed' | 'cancelled', number>;
1230
+ }
1231
+ /** POST /datasources/jobs and the four controls */
1232
+ interface DataSourceJobResult {
1233
+ job: DataSourceJob;
1234
+ }
1235
+ /** POST /datasources/jobs/manifest-token */
1236
+ interface DataSourceJobManifestTokenResult {
1237
+ key: string;
1238
+ upload: {
1239
+ key: string;
1240
+ uploadUrl: string;
1241
+ uploadFields: Record<string, string>;
1242
+ };
1243
+ }
1244
+
1245
+ /**
1246
+ * Response types for S3 connectors on data sources.
1247
+ *
1248
+ * Transcribed from youai-api:
1249
+ * src/http/routes/V2Apps/manage/dataSourceConnectors.ts (connectorView)
1250
+ * src/common/Db/v2Apps/V2DataSourceConnectorsDao.ts
1251
+ */
1252
+
1253
+ /**
1254
+ * What to do when a key disappears from the bucket. `mirror`: its document is
1255
+ * removed at the end of the next full sync. `keep`: the document stays.
1256
+ */
1257
+ type DataSourceConnectorDeletions = 'mirror' | 'keep';
1258
+ interface DataSourceConnectorPolicy {
1259
+ deletions: DataSourceConnectorDeletions;
1260
+ /** Ceiling a sync auto-approves under; null = the plan's own 1.5× headroom. */
1261
+ budgetDollarsPerSync: number | null;
1262
+ }
1263
+ /** App-secret NAMES that hold the keys. Values never leave the platform. */
1264
+ interface DataSourceConnectorCredentials {
1265
+ accessKeyIdSecret: string;
1266
+ secretAccessKeySecret: string;
1267
+ }
1268
+ interface DataSourceConnector {
1269
+ id: string;
1270
+ type: 's3';
1271
+ bucket: string;
1272
+ region: string;
1273
+ /** Key prefix listed under; '' for the whole bucket. */
1274
+ prefix: string;
1275
+ /** S3-compatible endpoint, or null for AWS. */
1276
+ endpoint: string | null;
1277
+ credentials: DataSourceConnectorCredentials;
1278
+ policy: DataSourceConnectorPolicy;
1279
+ lastSyncJobId: string | null;
1280
+ lastSyncedAt: string | null;
1281
+ lastError: string | null;
1282
+ /** Only on GET: how many customer keys the index tracks. */
1283
+ objects?: {
1284
+ live: number;
1285
+ deleted: number;
1286
+ };
1287
+ createdAt: string;
1288
+ updatedAt: string;
1289
+ }
1290
+ /** POST /datasources/connector, POST /datasources/connector/remove */
1291
+ interface DataSourceConnectorResult {
1292
+ connector: DataSourceConnector;
1293
+ }
1294
+ /** GET /datasources/connector?slug= */
1295
+ interface DataSourceConnectorGetResult {
1296
+ connector: DataSourceConnector | null;
1297
+ }
1298
+ /** POST /datasources/sync */
1299
+ interface DataSourceSyncResult {
1300
+ job: DataSourceJob;
1301
+ }
1302
+
1303
+ /**
1304
+ * Response types for warming, sampling and retrieval evals.
1305
+ *
1306
+ * Transcribed from youai-api:
1307
+ * src/http/routes/V2Apps/manage/dataSourceEvals.ts (setView, runView)
1308
+ * src/common/DataSources/evals/types.ts
1309
+ */
1310
+
1311
+ /** An index reload in flight after an eviction, or its last failure. */
1312
+ interface DataSourcesHydration {
1313
+ copied: number;
1314
+ total: number;
1315
+ startedAt: string;
1316
+ error: string | null;
1317
+ }
1318
+ /** POST /datasources/hydrate */
1319
+ interface DataSourcesHydrateResult {
1320
+ /** True when the points were already there and nothing was started. */
1321
+ resident: boolean;
1322
+ hydration: DataSourcesHydration | null;
1323
+ }
1324
+ /** POST /datasources/sample */
1325
+ interface DataSourcesSampleResult {
1326
+ dataSource: {
1327
+ id: string;
1328
+ slug: string;
1329
+ sampleOf: string;
1330
+ pipelineVersion: number;
1331
+ };
1332
+ job: DataSourceJob;
1333
+ }
1334
+ /** `queued` until a worker claims the generation; hand-written sets start `ready`. */
1335
+ type EvalSetState = 'queued' | 'generating' | 'ready' | 'failed';
1336
+ type EvalQueryStyle = 'cloze' | 'question';
1337
+ interface EvalSet {
1338
+ id: string;
1339
+ dataSourceId: string;
1340
+ name: string;
1341
+ description: string | null;
1342
+ state: EvalSetState;
1343
+ generation: {
1344
+ style: EvalQueryStyle;
1345
+ size: number;
1346
+ modelId: string | null;
1347
+ seed: number;
1348
+ tags: string[];
1349
+ } | null;
1350
+ queryCount: number;
1351
+ /** Model spend generating questions (estimate); zero for cloze. */
1352
+ estimatedCredits: number;
1353
+ estimatedDollars: number;
1354
+ error: string | null;
1355
+ createdAt: string;
1356
+ updatedAt: string;
1357
+ }
1358
+ /** What should come back for a query; the content hash is what crosses sources. */
1359
+ interface EvalExpectation {
1360
+ contentHash: string;
1361
+ documentId: string;
1362
+ chunkIndex: number | null;
1363
+ filename: string | null;
1364
+ }
1365
+ interface EvalQuery {
1366
+ id: string;
1367
+ setId: string;
1368
+ query: string;
1369
+ expected: EvalExpectation[];
1370
+ passage: string | null;
1371
+ tags: string[];
1372
+ origin: 'generated' | 'user';
1373
+ createdAt: string;
1374
+ }
1375
+ /** Partial retrieval config plus mode, merged over the target's own. */
1376
+ interface EvalRetrieval {
1377
+ mode?: 'hybrid' | 'semantic' | 'lexical';
1378
+ hybrid?: boolean;
1379
+ rerank?: {
1380
+ enabled?: boolean;
1381
+ modelId?: string | null;
1382
+ candidates?: number;
1383
+ };
1384
+ adaptive?: {
1385
+ enabled?: boolean;
1386
+ gap?: number;
1387
+ };
1388
+ topK?: number;
1389
+ }
1390
+ type EvalRunState = 'queued' | 'running' | 'done' | 'failed';
1391
+ interface EvalAggregates {
1392
+ queries: number;
1393
+ scored: number;
1394
+ unresolvable: number;
1395
+ errors: number;
1396
+ recall: {
1397
+ at1: number;
1398
+ at5: number;
1399
+ at10: number;
1400
+ };
1401
+ chunkRecall: {
1402
+ at5: number;
1403
+ at10: number;
1404
+ queries: number;
1405
+ } | null;
1406
+ mrr: number;
1407
+ ndcg10: number;
1408
+ latency: {
1409
+ p50: number;
1410
+ p95: number;
1411
+ mean: number;
1412
+ };
1413
+ estimatedCredits: number;
1414
+ estimatedCreditsPerQuery: number;
1415
+ rerankedShare: number;
1416
+ /** Which branch found the expected document, over hits in the top 10. */
1417
+ branches: {
1418
+ denseOnly: number;
1419
+ lexicalOnly: number;
1420
+ both: number;
1421
+ unexplained: number;
1422
+ };
1423
+ byTag: Record<string, {
1424
+ queries: number;
1425
+ recallAt5: number;
1426
+ mrr: number;
1427
+ }>;
1428
+ truncatedTo: number | null;
1429
+ computedAt: string;
1430
+ }
1431
+ interface EvalRun {
1432
+ id: string;
1433
+ setId: string;
1434
+ dataSourceId: string;
1435
+ pipelineVersion: number;
1436
+ label: string | null;
1437
+ retrieval: EvalRetrieval;
1438
+ state: EvalRunState;
1439
+ completed: number;
1440
+ total: number;
1441
+ aggregates: EvalAggregates | null;
1442
+ estimatedCredits: number;
1443
+ estimatedDollars: number;
1444
+ error: string | null;
1445
+ createdAt: string;
1446
+ startedAt: string | null;
1447
+ finishedAt: string | null;
1448
+ }
1449
+ /** One row of a run's dataset. */
1450
+ interface EvalQueryResult {
1451
+ queryId: string;
1452
+ query: string;
1453
+ tags: string[];
1454
+ resolvable: boolean;
1455
+ documentRank: number | null;
1456
+ chunkRank: number | null;
1457
+ matchedVia: 'dense' | 'lexical' | 'both' | null;
1458
+ retrieved: {
1459
+ documentId: string;
1460
+ contentHash: string | null;
1461
+ chunkIndex: number | null;
1462
+ score: number;
1463
+ retrievalRank: number | null;
1464
+ matchedVia: 'dense' | 'lexical' | 'both' | null;
1465
+ }[];
1466
+ reranked: boolean;
1467
+ latencyMs: number;
1468
+ estimatedCredits: number;
1469
+ error: string | null;
1470
+ }
1471
+ interface EvalSetResult {
1472
+ set: EvalSet;
1473
+ }
1474
+ interface EvalSetsListResult {
1475
+ sets: EvalSet[];
1476
+ }
1477
+ interface EvalSetGetResult {
1478
+ set: EvalSet;
1479
+ dataSource: {
1480
+ id: string;
1481
+ slug: string;
1482
+ } | null;
1483
+ queries?: EvalQuery[];
1484
+ }
1485
+ interface EvalQueriesAddResult {
1486
+ added: number;
1487
+ queryCount: number;
1488
+ }
1489
+ interface EvalQueriesListResult {
1490
+ queries: EvalQuery[];
1491
+ }
1492
+ interface EvalRunResult {
1493
+ run: EvalRun;
1494
+ queries?: EvalQueryResult[];
1495
+ }
1496
+ interface EvalRunsListResult {
1497
+ runs: EvalRun[];
1498
+ }
1499
+ interface EvalCompareResult {
1500
+ a: EvalRun;
1501
+ b: EvalRun;
1502
+ /** Aggregate deltas, b minus a, for every numeric field. */
1503
+ delta: Record<string, unknown>;
1504
+ /** Per-query movement when both runs share a set; null otherwise. */
1505
+ queries: {
1506
+ wins: {
1507
+ queryId: string;
1508
+ query: string;
1509
+ rankA: number | null;
1510
+ rankB: number | null;
1511
+ }[];
1512
+ losses: {
1513
+ queryId: string;
1514
+ query: string;
1515
+ rankA: number | null;
1516
+ rankB: number | null;
1517
+ }[];
1518
+ unchanged: number;
1519
+ } | null;
1520
+ }
1521
+
1522
+ /**
1523
+ * Response types for data-source mappers: inspecting raw objects, testing a
1524
+ * mapper, remapping, and a job's quarantine.
1525
+ *
1526
+ * Transcribed from youai-api:
1527
+ * src/http/routes/V2Apps/manage/dataSourceMappers.ts
1528
+ * src/common/DataSources/mapping.ts (mapperView, buildInspectReport)
1529
+ */
1530
+
1531
+ /** The mapper a source runs: the file it was compiled from and its version. */
1532
+ interface DataSourceMapper {
1533
+ path: string;
1534
+ /** The compiled bundle key, or `dev:<sessionId>` for a tunnel run; stamped on the documents it produces. */
1535
+ mapperKey: string;
1536
+ timeoutMs: number;
1537
+ }
1538
+ /** Which objects an inspect or map test looked at. */
1539
+ type DataSourceObjectSelection = {
1540
+ kind: 'store';
1541
+ store: string;
1542
+ access: 'private' | 'public';
1543
+ prefix: string;
1544
+ } | {
1545
+ kind: 'connector';
1546
+ };
1547
+ interface DataSourceInspectReport {
1548
+ objects: number;
1549
+ bytes: number;
1550
+ /** True when the listing stopped at the limit. */
1551
+ truncated: boolean;
1552
+ byExtension: {
1553
+ extension: string;
1554
+ count: number;
1555
+ bytes: number;
1556
+ }[];
1557
+ /** Keys grouped by shape, digit runs and ids collapsed: `2024/#/{uuid}.json`. */
1558
+ clusters: {
1559
+ pattern: string;
1560
+ extension: string;
1561
+ count: number;
1562
+ bytes: number;
1563
+ examples: string[];
1564
+ }[];
1565
+ sizeBuckets: {
1566
+ label: string;
1567
+ count: number;
1568
+ }[];
1569
+ /** Up to ten objects read (first 256 KB each). */
1570
+ samples: {
1571
+ key: string;
1572
+ size: number | null;
1573
+ contentType: string | null;
1574
+ encoding: 'utf-8' | 'binary';
1575
+ empty: boolean;
1576
+ /** Top-level keys when the head parsed as a JSON object. */
1577
+ jsonKeys: string[] | null;
1578
+ /** Line count for text that was not one JSON object (JSONL, CSV, ...). */
1579
+ lines: number | null;
1580
+ textLength: number;
1581
+ head: string;
1582
+ }[];
1583
+ /** Distinct top-level JSON key sets across the samples, most common first. */
1584
+ jsonSignatures: {
1585
+ keys: string[];
1586
+ count: number;
1587
+ }[];
1588
+ }
1589
+ /** POST /datasources/inspect */
1590
+ interface DataSourceInspectResult {
1591
+ selection: DataSourceObjectSelection;
1592
+ report: DataSourceInspectReport;
1593
+ }
1594
+ /** One mapped document as a map test previews it (markdown truncated). */
1595
+ interface DataSourceMapTestDocument {
1596
+ externalId: string;
1597
+ title: string;
1598
+ metadata: Record<string, string | number | boolean> | null;
1599
+ replaces: string[];
1600
+ markdownBytes: number;
1601
+ preview: string;
1602
+ }
1603
+ type DataSourceMapTestOutcome = {
1604
+ kind: 'documents';
1605
+ documents: DataSourceMapTestDocument[];
1606
+ } | {
1607
+ kind: 'passthrough';
1608
+ metadata: Record<string, string | number | boolean> | null;
1609
+ } | {
1610
+ kind: 'skip';
1611
+ reason: string;
1612
+ } | {
1613
+ kind: 'deletes';
1614
+ externalIds: string[];
1615
+ } | {
1616
+ kind: 'error';
1617
+ message: string;
1618
+ stack?: string;
1619
+ };
1620
+ /** POST /datasources/map-test */
1621
+ interface DataSourceMapTestResult {
1622
+ mapper: DataSourceMapper;
1623
+ /** The mapper ran from local source through the dev session. */
1624
+ dev: boolean;
1625
+ objects: number;
1626
+ /** Documents produced across every `documents` outcome. */
1627
+ produced: number;
1628
+ counts: {
1629
+ documents: number;
1630
+ passthrough: number;
1631
+ skip: number;
1632
+ deletes: number;
1633
+ error: number;
1634
+ };
1635
+ results: {
1636
+ key: string;
1637
+ outcome: DataSourceMapTestOutcome;
1638
+ durationMs: number;
1639
+ }[];
1640
+ }
1641
+ /** POST /datasources/remap, POST /datasources/jobs/:id/replay */
1642
+ interface DataSourceRemapResult {
1643
+ job: DataSourceJob;
1644
+ mapper: DataSourceMapper;
1645
+ dataSource: {
1646
+ id: string;
1647
+ slug: string;
1648
+ };
1649
+ }
1650
+ /** One object a job's mapper did not turn into documents. */
1651
+ interface DataSourceQuarantinedObject {
1652
+ id: string;
1653
+ /** The key or URL the object was known by. */
1654
+ ref: string;
1655
+ kind: 'skip' | 'error';
1656
+ reason: string;
1657
+ /** False when the object's raw copy never landed — a replay cannot reach it. */
1658
+ replayable: boolean;
1659
+ at: string;
1660
+ }
1661
+ /** GET /datasources/jobs/:id/quarantine */
1662
+ interface DataSourceQuarantineResult {
1663
+ job: {
1664
+ id: string;
1665
+ state: string;
1666
+ };
1667
+ dataSource: {
1668
+ id: string;
1669
+ slug: string;
1670
+ };
1671
+ counts: {
1672
+ skipped: number;
1673
+ errors: number;
1674
+ };
1675
+ /** Reasons by frequency, most common first. */
1676
+ reasons: {
1677
+ kind: 'skip' | 'error';
1678
+ reason: string;
1679
+ count: number;
1680
+ }[];
1681
+ objects: DataSourceQuarantinedObject[];
1682
+ nextCursor: string | null;
1683
+ }
1684
+
1063
1685
  /**
1064
1686
  * Response types for the data-sources management API.
1065
1687
  *
@@ -1071,6 +1693,7 @@ declare namespace data {
1071
1693
  *
1072
1694
  * 204/empty responses surface as `{ ok: true; status: number }` (readBody in api.ts).
1073
1695
  */
1696
+
1074
1697
  /**
1075
1698
  * Chunking settings pinned at pipeline creation.
1076
1699
  * Any change requires a revectorize, not a config update.
@@ -1241,6 +1864,8 @@ interface DataSourcesDocumentsResult {
1241
1864
  type DataSourcesUploadTokenResult = {
1242
1865
  alreadyCurrent: true;
1243
1866
  document: DataSourcesDocument;
1867
+ /** Mapped sources: every document this mapper version produced from the bytes. */
1868
+ documents?: DataSourcesDocument[];
1244
1869
  } | {
1245
1870
  alreadyCurrent: false;
1246
1871
  contentType: string;
@@ -1250,10 +1875,20 @@ type DataSourcesUploadTokenResult = {
1250
1875
  uploadFields: Record<string, string>;
1251
1876
  };
1252
1877
  };
1253
- /** POST /datasources/documents — confirm an uploaded document and queue a build. */
1878
+ /**
1879
+ * POST /datasources/documents — confirm an uploaded object and queue its
1880
+ * builds. On a mapped source the object is a raw copy and the mapper decides
1881
+ * what it becomes: `documents` holds everything produced, `document` the first
1882
+ * of them (null only for a `deletes` outcome).
1883
+ */
1254
1884
  interface DataSourcesDocumentConfirmResult {
1255
- document: DataSourcesDocument;
1885
+ document: DataSourcesDocument | null;
1886
+ documents: DataSourcesDocument[];
1887
+ /** Whether any document was queued for a build. */
1256
1888
  queued: boolean;
1889
+ outcome: 'unmapped' | 'documents' | 'passthrough' | 'deletes';
1890
+ /** Documents removed or superseded as a result. */
1891
+ removed: number;
1257
1892
  }
1258
1893
  /** Build progress counts used in several list and status shapes. */
1259
1894
  interface DataSourcesBuildProgress {
@@ -1317,6 +1952,16 @@ interface DataSourcesListEntry {
1317
1952
  placement: DataSourcesPlacement | null;
1318
1953
  /** A move in flight, or its last failure. */
1319
1954
  migration: DataSourcesMigration | null;
1955
+ /** The bulk ingestion job in flight on this source, if any. */
1956
+ job: DataSourceJob | null;
1957
+ /** The S3 bucket this source follows, if it is connected to one. */
1958
+ connector: DataSourceConnector | null;
1959
+ /** An index reload in flight after an eviction, or its last failure. */
1960
+ hydration: DataSourcesHydration | null;
1961
+ /** The source this one was sampled from (`datasources sample`), or null. */
1962
+ sampleOf: string | null;
1963
+ /** The mapper the live release declares for this source, or null. */
1964
+ mapper: DataSourceMapper | null;
1320
1965
  createdAt: string;
1321
1966
  }
1322
1967
  /** GET /datasources — all data sources for the app. */
@@ -1478,6 +2123,27 @@ interface DataSourcesDocumentDeleteResult {
1478
2123
  ok: true;
1479
2124
  status: number;
1480
2125
  }
2126
+ /**
2127
+ * Which documents a bulk removal selects: the row-level half of the search
2128
+ * filter (`metadata`, `filename`, `documentIds`) plus `externalIdPrefix`, the
2129
+ * identity a bulk job or connector recorded (a customer's key prefix, say).
2130
+ * Chunk-level fields and an empty selector are refused.
2131
+ */
2132
+ interface DataSourcesDocumentSelector {
2133
+ metadata?: Record<string, string | number | boolean | (string | number | boolean)[] | {
2134
+ gte?: number;
2135
+ lte?: number;
2136
+ }>;
2137
+ filename?: string | string[];
2138
+ documentIds?: string[];
2139
+ externalIdPrefix?: string;
2140
+ }
2141
+ /** POST /datasources/documents/delete-many — one page of up to 1,000. */
2142
+ interface DataSourcesDocumentDeleteManyResult {
2143
+ deleted: number;
2144
+ /** Still matching after this page; call again while > 0. */
2145
+ remaining: number;
2146
+ }
1481
2147
 
1482
2148
  /**
1483
2149
  * Data-sources operations: document ingestion, corpus search, pipeline
@@ -1490,7 +2156,7 @@ interface DataSourcesDocumentDeleteResult {
1490
2156
  */
1491
2157
 
1492
2158
  /** @internal Consumed by the CLI skin; waitForIngest documents the default. */
1493
- declare const DEFAULT_WAIT_TIMEOUT_MS$1: number;
2159
+ declare const DEFAULT_WAIT_TIMEOUT_MS$3: number;
1494
2160
  /**
1495
2161
  * The per-document summary projection used by waitForIngest, status, and the
1496
2162
  * revectorize watch loop in the skin. Exported so the skin can reuse it for
@@ -1528,7 +2194,15 @@ interface AddDocumentResult {
1528
2194
  filename: string;
1529
2195
  skipped: boolean;
1530
2196
  queued?: boolean;
1531
- document: DataSourcesDocument;
2197
+ /**
2198
+ * The document, or the first of them on a mapped source. Null only when the
2199
+ * source's mapper answered `deletes` for the file.
2200
+ */
2201
+ document: DataSourcesDocument | null;
2202
+ /** Every document the file became — one on an unmapped source. */
2203
+ documents: DataSourcesDocument[];
2204
+ /** How the source took the file; absent when it was already current. */
2205
+ outcome?: 'unmapped' | 'documents' | 'passthrough' | 'deletes';
1532
2206
  }
1533
2207
  /**
1534
2208
  * Add one document to a data source.
@@ -1587,6 +2261,24 @@ interface WaitForIngestResult {
1587
2261
  * if (result.status === 'error') { ... }
1588
2262
  */
1589
2263
  declare function waitForIngest(ctx: AdminContext, params: WaitForIngestParams): Promise<WaitForIngestResult>;
2264
+ interface WaitForCandidateParams {
2265
+ slug: string;
2266
+ /** Defaults to DEFAULT_WAIT_TIMEOUT_MS (15 min). */
2267
+ timeoutMs?: number;
2268
+ /** Receives `rebuilding… X/Y done (Ns)`. */
2269
+ onProgress?: (message: string) => void;
2270
+ }
2271
+ interface WaitForCandidateResult {
2272
+ status: 'ready' | 'error' | 'timeout';
2273
+ documents: SummarizedDocument[];
2274
+ /** Present only on status === 'timeout'. */
2275
+ error?: string;
2276
+ }
2277
+ /**
2278
+ * Poll a candidate version (`revectorize`) until every document has built.
2279
+ * `error` means at least one failed; `promote` with `force` accepts that.
2280
+ */
2281
+ declare function waitForCandidate(ctx: AdminContext, params: WaitForCandidateParams): Promise<WaitForCandidateResult>;
1590
2282
  interface DocumentsParams {
1591
2283
  /** Data source slug. */
1592
2284
  slug: string;
@@ -1630,7 +2322,7 @@ declare function allDocuments(ctx: AdminContext, params: Omit<DocumentsParams, '
1630
2322
  * @example
1631
2323
  * const { dataSources } = await admin.dataSources.list();
1632
2324
  */
1633
- declare function list$7(ctx: AdminContext): Promise<DataSourcesListResult>;
2325
+ declare function list$8(ctx: AdminContext): Promise<DataSourcesListResult>;
1634
2326
  interface SearchParams {
1635
2327
  /** Data source slug. */
1636
2328
  slug: string;
@@ -1885,6 +2577,29 @@ interface RmParams {
1885
2577
  * await admin.dataSources.rm({ slug: 'policies', documentId });
1886
2578
  */
1887
2579
  declare function rm(ctx: AdminContext, params: RmParams): Promise<DataSourcesDocumentDeleteResult>;
2580
+ interface RmWhereParams {
2581
+ /** Data source slug. */
2582
+ slug: string;
2583
+ filter: DataSourcesDocumentSelector;
2584
+ }
2585
+ /**
2586
+ * Remove one page (up to 1,000) of the documents matching a selector, across
2587
+ * every pipeline version, and report how many still match. Loop while
2588
+ * `remaining > 0`; `rmWhereAll` does that.
2589
+ *
2590
+ * @throws AdminApiError `data_source_not_found` (404), `invalid_filter` (400),
2591
+ * `data_source_busy` (422) while a job is in flight, `data_source_migrating`
2592
+ * (422) during a move.
2593
+ * @example
2594
+ * await admin.dataSources.rmWhere({ slug: 'archive', filter: { metadata: { year: 2019 } } });
2595
+ */
2596
+ declare function rmWhere(ctx: AdminContext, params: RmWhereParams): Promise<DataSourcesDocumentDeleteManyResult>;
2597
+ /** `rmWhere` until nothing matches. Reports each page through `onProgress`. */
2598
+ declare function rmWhereAll(ctx: AdminContext, params: RmWhereParams & {
2599
+ onProgress?: (message: string) => void;
2600
+ }): Promise<{
2601
+ deleted: number;
2602
+ }>;
1888
2603
  /**
1889
2604
  * Delete a whole data source — every version, every document, and every byte.
1890
2605
  *
@@ -1909,8 +2624,11 @@ type dataSources_MoveParams = MoveParams;
1909
2624
  type dataSources_PromoteParams = PromoteParams;
1910
2625
  type dataSources_RevectorizeParams = RevectorizeParams;
1911
2626
  type dataSources_RmParams = RmParams;
2627
+ type dataSources_RmWhereParams = RmWhereParams;
1912
2628
  type dataSources_SearchParams = SearchParams;
1913
2629
  type dataSources_SummarizedDocument = SummarizedDocument;
2630
+ type dataSources_WaitForCandidateParams = WaitForCandidateParams;
2631
+ type dataSources_WaitForCandidateResult = WaitForCandidateResult;
1914
2632
  type dataSources_WaitForIngestParams = WaitForIngestParams;
1915
2633
  type dataSources_WaitForIngestResult = WaitForIngestResult;
1916
2634
  type dataSources_WaitForMoveParams = WaitForMoveParams;
@@ -1926,12 +2644,562 @@ declare const dataSources_move: typeof move;
1926
2644
  declare const dataSources_promote: typeof promote;
1927
2645
  declare const dataSources_revectorize: typeof revectorize;
1928
2646
  declare const dataSources_rm: typeof rm;
2647
+ declare const dataSources_rmWhere: typeof rmWhere;
2648
+ declare const dataSources_rmWhereAll: typeof rmWhereAll;
1929
2649
  declare const dataSources_search: typeof search;
1930
2650
  declare const dataSources_summarize: typeof summarize;
2651
+ declare const dataSources_waitForCandidate: typeof waitForCandidate;
1931
2652
  declare const dataSources_waitForIngest: typeof waitForIngest;
1932
2653
  declare const dataSources_waitForMove: typeof waitForMove;
1933
2654
  declare namespace dataSources {
1934
- export { type dataSources_AddDocumentParams as AddDocumentParams, type dataSources_AddDocumentResult as AddDocumentResult, type dataSources_ConfigSetParams as ConfigSetParams, type dataSources_CreateParams as CreateParams, DEFAULT_WAIT_TIMEOUT_MS$1 as DEFAULT_WAIT_TIMEOUT_MS, dataSources_DOCUMENTS_IDS_MAX as DOCUMENTS_IDS_MAX, type dataSources_DocumentsParams as DocumentsParams, type dataSources_DropParams as DropParams, type dataSources_MoveParams as MoveParams, type dataSources_PromoteParams as PromoteParams, type dataSources_RevectorizeParams as RevectorizeParams, type dataSources_RmParams as RmParams, type dataSources_SearchParams as SearchParams, type dataSources_SummarizedDocument as SummarizedDocument, type dataSources_WaitForIngestParams as WaitForIngestParams, type dataSources_WaitForIngestResult as WaitForIngestResult, type dataSources_WaitForMoveParams as WaitForMoveParams, type dataSources_WaitForMoveResult as WaitForMoveResult, dataSources_addDocument as addDocument, dataSources_allDocuments as allDocuments, dataSources_configGet as configGet, dataSources_configSet as configSet, create$1 as create, dataSources_deleteSource as deleteSource, dataSources_documents as documents, dataSources_drop as drop, list$7 as list, dataSources_move as move, dataSources_promote as promote, dataSources_revectorize as revectorize, dataSources_rm as rm, dataSources_search as search, dataSources_summarize as summarize, dataSources_waitForIngest as waitForIngest, dataSources_waitForMove as waitForMove };
2655
+ export { type dataSources_AddDocumentParams as AddDocumentParams, type dataSources_AddDocumentResult as AddDocumentResult, type dataSources_ConfigSetParams as ConfigSetParams, type dataSources_CreateParams as CreateParams, DEFAULT_WAIT_TIMEOUT_MS$3 as DEFAULT_WAIT_TIMEOUT_MS, dataSources_DOCUMENTS_IDS_MAX as DOCUMENTS_IDS_MAX, type dataSources_DocumentsParams as DocumentsParams, type dataSources_DropParams as DropParams, type dataSources_MoveParams as MoveParams, type dataSources_PromoteParams as PromoteParams, type dataSources_RevectorizeParams as RevectorizeParams, type dataSources_RmParams as RmParams, type dataSources_RmWhereParams as RmWhereParams, type dataSources_SearchParams as SearchParams, type dataSources_SummarizedDocument as SummarizedDocument, type dataSources_WaitForCandidateParams as WaitForCandidateParams, type dataSources_WaitForCandidateResult as WaitForCandidateResult, type dataSources_WaitForIngestParams as WaitForIngestParams, type dataSources_WaitForIngestResult as WaitForIngestResult, type dataSources_WaitForMoveParams as WaitForMoveParams, type dataSources_WaitForMoveResult as WaitForMoveResult, dataSources_addDocument as addDocument, dataSources_allDocuments as allDocuments, dataSources_configGet as configGet, dataSources_configSet as configSet, create$1 as create, dataSources_deleteSource as deleteSource, dataSources_documents as documents, dataSources_drop as drop, list$8 as list, dataSources_move as move, dataSources_promote as promote, dataSources_revectorize as revectorize, dataSources_rm as rm, dataSources_rmWhere as rmWhere, dataSources_rmWhereAll as rmWhereAll, dataSources_search as search, dataSources_summarize as summarize, dataSources_waitForCandidate as waitForCandidate, dataSources_waitForIngest as waitForIngest, dataSources_waitForMove as waitForMove };
2656
+ }
2657
+
2658
+ /**
2659
+ * Bulk ingestion jobs: load a corpus into a data source from a file-store
2660
+ * prefix or a manifest of URLs, with a plan (cost, size, duration) shown
2661
+ * before anything is spent.
2662
+ *
2663
+ * Ops are pure (ctx, params) → typed result. The CLI skin in
2664
+ * commands/dataSourceJobs.ts owns flags, progress printing and exit codes.
2665
+ */
2666
+
2667
+ /** @internal Consumed by the CLI skin. */
2668
+ declare const DEFAULT_WAIT_TIMEOUT_MS$2: number;
2669
+ interface StartParams {
2670
+ /** Data source slug. Created on first use, like `add`. */
2671
+ slug: string;
2672
+ source: DataSourceJobSource;
2673
+ /** Run as soon as the plan passes the gates, without a separate approve. */
2674
+ approve?: boolean;
2675
+ /** Stop when estimated spend reaches this; default 1.5× the projection. */
2676
+ budgetDollars?: number;
2677
+ /** Batches in flight at once (default 8, max 64). */
2678
+ concurrency?: number;
2679
+ /** Process only the first N objects — a sample of the corpus. */
2680
+ limit?: number;
2681
+ }
2682
+ /**
2683
+ * Start a job. The platform enumerates the source, reads a sample, and writes
2684
+ * a plan; the job then waits in `planned` for `approve` unless `approve` was
2685
+ * set. Nothing is embedded until it runs.
2686
+ *
2687
+ * @throws AdminApiError `data_source_busy` (422) — a move, a candidate
2688
+ * version or another job is in flight; `invalid_source` (400).
2689
+ * @example
2690
+ * const { job } = await admin.dataSourceJobs.start({
2691
+ * slug: 'archive',
2692
+ * source: { type: 'store', store: 'raw', access: 'private', prefix: '2024/' },
2693
+ * });
2694
+ */
2695
+ declare function start(ctx: AdminContext, params: StartParams): Promise<DataSourceJobResult>;
2696
+ interface UploadManifestParams {
2697
+ slug: string;
2698
+ /** JSONL: one `{ url, filename?, externalId?, metadata? }` per line. */
2699
+ content: Buffer;
2700
+ }
2701
+ /**
2702
+ * Upload a manifest for `start` with a `manifest` source. Returns the key to
2703
+ * pass as `source.key`.
2704
+ */
2705
+ declare function uploadManifest(ctx: AdminContext, params: UploadManifestParams): Promise<{
2706
+ key: string;
2707
+ }>;
2708
+ interface ListParams$1 {
2709
+ /** Only this source's jobs; omit for every job on the app. */
2710
+ slug?: string;
2711
+ }
2712
+ declare function list$7(ctx: AdminContext, params?: ListParams$1): Promise<DataSourceJobsListResult>;
2713
+ interface JobIdParams {
2714
+ id: string;
2715
+ }
2716
+ /** @throws AdminApiError `job_not_found` (404). */
2717
+ declare function get$7(ctx: AdminContext, params: JobIdParams): Promise<DataSourceJobGetResult>;
2718
+ /**
2719
+ * Approve a planned job: the yes to the plan's spend. Refused when the
2720
+ * projection does not fit the source's placement or the workspace cannot
2721
+ * cover it.
2722
+ *
2723
+ * @throws AdminApiError `job_not_found` (404), `invalid_transition` (422),
2724
+ * `plan_requires_dedicated` (422), `plan_exceeds_capacity` (422),
2725
+ * `insufficient_credits` (402).
2726
+ */
2727
+ declare function approve(ctx: AdminContext, params: JobIdParams): Promise<DataSourceJobResult>;
2728
+ /** Stop dispatching batches; the ones in flight finish. */
2729
+ declare function pause(ctx: AdminContext, params: JobIdParams): Promise<DataSourceJobResult>;
2730
+ /** Continue from the checkpoint; failed batches with attempts left are retried. */
2731
+ declare function resume$1(ctx: AdminContext, params: JobIdParams): Promise<DataSourceJobResult>;
2732
+ /** End the job. Documents already indexed stay. */
2733
+ declare function cancel(ctx: AdminContext, params: JobIdParams): Promise<DataSourceJobResult>;
2734
+ interface WaitParams$1 {
2735
+ id: string;
2736
+ /** Default one hour. */
2737
+ timeoutMs?: number;
2738
+ onProgress?: (message: string) => void;
2739
+ }
2740
+ type WaitResult = {
2741
+ status: 'done';
2742
+ job: DataSourceJob;
2743
+ }
2744
+ /** The plan is ready but the job will not run on its own: a gate refused, or it waits for approval. */
2745
+ | {
2746
+ status: 'planned';
2747
+ job: DataSourceJob;
2748
+ error: string;
2749
+ } | {
2750
+ status: 'failed';
2751
+ job: DataSourceJob;
2752
+ error: string;
2753
+ } | {
2754
+ status: 'timeout';
2755
+ job: DataSourceJob;
2756
+ error: string;
2757
+ };
2758
+ /**
2759
+ * Poll until the job leaves `planning`: the plan is ready (`done`), or a gate
2760
+ * refused it (`planned` with the job's error), or it could not be planned.
2761
+ */
2762
+ declare function waitForPlan(ctx: AdminContext, params: WaitParams$1): Promise<WaitResult>;
2763
+ /**
2764
+ * Poll until the job reaches a terminal state, pauses, or settles in `planned`
2765
+ * with nothing about to move it: a gate refused an auto-approved plan, or the
2766
+ * plan waits for an approval nobody asked this wait to give. A pause is
2767
+ * reported as `failed` with the pause reason, since nothing more will happen
2768
+ * without the owner.
2769
+ */
2770
+ declare function waitForJob(ctx: AdminContext, params: WaitParams$1): Promise<WaitResult>;
2771
+ /** One line of progress in the job's own terms. */
2772
+ declare function describeProgress(job: DataSourceJob, start: number): string;
2773
+
2774
+ type dataSourceJobs_JobIdParams = JobIdParams;
2775
+ type dataSourceJobs_StartParams = StartParams;
2776
+ type dataSourceJobs_UploadManifestParams = UploadManifestParams;
2777
+ type dataSourceJobs_WaitResult = WaitResult;
2778
+ declare const dataSourceJobs_approve: typeof approve;
2779
+ declare const dataSourceJobs_cancel: typeof cancel;
2780
+ declare const dataSourceJobs_describeProgress: typeof describeProgress;
2781
+ declare const dataSourceJobs_pause: typeof pause;
2782
+ declare const dataSourceJobs_start: typeof start;
2783
+ declare const dataSourceJobs_uploadManifest: typeof uploadManifest;
2784
+ declare const dataSourceJobs_waitForJob: typeof waitForJob;
2785
+ declare const dataSourceJobs_waitForPlan: typeof waitForPlan;
2786
+ declare namespace dataSourceJobs {
2787
+ export { DEFAULT_WAIT_TIMEOUT_MS$2 as DEFAULT_WAIT_TIMEOUT_MS, type dataSourceJobs_JobIdParams as JobIdParams, type ListParams$1 as ListParams, type dataSourceJobs_StartParams as StartParams, type dataSourceJobs_UploadManifestParams as UploadManifestParams, type WaitParams$1 as WaitParams, type dataSourceJobs_WaitResult as WaitResult, dataSourceJobs_approve as approve, dataSourceJobs_cancel as cancel, dataSourceJobs_describeProgress as describeProgress, get$7 as get, list$7 as list, dataSourceJobs_pause as pause, resume$1 as resume, dataSourceJobs_start as start, dataSourceJobs_uploadManifest as uploadManifest, dataSourceJobs_waitForJob as waitForJob, dataSourceJobs_waitForPlan as waitForPlan };
2788
+ }
2789
+
2790
+ /**
2791
+ * S3 connectors: make a bucket the customer owns the origin of a data source,
2792
+ * and keep the source in sync with it.
2793
+ *
2794
+ * Ops are pure (ctx, params) → typed result. The CLI skin in
2795
+ * commands/dataSourceConnectors.ts owns flags, progress and exit codes.
2796
+ */
2797
+
2798
+ interface ConnectParams {
2799
+ /** Data source slug. Created on first use, like `add`. */
2800
+ slug: string;
2801
+ bucket: string;
2802
+ /** AWS region of the bucket, e.g. `us-east-1`. */
2803
+ region: string;
2804
+ /** Key prefix to follow; omit for the whole bucket. */
2805
+ prefix?: string;
2806
+ /** S3-compatible endpoint (https; http for localhost). Omit for AWS. */
2807
+ endpoint?: string;
2808
+ /** NAME of the app secret holding the access key id. */
2809
+ accessKeyIdSecret: string;
2810
+ /** NAME of the app secret holding the secret access key. */
2811
+ secretAccessKeySecret: string;
2812
+ /** Default `mirror`. */
2813
+ deletions?: DataSourceConnectorDeletions;
2814
+ /** Ceiling a sync auto-approves under. */
2815
+ budgetDollarsPerSync?: number;
2816
+ }
2817
+ /**
2818
+ * Connect a source to a bucket. The two secrets must already exist on the app
2819
+ * (`secrets set`), and the keys must be able to list the prefix — both are
2820
+ * checked before anything is recorded. Calling again with the same bucket,
2821
+ * region, prefix and endpoint updates credentials and policy in place; a
2822
+ * different origin is refused until the source is disconnected.
2823
+ *
2824
+ * @throws AdminApiError `invalid_connector` (400), `connector_secret_missing`
2825
+ * (422), `connector_probe_failed` (422), `connector_exists` (422).
2826
+ * @example
2827
+ * await admin.dataSourceConnectors.connect({
2828
+ * slug: 'archive', bucket: 'acme-docs', region: 'us-east-1', prefix: 'contracts/',
2829
+ * accessKeyIdSecret: 'ARCHIVE_S3_KEY', secretAccessKeySecret: 'ARCHIVE_S3_SECRET',
2830
+ * });
2831
+ */
2832
+ declare function connect(ctx: AdminContext, params: ConnectParams): Promise<DataSourceConnectorResult>;
2833
+ /** The source's connector with its object counts, or `connector: null`. */
2834
+ declare function get$6(ctx: AdminContext, params: {
2835
+ slug: string;
2836
+ }): Promise<DataSourceConnectorGetResult>;
2837
+ /**
2838
+ * Stop following the bucket. The documents stay; only the connector and its
2839
+ * object index go.
2840
+ *
2841
+ * @throws AdminApiError `connector_not_found` (422), `data_source_busy` (422)
2842
+ * while a job is in flight.
2843
+ */
2844
+ declare function disconnect(ctx: AdminContext, params: {
2845
+ slug: string;
2846
+ }): Promise<DataSourceConnectorResult & {
2847
+ removed: true;
2848
+ }>;
2849
+ interface SyncParams {
2850
+ slug: string;
2851
+ /** Override the connector's per-sync budget for this run, in dollars. */
2852
+ budgetDollars?: number;
2853
+ }
2854
+ /**
2855
+ * Start a sync: list the bucket, diff by ETag, run a job over what changed.
2856
+ * Auto-approved under the connector's per-sync budget; a plan over it (or over
2857
+ * the placement's capacity) waits in `planned` for `dataSourceJobs.approve`.
2858
+ * Block on the result with `dataSourceJobs.waitForJob`.
2859
+ *
2860
+ * @throws AdminApiError `connector_not_found` (422), `data_source_busy` (422).
2861
+ */
2862
+ declare function sync(ctx: AdminContext, params: SyncParams): Promise<DataSourceSyncResult>;
2863
+
2864
+ type dataSourceConnectors_ConnectParams = ConnectParams;
2865
+ type dataSourceConnectors_SyncParams = SyncParams;
2866
+ declare const dataSourceConnectors_connect: typeof connect;
2867
+ declare const dataSourceConnectors_disconnect: typeof disconnect;
2868
+ declare const dataSourceConnectors_sync: typeof sync;
2869
+ declare namespace dataSourceConnectors {
2870
+ export { type dataSourceConnectors_ConnectParams as ConnectParams, type dataSourceConnectors_SyncParams as SyncParams, dataSourceConnectors_connect as connect, dataSourceConnectors_disconnect as disconnect, get$6 as get, dataSourceConnectors_sync as sync };
2871
+ }
2872
+
2873
+ /**
2874
+ * Warming an index, sampling a source, and retrieval evals: query sets, runs,
2875
+ * comparisons. Ops are pure (ctx, params) → typed result; the CLI skin in
2876
+ * commands/dataSourceEvals.ts owns flags, progress printing and exit codes.
2877
+ */
2878
+
2879
+ /** @internal Consumed by the CLI skin. */
2880
+ declare const DEFAULT_WAIT_TIMEOUT_MS$1: number;
2881
+ /**
2882
+ * Warm a source's index if it is cold. A search on a large cold index answers
2883
+ * `index_warming` until the reload lands; call this before a demo, or after an
2884
+ * eviction you know about. Answers `resident: true` when nothing was needed.
2885
+ */
2886
+ declare function hydrate(ctx: AdminContext, params: {
2887
+ slug: string;
2888
+ }): Promise<DataSourcesHydrateResult>;
2889
+ interface WaitForHydrationParams {
2890
+ slug: string;
2891
+ timeoutMs?: number;
2892
+ onProgress?: (message: string) => void;
2893
+ }
2894
+ type WaitForHydrationResult = {
2895
+ status: 'done';
2896
+ source: DataSourcesListEntry;
2897
+ } | {
2898
+ status: 'failed';
2899
+ source: DataSourcesListEntry;
2900
+ error: string;
2901
+ } | {
2902
+ status: 'timeout';
2903
+ source: DataSourcesListEntry;
2904
+ error: string;
2905
+ };
2906
+ /** Poll the source list until its `hydration` clears, fails, or the timeout elapses. */
2907
+ declare function waitForHydration(ctx: AdminContext, params: WaitForHydrationParams): Promise<WaitForHydrationResult>;
2908
+ interface SampleParams {
2909
+ /** The source to draw from. */
2910
+ slug: string;
2911
+ /** Documents to draw (at most 2,000). */
2912
+ size: number;
2913
+ /** Slug for the sample; default `<slug>-sample`. */
2914
+ as?: string;
2915
+ /** Scope the draw: metadata equality, or the full document selector. */
2916
+ filter?: Record<string, unknown>;
2917
+ /** Metadata key to stratify on, proportional per value. */
2918
+ stratify?: string;
2919
+ placement?: {
2920
+ resourceId: string;
2921
+ } | 'shared';
2922
+ }
2923
+ /**
2924
+ * Draw a sample of a source into a new source with the same pinned config.
2925
+ * The copy is a job (auto-approved; extraction is reused by content hash, so
2926
+ * the plan is chunk + embed only). Documents keep their content hashes, which
2927
+ * is what lets an eval set built on the sample score the parent too.
2928
+ *
2929
+ * @throws AdminApiError `invalid_size` (400), `slug_in_use` (422),
2930
+ * `data_source_limit` (422), `data_source_busy` (422).
2931
+ */
2932
+ declare function sample(ctx: AdminContext, params: SampleParams): Promise<DataSourcesSampleResult>;
2933
+ interface CreateSetParams {
2934
+ slug: string;
2935
+ /** Lowercase [a-z0-9_-], unique per source. */
2936
+ name: string;
2937
+ description?: string;
2938
+ /** Queries to generate from the corpus; 0 (default) makes an empty set to add to. */
2939
+ size?: number;
2940
+ /** `cloze` (default, free) or `question` (a chat model writes them). */
2941
+ style?: EvalQueryStyle;
2942
+ /** Chat model for `question`; default the source's contextual model or the platform's. */
2943
+ modelId?: string;
2944
+ tags?: string[];
2945
+ /** Makes generation reproducible; default the current time. */
2946
+ seed?: number;
2947
+ }
2948
+ /**
2949
+ * Create a query set, generating queries from the corpus when `size` is set.
2950
+ * Generation runs in the background; the set is `generating` until it is
2951
+ * `ready` (see `waitForSet`).
2952
+ *
2953
+ * @throws AdminApiError `eval_set_exists` (422), `invalid_name` (400).
2954
+ */
2955
+ declare function createSet(ctx: AdminContext, params: CreateSetParams): Promise<EvalSetResult>;
2956
+ declare function listSets(ctx: AdminContext, params?: {
2957
+ slug?: string;
2958
+ }): Promise<EvalSetsListResult>;
2959
+ declare function getSet(ctx: AdminContext, params: {
2960
+ id: string;
2961
+ queries?: boolean;
2962
+ }): Promise<EvalSetGetResult>;
2963
+ declare function deleteSet(ctx: AdminContext, params: {
2964
+ id: string;
2965
+ }): Promise<{
2966
+ deleted: true;
2967
+ set: EvalSet;
2968
+ }>;
2969
+ interface QueryInput {
2970
+ query: string;
2971
+ /** Which documents should come back; each reference must exist on the set's source. */
2972
+ expect: {
2973
+ documentIds?: string[];
2974
+ filenames?: string[];
2975
+ externalIds?: string[];
2976
+ contentHashes?: string[];
2977
+ };
2978
+ passage?: string;
2979
+ tags?: string[];
2980
+ }
2981
+ /**
2982
+ * Add hand-written queries (≤ 500 per call). Every reference is resolved
2983
+ * before anything is written; an unknown filename refuses the whole call by
2984
+ * name (`expected_document_not_found`).
2985
+ */
2986
+ declare function addQueries(ctx: AdminContext, params: {
2987
+ id: string;
2988
+ queries: QueryInput[];
2989
+ }): Promise<EvalQueriesAddResult>;
2990
+ declare function listQueries(ctx: AdminContext, params: {
2991
+ id: string;
2992
+ }): Promise<EvalQueriesListResult>;
2993
+ declare function deleteQuery(ctx: AdminContext, params: {
2994
+ id: string;
2995
+ queryId: string;
2996
+ }): Promise<{
2997
+ deleted: string;
2998
+ queryCount: number;
2999
+ }>;
3000
+ interface RunParams {
3001
+ setId: string;
3002
+ /** Target source; default the set's own. Expectations resolve by content hash. */
3003
+ slug?: string;
3004
+ /** Evaluate the target's candidate version instead of the active one. */
3005
+ candidate?: boolean;
3006
+ label?: string;
3007
+ retrieval?: EvalRetrieval;
3008
+ }
3009
+ /**
3010
+ * Score a set against a target. Runs in the background; block with
3011
+ * `waitForRun`. Each query is a real search (embedding + rerank spend).
3012
+ *
3013
+ * @throws AdminApiError `eval_set_not_ready` (422), `eval_set_empty` (422),
3014
+ * `no_candidate_pipeline` (404), `invalid_retrieval` (400).
3015
+ */
3016
+ declare function run(ctx: AdminContext, params: RunParams): Promise<EvalRunResult>;
3017
+ declare function listRuns(ctx: AdminContext, params?: {
3018
+ setId?: string;
3019
+ slug?: string;
3020
+ }): Promise<EvalRunsListResult>;
3021
+ declare function getRun$1(ctx: AdminContext, params: {
3022
+ id: string;
3023
+ queries?: boolean;
3024
+ worst?: number;
3025
+ }): Promise<EvalRunResult>;
3026
+ /** Two runs side by side: aggregate deltas, and per-query wins/losses when they share a set. */
3027
+ declare function compare(ctx: AdminContext, params: {
3028
+ a: string;
3029
+ b: string;
3030
+ }): Promise<EvalCompareResult>;
3031
+ interface WaitParams {
3032
+ id: string;
3033
+ timeoutMs?: number;
3034
+ onProgress?: (message: string) => void;
3035
+ }
3036
+ type WaitForRunResult = {
3037
+ status: 'done';
3038
+ run: EvalRun;
3039
+ } | {
3040
+ status: 'failed';
3041
+ run: EvalRun;
3042
+ error: string;
3043
+ } | {
3044
+ status: 'timeout';
3045
+ run: EvalRun;
3046
+ error: string;
3047
+ };
3048
+ declare function waitForRun(ctx: AdminContext, params: WaitParams): Promise<WaitForRunResult>;
3049
+ type WaitForSetResult = {
3050
+ status: 'done';
3051
+ set: EvalSet;
3052
+ } | {
3053
+ status: 'failed';
3054
+ set: EvalSet;
3055
+ error: string;
3056
+ } | {
3057
+ status: 'timeout';
3058
+ set: EvalSet;
3059
+ error: string;
3060
+ };
3061
+ /** Poll until generation lands (`ready`) or fails; a set waits `queued` for a worker first. */
3062
+ declare function waitForSet(ctx: AdminContext, params: WaitParams): Promise<WaitForSetResult>;
3063
+
3064
+ type dataSourceEvals_CreateSetParams = CreateSetParams;
3065
+ type dataSourceEvals_QueryInput = QueryInput;
3066
+ type dataSourceEvals_RunParams = RunParams;
3067
+ type dataSourceEvals_SampleParams = SampleParams;
3068
+ type dataSourceEvals_WaitForHydrationParams = WaitForHydrationParams;
3069
+ type dataSourceEvals_WaitForHydrationResult = WaitForHydrationResult;
3070
+ type dataSourceEvals_WaitForRunResult = WaitForRunResult;
3071
+ type dataSourceEvals_WaitForSetResult = WaitForSetResult;
3072
+ type dataSourceEvals_WaitParams = WaitParams;
3073
+ declare const dataSourceEvals_addQueries: typeof addQueries;
3074
+ declare const dataSourceEvals_compare: typeof compare;
3075
+ declare const dataSourceEvals_createSet: typeof createSet;
3076
+ declare const dataSourceEvals_deleteQuery: typeof deleteQuery;
3077
+ declare const dataSourceEvals_deleteSet: typeof deleteSet;
3078
+ declare const dataSourceEvals_getSet: typeof getSet;
3079
+ declare const dataSourceEvals_hydrate: typeof hydrate;
3080
+ declare const dataSourceEvals_listQueries: typeof listQueries;
3081
+ declare const dataSourceEvals_listRuns: typeof listRuns;
3082
+ declare const dataSourceEvals_listSets: typeof listSets;
3083
+ declare const dataSourceEvals_run: typeof run;
3084
+ declare const dataSourceEvals_sample: typeof sample;
3085
+ declare const dataSourceEvals_waitForHydration: typeof waitForHydration;
3086
+ declare const dataSourceEvals_waitForRun: typeof waitForRun;
3087
+ declare const dataSourceEvals_waitForSet: typeof waitForSet;
3088
+ declare namespace dataSourceEvals {
3089
+ export { type dataSourceEvals_CreateSetParams as CreateSetParams, DEFAULT_WAIT_TIMEOUT_MS$1 as DEFAULT_WAIT_TIMEOUT_MS, type dataSourceEvals_QueryInput as QueryInput, type dataSourceEvals_RunParams as RunParams, type dataSourceEvals_SampleParams as SampleParams, type dataSourceEvals_WaitForHydrationParams as WaitForHydrationParams, type dataSourceEvals_WaitForHydrationResult as WaitForHydrationResult, type dataSourceEvals_WaitForRunResult as WaitForRunResult, type dataSourceEvals_WaitForSetResult as WaitForSetResult, type dataSourceEvals_WaitParams as WaitParams, dataSourceEvals_addQueries as addQueries, dataSourceEvals_compare as compare, dataSourceEvals_createSet as createSet, dataSourceEvals_deleteQuery as deleteQuery, dataSourceEvals_deleteSet as deleteSet, getRun$1 as getRun, dataSourceEvals_getSet as getSet, dataSourceEvals_hydrate as hydrate, dataSourceEvals_listQueries as listQueries, dataSourceEvals_listRuns as listRuns, dataSourceEvals_listSets as listSets, dataSourceEvals_run as run, dataSourceEvals_sample as sample, dataSourceEvals_waitForHydration as waitForHydration, dataSourceEvals_waitForRun as waitForRun, dataSourceEvals_waitForSet as waitForSet };
3090
+ }
3091
+
3092
+ /**
3093
+ * Data-source mappers: the loop around customer code that turns raw objects
3094
+ * into documents — inspect the objects, test the mapper, remap after a fix,
3095
+ * read and replay what a job quarantined.
3096
+ *
3097
+ * Ops are pure (ctx, params) → typed result. The CLI skin in
3098
+ * commands/dataSourceMappers.ts owns flags, progress and exit codes.
3099
+ */
3100
+
3101
+ /** Which objects to look at: a prefix of an app file store, or the connected bucket. */
3102
+ type ObjectSelection = {
3103
+ store: string;
3104
+ access?: 'private' | 'public';
3105
+ prefix?: string;
3106
+ } | {
3107
+ connector: true;
3108
+ };
3109
+ interface InspectParams {
3110
+ /** Required for a connector selection; optional for a store. */
3111
+ slug?: string;
3112
+ selection: ObjectSelection;
3113
+ /** Only these keys. */
3114
+ keys?: string[];
3115
+ /** Objects to list (default 5,000, max 50,000). */
3116
+ limit?: number;
3117
+ }
3118
+ /**
3119
+ * Profile raw objects before writing a mapper: counts and bytes by extension
3120
+ * and by key shape, size buckets, and ten sampled heads with their JSON key
3121
+ * signatures. Read-only.
3122
+ *
3123
+ * @throws AdminApiError `invalid_source` (400), `connector_not_found` (422).
3124
+ */
3125
+ declare function inspect(ctx: AdminContext, params: InspectParams): Promise<DataSourceInspectResult>;
3126
+ interface MapTestParams {
3127
+ slug: string;
3128
+ selection: ObjectSelection;
3129
+ keys?: string[];
3130
+ /** Objects to map (default 20, max 200). */
3131
+ limit?: number;
3132
+ /** Run the LOCAL mapper through the app's dev session instead of the live bundle. */
3133
+ dev?: boolean;
3134
+ }
3135
+ /**
3136
+ * Run the source's mapper over real objects and return the outcomes — nothing
3137
+ * is ingested. With `dev` the mapper runs from local source through the
3138
+ * running dev session, which is how a mapper is checked before a deploy.
3139
+ *
3140
+ * @throws AdminApiError `no_mapper` (422), `no_dev_session` (422),
3141
+ * `invalid_source` (400).
3142
+ */
3143
+ declare function mapTest(ctx: AdminContext, params: MapTestParams): Promise<DataSourceMapTestResult>;
3144
+ interface RemapParams {
3145
+ slug: string;
3146
+ /** Pause when estimated spend reaches this; default the plan's headroom. */
3147
+ budgetDollars?: number;
3148
+ /** Only the first N raw objects. */
3149
+ limit?: number;
3150
+ }
3151
+ /**
3152
+ * Run the live mapper over every raw object the source holds a copy of.
3153
+ * Auto-approved: unchanged markdown is skipped by hash, so a remap after a
3154
+ * metadata tweak costs frames and little else. Block on the job with
3155
+ * `dataSourceJobs.waitForJob`.
3156
+ *
3157
+ * @throws AdminApiError `no_mapper` (422), `nothing_to_remap` (422),
3158
+ * `data_source_busy` (422).
3159
+ */
3160
+ declare function remap(ctx: AdminContext, params: RemapParams): Promise<DataSourceRemapResult>;
3161
+ interface QuarantineParams {
3162
+ id: string;
3163
+ kind?: 'skip' | 'error';
3164
+ /** Only objects quarantined with exactly this reason. */
3165
+ reason?: string;
3166
+ cursor?: string;
3167
+ /** Page size (default 100, max 1,000). */
3168
+ limit?: number;
3169
+ }
3170
+ /**
3171
+ * What a job's mapper skipped or failed on: counts, reasons by frequency, and
3172
+ * a page of objects.
3173
+ *
3174
+ * @throws AdminApiError `job_not_found` (404).
3175
+ */
3176
+ declare function quarantine(ctx: AdminContext, params: QuarantineParams): Promise<DataSourceQuarantineResult>;
3177
+ interface ReplayParams {
3178
+ id: string;
3179
+ kind?: 'skip' | 'error';
3180
+ }
3181
+ /**
3182
+ * Run a job's quarantined objects through the current mapper, from their raw
3183
+ * copies. Starts a job; block on it with `dataSourceJobs.waitForJob`.
3184
+ *
3185
+ * @throws AdminApiError `nothing_to_replay` (422), `no_mapper` (422),
3186
+ * `data_source_busy` (422).
3187
+ */
3188
+ declare function replay(ctx: AdminContext, params: ReplayParams): Promise<DataSourceRemapResult>;
3189
+
3190
+ type dataSourceMappers_InspectParams = InspectParams;
3191
+ type dataSourceMappers_MapTestParams = MapTestParams;
3192
+ type dataSourceMappers_ObjectSelection = ObjectSelection;
3193
+ type dataSourceMappers_QuarantineParams = QuarantineParams;
3194
+ type dataSourceMappers_RemapParams = RemapParams;
3195
+ type dataSourceMappers_ReplayParams = ReplayParams;
3196
+ declare const dataSourceMappers_inspect: typeof inspect;
3197
+ declare const dataSourceMappers_mapTest: typeof mapTest;
3198
+ declare const dataSourceMappers_quarantine: typeof quarantine;
3199
+ declare const dataSourceMappers_remap: typeof remap;
3200
+ declare const dataSourceMappers_replay: typeof replay;
3201
+ declare namespace dataSourceMappers {
3202
+ export { type dataSourceMappers_InspectParams as InspectParams, type dataSourceMappers_MapTestParams as MapTestParams, type dataSourceMappers_ObjectSelection as ObjectSelection, type dataSourceMappers_QuarantineParams as QuarantineParams, type dataSourceMappers_RemapParams as RemapParams, type dataSourceMappers_ReplayParams as ReplayParams, dataSourceMappers_inspect as inspect, dataSourceMappers_mapTest as mapTest, dataSourceMappers_quarantine as quarantine, dataSourceMappers_remap as remap, dataSourceMappers_replay as replay };
1935
3203
  }
1936
3204
 
1937
3205
  /**
@@ -5835,6 +7103,10 @@ declare function buildClient(ctx: AdminContext): {
5835
7103
  cron: BoundOps<typeof cron>;
5836
7104
  data: BoundOps<typeof data>;
5837
7105
  dataSources: BoundOps<typeof dataSources>;
7106
+ dataSourceJobs: BoundOps<typeof dataSourceJobs>;
7107
+ dataSourceConnectors: BoundOps<typeof dataSourceConnectors>;
7108
+ dataSourceEvals: BoundOps<typeof dataSourceEvals>;
7109
+ dataSourceMappers: BoundOps<typeof dataSourceMappers>;
5838
7110
  db: BoundOps<typeof db>;
5839
7111
  diagnostics: BoundOps<typeof diagnostics>;
5840
7112
  domains: BoundOps<typeof domains>;
@@ -5911,4 +7183,4 @@ declare class AdminTimeoutError extends Error {
5911
7183
 
5912
7184
  declare const admin: AdminClient;
5913
7185
 
5914
- export { AdminApiError, type AdminClient, type AdminClientOptions, type AdminContext, AdminTimeoutError, type AgentThreadDetail, type AgentThreadListItem, type AgentThreadsGetResult, type AgentThreadsListResult, type AgentToolCall, type AgentTranscriptMessage, type AgentTurnError, type AnalyticsAiHostRow, type AnalyticsAiSourcesResult, type AnalyticsAiVendorRow, type AnalyticsBatchResult, type AnalyticsCrawlersOverviewResult, type AnalyticsCrawlersRecentResult, type AnalyticsCrawlersRecentRow, type AnalyticsCrawlersResult, type AnalyticsCrawlersTimeseriesBucket, type AnalyticsCrawlersTimeseriesResult, type AnalyticsLiveResult, type AnalyticsMapPoint, type AnalyticsMapResult, type AnalyticsMetric, type AnalyticsQueryResult, type AnalyticsQueryResultRow, type AnalyticsSourceRow, type AnalyticsSourcesResult, type AppCronJobStatus, type AppCronJobStatusReason, type AppCronRunState, type AppEmailSuppression, type AppSecretRow, type CrashGroup, type CrashOccurrenceRow, type CrashesGetResult, type CrashesListResult, type CrashesOccurrencesResult, type CrashesStatsBucket, type CrashesStatsResult, type CronJobDecorated, type CronOverviewResult, type CronRunResult, type CronRunSummary, type DashboardLiveRelease, type DashboardReleaseMethod, type DashboardResult, type DataLiftFromDevResult, type DataLiftFromLiveResult, type DataSourcesBuildProgress, type DataSourcesChunkingConfig, type DataSourcesChunkingStrategy, type DataSourcesConfigResult, type DataSourcesConfigUpdateResult, type DataSourcesCreateResult, type DataSourcesDeleteResult, type DataSourcesDocument, type DataSourcesDocumentConfirmResult, type DataSourcesDocumentDeleteResult, type DataSourcesDocumentStatus, type DataSourcesDocumentsResult, type DataSourcesDropResult, type DataSourcesIngestConfig, type DataSourcesIngestUpdate, type DataSourcesListEntry, type DataSourcesListResult, type DataSourcesMigration, type DataSourcesMoveResult, type DataSourcesPlacement, type DataSourcesPromoteResult, type DataSourcesRetrievalConfig, type DataSourcesRetrievalUpdate, type DataSourcesRevectorizeResult, type DataSourcesSearchCitation, type DataSourcesSearchResult, type DataSourcesSearchResultItem, type DataSourcesUploadTokenResult, type DatasetFile, type DbQueryResult, type DiagnosticsAuditEnvironment, type DiagnosticsDashboardResult, type DiagnosticsFinding, type DiagnosticsLighthouseScores, type DiagnosticsPayload, type DiagnosticsReleaseResult, type DiagnosticsRuntimeFindings, type DomainsCheckResult, type DomainsCustomAddResult, type DomainsCustomCheckResult, type DomainsCustomHostnameUiStatus, type DomainsCustomHostnameView, type DomainsCustomListResult, type DomainsCustomRemoveResult, type DomainsCustomRetryResult, type DomainsDnsInstructions, type DomainsGetResult, type DomainsSetResult, type EmailBatchLifecycle, type EmailBatchResult, type EmailBatchSummary, type EmailBatchesResult, type EmailDomainBase, type EmailEffectiveSender, type EmailInboxResult, type EmailListResult, type EmailMessageKind, type EmailMessageResult, type EmailMessageStatus, type EmailSenderTier, type EmailSendingStatusResult, type EmailStatsResult, type EmailSummary, type EmailSuppressResult, type EmailSuppressionsResult, type EmailUnsuppressResult, type EventChannelActivity, type EventsChannelsListResult, type EventsPublishResult, type EventsTailFrame, type FilesDeleteResult, type FilesFileMeta, type FilesListEntry, type FilesListResult, type FilesLsResult, type FilesScanBadge, type FilesScanFlagged, type FilesScanStore, type FilesStatResult, type FilesStoreSummaryEntry, type FilesUploadUrlResult, type FilesUrlResult, type FrontendErrorType, type InboundDnsInstructions, type InboundEmailDomainAddResult, type InboundEmailDomainCheckResult, type InboundEmailDomainDeleteResult, type InboundEmailDomainUiStatus, type InboundEmailDomainVerifyResult, type InboundEmailDomainView, type InboundEmailDomainsListResult, type InboxEmailPreview, type IssueAuthorKind, type IssueCommentRow, type IssueEventType, type IssueKind, type IssueRow, type IssueStatus, type IssuesCommentResult, type IssuesCreateResult, type IssuesDeleteResult, type IssuesGetResult, type IssuesListResult, type IssuesUpdateResult, type JewelPairRow, type JewelPairSummaryRow, type JewelVerdict, type JewelsDatasetSummary, type JewelsDryrunResult, type JewelsExportResult, type JewelsGradeResult, type JewelsGrading, type JewelsOverviewResult, type JewelsPairResult, type JewelsPairsResult, type JewelsQueueResult, type JewelsResolveResult, type JewelsRunResult, type JewelsRunsResult, type JewelsTimeseriesBucket, type JewelsTimeseriesResult, type JewelsTrainResult, type LiftedDatabase, type MethodsInvokeResult, type OutboundDnsInstructions, type OutboundEmailDomainAddResult, type OutboundEmailDomainCheckResult, type OutboundEmailDomainDeleteResult, type OutboundEmailDomainUiStatus, type OutboundEmailDomainVerifyResult, type OutboundEmailDomainView, type OutboundEmailDomainsListResult, type PlatformSuppression, type PrerenderGetResult, type PrerenderInvalidateResult, type PrerenderPage, type PrerenderPagesResult, type PrerenderViewResult, type ReleaseFailureFields, type ReleaseFragment, type ReleasesByCommitResult, type ReleasesGetResult, type ReleasesListResult, type RequestsGetResult, type RequestsListResult, type RequestsListRow, type RequestsStatsMethodBucket, type RequestsStatsMethodResult, type RequestsStatsSummaryBucket, type RequestsStatsSummaryResult, type SecretsDeleteResult, type SecretsGetResult, type SecretsListResult, type SecretsSetResult, type SettingsResult, type SuppressionSource, type TrainingLogEntry, type TrainingRunRow, type TrainingRunStatus, type UserAuthProvider, type UserListItem, type UserRecord, type UsersCreateApiKeyResult, type UsersListResult, type UsersRevokeApiKeyResult, type UsersSetRoleResult, type V2AppSettings, type V2BuildLogEntry, type V2BuildStats, type V2CommitInfo, type V2EmailMessage, type V2ReleaseStatus, type VoiceAvailableNumber, type VoiceNumbersBuyResult, type VoiceNumbersListResult, type VoiceNumbersReleaseResult, type VoiceNumbersSearchResult, type VoiceNumbersSetNameResult, type VoicePhoneNumberStatus, type VoicePhoneNumberView, type VoiceResolvedPolicy, type VoiceSessionChannel, type VoiceSessionCost, type VoiceSessionCostLine, type VoiceSessionDetail, type VoiceSessionGetResult, type VoiceSessionListItem, type VoiceSessionSip, type VoiceSessionSpeechEntry, type VoiceSessionStatus, type VoiceSessionToolEntry, type VoiceSessionTranscriptEntry, type VoiceSessionsListResult, type VoiceSettingsCeilings, type VoiceSettingsGetResult, type VoiceSettingsOverrides, type VoiceSettingsSetResult, admin, createAdminClient, admin as default };
7186
+ export { AdminApiError, type AdminClient, type AdminClientOptions, type AdminContext, AdminTimeoutError, type AgentThreadDetail, type AgentThreadListItem, type AgentThreadsGetResult, type AgentThreadsListResult, type AgentToolCall, type AgentTranscriptMessage, type AgentTurnError, type AnalyticsAiHostRow, type AnalyticsAiSourcesResult, type AnalyticsAiVendorRow, type AnalyticsBatchResult, type AnalyticsCrawlersOverviewResult, type AnalyticsCrawlersRecentResult, type AnalyticsCrawlersRecentRow, type AnalyticsCrawlersResult, type AnalyticsCrawlersTimeseriesBucket, type AnalyticsCrawlersTimeseriesResult, type AnalyticsLiveResult, type AnalyticsMapPoint, type AnalyticsMapResult, type AnalyticsMetric, type AnalyticsQueryResult, type AnalyticsQueryResultRow, type AnalyticsSourceRow, type AnalyticsSourcesResult, type AppCronJobStatus, type AppCronJobStatusReason, type AppCronRunState, type AppEmailSuppression, type AppSecretRow, type CrashGroup, type CrashOccurrenceRow, type CrashesGetResult, type CrashesListResult, type CrashesOccurrencesResult, type CrashesStatsBucket, type CrashesStatsResult, type CronJobDecorated, type CronOverviewResult, type CronRunResult, type CronRunSummary, type DashboardLiveRelease, type DashboardReleaseMethod, type DashboardResult, type DataLiftFromDevResult, type DataLiftFromLiveResult, type DataSourceConnector, type DataSourceConnectorCredentials, type DataSourceConnectorDeletions, type DataSourceConnectorGetResult, type DataSourceConnectorPolicy, type DataSourceConnectorResult, type DataSourceInspectReport, type DataSourceInspectResult, type DataSourceJob, type DataSourceJobGetResult, type DataSourceJobManifestTokenResult, type DataSourceJobPlan, type DataSourceJobResult, type DataSourceJobSource, type DataSourceJobState, type DataSourceJobsListResult, type DataSourceMapTestDocument, type DataSourceMapTestOutcome, type DataSourceMapTestResult, type DataSourceMapper, type DataSourceObjectSelection, type DataSourceQuarantineResult, type DataSourceQuarantinedObject, type DataSourceRemapResult, type DataSourceSyncResult, type DataSourcesBuildProgress, type DataSourcesChunkingConfig, type DataSourcesChunkingStrategy, type DataSourcesConfigResult, type DataSourcesConfigUpdateResult, type DataSourcesCreateResult, type DataSourcesDeleteResult, type DataSourcesDocument, type DataSourcesDocumentConfirmResult, type DataSourcesDocumentDeleteManyResult, type DataSourcesDocumentDeleteResult, type DataSourcesDocumentSelector, type DataSourcesDocumentStatus, type DataSourcesDocumentsResult, type DataSourcesDropResult, type DataSourcesHydrateResult, type DataSourcesHydration, type DataSourcesIngestConfig, type DataSourcesIngestUpdate, type DataSourcesListEntry, type DataSourcesListResult, type DataSourcesMigration, type DataSourcesMoveResult, type DataSourcesPlacement, type DataSourcesPromoteResult, type DataSourcesRetrievalConfig, type DataSourcesRetrievalUpdate, type DataSourcesRevectorizeResult, type DataSourcesSampleResult, type DataSourcesSearchCitation, type DataSourcesSearchResult, type DataSourcesSearchResultItem, type DataSourcesUploadTokenResult, type DatasetFile, type DbQueryResult, type DiagnosticsAuditEnvironment, type DiagnosticsDashboardResult, type DiagnosticsFinding, type DiagnosticsLighthouseScores, type DiagnosticsPayload, type DiagnosticsReleaseResult, type DiagnosticsRuntimeFindings, type DomainsCheckResult, type DomainsCustomAddResult, type DomainsCustomCheckResult, type DomainsCustomHostnameUiStatus, type DomainsCustomHostnameView, type DomainsCustomListResult, type DomainsCustomRemoveResult, type DomainsCustomRetryResult, type DomainsDnsInstructions, type DomainsGetResult, type DomainsSetResult, type EmailBatchLifecycle, type EmailBatchResult, type EmailBatchSummary, type EmailBatchesResult, type EmailDomainBase, type EmailEffectiveSender, type EmailInboxResult, type EmailListResult, type EmailMessageKind, type EmailMessageResult, type EmailMessageStatus, type EmailSenderTier, type EmailSendingStatusResult, type EmailStatsResult, type EmailSummary, type EmailSuppressResult, type EmailSuppressionsResult, type EmailUnsuppressResult, type EvalAggregates, type EvalCompareResult, type EvalExpectation, type EvalQueriesAddResult, type EvalQueriesListResult, type EvalQuery, type EvalQueryResult, type EvalQueryStyle, type EvalRetrieval, type EvalRun, type EvalRunResult, type EvalRunState, type EvalRunsListResult, type EvalSet, type EvalSetGetResult, type EvalSetResult, type EvalSetState, type EvalSetsListResult, type EventChannelActivity, type EventsChannelsListResult, type EventsPublishResult, type EventsTailFrame, type FilesDeleteResult, type FilesFileMeta, type FilesListEntry, type FilesListResult, type FilesLsResult, type FilesScanBadge, type FilesScanFlagged, type FilesScanStore, type FilesStatResult, type FilesStoreSummaryEntry, type FilesUploadUrlResult, type FilesUrlResult, type FrontendErrorType, type InboundDnsInstructions, type InboundEmailDomainAddResult, type InboundEmailDomainCheckResult, type InboundEmailDomainDeleteResult, type InboundEmailDomainUiStatus, type InboundEmailDomainVerifyResult, type InboundEmailDomainView, type InboundEmailDomainsListResult, type InboxEmailPreview, type IssueAuthorKind, type IssueCommentRow, type IssueEventType, type IssueKind, type IssueRow, type IssueStatus, type IssuesCommentResult, type IssuesCreateResult, type IssuesDeleteResult, type IssuesGetResult, type IssuesListResult, type IssuesUpdateResult, type JewelPairRow, type JewelPairSummaryRow, type JewelVerdict, type JewelsDatasetSummary, type JewelsDryrunResult, type JewelsExportResult, type JewelsGradeResult, type JewelsGrading, type JewelsOverviewResult, type JewelsPairResult, type JewelsPairsResult, type JewelsQueueResult, type JewelsResolveResult, type JewelsRunResult, type JewelsRunsResult, type JewelsTimeseriesBucket, type JewelsTimeseriesResult, type JewelsTrainResult, type LiftedDatabase, type MethodsInvokeResult, type OutboundDnsInstructions, type OutboundEmailDomainAddResult, type OutboundEmailDomainCheckResult, type OutboundEmailDomainDeleteResult, type OutboundEmailDomainUiStatus, type OutboundEmailDomainVerifyResult, type OutboundEmailDomainView, type OutboundEmailDomainsListResult, type PlatformSuppression, type PrerenderGetResult, type PrerenderInvalidateResult, type PrerenderPage, type PrerenderPagesResult, type PrerenderViewResult, type ReleaseFailureFields, type ReleaseFragment, type ReleasesByCommitResult, type ReleasesGetResult, type ReleasesListResult, type RequestsGetResult, type RequestsListResult, type RequestsListRow, type RequestsStatsMethodBucket, type RequestsStatsMethodResult, type RequestsStatsSummaryBucket, type RequestsStatsSummaryResult, type SecretsDeleteResult, type SecretsGetResult, type SecretsListResult, type SecretsSetResult, type SettingsResult, type SuppressionSource, type TrainingLogEntry, type TrainingRunRow, type TrainingRunStatus, type UserAuthProvider, type UserListItem, type UserRecord, type UsersCreateApiKeyResult, type UsersListResult, type UsersRevokeApiKeyResult, type UsersSetRoleResult, type V2AppSettings, type V2BuildLogEntry, type V2BuildStats, type V2CommitInfo, type V2EmailMessage, type V2ReleaseStatus, type VoiceAvailableNumber, type VoiceNumbersBuyResult, type VoiceNumbersListResult, type VoiceNumbersReleaseResult, type VoiceNumbersSearchResult, type VoiceNumbersSetNameResult, type VoicePhoneNumberStatus, type VoicePhoneNumberView, type VoiceResolvedPolicy, type VoiceSessionChannel, type VoiceSessionCost, type VoiceSessionCostLine, type VoiceSessionDetail, type VoiceSessionGetResult, type VoiceSessionListItem, type VoiceSessionSip, type VoiceSessionSpeechEntry, type VoiceSessionStatus, type VoiceSessionToolEntry, type VoiceSessionTranscriptEntry, type VoiceSessionsListResult, type VoiceSettingsCeilings, type VoiceSettingsGetResult, type VoiceSettingsOverrides, type VoiceSettingsSetResult, admin, createAdminClient, admin as default };