@vxil/sdk 0.14.0 → 0.14.1
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 +33 -1
- package/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -392,6 +392,33 @@ export interface JobRun {
|
|
|
392
392
|
* `processing` ping on its signed callback (plain run) or its provider's
|
|
393
393
|
* webhook (generation run). null until one arrives. */
|
|
394
394
|
progress?: JobRunProgress | null;
|
|
395
|
+
/** the single-run read, generation runs only: the LAST `status_mirror`
|
|
396
|
+
* write the target refused, or null. A full write refused as a body
|
|
397
|
+
* problem (400 / 413 / 422 — e.g. a callback key the collection does not
|
|
398
|
+
* declare) is retried with only the status column (a progress update tries
|
|
399
|
+
* the declared `progress_fields` first), so an undeclared key no longer
|
|
400
|
+
* strands the row; this says what was dropped. Never flips the run; not cleared by a later
|
|
401
|
+
* successful mirror (compare `generation_status` / `at`). */
|
|
402
|
+
mirror_error?: JobRunMirrorError | null;
|
|
403
|
+
}
|
|
404
|
+
/** A refused status-mirror write (`JobRun.mirror_error`). */
|
|
405
|
+
export interface JobRunMirrorError {
|
|
406
|
+
/** the status word the refused write carried */
|
|
407
|
+
generation_status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
408
|
+
/** the target's HTTP status on the full write; 0 = no answer (network / timeout) */
|
|
409
|
+
status: number;
|
|
410
|
+
/** the target's error code (e.g. `validation_failed`), `network_error` / `timeout`, or null */
|
|
411
|
+
code: string | null;
|
|
412
|
+
/** the target's message (≤ 200 chars), e.g. "unknown field 'video_url'" */
|
|
413
|
+
message: string | null;
|
|
414
|
+
/** when it was refused (ISO) */
|
|
415
|
+
at: string;
|
|
416
|
+
/** present when a narrower retry LANDED: the keys that were not written */
|
|
417
|
+
fields_dropped?: string[];
|
|
418
|
+
/** present when every narrower retry was refused too (the last one's HTTP
|
|
419
|
+
* status, 0 = no answer): the status word itself was refused and the
|
|
420
|
+
* record still holds the previous status */
|
|
421
|
+
retry_status?: number;
|
|
395
422
|
}
|
|
396
423
|
/** A run's latest progress report (`JobRun.progress`): only these keys pass. */
|
|
397
424
|
export interface JobRunProgress {
|
|
@@ -2987,7 +3014,12 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
2987
3014
|
* sends `provider.body` exactly; `completion.status_map` maps up to 8
|
|
2988
3015
|
* provider words to completed | failed | processing (`{ OK: 'completed',
|
|
2989
3016
|
* ERROR: 'failed' }`); `completion.result_path` names the value the run
|
|
2990
|
-
* settles with — the status mirror receives it as `result`.
|
|
3017
|
+
* settles with — the status mirror receives it as `result`.
|
|
3018
|
+
*
|
|
3019
|
+
* A mirror write the record refuses never fails the run: a body refusal
|
|
3020
|
+
* (e.g. a callback key the collection does not declare) is retried with
|
|
3021
|
+
* only the status column, so the row still reaches `completed`; the run then reports `mirror_error`
|
|
3022
|
+
* (`JobRun.mirror_error` on `vx.jobs.run(run_id)`). */
|
|
2991
3023
|
generation: (input: {
|
|
2992
3024
|
job_name: string;
|
|
2993
3025
|
provider: {
|
package/dist/index.js
CHANGED
|
@@ -718,7 +718,12 @@ export class Vxil {
|
|
|
718
718
|
* sends `provider.body` exactly; `completion.status_map` maps up to 8
|
|
719
719
|
* provider words to completed | failed | processing (`{ OK: 'completed',
|
|
720
720
|
* ERROR: 'failed' }`); `completion.result_path` names the value the run
|
|
721
|
-
* settles with — the status mirror receives it as `result`.
|
|
721
|
+
* settles with — the status mirror receives it as `result`.
|
|
722
|
+
*
|
|
723
|
+
* A mirror write the record refuses never fails the run: a body refusal
|
|
724
|
+
* (e.g. a callback key the collection does not declare) is retried with
|
|
725
|
+
* only the status column, so the row still reaches `completed`; the run then reports `mirror_error`
|
|
726
|
+
* (`JobRun.mirror_error` on `vx.jobs.run(run_id)`). */
|
|
722
727
|
generation: async (input) => (await this.call('POST', '/v1/jobs/generation', input)).data,
|
|
723
728
|
runs: async (q) => {
|
|
724
729
|
const s = qs({
|
package/package.json
CHANGED