@twinfinity/twin 0.0.0-feature.31596
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/README.md +277 -0
- package/dist/BuildInfo.d.ts +25 -0
- package/dist/BuildInfo.d.ts.map +1 -0
- package/dist/BuildInfo.js +15 -0
- package/dist/BuildInfo.js.map +1 -0
- package/dist/TwinClient.d.ts +823 -0
- package/dist/TwinClient.d.ts.map +1 -0
- package/dist/TwinClient.js +1487 -0
- package/dist/TwinClient.js.map +1 -0
- package/dist/errors.d.ts +289 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +357 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/Twin.d.ts +7 -0
- package/dist/types/Twin.d.ts.map +1 -0
- package/dist/types/Twin.js +6 -0
- package/dist/types/Twin.js.map +1 -0
- package/dist/types/TwinGeometryInfo.d.ts +7 -0
- package/dist/types/TwinGeometryInfo.d.ts.map +1 -0
- package/dist/types/TwinGeometryInfo.js +2 -0
- package/dist/types/TwinGeometryInfo.js.map +1 -0
- package/dist/types/asset-api.d.ts +66 -0
- package/dist/types/asset-api.d.ts.map +1 -0
- package/dist/types/asset-api.js +2 -0
- package/dist/types/asset-api.js.map +1 -0
- package/dist/types/asset-attachment-api.d.ts +51 -0
- package/dist/types/asset-attachment-api.d.ts.map +1 -0
- package/dist/types/asset-attachment-api.js +8 -0
- package/dist/types/asset-attachment-api.js.map +1 -0
- package/dist/types/asset-batch-api.d.ts +73 -0
- package/dist/types/asset-batch-api.d.ts.map +1 -0
- package/dist/types/asset-batch-api.js +2 -0
- package/dist/types/asset-batch-api.js.map +1 -0
- package/dist/types/asset-types-api.d.ts +76 -0
- package/dist/types/asset-types-api.d.ts.map +1 -0
- package/dist/types/asset-types-api.js +5 -0
- package/dist/types/asset-types-api.js.map +1 -0
- package/dist/types/common.d.ts +10 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +2 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/generated.d.ts +458 -0
- package/dist/types/generated.d.ts.map +1 -0
- package/dist/types/generated.js +2 -0
- package/dist/types/generated.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +10 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/twin-api.d.ts +141 -0
- package/dist/types/twin-api.d.ts.map +1 -0
- package/dist/types/twin-api.js +2 -0
- package/dist/types/twin-api.js.map +1 -0
- package/dist/types/twin-file-api.d.ts +61 -0
- package/dist/types/twin-file-api.d.ts.map +1 -0
- package/dist/types/twin-file-api.js +2 -0
- package/dist/types/twin-file-api.js.map +1 -0
- package/dist/types/twin-permissions-api.d.ts +240 -0
- package/dist/types/twin-permissions-api.d.ts.map +1 -0
- package/dist/types/twin-permissions-api.js +2 -0
- package/dist/types/twin-permissions-api.js.map +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +99 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/classes/AssetAttachmentConflictError.html +3 -0
- package/docs/classes/AssetAttachmentNotFoundError.html +2 -0
- package/docs/classes/AssetBatchError.html +3 -0
- package/docs/classes/AssetCatalogTooLargeError.html +16 -0
- package/docs/classes/AssetCategoryConflictError.html +3 -0
- package/docs/classes/AssetCategoryForbiddenError.html +2 -0
- package/docs/classes/AssetCategoryNotFoundError.html +2 -0
- package/docs/classes/AssetCategoryValidationError.html +3 -0
- package/docs/classes/AssetConflictError.html +3 -0
- package/docs/classes/AssetForbiddenError.html +2 -0
- package/docs/classes/AssetNotFoundError.html +2 -0
- package/docs/classes/AssetPermissionsConflictError.html +16 -0
- package/docs/classes/AssetTypeConflictError.html +3 -0
- package/docs/classes/AssetTypeForbiddenError.html +2 -0
- package/docs/classes/AssetTypeNotFoundError.html +2 -0
- package/docs/classes/AssetTypeValidationError.html +3 -0
- package/docs/classes/AssetValidationError.html +3 -0
- package/docs/classes/ProcessorNotFoundError.html +2 -0
- package/docs/classes/TwinClient.html +409 -0
- package/docs/classes/TwinConflictError.html +3 -0
- package/docs/classes/TwinFileConflictError.html +3 -0
- package/docs/classes/TwinFileNotFoundError.html +2 -0
- package/docs/classes/TwinFileValidationError.html +3 -0
- package/docs/classes/TwinNotFoundError.html +4 -0
- package/docs/classes/TwinPermissionsConflictError.html +19 -0
- package/docs/classes/TwinPermissionsForbiddenError.html +12 -0
- package/docs/classes/TwinPrincipalNotFoundError.html +5 -0
- package/docs/classes/TwinTemporarilyUnavailableError.html +10 -0
- package/docs/classes/TwinUnauthenticatedError.html +6 -0
- package/docs/classes/TwinValidationError.html +3 -0
- package/docs/functions/isAssetCatalogTooLargeErrorBody.html +6 -0
- package/docs/functions/readErrorBody.html +10 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +168 -0
- package/docs/interfaces/ApiCreateUploadSessionResponse.html +7 -0
- package/docs/interfaces/AssetAttachmentPut.html +6 -0
- package/docs/interfaces/AssetBatchDeleteOperation.html +4 -0
- package/docs/interfaces/AssetBatchGetRequest.html +2 -0
- package/docs/interfaces/AssetBatchGetResponse.html +3 -0
- package/docs/interfaces/AssetBatchRequest.html +2 -0
- package/docs/interfaces/AssetBatchResponse.html +3 -0
- package/docs/interfaces/AssetBatchRestoreOperation.html +4 -0
- package/docs/interfaces/AssetBatchUpsertItem.html +12 -0
- package/docs/interfaces/AssetBatchUpsertOperation.html +4 -0
- package/docs/interfaces/AssetCatalogCategory.html +7 -0
- package/docs/interfaces/AssetCatalogResponse.html +6 -0
- package/docs/interfaces/AssetCatalogTooLargeErrorBody.html +15 -0
- package/docs/interfaces/AssetCategoryDelete.html +2 -0
- package/docs/interfaces/AssetCategoryGet.html +14 -0
- package/docs/interfaces/AssetCategoryPut.html +7 -0
- package/docs/interfaces/AssetGet.html +18 -0
- package/docs/interfaces/AssetGroupGet.html +9 -0
- package/docs/interfaces/AssetGroupsGet.html +3 -0
- package/docs/interfaces/AssetListItem.html +14 -0
- package/docs/interfaces/AssetPermissionsConflictErrorBody.html +12 -0
- package/docs/interfaces/AssetPermissionsPut.html +9 -0
- package/docs/interfaces/AssetPosition.html +4 -0
- package/docs/interfaces/AssetPost.html +12 -0
- package/docs/interfaces/AssetPrincipalPermissionsGet.html +23 -0
- package/docs/interfaces/AssetPut.html +12 -0
- package/docs/interfaces/AssetTypeDelete.html +2 -0
- package/docs/interfaces/AssetTypeGet.html +16 -0
- package/docs/interfaces/AssetTypePut.html +9 -0
- package/docs/interfaces/AttachmentGet.html +20 -0
- package/docs/interfaces/AttachmentPost.html +4 -0
- package/docs/interfaces/BatchItemError.html +4 -0
- package/docs/interfaces/BatchItemResult.html +6 -0
- package/docs/interfaces/BatchSummary.html +4 -0
- package/docs/interfaces/Coordinates.html +6 -0
- package/docs/interfaces/Diagnostics.html +4 -0
- package/docs/interfaces/DiagnosticsSummary.html +4 -0
- package/docs/interfaces/ElementQuantities.html +3 -0
- package/docs/interfaces/EntityCollection.html +15 -0
- package/docs/interfaces/EntityRepresentation.html +12 -0
- package/docs/interfaces/Facility.html +22 -0
- package/docs/interfaces/FacilityPart.html +18 -0
- package/docs/interfaces/FilePatch.html +7 -0
- package/docs/interfaces/FilePatchSet.html +5 -0
- package/docs/interfaces/GenericDiagnosticEntry.html +4 -0
- package/docs/interfaces/ITwinClient.html +404 -0
- package/docs/interfaces/IfcDiagnosticEntry.html +5 -0
- package/docs/interfaces/IfcDiagnosticNode.html +6 -0
- package/docs/interfaces/IfcDiagnosticNodeData.html +6 -0
- package/docs/interfaces/InheritedPermissions.html +8 -0
- package/docs/interfaces/ListTwinItem.html +30 -0
- package/docs/interfaces/Location.html +13 -0
- package/docs/interfaces/MyPermissions.html +7 -0
- package/docs/interfaces/MyTwinPermissions.html +5 -0
- package/docs/interfaces/PaginatedResponse.html +3 -0
- package/docs/interfaces/Pagination.html +4 -0
- package/docs/interfaces/Property.html +4 -0
- package/docs/interfaces/PropertySet.html +6 -0
- package/docs/interfaces/SimpleQuantity.html +6 -0
- package/docs/interfaces/SinglePropertyValue.html +5 -0
- package/docs/interfaces/Site.html +27 -0
- package/docs/interfaces/Space.html +16 -0
- package/docs/interfaces/TwinComputedPropertySetsResponse.html +4 -0
- package/docs/interfaces/TwinContentResponse.html +6 -0
- package/docs/interfaces/TwinDelete.html +2 -0
- package/docs/interfaces/TwinDiagnosticEntry.html +5 -0
- package/docs/interfaces/TwinDiagnosticNode.html +4 -0
- package/docs/interfaces/TwinDiagnosticNodeData.html +9 -0
- package/docs/interfaces/TwinDiagnosticsResponse.html +5 -0
- package/docs/interfaces/TwinErrorBody.html +4 -0
- package/docs/interfaces/TwinFileDelete.html +2 -0
- package/docs/interfaces/TwinFileGet.html +15 -0
- package/docs/interfaces/TwinFileListOptions.html +6 -0
- package/docs/interfaces/TwinFilePut.html +8 -0
- package/docs/interfaces/TwinFileReference.html +4 -0
- package/docs/interfaces/TwinFileRestore.html +2 -0
- package/docs/interfaces/TwinFileSource.html +4 -0
- package/docs/interfaces/TwinFileTransform.html +11 -0
- package/docs/interfaces/TwinFileVersionListOptions.html +4 -0
- package/docs/interfaces/TwinGet.html +48 -0
- package/docs/interfaces/TwinGroupGet.html +10 -0
- package/docs/interfaces/TwinGroupsGet.html +3 -0
- package/docs/interfaces/TwinPermissionsConflictErrorBody.html +8 -0
- package/docs/interfaces/TwinPermissionsPut.html +11 -0
- package/docs/interfaces/TwinPrincipalPermissionsGet.html +34 -0
- package/docs/interfaces/TwinProcessorEvent.html +7 -0
- package/docs/interfaces/TwinProcessorResponse.html +5 -0
- package/docs/interfaces/TwinPut.html +21 -0
- package/docs/interfaces/TwinReference.html +4 -0
- package/docs/interfaces/TwinSpecification.html +18 -0
- package/docs/interfaces/TwinVersionContentResponse.html +7 -0
- package/docs/interfaces/UploadStatusGet.html +3 -0
- package/docs/media/twin-management.md +399 -0
- package/docs/modules.html +1 -0
- package/docs/types/AssetBatchGetStatus.html +1 -0
- package/docs/types/AssetBatchOperation.html +1 -0
- package/docs/types/AssetBatchOperationStatus.html +1 -0
- package/docs/types/DiagnosticCategory.html +2 -0
- package/docs/types/DiagnosticLevel.html +2 -0
- package/docs/types/EpsgType.html +1 -0
- package/docs/types/FacilityClass.html +3 -0
- package/docs/types/FacilityPartClass.html +3 -0
- package/docs/types/IfcDiagnosticCode.html +1 -0
- package/docs/types/Op.html +2 -0
- package/docs/types/SinglePropertyValueType.html +3 -0
- package/docs/types/SingleQuantityValueType.html +3 -0
- package/docs/types/SiteType.html +3 -0
- package/docs/types/SpaceType.html +2 -0
- package/docs/types/TwinBoundCapabilityName.html +8 -0
- package/docs/types/TwinCapability.html +12 -0
- package/docs/types/TwinCapabilityName.html +8 -0
- package/docs/types/TwinDiagnosticCode.html +1 -0
- package/docs/types/TwinErrorCause.html +8 -0
- package/docs/types/TwinErrorItemKind.html +4 -0
- package/docs/types/TwinPermissionsConflictCause.html +6 -0
- package/docs/types/TwinScopedCapability.html +9 -0
- package/docs/types/TwinScopedCapabilityName.html +8 -0
- package/docs/types/UploadStatus.html +1 -0
- package/package.json +52 -0
- package/src/BuildInfo.ts +41 -0
- package/src/TwinClient.ts +3113 -0
- package/src/errors.ts +567 -0
- package/src/index.ts +3 -0
- package/src/tsconfig.json +13 -0
- package/src/types/Twin.ts +7 -0
- package/src/types/TwinGeometryInfo.ts +7 -0
- package/src/types/asset-api.ts +69 -0
- package/src/types/asset-attachment-api.ts +56 -0
- package/src/types/asset-batch-api.ts +90 -0
- package/src/types/asset-types-api.ts +86 -0
- package/src/types/common.ts +10 -0
- package/src/types/generated.ts +655 -0
- package/src/types/index.ts +9 -0
- package/src/types/twin-api.ts +153 -0
- package/src/types/twin-file-api.ts +67 -0
- package/src/types/twin-permissions-api.ts +257 -0
package/dist/errors.js
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a non-OK response body as a {@link TwinErrorBody}. Falls back to a
|
|
3
|
+
* synthetic body carrying the response text (or statusText) when the body
|
|
4
|
+
* isn't valid JSON — for example when a WAF or intermediate proxy injects
|
|
5
|
+
* an HTML 4xx page. Callers can therefore always pattern-match on
|
|
6
|
+
* `errorBody.cause` without an outer try/catch around a bare
|
|
7
|
+
* `response.json()`.
|
|
8
|
+
*
|
|
9
|
+
* The synthetic body uses `cause: 'Unknown'`, which is permitted by the
|
|
10
|
+
* `(string & {})` forward-compat tail on {@link TwinErrorCause}. Consumers
|
|
11
|
+
* that switch on known causes will fall through to a default arm.
|
|
12
|
+
*/
|
|
13
|
+
export async function readErrorBody(response) {
|
|
14
|
+
// Parse a clone, so that a body which turns out not to be JSON can still be read as text below.
|
|
15
|
+
// `json()` consumes the stream: on a real Response, reading the original here would leave the
|
|
16
|
+
// fallback unreachable and every non-JSON diagnostic would degrade to `statusText`.
|
|
17
|
+
const parseFrom = typeof response.clone === 'function' ? response.clone() : response;
|
|
18
|
+
try {
|
|
19
|
+
const parsed = (await parseFrom.json());
|
|
20
|
+
// Defensive shape check — JSON-but-not-our-shape (e.g. an upstream
|
|
21
|
+
// ProblemDetails payload from a non-Twinfinity component) should still
|
|
22
|
+
// surface usefully. `detail` is the only field every consumer reads.
|
|
23
|
+
if (parsed && typeof parsed.detail === 'string')
|
|
24
|
+
return parsed;
|
|
25
|
+
return { detail: JSON.stringify(parsed), cause: 'Unknown' };
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
const text = await response.text().catch(() => '');
|
|
29
|
+
return { detail: text || response.statusText || `HTTP ${response.status}`, cause: 'Unknown' };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export class TwinValidationError extends Error {
|
|
33
|
+
errorBody;
|
|
34
|
+
constructor(message, errorBody) {
|
|
35
|
+
super(message);
|
|
36
|
+
this.name = 'TwinValidationError';
|
|
37
|
+
this.errorBody = errorBody;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export class TwinConflictError extends Error {
|
|
41
|
+
currentTwin;
|
|
42
|
+
constructor(message, currentTwin) {
|
|
43
|
+
super(message);
|
|
44
|
+
this.name = 'TwinConflictError';
|
|
45
|
+
this.currentTwin = currentTwin;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export class TwinNotFoundError extends Error {
|
|
49
|
+
/** The server's envelope, when there was one — `item.kind` names what was not found. */
|
|
50
|
+
errorBody;
|
|
51
|
+
constructor(message, errorBody) {
|
|
52
|
+
super(message);
|
|
53
|
+
this.name = 'TwinNotFoundError';
|
|
54
|
+
this.errorBody = errorBody;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export class ProcessorNotFoundError extends Error {
|
|
58
|
+
constructor(message) {
|
|
59
|
+
super(message);
|
|
60
|
+
this.name = 'ProcessorNotFoundError';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export class AssetValidationError extends Error {
|
|
64
|
+
errorBody;
|
|
65
|
+
constructor(message, errorBody) {
|
|
66
|
+
super(message);
|
|
67
|
+
this.name = 'AssetValidationError';
|
|
68
|
+
this.errorBody = errorBody;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export class AssetForbiddenError extends Error {
|
|
72
|
+
constructor(message) {
|
|
73
|
+
super(message);
|
|
74
|
+
this.name = 'AssetForbiddenError';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export class AssetConflictError extends Error {
|
|
78
|
+
currentAsset;
|
|
79
|
+
constructor(message, currentAsset) {
|
|
80
|
+
super(message);
|
|
81
|
+
this.name = 'AssetConflictError';
|
|
82
|
+
this.currentAsset = currentAsset;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export class AssetNotFoundError extends Error {
|
|
86
|
+
constructor(message) {
|
|
87
|
+
super(message);
|
|
88
|
+
this.name = 'AssetNotFoundError';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export class AssetAttachmentConflictError extends Error {
|
|
92
|
+
currentAttachment;
|
|
93
|
+
constructor(message, currentAttachment) {
|
|
94
|
+
super(message);
|
|
95
|
+
this.name = 'AssetAttachmentConflictError';
|
|
96
|
+
this.currentAttachment = currentAttachment;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export class AssetAttachmentNotFoundError extends Error {
|
|
100
|
+
constructor(message) {
|
|
101
|
+
super(message);
|
|
102
|
+
this.name = 'AssetAttachmentNotFoundError';
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export class AssetBatchError extends Error {
|
|
106
|
+
response;
|
|
107
|
+
constructor(message, response) {
|
|
108
|
+
super(message);
|
|
109
|
+
this.name = 'AssetBatchError';
|
|
110
|
+
this.response = response;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
export class TwinFileValidationError extends Error {
|
|
114
|
+
errorBody;
|
|
115
|
+
constructor(message, errorBody) {
|
|
116
|
+
super(message);
|
|
117
|
+
this.name = 'TwinFileValidationError';
|
|
118
|
+
this.errorBody = errorBody;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export class TwinFileConflictError extends Error {
|
|
122
|
+
currentTwinFile;
|
|
123
|
+
constructor(message, currentTwinFile) {
|
|
124
|
+
super(message);
|
|
125
|
+
this.name = 'TwinFileConflictError';
|
|
126
|
+
this.currentTwinFile = currentTwinFile;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
export class TwinFileNotFoundError extends Error {
|
|
130
|
+
constructor(message) {
|
|
131
|
+
super(message);
|
|
132
|
+
this.name = 'TwinFileNotFoundError';
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// ---------- Asset categories ----------
|
|
136
|
+
export class AssetCategoryValidationError extends Error {
|
|
137
|
+
errorBody;
|
|
138
|
+
constructor(message, errorBody) {
|
|
139
|
+
super(message);
|
|
140
|
+
this.name = 'AssetCategoryValidationError';
|
|
141
|
+
this.errorBody = errorBody;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export class AssetCategoryConflictError extends Error {
|
|
145
|
+
currentCategory;
|
|
146
|
+
constructor(message, currentCategory) {
|
|
147
|
+
super(message);
|
|
148
|
+
this.name = 'AssetCategoryConflictError';
|
|
149
|
+
this.currentCategory = currentCategory;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
export class AssetCategoryNotFoundError extends Error {
|
|
153
|
+
constructor(message) {
|
|
154
|
+
super(message);
|
|
155
|
+
this.name = 'AssetCategoryNotFoundError';
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
export class AssetCategoryForbiddenError extends Error {
|
|
159
|
+
constructor(message) {
|
|
160
|
+
super(message);
|
|
161
|
+
this.name = 'AssetCategoryForbiddenError';
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// ---------- Asset types ----------
|
|
165
|
+
export class AssetTypeValidationError extends Error {
|
|
166
|
+
errorBody;
|
|
167
|
+
constructor(message, errorBody) {
|
|
168
|
+
super(message);
|
|
169
|
+
this.name = 'AssetTypeValidationError';
|
|
170
|
+
this.errorBody = errorBody;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
export class AssetTypeConflictError extends Error {
|
|
174
|
+
currentType;
|
|
175
|
+
constructor(message, currentType) {
|
|
176
|
+
super(message);
|
|
177
|
+
this.name = 'AssetTypeConflictError';
|
|
178
|
+
this.currentType = currentType;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export class AssetTypeNotFoundError extends Error {
|
|
182
|
+
constructor(message) {
|
|
183
|
+
super(message);
|
|
184
|
+
this.name = 'AssetTypeNotFoundError';
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
export class AssetTypeForbiddenError extends Error {
|
|
188
|
+
constructor(message) {
|
|
189
|
+
super(message);
|
|
190
|
+
this.name = 'AssetTypeForbiddenError';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Thrown by `getAssetTypeCatalog` when the customer's catalog exceeds the
|
|
195
|
+
* per-customer cap. The catalog endpoint is a single-round-trip view; tenants
|
|
196
|
+
* over the cap must switch to a paginated endpoint (not yet shipped). Surfaced
|
|
197
|
+
* as a hard failure rather than silent truncation so picker UIs can render
|
|
198
|
+
* "too many rows, use search" instead of "out of types."
|
|
199
|
+
*
|
|
200
|
+
* `categoriesOverflowed` / `typesOverflowed` identify which side(s) breached
|
|
201
|
+
* the cap; both can be true. `categoriesCount` / `typesCount` are the observed
|
|
202
|
+
* counts (≥ `maxCatalogSize` for the overflowing side(s)).
|
|
203
|
+
*/
|
|
204
|
+
export class AssetCatalogTooLargeError extends Error {
|
|
205
|
+
errorBody;
|
|
206
|
+
categoriesCount;
|
|
207
|
+
typesCount;
|
|
208
|
+
maxCatalogSize;
|
|
209
|
+
categoriesOverflowed;
|
|
210
|
+
typesOverflowed;
|
|
211
|
+
constructor(message, errorBody) {
|
|
212
|
+
super(message);
|
|
213
|
+
this.name = 'AssetCatalogTooLargeError';
|
|
214
|
+
this.errorBody = errorBody;
|
|
215
|
+
this.categoriesCount = errorBody.categoriesCount;
|
|
216
|
+
this.typesCount = errorBody.typesCount;
|
|
217
|
+
this.maxCatalogSize = errorBody.maxCatalogSize;
|
|
218
|
+
this.categoriesOverflowed = errorBody.categoriesOverflowed;
|
|
219
|
+
this.typesOverflowed = errorBody.typesOverflowed;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Type guard for a {@link TwinErrorBody} that carries `CatalogTooLarge`
|
|
224
|
+
* with the structured count fields the dedicated wire shape adds on top of
|
|
225
|
+
* the standard envelope. Used by the client to decide whether to throw a
|
|
226
|
+
* typed {@link AssetCatalogTooLargeError} or fall through to a generic
|
|
227
|
+
* validation error when the server sends a malformed payload.
|
|
228
|
+
*/
|
|
229
|
+
export function isAssetCatalogTooLargeErrorBody(body) {
|
|
230
|
+
return (body.cause === 'CatalogTooLarge' &&
|
|
231
|
+
typeof body.categoriesCount === 'number' &&
|
|
232
|
+
typeof body.typesCount === 'number' &&
|
|
233
|
+
typeof body.maxCatalogSize === 'number' &&
|
|
234
|
+
typeof body.categoriesOverflowed === 'boolean' &&
|
|
235
|
+
typeof body.typesOverflowed === 'boolean');
|
|
236
|
+
}
|
|
237
|
+
// ---------- Authentication ----------
|
|
238
|
+
/**
|
|
239
|
+
* Thrown when the server returns 401 (Unauthorized). Distinct from forbidden
|
|
240
|
+
* errors: 401 means "no valid auth context" (the caller should redirect to
|
|
241
|
+
* login / refresh tokens), while 403 means "authenticated but not granted"
|
|
242
|
+
* (the UI should surface a permissions hint or render disabled affordances).
|
|
243
|
+
*/
|
|
244
|
+
export class TwinUnauthenticatedError extends Error {
|
|
245
|
+
constructor(message) {
|
|
246
|
+
super(message);
|
|
247
|
+
this.name = 'TwinUnauthenticatedError';
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Thrown by the twin permission mutation and listing methods on a 409.
|
|
252
|
+
*
|
|
253
|
+
* The three causes need different handling, which is why they are distinguishable
|
|
254
|
+
* rather than collapsed into one "modified by another user":
|
|
255
|
+
* - `EtagMismatch` — the etag is stale; re-read (or use {@link currentState}) and retry.
|
|
256
|
+
* - `EtagRequired` — the write omitted an etag but the principal already held an entry,
|
|
257
|
+
* so it would have replaced state the caller never read. Retried by reading at all.
|
|
258
|
+
* - `ScopesNotProvisioned` — the twin owns no Twinfinity scope, so there is no permission
|
|
259
|
+
* state to read or write. Nothing provisions on read, so retrying will not help.
|
|
260
|
+
*/
|
|
261
|
+
export class TwinPermissionsConflictError extends Error {
|
|
262
|
+
/**
|
|
263
|
+
* Which of the three conflicts this is. Named `conflictCause` rather than `cause` so the
|
|
264
|
+
* standard `Error.cause` — whose consumers expect a wrapped error, not a string — is left
|
|
265
|
+
* alone; the same value is on {@link errorBody}`.cause`.
|
|
266
|
+
*/
|
|
267
|
+
conflictCause;
|
|
268
|
+
/** The entry as the server holds it, including the etag to retry with. */
|
|
269
|
+
currentState;
|
|
270
|
+
errorBody;
|
|
271
|
+
constructor(message, errorBody) {
|
|
272
|
+
super(message);
|
|
273
|
+
this.name = 'TwinPermissionsConflictError';
|
|
274
|
+
this.conflictCause = errorBody.cause;
|
|
275
|
+
this.currentState = errorBody.currentState;
|
|
276
|
+
this.errorBody = errorBody;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Thrown on a 403 from the twin-scoped permission surface: the caller can see the twin
|
|
281
|
+
* but does not hold `ManageTwinPermissions` on it. Distinct from
|
|
282
|
+
* {@link TwinNotFoundError}, which is what a twin the caller cannot see at all answers —
|
|
283
|
+
* the surface refuses to confirm such a twin exists.
|
|
284
|
+
*/
|
|
285
|
+
export class TwinPermissionsForbiddenError extends Error {
|
|
286
|
+
/**
|
|
287
|
+
* The server's envelope, when there was one. Its presence is load-bearing: a genuine refusal
|
|
288
|
+
* carries `cause: 'InsufficientPermissions'`, while a Twin service that could not evaluate the
|
|
289
|
+
* request at all (a customer-database lookup that threw, a missing twin feature) falls through
|
|
290
|
+
* to the framework's default forbid handler and answers a 403 with no body. Without this a
|
|
291
|
+
* caller cannot tell "you may not" from "we could not tell", and would report the first.
|
|
292
|
+
*/
|
|
293
|
+
errorBody;
|
|
294
|
+
constructor(message, errorBody) {
|
|
295
|
+
super(message);
|
|
296
|
+
this.name = 'TwinPermissionsForbiddenError';
|
|
297
|
+
this.errorBody = errorBody;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Thrown when a 404 names the principal rather than the twin — an id that no principal
|
|
302
|
+
* in the tenant carries, or one holding nothing on the twin for a `DELETE` to revoke.
|
|
303
|
+
*/
|
|
304
|
+
export class TwinPrincipalNotFoundError extends Error {
|
|
305
|
+
errorBody;
|
|
306
|
+
constructor(message, errorBody) {
|
|
307
|
+
super(message);
|
|
308
|
+
this.name = 'TwinPrincipalNotFoundError';
|
|
309
|
+
this.errorBody = errorBody;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Thrown on a 503: the Twin service could neither carry out the request nor answer it
|
|
314
|
+
* truthfully. The request is unchanged and safe to retry as-is — unlike
|
|
315
|
+
* {@link TwinPermissionsConflictError}, which never clears on its own.
|
|
316
|
+
*/
|
|
317
|
+
export class TwinTemporarilyUnavailableError extends Error {
|
|
318
|
+
errorBody;
|
|
319
|
+
/**
|
|
320
|
+
* The `Retry-After` the service sent, in seconds, when it sent one. The Twin service pairs the
|
|
321
|
+
* status with this header deliberately, so that "retrying is worthwhile" does not rest on the
|
|
322
|
+
* status alone — pass it to whatever backoff the caller uses instead of inventing a delay.
|
|
323
|
+
*/
|
|
324
|
+
retryAfterSeconds;
|
|
325
|
+
constructor(message, errorBody, retryAfterSeconds) {
|
|
326
|
+
super(message);
|
|
327
|
+
this.name = 'TwinTemporarilyUnavailableError';
|
|
328
|
+
this.errorBody = errorBody;
|
|
329
|
+
this.retryAfterSeconds = retryAfterSeconds;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Thrown by the asset permission mutation methods on a 409, which on this surface is always an
|
|
334
|
+
* etag failure:
|
|
335
|
+
* - `EtagMismatch` — the etag is stale; re-read (or use {@link currentState}) and retry. Expect
|
|
336
|
+
* this routinely: the scope's etag is customer-wide, so any administrator's write invalidates it.
|
|
337
|
+
* - `EtagRequired` — the write omitted an etag but the principal already held capabilities, so it
|
|
338
|
+
* would have replaced state the caller never read.
|
|
339
|
+
*/
|
|
340
|
+
export class AssetPermissionsConflictError extends Error {
|
|
341
|
+
/**
|
|
342
|
+
* Which of the two conflicts this is. Named `conflictCause` rather than `cause` so the standard
|
|
343
|
+
* `Error.cause` — whose consumers expect a wrapped error, not a string — is left alone.
|
|
344
|
+
*/
|
|
345
|
+
conflictCause;
|
|
346
|
+
/** The entry as the server holds it, including the etag to retry with. */
|
|
347
|
+
currentState;
|
|
348
|
+
errorBody;
|
|
349
|
+
constructor(message, errorBody) {
|
|
350
|
+
super(message);
|
|
351
|
+
this.name = 'AssetPermissionsConflictError';
|
|
352
|
+
this.conflictCause = errorBody.cause;
|
|
353
|
+
this.currentState = errorBody.currentState;
|
|
354
|
+
this.errorBody = errorBody;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAgGA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,QAAkB;IAClD,gGAAgG;IAChG,8FAA8F;IAC9F,oFAAoF;IACpF,MAAM,SAAS,GAAG,OAAO,QAAQ,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrF,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,CAAC,MAAM,SAAS,CAAC,IAAI,EAAE,CAAkB,CAAC;QACzD,mEAAmE;QACnE,uEAAuE;QACvE,qEAAqE;QACrE,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ;YAAE,OAAO,MAAM,CAAC;QAC/D,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAChE,CAAC;IAAC,MAAM,CAAC;QACL,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QACnD,OAAO,EAAE,MAAM,EAAE,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,QAAQ,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,SA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ACJ"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|