@madewithremy/admin 0.1.34 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2080,14 +2080,19 @@ interface DataSourceReader {
2080
2080
  */
2081
2081
  interface DataSourceReaderDeliveries {
2082
2082
  pending: number;
2083
+ /** Sent to frames that are reading them now, up to a frame's worth for each of the reader's frames. */
2083
2084
  inFlight: number;
2084
2085
  retrying: number;
2085
2086
  parked: number;
2086
- /** The newest failures, the document null for a `cleared`. */
2087
+ /**
2088
+ * The newest failures, the document null for a `cleared`: when each failed
2089
+ * (null if unknown) and when it is tried again (null once parked).
2090
+ */
2087
2091
  recentErrors: {
2088
2092
  documentId: string | null;
2089
2093
  error: string;
2090
- at: string;
2094
+ failedAt: string | null;
2095
+ retryAt: string | null;
2091
2096
  }[];
2092
2097
  }
2093
2098
  /** POST /datasources/reader/status */
@@ -3543,7 +3548,7 @@ declare function get$7(ctx: AdminContext, params: JobIdParams): Promise<DataSour
3543
3548
  *
3544
3549
  * @throws AdminApiError `job_not_found` (404), `invalid_transition` (422),
3545
3550
  * `plan_requires_dedicated` (422), `plan_exceeds_capacity` (422),
3546
- * `insufficient_credits` (402).
3551
+ * `insufficient_credits/*` (402).
3547
3552
  */
3548
3553
  declare function approve(ctx: AdminContext, params: JobIdParams & {
3549
3554
  /** Batches in flight from here on (max 128); the plan was made at the job's current value. */
@@ -5561,7 +5566,7 @@ interface ProvisionParams {
5561
5566
  * within a minute or so. Use `waitForPhase` to block on that.
5562
5567
  *
5563
5568
  * @throws AdminApiError `offering_not_found` (400), `offering_retired` (422),
5564
- * `provisioning_unavailable` (422), `insufficient_credits` (402).
5569
+ * `provisioning_unavailable` (422), `insufficient_credits/*` (402).
5565
5570
  * @example
5566
5571
  * const { resource } = await admin.infra.provision({ offeringId: 'retrieval.small' });
5567
5572
  */
@@ -5615,7 +5620,7 @@ interface ResizeParams {
5615
5620
  * @throws AdminApiError `resource_not_found` (404), `offering_not_found`
5616
5621
  * (400), `offering_retired` (422), `same_offering` (400),
5617
5622
  * `offering_kind_mismatch` (400), `resize_pending` (422), `resize_too_small`
5618
- * (422), `insufficient_credits` (402), `invalid_transition` (422).
5623
+ * (422), `insufficient_credits/*` (402), `invalid_transition` (422).
5619
5624
  * @example
5620
5625
  * await admin.infra.resize({ id, offeringId: 'retrieval.medium' });
5621
5626
  */
@@ -6849,6 +6854,14 @@ interface MethodsInvokeResult {
6849
6854
  * and user-facing error messages.
6850
6855
  */
6851
6856
 
6857
+ /**
6858
+ * How long an invoke waits for the method's answer: as long as the API's load
6859
+ * balancer holds an idle connection (600 s), since a method can run for many
6860
+ * minutes and a request can't outwait that. A method still running past it
6861
+ * carries on; `requests list --method <id>` shows how it ended.
6862
+ * @internal Consumed by the CLI skin; not part of the documented surface.
6863
+ */
6864
+ declare const METHOD_RUN_TIMEOUT_MS = 600000;
6852
6865
  interface MethodsInvokeParams {
6853
6866
  /** The method's compiled id (e.g. `mth_abc123`), as shown by `methods.list`. */
6854
6867
  methodId: string;
@@ -6891,10 +6904,11 @@ declare function list$4(ctx: AdminContext): Promise<DashboardReleaseMethod[]>;
6891
6904
  */
6892
6905
  declare function invoke(ctx: AdminContext, params: MethodsInvokeParams): Promise<MethodsInvokeResult>;
6893
6906
 
6907
+ declare const methods_METHOD_RUN_TIMEOUT_MS: typeof METHOD_RUN_TIMEOUT_MS;
6894
6908
  type methods_MethodsInvokeParams = MethodsInvokeParams;
6895
6909
  declare const methods_invoke: typeof invoke;
6896
6910
  declare namespace methods {
6897
- export { type methods_MethodsInvokeParams as MethodsInvokeParams, methods_invoke as invoke, list$4 as list };
6911
+ export { methods_METHOD_RUN_TIMEOUT_MS as METHOD_RUN_TIMEOUT_MS, type methods_MethodsInvokeParams as MethodsInvokeParams, methods_invoke as invoke, list$4 as list };
6898
6912
  }
6899
6913
 
6900
6914
  /**
@@ -8161,7 +8175,7 @@ interface NumbersBuyParams {
8161
8175
  * @throws AdminApiError `invalid_phone_number` (400) — not a valid +1 E.164
8162
8176
  * US number; `number_already_assigned` (422) — this app already has a live
8163
8177
  * number; `number_unavailable` (422) — the number is no longer available;
8164
- * `insufficient_credits` (402) — the workspace balance is too low;
8178
+ * `insufficient_credits/*` (402) — the workspace can't cover it;
8165
8179
  * `telnyx_not_configured` (422) — phone numbers unavailable on this host.
8166
8180
  * @example
8167
8181
  * const { number } = await admin.voice.numbersBuy({
package/dist/index.js CHANGED
@@ -2487,9 +2487,11 @@ function grade(ctx, runId) {
2487
2487
  // src/ops/methods.ts
2488
2488
  var methods_exports = {};
2489
2489
  __export(methods_exports, {
2490
+ METHOD_RUN_TIMEOUT_MS: () => METHOD_RUN_TIMEOUT_MS,
2490
2491
  invoke: () => invoke,
2491
2492
  list: () => list10
2492
2493
  });
2494
+ var METHOD_RUN_TIMEOUT_MS = 6e5;
2493
2495
  async function list10(ctx) {
2494
2496
  const dashboard = await call(
2495
2497
  ctx,
@@ -2507,7 +2509,13 @@ function invoke(ctx, params) {
2507
2509
  const useImpersonate = impersonate !== void 0 && (impersonate.roles !== void 0 || impersonate.userId !== void 0);
2508
2510
  const apiPath = useImpersonate ? `/_internal/v2/apps/${ctx.appId}/methods/${seg(methodId)}/invoke-as` : `/_internal/v2/apps/${ctx.appId}/methods/${seg(methodId)}/invoke`;
2509
2511
  const body = useImpersonate ? { input, impersonate } : { input };
2510
- return call(ctx, "POST", apiPath, body);
2512
+ return call(
2513
+ ctx,
2514
+ "POST",
2515
+ apiPath,
2516
+ body,
2517
+ METHOD_RUN_TIMEOUT_MS
2518
+ );
2511
2519
  }
2512
2520
 
2513
2521
  // src/ops/prerender.ts