@madewithremy/admin 0.1.6 → 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 +1435 -29
- package/dist/index.js +786 -138
- package/dist/index.js.map +1 -1
- package/dist/prod.js +2252 -296
- package/package.json +1 -1
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
-
/**
|
|
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 {
|
|
@@ -1273,6 +1908,25 @@ interface DataSourcesPlacement {
|
|
|
1273
1908
|
offeringLabel: string | null;
|
|
1274
1909
|
phase: string;
|
|
1275
1910
|
}
|
|
1911
|
+
/**
|
|
1912
|
+
* A placement move in flight on the active version, or the last one's
|
|
1913
|
+
* failure; null when idle. The points are copied from durable storage onto
|
|
1914
|
+
* the target in the background (no re-embedding); the source flips when
|
|
1915
|
+
* `copied` reaches `total`. While it runs, writes to the source are refused
|
|
1916
|
+
* with `data_source_migrating`; search keeps serving from the old placement.
|
|
1917
|
+
* A sibling of `placement` because a source on the shared pool (placement
|
|
1918
|
+
* null) can be moving too.
|
|
1919
|
+
*/
|
|
1920
|
+
interface DataSourcesMigration {
|
|
1921
|
+
/** Where it is going; null is the shared pool. */
|
|
1922
|
+
toResourceId: string | null;
|
|
1923
|
+
toName: string | null;
|
|
1924
|
+
copied: number;
|
|
1925
|
+
total: number;
|
|
1926
|
+
startedAt: string;
|
|
1927
|
+
/** Set when the move failed; the source is unfrozen and a new move may start. */
|
|
1928
|
+
error: string | null;
|
|
1929
|
+
}
|
|
1276
1930
|
/** One data source in the GET /datasources listing. */
|
|
1277
1931
|
interface DataSourcesListEntry {
|
|
1278
1932
|
id: string;
|
|
@@ -1296,6 +1950,18 @@ interface DataSourcesListEntry {
|
|
|
1296
1950
|
} | null;
|
|
1297
1951
|
/** Dedicated placement, or null for the shared pool. */
|
|
1298
1952
|
placement: DataSourcesPlacement | null;
|
|
1953
|
+
/** A move in flight, or its last failure. */
|
|
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;
|
|
1299
1965
|
createdAt: string;
|
|
1300
1966
|
}
|
|
1301
1967
|
/** GET /datasources — all data sources for the app. */
|
|
@@ -1380,13 +2046,19 @@ interface DataSourcesConfigResult {
|
|
|
1380
2046
|
config: DataSourcesIngestConfig;
|
|
1381
2047
|
} | null;
|
|
1382
2048
|
}
|
|
1383
|
-
/**
|
|
2049
|
+
/**
|
|
2050
|
+
* POST /datasources/config — response after updating configuration.
|
|
2051
|
+
*
|
|
2052
|
+
* `placementChanged` with `migration` set means a populated source started a
|
|
2053
|
+
* background move rather than moving on the spot.
|
|
2054
|
+
*/
|
|
1384
2055
|
interface DataSourcesConfigUpdateResult {
|
|
1385
2056
|
ingestChanged: boolean;
|
|
1386
2057
|
placementChanged: boolean;
|
|
1387
2058
|
ingest: DataSourcesIngestConfig;
|
|
1388
2059
|
retrieval: Partial<DataSourcesRetrievalConfig>;
|
|
1389
2060
|
placement: DataSourcesPlacement | null;
|
|
2061
|
+
migration: DataSourcesMigration | null;
|
|
1390
2062
|
}
|
|
1391
2063
|
/** POST /datasources — an empty source, on the requested placement. */
|
|
1392
2064
|
interface DataSourcesCreateResult {
|
|
@@ -1403,6 +2075,13 @@ interface DataSourcesCreateResult {
|
|
|
1403
2075
|
config: DataSourcesIngestConfig;
|
|
1404
2076
|
};
|
|
1405
2077
|
placement: DataSourcesPlacement | null;
|
|
2078
|
+
migration: DataSourcesMigration | null;
|
|
2079
|
+
}
|
|
2080
|
+
/** POST /datasources/move — the move as started (or applied, for an empty source). */
|
|
2081
|
+
interface DataSourcesMoveResult {
|
|
2082
|
+
placement: DataSourcesPlacement | null;
|
|
2083
|
+
/** Null when the source was empty and moved on the spot. */
|
|
2084
|
+
migration: DataSourcesMigration | null;
|
|
1406
2085
|
}
|
|
1407
2086
|
/**
|
|
1408
2087
|
* POST /datasources/revectorize — starts a new candidate pipeline alongside the live one.
|
|
@@ -1444,6 +2123,27 @@ interface DataSourcesDocumentDeleteResult {
|
|
|
1444
2123
|
ok: true;
|
|
1445
2124
|
status: number;
|
|
1446
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
|
+
}
|
|
1447
2147
|
|
|
1448
2148
|
/**
|
|
1449
2149
|
* Data-sources operations: document ingestion, corpus search, pipeline
|
|
@@ -1456,7 +2156,7 @@ interface DataSourcesDocumentDeleteResult {
|
|
|
1456
2156
|
*/
|
|
1457
2157
|
|
|
1458
2158
|
/** @internal Consumed by the CLI skin; waitForIngest documents the default. */
|
|
1459
|
-
declare const DEFAULT_WAIT_TIMEOUT_MS$
|
|
2159
|
+
declare const DEFAULT_WAIT_TIMEOUT_MS$3: number;
|
|
1460
2160
|
/**
|
|
1461
2161
|
* The per-document summary projection used by waitForIngest, status, and the
|
|
1462
2162
|
* revectorize watch loop in the skin. Exported so the skin can reuse it for
|
|
@@ -1494,7 +2194,15 @@ interface AddDocumentResult {
|
|
|
1494
2194
|
filename: string;
|
|
1495
2195
|
skipped: boolean;
|
|
1496
2196
|
queued?: boolean;
|
|
1497
|
-
|
|
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';
|
|
1498
2206
|
}
|
|
1499
2207
|
/**
|
|
1500
2208
|
* Add one document to a data source.
|
|
@@ -1553,6 +2261,24 @@ interface WaitForIngestResult {
|
|
|
1553
2261
|
* if (result.status === 'error') { ... }
|
|
1554
2262
|
*/
|
|
1555
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>;
|
|
1556
2282
|
interface DocumentsParams {
|
|
1557
2283
|
/** Data source slug. */
|
|
1558
2284
|
slug: string;
|
|
@@ -1596,7 +2322,7 @@ declare function allDocuments(ctx: AdminContext, params: Omit<DocumentsParams, '
|
|
|
1596
2322
|
* @example
|
|
1597
2323
|
* const { dataSources } = await admin.dataSources.list();
|
|
1598
2324
|
*/
|
|
1599
|
-
declare function list$
|
|
2325
|
+
declare function list$8(ctx: AdminContext): Promise<DataSourcesListResult>;
|
|
1600
2326
|
interface SearchParams {
|
|
1601
2327
|
/** Data source slug. */
|
|
1602
2328
|
slug: string;
|
|
@@ -1661,9 +2387,8 @@ interface ConfigSetParams {
|
|
|
1661
2387
|
retrieval?: DataSourcesRetrievalUpdate;
|
|
1662
2388
|
/**
|
|
1663
2389
|
* Where the corpus lives: a dedicated resource (see `admin.infra`) or the
|
|
1664
|
-
* shared pool.
|
|
1665
|
-
*
|
|
1666
|
-
* `placement_change_requires_migration`.
|
|
2390
|
+
* shared pool. An empty source moves on the spot; a populated one starts a
|
|
2391
|
+
* background move (see `move`) and the response carries its `migration`.
|
|
1667
2392
|
*/
|
|
1668
2393
|
placement?: {
|
|
1669
2394
|
resourceId: string;
|
|
@@ -1677,7 +2402,8 @@ interface ConfigSetParams {
|
|
|
1677
2402
|
* instead, which builds a new version alongside the live one so search never
|
|
1678
2403
|
* degrades.
|
|
1679
2404
|
*
|
|
1680
|
-
* @throws AdminApiError `data_source_not_found` (404)
|
|
2405
|
+
* @throws AdminApiError `data_source_not_found` (404),
|
|
2406
|
+
* `data_source_migrating` (422) while a move is in flight.
|
|
1681
2407
|
* @example
|
|
1682
2408
|
* await admin.dataSources.configSet({
|
|
1683
2409
|
* slug: 'policies',
|
|
@@ -1704,18 +2430,74 @@ interface CreateParams {
|
|
|
1704
2430
|
* Create an empty data source, optionally on dedicated capacity.
|
|
1705
2431
|
*
|
|
1706
2432
|
* The one-step way to start a corpus on a resource. `add` also creates a
|
|
1707
|
-
* source on first use, but on the shared pool
|
|
1708
|
-
*
|
|
1709
|
-
*
|
|
1710
|
-
* then follows `configSet`'s rule and moves it only while it is empty.
|
|
2433
|
+
* source on first use, but on the shared pool. Calling this for a source that
|
|
2434
|
+
* already exists returns it; a placement given then follows `configSet`'s
|
|
2435
|
+
* rule — an empty source moves on the spot, a populated one starts a move.
|
|
1711
2436
|
*
|
|
1712
2437
|
* @throws AdminApiError `invalid_data_source` (400), `data_source_limit` (422),
|
|
1713
2438
|
* `resource_not_found` (404), `resource_destroyed` (422),
|
|
1714
|
-
* `
|
|
2439
|
+
* `data_source_migrating` (422), `capacity_exceeded` (422).
|
|
1715
2440
|
* @example
|
|
1716
2441
|
* await admin.dataSources.create({ slug: 'archive', placement: { resourceId } });
|
|
1717
2442
|
*/
|
|
1718
2443
|
declare function create$1(ctx: AdminContext, params: CreateParams): Promise<DataSourcesCreateResult>;
|
|
2444
|
+
interface MoveParams {
|
|
2445
|
+
/** Data source slug. */
|
|
2446
|
+
slug: string;
|
|
2447
|
+
/** A dedicated resource (see `admin.infra`) or the shared pool. */
|
|
2448
|
+
placement: {
|
|
2449
|
+
resourceId: string;
|
|
2450
|
+
} | 'shared';
|
|
2451
|
+
}
|
|
2452
|
+
/**
|
|
2453
|
+
* Move a data source between placements: shared → dedicated, dedicated →
|
|
2454
|
+
* shared, or one resource to another.
|
|
2455
|
+
*
|
|
2456
|
+
* A populated source is copied onto the target in the background from its
|
|
2457
|
+
* stored vectors — nothing is re-extracted or re-embedded — and flips when the
|
|
2458
|
+
* copy lands. Search keeps serving from the old placement meanwhile. Adding,
|
|
2459
|
+
* removing or reconfiguring documents is refused with `data_source_migrating`
|
|
2460
|
+
* until it finishes; `waitForMove` blocks on that. Moving to `'shared'` is how
|
|
2461
|
+
* a source leaves a resource that is about to be destroyed.
|
|
2462
|
+
*
|
|
2463
|
+
* @throws AdminApiError `data_source_not_found` (404), `same_placement` (400),
|
|
2464
|
+
* `data_source_busy` (422) while documents are still building or a
|
|
2465
|
+
* candidate version exists, `data_source_migrating` (422), `capacity_<phase>`
|
|
2466
|
+
* (422) when the target resource is not active, `capacity_exceeded` (422)
|
|
2467
|
+
* when the target is too small, `resource_not_found` (404).
|
|
2468
|
+
* @example
|
|
2469
|
+
* await admin.dataSources.move({ slug: 'archive', placement: { resourceId } });
|
|
2470
|
+
* const result = await admin.dataSources.waitForMove({ slug: 'archive' });
|
|
2471
|
+
*/
|
|
2472
|
+
declare function move(ctx: AdminContext, params: MoveParams): Promise<DataSourcesMoveResult>;
|
|
2473
|
+
interface WaitForMoveParams {
|
|
2474
|
+
slug: string;
|
|
2475
|
+
/** Defaults to DEFAULT_WAIT_TIMEOUT_MS (15 min). */
|
|
2476
|
+
timeoutMs?: number;
|
|
2477
|
+
/** Receives `moving… X/Y documents (Ns)`. */
|
|
2478
|
+
onProgress?: (message: string) => void;
|
|
2479
|
+
}
|
|
2480
|
+
type WaitForMoveResult = {
|
|
2481
|
+
status: 'done';
|
|
2482
|
+
source: DataSourcesListEntry;
|
|
2483
|
+
} | {
|
|
2484
|
+
status: 'failed';
|
|
2485
|
+
source: DataSourcesListEntry;
|
|
2486
|
+
error: string;
|
|
2487
|
+
} | {
|
|
2488
|
+
status: 'timeout';
|
|
2489
|
+
source: DataSourcesListEntry;
|
|
2490
|
+
error: string;
|
|
2491
|
+
};
|
|
2492
|
+
/**
|
|
2493
|
+
* Poll until a source's move has landed, failed, or the timeout elapses.
|
|
2494
|
+
*
|
|
2495
|
+
* Reads the source from `list` each poll; done when no move is in flight. A
|
|
2496
|
+
* failed move returns immediately with the platform's error.
|
|
2497
|
+
*
|
|
2498
|
+
* @throws AdminApiError `data_source_not_found` (404).
|
|
2499
|
+
*/
|
|
2500
|
+
declare function waitForMove(ctx: AdminContext, params: WaitForMoveParams): Promise<WaitForMoveResult>;
|
|
1719
2501
|
interface RevectorizeParams {
|
|
1720
2502
|
/** Data source slug. */
|
|
1721
2503
|
slug: string;
|
|
@@ -1795,6 +2577,29 @@ interface RmParams {
|
|
|
1795
2577
|
* await admin.dataSources.rm({ slug: 'policies', documentId });
|
|
1796
2578
|
*/
|
|
1797
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
|
+
}>;
|
|
1798
2603
|
/**
|
|
1799
2604
|
* Delete a whole data source — every version, every document, and every byte.
|
|
1800
2605
|
*
|
|
@@ -1815,13 +2620,19 @@ type dataSources_CreateParams = CreateParams;
|
|
|
1815
2620
|
declare const dataSources_DOCUMENTS_IDS_MAX: typeof DOCUMENTS_IDS_MAX;
|
|
1816
2621
|
type dataSources_DocumentsParams = DocumentsParams;
|
|
1817
2622
|
type dataSources_DropParams = DropParams;
|
|
2623
|
+
type dataSources_MoveParams = MoveParams;
|
|
1818
2624
|
type dataSources_PromoteParams = PromoteParams;
|
|
1819
2625
|
type dataSources_RevectorizeParams = RevectorizeParams;
|
|
1820
2626
|
type dataSources_RmParams = RmParams;
|
|
2627
|
+
type dataSources_RmWhereParams = RmWhereParams;
|
|
1821
2628
|
type dataSources_SearchParams = SearchParams;
|
|
1822
2629
|
type dataSources_SummarizedDocument = SummarizedDocument;
|
|
2630
|
+
type dataSources_WaitForCandidateParams = WaitForCandidateParams;
|
|
2631
|
+
type dataSources_WaitForCandidateResult = WaitForCandidateResult;
|
|
1823
2632
|
type dataSources_WaitForIngestParams = WaitForIngestParams;
|
|
1824
2633
|
type dataSources_WaitForIngestResult = WaitForIngestResult;
|
|
2634
|
+
type dataSources_WaitForMoveParams = WaitForMoveParams;
|
|
2635
|
+
type dataSources_WaitForMoveResult = WaitForMoveResult;
|
|
1825
2636
|
declare const dataSources_addDocument: typeof addDocument;
|
|
1826
2637
|
declare const dataSources_allDocuments: typeof allDocuments;
|
|
1827
2638
|
declare const dataSources_configGet: typeof configGet;
|
|
@@ -1829,14 +2640,566 @@ declare const dataSources_configSet: typeof configSet;
|
|
|
1829
2640
|
declare const dataSources_deleteSource: typeof deleteSource;
|
|
1830
2641
|
declare const dataSources_documents: typeof documents;
|
|
1831
2642
|
declare const dataSources_drop: typeof drop;
|
|
2643
|
+
declare const dataSources_move: typeof move;
|
|
1832
2644
|
declare const dataSources_promote: typeof promote;
|
|
1833
2645
|
declare const dataSources_revectorize: typeof revectorize;
|
|
1834
2646
|
declare const dataSources_rm: typeof rm;
|
|
2647
|
+
declare const dataSources_rmWhere: typeof rmWhere;
|
|
2648
|
+
declare const dataSources_rmWhereAll: typeof rmWhereAll;
|
|
1835
2649
|
declare const dataSources_search: typeof search;
|
|
1836
2650
|
declare const dataSources_summarize: typeof summarize;
|
|
2651
|
+
declare const dataSources_waitForCandidate: typeof waitForCandidate;
|
|
1837
2652
|
declare const dataSources_waitForIngest: typeof waitForIngest;
|
|
2653
|
+
declare const dataSources_waitForMove: typeof waitForMove;
|
|
1838
2654
|
declare namespace dataSources {
|
|
1839
|
-
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$
|
|
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 };
|
|
1840
3203
|
}
|
|
1841
3204
|
|
|
1842
3205
|
/**
|
|
@@ -3076,9 +4439,15 @@ interface InfraResource {
|
|
|
3076
4439
|
health: InfraHealth | null;
|
|
3077
4440
|
/**
|
|
3078
4441
|
* What the instance is doing right now, while a transition is under way
|
|
3079
|
-
* ("Waiting for capacity", "Snapshotting
|
|
4442
|
+
* ("Waiting for capacity", "Snapshotting collection 1/2"); null when nothing is.
|
|
3080
4443
|
*/
|
|
3081
4444
|
detail: string | null;
|
|
4445
|
+
/**
|
|
4446
|
+
* The size this resource is being resized to, while a resize is under way;
|
|
4447
|
+
* null otherwise. A resize passes through `hibernated` and back to the phase
|
|
4448
|
+
* it started from.
|
|
4449
|
+
*/
|
|
4450
|
+
resizingTo: InfraOffering | null;
|
|
3082
4451
|
/** When the last verified snapshot was taken; null if never. */
|
|
3083
4452
|
lastSnapshotAt: string | null;
|
|
3084
4453
|
activatedAt: string | null;
|
|
@@ -3114,7 +4483,7 @@ interface InfraGetResult {
|
|
|
3114
4483
|
name: string | null;
|
|
3115
4484
|
}[];
|
|
3116
4485
|
}
|
|
3117
|
-
/** POST /infra, /infra/:id/{hibernate,resume,destroy,rename} */
|
|
4486
|
+
/** POST /infra, /infra/:id/{hibernate,resume,destroy,rename,resize} */
|
|
3118
4487
|
interface InfraResourceResult {
|
|
3119
4488
|
resource: InfraResource;
|
|
3120
4489
|
}
|
|
@@ -3191,13 +4560,39 @@ declare function hibernate(ctx: AdminContext, params: ResourceIdParams): Promise
|
|
|
3191
4560
|
declare function resume(ctx: AdminContext, params: ResourceIdParams): Promise<InfraResourceResult>;
|
|
3192
4561
|
/**
|
|
3193
4562
|
* Delete a resource. Refused while any data source is placed on it — move
|
|
3194
|
-
* those to shared capacity (`
|
|
3195
|
-
* delete them first. Billing stops when the phase reaches
|
|
4563
|
+
* those to shared capacity (`admin.dataSources.move({ placement: 'shared' })`,
|
|
4564
|
+
* data intact) or delete them first. Billing stops when the phase reaches
|
|
4565
|
+
* `destroyed`.
|
|
3196
4566
|
*
|
|
3197
4567
|
* @throws AdminApiError `resource_not_found` (404),
|
|
3198
4568
|
* `resource_has_attachments` (422), `invalid_transition` (422).
|
|
3199
4569
|
*/
|
|
3200
4570
|
declare function destroy(ctx: AdminContext, params: ResourceIdParams): Promise<InfraResourceResult>;
|
|
4571
|
+
interface ResizeParams {
|
|
4572
|
+
id: string;
|
|
4573
|
+
/** Offering id from `list().offerings`, e.g. `retrieval.medium`. */
|
|
4574
|
+
offeringId: string;
|
|
4575
|
+
}
|
|
4576
|
+
/**
|
|
4577
|
+
* Change a resource's size, keeping its data.
|
|
4578
|
+
*
|
|
4579
|
+
* The platform parks the resource (a fresh snapshot), swaps its spec, and
|
|
4580
|
+
* brings it back up restored from that snapshot, so a resize passes through
|
|
4581
|
+
* `hibernated` and searches on its sources pause for the few minutes it
|
|
4582
|
+
* takes. A resource that is already hibernated swaps in place and stays
|
|
4583
|
+
* parked. Growing is gated on a month of credits at the new rate like a
|
|
4584
|
+
* provision; shrinking is refused below what the resource holds. The response
|
|
4585
|
+
* carries `resizingTo` until the swap has happened; `waitForPhase` with
|
|
4586
|
+
* `until: (r) => r.resizingTo === null` blocks on the whole thing.
|
|
4587
|
+
*
|
|
4588
|
+
* @throws AdminApiError `resource_not_found` (404), `offering_not_found`
|
|
4589
|
+
* (400), `offering_retired` (422), `same_offering` (400),
|
|
4590
|
+
* `offering_kind_mismatch` (400), `resize_pending` (422), `resize_too_small`
|
|
4591
|
+
* (422), `insufficient_credits` (402), `invalid_transition` (422).
|
|
4592
|
+
* @example
|
|
4593
|
+
* await admin.infra.resize({ id, offeringId: 'retrieval.medium' });
|
|
4594
|
+
*/
|
|
4595
|
+
declare function resize(ctx: AdminContext, params: ResizeParams): Promise<InfraResourceResult>;
|
|
3201
4596
|
interface RenameParams {
|
|
3202
4597
|
id: string;
|
|
3203
4598
|
name: string;
|
|
@@ -3208,6 +4603,11 @@ interface WaitForPhaseParams {
|
|
|
3208
4603
|
id: string;
|
|
3209
4604
|
/** The phase(s) that count as done. */
|
|
3210
4605
|
phases: InfraPhase[];
|
|
4606
|
+
/**
|
|
4607
|
+
* An extra condition on top of the phase — a resize, for one, ends in the
|
|
4608
|
+
* phase it started from and is done only once `resizingTo` has cleared.
|
|
4609
|
+
*/
|
|
4610
|
+
until?: (resource: InfraResource) => boolean;
|
|
3211
4611
|
/** Default 10 minutes. */
|
|
3212
4612
|
timeoutMs?: number;
|
|
3213
4613
|
onProgress?: (message: string) => void;
|
|
@@ -3238,6 +4638,7 @@ type infra_GetParams = GetParams;
|
|
|
3238
4638
|
type infra_ListParams = ListParams;
|
|
3239
4639
|
type infra_ProvisionParams = ProvisionParams;
|
|
3240
4640
|
type infra_RenameParams = RenameParams;
|
|
4641
|
+
type infra_ResizeParams = ResizeParams;
|
|
3241
4642
|
type infra_ResourceIdParams = ResourceIdParams;
|
|
3242
4643
|
type infra_WaitForPhaseParams = WaitForPhaseParams;
|
|
3243
4644
|
type infra_WaitForPhaseResult = WaitForPhaseResult;
|
|
@@ -3245,10 +4646,11 @@ declare const infra_destroy: typeof destroy;
|
|
|
3245
4646
|
declare const infra_hibernate: typeof hibernate;
|
|
3246
4647
|
declare const infra_provision: typeof provision;
|
|
3247
4648
|
declare const infra_rename: typeof rename;
|
|
4649
|
+
declare const infra_resize: typeof resize;
|
|
3248
4650
|
declare const infra_resume: typeof resume;
|
|
3249
4651
|
declare const infra_waitForPhase: typeof waitForPhase;
|
|
3250
4652
|
declare namespace infra {
|
|
3251
|
-
export { infra_DEFAULT_WAIT_TIMEOUT_MS as DEFAULT_WAIT_TIMEOUT_MS, type infra_GetParams as GetParams, type infra_ListParams as ListParams, type infra_ProvisionParams as ProvisionParams, type infra_RenameParams as RenameParams, type infra_ResourceIdParams as ResourceIdParams, type infra_WaitForPhaseParams as WaitForPhaseParams, type infra_WaitForPhaseResult as WaitForPhaseResult, infra_destroy as destroy, get$4 as get, infra_hibernate as hibernate, list$6 as list, infra_provision as provision, infra_rename as rename, infra_resume as resume, infra_waitForPhase as waitForPhase };
|
|
4653
|
+
export { infra_DEFAULT_WAIT_TIMEOUT_MS as DEFAULT_WAIT_TIMEOUT_MS, type infra_GetParams as GetParams, type infra_ListParams as ListParams, type infra_ProvisionParams as ProvisionParams, type infra_RenameParams as RenameParams, type infra_ResizeParams as ResizeParams, type infra_ResourceIdParams as ResourceIdParams, type infra_WaitForPhaseParams as WaitForPhaseParams, type infra_WaitForPhaseResult as WaitForPhaseResult, infra_destroy as destroy, get$4 as get, infra_hibernate as hibernate, list$6 as list, infra_provision as provision, infra_rename as rename, infra_resize as resize, infra_resume as resume, infra_waitForPhase as waitForPhase };
|
|
3252
4654
|
}
|
|
3253
4655
|
|
|
3254
4656
|
/**
|
|
@@ -5701,6 +7103,10 @@ declare function buildClient(ctx: AdminContext): {
|
|
|
5701
7103
|
cron: BoundOps<typeof cron>;
|
|
5702
7104
|
data: BoundOps<typeof data>;
|
|
5703
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>;
|
|
5704
7110
|
db: BoundOps<typeof db>;
|
|
5705
7111
|
diagnostics: BoundOps<typeof diagnostics>;
|
|
5706
7112
|
domains: BoundOps<typeof domains>;
|
|
@@ -5777,4 +7183,4 @@ declare class AdminTimeoutError extends Error {
|
|
|
5777
7183
|
|
|
5778
7184
|
declare const admin: AdminClient;
|
|
5779
7185
|
|
|
5780
|
-
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 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 };
|