@printhive/api 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +60 -6
- package/dist/{chunk-TGPYH7CV.js → chunk-7UULMDS5.js} +4199 -2437
- package/dist/{errors-LHFABGGG.js → errors-TJFN2M7S.js} +1 -1
- package/dist/index.cjs +4323 -2433
- package/dist/index.d.cts +757 -1
- package/dist/index.d.ts +757 -1
- package/dist/index.js +142 -11
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,148 @@
|
|
|
1
1
|
interface paths {
|
|
2
|
+
"/v1/printers": {
|
|
3
|
+
parameters: {
|
|
4
|
+
query?: never;
|
|
5
|
+
header?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
cookie?: never;
|
|
8
|
+
};
|
|
9
|
+
/** List organization printers and loaded filament */
|
|
10
|
+
get: {
|
|
11
|
+
parameters: {
|
|
12
|
+
query?: {
|
|
13
|
+
limit?: number;
|
|
14
|
+
cursor?: string;
|
|
15
|
+
};
|
|
16
|
+
header?: never;
|
|
17
|
+
path?: never;
|
|
18
|
+
cookie?: never;
|
|
19
|
+
};
|
|
20
|
+
requestBody?: never;
|
|
21
|
+
responses: {
|
|
22
|
+
/** @description Default Response */
|
|
23
|
+
200: {
|
|
24
|
+
headers: {
|
|
25
|
+
[name: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
content: {
|
|
28
|
+
"application/json": {
|
|
29
|
+
printers: {
|
|
30
|
+
/** Format: uuid */
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
make: string;
|
|
34
|
+
model: string;
|
|
35
|
+
modelId: null | string;
|
|
36
|
+
family: string;
|
|
37
|
+
nozzleDiameter: null | number;
|
|
38
|
+
buildPlate: null | string;
|
|
39
|
+
connected: null | boolean;
|
|
40
|
+
readyMarked: boolean;
|
|
41
|
+
readiness: {
|
|
42
|
+
ready: boolean;
|
|
43
|
+
bedClear: null | boolean;
|
|
44
|
+
};
|
|
45
|
+
maintenance: boolean;
|
|
46
|
+
/** @enum {string} */
|
|
47
|
+
state: "idle" | "printing" | "paused" | "offline" | "maintenance" | "ready-marked" | "unknown";
|
|
48
|
+
loadedFilament: {
|
|
49
|
+
slot: string;
|
|
50
|
+
position: number;
|
|
51
|
+
address: {
|
|
52
|
+
ams_id: number;
|
|
53
|
+
slot_id: number;
|
|
54
|
+
};
|
|
55
|
+
/** @enum {string} */
|
|
56
|
+
state: "loaded" | "empty" | "unknown";
|
|
57
|
+
material: null | string;
|
|
58
|
+
color: null | string;
|
|
59
|
+
colorHex: null | string;
|
|
60
|
+
}[];
|
|
61
|
+
}[];
|
|
62
|
+
nextCursor: string | null;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
put?: never;
|
|
69
|
+
post?: never;
|
|
70
|
+
delete?: never;
|
|
71
|
+
options?: never;
|
|
72
|
+
head?: never;
|
|
73
|
+
patch?: never;
|
|
74
|
+
trace?: never;
|
|
75
|
+
};
|
|
76
|
+
"/v1/printers/{id}": {
|
|
77
|
+
parameters: {
|
|
78
|
+
query?: never;
|
|
79
|
+
header?: never;
|
|
80
|
+
path?: never;
|
|
81
|
+
cookie?: never;
|
|
82
|
+
};
|
|
83
|
+
/** Read an organization printer and loaded filament */
|
|
84
|
+
get: {
|
|
85
|
+
parameters: {
|
|
86
|
+
query?: never;
|
|
87
|
+
header?: never;
|
|
88
|
+
path: {
|
|
89
|
+
id: string;
|
|
90
|
+
};
|
|
91
|
+
cookie?: never;
|
|
92
|
+
};
|
|
93
|
+
requestBody?: never;
|
|
94
|
+
responses: {
|
|
95
|
+
/** @description Default Response */
|
|
96
|
+
200: {
|
|
97
|
+
headers: {
|
|
98
|
+
[name: string]: unknown;
|
|
99
|
+
};
|
|
100
|
+
content: {
|
|
101
|
+
"application/json": {
|
|
102
|
+
/** Format: uuid */
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
make: string;
|
|
106
|
+
model: string;
|
|
107
|
+
modelId: null | string;
|
|
108
|
+
family: string;
|
|
109
|
+
nozzleDiameter: null | number;
|
|
110
|
+
buildPlate: null | string;
|
|
111
|
+
connected: null | boolean;
|
|
112
|
+
readyMarked: boolean;
|
|
113
|
+
readiness: {
|
|
114
|
+
ready: boolean;
|
|
115
|
+
bedClear: null | boolean;
|
|
116
|
+
};
|
|
117
|
+
maintenance: boolean;
|
|
118
|
+
/** @enum {string} */
|
|
119
|
+
state: "idle" | "printing" | "paused" | "offline" | "maintenance" | "ready-marked" | "unknown";
|
|
120
|
+
loadedFilament: {
|
|
121
|
+
slot: string;
|
|
122
|
+
position: number;
|
|
123
|
+
address: {
|
|
124
|
+
ams_id: number;
|
|
125
|
+
slot_id: number;
|
|
126
|
+
};
|
|
127
|
+
/** @enum {string} */
|
|
128
|
+
state: "loaded" | "empty" | "unknown";
|
|
129
|
+
material: null | string;
|
|
130
|
+
color: null | string;
|
|
131
|
+
colorHex: null | string;
|
|
132
|
+
}[];
|
|
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
|
+
};
|
|
2
146
|
"/v1/partner-production/uploads": {
|
|
3
147
|
parameters: {
|
|
4
148
|
query?: never;
|
|
@@ -138,6 +282,7 @@ interface paths {
|
|
|
138
282
|
/** @enum {string} */
|
|
139
283
|
status: "missing";
|
|
140
284
|
};
|
|
285
|
+
printerModel?: string;
|
|
141
286
|
};
|
|
142
287
|
} | {
|
|
143
288
|
/** Format: uuid */
|
|
@@ -218,6 +363,7 @@ interface paths {
|
|
|
218
363
|
/** @enum {string} */
|
|
219
364
|
status: "missing";
|
|
220
365
|
};
|
|
366
|
+
printerModel?: string;
|
|
221
367
|
} | null;
|
|
222
368
|
error: {
|
|
223
369
|
/** @enum {string} */
|
|
@@ -344,6 +490,7 @@ interface paths {
|
|
|
344
490
|
/** @enum {string} */
|
|
345
491
|
status: "missing";
|
|
346
492
|
};
|
|
493
|
+
printerModel?: string;
|
|
347
494
|
};
|
|
348
495
|
} | {
|
|
349
496
|
/** Format: uuid */
|
|
@@ -424,6 +571,7 @@ interface paths {
|
|
|
424
571
|
/** @enum {string} */
|
|
425
572
|
status: "missing";
|
|
426
573
|
};
|
|
574
|
+
printerModel?: string;
|
|
427
575
|
} | null;
|
|
428
576
|
error: {
|
|
429
577
|
/** @enum {string} */
|
|
@@ -767,6 +915,7 @@ interface paths {
|
|
|
767
915
|
/** @enum {string} */
|
|
768
916
|
status: "missing";
|
|
769
917
|
};
|
|
918
|
+
printerModel?: string;
|
|
770
919
|
};
|
|
771
920
|
} | {
|
|
772
921
|
/** Format: uuid */
|
|
@@ -847,6 +996,7 @@ interface paths {
|
|
|
847
996
|
/** @enum {string} */
|
|
848
997
|
status: "missing";
|
|
849
998
|
};
|
|
999
|
+
printerModel?: string;
|
|
850
1000
|
} | null;
|
|
851
1001
|
error: {
|
|
852
1002
|
/** @enum {string} */
|
|
@@ -1068,6 +1218,7 @@ interface paths {
|
|
|
1068
1218
|
/** @enum {string} */
|
|
1069
1219
|
status: "missing";
|
|
1070
1220
|
};
|
|
1221
|
+
printerModel?: string;
|
|
1071
1222
|
};
|
|
1072
1223
|
} | {
|
|
1073
1224
|
/** Format: uuid */
|
|
@@ -1148,6 +1299,7 @@ interface paths {
|
|
|
1148
1299
|
/** @enum {string} */
|
|
1149
1300
|
status: "missing";
|
|
1150
1301
|
};
|
|
1302
|
+
printerModel?: string;
|
|
1151
1303
|
} | null;
|
|
1152
1304
|
error: {
|
|
1153
1305
|
/** @enum {string} */
|
|
@@ -1388,6 +1540,7 @@ interface paths {
|
|
|
1388
1540
|
/** @enum {string} */
|
|
1389
1541
|
status: "missing";
|
|
1390
1542
|
};
|
|
1543
|
+
printerModel?: string;
|
|
1391
1544
|
};
|
|
1392
1545
|
} | {
|
|
1393
1546
|
/** Format: uuid */
|
|
@@ -1468,6 +1621,7 @@ interface paths {
|
|
|
1468
1621
|
/** @enum {string} */
|
|
1469
1622
|
status: "missing";
|
|
1470
1623
|
};
|
|
1624
|
+
printerModel?: string;
|
|
1471
1625
|
} | null;
|
|
1472
1626
|
error: {
|
|
1473
1627
|
/** @enum {string} */
|
|
@@ -1575,6 +1729,526 @@ interface paths {
|
|
|
1575
1729
|
patch?: never;
|
|
1576
1730
|
trace?: never;
|
|
1577
1731
|
};
|
|
1732
|
+
"/v1/print-jobs/create": {
|
|
1733
|
+
parameters: {
|
|
1734
|
+
query?: never;
|
|
1735
|
+
header?: never;
|
|
1736
|
+
path?: never;
|
|
1737
|
+
cookie?: never;
|
|
1738
|
+
};
|
|
1739
|
+
get?: never;
|
|
1740
|
+
put?: never;
|
|
1741
|
+
/** Create one print job for one plate */
|
|
1742
|
+
post: {
|
|
1743
|
+
parameters: {
|
|
1744
|
+
query?: never;
|
|
1745
|
+
header?: {
|
|
1746
|
+
"idempotency-key"?: string;
|
|
1747
|
+
};
|
|
1748
|
+
path?: never;
|
|
1749
|
+
cookie?: never;
|
|
1750
|
+
};
|
|
1751
|
+
requestBody: {
|
|
1752
|
+
content: {
|
|
1753
|
+
"application/json": {
|
|
1754
|
+
name: string;
|
|
1755
|
+
externalId?: string;
|
|
1756
|
+
model_file_id: string;
|
|
1757
|
+
organization_id?: string;
|
|
1758
|
+
/** @description Organization ID (optional, defaults to user's primary organization) */
|
|
1759
|
+
organizationId?: string;
|
|
1760
|
+
/** Format: uuid */
|
|
1761
|
+
printer_id?: string | null;
|
|
1762
|
+
/** @description One-based plate number in the project archive */
|
|
1763
|
+
plate?: number;
|
|
1764
|
+
/** @description Complete filament requirements for the selected plate. Cannot be combined with raw AMS mappings. Matched using Smart Queue material and color proximity rules. */
|
|
1765
|
+
filaments?: {
|
|
1766
|
+
/** @description Zero-based project filament index */
|
|
1767
|
+
sourceSlot: number;
|
|
1768
|
+
material: string;
|
|
1769
|
+
color: string;
|
|
1770
|
+
targetSlot?: {
|
|
1771
|
+
ams_id: number;
|
|
1772
|
+
slot_id: number;
|
|
1773
|
+
};
|
|
1774
|
+
}[];
|
|
1775
|
+
/**
|
|
1776
|
+
* @description Create assigned jobs waiting for filament, or reject mismatches with 422
|
|
1777
|
+
* @default wait
|
|
1778
|
+
* @enum {string}
|
|
1779
|
+
*/
|
|
1780
|
+
on_filament_mismatch?: "wait" | "reject";
|
|
1781
|
+
/** Format: uuid */
|
|
1782
|
+
task_id?: string | null;
|
|
1783
|
+
/** @description Optional make ID to derive required materials */
|
|
1784
|
+
make_id?: string;
|
|
1785
|
+
print_options?: {
|
|
1786
|
+
enable_ams?: boolean;
|
|
1787
|
+
enable_bed_leveling?: boolean;
|
|
1788
|
+
start_immediately?: boolean;
|
|
1789
|
+
/** @description Deprecated compatibility alias for start_immediately */
|
|
1790
|
+
set_printer_ready?: boolean;
|
|
1791
|
+
auto_assign?: boolean;
|
|
1792
|
+
constraints?: Record<string, never>;
|
|
1793
|
+
} & {
|
|
1794
|
+
[key: string]: unknown;
|
|
1795
|
+
};
|
|
1796
|
+
};
|
|
1797
|
+
"multipart/form-data": {
|
|
1798
|
+
/** Format: binary */
|
|
1799
|
+
file: string;
|
|
1800
|
+
name?: string;
|
|
1801
|
+
/** @description One-based plate number in the project archive */
|
|
1802
|
+
plate: number;
|
|
1803
|
+
/** @description Complete filament requirements for the selected plate. Cannot be combined with raw AMS mappings. Matched using Smart Queue material and color proximity rules. */
|
|
1804
|
+
filaments: {
|
|
1805
|
+
/** @description Zero-based project filament index */
|
|
1806
|
+
sourceSlot: number;
|
|
1807
|
+
material: string;
|
|
1808
|
+
color: string;
|
|
1809
|
+
targetSlot?: {
|
|
1810
|
+
ams_id: number;
|
|
1811
|
+
slot_id: number;
|
|
1812
|
+
};
|
|
1813
|
+
}[];
|
|
1814
|
+
/** Format: uuid */
|
|
1815
|
+
printer_id?: string;
|
|
1816
|
+
/**
|
|
1817
|
+
* @description Create assigned jobs waiting for filament, or reject mismatches with 422
|
|
1818
|
+
* @default wait
|
|
1819
|
+
* @enum {string}
|
|
1820
|
+
*/
|
|
1821
|
+
on_filament_mismatch?: "wait" | "reject";
|
|
1822
|
+
externalId?: string;
|
|
1823
|
+
/**
|
|
1824
|
+
* @default automatic
|
|
1825
|
+
* @enum {string}
|
|
1826
|
+
*/
|
|
1827
|
+
release?: "automatic" | "manual";
|
|
1828
|
+
print_options?: {
|
|
1829
|
+
[key: string]: unknown;
|
|
1830
|
+
};
|
|
1831
|
+
};
|
|
1832
|
+
};
|
|
1833
|
+
};
|
|
1834
|
+
responses: {
|
|
1835
|
+
/** @description Default Response */
|
|
1836
|
+
201: {
|
|
1837
|
+
headers: {
|
|
1838
|
+
[name: string]: unknown;
|
|
1839
|
+
};
|
|
1840
|
+
content: {
|
|
1841
|
+
"application/json": {
|
|
1842
|
+
job?: {
|
|
1843
|
+
id: number;
|
|
1844
|
+
name?: string;
|
|
1845
|
+
status?: string;
|
|
1846
|
+
model_file_id?: string | null;
|
|
1847
|
+
printer_id?: string | null;
|
|
1848
|
+
organization_id?: string;
|
|
1849
|
+
print_options?: {
|
|
1850
|
+
[key: string]: unknown;
|
|
1851
|
+
} | null;
|
|
1852
|
+
} & {
|
|
1853
|
+
[key: string]: unknown;
|
|
1854
|
+
};
|
|
1855
|
+
/** @description Detailed match results for fully eligible printers */
|
|
1856
|
+
eligiblePrinters?: {
|
|
1857
|
+
printerId?: string;
|
|
1858
|
+
match?: {
|
|
1859
|
+
score?: number;
|
|
1860
|
+
reasons?: string[];
|
|
1861
|
+
matched_at?: string;
|
|
1862
|
+
printer_id?: string;
|
|
1863
|
+
};
|
|
1864
|
+
}[];
|
|
1865
|
+
/** @description Detailed match results for partially eligible printers including missing materials */
|
|
1866
|
+
partiallyEligiblePrinters?: {
|
|
1867
|
+
printerId?: string;
|
|
1868
|
+
match?: {
|
|
1869
|
+
score?: number;
|
|
1870
|
+
reasons?: string[];
|
|
1871
|
+
matched_at?: string;
|
|
1872
|
+
printer_id?: string;
|
|
1873
|
+
missing?: {
|
|
1874
|
+
index?: number;
|
|
1875
|
+
type?: string;
|
|
1876
|
+
color?: string;
|
|
1877
|
+
explicitMaterialId?: string;
|
|
1878
|
+
}[];
|
|
1879
|
+
};
|
|
1880
|
+
}[];
|
|
1881
|
+
};
|
|
1882
|
+
};
|
|
1883
|
+
};
|
|
1884
|
+
/** @description Default Response */
|
|
1885
|
+
202: {
|
|
1886
|
+
headers: {
|
|
1887
|
+
[name: string]: unknown;
|
|
1888
|
+
};
|
|
1889
|
+
content: {
|
|
1890
|
+
"application/json": {
|
|
1891
|
+
/** Format: uuid */
|
|
1892
|
+
requestId: string;
|
|
1893
|
+
/** @enum {string} */
|
|
1894
|
+
status: "preparing" | "held" | "created" | "failed" | "cancelled";
|
|
1895
|
+
externalId: string | null;
|
|
1896
|
+
createdAt: string;
|
|
1897
|
+
job: ({
|
|
1898
|
+
id: number;
|
|
1899
|
+
status: string;
|
|
1900
|
+
/** Format: uuid */
|
|
1901
|
+
model_file_id: string | null;
|
|
1902
|
+
/** Format: uuid */
|
|
1903
|
+
printer_id: string | null;
|
|
1904
|
+
print_options: {
|
|
1905
|
+
[key: string]: unknown;
|
|
1906
|
+
} | null;
|
|
1907
|
+
} & {
|
|
1908
|
+
[key: string]: unknown;
|
|
1909
|
+
}) | null;
|
|
1910
|
+
requiredActions: {
|
|
1911
|
+
[key: string]: unknown;
|
|
1912
|
+
}[];
|
|
1913
|
+
error: {
|
|
1914
|
+
[key: string]: unknown;
|
|
1915
|
+
} | null;
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
};
|
|
1919
|
+
/** @description Default Response */
|
|
1920
|
+
400: {
|
|
1921
|
+
headers: {
|
|
1922
|
+
[name: string]: unknown;
|
|
1923
|
+
};
|
|
1924
|
+
content: {
|
|
1925
|
+
"application/json": {
|
|
1926
|
+
error?: string;
|
|
1927
|
+
message?: string;
|
|
1928
|
+
};
|
|
1929
|
+
};
|
|
1930
|
+
};
|
|
1931
|
+
/** @description Default Response */
|
|
1932
|
+
409: {
|
|
1933
|
+
headers: {
|
|
1934
|
+
[name: string]: unknown;
|
|
1935
|
+
};
|
|
1936
|
+
content: {
|
|
1937
|
+
"application/json": {
|
|
1938
|
+
error?: string;
|
|
1939
|
+
message?: string;
|
|
1940
|
+
reason?: string;
|
|
1941
|
+
retry_count?: number;
|
|
1942
|
+
max_retries?: number;
|
|
1943
|
+
next_eligible_at?: string | null;
|
|
1944
|
+
};
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1947
|
+
/** @description Default Response */
|
|
1948
|
+
422: {
|
|
1949
|
+
headers: {
|
|
1950
|
+
[name: string]: unknown;
|
|
1951
|
+
};
|
|
1952
|
+
content: {
|
|
1953
|
+
"application/json": {
|
|
1954
|
+
/** @enum {string} */
|
|
1955
|
+
error?: "filament_requirements_unsatisfied" | "printer_model_incompatible" | "hardware:nozzle_diameter_mismatch" | "target_slot_unavailable" | "insufficient_filament_routes";
|
|
1956
|
+
message?: string;
|
|
1957
|
+
filaments?: {
|
|
1958
|
+
sourceSlot?: number;
|
|
1959
|
+
/** @enum {string} */
|
|
1960
|
+
reason?: "missing_material" | "color_distance" | "slot_empty" | "slot_conflict";
|
|
1961
|
+
}[];
|
|
1962
|
+
};
|
|
1963
|
+
};
|
|
1964
|
+
};
|
|
1965
|
+
/** @description Default Response */
|
|
1966
|
+
500: {
|
|
1967
|
+
headers: {
|
|
1968
|
+
[name: string]: unknown;
|
|
1969
|
+
};
|
|
1970
|
+
content: {
|
|
1971
|
+
"application/json": {
|
|
1972
|
+
error?: string;
|
|
1973
|
+
message?: string;
|
|
1974
|
+
};
|
|
1975
|
+
};
|
|
1976
|
+
};
|
|
1977
|
+
};
|
|
1978
|
+
};
|
|
1979
|
+
delete?: never;
|
|
1980
|
+
options?: never;
|
|
1981
|
+
head?: never;
|
|
1982
|
+
patch?: never;
|
|
1983
|
+
trace?: never;
|
|
1984
|
+
};
|
|
1985
|
+
"/v1/print-jobs/create-requests/{requestId}": {
|
|
1986
|
+
parameters: {
|
|
1987
|
+
query?: never;
|
|
1988
|
+
header?: never;
|
|
1989
|
+
path?: never;
|
|
1990
|
+
cookie?: never;
|
|
1991
|
+
};
|
|
1992
|
+
/** Poll one asynchronous single-plate creation request */
|
|
1993
|
+
get: {
|
|
1994
|
+
parameters: {
|
|
1995
|
+
query?: never;
|
|
1996
|
+
header?: never;
|
|
1997
|
+
path: {
|
|
1998
|
+
requestId: string;
|
|
1999
|
+
};
|
|
2000
|
+
cookie?: never;
|
|
2001
|
+
};
|
|
2002
|
+
requestBody?: never;
|
|
2003
|
+
responses: {
|
|
2004
|
+
/** @description Default Response */
|
|
2005
|
+
200: {
|
|
2006
|
+
headers: {
|
|
2007
|
+
[name: string]: unknown;
|
|
2008
|
+
};
|
|
2009
|
+
content: {
|
|
2010
|
+
"application/json": {
|
|
2011
|
+
/** Format: uuid */
|
|
2012
|
+
requestId: string;
|
|
2013
|
+
/** @enum {string} */
|
|
2014
|
+
status: "preparing" | "held" | "created" | "failed" | "cancelled";
|
|
2015
|
+
externalId: string | null;
|
|
2016
|
+
createdAt: string;
|
|
2017
|
+
job: ({
|
|
2018
|
+
id: number;
|
|
2019
|
+
status: string;
|
|
2020
|
+
/** Format: uuid */
|
|
2021
|
+
model_file_id: string | null;
|
|
2022
|
+
/** Format: uuid */
|
|
2023
|
+
printer_id: string | null;
|
|
2024
|
+
print_options: {
|
|
2025
|
+
[key: string]: unknown;
|
|
2026
|
+
} | null;
|
|
2027
|
+
} & {
|
|
2028
|
+
[key: string]: unknown;
|
|
2029
|
+
}) | null;
|
|
2030
|
+
requiredActions: {
|
|
2031
|
+
[key: string]: unknown;
|
|
2032
|
+
}[];
|
|
2033
|
+
error: {
|
|
2034
|
+
[key: string]: unknown;
|
|
2035
|
+
} | null;
|
|
2036
|
+
};
|
|
2037
|
+
};
|
|
2038
|
+
};
|
|
2039
|
+
/** @description Default Response */
|
|
2040
|
+
404: {
|
|
2041
|
+
headers: {
|
|
2042
|
+
[name: string]: unknown;
|
|
2043
|
+
};
|
|
2044
|
+
content: {
|
|
2045
|
+
"application/json": {
|
|
2046
|
+
error?: string;
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
};
|
|
2051
|
+
};
|
|
2052
|
+
put?: never;
|
|
2053
|
+
post?: never;
|
|
2054
|
+
delete?: never;
|
|
2055
|
+
options?: never;
|
|
2056
|
+
head?: never;
|
|
2057
|
+
patch?: never;
|
|
2058
|
+
trace?: never;
|
|
2059
|
+
};
|
|
2060
|
+
"/v1/print-jobs/create-requests/{requestId}/release": {
|
|
2061
|
+
parameters: {
|
|
2062
|
+
query?: never;
|
|
2063
|
+
header?: never;
|
|
2064
|
+
path?: never;
|
|
2065
|
+
cookie?: never;
|
|
2066
|
+
};
|
|
2067
|
+
get?: never;
|
|
2068
|
+
put?: never;
|
|
2069
|
+
/** Authorize admission of a manually held creation request */
|
|
2070
|
+
post: {
|
|
2071
|
+
parameters: {
|
|
2072
|
+
query?: never;
|
|
2073
|
+
header?: never;
|
|
2074
|
+
path: {
|
|
2075
|
+
requestId: string;
|
|
2076
|
+
};
|
|
2077
|
+
cookie?: never;
|
|
2078
|
+
};
|
|
2079
|
+
requestBody?: never;
|
|
2080
|
+
responses: {
|
|
2081
|
+
/** @description Default Response */
|
|
2082
|
+
202: {
|
|
2083
|
+
headers: {
|
|
2084
|
+
[name: string]: unknown;
|
|
2085
|
+
};
|
|
2086
|
+
content: {
|
|
2087
|
+
"application/json": {
|
|
2088
|
+
authorized: boolean;
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2091
|
+
};
|
|
2092
|
+
/** @description Authentication required */
|
|
2093
|
+
401: {
|
|
2094
|
+
headers: {
|
|
2095
|
+
[name: string]: unknown;
|
|
2096
|
+
};
|
|
2097
|
+
content: {
|
|
2098
|
+
"application/json": {
|
|
2099
|
+
error?: string;
|
|
2100
|
+
message?: string;
|
|
2101
|
+
requestId?: string;
|
|
2102
|
+
code?: string;
|
|
2103
|
+
statusCode?: number;
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
};
|
|
2107
|
+
/** @description API key requires control scope */
|
|
2108
|
+
403: {
|
|
2109
|
+
headers: {
|
|
2110
|
+
[name: string]: unknown;
|
|
2111
|
+
};
|
|
2112
|
+
content: {
|
|
2113
|
+
"application/json": {
|
|
2114
|
+
error?: string;
|
|
2115
|
+
message?: string;
|
|
2116
|
+
requestId?: string;
|
|
2117
|
+
code?: string;
|
|
2118
|
+
statusCode?: number;
|
|
2119
|
+
};
|
|
2120
|
+
};
|
|
2121
|
+
};
|
|
2122
|
+
/** @description Creation request not found */
|
|
2123
|
+
404: {
|
|
2124
|
+
headers: {
|
|
2125
|
+
[name: string]: unknown;
|
|
2126
|
+
};
|
|
2127
|
+
content: {
|
|
2128
|
+
"application/json": {
|
|
2129
|
+
error?: string;
|
|
2130
|
+
message?: string;
|
|
2131
|
+
requestId?: string;
|
|
2132
|
+
};
|
|
2133
|
+
};
|
|
2134
|
+
};
|
|
2135
|
+
/** @description Creation request no longer supports this action */
|
|
2136
|
+
409: {
|
|
2137
|
+
headers: {
|
|
2138
|
+
[name: string]: unknown;
|
|
2139
|
+
};
|
|
2140
|
+
content: {
|
|
2141
|
+
"application/json": {
|
|
2142
|
+
error?: string;
|
|
2143
|
+
message?: string;
|
|
2144
|
+
requestId?: string;
|
|
2145
|
+
};
|
|
2146
|
+
};
|
|
2147
|
+
};
|
|
2148
|
+
};
|
|
2149
|
+
};
|
|
2150
|
+
delete?: never;
|
|
2151
|
+
options?: never;
|
|
2152
|
+
head?: never;
|
|
2153
|
+
patch?: never;
|
|
2154
|
+
trace?: never;
|
|
2155
|
+
};
|
|
2156
|
+
"/v1/print-jobs/create-requests/{requestId}/cancel": {
|
|
2157
|
+
parameters: {
|
|
2158
|
+
query?: never;
|
|
2159
|
+
header?: never;
|
|
2160
|
+
path?: never;
|
|
2161
|
+
cookie?: never;
|
|
2162
|
+
};
|
|
2163
|
+
get?: never;
|
|
2164
|
+
put?: never;
|
|
2165
|
+
/** Cancel a creation request before job admission */
|
|
2166
|
+
post: {
|
|
2167
|
+
parameters: {
|
|
2168
|
+
query?: never;
|
|
2169
|
+
header?: never;
|
|
2170
|
+
path: {
|
|
2171
|
+
requestId: string;
|
|
2172
|
+
};
|
|
2173
|
+
cookie?: never;
|
|
2174
|
+
};
|
|
2175
|
+
requestBody?: never;
|
|
2176
|
+
responses: {
|
|
2177
|
+
/** @description Default Response */
|
|
2178
|
+
202: {
|
|
2179
|
+
headers: {
|
|
2180
|
+
[name: string]: unknown;
|
|
2181
|
+
};
|
|
2182
|
+
content: {
|
|
2183
|
+
"application/json": {
|
|
2184
|
+
cancelled: boolean;
|
|
2185
|
+
};
|
|
2186
|
+
};
|
|
2187
|
+
};
|
|
2188
|
+
/** @description Authentication required */
|
|
2189
|
+
401: {
|
|
2190
|
+
headers: {
|
|
2191
|
+
[name: string]: unknown;
|
|
2192
|
+
};
|
|
2193
|
+
content: {
|
|
2194
|
+
"application/json": {
|
|
2195
|
+
error?: string;
|
|
2196
|
+
message?: string;
|
|
2197
|
+
requestId?: string;
|
|
2198
|
+
code?: string;
|
|
2199
|
+
statusCode?: number;
|
|
2200
|
+
};
|
|
2201
|
+
};
|
|
2202
|
+
};
|
|
2203
|
+
/** @description API key requires control scope */
|
|
2204
|
+
403: {
|
|
2205
|
+
headers: {
|
|
2206
|
+
[name: string]: unknown;
|
|
2207
|
+
};
|
|
2208
|
+
content: {
|
|
2209
|
+
"application/json": {
|
|
2210
|
+
error?: string;
|
|
2211
|
+
message?: string;
|
|
2212
|
+
requestId?: string;
|
|
2213
|
+
code?: string;
|
|
2214
|
+
statusCode?: number;
|
|
2215
|
+
};
|
|
2216
|
+
};
|
|
2217
|
+
};
|
|
2218
|
+
/** @description Creation request not found */
|
|
2219
|
+
404: {
|
|
2220
|
+
headers: {
|
|
2221
|
+
[name: string]: unknown;
|
|
2222
|
+
};
|
|
2223
|
+
content: {
|
|
2224
|
+
"application/json": {
|
|
2225
|
+
error?: string;
|
|
2226
|
+
message?: string;
|
|
2227
|
+
requestId?: string;
|
|
2228
|
+
};
|
|
2229
|
+
};
|
|
2230
|
+
};
|
|
2231
|
+
/** @description Creation request no longer supports this action */
|
|
2232
|
+
409: {
|
|
2233
|
+
headers: {
|
|
2234
|
+
[name: string]: unknown;
|
|
2235
|
+
};
|
|
2236
|
+
content: {
|
|
2237
|
+
"application/json": {
|
|
2238
|
+
error?: string;
|
|
2239
|
+
message?: string;
|
|
2240
|
+
requestId?: string;
|
|
2241
|
+
};
|
|
2242
|
+
};
|
|
2243
|
+
};
|
|
2244
|
+
};
|
|
2245
|
+
};
|
|
2246
|
+
delete?: never;
|
|
2247
|
+
options?: never;
|
|
2248
|
+
head?: never;
|
|
2249
|
+
patch?: never;
|
|
2250
|
+
trace?: never;
|
|
2251
|
+
};
|
|
1578
2252
|
}
|
|
1579
2253
|
|
|
1580
2254
|
type PrintHiveOptions = {
|
|
@@ -1584,6 +2258,76 @@ type PrintHiveOptions = {
|
|
|
1584
2258
|
timeoutMs?: number;
|
|
1585
2259
|
maxRetries?: number;
|
|
1586
2260
|
};
|
|
2261
|
+
type Request<T> = {
|
|
2262
|
+
path: string;
|
|
2263
|
+
decode: (response: Response) => Promise<T>;
|
|
2264
|
+
query?: URLSearchParams;
|
|
2265
|
+
signal?: AbortSignal;
|
|
2266
|
+
} & ({
|
|
2267
|
+
method: "GET";
|
|
2268
|
+
} | {
|
|
2269
|
+
method: "POST";
|
|
2270
|
+
body: () => Promise<BodyInit>;
|
|
2271
|
+
size?: number;
|
|
2272
|
+
contentType?: string | null;
|
|
2273
|
+
idempotencyKey: string;
|
|
2274
|
+
replayable: boolean;
|
|
2275
|
+
});
|
|
2276
|
+
declare class Transport {
|
|
2277
|
+
private readonly options;
|
|
2278
|
+
constructor(options: PrintHiveOptions);
|
|
2279
|
+
request<T>(request: Request<T>): Promise<T>;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
type CreateOperation = paths["/v1/print-jobs/create"]["post"];
|
|
2283
|
+
type CreatedPrintJob = CreateOperation["responses"][201]["content"]["application/json"];
|
|
2284
|
+
type PrintJobCreateRequest = paths["/v1/print-jobs/create-requests/{requestId}"]["get"]["responses"][200]["content"]["application/json"];
|
|
2285
|
+
type JsonPrintJobInput = CreateOperation["requestBody"]["content"]["application/json"] & {
|
|
2286
|
+
idempotencyKey?: string;
|
|
2287
|
+
};
|
|
2288
|
+
type UploadedPrintJobInput = Omit<CreateOperation["requestBody"]["content"]["multipart/form-data"], "file"> & {
|
|
2289
|
+
file: string | Uint8Array;
|
|
2290
|
+
filename: string;
|
|
2291
|
+
idempotencyKey?: string;
|
|
2292
|
+
};
|
|
2293
|
+
declare class PrintJobCreateStoppedError extends Error {
|
|
2294
|
+
readonly request: PrintJobCreateRequest;
|
|
2295
|
+
constructor(request: PrintJobCreateRequest);
|
|
2296
|
+
}
|
|
2297
|
+
declare class PrintJobs {
|
|
2298
|
+
private readonly transport;
|
|
2299
|
+
constructor(transport: Transport);
|
|
2300
|
+
create(input: UploadedPrintJobInput): Promise<PrintJobCreateRequest & {
|
|
2301
|
+
idempotencyKey: string;
|
|
2302
|
+
}>;
|
|
2303
|
+
create(input: JsonPrintJobInput): Promise<CreatedPrintJob & {
|
|
2304
|
+
idempotencyKey: string;
|
|
2305
|
+
}>;
|
|
2306
|
+
getCreateRequest(requestId: string, signal?: AbortSignal): Promise<PrintJobCreateRequest>;
|
|
2307
|
+
waitUntilCreated(requestId: string, options?: WaitOptions): Promise<{
|
|
2308
|
+
requestId: string;
|
|
2309
|
+
status: "preparing" | "held" | "created" | "failed" | "cancelled";
|
|
2310
|
+
externalId: string | null;
|
|
2311
|
+
createdAt: string;
|
|
2312
|
+
job: ({
|
|
2313
|
+
id: number;
|
|
2314
|
+
status: string;
|
|
2315
|
+
model_file_id: string | null;
|
|
2316
|
+
printer_id: string | null;
|
|
2317
|
+
print_options: {
|
|
2318
|
+
[key: string]: unknown;
|
|
2319
|
+
} | null;
|
|
2320
|
+
} & {
|
|
2321
|
+
[key: string]: unknown;
|
|
2322
|
+
}) | null;
|
|
2323
|
+
requiredActions: {
|
|
2324
|
+
[key: string]: unknown;
|
|
2325
|
+
}[];
|
|
2326
|
+
error: {
|
|
2327
|
+
[key: string]: unknown;
|
|
2328
|
+
} | null;
|
|
2329
|
+
}>;
|
|
2330
|
+
}
|
|
1587
2331
|
|
|
1588
2332
|
type ApiLimit = {
|
|
1589
2333
|
name: string;
|
|
@@ -1718,6 +2462,7 @@ declare class PrintHive {
|
|
|
1718
2462
|
} | {
|
|
1719
2463
|
status: "missing";
|
|
1720
2464
|
};
|
|
2465
|
+
printerModel?: string;
|
|
1721
2466
|
};
|
|
1722
2467
|
} | {
|
|
1723
2468
|
sourceVersionId: string;
|
|
@@ -1783,6 +2528,7 @@ declare class PrintHive {
|
|
|
1783
2528
|
} | {
|
|
1784
2529
|
status: "missing";
|
|
1785
2530
|
};
|
|
2531
|
+
printerModel?: string;
|
|
1786
2532
|
} | null;
|
|
1787
2533
|
error: {
|
|
1788
2534
|
code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
|
|
@@ -1887,6 +2633,7 @@ declare class PrintHive {
|
|
|
1887
2633
|
} | {
|
|
1888
2634
|
status: "missing";
|
|
1889
2635
|
};
|
|
2636
|
+
printerModel?: string;
|
|
1890
2637
|
};
|
|
1891
2638
|
} | {
|
|
1892
2639
|
sourceVersionId: string;
|
|
@@ -1952,6 +2699,7 @@ declare class PrintHive {
|
|
|
1952
2699
|
} | {
|
|
1953
2700
|
status: "missing";
|
|
1954
2701
|
};
|
|
2702
|
+
printerModel?: string;
|
|
1955
2703
|
} | null;
|
|
1956
2704
|
error: {
|
|
1957
2705
|
code: "invalid_archive" | "unsafe_path" | "unsafe_xml" | "resource_limit" | "invalid_project" | "toolpath_only" | "processing_timeout" | "storage_object_changed" | "inspection_interrupted" | "upload_interrupted";
|
|
@@ -1966,7 +2714,15 @@ declare class PrintHive {
|
|
|
1966
2714
|
}>;
|
|
1967
2715
|
listSourceFiles(modelId: string): AsyncGenerator<PartnerSource>;
|
|
1968
2716
|
};
|
|
2717
|
+
readonly printers: {
|
|
2718
|
+
list: (input?: {
|
|
2719
|
+
limit?: number;
|
|
2720
|
+
cursor?: string;
|
|
2721
|
+
}) => Promise<unknown>;
|
|
2722
|
+
get: (id: string) => Promise<unknown>;
|
|
2723
|
+
};
|
|
2724
|
+
readonly printJobs: PrintJobs;
|
|
1969
2725
|
constructor(options: PrintHiveOptions);
|
|
1970
2726
|
}
|
|
1971
2727
|
|
|
1972
|
-
export { type ApiErrorBody, type ApiLimit, type PartnerModel, type PartnerSource, PrintHive, PrintHiveApiError, PrintHiveNetworkError, type PrintHiveOptions, type UploadOptions, type WaitOptions, type paths };
|
|
2728
|
+
export { type ApiErrorBody, type ApiLimit, type CreatedPrintJob, type JsonPrintJobInput, type PartnerModel, type PartnerSource, PrintHive, PrintHiveApiError, PrintHiveNetworkError, type PrintHiveOptions, type PrintJobCreateRequest, PrintJobCreateStoppedError, type UploadOptions, type UploadedPrintJobInput, type WaitOptions, type paths };
|