@thatopen/services 0.33.0 → 0.34.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/cli.js +83 -34
- package/dist/cli.js.map +1 -1
- package/dist/core/builtin-recipes/shapes-to-families.d.ts +37 -1
- package/dist/core/client.d.ts +21 -0
- package/dist/core/client.export.test.d.ts +1 -0
- package/dist/core/documents.d.ts +4 -0
- package/dist/core/frag-items.d.ts +2 -0
- package/dist/core/history.d.ts +2 -0
- package/dist/core/platform-client.d.ts +70 -1
- package/dist/core/platform-client.members.test.d.ts +1 -0
- package/dist/core/platform-client.tokens.test.d.ts +1 -0
- package/dist/core/recipes.d.ts +2 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +3118 -1975
- package/dist/index.es.js.map +1 -1
- package/dist/types/projects.d.ts +36 -1
- package/dist/types/tokens.d.ts +22 -0
- package/docs/revit-collab-quickstart.md +11 -5
- package/docs/sheet-sets-guide.md +69 -0
- package/package.json +1 -1
package/dist/types/projects.d.ts
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { Base, ObjectId } from './base';
|
|
2
2
|
|
|
3
|
-
export type PermissionSubject = 'PROJECT' | 'MEMBERS' | 'ROLES' | 'APP' | 'STORAGE' | 'EVENTS'
|
|
3
|
+
export type PermissionSubject = 'PROJECT' | 'MEMBERS' | 'ROLES' | 'APP' | 'STORAGE' | 'EVENTS'
|
|
4
|
+
/**
|
|
5
|
+
* Not a resource, a channel: whether a member may act on the project with an
|
|
6
|
+
* API token at all. Checked on top of the subject the request is about.
|
|
7
|
+
*/
|
|
8
|
+
| 'API' | 'ALL';
|
|
4
9
|
export type PermissionAction = 'CREATE' | 'READ' | 'UPDATE' | 'DELETE' | 'MANAGE';
|
|
10
|
+
/**
|
|
11
|
+
* An exception to a role's permission on ONE resource (a file or a folder): the
|
|
12
|
+
* permission granted there only, or taken away there (`removePermission`). On a
|
|
13
|
+
* folder, `appliesToDescendants` extends it to everything under it — how a role
|
|
14
|
+
* sees one branch of the project and nothing else.
|
|
15
|
+
*/
|
|
16
|
+
export interface ResourcePermission {
|
|
17
|
+
resourceId: string;
|
|
18
|
+
removePermission?: boolean;
|
|
19
|
+
appliesToDescendants?: boolean;
|
|
20
|
+
}
|
|
5
21
|
export interface Permission {
|
|
6
22
|
action: PermissionAction;
|
|
7
23
|
subject?: PermissionSubject;
|
|
24
|
+
/** Per-resource grants or removals (see {@link ResourcePermission}). */
|
|
25
|
+
resourcePermissions?: ResourcePermission[];
|
|
8
26
|
}
|
|
9
27
|
export interface Project extends Base {
|
|
10
28
|
title: string;
|
|
@@ -27,6 +45,23 @@ export interface ProjectDataUser {
|
|
|
27
45
|
fullName: string;
|
|
28
46
|
email: string;
|
|
29
47
|
}
|
|
48
|
+
/** Where a project invitation stands. */
|
|
49
|
+
export type ProjectInvitationStatus = 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
50
|
+
/** A pending (or past) invitation to a project, as the API lists it. */
|
|
51
|
+
export interface ProjectInvitation {
|
|
52
|
+
_id: string;
|
|
53
|
+
email: string;
|
|
54
|
+
projectRoleId: string | null;
|
|
55
|
+
status: ProjectInvitationStatus;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
expiresAt: string;
|
|
58
|
+
}
|
|
59
|
+
/** A role's row of a project's permission matrix: what it may do, and who has it. */
|
|
60
|
+
export interface ProjectPermissionMatrixRow {
|
|
61
|
+
role: ProjectRole;
|
|
62
|
+
permissions: Permission[];
|
|
63
|
+
members: ProjectDataUser[];
|
|
64
|
+
}
|
|
30
65
|
/** A project member with their role info. */
|
|
31
66
|
export interface ProjectDataMember {
|
|
32
67
|
projectUserId: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** What an API token may do: `ALL`, or one action on one kind of resource. */
|
|
2
|
+
export type AccessTokenPermission = 'ALL' | 'COMPONENT:EXECUTE' | `${'APP' | 'COMPONENT' | 'STORAGE'}:${'READ' | 'WRITE' | 'DOWNLOAD' | 'DELETE'}`;
|
|
3
|
+
/** An API token as the platform lists it (its secret is fetched apart). */
|
|
4
|
+
export interface AccessToken {
|
|
5
|
+
_id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
permissions: AccessTokenPermission[];
|
|
8
|
+
/** Where it may be used from; empty: anywhere. */
|
|
9
|
+
urlRestrictions: string[];
|
|
10
|
+
/** The projects it may act on; absent or empty: every project its owner can reach. */
|
|
11
|
+
projectIds?: string[];
|
|
12
|
+
requestCount: number;
|
|
13
|
+
lastUsedAt?: string;
|
|
14
|
+
}
|
|
15
|
+
/** What is given to create a token. */
|
|
16
|
+
export interface NewAccessToken {
|
|
17
|
+
name: string;
|
|
18
|
+
permissions: AccessTokenPermission[];
|
|
19
|
+
urlRestrictions?: string[];
|
|
20
|
+
/** Limits the token to these projects. */
|
|
21
|
+
projectIds?: string[];
|
|
22
|
+
}
|
|
@@ -6,8 +6,9 @@ a Rhino model…) into their model with **recipes**. Follow the steps **in order
|
|
|
6
6
|
**You may run the setup commands yourself** — install the CLI, install the add-in, launch Revit —
|
|
7
7
|
*except* where a step says only the user can.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Works with **Revit 2024, 2025, 2026 and 2027**, and needs add-in **1.3.1 or later**.
|
|
10
|
+
`thatopen revit status` prints `addinVersion`; if it is older, Step 2 updates it. Several things
|
|
11
|
+
below did not exist or behaved differently before that.
|
|
11
12
|
|
|
12
13
|
## What this does
|
|
13
14
|
|
|
@@ -134,7 +135,7 @@ these credentials.
|
|
|
134
135
|
thatopen revit status
|
|
135
136
|
```
|
|
136
137
|
|
|
137
|
-
- Prints `"loaded": true` → the add-in is running. Check `addinVersion` is **1.3.
|
|
138
|
+
- Prints `"loaded": true` → the add-in is running. Check `addinVersion` is **1.3.1 or later**; if
|
|
138
139
|
not, update it with the same command as below. Then go to Step 3.
|
|
139
140
|
|
|
140
141
|
> **`status` also reports a `project`, a `doc` and a `central`. Do not use any of them.** They are
|
|
@@ -148,9 +149,10 @@ thatopen revit status
|
|
|
148
149
|
> somewhere their team cannot see it.
|
|
149
150
|
- Errors *"The That Open Revit add-in is not running"* → work through (a), then (b).
|
|
150
151
|
|
|
151
|
-
**(a) Is Revit
|
|
152
|
+
**(a) Is Revit open?** If not, ask the user which Revit year they work in (2024 to 2027; a machine
|
|
153
|
+
can have several) and launch that one:
|
|
152
154
|
```
|
|
153
|
-
powershell -Command "Start-Process 'C:\Program Files\Autodesk\Revit
|
|
155
|
+
powershell -Command "Start-Process 'C:\Program Files\Autodesk\Revit <year>\Revit.exe'"
|
|
154
156
|
```
|
|
155
157
|
A cold start takes a while. Re-run `thatopen revit status`.
|
|
156
158
|
|
|
@@ -160,8 +162,12 @@ this, because it holds its add-in files open while it runs. Ask the user to clos
|
|
|
160
162
|
thatopen revit install
|
|
161
163
|
```
|
|
162
164
|
This fetches the current package from the registry and runs the installer that ships inside it.
|
|
165
|
+
It installs for **every** supported Revit year on the machine at once, each in its own folder.
|
|
163
166
|
`--version <v>` pins a specific one; the default is the latest.
|
|
164
167
|
|
|
168
|
+
On Revit 2024 and 2025, a recipe that attaches a wall's top to a roof or floor leaves that wall
|
|
169
|
+
unattached and says so in its notes: Revit only exposes wall attachment to add-ins from 2026.
|
|
170
|
+
|
|
165
171
|
Then **launch Revit again**. On the first start after an install, Revit shows an **unsigned add-in**
|
|
166
172
|
prompt. **Only the user can answer it — ask them to choose "Always Load".** There is no way around
|
|
167
173
|
it from a script, and it comes back after every update until the add-in is signed.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# That Open Drafter — Making a set of sheets of your own
|
|
2
|
+
|
|
3
|
+
Drafter's **Make a set of sheets** (the button in the header of **Sheets**) offers two sets:
|
|
4
|
+
|
|
5
|
+
- **The whole set** — a cover with the building in 3D, its site plan, a plan of every storey and of the
|
|
6
|
+
roof (dimensioned and tagged), four elevations and two sections, each on sheets of its type, numbered
|
|
7
|
+
from A001.
|
|
8
|
+
- **Floor plans** — a plan of every storey and of the roof, one to a sheet.
|
|
9
|
+
|
|
10
|
+
A set of your own is **your own sheet types**. A set is not drawn by hand, sheet by sheet: it is made of
|
|
11
|
+
a few *sheet types*, each of which says once how your studio draws one kind of sheet. Make yours, and
|
|
12
|
+
**The whole set** makes them in place of the standard ones.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. What a sheet type says
|
|
17
|
+
|
|
18
|
+
| Field | What it says | Unsaid |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| **name** | Its name: «Architectural plan». | — |
|
|
21
|
+
| **format** | The paper format of its sheets, by name. | The document's first. |
|
|
22
|
+
| **title block** | The title block its sheets wear, by the name of its type. | The document's. |
|
|
23
|
+
| **holds** | What its views look at: `plan` (one a storey), `elevation`, `section`, `detail`, `site` (the site from above), `threeD` (the building in 3D, for a cover). | `plan` |
|
|
24
|
+
| **views per sheet** | How many views one sheet takes; more start the next sheet. | 1 |
|
|
25
|
+
| **scale** | The denominator of its views' scale: 50 for 1:50. | The largest standard scale the paper takes them at. |
|
|
26
|
+
| **view style** | The view style its views are drawn in, by name. | The drawing standard's for what they look at. |
|
|
27
|
+
| **view title** | The title its views wear under themselves, by name. | «View title»: their name and scale over a rule. |
|
|
28
|
+
| **annotates** | What is put on its views when a sheet is made: `dimensions`, `tags` (rooms, doors, windows), `elevationMarks`, `sectionMarks`, `levels`. | Nothing. |
|
|
29
|
+
|
|
30
|
+
Every document starts with these, which you can change or copy:
|
|
31
|
+
|
|
32
|
+
| Sheet type | Holds | Views per sheet | Annotates |
|
|
33
|
+
|---|---|---|---|
|
|
34
|
+
| Cover | threeD | 1 | — |
|
|
35
|
+
| Site plan | site | 1 | — |
|
|
36
|
+
| Architectural plan | plan | 1 | dimensions, tags, elevation and section marks |
|
|
37
|
+
| Elevations | elevation | 2 | levels |
|
|
38
|
+
| Sections | section | 2 | levels |
|
|
39
|
+
| Construction detail | detail (1:20) | 1 | — |
|
|
40
|
+
|
|
41
|
+
## 2. Make yours
|
|
42
|
+
|
|
43
|
+
1. Open **Types**, and under **Sheet type** add one (or duplicate a standard one).
|
|
44
|
+
2. Give it a name of your own («Plan 1:50 A1»), and say its fields as above: pick the format, the title
|
|
45
|
+
block and the view style from their lists.
|
|
46
|
+
3. Do the same for each kind of sheet your studio delivers.
|
|
47
|
+
|
|
48
|
+
## 3. Make the set
|
|
49
|
+
|
|
50
|
+
Press **Make a set of sheets → The whole set**. For each kind of view (cover, site, plans, elevations,
|
|
51
|
+
sections, details) it takes **your** sheet types of that kind, and only where you have none, the
|
|
52
|
+
standard one. So a document with your «Plan 1:50 A1» makes every storey on it, and the standard
|
|
53
|
+
elevations and sections beside them, until you make yours too.
|
|
54
|
+
|
|
55
|
+
The set reads the building open in **Models**: one plan for each storey (reference levels left out) and
|
|
56
|
+
for the roof, and four elevations and two sections where the model has no marks yet.
|
|
57
|
+
|
|
58
|
+
## 4. Keep it for the next project
|
|
59
|
+
|
|
60
|
+
Sheet types are types of the drawing set, kept with it. Start your next drawing set from one that has
|
|
61
|
+
them, and its set comes out as your last.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
*For AI assistants:* the same is done through Drafter's commands, as its buttons run them —
|
|
66
|
+
`type.define { of: "sheetType", named }`, then `type.set { named, field, value: [ ... ] }` for each field
|
|
67
|
+
above (the field names are the first column, in camelCase: `titleBlock`, `views`, `viewStyle`,
|
|
68
|
+
`viewTitle`, `annotates`). The set itself is `Modeling.sheetMaking.makeSet(canvas, { types })`, with
|
|
69
|
+
`types` the names of the sheet types to make, in any order.
|