@printy3d/sdk 0.0.0-stage → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +86 -2
- package/dist/cad-documents.d.ts +169 -0
- package/dist/cad-documents.d.ts.map +1 -0
- package/dist/cad-documents.js +17 -0
- package/dist/cad-documents.js.map +1 -0
- package/dist/client.d.ts +116 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +165 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +125 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +202 -0
- package/dist/errors.js.map +1 -0
- package/dist/http.d.ts +70 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +291 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/resources.d.ts +222 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +629 -0
- package/dist/resources.js.map +1 -0
- package/dist/runtime.d.ts +30 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +88 -0
- package/dist/runtime.js.map +1 -0
- package/dist/sources.d.ts +13 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/sources.js +82 -0
- package/dist/sources.js.map +1 -0
- package/dist/types.d.ts +776 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +18 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/webhooks.d.ts +24 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +95 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +48 -4
package/dist/http.js
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP transport on the global `fetch` (Node >= 18, modern browsers).
|
|
3
|
+
*
|
|
4
|
+
* API requests carry `Authorization: Bearer <key>`, never follow redirects (a redirect must
|
|
5
|
+
* not carry the key elsewhere) and turn every non-2xx into `Printy3DError`. Storage
|
|
6
|
+
* requests go to presigned URLs, carry no credential and never appear in error messages.
|
|
7
|
+
*
|
|
8
|
+
* Retries: an idempotent request (GET, DELETE, or a POST carrying an `Idempotency-Key`) is
|
|
9
|
+
* retried on connection errors and timeouts, 429, 502, 503, 504 and
|
|
10
|
+
* `409 idempotency_in_progress`, with bounded exponential backoff and jitter. `Retry-After`
|
|
11
|
+
* replaces the backoff delay; one longer than `maxRetryDelayMs` is raised at once with
|
|
12
|
+
* `retryAfter` set. Other writes are never repeated.
|
|
13
|
+
*/
|
|
14
|
+
import { APIConnectionError, APITimeoutError, Printy3DError } from "./errors.js";
|
|
15
|
+
import { isNode } from "./runtime.js";
|
|
16
|
+
import { VERSION } from "./version.js";
|
|
17
|
+
const RETRY_STATUSES = new Set([429, 502, 503, 504]);
|
|
18
|
+
const IDEMPOTENT_METHODS = new Set(["GET", "HEAD", "DELETE"]);
|
|
19
|
+
class ConnectionFailure extends Error {
|
|
20
|
+
reason;
|
|
21
|
+
timedOut;
|
|
22
|
+
constructor(reason, timedOut) {
|
|
23
|
+
super("connection failure");
|
|
24
|
+
this.reason = reason;
|
|
25
|
+
this.timedOut = timedOut;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/** Seconds from a `Retry-After` header: delta-seconds or an HTTP-date. */
|
|
29
|
+
export function parseRetryAfter(value, nowMs = Date.now()) {
|
|
30
|
+
if (value == null)
|
|
31
|
+
return undefined;
|
|
32
|
+
const text = value.trim();
|
|
33
|
+
if (!text)
|
|
34
|
+
return undefined;
|
|
35
|
+
if (/^\d+(\.\d+)?$/.test(text))
|
|
36
|
+
return Math.max(0, Number(text));
|
|
37
|
+
const when = Date.parse(text);
|
|
38
|
+
if (Number.isNaN(when))
|
|
39
|
+
return undefined;
|
|
40
|
+
return Math.max(0, (when - nowMs) / 1000);
|
|
41
|
+
}
|
|
42
|
+
function lower(headers) {
|
|
43
|
+
const out = {};
|
|
44
|
+
headers.forEach((value, key) => {
|
|
45
|
+
out[key.toLowerCase()] = value;
|
|
46
|
+
});
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
function errorName(reason) {
|
|
50
|
+
if (reason instanceof Error) {
|
|
51
|
+
const cause = reason.cause;
|
|
52
|
+
const code = cause && typeof cause === "object" ? cause.code : undefined;
|
|
53
|
+
return typeof code === "string" ? `${reason.name}: ${code}` : reason.name;
|
|
54
|
+
}
|
|
55
|
+
return typeof reason;
|
|
56
|
+
}
|
|
57
|
+
/** Bytes as a fetch body (a copy only when the view is not a plain ArrayBuffer view). */
|
|
58
|
+
function asBody(data) {
|
|
59
|
+
return (data.buffer instanceof ArrayBuffer ? data : new Uint8Array(data));
|
|
60
|
+
}
|
|
61
|
+
export class Transport {
|
|
62
|
+
baseUrl;
|
|
63
|
+
maxRetries;
|
|
64
|
+
backoffInitialMs = 500;
|
|
65
|
+
backoffMaxMs = 20_000;
|
|
66
|
+
// A true private field: never shown by util.inspect / console.log (it holds the key).
|
|
67
|
+
#config;
|
|
68
|
+
userAgent;
|
|
69
|
+
constructor(config) {
|
|
70
|
+
this.#config = config;
|
|
71
|
+
this.baseUrl = config.baseUrl;
|
|
72
|
+
this.maxRetries = Math.max(0, Math.floor(config.maxRetries));
|
|
73
|
+
const runtime = isNode ? `Node ${process.versions.node}` : "browser";
|
|
74
|
+
this.userAgent =
|
|
75
|
+
`printy3d-typescript/${VERSION} (${runtime})` + (config.userAgent ? ` ${config.userAgent}` : "");
|
|
76
|
+
}
|
|
77
|
+
get sleep() {
|
|
78
|
+
return this.#config.sleep;
|
|
79
|
+
}
|
|
80
|
+
/** Exponential backoff with jitter: half the step plus a random half (milliseconds). */
|
|
81
|
+
backoff(attempt) {
|
|
82
|
+
const step = Math.min(this.backoffMaxMs, this.backoffInitialMs * 2 ** attempt);
|
|
83
|
+
return step * (0.5 + 0.5 * this.#config.random());
|
|
84
|
+
}
|
|
85
|
+
url(path, query) {
|
|
86
|
+
let url = this.baseUrl + path;
|
|
87
|
+
if (query) {
|
|
88
|
+
const params = new URLSearchParams();
|
|
89
|
+
for (const [key, value] of Object.entries(query)) {
|
|
90
|
+
if (value === undefined || value === null)
|
|
91
|
+
continue;
|
|
92
|
+
params.append(key, String(value));
|
|
93
|
+
}
|
|
94
|
+
const text = params.toString();
|
|
95
|
+
if (text)
|
|
96
|
+
url += `?${text}`;
|
|
97
|
+
}
|
|
98
|
+
return url;
|
|
99
|
+
}
|
|
100
|
+
async request(method, path, options = {}) {
|
|
101
|
+
method = method.toUpperCase();
|
|
102
|
+
const url = this.url(path, options.query);
|
|
103
|
+
const headers = {
|
|
104
|
+
Authorization: `Bearer ${this.#config.apiKey}`,
|
|
105
|
+
Accept: "application/json",
|
|
106
|
+
};
|
|
107
|
+
// Browsers refuse or preflight a custom User-Agent; the API's CORS list omits it.
|
|
108
|
+
if (isNode)
|
|
109
|
+
headers["User-Agent"] = this.userAgent;
|
|
110
|
+
let body;
|
|
111
|
+
if (options.body !== undefined) {
|
|
112
|
+
body = JSON.stringify(options.body);
|
|
113
|
+
headers["Content-Type"] = "application/json";
|
|
114
|
+
}
|
|
115
|
+
if (options.idempotencyKey !== undefined)
|
|
116
|
+
headers["Idempotency-Key"] = options.idempotencyKey;
|
|
117
|
+
Object.assign(headers, options.headers ?? {});
|
|
118
|
+
const retryable = options.retry ?? (IDEMPOTENT_METHODS.has(method) || options.idempotencyKey !== undefined);
|
|
119
|
+
for (let attempt = 0;; attempt++) {
|
|
120
|
+
let status;
|
|
121
|
+
let received;
|
|
122
|
+
let text;
|
|
123
|
+
try {
|
|
124
|
+
({ status, received, text } = await this.send(url, method, headers, body, options.signal));
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
if (!(error instanceof ConnectionFailure))
|
|
128
|
+
throw error;
|
|
129
|
+
if (retryable && attempt < this.maxRetries) {
|
|
130
|
+
await this.#config.sleep(this.backoff(attempt));
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
const Kind = error.timedOut ? APITimeoutError : APIConnectionError;
|
|
134
|
+
const what = error.timedOut ? "timed out" : "failed to connect";
|
|
135
|
+
throw new Kind(`${method} ${path} ${what} (${errorName(error.reason)})`, {
|
|
136
|
+
cause: error.reason,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (status >= 200 && status < 300) {
|
|
140
|
+
return {
|
|
141
|
+
status,
|
|
142
|
+
headers: received,
|
|
143
|
+
data: (text ? JSON.parse(text) : undefined),
|
|
144
|
+
requestId: received["x-request-id"],
|
|
145
|
+
replayed: (received["idempotent-replayed"] ?? "").toLowerCase() === "true",
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
const retryAfter = parseRetryAfter(received["retry-after"]);
|
|
149
|
+
const error = Printy3DError.fromResponse(status, received, text, retryAfter);
|
|
150
|
+
if (retryable && attempt < this.maxRetries && shouldRetry(status, error)) {
|
|
151
|
+
if (retryAfter !== undefined && retryAfter * 1000 > this.#config.maxRetryDelayMs)
|
|
152
|
+
throw error;
|
|
153
|
+
await this.#config.sleep(retryAfter !== undefined ? retryAfter * 1000 : this.backoff(attempt));
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
throw error;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
async send(url, method, headers, body, signal) {
|
|
160
|
+
const controller = new AbortController();
|
|
161
|
+
let timedOut = false;
|
|
162
|
+
const timer = setTimeout(() => {
|
|
163
|
+
timedOut = true;
|
|
164
|
+
controller.abort();
|
|
165
|
+
}, this.#config.timeoutMs);
|
|
166
|
+
const cancel = () => controller.abort();
|
|
167
|
+
signal?.addEventListener("abort", cancel, { once: true });
|
|
168
|
+
if (signal?.aborted)
|
|
169
|
+
controller.abort();
|
|
170
|
+
try {
|
|
171
|
+
const init = { method, headers, redirect: "manual", signal: controller.signal };
|
|
172
|
+
if (body !== undefined)
|
|
173
|
+
init.body = body;
|
|
174
|
+
const response = await this.#config.fetch(url, init);
|
|
175
|
+
const text = await response.text();
|
|
176
|
+
if (response.type === "opaqueredirect" || response.status === 0) {
|
|
177
|
+
return { status: 0, received: {}, text: "" };
|
|
178
|
+
}
|
|
179
|
+
return { status: response.status, received: lower(response.headers), text };
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
if (signal?.aborted)
|
|
183
|
+
throw error; // the caller cancelled: never retried
|
|
184
|
+
throw new ConnectionFailure(error, timedOut);
|
|
185
|
+
}
|
|
186
|
+
finally {
|
|
187
|
+
clearTimeout(timer);
|
|
188
|
+
signal?.removeEventListener("abort", cancel);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
// --- Storage (presigned URLs) -------------------------------------------------------
|
|
192
|
+
/** PUT bytes to a presigned URL; returns the HTTP status. The URL never appears in errors. */
|
|
193
|
+
async storagePut(url, data, headers = {}) {
|
|
194
|
+
const sent = {};
|
|
195
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
196
|
+
// fetch sets Content-Length from the body itself (browsers forbid setting it).
|
|
197
|
+
if (key.toLowerCase() === "content-length" || key.toLowerCase() === "host")
|
|
198
|
+
continue;
|
|
199
|
+
sent[key] = value;
|
|
200
|
+
}
|
|
201
|
+
const controller = new AbortController();
|
|
202
|
+
let timedOut = false;
|
|
203
|
+
const timer = setTimeout(() => {
|
|
204
|
+
timedOut = true;
|
|
205
|
+
controller.abort();
|
|
206
|
+
}, this.#config.transferTimeoutMs);
|
|
207
|
+
try {
|
|
208
|
+
const response = await this.#config.fetch(url, {
|
|
209
|
+
method: "PUT",
|
|
210
|
+
headers: sent,
|
|
211
|
+
body: asBody(data),
|
|
212
|
+
signal: controller.signal,
|
|
213
|
+
});
|
|
214
|
+
await response.arrayBuffer().catch(() => undefined);
|
|
215
|
+
return response.status;
|
|
216
|
+
}
|
|
217
|
+
catch (error) {
|
|
218
|
+
const Kind = timedOut ? APITimeoutError : APIConnectionError;
|
|
219
|
+
throw new Kind(`Storage upload failed (${errorName(error)})`);
|
|
220
|
+
}
|
|
221
|
+
finally {
|
|
222
|
+
clearTimeout(timer);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Stream a GET from a presigned URL into `onChunk`. `transferTimeoutMs` is an idle
|
|
227
|
+
* timeout: it restarts with every chunk.
|
|
228
|
+
*/
|
|
229
|
+
async storageGet(url, headers, onChunk) {
|
|
230
|
+
const controller = new AbortController();
|
|
231
|
+
let timedOut = false;
|
|
232
|
+
let timer;
|
|
233
|
+
const arm = () => {
|
|
234
|
+
if (timer !== undefined)
|
|
235
|
+
clearTimeout(timer);
|
|
236
|
+
timer = setTimeout(() => {
|
|
237
|
+
timedOut = true;
|
|
238
|
+
controller.abort();
|
|
239
|
+
}, this.#config.transferTimeoutMs);
|
|
240
|
+
};
|
|
241
|
+
arm();
|
|
242
|
+
let response;
|
|
243
|
+
try {
|
|
244
|
+
response = await this.#config.fetch(url, { method: "GET", headers, signal: controller.signal });
|
|
245
|
+
}
|
|
246
|
+
catch (error) {
|
|
247
|
+
clearTimeout(timer);
|
|
248
|
+
const Kind = timedOut ? APITimeoutError : APIConnectionError;
|
|
249
|
+
throw new Kind(`Storage download failed (${errorName(error)})`);
|
|
250
|
+
}
|
|
251
|
+
try {
|
|
252
|
+
if (response.status < 200 || response.status >= 300) {
|
|
253
|
+
await response.arrayBuffer().catch(() => undefined);
|
|
254
|
+
throw new Printy3DError(`Storage download refused (HTTP ${response.status})`, {
|
|
255
|
+
status: response.status,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
if (!response.body) {
|
|
259
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
260
|
+
if (bytes.byteLength)
|
|
261
|
+
await onChunk(bytes);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
const reader = response.body.getReader();
|
|
265
|
+
for (;;) {
|
|
266
|
+
let next;
|
|
267
|
+
try {
|
|
268
|
+
next = await reader.read();
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
const Kind = timedOut ? APITimeoutError : APIConnectionError;
|
|
272
|
+
throw new Kind(`Storage download interrupted (${errorName(error)})`);
|
|
273
|
+
}
|
|
274
|
+
if (next.done)
|
|
275
|
+
break;
|
|
276
|
+
arm();
|
|
277
|
+
await onChunk(next.value);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
finally {
|
|
281
|
+
clearTimeout(timer);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function shouldRetry(status, error) {
|
|
286
|
+
if (RETRY_STATUSES.has(status))
|
|
287
|
+
return true;
|
|
288
|
+
// The first try of the same Idempotency-Key is still in flight on the server.
|
|
289
|
+
return status === 409 && error.code === "idempotency_in_progress";
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuCvC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AACrD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE9D,MAAM,iBAAkB,SAAQ,KAAK;IAExB;IACA;IAFX,YACW,MAAe,EACf,QAAiB;QAE1B,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAHnB,WAAM,GAAN,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AC;oBACf,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kBAAkB,CAAC;oBAC7D,MAAM,IAAI,IAAI,CAAC,iCAAiC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACvE,CAAC;gBACD,IAAI,IAAI,CAAC,IAAI;oBAAE,MAAM;gBACrB,GAAG,EAAE,CAAC;gBACN,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF;AAED,SAAS,WAAW,CAAC,MAAc,EAAE,KAAoB;IACvD,IAAI,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5C,8EAA8E;IAC9E,OAAO,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,KAAK,yBAAyB,CAAC;AACpE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Official TypeScript/JavaScript client for the Printy3D API (`/v1`).
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { Printy3D } from "@printy3d/sdk";
|
|
6
|
+
* const client = new Printy3D(); // PRINTY3D_API_KEY, PRINTY3D_API_URL
|
|
7
|
+
* const job = await client.inspect("model.stl");
|
|
8
|
+
* console.log(job.analysis?.is_watertight);
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export { DEFAULT_BASE_URL, Printy3D, type ClientOptions, type DownloadedArtifact, type ExportOptions, type JobSource, type RunOptions, } from "./client.js";
|
|
12
|
+
export { APIConnectionError, APITimeoutError, ExportFailedError, FileRejectedError, IntegrityError, JobCancelledError, JobError, JobFailedError, Printy3DError, UploadIncompleteError, WaitTimeoutError, WebhookSignatureError, type WebhookSignatureReason, type Printy3DErrorInit, } from "./errors.js";
|
|
13
|
+
export { parseRetryAfter, type ApiResponse, type FetchLike } from "./http.js";
|
|
14
|
+
export { ApiKeys, Artifacts, BalanceResource, Exports, Files, Formats, Jobs, Org, Profiles, RESUMABLE_MAX_BYTES, Technologies, WebhookEndpoints, SINGLE_PUT_MAX_BYTES, defaultFilename, inputFormatFor, type CallOptions, type IdempotentOptions, type JobWaitOptions, type PageOptions, type UploadOptions, type WaitOptions, } from "./resources.js";
|
|
15
|
+
export type { UploadSource } from "./sources.js";
|
|
16
|
+
export { verifyWebhook, type VerifyWebhookOptions } from "./webhooks.js";
|
|
17
|
+
export * from "./cad-documents.js";
|
|
18
|
+
export * from "./types.js";
|
|
19
|
+
export { VERSION } from "./version.js";
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACzE,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Official TypeScript/JavaScript client for the Printy3D API (`/v1`).
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { Printy3D } from "@printy3d/sdk";
|
|
6
|
+
* const client = new Printy3D(); // PRINTY3D_API_KEY, PRINTY3D_API_URL
|
|
7
|
+
* const job = await client.inspect("model.stl");
|
|
8
|
+
* console.log(job.analysis?.is_watertight);
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export { DEFAULT_BASE_URL, Printy3D, } from "./client.js";
|
|
12
|
+
export { APIConnectionError, APITimeoutError, ExportFailedError, FileRejectedError, IntegrityError, JobCancelledError, JobError, JobFailedError, Printy3DError, UploadIncompleteError, WaitTimeoutError, WebhookSignatureError, } from "./errors.js";
|
|
13
|
+
export { parseRetryAfter } from "./http.js";
|
|
14
|
+
export { ApiKeys, Artifacts, BalanceResource, Exports, Files, Formats, Jobs, Org, Profiles, RESUMABLE_MAX_BYTES, Technologies, WebhookEndpoints, SINGLE_PUT_MAX_BYTES, defaultFilename, inputFormatFor, } from "./resources.js";
|
|
15
|
+
export { verifyWebhook } from "./webhooks.js";
|
|
16
|
+
export * from "./cad-documents.js";
|
|
17
|
+
export * from "./types.js";
|
|
18
|
+
export { VERSION } from "./version.js";
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,gBAAgB,EAChB,QAAQ,GAMT,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,GAGtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAoC,MAAM,WAAW,CAAC;AAC9E,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,cAAc,GAOf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAA6B,MAAM,eAAe,CAAC;AACzE,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource groups: one method per `/v1` operation in `spec/openapi.json`, plus the
|
|
3
|
+
* pagination iterators and the wait / upload / download helpers built on them.
|
|
4
|
+
*/
|
|
5
|
+
import type { Transport } from "./http.js";
|
|
6
|
+
import { type UploadSource } from "./sources.js";
|
|
7
|
+
import type { ApiKey, ApiKeyPage, Artifact, Balance, CreateApiKey, CreateFile, CreateJob, CreateResumableFile, EvaluationList, EvaluationQuery, IssuedWebhookEndpoint, TechnologyTable, WebhookEndpoint, CreditTransaction, CreditTransactionPage, EventPage, Export, ExportFormat, File, FilePage, FileUpload, Format, InputFormat, IssuedApiKey, Job, JobEvent, JobPage, Organization, RepairProfile, ResumableFileUpload, RotateApiKey, Transfer } from "./types.js";
|
|
8
|
+
/** `CreateFile.size_bytes` maximum: the single presigned PUT (10 MiB). */
|
|
9
|
+
export declare const SINGLE_PUT_MAX_BYTES: number;
|
|
10
|
+
/** `CreateResumableFile.size_bytes` maximum: the multipart upload (1 GiB). */
|
|
11
|
+
export declare const RESUMABLE_MAX_BYTES: number;
|
|
12
|
+
/**
|
|
13
|
+
* Rounds of part uploads; each after the first replays the create request with the same
|
|
14
|
+
* Idempotency-Key, which answers fresh URLs for exactly the parts still missing (api.md
|
|
15
|
+
* section 4.1). Same bound as the API's survey harness.
|
|
16
|
+
*/
|
|
17
|
+
export declare const UPLOAD_ROUNDS = 3;
|
|
18
|
+
export declare const INPUT_FORMATS: readonly InputFormat[];
|
|
19
|
+
/** File extension per artifact media type when saving; anything else is `.bin`. */
|
|
20
|
+
export declare const EXTENSIONS: Record<string, string>;
|
|
21
|
+
export interface CallOptions {
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
}
|
|
24
|
+
export interface IdempotentOptions extends CallOptions {
|
|
25
|
+
/** Reused across retries of this call; a fresh UUID v4 when omitted. */
|
|
26
|
+
idempotencyKey?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface PageOptions extends CallOptions {
|
|
29
|
+
cursor?: string;
|
|
30
|
+
/** 1-100, default 20. */
|
|
31
|
+
limit?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface WaitOptions extends CallOptions {
|
|
34
|
+
/** Give up after this long (`null` waits indefinitely). */
|
|
35
|
+
timeoutMs?: number | null;
|
|
36
|
+
pollIntervalMs?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface JobWaitOptions extends WaitOptions {
|
|
39
|
+
/** Called with each new job event, in order. */
|
|
40
|
+
onEvent?: (event: JobEvent) => void | Promise<void>;
|
|
41
|
+
/** Default true: throw `JobFailedError` / `JobCancelledError`. */
|
|
42
|
+
raiseOnFailure?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface UploadOptions extends CallOptions {
|
|
45
|
+
/** The API's filename (its extension names the format); defaults to the source's name. */
|
|
46
|
+
filename?: string;
|
|
47
|
+
inputFormat?: InputFormat;
|
|
48
|
+
/** Force the multipart upload (true) or the single PUT (false); default by size. */
|
|
49
|
+
resumable?: boolean;
|
|
50
|
+
/** Default true: poll verification until `ready` (`FileRejectedError` on `rejected`). */
|
|
51
|
+
wait?: boolean;
|
|
52
|
+
timeoutMs?: number | null;
|
|
53
|
+
pollIntervalMs?: number;
|
|
54
|
+
idempotencyKey?: string;
|
|
55
|
+
onProgress?: (sentBytes: number, totalBytes: number) => void;
|
|
56
|
+
}
|
|
57
|
+
/** The API's extension rule (`format_from_filename`): the upload's `input_format`. */
|
|
58
|
+
export declare function inputFormatFor(filename: string): InputFormat | undefined;
|
|
59
|
+
/** `<label><ext>`, the extension chosen by media type (`.bin` when unknown). */
|
|
60
|
+
export declare function defaultFilename(artifact: Artifact): string;
|
|
61
|
+
declare abstract class Resource {
|
|
62
|
+
protected readonly t: Transport;
|
|
63
|
+
constructor(t: Transport);
|
|
64
|
+
protected deadline(timeoutMs: number | null | undefined, fallback: number | null): number | null;
|
|
65
|
+
protected pause(ms: number, signal: AbortSignal | undefined): Promise<void>;
|
|
66
|
+
protected get<T>(path: string, query?: Record<string, string | number | boolean | undefined>, signal?: AbortSignal): Promise<T>;
|
|
67
|
+
}
|
|
68
|
+
export declare class Org extends Resource {
|
|
69
|
+
/** `GET /v1/org` (`org:read`): the authenticated organization. */
|
|
70
|
+
retrieve(options?: CallOptions): Promise<Organization>;
|
|
71
|
+
}
|
|
72
|
+
export declare class Formats extends Resource {
|
|
73
|
+
/** `GET /v1/formats` (`files:read`): `enabled` is live qualification, `test_enabled` sandbox. */
|
|
74
|
+
list(options?: CallOptions): Promise<Format[]>;
|
|
75
|
+
}
|
|
76
|
+
export declare class Profiles extends Resource {
|
|
77
|
+
/** `GET /v1/profiles` (`files:read`): the values each repair profile fixes. */
|
|
78
|
+
list(options?: CallOptions): Promise<RepairProfile[]>;
|
|
79
|
+
}
|
|
80
|
+
export declare class ApiKeys extends Resource {
|
|
81
|
+
list(options?: PageOptions): Promise<ApiKeyPage>;
|
|
82
|
+
/** Every key in this organization and mode, following `next_cursor`. */
|
|
83
|
+
iterate(options?: Omit<PageOptions, "cursor">): AsyncGenerator<ApiKey>;
|
|
84
|
+
retrieve(keyId: string, options?: CallOptions): Promise<ApiKey>;
|
|
85
|
+
/** Issue a key; `secret` is returned once (`null` on an idempotent replay). */
|
|
86
|
+
create(body: CreateApiKey, options?: IdempotentOptions): Promise<IssuedApiKey>;
|
|
87
|
+
/** One successor; the old key keeps working for `grace_seconds` (default 86400). */
|
|
88
|
+
rotate(keyId: string, body?: RotateApiKey, options?: IdempotentOptions): Promise<IssuedApiKey>;
|
|
89
|
+
/** `DELETE`; revoking an already revoked key is harmless. */
|
|
90
|
+
revoke(keyId: string, options?: CallOptions): Promise<void>;
|
|
91
|
+
}
|
|
92
|
+
export declare class Files extends Resource {
|
|
93
|
+
/**
|
|
94
|
+
* `POST /v1/files`: reserve a file of at most 10 MiB and get one presigned PUT. Replaying
|
|
95
|
+
* the same `idempotencyKey` (24 h) returns the same file with a renewed upload URL.
|
|
96
|
+
*/
|
|
97
|
+
create(body: CreateFile, options?: IdempotentOptions): Promise<FileUpload>;
|
|
98
|
+
/**
|
|
99
|
+
* `POST /v1/files/resumable`: reserve a file over 10 MiB, up to the plan's limit (at most
|
|
100
|
+
* 1 GiB), as an S3 multipart upload. Needs an approved account or an internal storage
|
|
101
|
+
* grant (`501 feature_unavailable` otherwise). Replaying the same `idempotencyKey`
|
|
102
|
+
* resumes: fresh URLs for the parts still missing.
|
|
103
|
+
*/
|
|
104
|
+
createResumable(body: CreateResumableFile, options?: IdempotentOptions): Promise<ResumableFileUpload>;
|
|
105
|
+
/**
|
|
106
|
+
* `POST /v1/files/{id}/complete`. Small uploads verify synchronously unless
|
|
107
|
+
* `respondAsync`; resumable uploads always answer `202` with `verifying`.
|
|
108
|
+
*/
|
|
109
|
+
complete(fileId: string, options?: CallOptions & {
|
|
110
|
+
respondAsync?: boolean;
|
|
111
|
+
}): Promise<File>;
|
|
112
|
+
retrieve(fileId: string, options?: CallOptions): Promise<File>;
|
|
113
|
+
list(options?: PageOptions): Promise<FilePage>;
|
|
114
|
+
/** Every file in this organization and mode, following `next_cursor`. */
|
|
115
|
+
iterate(options?: Omit<PageOptions, "cursor">): AsyncGenerator<File>;
|
|
116
|
+
/** Poll until the file is `ready`; `FileRejectedError` when `rejected`. */
|
|
117
|
+
wait(fileId: string, options?: WaitOptions): Promise<File>;
|
|
118
|
+
/**
|
|
119
|
+
* Upload and complete; returns the `ready` File. Up to 10 MiB uses one presigned PUT
|
|
120
|
+
* (`POST /v1/files`); larger sources (approved accounts, up to the plan's limit), or
|
|
121
|
+
* `resumable: true`, use the S3 multipart upload
|
|
122
|
+
* (`POST /v1/files/resumable`): every listed part is PUT, then the create request is
|
|
123
|
+
* replayed with the same Idempotency-Key to list what is still missing, for up to three
|
|
124
|
+
* rounds. Completion is then polled until `ready` unless `wait: false`.
|
|
125
|
+
*/
|
|
126
|
+
upload(source: UploadSource, options?: UploadOptions): Promise<File>;
|
|
127
|
+
private sendSingle;
|
|
128
|
+
private sendParts;
|
|
129
|
+
}
|
|
130
|
+
export declare class Jobs extends Resource {
|
|
131
|
+
/**
|
|
132
|
+
* `POST /v1/jobs`. `inspect` takes neither `tool` nor `params`; `repair` takes
|
|
133
|
+
* `RepairParams`; `tool` needs `tool` and that tool's params.
|
|
134
|
+
*/
|
|
135
|
+
create(body: CreateJob, options?: IdempotentOptions): Promise<Job>;
|
|
136
|
+
/**
|
|
137
|
+
* `GET /v1/jobs/{id}/evaluation`: judge a succeeded `cad_check` job's stored measurements
|
|
138
|
+
* against the limits table. Free; ask again with a different question as often as you like.
|
|
139
|
+
*/
|
|
140
|
+
evaluation(jobId: string, query?: EvaluationQuery, options?: CallOptions): Promise<EvaluationList>;
|
|
141
|
+
retrieve(jobId: string, options?: CallOptions): Promise<Job>;
|
|
142
|
+
list(options?: PageOptions): Promise<JobPage>;
|
|
143
|
+
/** Every job in this organization and mode, following `next_cursor`. */
|
|
144
|
+
iterate(options?: Omit<PageOptions, "cursor">): AsyncGenerator<Job>;
|
|
145
|
+
/** `POST /v1/jobs/{id}/cancel`; `409 job_not_cancellable` once it finished. Not retried. */
|
|
146
|
+
cancel(jobId: string, options?: CallOptions): Promise<Job>;
|
|
147
|
+
/** Durable ordered events after sequence `after`; resume with `next_after`. */
|
|
148
|
+
events(jobId: string, options?: CallOptions & {
|
|
149
|
+
after?: number;
|
|
150
|
+
}): Promise<EventPage>;
|
|
151
|
+
/** Every event recorded so far after `after` (does not wait for new ones). */
|
|
152
|
+
iterateEvents(jobId: string, options?: CallOptions & {
|
|
153
|
+
after?: number;
|
|
154
|
+
}): AsyncGenerator<JobEvent>;
|
|
155
|
+
/**
|
|
156
|
+
* Poll `GET /v1/jobs/{id}` until `succeeded`, `failed` or `cancelled`. Transient errors
|
|
157
|
+
* (no response, 429, 502-504) are polled through. Throws `JobFailedError` /
|
|
158
|
+
* `JobCancelledError` (unless `raiseOnFailure: false`) and `WaitTimeoutError` after
|
|
159
|
+
* `timeoutMs` (default 4 h; the job keeps running server-side).
|
|
160
|
+
*/
|
|
161
|
+
wait(jobId: string, options?: JobWaitOptions): Promise<Job>;
|
|
162
|
+
}
|
|
163
|
+
export declare class Artifacts extends Resource {
|
|
164
|
+
/**
|
|
165
|
+
* `GET /v1/jobs/{id}/artifacts`: empty until the job succeeded and its whole result
|
|
166
|
+
* manifest passed verification.
|
|
167
|
+
*/
|
|
168
|
+
list(jobId: string, options?: CallOptions): Promise<Artifact[]>;
|
|
169
|
+
/** `GET /v1/artifacts/{id}/download`: a temporary URL. Keep it confidential. */
|
|
170
|
+
downloadUrl(artifactId: string, options?: CallOptions): Promise<Transfer>;
|
|
171
|
+
/** The artifact's bytes, verified against its size and SHA-256 (any runtime). */
|
|
172
|
+
read(artifact: Artifact, options?: CallOptions): Promise<Uint8Array>;
|
|
173
|
+
/**
|
|
174
|
+
* Save the artifact to `dest` (Node): a file path, or a directory (existing, or ending in
|
|
175
|
+
* a separator) where it is named `<label><ext>`. Written to `*.partial`, verified, then
|
|
176
|
+
* moved into place. Returns the path.
|
|
177
|
+
*/
|
|
178
|
+
download(artifact: Artifact, dest: string, options?: CallOptions): Promise<string>;
|
|
179
|
+
/** Stream with a fresh URL per try; retried on no response or a 5xx; verified. */
|
|
180
|
+
private fetchInto;
|
|
181
|
+
}
|
|
182
|
+
export declare class Exports extends Resource {
|
|
183
|
+
/**
|
|
184
|
+
* `POST /v1/jobs/{id}/exports`: `ready` with the artifact when the job made that format,
|
|
185
|
+
* else `converting` with a charged `conversion_job_id`. Not retried automatically (the
|
|
186
|
+
* spec defines no Idempotency-Key here).
|
|
187
|
+
*/
|
|
188
|
+
create(jobId: string, format: ExportFormat, options?: CallOptions): Promise<Export>;
|
|
189
|
+
/** `GET /v1/jobs/{id}/exports/{format}`; `404` when it was never asked for. */
|
|
190
|
+
retrieve(jobId: string, format: ExportFormat, options?: CallOptions): Promise<Export>;
|
|
191
|
+
/** Poll until `ready`; `ExportFailedError` on `failed`. */
|
|
192
|
+
wait(jobId: string, format: ExportFormat, options?: WaitOptions): Promise<Export>;
|
|
193
|
+
}
|
|
194
|
+
export declare function settledExport(exported: Export): Export;
|
|
195
|
+
export declare class BalanceResource extends Resource {
|
|
196
|
+
/** `GET /v1/balance` (`usage:read`). */
|
|
197
|
+
retrieve(options?: CallOptions): Promise<Balance>;
|
|
198
|
+
/** Every credit movement, newest first; pass `next_before` as `before`. */
|
|
199
|
+
transactions(options?: CallOptions & {
|
|
200
|
+
before?: number;
|
|
201
|
+
limit?: number;
|
|
202
|
+
}): Promise<CreditTransactionPage>;
|
|
203
|
+
iterateTransactions(options?: CallOptions & {
|
|
204
|
+
limit?: number;
|
|
205
|
+
}): AsyncGenerator<CreditTransaction>;
|
|
206
|
+
}
|
|
207
|
+
export declare class Technologies extends Resource {
|
|
208
|
+
/** `GET /v1/technologies` (`jobs:read`): the limits per process and material. */
|
|
209
|
+
retrieve(options?: CallOptions): Promise<TechnologyTable>;
|
|
210
|
+
}
|
|
211
|
+
export declare class WebhookEndpoints extends Resource {
|
|
212
|
+
/** `POST /v1/webhook_endpoints` (`webhooks:manage`). The secret is in this response only. */
|
|
213
|
+
create(body: {
|
|
214
|
+
url: string;
|
|
215
|
+
}, options?: IdempotentOptions): Promise<IssuedWebhookEndpoint>;
|
|
216
|
+
/** Every endpoint of the key's mode, oldest first. Not paged. */
|
|
217
|
+
list(options?: CallOptions): Promise<WebhookEndpoint[]>;
|
|
218
|
+
/** `DELETE /v1/webhook_endpoints/{id}` (204). */
|
|
219
|
+
delete(id: string, options?: CallOptions): Promise<void>;
|
|
220
|
+
}
|
|
221
|
+
export {};
|
|
222
|
+
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAA+B,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EACV,QAAQ,EAER,OAAO,EACP,YAAY,EACZ,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,EACT,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,MAAM,EAEN,WAAW,EACX,YAAY,EACZ,GAAG,EACH,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,aAAa,EAEb,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACT,MAAM,YAAY,CAA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