@printobserver/sdk 0.17.0 → 0.18.0
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/contract.d.ts +151 -3
- package/dist/contract.js +368 -1
- package/package.json +2 -2
package/dist/contract.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const CONTRACT_VERSION: string;
|
|
|
18
18
|
* Every operation this client exposes a method for, which is every operation
|
|
19
19
|
* the server declares and no other.
|
|
20
20
|
*/
|
|
21
|
-
export declare const OPERATION_NAMES: readonly ["prints", "status", "context", "image", "history", "events", "manifest_get", "look", "printer_look", "manifest_set", "spools", "spool", "printer_history", "preflight", "pause", "resume", "cancel", "start_print", "set_feedrate_factor", "set_flowrate_factor", "set_tool_target_c", "set_bed_target_c", "set_fan_percent", "acknowledge_failure", "close_print", "register_spool", "load_spool", "unload_spool", "adjust_spool", "retire_spool", "recover_status", "recover_lift", "recover_cool", "recover_fan", "recover_heat", "recover_park", "recover_home_xy", "recover_home_z", "bed_clear", "recheck_camera"];
|
|
21
|
+
export declare const OPERATION_NAMES: readonly ["prints", "status", "context", "image", "history", "events", "manifest_get", "look", "printer_look", "manifest_set", "spools", "spool", "printer_history", "preflight", "pause", "resume", "cancel", "start_print", "set_feedrate_factor", "set_flowrate_factor", "set_tool_target_c", "set_bed_target_c", "set_fan_percent", "acknowledge_failure", "close_print", "register_spool", "load_spool", "unload_spool", "adjust_spool", "retire_spool", "recover_status", "recover_lift", "recover_cool", "recover_fan", "recover_heat", "recover_park", "recover_home_xy", "recover_home_z", "bed_clear", "recheck_camera", "check_camera", "check_harness"];
|
|
22
22
|
/** What an operator's acknowledgement of a failure event asks for next. */
|
|
23
23
|
export type AcknowledgementDisposition = "continue" | "watch" | "stop";
|
|
24
24
|
/**
|
|
@@ -336,6 +336,90 @@ export interface BedTemperature {
|
|
|
336
336
|
*/
|
|
337
337
|
target_c: number | null;
|
|
338
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* One check of the camera's alignment with its calibration, on the empty
|
|
341
|
+
* sheet: the answer to `check_camera` and the record a start names.
|
|
342
|
+
*
|
|
343
|
+
* An answer, so it admits fields beside its own the way every answer of the
|
|
344
|
+
* server does: a client that could not open `image_path` says so in a field
|
|
345
|
+
* of its own beside the rest.
|
|
346
|
+
*/
|
|
347
|
+
export interface CameraCheck {
|
|
348
|
+
/** The bed's height the check was judged at, as given, in millimetres. */
|
|
349
|
+
bed_z_mm: number;
|
|
350
|
+
/** When it was made. */
|
|
351
|
+
checked_at: Timestamp;
|
|
352
|
+
/**
|
|
353
|
+
* The correction a print started under this check is drawn through,
|
|
354
|
+
* its reference the landmarks found on this frame; present only when
|
|
355
|
+
* `aligned`.
|
|
356
|
+
*/
|
|
357
|
+
correction?: ViewCorrection | null;
|
|
358
|
+
/** The stored frame; null when there is none. */
|
|
359
|
+
frame?: ImageRef | null;
|
|
360
|
+
/** The check. */
|
|
361
|
+
id: CameraCheckId;
|
|
362
|
+
/**
|
|
363
|
+
* The absolute path, on the server's host, of the frame with the fitted
|
|
364
|
+
* sheet outline and the landmarks drawn; null when there is no frame.
|
|
365
|
+
*/
|
|
366
|
+
image_path?: string | null;
|
|
367
|
+
/**
|
|
368
|
+
* How many visible landmarks lie beyond the calibration's drift
|
|
369
|
+
* tolerance; null when there was no frame of the calibration's to search.
|
|
370
|
+
*/
|
|
371
|
+
landmarks_moved?: number | null;
|
|
372
|
+
/** What was found and what to do next, in one sentence. */
|
|
373
|
+
message: string;
|
|
374
|
+
/** The translation `aligned` is held to, in pixels. */
|
|
375
|
+
offset_limit_px: number;
|
|
376
|
+
/**
|
|
377
|
+
* The fitted translation's length, in pixels; null when the sheet could
|
|
378
|
+
* not be fitted.
|
|
379
|
+
*/
|
|
380
|
+
offset_px?: number | null;
|
|
381
|
+
/** The residual above which the frame is unjudgeable, in pixels. */
|
|
382
|
+
residual_limit_px: number;
|
|
383
|
+
/**
|
|
384
|
+
* The RMS distance of the sheet's found edges from the translated
|
|
385
|
+
* outline, in pixels; null when the sheet could not be fitted.
|
|
386
|
+
*/
|
|
387
|
+
residual_px?: number | null;
|
|
388
|
+
/** The sheet it was made on. */
|
|
389
|
+
sheet: SheetId;
|
|
390
|
+
/** Why it could not say; null unless the verdict is `unavailable`. */
|
|
391
|
+
unavailable_reason?: UnavailableReason | null;
|
|
392
|
+
/**
|
|
393
|
+
* What the fit could not judge; null unless the reason is `unjudgeable`,
|
|
394
|
+
* so never set on a frame whose landmarks show the camera moved.
|
|
395
|
+
*/
|
|
396
|
+
unjudgeable_cause?: UnjudgeableCause | null;
|
|
397
|
+
/** What it found. */
|
|
398
|
+
verdict: CameraCheckVerdict;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* A lowercase hyphenated version 7 UUID identifying one check of the
|
|
402
|
+
* camera's alignment on the empty build sheet.
|
|
403
|
+
*/
|
|
404
|
+
export type CameraCheckId = string;
|
|
405
|
+
/** Why a start naming a camera check was refused. */
|
|
406
|
+
export type CameraCheckObjection = {
|
|
407
|
+
objection: "unknown";
|
|
408
|
+
} | {
|
|
409
|
+
objection: "not_aligned";
|
|
410
|
+
verdict: CameraCheckVerdict;
|
|
411
|
+
} | {
|
|
412
|
+
objection: "other_sheet";
|
|
413
|
+
checked_on: SheetId;
|
|
414
|
+
declared: SheetId;
|
|
415
|
+
};
|
|
416
|
+
/** What one camera check found. */
|
|
417
|
+
export type CameraCheckVerdict = "aligned" | "not_aligned" | "unavailable";
|
|
418
|
+
/** One camera check, written into the printer timeline. */
|
|
419
|
+
export interface CameraCheckedPayload {
|
|
420
|
+
/** The check, as it was answered. */
|
|
421
|
+
camera_check: CameraCheck;
|
|
422
|
+
}
|
|
339
423
|
/**
|
|
340
424
|
* The camera gave no usable frame for a look or a periodic observation,
|
|
341
425
|
* however many times it was asked.
|
|
@@ -870,6 +954,31 @@ export interface GcodeIndexedPayload {
|
|
|
870
954
|
/** How many layers it plans. */
|
|
871
955
|
layers: number;
|
|
872
956
|
}
|
|
957
|
+
/**
|
|
958
|
+
* Whether the supervising agent's harness can run a turn right now, why not
|
|
959
|
+
* when it cannot, and what to do about it.
|
|
960
|
+
*/
|
|
961
|
+
export interface HarnessReadiness {
|
|
962
|
+
/** The configured harness identity, `supervisor.harness`. */
|
|
963
|
+
harness: string;
|
|
964
|
+
/**
|
|
965
|
+
* What to do about it: `printobserver sign-in` when a sign-in would fix
|
|
966
|
+
* it, and a sentence otherwise; null when it is ready.
|
|
967
|
+
*/
|
|
968
|
+
next_step: string | null;
|
|
969
|
+
/** True only when `signed_in` is not `no` and `turn` is `answered`. */
|
|
970
|
+
ready: boolean;
|
|
971
|
+
/** Why it is not ready, in one plain sentence; null when it is. */
|
|
972
|
+
reason: string | null;
|
|
973
|
+
/** Whether the harness's own status command says it is signed in. */
|
|
974
|
+
signed_in: HarnessSignedIn;
|
|
975
|
+
/** What became of the check's one turn. */
|
|
976
|
+
turn: HarnessTurn;
|
|
977
|
+
}
|
|
978
|
+
/** Whether the harness says it is signed in. */
|
|
979
|
+
export type HarnessSignedIn = "yes" | "no" | "unknown";
|
|
980
|
+
/** What became of the check's one turn. */
|
|
981
|
+
export type HarnessTurn = "answered" | "failed" | "not_tried";
|
|
873
982
|
/** One tool heater whose target was above zero. */
|
|
874
983
|
export interface HeatedTool {
|
|
875
984
|
/** Its target, in degrees Celsius. */
|
|
@@ -1030,6 +1139,14 @@ export interface JobError {
|
|
|
1030
1139
|
export interface JobManifest {
|
|
1031
1140
|
/** The range each named adjustable may take, inclusive. */
|
|
1032
1141
|
allowed: Record<string, Range>;
|
|
1142
|
+
/**
|
|
1143
|
+
* The camera check, made on this manifest's `sheet` before the print, the
|
|
1144
|
+
* print is drawn through from its first check: a start naming one it
|
|
1145
|
+
* does not find `aligned` on that sheet is refused. Only a start reads
|
|
1146
|
+
* it: a manifest set on a print already started draws as before. A print
|
|
1147
|
+
* naming none draws only once its first layer is clearly found.
|
|
1148
|
+
*/
|
|
1149
|
+
camera_check?: CameraCheckId | null;
|
|
1033
1150
|
/** The file this manifest is about, as the slicer named it. */
|
|
1034
1151
|
file_name: string;
|
|
1035
1152
|
/** The material the job is sliced for. */
|
|
@@ -1821,6 +1938,11 @@ export interface PrintSegmentKey {
|
|
|
1821
1938
|
}
|
|
1822
1939
|
/** A print started. */
|
|
1823
1940
|
export interface PrintStartedPayload {
|
|
1941
|
+
/**
|
|
1942
|
+
* The camera check its manifest named, which every check of the print is
|
|
1943
|
+
* drawn through; absent when it named none.
|
|
1944
|
+
*/
|
|
1945
|
+
camera_check?: CameraCheckId | null;
|
|
1824
1946
|
/** The file being printed, when it is known. */
|
|
1825
1947
|
file_name?: string | null;
|
|
1826
1948
|
/** The spool loaded on each tool as it started. */
|
|
@@ -2219,7 +2341,12 @@ export type RejectionReason = {
|
|
|
2219
2341
|
sheet_refused: {
|
|
2220
2342
|
objection: SheetObjection;
|
|
2221
2343
|
};
|
|
2222
|
-
} | "sheet_not_declared" |
|
|
2344
|
+
} | "sheet_not_declared" | {
|
|
2345
|
+
camera_check_refused: {
|
|
2346
|
+
camera_check: CameraCheckId;
|
|
2347
|
+
objection: CameraCheckObjection;
|
|
2348
|
+
};
|
|
2349
|
+
} | "print_already_ended" | {
|
|
2223
2350
|
print_still_active: {
|
|
2224
2351
|
state: PrinterState;
|
|
2225
2352
|
};
|
|
@@ -2861,6 +2988,10 @@ export interface UnattendedPrinterActivityPayload {
|
|
|
2861
2988
|
/** Every tool whose target is above zero. */
|
|
2862
2989
|
tools: Array<HeatedTool>;
|
|
2863
2990
|
}
|
|
2991
|
+
/** Why a camera check could not say whether the camera is aligned. */
|
|
2992
|
+
export type UnavailableReason = "no_frame" | "look_failed" | "frame_mismatch" | "no_calibration" | "unjudgeable";
|
|
2993
|
+
/** Why a frame could not show whether the camera is aligned. */
|
|
2994
|
+
export type UnjudgeableCause = "too_little_sheet_in_view" | "no_sheet_found" | "sheet_occluded" | "landmarks_hidden" | "fit_inconsistent";
|
|
2864
2995
|
/** One reason a spool's figure is in doubt, and since when. */
|
|
2865
2996
|
export interface UnverifiedMark {
|
|
2866
2997
|
/** Why the figure is in doubt. */
|
|
@@ -2946,6 +3077,7 @@ export interface EventPayloads {
|
|
|
2946
3077
|
agent_assessment: AgentAssessmentPayload;
|
|
2947
3078
|
agent_stop_unacted: AgentStopUnactedPayload;
|
|
2948
3079
|
bed_clear_asserted: BedClearAssertedPayload;
|
|
3080
|
+
camera_checked: CameraCheckedPayload;
|
|
2949
3081
|
camera_degraded: CameraDegradedPayload;
|
|
2950
3082
|
camera_look: CameraLookPayload;
|
|
2951
3083
|
camera_retry: CameraRetryPayload;
|
|
@@ -2991,7 +3123,7 @@ export interface EventPayloads {
|
|
|
2991
3123
|
unattended_printer_activity: UnattendedPrinterActivityPayload;
|
|
2992
3124
|
}
|
|
2993
3125
|
/** Every kind the server declares a payload type for, in name order. */
|
|
2994
|
-
export declare const EVENT_KINDS: readonly ["action_executed", "action_rejected", "action_requested", "agent_assessment", "agent_stop_unacted", "bed_clear_asserted", "camera_degraded", "camera_look", "camera_retry", "camera_view_judged", "camera_view_refit", "charge_pended", "check_image_changed", "detector_health_changed", "filament_change_planned_reached", "filament_change_planned_resumed", "filament_change_signalled", "filament_consumed", "file_tally_rebaselined", "first_layer_alignment_judged", "gcode_indexed", "intervention_expired", "malformed_external_event", "obico_failure_alert", "obico_printer_notification", "operator_acknowledgement", "periodic_observation", "port_failure", "preflight_checked", "print_ended", "print_started", "print_untracked", "printer_connection_changed", "printer_reset", "recovery_executed", "recovery_rejected", "recovery_requested", "spool_adjusted", "spool_command_rejected", "spool_loaded", "spool_registered", "spool_retired", "spool_unloaded", "spool_unverified", "startup_reconciliation", "supervision_session_closed", "supervision_session_opened", "unaccounted_print", "unattended_printer_activity"];
|
|
3126
|
+
export declare const EVENT_KINDS: readonly ["action_executed", "action_rejected", "action_requested", "agent_assessment", "agent_stop_unacted", "bed_clear_asserted", "camera_checked", "camera_degraded", "camera_look", "camera_retry", "camera_view_judged", "camera_view_refit", "charge_pended", "check_image_changed", "detector_health_changed", "filament_change_planned_reached", "filament_change_planned_resumed", "filament_change_signalled", "filament_consumed", "file_tally_rebaselined", "first_layer_alignment_judged", "gcode_indexed", "intervention_expired", "malformed_external_event", "obico_failure_alert", "obico_printer_notification", "operator_acknowledgement", "periodic_observation", "port_failure", "preflight_checked", "print_ended", "print_started", "print_untracked", "printer_connection_changed", "printer_reset", "recovery_executed", "recovery_rejected", "recovery_requested", "spool_adjusted", "spool_command_rejected", "spool_loaded", "spool_registered", "spool_retired", "spool_unloaded", "spool_unverified", "startup_reconciliation", "supervision_session_closed", "supervision_session_opened", "unaccounted_print", "unattended_printer_activity"];
|
|
2995
3127
|
/**
|
|
2996
3128
|
* The payload of one event as the type its kind declares, or `undefined` for
|
|
2997
3129
|
* an event of any other kind — one this client knows or one it does not. No
|
|
@@ -3385,4 +3517,20 @@ export declare class GeneratedClient extends GeneratedSurface {
|
|
|
3385
3517
|
* the reason, the value asked for and the range allowed.
|
|
3386
3518
|
*/
|
|
3387
3519
|
recheckCamera(printId: string, reason: string): Promise<RecheckCameraAnswer>;
|
|
3520
|
+
/**
|
|
3521
|
+
* Call `check_camera` on the configured supervisor.
|
|
3522
|
+
*
|
|
3523
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
3524
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
3525
|
+
* said no.
|
|
3526
|
+
*/
|
|
3527
|
+
checkCamera(sheet: SheetId, bedZMm: number): Promise<CameraCheck>;
|
|
3528
|
+
/**
|
|
3529
|
+
* Call `check_harness` on the configured supervisor.
|
|
3530
|
+
*
|
|
3531
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
3532
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
3533
|
+
* said no.
|
|
3534
|
+
*/
|
|
3535
|
+
checkHarness(): Promise<HarnessReadiness>;
|
|
3388
3536
|
}
|
package/dist/contract.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* generate-clients`, and commit what that writes.
|
|
8
8
|
*/
|
|
9
9
|
import { GeneratedSurface, reasonGiven } from "./surface.js";
|
|
10
|
-
export const CONTRACT_VERSION = "0.
|
|
10
|
+
export const CONTRACT_VERSION = "0.18.0";
|
|
11
11
|
/**
|
|
12
12
|
* Every operation this client exposes a method for, which is every operation
|
|
13
13
|
* the server declares and no other.
|
|
@@ -53,6 +53,8 @@ export const OPERATION_NAMES = [
|
|
|
53
53
|
"recover_home_z",
|
|
54
54
|
"bed_clear",
|
|
55
55
|
"recheck_camera",
|
|
56
|
+
"check_camera",
|
|
57
|
+
"check_harness",
|
|
56
58
|
];
|
|
57
59
|
/** Every kind the server declares a payload type for, in name order. */
|
|
58
60
|
export const EVENT_KINDS = [
|
|
@@ -62,6 +64,7 @@ export const EVENT_KINDS = [
|
|
|
62
64
|
"agent_assessment",
|
|
63
65
|
"agent_stop_unacted",
|
|
64
66
|
"bed_clear_asserted",
|
|
67
|
+
"camera_checked",
|
|
65
68
|
"camera_degraded",
|
|
66
69
|
"camera_look",
|
|
67
70
|
"camera_retry",
|
|
@@ -883,6 +886,214 @@ export const SHAPES = JSON.parse(`
|
|
|
883
886
|
"variants": {}
|
|
884
887
|
}
|
|
885
888
|
},
|
|
889
|
+
"CameraCheck": {
|
|
890
|
+
"struct": {
|
|
891
|
+
"fields": {
|
|
892
|
+
"bed_z_mm": {
|
|
893
|
+
"paired_with": "",
|
|
894
|
+
"required": true,
|
|
895
|
+
"shape": {
|
|
896
|
+
"scalar": "number"
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
"checked_at": {
|
|
900
|
+
"paired_with": "",
|
|
901
|
+
"required": true,
|
|
902
|
+
"shape": {
|
|
903
|
+
"ref": "Timestamp"
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
"correction": {
|
|
907
|
+
"paired_with": "",
|
|
908
|
+
"required": false,
|
|
909
|
+
"shape": {
|
|
910
|
+
"nullable": {
|
|
911
|
+
"ref": "ViewCorrection"
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
"frame": {
|
|
916
|
+
"paired_with": "",
|
|
917
|
+
"required": false,
|
|
918
|
+
"shape": {
|
|
919
|
+
"nullable": {
|
|
920
|
+
"ref": "ImageRef"
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
"id": {
|
|
925
|
+
"paired_with": "",
|
|
926
|
+
"required": true,
|
|
927
|
+
"shape": {
|
|
928
|
+
"ref": "CameraCheckId"
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
"image_path": {
|
|
932
|
+
"paired_with": "",
|
|
933
|
+
"required": false,
|
|
934
|
+
"shape": {
|
|
935
|
+
"nullable": {
|
|
936
|
+
"scalar": "string"
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
"landmarks_moved": {
|
|
941
|
+
"paired_with": "",
|
|
942
|
+
"required": false,
|
|
943
|
+
"shape": {
|
|
944
|
+
"nullable": {
|
|
945
|
+
"scalar": "integer"
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
"message": {
|
|
950
|
+
"paired_with": "",
|
|
951
|
+
"required": true,
|
|
952
|
+
"shape": {
|
|
953
|
+
"scalar": "string"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
"offset_limit_px": {
|
|
957
|
+
"paired_with": "",
|
|
958
|
+
"required": true,
|
|
959
|
+
"shape": {
|
|
960
|
+
"scalar": "number"
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
"offset_px": {
|
|
964
|
+
"paired_with": "",
|
|
965
|
+
"required": false,
|
|
966
|
+
"shape": {
|
|
967
|
+
"nullable": {
|
|
968
|
+
"scalar": "number"
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
"residual_limit_px": {
|
|
973
|
+
"paired_with": "",
|
|
974
|
+
"required": true,
|
|
975
|
+
"shape": {
|
|
976
|
+
"scalar": "number"
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
"residual_px": {
|
|
980
|
+
"paired_with": "",
|
|
981
|
+
"required": false,
|
|
982
|
+
"shape": {
|
|
983
|
+
"nullable": {
|
|
984
|
+
"scalar": "number"
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
"sheet": {
|
|
989
|
+
"paired_with": "",
|
|
990
|
+
"required": true,
|
|
991
|
+
"shape": {
|
|
992
|
+
"ref": "SheetId"
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"unavailable_reason": {
|
|
996
|
+
"paired_with": "",
|
|
997
|
+
"required": false,
|
|
998
|
+
"shape": {
|
|
999
|
+
"nullable": {
|
|
1000
|
+
"ref": "UnavailableReason"
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
"unjudgeable_cause": {
|
|
1005
|
+
"paired_with": "",
|
|
1006
|
+
"required": false,
|
|
1007
|
+
"shape": {
|
|
1008
|
+
"nullable": {
|
|
1009
|
+
"ref": "UnjudgeableCause"
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
"verdict": {
|
|
1014
|
+
"paired_with": "",
|
|
1015
|
+
"required": true,
|
|
1016
|
+
"shape": {
|
|
1017
|
+
"ref": "CameraCheckVerdict"
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
"tag_field": "",
|
|
1022
|
+
"variants": {}
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
"CameraCheckId": {
|
|
1026
|
+
"alias": {
|
|
1027
|
+
"scalar": "string"
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
"CameraCheckObjection": {
|
|
1031
|
+
"union": {
|
|
1032
|
+
"tag_field": "objection",
|
|
1033
|
+
"variants": {
|
|
1034
|
+
"not_aligned": {
|
|
1035
|
+
"fields": {
|
|
1036
|
+
"verdict": {
|
|
1037
|
+
"paired_with": "",
|
|
1038
|
+
"required": true,
|
|
1039
|
+
"shape": {
|
|
1040
|
+
"ref": "CameraCheckVerdict"
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
"payload": null,
|
|
1045
|
+
"unit": false
|
|
1046
|
+
},
|
|
1047
|
+
"other_sheet": {
|
|
1048
|
+
"fields": {
|
|
1049
|
+
"checked_on": {
|
|
1050
|
+
"paired_with": "",
|
|
1051
|
+
"required": true,
|
|
1052
|
+
"shape": {
|
|
1053
|
+
"ref": "SheetId"
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"declared": {
|
|
1057
|
+
"paired_with": "",
|
|
1058
|
+
"required": true,
|
|
1059
|
+
"shape": {
|
|
1060
|
+
"ref": "SheetId"
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
"payload": null,
|
|
1065
|
+
"unit": false
|
|
1066
|
+
},
|
|
1067
|
+
"unknown": {
|
|
1068
|
+
"fields": {},
|
|
1069
|
+
"payload": null,
|
|
1070
|
+
"unit": true
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
"CameraCheckVerdict": {
|
|
1076
|
+
"enum": [
|
|
1077
|
+
"aligned",
|
|
1078
|
+
"not_aligned",
|
|
1079
|
+
"unavailable"
|
|
1080
|
+
]
|
|
1081
|
+
},
|
|
1082
|
+
"CameraCheckedPayload": {
|
|
1083
|
+
"struct": {
|
|
1084
|
+
"fields": {
|
|
1085
|
+
"camera_check": {
|
|
1086
|
+
"paired_with": "",
|
|
1087
|
+
"required": true,
|
|
1088
|
+
"shape": {
|
|
1089
|
+
"ref": "CameraCheck"
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
},
|
|
1093
|
+
"tag_field": "",
|
|
1094
|
+
"variants": {}
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
886
1097
|
"CameraDegradedPayload": {
|
|
887
1098
|
"struct": {
|
|
888
1099
|
"fields": {
|
|
@@ -2088,6 +2299,74 @@ export const SHAPES = JSON.parse(`
|
|
|
2088
2299
|
"variants": {}
|
|
2089
2300
|
}
|
|
2090
2301
|
},
|
|
2302
|
+
"HarnessReadiness": {
|
|
2303
|
+
"struct": {
|
|
2304
|
+
"fields": {
|
|
2305
|
+
"harness": {
|
|
2306
|
+
"paired_with": "",
|
|
2307
|
+
"required": true,
|
|
2308
|
+
"shape": {
|
|
2309
|
+
"scalar": "string"
|
|
2310
|
+
}
|
|
2311
|
+
},
|
|
2312
|
+
"next_step": {
|
|
2313
|
+
"paired_with": "",
|
|
2314
|
+
"required": true,
|
|
2315
|
+
"shape": {
|
|
2316
|
+
"nullable": {
|
|
2317
|
+
"scalar": "string"
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
},
|
|
2321
|
+
"ready": {
|
|
2322
|
+
"paired_with": "",
|
|
2323
|
+
"required": true,
|
|
2324
|
+
"shape": {
|
|
2325
|
+
"scalar": "boolean"
|
|
2326
|
+
}
|
|
2327
|
+
},
|
|
2328
|
+
"reason": {
|
|
2329
|
+
"paired_with": "",
|
|
2330
|
+
"required": true,
|
|
2331
|
+
"shape": {
|
|
2332
|
+
"nullable": {
|
|
2333
|
+
"scalar": "string"
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2337
|
+
"signed_in": {
|
|
2338
|
+
"paired_with": "",
|
|
2339
|
+
"required": true,
|
|
2340
|
+
"shape": {
|
|
2341
|
+
"ref": "HarnessSignedIn"
|
|
2342
|
+
}
|
|
2343
|
+
},
|
|
2344
|
+
"turn": {
|
|
2345
|
+
"paired_with": "",
|
|
2346
|
+
"required": true,
|
|
2347
|
+
"shape": {
|
|
2348
|
+
"ref": "HarnessTurn"
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
},
|
|
2352
|
+
"tag_field": "",
|
|
2353
|
+
"variants": {}
|
|
2354
|
+
}
|
|
2355
|
+
},
|
|
2356
|
+
"HarnessSignedIn": {
|
|
2357
|
+
"enum": [
|
|
2358
|
+
"yes",
|
|
2359
|
+
"no",
|
|
2360
|
+
"unknown"
|
|
2361
|
+
]
|
|
2362
|
+
},
|
|
2363
|
+
"HarnessTurn": {
|
|
2364
|
+
"enum": [
|
|
2365
|
+
"answered",
|
|
2366
|
+
"failed",
|
|
2367
|
+
"not_tried"
|
|
2368
|
+
]
|
|
2369
|
+
},
|
|
2091
2370
|
"HeatedTool": {
|
|
2092
2371
|
"struct": {
|
|
2093
2372
|
"fields": {
|
|
@@ -2515,6 +2794,15 @@ export const SHAPES = JSON.parse(`
|
|
|
2515
2794
|
}
|
|
2516
2795
|
}
|
|
2517
2796
|
},
|
|
2797
|
+
"camera_check": {
|
|
2798
|
+
"paired_with": "",
|
|
2799
|
+
"required": false,
|
|
2800
|
+
"shape": {
|
|
2801
|
+
"nullable": {
|
|
2802
|
+
"ref": "CameraCheckId"
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
2805
|
+
},
|
|
2518
2806
|
"file_name": {
|
|
2519
2807
|
"paired_with": "",
|
|
2520
2808
|
"required": true,
|
|
@@ -4777,6 +5065,15 @@ export const SHAPES = JSON.parse(`
|
|
|
4777
5065
|
"PrintStartedPayload": {
|
|
4778
5066
|
"struct": {
|
|
4779
5067
|
"fields": {
|
|
5068
|
+
"camera_check": {
|
|
5069
|
+
"paired_with": "",
|
|
5070
|
+
"required": false,
|
|
5071
|
+
"shape": {
|
|
5072
|
+
"nullable": {
|
|
5073
|
+
"ref": "CameraCheckId"
|
|
5074
|
+
}
|
|
5075
|
+
}
|
|
5076
|
+
},
|
|
4780
5077
|
"file_name": {
|
|
4781
5078
|
"paired_with": "",
|
|
4782
5079
|
"required": false,
|
|
@@ -5761,6 +6058,26 @@ export const SHAPES = JSON.parse(`
|
|
|
5761
6058
|
"payload": null,
|
|
5762
6059
|
"unit": false
|
|
5763
6060
|
},
|
|
6061
|
+
"camera_check_refused": {
|
|
6062
|
+
"fields": {
|
|
6063
|
+
"camera_check": {
|
|
6064
|
+
"paired_with": "",
|
|
6065
|
+
"required": true,
|
|
6066
|
+
"shape": {
|
|
6067
|
+
"ref": "CameraCheckId"
|
|
6068
|
+
}
|
|
6069
|
+
},
|
|
6070
|
+
"objection": {
|
|
6071
|
+
"paired_with": "",
|
|
6072
|
+
"required": true,
|
|
6073
|
+
"shape": {
|
|
6074
|
+
"ref": "CameraCheckObjection"
|
|
6075
|
+
}
|
|
6076
|
+
}
|
|
6077
|
+
},
|
|
6078
|
+
"payload": null,
|
|
6079
|
+
"unit": false
|
|
6080
|
+
},
|
|
5764
6081
|
"insufficient_filament": {
|
|
5765
6082
|
"fields": {
|
|
5766
6083
|
"buffer_g": {
|
|
@@ -7928,6 +8245,24 @@ export const SHAPES = JSON.parse(`
|
|
|
7928
8245
|
"variants": {}
|
|
7929
8246
|
}
|
|
7930
8247
|
},
|
|
8248
|
+
"UnavailableReason": {
|
|
8249
|
+
"enum": [
|
|
8250
|
+
"no_frame",
|
|
8251
|
+
"look_failed",
|
|
8252
|
+
"frame_mismatch",
|
|
8253
|
+
"no_calibration",
|
|
8254
|
+
"unjudgeable"
|
|
8255
|
+
]
|
|
8256
|
+
},
|
|
8257
|
+
"UnjudgeableCause": {
|
|
8258
|
+
"enum": [
|
|
8259
|
+
"too_little_sheet_in_view",
|
|
8260
|
+
"no_sheet_found",
|
|
8261
|
+
"sheet_occluded",
|
|
8262
|
+
"landmarks_hidden",
|
|
8263
|
+
"fit_inconsistent"
|
|
8264
|
+
]
|
|
8265
|
+
},
|
|
7931
8266
|
"UnverifiedMark": {
|
|
7932
8267
|
"struct": {
|
|
7933
8268
|
"fields": {
|
|
@@ -8969,4 +9304,36 @@ export class GeneratedClient extends GeneratedSurface {
|
|
|
8969
9304
|
sending.reason = reason;
|
|
8970
9305
|
return await this.call("POST", target, asked, sending, "RecheckCameraAnswer");
|
|
8971
9306
|
}
|
|
9307
|
+
/**
|
|
9308
|
+
* Call `check_camera` on the configured supervisor.
|
|
9309
|
+
*
|
|
9310
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
9311
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
9312
|
+
* said no.
|
|
9313
|
+
*/
|
|
9314
|
+
async checkCamera(sheet, bedZMm) {
|
|
9315
|
+
const target = `/v1/camera/check`;
|
|
9316
|
+
const asked = [];
|
|
9317
|
+
if (sheet !== undefined) {
|
|
9318
|
+
asked.push(["sheet", String(sheet)]);
|
|
9319
|
+
}
|
|
9320
|
+
if (bedZMm !== undefined) {
|
|
9321
|
+
asked.push(["bed_z_mm", String(bedZMm)]);
|
|
9322
|
+
}
|
|
9323
|
+
const sending = undefined;
|
|
9324
|
+
return await this.call("GET", target, asked, sending, "CameraCheck");
|
|
9325
|
+
}
|
|
9326
|
+
/**
|
|
9327
|
+
* Call `check_harness` on the configured supervisor.
|
|
9328
|
+
*
|
|
9329
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
9330
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
9331
|
+
* said no.
|
|
9332
|
+
*/
|
|
9333
|
+
async checkHarness() {
|
|
9334
|
+
const target = `/v1/harness/check`;
|
|
9335
|
+
const asked = [];
|
|
9336
|
+
const sending = undefined;
|
|
9337
|
+
return await this.call("GET", target, asked, sending, "HarnessReadiness");
|
|
9338
|
+
}
|
|
8972
9339
|
}
|
package/package.json
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"name": "@printobserver/sdk",
|
|
15
|
-
"printobserverContractVersion": "0.
|
|
15
|
+
"printobserverContractVersion": "0.18.0",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "https://github.com/nickderobertis/printobserver"
|
|
19
19
|
},
|
|
20
20
|
"type": "module",
|
|
21
21
|
"types": "dist/index.d.ts",
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.18.0"
|
|
23
23
|
}
|