@printhive/api 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,73 +1,3 @@
1
- type PrintHiveOptions = {
2
- apiKey: string;
3
- baseUrl?: string;
4
- fetch?: typeof globalThis.fetch;
5
- timeoutMs?: number;
6
- maxRetries?: number;
7
- };
8
- type Request<T> = {
9
- path: string;
10
- decode: (response: Response) => Promise<T>;
11
- query?: URLSearchParams;
12
- signal?: AbortSignal;
13
- } & ({
14
- method: "GET";
15
- } | {
16
- method: "POST";
17
- body: () => Promise<BodyInit>;
18
- size?: number;
19
- contentType?: string | null;
20
- idempotencyKey: string;
21
- replayable: boolean;
22
- });
23
- declare class Transport {
24
- private readonly options;
25
- constructor(options: PrintHiveOptions);
26
- request<T>(request: Request<T>): Promise<T>;
27
- }
28
-
29
- type CatalogFilamentInput = {
30
- externalId: string;
31
- brand: string;
32
- material: string;
33
- colorName: string;
34
- sku: string;
35
- replacementFilamentId?: string | null;
36
- } & ({
37
- colorHex: string;
38
- hex?: string;
39
- } | {
40
- hex: string;
41
- colorHex?: string;
42
- });
43
- type CatalogFilament = {
44
- id: string;
45
- sku: string;
46
- organization_id: string;
47
- material_type: string;
48
- color: string;
49
- metadata: {
50
- externalId: string;
51
- colorName: string;
52
- replacementFilamentId: string | null;
53
- };
54
- };
55
- declare class FilamentCatalog {
56
- private readonly transport;
57
- constructor(transport: Transport);
58
- upsert(input: CatalogFilamentInput): Promise<CatalogFilament>;
59
- list(input?: {
60
- externalId?: string;
61
- sku?: string;
62
- limit?: number;
63
- offset?: number;
64
- }): Promise<{
65
- materials: CatalogFilament[];
66
- total: number;
67
- }>;
68
- get(id: string): Promise<CatalogFilament>;
69
- }
70
-
71
1
  interface paths {
72
2
  "/v1/printers": {
73
3
  parameters: {
@@ -213,6 +143,120 @@ interface paths {
213
143
  patch?: never;
214
144
  trace?: never;
215
145
  };
146
+ "/v1/printers/search": {
147
+ parameters: {
148
+ query?: never;
149
+ header?: never;
150
+ path?: never;
151
+ cookie?: never;
152
+ };
153
+ /** Search organization printers with the web palette matcher */
154
+ get: {
155
+ parameters: {
156
+ query: {
157
+ q: string;
158
+ limit?: number;
159
+ offset?: number;
160
+ };
161
+ header?: never;
162
+ path?: never;
163
+ cookie?: never;
164
+ };
165
+ requestBody?: never;
166
+ responses: {
167
+ /** @description Default Response */
168
+ 200: {
169
+ headers: {
170
+ [name: string]: unknown;
171
+ };
172
+ content: {
173
+ "application/json": {
174
+ printers: {
175
+ id: string;
176
+ name: string;
177
+ model: string;
178
+ serial_number: string;
179
+ status: string;
180
+ location_text: string;
181
+ score: number;
182
+ /** @enum {string} */
183
+ match: "text" | "typo" | "server";
184
+ }[];
185
+ total: number;
186
+ query: string;
187
+ };
188
+ };
189
+ };
190
+ };
191
+ };
192
+ put?: never;
193
+ post?: never;
194
+ delete?: never;
195
+ options?: never;
196
+ head?: never;
197
+ patch?: never;
198
+ trace?: never;
199
+ };
200
+ "/v1/filaments/search": {
201
+ parameters: {
202
+ query?: never;
203
+ header?: never;
204
+ path?: never;
205
+ cookie?: never;
206
+ };
207
+ /** Search available catalog filaments with the web picker */
208
+ get: {
209
+ parameters: {
210
+ query: {
211
+ q: string;
212
+ limit?: number;
213
+ offset?: number;
214
+ };
215
+ header?: never;
216
+ path?: never;
217
+ cookie?: never;
218
+ };
219
+ requestBody?: never;
220
+ responses: {
221
+ /** @description Default Response */
222
+ 200: {
223
+ headers: {
224
+ [name: string]: unknown;
225
+ };
226
+ content: {
227
+ "application/json": {
228
+ filaments: {
229
+ id: string;
230
+ filamentId: string;
231
+ acceptedByCreate: boolean;
232
+ name: string;
233
+ brand: null | string;
234
+ material_type: string;
235
+ color: null | string;
236
+ diameter: null | number;
237
+ /** @enum {string} */
238
+ category: "filament";
239
+ sku?: null | string;
240
+ organization_id: null | string;
241
+ }[];
242
+ total: number;
243
+ hasMore: boolean;
244
+ /** @enum {string} */
245
+ matchMode: "strict" | "broadened";
246
+ originalQuery: null | string;
247
+ };
248
+ };
249
+ };
250
+ };
251
+ };
252
+ put?: never;
253
+ post?: never;
254
+ delete?: never;
255
+ options?: never;
256
+ head?: never;
257
+ patch?: never;
258
+ trace?: never;
259
+ };
216
260
  "/v1/partner-production/uploads": {
217
261
  parameters: {
218
262
  query?: never;
@@ -353,6 +397,16 @@ interface paths {
353
397
  status: "missing";
354
398
  };
355
399
  printerModel?: string;
400
+ machine?: {
401
+ sourceMachine: {
402
+ preset: string;
403
+ model: string;
404
+ nozzleDiameterMm: number;
405
+ };
406
+ compatibleMachines: string[];
407
+ materials: string[];
408
+ bed: string;
409
+ };
356
410
  };
357
411
  } | {
358
412
  /** Format: uuid */
@@ -434,6 +488,16 @@ interface paths {
434
488
  status: "missing";
435
489
  };
436
490
  printerModel?: string;
491
+ machine?: {
492
+ sourceMachine: {
493
+ preset: string;
494
+ model: string;
495
+ nozzleDiameterMm: number;
496
+ };
497
+ compatibleMachines: string[];
498
+ materials: string[];
499
+ bed: string;
500
+ };
437
501
  } | null;
438
502
  error: {
439
503
  /** @enum {string} */
@@ -561,6 +625,16 @@ interface paths {
561
625
  status: "missing";
562
626
  };
563
627
  printerModel?: string;
628
+ machine?: {
629
+ sourceMachine: {
630
+ preset: string;
631
+ model: string;
632
+ nozzleDiameterMm: number;
633
+ };
634
+ compatibleMachines: string[];
635
+ materials: string[];
636
+ bed: string;
637
+ };
564
638
  };
565
639
  } | {
566
640
  /** Format: uuid */
@@ -642,6 +716,16 @@ interface paths {
642
716
  status: "missing";
643
717
  };
644
718
  printerModel?: string;
719
+ machine?: {
720
+ sourceMachine: {
721
+ preset: string;
722
+ model: string;
723
+ nozzleDiameterMm: number;
724
+ };
725
+ compatibleMachines: string[];
726
+ materials: string[];
727
+ bed: string;
728
+ };
645
729
  } | null;
646
730
  error: {
647
731
  /** @enum {string} */
@@ -986,6 +1070,16 @@ interface paths {
986
1070
  status: "missing";
987
1071
  };
988
1072
  printerModel?: string;
1073
+ machine?: {
1074
+ sourceMachine: {
1075
+ preset: string;
1076
+ model: string;
1077
+ nozzleDiameterMm: number;
1078
+ };
1079
+ compatibleMachines: string[];
1080
+ materials: string[];
1081
+ bed: string;
1082
+ };
989
1083
  };
990
1084
  } | {
991
1085
  /** Format: uuid */
@@ -1067,6 +1161,16 @@ interface paths {
1067
1161
  status: "missing";
1068
1162
  };
1069
1163
  printerModel?: string;
1164
+ machine?: {
1165
+ sourceMachine: {
1166
+ preset: string;
1167
+ model: string;
1168
+ nozzleDiameterMm: number;
1169
+ };
1170
+ compatibleMachines: string[];
1171
+ materials: string[];
1172
+ bed: string;
1173
+ };
1070
1174
  } | null;
1071
1175
  error: {
1072
1176
  /** @enum {string} */
@@ -1289,6 +1393,16 @@ interface paths {
1289
1393
  status: "missing";
1290
1394
  };
1291
1395
  printerModel?: string;
1396
+ machine?: {
1397
+ sourceMachine: {
1398
+ preset: string;
1399
+ model: string;
1400
+ nozzleDiameterMm: number;
1401
+ };
1402
+ compatibleMachines: string[];
1403
+ materials: string[];
1404
+ bed: string;
1405
+ };
1292
1406
  };
1293
1407
  } | {
1294
1408
  /** Format: uuid */
@@ -1370,6 +1484,16 @@ interface paths {
1370
1484
  status: "missing";
1371
1485
  };
1372
1486
  printerModel?: string;
1487
+ machine?: {
1488
+ sourceMachine: {
1489
+ preset: string;
1490
+ model: string;
1491
+ nozzleDiameterMm: number;
1492
+ };
1493
+ compatibleMachines: string[];
1494
+ materials: string[];
1495
+ bed: string;
1496
+ };
1373
1497
  } | null;
