@madewithremy/admin 0.1.9 → 0.1.11
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 +13 -3
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/prod.js +41 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2693,7 +2693,7 @@ interface StartParams {
|
|
|
2693
2693
|
approve?: boolean;
|
|
2694
2694
|
/** Stop when estimated spend reaches this; default 1.5× the projection. */
|
|
2695
2695
|
budgetDollars?: number;
|
|
2696
|
-
/** Batches in flight at once (default
|
|
2696
|
+
/** Batches in flight at once (default 64, max 128). */
|
|
2697
2697
|
concurrency?: number;
|
|
2698
2698
|
/** Process only the first N objects — a sample of the corpus. */
|
|
2699
2699
|
limit?: number;
|
|
@@ -2743,11 +2743,17 @@ declare function get$7(ctx: AdminContext, params: JobIdParams): Promise<DataSour
|
|
|
2743
2743
|
* `plan_requires_dedicated` (422), `plan_exceeds_capacity` (422),
|
|
2744
2744
|
* `insufficient_credits` (402).
|
|
2745
2745
|
*/
|
|
2746
|
-
declare function approve(ctx: AdminContext, params: JobIdParams
|
|
2746
|
+
declare function approve(ctx: AdminContext, params: JobIdParams & {
|
|
2747
|
+
/** Batches in flight from here on (max 128); the plan was made at the job's current value. */
|
|
2748
|
+
concurrency?: number;
|
|
2749
|
+
}): Promise<DataSourceJobResult>;
|
|
2747
2750
|
/** Stop dispatching batches; the ones in flight finish. */
|
|
2748
2751
|
declare function pause(ctx: AdminContext, params: JobIdParams): Promise<DataSourceJobResult>;
|
|
2749
2752
|
/** Continue from the checkpoint; failed batches with attempts left are retried. */
|
|
2750
|
-
declare function resume$1(ctx: AdminContext, params: JobIdParams
|
|
2753
|
+
declare function resume$1(ctx: AdminContext, params: JobIdParams & {
|
|
2754
|
+
/** Batches in flight from here on (max 128). */
|
|
2755
|
+
concurrency?: number;
|
|
2756
|
+
}): Promise<DataSourceJobResult>;
|
|
2751
2757
|
/** End the job. Documents already indexed stay. */
|
|
2752
2758
|
declare function cancel(ctx: AdminContext, params: JobIdParams): Promise<DataSourceJobResult>;
|
|
2753
2759
|
interface WaitParams$1 {
|
|
@@ -2869,6 +2875,10 @@ interface SyncParams {
|
|
|
2869
2875
|
slug: string;
|
|
2870
2876
|
/** Override the connector's per-sync budget for this run, in dollars. */
|
|
2871
2877
|
budgetDollars?: number;
|
|
2878
|
+
/** Only the first N objects of the listing — a slice to measure or check. */
|
|
2879
|
+
limit?: number;
|
|
2880
|
+
/** Batches in flight (default 64, max 128). */
|
|
2881
|
+
concurrency?: number;
|
|
2872
2882
|
}
|
|
2873
2883
|
/**
|
|
2874
2884
|
* Start a sync: list the bucket, diff by ETag, run a job over what changed.
|
package/dist/index.js
CHANGED
|
@@ -856,7 +856,8 @@ function approve(ctx, params) {
|
|
|
856
856
|
return call(
|
|
857
857
|
ctx,
|
|
858
858
|
"POST",
|
|
859
|
-
`${base2(ctx.appId)}/${encodeURIComponent(params.id)}/approve
|
|
859
|
+
`${base2(ctx.appId)}/${encodeURIComponent(params.id)}/approve`,
|
|
860
|
+
params.concurrency !== void 0 ? { concurrency: params.concurrency } : void 0
|
|
860
861
|
);
|
|
861
862
|
}
|
|
862
863
|
function pause(ctx, params) {
|
|
@@ -870,7 +871,8 @@ function resume(ctx, params) {
|
|
|
870
871
|
return call(
|
|
871
872
|
ctx,
|
|
872
873
|
"POST",
|
|
873
|
-
`${base2(ctx.appId)}/${encodeURIComponent(params.id)}/resume
|
|
874
|
+
`${base2(ctx.appId)}/${encodeURIComponent(params.id)}/resume`,
|
|
875
|
+
params.concurrency !== void 0 ? { concurrency: params.concurrency } : void 0
|
|
874
876
|
);
|
|
875
877
|
}
|
|
876
878
|
function cancel(ctx, params) {
|
|
@@ -1002,7 +1004,9 @@ function disconnect(ctx, params) {
|
|
|
1002
1004
|
function sync(ctx, params) {
|
|
1003
1005
|
return call(ctx, "POST", `${base3(ctx.appId)}/sync`, {
|
|
1004
1006
|
slug: params.slug,
|
|
1005
|
-
...params.budgetDollars !== void 0 ? { budgetDollars: params.budgetDollars } : {}
|
|
1007
|
+
...params.budgetDollars !== void 0 ? { budgetDollars: params.budgetDollars } : {},
|
|
1008
|
+
...params.limit !== void 0 ? { limit: params.limit } : {},
|
|
1009
|
+
...params.concurrency !== void 0 ? { concurrency: params.concurrency } : {}
|
|
1006
1010
|
});
|
|
1007
1011
|
}
|
|
1008
1012
|
|