@printhive/api 0.2.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.ts CHANGED
@@ -1,3 +1,73 @@
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 {
2
72
  "/v1/printers": {
3
73
  parameters: {
@@ -1846,9 +1916,26 @@ interface paths {
1846
1916
  model_file_id?: string | null;
1847
1917
  printer_id?: string | null;
1848
1918
  organization_id?: string;
1849
- print_options?: {
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
+ } & {
1850
1937
  [key: string]: unknown;
1851
- } | null;
1938
+ }) | null;
1852
1939
  } & {
1853
1940
  [key: string]: unknown;
1854
1941
  };
@@ -1901,9 +1988,25 @@ interface paths {
1901
1988
  model_file_id: string | null;
1902
1989
  /** Format: uuid */
1903
1990
  printer_id: string | null;
1904
- print_options: {
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
+ } & {
1905
2008
  [key: string]: unknown;
1906
- } | null;
2009
+ }) | null;
1907
2010
  } & {
1908
2011
  [key: string]: unknown;
1909
2012
  }) | null;
@@ -1982,20 +2085,20 @@ interface paths {
1982
2085
  patch?: never;
1983
2086
  trace?: never;
1984
2087
  };
1985
- "/v1/print-jobs/create-requests/{requestId}": {
2088
+ "/v1/print-jobs/{id}": {
1986
2089
  parameters: {
1987
2090
  query?: never;
1988
2091
  header?: never;
1989
2092
  path?: never;
1990
2093
  cookie?: never;
1991
2094
  };
1992
- /** Poll one asynchronous single-plate creation request */
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. */
1993
2096
  get: {
1994
2097
  parameters: {
1995
2098
  query?: never;
1996
2099
  header?: never;
1997
2100
  path: {
1998
- requestId: string;
2101
+ id: number;
1999
2102
  };
2000
2103
  cookie?: never;
2001
2104
  };
@@ -2008,42 +2111,59 @@ interface paths {
2008
2111
  };
2009
2112
  content: {
2010
2113
  "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;
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;
2026
2141
  } | 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;
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
+ };
2047
2167
  };
2048
2168
  };
2049
2169
  };
@@ -2051,46 +2171,33 @@ interface paths {
2051
2171
  };
2052
2172
  put?: never;
