@printobserver/sdk 0.11.0 → 0.12.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 +141 -3
- package/dist/contract.js +486 -3
- package/package.json +2 -2
package/dist/contract.d.ts
CHANGED
|
@@ -188,6 +188,13 @@ export interface CameraLookPayload {
|
|
|
188
188
|
* handed to whoever looked, oldest first.
|
|
189
189
|
*/
|
|
190
190
|
delivered?: Array<EventId>;
|
|
191
|
+
/**
|
|
192
|
+
* When the frame this look answered was captured, which its source says or
|
|
193
|
+
* the moment it answered; absent when there is no frame. Two looks naming
|
|
194
|
+
* one
|
|
195
|
+
* instant saw one frame: no newer one had been taken.
|
|
196
|
+
*/
|
|
197
|
+
frame_captured_at?: Timestamp | null;
|
|
191
198
|
/**
|
|
192
199
|
* How long the look waited for something to happen before it was taken,
|
|
193
200
|
* in whole seconds.
|
|
@@ -668,6 +675,15 @@ export interface JobManifest {
|
|
|
668
675
|
metadata: Record<string, string>;
|
|
669
676
|
/** The nozzle the job is sliced for, in millimetres. */
|
|
670
677
|
nozzle_diameter_mm: number;
|
|
678
|
+
/**
|
|
679
|
+
* The build sheet the job goes down on, as one of the sheet ids the
|
|
680
|
+
* server's sheet table names, such as `smooth-pei` or `textured-pei`.
|
|
681
|
+
*
|
|
682
|
+
* Every start must declare one: a start whose manifest names none is
|
|
683
|
+
* refused, and no override lets it through. Optional here only so that a
|
|
684
|
+
* manifest stored before the field existed still loads.
|
|
685
|
+
*/
|
|
686
|
+
sheet?: string | null;
|
|
671
687
|
/** The slicer profile the job was sliced with. */
|
|
672
688
|
slicer_profile: string;
|
|
673
689
|
}
|
|
@@ -797,6 +813,55 @@ export interface ManifestNarrowing {
|
|
|
797
813
|
/** The range the manifest asked for. */
|
|
798
814
|
requested: Range;
|
|
799
815
|
}
|
|
816
|
+
/**
|
|
817
|
+
* A filament material as a spool's registration or a slicer's settings name
|
|
818
|
+
* it, such as `PLA`: never blank, and trimmed of surrounding space as it is
|
|
819
|
+
* read.
|
|
820
|
+
*/
|
|
821
|
+
export type MaterialName = string;
|
|
822
|
+
/** Why the material check objects to a start, with what it compared. */
|
|
823
|
+
export type MaterialObjection = {
|
|
824
|
+
cause: "mismatch";
|
|
825
|
+
loaded: MaterialName;
|
|
826
|
+
sliced_for: MaterialName;
|
|
827
|
+
spool: PreflightSpool;
|
|
828
|
+
tool: number;
|
|
829
|
+
} | {
|
|
830
|
+
cause: "undeclared";
|
|
831
|
+
file_name: FileName;
|
|
832
|
+
loaded: MaterialName;
|
|
833
|
+
spool: PreflightSpool;
|
|
834
|
+
tool: number;
|
|
835
|
+
} | {
|
|
836
|
+
cause: "unread";
|
|
837
|
+
detail: string;
|
|
838
|
+
file_name: FileName;
|
|
839
|
+
loaded: MaterialName;
|
|
840
|
+
spool: PreflightSpool;
|
|
841
|
+
tool: number;
|
|
842
|
+
};
|
|
843
|
+
/**
|
|
844
|
+
* Whether a file was sliced for the material of the spool loaded on tool 0,
|
|
845
|
+
* tagged by its verdict.
|
|
846
|
+
*/
|
|
847
|
+
export type MaterialResult = {
|
|
848
|
+
verdict: "passed";
|
|
849
|
+
loaded: MaterialName;
|
|
850
|
+
sliced_for: MaterialName;
|
|
851
|
+
spool: PreflightSpool;
|
|
852
|
+
tool: number;
|
|
853
|
+
} | {
|
|
854
|
+
verdict: "unchecked";
|
|
855
|
+
} | {
|
|
856
|
+
verdict: "refused";
|
|
857
|
+
objection: MaterialObjection;
|
|
858
|
+
} | {
|
|
859
|
+
verdict: "overridden";
|
|
860
|
+
objection: MaterialObjection;
|
|
861
|
+
} | {
|
|
862
|
+
verdict: "warned";
|
|
863
|
+
objection: MaterialObjection;
|
|
864
|
+
};
|
|
800
865
|
/**
|
|
801
866
|
* Obico reported a print failure.
|
|
802
867
|
*
|
|
@@ -916,6 +981,11 @@ export interface PendingTaken {
|
|
|
916
981
|
* at the same moment, untagged by any detector, is this event's image.
|
|
917
982
|
*/
|
|
918
983
|
export interface PeriodicObservationPayload {
|
|
984
|
+
/**
|
|
985
|
+
* When the observation's frame was captured, which its source says or the
|
|
986
|
+
* moment it answered; absent when there is no frame.
|
|
987
|
+
*/
|
|
988
|
+
frame_captured_at?: Timestamp | null;
|
|
919
989
|
/** How often these are taken, in whole seconds. */
|
|
920
990
|
interval_s: number;
|
|
921
991
|
/**
|
|
@@ -973,11 +1043,25 @@ export interface Preflight {
|
|
|
973
1043
|
checked_at: Timestamp;
|
|
974
1044
|
/** The file the print is of. */
|
|
975
1045
|
file_name: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* Whether the file was sliced for the material of the spool on tool 0.
|
|
1048
|
+
* Absent from a check recorded before this check existed.
|
|
1049
|
+
*/
|
|
1050
|
+
material?: MaterialResult | null;
|
|
1051
|
+
/**
|
|
1052
|
+
* Whether the declared build sheet suits that spool's material. Absent
|
|
1053
|
+
* from a check recorded before this check existed, and from a read that
|
|
1054
|
+
* was given no sheet.
|
|
1055
|
+
*/
|
|
1056
|
+
sheet?: SheetResult | null;
|
|
976
1057
|
/** What it found for each tool. */
|
|
977
1058
|
tools: Array<PreflightTool>;
|
|
978
1059
|
/**
|
|
979
1060
|
* The worst of the tools' verdicts, in the order insufficient,
|
|
980
1061
|
* unverified spool, no analysis, warned, overridden, unchecked, passed.
|
|
1062
|
+
*
|
|
1063
|
+
* The filament weight's alone: the material and sheet checks carry
|
|
1064
|
+
* verdicts of their own, in `material` and `sheet`.
|
|
981
1065
|
*/
|
|
982
1066
|
verdict: PreflightVerdict;
|
|
983
1067
|
}
|
|
@@ -1096,6 +1180,8 @@ export type PrintAction = {
|
|
|
1096
1180
|
file_name: FileName;
|
|
1097
1181
|
manifest: JobManifest;
|
|
1098
1182
|
override_filament_check?: boolean;
|
|
1183
|
+
override_material_check?: boolean;
|
|
1184
|
+
override_sheet_check?: boolean;
|
|
1099
1185
|
reason: string;
|
|
1100
1186
|
} | {
|
|
1101
1187
|
action: "set_feedrate_factor";
|
|
@@ -1596,7 +1682,15 @@ export type RejectionReason = {
|
|
|
1596
1682
|
file_name: string;
|
|
1597
1683
|
waited_s: number;
|
|
1598
1684
|
};
|
|
1599
|
-
} |
|
|
1685
|
+
} | {
|
|
1686
|
+
material_refused: {
|
|
1687
|
+
objection: MaterialObjection;
|
|
1688
|
+
};
|
|
1689
|
+
} | {
|
|
1690
|
+
sheet_refused: {
|
|
1691
|
+
objection: SheetObjection;
|
|
1692
|
+
};
|
|
1693
|
+
} | "sheet_not_declared" | "print_already_ended" | {
|
|
1600
1694
|
print_still_active: {
|
|
1601
1695
|
state: PrinterState;
|
|
1602
1696
|
};
|
|
@@ -1624,6 +1718,50 @@ export interface Reported {
|
|
|
1624
1718
|
/** One shape of the contracts, which say nothing more about it. */
|
|
1625
1719
|
value: number;
|
|
1626
1720
|
}
|
|
1721
|
+
/**
|
|
1722
|
+
* A build sheet's identifier as the sheet table names it, such as
|
|
1723
|
+
* `smooth-pei`: never blank, and trimmed of surrounding space as it is read.
|
|
1724
|
+
*/
|
|
1725
|
+
export type SheetId = string;
|
|
1726
|
+
/** Why the sheet check objects to a start, with what it compared. */
|
|
1727
|
+
export type SheetObjection = {
|
|
1728
|
+
cause: "not_allowed";
|
|
1729
|
+
allowed: Array<SheetId>;
|
|
1730
|
+
material: MaterialName;
|
|
1731
|
+
sheet: SheetId;
|
|
1732
|
+
} | {
|
|
1733
|
+
cause: "unlisted_material";
|
|
1734
|
+
material: MaterialName;
|
|
1735
|
+
sheet: SheetId;
|
|
1736
|
+
} | {
|
|
1737
|
+
cause: "unknown_sheet";
|
|
1738
|
+
known: Array<SheetId>;
|
|
1739
|
+
material: MaterialName;
|
|
1740
|
+
sheet: SheetId;
|
|
1741
|
+
};
|
|
1742
|
+
/**
|
|
1743
|
+
* Whether the declared build sheet suits the loaded spool's material, tagged
|
|
1744
|
+
* by its verdict.
|
|
1745
|
+
*/
|
|
1746
|
+
export type SheetResult = {
|
|
1747
|
+
verdict: "passed";
|
|
1748
|
+
allowed: Array<SheetId>;
|
|
1749
|
+
material: MaterialName;
|
|
1750
|
+
sheet: SheetId;
|
|
1751
|
+
} | {
|
|
1752
|
+
verdict: "unchecked";
|
|
1753
|
+
} | {
|
|
1754
|
+
verdict: "undeclared";
|
|
1755
|
+
} | {
|
|
1756
|
+
verdict: "refused";
|
|
1757
|
+
objection: SheetObjection;
|
|
1758
|
+
} | {
|
|
1759
|
+
verdict: "overridden";
|
|
1760
|
+
objection: SheetObjection;
|
|
1761
|
+
} | {
|
|
1762
|
+
verdict: "warned";
|
|
1763
|
+
objection: SheetObjection;
|
|
1764
|
+
};
|
|
1627
1765
|
/** The position a filament change charged up to, and how fresh it is. */
|
|
1628
1766
|
export interface SignalPosition {
|
|
1629
1767
|
/**
|
|
@@ -2284,7 +2422,7 @@ export declare class GeneratedClient extends GeneratedSurface {
|
|
|
2284
2422
|
* the answer could not be read, and with `Refused` when the supervisor
|
|
2285
2423
|
* said no.
|
|
2286
2424
|
*/
|
|
2287
|
-
preflight(fileName: string): Promise<PreflightAnswer>;
|
|
2425
|
+
preflight(fileName: string, sheet?: SheetId): Promise<PreflightAnswer>;
|
|
2288
2426
|
/**
|
|
2289
2427
|
* Call `pause` on the configured supervisor.
|
|
2290
2428
|
*
|
|
@@ -2324,7 +2462,7 @@ export declare class GeneratedClient extends GeneratedSurface {
|
|
|
2324
2462
|
* is made, and the policy's own refusal arrives as `Rejected`, carrying
|
|
2325
2463
|
* the reason, the value asked for and the range allowed.
|
|
2326
2464
|
*/
|
|
2327
|
-
startPrint(printId: string, fileName: FileName, manifest: JobManifest, reason: string, overrideFilamentCheck?: boolean): Promise<ActionAnswer>;
|
|
2465
|
+
startPrint(printId: string, fileName: FileName, manifest: JobManifest, reason: string, overrideFilamentCheck?: boolean, overrideMaterialCheck?: boolean, overrideSheetCheck?: boolean): Promise<ActionAnswer>;
|
|
2328
2466
|
/**
|
|
2329
2467
|
* Call `set_feedrate_factor` on the configured supervisor.
|
|
2330
2468
|
*
|
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.12.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.
|
|
@@ -548,6 +548,15 @@ export const SHAPES = JSON.parse(`
|
|
|
548
548
|
"non_empty": false
|
|
549
549
|
}
|
|
550
550
|
},
|
|
551
|
+
"frame_captured_at": {
|
|
552
|
+
"paired_with": "",
|
|
553
|
+
"required": false,
|
|
554
|
+
"shape": {
|
|
555
|
+
"nullable": {
|
|
556
|
+
"ref": "Timestamp"
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
551
560
|
"waited_s": {
|
|
552
561
|
"paired_with": "",
|
|
553
562
|
"required": true,
|
|
@@ -1754,6 +1763,15 @@ export const SHAPES = JSON.parse(`
|
|
|
1754
1763
|
"scalar": "number"
|
|
1755
1764
|
}
|
|
1756
1765
|
},
|
|
1766
|
+
"sheet": {
|
|
1767
|
+
"paired_with": "",
|
|
1768
|
+
"required": false,
|
|
1769
|
+
"shape": {
|
|
1770
|
+
"nullable": {
|
|
1771
|
+
"scalar": "string"
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
},
|
|
1757
1775
|
"slicer_profile": {
|
|
1758
1776
|
"paired_with": "",
|
|
1759
1777
|
"required": true,
|
|
@@ -2062,6 +2080,212 @@ export const SHAPES = JSON.parse(`
|
|
|
2062
2080
|
"variants": {}
|
|
2063
2081
|
}
|
|
2064
2082
|
},
|
|
2083
|
+
"MaterialName": {
|
|
2084
|
+
"alias": {
|
|
2085
|
+
"scalar": "string"
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
"MaterialObjection": {
|
|
2089
|
+
"union": {
|
|
2090
|
+
"tag_field": "cause",
|
|
2091
|
+
"variants": {
|
|
2092
|
+
"mismatch": {
|
|
2093
|
+
"fields": {
|
|
2094
|
+
"loaded": {
|
|
2095
|
+
"paired_with": "",
|
|
2096
|
+
"required": true,
|
|
2097
|
+
"shape": {
|
|
2098
|
+
"ref": "MaterialName"
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
"sliced_for": {
|
|
2102
|
+
"paired_with": "",
|
|
2103
|
+
"required": true,
|
|
2104
|
+
"shape": {
|
|
2105
|
+
"ref": "MaterialName"
|
|
2106
|
+
}
|
|
2107
|
+
},
|
|
2108
|
+
"spool": {
|
|
2109
|
+
"paired_with": "",
|
|
2110
|
+
"required": true,
|
|
2111
|
+
"shape": {
|
|
2112
|
+
"ref": "PreflightSpool"
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2115
|
+
"tool": {
|
|
2116
|
+
"paired_with": "",
|
|
2117
|
+
"required": true,
|
|
2118
|
+
"shape": {
|
|
2119
|
+
"scalar": "integer"
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
},
|
|
2123
|
+
"payload": null,
|
|
2124
|
+
"unit": false
|
|
2125
|
+
},
|
|
2126
|
+
"undeclared": {
|
|
2127
|
+
"fields": {
|
|
2128
|
+
"file_name": {
|
|
2129
|
+
"paired_with": "",
|
|
2130
|
+
"required": true,
|
|
2131
|
+
"shape": {
|
|
2132
|
+
"ref": "FileName"
|
|
2133
|
+
}
|
|
2134
|
+
},
|
|
2135
|
+
"loaded": {
|
|
2136
|
+
"paired_with": "",
|
|
2137
|
+
"required": true,
|
|
2138
|
+
"shape": {
|
|
2139
|
+
"ref": "MaterialName"
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
"spool": {
|
|
2143
|
+
"paired_with": "",
|
|
2144
|
+
"required": true,
|
|
2145
|
+
"shape": {
|
|
2146
|
+
"ref": "PreflightSpool"
|
|
2147
|
+
}
|
|
2148
|
+
},
|
|
2149
|
+
"tool": {
|
|
2150
|
+
"paired_with": "",
|
|
2151
|
+
"required": true,
|
|
2152
|
+
"shape": {
|
|
2153
|
+
"scalar": "integer"
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
},
|
|
2157
|
+
"payload": null,
|
|
2158
|
+
"unit": false
|
|
2159
|
+
},
|
|
2160
|
+
"unread": {
|
|
2161
|
+
"fields": {
|
|
2162
|
+
"detail": {
|
|
2163
|
+
"paired_with": "",
|
|
2164
|
+
"required": true,
|
|
2165
|
+
"shape": {
|
|
2166
|
+
"scalar": "string"
|
|
2167
|
+
}
|
|
2168
|
+
},
|
|
2169
|
+
"file_name": {
|
|
2170
|
+
"paired_with": "",
|
|
2171
|
+
"required": true,
|
|
2172
|
+
"shape": {
|
|
2173
|
+
"ref": "FileName"
|
|
2174
|
+
}
|
|
2175
|
+
},
|
|
2176
|
+
"loaded": {
|
|
2177
|
+
"paired_with": "",
|
|
2178
|
+
"required": true,
|
|
2179
|
+
"shape": {
|
|
2180
|
+
"ref": "MaterialName"
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
"spool": {
|
|
2184
|
+
"paired_with": "",
|
|
2185
|
+
"required": true,
|
|
2186
|
+
"shape": {
|
|
2187
|
+
"ref": "PreflightSpool"
|
|
2188
|
+
}
|
|
2189
|
+
},
|
|
2190
|
+
"tool": {
|
|
2191
|
+
"paired_with": "",
|
|
2192
|
+
"required": true,
|
|
2193
|
+
"shape": {
|
|
2194
|
+
"scalar": "integer"
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
},
|
|
2198
|
+
"payload": null,
|
|
2199
|
+
"unit": false
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
},
|
|
2204
|
+
"MaterialResult": {
|
|
2205
|
+
"union": {
|
|
2206
|
+
"tag_field": "verdict",
|
|
2207
|
+
"variants": {
|
|
2208
|
+
"overridden": {
|
|
2209
|
+
"fields": {
|
|
2210
|
+
"objection": {
|
|
2211
|
+
"paired_with": "",
|
|
2212
|
+
"required": true,
|
|
2213
|
+
"shape": {
|
|
2214
|
+
"ref": "MaterialObjection"
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
},
|
|
2218
|
+
"payload": null,
|
|
2219
|
+
"unit": false
|
|
2220
|
+
},
|
|
2221
|
+
"passed": {
|
|
2222
|
+
"fields": {
|
|
2223
|
+
"loaded": {
|
|
2224
|
+
"paired_with": "",
|
|
2225
|
+
"required": true,
|
|
2226
|
+
"shape": {
|
|
2227
|
+
"ref": "MaterialName"
|
|
2228
|
+
}
|
|
2229
|
+
},
|
|
2230
|
+
"sliced_for": {
|
|
2231
|
+
"paired_with": "",
|
|
2232
|
+
"required": true,
|
|
2233
|
+
"shape": {
|
|
2234
|
+
"ref": "MaterialName"
|
|
2235
|
+
}
|
|
2236
|
+
},
|
|
2237
|
+
"spool": {
|
|
2238
|
+
"paired_with": "",
|
|
2239
|
+
"required": true,
|
|
2240
|
+
"shape": {
|
|
2241
|
+
"ref": "PreflightSpool"
|
|
2242
|
+
}
|
|
2243
|
+
},
|
|
2244
|
+
"tool": {
|
|
2245
|
+
"paired_with": "",
|
|
2246
|
+
"required": true,
|
|
2247
|
+
"shape": {
|
|
2248
|
+
"scalar": "integer"
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
},
|
|
2252
|
+
"payload": null,
|
|
2253
|
+
"unit": false
|
|
2254
|
+
},
|
|
2255
|
+
"refused": {
|
|
2256
|
+
"fields": {
|
|
2257
|
+
"objection": {
|
|
2258
|
+
"paired_with": "",
|
|
2259
|
+
"required": true,
|
|
2260
|
+
"shape": {
|
|
2261
|
+
"ref": "MaterialObjection"
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
},
|
|
2265
|
+
"payload": null,
|
|
2266
|
+
"unit": false
|
|
2267
|
+
},
|
|
2268
|
+
"unchecked": {
|
|
2269
|
+
"fields": {},
|
|
2270
|
+
"payload": null,
|
|
2271
|
+
"unit": true
|
|
2272
|
+
},
|
|
2273
|
+
"warned": {
|
|
2274
|
+
"fields": {
|
|
2275
|
+
"objection": {
|
|
2276
|
+
"paired_with": "",
|
|
2277
|
+
"required": true,
|
|
2278
|
+
"shape": {
|
|
2279
|
+
"ref": "MaterialObjection"
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
},
|
|
2283
|
+
"payload": null,
|
|
2284
|
+
"unit": false
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
},
|
|
2065
2289
|
"ObicoFailureAlertPayload": {
|
|
2066
2290
|
"struct": {
|
|
2067
2291
|
"fields": {
|
|
@@ -2315,6 +2539,15 @@ export const SHAPES = JSON.parse(`
|
|
|
2315
2539
|
"PeriodicObservationPayload": {
|
|
2316
2540
|
"struct": {
|
|
2317
2541
|
"fields": {
|
|
2542
|
+
"frame_captured_at": {
|
|
2543
|
+
"paired_with": "",
|
|
2544
|
+
"required": false,
|
|
2545
|
+
"shape": {
|
|
2546
|
+
"nullable": {
|
|
2547
|
+
"ref": "Timestamp"
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2318
2551
|
"interval_s": {
|
|
2319
2552
|
"paired_with": "",
|
|
2320
2553
|
"required": true,
|
|
@@ -2426,6 +2659,24 @@ export const SHAPES = JSON.parse(`
|
|
|
2426
2659
|
"scalar": "string"
|
|
2427
2660
|
}
|
|
2428
2661
|
},
|
|
2662
|
+
"material": {
|
|
2663
|
+
"paired_with": "",
|
|
2664
|
+
"required": false,
|
|
2665
|
+
"shape": {
|
|
2666
|
+
"nullable": {
|
|
2667
|
+
"ref": "MaterialResult"
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
},
|
|
2671
|
+
"sheet": {
|
|
2672
|
+
"paired_with": "",
|
|
2673
|
+
"required": false,
|
|
2674
|
+
"shape": {
|
|
2675
|
+
"nullable": {
|
|
2676
|
+
"ref": "SheetResult"
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
},
|
|
2429
2680
|
"tools": {
|
|
2430
2681
|
"paired_with": "",
|
|
2431
2682
|
"required": true,
|
|
@@ -3170,6 +3421,20 @@ export const SHAPES = JSON.parse(`
|
|
|
3170
3421
|
"scalar": "boolean"
|
|
3171
3422
|
}
|
|
3172
3423
|
},
|
|
3424
|
+
"override_material_check": {
|
|
3425
|
+
"paired_with": "",
|
|
3426
|
+
"required": false,
|
|
3427
|
+
"shape": {
|
|
3428
|
+
"scalar": "boolean"
|
|
3429
|
+
}
|
|
3430
|
+
},
|
|
3431
|
+
"override_sheet_check": {
|
|
3432
|
+
"paired_with": "",
|
|
3433
|
+
"required": false,
|
|
3434
|
+
"shape": {
|
|
3435
|
+
"scalar": "boolean"
|
|
3436
|
+
}
|
|
3437
|
+
},
|
|
3173
3438
|
"reason": {
|
|
3174
3439
|
"paired_with": "",
|
|
3175
3440
|
"required": true,
|
|
@@ -4444,6 +4709,19 @@ export const SHAPES = JSON.parse(`
|
|
|
4444
4709
|
"payload": null,
|
|
4445
4710
|
"unit": false
|
|
4446
4711
|
},
|
|
4712
|
+
"material_refused": {
|
|
4713
|
+
"fields": {
|
|
4714
|
+
"objection": {
|
|
4715
|
+
"paired_with": "",
|
|
4716
|
+
"required": true,
|
|
4717
|
+
"shape": {
|
|
4718
|
+
"ref": "MaterialObjection"
|
|
4719
|
+
}
|
|
4720
|
+
}
|
|
4721
|
+
},
|
|
4722
|
+
"payload": null,
|
|
4723
|
+
"unit": false
|
|
4724
|
+
},
|
|
4447
4725
|
"min_interval_not_elapsed": {
|
|
4448
4726
|
"fields": {
|
|
4449
4727
|
"interval_s": {
|
|
@@ -4527,6 +4805,24 @@ export const SHAPES = JSON.parse(`
|
|
|
4527
4805
|
"payload": null,
|
|
4528
4806
|
"unit": false
|
|
4529
4807
|
},
|
|
4808
|
+
"sheet_not_declared": {
|
|
4809
|
+
"fields": {},
|
|
4810
|
+
"payload": null,
|
|
4811
|
+
"unit": true
|
|
4812
|
+
},
|
|
4813
|
+
"sheet_refused": {
|
|
4814
|
+
"fields": {
|
|
4815
|
+
"objection": {
|
|
4816
|
+
"paired_with": "",
|
|
4817
|
+
"required": true,
|
|
4818
|
+
"shape": {
|
|
4819
|
+
"ref": "SheetObjection"
|
|
4820
|
+
}
|
|
4821
|
+
}
|
|
4822
|
+
},
|
|
4823
|
+
"payload": null,
|
|
4824
|
+
"unit": false
|
|
4825
|
+
},
|
|
4530
4826
|
"spool_refused": {
|
|
4531
4827
|
"fields": {
|
|
4532
4828
|
"cause": {
|
|
@@ -4619,6 +4915,184 @@ export const SHAPES = JSON.parse(`
|
|
|
4619
4915
|
"variants": {}
|
|
4620
4916
|
}
|
|
4621
4917
|
},
|
|
4918
|
+
"SheetId": {
|
|
4919
|
+
"alias": {
|
|
4920
|
+
"scalar": "string"
|
|
4921
|
+
}
|
|
4922
|
+
},
|
|
4923
|
+
"SheetObjection": {
|
|
4924
|
+
"union": {
|
|
4925
|
+
"tag_field": "cause",
|
|
4926
|
+
"variants": {
|
|
4927
|
+
"not_allowed": {
|
|
4928
|
+
"fields": {
|
|
4929
|
+
"allowed": {
|
|
4930
|
+
"paired_with": "",
|
|
4931
|
+
"required": true,
|
|
4932
|
+
"shape": {
|
|
4933
|
+
"list": {
|
|
4934
|
+
"ref": "SheetId"
|
|
4935
|
+
},
|
|
4936
|
+
"non_empty": false
|
|
4937
|
+
}
|
|
4938
|
+
},
|
|
4939
|
+
"material": {
|
|
4940
|
+
"paired_with": "",
|
|
4941
|
+
"required": true,
|
|
4942
|
+
"shape": {
|
|
4943
|
+
"ref": "MaterialName"
|
|
4944
|
+
}
|
|
4945
|
+
},
|
|
4946
|
+
"sheet": {
|
|
4947
|
+
"paired_with": "",
|
|
4948
|
+
"required": true,
|
|
4949
|
+
"shape": {
|
|
4950
|
+
"ref": "SheetId"
|
|
4951
|
+
}
|
|
4952
|
+
}
|
|
4953
|
+
},
|
|
4954
|
+
"payload": null,
|
|
4955
|
+
"unit": false
|
|
4956
|
+
},
|
|
4957
|
+
"unknown_sheet": {
|
|
4958
|
+
"fields": {
|
|
4959
|
+
"known": {
|
|
4960
|
+
"paired_with": "",
|
|
4961
|
+
"required": true,
|
|
4962
|
+
"shape": {
|
|
4963
|
+
"list": {
|
|
4964
|
+
"ref": "SheetId"
|
|
4965
|
+
},
|
|
4966
|
+
"non_empty": false
|
|
4967
|
+
}
|
|
4968
|
+
},
|
|
4969
|
+
"material": {
|
|
4970
|
+
"paired_with": "",
|
|
4971
|
+
"required": true,
|
|
4972
|
+
"shape": {
|
|
4973
|
+
"ref": "MaterialName"
|
|
4974
|
+
}
|
|
4975
|
+
},
|
|
4976
|
+
"sheet": {
|
|
4977
|
+
"paired_with": "",
|
|
4978
|
+
"required": true,
|
|
4979
|
+
"shape": {
|
|
4980
|
+
"ref": "SheetId"
|
|
4981
|
+
}
|
|
4982
|
+
}
|
|
4983
|
+
},
|
|
4984
|
+
"payload": null,
|
|
4985
|
+
"unit": false
|
|
4986
|
+
},
|
|
4987
|
+
"unlisted_material": {
|
|
4988
|
+
"fields": {
|
|
4989
|
+
"material": {
|
|
4990
|
+
"paired_with": "",
|
|
4991
|
+
"required": true,
|
|
4992
|
+
"shape": {
|
|
4993
|
+
"ref": "MaterialName"
|
|
4994
|
+
}
|
|
4995
|
+
},
|
|
4996
|
+
"sheet": {
|
|
4997
|
+
"paired_with": "",
|
|
4998
|
+
"required": true,
|
|
4999
|
+
"shape": {
|
|
5000
|
+
"ref": "SheetId"
|
|
5001
|
+
}
|
|
5002
|
+
}
|
|
5003
|
+
},
|
|
5004
|
+
"payload": null,
|
|
5005
|
+
"unit": false
|
|
5006
|
+
}
|
|
5007
|
+
}
|
|
5008
|
+
}
|
|
5009
|
+
},
|
|
5010
|
+
"SheetResult": {
|
|
5011
|
+
"union": {
|
|
5012
|
+
"tag_field": "verdict",
|
|
5013
|
+
"variants": {
|
|
5014
|
+
"overridden": {
|
|
5015
|
+
"fields": {
|
|
5016
|
+
"objection": {
|
|
5017
|
+
"paired_with": "",
|
|
5018
|
+
"required": true,
|
|
5019
|
+
"shape": {
|
|
5020
|
+
"ref": "SheetObjection"
|
|
5021
|
+
}
|
|
5022
|
+
}
|
|
5023
|
+
},
|
|
5024
|
+
"payload": null,
|
|
5025
|
+
"unit": false
|
|
5026
|
+
},
|
|
5027
|
+
"passed": {
|
|
5028
|
+
"fields": {
|
|
5029
|
+
"allowed": {
|
|
5030
|
+
"paired_with": "",
|
|
5031
|
+
"required": true,
|
|
5032
|
+
"shape": {
|
|
5033
|
+
"list": {
|
|
5034
|
+
"ref": "SheetId"
|
|
5035
|
+
},
|
|
5036
|
+
"non_empty": false
|
|
5037
|
+
}
|
|
5038
|
+
},
|
|
5039
|
+
"material": {
|
|
5040
|
+
"paired_with": "",
|
|
5041
|
+
"required": true,
|
|
5042
|
+
"shape": {
|
|
5043
|
+
"ref": "MaterialName"
|
|
5044
|
+
}
|
|
5045
|
+
},
|
|
5046
|
+
"sheet": {
|
|
5047
|
+
"paired_with": "",
|
|
5048
|
+
"required": true,
|
|
5049
|
+
"shape": {
|
|
5050
|
+
"ref": "SheetId"
|
|
5051
|
+
}
|
|
5052
|
+
}
|
|
5053
|
+
},
|
|
5054
|
+
"payload": null,
|
|
5055
|
+
"unit": false
|
|
5056
|
+
},
|
|
5057
|
+
"refused": {
|
|
5058
|
+
"fields": {
|
|
5059
|
+
"objection": {
|
|
5060
|
+
"paired_with": "",
|
|
5061
|
+
"required": true,
|
|
5062
|
+
"shape": {
|
|
5063
|
+
"ref": "SheetObjection"
|
|
5064
|
+
}
|
|
5065
|
+
}
|
|
5066
|
+
},
|
|
5067
|
+
"payload": null,
|
|
5068
|
+
"unit": false
|
|
5069
|
+
},
|
|
5070
|
+
"unchecked": {
|
|
5071
|
+
"fields": {},
|
|
5072
|
+
"payload": null,
|
|
5073
|
+
"unit": true
|
|
5074
|
+
},
|
|
5075
|
+
"undeclared": {
|
|
5076
|
+
"fields": {},
|
|
5077
|
+
"payload": null,
|
|
5078
|
+
"unit": true
|
|
5079
|
+
},
|
|
5080
|
+
"warned": {
|
|
5081
|
+
"fields": {
|
|
5082
|
+
"objection": {
|
|
5083
|
+
"paired_with": "",
|
|
5084
|
+
"required": true,
|
|
5085
|
+
"shape": {
|
|
5086
|
+
"ref": "SheetObjection"
|
|
5087
|
+
}
|
|
5088
|
+
}
|
|
5089
|
+
},
|
|
5090
|
+
"payload": null,
|
|
5091
|
+
"unit": false
|
|
5092
|
+
}
|
|
5093
|
+
}
|
|
5094
|
+
}
|
|
5095
|
+
},
|
|
4622
5096
|
"SignalPosition": {
|
|
4623
5097
|
"struct": {
|
|
4624
5098
|
"fields": {
|
|
@@ -6419,12 +6893,15 @@ export class GeneratedClient extends GeneratedSurface {
|
|
|
6419
6893
|
* the answer could not be read, and with `Refused` when the supervisor
|
|
6420
6894
|
* said no.
|
|
6421
6895
|
*/
|
|
6422
|
-
async preflight(fileName) {
|
|
6896
|
+
async preflight(fileName, sheet) {
|
|
6423
6897
|
const target = `/v1/preflight`;
|
|
6424
6898
|
const asked = [];
|
|
6425
6899
|
if (fileName !== undefined) {
|
|
6426
6900
|
asked.push(["file_name", String(fileName)]);
|
|
6427
6901
|
}
|
|
6902
|
+
if (sheet !== undefined) {
|
|
6903
|
+
asked.push(["sheet", String(sheet)]);
|
|
6904
|
+
}
|
|
6428
6905
|
const sending = undefined;
|
|
6429
6906
|
return await this.call("GET", target, asked, sending, "PreflightAnswer");
|
|
6430
6907
|
}
|
|
@@ -6491,7 +6968,7 @@ export class GeneratedClient extends GeneratedSurface {
|
|
|
6491
6968
|
* is made, and the policy's own refusal arrives as `Rejected`, carrying
|
|
6492
6969
|
* the reason, the value asked for and the range allowed.
|
|
6493
6970
|
*/
|
|
6494
|
-
async startPrint(printId, fileName, manifest, reason, overrideFilamentCheck) {
|
|
6971
|
+
async startPrint(printId, fileName, manifest, reason, overrideFilamentCheck, overrideMaterialCheck, overrideSheetCheck) {
|
|
6495
6972
|
reasonGiven(reason);
|
|
6496
6973
|
const target = `/v1/prints/${printId}/actions/start_print`;
|
|
6497
6974
|
const asked = [];
|
|
@@ -6502,6 +6979,12 @@ export class GeneratedClient extends GeneratedSurface {
|
|
|
6502
6979
|
if (overrideFilamentCheck !== undefined) {
|
|
6503
6980
|
sending.override_filament_check = overrideFilamentCheck;
|
|
6504
6981
|
}
|
|
6982
|
+
if (overrideMaterialCheck !== undefined) {
|
|
6983
|
+
sending.override_material_check = overrideMaterialCheck;
|
|
6984
|
+
}
|
|
6985
|
+
if (overrideSheetCheck !== undefined) {
|
|
6986
|
+
sending.override_sheet_check = overrideSheetCheck;
|
|
6987
|
+
}
|
|
6505
6988
|
sending.reason = reason;
|
|
6506
6989
|
return await this.call("POST", target, asked, sending, "ActionAnswer");
|
|
6507
6990
|
}
|
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.12.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.12.0"
|
|
23
23
|
}
|