@twinfinity/twin 6.0.1 → 6.0.2-ci.29168

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.
Files changed (84) hide show
  1. package/dist/BuildInfo.js +3 -3
  2. package/dist/TwinClient.d.ts +159 -0
  3. package/dist/TwinClient.d.ts.map +1 -1
  4. package/dist/TwinClient.js +323 -28
  5. package/dist/TwinClient.js.map +1 -1
  6. package/dist/errors.d.ts +114 -3
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/errors.js +142 -0
  9. package/dist/errors.js.map +1 -1
  10. package/dist/tsconfig.tsbuildinfo +1 -1
  11. package/dist/types/asset-types-api.d.ts +76 -0
  12. package/dist/types/asset-types-api.d.ts.map +1 -0
  13. package/dist/types/asset-types-api.js +5 -0
  14. package/dist/types/asset-types-api.js.map +1 -0
  15. package/dist/types/index.d.ts +2 -0
  16. package/dist/types/index.d.ts.map +1 -1
  17. package/dist/types/index.js +2 -0
  18. package/dist/types/index.js.map +1 -1
  19. package/dist/types/twin-permissions-api.d.ts +20 -0
  20. package/dist/types/twin-permissions-api.d.ts.map +1 -0
  21. package/dist/types/twin-permissions-api.js +2 -0
  22. package/dist/types/twin-permissions-api.js.map +1 -0
  23. package/docs/assets/hierarchy.js +1 -1
  24. package/docs/assets/navigation.js +1 -1
  25. package/docs/assets/search.js +1 -1
  26. package/docs/classes/AssetBatchError.html +1 -1
  27. package/docs/classes/AssetCatalogTooLargeError.html +16 -0
  28. package/docs/classes/AssetCategoryConflictError.html +3 -0
  29. package/docs/classes/AssetCategoryForbiddenError.html +2 -0
  30. package/docs/classes/AssetCategoryNotFoundError.html +2 -0
  31. package/docs/classes/AssetCategoryValidationError.html +3 -0
  32. package/docs/classes/AssetConflictError.html +1 -1
  33. package/docs/classes/AssetForbiddenError.html +1 -1
  34. package/docs/classes/AssetNotFoundError.html +1 -1
  35. package/docs/classes/AssetTypeConflictError.html +3 -0
  36. package/docs/classes/AssetTypeForbiddenError.html +2 -0
  37. package/docs/classes/AssetTypeNotFoundError.html +2 -0
  38. package/docs/classes/AssetTypeValidationError.html +3 -0
  39. package/docs/classes/AssetValidationError.html +1 -1
  40. package/docs/classes/ProcessorNotFoundError.html +1 -1
  41. package/docs/classes/TwinClient.html +114 -41
  42. package/docs/classes/TwinConflictError.html +1 -1
  43. package/docs/classes/TwinFileConflictError.html +1 -1
  44. package/docs/classes/TwinFileNotFoundError.html +1 -1
  45. package/docs/classes/TwinFileValidationError.html +1 -1
  46. package/docs/classes/TwinNotFoundError.html +1 -1
  47. package/docs/classes/TwinUnauthenticatedError.html +6 -0
  48. package/docs/classes/TwinValidationError.html +1 -1
  49. package/docs/functions/isAssetCatalogTooLargeErrorBody.html +6 -0
  50. package/docs/functions/readErrorBody.html +10 -0
  51. package/docs/hierarchy.html +1 -1
  52. package/docs/interfaces/AssetCatalogCategory.html +7 -0
  53. package/docs/interfaces/AssetCatalogResponse.html +6 -0
  54. package/docs/interfaces/AssetCatalogTooLargeErrorBody.html +15 -0
  55. package/docs/interfaces/AssetCategoryDelete.html +2 -0
  56. package/docs/interfaces/AssetCategoryGet.html +14 -0
  57. package/docs/interfaces/AssetCategoryPut.html +7 -0
  58. package/docs/interfaces/AssetTypeDelete.html +2 -0
  59. package/docs/interfaces/AssetTypeGet.html +16 -0
  60. package/docs/interfaces/AssetTypePut.html +9 -0
  61. package/docs/interfaces/ITwinClient.html +115 -42
  62. package/docs/interfaces/MyPermissions.html +7 -0
  63. package/docs/interfaces/TwinErrorBody.html +2 -2
  64. package/docs/interfaces/TwinSpecification.html +1 -1
  65. package/docs/modules.html +1 -1
  66. package/docs/types/TwinCapability.html +6 -0
  67. package/docs/types/TwinErrorCause.html +8 -0
  68. package/docs/types/TwinErrorItemKind.html +4 -0
  69. package/package.json +3 -3
  70. package/src/BuildInfo.ts +41 -41
  71. package/src/TwinClient.ts +2010 -1496
  72. package/src/errors.ts +360 -117
  73. package/src/index.ts +3 -3
  74. package/src/types/Twin.ts +7 -7
  75. package/src/types/TwinGeometryInfo.ts +7 -7
  76. package/src/types/asset-api.ts +60 -60
  77. package/src/types/asset-batch-api.ts +88 -88
  78. package/src/types/asset-types-api.ts +86 -0
  79. package/src/types/common.ts +10 -10
  80. package/src/types/generated.ts +574 -574
  81. package/src/types/index.ts +8 -6
  82. package/src/types/twin-api.ts +99 -99
  83. package/src/types/twin-file-api.ts +67 -67
  84. package/src/types/twin-permissions-api.ts +20 -0
