@printhive/api 0.1.0 → 0.3.2

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.cts CHANGED
@@ -1,4 +1,218 @@
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
+
1
71
  interface paths {
72
+ "/v1/printers": {
73
+ parameters: {
74
+ query?: never;
75
+ header?: never;
76
+ path?: never;
77
+ cookie?: never;
78
+ };
79
+ /** List organization printers and loaded filament */
80
+ get: {
81
+ parameters: {
82
+ query?: {
83
+ limit?: number;
84
+ cursor?: string;
85
+ };
86
+ header?: never;
87
+ path?: never;
88
+ cookie?: never;
89
+ };
90
+ requestBody?: never;
91
+ responses: {
92
+ /** @description Default Response */
93
+ 200: {
94
+ headers: {
95
+ [name: string]: unknown;
96
+ };
97
+ content: {
98
+ "application/json": {
99
+ printers: {
100
+ /** Format: uuid */
101
+ id: string;
102
+ name: string;
103
+ make: string;
104
+ model: string;
105
+ modelId: null | string;
106
+ family: string;
107
+ nozzleDiameter: null | number;
108
+ buildPlate: null | string;
109
+ connected: null | boolean;
110
+ readyMarked: boolean;
111
+ readiness: {
112
+ ready: boolean;
113
+ bedClear: null | boolean;
114
+ };
115
+ maintenance: boolean;
116
+ /** @enum {string} */
117
+ state: "idle" | "printing" | "paused" | "offline" | "maintenance" | "ready-marked" | "unknown";
118
+ loadedFilament: {
119
+ slot: string;
120
+ position: number;
121
+ address: {
122
+ ams_id: number;
123
+ slot_id: number;
124
+ };
125
+ /** @enum {string} */
126
+ state: "loaded" | "empty" | "unknown";
127
+ material: null | string;
128
+ color: null | string;
129
+ colorHex: null | string;
130
+ }[];
131
+ }[];
132
+ nextCursor: string | null;
133
+ };
134
+ };
135
+ };
136
+ };
137
+ };
138
+ put?: never;
139
+ post?: never;
140
+ delete?: never;
141
+ options?: never;
142
+ head?: never;
143
+ patch?: never;
144
+ trace?: never;
145
+ };
146
+ "/v1/printers/{id}": {
147
+ parameters: {
148
+ query?: never;
149
+ header?: never;
150
+ path?: never;
151
+ cookie?: never;
152
+ };
153
+ /** Read an organization printer and loaded filament */
154
+ get: {
155
+ parameters: {
156
+ query?: never;
157
+ header?: never;
158
+ path: {
159
+ id: string;
160
+ };
161
+ cookie?: never;
162
+ };
163
+ requestBody?: never;
164
+ responses: {
165
+ /** @description Default Response */
166
+ 200: {
167
+ headers: {
168
+ [name: string]: unknown;
169
+ };
170
+ content: {
171
+ "application/json": {
172
+ /** Format: uuid */
173
+ id: string;
174
+ name: string;
175
+ make: string;
176
+ model: string;
177
+ modelId: null | string;
178
+ family: string;
179
+ nozzleDiameter: null | number;
180
+ buildPlate: null | string;
181
+ connected: null | boolean;
182
+ readyMarked: boolean;
183
+ readiness: {
184
+ ready: boolean;
185
+ bedClear: null | boolean;
186
+ };
187
+ maintenance: boolean;
188
+ /** @enum {string} */
189
+ state: "idle" | "printing" | "paused" | "offline" | "maintenance" | "ready-marked" | "unknown";
190
+ loadedFilament: {
191
+ slot: string;
192
+ position: number;
193
+ address: {
194
+ ams_id: number;
195
+ slot_id: number;
196
+ };
197
+ /** @enum {string} */
198
+ state: "loaded" | "empty" | "unknown";
199
+ material: null | string;
200
+ color: null | string;
201
+ colorHex: null | string;
202
+ }[];
203
+ };
204
+ };
205
+ };
206
+ };
207
+ };
208
+ put?: never;
209
+ post?: never;
210
+ delete?: never;
211
+ options?: never;
212
+ head?: never;
213
+ patch?: never;
214
+ trace?: never;
215
+ };
2
216
  "/v1/partner-production/uploads": {
3
217
  parameters: {
4
218
  query?: never;
@@ -138,6 +352,7 @@ interface paths {
138
352
  /** @enum {string} */
139
353
  status: "missing";
140
354
  };
355
+ printerModel?: string;
141
356
  };
142
357
  } | {
143
358
  /** Format: uuid */
@@ -218,6 +433,7 @@ interface paths {
218
433
  /** @enum {string} */
219
434
  status: "missing";
220
435
  };
436
+ printerModel?: string;
221
437
  } | null;
222
438
  error: {
223
439
  /** @enum {string} */
@@ -344,6 +560,7 @@ interface paths {
344
560
  /** @enum {string} */
345
561
  status: "missing";
346
562
  };
563
+ printerModel?: string;
347
564
  };
348
565
  } | {
349
566
  /** Format: uuid */
@@ -424,6 +641,7 @@ interface paths {
424
641
  /** @enum {string} */
425
642
  status: "missing";
426
643
  };
644
+ printerModel?: string;
427
645
  } | null;
428
646
  error: {
429
647
  /** @enum {string} */
@@ -767,6 +985,7 @@ interface paths {
767
985
  /** @enum {string} */
768
986
  status: "missing";
769
987
  };
988
+ printerModel?: string;
770
989
  };
771
990
  } | {
772
991
  /** Format: uuid */
@@ -847,6 +1066,7 @@ interface paths {
847
1066
  /** @enum {string} */
848
1067
  status: "missing";
849
1068
  };
1069
+ printerModel?: string;
850
1070
  } | null;
851
1071
  error: {
852
1072
  /** @enum {string} */
@@ -1068,6 +1288,7 @@ interface paths {
1068
1288
  /** @enum {string} */
1069
1289
  status: "missing";
1070
1290
  };
1291
+ printerModel?: string;
1071
1292
  };
1072
1293
  } | {
1073
1294
  /** Format: uuid */
@@ -1148,6 +1369,7 @@ interface paths {
1148
1369
  /** @enum {string} */
1149
1370
  status: "missing";
1150
1371
  };
1372
+ printerModel?: string;
1151
1373
  } | null;
1152
1374
  error: {
1153
1375
  /** @enum {string} */
@@ -1388,6 +1610,7 @@ interface paths {
1388
1610
  /** @enum {string} */
1389
1611
  status: "missing";
1390
1612
  };
1613
+ printerModel?: string;
1391
1614
  };
1392
1615
  } | {
1393
1616
  /** Format: uuid */
@@ -1468,6 +1691,7 @@ interface paths {
1468
1691
  /** @enum {string} */
1469
1692
  status: "missing";
1470
1693
  };
1694
+ printerModel?: string;
1471
1695
  } | null;
