@snaptrude/plugin-client 0.2.9 → 0.5.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/AGENTS.md +38 -46
- package/CHANGELOG.md +11 -0
- package/CLAUDE.md +1 -1
- package/dist/api/index.d.ts +12 -16
- package/dist/api/index.d.ts.map +1 -1
- package/dist/index.cjs +23 -655
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -648
- package/dist/index.js.map +1 -1
- package/dist/rpc-proxy.d.ts +28 -0
- package/dist/rpc-proxy.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/api/index.ts +26 -22
- package/src/rpc-proxy.ts +56 -0
- package/dist/api/core/geom/arc.d.ts +0 -5
- package/dist/api/core/geom/arc.d.ts.map +0 -1
- package/dist/api/core/geom/curve.d.ts +0 -5
- package/dist/api/core/geom/curve.d.ts.map +0 -1
- package/dist/api/core/geom/index.d.ts +0 -17
- package/dist/api/core/geom/index.d.ts.map +0 -1
- package/dist/api/core/geom/line.d.ts +0 -5
- package/dist/api/core/geom/line.d.ts.map +0 -1
- package/dist/api/core/geom/profile.d.ts +0 -7
- package/dist/api/core/geom/profile.d.ts.map +0 -1
- package/dist/api/core/index.d.ts +0 -11
- package/dist/api/core/index.d.ts.map +0 -1
- package/dist/api/core/math/index.d.ts +0 -11
- package/dist/api/core/math/index.d.ts.map +0 -1
- package/dist/api/core/math/quat.d.ts +0 -5
- package/dist/api/core/math/quat.d.ts.map +0 -1
- package/dist/api/core/math/vec3.d.ts +0 -5
- package/dist/api/core/math/vec3.d.ts.map +0 -1
- package/dist/api/documentation/aiInspiration.d.ts +0 -24
- package/dist/api/documentation/aiInspiration.d.ts.map +0 -1
- package/dist/api/documentation/index.d.ts +0 -8
- package/dist/api/documentation/index.d.ts.map +0 -1
- package/dist/api/entity/buildableEnvelope.d.ts +0 -7
- package/dist/api/entity/buildableEnvelope.d.ts.map +0 -1
- package/dist/api/entity/department.d.ts +0 -7
- package/dist/api/entity/department.d.ts.map +0 -1
- package/dist/api/entity/index.d.ts +0 -20
- package/dist/api/entity/index.d.ts.map +0 -1
- package/dist/api/entity/referenceLine.d.ts +0 -9
- package/dist/api/entity/referenceLine.d.ts.map +0 -1
- package/dist/api/entity/space.d.ts +0 -15
- package/dist/api/entity/space.d.ts.map +0 -1
- package/dist/api/entity/story.d.ts +0 -9
- package/dist/api/entity/story.d.ts.map +0 -1
- package/dist/api/tools/copy.d.ts +0 -3
- package/dist/api/tools/copy.d.ts.map +0 -1
- package/dist/api/tools/index.d.ts +0 -14
- package/dist/api/tools/index.d.ts.map +0 -1
- package/dist/api/tools/offset.d.ts +0 -3
- package/dist/api/tools/offset.d.ts.map +0 -1
- package/dist/api/tools/selection.d.ts +0 -6
- package/dist/api/tools/selection.d.ts.map +0 -1
- package/dist/api/tools/transform.d.ts +0 -7
- package/dist/api/tools/transform.d.ts.map +0 -1
- package/dist/api/units/index.d.ts +0 -7
- package/dist/api/units/index.d.ts.map +0 -1
- package/src/api/core/geom/arc.ts +0 -7
- package/src/api/core/geom/curve.ts +0 -7
- package/src/api/core/geom/index.ts +0 -25
- package/src/api/core/geom/line.ts +0 -7
- package/src/api/core/geom/profile.ts +0 -17
- package/src/api/core/index.ts +0 -17
- package/src/api/core/math/index.ts +0 -17
- package/src/api/core/math/quat.ts +0 -7
- package/src/api/core/math/vec3.ts +0 -7
- package/src/api/documentation/aiInspiration.ts +0 -193
- package/src/api/documentation/index.ts +0 -13
- package/src/api/entity/buildableEnvelope.ts +0 -34
- package/src/api/entity/department.ts +0 -30
- package/src/api/entity/index.ts +0 -29
- package/src/api/entity/referenceLine.ts +0 -54
- package/src/api/entity/space.ts +0 -160
- package/src/api/entity/story.ts +0 -66
- package/src/api/tools/copy.ts +0 -10
- package/src/api/tools/index.ts +0 -33
- package/src/api/tools/offset.ts +0 -15
- package/src/api/tools/selection.ts +0 -15
- package/src/api/tools/transform.ts +0 -44
- package/src/api/units/index.ts +0 -34
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"offset.d.ts","sourceRoot":"","sources":["../../../src/api/tools/offset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,wBAAwB,CAAA;AAG/B,wBAAsB,MAAM,CAC1B,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAM7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/api/tools/selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAGrF,qBAAa,kBAAmB,SAAQ,kBAAkB;;IAK3C,GAAG,IAAI,OAAO,CAAC,wBAAwB,CAAC;CAMtD"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PluginTransformApi, PluginMoveArgs, PluginRotateArgs } from "@snaptrude/plugin-core";
|
|
2
|
-
export declare class ClientTransformApi extends PluginTransformApi {
|
|
3
|
-
constructor();
|
|
4
|
-
move({ componentIds, displacement, }: PluginMoveArgs): Promise<void>;
|
|
5
|
-
rotate({ componentIds, angle, axis, pivot, }: PluginRotateArgs): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/api/tools/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EACjB,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,kBAAmB,SAAQ,kBAAkB;;IAK3C,IAAI,CAAC,EAChB,YAAY,EACZ,YAAY,GACb,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAWpB,MAAM,CAAC,EAClB,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,KAAK,GACN,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAYpC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PluginUnitsApi, PluginUnitsConvertFromArgs, PluginUnitsConvertFromResult, PluginUnitsConvertToArgs, PluginUnitsConvertToResult } from "@snaptrude/plugin-core";
|
|
2
|
-
export declare class ClientUnitsApi extends PluginUnitsApi {
|
|
3
|
-
constructor();
|
|
4
|
-
convertFrom(args: PluginUnitsConvertFromArgs): Promise<PluginUnitsConvertFromResult>;
|
|
5
|
-
convertTo(args: PluginUnitsConvertToArgs): Promise<PluginUnitsConvertToResult>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/units/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,cAAe,SAAQ,cAAc;;IAKnC,WAAW,CACtB,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,4BAA4B,CAAC;IAQ3B,SAAS,CACpB,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,0BAA0B,CAAC;CAOvC"}
|
package/src/api/core/geom/arc.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PluginGeomApi } from "@snaptrude/plugin-core"
|
|
2
|
-
import { ClientLineApi } from "./line"
|
|
3
|
-
import { ClientArcApi } from "./arc"
|
|
4
|
-
import { ClientCurveApi } from "./curve"
|
|
5
|
-
import { ClientProfileApi } from "./profile"
|
|
6
|
-
|
|
7
|
-
export class ClientGeomApi extends PluginGeomApi {
|
|
8
|
-
public line: ClientLineApi
|
|
9
|
-
public arc: ClientArcApi
|
|
10
|
-
public curve: ClientCurveApi
|
|
11
|
-
public profile: ClientProfileApi
|
|
12
|
-
|
|
13
|
-
constructor() {
|
|
14
|
-
super()
|
|
15
|
-
this.line = new ClientLineApi()
|
|
16
|
-
this.arc = new ClientArcApi()
|
|
17
|
-
this.curve = new ClientCurveApi()
|
|
18
|
-
this.profile = new ClientProfileApi()
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export * from "./line"
|
|
23
|
-
export * from "./arc"
|
|
24
|
-
export * from "./curve"
|
|
25
|
-
export * from "./profile"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PluginProfileApi } from "@snaptrude/plugin-core"
|
|
2
|
-
import type { PProfile, PluginProfileFromLinePointsArgs } from "@snaptrude/plugin-core"
|
|
3
|
-
import { getHostApi } from "../../../host-api"
|
|
4
|
-
|
|
5
|
-
export class ClientProfileApi extends PluginProfileApi {
|
|
6
|
-
constructor() {
|
|
7
|
-
super()
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public async fromLinePoints(args: PluginProfileFromLinePointsArgs): Promise<PProfile> {
|
|
11
|
-
const hostApi = getHostApi()
|
|
12
|
-
return hostApi.call({
|
|
13
|
-
method: "core.geom.profile.fromLinePoints",
|
|
14
|
-
args,
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
}
|
package/src/api/core/index.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PluginCoreApi } from "@snaptrude/plugin-core"
|
|
2
|
-
import { ClientMathApi } from "./math"
|
|
3
|
-
import { ClientGeomApi } from "./geom"
|
|
4
|
-
|
|
5
|
-
export class ClientCoreApi extends PluginCoreApi {
|
|
6
|
-
public math: ClientMathApi
|
|
7
|
-
public geom: ClientGeomApi
|
|
8
|
-
|
|
9
|
-
constructor() {
|
|
10
|
-
super()
|
|
11
|
-
this.math = new ClientMathApi()
|
|
12
|
-
this.geom = new ClientGeomApi()
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export * from "./math"
|
|
17
|
-
export * from "./geom"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PluginMathApi } from "@snaptrude/plugin-core"
|
|
2
|
-
import { ClientVec3Api } from "./vec3"
|
|
3
|
-
import { ClientQuatApi } from "./quat"
|
|
4
|
-
|
|
5
|
-
export class ClientMathApi extends PluginMathApi {
|
|
6
|
-
public vec3: ClientVec3Api
|
|
7
|
-
public quat: ClientQuatApi
|
|
8
|
-
|
|
9
|
-
constructor() {
|
|
10
|
-
super()
|
|
11
|
-
this.vec3 = new ClientVec3Api()
|
|
12
|
-
this.quat = new ClientQuatApi()
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export * from "./vec3"
|
|
17
|
-
export * from "./quat"
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
PluginAIInspirationCancelJobResult,
|
|
3
|
-
PluginAIInspirationDeleteRecipeArgs,
|
|
4
|
-
PluginAIInspirationDeleteRecipeResult,
|
|
5
|
-
PluginAIInspirationExtractRecipeFromShapeArgs,
|
|
6
|
-
PluginAIInspirationExtractionResult,
|
|
7
|
-
PluginAIInspirationGenerateArgs,
|
|
8
|
-
PluginAIInspirationGetJobResult,
|
|
9
|
-
PluginAIInspirationGetModelCapabilitiesArgs,
|
|
10
|
-
PluginAIInspirationGetModelCapabilitiesResult,
|
|
11
|
-
PluginAIInspirationGetSelectionResult,
|
|
12
|
-
PluginAIInspirationGetPresetCatalogResult,
|
|
13
|
-
PluginAIInspirationGetWorkflowForShapeArgs,
|
|
14
|
-
PluginAIInspirationGetWorkflowForShapeResult,
|
|
15
|
-
PluginAIInspirationJobArgs,
|
|
16
|
-
PluginAIInspirationListJobsResult,
|
|
17
|
-
PluginAIInspirationListModelsResult,
|
|
18
|
-
PluginAIInspirationListRecipesResult,
|
|
19
|
-
PluginAIInspirationListSourcesArgs,
|
|
20
|
-
PluginAIInspirationListSourcesResult,
|
|
21
|
-
PluginAIInspirationRefineArgs,
|
|
22
|
-
PluginAIInspirationRerunPlanResult,
|
|
23
|
-
PluginAIInspirationRerunSelectedBranchArgs,
|
|
24
|
-
PluginAIInspirationRunRecipeArgs,
|
|
25
|
-
PluginAIInspirationRunResult,
|
|
26
|
-
PluginAIInspirationSaveRecipeArgs,
|
|
27
|
-
PluginAIInspirationSaveRecipeResult,
|
|
28
|
-
} from "@snaptrude/plugin-core"
|
|
29
|
-
import { PluginDocumentationAIInspirationApi } from "@snaptrude/plugin-core"
|
|
30
|
-
import { getHostApi } from "../../host-api"
|
|
31
|
-
|
|
32
|
-
export class ClientDocumentationAIInspirationApi extends PluginDocumentationAIInspirationApi {
|
|
33
|
-
constructor() {
|
|
34
|
-
super()
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
public async listModels(): Promise<PluginAIInspirationListModelsResult> {
|
|
38
|
-
const hostApi = getHostApi()
|
|
39
|
-
return hostApi.call({ method: "documentation.aiInspiration.listModels" })
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public async getModelCapabilities(
|
|
43
|
-
args: PluginAIInspirationGetModelCapabilitiesArgs,
|
|
44
|
-
): Promise<PluginAIInspirationGetModelCapabilitiesResult> {
|
|
45
|
-
const hostApi = getHostApi()
|
|
46
|
-
return hostApi.call({
|
|
47
|
-
method: "documentation.aiInspiration.getModelCapabilities",
|
|
48
|
-
args,
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public async listSources(
|
|
53
|
-
args: PluginAIInspirationListSourcesArgs,
|
|
54
|
-
): Promise<PluginAIInspirationListSourcesResult> {
|
|
55
|
-
const hostApi = getHostApi()
|
|
56
|
-
return hostApi.call({
|
|
57
|
-
method: "documentation.aiInspiration.listSources",
|
|
58
|
-
args,
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
public async getSelection(): Promise<PluginAIInspirationGetSelectionResult> {
|
|
63
|
-
const hostApi = getHostApi()
|
|
64
|
-
return hostApi.call({ method: "documentation.aiInspiration.getSelection" })
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
public async getPresetCatalog(): Promise<PluginAIInspirationGetPresetCatalogResult> {
|
|
68
|
-
const hostApi = getHostApi()
|
|
69
|
-
return hostApi.call({
|
|
70
|
-
method: "documentation.aiInspiration.getPresetCatalog",
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
public async generate(
|
|
75
|
-
args: PluginAIInspirationGenerateArgs,
|
|
76
|
-
): Promise<PluginAIInspirationRunResult> {
|
|
77
|
-
const hostApi = getHostApi()
|
|
78
|
-
return hostApi.call({
|
|
79
|
-
method: "documentation.aiInspiration.generate",
|
|
80
|
-
args,
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
public async refine(
|
|
85
|
-
args: PluginAIInspirationRefineArgs,
|
|
86
|
-
): Promise<PluginAIInspirationRunResult> {
|
|
87
|
-
const hostApi = getHostApi()
|
|
88
|
-
return hostApi.call({
|
|
89
|
-
method: "documentation.aiInspiration.refine",
|
|
90
|
-
args,
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public async getJob(
|
|
95
|
-
args: PluginAIInspirationJobArgs,
|
|
96
|
-
): Promise<PluginAIInspirationGetJobResult> {
|
|
97
|
-
const hostApi = getHostApi()
|
|
98
|
-
return hostApi.call({
|
|
99
|
-
method: "documentation.aiInspiration.getJob",
|
|
100
|
-
args,
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
public async cancelJob(
|
|
105
|
-
args: PluginAIInspirationJobArgs,
|
|
106
|
-
): Promise<PluginAIInspirationCancelJobResult> {
|
|
107
|
-
const hostApi = getHostApi()
|
|
108
|
-
return hostApi.call({
|
|
109
|
-
method: "documentation.aiInspiration.cancelJob",
|
|
110
|
-
args,
|
|
111
|
-
})
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
public async listJobs(): Promise<PluginAIInspirationListJobsResult> {
|
|
115
|
-
const hostApi = getHostApi()
|
|
116
|
-
return hostApi.call({ method: "documentation.aiInspiration.listJobs" })
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
public async getWorkflowForShape(
|
|
120
|
-
args: PluginAIInspirationGetWorkflowForShapeArgs,
|
|
121
|
-
): Promise<PluginAIInspirationGetWorkflowForShapeResult> {
|
|
122
|
-
const hostApi = getHostApi()
|
|
123
|
-
return hostApi.call({
|
|
124
|
-
method: "documentation.aiInspiration.getWorkflowForShape",
|
|
125
|
-
args,
|
|
126
|
-
})
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
public async getSelectedBranchRerunPlan(
|
|
130
|
-
args: PluginAIInspirationGetWorkflowForShapeArgs,
|
|
131
|
-
): Promise<PluginAIInspirationRerunPlanResult> {
|
|
132
|
-
const hostApi = getHostApi()
|
|
133
|
-
return hostApi.call({
|
|
134
|
-
method: "documentation.aiInspiration.getSelectedBranchRerunPlan",
|
|
135
|
-
args,
|
|
136
|
-
})
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
public async rerunSelectedBranch(
|
|
140
|
-
args: PluginAIInspirationRerunSelectedBranchArgs,
|
|
141
|
-
): Promise<PluginAIInspirationRunResult> {
|
|
142
|
-
const hostApi = getHostApi()
|
|
143
|
-
return hostApi.call({
|
|
144
|
-
method: "documentation.aiInspiration.rerunSelectedBranch",
|
|
145
|
-
args,
|
|
146
|
-
})
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
public async extractRecipeFromShape(
|
|
150
|
-
args: PluginAIInspirationExtractRecipeFromShapeArgs,
|
|
151
|
-
): Promise<PluginAIInspirationExtractionResult> {
|
|
152
|
-
const hostApi = getHostApi()
|
|
153
|
-
return hostApi.call({
|
|
154
|
-
method: "documentation.aiInspiration.extractRecipeFromShape",
|
|
155
|
-
args,
|
|
156
|
-
})
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
public async listRecipes(): Promise<PluginAIInspirationListRecipesResult> {
|
|
160
|
-
const hostApi = getHostApi()
|
|
161
|
-
return hostApi.call({ method: "documentation.aiInspiration.listRecipes" })
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
public async saveRecipe(
|
|
165
|
-
args: PluginAIInspirationSaveRecipeArgs,
|
|
166
|
-
): Promise<PluginAIInspirationSaveRecipeResult> {
|
|
167
|
-
const hostApi = getHostApi()
|
|
168
|
-
return hostApi.call({
|
|
169
|
-
method: "documentation.aiInspiration.saveRecipe",
|
|
170
|
-
args,
|
|
171
|
-
})
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
public async deleteRecipe(
|
|
175
|
-
args: PluginAIInspirationDeleteRecipeArgs,
|
|
176
|
-
): Promise<PluginAIInspirationDeleteRecipeResult> {
|
|
177
|
-
const hostApi = getHostApi()
|
|
178
|
-
return hostApi.call({
|
|
179
|
-
method: "documentation.aiInspiration.deleteRecipe",
|
|
180
|
-
args,
|
|
181
|
-
})
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
public async runRecipe(
|
|
185
|
-
args: PluginAIInspirationRunRecipeArgs,
|
|
186
|
-
): Promise<PluginAIInspirationRunResult> {
|
|
187
|
-
const hostApi = getHostApi()
|
|
188
|
-
return hostApi.call({
|
|
189
|
-
method: "documentation.aiInspiration.runRecipe",
|
|
190
|
-
args,
|
|
191
|
-
})
|
|
192
|
-
}
|
|
193
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PluginDocumentationApi } from "@snaptrude/plugin-core"
|
|
2
|
-
import { ClientDocumentationAIInspirationApi } from "./aiInspiration"
|
|
3
|
-
|
|
4
|
-
export class ClientDocumentationApi extends PluginDocumentationApi {
|
|
5
|
-
public aiInspiration: ClientDocumentationAIInspirationApi
|
|
6
|
-
|
|
7
|
-
constructor() {
|
|
8
|
-
super()
|
|
9
|
-
this.aiInspiration = new ClientDocumentationAIInspirationApi()
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export * from "./aiInspiration"
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PluginBuildableEnvelopeCreateArgs,
|
|
3
|
-
PluginBuildableEnvelopeCreateResult,
|
|
4
|
-
PluginBuildableEnvelopeUpdateArgs,
|
|
5
|
-
PluginBuildableEnvelopeUpdateResult,
|
|
6
|
-
PluginBuildableEnvelopeApi,
|
|
7
|
-
} from "@snaptrude/plugin-core"
|
|
8
|
-
import { getHostApi } from "../../host-api"
|
|
9
|
-
|
|
10
|
-
export class ClientBuildableEnvelopeApi extends PluginBuildableEnvelopeApi {
|
|
11
|
-
constructor() {
|
|
12
|
-
super()
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public async create(
|
|
16
|
-
args: PluginBuildableEnvelopeCreateArgs
|
|
17
|
-
): Promise<PluginBuildableEnvelopeCreateResult> {
|
|
18
|
-
const hostApi = getHostApi()
|
|
19
|
-
return hostApi.call({
|
|
20
|
-
method: "entity.buildableEnvelope.create",
|
|
21
|
-
args,
|
|
22
|
-
})
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public async update(
|
|
26
|
-
args: PluginBuildableEnvelopeUpdateArgs
|
|
27
|
-
): Promise<PluginBuildableEnvelopeUpdateResult> {
|
|
28
|
-
const hostApi = getHostApi()
|
|
29
|
-
return hostApi.call({
|
|
30
|
-
method: "entity.buildableEnvelope.update",
|
|
31
|
-
args,
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PluginDepartmentApi,
|
|
3
|
-
PluginDepartmentCreateArgs,
|
|
4
|
-
PluginDepartmentCreateResult,
|
|
5
|
-
PluginDepartmentGetAllResult,
|
|
6
|
-
} from "@snaptrude/plugin-core"
|
|
7
|
-
import { getHostApi } from "../../host-api"
|
|
8
|
-
|
|
9
|
-
export class ClientDepartmentApi extends PluginDepartmentApi {
|
|
10
|
-
constructor() {
|
|
11
|
-
super()
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public async create(
|
|
15
|
-
args: PluginDepartmentCreateArgs
|
|
16
|
-
): Promise<PluginDepartmentCreateResult> {
|
|
17
|
-
const hostApi = getHostApi()
|
|
18
|
-
return hostApi.call({
|
|
19
|
-
method: "entity.department.create",
|
|
20
|
-
args,
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public async getAll(): Promise<PluginDepartmentGetAllResult> {
|
|
25
|
-
const hostApi = getHostApi()
|
|
26
|
-
return hostApi.call({
|
|
27
|
-
method: "entity.department.getAll",
|
|
28
|
-
})
|
|
29
|
-
}
|
|
30
|
-
}
|
package/src/api/entity/index.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { PluginEntityApi } from "@snaptrude/plugin-core"
|
|
2
|
-
import { ClientBuildableEnvelopeApi } from "./buildableEnvelope"
|
|
3
|
-
import { ClientDepartmentApi } from "./department"
|
|
4
|
-
import { ClientReferenceLineApi } from "./referenceLine"
|
|
5
|
-
import { ClientSpaceApi } from "./space"
|
|
6
|
-
import { ClientStoryApi } from "./story"
|
|
7
|
-
|
|
8
|
-
export class ClientEntityApi extends PluginEntityApi {
|
|
9
|
-
public space: ClientSpaceApi
|
|
10
|
-
public story: ClientStoryApi
|
|
11
|
-
public referenceLine: ClientReferenceLineApi
|
|
12
|
-
public department: ClientDepartmentApi
|
|
13
|
-
public buildableEnvelope: ClientBuildableEnvelopeApi
|
|
14
|
-
|
|
15
|
-
constructor() {
|
|
16
|
-
super()
|
|
17
|
-
this.space = new ClientSpaceApi()
|
|
18
|
-
this.story = new ClientStoryApi()
|
|
19
|
-
this.referenceLine = new ClientReferenceLineApi()
|
|
20
|
-
this.department = new ClientDepartmentApi()
|
|
21
|
-
this.buildableEnvelope = new ClientBuildableEnvelopeApi()
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export * from "./buildableEnvelope"
|
|
26
|
-
export * from "./department"
|
|
27
|
-
export * from "./referenceLine"
|
|
28
|
-
export * from "./space"
|
|
29
|
-
export * from "./story"
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PluginReferenceLineApi,
|
|
3
|
-
PluginReferenceLineCreateMultiArgs,
|
|
4
|
-
PluginReferenceLineCreateMultiResult,
|
|
5
|
-
PluginReferenceLineGetArgs,
|
|
6
|
-
PluginReferenceLineGetResult,
|
|
7
|
-
PluginReferenceLineGetAllResult,
|
|
8
|
-
PluginReferenceLineDeleteArgs,
|
|
9
|
-
PluginReferenceLineDeleteResult,
|
|
10
|
-
} from "@snaptrude/plugin-core"
|
|
11
|
-
import { getHostApi } from "../../host-api"
|
|
12
|
-
|
|
13
|
-
export class ClientReferenceLineApi extends PluginReferenceLineApi {
|
|
14
|
-
constructor() {
|
|
15
|
-
super()
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public async createMulti(
|
|
19
|
-
args: PluginReferenceLineCreateMultiArgs
|
|
20
|
-
): Promise<PluginReferenceLineCreateMultiResult> {
|
|
21
|
-
const hostApi = getHostApi()
|
|
22
|
-
return hostApi.call({
|
|
23
|
-
method: "entity.referenceLine.createMulti",
|
|
24
|
-
args,
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
public async get(
|
|
29
|
-
args: PluginReferenceLineGetArgs
|
|
30
|
-
): Promise<PluginReferenceLineGetResult> {
|
|
31
|
-
const hostApi = getHostApi()
|
|
32
|
-
return hostApi.call({
|
|
33
|
-
method: "entity.referenceLine.get",
|
|
34
|
-
args,
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public async getAll(): Promise<PluginReferenceLineGetAllResult> {
|
|
39
|
-
const hostApi = getHostApi()
|
|
40
|
-
return hostApi.call({
|
|
41
|
-
method: "entity.referenceLine.getAll",
|
|
42
|
-
})
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
public async delete(
|
|
46
|
-
args: PluginReferenceLineDeleteArgs
|
|
47
|
-
): Promise<PluginReferenceLineDeleteResult> {
|
|
48
|
-
const hostApi = getHostApi()
|
|
49
|
-
return hostApi.call({
|
|
50
|
-
method: "entity.referenceLine.delete",
|
|
51
|
-
args,
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
}
|
package/src/api/entity/space.ts
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PluginSpaceApi,
|
|
3
|
-
PluginSpaceCreateRectangularArgs,
|
|
4
|
-
PluginSpaceCreateRectangularResult,
|
|
5
|
-
PluginSpaceCreateFromProfileArgs,
|
|
6
|
-
PluginSpaceCreateFromProfileResult,
|
|
7
|
-
PluginSpaceDeleteArgs,
|
|
8
|
-
PluginSpaceDeleteResult,
|
|
9
|
-
PluginSpaceGetArgs,
|
|
10
|
-
PluginSpaceGetResult,
|
|
11
|
-
PluginSpaceGetAllResult,
|
|
12
|
-
PluginSpaceUpdateGeometryFromProfileArgs,
|
|
13
|
-
PluginSpaceUpdateGeometryFromProfileResult,
|
|
14
|
-
PluginSpaceUpdateArgs,
|
|
15
|
-
PluginSpaceUpdateResult,
|
|
16
|
-
PluginSpaceBulkCreateArgs,
|
|
17
|
-
PluginSpaceBulkCreateResult,
|
|
18
|
-
PluginSpaceBulkUpdateArgs,
|
|
19
|
-
PluginSpaceBulkUpdateResult,
|
|
20
|
-
PluginSpaceBulkDeleteArgs,
|
|
21
|
-
PluginSpaceBulkDeleteResult,
|
|
22
|
-
} from "@snaptrude/plugin-core"
|
|
23
|
-
import { getHostApi } from "../../host-api"
|
|
24
|
-
|
|
25
|
-
export class ClientSpaceApi extends PluginSpaceApi {
|
|
26
|
-
constructor() {
|
|
27
|
-
super()
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public async createRectangular({
|
|
31
|
-
position,
|
|
32
|
-
dimensions,
|
|
33
|
-
}: PluginSpaceCreateRectangularArgs): Promise<PluginSpaceCreateRectangularResult> {
|
|
34
|
-
const hostApi = getHostApi()
|
|
35
|
-
return hostApi.call({
|
|
36
|
-
method: "entity.space.createRectangular",
|
|
37
|
-
args: {
|
|
38
|
-
position,
|
|
39
|
-
dimensions,
|
|
40
|
-
},
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public async createFromProfile({
|
|
45
|
-
profile,
|
|
46
|
-
innerProfiles,
|
|
47
|
-
extrudeHeight,
|
|
48
|
-
position,
|
|
49
|
-
}: PluginSpaceCreateFromProfileArgs): Promise<PluginSpaceCreateFromProfileResult> {
|
|
50
|
-
const hostApi = getHostApi()
|
|
51
|
-
return hostApi.call({
|
|
52
|
-
method: "entity.space.createFromProfile",
|
|
53
|
-
args: {
|
|
54
|
-
profile,
|
|
55
|
-
innerProfiles,
|
|
56
|
-
extrudeHeight,
|
|
57
|
-
position,
|
|
58
|
-
},
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
public async updateGeometryFromProfile({
|
|
63
|
-
spaceId,
|
|
64
|
-
profile,
|
|
65
|
-
extrudeHeight,
|
|
66
|
-
}: PluginSpaceUpdateGeometryFromProfileArgs): Promise<PluginSpaceUpdateGeometryFromProfileResult> {
|
|
67
|
-
const hostApi = getHostApi()
|
|
68
|
-
return hostApi.call({
|
|
69
|
-
method: "entity.space.updateGeometryFromProfile",
|
|
70
|
-
args: {
|
|
71
|
-
spaceId,
|
|
72
|
-
profile,
|
|
73
|
-
extrudeHeight,
|
|
74
|
-
},
|
|
75
|
-
})
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
public async get({
|
|
79
|
-
spaceId,
|
|
80
|
-
properties,
|
|
81
|
-
}: PluginSpaceGetArgs): Promise<PluginSpaceGetResult> {
|
|
82
|
-
const hostApi = getHostApi()
|
|
83
|
-
return hostApi.call({
|
|
84
|
-
method: "entity.space.get",
|
|
85
|
-
args: {
|
|
86
|
-
spaceId,
|
|
87
|
-
properties,
|
|
88
|
-
},
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
public async getAll(): Promise<PluginSpaceGetAllResult> {
|
|
93
|
-
const hostApi = getHostApi()
|
|
94
|
-
return hostApi.call({
|
|
95
|
-
method: "entity.space.getAll",
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
public async delete({
|
|
100
|
-
spaceId,
|
|
101
|
-
}: PluginSpaceDeleteArgs): Promise<PluginSpaceDeleteResult> {
|
|
102
|
-
const hostApi = getHostApi()
|
|
103
|
-
return hostApi.call({
|
|
104
|
-
method: "entity.space.delete",
|
|
105
|
-
args: {
|
|
106
|
-
spaceId,
|
|
107
|
-
},
|
|
108
|
-
})
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
public async update({
|
|
112
|
-
spaceId,
|
|
113
|
-
properties,
|
|
114
|
-
}: PluginSpaceUpdateArgs): Promise<PluginSpaceUpdateResult> {
|
|
115
|
-
const hostApi = getHostApi()
|
|
116
|
-
return hostApi.call({
|
|
117
|
-
method: "entity.space.update",
|
|
118
|
-
args: {
|
|
119
|
-
spaceId,
|
|
120
|
-
properties,
|
|
121
|
-
},
|
|
122
|
-
})
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
public async bulkCreate({
|
|
126
|
-
items,
|
|
127
|
-
}: PluginSpaceBulkCreateArgs): Promise<PluginSpaceBulkCreateResult> {
|
|
128
|
-
const hostApi = getHostApi()
|
|
129
|
-
return hostApi.call({
|
|
130
|
-
method: "entity.space.bulkCreate",
|
|
131
|
-
args: {
|
|
132
|
-
items,
|
|
133
|
-
},
|
|
134
|
-
})
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
public async bulkUpdate({
|
|
138
|
-
items,
|
|
139
|
-
}: PluginSpaceBulkUpdateArgs): Promise<PluginSpaceBulkUpdateResult> {
|
|
140
|
-
const hostApi = getHostApi()
|
|
141
|
-
return hostApi.call({
|
|
142
|
-
method: "entity.space.bulkUpdate",
|
|
143
|
-
args: {
|
|
144
|
-
items,
|
|
145
|
-
},
|
|
146
|
-
})
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
public async bulkDelete({
|
|
150
|
-
spaceIds,
|
|
151
|
-
}: PluginSpaceBulkDeleteArgs): Promise<PluginSpaceBulkDeleteResult> {
|
|
152
|
-
const hostApi = getHostApi()
|
|
153
|
-
return hostApi.call({
|
|
154
|
-
method: "entity.space.bulkDelete",
|
|
155
|
-
args: {
|
|
156
|
-
spaceIds,
|
|
157
|
-
},
|
|
158
|
-
})
|
|
159
|
-
}
|
|
160
|
-
}
|