@bitbybit-dev/cad-cloud-sdk 1.4.1 → 1.5.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +6 -3
- package/dist/client.js.map +1 -1
- package/dist/endpoints/files.d.ts.map +1 -1
- package/dist/endpoints/files.js +8 -4
- package/dist/endpoints/files.js.map +1 -1
- package/dist/endpoints/tasks.d.ts.map +1 -1
- package/dist/endpoints/tasks.js +8 -4
- package/dist/endpoints/tasks.js.map +1 -1
- package/dist/types/generated.d.ts +4 -4
- package/dist/types/generated.d.ts.map +1 -1
- package/dist/types/pipeline-operations.d.ts +946 -94
- package/dist/types/pipeline-operations.d.ts.map +1 -1
- package/dist/types/pipeline-operations.js +1 -1
- package/dist/types/pipeline-operations.js.map +1 -1
- package/dist/types/schema-exports.d.ts +2 -2
- package/dist/types/schema-exports.d.ts.map +1 -1
- package/dist/validation/request-schemas.d.ts +1 -1
- package/dist/validation/request-schemas.d.ts.map +1 -1
- package/dist/validation/request-schemas.js +3 -1
- package/dist/validation/request-schemas.js.map +1 -1
- package/dist/validation/validator.d.ts.map +1 -1
- package/dist/validation/validator.js +4 -2
- package/dist/validation/validator.js.map +1 -1
- package/package.json +1 -1
- package/src/__test__/helpers.ts +6 -18
- package/src/client.ts +9 -3
- package/src/endpoints/files.ts +12 -4
- package/src/endpoints/tasks.ts +12 -4
- package/src/polling.test.ts +1 -1
- package/src/types/generated.ts +4 -4
- package/src/types/pipeline-operations.ts +977 -94
- package/src/types/schema-exports.ts +2 -2
- package/src/validation/request-schemas.ts +3 -1
- package/src/validation/validator.ts +6 -2
|
@@ -114,9 +114,9 @@ export type PhoneNestParams = components["schemas"]["PhoneNestParams"];
|
|
|
114
114
|
export type PipelineAnyStep = components["schemas"]["PipelineAnyStep"];
|
|
115
115
|
/** Execute a chain of Bitbybit CAD operations sequentially. Supports $ref:N step references, $file:N file inputs, map iteration, and choice conditionals. */
|
|
116
116
|
export type PipelineBody = components["schemas"]["PipelineBody"];
|
|
117
|
-
/** Pipeline output file format. Includes all standard formats plus: 'json' (JSON data), 'csv' (CSV text), 'stl' (binary STL mesh - Manifold/JSCAD only), '3mf' (3MF mesh package - Manifold/JSCAD only). */
|
|
117
|
+
/** Pipeline output file format. Includes all standard formats plus: 'json' (JSON data), 'csv' (CSV text), 'stl' (binary STL mesh - Manifold/JSCAD only), '3mf' (3MF mesh package - Manifold/JSCAD only), 'brep' (OpenCascade BREP as text, which OCCT-based tools such as FreeCAD read) and 'brep-binary' (OpenCascade binary BREP, the smallest and fastest exact form, which keeps the numbering of faces and edges; read back with occt.io.loadBrepBinary) - both OCCT only, without triangulation. */
|
|
118
118
|
export type PipelineOutputFormat = components["schemas"]["PipelineOutputFormat"];
|
|
119
|
-
/** Controls which output formats are generated for pipeline results. Supports additional formats (json, csv, stl, 3mf) beyond standard model outputs. */
|
|
119
|
+
/** Controls which output formats are generated for pipeline results. Supports additional formats (json, csv, stl, 3mf, brep, brep-binary) beyond standard model outputs. */
|
|
120
120
|
export type PipelineOutputOptions = components["schemas"]["PipelineOutputOptions"];
|
|
121
121
|
/** A single step in a sequential CAD pipeline. Steps can reference outputs of earlier steps via $ref or input files via $file. */
|
|
122
122
|
export type PipelineStep = components["schemas"]["PipelineStep"];
|
|
@@ -20,11 +20,15 @@ const validators = new Map<string, Validator>();
|
|
|
20
20
|
|
|
21
21
|
function getValidator(schemaName: string): Validator | undefined {
|
|
22
22
|
const cached = validators.get(schemaName);
|
|
23
|
-
if (cached)
|
|
23
|
+
if (cached) {
|
|
24
|
+
return cached;
|
|
25
|
+
}
|
|
24
26
|
|
|
25
27
|
const defs: Readonly<Record<string, unknown>> = schemaBundle.$defs;
|
|
26
28
|
const def = defs[schemaName];
|
|
27
|
-
if (!def)
|
|
29
|
+
if (!def) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
28
32
|
|
|
29
33
|
const rootSchema: Schema = {
|
|
30
34
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|