package/src/errors.ts CHANGED
@@ -1,117 +1,360 @@
1
- import type { TwinGet, AssetGet, TwinFileGet, AssetBatchResponse } from './types';
2
-
3
- export interface TwinErrorBody {
4
- detail: string;
5
- cause: string;
6
- item?: {
7
- kind: string;
8
- id: string;
9
- version?: number;
10
- field?: string;
11
- };
12
- }
13
-
14
- export class TwinValidationError extends Error {
15
- public readonly errorBody?: TwinErrorBody;
16
-
17
- constructor(message: string, errorBody?: TwinErrorBody) {
18
- super(message);
19
- this.name = 'TwinValidationError';
20
- this.errorBody = errorBody;
21
- }
22
- }
23
-
24
- export class TwinConflictError extends Error {
25
- public readonly currentTwin: TwinGet;
26
-
27
- constructor(message: string, currentTwin: TwinGet) {
28
- super(message);
29
- this.name = 'TwinConflictError';
30
- this.currentTwin = currentTwin;
31
- }
32
- }
33
-
34
- export class TwinNotFoundError extends Error {
35
- constructor(message: string) {
36
- super(message);
37
- this.name = 'TwinNotFoundError';
38
- }
39
- }
40
-
41
- export class ProcessorNotFoundError extends Error {
42
- constructor(message: string) {
43
- super(message);
44
- this.name = 'ProcessorNotFoundError';
45
- }
46
- }
47
-
48
- export class AssetValidationError extends Error {
49
- public readonly errorBody?: TwinErrorBody;
50
-
51
- constructor(message: string, errorBody?: TwinErrorBody) {
52
- super(message);
53
- this.name = 'AssetValidationError';
54
- this.errorBody = errorBody;
55
- }
56
- }
57
-
58
- export class AssetForbiddenError extends Error {
59
- constructor(message: string) {
60
- super(message);
61
- this.name = 'AssetForbiddenError';
62
- }
63
- }
64
-
65
- export class AssetConflictError extends Error {
66
- public readonly currentAsset: AssetGet;
67
-
68
- constructor(message: string, currentAsset: AssetGet) {
69
- super(message);
70
- this.name = 'AssetConflictError';
71
- this.currentAsset = currentAsset;
72
- }
73
- }
74
-
75
- export class AssetNotFoundError extends Error {
76
- constructor(message: string) {
77
- super(message);
78
- this.name = 'AssetNotFoundError';
79
- }
80
- }
81
-
82
- export class AssetBatchError extends Error {
83
- public readonly response: AssetBatchResponse;
84
-
85
- constructor(message: string, response: AssetBatchResponse) {
86
- super(message);
87
- this.name = 'AssetBatchError';
88
- this.response = response;
89
- }
90
- }
91
-
92
- export class TwinFileValidationError extends Error {
93
- public readonly errorBody?: TwinErrorBody;
94
-
95
- constructor(message: string, errorBody?: TwinErrorBody) {
96
- super(message);
97
- this.name = 'TwinFileValidationError';
98
- this.errorBody = errorBody;
99
- }
100
- }
101
-
102
- export class TwinFileConflictError extends Error {
103
- public readonly currentTwinFile: TwinFileGet;
104
-
105
- constructor(message: string, currentTwinFile: TwinFileGet) {
106
- super(message);
107
- this.name = 'TwinFileConflictError';
108
- this.currentTwinFile = currentTwinFile;
109
- }
110
- }
111
-
112
- export class TwinFileNotFoundError extends Error {
113
- constructor(message: string) {
114
- super(message);
115
- this.name = 'TwinFileNotFoundError';
116
- }
117
- }
1
+ import type { TwinGet, AssetGet, TwinFileGet, AssetBatchResponse, AssetCategoryGet, AssetTypeGet } from './types';
2
+
3
+ /**
4
+ * Closed union of `cause` values the Twin service emits on a 400 response. Mirrors
5
+ * `TwinBadRequestCause` in `backend/services/Twinfinity.Twin/Controllers/Model/TwinStatus.cs`.
6
+ * The trailing `(string & {})` keeps autocomplete on the known values while still
7
+ * accepting unknown causes at the type level — a forward-compat pattern: a new
8
+ * cause emitted by a newer server doesn't break older clients that pattern-match
9
+ * on the union. Matches the shape of `TwinCapability` in
10
+ * `types/twin-permissions-api.ts`.
11
+ */
12
+ export type TwinErrorCause =
13
+ | 'NotAllowedToEditDeletedItem'
14
+ | 'NotAllowedToDeleteItem'
15
+ | 'ImmutableField'
16
+ | 'ReferencedItemNotFound'
17
+ | 'ReferencedItemDeleted'
18
+ | 'FileNotOwnedByTwin'
19
+ | 'DuplicateFileReference'
20
+ | 'MultipleVersionsOfSameFileOnSameNode'
21
+ | 'LimitOutOfRange'
22
+ | 'OffsetOutOfRange'
23
+ | 'IdMismatchBetweenUrlAndBody'
24
+ | 'BatchSizeEmpty'
25
+ | 'BatchSizeExceedsMaximum'
26
+ | 'InvalidParameterCombination'
27
+ | 'DocumentChangeNotFound'
28
+ | 'DeletePermissionRequired'
29
+ | 'CannotEditDeletedFile'
30
+ | 'CannotMoveFileBetweenTwins'
31
+ | 'ContainerDoesNotExist'
32
+ | 'DuplicateContainerIds'
33
+ | 'InsufficientPermissionsOnContainer'
34
+ | 'DuplicateId'
35
+ | 'MetadataTooLarge'
36
+ | 'InvalidTransform'
37
+ | 'InvalidFilePatches'
38
+ | 'MetadataValidationFailed'
39
+ | 'MetadataSchemaInvalid'
40
+ | 'AssetTypeNotFound'
41
+ | 'AssetCategoryAndTypeRequired'
42
+ | 'StringIdInUse'
43
+ | 'CatalogTooLarge'
44
+ // Anything the server emits that this client doesn't know about yet.
45
+ // (string & {}) keeps the autocomplete on the listed values above.
46
+ // eslint-disable-next-line @typescript-eslint/ban-types
47
+ | (string & {});
48
+
49
+ /**
50
+ * Closed union of `item.kind` values the server emits. Mirrors `ItemKind` in
51
+ * `backend/services/Twinfinity.Twin/Model/ItemReference.cs`. Same forward-compat
52
+ * shape as {@link TwinErrorCause}.
53
+ */
54
+ export type TwinErrorItemKind =
55
+ | 'Twin'
56
+ | 'Asset'
57
+ | 'File'
58
+ | 'DocumentChange'
59
+ | 'AssetCategory'
60
+ | 'AssetType'
61
+ // eslint-disable-next-line @typescript-eslint/ban-types
62
+ | (string & {});
63
+
64
+ export interface TwinErrorBody {
65
+ detail: string;
66
+ cause: TwinErrorCause;
67
+ item?: {
68
+ kind: TwinErrorItemKind;
69
+ id: string;
70
+ version?: number;
71
+ field?: string;
72
+ };
73
+ }
74
+
75
+ /**
76
+ * Parse a non-OK response body as a {@link TwinErrorBody}. Falls back to a
77
+ * synthetic body carrying the response text (or statusText) when the body
78
+ * isn't valid JSON — for example when a WAF or intermediate proxy injects
79
+ * an HTML 4xx page. Callers can therefore always pattern-match on
80
+ * `errorBody.cause` without an outer try/catch around a bare
81
+ * `response.json()`.
82
+ *
83
+ * The synthetic body uses `cause: 'Unknown'`, which is permitted by the
84
+ * `(string & {})` forward-compat tail on {@link TwinErrorCause}. Consumers
85
+ * that switch on known causes will fall through to a default arm.
86
+ */
87
+ export async function readErrorBody(response: Response): Promise<TwinErrorBody> {
88
+ try {
89
+ const parsed = (await response.json()) as TwinErrorBody;
90
+ // Defensive shape check — JSON-but-not-our-shape (e.g. an upstream
91
+ // ProblemDetails payload from a non-Twinfinity component) should still
92
+ // surface usefully. `detail` is the only field every consumer reads.
93
+ if (parsed && typeof parsed.detail === 'string') return parsed;
94
+ return { detail: JSON.stringify(parsed), cause: 'Unknown' };
95
+ } catch {
96
+ const text = await response.text().catch(() => '');
97
+ return { detail: text || response.statusText || `HTTP ${response.status}`, cause: 'Unknown' };
98
+ }
99
+ }
100
+
101
+ export class TwinValidationError extends Error {
102
+ public readonly errorBody?: TwinErrorBody;
103
+
104
+ constructor(message: string, errorBody?: TwinErrorBody) {
105
+ super(message);
106
+ this.name = 'TwinValidationError';
107
+ this.errorBody = errorBody;
108
+ }
109
+ }
110
+
111
+ export class TwinConflictError extends Error {
112
+ public readonly currentTwin: TwinGet;
113
+
114
+ constructor(message: string, currentTwin: TwinGet) {
115
+ super(message);
116
+ this.name = 'TwinConflictError';
117
+ this.currentTwin = currentTwin;
118
+ }
119
+ }
120
+
121
+ export class TwinNotFoundError extends Error {
122
+ constructor(message: string) {
123
+ super(message);
124
+ this.name = 'TwinNotFoundError';
125
+ }
126
+ }
127
+
128
+ export class ProcessorNotFoundError extends Error {
129
+ constructor(message: string) {
130
+ super(message);
131
+ this.name = 'ProcessorNotFoundError';
132
+ }
133
+ }
134
+
135
+ export class AssetValidationError extends Error {
136
+ public readonly errorBody?: TwinErrorBody;
137
+
138
+ constructor(message: string, errorBody?: TwinErrorBody) {
139
+ super(message);
140
+ this.name = 'AssetValidationError';
141
+ this.errorBody = errorBody;
142
+ }
143
+ }
144
+
145
+ export class AssetForbiddenError extends Error {
146
+ constructor(message: string) {
147
+ super(message);
148
+ this.name = 'AssetForbiddenError';
149
+ }
150
+ }
151
+
152
+ export class AssetConflictError extends Error {
153
+ public readonly currentAsset: AssetGet;
154
+
155
+ constructor(message: string, currentAsset: AssetGet) {
156
+ super(message);
157
+ this.name = 'AssetConflictError';
158
+ this.currentAsset = currentAsset;
159
+ }
160
+ }
161
+
162
+ export class AssetNotFoundError extends Error {
163
+ constructor(message: string) {
164
+ super(message);
165
+ this.name = 'AssetNotFoundError';
166
+ }
167
+ }
168
+
169
+ export class AssetBatchError extends Error {
170
+ public readonly response: AssetBatchResponse;
171
+
172
+ constructor(message: string, response: AssetBatchResponse) {
173
+ super(message);
174
+ this.name = 'AssetBatchError';
175
+ this.response = response;
176
+ }
177
+ }
178
+
179
+ export class TwinFileValidationError extends Error {
180
+ public readonly errorBody?: TwinErrorBody;
181
+
182
+ constructor(message: string, errorBody?: TwinErrorBody) {
183
+ super(message);
184
+ this.name = 'TwinFileValidationError';
185
+ this.errorBody = errorBody;
186
+ }
187
+ }
188
+
189
+ export class TwinFileConflictError extends Error {
190
+ public readonly currentTwinFile: TwinFileGet;
191
+
192
+ constructor(message: string, currentTwinFile: TwinFileGet) {
193
+ super(message);
194
+ this.name = 'TwinFileConflictError';
195
+ this.currentTwinFile = currentTwinFile;
196
+ }
197
+ }
198
+
199
+ export class TwinFileNotFoundError extends Error {
200
+ constructor(message: string) {
201
+ super(message);
202
+ this.name = 'TwinFileNotFoundError';
203
+ }
204
+ }
205
+
206
+ // ---------- Asset categories ----------
207
+
208
+ export class AssetCategoryValidationError extends Error {
209
+ public readonly errorBody?: TwinErrorBody;
210
+
211
+ constructor(message: string, errorBody?: TwinErrorBody) {
212
+ super(message);
213
+ this.name = 'AssetCategoryValidationError';
214
+ this.errorBody = errorBody;
215
+ }
216
+ }
217
+
218
+ export class AssetCategoryConflictError extends Error {
219
+ public readonly currentCategory: AssetCategoryGet;
220
+
221
+ constructor(message: string, currentCategory: AssetCategoryGet) {
222
+ super(message);
223
+ this.name = 'AssetCategoryConflictError';
224
+ this.currentCategory = currentCategory;
225
+ }
226
+ }
227
+
228
+ export class AssetCategoryNotFoundError extends Error {
229
+ constructor(message: string) {
230
+ super(message);
231
+ this.name = 'AssetCategoryNotFoundError';
232
+ }
233
+ }
234
+
235
+ export class AssetCategoryForbiddenError extends Error {
236
+ constructor(message: string) {
237
+ super(message);
238
+ this.name = 'AssetCategoryForbiddenError';
239
+ }
240
+ }
241
+
242
+ // ---------- Asset types ----------
243
+
244
+ export class AssetTypeValidationError extends Error {
245
+ public readonly errorBody?: TwinErrorBody;
246
+
247
+ constructor(message: string, errorBody?: TwinErrorBody) {
248
+ super(message);
249
+ this.name = 'AssetTypeValidationError';
250
+ this.errorBody = errorBody;
251
+ }
252
+ }
253
+
254
+ export class AssetTypeConflictError extends Error {
255
+ public readonly currentType: AssetTypeGet;
256
+
257
+ constructor(message: string, currentType: AssetTypeGet) {
258
+ super(message);
259
+ this.name = 'AssetTypeConflictError';
260
+ this.currentType = currentType;
261
+ }
262
+ }
263
+
264
+ export class AssetTypeNotFoundError extends Error {
265
+ constructor(message: string) {
266
+ super(message);
267
+ this.name = 'AssetTypeNotFoundError';
268
+ }
269
+ }
270
+
271
+ export class AssetTypeForbiddenError extends Error {
272
+ constructor(message: string) {
273
+ super(message);
274
+ this.name = 'AssetTypeForbiddenError';
275
+ }
276
+ }
277
+
278
+ // ---------- Asset catalog ----------
279
+
280
+ /**
281
+ * Wire shape returned by `GET /asset-type-catalog` with a 400 when the
282
+ * tenant's catalog can't be served as a single round-trip — same shape as
283
+ * {@link TwinErrorBody} plus structured counts so picker UIs can render a
284
+ * precise message without parsing `detail`.
285
+ *
286
+ * Mirrors `AssetCatalogTooLargeResponse` in
287
+ * `backend/services/Twinfinity.Twin/Controllers/Model/AssetCatalogDtos.cs`.
288
+ */
289
+ export interface AssetCatalogTooLargeErrorBody extends TwinErrorBody {
290
+ cause: 'CatalogTooLarge';
291
+ categoriesCount: number;
292
+ typesCount: number;
293
+ maxCatalogSize: number;
294
+ categoriesOverflowed: boolean;
295
+ typesOverflowed: boolean;
296
+ }
297
+
298
+ /**
299
+ * Thrown by `getAssetTypeCatalog` when the customer's catalog exceeds the
300
+ * per-customer cap. The catalog endpoint is a single-round-trip view; tenants
301
+ * over the cap must switch to a paginated endpoint (not yet shipped). Surfaced
302
+ * as a hard failure rather than silent truncation so picker UIs can render
303
+ * "too many rows, use search" instead of "out of types."
304
+ *
305
+ * `categoriesOverflowed` / `typesOverflowed` identify which side(s) breached
306
+ * the cap; both can be true. `categoriesCount` / `typesCount` are the observed
307
+ * counts (≥ `maxCatalogSize` for the overflowing side(s)).
308
+ */
309
+ export class AssetCatalogTooLargeError extends Error {
310
+ public readonly errorBody: AssetCatalogTooLargeErrorBody;
311
+ public readonly categoriesCount: number;
312
+ public readonly typesCount: number;
313
+ public readonly maxCatalogSize: number;
314
+ public readonly categoriesOverflowed: boolean;
315
+ public readonly typesOverflowed: boolean;
316
+
317
+ constructor(message: string, errorBody: AssetCatalogTooLargeErrorBody) {
318
+ super(message);
319
+ this.name = 'AssetCatalogTooLargeError';
320
+ this.errorBody = errorBody;
321
+ this.categoriesCount = errorBody.categoriesCount;
322
+ this.typesCount = errorBody.typesCount;
323
+ this.maxCatalogSize = errorBody.maxCatalogSize;
324
+ this.categoriesOverflowed = errorBody.categoriesOverflowed;
325
+ this.typesOverflowed = errorBody.typesOverflowed;
326
+ }
327
+ }
328
+
329
+ /**
330
+ * Type guard for a {@link TwinErrorBody} that carries `CatalogTooLarge`
331
+ * with the structured count fields the dedicated wire shape adds on top of
332
+ * the standard envelope. Used by the client to decide whether to throw a
333
+ * typed {@link AssetCatalogTooLargeError} or fall through to a generic
334
+ * validation error when the server sends a malformed payload.
335
+ */
336
+ export function isAssetCatalogTooLargeErrorBody(body: TwinErrorBody): body is AssetCatalogTooLargeErrorBody {
337
+ return (
338
+ body.cause === 'CatalogTooLarge' &&
339
+ typeof (body as Partial<AssetCatalogTooLargeErrorBody>).categoriesCount === 'number' &&
340
+ typeof (body as Partial<AssetCatalogTooLargeErrorBody>).typesCount === 'number' &&
341
+ typeof (body as Partial<AssetCatalogTooLargeErrorBody>).maxCatalogSize === 'number' &&
342
+ typeof (body as Partial<AssetCatalogTooLargeErrorBody>).categoriesOverflowed === 'boolean' &&
343
+ typeof (body as Partial<AssetCatalogTooLargeErrorBody>).typesOverflowed === 'boolean'
344
+ );
345
+ }
346
+
347
+ // ---------- Authentication ----------
348
+
349
+ /**
350
+ * Thrown when the server returns 401 (Unauthorized). Distinct from forbidden
351
+ * errors: 401 means "no valid auth context" (the caller should redirect to
352
+ * login / refresh tokens), while 403 means "authenticated but not granted"
353
+ * (the UI should surface a permissions hint or render disabled affordances).
354
+ */
355
+ export class TwinUnauthenticatedError extends Error {
356
+ constructor(message: string) {
357
+ super(message);
358
+ this.name = 'TwinUnauthenticatedError';
359
+ }
360
+ }
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { type ITwinClient, TwinClient } from './TwinClient';
2
- export * from './types';
3
- export * from './errors';
1
+ export { type ITwinClient, TwinClient } from './TwinClient';
2
+ export * from './types';
3
+ export * from './errors';
package/src/types/Twin.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { T8ClientModel } from '@twinfinity/t8-client-model';
2
-
3
- export class Twin<TProject, TProduct, TEntityType, TUnit> {
4
- id: string;
5
- version: number;
6
- model?: T8ClientModel<TProject, TProduct, TEntityType, TUnit>;
7
- }
1
+ import { T8ClientModel } from '@twinfinity/t8-client-model';
2
+
3
+ export class Twin<TProject, TProduct, TEntityType, TUnit> {
4
+ id: string;
5
+ version: number;
6
+ model?: T8ClientModel<TProject, TProduct, TEntityType, TUnit>;
7
+ }
@@ -1,7 +1,7 @@
1
- import type { T8GIModelGeneric } from '@twinfinity/t8-client-model';
2
-
3
- export interface TwinGeometryInfo<TMeshDescriptor, TStyle, TRegion> {
4
- id: string;
5
- version: number;
6
- model?: T8GIModelGeneric<TMeshDescriptor, TStyle, TRegion>;
7
- }
1
+ import type { T8GIModelGeneric } from '@twinfinity/t8-client-model';
2
+
3
+ export interface TwinGeometryInfo<TMeshDescriptor, TStyle, TRegion> {
4
+ id: string;
5
+ version: number;
6
+ model?: T8GIModelGeneric<TMeshDescriptor, TStyle, TRegion>;
7
+ }
@@ -1,60 +1,60 @@
1
- export interface AssetListItem {
2
- id: string;
3
- name: string;
4
- category?: string;
5
- type?: string;
6
- twinReference?: string;
7
- parentIfcGid?: string;
8
- ifcGid?: string;
9
- etag: string;
10
- createdAt: string;
11
- isDeleted?: boolean;
12
- }
13
-
14
- export interface AssetPosition {
15
- x?: number;
16
- y?: number;
17
- z?: number;
18
- }
19
-
20
- export interface AssetGet {
21
- id: string;
22
- name: string;
23
- category?: string;
24
- type?: string;
25
- ifcGid?: string;
26
- twinReference?: string;
27
- position?: AssetPosition;
28
- parentIfcGid?: string;
29
- metadata?: Record<string, unknown>;
30
- etag: string;
31
- createdUtc: string;
32
- createdBy: string;
33
- modifiedUtc: string;
34
- modifiedBy: string;
35
- isDeleted?: boolean;
36
- }
37
-
38
- export interface AssetPost {
39
- id?: string;
40
- name: string;
41
- category?: string;
42
- type?: string;
43
- ifcGid?: string;
44
- position?: AssetPosition;
45
- parentIfcGid?: string;
46
- metadata?: Record<string, unknown>;
47
- twinReference?: string;
48
- }
49
-
50
- export interface AssetPut {
51
- etag: string;
52
- name: string;
53
- category?: string;
54
- type?: string;
55
- ifcGid?: string;
56
- position?: AssetPosition;
57
- parentIfcGid?: string;
58
- metadata?: Record<string, unknown>;
59
- twinReference?: string;
60
- }
1
+ export interface AssetListItem {
2
+ id: string;
3
+ name: string;
4
+ category?: string;
5
+ type?: string;
6
+ twinReference?: string;
7
+ parentIfcGid?: string;
8
+ ifcGid?: string;
9
+ etag: string;
10
+ createdAt: string;
11
+ isDeleted?: boolean;
12
+ }
13
+
14
+ export interface AssetPosition {
15
+ x?: number;
16
+ y?: number;
17
+ z?: number;
18
+ }
19
+
20
+ export interface AssetGet {
21
+ id: string;
22
+ name: string;
23
+ category?: string;
24
+ type?: string;
25
+ ifcGid?: string;
26
+ twinReference?: string;
27
+ position?: AssetPosition;
28
+ parentIfcGid?: string;
29
+ metadata?: Record<string, unknown>;
30
+ etag: string;
31
+ createdUtc: string;
32
+ createdBy: string;
33
+ modifiedUtc: string;
34
+ modifiedBy: string;
35
+ isDeleted?: boolean;
36
+ }
37
+
38
+ export interface AssetPost {
39
+ id?: string;
40
+ name: string;
41
+ category?: string;
42
+ type?: string;
43
+ ifcGid?: string;
44
+ position?: AssetPosition;
45
+ parentIfcGid?: string;
46
+ metadata?: Record<string, unknown>;
47
+ twinReference?: string;
48
+ }
49
+
50
+ export interface AssetPut {
51
+ etag: string;
52
+ name: string;
53
+ category?: string;
54
+ type?: string;
55
+ ifcGid?: string;
56
+ position?: AssetPosition;
57
+ parentIfcGid?: string;
58
+ metadata?: Record<string, unknown>;
59
+ twinReference?: string;
60
+ }