@printobserver/sdk 0.12.0 → 0.13.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.
@@ -50,6 +50,12 @@ export interface ActionAnswer {
50
50
  export interface ActionExecutedPayload {
51
51
  /** The action's identifier. */
52
52
  action_id: ActionId;
53
+ /**
54
+ * How far into its file the print had last been read to have got when
55
+ * the action was taken, in bytes, when that was known: what places a
56
+ * change against the commands the file sets the same thing with.
57
+ */
58
+ file_position_bytes?: number | null;
53
59
  /** The bounded intervention it opened, when it opened one. */
54
60
  intervention_id?: InterventionId | null;
55
61
  }
@@ -146,6 +152,102 @@ export interface AgentAssessmentPayload {
146
152
  /** The session the turn ran in. */
147
153
  session_name: string;
148
154
  }
155
+ /**
156
+ * What a supervision turn reads about one print: `PrintContext` with each
157
+ * fact stated once, as it is now, and nothing no supervision decision reads.
158
+ *
159
+ * Left out of it, each because no step of the skill, no check and no
160
+ * recorded
161
+ * case decides anything by it: the print's file, provider and times; the
162
+ * printer's and the job's own states (the print states it once); every
163
+ * heater's
164
+ * offset, the chamber and the time they were read; the printer's reported
165
+ * feedrate, flowrate and fan (the slicer's plan states the flow and fan in
166
+ * force, and no step reads the feedrate); the job's file, size, progress,
167
+ * time
168
+ * and position (the plan states where the print is); the manifest (its
169
+ * limits
170
+ * are the bounds); and the detector's health.
171
+ *
172
+ * The printer and the job are stated here and nowhere in the events; each
173
+ * event is what happened, when, and what it changed; and asked `since` an
174
+ * event, only the events newer than it are carried, so a turn that has read
175
+ * the rest is not handed them again. `newest_event` is what the next read
176
+ * asks `since`.
177
+ */
178
+ export interface AgentContext {
179
+ /** The limits in force, so that the agent can see them before it asks. */
180
+ bounds: EffectiveBounds;
181
+ /** The interventions still active. */
182
+ interventions: Array<Intervention>;
183
+ /** The error the job stopped on, when it stopped on one. */
184
+ job_error?: JobError | null;
185
+ /**
186
+ * The most recent image, whose path is answered beside the context and
187
+ * whose record states its digest.
188
+ */
189
+ latest_image?: ImageRef | null;
190
+ /**
191
+ * The newest event of this print's, which a later read asks `since`:
192
+ * absent only when the print has none.
193
+ */
194
+ newest_event?: EventId | null;
195
+ /** The print. */
196
+ print: AgentPrint;
197
+ /** The printer's heaters now, when they could be read. */
198
+ printer?: AgentPrinter | null;
199
+ /**
200
+ * This print's events newer than the one asked `since`, or its recent
201
+ * ones when none was named, newest first.
202
+ */
203
+ recent_events: Array<AgentEvent>;
204
+ /** What the slicer planned at the job's current file position. */
205
+ slicer?: SlicerPlan | null;
206
+ }
207
+ /**
208
+ * One event of the print's, as a turn reads it: what happened, when, and the
209
+ * facts it changed.
210
+ */
211
+ export interface AgentEvent {
212
+ /** Its identifier, which a later read asks `since`. */
213
+ id: EventId;
214
+ /** What kind of event it is. */
215
+ kind: EventKind;
216
+ /**
217
+ * What it carried, less the snapshots the context states once, the
218
+ * agent's own assessment and the bookkeeping no decision reads.
219
+ */
220
+ payload?: unknown;
221
+ /** When it was received. */
222
+ received_at: Timestamp;
223
+ }
224
+ /**
225
+ * One heater, in degrees Celsius: each reading absent when the printer did
226
+ * not
227
+ * report it, or reported one outside what a heater can read.
228
+ */
229
+ export interface AgentHeater {
230
+ /** The temperature it is at. */
231
+ actual_c?: number | null;
232
+ /** The temperature it is driving towards. */
233
+ target_c?: number | null;
234
+ }
235
+ /** The print a context is about. */
236
+ export interface AgentPrint {
237
+ /** Why it ended, once it has. */
238
+ end_reason?: string | null;
239
+ /** Its identifier. */
240
+ id: PrintId;
241
+ /** What the printer was last found doing with it, or the state it ended in. */
242
+ state: PrinterState;
243
+ }
244
+ /** The printer's heaters as they are now. */
245
+ export interface AgentPrinter {
246
+ /** The bed's heater, when it has one. */
247
+ bed?: AgentHeater | null;
248
+ /** Each tool's heater, in order. */
249
+ tools?: Array<AgentHeater>;
250
+ }
149
251
  /** The bed heater, as a recovery read reports it. */
150
252
  export interface BedTemperature {
151
253
  /** What it reads, in degrees Celsius, `null` when not reported. */
@@ -290,8 +392,12 @@ export type Confidence = "low" | "medium" | "high";
290
392
  /**
291
393
  * What a context read answers.
292
394
  *
395
+ * The context is the agent's view of it (`AgentContext`): each fact once,
396
+ * as it is now, and the events newer than the one asked `since`.
397
+ *
293
398
  * The latest image is **materialized** here rather than left as the handle
294
- * `PrintContext` carries: the one thing a supervision turn does with an
399
+ * `printobserver_core::PrintContext` carries: the one thing a supervision
400
+ * turn does with an
295
401
  * image is look at it, and a handle is not something anything can open. The
296
402
  * path is absolute on this server's own filesystem, exactly as
297
403
  * `ImageAnswer`'s is, and is absent when there is no image or when the
@@ -299,7 +405,7 @@ export type Confidence = "low" | "medium" | "high";
299
405
  */
300
406
  export interface ContextAnswer {
301
407
  /** Everything a supervision turn is given about the print. */
302
- context: PrintContext;
408
+ context: AgentContext;
303
409
  /** Where the latest image's bytes are, absolute on this host. */
304
410
  image_path?: string | null;
305
411
  }
@@ -516,6 +622,21 @@ export interface Footprint {
516
622
  }
517
623
  /** Why a camera frame was not one to hand the agent. */
518
624
  export type FrameCause = "blank" | "undecodable";
625
+ /**
626
+ * A print's G-code was read and indexed: what the slicer planned at each
627
+ * file position is now known for it, without reading the file again.
628
+ *
629
+ * Written once per index built, which is once per print for as long as the
630
+ * server runs.
631
+ */
632
+ export interface GcodeIndexedPayload {
633
+ /** How many bytes of it were read. */
634
+ bytes: number;
635
+ /** The file that was indexed. */
636
+ file_name: FileName;
637
+ /** How many layers it plans. */
638
+ layers: number;
639
+ }
519
640
  /** One tool heater whose target was above zero. */
520
641
  export interface HeatedTool {
521
642
  /** Its target, in degrees Celsius. */
@@ -999,6 +1120,13 @@ export interface PeriodicObservationPayload {
999
1120
  */
1000
1121
  printer?: PrinterSnapshot | null;
1001
1122
  }
1123
+ /** A fact of the plan the print's file does not state. */
1124
+ export type PlanFact = "layer" | "final_z" | "types" | "minutes_left" | "flow_factor" | "fan_percent" | "objects" | "rise";
1125
+ /**
1126
+ * A setting in force that the plan at this height says is wrong for what is
1127
+ * being laid.
1128
+ */
1129
+ export type PlanMismatch = "fan_off_over_bridges" | "flow_low_over_walls";
1002
1130
  /** The decision policy took on one request. */
1003
1131
  export type PolicyDecision = "accepted" | {
1004
1132
  rejected: RejectionReason;
@@ -1226,27 +1354,6 @@ export type PrintAction = {
1226
1354
  outcome: PrintOutcome;
1227
1355
  reason: string;
1228
1356
  };
1229
- /** Everything a supervision turn is given about one print. */
1230
- export interface PrintContext {
1231
- /** The limits in force, so that the agent can see them before it asks. */
1232
- bounds: EffectiveBounds;
1233
- /** The failure detector's health, and since when it has been so. */
1234
- detector?: DetectorHealth;
1235
- /** The interventions still active. */
1236
- interventions: Array<Intervention>;
1237
- /** The job, when a snapshot could be taken. */
1238
- job?: JobSnapshot | null;
1239
- /** The most recent image, when there is one. */
1240
- latest_image?: ImageRef | null;
1241
- /** The manifest, when the print has one. */
1242
- manifest?: JobManifest | null;
1243
- /** The print itself. */
1244
- print: PrintRecord;
1245
- /** The printer, when a snapshot could be taken. */
1246
- printer?: PrinterSnapshot | null;
1247
- /** A bounded list of this print's events, newest first. */
1248
- recent_events: Array<EventRecord>;
1249
- }
1250
1357
  /** One print's end, as its `print_ended` event stored it. */
1251
1358
  export interface PrintEnded {
1252
1359
  /** The `print_ended` event. */
@@ -1718,6 +1825,39 @@ export interface Reported {
1718
1825
  /** One shape of the contracts, which say nothing more about it. */
1719
1826
  value: number;
1720
1827
  }
1828
+ /**
1829
+ * How far the plan has risen since one earlier frame of this print that was
1830
+ * seen: the height a camera should show the parts to have gained since then.
1831
+ */
1832
+ export interface Rise {
1833
+ /**
1834
+ * Two heights of the print's highest point, in millimetres: the first
1835
+ * is where the plan had it when that frame was captured, the second how
1836
+ * far it should have risen since — the rise of every layer since that
1837
+ * lays anything but supports. They are the plate's, not every part's: a
1838
+ * part the plan has finished does not grow with it.
1839
+ */
1840
+ mm: Array<number>;
1841
+ /**
1842
+ * When that earlier frame was captured: the newest frame at least half
1843
+ * an hour old that a periodic observation or a look at this print was
1844
+ * given, as that observation or look states its capture time.
1845
+ */
1846
+ since: Timestamp;
1847
+ }
1848
+ /**
1849
+ * One adjustable as the print's file set it at the current position, and as
1850
+ * a change made through this program since then left it.
1851
+ */
1852
+ export interface SetValue {
1853
+ /**
1854
+ * What the latest change made through this program set it to, when one
1855
+ * was made after the file last set it.
1856
+ */
1857
+ changed?: number | null;
1858
+ /** What the file's own commands set it to, by the current position. */
1859
+ file?: number | null;
1860
+ }
1721
1861
  /**
1722
1862
  * A build sheet's identifier as the sheet table names it, such as
1723
1863
  * `smooth-pei`: never blank, and trimmed of surrounding space as it is read.
@@ -1772,6 +1912,56 @@ export interface SignalPosition {
1772
1912
  /** The position. */
1773
1913
  position: FilePosition;
1774
1914
  }
1915
+ /**
1916
+ * What the slicer planned at the print's current file position: the shape
1917
+ * and place of what should be printing, read from the print's own G-code.
1918
+ *
1919
+ * These are the slicer's plan rather than an observation: a feature named
1920
+ * here is part of the design at this height, and nothing here says how well
1921
+ * it printed.
1922
+ */
1923
+ export interface SlicerPlan {
1924
+ /** Each setting in force the plan at this height says is wrong. */
1925
+ at_odds?: Array<PlanMismatch>;
1926
+ /** The part-cooling fan speed, in percent. */
1927
+ fan_percent?: SetValue | null;
1928
+ /** The final layer's height, in millimetres. */
1929
+ final_z_mm?: number | null;
1930
+ /** The flow factor, one meaning one hundred percent. */
1931
+ flow_factor?: SetValue | null;
1932
+ /**
1933
+ * The layer the print is in, counting the first as 1; absent before the
1934
+ * first.
1935
+ */
1936
+ layer?: number | null;
1937
+ /** The slicer's own estimate of the minutes left, at the current position. */
1938
+ minutes_left?: number | null;
1939
+ /** How many objects the file lays down; absent when it labels none. */
1940
+ object_count?: number | null;
1941
+ /**
1942
+ * The bed area each object the file lays down covers, unnamed, as
1943
+ * `[x_min, y_min, x_max, y_max]` in whole millimetres, in the order of
1944
+ * the file's object numbers.
1945
+ */
1946
+ objects?: Array<Array<number>>;
1947
+ /**
1948
+ * How far the plan has risen since an earlier frame; absent before any
1949
+ * frame is half an hour old.
1950
+ */
1951
+ rise?: Rise | null;
1952
+ /**
1953
+ * What the current layer lays material as, in the order the file first
1954
+ * names each: `Perimeter`, `Support material`, `Bridge infill`.
1955
+ */
1956
+ types?: Array<string>;
1957
+ /**
1958
+ * The facts the file does not state, which are therefore unknown rather
1959
+ * than absent.
1960
+ */
1961
+ unknown?: Array<PlanFact>;
1962
+ /** The current layer's height, in millimetres. */
1963
+ z_mm?: number | null;
1964
+ }
1775
1965
  /** A spool's remaining figure was corrected. */
1776
1966
  export interface SpoolAdjustedPayload {
1777
1967
  /** Who corrected it. */
@@ -2257,6 +2447,7 @@ export interface EventPayloads {
2257
2447
  filament_change_signalled: FilamentChangeSignalledPayload;
2258
2448
  filament_consumed: FilamentConsumedPayload;
2259
2449
  file_tally_rebaselined: FileTallyRebaselinedPayload;
2450
+ gcode_indexed: GcodeIndexedPayload;
2260
2451
  intervention_expired: InterventionExpiredPayload;
2261
2452
  malformed_external_event: MalformedExternalEventPayload;
2262
2453
  obico_failure_alert: ObicoFailureAlertPayload;
@@ -2287,7 +2478,7 @@ export interface EventPayloads {
2287
2478
  unattended_printer_activity: UnattendedPrinterActivityPayload;
2288
2479
  }
2289
2480
  /** Every kind the server declares a payload type for, in name order. */
2290
- export declare const EVENT_KINDS: readonly ["action_executed", "action_rejected", "action_requested", "agent_assessment", "camera_degraded", "camera_look", "camera_retry", "charge_pended", "detector_health_changed", "filament_change_signalled", "filament_consumed", "file_tally_rebaselined", "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"];
2481
+ export declare const EVENT_KINDS: readonly ["action_executed", "action_rejected", "action_requested", "agent_assessment", "camera_degraded", "camera_look", "camera_retry", "charge_pended", "detector_health_changed", "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"];
2291
2482
  /**
2292
2483
  * The payload of one event as the type its kind declares, or `undefined` for
2293
2484
  * an event of any other kind — one this client knows or one it does not. No
@@ -2332,7 +2523,7 @@ export declare class GeneratedClient extends GeneratedSurface {
2332
2523
  * the answer could not be read, and with `Refused` when the supervisor
2333
2524
  * said no.
2334
2525
  */
2335
- context(printId: string): Promise<ContextAnswer>;
2526
+ context(printId: string, since?: EventId): Promise<ContextAnswer>;
2336
2527
  /**
2337
2528
  * Call `image` on the configured supervisor.
2338
2529
  *
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.12.0";
10
+ export const CONTRACT_VERSION = "0.13.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.
@@ -66,6 +66,7 @@ export const EVENT_KINDS = [
66
66
  "filament_change_signalled",
67
67
  "filament_consumed",
68
68
  "file_tally_rebaselined",
69
+ "gcode_indexed",
69
70
  "intervention_expired",
70
71
  "malformed_external_event",
71
72
  "obico_failure_alert",
@@ -193,6 +194,15 @@ export const SHAPES = JSON.parse(`
193
194
  "ref": "ActionId"
194
195
  }
195
196
  },
197
+ "file_position_bytes": {
198
+ "paired_with": "",
199
+ "required": false,
200
+ "shape": {
201
+ "nullable": {
202
+ "scalar": "integer"
203
+ }
204
+ }
205
+ },
196
206
  "intervention_id": {
197
207
  "paired_with": "",
198
208
  "required": false,
@@ -480,6 +490,213 @@ export const SHAPES = JSON.parse(`
480
490
  "variants": {}
481
491
  }
482
492
  },
493
+ "AgentContext": {
494
+ "struct": {
495
+ "fields": {
496
+ "bounds": {
497
+ "paired_with": "",
498
+ "required": true,
499
+ "shape": {
500
+ "ref": "EffectiveBounds"
501
+ }
502
+ },
503
+ "interventions": {
504
+ "paired_with": "",
505
+ "required": true,
506
+ "shape": {
507
+ "list": {
508
+ "ref": "Intervention"
509
+ },
510
+ "non_empty": false
511
+ }
512
+ },
513
+ "job_error": {
514
+ "paired_with": "",
515
+ "required": false,
516
+ "shape": {
517
+ "nullable": {
518
+ "ref": "JobError"
519
+ }
520
+ }
521
+ },
522
+ "latest_image": {
523
+ "paired_with": "",
524
+ "required": false,
525
+ "shape": {
526
+ "nullable": {
527
+ "ref": "ImageRef"
528
+ }
529
+ }
530
+ },
531
+ "newest_event": {
532
+ "paired_with": "",
533
+ "required": false,
534
+ "shape": {
535
+ "nullable": {
536
+ "ref": "EventId"
537
+ }
538
+ }
539
+ },
540
+ "print": {
541
+ "paired_with": "",
542
+ "required": true,
543
+ "shape": {
544
+ "ref": "AgentPrint"
545
+ }
546
+ },
547
+ "printer": {
548
+ "paired_with": "",
549
+ "required": false,
550
+ "shape": {
551
+ "nullable": {
552
+ "ref": "AgentPrinter"
553
+ }
554
+ }
555
+ },
556
+ "recent_events": {
557
+ "paired_with": "",
558
+ "required": true,
559
+ "shape": {
560
+ "list": {
561
+ "ref": "AgentEvent"
562
+ },
563
+ "non_empty": false
564
+ }
565
+ },
566
+ "slicer": {
567
+ "paired_with": "",
568
+ "required": false,
569
+ "shape": {
570
+ "nullable": {
571
+ "ref": "SlicerPlan"
572
+ }
573
+ }
574
+ }
575
+ },
576
+ "tag_field": "",
577
+ "variants": {}
578
+ }
579
+ },
580
+ "AgentEvent": {
581
+ "struct": {
582
+ "fields": {
583
+ "id": {
584
+ "paired_with": "",
585
+ "required": true,
586
+ "shape": {
587
+ "ref": "EventId"
588
+ }
589
+ },
590
+ "kind": {
591
+ "paired_with": "",
592
+ "required": true,
593
+ "shape": {
594
+ "ref": "EventKind"
595
+ }
596
+ },
597
+ "payload": {
598
+ "paired_with": "",
599
+ "required": false,
600
+ "shape": {
601
+ "any": true
602
+ }
603
+ },
604
+ "received_at": {
605
+ "paired_with": "",
606
+ "required": true,
607
+ "shape": {
608
+ "ref": "Timestamp"
609
+ }
610
+ }
611
+ },
612
+ "tag_field": "",
613
+ "variants": {}
614
+ }
615
+ },
616
+ "AgentHeater": {
617
+ "struct": {
618
+ "fields": {
619
+ "actual_c": {
620
+ "paired_with": "",
621
+ "required": false,
622
+ "shape": {
623
+ "nullable": {
624
+ "scalar": "number"
625
+ }
626
+ }
627
+ },
628
+ "target_c": {
629
+ "paired_with": "",
630
+ "required": false,
631
+ "shape": {
632
+ "nullable": {
633
+ "scalar": "number"
634
+ }
635
+ }
636
+ }
637
+ },
638
+ "tag_field": "",
639
+ "variants": {}
640
+ }
641
+ },
642
+ "AgentPrint": {
643
+ "struct": {
644
+ "fields": {
645
+ "end_reason": {
646
+ "paired_with": "",
647
+ "required": false,
648
+ "shape": {
649
+ "nullable": {
650
+ "scalar": "string"
651
+ }
652
+ }
653
+ },
654
+ "id": {
655
+ "paired_with": "",
656
+ "required": true,
657
+ "shape": {
658
+ "ref": "PrintId"
659
+ }
660
+ },
661
+ "state": {
662
+ "paired_with": "",
663
+ "required": true,
664
+ "shape": {
665
+ "ref": "PrinterState"
666
+ }
667
+ }
668
+ },
669
+ "tag_field": "",
670
+ "variants": {}
671
+ }
672
+ },
673
+ "AgentPrinter": {
674
+ "struct": {
675
+ "fields": {
676
+ "bed": {
677
+ "paired_with": "",
678
+ "required": false,
679
+ "shape": {
680
+ "nullable": {
681
+ "ref": "AgentHeater"
682
+ }
683
+ }
684
+ },
685
+ "tools": {
686
+ "paired_with": "",
687
+ "required": false,
688
+ "shape": {
689
+ "list": {
690
+ "ref": "AgentHeater"
691
+ },
692
+ "non_empty": false
693
+ }
694
+ }
695
+ },
696
+ "tag_field": "",
697
+ "variants": {}
698
+ }
699
+ },
483
700
  "BedTemperature": {
484
701
  "struct": {
485
702
  "fields": {
@@ -796,7 +1013,7 @@ export const SHAPES = JSON.parse(`
796
1013
  "paired_with": "",
797
1014
  "required": true,
798
1015
  "shape": {
799
- "ref": "PrintContext"
1016
+ "ref": "AgentContext"
800
1017
  }
801
1018
  },
802
1019
  "image_path": {
@@ -1334,6 +1551,35 @@ export const SHAPES = JSON.parse(`
1334
1551
  "undecodable"
1335
1552
  ]
1336
1553
  },
1554
+ "GcodeIndexedPayload": {
1555
+ "struct": {
1556
+ "fields": {
1557
+ "bytes": {
1558
+ "paired_with": "",
1559
+ "required": true,
1560
+ "shape": {
1561
+ "scalar": "integer"
1562
+ }
1563
+ },
1564
+ "file_name": {
1565
+ "paired_with": "",
1566
+ "required": true,
1567
+ "shape": {
1568
+ "ref": "FileName"
1569
+ }
1570
+ },
1571
+ "layers": {
1572
+ "paired_with": "",
1573
+ "required": true,
1574
+ "shape": {
1575
+ "scalar": "integer"
1576
+ }
1577
+ }
1578
+ },
1579
+ "tag_field": "",
1580
+ "variants": {}
1581
+ }
1582
+ },
1337
1583
  "HeatedTool": {
1338
1584
  "struct": {
1339
1585
  "fields": {
@@ -2578,6 +2824,24 @@ export const SHAPES = JSON.parse(`
2578
2824
  "variants": {}
2579
2825
  }
2580
2826
  },
2827
+ "PlanFact": {
2828
+ "enum": [
2829
+ "layer",
2830
+ "final_z",
2831
+ "types",
2832
+ "minutes_left",
2833
+ "flow_factor",
2834
+ "fan_percent",
2835
+ "objects",
2836
+ "rise"
2837
+ ]
2838
+ },
2839
+ "PlanMismatch": {
2840
+ "enum": [
2841
+ "fan_off_over_bridges",
2842
+ "flow_low_over_walls"
2843
+ ]
2844
+ },
2581
2845
  "PolicyDecision": {
2582
2846
  "union": {
2583
2847
  "tag_field": "",
@@ -3449,91 +3713,6 @@ export const SHAPES = JSON.parse(`
3449
3713
  }
3450
3714
  }
3451
3715
  },
3452
- "PrintContext": {
3453
- "struct": {
3454
- "fields": {
3455
- "bounds": {
3456
- "paired_with": "",
3457
- "required": true,
3458
- "shape": {
3459
- "ref": "EffectiveBounds"
3460
- }
3461
- },
3462
- "detector": {
3463
- "paired_with": "",
3464
- "required": false,
3465
- "shape": {
3466
- "ref": "DetectorHealth"
3467
- }
3468
- },
3469
- "interventions": {
3470
- "paired_with": "",
3471
- "required": true,
3472
- "shape": {
3473
- "list": {
3474
- "ref": "Intervention"
3475
- },
3476
- "non_empty": false
3477
- }
3478
- },
3479
- "job": {
3480
- "paired_with": "",
3481
- "required": false,
3482
- "shape": {
3483
- "nullable": {
3484
- "ref": "JobSnapshot"
3485
- }
3486
- }
3487
- },
3488
- "latest_image": {
3489
- "paired_with": "",
3490
- "required": false,
3491
- "shape": {
3492
- "nullable": {
3493
- "ref": "ImageRef"
3494
- }
3495
- }
3496
- },
3497
- "manifest": {
3498
- "paired_with": "",
3499
- "required": false,
3500
- "shape": {
3501
- "nullable": {
3502
- "ref": "JobManifest"
3503
- }
3504
- }
3505
- },
3506
- "print": {
3507
- "paired_with": "",
3508
- "required": true,
3509
- "shape": {
3510
- "ref": "PrintRecord"
3511
- }
3512
- },
3513
- "printer": {
3514
- "paired_with": "",
3515
- "required": false,
3516
- "shape": {
3517
- "nullable": {
3518
- "ref": "PrinterSnapshot"
3519
- }
3520
- }
3521
- },
3522
- "recent_events": {
3523
- "paired_with": "",
3524
- "required": true,
3525
- "shape": {
3526
- "list": {
3527
- "ref": "EventRecord"
3528
- },
3529
- "non_empty": false
3530
- }
3531
- }
3532
- },
3533
- "tag_field": "",
3534
- "variants": {}
3535
- }
3536
- },
3537
3716
  "PrintEnded": {
3538
3717
  "struct": {
3539
3718
  "fields": {
@@ -4915,6 +5094,57 @@ export const SHAPES = JSON.parse(`
4915
5094
  "variants": {}
4916
5095
  }
4917
5096
  },
5097
+ "Rise": {
5098
+ "struct": {
5099
+ "fields": {
5100
+ "mm": {
5101
+ "paired_with": "",
5102
+ "required": true,
5103
+ "shape": {
5104
+ "list": {
5105
+ "scalar": "number"
5106
+ },
5107
+ "non_empty": true
5108
+ }
5109
+ },
5110
+ "since": {
5111
+ "paired_with": "",
5112
+ "required": true,
5113
+ "shape": {
5114
+ "ref": "Timestamp"
5115
+ }
5116
+ }
5117
+ },
5118
+ "tag_field": "",
5119
+ "variants": {}
5120
+ }
5121
+ },
5122
+ "SetValue": {
5123
+ "struct": {
5124
+ "fields": {
5125
+ "changed": {
5126
+ "paired_with": "",
5127
+ "required": false,
5128
+ "shape": {
5129
+ "nullable": {
5130
+ "scalar": "number"
5131
+ }
5132
+ }
5133
+ },
5134
+ "file": {
5135
+ "paired_with": "",
5136
+ "required": false,
5137
+ "shape": {
5138
+ "nullable": {
5139
+ "scalar": "number"
5140
+ }
5141
+ }
5142
+ }
5143
+ },
5144
+ "tag_field": "",
5145
+ "variants": {}
5146
+ }
5147
+ },
4918
5148
  "SheetId": {
4919
5149
  "alias": {
4920
5150
  "scalar": "string"
@@ -5115,6 +5345,129 @@ export const SHAPES = JSON.parse(`
5115
5345
  "variants": {}
5116
5346
  }
5117
5347
  },
5348
+ "SlicerPlan": {
5349
+ "struct": {
5350
+ "fields": {
5351
+ "at_odds": {
5352
+ "paired_with": "",
5353
+ "required": false,
5354
+ "shape": {
5355
+ "list": {
5356
+ "ref": "PlanMismatch"
5357
+ },
5358
+ "non_empty": false
5359
+ }
5360
+ },
5361
+ "fan_percent": {
5362
+ "paired_with": "",
5363
+ "required": false,
5364
+ "shape": {
5365
+ "nullable": {
5366
+ "ref": "SetValue"
5367
+ }
5368
+ }
5369
+ },
5370
+ "final_z_mm": {
5371
+ "paired_with": "",
5372
+ "required": false,
5373
+ "shape": {
5374
+ "nullable": {
5375
+ "scalar": "number"
5376
+ }
5377
+ }
5378
+ },
5379
+ "flow_factor": {
5380
+ "paired_with": "",
5381
+ "required": false,
5382
+ "shape": {
5383
+ "nullable": {
5384
+ "ref": "SetValue"
5385
+ }
5386
+ }
5387
+ },
5388
+ "layer": {
5389
+ "paired_with": "",
5390
+ "required": false,
5391
+ "shape": {
5392
+ "nullable": {
5393
+ "scalar": "integer"
5394
+ }
5395
+ }
5396
+ },
5397
+ "minutes_left": {
5398
+ "paired_with": "",
5399
+ "required": false,
5400
+ "shape": {
5401
+ "nullable": {
5402
+ "scalar": "integer"
5403
+ }
5404
+ }
5405
+ },
5406
+ "object_count": {
5407
+ "paired_with": "",
5408
+ "required": false,
5409
+ "shape": {
5410
+ "nullable": {
5411
+ "scalar": "integer"
5412
+ }
5413
+ }
5414
+ },
5415
+ "objects": {
5416
+ "paired_with": "",
5417
+ "required": false,
5418
+ "shape": {
5419
+ "list": {
5420
+ "list": {
5421
+ "scalar": "integer"
5422
+ },
5423
+ "non_empty": true
5424
+ },
5425
+ "non_empty": false
5426
+ }
5427
+ },
5428
+ "rise": {
5429
+ "paired_with": "",
5430
+ "required": false,
5431
+ "shape": {
5432
+ "nullable": {
5433
+ "ref": "Rise"
5434
+ }
5435
+ }
5436
+ },
5437
+ "types": {
5438
+ "paired_with": "",
5439
+ "required": false,
5440
+ "shape": {
5441
+ "list": {
5442
+ "scalar": "string"
5443
+ },
5444
+ "non_empty": false
5445
+ }
5446
+ },
5447
+ "unknown": {
5448
+ "paired_with": "",
5449
+ "required": false,
5450
+ "shape": {
5451
+ "list": {
5452
+ "ref": "PlanFact"
5453
+ },
5454
+ "non_empty": false
5455
+ }
5456
+ },
5457
+ "z_mm": {
5458
+ "paired_with": "",
5459
+ "required": false,
5460
+ "shape": {
5461
+ "nullable": {
5462
+ "scalar": "number"
5463
+ }
5464
+ }
5465
+ }
5466
+ },
5467
+ "tag_field": "",
5468
+ "variants": {}
5469
+ }
5470
+ },
5118
5471
  "SpoolAdjustedPayload": {
5119
5472
  "struct": {
5120
5473
  "fields": {
@@ -6691,9 +7044,12 @@ export class GeneratedClient extends GeneratedSurface {
6691
7044
  * the answer could not be read, and with `Refused` when the supervisor
6692
7045
  * said no.
6693
7046
  */
6694
- async context(printId) {
7047
+ async context(printId, since) {
6695
7048
  const target = `/v1/prints/${printId}/context`;
6696
7049
  const asked = [];
7050
+ if (since !== undefined) {
7051
+ asked.push(["since", String(since)]);
7052
+ }
6697
7053
  const sending = undefined;
6698
7054
  return await this.call("GET", target, asked, sending, "ContextAnswer");
6699
7055
  }
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.12.0",
15
+ "printobserverContractVersion": "0.13.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.12.0"
22
+ "version": "0.13.0"
23
23
  }