2053
2173
  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: {
2174
+ delete: {
2071
2175
  parameters: {
2072
- query?: never;
2176
+ query?: {
2177
+ organizationId?: string;
2178
+ };
2073
2179
  header?: never;
2074
2180
  path: {
2075
- requestId: string;
2181
+ id: string;
2076
2182
  };
2077
2183
  cookie?: never;
2078
2184
  };
2079
2185
  requestBody?: never;
2080
2186
  responses: {
2081
2187
  /** @description Default Response */
2082
- 202: {
2188
+ 200: {
2083
2189
  headers: {
2084
2190
  [name: string]: unknown;
2085
2191
  };
2086
2192
  content: {
2087
2193
  "application/json": {
2088
- authorized: boolean;
2194
+ success?: boolean;
2195
+ message?: string;
2089
2196
  };
2090
2197
  };
2091
2198
  };
2092
- /** @description Authentication required */
2093
- 401: {
2199
+ /** @description Cannot delete job - invalid status */
2200
+ 400: {
2094
2201
  headers: {
2095
2202
  [name: string]: unknown;
2096
2203
  };
@@ -2098,14 +2205,11 @@ interface paths {
2098
2205
  "application/json": {
2099
2206
  error?: string;
2100
2207
  message?: string;
2101
- requestId?: string;
2102
- code?: string;
2103
- statusCode?: number;
2104
2208
  };
2105
2209
  };
2106
2210
  };
2107
- /** @description API key requires control scope */
2108
- 403: {
2211
+ /** @description Default Response */
2212
+ 401: {
2109
2213
  headers: {
2110
2214
  [name: string]: unknown;
2111
2215
  };
@@ -2113,13 +2217,10 @@ interface paths {
2113
2217
  "application/json": {
2114
2218
  error?: string;
2115
2219
  message?: string;
2116
- requestId?: string;
2117
- code?: string;
2118
- statusCode?: number;
2119
2220
  };
2120
2221
  };
2121
2222
  };
2122
- /** @description Creation request not found */
2223
+ /** @description Default Response */
2123
2224
  404: {
2124
2225
  headers: {
2125
2226
  [name: string]: unknown;
@@ -2128,12 +2229,11 @@ interface paths {
2128
2229
  "application/json": {
2129
2230
  error?: string;
2130
2231
  message?: string;
2131
- requestId?: string;
2132
2232
  };
2133
2233
  };
2134
2234
  };
2135
- /** @description Creation request no longer supports this action */
2136
- 409: {
2235
+ /** @description Default Response */
2236
+ 500: {
2137
2237
  headers: {
2138
2238
  [name: string]: unknown;
2139
2239
  };
@@ -2141,52 +2241,78 @@ interface paths {
2141
2241
  "application/json": {
2142
2242
  error?: string;
2143
2243
  message?: string;
2144
- requestId?: string;
2145
2244
  };
2146
2245
  };
2147
2246
  };
2148
2247
  };
2149
2248
  };
2150
- delete?: never;
2151
2249
  options?: never;
2152
2250
  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: {
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: {
2167
2256
  parameters: {
2168
- query?: never;
2257
+ query?: {
2258
+ /** @description Organization ID (optional, defaults to user's primary organization) */
2259
+ organizationId?: string;
2260
+ };
2169
2261
  header?: never;
2170
2262
  path: {
2171
- requestId: string;
2263
+ /** @description Print job ID */
2264
+ id: string;
2172
2265
  };
2173
2266
  cookie?: never;
2174
2267
  };
2175
- requestBody?: never;
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
+ };
2176
2300
  responses: {
2177
- /** @description Default Response */
2178
- 202: {
2301
+ /** @description Job updated successfully */
2302
+ 200: {
2179
2303
  headers: {
2180
2304
  [name: string]: unknown;
2181
2305
  };
2182
2306
  content: {
2183
2307
  "application/json": {
2184
- cancelled: boolean;
2308
+ success?: boolean;
2309
+ /** @description Updated print job */
2310
+ job?: Record<string, never>;
2185
2311
  };
2186
2312
  };
2187
2313
  };
2188
- /** @description Authentication required */
2189
- 401: {
2314
+ /** @description Bad request - job not in QUEUED status */
2315
+ 400: {
2190
2316
  headers: {
2191
2317
  [name: string]: unknown;
2192
2318
  };
@@ -2194,13 +2320,10 @@ interface paths {
2194
2320
  "application/json": {
2195
2321
  error?: string;
2196
2322
  message?: string;
2197
- requestId?: string;
2198
- code?: string;
2199
- statusCode?: number;
2200
2323
  };
2201
2324
  };
2202
2325
  };
2203
- /** @description API key requires control scope */
2326
+ /** @description Forbidden - not authorized to update this job */
2204
2327
  403: {
2205
2328
  headers: {
2206
2329
  [name: string]: unknown;
@@ -2208,14 +2331,12 @@ interface paths {
2208
2331
  content: {
2209
2332
  "application/json": {
2210
2333
  error?: string;
2211
- message?: string;
2212
- requestId?: string;
2213
2334
  code?: string;
2214
- statusCode?: number;
2335
+ message?: string;
2215
2336
  };
2216
2337
  };
2217
2338
  };
2218
- /** @description Creation request not found */
2339
+ /** @description Job not found */
2219
2340
  404: {
2220
2341
  headers: {
2221
2342
  [name: string]: unknown;
@@ -2224,12 +2345,11 @@ interface paths {
2224
2345
  "application/json": {
2225
2346
  error?: string;
2226
2347
  message?: string;
2227
- requestId?: string;
2228
2348
  };
2229
2349
  };
2230
2350
  };
2231
- /** @description Creation request no longer supports this action */
2232
- 409: {
2351
+ /** @description Internal server error */
2352
+ 500: {
2233
2353
  headers: {
2234
2354
  [name: string]: unknown;
2235
2355
  };
@@ -2237,53 +2357,1593 @@ interface paths {
2237
2357
  "application/json": {
2238
2358
  error?: string;
2239
2359
  message?: string;
2240
- requestId?: string;
2241
2360
  };
2242
2361
  };
2243
2362
  };
2244
2363
  };
2245
2364
  };
2246
- delete?: never;
2247
- options?: never;
2248
- head?: never;
2249
- patch?: never;
2250
2365
  trace?: never;
2251
2366
  };
2252
- }
2253
-
2254
- type PrintHiveOptions = {
2255
- apiKey: string;
2256
- baseUrl?: string;
2257
- fetch?: typeof globalThis.fetch;
2258
- timeoutMs?: number;
2259
- maxRetries?: number;
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;
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;
2287
3947
  };
2288
3948
  type UploadedPrintJobInput = Omit<CreateOperation["requestBody"]["content"]["multipart/form-data"], "file"> & {
2289
3949
  file: string | Uint8Array;
@@ -2297,6 +3957,7 @@ declare class PrintJobCreateStoppedError extends Error {
2297
3957
  declare class PrintJobs {
2298
3958
  private readonly transport;
2299
3959
  constructor(transport: Transport);
3960
+ get(id: number, signal?: AbortSignal): Promise<PrintJob>;
2300
3961
  create(input: UploadedPrintJobInput): Promise<PrintJobCreateRequest & {
2301
3962
  idempotencyKey: string;
2302
3963
  }>;
@@ -2314,9 +3975,22 @@ declare class PrintJobs {
2314
3975
  status: string;
2315
3976
  model_file_id: string | null;
2316
3977
  printer_id: string | null;
2317
- print_options: {
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
+ } & {
2318
3992
  [key: string]: unknown;
2319
- } | null;
3993
+ }) | null;
2320
3994
  } & {
2321
3995
  [key: string]: unknown;
2322
3996
  }) | null;
@@ -2352,6 +4026,7 @@ declare class PrintHiveApiError extends Error {
2352
4026
  readonly body?: ApiErrorBody | undefined;
2353
4027
  readonly name = "PrintHiveApiError";
2354
4028
  constructor(status: number, code: string, limit?: ApiLimit | undefined, retryAfterMs?: number | undefined, requestId?: string | undefined, body?: ApiErrorBody | undefined);
4029
+ get reasons(): readonly PartnerPreparationTargetReason[];
2355
4030
  }
2356
4031
  declare class PrintHiveNetworkError extends Error {
2357
4032
  readonly reason: "network" | "timeout" | "aborted";
@@ -2361,6 +4036,21 @@ declare class PrintHiveNetworkError extends Error {
2361
4036
 
2362
4037
  type PartnerSource = paths["/v1/partner-production/uploads/{sourceId}"]["get"]["responses"][200]["content"]["application/json"];
2363
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
+ };
2364
4054
  type UploadOptions = {
2365
4055
  filename: string;
2366
4056
  externalId?: string;
@@ -2722,7 +4412,200 @@ declare class PrintHive {
2722
4412
  get: (id: string) => Promise<unknown>;
2723
4413
  };
2724
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
+ };
2725
4608
  constructor(options: PrintHiveOptions);
2726
4609
  }
2727
4610
 
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 };
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 };