1374
1498
  error: {
1375
1499
  /** @enum {string} */
@@ -1611,6 +1735,16 @@ interface paths {
1611
1735
  status: "missing";
1612
1736
  };
1613
1737
  printerModel?: string;
1738
+ machine?: {
1739
+ sourceMachine: {
1740
+ preset: string;
1741
+ model: string;
1742
+ nozzleDiameterMm: number;
1743
+ };
1744
+ compatibleMachines: string[];
1745
+ materials: string[];
1746
+ bed: string;
1747
+ };
1614
1748
  };
1615
1749
  } | {
1616
1750
  /** Format: uuid */
@@ -1692,6 +1826,16 @@ interface paths {
1692
1826
  status: "missing";
1693
1827
  };
1694
1828
  printerModel?: string;
1829
+ machine?: {
1830
+ sourceMachine: {
1831
+ preset: string;
1832
+ model: string;
1833
+ nozzleDiameterMm: number;
1834
+ };
1835
+ compatibleMachines: string[];
1836
+ materials: string[];
1837
+ bed: string;
1838
+ };
1695
1839
  } | null;
1696
1840
  error: {
1697
1841
  /** @enum {string} */
@@ -1823,6 +1967,8 @@ interface paths {
1823
1967
  "application/json": {
1824
1968
  name: string;
1825
1969
  externalId?: string;
1970
+ /** @default false */
1971
+ acceptEngineSettingUpdates?: boolean;
1826
1972
  model_file_id: string;
1827
1973
  organization_id?: string;
1828
1974
  /** @description Organization ID (optional, defaults to user's primary organization) */
@@ -1832,16 +1978,21 @@ interface paths {
1832
1978
  /** @description One-based plate number in the project archive */
1833
1979
  plate?: number;
1834
1980
  /** @description Complete filament requirements for the selected plate. Cannot be combined with raw AMS mappings. Matched using Smart Queue material and color proximity rules. */
1835
- filaments?: {
1981
+ filaments?: ({
1836
1982
  /** @description Zero-based project filament index */
1837
1983
  sourceSlot: number;
1838
- material: string;
1839
- color: string;
1984
+ /**
1985
+ * Format: uuid
1986
+ * @description Organization partner-catalog filament ID, or a global filament ID when materials.global_filaments_enabled is enabled (default true only when absent). Requires a material of at most 100 characters and one unambiguous color, normalized to #RRGGBB using shared material color rules. Named and 8-digit colors are supported; metadata.colors must agree with color. Merge tombstones are unavailable and include a merged_into replacement hint. Explicit material and color must agree.
1987
+ */
1988
+ filamentId?: string;
1989
+ material?: string;
1990
+ color?: string;
1840
1991
  targetSlot?: {
1841
1992
  ams_id: number;
1842
1993
  slot_id: number;
1843
1994
  };
1844
- }[];
1995
+ } | unknown | unknown)[];
1845
1996
  /**
1846
1997
  * @description Create assigned jobs waiting for filament, or reject mismatches with 422
1847
1998
  * @default wait
@@ -1871,16 +2022,21 @@ interface paths {
1871
2022
  /** @description One-based plate number in the project archive */
1872
2023
  plate: number;
1873
2024
  /** @description Complete filament requirements for the selected plate. Cannot be combined with raw AMS mappings. Matched using Smart Queue material and color proximity rules. */
1874
- filaments: {
2025
+ filaments: ({
1875
2026
  /** @description Zero-based project filament index */
1876
2027
  sourceSlot: number;
1877
- material: string;
1878
- color: string;
2028
+ /**
2029
+ * Format: uuid
2030
+ * @description Organization partner-catalog filament ID, or a global filament ID when materials.global_filaments_enabled is enabled (default true only when absent). Requires a material of at most 100 characters and one unambiguous color, normalized to #RRGGBB using shared material color rules. Named and 8-digit colors are supported; metadata.colors must agree with color. Merge tombstones are unavailable and include a merged_into replacement hint. Explicit material and color must agree.
2031
+ */
2032
+ filamentId?: string;
2033
+ material?: string;
2034
+ color?: string;
1879
2035
  targetSlot?: {
1880
2036
  ams_id: number;
1881
2037
  slot_id: number;
1882
2038
  };
1883
- }[];
2039
+ } | unknown | unknown)[];
1884
2040
  /** Format: uuid */
1885
2041
  printer_id?: string;
1886
2042
  /**
@@ -1890,6 +2046,8 @@ interface paths {
1890
2046
  */
1891
2047
  on_filament_mismatch?: "wait" | "reject";
1892
2048
  externalId?: string;
2049
+ /** @default false */
2050
+ acceptEngineSettingUpdates?: boolean;
1893
2051
  /**
1894
2052
  * @default automatic
1895
2053
  * @enum {string}
@@ -1925,6 +2083,12 @@ interface paths {
1925
2083
  code: "filament_not_loaded" | "material_route_changed";
1926
2084
  /** @enum {string} */
1927
2085
  cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
2086
+ /** Format: uuid */
2087
+ filamentId?: string;
2088
+ brand?: string | null;
2089
+ name?: string;
2090
+ colorName?: string | null;
2091
+ colorHex?: string;
1928
2092
  sourceSlot?: number;
1929
2093
  material?: string;
1930
2094
  color?: string;
@@ -1992,10 +2156,16 @@ interface paths {
1992
2156
  /** @enum {string} */
1993
2157
  filament_route_state?: "waiting" | "resolved";
1994
2158
  filament_waiting_reasons?: {
2159
+ /** Format: uuid */
2160
+ filamentId?: string;
2161
+ brand?: string | null;
2162
+ name?: string;
2163
+ colorName?: string | null;
2164
+ material?: string;
2165
+ colorHex?: string;
1995
2166
  /** @enum {string} */
1996
2167
  code: "filament_not_loaded" | "material_route_changed";
1997
2168
  sourceSlot?: number;
1998
- material?: string;
1999
2169
  color?: string;
2000
2170
  /** @enum {string} */
2001
2171
  cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
@@ -2010,9 +2180,69 @@ interface paths {
2010
2180
  } & {
2011
2181
  [key: string]: unknown;
2012
2182
  }) | null;
2013
- requiredActions: {
2183
+ requiredActions: (({
2184
+ item: number;
2185
+ plateNumber: number;
2186
+ hold: {
2187
+ /** @enum {string} */
2188
+ code: "material_change_requires_qualification";
2189
+ slots: number[];
2190
+ } | {
2191
+ /** @enum {string} */
2192
+ code: "inspection_review_required";
2193
+ reason: string;
2194
+ } | {
2195
+ /** @enum {string} */
2196
+ code: "unmapped_used_slot";
2197
+ slots: number[];
2198
+ } | {
2199
+ /** @enum {string} */
2200
+ code: "project_source_too_large";
2201
+ limit: {
2202
+ /** @enum {string} */
2203
+ name: "projectSourceBytes";
2204
+ max: number;
2205
+ observed: number;
2206
+ };
2207
+ } | {
2208
+ /** @enum {string} */
2209
+ code: "project_review_required";
2210
+ detail: string;
2211
+ changes?: {
2212
+ key: string;
2213
+ sourceValue: (string | null) | string[] | number | boolean;
2214
+ engineValue: (string | null) | string[] | number | boolean;
2215
+ slots: number[];
2216
+ }[];
2217
+ sourceRelease?: string | null;
2218
+ engineRelease?: string;
2219
+ } | {
2220
+ /** @enum {string} */
2221
+ code: "preview_mismatch_after_remap";
2222
+ detail: string;
2223
+ };
2224
+ } & {
2014
2225
  [key: string]: unknown;
2015
- }[];
2226
+ }) | ({
2227
+ code: string;
2228
+ } & {
2229
+ [key: string]: unknown;
2230
+ }))[];
2231
+ /** @default [] */
2232
+ warnings: ({
2233
+ /** @enum {string} */
2234
+ code: "custom_instructions_kept";
2235
+ keys: string[];
2236
+ } | {
2237
+ /** @enum {string} */
2238
+ code: "custom_instructions_replaced";
2239
+ keys: string[];
2240
+ } | {
2241
+ /** @enum {string} */
2242
+ code: "preview_stale_after_remap";
2243
+ slots: number[];
2244
+ bedChanged: boolean;
2245
+ })[];
2016
2246
  error: {
2017
2247
  [key: string]: unknown;
2018
2248
  } | null;
@@ -2055,12 +2285,17 @@ interface paths {
2055
2285
  content: {
2056
2286
  "application/json": {
2057
2287
  /** @enum {string} */
2058
- error?: "filament_requirements_unsatisfied" | "printer_model_incompatible" | "hardware:nozzle_diameter_mismatch" | "target_slot_unavailable" | "insufficient_filament_routes";
2288
+ error?: "filament_catalog_conflict" | "catalog_filament_not_found" | "invalid_catalog_filament" | "filament_requirements_unsatisfied" | "printer_model_incompatible" | "hardware:nozzle_diameter_mismatch" | "target_slot_unavailable" | "insufficient_filament_routes";
2059
2289
  message?: string;
2060
2290
  filaments?: {
2061
2291
  sourceSlot?: number;
2292
+ /**
2293
+ * Format: uuid
2294
+ * @description Replacement material ID when an accessible catalog filament was merged.
2295
+ */
2296
+ merged_into?: string;
2062
2297
  /** @enum {string} */
2063
- reason?: "missing_material" | "color_distance" | "slot_empty" | "slot_conflict";
2298
+ reason?: "filament_catalog_conflict" | "catalog_filament_not_found" | "invalid_catalog_filament" | "missing_material" | "color_distance" | "slot_empty" | "slot_conflict";
2064
2299
  }[];
2065
2300
  };
2066
2301
  };
@@ -2077,6 +2312,28 @@ interface paths {
2077
2312
  };
2078
2313
  };
2079
2314
  };
2315
+ /** @description Print creation is temporarily unavailable. catalog_store_failed indicates a failed organization-setting or catalog read and can include the affected source slot. */
2316
+ 503: {
2317
+ headers: {
2318
+ [name: string]: unknown;
2319
+ };
2320
+ content: {
2321
+ "application/json": {
2322
+ /** @description catalog_store_failed for catalog availability failures, or another existing print-creation availability error code. */
2323
+ error: string;
2324
+ message: string;
2325
+ filaments?: ({
2326
+ sourceSlot: number;
2327
+ /** @enum {string} */
2328
+ reason: "catalog_store_failed";
2329
+ } & {
2330
+ [key: string]: unknown;
2331
+ })[];
2332
+ } & {
2333
+ [key: string]: unknown;
2334
+ };
2335
+ };
2336
+ };
2080
2337
  };
2081
2338
  };
2082
2339
  delete?: never;
@@ -2152,6 +2409,12 @@ interface paths {
2152
2409
  code: "filament_not_loaded" | "material_route_changed";
2153
2410
  /** @enum {string} */
2154
2411
  cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
2412
+ /** Format: uuid */
2413
+ filamentId?: string;
2414
+ brand?: string | null;
2415
+ name?: string;
2416
+ colorName?: string | null;
2417
+ colorHex?: string;
2155
2418
  sourceSlot?: number;
2156
2419
  material?: string;
2157
2420
  color?: string;
@@ -2407,10 +2670,16 @@ interface paths {
2407
2670
  /** @enum {string} */
2408
2671
  filament_route_state?: "waiting" | "resolved";
2409
2672
  filament_waiting_reasons?: {
2673
+ /** Format: uuid */
2674
+ filamentId?: string;
2675
+ brand?: string | null;
2676
+ name?: string;
2677
+ colorName?: string | null;
2678
+ material?: string;
2679
+ colorHex?: string;
2410
2680
  /** @enum {string} */
2411
2681
  code: "filament_not_loaded" | "material_route_changed";
2412
2682
  sourceSlot?: number;
2413
- material?: string;
2414
2683
  color?: string;
2415
2684
  /** @enum {string} */
2416
2685
  cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
@@ -2425,9 +2694,69 @@ interface paths {
2425
2694
  } & {
2426
2695
  [key: string]: unknown;
2427
2696
  }) | null;
2428
- requiredActions: {
2429
- [key: string]: unknown;
2430
- }[];
2697
+ requiredActions: (({
2698
+ item: number;
2699
+ plateNumber: number;
2700
+ hold: {
2701
+ /** @enum {string} */
2702
+ code: "material_change_requires_qualification";
2703
+ slots: number[];
2704
+ } | {
2705
+ /** @enum {string} */
2706
+ code: "inspection_review_required";
2707
+ reason: string;
2708
+ } | {
2709
+ /** @enum {string} */
2710
+ code: "unmapped_used_slot";
2711
+ slots: number[];
2712
+ } | {
2713
+ /** @enum {string} */
2714
+ code: "project_source_too_large";
2715
+ limit: {
2716
+ /** @enum {string} */
2717
+ name: "projectSourceBytes";
2718
+ max: number;
2719
+ observed: number;
2720
+ };
2721
+ } | {
2722
+ /** @enum {string} */
2723
+ code: "project_review_required";
2724
+ detail: string;
2725
+ changes?: {
2726
+ key: string;
2727
+ sourceValue: (string | null) | string[] | number | boolean;
2728
+ engineValue: (string | null) | string[] | number | boolean;
2729
+ slots: number[];
2730
+ }[];
2731
+ sourceRelease?: string | null;
2732
+ engineRelease?: string;
2733
+ } | {
2734
+ /** @enum {string} */
2735
+ code: "preview_mismatch_after_remap";
2736
+ detail: string;
2737
+ };
2738
+ } & {
2739
+ [key: string]: unknown;
2740
+ }) | ({
2741
+ code: string;
2742
+ } & {
2743
+ [key: string]: unknown;
2744
+ }))[];
2745
+ /** @default [] */
2746
+ warnings: ({
2747
+ /** @enum {string} */
2748
+ code: "custom_instructions_kept";
2749
+ keys: string[];
2750
+ } | {
2751
+ /** @enum {string} */
2752
+ code: "custom_instructions_replaced";
2753
+ keys: string[];
2754
+ } | {
2755
+ /** @enum {string} */
2756
+ code: "preview_stale_after_remap";
2757
+ slots: number[];
2758
+ bedChanged: boolean;
2759
+ })[];
2431
2760
  error: {
2432
2761
  [key: string]: unknown;
2433
2762
  } | null;
@@ -2551,6 +2880,128 @@ interface paths {
2551
2880
  patch?: never;
2552
2881
  trace?: never;
2553
2882
  };
2883
+ "/v1/print-jobs/create-requests/{requestId}/approve-review": {
2884
+ parameters: {
2885
+ query?: never;
2886
+ header?: never;
2887
+ path?: never;
2888
+ cookie?: never;
2889
+ };
2890
+ get?: never;
2891
+ put?: never;
2892
+ /** Approve exactly the reported engine setting changes and re-slice */
2893
+ post: {
2894
+ parameters: {
2895
+ query?: never;
2896
+ header?: never;
2897
+ path: {
2898
+ requestId: string;
2899
+ };
2900
+ cookie?: never;
2901
+ };
2902
+ requestBody: {
2903
+ content: {
2904
+ "application/json": {
2905
+ changes: {
2906
+ key: string;
2907
+ sourceValue: (string | null) | string[] | number | boolean;
2908
+ engineValue: (string | null) | string[] | number | boolean;
2909
+ slots: number[];
2910
+ }[];
2911
+ sourceRelease: string | null;
2912
+ engineRelease: string;
2913
+ };
2914
+ };
2915
+ };
2916
+ responses: {
2917
+ /** @description Default Response */
2918
+ 202: {
2919
+ headers: {
2920
+ [name: string]: unknown;
2921
+ };
2922
+ content: {
2923
+ "application/json": {
2924
+ approved: boolean;
2925
+ };
2926
+ };
2927
+ };
2928
+ /** @description Default Response */
2929
+ 400: {
2930
+ headers: {
2931
+ [name: string]: unknown;
2932
+ };
2933
+ content: {
2934
+ "application/json": {
2935
+ error?: string;
2936
+ message?: string;
2937
+ requestId?: string;
2938
+ };
2939
+ };
2940
+ };
2941
+ /** @description Authentication required */
2942
+ 401: {
2943
+ headers: {
2944
+ [name: string]: unknown;
2945
+ };
2946
+ content: {
2947
+ "application/json": {
2948
+ error?: string;
2949
+ message?: string;
2950
+ requestId?: string;
2951
+ code?: string;
2952
+ statusCode?: number;
2953
+ };
2954
+ };
2955
+ };
2956
+ /** @description API key requires control scope */
2957
+ 403: {
2958
+ headers: {
2959
+ [name: string]: unknown;
2960
+ };
2961
+ content: {
2962
+ "application/json": {
2963
+ error?: string;
2964
+ message?: string;
2965
+ requestId?: string;
2966
+ code?: string;
2967
+ statusCode?: number;
2968
+ };
2969
+ };
2970
+ };
2971
+ /** @description Creation request not found */
2972
+ 404: {
2973
+ headers: {
2974
+ [name: string]: unknown;
2975
+ };
2976
+ content: {
2977
+ "application/json": {
2978
+ error?: string;
2979
+ message?: string;
2980
+ requestId?: string;
2981
+ };
2982
+ };
2983
+ };
2984
+ /** @description Creation request no longer supports this action */
2985
+ 409: {
2986
+ headers: {
2987
+ [name: string]: unknown;
2988
+ };
2989
+ content: {
2990
+ "application/json": {
2991
+ error?: string;
2992
+ message?: string;
2993
+ requestId?: string;
2994
+ };
2995
+ };
2996
+ };
2997
+ };
2998
+ };
2999
+ delete?: never;
3000
+ options?: never;
3001
+ head?: never;
3002
+ patch?: never;
3003
+ trace?: never;
3004
+ };
2554
3005
  "/v1/print-jobs/create-requests/{requestId}/cancel": {
2555
3006
  parameters: {
2556
3007
  query?: never;
@@ -2741,6 +3192,10 @@ interface paths {
2741
3192
  item: number;
2742
3193
  plateNumber: number;
2743
3194
  hold: {
3195
+ /** @enum {string} */
3196
+ code: "material_change_requires_qualification";
3197
+ slots: number[];
3198
+ } | {
2744
3199
  /** @enum {string} */
2745
3200
  code: "inspection_review_required";
2746
3201
  reason: string;
@@ -2761,6 +3216,14 @@ interface paths {
2761
3216
  /** @enum {string} */
2762
3217
  code: "project_review_required";
2763
3218
  detail: string;
3219
+ changes?: {
3220
+ key: string;
3221
+ sourceValue: (string | null) | string[] | number | boolean;
3222
+ engineValue: (string | null) | string[] | number | boolean;
3223
+ slots: number[];
3224
+ }[];
3225
+ sourceRelease?: string | null;
3226
+ engineRelease?: string;
2764
3227
  } | {
2765
3228
  /** @enum {string} */
2766
3229
  code: "preview_mismatch_after_remap";
@@ -2801,16 +3264,20 @@ interface paths {
2801
3264
  printerId: string;
2802
3265
  printerName: string;
2803
3266
  /** @enum {string} */
2804
- qualification: "bambu-p1s-0.4-standard-petg-v1";
3267
+ qualification?: "bambu-p1s-0.4-standard-petg-v1";
2805
3268
  /** @enum {string} */
2806
- printerModel: "P1S";
2807
- /** @enum {number} */
2808
- nozzleDiameterMm: 0.4;
3269
+ path?: "native" | "qualified";
3270
+ targetMachine?: {
3271
+ preset: string;
3272
+ model: string;
3273
+ nozzleDiameterMm: number;
3274
+ };
3275
+ printerModel: string;
3276
+ nozzleDiameterMm: number;
2809
3277
  /** @enum {string} */
2810
3278
  nozzleFlow: "standard";
2811
- /** @enum {string} */
2812
- buildSurface: "textured_pei";
2813
- profiles: {
3279
+ buildSurface: string;
3280
+ profiles?: {
2814
3281
  printer: {
2815
3282
  /** Format: uuid */
2816
3283
  catalogId: string;
@@ -2855,13 +3322,16 @@ interface paths {
2855
3322
  usedSlots: number[];
2856
3323
  materialMappings: {
2857
3324
  sourceSlot: number;
2858
- /** @enum {string} */
2859
- material: "PETG";
3325
+ material: string;
2860
3326
  color: string;
2861
3327
  /** @enum {string} */
2862
3328
  origin: "partner" | "inspection" | "placeholder";
2863
3329
  }[];
2864
3330
  holds: ({
3331
+ /** @enum {string} */
3332
+ code: "material_change_requires_qualification";
3333
+ slots: number[];
3334
+ } | {
2865
3335
  /** @enum {string} */
2866
3336
  code: "inspection_review_required";
2867
3337
  reason: string;
@@ -2882,6 +3352,14 @@ interface paths {
2882
3352
  /** @enum {string} */
2883
3353
  code: "project_review_required";
2884
3354
  detail: string;
3355
+ changes?: {
3356
+ key: string;
3357
+ sourceValue: (string | null) | string[] | number | boolean;
3358
+ engineValue: (string | null) | string[] | number | boolean;
3359
+ slots: number[];
3360
+ }[];
3361
+ sourceRelease?: string | null;
3362
+ engineRelease?: string;
2885
3363
  } | {
2886
3364
  /** @enum {string} */
2887
3365
  code: "preview_mismatch_after_remap";
@@ -2908,13 +3386,28 @@ interface paths {
2908
3386
  sourceSha256: string;
2909
3387
  plateNumber: number;
2910
3388
  /** @enum {string} */
2911
- qualification: "bambu-p1s-0.4-standard-petg-v1";
3389
+ qualification?: "bambu-p1s-0.4-standard-petg-v1";
2912
3390
  /** @enum {string} */
2913
- buildSurface: "textured_pei";
2914
- materialMappings: {
3391
+ path?: "native" | "qualified";
3392
+ sourceMachine?: {
3393
+ preset: string;
3394
+ model: string;
3395
+ nozzleDiameterMm: number;
3396
+ };
3397
+ materialQualifications?: {
2915
3398
  sourceSlot: number;
2916
3399
  /** @enum {string} */
2917
- material: "PETG";
3400
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
3401
+ }[];
3402
+ targetMachine?: {
3403
+ preset: string;
3404
+ model: string;
3405
+ nozzleDiameterMm: number;
3406
+ };
3407
+ buildSurface: string;
3408
+ materialMappings: {
3409
+ sourceSlot: number;
3410
+ material: string;
2918
3411
  color: string;
2919
3412
  }[];
2920
3413
  engineSha256: string;
@@ -2934,15 +3427,34 @@ interface paths {
2934
3427
  omit: string[];
2935
3428
  };
2936
3429
  ignoredSettings: string[];
2937
- warnings: {
3430
+ warnings: ({
2938
3431
  /** @enum {string} */
2939
- code: "custom_instructions_kept" | "custom_instructions_replaced";
3432
+ code: "custom_instructions_kept";
2940
3433
  keys: string[];
2941
- }[];
3434
+ } | {
3435
+ /** @enum {string} */
3436
+ code: "custom_instructions_replaced";
3437
+ keys: string[];
3438
+ } | {
3439
+ /** @enum {string} */
3440
+ code: "preview_stale_after_remap";
3441
+ slots: number[];
3442
+ bedChanged: boolean;
3443
+ })[];
2942
3444
  engineFallback: {
2943
3445
  authoringVersion: string | null;
2944
3446
  selectedVersion: string;
2945
3447
  } | null;
3448
+ acceptedEngineSettingChanges?: {
3449
+ changes: {
3450
+ key: string;
3451
+ sourceValue: (string | null) | string[] | number | boolean;
3452
+ engineValue: (string | null) | string[] | number | boolean;
3453
+ slots: number[];
3454
+ }[];
3455
+ sourceRelease: string | null;
3456
+ engineRelease: string;
3457
+ };
2946
3458
  /** @enum {string} */
2947
3459
  preview: "source" | "engine" | "none";
2948
3460
  previewFile: string | null;
@@ -2970,6 +3482,10 @@ interface paths {
2970
3482
  item: number;
2971
3483
  plateNumber: number;
2972
3484
  hold: {
3485
+ /** @enum {string} */
3486
+ code: "material_change_requires_qualification";
3487
+ slots: number[];
3488
+ } | {
2973
3489
  /** @enum {string} */
2974
3490
  code: "inspection_review_required";
2975
3491
  reason: string;
@@ -2990,6 +3506,14 @@ interface paths {
2990
3506
  /** @enum {string} */
2991
3507
  code: "project_review_required";
2992
3508
  detail: string;
3509
+ changes?: {
3510
+ key: string;
3511
+ sourceValue: (string | null) | string[] | number | boolean;
3512
+ engineValue: (string | null) | string[] | number | boolean;
3513
+ slots: number[];
3514
+ }[];
3515
+ sourceRelease?: string | null;
3516
+ engineRelease?: string;
2993
3517
  } | {
2994
3518
  /** @enum {string} */
2995
3519
  code: "preview_mismatch_after_remap";
@@ -3030,16 +3554,20 @@ interface paths {
3030
3554
  printerId: string;
3031
3555
  printerName: string;
3032
3556
  /** @enum {string} */
3033
- qualification: "bambu-p1s-0.4-standard-petg-v1";
3557
+ qualification?: "bambu-p1s-0.4-standard-petg-v1";
3034
3558
  /** @enum {string} */
3035
- printerModel: "P1S";
3036
- /** @enum {number} */
3037
- nozzleDiameterMm: 0.4;
3559
+ path?: "native" | "qualified";
3560
+ targetMachine?: {
3561
+ preset: string;
3562
+ model: string;
3563
+ nozzleDiameterMm: number;
3564
+ };
3565
+ printerModel: string;
3566
+ nozzleDiameterMm: number;
3038
3567
  /** @enum {string} */
3039
3568
  nozzleFlow: "standard";
3040
- /** @enum {string} */
3041
- buildSurface: "textured_pei";
3042
- profiles: {
3569
+ buildSurface: string;
3570
+ profiles?: {
3043
3571
  printer: {
3044
3572
  /** Format: uuid */
3045
3573
  catalogId: string;
@@ -3084,13 +3612,16 @@ interface paths {
3084
3612
  usedSlots: number[];
3085
3613
  materialMappings: {
3086
3614
  sourceSlot: number;
3087
- /** @enum {string} */
3088
- material: "PETG";
3615
+ material: string;
3089
3616
  color: string;
3090
3617
  /** @enum {string} */
3091
3618
  origin: "partner" | "inspection" | "placeholder";
3092
3619
  }[];
3093
3620
  holds: ({
3621
+ /** @enum {string} */
3622
+ code: "material_change_requires_qualification";
3623
+ slots: number[];
3624
+ } | {
3094
3625
  /** @enum {string} */
3095
3626
  code: "inspection_review_required";
3096
3627
  reason: string;
@@ -3111,6 +3642,14 @@ interface paths {
3111
3642
  /** @enum {string} */
3112
3643
  code: "project_review_required";
3113
3644
  detail: string;
3645
+ changes?: {
3646
+ key: string;
3647
+ sourceValue: (string | null) | string[] | number | boolean;
3648
+ engineValue: (string | null) | string[] | number | boolean;
3649
+ slots: number[];
3650
+ }[];
3651
+ sourceRelease?: string | null;
3652
+ engineRelease?: string;
3114
3653
  } | {
3115
3654
  /** @enum {string} */
3116
3655
  code: "preview_mismatch_after_remap";
@@ -3137,13 +3676,28 @@ interface paths {
3137
3676
  sourceSha256: string;
3138
3677
  plateNumber: number;
3139
3678
  /** @enum {string} */
3140
- qualification: "bambu-p1s-0.4-standard-petg-v1";
3679
+ qualification?: "bambu-p1s-0.4-standard-petg-v1";
3141
3680
  /** @enum {string} */
3142
- buildSurface: "textured_pei";
3143
- materialMappings: {
3681
+ path?: "native" | "qualified";
3682
+ sourceMachine?: {
3683
+ preset: string;
3684
+ model: string;
3685
+ nozzleDiameterMm: number;
3686
+ };
3687
+ materialQualifications?: {
3144
3688
  sourceSlot: number;
3145
3689
  /** @enum {string} */
3146
- material: "PETG";
3690
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
3691
+ }[];
3692
+ targetMachine?: {
3693
+ preset: string;
3694
+ model: string;
3695
+ nozzleDiameterMm: number;
3696
+ };
3697
+ buildSurface: string;
3698
+ materialMappings: {
3699
+ sourceSlot: number;
3700
+ material: string;
3147
3701
  color: string;
3148
3702
  }[];
3149
3703
  engineSha256: string;
@@ -3163,15 +3717,34 @@ interface paths {
3163
3717
  omit: string[];
3164
3718
  };
3165
3719
  ignoredSettings: string[];
3166
- warnings: {
3720
+ warnings: ({
3167
3721
  /** @enum {string} */
3168
- code: "custom_instructions_kept" | "custom_instructions_replaced";
3722
+ code: "custom_instructions_kept";
3169
3723
  keys: string[];
3170
- }[];
3724
+ } | {
3725
+ /** @enum {string} */
3726
+ code: "custom_instructions_replaced";
3727
+ keys: string[];
3728
+ } | {
3729
+ /** @enum {string} */
3730
+ code: "preview_stale_after_remap";
3731
+ slots: number[];
3732
+ bedChanged: boolean;
3733
+ })[];
3171
3734
  engineFallback: {
3172
3735
  authoringVersion: string | null;
3173
3736
  selectedVersion: string;
3174
3737
  } | null;
3738
+ acceptedEngineSettingChanges?: {
3739
+ changes: {
3740
+ key: string;
3741
+ sourceValue: (string | null) | string[] | number | boolean;
3742
+ engineValue: (string | null) | string[] | number | boolean;
3743
+ slots: number[];
3744
+ }[];
3745
+ sourceRelease: string | null;
3746
+ engineRelease: string;
3747
+ };
3175
3748
  /** @enum {string} */
3176
3749
  preview: "source" | "engine" | "none";
3177
3750
  previewFile: string | null;
@@ -3396,6 +3969,10 @@ interface paths {
3396
3969
  item: number;
3397
3970
  plateNumber: number;
3398
3971
  hold: {
3972
+ /** @enum {string} */
3973
+ code: "material_change_requires_qualification";
3974
+ slots: number[];
3975
+ } | {
3399
3976
  /** @enum {string} */
3400
3977
  code: "inspection_review_required";
3401
3978
  reason: string;
@@ -3416,6 +3993,14 @@ interface paths {
3416
3993
  /** @enum {string} */
3417
3994
  code: "project_review_required";
3418
3995
  detail: string;
3996
+ changes?: {
3997
+ key: string;
3998
+ sourceValue: (string | null) | string[] | number | boolean;
3999
+ engineValue: (string | null) | string[] | number | boolean;
4000
+ slots: number[];
4001
+ }[];
4002
+ sourceRelease?: string | null;
4003
+ engineRelease?: string;
3419
4004
  } | {
3420
4005
  /** @enum {string} */
3421
4006
  code: "preview_mismatch_after_remap";
@@ -3456,16 +4041,20 @@ interface paths {
3456
4041
  printerId: string;
3457
4042
  printerName: string;
3458
4043
  /** @enum {string} */
3459
- qualification: "bambu-p1s-0.4-standard-petg-v1";
4044
+ qualification?: "bambu-p1s-0.4-standard-petg-v1";
3460
4045
  /** @enum {string} */
3461
- printerModel: "P1S";
3462
- /** @enum {number} */
3463
- nozzleDiameterMm: 0.4;
4046
+ path?: "native" | "qualified";
4047
+ targetMachine?: {
4048
+ preset: string;
4049
+ model: string;
4050
+ nozzleDiameterMm: number;
4051
+ };
4052
+ printerModel: string;
4053
+ nozzleDiameterMm: number;
3464
4054
  /** @enum {string} */
3465
4055
  nozzleFlow: "standard";
3466
- /** @enum {string} */
3467
- buildSurface: "textured_pei";
3468
- profiles: {
4056
+ buildSurface: string;
4057
+ profiles?: {
3469
4058
  printer: {
3470
4059
  /** Format: uuid */
3471
4060
  catalogId: string;
@@ -3510,13 +4099,16 @@ interface paths {
3510
4099
  usedSlots: number[];
3511
4100
  materialMappings: {
3512
4101
  sourceSlot: number;
3513
- /** @enum {string} */
3514
- material: "PETG";
4102
+ material: string;
3515
4103
  color: string;
3516
4104
  /** @enum {string} */
3517
4105
  origin: "partner" | "inspection" | "placeholder";
3518
4106
  }[];
3519
4107
  holds: ({
4108
+ /** @enum {string} */
4109
+ code: "material_change_requires_qualification";
4110
+ slots: number[];
4111
+ } | {
3520
4112
  /** @enum {string} */
3521
4113
  code: "inspection_review_required";
3522
4114
  reason: string;
@@ -3537,6 +4129,14 @@ interface paths {
3537
4129
  /** @enum {string} */
3538
4130
  code: "project_review_required";
3539
4131
  detail: string;
4132
+ changes?: {
4133
+ key: string;
4134
+ sourceValue: (string | null) | string[] | number | boolean;
4135
+ engineValue: (string | null) | string[] | number | boolean;
4136
+ slots: number[];
4137
+ }[];
4138
+ sourceRelease?: string | null;
4139
+ engineRelease?: string;
3540
4140
  } | {
3541
4141
  /** @enum {string} */
3542
4142
  code: "preview_mismatch_after_remap";
@@ -3563,13 +4163,28 @@ interface paths {
3563
4163
  sourceSha256: string;
3564
4164
  plateNumber: number;
3565
4165
  /** @enum {string} */
3566
- qualification: "bambu-p1s-0.4-standard-petg-v1";
4166
+ qualification?: "bambu-p1s-0.4-standard-petg-v1";
3567
4167
  /** @enum {string} */
3568
- buildSurface: "textured_pei";
3569
- materialMappings: {
4168
+ path?: "native" | "qualified";
4169
+ sourceMachine?: {
4170
+ preset: string;
4171
+ model: string;
4172
+ nozzleDiameterMm: number;
4173
+ };
4174
+ materialQualifications?: {
3570
4175
  sourceSlot: number;
3571
4176
  /** @enum {string} */
3572
- material: "PETG";
4177
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
4178
+ }[];
4179
+ targetMachine?: {
4180
+ preset: string;
4181
+ model: string;
4182
+ nozzleDiameterMm: number;
4183
+ };
4184
+ buildSurface: string;
4185
+ materialMappings: {
4186
+ sourceSlot: number;
4187
+ material: string;
3573
4188
  color: string;
3574
4189
  }[];
3575
4190
  engineSha256: string;
@@ -3589,15 +4204,34 @@ interface paths {
3589
4204
  omit: string[];
3590
4205
  };
3591
4206
  ignoredSettings: string[];
3592
- warnings: {
4207
+ warnings: ({
3593
4208
  /** @enum {string} */
3594
- code: "custom_instructions_kept" | "custom_instructions_replaced";
4209
+ code: "custom_instructions_kept";
3595
4210
  keys: string[];
3596
- }[];
4211
+ } | {
4212
+ /** @enum {string} */
4213
+ code: "custom_instructions_replaced";
4214
+ keys: string[];
4215
+ } | {
4216
+ /** @enum {string} */
4217
+ code: "preview_stale_after_remap";
4218
+ slots: number[];
4219
+ bedChanged: boolean;
4220
+ })[];
3597
4221
  engineFallback: {
3598
4222
  authoringVersion: string | null;
3599
4223
  selectedVersion: string;
3600
4224
  } | null;
4225
+ acceptedEngineSettingChanges?: {
4226
+ changes: {
4227
+ key: string;
4228
+ sourceValue: (string | null) | string[] | number | boolean;
4229
+ engineValue: (string | null) | string[] | number | boolean;
4230
+ slots: number[];
4231
+ }[];
4232
+ sourceRelease: string | null;
4233
+ engineRelease: string;
4234
+ };
3601
4235
  /** @enum {string} */
3602
4236
  preview: "source" | "engine" | "none";
3603
4237
  previewFile: string | null;
@@ -3933,6 +4567,195 @@ interface paths {
3933
4567
  patch?: never;
3934
4568
  trace?: never;
3935
4569
  };
4570
+ "/v1/filament-catalog": {
4571
+ parameters: {
4572
+ query?: never;
4573
+ header?: never;
4574
+ path?: never;
4575
+ cookie?: never;
4576
+ };
4577
+ /** List organization catalog filaments */
4578
+ get: {
4579
+ parameters: {
4580
+ query?: {
4581
+ externalId?: string;
4582
+ sku?: string;
4583
+ limit?: number;
4584
+ offset?: number;
4585
+ };
4586
+ header?: never;
4587
+ path?: never;
4588
+ cookie?: never;
4589
+ };
4590
+ requestBody?: never;
4591
+ responses: {
4592
+ /** @description Default Response */
4593
+ 200: {
4594
+ headers: {
4595
+ [name: string]: unknown;
4596
+ };
4597
+ content?: never;
4598
+ };
4599
+ };
4600
+ };
4601
+ put?: never;
4602
+ /** Upsert an organization catalog filament by partner external id */
4603
+ post: {
4604
+ parameters: {
4605
+ query?: never;
4606
+ header?: never;
4607
+ path?: never;
4608
+ cookie?: never;
4609
+ };
4610
+ requestBody: {
4611
+ content: {
4612
+ "application/json": {
4613
+ externalId: string;
4614
+ brand: string;
4615
+ material: string;
4616
+ colorName: string;
4617
+ colorHex?: string;
4618
+ hex?: string;
4619
+ sku: string;
4620
+ replacementFilamentId?: string | null;
4621
+ };
4622
+ };
4623
+ };
4624
+ responses: {
4625
+ /** @description Default Response */
4626
+ 200: {
4627
+ headers: {
4628
+ [name: string]: unknown;
4629
+ };
4630
+ content?: never;
4631
+ };
4632
+ };
4633
+ };
4634
+ delete?: never;
4635
+ options?: never;
4636
+ head?: never;
4637
+ patch?: never;
4638
+ trace?: never;
4639
+ };
4640
+ "/v1/filament-catalog/{id}": {
4641
+ parameters: {
4642
+ query?: never;
4643
+ header?: never;
4644
+ path?: never;
4645
+ cookie?: never;
4646
+ };
4647
+ /** Read an organization catalog filament */
4648
+ get: {
4649
+ parameters: {
4650
+ query?: never;
4651
+ header?: never;
4652
+ path: {
4653
+ id: string;
4654
+ };
4655
+ cookie?: never;
4656
+ };
4657
+ requestBody?: never;
4658
+ responses: {
4659
+ /** @description Default Response */
4660
+ 200: {
4661
+ headers: {
4662
+ [name: string]: unknown;
4663
+ };
4664
+ content?: never;
4665
+ };
4666
+ };
4667
+ };
4668
+ put?: never;
4669
+ post?: never;
4670
+ delete?: never;
4671
+ options?: never;
4672
+ head?: never;
4673
+ patch?: never;
4674
+ trace?: never;
4675
+ };
4676
+ }
4677
+
4678
+ type PrintHiveOptions = {
4679
+ apiKey: string;
4680
+ baseUrl?: string;
4681
+ fetch?: typeof globalThis.fetch;
4682
+ timeoutMs?: number;
4683
+ maxRetries?: number;
4684
+ };
4685
+ type Request<T> = {
4686
+ path: string;
4687
+ decode: (response: Response) => Promise<T>;
4688
+ query?: URLSearchParams;
4689
+ signal?: AbortSignal;
4690
+ } & ({
4691
+ method: "GET";
4692
+ } | {
4693
+ method: "POST";
4694
+ body: () => Promise<BodyInit>;
4695
+ size?: number;
4696
+ contentType?: string | null;
4697
+ idempotencyKey: string;
4698
+ replayable: boolean;
4699
+ });
4700
+ declare class Transport {
4701
+ private readonly options;
4702
+ constructor(options: PrintHiveOptions);
4703
+ request<T>(request: Request<T>): Promise<T>;
4704
+ }
4705
+
4706
+ type PrinterSearchResponse = paths["/v1/printers/search"]["get"]["responses"][200]["content"]["application/json"];
4707
+ type FilamentSearchResponse = paths["/v1/filaments/search"]["get"]["responses"][200]["content"]["application/json"];
4708
+ type PrinterSearchPage = PrinterSearchResponse;
4709
+ type PrinterSearchResult = PrinterSearchPage["printers"][number];
4710
+ type FilamentSearchPage = FilamentSearchResponse;
4711
+ type FilamentSearchResult = FilamentSearchPage["filaments"][number];
4712
+ type SearchOptions = {
4713
+ query: string;
4714
+ limit?: number;
4715
+ offset?: number;
4716
+ signal?: AbortSignal;
4717
+ };
4718
+
4719
+ type CatalogFilamentInput = {
4720
+ externalId: string;
4721
+ brand: string;
4722
+ material: string;
4723
+ colorName: string;
4724
+ sku: string;
4725
+ replacementFilamentId?: string | null;
4726
+ } & ({
4727
+ colorHex: string;
4728
+ hex?: string;
4729
+ } | {
4730
+ hex: string;
4731
+ colorHex?: string;
4732
+ });
4733
+ type CatalogFilament = {
4734
+ id: string;
4735
+ sku: string;
4736
+ organization_id: string;
4737
+ material_type: string;
4738
+ color: string;
4739
+ metadata: {
4740
+ externalId: string;
4741
+ colorName: string;
4742
+ replacementFilamentId: string | null;
4743
+ };
4744
+ };
4745
+ declare class FilamentCatalog {
4746
+ private readonly transport;
4747
+ constructor(transport: Transport);
4748
+ upsert(input: CatalogFilamentInput): Promise<CatalogFilament>;
4749
+ list(input?: {
4750
+ externalId?: string;
4751
+ sku?: string;
4752
+ limit?: number;
4753
+ offset?: number;
4754
+ }): Promise<{
4755
+ materials: CatalogFilament[];
4756
+ total: number;
4757
+ }>;
4758
+ get(id: string): Promise<CatalogFilament>;
3936
4759
  }
3937
4760
 
3938
4761
  type CreateOperation = paths["/v1/print-jobs/create"]["post"];
@@ -3942,6 +4765,7 @@ type JobReadResponse = paths["/v1/print-jobs/{id}"]["get"]["responses"][200]["co
3942
4765
  type JobFields = NonNullable<JobReadResponse["job"]>;
3943
4766
  type PrintJob = JobFields & Required<Pick<JobFields, "id" | "status">>;
3944
4767
  type PrintJobCreateRequest = paths["/v1/print-jobs/create-requests/{requestId}"]["get"]["responses"][200]["content"]["application/json"];
4768
+ type EngineSettingReviewApproval = paths["/v1/print-jobs/create-requests/{requestId}/approve-review"]["post"]["requestBody"]["content"]["application/json"];
3945
4769
  type JsonPrintJobInput = CreateOperation["requestBody"]["content"]["application/json"] & {
3946
4770
  idempotencyKey?: string;
3947
4771
  };
@@ -3965,6 +4789,9 @@ declare class PrintJobs {
3965
4789
  idempotencyKey: string;
3966
4790
  }>;
3967
4791
  getCreateRequest(requestId: string, signal?: AbortSignal): Promise<PrintJobCreateRequest>;
4792
+ approveReview(requestId: string, review: EngineSettingReviewApproval, signal?: AbortSignal): Promise<{
4793
+ approved: boolean;
4794
+ }>;
3968
4795
  waitUntilCreated(requestId: string, options?: WaitOptions): Promise<{
3969
4796
  requestId: string;
3970
4797
  status: "preparing" | "held" | "created" | "failed" | "cancelled";
@@ -3978,9 +4805,14 @@ declare class PrintJobs {
3978
4805
  print_options: ({
3979
4806
  filament_route_state?: "waiting" | "resolved";
3980
4807
  filament_waiting_reasons?: {
4808
+ filamentId?: string;
4809
+ brand?: string | null;
4810
+ name?: string;
4811
+ colorName?: string | null;
4812
+ material?: string;
4813
+ colorHex?: string;
3981
4814
  code: "filament_not_loaded" | "material_route_changed";
3982
4815
  sourceSlot?: number;
3983
- material?: string;
3984
4816
  color?: string;
3985
4817
  cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
3986
4818
  suggestedTargetSlot?: {
@@ -3994,9 +4826,58 @@ declare class PrintJobs {
3994
4826
  } & {
3995
4827
  [key: string]: unknown;
3996
4828
  }) | null;
3997
- requiredActions: {
4829
+ requiredActions: (({
4830
+ item: number;
4831
+ plateNumber: number;
4832
+ hold: {
4833
+ code: "material_change_requires_qualification";
4834
+ slots: number[];
4835
+ } | {
4836
+ code: "inspection_review_required";
4837
+ reason: string;
4838
+ } | {
4839
+ code: "unmapped_used_slot";
4840
+ slots: number[];
4841
+ } | {
4842
+ code: "project_source_too_large";
4843
+ limit: {
4844
+ name: "projectSourceBytes";
4845
+ max: number;
4846
+ observed: number;
4847
+ };
4848
+ } | {
4849
+ code: "project_review_required";
4850
+ detail: string;
4851
+ changes?: {
4852
+ key: string;
4853
+ sourceValue: (string | null) | string[] | number | boolean;
4854
+ engineValue: (string | null) | string[] | number | boolean;
4855
+ slots: number[];
4856
+ }[];
4857
+ sourceRelease?: string | null;
4858
+ engineRelease?: string;
4859
+ } | {
4860
+ code: "preview_mismatch_after_remap";
4861
+ detail: string;
4862
+ };
4863
+ } & {
4864
+ [key: string]: unknown;
4865
+ }) | ({
4866
+ code: string;
4867
+ } & {
3998
4868
  [key: string]: unknown;
3999
- }[];
4869
+ }))[];
4870
+ warnings: ({
4871
+ code: "custom_instructions_kept";
4872
+ keys: string[];
4873
+ } | {
4874
+ code: "custom_instructions_replaced";
4875
+ keys: string[];
4876
+ } | {
4877
+ code: "preview_stale_after_remap";
4878
+ slots: number[];
4879
+ bedChanged: boolean;
4880
+ })[];
4000
4881
  error: {
4001
4882
  [key: string]: unknown;
4002
4883
  } | null;
@@ -4153,6 +5034,16 @@ declare class PrintHive {
4153
5034
  status: "missing";
4154
5035
  };
4155
5036
  printerModel?: string;
5037
+ machine?: {
5038
+ sourceMachine: {
5039
+ preset: string;
5040
+ model: string;
5041
+ nozzleDiameterMm: number;
5042
+ };
5043
+ compatibleMachines: string[];
5044
+ materials: string[];
5045
+ bed: string;
5046
+ };
4156
5047
  };
4157
5048
  } | {
4158
5049
  sourceVersionId: string;
@@ -4219,6 +5110,16 @@ declare class PrintHive {
4219
5110
  status: "missing";
4220
5111
  };
4221
5112
  printerModel?: string;
5113
+ machine?: {
5114
+ sourceMachine: {
5115
+ preset: string;
5116
+ model: string;
5117
+ nozzleDiameterMm: number;
5118
+ };
5119
+ compatibleMachines: string[];
5120
+ materials: string[];
5121
+ bed: string;
5122
+ };
4222
5123
  } | null;
4223
5124
  error: {
4224
5125
  code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
@@ -4324,6 +5225,16 @@ declare class PrintHive {
4324
5225
  status: "missing";
4325
5226
  };
4326
5227
  printerModel?: string;
5228
+ machine?: {
5229
+ sourceMachine: {
5230
+ preset: string;
5231
+ model: string;
5232
+ nozzleDiameterMm: number;
5233
+ };
5234
+ compatibleMachines: string[];
5235
+ materials: string[];
5236
+ bed: string;
5237
+ };
4327
5238
  };
4328
5239
  } | {
4329
5240
  sourceVersionId: string;
@@ -4390,6 +5301,16 @@ declare class PrintHive {
4390
5301
  status: "missing";
4391
5302
  };
4392
5303
  printerModel?: string;
5304
+ machine?: {
5305
+ sourceMachine: {
5306
+ preset: string;
5307
+ model: string;
5308
+ nozzleDiameterMm: number;
5309
+ };
5310
+ compatibleMachines: string[];
5311
+ materials: string[];
5312
+ bed: string;
5313
+ };
4393
5314
  } | null;
4394
5315
  error: {
4395
5316
  code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
@@ -4405,6 +5326,20 @@ declare class PrintHive {
4405
5326
  listSourceFiles(modelId: string): AsyncGenerator<PartnerSource>;
4406
5327
  };
4407
5328
  readonly printers: {
5329
+ search: (input: SearchOptions) => Promise<{
5330
+ printers: {
5331
+ id: string;
5332
+ name: string;
5333
+ model: string;
5334
+ serial_number: string;
5335
+ status: string;
5336
+ location_text: string;
5337
+ score: number;
5338
+ match: "text" | "typo" | "server";
5339
+ }[];
5340
+ total: number;
5341
+ query: string;
5342
+ }>;
4408
5343
  list: (input?: {
4409
5344
  limit?: number;
4410
5345
  cursor?: string;
@@ -4413,6 +5348,27 @@ declare class PrintHive {
4413
5348
  };
4414
5349
  readonly printJobs: PrintJobs;
4415
5350
  readonly filamentCatalog: FilamentCatalog;
5351
+ readonly filaments: {
5352
+ search: (input: SearchOptions) => Promise<{
5353
+ filaments: {
5354
+ id: string;
5355
+ filamentId: string;
5356
+ acceptedByCreate: boolean;
5357
+ name: string;
5358
+ brand: null | string;
5359
+ material_type: string;
5360
+ color: null | string;
5361
+ diameter: null | number;
5362
+ category: "filament";
5363
+ sku?: null | string;
5364
+ organization_id: null | string;
5365
+ }[];
5366
+ total: number;
5367
+ hasMore: boolean;
5368
+ matchMode: "strict" | "broadened";
5369
+ originalQuery: null | string;
5370
+ }>;
5371
+ };
4416
5372
  readonly preparations: {
4417
5373
  get: (id: string, signal?: AbortSignal) => Promise<{
4418
5374
  preparationId: string;
@@ -4422,6 +5378,9 @@ declare class PrintHive {
4422
5378
  item: number;
4423
5379
  plateNumber: number;
4424
5380
  hold: {
5381
+ code: "material_change_requires_qualification";
5382
+ slots: number[];
5383
+ } | {
4425
5384
  code: "inspection_review_required";
4426
5385
  reason: string;
4427
5386
  } | {
@@ -4437,6 +5396,14 @@ declare class PrintHive {
4437
5396
  } | {
4438
5397
  code: "project_review_required";
4439
5398
  detail: string;
5399
+ changes?: {
5400
+ key: string;
5401
+ sourceValue: (string | null) | string[] | number | boolean;
5402
+ engineValue: (string | null) | string[] | number | boolean;
5403
+ slots: number[];
5404
+ }[];
5405
+ sourceRelease?: string | null;
5406
+ engineRelease?: string;
4440
5407
  } | {
4441
5408
  code: "preview_mismatch_after_remap";
4442
5409
  detail: string;
@@ -4471,12 +5438,18 @@ declare class PrintHive {
4471
5438
  target: {
4472
5439
  printerId: string;
4473
5440
  printerName: string;
4474
- qualification: "bambu-p1s-0.4-standard-petg-v1";
4475
- printerModel: "P1S";
4476
- nozzleDiameterMm: 0.4;
5441
+ qualification?: "bambu-p1s-0.4-standard-petg-v1";
5442
+ path?: "native" | "qualified";
5443
+ targetMachine?: {
5444
+ preset: string;
5445
+ model: string;
5446
+ nozzleDiameterMm: number;
5447
+ };
5448
+ printerModel: string;
5449
+ nozzleDiameterMm: number;
4477
5450
  nozzleFlow: "standard";
4478
- buildSurface: "textured_pei";
4479
- profiles: {
5451
+ buildSurface: string;
5452
+ profiles?: {
4480
5453
  printer: {
4481
5454
  catalogId: string;
4482
5455
  name: string;
@@ -4513,11 +5486,14 @@ declare class PrintHive {
4513
5486
  usedSlots: number[];
4514
5487
  materialMappings: {
4515
5488
  sourceSlot: number;
4516
- material: "PETG";
5489
+ material: string;
4517
5490
  color: string;
4518
5491
  origin: "partner" | "inspection" | "placeholder";
4519
5492
  }[];
4520
5493
  holds: ({
5494
+ code: "material_change_requires_qualification";
5495
+ slots: number[];
5496
+ } | {
4521
5497
  code: "inspection_review_required";
4522
5498
  reason: string;
4523
5499
  } | {
@@ -4533,6 +5509,14 @@ declare class PrintHive {
4533
5509
  } | {
4534
5510
  code: "project_review_required";
4535
5511
  detail: string;
5512
+ changes?: {
5513
+ key: string;
5514
+ sourceValue: (string | null) | string[] | number | boolean;
5515
+ engineValue: (string | null) | string[] | number | boolean;
5516
+ slots: number[];
5517
+ }[];
5518
+ sourceRelease?: string | null;
5519
+ engineRelease?: string;
4536
5520
  } | {
4537
5521
  code: "preview_mismatch_after_remap";
4538
5522
  detail: string;
@@ -4554,11 +5538,26 @@ declare class PrintHive {
4554
5538
  sourceVersionId: string;
4555
5539
  sourceSha256: string;
4556
5540
  plateNumber: number;
4557
- qualification: "bambu-p1s-0.4-standard-petg-v1";
4558
- buildSurface: "textured_pei";
5541
+ qualification?: "bambu-p1s-0.4-standard-petg-v1";
5542
+ path?: "native" | "qualified";
5543
+ sourceMachine?: {
5544
+ preset: string;
5545
+ model: string;
5546
+ nozzleDiameterMm: number;
5547
+ };
5548
+ materialQualifications?: {
5549
+ sourceSlot: number;
5550
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
5551
+ }[];
5552
+ targetMachine?: {
5553
+ preset: string;
5554
+ model: string;
5555
+ nozzleDiameterMm: number;
5556
+ };
5557
+ buildSurface: string;
4559
5558
  materialMappings: {
4560
5559
  sourceSlot: number;
4561
- material: "PETG";
5560
+ material: string;
4562
5561
  color: string;
4563
5562
  }[];
4564
5563
  engineSha256: string;
@@ -4578,14 +5577,31 @@ declare class PrintHive {
4578
5577
  omit: string[];
4579
5578
  };
4580
5579
  ignoredSettings: string[];
4581
- warnings: {
4582
- code: "custom_instructions_kept" | "custom_instructions_replaced";
5580
+ warnings: ({
5581
+ code: "custom_instructions_kept";
4583
5582
  keys: string[];
4584
- }[];
5583
+ } | {
5584
+ code: "custom_instructions_replaced";
5585
+ keys: string[];
5586
+ } | {
5587
+ code: "preview_stale_after_remap";
5588
+ slots: number[];
5589
+ bedChanged: boolean;
5590
+ })[];
4585
5591
  engineFallback: {
4586
5592
  authoringVersion: string | null;
4587
5593
  selectedVersion: string;
4588
5594
  } | null;
5595
+ acceptedEngineSettingChanges?: {
5596
+ changes: {
5597
+ key: string;
5598
+ sourceValue: (string | null) | string[] | number | boolean;
5599
+ engineValue: (string | null) | string[] | number | boolean;
5600
+ slots: number[];
5601
+ }[];
5602
+ sourceRelease: string | null;
5603
+ engineRelease: string;
5604
+ };
4589
5605
  preview: "source" | "engine" | "none";
4590
5606
  previewFile: string | null;
4591
5607
  finalArtifactSha256: string;
@@ -4608,4 +5624,4 @@ declare class PrintHive {
4608
5624
  constructor(options: PrintHiveOptions);
4609
5625
  }
4610
5626
 
4611
- export { type ApiErrorBody, type ApiLimit, type CatalogFilament, type CatalogFilamentInput, type CreatedPrintJob, type FilamentWaitingReason, type JsonPrintJobInput, type PartnerMaterialMapping, type PartnerModel, type PartnerPreparation, type PartnerPreparationCreateBody, type PartnerPreparationDownload, type PartnerPreparationErrorBody, type PartnerPreparationItemInput, type PartnerPreparationTargetReason, type PartnerPreparedPlate, type PartnerSource, type PreparationCreateOptions, PrintHive, PrintHiveApiError, PrintHiveNetworkError, type PrintHiveOptions, type PrintJob, type PrintJobCreateRequest, PrintJobCreateStoppedError, type SettledPreparation, type UploadOptions, type UploadedPrintJobInput, type WaitOptions, type paths };
5627
+ export { type ApiErrorBody, type ApiLimit, type CatalogFilament, type CatalogFilamentInput, type CreatedPrintJob, type EngineSettingReviewApproval, type FilamentSearchPage, type FilamentSearchResult, type FilamentWaitingReason, type JsonPrintJobInput, type PartnerMaterialMapping, type PartnerModel, type PartnerPreparation, type PartnerPreparationCreateBody, type PartnerPreparationDownload, type PartnerPreparationErrorBody, type PartnerPreparationItemInput, type PartnerPreparationTargetReason, type PartnerPreparedPlate, type PartnerSource, type PreparationCreateOptions, PrintHive, PrintHiveApiError, PrintHiveNetworkError, type PrintHiveOptions, type PrintJob, type PrintJobCreateRequest, PrintJobCreateStoppedError, type PrinterSearchPage, type PrinterSearchResult, type SearchOptions, type SettledPreparation, type UploadOptions, type UploadedPrintJobInput, type WaitOptions, type paths };