@printobserver/sdk 0.16.2 → 0.17.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.
@@ -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"];
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"];
22
22
  /** What an operator's acknowledgement of a failure event asks for next. */
23
23
  export type AcknowledgementDisposition = "continue" | "watch" | "stop";
24
24
  /**
@@ -276,6 +276,19 @@ export interface AgentStopUnactedPayload {
276
276
  /** What the agent said it saw, as its answer's summary put it. */
277
277
  summary: string;
278
278
  }
279
+ /** Why a print's alignment failed. */
280
+ export type AlignmentFailure = {
281
+ failure: "offset";
282
+ offset_px: number;
283
+ } | {
284
+ failure: "resolution";
285
+ expected: Array<number>;
286
+ got: Array<number>;
287
+ } | {
288
+ failure: "stream";
289
+ };
290
+ /** What one judgement of a print's first layer came to. */
291
+ export type AlignmentJudgedVerdict = "passed" | "inconclusive" | "failed";
279
292
  /**
280
293
  * Who may say the bed is clear: the operator, and no other actor.
281
294
  *
@@ -392,6 +405,35 @@ export interface CameraRetryPayload {
392
405
  /** The HTTP status the camera answered. */
393
406
  status: number;
394
407
  }
408
+ /**
409
+ * One judgement of a print's camera view, on one frame: one for every
410
+ * judgement, whatever it found and whether or not it repeats the last.
411
+ */
412
+ export interface CameraViewJudgedPayload {
413
+ /** The stored frame it was judged on. */
414
+ frame_sha256: string;
415
+ /** What it found. */
416
+ outcome: ViewOutcome;
417
+ /**
418
+ * Why the frame may not be drawn on: for the three refusals, and for a
419
+ * refit view, whose camera has moved since its calibration; null for an
420
+ * unshifted one.
421
+ */
422
+ reason?: string | null;
423
+ /** The correction in force when the frame was judged; null when none was. */
424
+ view_correction?: ViewCorrection | null;
425
+ }
426
+ /**
427
+ * A first-layer pass put a correction in force while the landmarks had moved
428
+ * from the calibration: the print's first, or one taken again after the
429
+ * camera moved again.
430
+ */
431
+ export interface CameraViewRefitPayload {
432
+ /** The stored frame the correction was taken on. */
433
+ frame_sha256: string;
434
+ /** The correction now in force. */
435
+ view_correction: ViewCorrection;
436
+ }
395
437
  /** The durable identity of one debit, so that a replay can never debit twice. */
396
438
  export type ChargeKey = {
397
439
  key: "print";
@@ -440,6 +482,19 @@ export interface ChargedFilament {
440
482
  /** The spool charged. */
441
483
  spool_id: SpoolId;
442
484
  }
485
+ /**
486
+ * The image a print's checks are shown changed: its first check's image, and
487
+ * every check whose image kind or fallback code differs from the last one
488
+ * recorded.
489
+ */
490
+ export interface CheckImageChangedPayload {
491
+ /** Why it was the whole frame; null for the three-panel image. */
492
+ fallback?: ImageFallback | null;
493
+ /** The stored frame the check's image was made of. */
494
+ frame_sha256: string;
495
+ /** Which image the check was shown. */
496
+ kind: ImageKind;
497
+ }
443
498
  /** One mark a spool command cleared, and the spool it was cleared from. */
444
499
  export interface ClearedMark {
445
500
  /** The reason that no longer stands. */
@@ -752,6 +807,38 @@ export interface FileTallyRebaselinedPayload {
752
807
  /** Where it lives, in the printer's own vocabulary. */
753
808
  origin: string;
754
809
  }
810
+ /** One judgement of a print's first-layer alignment, on one frame. */
811
+ export interface FirstLayerAlignmentJudgedPayload {
812
+ /**
813
+ * The correction the pass put in force, `[dx, dy]` pixels; null unless it
814
+ * passed.
815
+ */
816
+ correction_px?: Array<number> | null;
817
+ /** The stored frame it was judged on. */
818
+ frame_sha256: string;
819
+ /**
820
+ * The peak smoothed contrast the layer was found at, in grey levels; null
821
+ * when it was not searched for.
822
+ */
823
+ match_strength?: number | null;
824
+ /**
825
+ * How far the printed first layer was found from its uncorrected
826
+ * projection, in calibration pixels; null when it was not searched for.
827
+ */
828
+ offset_px?: number | null;
829
+ /**
830
+ * `clearly_found` for a pass, `covered` or `not_clearly_found` for an
831
+ * inconclusive judgement, and the failure's own sentence for a failure.
832
+ */
833
+ reason: string;
834
+ /** What it came to. */
835
+ verdict: AlignmentJudgedVerdict;
836
+ /**
837
+ * The correction in force when the frame was judged; null before the
838
+ * print's first pass.
839
+ */
840
+ view_correction?: ViewCorrection | null;
841
+ }
755
842
  /**
756
843
  * The XY rectangle every extruding move of a file lies inside, in
757
844
  * millimetres.
@@ -824,8 +911,17 @@ export interface ImageAnswer {
824
911
  /** The record. */
825
912
  record: ImageRecord;
826
913
  }
914
+ /** Why a check or a look was shown the whole frame. */
915
+ export interface ImageFallback {
916
+ /** The reason, as a code. */
917
+ code: WholeFrameReasonCode;
918
+ /** The reason, in the sentence the image's note gives it in. */
919
+ message: string;
920
+ }
827
921
  /** A lowercase hyphenated version 7 UUID identifying one image. */
828
922
  export type ImageId = string;
923
+ /** Which image a check or a look was shown. */
924
+ export type ImageKind = "three_panel" | "whole_frame";
829
925
  /**
830
926
  * One image, stored beside the event it arrived with.
831
927
  *
@@ -1001,6 +1097,15 @@ export interface JobSnapshot {
1001
1097
  /** The state the source reports the job to be in. */
1002
1098
  state: PrinterState;
1003
1099
  }
