@snaptrude/plugin-core 0.0.7 → 0.0.9
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/AGENTS.md +145 -0
- package/CLAUDE.md +11 -0
- package/dist/api/entity/department.d.ts +99 -0
- package/dist/api/entity/department.d.ts.map +1 -0
- package/dist/api/entity/index.d.ts +5 -0
- package/dist/api/entity/index.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +10 -6
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/index.cjs +157 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +153 -125
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/entity/department.ts +113 -0
- package/src/api/entity/index.ts +5 -0
- package/src/api/entity/space.ts +2 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Plugin Core — Agent Guide
|
|
2
|
+
|
|
3
|
+
This package is the **single source of truth** for all Snaptrude plugin API definitions.
|
|
4
|
+
Every change here has downstream ripple effects. Follow the checklist below **before
|
|
5
|
+
considering your work done**.
|
|
6
|
+
|
|
7
|
+
## What this package contains
|
|
8
|
+
|
|
9
|
+
- Abstract API classes (`src/api/`) — define method signatures, JSDoc, and Zod schemas
|
|
10
|
+
- Shared types (`src/types.ts`) — `ComponentId`, `PluginApiReturn<T>`, etc.
|
|
11
|
+
- Host utilities (`src/host-utils.ts`) — `PluginApiMethodMap`, `PluginApiMethod`, RPC payload types
|
|
12
|
+
|
|
13
|
+
## Quick commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm check-types # typecheck (no emit)
|
|
17
|
+
pnpm build # tsup build (ESM + CJS)
|
|
18
|
+
pnpm dev # tsup watch mode
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Change propagation checklist
|
|
22
|
+
|
|
23
|
+
Any time you add, remove, rename, or change the signature of an API method or type in
|
|
24
|
+
this package, you **must** propagate changes to all downstream consumers. Use this
|
|
25
|
+
checklist:
|
|
26
|
+
|
|
27
|
+
### 1. Client implementation — `packages/plugin-client/`
|
|
28
|
+
|
|
29
|
+
> See [`packages/plugin-client/AGENTS.md`](../../packages/plugin-client/AGENTS.md) for client-specific guidance.
|
|
30
|
+
|
|
31
|
+
Every abstract method in `plugin-core` has a concrete implementation in `plugin-client`.
|
|
32
|
+
The file structure mirrors this package 1:1:
|
|
33
|
+
|
|
34
|
+
| plugin-core source | plugin-client counterpart |
|
|
35
|
+
| ------------------------------------- | ------------------------------------------ |
|
|
36
|
+
| `src/api/core/math/vec3.ts` | `src/api/core/math/vec3.ts` |
|
|
37
|
+
| `src/api/core/math/quat.ts` | `src/api/core/math/quat.ts` |
|
|
38
|
+
| `src/api/core/geom/line.ts` | `src/api/core/geom/line.ts` |
|
|
39
|
+
| `src/api/core/geom/arc.ts` | `src/api/core/geom/arc.ts` |
|
|
40
|
+
| `src/api/core/geom/curve.ts` | `src/api/core/geom/curve.ts` |
|
|
41
|
+
| `src/api/core/geom/profile.ts` | `src/api/core/geom/profile.ts` |
|
|
42
|
+
| `src/api/entity/space.ts` | `src/api/entity/space.ts` |
|
|
43
|
+
| `src/api/entity/story.ts` | `src/api/entity/story.ts` |
|
|
44
|
+
| `src/api/entity/referenceLine.ts` | `src/api/entity/referenceLine.ts` |
|
|
45
|
+
| `src/api/entity/department.ts` | `src/api/entity/department.ts` |
|
|
46
|
+
| `src/api/tools/selection.ts` | `src/api/tools/selection.ts` |
|
|
47
|
+
| `src/api/tools/transform.ts` | `src/api/tools/transform.ts` |
|
|
48
|
+
| `src/api/units/index.ts` | `src/api/units/index.ts` |
|
|
49
|
+
|
|
50
|
+
- **New method**: Add the concrete implementation (pure math = direct impl; host API = `getHostApi().call(...)`)
|
|
51
|
+
- **Removed method**: Delete from client
|
|
52
|
+
- **Renamed/signature change**: Update the client method to match
|
|
53
|
+
- **New API module** (new file): Create the corresponding client file and wire it into the parent barrel (`index.ts`)
|
|
54
|
+
|
|
55
|
+
### 2. Host implementation — `apps/snaptrudereact/src/app/plugins/api/`
|
|
56
|
+
|
|
57
|
+
> See [`apps/snaptrudereact/src/app/plugins/AGENTS.md`](../../apps/snaptrudereact/src/app/plugins/AGENTS.md) for host-specific guidance.
|
|
58
|
+
|
|
59
|
+
Same 1:1 mirror. Host classes extend the abstract classes from plugin-core and provide
|
|
60
|
+
the actual Snaptrude-internal implementation.
|
|
61
|
+
|
|
62
|
+
- **New method**: Implement using Snaptrude internals. Use Zod `.parse()` for input validation.
|
|
63
|
+
- **Removed method**: Delete from host
|
|
64
|
+
- **Renamed/signature change**: Update the host method to match
|
|
65
|
+
- **New API module**: Create the host file, wire into barrel, and add to `SnaptrudePluginApi` in `api/index.ts`
|
|
66
|
+
- **New types/converters**: If the new API introduces types that bridge plugin <-> internal representations, add converters in `apps/snaptrudereact/src/app/plugins/converters/`
|
|
67
|
+
|
|
68
|
+
### 3. JSDoc — keep it complete
|
|
69
|
+
|
|
70
|
+
All public methods and types **must** have JSDoc with:
|
|
71
|
+
- A brief description
|
|
72
|
+
- `@param` for each parameter (with type and description)
|
|
73
|
+
- `@returns` description
|
|
74
|
+
- `@example` where helpful (especially for entity/tools APIs)
|
|
75
|
+
|
|
76
|
+
JSDoc in this package is the source of truth for the API docs site.
|
|
77
|
+
|
|
78
|
+
### 4. API documentation — `apps/snaptrudereact/api-docs/`
|
|
79
|
+
|
|
80
|
+
> See [`apps/snaptrudereact/api-docs/AGENTS.md`](../../apps/snaptrudereact/api-docs/AGENTS.md) for the full source-to-doc mapping and sync procedure.
|
|
81
|
+
|
|
82
|
+
In summary:
|
|
83
|
+
|
|
84
|
+
- **Changed method**: Update the corresponding `.md` doc page to match the new JSDoc
|
|
85
|
+
- **New API module**: Create a new doc page following the template in `AGENTS.md`, and add it to `.vitepress/sidebar.mts`
|
|
86
|
+
- **Removed API module**: Delete the doc page and remove from sidebar
|
|
87
|
+
|
|
88
|
+
### 5. Console tests — `apps/snaptrudereact/src/app/plugins/apiConsoleTesting/`
|
|
89
|
+
|
|
90
|
+
> See [`apps/snaptrudereact/src/app/plugins/AGENTS.md`](../../apps/snaptrudereact/src/app/plugins/AGENTS.md) for test harness details.
|
|
91
|
+
|
|
92
|
+
These are in-browser integration tests that exercise the plugin API end-to-end.
|
|
93
|
+
|
|
94
|
+
| plugin-core API module | Test file |
|
|
95
|
+
| ----------------------------- | -------------------------- |
|
|
96
|
+
| `core/math/*` | `tests/math.ts` |
|
|
97
|
+
| `core/geom/*` | `tests/geom.ts` |
|
|
98
|
+
| `entity/space.ts` | `tests/spaces.ts` |
|
|
99
|
+
| `entity/story.ts` | `tests/story.ts` |
|
|
100
|
+
| `entity/referenceLine.ts` | `tests/referenceLines.ts` |
|
|
101
|
+
| `entity/department.ts` | `tests/departments.ts` |
|
|
102
|
+
| `tools/selection.ts` | `tests/selection.ts` |
|
|
103
|
+
| `tools/transform.ts` | `tests/transform.ts` |
|
|
104
|
+
| `units/index.ts` | `tests/units.ts` |
|
|
105
|
+
|
|
106
|
+
- **New method**: Add test cases covering the new method
|
|
107
|
+
- **Removed method**: Remove corresponding tests
|
|
108
|
+
- **Signature change**: Update test calls to match new signature
|
|
109
|
+
- **New API module**: Create a new test file under `tests/` and import it in `tests/index.ts`
|
|
110
|
+
|
|
111
|
+
### 6. Host-side Jest unit tests
|
|
112
|
+
|
|
113
|
+
Some host implementations have co-located `.test.ts` files:
|
|
114
|
+
- `api/core/math/vec3.test.ts`, `quat.test.ts`
|
|
115
|
+
- `api/core/geom/line.test.ts`, `arc.test.ts`, `curve.test.ts`
|
|
116
|
+
- `api/units/index.test.ts`
|
|
117
|
+
|
|
118
|
+
If your change affects pure math/geom/units logic, update the corresponding Jest tests.
|
|
119
|
+
|
|
120
|
+
### 7. Downstream consumers (breaking changes only)
|
|
121
|
+
|
|
122
|
+
If your change is **breaking** (removed method, renamed method, changed required args),
|
|
123
|
+
check **all** consumers of `@snaptrude/plugin-client` or `@snaptrude/plugin-core`:
|
|
124
|
+
|
|
125
|
+
- Internal plugins under `plugins/`
|
|
126
|
+
- Example plugins under `examples/` — these are consumer-facing templates used by
|
|
127
|
+
`create-snaptrude-plugin`, so they must compile and demonstrate correct API usage
|
|
128
|
+
|
|
129
|
+
Search these directories for usage of the changed API and update accordingly.
|
|
130
|
+
|
|
131
|
+
## Adding a new API namespace (end-to-end)
|
|
132
|
+
|
|
133
|
+
When adding an entirely new namespace (e.g. `snaptrude.materials`):
|
|
134
|
+
|
|
135
|
+
1. **plugin-core**: Create abstract class + Zod schemas + types in `src/api/<namespace>/`
|
|
136
|
+
2. **plugin-core**: Export from `src/api/index.ts` and add as property on `PluginApi`
|
|
137
|
+
3. **plugin-core**: Verify `host-utils.ts` types auto-infer the new methods (they should via `ExtractMethodPaths`)
|
|
138
|
+
4. **plugin-client**: Create client implementation in `src/api/<namespace>/`
|
|
139
|
+
5. **plugin-client**: Wire into `ClientPluginApi` and export from `src/api/index.ts`
|
|
140
|
+
6. **host**: Create host implementation in `apps/snaptrudereact/src/app/plugins/api/<namespace>/`
|
|
141
|
+
7. **host**: Add to `SnaptrudePluginApi` class in `api/index.ts`
|
|
142
|
+
8. **docs**: Create doc pages, update sidebar, follow [`apps/snaptrudereact/api-docs/AGENTS.md`](../../apps/snaptrudereact/api-docs/AGENTS.md) template
|
|
143
|
+
9. **tests**: Add console test file + Jest tests for pure logic
|
|
144
|
+
10. **examples**: Update example plugins if they should showcase the new namespace
|
|
145
|
+
11. **build**: Run `pnpm check-types` in plugin-core, plugin-client, and snaptrudereact
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
> **All coding standards, checks, and guidance live in [`AGENTS.md`](AGENTS.md).**
|
|
4
|
+
> `CLAUDE.md` is a pointer only — add all new rules, patterns, and instructions to `AGENTS.md`.
|
|
5
|
+
|
|
6
|
+
See [AGENTS.md](AGENTS.md) for:
|
|
7
|
+
|
|
8
|
+
- What this package contains and quick commands
|
|
9
|
+
- **Change propagation checklist** — the mandatory downstream sync steps for any API change
|
|
10
|
+
- File mappings to plugin-client, host implementation, docs, and tests
|
|
11
|
+
- End-to-end guide for adding a new API namespace
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Department management — create and query departments.
|
|
5
|
+
*
|
|
6
|
+
* A **department** is a named, colored grouping applied to spaces.
|
|
7
|
+
* Departments are used to categorize spaces by function (e.g. "FOH",
|
|
8
|
+
* "Emergency", "Residential") and control their visual appearance.
|
|
9
|
+
*
|
|
10
|
+
* Accessed via `snaptrude.entity.department`.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class PluginDepartmentApi {
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Create a new department.
|
|
16
|
+
*
|
|
17
|
+
* @param args - An object containing:
|
|
18
|
+
* - {@linkcode PluginDepartmentCreateArgs.name args.name} — Display name
|
|
19
|
+
* - {@linkcode PluginDepartmentCreateArgs.color args.color} — CSS hex color string (e.g. `"#b5e1dc"`)
|
|
20
|
+
* @returns A {@linkcode PluginDepartmentCreateResult} with the `departmentId`
|
|
21
|
+
* of the created department
|
|
22
|
+
* @throws If department creation fails
|
|
23
|
+
*
|
|
24
|
+
* # Example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const { departmentId } = await snaptrude.entity.department.create({
|
|
27
|
+
* name: "Emergency",
|
|
28
|
+
* color: "#f5e68b",
|
|
29
|
+
* })
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
abstract create(args: PluginDepartmentCreateArgs): PluginApiReturn<PluginDepartmentCreateResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Get all departments in the current project.
|
|
35
|
+
*
|
|
36
|
+
* Returns every department including well-known ones (Default, Site, etc.)
|
|
37
|
+
* and user-created departments.
|
|
38
|
+
*
|
|
39
|
+
* @returns A {@linkcode PluginDepartmentGetAllResult} with a `departments` array
|
|
40
|
+
*
|
|
41
|
+
* # Example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const { departments } = await snaptrude.entity.department.getAll()
|
|
44
|
+
* for (const dept of departments) {
|
|
45
|
+
* console.log(dept.id, dept.name, dept.color)
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
abstract getAll(): PluginApiReturn<PluginDepartmentGetAllResult>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Arguments for {@linkcode PluginDepartmentApi.create}.
|
|
53
|
+
*
|
|
54
|
+
* | Property | Type | Description |
|
|
55
|
+
* |---|---|---|
|
|
56
|
+
* | `name` | `string` | Display name of the department |
|
|
57
|
+
* | `color` | `string` | CSS hex color string (e.g. `"#b5e1dc"`) |
|
|
58
|
+
*/
|
|
59
|
+
export declare const PluginDepartmentCreateArgs: z.ZodObject<{
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
color: z.ZodString;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export type PluginDepartmentCreateArgs = z.infer<typeof PluginDepartmentCreateArgs>;
|
|
64
|
+
/**
|
|
65
|
+
* Result of {@linkcode PluginDepartmentApi.create}.
|
|
66
|
+
*
|
|
67
|
+
* | Property | Type | Description |
|
|
68
|
+
* |---|---|---|
|
|
69
|
+
* | `departmentId` | `string` | Unique ID of the created department |
|
|
70
|
+
*/
|
|
71
|
+
export declare const PluginDepartmentCreateResult: z.ZodObject<{
|
|
72
|
+
departmentId: z.ZodString;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export type PluginDepartmentCreateResult = z.infer<typeof PluginDepartmentCreateResult>;
|
|
75
|
+
/**
|
|
76
|
+
* A single department entry returned by {@linkcode PluginDepartmentApi.getAll}.
|
|
77
|
+
*/
|
|
78
|
+
export declare const PluginDepartmentEntry: z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
color: z.ZodString;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export type PluginDepartmentEntry = z.infer<typeof PluginDepartmentEntry>;
|
|
84
|
+
/**
|
|
85
|
+
* Result of {@linkcode PluginDepartmentApi.getAll}.
|
|
86
|
+
*
|
|
87
|
+
* | Property | Type | Description |
|
|
88
|
+
* |---|---|---|
|
|
89
|
+
* | `departments` | {@linkcode PluginDepartmentEntry}`[]` | All departments in the project |
|
|
90
|
+
*/
|
|
91
|
+
export declare const PluginDepartmentGetAllResult: z.ZodObject<{
|
|
92
|
+
departments: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
color: z.ZodString;
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export type PluginDepartmentGetAllResult = z.infer<typeof PluginDepartmentGetAllResult>;
|
|
99
|
+
//# sourceMappingURL=department.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"department.d.ts","sourceRoot":"","sources":["../../../src/api/entity/department.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;GAQG;AACH,8BAAsB,mBAAmB;;IAGvC;;;;;;;;;;;;;;;;;OAiBG;aACa,MAAM,CACpB,IAAI,EAAE,0BAA0B,GAC/B,eAAe,CAAC,4BAA4B,CAAC;IAEhD;;;;;;;;;;;;;;;OAeG;aACa,MAAM,IAAI,eAAe,CAAC,4BAA4B,CAAC;CACxE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B;;;;;;iBAEvC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PluginDepartmentApi } from "./department";
|
|
1
2
|
import { PluginReferenceLineApi } from "./referenceLine";
|
|
2
3
|
import { PluginSpaceApi } from "./space";
|
|
3
4
|
import { PluginStoryApi } from "./story";
|
|
@@ -7,6 +8,7 @@ import { PluginStoryApi } from "./story";
|
|
|
7
8
|
* - {@linkcode PluginEntityApi.space} — Create, query, and delete spaces (rooms/masses)
|
|
8
9
|
* - {@linkcode PluginEntityApi.story} — Create, query, and update stories (floors)
|
|
9
10
|
* - {@linkcode PluginEntityApi.referenceLine} — Create, query, and delete reference lines
|
|
11
|
+
* - {@linkcode PluginEntityApi.department} — Create and query departments
|
|
10
12
|
*/
|
|
11
13
|
export declare abstract class PluginEntityApi {
|
|
12
14
|
/** Space (room/mass) operations. See {@linkcode PluginSpaceApi}. */
|
|
@@ -15,8 +17,11 @@ export declare abstract class PluginEntityApi {
|
|
|
15
17
|
abstract story: PluginStoryApi;
|
|
16
18
|
/** Reference line operations. See {@linkcode PluginReferenceLineApi}. */
|
|
17
19
|
abstract referenceLine: PluginReferenceLineApi;
|
|
20
|
+
/** Department operations. See {@linkcode PluginDepartmentApi}. */
|
|
21
|
+
abstract department: PluginDepartmentApi;
|
|
18
22
|
constructor();
|
|
19
23
|
}
|
|
24
|
+
export * from "./department";
|
|
20
25
|
export * from "./referenceLine";
|
|
21
26
|
export * from "./space";
|
|
22
27
|
export * from "./story";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/entity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/entity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;GAOG;AACH,8BAAsB,eAAe;IACnC,oEAAoE;IACpE,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,uEAAuE;IACvE,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,yEAAyE;IACzE,SAAgB,aAAa,EAAE,sBAAsB,CAAA;IACrD,kEAAkE;IAClE,SAAgB,UAAU,EAAE,mBAAmB,CAAA;;CAGhD;AAED,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
@@ -311,19 +311,19 @@ export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreat
|
|
|
311
311
|
* | `"planPoints"` | {@linkcode PVec3}`[]` | Bottom outer profile points in world space with `y = 0` (2D plan). No closing duplicate point. |
|
|
312
312
|
*/
|
|
313
313
|
export declare const PluginSpaceGetProperty: z.ZodEnum<{
|
|
314
|
+
name: "name";
|
|
315
|
+
departmentId: "departmentId";
|
|
316
|
+
id: "id";
|
|
314
317
|
position: "position";
|
|
315
318
|
height: "height";
|
|
316
319
|
depth: "depth";
|
|
317
|
-
id: "id";
|
|
318
320
|
type: "type";
|
|
319
321
|
room_type: "room_type";
|
|
320
|
-
name: "name";
|
|
321
322
|
area: "area";
|
|
322
323
|
breadth: "breadth";
|
|
323
324
|
massType: "massType";
|
|
324
325
|
spaceType: "spaceType";
|
|
325
326
|
storey: "storey";
|
|
326
|
-
departmentId: "departmentId";
|
|
327
327
|
departmentName: "departmentName";
|
|
328
328
|
departmentColor: "departmentColor";
|
|
329
329
|
absolutePosition: "absolutePosition";
|
|
@@ -342,19 +342,19 @@ export declare const PluginSpaceGetProperty: z.ZodEnum<{
|
|
|
342
342
|
export declare const PluginSpaceGetArgs: z.ZodObject<{
|
|
343
343
|
spaceId: z.ZodString;
|
|
344
344
|
properties: z.ZodArray<z.ZodEnum<{
|
|
345
|
+
name: "name";
|
|
346
|
+
departmentId: "departmentId";
|
|
347
|
+
id: "id";
|
|
345
348
|
position: "position";
|
|
346
349
|
height: "height";
|
|
347
350
|
depth: "depth";
|
|
348
|
-
id: "id";
|
|
349
351
|
type: "type";
|
|
350
352
|
room_type: "room_type";
|
|
351
|
-
name: "name";
|
|
352
353
|
area: "area";
|
|
353
354
|
breadth: "breadth";
|
|
354
355
|
massType: "massType";
|
|
355
356
|
spaceType: "spaceType";
|
|
356
357
|
storey: "storey";
|
|
357
|
-
departmentId: "departmentId";
|
|
358
358
|
departmentName: "departmentName";
|
|
359
359
|
departmentColor: "departmentColor";
|
|
360
360
|
absolutePosition: "absolutePosition";
|
|
@@ -379,6 +379,7 @@ export type PluginSpaceGetArgs = z.infer<typeof PluginSpaceGetArgs>;
|
|
|
379
379
|
* | `"Deck"` | Deck |
|
|
380
380
|
* | `"Pool"` | Pool |
|
|
381
381
|
* | `"Walkway"` | Walkway |
|
|
382
|
+
* | `"Parking"` | Parking area |
|
|
382
383
|
*/
|
|
383
384
|
export declare const PluginSpaceType: z.ZodEnum<{
|
|
384
385
|
Room: "Room";
|
|
@@ -389,6 +390,7 @@ export declare const PluginSpaceType: z.ZodEnum<{
|
|
|
389
390
|
Deck: "Deck";
|
|
390
391
|
Pool: "Pool";
|
|
391
392
|
Walkway: "Walkway";
|
|
393
|
+
Parking: "Parking";
|
|
392
394
|
}>;
|
|
393
395
|
/**
|
|
394
396
|
* Result of {@linkcode PluginSpaceApi.get}.
|
|
@@ -415,6 +417,7 @@ export declare const PluginSpaceGetResult: z.ZodObject<{
|
|
|
415
417
|
Deck: "Deck";
|
|
416
418
|
Pool: "Pool";
|
|
417
419
|
Walkway: "Walkway";
|
|
420
|
+
Parking: "Parking";
|
|
418
421
|
}>>>;
|
|
419
422
|
storey: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
420
423
|
departmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -570,6 +573,7 @@ export declare const PluginSpaceUpdateArgs: z.ZodObject<{
|
|
|
570
573
|
Deck: "Deck";
|
|
571
574
|
Pool: "Pool";
|
|
572
575
|
Walkway: "Walkway";
|
|
576
|
+
Parking: "Parking";
|
|
573
577
|
}>>;
|
|
574
578
|
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
575
579
|
DEFAULT: "DEFAULT";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/api/entity/space.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAK7C;;;;;;;;;;;GAWG;AACH,8BAAsB,cAAc;;IAGlC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;aACa,iBAAiB,CAAC,EAChC,QAAQ,EACR,UAAU,GACX,EAAE,gCAAgC,GAAG,eAAe,CAAC,kCAAkC,CAAC;IAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,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,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;iBAEhC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,sFAAsF;AACtF,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAazB,CAAA;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B;;;;;EAKtC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;eAG7B,CAAA;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQhC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB;;;;;;iBAMlC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
|
@@ -121,9 +121,9 @@ export declare abstract class PluginStoryApi {
|
|
|
121
121
|
* | `"totalArea"` | `number` | Total floor area of this story |
|
|
122
122
|
*/
|
|
123
123
|
export declare const PluginStoryGetProperty: z.ZodEnum<{
|
|
124
|
-
height: "height";
|
|
125
|
-
id: "id";
|
|
126
124
|
name: "name";
|
|
125
|
+
id: "id";
|
|
126
|
+
height: "height";
|
|
127
127
|
value: "value";
|
|
128
128
|
base: "base";
|
|
129
129
|
hidden: "hidden";
|
|
@@ -141,9 +141,9 @@ export declare const PluginStoryGetProperty: z.ZodEnum<{
|
|
|
141
141
|
export declare const PluginStoryGetArgs: z.ZodObject<{
|
|
142
142
|
storyValue: z.ZodNumber;
|
|
143
143
|
properties: z.ZodArray<z.ZodEnum<{
|
|
144
|
-
height: "height";
|
|
145
|
-
id: "id";
|
|
146
144
|
name: "name";
|
|
145
|
+
id: "id";
|
|
146
|
+
height: "height";
|
|
147
147
|
value: "value";
|
|
148
148
|
base: "base";
|
|
149
149
|
hidden: "hidden";
|