@ifc-lite/sdk 1.14.6 → 1.16.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/context.d.ts +4 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +6 -0
- package/dist/context.js.map +1 -1
- package/dist/index.d.ts +5 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/namespaces/bsdd.d.ts +16 -1
- package/dist/namespaces/bsdd.d.ts.map +1 -1
- package/dist/namespaces/bsdd.js +74 -24
- package/dist/namespaces/bsdd.js.map +1 -1
- package/dist/namespaces/schedule.d.ts +25 -0
- package/dist/namespaces/schedule.d.ts.map +1 -0
- package/dist/namespaces/schedule.js +26 -0
- package/dist/namespaces/schedule.js.map +1 -0
- package/dist/namespaces/store.d.ts +137 -0
- package/dist/namespaces/store.d.ts.map +1 -0
- package/dist/namespaces/store.js +178 -0
- package/dist/namespaces/store.js.map +1 -0
- package/dist/transport/remote-backend.d.ts +3 -1
- package/dist/transport/remote-backend.d.ts.map +1 -1
- package/dist/transport/remote-backend.js +2 -0
- package/dist/transport/remote-backend.js.map +1 -1
- package/dist/types.d.ts +287 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +13 -2
- package/dist/types.js.map +1 -1
- package/package.json +17 -17
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { AddBeamInStoreParams, AddColumnInStoreParams, AddDoorInStoreParams, AddMemberInStoreParams, AddPlateInStoreParams, AddRoofInStoreParams, AddSlabInStoreParams, AddSpaceInStoreParams, AddWallInStoreParams, AddWindowInStoreParams, BimBackend, EntityRef } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* `bim.store` — document-level edits on a parsed model.
|
|
4
|
+
*
|
|
5
|
+
* Use this for raw STEP edits that don't fit `bim.mutate.*`:
|
|
6
|
+
* - `addEntity` to inject a new entity record
|
|
7
|
+
* - `removeEntity` to drop an existing or newly-added entity
|
|
8
|
+
* - `setPositionalAttribute` to edit non-IfcRoot attributes by index
|
|
9
|
+
* (e.g. `IfcRectangleProfileDef.XDim`)
|
|
10
|
+
*
|
|
11
|
+
* For property-set / quantity / named-attribute edits use `bim.mutate.*`.
|
|
12
|
+
* For building a model from scratch use `bim.create.*`.
|
|
13
|
+
*
|
|
14
|
+
* Changes accumulate in a per-model overlay and are flushed to the IFC
|
|
15
|
+
* file on the next `bim.export.ifc({ applyMutations: true })`.
|
|
16
|
+
*/
|
|
17
|
+
export declare class StoreNamespace {
|
|
18
|
+
private backend;
|
|
19
|
+
constructor(backend: BimBackend);
|
|
20
|
+
/**
|
|
21
|
+
* Inject a new entity into the active model. Returns an `EntityRef`
|
|
22
|
+
* pointing at the freshly-allocated expressId.
|
|
23
|
+
*
|
|
24
|
+
* Pass `def.type` as the canonical IFC EXPRESS PascalCase name
|
|
25
|
+
* (e.g. `'IfcRectangleProfileDef'`). UPPERCASE STEP tokens are also
|
|
26
|
+
* accepted and silently normalized to PascalCase against the schema
|
|
27
|
+
* registry, so the returned `entity.type` always reflects the
|
|
28
|
+
* canonical form regardless of how the caller spelled it.
|
|
29
|
+
*
|
|
30
|
+
* Attribute conventions (mirror `EntityExtractor.extractEntity()`):
|
|
31
|
+
* - numbers → STEP integer / REAL literal
|
|
32
|
+
* - `"#42"` → entity reference
|
|
33
|
+
* - `".AREA."` → enum
|
|
34
|
+
* - `null` → `$`
|
|
35
|
+
* - arrays → STEP list `(a,b,c)` (recursed)
|
|
36
|
+
* - any other string → quoted STEP string
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* const profile = bim.store.addEntity('arch', {
|
|
40
|
+
* type: 'IfcRectangleProfileDef',
|
|
41
|
+
* attributes: ['.AREA.', null, '#34', 0.6, 0.4],
|
|
42
|
+
* });
|
|
43
|
+
*/
|
|
44
|
+
addEntity(modelId: string, def: {
|
|
45
|
+
type: string;
|
|
46
|
+
attributes: unknown[];
|
|
47
|
+
}): EntityRef;
|
|
48
|
+
/**
|
|
49
|
+
* Remove an entity. Tombstones existing source entities so they're
|
|
50
|
+
* skipped on export; forgets overlay-only entities entirely. Returns
|
|
51
|
+
* false if the id is unknown to the store.
|
|
52
|
+
*/
|
|
53
|
+
removeEntity(ref: EntityRef): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Edit a positional STEP argument on any entity by zero-based index.
|
|
56
|
+
* Use this for non-IfcRoot edits like `IfcRectangleProfileDef.XDim`
|
|
57
|
+
* (index 3) where the attribute has no symbolic name.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* // Bump the rectangle profile width from 0.3 to 0.6
|
|
61
|
+
* bim.store.setPositionalAttribute(profileRef, 3, 0.6);
|
|
62
|
+
*/
|
|
63
|
+
setPositionalAttribute(ref: EntityRef, index: number, value: unknown): void;
|
|
64
|
+
/**
|
|
65
|
+
* Add an IfcColumn to a parsed model, anchored to an existing storey.
|
|
66
|
+
* Emits the full STEP sub-graph (placement, profile, extruded solid,
|
|
67
|
+
* representation, IfcRelContainedInSpatialStructure) into the overlay
|
|
68
|
+
* so the column appears next to the existing model on export.
|
|
69
|
+
*
|
|
70
|
+
* `Position` is the base centre in storey-local coordinates (metres),
|
|
71
|
+
* `Width`×`Depth` is the centred rectangular cross-section, and
|
|
72
|
+
* `Height` is the +Z extrusion length.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* const storeyId = bim.query.byType('IfcBuildingStorey')[0].ref.expressId;
|
|
76
|
+
* const col = bim.store.addColumn('arch', storeyId, {
|
|
77
|
+
* Position: [1, 1, 0],
|
|
78
|
+
* Width: 0.3, Depth: 0.4, Height: 3,
|
|
79
|
+
* Name: 'Column 1',
|
|
80
|
+
* });
|
|
81
|
+
*/
|
|
82
|
+
addColumn(modelId: string, storeyExpressId: number, params: AddColumnInStoreParams): EntityRef;
|
|
83
|
+
/**
|
|
84
|
+
* Add an IfcWall from `Start` to `End` (storey-local metres). Profile
|
|
85
|
+
* spans the full length along the wall axis, centred on `Thickness`,
|
|
86
|
+
* and is extruded upward by `Height`.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* bim.store.addWall('arch', storeyId, {
|
|
90
|
+
* Start: [0, 0, 0], End: [5, 0, 0],
|
|
91
|
+
* Thickness: 0.2, Height: 3, Name: 'North Wall',
|
|
92
|
+
* });
|
|
93
|
+
*/
|
|
94
|
+
addWall(modelId: string, storeyExpressId: number, params: AddWallInStoreParams): EntityRef;
|
|
95
|
+
/**
|
|
96
|
+
* Add an IfcSlab. `Position` is the minimum corner; the slab extends
|
|
97
|
+
* `Width` along +X, `Depth` along +Y, and is extruded `Thickness`
|
|
98
|
+
* upward.
|
|
99
|
+
*/
|
|
100
|
+
addSlab(modelId: string, storeyExpressId: number, params: AddSlabInStoreParams): EntityRef;
|
|
101
|
+
/**
|
|
102
|
+
* Add an IfcBeam between `Start` and `End` with a centred rectangular
|
|
103
|
+
* cross-section (`Width` × `Height`). Local Z is the beam axis so the
|
|
104
|
+
* extrusion runs along the beam.
|
|
105
|
+
*/
|
|
106
|
+
addBeam(modelId: string, storeyExpressId: number, params: AddBeamInStoreParams): EntityRef;
|
|
107
|
+
/** Add a free-standing IfcDoor (Width × Height + thin frame depth). */
|
|
108
|
+
addDoor(modelId: string, storeyExpressId: number, params: AddDoorInStoreParams): EntityRef;
|
|
109
|
+
/** Add a free-standing IfcWindow (Width × Height + thin frame depth). */
|
|
110
|
+
addWindow(modelId: string, storeyExpressId: number, params: AddWindowInStoreParams): EntityRef;
|
|
111
|
+
/**
|
|
112
|
+
* Add an IfcSpace (room/zone) — rectangle or polygon footprint
|
|
113
|
+
* extruded vertically by `Height`. Aggregated into the storey via
|
|
114
|
+
* IfcRelAggregates (spaces are spatial-structure children, not
|
|
115
|
+
* IfcRelContainedInSpatialStructure products).
|
|
116
|
+
*/
|
|
117
|
+
addSpace(modelId: string, storeyExpressId: number, params: AddSpaceInStoreParams): EntityRef;
|
|
118
|
+
/**
|
|
119
|
+
* Add an IfcRoof — flat-roof slab variant. Same rectangle/polygon
|
|
120
|
+
* profile shapes as `addSlab` but emits an IfcRoof entity with
|
|
121
|
+
* `.FLAT_ROOF.` PredefinedType.
|
|
122
|
+
*/
|
|
123
|
+
addRoof(modelId: string, storeyExpressId: number, params: AddRoofInStoreParams): EntityRef;
|
|
124
|
+
/**
|
|
125
|
+
* Add an IfcPlate (thin flat element) — rectangle or polygon
|
|
126
|
+
* profile extruded by Thickness. PredefinedType defaults to
|
|
127
|
+
* NOTDEFINED; pass `'CURTAIN_PANEL'` / `'SHEET'` to override.
|
|
128
|
+
*/
|
|
129
|
+
addPlate(modelId: string, storeyExpressId: number, params: AddPlateInStoreParams): EntityRef;
|
|
130
|
+
/**
|
|
131
|
+
* Add an IfcMember (generic structural member — brace, post, strut)
|
|
132
|
+
* between `Start` and `End`. Same axial extrusion as `addBeam`;
|
|
133
|
+
* choose the PredefinedType to disambiguate the role.
|
|
134
|
+
*/
|
|
135
|
+
addMember(modelId: string, storeyExpressId: number, params: AddMemberInStoreParams): EntityRef;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/namespaces/store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,UAAU,EACV,SAAS,EACV,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;GAcG;AACH,qBAAa,cAAc;IACb,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,UAAU;IAEvC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM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,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,SAAS;IAI5F;;;;OAIG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,GAAG,SAAS;CAG/F"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { isKnownType, normalizeIfcTypeName } from '@ifc-lite/parser';
|
|
5
|
+
/**
|
|
6
|
+
* `bim.store` — document-level edits on a parsed model.
|
|
7
|
+
*
|
|
8
|
+
* Use this for raw STEP edits that don't fit `bim.mutate.*`:
|
|
9
|
+
* - `addEntity` to inject a new entity record
|
|
10
|
+
* - `removeEntity` to drop an existing or newly-added entity
|
|
11
|
+
* - `setPositionalAttribute` to edit non-IfcRoot attributes by index
|
|
12
|
+
* (e.g. `IfcRectangleProfileDef.XDim`)
|
|
13
|
+
*
|
|
14
|
+
* For property-set / quantity / named-attribute edits use `bim.mutate.*`.
|
|
15
|
+
* For building a model from scratch use `bim.create.*`.
|
|
16
|
+
*
|
|
17
|
+
* Changes accumulate in a per-model overlay and are flushed to the IFC
|
|
18
|
+
* file on the next `bim.export.ifc({ applyMutations: true })`.
|
|
19
|
+
*/
|
|
20
|
+
export class StoreNamespace {
|
|
21
|
+
backend;
|
|
22
|
+
constructor(backend) {
|
|
23
|
+
this.backend = backend;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Inject a new entity into the active model. Returns an `EntityRef`
|
|
27
|
+
* pointing at the freshly-allocated expressId.
|
|
28
|
+
*
|
|
29
|
+
* Pass `def.type` as the canonical IFC EXPRESS PascalCase name
|
|
30
|
+
* (e.g. `'IfcRectangleProfileDef'`). UPPERCASE STEP tokens are also
|
|
31
|
+
* accepted and silently normalized to PascalCase against the schema
|
|
32
|
+
* registry, so the returned `entity.type` always reflects the
|
|
33
|
+
* canonical form regardless of how the caller spelled it.
|
|
34
|
+
*
|
|
35
|
+
* Attribute conventions (mirror `EntityExtractor.extractEntity()`):
|
|
36
|
+
* - numbers → STEP integer / REAL literal
|
|
37
|
+
* - `"#42"` → entity reference
|
|
38
|
+
* - `".AREA."` → enum
|
|
39
|
+
* - `null` → `$`
|
|
40
|
+
* - arrays → STEP list `(a,b,c)` (recursed)
|
|
41
|
+
* - any other string → quoted STEP string
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* const profile = bim.store.addEntity('arch', {
|
|
45
|
+
* type: 'IfcRectangleProfileDef',
|
|
46
|
+
* attributes: ['.AREA.', null, '#34', 0.6, 0.4],
|
|
47
|
+
* });
|
|
48
|
+
*/
|
|
49
|
+
addEntity(modelId, def) {
|
|
50
|
+
if (!def || typeof def.type !== 'string' || def.type.length === 0) {
|
|
51
|
+
throw new TypeError('addEntity: def.type must be a non-empty IFC type string');
|
|
52
|
+
}
|
|
53
|
+
// Normalisation only canonicalises casing for known names — it leaves
|
|
54
|
+
// unknown strings untouched. The backend's StoreEditor has its own
|
|
55
|
+
// regex guard, but rejecting typos at the SDK boundary gives a much
|
|
56
|
+
// more useful error than a generic STEP-emit failure.
|
|
57
|
+
if (!isKnownType(def.type)) {
|
|
58
|
+
throw new TypeError(`addEntity: unknown IFC type '${def.type}'. Pass a canonical PascalCase name (e.g. 'IfcWall').`);
|
|
59
|
+
}
|
|
60
|
+
return this.backend.store.addEntity(modelId, {
|
|
61
|
+
type: normalizeIfcTypeName(def.type),
|
|
62
|
+
attributes: def.attributes,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Remove an entity. Tombstones existing source entities so they're
|
|
67
|
+
* skipped on export; forgets overlay-only entities entirely. Returns
|
|
68
|
+
* false if the id is unknown to the store.
|
|
69
|
+
*/
|
|
70
|
+
removeEntity(ref) {
|
|
71
|
+
return this.backend.store.removeEntity(ref);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Edit a positional STEP argument on any entity by zero-based index.
|
|
75
|
+
* Use this for non-IfcRoot edits like `IfcRectangleProfileDef.XDim`
|
|
76
|
+
* (index 3) where the attribute has no symbolic name.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* // Bump the rectangle profile width from 0.3 to 0.6
|
|
80
|
+
* bim.store.setPositionalAttribute(profileRef, 3, 0.6);
|
|
81
|
+
*/
|
|
82
|
+
setPositionalAttribute(ref, index, value) {
|
|
83
|
+
this.backend.store.setPositionalAttribute(ref, index, value);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Add an IfcColumn to a parsed model, anchored to an existing storey.
|
|
87
|
+
* Emits the full STEP sub-graph (placement, profile, extruded solid,
|
|
88
|
+
* representation, IfcRelContainedInSpatialStructure) into the overlay
|
|
89
|
+
* so the column appears next to the existing model on export.
|
|
90
|
+
*
|
|
91
|
+
* `Position` is the base centre in storey-local coordinates (metres),
|
|
92
|
+
* `Width`×`Depth` is the centred rectangular cross-section, and
|
|
93
|
+
* `Height` is the +Z extrusion length.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* const storeyId = bim.query.byType('IfcBuildingStorey')[0].ref.expressId;
|
|
97
|
+
* const col = bim.store.addColumn('arch', storeyId, {
|
|
98
|
+
* Position: [1, 1, 0],
|
|
99
|
+
* Width: 0.3, Depth: 0.4, Height: 3,
|
|
100
|
+
* Name: 'Column 1',
|
|
101
|
+
* });
|
|
102
|
+
*/
|
|
103
|
+
addColumn(modelId, storeyExpressId, params) {
|
|
104
|
+
return this.backend.store.addColumn(modelId, storeyExpressId, params);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Add an IfcWall from `Start` to `End` (storey-local metres). Profile
|
|
108
|
+
* spans the full length along the wall axis, centred on `Thickness`,
|
|
109
|
+
* and is extruded upward by `Height`.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* bim.store.addWall('arch', storeyId, {
|
|
113
|
+
* Start: [0, 0, 0], End: [5, 0, 0],
|
|
114
|
+
* Thickness: 0.2, Height: 3, Name: 'North Wall',
|
|
115
|
+
* });
|
|
116
|
+
*/
|
|
117
|
+
addWall(modelId, storeyExpressId, params) {
|
|
118
|
+
return this.backend.store.addWall(modelId, storeyExpressId, params);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Add an IfcSlab. `Position` is the minimum corner; the slab extends
|
|
122
|
+
* `Width` along +X, `Depth` along +Y, and is extruded `Thickness`
|
|
123
|
+
* upward.
|
|
124
|
+
*/
|
|
125
|
+
addSlab(modelId, storeyExpressId, params) {
|
|
126
|
+
return this.backend.store.addSlab(modelId, storeyExpressId, params);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Add an IfcBeam between `Start` and `End` with a centred rectangular
|
|
130
|
+
* cross-section (`Width` × `Height`). Local Z is the beam axis so the
|
|
131
|
+
* extrusion runs along the beam.
|
|
132
|
+
*/
|
|
133
|
+
addBeam(modelId, storeyExpressId, params) {
|
|
134
|
+
return this.backend.store.addBeam(modelId, storeyExpressId, params);
|
|
135
|
+
}
|
|
136
|
+
/** Add a free-standing IfcDoor (Width × Height + thin frame depth). */
|
|
137
|
+
addDoor(modelId, storeyExpressId, params) {
|
|
138
|
+
return this.backend.store.addDoor(modelId, storeyExpressId, params);
|
|
139
|
+
}
|
|
140
|
+
/** Add a free-standing IfcWindow (Width × Height + thin frame depth). */
|
|
141
|
+
addWindow(modelId, storeyExpressId, params) {
|
|
142
|
+
return this.backend.store.addWindow(modelId, storeyExpressId, params);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Add an IfcSpace (room/zone) — rectangle or polygon footprint
|
|
146
|
+
* extruded vertically by `Height`. Aggregated into the storey via
|
|
147
|
+
* IfcRelAggregates (spaces are spatial-structure children, not
|
|
148
|
+
* IfcRelContainedInSpatialStructure products).
|
|
149
|
+
*/
|
|
150
|
+
addSpace(modelId, storeyExpressId, params) {
|
|
151
|
+
return this.backend.store.addSpace(modelId, storeyExpressId, params);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Add an IfcRoof — flat-roof slab variant. Same rectangle/polygon
|
|
155
|
+
* profile shapes as `addSlab` but emits an IfcRoof entity with
|
|
156
|
+
* `.FLAT_ROOF.` PredefinedType.
|
|
157
|
+
*/
|
|
158
|
+
addRoof(modelId, storeyExpressId, params) {
|
|
159
|
+
return this.backend.store.addRoof(modelId, storeyExpressId, params);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Add an IfcPlate (thin flat element) — rectangle or polygon
|
|
163
|
+
* profile extruded by Thickness. PredefinedType defaults to
|
|
164
|
+
* NOTDEFINED; pass `'CURTAIN_PANEL'` / `'SHEET'` to override.
|
|
165
|
+
*/
|
|
166
|
+
addPlate(modelId, storeyExpressId, params) {
|
|
167
|
+
return this.backend.store.addPlate(modelId, storeyExpressId, params);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Add an IfcMember (generic structural member — brace, post, strut)
|
|
171
|
+
* between `Start` and `End`. Same axial extrusion as `addBeam`;
|
|
172
|
+
* choose the PredefinedType to disambiguate the role.
|
|
173
|
+
*/
|
|
174
|
+
addMember(modelId, storeyExpressId, params) {
|
|
175
|
+
return this.backend.store.addMember(modelId, storeyExpressId, params);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/namespaces/store.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAgBrE;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,cAAc;IACL;IAApB,YAAoB,OAAmB;QAAnB,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AC;IACtE,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,OAAe,EAAE,eAAuB,EAAE,MAA6B;QAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;IACvE,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,OAAe,EAAE,eAAuB,EAAE,MAA8B;QAChF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Each typed namespace is a Proxy that throws synchronously, since the remote transport
|
|
6
6
|
* requires async implementation (future iteration).
|
|
7
7
|
*/
|
|
8
|
-
import type { BimBackend, Transport, BimEventType, ModelBackendMethods, QueryBackendMethods, SelectionBackendMethods, VisibilityBackendMethods, ViewerBackendMethods, MutateBackendMethods, SpatialBackendMethods, ExportBackendMethods, LensBackendMethods, FilesBackendMethods } from '../types.js';
|
|
8
|
+
import type { BimBackend, Transport, BimEventType, ModelBackendMethods, QueryBackendMethods, SelectionBackendMethods, VisibilityBackendMethods, ViewerBackendMethods, MutateBackendMethods, StoreBackendMethods, SpatialBackendMethods, ExportBackendMethods, LensBackendMethods, FilesBackendMethods, ScheduleBackendMethods } from '../types.js';
|
|
9
9
|
export declare class RemoteBackend implements BimBackend {
|
|
10
10
|
private transport;
|
|
11
11
|
readonly model: ModelBackendMethods;
|
|
@@ -14,10 +14,12 @@ export declare class RemoteBackend implements BimBackend {
|
|
|
14
14
|
readonly visibility: VisibilityBackendMethods;
|
|
15
15
|
readonly viewer: ViewerBackendMethods;
|
|
16
16
|
readonly mutate: MutateBackendMethods;
|
|
17
|
+
readonly store: StoreBackendMethods;
|
|
17
18
|
readonly spatial: SpatialBackendMethods;
|
|
18
19
|
readonly export: ExportBackendMethods;
|
|
19
20
|
readonly lens: LensBackendMethods;
|
|
20
21
|
readonly files: FilesBackendMethods;
|
|
22
|
+
readonly schedule: ScheduleBackendMethods;
|
|
21
23
|
constructor(transport: Transport);
|
|
22
24
|
subscribe(event: BimEventType, handler: (data: unknown) => void): () => void;
|
|
23
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-backend.d.ts","sourceRoot":"","sources":["../../src/transport/remote-backend.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"remote-backend.d.ts","sourceRoot":"","sources":["../../src/transport/remote-backend.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAerB,qBAAa,aAAc,YAAW,UAAU;IAclC,OAAO,CAAC,SAAS;IAb7B,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAA4B;IAC/D,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAA4B;IAC/D,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAgC;IAC3E,QAAQ,CAAC,UAAU,EAAE,wBAAwB,CAAiC;IAC9E,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAA6B;IAClE,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAA6B;IAClE,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAA4B;IAC/D,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAA8B;IACrE,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAA6B;IAClE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAA2B;IAC5D,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAA4B;IAC/D,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAA+B;gBAEpD,SAAS,EAAE,SAAS;IAExC,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI;CAO7E"}
|
|
@@ -19,10 +19,12 @@ export class RemoteBackend {
|
|
|
19
19
|
visibility = makeRemoteProxy('visibility');
|
|
20
20
|
viewer = makeRemoteProxy('viewer');
|
|
21
21
|
mutate = makeRemoteProxy('mutate');
|
|
22
|
+
store = makeRemoteProxy('store');
|
|
22
23
|
spatial = makeRemoteProxy('spatial');
|
|
23
24
|
export = makeRemoteProxy('export');
|
|
24
25
|
lens = makeRemoteProxy('lens');
|
|
25
26
|
files = makeRemoteProxy('files');
|
|
27
|
+
schedule = makeRemoteProxy('schedule');
|
|
26
28
|
constructor(transport) {
|
|
27
29
|
this.transport = transport;
|
|
28
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-backend.js","sourceRoot":"","sources":["../../src/transport/remote-backend.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
+
{"version":3,"file":"remote-backend.js","sourceRoot":"","sources":["../../src/transport/remote-backend.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA4B/D,SAAS,eAAe,CAAmB,SAAiB;IAC1D,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAM,EAAE;QACzC,GAAG,CAAC,CAAC,EAAE,MAAc;YACnB,OAAO,CAAC,GAAG,KAAgB,EAAS,EAAE;gBACpC,MAAM,IAAI,KAAK,CACb,8BAA8B,SAAS,IAAI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