1100
+ /** The image a print's last check was shown, and when its frame was captured. */
1101
+ export interface LastCheckImage {
1102
+ /** When the check's frame was captured. */
1103
+ at: Timestamp;
1104
+ /** Why it was the whole frame; null for the three-panel image. */
1105
+ fallback?: ImageFallback | null;
1106
+ /** Which image the check was shown. */
1107
+ kind: ImageKind;
1108
+ }
1004
1109
  /**
1005
1110
  * What the last print laid down, read from its own G-code up to the last
1006
1111
  * file position recorded for it.
@@ -1049,6 +1154,13 @@ export interface Look {
1049
1154
  * gave none — which the history records as a port failure.
1050
1155
  */
1051
1156
  frame?: ImageRef | null;
1157
+ /**
1158
+ * Why the image at `image_path` is the whole frame; absent for the
1159
+ * three-panel image, with no image, or when what made it gave no reason.
1160
+ */
1161
+ image_fallback?: ImageFallback | null;
1162
+ /** Which image is at `image_path`; absent with no image. */
1163
+ image_kind?: ImageKind | null;
1052
1164
  /**
1053
1165
  * What the image at `image_path` is, and why it is that one, in one line;
1054
1166
  * absent with no image, or when what made it says nothing.
@@ -1601,6 +1713,22 @@ export type PrintAction = {
1601
1713
  outcome: PrintOutcome;
1602
1714
  reason: string;
1603
1715
  };
1716
+ /**
1717
+ * One print's first-layer alignment verdict, as it is kept under the state
1718
+ * directory — which the real-print suite's record reads.
1719
+ */
1720
+ export type PrintAlignment = {
1721
+ verdict: "unavailable";
1722
+ } | {
1723
+ verdict: "pending";
1724
+ } | {
1725
+ verdict: "passed";
1726
+ correction_px?: Array<number>;
1727
+ offset_px: number;
1728
+ } | {
1729
+ verdict: "failed";
1730
+ reason: AlignmentFailure;
1731
+ };
1604
1732
  /** One print's end, as its `print_ended` event stored it. */
