@madewithremy/admin 0.1.5 → 0.1.7
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 +531 -26
- package/dist/index.js +279 -29
- package/dist/index.js.map +1 -1
- package/dist/prod.js +673 -35
- 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$9(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$6(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$6 as get, list$9 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$8(ctx: AdminContext, params?: CronListParams): Promise<CronOverviewResult>;
|
|
946
946
|
/**
|
|
947
947
|
* Trigger a job now (does not affect its schedule).
|
|
948
948
|
*
|
|
@@ -962,7 +962,7 @@ declare function run(ctx: AdminContext, route: string): Promise<CronRunResult>;
|
|
|
962
962
|
type cron_CronListParams = CronListParams;
|
|
963
963
|
declare const cron_run: typeof run;
|
|
964
964
|
declare namespace cron {
|
|
965
|
-
export { type cron_CronListParams as CronListParams, list$
|
|
965
|
+
export { type cron_CronListParams as CronListParams, list$8 as list, cron_run as run };
|
|
966
966
|
}
|
|
967
967
|
|
|
968
968
|
/**
|
|
@@ -1075,10 +1075,20 @@ declare namespace data {
|
|
|
1075
1075
|
* Chunking settings pinned at pipeline creation.
|
|
1076
1076
|
* Any change requires a revectorize, not a config update.
|
|
1077
1077
|
*/
|
|
1078
|
+
/**
|
|
1079
|
+
* `structural` splits on document structure (headings, blocks, paragraphs);
|
|
1080
|
+
* `whole` embeds each document as a single chunk, for corpora of short records
|
|
1081
|
+
* where the document is the retrieval unit.
|
|
1082
|
+
*/
|
|
1083
|
+
type DataSourcesChunkingStrategy = 'structural' | 'whole';
|
|
1078
1084
|
interface DataSourcesChunkingConfig {
|
|
1079
|
-
strategy:
|
|
1085
|
+
strategy: DataSourcesChunkingStrategy;
|
|
1080
1086
|
version: number;
|
|
1081
|
-
/**
|
|
1087
|
+
/**
|
|
1088
|
+
* Rough char budget per chunk; structure wins over budget, never the reverse.
|
|
1089
|
+
* For `whole`, the ceiling above which a document is chunked structurally
|
|
1090
|
+
* instead (default 24000).
|
|
1091
|
+
*/
|
|
1082
1092
|
maxChars: number;
|
|
1083
1093
|
/** Below this a chunk is merged forward rather than embedded on its own. */
|
|
1084
1094
|
minChars: number;
|
|
@@ -1123,6 +1133,8 @@ interface DataSourcesIngestConfig {
|
|
|
1123
1133
|
*/
|
|
1124
1134
|
interface DataSourcesIngestUpdate {
|
|
1125
1135
|
chunking?: {
|
|
1136
|
+
/** Naming a strategy pins its current version; versions are not settable. */
|
|
1137
|
+
strategy?: DataSourcesChunkingStrategy;
|
|
1126
1138
|
maxChars?: number;
|
|
1127
1139
|
minChars?: number;
|
|
1128
1140
|
dropBlockTypes?: string[];
|
|
@@ -1135,8 +1147,13 @@ interface DataSourcesIngestUpdate {
|
|
|
1135
1147
|
describe?: boolean;
|
|
1136
1148
|
modelId?: string;
|
|
1137
1149
|
};
|
|
1150
|
+
/**
|
|
1151
|
+
* `dimensions` must be the model's native size or one of its Matryoshka
|
|
1152
|
+
* sizes; omitted = native. Either half alone re-resolves the pair.
|
|
1153
|
+
*/
|
|
1138
1154
|
embedding?: {
|
|
1139
|
-
modelId
|
|
1155
|
+
modelId?: string;
|
|
1156
|
+
dimensions?: number;
|
|
1140
1157
|
};
|
|
1141
1158
|
extraction?: {
|
|
1142
1159
|
modelId: string;
|
|
@@ -1203,13 +1220,16 @@ interface DataSourcesDocumentStatus {
|
|
|
1203
1220
|
ingestedAt: string | null;
|
|
1204
1221
|
}
|
|
1205
1222
|
/**
|
|
1206
|
-
* GET /datasources/documents — per-document ingest state for one
|
|
1223
|
+
* GET /datasources/documents — one page of per-document ingest state for one
|
|
1224
|
+
* pipeline, oldest first.
|
|
1207
1225
|
*
|
|
1208
1226
|
* `pipelineVersion` is absent when the data source does not exist (returns `{ documents: [] }`).
|
|
1209
|
-
* `candidate=true` watches a migration in progress.
|
|
1227
|
+
* `candidate=true` watches a migration in progress. `nextCursor` is set when
|
|
1228
|
+
* more pages follow; `allDocuments` walks them.
|
|
1210
1229
|
*/
|
|
1211
1230
|
interface DataSourcesDocumentsResult {
|
|
1212
1231
|
pipelineVersion?: number;
|
|
1232
|
+
nextCursor?: string | null;
|
|
1213
1233
|
documents: DataSourcesDocumentStatus[];
|
|
1214
1234
|
}
|
|
1215
1235
|
/**
|
|
@@ -1242,6 +1262,36 @@ interface DataSourcesBuildProgress {
|
|
|
1242
1262
|
processing: number;
|
|
1243
1263
|
error: number;
|
|
1244
1264
|
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Where a source's index lives. Null is the shared pool. `phase` is the
|
|
1267
|
+
* resource's lifecycle phase (see types/infra.ts); anything but `active` means
|
|
1268
|
+
* searches on this source fail with `capacity_<phase>`.
|
|
1269
|
+
*/
|
|
1270
|
+
interface DataSourcesPlacement {
|
|
1271
|
+
resourceId: string;
|
|
1272
|
+
name: string | null;
|
|
1273
|
+
offeringLabel: string | null;
|
|
1274
|
+
phase: string;
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* A placement move in flight on the active version, or the last one's
|
|
1278
|
+
* failure; null when idle. The points are copied from durable storage onto
|
|
1279
|
+
* the target in the background (no re-embedding); the source flips when
|
|
1280
|
+
* `copied` reaches `total`. While it runs, writes to the source are refused
|
|
1281
|
+
* with `data_source_migrating`; search keeps serving from the old placement.
|
|
1282
|
+
* A sibling of `placement` because a source on the shared pool (placement
|
|
1283
|
+
* null) can be moving too.
|
|
1284
|
+
*/
|
|
1285
|
+
interface DataSourcesMigration {
|
|
1286
|
+
/** Where it is going; null is the shared pool. */
|
|
1287
|
+
toResourceId: string | null;
|
|
1288
|
+
toName: string | null;
|
|
1289
|
+
copied: number;
|
|
1290
|
+
total: number;
|
|
1291
|
+
startedAt: string;
|
|
1292
|
+
/** Set when the move failed; the source is unfrozen and a new move may start. */
|
|
1293
|
+
error: string | null;
|
|
1294
|
+
}
|
|
1245
1295
|
/** One data source in the GET /datasources listing. */
|
|
1246
1296
|
interface DataSourcesListEntry {
|
|
1247
1297
|
id: string;
|
|
@@ -1263,6 +1313,10 @@ interface DataSourcesListEntry {
|
|
|
1263
1313
|
version: number;
|
|
1264
1314
|
progress: DataSourcesBuildProgress;
|
|
1265
1315
|
} | null;
|
|
1316
|
+
/** Dedicated placement, or null for the shared pool. */
|
|
1317
|
+
placement: DataSourcesPlacement | null;
|
|
1318
|
+
/** A move in flight, or its last failure. */
|
|
1319
|
+
migration: DataSourcesMigration | null;
|
|
1266
1320
|
createdAt: string;
|
|
1267
1321
|
}
|
|
1268
1322
|
/** GET /datasources — all data sources for the app. */
|
|
@@ -1347,11 +1401,42 @@ interface DataSourcesConfigResult {
|
|
|
1347
1401
|
config: DataSourcesIngestConfig;
|
|
1348
1402
|
} | null;
|
|
1349
1403
|
}
|
|
1350
|
-
/**
|
|
1404
|
+
/**
|
|
1405
|
+
* POST /datasources/config — response after updating configuration.
|
|
1406
|
+
*
|
|
1407
|
+
* `placementChanged` with `migration` set means a populated source started a
|
|
1408
|
+
* background move rather than moving on the spot.
|
|
1409
|
+
*/
|
|
1351
1410
|
interface DataSourcesConfigUpdateResult {
|
|
1352
1411
|
ingestChanged: boolean;
|
|
1412
|
+
placementChanged: boolean;
|
|
1353
1413
|
ingest: DataSourcesIngestConfig;
|
|
1354
1414
|
retrieval: Partial<DataSourcesRetrievalConfig>;
|
|
1415
|
+
placement: DataSourcesPlacement | null;
|
|
1416
|
+
migration: DataSourcesMigration | null;
|
|
1417
|
+
}
|
|
1418
|
+
/** POST /datasources — an empty source, on the requested placement. */
|
|
1419
|
+
interface DataSourcesCreateResult {
|
|
1420
|
+
dataSource: {
|
|
1421
|
+
id: string;
|
|
1422
|
+
slug: string;
|
|
1423
|
+
name: string | null;
|
|
1424
|
+
/** Dedicated resource id, or null for the shared pool. */
|
|
1425
|
+
resourceId: string | null;
|
|
1426
|
+
createdAt: string;
|
|
1427
|
+
};
|
|
1428
|
+
pipeline: {
|
|
1429
|
+
version: number;
|
|
1430
|
+
config: DataSourcesIngestConfig;
|
|
1431
|
+
};
|
|
1432
|
+
placement: DataSourcesPlacement | null;
|
|
1433
|
+
migration: DataSourcesMigration | null;
|
|
1434
|
+
}
|
|
1435
|
+
/** POST /datasources/move — the move as started (or applied, for an empty source). */
|
|
1436
|
+
interface DataSourcesMoveResult {
|
|
1437
|
+
placement: DataSourcesPlacement | null;
|
|
1438
|
+
/** Null when the source was empty and moved on the spot. */
|
|
1439
|
+
migration: DataSourcesMigration | null;
|
|
1355
1440
|
}
|
|
1356
1441
|
/**
|
|
1357
1442
|
* POST /datasources/revectorize — starts a new candidate pipeline alongside the live one.
|
|
@@ -1405,7 +1490,7 @@ interface DataSourcesDocumentDeleteResult {
|
|
|
1405
1490
|
*/
|
|
1406
1491
|
|
|
1407
1492
|
/** @internal Consumed by the CLI skin; waitForIngest documents the default. */
|
|
1408
|
-
declare const DEFAULT_WAIT_TIMEOUT_MS: number;
|
|
1493
|
+
declare const DEFAULT_WAIT_TIMEOUT_MS$1: number;
|
|
1409
1494
|
/**
|
|
1410
1495
|
* The per-document summary projection used by waitForIngest, status, and the
|
|
1411
1496
|
* revectorize watch loop in the skin. Exported so the skin can reuse it for
|
|
@@ -1507,17 +1592,37 @@ interface DocumentsParams {
|
|
|
1507
1592
|
slug: string;
|
|
1508
1593
|
/** true → watch a candidate pipeline (revectorize in progress). */
|
|
1509
1594
|
candidate?: boolean;
|
|
1595
|
+
/** Only these documents (at most DOCUMENTS_IDS_MAX per request). */
|
|
1596
|
+
ids?: string[];
|
|
1597
|
+
/** Page size, 1..1000 (server default 500). */
|
|
1598
|
+
limit?: number;
|
|
1599
|
+
/** `nextCursor` from the previous page. */
|
|
1600
|
+
cursor?: string;
|
|
1510
1601
|
}
|
|
1602
|
+
/** The server's cap on `ids` per request; `allDocuments` chunks to it. */
|
|
1603
|
+
declare const DOCUMENTS_IDS_MAX = 200;
|
|
1511
1604
|
/**
|
|
1512
|
-
* Fetch per-document ingest state for one pipeline.
|
|
1605
|
+
* Fetch one page of per-document ingest state for one pipeline, oldest first.
|
|
1513
1606
|
*
|
|
1514
1607
|
* Returns an empty document list when the data source does not exist yet.
|
|
1515
|
-
* Pass `candidate: true` to watch a revectorization in progress.
|
|
1608
|
+
* Pass `candidate: true` to watch a revectorization in progress. Follow
|
|
1609
|
+
* `nextCursor` for the next page, or use `allDocuments` to walk them all.
|
|
1516
1610
|
*
|
|
1517
1611
|
* @example
|
|
1518
|
-
* const { documents } = await admin.dataSources.documents({ slug: 'policies' });
|
|
1612
|
+
* const { documents, nextCursor } = await admin.dataSources.documents({ slug: 'policies' });
|
|
1519
1613
|
*/
|
|
1520
1614
|
declare function documents(ctx: AdminContext, params: DocumentsParams): Promise<DataSourcesDocumentsResult>;
|
|
1615
|
+
/**
|
|
1616
|
+
* Every document (or every one of `ids`), following pages to the end.
|
|
1617
|
+
*
|
|
1618
|
+
* With `ids`, requests are chunked to the server's per-request cap, so a wait
|
|
1619
|
+
* over hundreds of just-added files stays a handful of small calls rather than
|
|
1620
|
+
* a walk of the whole source.
|
|
1621
|
+
*
|
|
1622
|
+
* @example
|
|
1623
|
+
* const docs = await admin.dataSources.allDocuments({ slug: 'policies' });
|
|
1624
|
+
*/
|
|
1625
|
+
declare function allDocuments(ctx: AdminContext, params: Omit<DocumentsParams, 'cursor' | 'limit'>): Promise<DataSourcesDocumentStatus[]>;
|
|
1521
1626
|
/**
|
|
1522
1627
|
* List all data sources with document counts, build progress, and active
|
|
1523
1628
|
* version metadata.
|
|
@@ -1525,7 +1630,7 @@ declare function documents(ctx: AdminContext, params: DocumentsParams): Promise<
|
|
|
1525
1630
|
* @example
|
|
1526
1631
|
* const { dataSources } = await admin.dataSources.list();
|
|
1527
1632
|
*/
|
|
1528
|
-
declare function list$
|
|
1633
|
+
declare function list$7(ctx: AdminContext): Promise<DataSourcesListResult>;
|
|
1529
1634
|
interface SearchParams {
|
|
1530
1635
|
/** Data source slug. */
|
|
1531
1636
|
slug: string;
|
|
@@ -1588,6 +1693,14 @@ interface ConfigSetParams {
|
|
|
1588
1693
|
* required.
|
|
1589
1694
|
*/
|
|
1590
1695
|
retrieval?: DataSourcesRetrievalUpdate;
|
|
1696
|
+
/**
|
|
1697
|
+
* Where the corpus lives: a dedicated resource (see `admin.infra`) or the
|
|
1698
|
+
* shared pool. An empty source moves on the spot; a populated one starts a
|
|
1699
|
+
* background move (see `move`) and the response carries its `migration`.
|
|
1700
|
+
*/
|
|
1701
|
+
placement?: {
|
|
1702
|
+
resourceId: string;
|
|
1703
|
+
} | 'shared';
|
|
1591
1704
|
}
|
|
1592
1705
|
/**
|
|
1593
1706
|
* Update pipeline configuration.
|
|
@@ -1597,7 +1710,8 @@ interface ConfigSetParams {
|
|
|
1597
1710
|
* instead, which builds a new version alongside the live one so search never
|
|
1598
1711
|
* degrades.
|
|
1599
1712
|
*
|
|
1600
|
-
* @throws AdminApiError `data_source_not_found` (404)
|
|
1713
|
+
* @throws AdminApiError `data_source_not_found` (404),
|
|
1714
|
+
* `data_source_migrating` (422) while a move is in flight.
|
|
1601
1715
|
* @example
|
|
1602
1716
|
* await admin.dataSources.configSet({
|
|
1603
1717
|
* slug: 'policies',
|
|
@@ -1605,6 +1719,93 @@ interface ConfigSetParams {
|
|
|
1605
1719
|
* });
|
|
1606
1720
|
*/
|
|
1607
1721
|
declare function configSet(ctx: AdminContext, params: ConfigSetParams): Promise<DataSourcesConfigUpdateResult>;
|
|
1722
|
+
interface CreateParams {
|
|
1723
|
+
/** Data source slug: lowercase [a-z0-9_-], up to 64 characters. */
|
|
1724
|
+
slug: string;
|
|
1725
|
+
/** Display name. */
|
|
1726
|
+
name?: string;
|
|
1727
|
+
/** Pinned ingest settings for the new pipeline; platform defaults otherwise. */
|
|
1728
|
+
ingest?: DataSourcesIngestUpdate;
|
|
1729
|
+
/**
|
|
1730
|
+
* Where the corpus lives from the start: a dedicated resource (see
|
|
1731
|
+
* `admin.infra`) or the shared pool (the default).
|
|
1732
|
+
*/
|
|
1733
|
+
placement?: {
|
|
1734
|
+
resourceId: string;
|
|
1735
|
+
} | 'shared';
|
|
1736
|
+
}
|
|
1737
|
+
/**
|
|
1738
|
+
* Create an empty data source, optionally on dedicated capacity.
|
|
1739
|
+
*
|
|
1740
|
+
* The one-step way to start a corpus on a resource. `add` also creates a
|
|
1741
|
+
* source on first use, but on the shared pool. Calling this for a source that
|
|
1742
|
+
* already exists returns it; a placement given then follows `configSet`'s
|
|
1743
|
+
* rule — an empty source moves on the spot, a populated one starts a move.
|
|
1744
|
+
*
|
|
1745
|
+
* @throws AdminApiError `invalid_data_source` (400), `data_source_limit` (422),
|
|
1746
|
+
* `resource_not_found` (404), `resource_destroyed` (422),
|
|
1747
|
+
* `data_source_migrating` (422), `capacity_exceeded` (422).
|
|
1748
|
+
* @example
|
|
1749
|
+
* await admin.dataSources.create({ slug: 'archive', placement: { resourceId } });
|
|
1750
|
+
*/
|
|
1751
|
+
declare function create$1(ctx: AdminContext, params: CreateParams): Promise<DataSourcesCreateResult>;
|
|
1752
|
+
interface MoveParams {
|
|
1753
|
+
/** Data source slug. */
|
|
1754
|
+
slug: string;
|
|
1755
|
+
/** A dedicated resource (see `admin.infra`) or the shared pool. */
|
|
1756
|
+
placement: {
|
|
1757
|
+
resourceId: string;
|
|
1758
|
+
} | 'shared';
|
|
1759
|
+
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Move a data source between placements: shared → dedicated, dedicated →
|
|
1762
|
+
* shared, or one resource to another.
|
|
1763
|
+
*
|
|
1764
|
+
* A populated source is copied onto the target in the background from its
|
|
1765
|
+
* stored vectors — nothing is re-extracted or re-embedded — and flips when the
|
|
1766
|
+
* copy lands. Search keeps serving from the old placement meanwhile. Adding,
|
|
1767
|
+
* removing or reconfiguring documents is refused with `data_source_migrating`
|
|
1768
|
+
* until it finishes; `waitForMove` blocks on that. Moving to `'shared'` is how
|
|
1769
|
+
* a source leaves a resource that is about to be destroyed.
|
|
1770
|
+
*
|
|
1771
|
+
* @throws AdminApiError `data_source_not_found` (404), `same_placement` (400),
|
|
1772
|
+
* `data_source_busy` (422) while documents are still building or a
|
|
1773
|
+
* candidate version exists, `data_source_migrating` (422), `capacity_<phase>`
|
|
1774
|
+
* (422) when the target resource is not active, `capacity_exceeded` (422)
|
|
1775
|
+
* when the target is too small, `resource_not_found` (404).
|
|
1776
|
+
* @example
|
|
1777
|
+
* await admin.dataSources.move({ slug: 'archive', placement: { resourceId } });
|
|
1778
|
+
* const result = await admin.dataSources.waitForMove({ slug: 'archive' });
|
|
1779
|
+
*/
|
|
1780
|
+
declare function move(ctx: AdminContext, params: MoveParams): Promise<DataSourcesMoveResult>;
|
|
1781
|
+
interface WaitForMoveParams {
|
|
1782
|
+
slug: string;
|
|
1783
|
+
/** Defaults to DEFAULT_WAIT_TIMEOUT_MS (15 min). */
|
|
1784
|
+
timeoutMs?: number;
|
|
1785
|
+
/** Receives `moving… X/Y documents (Ns)`. */
|
|
1786
|
+
onProgress?: (message: string) => void;
|
|
1787
|
+
}
|
|
1788
|
+
type WaitForMoveResult = {
|
|
1789
|
+
status: 'done';
|
|
1790
|
+
source: DataSourcesListEntry;
|
|
1791
|
+
} | {
|
|
1792
|
+
status: 'failed';
|
|
1793
|
+
source: DataSourcesListEntry;
|
|
1794
|
+
error: string;
|
|
1795
|
+
} | {
|
|
1796
|
+
status: 'timeout';
|
|
1797
|
+
source: DataSourcesListEntry;
|
|
1798
|
+
error: string;
|
|
1799
|
+
};
|
|
1800
|
+
/**
|
|
1801
|
+
* Poll until a source's move has landed, failed, or the timeout elapses.
|
|
1802
|
+
*
|
|
1803
|
+
* Reads the source from `list` each poll; done when no move is in flight. A
|
|
1804
|
+
* failed move returns immediately with the platform's error.
|
|
1805
|
+
*
|
|
1806
|
+
* @throws AdminApiError `data_source_not_found` (404).
|
|
1807
|
+
*/
|
|
1808
|
+
declare function waitForMove(ctx: AdminContext, params: WaitForMoveParams): Promise<WaitForMoveResult>;
|
|
1608
1809
|
interface RevectorizeParams {
|
|
1609
1810
|
/** Data source slug. */
|
|
1610
1811
|
slug: string;
|
|
@@ -1700,9 +1901,11 @@ declare function deleteSource(ctx: AdminContext, slug: string): Promise<DataSour
|
|
|
1700
1901
|
type dataSources_AddDocumentParams = AddDocumentParams;
|
|
1701
1902
|
type dataSources_AddDocumentResult = AddDocumentResult;
|
|
1702
1903
|
type dataSources_ConfigSetParams = ConfigSetParams;
|
|
1703
|
-
|
|
1904
|
+
type dataSources_CreateParams = CreateParams;
|
|
1905
|
+
declare const dataSources_DOCUMENTS_IDS_MAX: typeof DOCUMENTS_IDS_MAX;
|
|
1704
1906
|
type dataSources_DocumentsParams = DocumentsParams;
|
|
1705
1907
|
type dataSources_DropParams = DropParams;
|
|
1908
|
+
type dataSources_MoveParams = MoveParams;
|
|
1706
1909
|
type dataSources_PromoteParams = PromoteParams;
|
|
1707
1910
|
type dataSources_RevectorizeParams = RevectorizeParams;
|
|
1708
1911
|
type dataSources_RmParams = RmParams;
|
|
@@ -1710,20 +1913,25 @@ type dataSources_SearchParams = SearchParams;
|
|
|
1710
1913
|
type dataSources_SummarizedDocument = SummarizedDocument;
|
|
1711
1914
|
type dataSources_WaitForIngestParams = WaitForIngestParams;
|
|
1712
1915
|
type dataSources_WaitForIngestResult = WaitForIngestResult;
|
|
1916
|
+
type dataSources_WaitForMoveParams = WaitForMoveParams;
|
|
1917
|
+
type dataSources_WaitForMoveResult = WaitForMoveResult;
|
|
1713
1918
|
declare const dataSources_addDocument: typeof addDocument;
|
|
1919
|
+
declare const dataSources_allDocuments: typeof allDocuments;
|
|
1714
1920
|
declare const dataSources_configGet: typeof configGet;
|
|
1715
1921
|
declare const dataSources_configSet: typeof configSet;
|
|
1716
1922
|
declare const dataSources_deleteSource: typeof deleteSource;
|
|
1717
1923
|
declare const dataSources_documents: typeof documents;
|
|
1718
1924
|
declare const dataSources_drop: typeof drop;
|
|
1925
|
+
declare const dataSources_move: typeof move;
|
|
1719
1926
|
declare const dataSources_promote: typeof promote;
|
|
1720
1927
|
declare const dataSources_revectorize: typeof revectorize;
|
|
1721
1928
|
declare const dataSources_rm: typeof rm;
|
|
1722
1929
|
declare const dataSources_search: typeof search;
|
|
1723
1930
|
declare const dataSources_summarize: typeof summarize;
|
|
1724
1931
|
declare const dataSources_waitForIngest: typeof waitForIngest;
|
|
1932
|
+
declare const dataSources_waitForMove: typeof waitForMove;
|
|
1725
1933
|
declare namespace dataSources {
|
|
1726
|
-
export { type dataSources_AddDocumentParams as AddDocumentParams, type dataSources_AddDocumentResult as AddDocumentResult, type dataSources_ConfigSetParams as ConfigSetParams,
|
|
1934
|
+
export { type dataSources_AddDocumentParams as AddDocumentParams, type dataSources_AddDocumentResult as AddDocumentResult, type dataSources_ConfigSetParams as ConfigSetParams, type dataSources_CreateParams as CreateParams, DEFAULT_WAIT_TIMEOUT_MS$1 as DEFAULT_WAIT_TIMEOUT_MS, dataSources_DOCUMENTS_IDS_MAX as DOCUMENTS_IDS_MAX, type dataSources_DocumentsParams as DocumentsParams, type dataSources_DropParams as DropParams, type dataSources_MoveParams as MoveParams, type dataSources_PromoteParams as PromoteParams, type dataSources_RevectorizeParams as RevectorizeParams, type dataSources_RmParams as RmParams, type dataSources_SearchParams as SearchParams, type dataSources_SummarizedDocument as SummarizedDocument, type dataSources_WaitForIngestParams as WaitForIngestParams, type dataSources_WaitForIngestResult as WaitForIngestResult, type dataSources_WaitForMoveParams as WaitForMoveParams, type dataSources_WaitForMoveResult as WaitForMoveResult, dataSources_addDocument as addDocument, dataSources_allDocuments as allDocuments, dataSources_configGet as configGet, dataSources_configSet as configSet, create$1 as create, dataSources_deleteSource as deleteSource, dataSources_documents as documents, dataSources_drop as drop, list$7 as list, dataSources_move as move, dataSources_promote as promote, dataSources_revectorize as revectorize, dataSources_rm as rm, dataSources_search as search, dataSources_summarize as summarize, dataSources_waitForIngest as waitForIngest, dataSources_waitForMove as waitForMove };
|
|
1727
1935
|
}
|
|
1728
1936
|
|
|
1729
1937
|
/**
|
|
@@ -2049,7 +2257,7 @@ interface DomainsCustomRetryResult {
|
|
|
2049
2257
|
* @example
|
|
2050
2258
|
* const { subdomain } = await admin.domains.get();
|
|
2051
2259
|
*/
|
|
2052
|
-
declare function get$
|
|
2260
|
+
declare function get$5(ctx: AdminContext): Promise<DomainsGetResult>;
|
|
2053
2261
|
/**
|
|
2054
2262
|
* Set the app's platform subdomain.
|
|
2055
2263
|
*
|
|
@@ -2150,7 +2358,7 @@ declare const domains_customRemove: typeof customRemove;
|
|
|
2150
2358
|
declare const domains_customRetry: typeof customRetry;
|
|
2151
2359
|
declare const domains_findHostname: typeof findHostname;
|
|
2152
2360
|
declare namespace domains {
|
|
2153
|
-
export { domains_check as check, domains_customAdd as customAdd, domains_customCheck as customCheck, domains_customList as customList, domains_customRemove as customRemove, domains_customRetry as customRetry, domains_findHostname as findHostname, get$
|
|
2361
|
+
export { domains_check as check, domains_customAdd as customAdd, domains_customCheck as customCheck, domains_customList as customList, domains_customRemove as customRemove, domains_customRetry as customRetry, domains_findHostname as findHostname, get$5 as get, set$1 as set };
|
|
2154
2362
|
}
|
|
2155
2363
|
|
|
2156
2364
|
/**
|
|
@@ -2907,6 +3115,276 @@ declare namespace files {
|
|
|
2907
3115
|
export { type files_FileAccess as FileAccess, type files_FileRef as FileRef, type files_FilesLsParams as FilesLsParams, type files_FilesPutParams as FilesPutParams, files_fetchBytes as fetchBytes, files_ls as ls, files_put as put, files_remove as remove, files_sign as sign, files_stat as stat, files_summary as summary };
|
|
2908
3116
|
}
|
|
2909
3117
|
|
|
3118
|
+
/**
|
|
3119
|
+
* Response types for the provisioned-infrastructure management API.
|
|
3120
|
+
*
|
|
3121
|
+
* Transcribed from youai-api:
|
|
3122
|
+
* src/http/routes/V2Apps/manage/provisionedResources.ts
|
|
3123
|
+
* src/common/Provisioning/types.ts
|
|
3124
|
+
* src/common/Provisioning/offerings/define.ts
|
|
3125
|
+
*/
|
|
3126
|
+
/** Where a resource is in its lifecycle. Written only by the platform. */
|
|
3127
|
+
type InfraPhase = 'requested' | 'provisioning' | 'active' | 'hibernating' | 'hibernated' | 'resuming' | 'decommissioning' | 'destroyed' | 'failed';
|
|
3128
|
+
/** What the owner asked for. Written only by the owner's actions. */
|
|
3129
|
+
type InfraDesiredState = 'active' | 'hibernated' | 'destroyed';
|
|
3130
|
+
/**
|
|
3131
|
+
* What the platform last saw of an active resource's instance. `restoring` is
|
|
3132
|
+
* an instance that came back empty and is being refilled from its snapshot;
|
|
3133
|
+
* searches return `capacity_restoring` until it is `ready`.
|
|
3134
|
+
*/
|
|
3135
|
+
type InfraHealth = 'ready' | 'not-ready' | 'missing' | 'restoring';
|
|
3136
|
+
/** A leasable product from the platform catalog. Prices are cogs + margin. */
|
|
3137
|
+
interface InfraOffering {
|
|
3138
|
+
id: string;
|
|
3139
|
+
kind: 'retrieval';
|
|
3140
|
+
/** User-facing size, e.g. "Small". */
|
|
3141
|
+
label: string;
|
|
3142
|
+
/** User-facing capacity, e.g. "Up to ~1M chunks". */
|
|
3143
|
+
description: string;
|
|
3144
|
+
hourlyPriceDollars: number;
|
|
3145
|
+
/** Hourly × 730. */
|
|
3146
|
+
monthlyPriceDollars: number;
|
|
3147
|
+
/** Retained-storage rate while hibernated. */
|
|
3148
|
+
hibernatedHourlyPriceDollars: number;
|
|
3149
|
+
hibernatedMonthlyPriceDollars: number;
|
|
3150
|
+
capacity: {
|
|
3151
|
+
maxPoints: number;
|
|
3152
|
+
};
|
|
3153
|
+
capabilities: {
|
|
3154
|
+
hibernate: boolean;
|
|
3155
|
+
};
|
|
3156
|
+
retired: boolean;
|
|
3157
|
+
}
|
|
3158
|
+
interface InfraResource {
|
|
3159
|
+
id: string;
|
|
3160
|
+
appId: string;
|
|
3161
|
+
name: string;
|
|
3162
|
+
kind: 'retrieval';
|
|
3163
|
+
offeringId: string;
|
|
3164
|
+
offering: InfraOffering | null;
|
|
3165
|
+
phase: InfraPhase;
|
|
3166
|
+
desiredState: InfraDesiredState;
|
|
3167
|
+
/** Data sources placed on this resource. Destroy is refused while > 0. */
|
|
3168
|
+
attachedSources: number;
|
|
3169
|
+
lastError: string | null;
|
|
3170
|
+
/** Null until the instance exists (requested, hibernated, destroyed). */
|
|
3171
|
+
health: InfraHealth | null;
|
|
3172
|
+
/**
|
|
3173
|
+
* What the instance is doing right now, while a transition is under way
|
|
3174
|
+
* ("Waiting for capacity", "Snapshotting collection 1/2"); null when nothing is.
|
|
3175
|
+
*/
|
|
3176
|
+
detail: string | null;
|
|
3177
|
+
/**
|
|
3178
|
+
* The size this resource is being resized to, while a resize is under way;
|
|
3179
|
+
* null otherwise. A resize passes through `hibernated` and back to the phase
|
|
3180
|
+
* it started from.
|
|
3181
|
+
*/
|
|
3182
|
+
resizingTo: InfraOffering | null;
|
|
3183
|
+
/** When the last verified snapshot was taken; null if never. */
|
|
3184
|
+
lastSnapshotAt: string | null;
|
|
3185
|
+
activatedAt: string | null;
|
|
3186
|
+
hibernatedAt: string | null;
|
|
3187
|
+
destroyedAt: string | null;
|
|
3188
|
+
phaseChangedAt: string;
|
|
3189
|
+
createdAt: string;
|
|
3190
|
+
updatedAt: string;
|
|
3191
|
+
}
|
|
3192
|
+
interface InfraEvent {
|
|
3193
|
+
id: string;
|
|
3194
|
+
fromPhase: InfraPhase | null;
|
|
3195
|
+
toPhase: InfraPhase;
|
|
3196
|
+
/** `user:<id>` or `system`. */
|
|
3197
|
+
actor: string;
|
|
3198
|
+
reason: string | null;
|
|
3199
|
+
createdAt: string;
|
|
3200
|
+
}
|
|
3201
|
+
/** GET /infra */
|
|
3202
|
+
interface InfraListResult {
|
|
3203
|
+
resources: InfraResource[];
|
|
3204
|
+
offerings: InfraOffering[];
|
|
3205
|
+
/** False on hosts that cannot provision; `provision` will be refused. */
|
|
3206
|
+
provisioningAvailable: boolean;
|
|
3207
|
+
}
|
|
3208
|
+
/** GET /infra/:id */
|
|
3209
|
+
interface InfraGetResult {
|
|
3210
|
+
resource: InfraResource;
|
|
3211
|
+
events: InfraEvent[];
|
|
3212
|
+
attachedSources: {
|
|
3213
|
+
id: string;
|
|
3214
|
+
slug: string;
|
|
3215
|
+
name: string | null;
|
|
3216
|
+
}[];
|
|
3217
|
+
}
|
|
3218
|
+
/** POST /infra, /infra/:id/{hibernate,resume,destroy,rename,resize} */
|
|
3219
|
+
interface InfraResourceResult {
|
|
3220
|
+
resource: InfraResource;
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
/**
|
|
3224
|
+
* Provisioned-infrastructure operations: lease, park, resume and delete
|
|
3225
|
+
* dedicated resources (first kind: retrieval capacity for data sources).
|
|
3226
|
+
*
|
|
3227
|
+
* Ops are pure (ctx, params) → typed result. The CLI skin in
|
|
3228
|
+
* commands/infra.ts owns flag parsing, progress printing and exit codes.
|
|
3229
|
+
*/
|
|
3230
|
+
|
|
3231
|
+
/** @internal Consumed by the CLI skin; waitForPhase documents the default. */
|
|
3232
|
+
declare const DEFAULT_WAIT_TIMEOUT_MS: number;
|
|
3233
|
+
interface ListParams {
|
|
3234
|
+
/** Include resources that have been deleted; off by default. */
|
|
3235
|
+
includeDestroyed?: boolean;
|
|
3236
|
+
}
|
|
3237
|
+
/**
|
|
3238
|
+
* The app's dedicated resources plus the offerings it can provision, with
|
|
3239
|
+
* their hourly and monthly prices.
|
|
3240
|
+
*
|
|
3241
|
+
* @example
|
|
3242
|
+
* const { resources, offerings } = await admin.infra.list();
|
|
3243
|
+
*/
|
|
3244
|
+
declare function list$6(ctx: AdminContext, params?: ListParams): Promise<InfraListResult>;
|
|
3245
|
+
interface GetParams {
|
|
3246
|
+
/** Resource id. */
|
|
3247
|
+
id: string;
|
|
3248
|
+
}
|
|
3249
|
+
/**
|
|
3250
|
+
* One resource with its state timeline and the data sources placed on it.
|
|
3251
|
+
*
|
|
3252
|
+
* @throws AdminApiError `resource_not_found` (404).
|
|
3253
|
+
*/
|
|
3254
|
+
declare function get$4(ctx: AdminContext, params: GetParams): Promise<InfraGetResult>;
|
|
3255
|
+
interface ProvisionParams {
|
|
3256
|
+
/** Offering id from `list().offerings`, e.g. `retrieval.small`. */
|
|
3257
|
+
offeringId: string;
|
|
3258
|
+
/** Display name; defaults to the offering label. */
|
|
3259
|
+
name?: string;
|
|
3260
|
+
}
|
|
3261
|
+
/**
|
|
3262
|
+
* Lease a new resource. Spends credits: the workspace must have a month's
|
|
3263
|
+
* worth available before the request is accepted; nothing is charged until
|
|
3264
|
+
* activation, and from then the resource bills by the hour.
|
|
3265
|
+
*
|
|
3266
|
+
* The response is the row in `requested`; the platform brings it to `active`
|
|
3267
|
+
* within a minute or so. Use `waitForPhase` to block on that.
|
|
3268
|
+
*
|
|
3269
|
+
* @throws AdminApiError `offering_not_found` (400), `offering_retired` (422),
|
|
3270
|
+
* `provisioning_unavailable` (422), `insufficient_credits` (402).
|
|
3271
|
+
* @example
|
|
3272
|
+
* const { resource } = await admin.infra.provision({ offeringId: 'retrieval.small' });
|
|
3273
|
+
*/
|
|
3274
|
+
declare function provision(ctx: AdminContext, params: ProvisionParams): Promise<InfraResourceResult>;
|
|
3275
|
+
interface ResourceIdParams {
|
|
3276
|
+
/** Resource id. */
|
|
3277
|
+
id: string;
|
|
3278
|
+
}
|
|
3279
|
+
/**
|
|
3280
|
+
* Park an active resource. Data is kept; searches on its data sources return
|
|
3281
|
+
* `capacity_hibernating` while it parks and `capacity_hibernated` once parked,
|
|
3282
|
+
* until it resumes; billing drops to the retained-storage rate.
|
|
3283
|
+
*
|
|
3284
|
+
* @throws AdminApiError `resource_not_found` (404), `invalid_transition` (422).
|
|
3285
|
+
*/
|
|
3286
|
+
declare function hibernate(ctx: AdminContext, params: ResourceIdParams): Promise<InfraResourceResult>;
|
|
3287
|
+
/**
|
|
3288
|
+
* Bring a hibernated (or failed) resource back to active.
|
|
3289
|
+
*
|
|
3290
|
+
* @throws AdminApiError `resource_not_found` (404), `invalid_transition` (422).
|
|
3291
|
+
*/
|
|
3292
|
+
declare function resume(ctx: AdminContext, params: ResourceIdParams): Promise<InfraResourceResult>;
|
|
3293
|
+
/**
|
|
3294
|
+
* Delete a resource. Refused while any data source is placed on it — move
|
|
3295
|
+
* those to shared capacity (`admin.dataSources.move({ placement: 'shared' })`,
|
|
3296
|
+
* data intact) or delete them first. Billing stops when the phase reaches
|
|
3297
|
+
* `destroyed`.
|
|
3298
|
+
*
|
|
3299
|
+
* @throws AdminApiError `resource_not_found` (404),
|
|
3300
|
+
* `resource_has_attachments` (422), `invalid_transition` (422).
|
|
3301
|
+
*/
|
|
3302
|
+
declare function destroy(ctx: AdminContext, params: ResourceIdParams): Promise<InfraResourceResult>;
|
|
3303
|
+
interface ResizeParams {
|
|
3304
|
+
id: string;
|
|
3305
|
+
/** Offering id from `list().offerings`, e.g. `retrieval.medium`. */
|
|
3306
|
+
offeringId: string;
|
|
3307
|
+
}
|
|
3308
|
+
/**
|
|
3309
|
+
* Change a resource's size, keeping its data.
|
|
3310
|
+
*
|
|
3311
|
+
* The platform parks the resource (a fresh snapshot), swaps its spec, and
|
|
3312
|
+
* brings it back up restored from that snapshot, so a resize passes through
|
|
3313
|
+
* `hibernated` and searches on its sources pause for the few minutes it
|
|
3314
|
+
* takes. A resource that is already hibernated swaps in place and stays
|
|
3315
|
+
* parked. Growing is gated on a month of credits at the new rate like a
|
|
3316
|
+
* provision; shrinking is refused below what the resource holds. The response
|
|
3317
|
+
* carries `resizingTo` until the swap has happened; `waitForPhase` with
|
|
3318
|
+
* `until: (r) => r.resizingTo === null` blocks on the whole thing.
|
|
3319
|
+
*
|
|
3320
|
+
* @throws AdminApiError `resource_not_found` (404), `offering_not_found`
|
|
3321
|
+
* (400), `offering_retired` (422), `same_offering` (400),
|
|
3322
|
+
* `offering_kind_mismatch` (400), `resize_pending` (422), `resize_too_small`
|
|
3323
|
+
* (422), `insufficient_credits` (402), `invalid_transition` (422).
|
|
3324
|
+
* @example
|
|
3325
|
+
* await admin.infra.resize({ id, offeringId: 'retrieval.medium' });
|
|
3326
|
+
*/
|
|
3327
|
+
declare function resize(ctx: AdminContext, params: ResizeParams): Promise<InfraResourceResult>;
|
|
3328
|
+
interface RenameParams {
|
|
3329
|
+
id: string;
|
|
3330
|
+
name: string;
|
|
3331
|
+
}
|
|
3332
|
+
/** @throws AdminApiError `resource_not_found` (404), `invalid_name` (400). */
|
|
3333
|
+
declare function rename(ctx: AdminContext, params: RenameParams): Promise<InfraResourceResult>;
|
|
3334
|
+
interface WaitForPhaseParams {
|
|
3335
|
+
id: string;
|
|
3336
|
+
/** The phase(s) that count as done. */
|
|
3337
|
+
phases: InfraPhase[];
|
|
3338
|
+
/**
|
|
3339
|
+
* An extra condition on top of the phase — a resize, for one, ends in the
|
|
3340
|
+
* phase it started from and is done only once `resizingTo` has cleared.
|
|
3341
|
+
*/
|
|
3342
|
+
until?: (resource: InfraResource) => boolean;
|
|
3343
|
+
/** Default 10 minutes. */
|
|
3344
|
+
timeoutMs?: number;
|
|
3345
|
+
onProgress?: (message: string) => void;
|
|
3346
|
+
}
|
|
3347
|
+
type WaitForPhaseResult = {
|
|
3348
|
+
status: 'done';
|
|
3349
|
+
resource: InfraResource;
|
|
3350
|
+
} | {
|
|
3351
|
+
status: 'failed';
|
|
3352
|
+
resource: InfraResource;
|
|
3353
|
+
error: string;
|
|
3354
|
+
} | {
|
|
3355
|
+
status: 'timeout';
|
|
3356
|
+
resource: InfraResource;
|
|
3357
|
+
error: string;
|
|
3358
|
+
};
|
|
3359
|
+
/**
|
|
3360
|
+
* Poll a resource until it reaches one of `phases`, fails, or the timeout
|
|
3361
|
+
* elapses. A `failed` phase returns immediately with the platform's error.
|
|
3362
|
+
*
|
|
3363
|
+
* @example
|
|
3364
|
+
* const result = await admin.infra.waitForPhase({ id, phases: ['active'] });
|
|
3365
|
+
*/
|
|
3366
|
+
declare function waitForPhase(ctx: AdminContext, params: WaitForPhaseParams): Promise<WaitForPhaseResult>;
|
|
3367
|
+
|
|
3368
|
+
declare const infra_DEFAULT_WAIT_TIMEOUT_MS: typeof DEFAULT_WAIT_TIMEOUT_MS;
|
|
3369
|
+
type infra_GetParams = GetParams;
|
|
3370
|
+
type infra_ListParams = ListParams;
|
|
3371
|
+
type infra_ProvisionParams = ProvisionParams;
|
|
3372
|
+
type infra_RenameParams = RenameParams;
|
|
3373
|
+
type infra_ResizeParams = ResizeParams;
|
|
3374
|
+
type infra_ResourceIdParams = ResourceIdParams;
|
|
3375
|
+
type infra_WaitForPhaseParams = WaitForPhaseParams;
|
|
3376
|
+
type infra_WaitForPhaseResult = WaitForPhaseResult;
|
|
3377
|
+
declare const infra_destroy: typeof destroy;
|
|
3378
|
+
declare const infra_hibernate: typeof hibernate;
|
|
3379
|
+
declare const infra_provision: typeof provision;
|
|
3380
|
+
declare const infra_rename: typeof rename;
|
|
3381
|
+
declare const infra_resize: typeof resize;
|
|
3382
|
+
declare const infra_resume: typeof resume;
|
|
3383
|
+
declare const infra_waitForPhase: typeof waitForPhase;
|
|
3384
|
+
declare namespace infra {
|
|
3385
|
+
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 };
|
|
3386
|
+
}
|
|
3387
|
+
|
|
2910
3388
|
/**
|
|
2911
3389
|
* Result types for the `issues` CLI commands.
|
|
2912
3390
|
*
|
|
@@ -3794,12 +4272,30 @@ interface V2BuildLogEntry {
|
|
|
3794
4272
|
}
|
|
3795
4273
|
/** Terminal and in-progress states a release moves through. */
|
|
3796
4274
|
type V2ReleaseStatus = 'building' | 'compiled' | 'live' | 'preview' | 'dev' | 'failed' | 'superseded';
|
|
4275
|
+
/**
|
|
4276
|
+
* Why a failed release failed — derived server-side from the build log
|
|
4277
|
+
* (describeReleaseFailure() in youai-api) and present on every release
|
|
4278
|
+
* shape. All three are null unless `status` is 'failed'.
|
|
4279
|
+
*
|
|
4280
|
+
* `failureKind` is the field to branch on:
|
|
4281
|
+
* 'interrupted' — the build's orchestrator died (platform restart); the
|
|
4282
|
+
* platform retries once automatically. Transient.
|
|
4283
|
+
* 'unbuildable' — the commit couldn't be read as an app (mindstudio.json
|
|
4284
|
+
* missing/invalid). Fix the commit; nothing to retry.
|
|
4285
|
+
* 'build' — the build itself failed (compile error, deploy step).
|
|
4286
|
+
*/
|
|
4287
|
+
interface ReleaseFailureFields {
|
|
4288
|
+
failureReason: string | null;
|
|
4289
|
+
/** Build stage that was running when it failed (`interfaces`, `promote`…). */
|
|
4290
|
+
failurePhase: string | null;
|
|
4291
|
+
failureKind: 'build' | 'interrupted' | 'unbuildable' | null;
|
|
4292
|
+
}
|
|
3797
4293
|
/**
|
|
3798
4294
|
* Lightweight release projection returned by the paginated list endpoint.
|
|
3799
4295
|
* Heavy fields (buildLog, manifest, methods, interfaces) are dropped.
|
|
3800
4296
|
* Produced by toReleaseFragment() in youai-api.
|
|
3801
4297
|
*/
|
|
3802
|
-
interface ReleaseFragment {
|
|
4298
|
+
interface ReleaseFragment extends ReleaseFailureFields {
|
|
3803
4299
|
id: string;
|
|
3804
4300
|
commitSha: string;
|
|
3805
4301
|
commitInfo: V2CommitInfo;
|
|
@@ -3827,7 +4323,7 @@ interface ReleasesListResult {
|
|
|
3827
4323
|
* Includes build log, databases, signed diff/diagnostics URLs, and the
|
|
3828
4324
|
* post-deploy async progress signal.
|
|
3829
4325
|
*/
|
|
3830
|
-
interface ReleasesGetResult {
|
|
4326
|
+
interface ReleasesGetResult extends ReleaseFailureFields {
|
|
3831
4327
|
id: string;
|
|
3832
4328
|
appId: string;
|
|
3833
4329
|
commitSha: string;
|
|
@@ -3873,7 +4369,7 @@ interface ReleasesGetResult {
|
|
|
3873
4369
|
* Plain release row — no databases/diff enrichment — plus previewUrl.
|
|
3874
4370
|
* Used by 'releases wait', which polls this endpoint in a loop.
|
|
3875
4371
|
*/
|
|
3876
|
-
interface ReleasesByCommitResult {
|
|
4372
|
+
interface ReleasesByCommitResult extends ReleaseFailureFields {
|
|
3877
4373
|
id: string;
|
|
3878
4374
|
appId: string;
|
|
3879
4375
|
commitSha: string;
|
|
@@ -4262,8 +4758,16 @@ interface ReleaseSummary {
|
|
|
4262
4758
|
buildDurationMs: number | null;
|
|
4263
4759
|
publishedAt: string | null;
|
|
4264
4760
|
previewUrl?: string;
|
|
4265
|
-
/**
|
|
4761
|
+
/** Why it failed; only present when status is `failed`. */
|
|
4266
4762
|
error?: string;
|
|
4763
|
+
/**
|
|
4764
|
+
* Only present when status is `failed`. 'interrupted' means a platform
|
|
4765
|
+
* restart killed the build and a retry is already running — not a code
|
|
4766
|
+
* problem. See ReleaseFailureFields.
|
|
4767
|
+
*/
|
|
4768
|
+
failureKind?: 'build' | 'interrupted' | 'unbuildable';
|
|
4769
|
+
/** Build stage that was running when it failed; only when `failed`. */
|
|
4770
|
+
failurePhase?: string;
|
|
4267
4771
|
}
|
|
4268
4772
|
/**
|
|
4269
4773
|
* Terminal outcome of a `waitForCommit` call.
|
|
@@ -5352,6 +5856,7 @@ declare function buildClient(ctx: AdminContext): {
|
|
|
5352
5856
|
inbox: (params?: EmailInboxParams | undefined) => Promise<EmailInboxResult>;
|
|
5353
5857
|
};
|
|
5354
5858
|
files: BoundOps<typeof files>;
|
|
5859
|
+
infra: BoundOps<typeof infra>;
|
|
5355
5860
|
issues: BoundOps<typeof issues>;
|
|
5356
5861
|
jewels: BoundOps<typeof jewels>;
|
|
5357
5862
|
methods: BoundOps<typeof methods>;
|
|
@@ -5406,4 +5911,4 @@ declare class AdminTimeoutError extends Error {
|
|
|
5406
5911
|
|
|
5407
5912
|
declare const admin: AdminClient;
|
|
5408
5913
|
|
|
5409
|
-
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 DataSourcesConfigResult, type DataSourcesConfigUpdateResult, type DataSourcesDeleteResult, type DataSourcesDocument, type DataSourcesDocumentConfirmResult, type DataSourcesDocumentDeleteResult, type DataSourcesDocumentStatus, type DataSourcesDocumentsResult, type DataSourcesDropResult, type DataSourcesIngestConfig, type DataSourcesIngestUpdate, type DataSourcesListEntry, type DataSourcesListResult, 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 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 };
|
|
5914
|
+
export { AdminApiError, type AdminClient, type AdminClientOptions, type AdminContext, AdminTimeoutError, type AgentThreadDetail, type AgentThreadListItem, type AgentThreadsGetResult, type AgentThreadsListResult, type AgentToolCall, type AgentTranscriptMessage, type AgentTurnError, type AnalyticsAiHostRow, type AnalyticsAiSourcesResult, type AnalyticsAiVendorRow, type AnalyticsBatchResult, type AnalyticsCrawlersOverviewResult, type AnalyticsCrawlersRecentResult, type AnalyticsCrawlersRecentRow, type AnalyticsCrawlersResult, type AnalyticsCrawlersTimeseriesBucket, type AnalyticsCrawlersTimeseriesResult, type AnalyticsLiveResult, type AnalyticsMapPoint, type AnalyticsMapResult, type AnalyticsMetric, type AnalyticsQueryResult, type AnalyticsQueryResultRow, type AnalyticsSourceRow, type AnalyticsSourcesResult, type AppCronJobStatus, type AppCronJobStatusReason, type AppCronRunState, type AppEmailSuppression, type AppSecretRow, type CrashGroup, type CrashOccurrenceRow, type CrashesGetResult, type CrashesListResult, type CrashesOccurrencesResult, type CrashesStatsBucket, type CrashesStatsResult, type CronJobDecorated, type CronOverviewResult, type CronRunResult, type CronRunSummary, type DashboardLiveRelease, type DashboardReleaseMethod, type DashboardResult, type DataLiftFromDevResult, type DataLiftFromLiveResult, type DataSourcesBuildProgress, type DataSourcesChunkingConfig, type DataSourcesChunkingStrategy, type DataSourcesConfigResult, type DataSourcesConfigUpdateResult, type DataSourcesCreateResult, type DataSourcesDeleteResult, type DataSourcesDocument, type DataSourcesDocumentConfirmResult, type DataSourcesDocumentDeleteResult, type DataSourcesDocumentStatus, type DataSourcesDocumentsResult, type DataSourcesDropResult, type DataSourcesIngestConfig, type DataSourcesIngestUpdate, type DataSourcesListEntry, type DataSourcesListResult, type DataSourcesMigration, type DataSourcesMoveResult, type DataSourcesPlacement, type DataSourcesPromoteResult, type DataSourcesRetrievalConfig, type DataSourcesRetrievalUpdate, type DataSourcesRevectorizeResult, type DataSourcesSearchCitation, type DataSourcesSearchResult, type DataSourcesSearchResultItem, type DataSourcesUploadTokenResult, type DatasetFile, type DbQueryResult, type DiagnosticsAuditEnvironment, type DiagnosticsDashboardResult, type DiagnosticsFinding, type DiagnosticsLighthouseScores, type DiagnosticsPayload, type DiagnosticsReleaseResult, type DiagnosticsRuntimeFindings, type DomainsCheckResult, type DomainsCustomAddResult, type DomainsCustomCheckResult, type DomainsCustomHostnameUiStatus, type DomainsCustomHostnameView, type DomainsCustomListResult, type DomainsCustomRemoveResult, type DomainsCustomRetryResult, type DomainsDnsInstructions, type DomainsGetResult, type DomainsSetResult, type EmailBatchLifecycle, type EmailBatchResult, type EmailBatchSummary, type EmailBatchesResult, type EmailDomainBase, type EmailEffectiveSender, type EmailInboxResult, type EmailListResult, type EmailMessageKind, type EmailMessageResult, type EmailMessageStatus, type EmailSenderTier, type EmailSendingStatusResult, type EmailStatsResult, type EmailSummary, type EmailSuppressResult, type EmailSuppressionsResult, type EmailUnsuppressResult, type EventChannelActivity, type EventsChannelsListResult, type EventsPublishResult, type EventsTailFrame, type FilesDeleteResult, type FilesFileMeta, type FilesListEntry, type FilesListResult, type FilesLsResult, type FilesScanBadge, type FilesScanFlagged, type FilesScanStore, type FilesStatResult, type FilesStoreSummaryEntry, type FilesUploadUrlResult, type FilesUrlResult, type FrontendErrorType, type InboundDnsInstructions, type InboundEmailDomainAddResult, type InboundEmailDomainCheckResult, type InboundEmailDomainDeleteResult, type InboundEmailDomainUiStatus, type InboundEmailDomainVerifyResult, type InboundEmailDomainView, type InboundEmailDomainsListResult, type InboxEmailPreview, type IssueAuthorKind, type IssueCommentRow, type IssueEventType, type IssueKind, type IssueRow, type IssueStatus, type IssuesCommentResult, type IssuesCreateResult, type IssuesDeleteResult, type IssuesGetResult, type IssuesListResult, type IssuesUpdateResult, type JewelPairRow, type JewelPairSummaryRow, type JewelVerdict, type JewelsDatasetSummary, type JewelsDryrunResult, type JewelsExportResult, type JewelsGradeResult, type JewelsGrading, type JewelsOverviewResult, type JewelsPairResult, type JewelsPairsResult, type JewelsQueueResult, type JewelsResolveResult, type JewelsRunResult, type JewelsRunsResult, type JewelsTimeseriesBucket, type JewelsTimeseriesResult, type JewelsTrainResult, type LiftedDatabase, type MethodsInvokeResult, type OutboundDnsInstructions, type OutboundEmailDomainAddResult, type OutboundEmailDomainCheckResult, type OutboundEmailDomainDeleteResult, type OutboundEmailDomainUiStatus, type OutboundEmailDomainVerifyResult, type OutboundEmailDomainView, type OutboundEmailDomainsListResult, type PlatformSuppression, type PrerenderGetResult, type PrerenderInvalidateResult, type PrerenderPage, type PrerenderPagesResult, type PrerenderViewResult, type ReleaseFailureFields, type ReleaseFragment, type ReleasesByCommitResult, type ReleasesGetResult, type ReleasesListResult, type RequestsGetResult, type RequestsListResult, type RequestsListRow, type RequestsStatsMethodBucket, type RequestsStatsMethodResult, type RequestsStatsSummaryBucket, type RequestsStatsSummaryResult, type SecretsDeleteResult, type SecretsGetResult, type SecretsListResult, type SecretsSetResult, type SettingsResult, type SuppressionSource, type TrainingLogEntry, type TrainingRunRow, type TrainingRunStatus, type UserAuthProvider, type UserListItem, type UserRecord, type UsersCreateApiKeyResult, type UsersListResult, type UsersRevokeApiKeyResult, type UsersSetRoleResult, type V2AppSettings, type V2BuildLogEntry, type V2BuildStats, type V2CommitInfo, type V2EmailMessage, type V2ReleaseStatus, type VoiceAvailableNumber, type VoiceNumbersBuyResult, type VoiceNumbersListResult, type VoiceNumbersReleaseResult, type VoiceNumbersSearchResult, type VoiceNumbersSetNameResult, type VoicePhoneNumberStatus, type VoicePhoneNumberView, type VoiceResolvedPolicy, type VoiceSessionChannel, type VoiceSessionCost, type VoiceSessionCostLine, type VoiceSessionDetail, type VoiceSessionGetResult, type VoiceSessionListItem, type VoiceSessionSip, type VoiceSessionSpeechEntry, type VoiceSessionStatus, type VoiceSessionToolEntry, type VoiceSessionTranscriptEntry, type VoiceSessionsListResult, type VoiceSettingsCeilings, type VoiceSettingsGetResult, type VoiceSettingsOverrides, type VoiceSettingsSetResult, admin, createAdminClient, admin as default };
|