@madewithremy/admin 0.1.20 → 0.1.21
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 +38 -4
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/prod.js +40 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2631,13 +2631,26 @@ interface MoveParams {
|
|
|
2631
2631
|
restart?: boolean;
|
|
2632
2632
|
/**
|
|
2633
2633
|
* Parallel chains to copy with, instead of the target size's default (XL 32,
|
|
2634
|
-
* Large 16, Medium 8, Small 4; max 128). The platform runs
|
|
2635
|
-
* worker, so this is the worker count times
|
|
2634
|
+
* Large 16, Medium 8, Small 4; max 128). The platform runs four chains per
|
|
2635
|
+
* worker, so this is the worker count times four. Takes effect when the
|
|
2636
2636
|
* copy's windows are cut: with a move already under way, pair it with
|
|
2637
2637
|
* `restart`.
|
|
2638
2638
|
*/
|
|
2639
2639
|
chains?: number;
|
|
2640
2640
|
}
|
|
2641
|
+
/**
|
|
2642
|
+
* Halt a move under way. Its chains stop at their next checkpoint and the
|
|
2643
|
+
* record reads `error: "Stopped by operator."`; a plain `move` to the same
|
|
2644
|
+
* target resumes from the chains' cursors.
|
|
2645
|
+
*
|
|
2646
|
+
* @throws AdminApiError `data_source_not_found` (404), `no_move_in_flight`
|
|
2647
|
+
* (422) when nothing is being moved.
|
|
2648
|
+
* @example
|
|
2649
|
+
* await admin.dataSources.stopMove({ slug: 'archive' });
|
|
2650
|
+
*/
|
|
2651
|
+
declare function stopMove(ctx: AdminContext, params: {
|
|
2652
|
+
slug: string;
|
|
2653
|
+
}): Promise<DataSourcesMoveResult>;
|
|
2641
2654
|
/**
|
|
2642
2655
|
* Move a data source between placements: shared → dedicated, dedicated →
|
|
2643
2656
|
* shared, or one resource to another.
|
|
@@ -2839,12 +2852,13 @@ declare const dataSources_rm: typeof rm;
|
|
|
2839
2852
|
declare const dataSources_rmWhere: typeof rmWhere;
|
|
2840
2853
|
declare const dataSources_rmWhereAll: typeof rmWhereAll;
|
|
2841
2854
|
declare const dataSources_search: typeof search;
|
|
2855
|
+
declare const dataSources_stopMove: typeof stopMove;
|
|
2842
2856
|
declare const dataSources_summarize: typeof summarize;
|
|
2843
2857
|
declare const dataSources_waitForCandidate: typeof waitForCandidate;
|
|
2844
2858
|
declare const dataSources_waitForIngest: typeof waitForIngest;
|
|
2845
2859
|
declare const dataSources_waitForMove: typeof waitForMove;
|
|
2846
2860
|
declare namespace dataSources {
|
|
2847
|
-
export { type dataSources_AddDocumentParams as AddDocumentParams, type dataSources_AddDocumentResult as AddDocumentResult, type dataSources_ConfigSetParams as ConfigSetParams, type dataSources_CountParams as CountParams, 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, dataSources_FAILURES_PAGE as FAILURES_PAGE, 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, dataSources_count as count, 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 };
|
|
2861
|
+
export { type dataSources_AddDocumentParams as AddDocumentParams, type dataSources_AddDocumentResult as AddDocumentResult, type dataSources_ConfigSetParams as ConfigSetParams, type dataSources_CountParams as CountParams, 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, dataSources_FAILURES_PAGE as FAILURES_PAGE, 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, dataSources_count as count, 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_stopMove as stopMove, dataSources_summarize as summarize, dataSources_waitForCandidate as waitForCandidate, dataSources_waitForIngest as waitForIngest, dataSources_waitForMove as waitForMove };
|
|
2848
2862
|
}
|
|
2849
2863
|
|
|
2850
2864
|
/**
|
|
@@ -4665,7 +4679,9 @@ type InfraDesiredState = 'active' | 'hibernated' | 'destroyed';
|
|
|
4665
4679
|
* back from durable storage (a new pod found their index empty); searches on
|
|
4666
4680
|
* those sources answer `index_warming` with the copy's progress until it lands.
|
|
4667
4681
|
*/
|
|
4668
|
-
type InfraHealth = 'ready' | 'not-ready' | 'missing' | 'rebuilding'
|
|
4682
|
+
type InfraHealth = 'ready' | 'not-ready' | 'missing' | 'rebuilding'
|
|
4683
|
+
/** Serving in Qdrant's low-memory mode after repeated out-of-memory restarts, until memory settles. */
|
|
4684
|
+
| 'degraded';
|
|
4669
4685
|
/** A leasable product from the platform catalog. Prices are cogs + margin. */
|
|
4670
4686
|
interface InfraOffering {
|
|
4671
4687
|
id: string;
|
|
@@ -4736,6 +4752,24 @@ interface InfraResource {
|
|
|
4736
4752
|
measuredAt: string | null;
|
|
4737
4753
|
usableDiskBytes: number;
|
|
4738
4754
|
} | null;
|
|
4755
|
+
/**
|
|
4756
|
+
* The instance's resident memory against the limit it is killed at, as
|
|
4757
|
+
* last sampled; null until the platform has observed the instance.
|
|
4758
|
+
*/
|
|
4759
|
+
memory: {
|
|
4760
|
+
residentBytes: number;
|
|
4761
|
+
limitBytes: number;
|
|
4762
|
+
sampledAt: string;
|
|
4763
|
+
} | null;
|
|
4764
|
+
/**
|
|
4765
|
+
* How often the instance has restarted and why it last stopped (`OOMKilled`,
|
|
4766
|
+
* `Error`); null until observed. `infra logs` carries each restart as a line.
|
|
4767
|
+
*/
|
|
4768
|
+
restarts: {
|
|
4769
|
+
count: number;
|
|
4770
|
+
lastReason: string | null;
|
|
4771
|
+
lastAt: string | null;
|
|
4772
|
+
} | null;
|
|
4739
4773
|
/**
|
|
4740
4774
|
* The size this resource is being resized to, while a resize is under way;
|
|
4741
4775
|
* null otherwise. A resize passes through `hibernated` and back to the phase
|
package/dist/index.js
CHANGED
|
@@ -379,6 +379,7 @@ __export(dataSources_exports, {
|
|
|
379
379
|
rmWhere: () => rmWhere,
|
|
380
380
|
rmWhereAll: () => rmWhereAll,
|
|
381
381
|
search: () => search,
|
|
382
|
+
stopMove: () => stopMove,
|
|
382
383
|
summarize: () => summarize,
|
|
383
384
|
waitForCandidate: () => waitForCandidate,
|
|
384
385
|
waitForIngest: () => waitForIngest,
|
|
@@ -460,6 +461,10 @@ function renderProgress(p, start2, extra) {
|
|
|
460
461
|
const rate = p.ratePerMinute !== null && p.ratePerMinute > 0 ? `${Math.round(p.ratePerMinute).toLocaleString()}/min` : null;
|
|
461
462
|
const parts = [
|
|
462
463
|
`${p.phase}\u2026`,
|
|
464
|
+
// The operation's own word on what it is doing when the count does not
|
|
465
|
+
// say (a settle building its full-text index); a failure's note is its
|
|
466
|
+
// error and prints on its own line instead.
|
|
467
|
+
p.phase !== "failed" ? p.note : null,
|
|
463
468
|
count2,
|
|
464
469
|
rate,
|
|
465
470
|
describeEta(p.etaAt),
|
|
@@ -749,6 +754,14 @@ function create(ctx, params) {
|
|
|
749
754
|
...placement !== void 0 ? { placement } : {}
|
|
750
755
|
});
|
|
751
756
|
}
|
|
757
|
+
function stopMove(ctx, params) {
|
|
758
|
+
return call(
|
|
759
|
+
ctx,
|
|
760
|
+
"POST",
|
|
761
|
+
`${base(ctx.appId)}/move/stop`,
|
|
762
|
+
{ slug: params.slug }
|
|
763
|
+
);
|
|
764
|
+
}
|
|
752
765
|
function move(ctx, params) {
|
|
753
766
|
return call(ctx, "POST", `${base(ctx.appId)}/move`, {
|
|
754
767
|
slug: params.slug,
|
|
@@ -774,8 +787,10 @@ async function waitForMove(ctx, params) {
|
|
|
774
787
|
pollMs: POLL_MS,
|
|
775
788
|
describe: (source2, start2) => renderProgress(source2.migration.progress, start2),
|
|
776
789
|
// A corpus of any size moves as long as it keeps moving; the timeout
|
|
777
|
-
// bounds silence.
|
|
778
|
-
|
|
790
|
+
// bounds silence. The settle moves without copying — it builds the
|
|
791
|
+
// target's full-text index and reports coverage — so its sample time
|
|
792
|
+
// counts as movement too.
|
|
793
|
+
progressKey: (source2) => source2.migration ? `${source2.migration.copied}|${source2.migration.progress.updatedAt ?? ""}` : null,
|
|
779
794
|
onProgress: params.onProgress
|
|
780
795
|
}
|
|
781
796
|
);
|