1605
1733
  export interface PrintEnded {
1606
1734
  /** The `print_ended` event. */
@@ -1798,6 +1926,27 @@ export interface Range {
1798
1926
  export type RawBytes = string;
1799
1927
  /** What became of the prints a file's new tally generation counts. */
1800
1928
  export type RebaselineDisposition = "accounted" | "unverified";
1929
+ /** What judging a print's camera again on a fresh frame answers. */
1930
+ export interface RecheckCameraAnswer {
1931
+ /** The print's first-layer alignment once judged. */
1932
+ alignment: PrintAlignment;
1933
+ /**
1934
+ * The absolute path of the fresh frame on this server's own filesystem,
1935
+ * stored with the first record of its judgement. This server always
1936
+ * answers it; a client that finds it names no file on its own host
1937
+ * answers why in its place, as it does every image path.
1938
+ */
1939
+ frame_path?: string;
1940
+ /**
1941
+ * Why that image would be the whole frame; null for the three-panel
1942
+ * image.
1943
+ */
1944
+ image_fallback?: ImageFallback | null;
1945
+ /** Which image a check of the print would be shown of this frame. */
1946
+ image_kind: ImageKind;
1947
+ /** The correction in force once judged; null when none is. */
1948
+ view_correction?: ViewCorrection | null;
1949
+ }
1801
1950
  /**
1802
1951
  * The whole recovery vocabulary, and there is no other.
1803
1952
  *
@@ -1996,6 +2145,18 @@ export interface RecoveryTemperatures {
1996
2145
  /** Each tool. */
1997
2146
  tools: Array<ToolTemperature>;
1998
2147
  }
2148
+ /**
2149
+ * One landmark of a correction's reference: where it was found on the frame
2150
+ * the correction was taken on.
2151
+ */
2152
+ export interface ReferenceLandmark {
2153
+ /** The calibration's name for it. */
2154
+ name: string;
2155
+ /** How far from its calibrated place it was found, `[dx, dy]` pixels. */
2156
+ offset_px: Array<number>;
2157
+ /** The correlation it was found at. */
2158
+ score: number;
2159
+ }
1999
2160
  /**
2000
2161
  * Why a request was refused.
2001
2162
  *
@@ -2578,6 +2739,11 @@ export interface StatusAnswer {
2578
2739
  interventions: Array<Intervention>;
2579
2740
  /** The job, when a snapshot could be taken. */
2580
2741
  job?: JobSnapshot | null;
2742
+ /**
2743
+ * The image the print's last check was shown, when its frame was
2744
+ * captured and why it was the whole frame; null before its first check.
2745
+ */
2746
+ last_check_image?: LastCheckImage | null;
2581
2747
  /**
2582
2748
  * The changes the print's G-code plans, the one the printer waits at and
2583
2749
  * the colour expected where its job stands; absent when the file plans
@@ -2721,6 +2887,38 @@ export type UnverifiedReason = {
2721
2887
  file_name: string;
2722
2888
  origin: string;
2723
2889
  };
2890
+ /** How a print's drawings map the calibrated view onto the current frame. */
2891
+ export interface ViewCorrection {
2892
+ /**
2893
+ * The landmarks found agreeing on the frame the correction was taken on,
2894
+ * which later frames are compared against.
2895
+ */
2896
+ landmarks: Array<ReferenceLandmark>;
2897
+ /**
2898
+ * Maps a pixel of the calibrated view to the current frame, in
2899
+ * homogeneous coordinates, row by row.
2900
+ */
2901
+ matrix: Array<Array<number>>;
2902
+ /** The model `matrix` is of. */
2903
+ model: ViewModel;
2904
+ /**
2905
+ * The RMS distance between those landmarks' offsets and the correction's
2906
+ * shift, in pixels: how far the landmarks disagree with the part.
2907
+ */
2908
+ residual_px: number;
2909
+ }
2910
+ /**
2911
+ * The model a `ViewCorrection` maps pixels by. Only `Self::Translation`
2912
+ * is ever written.
2913
+ */
2914
+ export type ViewModel = "translation" | "similarity" | "affine" | "homography";
2915
+ /** What one judgement of the view found. */
2916
+ export type ViewOutcome = "unshifted" | "refit" | "landmarks_not_found" | "view_refit_rejected" | "frame_mismatch";
2917
+ /**
2918
+ * Why a check or a look was shown the whole frame: one code per reason the
2919
+ * server gives one.
2920
+ */
2921
+ export type WholeFrameReasonCode = "no_print" | "no_calibration" | "no_stream" | "no_position" | "no_object" | "no_layer" | "toolpath_unread" | "alignment_pending" | "alignment_inconclusive" | "alignment_unavailable" | "alignment_failed" | "landmarks_not_found" | "view_refit_rejected" | "calibration_stale" | "frame_mismatch" | "paused" | "refused";
2724
2922
  /** Where the machine homes Z, and whether doing so sweeps the bed. */
2725
2923
  export interface ZHome {
2726
2924
  /** Whether homing Z brings a gantry down over the whole bed. */
@@ -2751,13 +2949,17 @@ export interface EventPayloads {
2751
2949
  camera_degraded: CameraDegradedPayload;
2752
2950
  camera_look: CameraLookPayload;
2753
2951
  camera_retry: CameraRetryPayload;
2952
+ camera_view_judged: CameraViewJudgedPayload;
2953
+ camera_view_refit: CameraViewRefitPayload;
2754
2954
  charge_pended: ChargePendedPayload;
2955
+ check_image_changed: CheckImageChangedPayload;
2755
2956
  detector_health_changed: DetectorHealthChangedPayload;
2756
2957
  filament_change_planned_reached: FilamentChangePlannedReachedPayload;
2757
2958
  filament_change_planned_resumed: FilamentChangePlannedResumedPayload;
2758
2959
  filament_change_signalled: FilamentChangeSignalledPayload;
2759
2960
  filament_consumed: FilamentConsumedPayload;
2760
2961
  file_tally_rebaselined: FileTallyRebaselinedPayload;
2962
+ first_layer_alignment_judged: FirstLayerAlignmentJudgedPayload;
2761
2963
  gcode_indexed: GcodeIndexedPayload;
2762
2964
  intervention_expired: InterventionExpiredPayload;
2763
2965
  malformed_external_event: MalformedExternalEventPayload;
@@ -2789,7 +2991,7 @@ export interface EventPayloads {
2789
2991
  unattended_printer_activity: UnattendedPrinterActivityPayload;
2790
2992
  }
2791
2993
  /** Every kind the server declares a payload type for, in name order. */
2792
- 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", "charge_pended", "detector_health_changed", "filament_change_planned_reached", "filament_change_planned_resumed", "filament_change_signalled", "filament_consumed", "file_tally_rebaselined", "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"];
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"];
2793
2995
  /**
2794
2996
  * The payload of one event as the type its kind declares, or `undefined` for
2795
2997
  * an event of any other kind — one this client knows or one it does not. No
@@ -3173,4 +3375,14 @@ export declare class GeneratedClient extends GeneratedSurface {
3173
3375
  * the reason, the value asked for and the range allowed.
3174
3376
  */
3175
3377
  bedClear(reason: string): Promise<BedClearAnswer>;
3378
+ /**
3379
+ * Call `recheck_camera` on the configured supervisor.
3380
+ *
3381
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
3382
+ * the answer could not be read, and with `Refused` when the supervisor
3383
+ * said no. A call whose reason is empty is refused here, before a request
3384
+ * is made, and the policy's own refusal arrives as `Rejected`, carrying
3385
+ * the reason, the value asked for and the range allowed.
3386
+ */
3387
+ recheckCamera(printId: string, reason: string): Promise<RecheckCameraAnswer>;
3176
3388
  }
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.16.2";
10
+ export const CONTRACT_VERSION = "0.17.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.
@@ -52,6 +52,7 @@ export const OPERATION_NAMES = [
52
52
  "recover_home_xy",
53
53
  "recover_home_z",
54
54
  "bed_clear",
55
+ "recheck_camera",
55
56
  ];
56
57
  /** Every kind the server declares a payload type for, in name order. */
57
58
  export const EVENT_KINDS = [
@@ -64,13 +65,17 @@ export const EVENT_KINDS = [
64
65
  "camera_degraded",
65
66
  "camera_look",
66
67
  "camera_retry",
68
+ "camera_view_judged",
69
+ "camera_view_refit",
67
70
  "charge_pended",
71
+ "check_image_changed",
68
72
  "detector_health_changed",
69
73
  "filament_change_planned_reached",
70
74
  "filament_change_planned_resumed",
71
75
  "filament_change_signalled",
72
76
  "filament_consumed",
73
77
  "file_tally_rebaselined",
78
+ "first_layer_alignment_judged",
74
79
  "gcode_indexed",
75
80
  "intervention_expired",
76
81
  "malformed_external_event",
@@ -745,6 +750,64 @@ export const SHAPES = JSON.parse(`
745
750
  "variants": {}
746
751
  }
747
752
  },
753
+ "AlignmentFailure": {
754
+ "union": {
755
+ "tag_field": "failure",
756
+ "variants": {
757
+ "offset": {
758
+ "fields": {
759
+ "offset_px": {
760
+ "paired_with": "",
761
+ "required": true,
762
+ "shape": {
763
+ "scalar": "number"
764
+ }
765
+ }
766
+ },
767
+ "payload": null,
768
+ "unit": false
769
+ },
770
+ "resolution": {
771
+ "fields": {
772
+ "expected": {
773
+ "paired_with": "",
774
+ "required": true,
775
+ "shape": {
776
+ "list": {
777
+ "scalar": "integer"
778
+ },
779
+ "non_empty": true
780
+ }
781
+ },
782
+ "got": {
783
+ "paired_with": "",
784
+ "required": true,
785
+ "shape": {
786
+ "list": {
787
+ "scalar": "integer"
788
+ },
789
+ "non_empty": true
790
+ }
791
+ }
792
+ },
793
+ "payload": null,
794
+ "unit": false
795
+ },
796
+ "stream": {
797
+ "fields": {},
798
+ "payload": null,
799
+ "unit": true
800
+ }
801
+ }
802
+ }
803
+ },
804
+ "AlignmentJudgedVerdict": {
805
+ "enum": [
806
+ "passed",
807
+ "inconclusive",
808
+ "failed"
809
+ ]
810
+ },
748
811
  "BedClearActor": {
749
812
  "enum": [
750
813
  "operator"
@@ -926,6 +989,68 @@ export const SHAPES = JSON.parse(`
926
989
  "variants": {}
927
990
  }
928
991
  },
992
+ "CameraViewJudgedPayload": {
993
+ "struct": {
994
+ "fields": {
995
+ "frame_sha256": {
996
+ "paired_with": "",
997
+ "required": true,
998
+ "shape": {
999
+ "scalar": "string"
1000
+ }
1001
+ },
1002
+ "outcome": {
1003
+ "paired_with": "",
1004
+ "required": true,
1005
+ "shape": {
1006
+ "ref": "ViewOutcome"
1007
+ }
1008
+ },
1009
+ "reason": {
1010
+ "paired_with": "",
1011
+ "required": false,
1012
+ "shape": {
1013
+ "nullable": {
1014
+ "scalar": "string"
1015
+ }
1016
+ }
1017
+ },
1018
+ "view_correction": {
1019
+ "paired_with": "",
1020
+ "required": false,
1021
+ "shape": {
1022
+ "nullable": {
1023
+ "ref": "ViewCorrection"
1024
+ }
1025
+ }
1026
+ }
1027
+ },
1028
+ "tag_field": "",
1029
+ "variants": {}
1030
+ }
1031
+ },
1032
+ "CameraViewRefitPayload": {
1033
+ "struct": {
1034
+ "fields": {
1035
+ "frame_sha256": {
1036
+ "paired_with": "",
1037
+ "required": true,
1038
+ "shape": {
1039
+ "scalar": "string"
1040
+ }
1041
+ },
1042
+ "view_correction": {
1043
+ "paired_with": "",
1044
+ "required": true,
1045
+ "shape": {
1046
+ "ref": "ViewCorrection"
1047
+ }
1048
+ }
1049
+ },
1050
+ "tag_field": "",
1051
+ "variants": {}
1052
+ }
1053
+ },
929
1054
  "ChargeKey": {
930
1055
  "union": {
931
1056
  "tag_field": "key",
@@ -1074,6 +1199,37 @@ export const SHAPES = JSON.parse(`
1074
1199
  "variants": {}
1075
1200
  }
1076
1201
  },
1202
+ "CheckImageChangedPayload": {
1203
+ "struct": {
1204
+ "fields": {
1205
+ "fallback": {
1206
+ "paired_with": "",
1207
+ "required": false,
1208
+ "shape": {
1209
+ "nullable": {
1210
+ "ref": "ImageFallback"
1211
+ }
1212
+ }
1213
+ },
1214
+ "frame_sha256": {
1215
+ "paired_with": "",
1216
+ "required": true,
1217
+ "shape": {
1218
+ "scalar": "string"
1219
+ }
1220
+ },
1221
+ "kind": {
1222
+ "paired_with": "",
1223
+ "required": true,
1224
+ "shape": {
1225
+ "ref": "ImageKind"
1226
+ }
1227
+ }
1228
+ },
1229
+ "tag_field": "",
1230
+ "variants": {}
1231
+ }
1232
+ },
1077
1233
  "ClearedMark": {
1078
1234
  "struct": {
1079
1235
  "fields": {
@@ -1793,6 +1949,74 @@ export const SHAPES = JSON.parse(`
1793
1949
  "variants": {}
1794
1950
  }
1795
1951
  },
1952
+ "FirstLayerAlignmentJudgedPayload": {
1953
+ "struct": {
1954
+ "fields": {
1955
+ "correction_px": {
1956
+ "paired_with": "",
1957
+ "required": false,
1958
+ "shape": {
1959
+ "nullable": {
1960
+ "list": {
1961
+ "scalar": "number"
1962
+ },
1963
+ "non_empty": true
1964
+ }
1965
+ }
1966
+ },
1967
+ "frame_sha256": {
1968
+ "paired_with": "",
1969
+ "required": true,
1970
+ "shape": {
1971
+ "scalar": "string"
1972
+ }
1973
+ },
1974
+ "match_strength": {
1975
+ "paired_with": "",
1976
+ "required": false,
1977
+ "shape": {
1978
+ "nullable": {
1979
+ "scalar": "number"
1980
+ }
1981
+ }
1982
+ },
1983
+ "offset_px": {
1984
+ "paired_with": "",
1985
+ "required": false,
1986
+ "shape": {
1987
+ "nullable": {
1988
+ "scalar": "number"
1989
+ }
1990
+ }
1991
+ },
1992
+ "reason": {
1993
+ "paired_with": "",
1994
+ "required": true,
1995
+ "shape": {
1996
+ "scalar": "string"
1997
+ }
1998
+ },
1999
+ "verdict": {
2000
+ "paired_with": "",
2001
+ "required": true,
2002
+ "shape": {
2003
+ "ref": "AlignmentJudgedVerdict"
2004
+ }
2005
+ },
2006
+ "view_correction": {
2007
+ "paired_with": "",
2008
+ "required": false,
2009
+ "shape": {
2010
+ "nullable": {
2011
+ "ref": "ViewCorrection"
2012
+ }
2013
+ }
2014
+ }
2015
+ },
2016
+ "tag_field": "",
2017
+ "variants": {}
2018
+ }
2019
+ },
1796
2020
  "Footprint": {
1797
2021
  "struct": {
1798
2022
  "fields": {
@@ -1963,11 +2187,39 @@ export const SHAPES = JSON.parse(`
1963
2187
  "variants": {}
1964
2188
  }
1965
2189
  },
2190
+ "ImageFallback": {
2191
+ "struct": {
2192
+ "fields": {
2193
+ "code": {
2194
+ "paired_with": "",
2195
+ "required": true,
2196
+ "shape": {
2197
+ "ref": "WholeFrameReasonCode"
2198
+ }
2199
+ },
2200
+ "message": {
2201
+ "paired_with": "",
2202
+ "required": true,
2203
+ "shape": {
2204
+ "scalar": "string"
2205
+ }
2206
+ }
2207
+ },
2208
+ "tag_field": "",
2209
+ "variants": {}
2210
+ }
2211
+ },
1966
2212
  "ImageId": {
1967
2213
  "alias": {
1968
2214
  "scalar": "string"
1969
2215
  }
1970
2216
  },
2217
+ "ImageKind": {
2218
+ "enum": [
2219
+ "three_panel",
2220
+ "whole_frame"
2221
+ ]
2222
+ },
1971
2223
  "ImageRecord": {
1972
2224
  "struct": {
1973
2225
  "fields": {
@@ -2430,6 +2682,37 @@ export const SHAPES = JSON.parse(`
2430
2682
  "variants": {}
2431
2683
  }
2432
2684
  },
2685
+ "LastCheckImage": {
2686
+ "struct": {
2687
+ "fields": {
2688
+ "at": {
2689
+ "paired_with": "",
2690
+ "required": true,
2691
+ "shape": {
2692
+ "ref": "Timestamp"
2693
+ }
2694
+ },
2695
+ "fallback": {
2696
+ "paired_with": "",
2697
+ "required": false,
2698
+ "shape": {
2699
+ "nullable": {
2700
+ "ref": "ImageFallback"
2701
+ }
2702
+ }
2703
+ },
2704
+ "kind": {
2705
+ "paired_with": "",
2706
+ "required": true,
2707
+ "shape": {
2708
+ "ref": "ImageKind"
2709
+ }
2710
+ }
2711
+ },
2712
+ "tag_field": "",
2713
+ "variants": {}
2714
+ }
2715
+ },
2433
2716
  "LastPrint": {
2434
2717
  "struct": {
2435
2718
  "fields": {
@@ -2517,6 +2800,24 @@ export const SHAPES = JSON.parse(`
2517
2800
  }
2518
2801
  }
2519
2802
  },
2803
+ "image_fallback": {
2804
+ "paired_with": "",
2805
+ "required": false,
2806
+ "shape": {
2807
+ "nullable": {
2808
+ "ref": "ImageFallback"
2809
+ }
2810
+ }
2811
+ },
2812
+ "image_kind": {
2813
+ "paired_with": "",
2814
+ "required": false,
2815
+ "shape": {
2816
+ "nullable": {
2817
+ "ref": "ImageKind"
2818
+ }
2819
+ }
2820
+ },
2520
2821
  "image_note": {
2521
2822
  "paired_with": "",
2522
2823
  "required": false,
@@ -4218,6 +4519,59 @@ export const SHAPES = JSON.parse(`
4218
4519
  }
4219
4520
  }
4220
4521
  },
4522
+ "PrintAlignment": {
4523
+ "union": {
4524
+ "tag_field": "verdict",
4525
+ "variants": {
4526
+ "failed": {
4527
+ "fields": {
4528
+ "reason": {
4529
+ "paired_with": "",
4530
+ "required": true,
4531
+ "shape": {
4532
+ "ref": "AlignmentFailure"
4533
+ }
4534
+ }
4535
+ },
4536
+ "payload": null,
4537
+ "unit": false
4538
+ },
4539
+ "passed": {
4540
+ "fields": {
4541
+ "correction_px": {
4542
+ "paired_with": "",
4543
+ "required": false,
4544
+ "shape": {
4545
+ "list": {
4546
+ "scalar": "number"
4547
+ },
4548
+ "non_empty": true
4549
+ }
4550
+ },
4551
+ "offset_px": {
4552
+ "paired_with": "",
4553
+ "required": true,
4554
+ "shape": {
4555
+ "scalar": "number"
4556
+ }
4557
+ }
4558
+ },
4559
+ "payload": null,
4560
+ "unit": false
4561
+ },
4562
+ "pending": {
4563
+ "fields": {},
4564
+ "payload": null,
4565
+ "unit": true
4566
+ },
4567
+ "unavailable": {
4568
+ "fields": {},
4569
+ "payload": null,
4570
+ "unit": true
4571
+ }
4572
+ }
4573
+ }
4574
+ },
4221
4575
  "PrintEnded": {
4222
4576
  "struct": {
4223
4577
  "fields": {
@@ -4714,6 +5068,53 @@ export const SHAPES = JSON.parse(`
4714
5068
  "unverified"
4715
5069
  ]
4716
5070
  },
5071
+ "RecheckCameraAnswer": {
5072
+ "struct": {
5073
+ "fields": {
5074
+ "alignment": {
5075
+ "paired_with": "",
5076
+ "required": true,
5077
+ "shape": {
5078
+ "ref": "PrintAlignment"
5079
+ }
5080
+ },
5081
+ "frame_path": {
5082
+ "paired_with": "",
5083
+ "required": false,
5084
+ "shape": {
5085
+ "scalar": "string"
5086
+ }
5087
+ },
5088
+ "image_fallback": {
5089
+ "paired_with": "",
5090
+ "required": false,
5091
+ "shape": {
5092
+ "nullable": {
5093
+ "ref": "ImageFallback"
5094
+ }
5095
+ }
5096
+ },
5097
+ "image_kind": {
5098
+ "paired_with": "",
5099
+ "required": true,
5100
+ "shape": {
5101
+ "ref": "ImageKind"
5102
+ }
5103
+ },
5104
+ "view_correction": {
5105
+ "paired_with": "",
5106
+ "required": false,
5107
+ "shape": {
5108
+ "nullable": {
5109
+ "ref": "ViewCorrection"
5110
+ }
5111
+ }
5112
+ }
5113
+ },
5114
+ "tag_field": "",
5115
+ "variants": {}
5116
+ }
5117
+ },
4717
5118
  "RecoveryAction": {
4718
5119
  "union": {
4719
5120
  "tag_field": "action",
@@ -5284,6 +5685,38 @@ export const SHAPES = JSON.parse(`
5284
5685
  "variants": {}
5285
5686
  }
5286
5687
  },
5688
+ "ReferenceLandmark": {
5689
+ "struct": {
5690
+ "fields": {
5691
+ "name": {
5692
+ "paired_with": "",
5693
+ "required": true,
5694
+ "shape": {
5695
+ "scalar": "string"
5696
+ }
5697
+ },
5698
+ "offset_px": {
5699
+ "paired_with": "",
5700
+ "required": true,
5701
+ "shape": {
5702
+ "list": {
5703
+ "scalar": "number"
5704
+ },
5705
+ "non_empty": true
5706
+ }
5707
+ },
5708
+ "score": {
5709
+ "paired_with": "",
5710
+ "required": true,
5711
+ "shape": {
5712
+ "scalar": "number"
5713
+ }
5714
+ }
5715
+ },
5716
+ "tag_field": "",
5717
+ "variants": {}
5718
+ }
5719
+ },
5287
5720
  "RejectionReason": {
5288
5721
  "union": {
5289
5722
  "tag_field": "",
@@ -7158,6 +7591,15 @@ export const SHAPES = JSON.parse(`
7158
7591
  }
7159
7592
  }
7160
7593
  },
7594
+ "last_check_image": {
7595
+ "paired_with": "",
7596
+ "required": false,
7597
+ "shape": {
7598
+ "nullable": {
7599
+ "ref": "LastCheckImage"
7600
+ }
7601
+ }
7602
+ },
7161
7603
  "planned_changes": {
7162
7604
  "paired_with": "",
7163
7605
  "required": false,
@@ -7594,6 +8036,89 @@ export const SHAPES = JSON.parse(`
7594
8036
  }
7595
8037
  }
7596
8038
  },
8039
+ "ViewCorrection": {
8040
+ "struct": {
8041
+ "fields": {
8042
+ "landmarks": {
8043
+ "paired_with": "",
8044
+ "required": true,
8045
+ "shape": {
8046
+ "list": {
8047
+ "ref": "ReferenceLandmark"
8048
+ },
8049
+ "non_empty": false
8050
+ }
8051
+ },
8052
+ "matrix": {
8053
+ "paired_with": "",
8054
+ "required": true,
8055
+ "shape": {
8056
+ "list": {
8057
+ "list": {
8058
+ "scalar": "number"
8059
+ },
8060
+ "non_empty": true
8061
+ },
8062
+ "non_empty": true
8063
+ }
8064
+ },
8065
+ "model": {
8066
+ "paired_with": "",
8067
+ "required": true,
8068
+ "shape": {
8069
+ "ref": "ViewModel"
8070
+ }
8071
+ },
8072
+ "residual_px": {
8073
+ "paired_with": "",
8074
+ "required": true,
8075
+ "shape": {
8076
+ "scalar": "number"
8077
+ }
8078
+ }
8079
+ },
8080
+ "tag_field": "",
8081
+ "variants": {}
8082
+ }
8083
+ },
8084
+ "ViewModel": {
8085
+ "enum": [
8086
+ "translation",
8087
+ "similarity",
8088
+ "affine",
8089
+ "homography"
8090
+ ]
8091
+ },
8092
+ "ViewOutcome": {
8093
+ "enum": [
8094
+ "unshifted",
8095
+ "refit",
8096
+ "landmarks_not_found",
8097
+ "view_refit_rejected",
8098
+ "frame_mismatch"
8099
+ ]
8100
+ },
8101
+ "WholeFrameReasonCode": {
8102
+ "enum": [
8103
+ "no_print",
8104
+ "no_calibration",
8105
+ "no_stream",
8106
+ "no_position",
8107
+ "no_object",
8108
+ "no_layer",
8109
+ "toolpath_unread",
8110
+ "alignment_pending",
8111
+ "alignment_inconclusive",
8112
+ "alignment_unavailable",
8113
+ "alignment_failed",
8114
+ "landmarks_not_found",
8115
+ "view_refit_rejected",
8116
+ "calibration_stale",
8117
+ "frame_mismatch",
8118
+ "paused",
8119
+ "refused"
8120
+ ]
8121
+ },
7597
8122
  "ZHome": {
7598
8123
  "struct": {
7599
8124
  "fields": {
@@ -8426,4 +8951,22 @@ export class GeneratedClient extends GeneratedSurface {
8426
8951
  sending.reason = reason;
8427
8952
  return await this.call("POST", target, asked, sending, "BedClearAnswer");
8428
8953
  }
8954
+ /**
8955
+ * Call `recheck_camera` on the configured supervisor.
8956
+ *
8957
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
8958
+ * the answer could not be read, and with `Refused` when the supervisor
8959
+ * said no. A call whose reason is empty is refused here, before a request
8960
+ * is made, and the policy's own refusal arrives as `Rejected`, carrying
8961
+ * the reason, the value asked for and the range allowed.
8962
+ */
8963
+ async recheckCamera(printId, reason) {
8964
+ reasonGiven(reason);
8965
+ const target = `/v1/prints/${printId}/camera/recheck`;
8966
+ const asked = [];
8967
+ const sending = {};
8968
+ sending.actor = this.actor;
8969
+ sending.reason = reason;
8970
+ return await this.call("POST", target, asked, sending, "RecheckCameraAnswer");
8971
+ }
8429
8972
  }
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.16.2",
15
+ "printobserverContractVersion": "0.17.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.16.2"
22
+ "version": "0.17.0"
23
23
  }