1472
1696
  error: {
1473
1697
  /** @enum {string} */
@@ -1575,155 +1799,2366 @@ interface paths {
1575
1799
  patch?: never;
1576
1800
  trace?: never;
1577
1801
  };
1578
- }
1579
-
1580
- type PrintHiveOptions = {
1581
- apiKey: string;
1582
- baseUrl?: string;
1583
- fetch?: typeof globalThis.fetch;
1584
- timeoutMs?: number;
1585
- maxRetries?: number;
1586
- };
1587
-
1588
- type ApiLimit = {
1589
- name: string;
1590
- max: number;
1591
- observed?: number;
1592
- };
1593
- type ApiErrorValue = null | string | number | boolean | ApiErrorValue[] | {
1594
- [key: string]: ApiErrorValue;
1595
- };
1596
- type ApiErrorBody = {
1597
- error: string;
1598
- requestId?: string;
1599
- limit?: ApiLimit;
1600
- [key: string]: ApiErrorValue | undefined;
1601
- };
1602
- declare class PrintHiveApiError extends Error {
1603
- readonly status: number;
1604
- readonly code: string;
1605
- readonly limit?: ApiLimit | undefined;
1606
- readonly retryAfterMs?: number | undefined;
1607
- readonly requestId?: string | undefined;
1608
- readonly body?: ApiErrorBody | undefined;
1609
- readonly name = "PrintHiveApiError";
1610
- constructor(status: number, code: string, limit?: ApiLimit | undefined, retryAfterMs?: number | undefined, requestId?: string | undefined, body?: ApiErrorBody | undefined);
1611
- }
1612
- declare class PrintHiveNetworkError extends Error {
1613
- readonly reason: "network" | "timeout" | "aborted";
1614
- readonly name = "PrintHiveNetworkError";
1615
- constructor(reason: "network" | "timeout" | "aborted");
1616
- }
1617
-
1618
- type PartnerSource = paths["/v1/partner-production/uploads/{sourceId}"]["get"]["responses"][200]["content"]["application/json"];
1619
- type PartnerModel = paths["/v1/partner-production/models"]["get"]["responses"][200]["content"]["application/json"];
1620
- type UploadOptions = {
1621
- filename: string;
1622
- externalId?: string;
1623
- modelId?: string;
1624
- idempotencyKey?: string;
1625
- } & ({
1626
- file: string | Uint8Array;
1627
- size?: never;
1628
- } | {
1629
- file: ReadableStream<Uint8Array>;
1630
- size: number;
1631
- });
1632
- type WaitOptions = {
1633
- intervalMs?: number;
1634
- timeoutMs?: number;
1635
- signal?: AbortSignal;
1636
- };
1637
- declare class PrintHive {
1638
- readonly partnerSources: {
1639
- get: (sourceId: string, signal?: AbortSignal) => Promise<{
1640
- sourceVersionId: string;
1641
- modelId: string;
1642
- externalId: string | null;
1643
- sha256: string;
1644
- filename: string;
1645
- bytes: number;
1646
- createdAt: string;
1647
- status: "queued";
1648
- } | {
1649
- sourceVersionId: string;
1650
- modelId: string;
1651
- externalId: string | null;
1652
- sha256: string;
1653
- filename: string;
1654
- bytes: number;
1655
- createdAt: string;
1656
- status: "inspecting";
1657
- } | {
1658
- sourceVersionId: string;
1659
- modelId: string;
1660
- externalId: string | null;
1661
- sha256: string;
1662
- filename: string;
1663
- bytes: number;
1664
- createdAt: string;
1665
- status: "ready";
1666
- inspection: {
1667
- version: 1;
1668
- classification: "project" | "geometry_only" | "toolpath_only";
1669
- hasEmbeddedGcode: boolean;
1670
- plates: {
1671
- number: number;
1672
- objectIds: string[];
1673
- }[];
1674
- objects: {
1675
- id: string;
1676
- entry: string;
1677
- objectId: number;
1678
- name: string | null;
1679
- kind: "mesh" | "assembly" | "support" | "other";
1680
- materialSlots: number[];
1681
- }[];
1682
- materialSlots: {
1683
- slot: number;
1684
- material: string | null;
1685
- color: string | null;
1686
- profile: string | null;
1687
- }[];
1688
- materialUsage: "complete" | "requires_review";
1689
- reviewReasons: ("custom_instructions" | "material_usage_unresolved" | "geometry_only" | "project_metadata_ambiguous")[];
1690
- authoringEngine?: {
1691
- status: "recognized";
1692
- family: "bambu_studio" | "orca_slicer";
1693
- release: string;
1694
- releaseLine: string;
1695
- major: number;
1696
- evidence: ("application" | "projectSettingsVersion" | "sliceInfoClientVersion")[];
1697
- } | {
1698
- status: "unsupported_family";
1699
- application: string;
1700
- } | {
1701
- status: "fork";
1702
- application: string;
1703
- release: string;
1704
- } | {
1705
- status: "disagreeing";
1706
- values: {
1707
- application?: string;
1708
- projectSettingsVersion?: string;
1709
- sliceInfoClientVersion?: string;
1710
- };
1711
- } | {
1712
- status: "unparseable";
1713
- values: {
1714
- application?: string;
1715
- projectSettingsVersion?: string;
1716
- sliceInfoClientVersion?: string;
1717
- };
1718
- } | {
1719
- status: "missing";
1720
- };
1721
- };
1722
- } | {
1723
- sourceVersionId: string;
1724
- modelId: string;
1725
- externalId: string | null;
1726
- sha256: string;
1802
+ "/v1/print-jobs/create": {
1803
+ parameters: {
1804
+ query?: never;
1805
+ header?: never;
1806
+ path?: never;
1807
+ cookie?: never;
1808
+ };
1809
+ get?: never;
1810
+ put?: never;
1811
+ /** Create one print job for one plate */
1812
+ post: {
1813
+ parameters: {
1814
+ query?: never;
1815
+ header?: {
1816
+ "idempotency-key"?: string;
1817
+ };
1818
+ path?: never;
1819
+ cookie?: never;
1820
+ };
1821
+ requestBody: {
1822
+ content: {
1823
+ "application/json": {
1824
+ name: string;
1825
+ externalId?: string;
1826
+ model_file_id: string;
1827
+ organization_id?: string;
1828
+ /** @description Organization ID (optional, defaults to user's primary organization) */
1829
+ organizationId?: string;
1830
+ /** Format: uuid */
1831
+ printer_id?: string | null;
1832
+ /** @description One-based plate number in the project archive */
1833
+ plate?: number;
1834
+ /** @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?: {
1836
+ /** @description Zero-based project filament index */
1837
+ sourceSlot: number;
1838
+ material: string;
1839
+ color: string;
1840
+ targetSlot?: {
1841
+ ams_id: number;
1842
+ slot_id: number;
1843
+ };
1844
+ }[];
1845
+ /**
1846
+ * @description Create assigned jobs waiting for filament, or reject mismatches with 422
1847
+ * @default wait
1848
+ * @enum {string}
1849
+ */
1850
+ on_filament_mismatch?: "wait" | "reject";
1851
+ /** Format: uuid */
1852
+ task_id?: string | null;
1853
+ /** @description Optional make ID to derive required materials */
1854
+ make_id?: string;
1855
+ print_options?: {
1856
+ enable_ams?: boolean;
1857
+ enable_bed_leveling?: boolean;
1858
+ start_immediately?: boolean;
1859
+ /** @description Deprecated compatibility alias for start_immediately */
1860
+ set_printer_ready?: boolean;
1861
+ auto_assign?: boolean;
1862
+ constraints?: Record<string, never>;
1863
+ } & {
1864
+ [key: string]: unknown;
1865
+ };
1866
+ };
1867
+ "multipart/form-data": {
1868
+ /** Format: binary */
1869
+ file: string;
1870
+ name?: string;
1871
+ /** @description One-based plate number in the project archive */
1872
+ plate: number;
1873
+ /** @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: {
1875
+ /** @description Zero-based project filament index */
1876
+ sourceSlot: number;
1877
+ material: string;
1878
+ color: string;
1879
+ targetSlot?: {
1880
+ ams_id: number;
1881
+ slot_id: number;
1882
+ };
1883
+ }[];
1884
+ /** Format: uuid */
1885
+ printer_id?: string;
1886
+ /**
1887
+ * @description Create assigned jobs waiting for filament, or reject mismatches with 422
1888
+ * @default wait
1889
+ * @enum {string}
1890
+ */
1891
+ on_filament_mismatch?: "wait" | "reject";
1892
+ externalId?: string;
1893
+ /**
1894
+ * @default automatic
1895
+ * @enum {string}
1896
+ */
1897
+ release?: "automatic" | "manual";
1898
+ print_options?: {
1899
+ [key: string]: unknown;
1900
+ };
1901
+ };
1902
+ };
1903
+ };
1904
+ responses: {
1905
+ /** @description Default Response */
1906
+ 201: {
1907
+ headers: {
1908
+ [name: string]: unknown;
1909
+ };
1910
+ content: {
1911
+ "application/json": {
1912
+ job?: {
1913
+ id: number;
1914
+ name?: string;
1915
+ status?: string;
1916
+ model_file_id?: string | null;
1917
+ printer_id?: string | null;
1918
+ organization_id?: string;
1919
+ print_options?: ({
1920
+ /** @enum {string} */
1921
+ filament_route_state?: "waiting" | "resolved";
1922
+ /** @description Assigned job is waiting for a complete material route; rechecked before claim */
1923
+ filament_waiting_reasons?: {
1924
+ /** @enum {string} */
1925
+ code: "filament_not_loaded" | "material_route_changed";
1926
+ /** @enum {string} */
1927
+ cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
1928
+ sourceSlot?: number;
1929
+ material?: string;
1930
+ color?: string;
1931
+ suggestedTargetSlot?: {
1932
+ ams_id?: number;
1933
+ slot_id?: number;
1934
+ };
1935
+ }[];
1936
+ } & {
1937
+ [key: string]: unknown;
1938
+ }) | null;
1939
+ } & {
1940
+ [key: string]: unknown;
1941
+ };
1942
+ /** @description Detailed match results for fully eligible printers */
1943
+ eligiblePrinters?: {
1944
+ printerId?: string;
1945
+ match?: {
1946
+ score?: number;
1947
+ reasons?: string[];
1948
+ matched_at?: string;
1949
+ printer_id?: string;
1950
+ };
1951
+ }[];
1952
+ /** @description Detailed match results for partially eligible printers including missing materials */
1953
+ partiallyEligiblePrinters?: {
1954
+ printerId?: string;
1955
+ match?: {
1956
+ score?: number;
1957
+ reasons?: string[];
1958
+ matched_at?: string;
1959
+ printer_id?: string;
1960
+ missing?: {
1961
+ index?: number;
1962
+ type?: string;
1963
+ color?: string;
1964
+ explicitMaterialId?: string;
1965
+ }[];
1966
+ };
1967
+ }[];
1968
+ };
1969
+ };
1970
+ };
1971
+ /** @description Default Response */
1972
+ 202: {
1973
+ headers: {
1974
+ [name: string]: unknown;
1975
+ };
1976
+ content: {
1977
+ "application/json": {
1978
+ /** Format: uuid */
1979
+ requestId: string;
1980
+ /** @enum {string} */
1981
+ status: "preparing" | "held" | "created" | "failed" | "cancelled";
1982
+ externalId: string | null;
1983
+ createdAt: string;
1984
+ job: ({
1985
+ id: number;
1986
+ status: string;
1987
+ /** Format: uuid */
1988
+ model_file_id: string | null;
1989
+ /** Format: uuid */
1990
+ printer_id: string | null;
1991
+ print_options: ({
1992
+ /** @enum {string} */
1993
+ filament_route_state?: "waiting" | "resolved";
1994
+ filament_waiting_reasons?: {
1995
+ /** @enum {string} */
1996
+ code: "filament_not_loaded" | "material_route_changed";
1997
+ sourceSlot?: number;
1998
+ material?: string;
1999
+ color?: string;
2000
+ /** @enum {string} */
2001
+ cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
2002
+ suggestedTargetSlot?: {
2003
+ ams_id: number;
2004
+ slot_id: number;
2005
+ };
2006
+ }[];
2007
+ } & {
2008
+ [key: string]: unknown;
2009
+ }) | null;
2010
+ } & {
2011
+ [key: string]: unknown;
2012
+ }) | null;
2013
+ requiredActions: {
2014
+ [key: string]: unknown;
2015
+ }[];
2016
+ error: {
2017
+ [key: string]: unknown;
2018
+ } | null;
2019
+ };
2020
+ };
2021
+ };
2022
+ /** @description Default Response */
2023
+ 400: {
2024
+ headers: {
2025
+ [name: string]: unknown;
2026
+ };
2027
+ content: {
2028
+ "application/json": {
2029
+ error?: string;
2030
+ message?: string;
2031
+ };
2032
+ };
2033
+ };
2034
+ /** @description Default Response */
2035
+ 409: {
2036
+ headers: {
2037
+ [name: string]: unknown;
2038
+ };
2039
+ content: {
2040
+ "application/json": {
2041
+ error?: string;
2042
+ message?: string;
2043
+ reason?: string;
2044
+ retry_count?: number;
2045
+ max_retries?: number;
2046
+ next_eligible_at?: string | null;
2047
+ };
2048
+ };
2049
+ };
2050
+ /** @description Default Response */
2051
+ 422: {
2052
+ headers: {
2053
+ [name: string]: unknown;
2054
+ };
2055
+ content: {
2056
+ "application/json": {
2057
+ /** @enum {string} */
2058
+ error?: "filament_requirements_unsatisfied" | "printer_model_incompatible" | "hardware:nozzle_diameter_mismatch" | "target_slot_unavailable" | "insufficient_filament_routes";
2059
+ message?: string;
2060
+ filaments?: {
2061
+ sourceSlot?: number;
2062
+ /** @enum {string} */
2063
+ reason?: "missing_material" | "color_distance" | "slot_empty" | "slot_conflict";
2064
+ }[];
2065
+ };
2066
+ };
2067
+ };
2068
+ /** @description Default Response */
2069
+ 500: {
2070
+ headers: {
2071
+ [name: string]: unknown;
2072
+ };
2073
+ content: {
2074
+ "application/json": {
2075
+ error?: string;
2076
+ message?: string;
2077
+ };
2078
+ };
2079
+ };
2080
+ };
2081
+ };
2082
+ delete?: never;
2083
+ options?: never;
2084
+ head?: never;
2085
+ patch?: never;
2086
+ trace?: never;
2087
+ };
2088
+ "/v1/print-jobs/{id}": {
2089
+ parameters: {
2090
+ query?: never;
2091
+ header?: never;
2092
+ path?: never;
2093
+ cookie?: never;
2094
+ };
2095
+ /** @description Organization-scoped job snapshot for polling. Stored lifecycle and recovery facts are separate from quality acceptance, printer release, accepted-unit counts, and shipping readiness. Null values remain unknown. A terminal status or print_completed_at is not proof of successful output. */
2096
+ get: {
2097
+ parameters: {
2098
+ query?: never;
2099
+ header?: never;
2100
+ path: {
2101
+ id: number;
2102
+ };
2103
+ cookie?: never;
2104
+ };
2105
+ requestBody?: never;
2106
+ responses: {
2107
+ /** @description Default Response */
2108
+ 200: {
2109
+ headers: {
2110
+ [name: string]: unknown;
2111
+ };
2112
+ content: {
2113
+ "application/json": {
2114
+ job?: {
2115
+ id?: number;
2116
+ name?: string;
2117
+ organization_id?: string;
2118
+ printer_id?: string | null;
2119
+ model_file_id?: string | null;
2120
+ task_id?: string | null;
2121
+ status?: string;
2122
+ /** @description Stored job status version, not a Farm Event cursor or a version of every field. */
2123
+ status_version?: number;
2124
+ progress?: number | null;
2125
+ print_started_at?: string | null;
2126
+ print_completed_at?: string | null;
2127
+ verified_at?: string | null;
2128
+ outcome_resolution_required?: boolean;
2129
+ outcome_resolution_source?: string | null;
2130
+ outcome_resolved_at?: string | null;
2131
+ retry_count?: number | null;
2132
+ max_retries?: number | null;
2133
+ recovery_count?: number | null;
2134
+ next_eligible_at?: string | null;
2135
+ error_code?: string | null;
2136
+ updated_at?: string | null;
2137
+ printer?: {
2138
+ id?: string;
2139
+ name?: string;
2140
+ model?: string;
2141
+ } | null;
2142
+ model_file?: {
2143
+ id?: string;
2144
+ filename?: string;
2145
+ file_type?: string;
2146
+ file_size?: number | null;
2147
+ } | null;
2148
+ print_options?: ({
2149
+ /** @description Assigned job is waiting for a complete material route; rechecked before claim */
2150
+ filament_waiting_reasons?: {
2151
+ /** @enum {string} */
2152
+ code: "filament_not_loaded" | "material_route_changed";
2153
+ /** @enum {string} */
2154
+ cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
2155
+ sourceSlot?: number;
2156
+ material?: string;
2157
+ color?: string;
2158
+ suggestedTargetSlot?: {
2159
+ ams_id?: number;
2160
+ slot_id?: number;
2161
+ };
2162
+ }[];
2163
+ } & {
2164
+ [key: string]: unknown;
2165
+ }) | null;
2166
+ };
2167
+ };
2168
+ };
2169
+ };
2170
+ };
2171
+ };
2172
+ put?: never;
2173
+ post?: never;
2174
+ delete: {
2175
+ parameters: {
2176
+ query?: {
2177
+ organizationId?: string;
2178
+ };
2179
+ header?: never;
2180
+ path: {
2181
+ id: string;
2182
+ };
2183
+ cookie?: never;
2184
+ };
2185
+ requestBody?: never;
2186
+ responses: {
2187
+ /** @description Default Response */
2188
+ 200: {
2189
+ headers: {
2190
+ [name: string]: unknown;
2191
+ };
2192
+ content: {
2193
+ "application/json": {
2194
+ success?: boolean;
2195
+ message?: string;
2196
+ };
2197
+ };
2198
+ };
2199
+ /** @description Cannot delete job - invalid status */
2200
+ 400: {
2201
+ headers: {
2202
+ [name: string]: unknown;
2203
+ };
2204
+ content: {
2205
+ "application/json": {
2206
+ error?: string;
2207
+ message?: string;
2208
+ };
2209
+ };
2210
+ };
2211
+ /** @description Default Response */
2212
+ 401: {
2213
+ headers: {
2214
+ [name: string]: unknown;
2215
+ };
2216
+ content: {
2217
+ "application/json": {
2218
+ error?: string;
2219
+ message?: string;
2220
+ };
2221
+ };
2222
+ };
2223
+ /** @description Default Response */
2224
+ 404: {
2225
+ headers: {
2226
+ [name: string]: unknown;
2227
+ };
2228
+ content: {
2229
+ "application/json": {
2230
+ error?: string;
2231
+ message?: string;
2232
+ };
2233
+ };
2234
+ };
2235
+ /** @description Default Response */
2236
+ 500: {
2237
+ headers: {
2238
+ [name: string]: unknown;
2239
+ };
2240
+ content: {
2241
+ "application/json": {
2242
+ error?: string;
2243
+ message?: string;
2244
+ };
2245
+ };
2246
+ };
2247
+ };
2248
+ };
2249
+ options?: never;
2250
+ head?: never;
2251
+ /**
2252
+ * Update print job
2253
+ * @description Update a queued print job's printer assignment and/or print options. Only QUEUED jobs can be updated.
2254
+ */
2255
+ patch: {
2256
+ parameters: {
2257
+ query?: {
2258
+ /** @description Organization ID (optional, defaults to user's primary organization) */
2259
+ organizationId?: string;
2260
+ };
2261
+ header?: never;
2262
+ path: {
2263
+ /** @description Print job ID */
2264
+ id: string;
2265
+ };
2266
+ cookie?: never;
2267
+ };
2268
+ requestBody: {
2269
+ content: {
2270
+ "application/json": {
2271
+ /** @description Printer ID to assign. Set to null to un-assign and enable auto-assign. */
2272
+ printer_id?: string | null;
2273
+ /** @description Print options including AMS mapping */
2274
+ print_options?: {
2275
+ enable_ams?: boolean;
2276
+ enable_bed_leveling?: boolean;
2277
+ start_immediately?: boolean;
2278
+ /** @description Deprecated compatibility alias for start_immediately */
2279
+ set_printer_ready?: boolean;
2280
+ enable_filament_backup?: boolean;
2281
+ auto_assign?: boolean;
2282
+ ams_mapping?: number[];
2283
+ ams_mapping2?: (number | {
2284
+ ams_id: number;
2285
+ slot_id: number;
2286
+ })[];
2287
+ ams_mapping_info?: {
2288
+ sourceColor?: string;
2289
+ targetColor?: string;
2290
+ filamentType?: string;
2291
+ }[];
2292
+ } & {
2293
+ [key: string]: unknown;
2294
+ };
2295
+ /** @description Organization ID (optional, defaults to user's primary organization) */
2296
+ organizationId?: string;
2297
+ };
2298
+ };
2299
+ };
2300
+ responses: {
2301
+ /** @description Job updated successfully */
2302
+ 200: {
2303
+ headers: {
2304
+ [name: string]: unknown;
2305
+ };
2306
+ content: {
2307
+ "application/json": {
2308
+ success?: boolean;
2309
+ /** @description Updated print job */
2310
+ job?: Record<string, never>;
2311
+ };
2312
+ };
2313
+ };
2314
+ /** @description Bad request - job not in QUEUED status */
2315
+ 400: {
2316
+ headers: {
2317
+ [name: string]: unknown;
2318
+ };
2319
+ content: {
2320
+ "application/json": {
2321
+ error?: string;
2322
+ message?: string;
2323
+ };
2324
+ };
2325
+ };
2326
+ /** @description Forbidden - not authorized to update this job */
2327
+ 403: {
2328
+ headers: {
2329
+ [name: string]: unknown;
2330
+ };
2331
+ content: {
2332
+ "application/json": {
2333
+ error?: string;
2334
+ code?: string;
2335
+ message?: string;
2336
+ };
2337
+ };
2338
+ };
2339
+ /** @description Job not found */
2340
+ 404: {
2341
+ headers: {
2342
+ [name: string]: unknown;
2343
+ };
2344
+ content: {
2345
+ "application/json": {
2346
+ error?: string;
2347
+ message?: string;
2348
+ };
2349
+ };
2350
+ };
2351
+ /** @description Internal server error */
2352
+ 500: {
2353
+ headers: {
2354
+ [name: string]: unknown;
2355
+ };
2356
+ content: {
2357
+ "application/json": {
2358
+ error?: string;
2359
+ message?: string;
2360
+ };
2361
+ };
2362
+ };
2363
+ };
2364
+ };
2365
+ trace?: never;
2366
+ };
2367
+ "/v1/print-jobs/create-requests/{requestId}": {
2368
+ parameters: {
2369
+ query?: never;
2370
+ header?: never;
2371
+ path?: never;
2372
+ cookie?: never;
2373
+ };
2374
+ /** Poll one asynchronous single-plate creation request */
2375
+ get: {
2376
+ parameters: {
2377
+ query?: never;
2378
+ header?: never;
2379
+ path: {
2380
+ requestId: string;
2381
+ };
2382
+ cookie?: never;
2383
+ };
2384
+ requestBody?: never;
2385
+ responses: {
2386
+ /** @description Default Response */
2387
+ 200: {
2388
+ headers: {
2389
+ [name: string]: unknown;
2390
+ };
2391
+ content: {
2392
+ "application/json": {
2393
+ /** Format: uuid */
2394
+ requestId: string;
2395
+ /** @enum {string} */
2396
+ status: "preparing" | "held" | "created" | "failed" | "cancelled";
2397
+ externalId: string | null;
2398
+ createdAt: string;
2399
+ job: ({
2400
+ id: number;
2401
+ status: string;
2402
+ /** Format: uuid */
2403
+ model_file_id: string | null;
2404
+ /** Format: uuid */
2405
+ printer_id: string | null;
2406
+ print_options: ({
2407
+ /** @enum {string} */
2408
+ filament_route_state?: "waiting" | "resolved";
2409
+ filament_waiting_reasons?: {
2410
+ /** @enum {string} */
2411
+ code: "filament_not_loaded" | "material_route_changed";
2412
+ sourceSlot?: number;
2413
+ material?: string;
2414
+ color?: string;
2415
+ /** @enum {string} */
2416
+ cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
2417
+ suggestedTargetSlot?: {
2418
+ ams_id: number;
2419
+ slot_id: number;
2420
+ };
2421
+ }[];
2422
+ } & {
2423
+ [key: string]: unknown;
2424
+ }) | null;
2425
+ } & {
2426
+ [key: string]: unknown;
2427
+ }) | null;
2428
+ requiredActions: {
2429
+ [key: string]: unknown;
2430
+ }[];
2431
+ error: {
2432
+ [key: string]: unknown;
2433
+ } | null;
2434
+ };
2435
+ };
2436
+ };
2437
+ /** @description Default Response */
2438
+ 404: {
2439
+ headers: {
2440
+ [name: string]: unknown;
2441
+ };
2442
+ content: {
2443
+ "application/json": {
2444
+ error?: string;
2445
+ };
2446
+ };
2447
+ };
2448
+ };
2449
+ };
2450
+ put?: never;
2451
+ post?: never;
2452
+ delete?: never;
2453
+ options?: never;
2454
+ head?: never;
2455
+ patch?: never;
2456
+ trace?: never;
2457
+ };
2458
+ "/v1/print-jobs/create-requests/{requestId}/release": {
2459
+ parameters: {
2460
+ query?: never;
2461
+ header?: never;
2462
+ path?: never;
2463
+ cookie?: never;
2464
+ };
2465
+ get?: never;
2466
+ put?: never;
2467
+ /** Authorize admission of a manually held creation request */
2468
+ post: {
2469
+ parameters: {
2470
+ query?: never;
2471
+ header?: never;
2472
+ path: {
2473
+ requestId: string;
2474
+ };
2475
+ cookie?: never;
2476
+ };
2477
+ requestBody?: never;
2478
+ responses: {
2479
+ /** @description Default Response */
2480
+ 202: {
2481
+ headers: {
2482
+ [name: string]: unknown;
2483
+ };
2484
+ content: {
2485
+ "application/json": {
2486
+ authorized: boolean;
2487
+ };
2488
+ };
2489
+ };
2490
+ /** @description Authentication required */
2491
+ 401: {
2492
+ headers: {
2493
+ [name: string]: unknown;
2494
+ };
2495
+ content: {
2496
+ "application/json": {
2497
+ error?: string;
2498
+ message?: string;
2499
+ requestId?: string;
2500
+ code?: string;
2501
+ statusCode?: number;
2502
+ };
2503
+ };
2504
+ };
2505
+ /** @description API key requires control scope */
2506
+ 403: {
2507
+ headers: {
2508
+ [name: string]: unknown;
2509
+ };
2510
+ content: {
2511
+ "application/json": {
2512
+ error?: string;
2513
+ message?: string;
2514
+ requestId?: string;
2515
+ code?: string;
2516
+ statusCode?: number;
2517
+ };
2518
+ };
2519
+ };
2520
+ /** @description Creation request not found */
2521
+ 404: {
2522
+ headers: {
2523
+ [name: string]: unknown;
2524
+ };
2525
+ content: {
2526
+ "application/json": {
2527
+ error?: string;
2528
+ message?: string;
2529
+ requestId?: string;
2530
+ };
2531
+ };
2532
+ };
2533
+ /** @description Creation request no longer supports this action */
2534
+ 409: {
2535
+ headers: {
2536
+ [name: string]: unknown;
2537
+ };
2538
+ content: {
2539
+ "application/json": {
2540
+ error?: string;
2541
+ message?: string;
2542
+ requestId?: string;
2543
+ };
2544
+ };
2545
+ };
2546
+ };
2547
+ };
2548
+ delete?: never;
2549
+ options?: never;
2550
+ head?: never;
2551
+ patch?: never;
2552
+ trace?: never;
2553
+ };
2554
+ "/v1/print-jobs/create-requests/{requestId}/cancel": {
2555
+ parameters: {
2556
+ query?: never;
2557
+ header?: never;
2558
+ path?: never;
2559
+ cookie?: never;
2560
+ };
2561
+ get?: never;
2562
+ put?: never;
2563
+ /** Cancel a creation request before job admission */
2564
+ post: {
2565
+ parameters: {
2566
+ query?: never;
2567
+ header?: never;
2568
+ path: {
2569
+ requestId: string;
2570
+ };
2571
+ cookie?: never;
2572
+ };
2573
+ requestBody?: never;
2574
+ responses: {
2575
+ /** @description Default Response */
2576
+ 202: {
2577
+ headers: {
2578
+ [name: string]: unknown;
2579
+ };
2580
+ content: {
2581
+ "application/json": {
2582
+ cancelled: boolean;
2583
+ };
2584
+ };
2585
+ };
2586
+ /** @description Authentication required */
2587
+ 401: {
2588
+ headers: {
2589
+ [name: string]: unknown;
2590
+ };
2591
+ content: {
2592
+ "application/json": {
2593
+ error?: string;
2594
+ message?: string;
2595
+ requestId?: string;
2596
+ code?: string;
2597
+ statusCode?: number;
2598
+ };
2599
+ };
2600
+ };
2601
+ /** @description API key requires control scope */
2602
+ 403: {
2603
+ headers: {
2604
+ [name: string]: unknown;
2605
+ };
2606
+ content: {
2607
+ "application/json": {
2608
+ error?: string;
2609
+ message?: string;
2610
+ requestId?: string;
2611
+ code?: string;
2612
+ statusCode?: number;
2613
+ };
2614
+ };
2615
+ };
2616
+ /** @description Creation request not found */
2617
+ 404: {
2618
+ headers: {
2619
+ [name: string]: unknown;
2620
+ };
2621
+ content: {
2622
+ "application/json": {
2623
+ error?: string;
2624
+ message?: string;
2625
+ requestId?: string;
2626
+ };
2627
+ };
2628
+ };
2629
+ /** @description Creation request no longer supports this action */
2630
+ 409: {
2631
+ headers: {
2632
+ [name: string]: unknown;
2633
+ };
2634
+ content: {
2635
+ "application/json": {
2636
+ error?: string;
2637
+ message?: string;
2638
+ requestId?: string;
2639
+ };
2640
+ };
2641
+ };
2642
+ };
2643
+ };
2644
+ delete?: never;
2645
+ options?: never;
2646
+ head?: never;
2647
+ patch?: never;
2648
+ trace?: never;
2649
+ };
2650
+ "/v1/partner-production/preparations": {
2651
+ parameters: {
2652
+ query?: never;
2653
+ header?: never;
2654
+ path?: never;
2655
+ cookie?: never;
2656
+ };
2657
+ get?: never;
2658
+ put?: never;
2659
+ /**
2660
+ * Prepare plates of partner sources for an exact printer
2661
+ * @description Creates a durable asynchronous preparation request. Each item names a source version or a partner externalId, plates ("all" or a list), a plate-run quantity, optional material mappings and guidance, and an exact qualified printer. Requires Idempotency-Key. Creates no print job.
2662
+ */
2663
+ post: {
2664
+ parameters: {
2665
+ query?: never;
2666
+ header: {
2667
+ "idempotency-key": string;
2668
+ };
2669
+ path?: never;
2670
+ cookie?: never;
2671
+ };
2672
+ requestBody: {
2673
+ content: {
2674
+ "application/json": {
2675
+ items: ({
2676
+ /** Format: uuid */
2677
+ sourceVersionId: string;
2678
+ plates: "all" | number[];
2679
+ quantity: number;
2680
+ materialMappings?: {
2681
+ sourceSlot: number;
2682
+ material: string;
2683
+ color: string;
2684
+ }[];
2685
+ guidance?: {
2686
+ allowedMaterials?: string[];
2687
+ preferredFilaments?: {
2688
+ sourceSlot?: number;
2689
+ material: string;
2690
+ color?: string;
2691
+ brand?: string;
2692
+ name?: string;
2693
+ }[];
2694
+ };
2695
+ target: {
2696
+ /** Format: uuid */
2697
+ printerId: string;
2698
+ };
2699
+ } | {
2700
+ externalId: string;
2701
+ plates: "all" | number[];
2702
+ quantity: number;
2703
+ materialMappings?: {
2704
+ sourceSlot: number;
2705
+ material: string;
2706
+ color: string;
2707
+ }[];
2708
+ guidance?: {
2709
+ allowedMaterials?: string[];
2710
+ preferredFilaments?: {
2711
+ sourceSlot?: number;
2712
+ material: string;
2713
+ color?: string;
2714
+ brand?: string;
2715
+ name?: string;
2716
+ }[];
2717
+ };
2718
+ target: {
2719
+ /** Format: uuid */
2720
+ printerId: string;
2721
+ };
2722
+ })[];
2723
+ };
2724
+ };
2725
+ };
2726
+ responses: {
2727
+ /** @description Default Response */
2728
+ 200: {
2729
+ headers: {
2730
+ [name: string]: unknown;
2731
+ };
2732
+ content: {
2733
+ "application/json": {
2734
+ /** Format: uuid */
2735
+ preparationId: string;
2736
+ /** @enum {string} */
2737
+ status: "waiting_for_source" | "preparing" | "held" | "ready" | "failed";
2738
+ /** Format: date-time */
2739
+ createdAt: string;
2740
+ holds: {
2741
+ item: number;
2742
+ plateNumber: number;
2743
+ hold: {
2744
+ /** @enum {string} */
2745
+ code: "inspection_review_required";
2746
+ reason: string;
2747
+ } | {
2748
+ /** @enum {string} */
2749
+ code: "unmapped_used_slot";
2750
+ slots: number[];
2751
+ } | {
2752
+ /** @enum {string} */
2753
+ code: "project_source_too_large";
2754
+ limit: {
2755
+ /** @enum {string} */
2756
+ name: "projectSourceBytes";
2757
+ max: number;
2758
+ observed: number;
2759
+ };
2760
+ } | {
2761
+ /** @enum {string} */
2762
+ code: "project_review_required";
2763
+ detail: string;
2764
+ } | {
2765
+ /** @enum {string} */
2766
+ code: "preview_mismatch_after_remap";
2767
+ detail: string;
2768
+ };
2769
+ }[];
2770
+ items: {
2771
+ index: number;
2772
+ /** @enum {string} */
2773
+ status: "waiting_for_source" | "preparing" | "held" | "ready" | "failed";
2774
+ source: {
2775
+ /** Format: uuid */
2776
+ sourceVersionId: string;
2777
+ externalId: string | null;
2778
+ /** @enum {string} */
2779
+ status: "queued" | "inspecting" | "ready" | "failed";
2780
+ };
2781
+ plates: "all" | number[];
2782
+ resolvedPlates: number[] | null;
2783
+ quantity: number;
2784
+ materialMappings: {
2785
+ sourceSlot: number;
2786
+ material: string;
2787
+ color: string;
2788
+ }[];
2789
+ guidance: {
2790
+ allowedMaterials: string[] | null;
2791
+ preferredFilaments: {
2792
+ sourceSlot?: number;
2793
+ material: string;
2794
+ color?: string;
2795
+ brand?: string;
2796
+ name?: string;
2797
+ }[] | null;
2798
+ };
2799
+ target: {
2800
+ /** Format: uuid */
2801
+ printerId: string;
2802
+ printerName: string;
2803
+ /** @enum {string} */
2804
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
2805
+ /** @enum {string} */
2806
+ printerModel: "P1S";
2807
+ /** @enum {number} */
2808
+ nozzleDiameterMm: 0.4;
2809
+ /** @enum {string} */
2810
+ nozzleFlow: "standard";
2811
+ /** @enum {string} */
2812
+ buildSurface: "textured_pei";
2813
+ profiles: {
2814
+ printer: {
2815
+ /** Format: uuid */
2816
+ catalogId: string;
2817
+ name: string;
2818
+ };
2819
+ process: {
2820
+ /** Format: uuid */
2821
+ catalogId: string;
2822
+ name: string;
2823
+ };
2824
+ filament: {
2825
+ /** Format: uuid */
2826
+ catalogId: string;
2827
+ name: string;
2828
+ };
2829
+ };
2830
+ };
2831
+ failure: {
2832
+ /** @enum {string} */
2833
+ code: "source_failed" | "plate_not_found" | "no_plates" | "mapping_slot_not_found" | "inspection_unreadable";
2834
+ sourceError?: {
2835
+ /** @enum {string} */
2836
+ code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
2837
+ message: string;
2838
+ limit?: {
2839
+ /** @enum {string} */
2840
+ name: "uploadBytes" | "concurrentUploads" | "concurrentUploadsPerOrganization" | "uploadIdleTimeoutMs" | "uploadTimeoutMs" | "entries" | "compressionRatio" | "modelPartExpandedBytes" | "expandedBytes" | "parserBytesPerDocument" | "parserBytesPerArchive" | "xmlDepth" | "xmlElementsPerDocument" | "objects" | "plates" | "materialSlots" | "inspectionTimeoutMs" | "inspectorHeapMb";
2841
+ max: number;
2842
+ observed?: number;
2843
+ };
2844
+ };
2845
+ plates?: number[];
2846
+ slots?: number[];
2847
+ } | null;
2848
+ preparedPlates: {
2849
+ /** Format: uuid */
2850
+ plateId: string;
2851
+ plateNumber: number;
2852
+ runs: number;
2853
+ /** @enum {string} */
2854
+ status: "preparing" | "held" | "ready" | "failed";
2855
+ usedSlots: number[];
2856
+ materialMappings: {
2857
+ sourceSlot: number;
2858
+ /** @enum {string} */
2859
+ material: "PETG";
2860
+ color: string;
2861
+ /** @enum {string} */
2862
+ origin: "partner" | "inspection" | "placeholder";
2863
+ }[];
2864
+ holds: ({
2865
+ /** @enum {string} */
2866
+ code: "inspection_review_required";
2867
+ reason: string;
2868
+ } | {
2869
+ /** @enum {string} */
2870
+ code: "unmapped_used_slot";
2871
+ slots: number[];
2872
+ } | {
2873
+ /** @enum {string} */
2874
+ code: "project_source_too_large";
2875
+ limit: {
2876
+ /** @enum {string} */
2877
+ name: "projectSourceBytes";
2878
+ max: number;
2879
+ observed: number;
2880
+ };
2881
+ } | {
2882
+ /** @enum {string} */
2883
+ code: "project_review_required";
2884
+ detail: string;
2885
+ } | {
2886
+ /** @enum {string} */
2887
+ code: "preview_mismatch_after_remap";
2888
+ detail: string;
2889
+ })[];
2890
+ failure: {
2891
+ /** @enum {string} */
2892
+ code: "slice_failed";
2893
+ sliceCode: string;
2894
+ message: string;
2895
+ retryable: boolean;
2896
+ attempts: number;
2897
+ } | null;
2898
+ output: {
2899
+ /** Format: uuid */
2900
+ outputFileId: string;
2901
+ filename: string;
2902
+ bytes: number;
2903
+ sha256: string;
2904
+ } | null;
2905
+ lineage: {
2906
+ /** Format: uuid */
2907
+ sourceVersionId: string;
2908
+ sourceSha256: string;
2909
+ plateNumber: number;
2910
+ /** @enum {string} */
2911
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
2912
+ /** @enum {string} */
2913
+ buildSurface: "textured_pei";
2914
+ materialMappings: {
2915
+ sourceSlot: number;
2916
+ /** @enum {string} */
2917
+ material: "PETG";
2918
+ color: string;
2919
+ }[];
2920
+ engineSha256: string;
2921
+ resolvedProfilesSha256: string;
2922
+ derivedInputSha256: string;
2923
+ qualifiedProfileSourceHashes: {
2924
+ [key: string]: string;
2925
+ };
2926
+ replacedSettings: {
2927
+ key: string;
2928
+ source: string | string[] | number | boolean;
2929
+ target?: string | string[] | number | boolean;
2930
+ }[];
2931
+ omittedSettings: string[];
2932
+ settingFilterPolicy: {
2933
+ hold: string[];
2934
+ omit: string[];
2935
+ };
2936
+ ignoredSettings: string[];
2937
+ warnings: {
2938
+ /** @enum {string} */
2939
+ code: "custom_instructions_kept" | "custom_instructions_replaced";
2940
+ keys: string[];
2941
+ }[];
2942
+ engineFallback: {
2943
+ authoringVersion: string | null;
2944
+ selectedVersion: string;
2945
+ } | null;
2946
+ /** @enum {string} */
2947
+ preview: "source" | "engine" | "none";
2948
+ previewFile: string | null;
2949
+ finalArtifactSha256: string;
2950
+ } | null;
2951
+ }[];
2952
+ }[];
2953
+ };
2954
+ };
2955
+ };
2956
+ /** @description Default Response */
2957
+ 202: {
2958
+ headers: {
2959
+ [name: string]: unknown;
2960
+ };
2961
+ content: {
2962
+ "application/json": {
2963
+ /** Format: uuid */
2964
+ preparationId: string;
2965
+ /** @enum {string} */
2966
+ status: "waiting_for_source" | "preparing" | "held" | "ready" | "failed";
2967
+ /** Format: date-time */
2968
+ createdAt: string;
2969
+ holds: {
2970
+ item: number;
2971
+ plateNumber: number;
2972
+ hold: {
2973
+ /** @enum {string} */
2974
+ code: "inspection_review_required";
2975
+ reason: string;
2976
+ } | {
2977
+ /** @enum {string} */
2978
+ code: "unmapped_used_slot";
2979
+ slots: number[];
2980
+ } | {
2981
+ /** @enum {string} */
2982
+ code: "project_source_too_large";
2983
+ limit: {
2984
+ /** @enum {string} */
2985
+ name: "projectSourceBytes";
2986
+ max: number;
2987
+ observed: number;
2988
+ };
2989
+ } | {
2990
+ /** @enum {string} */
2991
+ code: "project_review_required";
2992
+ detail: string;
2993
+ } | {
2994
+ /** @enum {string} */
2995
+ code: "preview_mismatch_after_remap";
2996
+ detail: string;
2997
+ };
2998
+ }[];
2999
+ items: {
3000
+ index: number;
3001
+ /** @enum {string} */
3002
+ status: "waiting_for_source" | "preparing" | "held" | "ready" | "failed";
3003
+ source: {
3004
+ /** Format: uuid */
3005
+ sourceVersionId: string;
3006
+ externalId: string | null;
3007
+ /** @enum {string} */
3008
+ status: "queued" | "inspecting" | "ready" | "failed";
3009
+ };
3010
+ plates: "all" | number[];
3011
+ resolvedPlates: number[] | null;
3012
+ quantity: number;
3013
+ materialMappings: {
3014
+ sourceSlot: number;
3015
+ material: string;
3016
+ color: string;
3017
+ }[];
3018
+ guidance: {
3019
+ allowedMaterials: string[] | null;
3020
+ preferredFilaments: {
3021
+ sourceSlot?: number;
3022
+ material: string;
3023
+ color?: string;
3024
+ brand?: string;
3025
+ name?: string;
3026
+ }[] | null;
3027
+ };
3028
+ target: {
3029
+ /** Format: uuid */
3030
+ printerId: string;
3031
+ printerName: string;
3032
+ /** @enum {string} */
3033
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
3034
+ /** @enum {string} */
3035
+ printerModel: "P1S";
3036
+ /** @enum {number} */
3037
+ nozzleDiameterMm: 0.4;
3038
+ /** @enum {string} */
3039
+ nozzleFlow: "standard";
3040
+ /** @enum {string} */
3041
+ buildSurface: "textured_pei";
3042
+ profiles: {
3043
+ printer: {
3044
+ /** Format: uuid */
3045
+ catalogId: string;
3046
+ name: string;
3047
+ };
3048
+ process: {
3049
+ /** Format: uuid */
3050
+ catalogId: string;
3051
+ name: string;
3052
+ };
3053
+ filament: {
3054
+ /** Format: uuid */
3055
+ catalogId: string;
3056
+ name: string;
3057
+ };
3058
+ };
3059
+ };
3060
+ failure: {
3061
+ /** @enum {string} */
3062
+ code: "source_failed" | "plate_not_found" | "no_plates" | "mapping_slot_not_found" | "inspection_unreadable";
3063
+ sourceError?: {
3064
+ /** @enum {string} */
3065
+ code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
3066
+ message: string;
3067
+ limit?: {
3068
+ /** @enum {string} */
3069
+ name: "uploadBytes" | "concurrentUploads" | "concurrentUploadsPerOrganization" | "uploadIdleTimeoutMs" | "uploadTimeoutMs" | "entries" | "compressionRatio" | "modelPartExpandedBytes" | "expandedBytes" | "parserBytesPerDocument" | "parserBytesPerArchive" | "xmlDepth" | "xmlElementsPerDocument" | "objects" | "plates" | "materialSlots" | "inspectionTimeoutMs" | "inspectorHeapMb";
3070
+ max: number;
3071
+ observed?: number;
3072
+ };
3073
+ };
3074
+ plates?: number[];
3075
+ slots?: number[];
3076
+ } | null;
3077
+ preparedPlates: {
3078
+ /** Format: uuid */
3079
+ plateId: string;
3080
+ plateNumber: number;
3081
+ runs: number;
3082
+ /** @enum {string} */
3083
+ status: "preparing" | "held" | "ready" | "failed";
3084
+ usedSlots: number[];
3085
+ materialMappings: {
3086
+ sourceSlot: number;
3087
+ /** @enum {string} */
3088
+ material: "PETG";
3089
+ color: string;
3090
+ /** @enum {string} */
3091
+ origin: "partner" | "inspection" | "placeholder";
3092
+ }[];
3093
+ holds: ({
3094
+ /** @enum {string} */
3095
+ code: "inspection_review_required";
3096
+ reason: string;
3097
+ } | {
3098
+ /** @enum {string} */
3099
+ code: "unmapped_used_slot";
3100
+ slots: number[];
3101
+ } | {
3102
+ /** @enum {string} */
3103
+ code: "project_source_too_large";
3104
+ limit: {
3105
+ /** @enum {string} */
3106
+ name: "projectSourceBytes";
3107
+ max: number;
3108
+ observed: number;
3109
+ };
3110
+ } | {
3111
+ /** @enum {string} */
3112
+ code: "project_review_required";
3113
+ detail: string;
3114
+ } | {
3115
+ /** @enum {string} */
3116
+ code: "preview_mismatch_after_remap";
3117
+ detail: string;
3118
+ })[];
3119
+ failure: {
3120
+ /** @enum {string} */
3121
+ code: "slice_failed";
3122
+ sliceCode: string;
3123
+ message: string;
3124
+ retryable: boolean;
3125
+ attempts: number;
3126
+ } | null;
3127
+ output: {
3128
+ /** Format: uuid */
3129
+ outputFileId: string;
3130
+ filename: string;
3131
+ bytes: number;
3132
+ sha256: string;
3133
+ } | null;
3134
+ lineage: {
3135
+ /** Format: uuid */
3136
+ sourceVersionId: string;
3137
+ sourceSha256: string;
3138
+ plateNumber: number;
3139
+ /** @enum {string} */
3140
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
3141
+ /** @enum {string} */
3142
+ buildSurface: "textured_pei";
3143
+ materialMappings: {
3144
+ sourceSlot: number;
3145
+ /** @enum {string} */
3146
+ material: "PETG";
3147
+ color: string;
3148
+ }[];
3149
+ engineSha256: string;
3150
+ resolvedProfilesSha256: string;
3151
+ derivedInputSha256: string;
3152
+ qualifiedProfileSourceHashes: {
3153
+ [key: string]: string;
3154
+ };
3155
+ replacedSettings: {
3156
+ key: string;
3157
+ source: string | string[] | number | boolean;
3158
+ target?: string | string[] | number | boolean;
3159
+ }[];
3160
+ omittedSettings: string[];
3161
+ settingFilterPolicy: {
3162
+ hold: string[];
3163
+ omit: string[];
3164
+ };
3165
+ ignoredSettings: string[];
3166
+ warnings: {
3167
+ /** @enum {string} */
3168
+ code: "custom_instructions_kept" | "custom_instructions_replaced";
3169
+ keys: string[];
3170
+ }[];
3171
+ engineFallback: {
3172
+ authoringVersion: string | null;
3173
+ selectedVersion: string;
3174
+ } | null;
3175
+ /** @enum {string} */
3176
+ preview: "source" | "engine" | "none";
3177
+ previewFile: string | null;
3178
+ finalArtifactSha256: string;
3179
+ } | null;
3180
+ }[];
3181
+ }[];
3182
+ };
3183
+ };
3184
+ };
3185
+ /** @description Default Response */
3186
+ 400: {
3187
+ headers: {
3188
+ [name: string]: unknown;
3189
+ };
3190
+ content: {
3191
+ "application/json": {
3192
+ /** @enum {string} */
3193
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3194
+ item?: number;
3195
+ limit?: {
3196
+ /** @enum {string} */
3197
+ name: "items";
3198
+ max: number;
3199
+ observed: number;
3200
+ };
3201
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3202
+ reasons?: {
3203
+ /** @description Index of the request item that names this printer. */
3204
+ item: number;
3205
+ /** @enum {string} */
3206
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3207
+ /** Format: uuid */
3208
+ printerId: string;
3209
+ printerName: string;
3210
+ /**
3211
+ * @description The printer setting that an operator must correct.
3212
+ * @enum {string}
3213
+ */
3214
+ field: "printer_brand" | "model" | "nozzle_diameter";
3215
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3216
+ required: string | number;
3217
+ }[];
3218
+ };
3219
+ };
3220
+ };
3221
+ /** @description Default Response */
3222
+ 401: {
3223
+ headers: {
3224
+ [name: string]: unknown;
3225
+ };
3226
+ content: {
3227
+ "application/json": {
3228
+ error?: string;
3229
+ message?: string;
3230
+ requestId?: string;
3231
+ };
3232
+ };
3233
+ };
3234
+ /** @description Default Response */
3235
+ 403: {
3236
+ headers: {
3237
+ [name: string]: unknown;
3238
+ };
3239
+ content: {
3240
+ "application/json": {
3241
+ error?: string;
3242
+ message?: string;
3243
+ requestId?: string;
3244
+ };
3245
+ };
3246
+ };
3247
+ /** @description Default Response */
3248
+ 409: {
3249
+ headers: {
3250
+ [name: string]: unknown;
3251
+ };
3252
+ content: {
3253
+ "application/json": {
3254
+ /** @enum {string} */
3255
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3256
+ item?: number;
3257
+ limit?: {
3258
+ /** @enum {string} */
3259
+ name: "items";
3260
+ max: number;
3261
+ observed: number;
3262
+ };
3263
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3264
+ reasons?: {
3265
+ /** @description Index of the request item that names this printer. */
3266
+ item: number;
3267
+ /** @enum {string} */
3268
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3269
+ /** Format: uuid */
3270
+ printerId: string;
3271
+ printerName: string;
3272
+ /**
3273
+ * @description The printer setting that an operator must correct.
3274
+ * @enum {string}
3275
+ */
3276
+ field: "printer_brand" | "model" | "nozzle_diameter";
3277
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3278
+ required: string | number;
3279
+ }[];
3280
+ };
3281
+ };
3282
+ };
3283
+ /** @description Default Response */
3284
+ 422: {
3285
+ headers: {
3286
+ [name: string]: unknown;
3287
+ };
3288
+ content: {
3289
+ "application/json": {
3290
+ /** @enum {string} */
3291
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3292
+ item?: number;
3293
+ limit?: {
3294
+ /** @enum {string} */
3295
+ name: "items";
3296
+ max: number;
3297
+ observed: number;
3298
+ };
3299
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3300
+ reasons?: {
3301
+ /** @description Index of the request item that names this printer. */
3302
+ item: number;
3303
+ /** @enum {string} */
3304
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3305
+ /** Format: uuid */
3306
+ printerId: string;
3307
+ printerName: string;
3308
+ /**
3309
+ * @description The printer setting that an operator must correct.
3310
+ * @enum {string}
3311
+ */
3312
+ field: "printer_brand" | "model" | "nozzle_diameter";
3313
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3314
+ required: string | number;
3315
+ }[];
3316
+ };
3317
+ };
3318
+ };
3319
+ /** @description Default Response */
3320
+ 503: {
3321
+ headers: {
3322
+ [name: string]: unknown;
3323
+ };
3324
+ content: {
3325
+ "application/json": {
3326
+ /** @enum {string} */
3327
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3328
+ item?: number;
3329
+ limit?: {
3330
+ /** @enum {string} */
3331
+ name: "items";
3332
+ max: number;
3333
+ observed: number;
3334
+ };
3335
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3336
+ reasons?: {
3337
+ /** @description Index of the request item that names this printer. */
3338
+ item: number;
3339
+ /** @enum {string} */
3340
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3341
+ /** Format: uuid */
3342
+ printerId: string;
3343
+ printerName: string;
3344
+ /**
3345
+ * @description The printer setting that an operator must correct.
3346
+ * @enum {string}
3347
+ */
3348
+ field: "printer_brand" | "model" | "nozzle_diameter";
3349
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3350
+ required: string | number;
3351
+ }[];
3352
+ };
3353
+ };
3354
+ };
3355
+ };
3356
+ };
3357
+ delete?: never;
3358
+ options?: never;
3359
+ head?: never;
3360
+ patch?: never;
3361
+ trace?: never;
3362
+ };
3363
+ "/v1/partner-production/preparations/{preparationId}": {
3364
+ parameters: {
3365
+ query?: never;
3366
+ header?: never;
3367
+ path?: never;
3368
+ cookie?: never;
3369
+ };
3370
+ /** Poll a partner preparation request */
3371
+ get: {
3372
+ parameters: {
3373
+ query?: never;
3374
+ header?: never;
3375
+ path: {
3376
+ preparationId: string;
3377
+ };
3378
+ cookie?: never;
3379
+ };
3380
+ requestBody?: never;
3381
+ responses: {
3382
+ /** @description Default Response */
3383
+ 200: {
3384
+ headers: {
3385
+ [name: string]: unknown;
3386
+ };
3387
+ content: {
3388
+ "application/json": {
3389
+ /** Format: uuid */
3390
+ preparationId: string;
3391
+ /** @enum {string} */
3392
+ status: "waiting_for_source" | "preparing" | "held" | "ready" | "failed";
3393
+ /** Format: date-time */
3394
+ createdAt: string;
3395
+ holds: {
3396
+ item: number;
3397
+ plateNumber: number;
3398
+ hold: {
3399
+ /** @enum {string} */
3400
+ code: "inspection_review_required";
3401
+ reason: string;
3402
+ } | {
3403
+ /** @enum {string} */
3404
+ code: "unmapped_used_slot";
3405
+ slots: number[];
3406
+ } | {
3407
+ /** @enum {string} */
3408
+ code: "project_source_too_large";
3409
+ limit: {
3410
+ /** @enum {string} */
3411
+ name: "projectSourceBytes";
3412
+ max: number;
3413
+ observed: number;
3414
+ };
3415
+ } | {
3416
+ /** @enum {string} */
3417
+ code: "project_review_required";
3418
+ detail: string;
3419
+ } | {
3420
+ /** @enum {string} */
3421
+ code: "preview_mismatch_after_remap";
3422
+ detail: string;
3423
+ };
3424
+ }[];
3425
+ items: {
3426
+ index: number;
3427
+ /** @enum {string} */
3428
+ status: "waiting_for_source" | "preparing" | "held" | "ready" | "failed";
3429
+ source: {
3430
+ /** Format: uuid */
3431
+ sourceVersionId: string;
3432
+ externalId: string | null;
3433
+ /** @enum {string} */
3434
+ status: "queued" | "inspecting" | "ready" | "failed";
3435
+ };
3436
+ plates: "all" | number[];
3437
+ resolvedPlates: number[] | null;
3438
+ quantity: number;
3439
+ materialMappings: {
3440
+ sourceSlot: number;
3441
+ material: string;
3442
+ color: string;
3443
+ }[];
3444
+ guidance: {
3445
+ allowedMaterials: string[] | null;
3446
+ preferredFilaments: {
3447
+ sourceSlot?: number;
3448
+ material: string;
3449
+ color?: string;
3450
+ brand?: string;
3451
+ name?: string;
3452
+ }[] | null;
3453
+ };
3454
+ target: {
3455
+ /** Format: uuid */
3456
+ printerId: string;
3457
+ printerName: string;
3458
+ /** @enum {string} */
3459
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
3460
+ /** @enum {string} */
3461
+ printerModel: "P1S";
3462
+ /** @enum {number} */
3463
+ nozzleDiameterMm: 0.4;
3464
+ /** @enum {string} */
3465
+ nozzleFlow: "standard";
3466
+ /** @enum {string} */
3467
+ buildSurface: "textured_pei";
3468
+ profiles: {
3469
+ printer: {
3470
+ /** Format: uuid */
3471
+ catalogId: string;
3472
+ name: string;
3473
+ };
3474
+ process: {
3475
+ /** Format: uuid */
3476
+ catalogId: string;
3477
+ name: string;
3478
+ };
3479
+ filament: {
3480
+ /** Format: uuid */
3481
+ catalogId: string;
3482
+ name: string;
3483
+ };
3484
+ };
3485
+ };
3486
+ failure: {
3487
+ /** @enum {string} */
3488
+ code: "source_failed" | "plate_not_found" | "no_plates" | "mapping_slot_not_found" | "inspection_unreadable";
3489
+ sourceError?: {
3490
+ /** @enum {string} */
3491
+ code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
3492
+ message: string;
3493
+ limit?: {
3494
+ /** @enum {string} */
3495
+ name: "uploadBytes" | "concurrentUploads" | "concurrentUploadsPerOrganization" | "uploadIdleTimeoutMs" | "uploadTimeoutMs" | "entries" | "compressionRatio" | "modelPartExpandedBytes" | "expandedBytes" | "parserBytesPerDocument" | "parserBytesPerArchive" | "xmlDepth" | "xmlElementsPerDocument" | "objects" | "plates" | "materialSlots" | "inspectionTimeoutMs" | "inspectorHeapMb";
3496
+ max: number;
3497
+ observed?: number;
3498
+ };
3499
+ };
3500
+ plates?: number[];
3501
+ slots?: number[];
3502
+ } | null;
3503
+ preparedPlates: {
3504
+ /** Format: uuid */
3505
+ plateId: string;
3506
+ plateNumber: number;
3507
+ runs: number;
3508
+ /** @enum {string} */
3509
+ status: "preparing" | "held" | "ready" | "failed";
3510
+ usedSlots: number[];
3511
+ materialMappings: {
3512
+ sourceSlot: number;
3513
+ /** @enum {string} */
3514
+ material: "PETG";
3515
+ color: string;
3516
+ /** @enum {string} */
3517
+ origin: "partner" | "inspection" | "placeholder";
3518
+ }[];
3519
+ holds: ({
3520
+ /** @enum {string} */
3521
+ code: "inspection_review_required";
3522
+ reason: string;
3523
+ } | {
3524
+ /** @enum {string} */
3525
+ code: "unmapped_used_slot";
3526
+ slots: number[];
3527
+ } | {
3528
+ /** @enum {string} */
3529
+ code: "project_source_too_large";
3530
+ limit: {
3531
+ /** @enum {string} */
3532
+ name: "projectSourceBytes";
3533
+ max: number;
3534
+ observed: number;
3535
+ };
3536
+ } | {
3537
+ /** @enum {string} */
3538
+ code: "project_review_required";
3539
+ detail: string;
3540
+ } | {
3541
+ /** @enum {string} */
3542
+ code: "preview_mismatch_after_remap";
3543
+ detail: string;
3544
+ })[];
3545
+ failure: {
3546
+ /** @enum {string} */
3547
+ code: "slice_failed";
3548
+ sliceCode: string;
3549
+ message: string;
3550
+ retryable: boolean;
3551
+ attempts: number;
3552
+ } | null;
3553
+ output: {
3554
+ /** Format: uuid */
3555
+ outputFileId: string;
3556
+ filename: string;
3557
+ bytes: number;
3558
+ sha256: string;
3559
+ } | null;
3560
+ lineage: {
3561
+ /** Format: uuid */
3562
+ sourceVersionId: string;
3563
+ sourceSha256: string;
3564
+ plateNumber: number;
3565
+ /** @enum {string} */
3566
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
3567
+ /** @enum {string} */
3568
+ buildSurface: "textured_pei";
3569
+ materialMappings: {
3570
+ sourceSlot: number;
3571
+ /** @enum {string} */
3572
+ material: "PETG";
3573
+ color: string;
3574
+ }[];
3575
+ engineSha256: string;
3576
+ resolvedProfilesSha256: string;
3577
+ derivedInputSha256: string;
3578
+ qualifiedProfileSourceHashes: {
3579
+ [key: string]: string;
3580
+ };
3581
+ replacedSettings: {
3582
+ key: string;
3583
+ source: string | string[] | number | boolean;
3584
+ target?: string | string[] | number | boolean;
3585
+ }[];
3586
+ omittedSettings: string[];
3587
+ settingFilterPolicy: {
3588
+ hold: string[];
3589
+ omit: string[];
3590
+ };
3591
+ ignoredSettings: string[];
3592
+ warnings: {
3593
+ /** @enum {string} */
3594
+ code: "custom_instructions_kept" | "custom_instructions_replaced";
3595
+ keys: string[];
3596
+ }[];
3597
+ engineFallback: {
3598
+ authoringVersion: string | null;
3599
+ selectedVersion: string;
3600
+ } | null;
3601
+ /** @enum {string} */
3602
+ preview: "source" | "engine" | "none";
3603
+ previewFile: string | null;
3604
+ finalArtifactSha256: string;
3605
+ } | null;
3606
+ }[];
3607
+ }[];
3608
+ };
3609
+ };
3610
+ };
3611
+ /** @description Default Response */
3612
+ 401: {
3613
+ headers: {
3614
+ [name: string]: unknown;
3615
+ };
3616
+ content: {
3617
+ "application/json": {
3618
+ error?: string;
3619
+ message?: string;
3620
+ requestId?: string;
3621
+ };
3622
+ };
3623
+ };
3624
+ /** @description Default Response */
3625
+ 403: {
3626
+ headers: {
3627
+ [name: string]: unknown;
3628
+ };
3629
+ content: {
3630
+ "application/json": {
3631
+ error?: string;
3632
+ message?: string;
3633
+ requestId?: string;
3634
+ };
3635
+ };
3636
+ };
3637
+ /** @description Default Response */
3638
+ 404: {
3639
+ headers: {
3640
+ [name: string]: unknown;
3641
+ };
3642
+ content: {
3643
+ "application/json": {
3644
+ /** @enum {string} */
3645
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3646
+ item?: number;
3647
+ limit?: {
3648
+ /** @enum {string} */
3649
+ name: "items";
3650
+ max: number;
3651
+ observed: number;
3652
+ };
3653
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3654
+ reasons?: {
3655
+ /** @description Index of the request item that names this printer. */
3656
+ item: number;
3657
+ /** @enum {string} */
3658
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3659
+ /** Format: uuid */
3660
+ printerId: string;
3661
+ printerName: string;
3662
+ /**
3663
+ * @description The printer setting that an operator must correct.
3664
+ * @enum {string}
3665
+ */
3666
+ field: "printer_brand" | "model" | "nozzle_diameter";
3667
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3668
+ required: string | number;
3669
+ }[];
3670
+ };
3671
+ };
3672
+ };
3673
+ /** @description Default Response */
3674
+ 503: {
3675
+ headers: {
3676
+ [name: string]: unknown;
3677
+ };
3678
+ content: {
3679
+ "application/json": {
3680
+ /** @enum {string} */
3681
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3682
+ item?: number;
3683
+ limit?: {
3684
+ /** @enum {string} */
3685
+ name: "items";
3686
+ max: number;
3687
+ observed: number;
3688
+ };
3689
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3690
+ reasons?: {
3691
+ /** @description Index of the request item that names this printer. */
3692
+ item: number;
3693
+ /** @enum {string} */
3694
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3695
+ /** Format: uuid */
3696
+ printerId: string;
3697
+ printerName: string;
3698
+ /**
3699
+ * @description The printer setting that an operator must correct.
3700
+ * @enum {string}
3701
+ */
3702
+ field: "printer_brand" | "model" | "nozzle_diameter";
3703
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3704
+ required: string | number;
3705
+ }[];
3706
+ };
3707
+ };
3708
+ };
3709
+ };
3710
+ };
3711
+ put?: never;
3712
+ post?: never;
3713
+ delete?: never;
3714
+ options?: never;
3715
+ head?: never;
3716
+ patch?: never;
3717
+ trace?: never;
3718
+ };
3719
+ "/v1/partner-production/preparations/{preparationId}/plates/{plateId}/download": {
3720
+ parameters: {
3721
+ query?: never;
3722
+ header?: never;
3723
+ path?: never;
3724
+ cookie?: never;
3725
+ };
3726
+ /** Get a short-lived download URL for a prepared plate */
3727
+ get: {
3728
+ parameters: {
3729
+ query?: never;
3730
+ header?: never;
3731
+ path: {
3732
+ preparationId: string;
3733
+ plateId: string;
3734
+ };
3735
+ cookie?: never;
3736
+ };
3737
+ requestBody?: never;
3738
+ responses: {
3739
+ /** @description Default Response */
3740
+ 200: {
3741
+ headers: {
3742
+ [name: string]: unknown;
3743
+ };
3744
+ content: {
3745
+ "application/json": {
3746
+ /** Format: uri */
3747
+ url: string;
3748
+ /** Format: date-time */
3749
+ expiresAt: string;
3750
+ filename: string;
3751
+ bytes: number;
3752
+ sha256: string;
3753
+ };
3754
+ };
3755
+ };
3756
+ /** @description Default Response */
3757
+ 401: {
3758
+ headers: {
3759
+ [name: string]: unknown;
3760
+ };
3761
+ content: {
3762
+ "application/json": {
3763
+ error?: string;
3764
+ message?: string;
3765
+ requestId?: string;
3766
+ };
3767
+ };
3768
+ };
3769
+ /** @description Default Response */
3770
+ 403: {
3771
+ headers: {
3772
+ [name: string]: unknown;
3773
+ };
3774
+ content: {
3775
+ "application/json": {
3776
+ error?: string;
3777
+ message?: string;
3778
+ requestId?: string;
3779
+ };
3780
+ };
3781
+ };
3782
+ /** @description Default Response */
3783
+ 404: {
3784
+ headers: {
3785
+ [name: string]: unknown;
3786
+ };
3787
+ content: {
3788
+ "application/json": {
3789
+ /** @enum {string} */
3790
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3791
+ item?: number;
3792
+ limit?: {
3793
+ /** @enum {string} */
3794
+ name: "items";
3795
+ max: number;
3796
+ observed: number;
3797
+ };
3798
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3799
+ reasons?: {
3800
+ /** @description Index of the request item that names this printer. */
3801
+ item: number;
3802
+ /** @enum {string} */
3803
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3804
+ /** Format: uuid */
3805
+ printerId: string;
3806
+ printerName: string;
3807
+ /**
3808
+ * @description The printer setting that an operator must correct.
3809
+ * @enum {string}
3810
+ */
3811
+ field: "printer_brand" | "model" | "nozzle_diameter";
3812
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3813
+ required: string | number;
3814
+ }[];
3815
+ };
3816
+ };
3817
+ };
3818
+ /** @description Default Response */
3819
+ 409: {
3820
+ headers: {
3821
+ [name: string]: unknown;
3822
+ };
3823
+ content: {
3824
+ "application/json": {
3825
+ /** @enum {string} */
3826
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3827
+ item?: number;
3828
+ limit?: {
3829
+ /** @enum {string} */
3830
+ name: "items";
3831
+ max: number;
3832
+ observed: number;
3833
+ };
3834
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3835
+ reasons?: {
3836
+ /** @description Index of the request item that names this printer. */
3837
+ item: number;
3838
+ /** @enum {string} */
3839
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3840
+ /** Format: uuid */
3841
+ printerId: string;
3842
+ printerName: string;
3843
+ /**
3844
+ * @description The printer setting that an operator must correct.
3845
+ * @enum {string}
3846
+ */
3847
+ field: "printer_brand" | "model" | "nozzle_diameter";
3848
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3849
+ required: string | number;
3850
+ }[];
3851
+ };
3852
+ };
3853
+ };
3854
+ /** @description Default Response */
3855
+ 410: {
3856
+ headers: {
3857
+ [name: string]: unknown;
3858
+ };
3859
+ content: {
3860
+ "application/json": {
3861
+ /** @enum {string} */
3862
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3863
+ item?: number;
3864
+ limit?: {
3865
+ /** @enum {string} */
3866
+ name: "items";
3867
+ max: number;
3868
+ observed: number;
3869
+ };
3870
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3871
+ reasons?: {
3872
+ /** @description Index of the request item that names this printer. */
3873
+ item: number;
3874
+ /** @enum {string} */
3875
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3876
+ /** Format: uuid */
3877
+ printerId: string;
3878
+ printerName: string;
3879
+ /**
3880
+ * @description The printer setting that an operator must correct.
3881
+ * @enum {string}
3882
+ */
3883
+ field: "printer_brand" | "model" | "nozzle_diameter";
3884
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3885
+ required: string | number;
3886
+ }[];
3887
+ };
3888
+ };
3889
+ };
3890
+ /** @description Default Response */
3891
+ 503: {
3892
+ headers: {
3893
+ [name: string]: unknown;
3894
+ };
3895
+ content: {
3896
+ "application/json": {
3897
+ /** @enum {string} */
3898
+ error: "invalid_request" | "unauthorized" | "not_found" | "idempotency_conflict" | "output_not_ready" | "output_unavailable" | "request_too_large" | "source_not_found" | "target_not_found" | "target_not_qualified" | "material_not_qualified" | "preparation_disabled" | "preparation_unavailable";
3899
+ item?: number;
3900
+ limit?: {
3901
+ /** @enum {string} */
3902
+ name: "items";
3903
+ max: number;
3904
+ observed: number;
3905
+ };
3906
+ /** @description Present on target_not_qualified: one entry for each refused item. */
3907
+ reasons?: {
3908
+ /** @description Index of the request item that names this printer. */
3909
+ item: number;
3910
+ /** @enum {string} */
3911
+ code: "printer_brand_not_qualified" | "printer_model_not_qualified" | "nozzle_diameter_not_qualified" | "nozzle_diameter_unknown";
3912
+ /** Format: uuid */
3913
+ printerId: string;
3914
+ printerName: string;
3915
+ /**
3916
+ * @description The printer setting that an operator must correct.
3917
+ * @enum {string}
3918
+ */
3919
+ field: "printer_brand" | "model" | "nozzle_diameter";
3920
+ /** @description The value the qualification needs, such as 0.4 for nozzle_diameter. */
3921
+ required: string | number;
3922
+ }[];
3923
+ };
3924
+ };
3925
+ };
3926
+ };
3927
+ };
3928
+ put?: never;
3929
+ post?: never;
3930
+ delete?: never;
3931
+ options?: never;
3932
+ head?: never;
3933
+ patch?: never;
3934
+ trace?: never;
3935
+ };
3936
+ }
3937
+
3938
+ type CreateOperation = paths["/v1/print-jobs/create"]["post"];
3939
+ type CreatedPrintJob = CreateOperation["responses"][201]["content"]["application/json"];
3940
+ type FilamentWaitingReason = NonNullable<NonNullable<NonNullable<CreatedPrintJob["job"]>["print_options"]>["filament_waiting_reasons"]>[number];
3941
+ type JobReadResponse = paths["/v1/print-jobs/{id}"]["get"]["responses"][200]["content"]["application/json"];
3942
+ type JobFields = NonNullable<JobReadResponse["job"]>;
3943
+ type PrintJob = JobFields & Required<Pick<JobFields, "id" | "status">>;
3944
+ type PrintJobCreateRequest = paths["/v1/print-jobs/create-requests/{requestId}"]["get"]["responses"][200]["content"]["application/json"];
3945
+ type JsonPrintJobInput = CreateOperation["requestBody"]["content"]["application/json"] & {
3946
+ idempotencyKey?: string;
3947
+ };
3948
+ type UploadedPrintJobInput = Omit<CreateOperation["requestBody"]["content"]["multipart/form-data"], "file"> & {
3949
+ file: string | Uint8Array;
3950
+ filename: string;
3951
+ idempotencyKey?: string;
3952
+ };
3953
+ declare class PrintJobCreateStoppedError extends Error {
3954
+ readonly request: PrintJobCreateRequest;
3955
+ constructor(request: PrintJobCreateRequest);
3956
+ }
3957
+ declare class PrintJobs {
3958
+ private readonly transport;
3959
+ constructor(transport: Transport);
3960
+ get(id: number, signal?: AbortSignal): Promise<PrintJob>;
3961
+ create(input: UploadedPrintJobInput): Promise<PrintJobCreateRequest & {
3962
+ idempotencyKey: string;
3963
+ }>;
3964
+ create(input: JsonPrintJobInput): Promise<CreatedPrintJob & {
3965
+ idempotencyKey: string;
3966
+ }>;
3967
+ getCreateRequest(requestId: string, signal?: AbortSignal): Promise<PrintJobCreateRequest>;
3968
+ waitUntilCreated(requestId: string, options?: WaitOptions): Promise<{
3969
+ requestId: string;
3970
+ status: "preparing" | "held" | "created" | "failed" | "cancelled";
3971
+ externalId: string | null;
3972
+ createdAt: string;
3973
+ job: ({
3974
+ id: number;
3975
+ status: string;
3976
+ model_file_id: string | null;
3977
+ printer_id: string | null;
3978
+ print_options: ({
3979
+ filament_route_state?: "waiting" | "resolved";
3980
+ filament_waiting_reasons?: {
3981
+ code: "filament_not_loaded" | "material_route_changed";
3982
+ sourceSlot?: number;
3983
+ material?: string;
3984
+ color?: string;
3985
+ cause?: "slot_empty" | "missing_material" | "color_distance" | "slot_conflict";
3986
+ suggestedTargetSlot?: {
3987
+ ams_id: number;
3988
+ slot_id: number;
3989
+ };
3990
+ }[];
3991
+ } & {
3992
+ [key: string]: unknown;
3993
+ }) | null;
3994
+ } & {
3995
+ [key: string]: unknown;
3996
+ }) | null;
3997
+ requiredActions: {
3998
+ [key: string]: unknown;
3999
+ }[];
4000
+ error: {
4001
+ [key: string]: unknown;
4002
+ } | null;
4003
+ }>;
4004
+ }
4005
+
4006
+ type ApiLimit = {
4007
+ name: string;
4008
+ max: number;
4009
+ observed?: number;
4010
+ };
4011
+ type ApiErrorValue = null | string | number | boolean | ApiErrorValue[] | {
4012
+ [key: string]: ApiErrorValue;
4013
+ };
4014
+ type ApiErrorBody = {
4015
+ error: string;
4016
+ requestId?: string;
4017
+ limit?: ApiLimit;
4018
+ [key: string]: ApiErrorValue | undefined;
4019
+ };
4020
+ declare class PrintHiveApiError extends Error {
4021
+ readonly status: number;
4022
+ readonly code: string;
4023
+ readonly limit?: ApiLimit | undefined;
4024
+ readonly retryAfterMs?: number | undefined;
4025
+ readonly requestId?: string | undefined;
4026
+ readonly body?: ApiErrorBody | undefined;
4027
+ readonly name = "PrintHiveApiError";
4028
+ constructor(status: number, code: string, limit?: ApiLimit | undefined, retryAfterMs?: number | undefined, requestId?: string | undefined, body?: ApiErrorBody | undefined);
4029
+ get reasons(): readonly PartnerPreparationTargetReason[];
4030
+ }
4031
+ declare class PrintHiveNetworkError extends Error {
4032
+ readonly reason: "network" | "timeout" | "aborted";
4033
+ readonly name = "PrintHiveNetworkError";
4034
+ constructor(reason: "network" | "timeout" | "aborted");
4035
+ }
4036
+
4037
+ type PartnerSource = paths["/v1/partner-production/uploads/{sourceId}"]["get"]["responses"][200]["content"]["application/json"];
4038
+ type PartnerModel = paths["/v1/partner-production/models"]["get"]["responses"][200]["content"]["application/json"];
4039
+ type PartnerPreparation = paths["/v1/partner-production/preparations/{preparationId}"]["get"]["responses"][200]["content"]["application/json"];
4040
+ type PartnerPreparationCreateBody = paths["/v1/partner-production/preparations"]["post"]["requestBody"]["content"]["application/json"];
4041
+ type PartnerPreparationItemInput = PartnerPreparationCreateBody["items"][number];
4042
+ type PartnerMaterialMapping = NonNullable<PartnerPreparationItemInput["materialMappings"]>[number];
4043
+ type PartnerPreparedPlate = PartnerPreparation["items"][number]["preparedPlates"][number];
4044
+ type PartnerPreparationDownload = paths["/v1/partner-production/preparations/{preparationId}/plates/{plateId}/download"]["get"]["responses"][200]["content"]["application/json"];
4045
+ type PartnerPreparationErrorBody = paths["/v1/partner-production/preparations"]["post"]["responses"][422]["content"]["application/json"];
4046
+ type PartnerPreparationTargetReason = NonNullable<PartnerPreparationErrorBody["reasons"]>[number];
4047
+ type PreparationCreateOptions = PartnerPreparationCreateBody & {
4048
+ idempotencyKey?: string;
4049
+ signal?: AbortSignal;
4050
+ };
4051
+ type SettledPreparation = PartnerPreparation & {
4052
+ status: "ready" | "held" | "failed";
4053
+ };
4054
+ type UploadOptions = {
4055
+ filename: string;
4056
+ externalId?: string;
4057
+ modelId?: string;
4058
+ idempotencyKey?: string;
4059
+ } & ({
4060
+ file: string | Uint8Array;
4061
+ size?: never;
4062
+ } | {
4063
+ file: ReadableStream<Uint8Array>;
4064
+ size: number;
4065
+ });
4066
+ type WaitOptions = {
4067
+ intervalMs?: number;
4068
+ timeoutMs?: number;
4069
+ signal?: AbortSignal;
4070
+ };
4071
+ declare class PrintHive {
4072
+ readonly partnerSources: {
4073
+ get: (sourceId: string, signal?: AbortSignal) => Promise<{
4074
+ sourceVersionId: string;
4075
+ modelId: string;
4076
+ externalId: string | null;
4077
+ sha256: string;
4078
+ filename: string;
4079
+ bytes: number;
4080
+ createdAt: string;
4081
+ status: "queued";
4082
+ } | {
4083
+ sourceVersionId: string;
4084
+ modelId: string;
4085
+ externalId: string | null;
4086
+ sha256: string;
4087
+ filename: string;
4088
+ bytes: number;
4089
+ createdAt: string;
4090
+ status: "inspecting";
4091
+ } | {
4092
+ sourceVersionId: string;
4093
+ modelId: string;
4094
+ externalId: string | null;
4095
+ sha256: string;
4096
+ filename: string;
4097
+ bytes: number;
4098
+ createdAt: string;
4099
+ status: "ready";
4100
+ inspection: {
4101
+ version: 1;
4102
+ classification: "project" | "geometry_only" | "toolpath_only";
4103
+ hasEmbeddedGcode: boolean;
4104
+ plates: {
4105
+ number: number;
4106
+ objectIds: string[];
4107
+ }[];
4108
+ objects: {
4109
+ id: string;
4110
+ entry: string;
4111
+ objectId: number;
4112
+ name: string | null;
4113
+ kind: "mesh" | "assembly" | "support" | "other";
4114
+ materialSlots: number[];
4115
+ }[];
4116
+ materialSlots: {
4117
+ slot: number;
4118
+ material: string | null;
4119
+ color: string | null;
4120
+ profile: string | null;
4121
+ }[];
4122
+ materialUsage: "complete" | "requires_review";
4123
+ reviewReasons: ("custom_instructions" | "material_usage_unresolved" | "geometry_only" | "project_metadata_ambiguous")[];
4124
+ authoringEngine?: {
4125
+ status: "recognized";
4126
+ family: "bambu_studio" | "orca_slicer";
4127
+ release: string;
4128
+ releaseLine: string;
4129
+ major: number;
4130
+ evidence: ("application" | "projectSettingsVersion" | "sliceInfoClientVersion")[];
4131
+ } | {
4132
+ status: "unsupported_family";
4133
+ application: string;
4134
+ } | {
4135
+ status: "fork";
4136
+ application: string;
4137
+ release: string;
4138
+ } | {
4139
+ status: "disagreeing";
4140
+ values: {
4141
+ application?: string;
4142
+ projectSettingsVersion?: string;
4143
+ sliceInfoClientVersion?: string;
4144
+ };
4145
+ } | {
4146
+ status: "unparseable";
4147
+ values: {
4148
+ application?: string;
4149
+ projectSettingsVersion?: string;
4150
+ sliceInfoClientVersion?: string;
4151
+ };
4152
+ } | {
4153
+ status: "missing";
4154
+ };
4155
+ printerModel?: string;
4156
+ };
4157
+ } | {
4158
+ sourceVersionId: string;
4159
+ modelId: string;
4160
+ externalId: string | null;
4161
+ sha256: string;
1727
4162
  filename: string;
1728
4163
  bytes: number;
1729
4164
  createdAt: string;
@@ -1783,6 +4218,7 @@ declare class PrintHive {
1783
4218
  } | {
1784
4219
  status: "missing";
1785
4220
  };
4221
+ printerModel?: string;
1786
4222
  } | null;
1787
4223
  error: {
1788
4224
  code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
@@ -1887,6 +4323,7 @@ declare class PrintHive {
1887
4323
  } | {
1888
4324
  status: "missing";
1889
4325
  };
4326
+ printerModel?: string;
1890
4327
  };
1891
4328
  } | {
1892
4329
  sourceVersionId: string;
@@ -1952,6 +4389,7 @@ declare class PrintHive {
1952
4389
  } | {
1953
4390
  status: "missing";
1954
4391
  };
4392
+ printerModel?: string;
1955
4393
  } | null;
1956
4394
  error: {
1957
4395
  code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
@@ -1966,7 +4404,208 @@ declare class PrintHive {
1966
4404
  }>;
1967
4405
  listSourceFiles(modelId: string): AsyncGenerator<PartnerSource>;
1968
4406
  };
4407
+ readonly printers: {
4408
+ list: (input?: {
4409
+ limit?: number;
4410
+ cursor?: string;
4411
+ }) => Promise<unknown>;
4412
+ get: (id: string) => Promise<unknown>;
4413
+ };
4414
+ readonly printJobs: PrintJobs;
4415
+ readonly filamentCatalog: FilamentCatalog;
4416
+ readonly preparations: {
4417
+ get: (id: string, signal?: AbortSignal) => Promise<{
4418
+ preparationId: string;
4419
+ status: "waiting_for_source" | "preparing" | "held" | "ready" | "failed";
4420
+ createdAt: string;
4421
+ holds: {
4422
+ item: number;
4423
+ plateNumber: number;
4424
+ hold: {
4425
+ code: "inspection_review_required";
4426
+ reason: string;
4427
+ } | {
4428
+ code: "unmapped_used_slot";
4429
+ slots: number[];
4430
+ } | {
4431
+ code: "project_source_too_large";
4432
+ limit: {
4433
+ name: "projectSourceBytes";
4434
+ max: number;
4435
+ observed: number;
4436
+ };
4437
+ } | {
4438
+ code: "project_review_required";
4439
+ detail: string;
4440
+ } | {
4441
+ code: "preview_mismatch_after_remap";
4442
+ detail: string;
4443
+ };
4444
+ }[];
4445
+ items: {
4446
+ index: number;
4447
+ status: "waiting_for_source" | "preparing" | "held" | "ready" | "failed";
4448
+ source: {
4449
+ sourceVersionId: string;
4450
+ externalId: string | null;
4451
+ status: "queued" | "inspecting" | "ready" | "failed";
4452
+ };
4453
+ plates: "all" | number[];
4454
+ resolvedPlates: number[] | null;
4455
+ quantity: number;
4456
+ materialMappings: {
4457
+ sourceSlot: number;
4458
+ material: string;
4459
+ color: string;
4460
+ }[];
4461
+ guidance: {
4462
+ allowedMaterials: string[] | null;
4463
+ preferredFilaments: {
4464
+ sourceSlot?: number;
4465
+ material: string;
4466
+ color?: string;
4467
+ brand?: string;
4468
+ name?: string;
4469
+ }[] | null;
4470
+ };
4471
+ target: {
4472
+ printerId: string;
4473
+ printerName: string;
4474
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
4475
+ printerModel: "P1S";
4476
+ nozzleDiameterMm: 0.4;
4477
+ nozzleFlow: "standard";
4478
+ buildSurface: "textured_pei";
4479
+ profiles: {
4480
+ printer: {
4481
+ catalogId: string;
4482
+ name: string;
4483
+ };
4484
+ process: {
4485
+ catalogId: string;
4486
+ name: string;
4487
+ };
4488
+ filament: {
4489
+ catalogId: string;
4490
+ name: string;
4491
+ };
4492
+ };
4493
+ };
4494
+ failure: {
4495
+ code: "source_failed" | "plate_not_found" | "no_plates" | "mapping_slot_not_found" | "inspection_unreadable";
4496
+ sourceError?: {
4497
+ code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
4498
+ message: string;
4499
+ limit?: {
4500
+ name: "uploadBytes" | "concurrentUploads" | "concurrentUploadsPerOrganization" | "uploadIdleTimeoutMs" | "uploadTimeoutMs" | "entries" | "compressionRatio" | "modelPartExpandedBytes" | "expandedBytes" | "parserBytesPerDocument" | "parserBytesPerArchive" | "xmlDepth" | "xmlElementsPerDocument" | "objects" | "plates" | "materialSlots" | "inspectionTimeoutMs" | "inspectorHeapMb";
4501
+ max: number;
4502
+ observed?: number;
4503
+ };
4504
+ };
4505
+ plates?: number[];
4506
+ slots?: number[];
4507
+ } | null;
4508
+ preparedPlates: {
4509
+ plateId: string;
4510
+ plateNumber: number;
4511
+ runs: number;
4512
+ status: "preparing" | "held" | "ready" | "failed";
4513
+ usedSlots: number[];
4514
+ materialMappings: {
4515
+ sourceSlot: number;
4516
+ material: "PETG";
4517
+ color: string;
4518
+ origin: "partner" | "inspection" | "placeholder";
4519
+ }[];
4520
+ holds: ({
4521
+ code: "inspection_review_required";
4522
+ reason: string;
4523
+ } | {
4524
+ code: "unmapped_used_slot";
4525
+ slots: number[];
4526
+ } | {
4527
+ code: "project_source_too_large";
4528
+ limit: {
4529
+ name: "projectSourceBytes";
4530
+ max: number;
4531
+ observed: number;
4532
+ };
4533
+ } | {
4534
+ code: "project_review_required";
4535
+ detail: string;
4536
+ } | {
4537
+ code: "preview_mismatch_after_remap";
4538
+ detail: string;
4539
+ })[];
4540
+ failure: {
4541
+ code: "slice_failed";
4542
+ sliceCode: string;
4543
+ message: string;
4544
+ retryable: boolean;
4545
+ attempts: number;
4546
+ } | null;
4547
+ output: {
4548
+ outputFileId: string;
4549
+ filename: string;
4550
+ bytes: number;
4551
+ sha256: string;
4552
+ } | null;
4553
+ lineage: {
4554
+ sourceVersionId: string;
4555
+ sourceSha256: string;
4556
+ plateNumber: number;
4557
+ qualification: "bambu-p1s-0.4-standard-petg-v1";
4558
+ buildSurface: "textured_pei";
4559
+ materialMappings: {
4560
+ sourceSlot: number;
4561
+ material: "PETG";
4562
+ color: string;
4563
+ }[];
4564
+ engineSha256: string;
4565
+ resolvedProfilesSha256: string;
4566
+ derivedInputSha256: string;
4567
+ qualifiedProfileSourceHashes: {
4568
+ [key: string]: string;
4569
+ };
4570
+ replacedSettings: {
4571
+ key: string;
4572
+ source: string | string[] | number | boolean;
4573
+ target?: string | string[] | number | boolean;
4574
+ }[];
4575
+ omittedSettings: string[];
4576
+ settingFilterPolicy: {
4577
+ hold: string[];
4578
+ omit: string[];
4579
+ };
4580
+ ignoredSettings: string[];
4581
+ warnings: {
4582
+ code: "custom_instructions_kept" | "custom_instructions_replaced";
4583
+ keys: string[];
4584
+ }[];
4585
+ engineFallback: {
4586
+ authoringVersion: string | null;
4587
+ selectedVersion: string;
4588
+ } | null;
4589
+ preview: "source" | "engine" | "none";
4590
+ previewFile: string | null;
4591
+ finalArtifactSha256: string;
4592
+ } | null;
4593
+ }[];
4594
+ }[];
4595
+ }>;
4596
+ create(input: PreparationCreateOptions): Promise<PartnerPreparation & {
4597
+ idempotencyKey: string;
4598
+ }>;
4599
+ waitUntilSettled(id: string, options?: WaitOptions): Promise<SettledPreparation>;
4600
+ downloadInfo: (id: string, plateId: string, signal?: AbortSignal) => Promise<{
4601
+ url: string;
4602
+ expiresAt: string;
4603
+ filename: string;
4604
+ bytes: number;
4605
+ sha256: string;
4606
+ }>;
4607
+ };
1969
4608
  constructor(options: PrintHiveOptions);
1970
4609
  }
1971
4610
 
1972
- export { type ApiErrorBody, type ApiLimit, type PartnerModel, type PartnerSource, PrintHive, PrintHiveApiError, PrintHiveNetworkError, type PrintHiveOptions, type UploadOptions, type WaitOptions, type paths };
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 };