@omirion/orbit-sdk 0.1.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/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/index.cjs +1684 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3714 -0
- package/dist/index.d.ts +3714 -0
- package/dist/index.js +1661 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3714 @@
|
|
|
1
|
+
type ClientOptions$1 = {
|
|
2
|
+
baseUrl: 'https://orbit.omirion.com' | (string & {});
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* A single error. `code` is a stable machine-readable identifier.
|
|
6
|
+
*/
|
|
7
|
+
type ErrorItem = {
|
|
8
|
+
code?: string;
|
|
9
|
+
message: string;
|
|
10
|
+
field?: string | null;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Standard error envelope. `code` values are stable within `/api/v1`.
|
|
14
|
+
*/
|
|
15
|
+
type ErrorResponse = {
|
|
16
|
+
errors: Array<ErrorItem>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Cursor-pagination metadata. Pass `nextCursor` back as `?cursor=` to page.
|
|
20
|
+
*/
|
|
21
|
+
type PageMeta = {
|
|
22
|
+
hasMore: boolean;
|
|
23
|
+
nextCursor: string | null;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The user the token was minted by, and acts as.
|
|
27
|
+
*/
|
|
28
|
+
type IdentityUser = {
|
|
29
|
+
id: string;
|
|
30
|
+
email: string;
|
|
31
|
+
firstName: string;
|
|
32
|
+
lastName: string;
|
|
33
|
+
role: 'admin' | 'user';
|
|
34
|
+
organizationId: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The presented token. `abilities` is the ceiling on this credential. It never widens with the user’s role, so an admin may hold a read-only token.
|
|
38
|
+
*/
|
|
39
|
+
type IdentityToken = {
|
|
40
|
+
/**
|
|
41
|
+
* Token identifier. The secret is never returned.
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
name: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Functional grants. Project scope is reported separately.
|
|
47
|
+
*/
|
|
48
|
+
abilities: Array<'api:projects:read' | 'api:projects:manage' | 'api:devices:read' | 'api:devices:manage' | 'api:telemetry:read' | 'api:firmware:read' | 'api:firmware:write' | 'api:command:exec' | 'api:webhooks:read' | 'api:webhooks:manage' | 'api:device-types:manage' | 'api:admissions:read' | 'api:admissions:manage' | 'api:usb:attach' | 'api:terminal:open'>;
|
|
49
|
+
/**
|
|
50
|
+
* Project ids this token is restricted to. `null` means every project the user can reach (an absent restriction, not an empty one).
|
|
51
|
+
*/
|
|
52
|
+
projectScope: Array<string> | null;
|
|
53
|
+
lastUsedAt: string | null;
|
|
54
|
+
expiresAt: string | null;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* A project reachable with this user and token scope.
|
|
58
|
+
*/
|
|
59
|
+
type IdentityProject = {
|
|
60
|
+
id: string;
|
|
61
|
+
organizationId: string;
|
|
62
|
+
name: string;
|
|
63
|
+
description: string | null;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Who this token authenticates as, what it may do, and which projects it reaches. `projects` is the effective set (the user’s organisation access intersected with the token’s project scope), so it is the list of ids every other endpoint accepts.
|
|
67
|
+
*/
|
|
68
|
+
type Identity = {
|
|
69
|
+
user: IdentityUser;
|
|
70
|
+
token: IdentityToken;
|
|
71
|
+
projects: Array<IdentityProject>;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* A project as a resource. Richer than `IdentityProject`, which `/api/v1/me` returns under no ability and which stays limited to what a caller needs to address other endpoints.
|
|
75
|
+
*/
|
|
76
|
+
type Project = {
|
|
77
|
+
id: string;
|
|
78
|
+
organizationId: string;
|
|
79
|
+
name: string;
|
|
80
|
+
description: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* Whether a provisioning (app) token is set, so devices can enrol. The token itself is never returned.
|
|
83
|
+
*/
|
|
84
|
+
hasAppToken: boolean;
|
|
85
|
+
createdAt: string;
|
|
86
|
+
updatedAt: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* A device type: the model a device identifies as, and the contract for what it reports and what it can be told to do. Project-scoped (#47).
|
|
90
|
+
*/
|
|
91
|
+
type DeviceType = {
|
|
92
|
+
id: string;
|
|
93
|
+
projectId: string;
|
|
94
|
+
organizationId: string;
|
|
95
|
+
/**
|
|
96
|
+
* Stable identifier the device presents when it identifies. Immutable once set.
|
|
97
|
+
*/
|
|
98
|
+
slug: string;
|
|
99
|
+
name: string;
|
|
100
|
+
description: string | null;
|
|
101
|
+
version: string;
|
|
102
|
+
manifest: TelemetryManifest;
|
|
103
|
+
/**
|
|
104
|
+
* Telegraf collection profile for gateway-class types. Null for MCU-class types, which report through the device agent rather than a collector.
|
|
105
|
+
*/
|
|
106
|
+
collectionProfile: {
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
} | null;
|
|
109
|
+
commandManifest: CommandManifest | null;
|
|
110
|
+
/**
|
|
111
|
+
* Which USB peripherals a device of this type may export over USB/IP. Declaring one grants nothing on its own: attaching still requires `api:usb:attach`.
|
|
112
|
+
*/
|
|
113
|
+
usbManifest: {
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
} | null;
|
|
116
|
+
/**
|
|
117
|
+
* Raw nanopb `.options` file text for this device type’s firmware build, uploaded as-is. Declares the wire-size limits (`max_size`, `max_count`) the compiled firmware actually has room for; the server truncates downlink fields (e.g. a firmware rollback `reason`) to fit rather than sending something the device fails to decode. Null: unconstrained, same as before this existed.
|
|
118
|
+
*/
|
|
119
|
+
protocolOptions: string | null;
|
|
120
|
+
offlineAfterSeconds: number | null;
|
|
121
|
+
dispatchProfile: string;
|
|
122
|
+
createdAt: string;
|
|
123
|
+
updatedAt: string;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Compact device type for list responses: manifest **counts** instead of the manifests, so a page stays small. Read one type for the full contract.
|
|
127
|
+
*/
|
|
128
|
+
type DeviceTypeListItem = {
|
|
129
|
+
id: string;
|
|
130
|
+
projectId: string;
|
|
131
|
+
slug: string;
|
|
132
|
+
name: string;
|
|
133
|
+
description: string | null;
|
|
134
|
+
version: string;
|
|
135
|
+
metricsCount: number;
|
|
136
|
+
groupsCount: number;
|
|
137
|
+
commandsCount: number;
|
|
138
|
+
hasProtocolOptions: boolean;
|
|
139
|
+
dispatchProfile: string;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* A page of device types with cursor-pagination metadata.
|
|
144
|
+
*/
|
|
145
|
+
type DeviceTypeListPage = {
|
|
146
|
+
data: Array<DeviceTypeListItem>;
|
|
147
|
+
meta: PageMeta;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* A new device type. The owning project comes from the path, not this body.
|
|
151
|
+
*/
|
|
152
|
+
type DeviceTypeCreateRequest = {
|
|
153
|
+
/**
|
|
154
|
+
* Lowercase identifier the device presents when it identifies.
|
|
155
|
+
*/
|
|
156
|
+
slug: string;
|
|
157
|
+
name: string;
|
|
158
|
+
description?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Defaults to `1.0.0`.
|
|
161
|
+
*/
|
|
162
|
+
version?: string;
|
|
163
|
+
manifest: TelemetryManifest;
|
|
164
|
+
collectionProfile?: {
|
|
165
|
+
[key: string]: unknown;
|
|
166
|
+
} | null;
|
|
167
|
+
commandManifest?: CommandManifest | null;
|
|
168
|
+
usbManifest?: {
|
|
169
|
+
[key: string]: unknown;
|
|
170
|
+
} | null;
|
|
171
|
+
/**
|
|
172
|
+
* Raw nanopb `.options` file text, see the `DeviceType` schema.
|
|
173
|
+
*/
|
|
174
|
+
protocolOptions?: string | null;
|
|
175
|
+
offlineAfterSeconds?: number | null;
|
|
176
|
+
dispatchProfile?: string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Partial update: only the fields sent change. `slug` is absent by design, being the identifier. A manifest sent here replaces the stored one wholesale.
|
|
180
|
+
*/
|
|
181
|
+
type DeviceTypeUpdateRequest = {
|
|
182
|
+
name?: string;
|
|
183
|
+
description?: string | null;
|
|
184
|
+
version?: string;
|
|
185
|
+
manifest?: TelemetryManifest;
|
|
186
|
+
collectionProfile?: {
|
|
187
|
+
[key: string]: unknown;
|
|
188
|
+
} | null;
|
|
189
|
+
commandManifest?: CommandManifest | null;
|
|
190
|
+
usbManifest?: {
|
|
191
|
+
[key: string]: unknown;
|
|
192
|
+
} | null;
|
|
193
|
+
/**
|
|
194
|
+
* Raw nanopb `.options` file text, see the `DeviceType` schema.
|
|
195
|
+
*/
|
|
196
|
+
protocolOptions?: string | null;
|
|
197
|
+
offlineAfterSeconds?: number | null;
|
|
198
|
+
dispatchProfile?: string;
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* A newly minted provisioning (app) token. `token` is the plaintext value, returned exactly once: the server keeps only its sha256, so a lost token can be replaced but never recovered.
|
|
202
|
+
*/
|
|
203
|
+
type ProjectAppToken = {
|
|
204
|
+
project: Project;
|
|
205
|
+
/**
|
|
206
|
+
* The plaintext `omr_prj_…` token. Present only in this response, never in any later read of the project.
|
|
207
|
+
*/
|
|
208
|
+
token: string;
|
|
209
|
+
/**
|
|
210
|
+
* First 16 characters, safe to log or display so an operator can tell two tokens apart without holding either.
|
|
211
|
+
*/
|
|
212
|
+
tokenPrefix: string;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* A page of projects with cursor-pagination metadata.
|
|
216
|
+
*/
|
|
217
|
+
type ProjectListPage = {
|
|
218
|
+
data: Array<Project>;
|
|
219
|
+
meta: PageMeta;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Compact device representation used in list responses.
|
|
223
|
+
*/
|
|
224
|
+
type DeviceListItem = {
|
|
225
|
+
id: string;
|
|
226
|
+
/**
|
|
227
|
+
* Owning project. Resolves the fleet a device belongs to without a walk.
|
|
228
|
+
*/
|
|
229
|
+
projectId: string;
|
|
230
|
+
name: string;
|
|
231
|
+
/**
|
|
232
|
+
* Hardware identity (e.g. a modem IMEI) integrators key their records on.
|
|
233
|
+
*/
|
|
234
|
+
fingerprint: string | null;
|
|
235
|
+
isOnline: boolean;
|
|
236
|
+
lastSeenAt: string | null;
|
|
237
|
+
deviceTypeSlug: string | null;
|
|
238
|
+
createdAt: string;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Full device detail.
|
|
242
|
+
*/
|
|
243
|
+
type Device = {
|
|
244
|
+
id: string;
|
|
245
|
+
/**
|
|
246
|
+
* Owning project. Resolves the fleet a device belongs to without a walk.
|
|
247
|
+
*/
|
|
248
|
+
projectId: string;
|
|
249
|
+
name: string;
|
|
250
|
+
/**
|
|
251
|
+
* Hardware identity (e.g. a modem IMEI) integrators key their records on.
|
|
252
|
+
*/
|
|
253
|
+
fingerprint: string | null;
|
|
254
|
+
isOnline: boolean;
|
|
255
|
+
lastSeenAt: string | null;
|
|
256
|
+
deviceTypeName: string | null;
|
|
257
|
+
deviceTypeSlug: string | null;
|
|
258
|
+
firmwareVersion: string | null;
|
|
259
|
+
agentVersion: string | null;
|
|
260
|
+
createdAt: string;
|
|
261
|
+
updatedAt: string;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* A page of devices with cursor-pagination metadata.
|
|
265
|
+
*/
|
|
266
|
+
type DeviceListPage = {
|
|
267
|
+
data: Array<DeviceListItem>;
|
|
268
|
+
meta: PageMeta;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* A freshly rotated device token. Shown once. Persist it and load it onto the device (or let the device re-admit with its fingerprint to receive it automatically). The previous token is invalidated.
|
|
272
|
+
*/
|
|
273
|
+
type DeviceTokenReset = {
|
|
274
|
+
deviceId: string;
|
|
275
|
+
/**
|
|
276
|
+
* The new plaintext token (prefixed `omr_`). Not retrievable again.
|
|
277
|
+
*/
|
|
278
|
+
deviceToken: string;
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* A device admission (fleet-join) request. `status` is `pending` until reviewed; accepting it provisions a device and sets `deviceId`.
|
|
282
|
+
*/
|
|
283
|
+
type Admission = {
|
|
284
|
+
id: string;
|
|
285
|
+
projectId: string;
|
|
286
|
+
/**
|
|
287
|
+
* Hardware identity the requesting unit presented (e.g. a modem IMEI).
|
|
288
|
+
*/
|
|
289
|
+
fingerprint: string;
|
|
290
|
+
hostname: string | null;
|
|
291
|
+
/**
|
|
292
|
+
* Free-form attributes the agent attached to the request.
|
|
293
|
+
*/
|
|
294
|
+
metadata: {
|
|
295
|
+
[key: string]: unknown;
|
|
296
|
+
} | null;
|
|
297
|
+
status: 'pending' | 'accepted' | 'rejected' | 'dismissed';
|
|
298
|
+
/**
|
|
299
|
+
* The device provisioned when the request was accepted; null otherwise.
|
|
300
|
+
*/
|
|
301
|
+
deviceId: string | null;
|
|
302
|
+
reviewedBy: string | null;
|
|
303
|
+
reviewedAt: string | null;
|
|
304
|
+
createdAt: string;
|
|
305
|
+
updatedAt: string | null;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* A page of admission requests with cursor-pagination metadata.
|
|
309
|
+
*/
|
|
310
|
+
type AdmissionListPage = {
|
|
311
|
+
data: Array<Admission>;
|
|
312
|
+
meta: PageMeta;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Provisioning details for the device created when the admission is accepted.
|
|
316
|
+
*/
|
|
317
|
+
type AdmissionAcceptRequest = {
|
|
318
|
+
/**
|
|
319
|
+
* Human-readable name for the new device.
|
|
320
|
+
*/
|
|
321
|
+
deviceName: string;
|
|
322
|
+
/**
|
|
323
|
+
* Device-type to classify the device (must be in the project). Required. Pass the type resolved from the device’s declared model, or another to override it.
|
|
324
|
+
*/
|
|
325
|
+
deviceTypeId: string;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* The reviewed admission and the device it provisioned.
|
|
329
|
+
*/
|
|
330
|
+
type AdmissionAcceptResponse = {
|
|
331
|
+
admission: Admission;
|
|
332
|
+
device: Device;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* A telemetry sample. `metrics` is an open map keyed by the device-type manifest metric `key` (snake_case); resolve labels/units/types via the manifest endpoint. Values are already expressed in the metric's declared unit. A manifest `scale` has been applied on the way out, so never multiply by it again.
|
|
336
|
+
*/
|
|
337
|
+
type TelemetrySample = {
|
|
338
|
+
metrics: {
|
|
339
|
+
[key: string]: number | boolean | string;
|
|
340
|
+
};
|
|
341
|
+
recordedAt: string;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Time-ordered (ascending) telemetry samples for a window.
|
|
345
|
+
*/
|
|
346
|
+
type TelemetryHistory = {
|
|
347
|
+
data: Array<TelemetrySample>;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* Definition of a single metric a device type can report.
|
|
351
|
+
*/
|
|
352
|
+
type MetricDefinition = {
|
|
353
|
+
id: number;
|
|
354
|
+
key: string;
|
|
355
|
+
label: string;
|
|
356
|
+
type: 'float' | 'int' | 'uint' | 'bool' | 'string';
|
|
357
|
+
deviceClass: string;
|
|
358
|
+
stateClass: 'measurement' | 'total' | 'total_increasing';
|
|
359
|
+
unit?: string;
|
|
360
|
+
min?: number;
|
|
361
|
+
max?: number;
|
|
362
|
+
/**
|
|
363
|
+
* Multiplier the device's raw integer reading was decoded with (`value = raw × scale`), for devices that keep floats off the wire. Already applied to the values returned by the telemetry endpoints; it is documentation, not an instruction to multiply again. Defaults to 1.
|
|
364
|
+
*/
|
|
365
|
+
scale?: number;
|
|
366
|
+
/**
|
|
367
|
+
* Decimal places to round to for display. Does not scale the value.
|
|
368
|
+
*/
|
|
369
|
+
precision?: number;
|
|
370
|
+
optional?: boolean;
|
|
371
|
+
group: string;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* UI grouping metadata for metrics.
|
|
375
|
+
*/
|
|
376
|
+
type MetricGroup = {
|
|
377
|
+
key: string;
|
|
378
|
+
label: string;
|
|
379
|
+
icon: string;
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Metric manifest for a device type (what each metric key means).
|
|
383
|
+
*/
|
|
384
|
+
type TelemetryManifest = {
|
|
385
|
+
version: string;
|
|
386
|
+
metrics: Array<MetricDefinition>;
|
|
387
|
+
groups: Array<MetricGroup>;
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* A stored firmware bundle (RAUC or MCUboot).
|
|
391
|
+
*/
|
|
392
|
+
type FirmwareBundle = {
|
|
393
|
+
id: string;
|
|
394
|
+
projectId: string;
|
|
395
|
+
/**
|
|
396
|
+
* Image kind: `rauc` (Linux A/B .raucb) or `mcuboot` (signed MCU image).
|
|
397
|
+
*/
|
|
398
|
+
kind: 'rauc' | 'mcuboot';
|
|
399
|
+
version: string;
|
|
400
|
+
/**
|
|
401
|
+
* Target compatibility key, i.e. the RAUC `compatible` string for `rauc` bundles, a board/device-type identifier for `mcuboot`.
|
|
402
|
+
*/
|
|
403
|
+
compatible: string;
|
|
404
|
+
filename: string;
|
|
405
|
+
sizeBytes: number;
|
|
406
|
+
sha256: string;
|
|
407
|
+
description: string | null;
|
|
408
|
+
uploadedBy: string;
|
|
409
|
+
createdAt: string;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* A page of firmware bundles with cursor-pagination metadata.
|
|
413
|
+
*/
|
|
414
|
+
type FirmwareBundleListPage = {
|
|
415
|
+
data: Array<FirmwareBundle>;
|
|
416
|
+
meta: PageMeta;
|
|
417
|
+
};
|
|
418
|
+
type FirmwareUploadResponse = {
|
|
419
|
+
bundle: FirmwareBundle;
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* A firmware rollout to a single device. `status` walks `pending → downloading → installing → succeeded` (or `failed` / `canceled` / `rolled_back`); `phase`, `progressPercent`, `message` and `error` reflect the latest agent report.
|
|
423
|
+
*/
|
|
424
|
+
type FirmwareDeployment = {
|
|
425
|
+
id: string;
|
|
426
|
+
bundleId: string;
|
|
427
|
+
deviceId: string;
|
|
428
|
+
status: 'pending' | 'downloading' | 'installing' | 'succeeded' | 'failed' | 'canceled' | 'rolled_back';
|
|
429
|
+
phase: string | null;
|
|
430
|
+
progressPercent: number;
|
|
431
|
+
message: string | null;
|
|
432
|
+
error: string | null;
|
|
433
|
+
/**
|
|
434
|
+
* The slot the device reported booting into after install.
|
|
435
|
+
*/
|
|
436
|
+
bootedSlot: string | null;
|
|
437
|
+
installedVersion: string | null;
|
|
438
|
+
triggeredBy: string | null;
|
|
439
|
+
dispatchedAt: string | null;
|
|
440
|
+
finishedAt: string | null;
|
|
441
|
+
createdAt: string;
|
|
442
|
+
updatedAt: string;
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* A page of firmware deployments with cursor-pagination metadata.
|
|
446
|
+
*/
|
|
447
|
+
type FirmwareDeploymentListPage = {
|
|
448
|
+
data: Array<FirmwareDeployment>;
|
|
449
|
+
meta: PageMeta;
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* The bundle to roll out and the devices to target.
|
|
453
|
+
*/
|
|
454
|
+
type FirmwareDeploymentTriggerRequest = {
|
|
455
|
+
bundleId: string;
|
|
456
|
+
/**
|
|
457
|
+
* Devices to upgrade. All must belong to the bundle’s project.
|
|
458
|
+
*/
|
|
459
|
+
deviceIds: Array<string>;
|
|
460
|
+
};
|
|
461
|
+
/**
|
|
462
|
+
* Cancellation intent. The body is optional: with no `force`, only a `pending` deployment cancels.
|
|
463
|
+
*/
|
|
464
|
+
type FirmwareDeploymentCancelRequest = {
|
|
465
|
+
/**
|
|
466
|
+
* Abort a deployment already in flight (`downloading` / `installing`). Required for those states, because the device may be partway through an install; the server records who forced it in the deployment’s `error` and `message`.
|
|
467
|
+
*/
|
|
468
|
+
force?: boolean;
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* Rollback intent. The body is optional: omit `reason` for a generic operator-issued message.
|
|
472
|
+
*/
|
|
473
|
+
type FirmwareDeploymentRollbackRequest = {
|
|
474
|
+
/**
|
|
475
|
+
* Free text recorded on the rollback row and echoed to the device.
|
|
476
|
+
*/
|
|
477
|
+
reason?: string;
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* The deployments created by the trigger, one per targeted device.
|
|
481
|
+
*/
|
|
482
|
+
type FirmwareDeploymentTriggerResponse = {
|
|
483
|
+
deployments: Array<FirmwareDeployment>;
|
|
484
|
+
};
|
|
485
|
+
/**
|
|
486
|
+
* Outcome of a dispatch. `queued` says which of the two it is, and is the field to branch on: `false` (HTTP 200, interactive device) means the device ran the command and the result fields below are populated; `true` (HTTP 202, queued device) means it was accepted for store-and-forward delivery and no result exists yet, so poll `GET /api/v1/devices/{id}/commands/{invocationId}` until `status` is terminal.
|
|
487
|
+
*/
|
|
488
|
+
type CommandResult = {
|
|
489
|
+
invocationId: string;
|
|
490
|
+
/**
|
|
491
|
+
* Lifecycle status at the moment the call returned. Non-terminal (keep polling): `queued`, `sent`, `delivered`. Terminal: `completed`, `failed`, `expired`, `timeout`, `error`.
|
|
492
|
+
*/
|
|
493
|
+
status: 'queued' | 'sent' | 'delivered' | 'completed' | 'failed' | 'expired' | 'timeout' | 'error';
|
|
494
|
+
/**
|
|
495
|
+
* True when accepted for asynchronous delivery, so the result fields are absent.
|
|
496
|
+
*/
|
|
497
|
+
queued: boolean;
|
|
498
|
+
/**
|
|
499
|
+
* Synchronous result only; absent when `queued` is true.
|
|
500
|
+
*/
|
|
501
|
+
success?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* Device-defined exit/status code; 0 when successful. Synchronous result only.
|
|
504
|
+
*/
|
|
505
|
+
exitCode?: number;
|
|
506
|
+
/**
|
|
507
|
+
* Captured output / structured payload (device-defined). Synchronous result only.
|
|
508
|
+
*/
|
|
509
|
+
output?: string;
|
|
510
|
+
/**
|
|
511
|
+
* Error detail; empty when successful. Synchronous result only.
|
|
512
|
+
*/
|
|
513
|
+
error?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Synchronous result only.
|
|
516
|
+
*/
|
|
517
|
+
durationMs?: number;
|
|
518
|
+
};
|
|
519
|
+
/**
|
|
520
|
+
* Durable record of a command invocation. Its delivery/execution lifecycle `status` and, once terminal, its result. Poll this (`GET /api/v1/devices/{id}/commands/{invocationId}`) after a queued (202) dispatch to retrieve the eventual outcome; it is the pull counterpart to the `command.result` webhook.
|
|
521
|
+
*/
|
|
522
|
+
type CommandInvocation = {
|
|
523
|
+
invocationId: string;
|
|
524
|
+
deviceId: string;
|
|
525
|
+
/**
|
|
526
|
+
* Declared command name that was invoked.
|
|
527
|
+
*/
|
|
528
|
+
command: string;
|
|
529
|
+
/**
|
|
530
|
+
* Lifecycle status. Non-terminal (keep polling): `queued`, `sent`, `delivered`. Terminal: `completed`, `failed`, `expired`, `timeout`, `error`.
|
|
531
|
+
*/
|
|
532
|
+
status: 'queued' | 'sent' | 'delivered' | 'completed' | 'failed' | 'expired' | 'timeout' | 'error';
|
|
533
|
+
/**
|
|
534
|
+
* `true` when the device reported success, `false` on any terminal failure, `null` while still pending (no result recorded yet).
|
|
535
|
+
*/
|
|
536
|
+
success: boolean | null;
|
|
537
|
+
/**
|
|
538
|
+
* Device-defined exit/status code; null until a result is recorded.
|
|
539
|
+
*/
|
|
540
|
+
exitCode: number | null;
|
|
541
|
+
/**
|
|
542
|
+
* Captured output excerpt (up to 4 KiB); null until a result is recorded.
|
|
543
|
+
*/
|
|
544
|
+
output: string | null;
|
|
545
|
+
/**
|
|
546
|
+
* Error detail; null when successful or still pending.
|
|
547
|
+
*/
|
|
548
|
+
error: string | null;
|
|
549
|
+
durationMs: number | null;
|
|
550
|
+
/**
|
|
551
|
+
* Number of delivery attempts made for this invocation.
|
|
552
|
+
*/
|
|
553
|
+
attempts: number;
|
|
554
|
+
createdAt: string;
|
|
555
|
+
sentAt: string | null;
|
|
556
|
+
deliveredAt: string | null;
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* Declared command to run on a device, dispatched over the MQTT data plane as a protobuf CommandRequest frame.
|
|
560
|
+
*/
|
|
561
|
+
type CommandRequest = {
|
|
562
|
+
/**
|
|
563
|
+
* Declared command name for the device type (e.g. `lock`, `unlock`, `state-request`).
|
|
564
|
+
*/
|
|
565
|
+
name: string;
|
|
566
|
+
/**
|
|
567
|
+
* Typed key/value arguments (max 64 entries). Values may be strings, numbers, or booleans. Keep payloads small: MCU-class modems cap MQTT publishes around 4 KiB.
|
|
568
|
+
*/
|
|
569
|
+
args?: {
|
|
570
|
+
[key: string]: string | number | boolean;
|
|
571
|
+
};
|
|
572
|
+
/**
|
|
573
|
+
* Device-side hard deadline in milliseconds; the invocation is failed if no result arrives in time.
|
|
574
|
+
*/
|
|
575
|
+
timeoutMs?: number;
|
|
576
|
+
};
|
|
577
|
+
/**
|
|
578
|
+
* Declared argument of a command: key, expected type (aligned with the protobuf `CommandArg` value types), and whether it is required.
|
|
579
|
+
*/
|
|
580
|
+
type CommandArgDefinition = {
|
|
581
|
+
key: string;
|
|
582
|
+
type: 'string' | 'int' | 'float' | 'bool';
|
|
583
|
+
required: boolean;
|
|
584
|
+
description?: string;
|
|
585
|
+
};
|
|
586
|
+
/**
|
|
587
|
+
* A command a device type declares. `allowExtraArgs` permits arg keys beyond the declared ones (values are still scalar-typed by the request validator).
|
|
588
|
+
*/
|
|
589
|
+
type CommandDefinition = {
|
|
590
|
+
name: string;
|
|
591
|
+
description?: string;
|
|
592
|
+
args: Array<CommandArgDefinition>;
|
|
593
|
+
allowExtraArgs?: boolean;
|
|
594
|
+
};
|
|
595
|
+
/**
|
|
596
|
+
* Command manifest for a device type, i.e. the declared command contract that `POST /api/v1/devices/{id}/command` validates against before publishing. The command-plane sibling of the telemetry metric manifest.
|
|
597
|
+
*/
|
|
598
|
+
type CommandManifest = {
|
|
599
|
+
version: string;
|
|
600
|
+
commands: Array<CommandDefinition>;
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* Multipart form for a firmware bundle upload.
|
|
604
|
+
*/
|
|
605
|
+
type FirmwareUploadRequest = {
|
|
606
|
+
/**
|
|
607
|
+
* The bundle file (≤ 512 MB): `.raucb` for `kind=rauc`, `.bin` for `kind=mcuboot`.
|
|
608
|
+
*/
|
|
609
|
+
file: Blob | File;
|
|
610
|
+
/**
|
|
611
|
+
* Target project. Must be in this token's effective scope.
|
|
612
|
+
*/
|
|
613
|
+
projectId: string;
|
|
614
|
+
/**
|
|
615
|
+
* Bundle kind. Omit for the default RAUC flow. A `rauc` file with no `manifest.raucm`, or a `mcuboot` file with a bad header magic, is rejected with 422.
|
|
616
|
+
*/
|
|
617
|
+
kind?: 'rauc' | 'mcuboot';
|
|
618
|
+
/**
|
|
619
|
+
* Bundle version, e.g. `0.10.0`. Decoded from the binary for `rauc` (manifest) and `mcuboot` (image header) and ignored if sent.
|
|
620
|
+
*/
|
|
621
|
+
version?: string;
|
|
622
|
+
/**
|
|
623
|
+
* Hardware target. Decoded from the RAUC manifest for `rauc` (ignored if sent); required for `mcuboot` as a board/device-type id (e.g. `gtm-sgc-nrf52`).
|
|
624
|
+
*/
|
|
625
|
+
compatible?: string;
|
|
626
|
+
/**
|
|
627
|
+
* Optional notes (truncated to 2000 chars).
|
|
628
|
+
*/
|
|
629
|
+
description?: string | null;
|
|
630
|
+
};
|
|
631
|
+
/**
|
|
632
|
+
* Conflict body for a duplicate bundle (distinct from the standard error envelope).
|
|
633
|
+
*/
|
|
634
|
+
type FirmwareConflictResponse = {
|
|
635
|
+
error: string;
|
|
636
|
+
message: string;
|
|
637
|
+
};
|
|
638
|
+
/**
|
|
639
|
+
* Event types deliverable to a webhook subscription.
|
|
640
|
+
*/
|
|
641
|
+
type WebhookEventType = 'device.online' | 'device.offline' | 'telemetry.metric_changed' | 'command.result' | 'deployment.status_changed' | 'admission.requested';
|
|
642
|
+
/**
|
|
643
|
+
* How failed deliveries are retried. `null` (or omitted on create) uses the default capped-exponential backoff (~10s / 1m / 5m / 30m / 2h, 6 attempts total).
|
|
644
|
+
*
|
|
645
|
+
* - `none` delivers once; dead-letters on the first failure.
|
|
646
|
+
* - `fixed` retries up to `maxAttempts` times (2–10), waiting `intervalMs` each time.
|
|
647
|
+
* - `backoff` retries along the explicit `delaysMs` ladder (1–9 entries); omit `delaysMs` for the default ladder. `maxAttempts` = ladder length + 1.
|
|
648
|
+
*/
|
|
649
|
+
type WebhookRetryPolicy = {
|
|
650
|
+
mode: 'none' | 'fixed' | 'backoff';
|
|
651
|
+
/**
|
|
652
|
+
* Total attempts incl. the first. Required and used only when `mode` is `fixed`.
|
|
653
|
+
*/
|
|
654
|
+
maxAttempts?: number;
|
|
655
|
+
/**
|
|
656
|
+
* Delay between attempts. Required and used only when `mode` is `fixed`.
|
|
657
|
+
*/
|
|
658
|
+
intervalMs?: number;
|
|
659
|
+
/**
|
|
660
|
+
* Explicit backoff ladder. Used only when `mode` is `backoff`.
|
|
661
|
+
*/
|
|
662
|
+
delaysMs?: Array<number>;
|
|
663
|
+
} | null;
|
|
664
|
+
/**
|
|
665
|
+
* An outbound webhook subscription. The HMAC signing secret is not readable after creation. `consecutiveFailures` counts dead-lettered deliveries in a row; the subscription is auto-disabled after 20 and re-enabling resets the counter. `retryPolicy` is `null` when the default backoff applies.
|
|
666
|
+
*/
|
|
667
|
+
type WebhookSubscription = {
|
|
668
|
+
id: string;
|
|
669
|
+
projectId: string;
|
|
670
|
+
url: string;
|
|
671
|
+
enabled: boolean;
|
|
672
|
+
eventTypes: Array<WebhookEventType>;
|
|
673
|
+
retryPolicy: WebhookRetryPolicy;
|
|
674
|
+
consecutiveFailures: number;
|
|
675
|
+
createdAt: string;
|
|
676
|
+
updatedAt: string;
|
|
677
|
+
};
|
|
678
|
+
/**
|
|
679
|
+
* One page of webhook subscriptions.
|
|
680
|
+
*/
|
|
681
|
+
type WebhookSubscriptionPage = {
|
|
682
|
+
data: Array<WebhookSubscription>;
|
|
683
|
+
meta: PageMeta;
|
|
684
|
+
};
|
|
685
|
+
/**
|
|
686
|
+
* Subscription to create. `url` must be https in production and must not target a private/internal address.
|
|
687
|
+
*/
|
|
688
|
+
type WebhookCreateRequest = {
|
|
689
|
+
/**
|
|
690
|
+
* Project whose device events to deliver. Must be in this token's scope.
|
|
691
|
+
*/
|
|
692
|
+
projectId: string;
|
|
693
|
+
url: string;
|
|
694
|
+
eventTypes: Array<WebhookEventType>;
|
|
695
|
+
retryPolicy?: WebhookRetryPolicy;
|
|
696
|
+
};
|
|
697
|
+
type WebhookCreateResponse = WebhookSubscription & {
|
|
698
|
+
/**
|
|
699
|
+
* HMAC-SHA256 signing secret (`whsec_…`). Shown only here.
|
|
700
|
+
*/
|
|
701
|
+
secret: string;
|
|
702
|
+
};
|
|
703
|
+
/**
|
|
704
|
+
* Fields to update on a subscription. All optional.
|
|
705
|
+
*/
|
|
706
|
+
type WebhookUpdateRequest = {
|
|
707
|
+
url?: string;
|
|
708
|
+
eventTypes?: Array<WebhookEventType>;
|
|
709
|
+
/**
|
|
710
|
+
* Re-enabling resets the consecutive-failure counter.
|
|
711
|
+
*/
|
|
712
|
+
enabled?: boolean;
|
|
713
|
+
retryPolicy?: WebhookRetryPolicy;
|
|
714
|
+
};
|
|
715
|
+
/**
|
|
716
|
+
* One recorded POST attempt within a delivery. Attempts are append-only and never overwritten, so the full failure timeline is preserved. `attemptNo` is 1-indexed and matches the delivery’s attempt count at the time.
|
|
717
|
+
*/
|
|
718
|
+
type WebhookDeliveryAttempt = {
|
|
719
|
+
id: string;
|
|
720
|
+
attemptNo: number;
|
|
721
|
+
statusCode: number | null;
|
|
722
|
+
error: string | null;
|
|
723
|
+
attemptedAt: string;
|
|
724
|
+
};
|
|
725
|
+
/**
|
|
726
|
+
* One delivery of an event to a subscription. `eventId` is the idempotency key shared across subscriptions for the same event; `id` is sent to the receiver as the `X-Orbit-Delivery` header. `lastStatusCode` / `lastError` summarise the most recent attempt; `attempts` is the full per-attempt timeline (oldest first).
|
|
727
|
+
*/
|
|
728
|
+
type WebhookDelivery = {
|
|
729
|
+
id: string;
|
|
730
|
+
subscriptionId: string;
|
|
731
|
+
eventId: string;
|
|
732
|
+
eventType: WebhookEventType;
|
|
733
|
+
status: 'pending' | 'delivered' | 'failed';
|
|
734
|
+
attemptCount: number;
|
|
735
|
+
retryPolicy: WebhookRetryPolicy;
|
|
736
|
+
lastStatusCode: number | null;
|
|
737
|
+
lastError: string | null;
|
|
738
|
+
nextAttemptAt: string | null;
|
|
739
|
+
deliveredAt: string | null;
|
|
740
|
+
createdAt: string;
|
|
741
|
+
attempts: Array<WebhookDeliveryAttempt>;
|
|
742
|
+
};
|
|
743
|
+
/**
|
|
744
|
+
* One page of the delivery log (newest first).
|
|
745
|
+
*/
|
|
746
|
+
type WebhookDeliveryPage = {
|
|
747
|
+
data: Array<WebhookDelivery>;
|
|
748
|
+
meta: PageMeta;
|
|
749
|
+
};
|
|
750
|
+
type GetIdentityData = {
|
|
751
|
+
body?: never;
|
|
752
|
+
path?: never;
|
|
753
|
+
query?: never;
|
|
754
|
+
url: '/api/v1/me';
|
|
755
|
+
};
|
|
756
|
+
type GetIdentityErrors = {
|
|
757
|
+
/**
|
|
758
|
+
* Missing or invalid token.
|
|
759
|
+
*/
|
|
760
|
+
401: ErrorResponse;
|
|
761
|
+
};
|
|
762
|
+
type GetIdentityError = GetIdentityErrors[keyof GetIdentityErrors];
|
|
763
|
+
type GetIdentityResponses = {
|
|
764
|
+
/**
|
|
765
|
+
* The authenticated identity.
|
|
766
|
+
*/
|
|
767
|
+
200: Identity;
|
|
768
|
+
};
|
|
769
|
+
type GetIdentityResponse = GetIdentityResponses[keyof GetIdentityResponses];
|
|
770
|
+
type ListProjectsData = {
|
|
771
|
+
body?: never;
|
|
772
|
+
path?: never;
|
|
773
|
+
query?: {
|
|
774
|
+
/**
|
|
775
|
+
* Restrict to one organisation. Narrows the reachable set, never widens it: an organisation the caller cannot reach yields an empty page rather than a 403.
|
|
776
|
+
*/
|
|
777
|
+
organizationId?: string;
|
|
778
|
+
cursor?: string;
|
|
779
|
+
limit?: number;
|
|
780
|
+
};
|
|
781
|
+
url: '/api/v1/projects';
|
|
782
|
+
};
|
|
783
|
+
type ListProjectsErrors = {
|
|
784
|
+
/**
|
|
785
|
+
* Missing or invalid token.
|
|
786
|
+
*/
|
|
787
|
+
401: ErrorResponse;
|
|
788
|
+
/**
|
|
789
|
+
* Token is missing the `api:projects:read` ability.
|
|
790
|
+
*/
|
|
791
|
+
403: ErrorResponse;
|
|
792
|
+
};
|
|
793
|
+
type ListProjectsError = ListProjectsErrors[keyof ListProjectsErrors];
|
|
794
|
+
type ListProjectsResponses = {
|
|
795
|
+
/**
|
|
796
|
+
* Paginated list of projects.
|
|
797
|
+
*/
|
|
798
|
+
200: ProjectListPage;
|
|
799
|
+
};
|
|
800
|
+
type ListProjectsResponse = ListProjectsResponses[keyof ListProjectsResponses];
|
|
801
|
+
type GetProjectData = {
|
|
802
|
+
body?: never;
|
|
803
|
+
path: {
|
|
804
|
+
id: string;
|
|
805
|
+
};
|
|
806
|
+
query?: never;
|
|
807
|
+
url: '/api/v1/projects/{id}';
|
|
808
|
+
};
|
|
809
|
+
type GetProjectErrors = {
|
|
810
|
+
/**
|
|
811
|
+
* Missing or invalid token.
|
|
812
|
+
*/
|
|
813
|
+
401: ErrorResponse;
|
|
814
|
+
/**
|
|
815
|
+
* Token is missing the `api:projects:read` ability.
|
|
816
|
+
*/
|
|
817
|
+
403: ErrorResponse;
|
|
818
|
+
/**
|
|
819
|
+
* Project not found, or outside the token’s reach.
|
|
820
|
+
*/
|
|
821
|
+
404: ErrorResponse;
|
|
822
|
+
};
|
|
823
|
+
type GetProjectError = GetProjectErrors[keyof GetProjectErrors];
|
|
824
|
+
type GetProjectResponses = {
|
|
825
|
+
/**
|
|
826
|
+
* The project.
|
|
827
|
+
*/
|
|
828
|
+
200: Project;
|
|
829
|
+
};
|
|
830
|
+
type GetProjectResponse = GetProjectResponses[keyof GetProjectResponses];
|
|
831
|
+
type CreateProjectAppTokenData = {
|
|
832
|
+
body?: never;
|
|
833
|
+
path: {
|
|
834
|
+
id: string;
|
|
835
|
+
};
|
|
836
|
+
query?: never;
|
|
837
|
+
url: '/api/v1/projects/{id}/app-token';
|
|
838
|
+
};
|
|
839
|
+
type CreateProjectAppTokenErrors = {
|
|
840
|
+
/**
|
|
841
|
+
* Missing or invalid token.
|
|
842
|
+
*/
|
|
843
|
+
401: ErrorResponse;
|
|
844
|
+
/**
|
|
845
|
+
* Token is missing the `api:projects:manage` ability.
|
|
846
|
+
*/
|
|
847
|
+
403: ErrorResponse;
|
|
848
|
+
/**
|
|
849
|
+
* Project not found, or outside the token’s reach.
|
|
850
|
+
*/
|
|
851
|
+
404: ErrorResponse;
|
|
852
|
+
/**
|
|
853
|
+
* The project already has an app token. Rotate it instead.
|
|
854
|
+
*/
|
|
855
|
+
409: ErrorResponse;
|
|
856
|
+
};
|
|
857
|
+
type CreateProjectAppTokenError = CreateProjectAppTokenErrors[keyof CreateProjectAppTokenErrors];
|
|
858
|
+
type CreateProjectAppTokenResponses = {
|
|
859
|
+
/**
|
|
860
|
+
* The project and its new plaintext token.
|
|
861
|
+
*/
|
|
862
|
+
201: ProjectAppToken;
|
|
863
|
+
};
|
|
864
|
+
type CreateProjectAppTokenResponse = CreateProjectAppTokenResponses[keyof CreateProjectAppTokenResponses];
|
|
865
|
+
type RotateProjectAppTokenData = {
|
|
866
|
+
body?: never;
|
|
867
|
+
path: {
|
|
868
|
+
id: string;
|
|
869
|
+
};
|
|
870
|
+
query?: never;
|
|
871
|
+
url: '/api/v1/projects/{id}/app-token/rotate';
|
|
872
|
+
};
|
|
873
|
+
type RotateProjectAppTokenErrors = {
|
|
874
|
+
/**
|
|
875
|
+
* Missing or invalid token.
|
|
876
|
+
*/
|
|
877
|
+
401: ErrorResponse;
|
|
878
|
+
/**
|
|
879
|
+
* Token is missing the `api:projects:manage` ability.
|
|
880
|
+
*/
|
|
881
|
+
403: ErrorResponse;
|
|
882
|
+
/**
|
|
883
|
+
* Project not found, or outside the token’s reach.
|
|
884
|
+
*/
|
|
885
|
+
404: ErrorResponse;
|
|
886
|
+
};
|
|
887
|
+
type RotateProjectAppTokenError = RotateProjectAppTokenErrors[keyof RotateProjectAppTokenErrors];
|
|
888
|
+
type RotateProjectAppTokenResponses = {
|
|
889
|
+
/**
|
|
890
|
+
* The project and its new plaintext token.
|
|
891
|
+
*/
|
|
892
|
+
200: ProjectAppToken;
|
|
893
|
+
};
|
|
894
|
+
type RotateProjectAppTokenResponse = RotateProjectAppTokenResponses[keyof RotateProjectAppTokenResponses];
|
|
895
|
+
type ListDevicesData = {
|
|
896
|
+
body?: never;
|
|
897
|
+
path?: never;
|
|
898
|
+
query?: {
|
|
899
|
+
status?: 'online' | 'offline';
|
|
900
|
+
/**
|
|
901
|
+
* Filter to devices whose device type carries this exact slug. An unknown or out-of-scope slug reads as an empty page.
|
|
902
|
+
*/
|
|
903
|
+
deviceTypeSlug?: string;
|
|
904
|
+
/**
|
|
905
|
+
* Filter to the device with this exact hardware fingerprint (e.g. modem IMEI).
|
|
906
|
+
*/
|
|
907
|
+
fingerprint?: string;
|
|
908
|
+
/**
|
|
909
|
+
* Restrict to a single project (must be in scope).
|
|
910
|
+
*/
|
|
911
|
+
projectId?: string;
|
|
912
|
+
cursor?: string;
|
|
913
|
+
limit?: number;
|
|
914
|
+
};
|
|
915
|
+
url: '/api/v1/devices';
|
|
916
|
+
};
|
|
917
|
+
type ListDevicesErrors = {
|
|
918
|
+
/**
|
|
919
|
+
* Missing or invalid token.
|
|
920
|
+
*/
|
|
921
|
+
401: ErrorResponse;
|
|
922
|
+
/**
|
|
923
|
+
* Token is missing the `api:devices:read` ability.
|
|
924
|
+
*/
|
|
925
|
+
403: ErrorResponse;
|
|
926
|
+
};
|
|
927
|
+
type ListDevicesError = ListDevicesErrors[keyof ListDevicesErrors];
|
|
928
|
+
type ListDevicesResponses = {
|
|
929
|
+
/**
|
|
930
|
+
* Paginated list of devices.
|
|
931
|
+
*/
|
|
932
|
+
200: DeviceListPage;
|
|
933
|
+
};
|
|
934
|
+
type ListDevicesResponse = ListDevicesResponses[keyof ListDevicesResponses];
|
|
935
|
+
type DeleteDeviceData = {
|
|
936
|
+
body?: never;
|
|
937
|
+
path: {
|
|
938
|
+
id: string;
|
|
939
|
+
};
|
|
940
|
+
query?: never;
|
|
941
|
+
url: '/api/v1/devices/{id}';
|
|
942
|
+
};
|
|
943
|
+
type DeleteDeviceErrors = {
|
|
944
|
+
/**
|
|
945
|
+
* Missing or invalid token.
|
|
946
|
+
*/
|
|
947
|
+
401: ErrorResponse;
|
|
948
|
+
/**
|
|
949
|
+
* Token is missing the `api:devices:manage` ability.
|
|
950
|
+
*/
|
|
951
|
+
403: ErrorResponse;
|
|
952
|
+
/**
|
|
953
|
+
* Device not found.
|
|
954
|
+
*/
|
|
955
|
+
404: ErrorResponse;
|
|
956
|
+
};
|
|
957
|
+
type DeleteDeviceError = DeleteDeviceErrors[keyof DeleteDeviceErrors];
|
|
958
|
+
type DeleteDeviceResponses = {
|
|
959
|
+
/**
|
|
960
|
+
* Deleted.
|
|
961
|
+
*/
|
|
962
|
+
204: unknown;
|
|
963
|
+
};
|
|
964
|
+
type GetDeviceData = {
|
|
965
|
+
body?: never;
|
|
966
|
+
path: {
|
|
967
|
+
id: string;
|
|
968
|
+
};
|
|
969
|
+
query?: never;
|
|
970
|
+
url: '/api/v1/devices/{id}';
|
|
971
|
+
};
|
|
972
|
+
type GetDeviceErrors = {
|
|
973
|
+
/**
|
|
974
|
+
* Missing or invalid token.
|
|
975
|
+
*/
|
|
976
|
+
401: ErrorResponse;
|
|
977
|
+
/**
|
|
978
|
+
* Token is missing the `api:devices:read` ability.
|
|
979
|
+
*/
|
|
980
|
+
403: ErrorResponse;
|
|
981
|
+
/**
|
|
982
|
+
* Device not found.
|
|
983
|
+
*/
|
|
984
|
+
404: ErrorResponse;
|
|
985
|
+
};
|
|
986
|
+
type GetDeviceError = GetDeviceErrors[keyof GetDeviceErrors];
|
|
987
|
+
type GetDeviceResponses = {
|
|
988
|
+
/**
|
|
989
|
+
* The device.
|
|
990
|
+
*/
|
|
991
|
+
200: Device;
|
|
992
|
+
};
|
|
993
|
+
type GetDeviceResponse = GetDeviceResponses[keyof GetDeviceResponses];
|
|
994
|
+
type ResetDeviceTokenData = {
|
|
995
|
+
body?: never;
|
|
996
|
+
path: {
|
|
997
|
+
id: string;
|
|
998
|
+
};
|
|
999
|
+
query?: never;
|
|
1000
|
+
url: '/api/v1/devices/{id}/token/reset';
|
|
1001
|
+
};
|
|
1002
|
+
type ResetDeviceTokenErrors = {
|
|
1003
|
+
/**
|
|
1004
|
+
* Missing or invalid token.
|
|
1005
|
+
*/
|
|
1006
|
+
401: ErrorResponse;
|
|
1007
|
+
/**
|
|
1008
|
+
* Token is missing the `api:devices:manage` ability.
|
|
1009
|
+
*/
|
|
1010
|
+
403: ErrorResponse;
|
|
1011
|
+
/**
|
|
1012
|
+
* Device not found.
|
|
1013
|
+
*/
|
|
1014
|
+
404: ErrorResponse;
|
|
1015
|
+
};
|
|
1016
|
+
type ResetDeviceTokenError = ResetDeviceTokenErrors[keyof ResetDeviceTokenErrors];
|
|
1017
|
+
type ResetDeviceTokenResponses = {
|
|
1018
|
+
/**
|
|
1019
|
+
* The rotated device token.
|
|
1020
|
+
*/
|
|
1021
|
+
200: DeviceTokenReset;
|
|
1022
|
+
};
|
|
1023
|
+
type ResetDeviceTokenResponse = ResetDeviceTokenResponses[keyof ResetDeviceTokenResponses];
|
|
1024
|
+
type GetLatestTelemetryData = {
|
|
1025
|
+
body?: never;
|
|
1026
|
+
path: {
|
|
1027
|
+
id: string;
|
|
1028
|
+
};
|
|
1029
|
+
query?: never;
|
|
1030
|
+
url: '/api/v1/devices/{id}/telemetry/latest';
|
|
1031
|
+
};
|
|
1032
|
+
type GetLatestTelemetryErrors = {
|
|
1033
|
+
/**
|
|
1034
|
+
* Missing or invalid token.
|
|
1035
|
+
*/
|
|
1036
|
+
401: ErrorResponse;
|
|
1037
|
+
/**
|
|
1038
|
+
* Token is missing the `api:telemetry:read` ability.
|
|
1039
|
+
*/
|
|
1040
|
+
403: ErrorResponse;
|
|
1041
|
+
/**
|
|
1042
|
+
* Device not found.
|
|
1043
|
+
*/
|
|
1044
|
+
404: ErrorResponse;
|
|
1045
|
+
};
|
|
1046
|
+
type GetLatestTelemetryError = GetLatestTelemetryErrors[keyof GetLatestTelemetryErrors];
|
|
1047
|
+
type GetLatestTelemetryResponses = {
|
|
1048
|
+
/**
|
|
1049
|
+
* Latest telemetry sample, or `null` if unavailable.
|
|
1050
|
+
*/
|
|
1051
|
+
200: TelemetrySample | null;
|
|
1052
|
+
};
|
|
1053
|
+
type GetLatestTelemetryResponse = GetLatestTelemetryResponses[keyof GetLatestTelemetryResponses];
|
|
1054
|
+
type GetTelemetryHistoryData = {
|
|
1055
|
+
body?: never;
|
|
1056
|
+
path: {
|
|
1057
|
+
id: string;
|
|
1058
|
+
};
|
|
1059
|
+
query?: {
|
|
1060
|
+
hours?: number;
|
|
1061
|
+
};
|
|
1062
|
+
url: '/api/v1/devices/{id}/telemetry';
|
|
1063
|
+
};
|
|
1064
|
+
type GetTelemetryHistoryErrors = {
|
|
1065
|
+
/**
|
|
1066
|
+
* Missing or invalid token.
|
|
1067
|
+
*/
|
|
1068
|
+
401: ErrorResponse;
|
|
1069
|
+
/**
|
|
1070
|
+
* Token is missing the `api:telemetry:read` ability.
|
|
1071
|
+
*/
|
|
1072
|
+
403: ErrorResponse;
|
|
1073
|
+
/**
|
|
1074
|
+
* Device not found.
|
|
1075
|
+
*/
|
|
1076
|
+
404: ErrorResponse;
|
|
1077
|
+
};
|
|
1078
|
+
type GetTelemetryHistoryError = GetTelemetryHistoryErrors[keyof GetTelemetryHistoryErrors];
|
|
1079
|
+
type GetTelemetryHistoryResponses = {
|
|
1080
|
+
/**
|
|
1081
|
+
* Time-ordered (asc) telemetry samples.
|
|
1082
|
+
*/
|
|
1083
|
+
200: TelemetryHistory;
|
|
1084
|
+
};
|
|
1085
|
+
type GetTelemetryHistoryResponse = GetTelemetryHistoryResponses[keyof GetTelemetryHistoryResponses];
|
|
1086
|
+
type GetTelemetryManifestData = {
|
|
1087
|
+
body?: never;
|
|
1088
|
+
path: {
|
|
1089
|
+
id: string;
|
|
1090
|
+
};
|
|
1091
|
+
query?: never;
|
|
1092
|
+
url: '/api/v1/devices/{id}/telemetry/manifest';
|
|
1093
|
+
};
|
|
1094
|
+
type GetTelemetryManifestErrors = {
|
|
1095
|
+
/**
|
|
1096
|
+
* Missing or invalid token.
|
|
1097
|
+
*/
|
|
1098
|
+
401: ErrorResponse;
|
|
1099
|
+
/**
|
|
1100
|
+
* Token is missing the `api:telemetry:read` ability.
|
|
1101
|
+
*/
|
|
1102
|
+
403: ErrorResponse;
|
|
1103
|
+
/**
|
|
1104
|
+
* Device not found or out of scope.
|
|
1105
|
+
*/
|
|
1106
|
+
404: ErrorResponse;
|
|
1107
|
+
};
|
|
1108
|
+
type GetTelemetryManifestError = GetTelemetryManifestErrors[keyof GetTelemetryManifestErrors];
|
|
1109
|
+
type GetTelemetryManifestResponses = {
|
|
1110
|
+
/**
|
|
1111
|
+
* The device type's manifest, or `null` when none is declared.
|
|
1112
|
+
*/
|
|
1113
|
+
200: TelemetryManifest | null;
|
|
1114
|
+
};
|
|
1115
|
+
type GetTelemetryManifestResponse = GetTelemetryManifestResponses[keyof GetTelemetryManifestResponses];
|
|
1116
|
+
type ListAdmissionsData = {
|
|
1117
|
+
body?: never;
|
|
1118
|
+
path?: never;
|
|
1119
|
+
query?: {
|
|
1120
|
+
status?: 'pending' | 'accepted' | 'rejected' | 'dismissed';
|
|
1121
|
+
/**
|
|
1122
|
+
* Filter to the request raised by this exact hardware fingerprint.
|
|
1123
|
+
*/
|
|
1124
|
+
fingerprint?: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* Restrict to a single project (must be in scope).
|
|
1127
|
+
*/
|
|
1128
|
+
projectId?: string;
|
|
1129
|
+
cursor?: string;
|
|
1130
|
+
limit?: number;
|
|
1131
|
+
};
|
|
1132
|
+
url: '/api/v1/admissions';
|
|
1133
|
+
};
|
|
1134
|
+
type ListAdmissionsErrors = {
|
|
1135
|
+
/**
|
|
1136
|
+
* Missing or invalid token.
|
|
1137
|
+
*/
|
|
1138
|
+
401: ErrorResponse;
|
|
1139
|
+
/**
|
|
1140
|
+
* Token is missing the `api:admissions:read` ability.
|
|
1141
|
+
*/
|
|
1142
|
+
403: ErrorResponse;
|
|
1143
|
+
};
|
|
1144
|
+
type ListAdmissionsError = ListAdmissionsErrors[keyof ListAdmissionsErrors];
|
|
1145
|
+
type ListAdmissionsResponses = {
|
|
1146
|
+
/**
|
|
1147
|
+
* Paginated list of admission requests.
|
|
1148
|
+
*/
|
|
1149
|
+
200: AdmissionListPage;
|
|
1150
|
+
};
|
|
1151
|
+
type ListAdmissionsResponse = ListAdmissionsResponses[keyof ListAdmissionsResponses];
|
|
1152
|
+
type GetAdmissionData = {
|
|
1153
|
+
body?: never;
|
|
1154
|
+
path: {
|
|
1155
|
+
id: string;
|
|
1156
|
+
};
|
|
1157
|
+
query?: never;
|
|
1158
|
+
url: '/api/v1/admissions/{id}';
|
|
1159
|
+
};
|
|
1160
|
+
type GetAdmissionErrors = {
|
|
1161
|
+
/**
|
|
1162
|
+
* Missing or invalid token.
|
|
1163
|
+
*/
|
|
1164
|
+
401: ErrorResponse;
|
|
1165
|
+
/**
|
|
1166
|
+
* Token is missing the `api:admissions:read` ability.
|
|
1167
|
+
*/
|
|
1168
|
+
403: ErrorResponse;
|
|
1169
|
+
/**
|
|
1170
|
+
* Admission not found.
|
|
1171
|
+
*/
|
|
1172
|
+
404: ErrorResponse;
|
|
1173
|
+
};
|
|
1174
|
+
type GetAdmissionError = GetAdmissionErrors[keyof GetAdmissionErrors];
|
|
1175
|
+
type GetAdmissionResponses = {
|
|
1176
|
+
/**
|
|
1177
|
+
* The admission request.
|
|
1178
|
+
*/
|
|
1179
|
+
200: Admission;
|
|
1180
|
+
};
|
|
1181
|
+
type GetAdmissionResponse = GetAdmissionResponses[keyof GetAdmissionResponses];
|
|
1182
|
+
type AcceptAdmissionData = {
|
|
1183
|
+
body?: AdmissionAcceptRequest;
|
|
1184
|
+
path: {
|
|
1185
|
+
id: string;
|
|
1186
|
+
};
|
|
1187
|
+
query?: never;
|
|
1188
|
+
url: '/api/v1/admissions/{id}/accept';
|
|
1189
|
+
};
|
|
1190
|
+
type AcceptAdmissionErrors = {
|
|
1191
|
+
/**
|
|
1192
|
+
* Invalid body or the `deviceTypeId` does not belong to the project.
|
|
1193
|
+
*/
|
|
1194
|
+
400: ErrorResponse;
|
|
1195
|
+
/**
|
|
1196
|
+
* Missing or invalid token.
|
|
1197
|
+
*/
|
|
1198
|
+
401: ErrorResponse;
|
|
1199
|
+
/**
|
|
1200
|
+
* Token is missing the `api:admissions:manage` ability.
|
|
1201
|
+
*/
|
|
1202
|
+
403: ErrorResponse;
|
|
1203
|
+
/**
|
|
1204
|
+
* Admission not found.
|
|
1205
|
+
*/
|
|
1206
|
+
404: ErrorResponse;
|
|
1207
|
+
/**
|
|
1208
|
+
* The admission has already been reviewed.
|
|
1209
|
+
*/
|
|
1210
|
+
409: ErrorResponse;
|
|
1211
|
+
};
|
|
1212
|
+
type AcceptAdmissionError = AcceptAdmissionErrors[keyof AcceptAdmissionErrors];
|
|
1213
|
+
type AcceptAdmissionResponses = {
|
|
1214
|
+
/**
|
|
1215
|
+
* The reviewed admission and the newly provisioned device.
|
|
1216
|
+
*/
|
|
1217
|
+
200: AdmissionAcceptResponse;
|
|
1218
|
+
};
|
|
1219
|
+
type AcceptAdmissionResponse = AcceptAdmissionResponses[keyof AcceptAdmissionResponses];
|
|
1220
|
+
type RejectAdmissionData = {
|
|
1221
|
+
body?: never;
|
|
1222
|
+
path: {
|
|
1223
|
+
id: string;
|
|
1224
|
+
};
|
|
1225
|
+
query?: never;
|
|
1226
|
+
url: '/api/v1/admissions/{id}/reject';
|
|
1227
|
+
};
|
|
1228
|
+
type RejectAdmissionErrors = {
|
|
1229
|
+
/**
|
|
1230
|
+
* Missing or invalid token.
|
|
1231
|
+
*/
|
|
1232
|
+
401: ErrorResponse;
|
|
1233
|
+
/**
|
|
1234
|
+
* Token is missing the `api:admissions:manage` ability.
|
|
1235
|
+
*/
|
|
1236
|
+
403: ErrorResponse;
|
|
1237
|
+
/**
|
|
1238
|
+
* Admission not found.
|
|
1239
|
+
*/
|
|
1240
|
+
404: ErrorResponse;
|
|
1241
|
+
/**
|
|
1242
|
+
* The admission has already been reviewed.
|
|
1243
|
+
*/
|
|
1244
|
+
409: ErrorResponse;
|
|
1245
|
+
};
|
|
1246
|
+
type RejectAdmissionError = RejectAdmissionErrors[keyof RejectAdmissionErrors];
|
|
1247
|
+
type RejectAdmissionResponses = {
|
|
1248
|
+
/**
|
|
1249
|
+
* The rejected admission.
|
|
1250
|
+
*/
|
|
1251
|
+
200: Admission;
|
|
1252
|
+
};
|
|
1253
|
+
type RejectAdmissionResponse = RejectAdmissionResponses[keyof RejectAdmissionResponses];
|
|
1254
|
+
type DismissAdmissionData = {
|
|
1255
|
+
body?: never;
|
|
1256
|
+
path: {
|
|
1257
|
+
id: string;
|
|
1258
|
+
};
|
|
1259
|
+
query?: never;
|
|
1260
|
+
url: '/api/v1/admissions/{id}/dismiss';
|
|
1261
|
+
};
|
|
1262
|
+
type DismissAdmissionErrors = {
|
|
1263
|
+
/**
|
|
1264
|
+
* Missing or invalid token.
|
|
1265
|
+
*/
|
|
1266
|
+
401: ErrorResponse;
|
|
1267
|
+
/**
|
|
1268
|
+
* Token is missing the `api:admissions:manage` ability.
|
|
1269
|
+
*/
|
|
1270
|
+
403: ErrorResponse;
|
|
1271
|
+
/**
|
|
1272
|
+
* Admission not found.
|
|
1273
|
+
*/
|
|
1274
|
+
404: ErrorResponse;
|
|
1275
|
+
/**
|
|
1276
|
+
* The admission has already been reviewed.
|
|
1277
|
+
*/
|
|
1278
|
+
409: ErrorResponse;
|
|
1279
|
+
};
|
|
1280
|
+
type DismissAdmissionError = DismissAdmissionErrors[keyof DismissAdmissionErrors];
|
|
1281
|
+
type DismissAdmissionResponses = {
|
|
1282
|
+
/**
|
|
1283
|
+
* The dismissed admission.
|
|
1284
|
+
*/
|
|
1285
|
+
200: Admission;
|
|
1286
|
+
};
|
|
1287
|
+
type DismissAdmissionResponse = DismissAdmissionResponses[keyof DismissAdmissionResponses];
|
|
1288
|
+
type UploadFirmwareData = {
|
|
1289
|
+
body?: FirmwareUploadRequest;
|
|
1290
|
+
path?: never;
|
|
1291
|
+
query?: never;
|
|
1292
|
+
url: '/api/v1/firmware/upload';
|
|
1293
|
+
};
|
|
1294
|
+
type UploadFirmwareErrors = {
|
|
1295
|
+
/**
|
|
1296
|
+
* Missing/invalid form field or bundle too large.
|
|
1297
|
+
*/
|
|
1298
|
+
400: ErrorResponse;
|
|
1299
|
+
/**
|
|
1300
|
+
* Token is missing the `api:firmware:write` ability.
|
|
1301
|
+
*/
|
|
1302
|
+
403: ErrorResponse;
|
|
1303
|
+
/**
|
|
1304
|
+
* `projectId` is not in this token's effective scope.
|
|
1305
|
+
*/
|
|
1306
|
+
404: ErrorResponse;
|
|
1307
|
+
/**
|
|
1308
|
+
* A bundle with the same projectId+version+compatible already exists.
|
|
1309
|
+
*/
|
|
1310
|
+
409: FirmwareConflictResponse;
|
|
1311
|
+
/**
|
|
1312
|
+
* Bundle binary unreadable: a RAUC bundle with no `manifest.raucm`, or an MCUboot image with a bad header magic.
|
|
1313
|
+
*/
|
|
1314
|
+
422: ErrorResponse;
|
|
1315
|
+
};
|
|
1316
|
+
type UploadFirmwareError = UploadFirmwareErrors[keyof UploadFirmwareErrors];
|
|
1317
|
+
type UploadFirmwareResponses = {
|
|
1318
|
+
/**
|
|
1319
|
+
* Bundle accepted and stored.
|
|
1320
|
+
*/
|
|
1321
|
+
200: FirmwareUploadResponse;
|
|
1322
|
+
};
|
|
1323
|
+
type UploadFirmwareResponse = UploadFirmwareResponses[keyof UploadFirmwareResponses];
|
|
1324
|
+
type ListFirmwareBundlesData = {
|
|
1325
|
+
body?: never;
|
|
1326
|
+
path?: never;
|
|
1327
|
+
query?: {
|
|
1328
|
+
/**
|
|
1329
|
+
* Case-insensitive substring of the bundle version (e.g. `0.10`).
|
|
1330
|
+
*/
|
|
1331
|
+
version?: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* Exact hardware target, as recorded on the bundle (e.g. `cm5-gateway`).
|
|
1334
|
+
*/
|
|
1335
|
+
compatible?: string;
|
|
1336
|
+
/**
|
|
1337
|
+
* Restrict to a single project (must be in scope).
|
|
1338
|
+
*/
|
|
1339
|
+
projectId?: string;
|
|
1340
|
+
cursor?: string;
|
|
1341
|
+
limit?: number;
|
|
1342
|
+
};
|
|
1343
|
+
url: '/api/v1/firmware/bundles';
|
|
1344
|
+
};
|
|
1345
|
+
type ListFirmwareBundlesErrors = {
|
|
1346
|
+
/**
|
|
1347
|
+
* Missing or invalid token.
|
|
1348
|
+
*/
|
|
1349
|
+
401: ErrorResponse;
|
|
1350
|
+
/**
|
|
1351
|
+
* Token is missing the `api:firmware:read` ability.
|
|
1352
|
+
*/
|
|
1353
|
+
403: ErrorResponse;
|
|
1354
|
+
};
|
|
1355
|
+
type ListFirmwareBundlesError = ListFirmwareBundlesErrors[keyof ListFirmwareBundlesErrors];
|
|
1356
|
+
type ListFirmwareBundlesResponses = {
|
|
1357
|
+
/**
|
|
1358
|
+
* Paginated list of bundles.
|
|
1359
|
+
*/
|
|
1360
|
+
200: FirmwareBundleListPage;
|
|
1361
|
+
};
|
|
1362
|
+
type ListFirmwareBundlesResponse = ListFirmwareBundlesResponses[keyof ListFirmwareBundlesResponses];
|
|
1363
|
+
type DeleteFirmwareBundleData = {
|
|
1364
|
+
body?: never;
|
|
1365
|
+
path: {
|
|
1366
|
+
id: string;
|
|
1367
|
+
};
|
|
1368
|
+
query?: never;
|
|
1369
|
+
url: '/api/v1/firmware/bundles/{id}';
|
|
1370
|
+
};
|
|
1371
|
+
type DeleteFirmwareBundleErrors = {
|
|
1372
|
+
/**
|
|
1373
|
+
* Missing or invalid token.
|
|
1374
|
+
*/
|
|
1375
|
+
401: ErrorResponse;
|
|
1376
|
+
/**
|
|
1377
|
+
* Token is missing the `api:firmware:write` ability.
|
|
1378
|
+
*/
|
|
1379
|
+
403: ErrorResponse;
|
|
1380
|
+
/**
|
|
1381
|
+
* Bundle not found in this token’s scope.
|
|
1382
|
+
*/
|
|
1383
|
+
404: ErrorResponse;
|
|
1384
|
+
/**
|
|
1385
|
+
* The bundle has an in-flight deployment. Cancel it first.
|
|
1386
|
+
*/
|
|
1387
|
+
409: ErrorResponse;
|
|
1388
|
+
};
|
|
1389
|
+
type DeleteFirmwareBundleError = DeleteFirmwareBundleErrors[keyof DeleteFirmwareBundleErrors];
|
|
1390
|
+
type DeleteFirmwareBundleResponses = {
|
|
1391
|
+
/**
|
|
1392
|
+
* Deleted.
|
|
1393
|
+
*/
|
|
1394
|
+
204: unknown;
|
|
1395
|
+
};
|
|
1396
|
+
type GetFirmwareBundleData = {
|
|
1397
|
+
body?: never;
|
|
1398
|
+
path: {
|
|
1399
|
+
id: string;
|
|
1400
|
+
};
|
|
1401
|
+
query?: never;
|
|
1402
|
+
url: '/api/v1/firmware/bundles/{id}';
|
|
1403
|
+
};
|
|
1404
|
+
type GetFirmwareBundleErrors = {
|
|
1405
|
+
/**
|
|
1406
|
+
* Missing or invalid token.
|
|
1407
|
+
*/
|
|
1408
|
+
401: ErrorResponse;
|
|
1409
|
+
/**
|
|
1410
|
+
* Token is missing the `api:firmware:read` ability.
|
|
1411
|
+
*/
|
|
1412
|
+
403: ErrorResponse;
|
|
1413
|
+
/**
|
|
1414
|
+
* Bundle not found in this token’s scope.
|
|
1415
|
+
*/
|
|
1416
|
+
404: ErrorResponse;
|
|
1417
|
+
};
|
|
1418
|
+
type GetFirmwareBundleError = GetFirmwareBundleErrors[keyof GetFirmwareBundleErrors];
|
|
1419
|
+
type GetFirmwareBundleResponses = {
|
|
1420
|
+
/**
|
|
1421
|
+
* The bundle.
|
|
1422
|
+
*/
|
|
1423
|
+
200: FirmwareBundle;
|
|
1424
|
+
};
|
|
1425
|
+
type GetFirmwareBundleResponse = GetFirmwareBundleResponses[keyof GetFirmwareBundleResponses];
|
|
1426
|
+
type ListFirmwareDeploymentsData = {
|
|
1427
|
+
body?: never;
|
|
1428
|
+
path?: never;
|
|
1429
|
+
query?: {
|
|
1430
|
+
status?: 'pending' | 'downloading' | 'installing' | 'succeeded' | 'failed' | 'canceled' | 'rolled_back';
|
|
1431
|
+
bundleId?: string;
|
|
1432
|
+
deviceId?: string;
|
|
1433
|
+
cursor?: string;
|
|
1434
|
+
limit?: number;
|
|
1435
|
+
};
|
|
1436
|
+
url: '/api/v1/firmware/deployments';
|
|
1437
|
+
};
|
|
1438
|
+
type ListFirmwareDeploymentsErrors = {
|
|
1439
|
+
/**
|
|
1440
|
+
* Missing or invalid token.
|
|
1441
|
+
*/
|
|
1442
|
+
401: ErrorResponse;
|
|
1443
|
+
/**
|
|
1444
|
+
* Token is missing the `api:firmware:read` ability.
|
|
1445
|
+
*/
|
|
1446
|
+
403: ErrorResponse;
|
|
1447
|
+
};
|
|
1448
|
+
type ListFirmwareDeploymentsError = ListFirmwareDeploymentsErrors[keyof ListFirmwareDeploymentsErrors];
|
|
1449
|
+
type ListFirmwareDeploymentsResponses = {
|
|
1450
|
+
/**
|
|
1451
|
+
* Paginated list of deployments.
|
|
1452
|
+
*/
|
|
1453
|
+
200: FirmwareDeploymentListPage;
|
|
1454
|
+
};
|
|
1455
|
+
type ListFirmwareDeploymentsResponse = ListFirmwareDeploymentsResponses[keyof ListFirmwareDeploymentsResponses];
|
|
1456
|
+
type TriggerFirmwareDeploymentData = {
|
|
1457
|
+
body?: FirmwareDeploymentTriggerRequest;
|
|
1458
|
+
path?: never;
|
|
1459
|
+
query?: never;
|
|
1460
|
+
url: '/api/v1/firmware/deployments';
|
|
1461
|
+
};
|
|
1462
|
+
type TriggerFirmwareDeploymentErrors = {
|
|
1463
|
+
/**
|
|
1464
|
+
* Invalid body, too many devices, or a device outside the bundle’s project.
|
|
1465
|
+
*/
|
|
1466
|
+
400: ErrorResponse;
|
|
1467
|
+
/**
|
|
1468
|
+
* Missing or invalid token.
|
|
1469
|
+
*/
|
|
1470
|
+
401: ErrorResponse;
|
|
1471
|
+
/**
|
|
1472
|
+
* Token is missing the `api:firmware:write` ability.
|
|
1473
|
+
*/
|
|
1474
|
+
403: ErrorResponse;
|
|
1475
|
+
/**
|
|
1476
|
+
* Bundle not found in this token’s scope.
|
|
1477
|
+
*/
|
|
1478
|
+
404: ErrorResponse;
|
|
1479
|
+
/**
|
|
1480
|
+
* A targeted device’s recorded hardware compatibility does not match the bundle’s declared target, or its device type does not support firmware updates at all.
|
|
1481
|
+
*/
|
|
1482
|
+
422: ErrorResponse;
|
|
1483
|
+
};
|
|
1484
|
+
type TriggerFirmwareDeploymentError = TriggerFirmwareDeploymentErrors[keyof TriggerFirmwareDeploymentErrors];
|
|
1485
|
+
type TriggerFirmwareDeploymentResponses = {
|
|
1486
|
+
/**
|
|
1487
|
+
* The created deployments (one per device).
|
|
1488
|
+
*/
|
|
1489
|
+
200: FirmwareDeploymentTriggerResponse;
|
|
1490
|
+
};
|
|
1491
|
+
type TriggerFirmwareDeploymentResponse = TriggerFirmwareDeploymentResponses[keyof TriggerFirmwareDeploymentResponses];
|
|
1492
|
+
type GetFirmwareDeploymentData = {
|
|
1493
|
+
body?: never;
|
|
1494
|
+
path: {
|
|
1495
|
+
id: string;
|
|
1496
|
+
};
|
|
1497
|
+
query?: never;
|
|
1498
|
+
url: '/api/v1/firmware/deployments/{id}';
|
|
1499
|
+
};
|
|
1500
|
+
type GetFirmwareDeploymentErrors = {
|
|
1501
|
+
/**
|
|
1502
|
+
* Missing or invalid token.
|
|
1503
|
+
*/
|
|
1504
|
+
401: ErrorResponse;
|
|
1505
|
+
/**
|
|
1506
|
+
* Token is missing the `api:firmware:read` ability.
|
|
1507
|
+
*/
|
|
1508
|
+
403: ErrorResponse;
|
|
1509
|
+
/**
|
|
1510
|
+
* Deployment not found.
|
|
1511
|
+
*/
|
|
1512
|
+
404: ErrorResponse;
|
|
1513
|
+
};
|
|
1514
|
+
type GetFirmwareDeploymentError = GetFirmwareDeploymentErrors[keyof GetFirmwareDeploymentErrors];
|
|
1515
|
+
type GetFirmwareDeploymentResponses = {
|
|
1516
|
+
/**
|
|
1517
|
+
* The deployment.
|
|
1518
|
+
*/
|
|
1519
|
+
200: FirmwareDeployment;
|
|
1520
|
+
};
|
|
1521
|
+
type GetFirmwareDeploymentResponse = GetFirmwareDeploymentResponses[keyof GetFirmwareDeploymentResponses];
|
|
1522
|
+
type CancelFirmwareDeploymentData = {
|
|
1523
|
+
body?: FirmwareDeploymentCancelRequest;
|
|
1524
|
+
path: {
|
|
1525
|
+
id: string;
|
|
1526
|
+
};
|
|
1527
|
+
query?: never;
|
|
1528
|
+
url: '/api/v1/firmware/deployments/{id}/cancel';
|
|
1529
|
+
};
|
|
1530
|
+
type CancelFirmwareDeploymentErrors = {
|
|
1531
|
+
/**
|
|
1532
|
+
* Missing or invalid token.
|
|
1533
|
+
*/
|
|
1534
|
+
401: ErrorResponse;
|
|
1535
|
+
/**
|
|
1536
|
+
* Token is missing the `api:firmware:write` ability.
|
|
1537
|
+
*/
|
|
1538
|
+
403: ErrorResponse;
|
|
1539
|
+
/**
|
|
1540
|
+
* Deployment not found.
|
|
1541
|
+
*/
|
|
1542
|
+
404: ErrorResponse;
|
|
1543
|
+
/**
|
|
1544
|
+
* Already terminal, or in flight without `force: true`. The message says which.
|
|
1545
|
+
*/
|
|
1546
|
+
409: ErrorResponse;
|
|
1547
|
+
};
|
|
1548
|
+
type CancelFirmwareDeploymentError = CancelFirmwareDeploymentErrors[keyof CancelFirmwareDeploymentErrors];
|
|
1549
|
+
type CancelFirmwareDeploymentResponses = {
|
|
1550
|
+
/**
|
|
1551
|
+
* The canceled deployment.
|
|
1552
|
+
*/
|
|
1553
|
+
200: FirmwareDeployment;
|
|
1554
|
+
};
|
|
1555
|
+
type CancelFirmwareDeploymentResponse = CancelFirmwareDeploymentResponses[keyof CancelFirmwareDeploymentResponses];
|
|
1556
|
+
type RollbackFirmwareDeploymentData = {
|
|
1557
|
+
body?: FirmwareDeploymentRollbackRequest;
|
|
1558
|
+
path: {
|
|
1559
|
+
id: string;
|
|
1560
|
+
};
|
|
1561
|
+
query?: never;
|
|
1562
|
+
url: '/api/v1/firmware/deployments/{id}/rollback';
|
|
1563
|
+
};
|
|
1564
|
+
type RollbackFirmwareDeploymentErrors = {
|
|
1565
|
+
/**
|
|
1566
|
+
* Missing or invalid token.
|
|
1567
|
+
*/
|
|
1568
|
+
401: ErrorResponse;
|
|
1569
|
+
/**
|
|
1570
|
+
* Token is missing the `api:firmware:write` ability.
|
|
1571
|
+
*/
|
|
1572
|
+
403: ErrorResponse;
|
|
1573
|
+
/**
|
|
1574
|
+
* Deployment not found.
|
|
1575
|
+
*/
|
|
1576
|
+
404: ErrorResponse;
|
|
1577
|
+
/**
|
|
1578
|
+
* The source deployment is not `succeeded`; rollback only undoes a succeeded install.
|
|
1579
|
+
*/
|
|
1580
|
+
409: ErrorResponse;
|
|
1581
|
+
/**
|
|
1582
|
+
* Rollback could not be dispatched: the device is offline, delivery to the device failed, or the device type does not support firmware rollback.
|
|
1583
|
+
*/
|
|
1584
|
+
422: ErrorResponse;
|
|
1585
|
+
};
|
|
1586
|
+
type RollbackFirmwareDeploymentError = RollbackFirmwareDeploymentErrors[keyof RollbackFirmwareDeploymentErrors];
|
|
1587
|
+
type RollbackFirmwareDeploymentResponses = {
|
|
1588
|
+
/**
|
|
1589
|
+
* The new synthetic rollback deployment.
|
|
1590
|
+
*/
|
|
1591
|
+
200: FirmwareDeployment;
|
|
1592
|
+
};
|
|
1593
|
+
type RollbackFirmwareDeploymentResponse = RollbackFirmwareDeploymentResponses[keyof RollbackFirmwareDeploymentResponses];
|
|
1594
|
+
type ExecDeviceCommandData = {
|
|
1595
|
+
body?: CommandRequest;
|
|
1596
|
+
path: {
|
|
1597
|
+
id: string;
|
|
1598
|
+
};
|
|
1599
|
+
query?: never;
|
|
1600
|
+
url: '/api/v1/devices/{id}/command';
|
|
1601
|
+
};
|
|
1602
|
+
type ExecDeviceCommandErrors = {
|
|
1603
|
+
/**
|
|
1604
|
+
* Missing or invalid token.
|
|
1605
|
+
*/
|
|
1606
|
+
401: ErrorResponse;
|
|
1607
|
+
/**
|
|
1608
|
+
* Token is missing the `api:command:exec` ability.
|
|
1609
|
+
*/
|
|
1610
|
+
403: ErrorResponse;
|
|
1611
|
+
/**
|
|
1612
|
+
* Device not found or out of scope.
|
|
1613
|
+
*/
|
|
1614
|
+
404: ErrorResponse;
|
|
1615
|
+
/**
|
|
1616
|
+
* Command rejected by the device type's manifest: unknown name, missing required arg, wrong arg type, or the device type declares no manifest at all.
|
|
1617
|
+
*/
|
|
1618
|
+
422: ErrorResponse;
|
|
1619
|
+
/**
|
|
1620
|
+
* Device offline, command timed out, or transport failed.
|
|
1621
|
+
*/
|
|
1622
|
+
502: ErrorResponse;
|
|
1623
|
+
};
|
|
1624
|
+
type ExecDeviceCommandError = ExecDeviceCommandErrors[keyof ExecDeviceCommandErrors];
|
|
1625
|
+
type ExecDeviceCommandResponses = {
|
|
1626
|
+
/**
|
|
1627
|
+
* Interactive device: command completed; returns status + captured output.
|
|
1628
|
+
*/
|
|
1629
|
+
200: CommandResult;
|
|
1630
|
+
/**
|
|
1631
|
+
* Queued device: command accepted for store-and-forward delivery; returns the invocation id and status. Poll `GET /api/v1/devices/{id}/commands/{invocationId}` for the eventual result.
|
|
1632
|
+
*/
|
|
1633
|
+
202: CommandResult;
|
|
1634
|
+
};
|
|
1635
|
+
type ExecDeviceCommandResponse = ExecDeviceCommandResponses[keyof ExecDeviceCommandResponses];
|
|
1636
|
+
type GetDeviceCommandInvocationData = {
|
|
1637
|
+
body?: never;
|
|
1638
|
+
path: {
|
|
1639
|
+
id: string;
|
|
1640
|
+
invocationId: string;
|
|
1641
|
+
};
|
|
1642
|
+
query?: never;
|
|
1643
|
+
url: '/api/v1/devices/{id}/commands/{invocationId}';
|
|
1644
|
+
};
|
|
1645
|
+
type GetDeviceCommandInvocationErrors = {
|
|
1646
|
+
/**
|
|
1647
|
+
* Missing or invalid token.
|
|
1648
|
+
*/
|
|
1649
|
+
401: ErrorResponse;
|
|
1650
|
+
/**
|
|
1651
|
+
* Token is missing the `api:command:exec` ability.
|
|
1652
|
+
*/
|
|
1653
|
+
403: ErrorResponse;
|
|
1654
|
+
/**
|
|
1655
|
+
* Device or invocation not found, or out of scope.
|
|
1656
|
+
*/
|
|
1657
|
+
404: ErrorResponse;
|
|
1658
|
+
};
|
|
1659
|
+
type GetDeviceCommandInvocationError = GetDeviceCommandInvocationErrors[keyof GetDeviceCommandInvocationErrors];
|
|
1660
|
+
type GetDeviceCommandInvocationResponses = {
|
|
1661
|
+
/**
|
|
1662
|
+
* The invocation record: lifecycle status plus the result when terminal.
|
|
1663
|
+
*/
|
|
1664
|
+
200: CommandInvocation;
|
|
1665
|
+
};
|
|
1666
|
+
type GetDeviceCommandInvocationResponse = GetDeviceCommandInvocationResponses[keyof GetDeviceCommandInvocationResponses];
|
|
1667
|
+
type GetDeviceCommandsData = {
|
|
1668
|
+
body?: never;
|
|
1669
|
+
path: {
|
|
1670
|
+
id: string;
|
|
1671
|
+
};
|
|
1672
|
+
query?: never;
|
|
1673
|
+
url: '/api/v1/devices/{id}/commands';
|
|
1674
|
+
};
|
|
1675
|
+
type GetDeviceCommandsErrors = {
|
|
1676
|
+
/**
|
|
1677
|
+
* Missing or invalid token.
|
|
1678
|
+
*/
|
|
1679
|
+
401: ErrorResponse;
|
|
1680
|
+
/**
|
|
1681
|
+
* Token is missing the `api:devices:read` ability.
|
|
1682
|
+
*/
|
|
1683
|
+
403: ErrorResponse;
|
|
1684
|
+
/**
|
|
1685
|
+
* Device not found or out of scope.
|
|
1686
|
+
*/
|
|
1687
|
+
404: ErrorResponse;
|
|
1688
|
+
};
|
|
1689
|
+
type GetDeviceCommandsError = GetDeviceCommandsErrors[keyof GetDeviceCommandsErrors];
|
|
1690
|
+
type GetDeviceCommandsResponses = {
|
|
1691
|
+
/**
|
|
1692
|
+
* The device type's command manifest, or null when none is declared.
|
|
1693
|
+
*/
|
|
1694
|
+
200: CommandManifest | null;
|
|
1695
|
+
};
|
|
1696
|
+
type GetDeviceCommandsResponse = GetDeviceCommandsResponses[keyof GetDeviceCommandsResponses];
|
|
1697
|
+
type DeleteCommandManifestData = {
|
|
1698
|
+
body?: never;
|
|
1699
|
+
path: {
|
|
1700
|
+
projectId: string;
|
|
1701
|
+
slug: string;
|
|
1702
|
+
};
|
|
1703
|
+
query?: never;
|
|
1704
|
+
url: '/api/v1/projects/{projectId}/device-types/{slug}/commands';
|
|
1705
|
+
};
|
|
1706
|
+
type DeleteCommandManifestErrors = {
|
|
1707
|
+
/**
|
|
1708
|
+
* Missing or invalid token.
|
|
1709
|
+
*/
|
|
1710
|
+
401: ErrorResponse;
|
|
1711
|
+
/**
|
|
1712
|
+
* Token is missing the `api:device-types:manage` ability.
|
|
1713
|
+
*/
|
|
1714
|
+
403: ErrorResponse;
|
|
1715
|
+
/**
|
|
1716
|
+
* Device type not found or out of scope.
|
|
1717
|
+
*/
|
|
1718
|
+
404: ErrorResponse;
|
|
1719
|
+
};
|
|
1720
|
+
type DeleteCommandManifestError = DeleteCommandManifestErrors[keyof DeleteCommandManifestErrors];
|
|
1721
|
+
type DeleteCommandManifestResponses = {
|
|
1722
|
+
/**
|
|
1723
|
+
* Deleted.
|
|
1724
|
+
*/
|
|
1725
|
+
204: unknown;
|
|
1726
|
+
};
|
|
1727
|
+
type GetCommandManifestData = {
|
|
1728
|
+
body?: never;
|
|
1729
|
+
path: {
|
|
1730
|
+
projectId: string;
|
|
1731
|
+
slug: string;
|
|
1732
|
+
};
|
|
1733
|
+
query?: never;
|
|
1734
|
+
url: '/api/v1/projects/{projectId}/device-types/{slug}/commands';
|
|
1735
|
+
};
|
|
1736
|
+
type GetCommandManifestErrors = {
|
|
1737
|
+
/**
|
|
1738
|
+
* Missing or invalid token.
|
|
1739
|
+
*/
|
|
1740
|
+
401: ErrorResponse;
|
|
1741
|
+
/**
|
|
1742
|
+
* Token is missing the `api:devices:read` ability.
|
|
1743
|
+
*/
|
|
1744
|
+
403: ErrorResponse;
|
|
1745
|
+
/**
|
|
1746
|
+
* Device type not found or out of scope.
|
|
1747
|
+
*/
|
|
1748
|
+
404: ErrorResponse;
|
|
1749
|
+
};
|
|
1750
|
+
type GetCommandManifestError = GetCommandManifestErrors[keyof GetCommandManifestErrors];
|
|
1751
|
+
type GetCommandManifestResponses = {
|
|
1752
|
+
/**
|
|
1753
|
+
* The command manifest, or null when none is declared.
|
|
1754
|
+
*/
|
|
1755
|
+
200: CommandManifest | null;
|
|
1756
|
+
};
|
|
1757
|
+
type GetCommandManifestResponse = GetCommandManifestResponses[keyof GetCommandManifestResponses];
|
|
1758
|
+
type UpdateCommandManifestData = {
|
|
1759
|
+
body?: CommandManifest;
|
|
1760
|
+
path: {
|
|
1761
|
+
projectId: string;
|
|
1762
|
+
slug: string;
|
|
1763
|
+
};
|
|
1764
|
+
query?: never;
|
|
1765
|
+
url: '/api/v1/projects/{projectId}/device-types/{slug}/commands';
|
|
1766
|
+
};
|
|
1767
|
+
type UpdateCommandManifestErrors = {
|
|
1768
|
+
/**
|
|
1769
|
+
* Missing or invalid token.
|
|
1770
|
+
*/
|
|
1771
|
+
401: ErrorResponse;
|
|
1772
|
+
/**
|
|
1773
|
+
* Token is missing the `api:device-types:manage` ability.
|
|
1774
|
+
*/
|
|
1775
|
+
403: ErrorResponse;
|
|
1776
|
+
/**
|
|
1777
|
+
* Device type not found or out of scope.
|
|
1778
|
+
*/
|
|
1779
|
+
404: ErrorResponse;
|
|
1780
|
+
/**
|
|
1781
|
+
* Malformed manifest (duplicate command names, bad arg types, …).
|
|
1782
|
+
*/
|
|
1783
|
+
422: ErrorResponse;
|
|
1784
|
+
};
|
|
1785
|
+
type UpdateCommandManifestError = UpdateCommandManifestErrors[keyof UpdateCommandManifestErrors];
|
|
1786
|
+
type UpdateCommandManifestResponses = {
|
|
1787
|
+
/**
|
|
1788
|
+
* The stored command manifest.
|
|
1789
|
+
*/
|
|
1790
|
+
200: CommandManifest;
|
|
1791
|
+
};
|
|
1792
|
+
type UpdateCommandManifestResponse = UpdateCommandManifestResponses[keyof UpdateCommandManifestResponses];
|
|
1793
|
+
type ListDeviceTypesData = {
|
|
1794
|
+
body?: never;
|
|
1795
|
+
path: {
|
|
1796
|
+
projectId: string;
|
|
1797
|
+
};
|
|
1798
|
+
query?: {
|
|
1799
|
+
/**
|
|
1800
|
+
* Exact slug to filter to.
|
|
1801
|
+
*/
|
|
1802
|
+
slug?: string;
|
|
1803
|
+
cursor?: string;
|
|
1804
|
+
limit?: number;
|
|
1805
|
+
};
|
|
1806
|
+
url: '/api/v1/projects/{projectId}/device-types';
|
|
1807
|
+
};
|
|
1808
|
+
type ListDeviceTypesErrors = {
|
|
1809
|
+
/**
|
|
1810
|
+
* Missing or invalid token.
|
|
1811
|
+
*/
|
|
1812
|
+
401: ErrorResponse;
|
|
1813
|
+
/**
|
|
1814
|
+
* Token is missing the `api:devices:read` ability.
|
|
1815
|
+
*/
|
|
1816
|
+
403: ErrorResponse;
|
|
1817
|
+
/**
|
|
1818
|
+
* Project not found, or outside the token’s reach.
|
|
1819
|
+
*/
|
|
1820
|
+
404: ErrorResponse;
|
|
1821
|
+
};
|
|
1822
|
+
type ListDeviceTypesError = ListDeviceTypesErrors[keyof ListDeviceTypesErrors];
|
|
1823
|
+
type ListDeviceTypesResponses = {
|
|
1824
|
+
/**
|
|
1825
|
+
* Paginated list of device types.
|
|
1826
|
+
*/
|
|
1827
|
+
200: DeviceTypeListPage;
|
|
1828
|
+
};
|
|
1829
|
+
type ListDeviceTypesResponse = ListDeviceTypesResponses[keyof ListDeviceTypesResponses];
|
|
1830
|
+
type CreateDeviceTypeData = {
|
|
1831
|
+
body?: DeviceTypeCreateRequest;
|
|
1832
|
+
path: {
|
|
1833
|
+
projectId: string;
|
|
1834
|
+
};
|
|
1835
|
+
query?: never;
|
|
1836
|
+
url: '/api/v1/projects/{projectId}/device-types';
|
|
1837
|
+
};
|
|
1838
|
+
type CreateDeviceTypeErrors = {
|
|
1839
|
+
/**
|
|
1840
|
+
* Missing or invalid token.
|
|
1841
|
+
*/
|
|
1842
|
+
401: ErrorResponse;
|
|
1843
|
+
/**
|
|
1844
|
+
* Token is missing the `api:device-types:manage` ability.
|
|
1845
|
+
*/
|
|
1846
|
+
403: ErrorResponse;
|
|
1847
|
+
/**
|
|
1848
|
+
* Project not found, or outside the token’s reach.
|
|
1849
|
+
*/
|
|
1850
|
+
404: ErrorResponse;
|
|
1851
|
+
/**
|
|
1852
|
+
* A device type with this slug already exists in the project.
|
|
1853
|
+
*/
|
|
1854
|
+
409: ErrorResponse;
|
|
1855
|
+
/**
|
|
1856
|
+
* Validation failed, the command manifest is semantically invalid, or protocolOptions is not parseable as a nanopb .options file.
|
|
1857
|
+
*/
|
|
1858
|
+
422: ErrorResponse;
|
|
1859
|
+
};
|
|
1860
|
+
type CreateDeviceTypeError = CreateDeviceTypeErrors[keyof CreateDeviceTypeErrors];
|
|
1861
|
+
type CreateDeviceTypeResponses = {
|
|
1862
|
+
/**
|
|
1863
|
+
* The created device type.
|
|
1864
|
+
*/
|
|
1865
|
+
201: DeviceType;
|
|
1866
|
+
};
|
|
1867
|
+
type CreateDeviceTypeResponse = CreateDeviceTypeResponses[keyof CreateDeviceTypeResponses];
|
|
1868
|
+
type DeleteDeviceTypeData = {
|
|
1869
|
+
body?: never;
|
|
1870
|
+
path: {
|
|
1871
|
+
projectId: string;
|
|
1872
|
+
slug: string;
|
|
1873
|
+
};
|
|
1874
|
+
query?: never;
|
|
1875
|
+
url: '/api/v1/projects/{projectId}/device-types/{slug}';
|
|
1876
|
+
};
|
|
1877
|
+
type DeleteDeviceTypeErrors = {
|
|
1878
|
+
/**
|
|
1879
|
+
* Missing or invalid token.
|
|
1880
|
+
*/
|
|
1881
|
+
401: ErrorResponse;
|
|
1882
|
+
/**
|
|
1883
|
+
* Token is missing the `api:device-types:manage` ability.
|
|
1884
|
+
*/
|
|
1885
|
+
403: ErrorResponse;
|
|
1886
|
+
/**
|
|
1887
|
+
* Device type or project not found.
|
|
1888
|
+
*/
|
|
1889
|
+
404: ErrorResponse;
|
|
1890
|
+
/**
|
|
1891
|
+
* The device type is still assigned to devices.
|
|
1892
|
+
*/
|
|
1893
|
+
409: ErrorResponse;
|
|
1894
|
+
};
|
|
1895
|
+
type DeleteDeviceTypeError = DeleteDeviceTypeErrors[keyof DeleteDeviceTypeErrors];
|
|
1896
|
+
type DeleteDeviceTypeResponses = {
|
|
1897
|
+
/**
|
|
1898
|
+
* Deleted.
|
|
1899
|
+
*/
|
|
1900
|
+
204: unknown;
|
|
1901
|
+
};
|
|
1902
|
+
type GetDeviceTypeData = {
|
|
1903
|
+
body?: never;
|
|
1904
|
+
path: {
|
|
1905
|
+
projectId: string;
|
|
1906
|
+
slug: string;
|
|
1907
|
+
};
|
|
1908
|
+
query?: never;
|
|
1909
|
+
url: '/api/v1/projects/{projectId}/device-types/{slug}';
|
|
1910
|
+
};
|
|
1911
|
+
type GetDeviceTypeErrors = {
|
|
1912
|
+
/**
|
|
1913
|
+
* Missing or invalid token.
|
|
1914
|
+
*/
|
|
1915
|
+
401: ErrorResponse;
|
|
1916
|
+
/**
|
|
1917
|
+
* Token is missing the `api:devices:read` ability.
|
|
1918
|
+
*/
|
|
1919
|
+
403: ErrorResponse;
|
|
1920
|
+
/**
|
|
1921
|
+
* Device type or project not found.
|
|
1922
|
+
*/
|
|
1923
|
+
404: ErrorResponse;
|
|
1924
|
+
};
|
|
1925
|
+
type GetDeviceTypeError = GetDeviceTypeErrors[keyof GetDeviceTypeErrors];
|
|
1926
|
+
type GetDeviceTypeResponses = {
|
|
1927
|
+
/**
|
|
1928
|
+
* The device type.
|
|
1929
|
+
*/
|
|
1930
|
+
200: DeviceType;
|
|
1931
|
+
};
|
|
1932
|
+
type GetDeviceTypeResponse = GetDeviceTypeResponses[keyof GetDeviceTypeResponses];
|
|
1933
|
+
type UpdateDeviceTypeData = {
|
|
1934
|
+
body?: DeviceTypeUpdateRequest;
|
|
1935
|
+
path: {
|
|
1936
|
+
projectId: string;
|
|
1937
|
+
slug: string;
|
|
1938
|
+
};
|
|
1939
|
+
query?: never;
|
|
1940
|
+
url: '/api/v1/projects/{projectId}/device-types/{slug}';
|
|
1941
|
+
};
|
|
1942
|
+
type UpdateDeviceTypeErrors = {
|
|
1943
|
+
/**
|
|
1944
|
+
* Missing or invalid token.
|
|
1945
|
+
*/
|
|
1946
|
+
401: ErrorResponse;
|
|
1947
|
+
/**
|
|
1948
|
+
* Token is missing the `api:device-types:manage` ability.
|
|
1949
|
+
*/
|
|
1950
|
+
403: ErrorResponse;
|
|
1951
|
+
/**
|
|
1952
|
+
* Device type or project not found.
|
|
1953
|
+
*/
|
|
1954
|
+
404: ErrorResponse;
|
|
1955
|
+
/**
|
|
1956
|
+
* Validation failed, the command manifest is semantically invalid, or protocolOptions is not parseable as a nanopb .options file.
|
|
1957
|
+
*/
|
|
1958
|
+
422: ErrorResponse;
|
|
1959
|
+
};
|
|
1960
|
+
type UpdateDeviceTypeError = UpdateDeviceTypeErrors[keyof UpdateDeviceTypeErrors];
|
|
1961
|
+
type UpdateDeviceTypeResponses = {
|
|
1962
|
+
/**
|
|
1963
|
+
* The updated device type.
|
|
1964
|
+
*/
|
|
1965
|
+
200: DeviceType;
|
|
1966
|
+
};
|
|
1967
|
+
type UpdateDeviceTypeResponse = UpdateDeviceTypeResponses[keyof UpdateDeviceTypeResponses];
|
|
1968
|
+
type ListWebhooksData = {
|
|
1969
|
+
body?: never;
|
|
1970
|
+
path?: never;
|
|
1971
|
+
query?: {
|
|
1972
|
+
projectId?: string;
|
|
1973
|
+
cursor?: string;
|
|
1974
|
+
limit?: number;
|
|
1975
|
+
};
|
|
1976
|
+
url: '/api/v1/webhooks';
|
|
1977
|
+
};
|
|
1978
|
+
type ListWebhooksErrors = {
|
|
1979
|
+
/**
|
|
1980
|
+
* Missing or invalid token.
|
|
1981
|
+
*/
|
|
1982
|
+
401: ErrorResponse;
|
|
1983
|
+
/**
|
|
1984
|
+
* Token is missing the `api:webhooks:read` ability.
|
|
1985
|
+
*/
|
|
1986
|
+
403: ErrorResponse;
|
|
1987
|
+
};
|
|
1988
|
+
type ListWebhooksError = ListWebhooksErrors[keyof ListWebhooksErrors];
|
|
1989
|
+
type ListWebhooksResponses = {
|
|
1990
|
+
/**
|
|
1991
|
+
* Paginated list of webhook subscriptions.
|
|
1992
|
+
*/
|
|
1993
|
+
200: WebhookSubscriptionPage;
|
|
1994
|
+
};
|
|
1995
|
+
type ListWebhooksResponse = ListWebhooksResponses[keyof ListWebhooksResponses];
|
|
1996
|
+
type CreateWebhookData = {
|
|
1997
|
+
body?: WebhookCreateRequest;
|
|
1998
|
+
path?: never;
|
|
1999
|
+
query?: never;
|
|
2000
|
+
url: '/api/v1/webhooks';
|
|
2001
|
+
};
|
|
2002
|
+
type CreateWebhookErrors = {
|
|
2003
|
+
/**
|
|
2004
|
+
* Invalid body or rejected URL.
|
|
2005
|
+
*/
|
|
2006
|
+
400: ErrorResponse;
|
|
2007
|
+
/**
|
|
2008
|
+
* Missing or invalid token.
|
|
2009
|
+
*/
|
|
2010
|
+
401: ErrorResponse;
|
|
2011
|
+
/**
|
|
2012
|
+
* Token is missing the `api:webhooks:manage` ability.
|
|
2013
|
+
*/
|
|
2014
|
+
403: ErrorResponse;
|
|
2015
|
+
};
|
|
2016
|
+
type CreateWebhookError = CreateWebhookErrors[keyof CreateWebhookErrors];
|
|
2017
|
+
type CreateWebhookResponses = {
|
|
2018
|
+
/**
|
|
2019
|
+
* The created subscription, with the one-time signing secret.
|
|
2020
|
+
*/
|
|
2021
|
+
201: WebhookCreateResponse;
|
|
2022
|
+
};
|
|
2023
|
+
type CreateWebhookResponse = CreateWebhookResponses[keyof CreateWebhookResponses];
|
|
2024
|
+
type DeleteWebhookData = {
|
|
2025
|
+
body?: never;
|
|
2026
|
+
path: {
|
|
2027
|
+
id: string;
|
|
2028
|
+
};
|
|
2029
|
+
query?: never;
|
|
2030
|
+
url: '/api/v1/webhooks/{id}';
|
|
2031
|
+
};
|
|
2032
|
+
type DeleteWebhookErrors = {
|
|
2033
|
+
/**
|
|
2034
|
+
* Missing or invalid token.
|
|
2035
|
+
*/
|
|
2036
|
+
401: ErrorResponse;
|
|
2037
|
+
/**
|
|
2038
|
+
* Token is missing the `api:webhooks:manage` ability.
|
|
2039
|
+
*/
|
|
2040
|
+
403: ErrorResponse;
|
|
2041
|
+
/**
|
|
2042
|
+
* Subscription not found.
|
|
2043
|
+
*/
|
|
2044
|
+
404: ErrorResponse;
|
|
2045
|
+
};
|
|
2046
|
+
type DeleteWebhookError = DeleteWebhookErrors[keyof DeleteWebhookErrors];
|
|
2047
|
+
type DeleteWebhookResponses = {
|
|
2048
|
+
/**
|
|
2049
|
+
* Deleted.
|
|
2050
|
+
*/
|
|
2051
|
+
204: unknown;
|
|
2052
|
+
};
|
|
2053
|
+
type GetWebhookData = {
|
|
2054
|
+
body?: never;
|
|
2055
|
+
path: {
|
|
2056
|
+
id: string;
|
|
2057
|
+
};
|
|
2058
|
+
query?: never;
|
|
2059
|
+
url: '/api/v1/webhooks/{id}';
|
|
2060
|
+
};
|
|
2061
|
+
type GetWebhookErrors = {
|
|
2062
|
+
/**
|
|
2063
|
+
* Missing or invalid token.
|
|
2064
|
+
*/
|
|
2065
|
+
401: ErrorResponse;
|
|
2066
|
+
/**
|
|
2067
|
+
* Token is missing the `api:webhooks:read` ability.
|
|
2068
|
+
*/
|
|
2069
|
+
403: ErrorResponse;
|
|
2070
|
+
/**
|
|
2071
|
+
* Subscription not found.
|
|
2072
|
+
*/
|
|
2073
|
+
404: ErrorResponse;
|
|
2074
|
+
};
|
|
2075
|
+
type GetWebhookError = GetWebhookErrors[keyof GetWebhookErrors];
|
|
2076
|
+
type GetWebhookResponses = {
|
|
2077
|
+
/**
|
|
2078
|
+
* The subscription.
|
|
2079
|
+
*/
|
|
2080
|
+
200: WebhookSubscription;
|
|
2081
|
+
};
|
|
2082
|
+
type GetWebhookResponse = GetWebhookResponses[keyof GetWebhookResponses];
|
|
2083
|
+
type UpdateWebhookData = {
|
|
2084
|
+
body?: WebhookUpdateRequest;
|
|
2085
|
+
path: {
|
|
2086
|
+
id: string;
|
|
2087
|
+
};
|
|
2088
|
+
query?: never;
|
|
2089
|
+
url: '/api/v1/webhooks/{id}';
|
|
2090
|
+
};
|
|
2091
|
+
type UpdateWebhookErrors = {
|
|
2092
|
+
/**
|
|
2093
|
+
* Invalid body or rejected URL.
|
|
2094
|
+
*/
|
|
2095
|
+
400: ErrorResponse;
|
|
2096
|
+
/**
|
|
2097
|
+
* Missing or invalid token.
|
|
2098
|
+
*/
|
|
2099
|
+
401: ErrorResponse;
|
|
2100
|
+
/**
|
|
2101
|
+
* Token is missing the `api:webhooks:manage` ability.
|
|
2102
|
+
*/
|
|
2103
|
+
403: ErrorResponse;
|
|
2104
|
+
/**
|
|
2105
|
+
* Subscription not found.
|
|
2106
|
+
*/
|
|
2107
|
+
404: ErrorResponse;
|
|
2108
|
+
};
|
|
2109
|
+
type UpdateWebhookError = UpdateWebhookErrors[keyof UpdateWebhookErrors];
|
|
2110
|
+
type UpdateWebhookResponses = {
|
|
2111
|
+
/**
|
|
2112
|
+
* The updated subscription.
|
|
2113
|
+
*/
|
|
2114
|
+
200: WebhookSubscription;
|
|
2115
|
+
};
|
|
2116
|
+
type UpdateWebhookResponse = UpdateWebhookResponses[keyof UpdateWebhookResponses];
|
|
2117
|
+
type ListWebhookDeliveriesData = {
|
|
2118
|
+
body?: never;
|
|
2119
|
+
path: {
|
|
2120
|
+
id: string;
|
|
2121
|
+
};
|
|
2122
|
+
query?: {
|
|
2123
|
+
status?: 'pending' | 'delivered' | 'failed';
|
|
2124
|
+
cursor?: string;
|
|
2125
|
+
limit?: number;
|
|
2126
|
+
};
|
|
2127
|
+
url: '/api/v1/webhooks/{id}/deliveries';
|
|
2128
|
+
};
|
|
2129
|
+
type ListWebhookDeliveriesErrors = {
|
|
2130
|
+
/**
|
|
2131
|
+
* Missing or invalid token.
|
|
2132
|
+
*/
|
|
2133
|
+
401: ErrorResponse;
|
|
2134
|
+
/**
|
|
2135
|
+
* Token is missing the `api:webhooks:read` ability.
|
|
2136
|
+
*/
|
|
2137
|
+
403: ErrorResponse;
|
|
2138
|
+
/**
|
|
2139
|
+
* Subscription not found.
|
|
2140
|
+
*/
|
|
2141
|
+
404: ErrorResponse;
|
|
2142
|
+
};
|
|
2143
|
+
type ListWebhookDeliveriesError = ListWebhookDeliveriesErrors[keyof ListWebhookDeliveriesErrors];
|
|
2144
|
+
type ListWebhookDeliveriesResponses = {
|
|
2145
|
+
/**
|
|
2146
|
+
* Paginated delivery log.
|
|
2147
|
+
*/
|
|
2148
|
+
200: WebhookDeliveryPage;
|
|
2149
|
+
};
|
|
2150
|
+
type ListWebhookDeliveriesResponse = ListWebhookDeliveriesResponses[keyof ListWebhookDeliveriesResponses];
|
|
2151
|
+
|
|
2152
|
+
type AuthToken = string | undefined;
|
|
2153
|
+
interface Auth {
|
|
2154
|
+
/**
|
|
2155
|
+
* Which part of the request do we use to send the auth?
|
|
2156
|
+
*
|
|
2157
|
+
* @default 'header'
|
|
2158
|
+
*/
|
|
2159
|
+
in?: 'header' | 'query' | 'cookie';
|
|
2160
|
+
/**
|
|
2161
|
+
* A unique identifier for the security scheme.
|
|
2162
|
+
*
|
|
2163
|
+
* Defined only when there are multiple security schemes whose `Auth`
|
|
2164
|
+
* shape would otherwise be identical.
|
|
2165
|
+
*/
|
|
2166
|
+
key?: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* Header or query parameter name.
|
|
2169
|
+
*
|
|
2170
|
+
* @default 'Authorization'
|
|
2171
|
+
*/
|
|
2172
|
+
name?: string;
|
|
2173
|
+
scheme?: 'basic' | 'bearer';
|
|
2174
|
+
type: 'apiKey' | 'http';
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
interface SerializerOptions<T> {
|
|
2178
|
+
/**
|
|
2179
|
+
* @default true
|
|
2180
|
+
*/
|
|
2181
|
+
explode: boolean;
|
|
2182
|
+
style: T;
|
|
2183
|
+
}
|
|
2184
|
+
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
2185
|
+
type ObjectStyle = 'form' | 'deepObject';
|
|
2186
|
+
|
|
2187
|
+
type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
2188
|
+
type BodySerializer = (body: unknown) => unknown;
|
|
2189
|
+
type QuerySerializerOptionsObject = {
|
|
2190
|
+
allowReserved?: boolean;
|
|
2191
|
+
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
2192
|
+
object?: Partial<SerializerOptions<ObjectStyle>>;
|
|
2193
|
+
};
|
|
2194
|
+
type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
2195
|
+
/**
|
|
2196
|
+
* Per-parameter serialization overrides. When provided, these settings
|
|
2197
|
+
* override the global array/object settings for specific parameter names.
|
|
2198
|
+
*/
|
|
2199
|
+
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
2200
|
+
};
|
|
2201
|
+
|
|
2202
|
+
type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
2203
|
+
type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
2204
|
+
/**
|
|
2205
|
+
* Returns the final request URL.
|
|
2206
|
+
*/
|
|
2207
|
+
buildUrl: BuildUrlFn;
|
|
2208
|
+
getConfig: () => Config;
|
|
2209
|
+
request: RequestFn;
|
|
2210
|
+
setConfig: (config: Config) => Config;
|
|
2211
|
+
} & {
|
|
2212
|
+
[K in HttpMethod]: MethodFn;
|
|
2213
|
+
} & ([SseFn] extends [never] ? {
|
|
2214
|
+
sse?: never;
|
|
2215
|
+
} : {
|
|
2216
|
+
sse: {
|
|
2217
|
+
[K in HttpMethod]: SseFn;
|
|
2218
|
+
};
|
|
2219
|
+
});
|
|
2220
|
+
interface Config$1 {
|
|
2221
|
+
/**
|
|
2222
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
2223
|
+
* added to the request payload as defined by its `security` array.
|
|
2224
|
+
*/
|
|
2225
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
2226
|
+
/**
|
|
2227
|
+
* A function for serializing request body parameter. By default,
|
|
2228
|
+
* {@link JSON.stringify()} will be used.
|
|
2229
|
+
*/
|
|
2230
|
+
bodySerializer?: BodySerializer | null;
|
|
2231
|
+
/**
|
|
2232
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
2233
|
+
* `Headers` object with.
|
|
2234
|
+
*
|
|
2235
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
2236
|
+
*/
|
|
2237
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
2238
|
+
/**
|
|
2239
|
+
* The request method.
|
|
2240
|
+
*
|
|
2241
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
2242
|
+
*/
|
|
2243
|
+
method?: Uppercase<HttpMethod>;
|
|
2244
|
+
/**
|
|
2245
|
+
* A function for serializing request query parameters. By default, arrays
|
|
2246
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
2247
|
+
* style, and reserved characters are percent-encoded.
|
|
2248
|
+
*
|
|
2249
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
2250
|
+
* API function is used.
|
|
2251
|
+
*
|
|
2252
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
2253
|
+
*/
|
|
2254
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
2255
|
+
/**
|
|
2256
|
+
* A function validating request data. This is useful if you want to ensure
|
|
2257
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
2258
|
+
* the server.
|
|
2259
|
+
*/
|
|
2260
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
2261
|
+
/**
|
|
2262
|
+
* A function transforming response data before it's returned. This is useful
|
|
2263
|
+
* for post-processing data, e.g., converting ISO strings into Date objects.
|
|
2264
|
+
*/
|
|
2265
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
2266
|
+
/**
|
|
2267
|
+
* A function validating response data. This is useful if you want to ensure
|
|
2268
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
2269
|
+
* the transformers and returned to the user.
|
|
2270
|
+
*/
|
|
2271
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
2275
|
+
*/
|
|
2276
|
+
interface ClientMeta {
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
2280
|
+
/**
|
|
2281
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
2282
|
+
* fetch instance.
|
|
2283
|
+
*
|
|
2284
|
+
* @default globalThis.fetch
|
|
2285
|
+
*/
|
|
2286
|
+
fetch?: typeof fetch;
|
|
2287
|
+
/**
|
|
2288
|
+
* Implementing clients can call request interceptors inside this hook.
|
|
2289
|
+
*/
|
|
2290
|
+
onRequest?: (url: string, init: RequestInit) => Promise<Request>;
|
|
2291
|
+
/**
|
|
2292
|
+
* Callback invoked when a network or parsing error occurs during streaming.
|
|
2293
|
+
*
|
|
2294
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
2295
|
+
*
|
|
2296
|
+
* @param error The error that occurred.
|
|
2297
|
+
*/
|
|
2298
|
+
onSseError?: (error: unknown) => void;
|
|
2299
|
+
/**
|
|
2300
|
+
* Callback invoked when an event is streamed from the server.
|
|
2301
|
+
*
|
|
2302
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
2303
|
+
*
|
|
2304
|
+
* @param event Event streamed from the server.
|
|
2305
|
+
* @returns Nothing (void).
|
|
2306
|
+
*/
|
|
2307
|
+
onSseEvent?: (event: StreamEvent<TData>) => void;
|
|
2308
|
+
serializedBody?: RequestInit['body'];
|
|
2309
|
+
/**
|
|
2310
|
+
* Default retry delay in milliseconds.
|
|
2311
|
+
*
|
|
2312
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
2313
|
+
*
|
|
2314
|
+
* @default 3000
|
|
2315
|
+
*/
|
|
2316
|
+
sseDefaultRetryDelay?: number;
|
|
2317
|
+
/**
|
|
2318
|
+
* Maximum number of retry attempts before giving up.
|
|
2319
|
+
*/
|
|
2320
|
+
sseMaxRetryAttempts?: number;
|
|
2321
|
+
/**
|
|
2322
|
+
* Maximum retry delay in milliseconds.
|
|
2323
|
+
*
|
|
2324
|
+
* Applies only when exponential backoff is used.
|
|
2325
|
+
*
|
|
2326
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
2327
|
+
*
|
|
2328
|
+
* @default 30000
|
|
2329
|
+
*/
|
|
2330
|
+
sseMaxRetryDelay?: number;
|
|
2331
|
+
/**
|
|
2332
|
+
* Optional sleep function for retry backoff.
|
|
2333
|
+
*
|
|
2334
|
+
* Defaults to using `setTimeout`.
|
|
2335
|
+
*/
|
|
2336
|
+
sseSleepFn?: (ms: number) => Promise<void>;
|
|
2337
|
+
url: string;
|
|
2338
|
+
};
|
|
2339
|
+
interface StreamEvent<TData = unknown> {
|
|
2340
|
+
data: TData;
|
|
2341
|
+
event?: string;
|
|
2342
|
+
id?: string;
|
|
2343
|
+
retry?: number;
|
|
2344
|
+
}
|
|
2345
|
+
type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
|
|
2346
|
+
stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
|
|
2347
|
+
};
|
|
2348
|
+
|
|
2349
|
+
type ErrInterceptor<Err, Res, Req, Options> = (error: Err,
|
|
2350
|
+
/** response may be undefined due to a network error where no response object is produced */
|
|
2351
|
+
response: Res | undefined,
|
|
2352
|
+
/** request may be undefined, because error may be from building the request object itself */
|
|
2353
|
+
request: Req | undefined, options: Options) => Err | Promise<Err>;
|
|
2354
|
+
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
2355
|
+
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
2356
|
+
declare class Interceptors<Interceptor> {
|
|
2357
|
+
fns: Array<Interceptor | null>;
|
|
2358
|
+
clear(): void;
|
|
2359
|
+
eject(id: number | Interceptor): void;
|
|
2360
|
+
exists(id: number | Interceptor): boolean;
|
|
2361
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
2362
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
2363
|
+
use(fn: Interceptor): number;
|
|
2364
|
+
}
|
|
2365
|
+
interface Middleware<Req, Res, Err, Options> {
|
|
2366
|
+
error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
|
|
2367
|
+
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
2368
|
+
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
type ResponseStyle = 'data' | 'fields';
|
|
2372
|
+
interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
2373
|
+
/**
|
|
2374
|
+
* Base URL for all requests made by this client.
|
|
2375
|
+
*/
|
|
2376
|
+
baseUrl?: T['baseUrl'];
|
|
2377
|
+
/**
|
|
2378
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
2379
|
+
* fetch instance.
|
|
2380
|
+
*
|
|
2381
|
+
* @default globalThis.fetch
|
|
2382
|
+
*/
|
|
2383
|
+
fetch?: typeof fetch;
|
|
2384
|
+
/**
|
|
2385
|
+
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
2386
|
+
* options won't have any effect.
|
|
2387
|
+
*
|
|
2388
|
+
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
2389
|
+
*/
|
|
2390
|
+
next?: never;
|
|
2391
|
+
/**
|
|
2392
|
+
* Return the response data parsed in a specified format. By default, `auto`
|
|
2393
|
+
* will infer the appropriate method from the `Content-Type` response header.
|
|
2394
|
+
* You can override this behavior with any of the {@link Body} methods.
|
|
2395
|
+
* Select `stream` if you don't want to parse response data at all.
|
|
2396
|
+
*
|
|
2397
|
+
* @default 'auto'
|
|
2398
|
+
*/
|
|
2399
|
+
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
2400
|
+
/**
|
|
2401
|
+
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
2402
|
+
*
|
|
2403
|
+
* @default 'fields'
|
|
2404
|
+
*/
|
|
2405
|
+
responseStyle?: ResponseStyle;
|
|
2406
|
+
/**
|
|
2407
|
+
* Throw an error instead of returning it in the response?
|
|
2408
|
+
*
|
|
2409
|
+
* @default false
|
|
2410
|
+
*/
|
|
2411
|
+
throwOnError?: T['throwOnError'];
|
|
2412
|
+
}
|
|
2413
|
+
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
2414
|
+
responseStyle: TResponseStyle;
|
|
2415
|
+
throwOnError: ThrowOnError;
|
|
2416
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
2417
|
+
/**
|
|
2418
|
+
* Any body that you want to add to your request.
|
|
2419
|
+
*
|
|
2420
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
2421
|
+
*/
|
|
2422
|
+
body?: unknown;
|
|
2423
|
+
path?: Record<string, unknown>;
|
|
2424
|
+
query?: Record<string, unknown>;
|
|
2425
|
+
/**
|
|
2426
|
+
* Security mechanism(s) to use for the request.
|
|
2427
|
+
*/
|
|
2428
|
+
security?: ReadonlyArray<Auth>;
|
|
2429
|
+
url: Url;
|
|
2430
|
+
}
|
|
2431
|
+
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
2432
|
+
headers: Headers;
|
|
2433
|
+
serializedBody?: string;
|
|
2434
|
+
}
|
|
2435
|
+
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
2436
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
2437
|
+
request: Request;
|
|
2438
|
+
response: Response;
|
|
2439
|
+
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
2440
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
2441
|
+
error: undefined;
|
|
2442
|
+
} | {
|
|
2443
|
+
data: undefined;
|
|
2444
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
2445
|
+
}) & {
|
|
2446
|
+
/** request may be undefined, because error may be from building the request object itself */
|
|
2447
|
+
request?: Request;
|
|
2448
|
+
/** response may be undefined, because error may be from building the request object itself or from a network error */
|
|
2449
|
+
response?: Response;
|
|
2450
|
+
}>;
|
|
2451
|
+
interface ClientOptions {
|
|
2452
|
+
baseUrl?: string;
|
|
2453
|
+
responseStyle?: ResponseStyle;
|
|
2454
|
+
throwOnError?: boolean;
|
|
2455
|
+
}
|
|
2456
|
+
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
2457
|
+
type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
|
|
2458
|
+
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
2459
|
+
type BuildUrlFn = <TData extends {
|
|
2460
|
+
body?: unknown;
|
|
2461
|
+
path?: Record<string, unknown>;
|
|
2462
|
+
query?: Record<string, unknown>;
|
|
2463
|
+
url: string;
|
|
2464
|
+
}>(options: TData & Options$1<TData>) => string;
|
|
2465
|
+
type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
2466
|
+
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
2467
|
+
};
|
|
2468
|
+
interface TDataShape {
|
|
2469
|
+
body?: unknown;
|
|
2470
|
+
headers?: unknown;
|
|
2471
|
+
path?: unknown;
|
|
2472
|
+
query?: unknown;
|
|
2473
|
+
url: string;
|
|
2474
|
+
}
|
|
2475
|
+
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
2476
|
+
type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
2477
|
+
|
|
2478
|
+
/**
|
|
2479
|
+
* USB/IP passthrough, the two HTTP calls that precede the tunnel.
|
|
2480
|
+
*
|
|
2481
|
+
* Hand-written, unlike every other operation here: these endpoints are
|
|
2482
|
+
* deliberately absent from the published spec (`api/v1/DESIGN.md` scopes the
|
|
2483
|
+
* public API to backend integration), so there is nothing to generate from.
|
|
2484
|
+
* They stay in the SDK anyway to keep bearer auth, retries and typed errors in
|
|
2485
|
+
* one client.
|
|
2486
|
+
*
|
|
2487
|
+
* The shapes below must therefore be kept in step with the server by hand —
|
|
2488
|
+
* `app/controllers/usbip_controller.ts` and `#types/usb_manifest`.
|
|
2489
|
+
*/
|
|
2490
|
+
|
|
2491
|
+
/** One VID:PID a peripheral can present. Four lowercase hex digits each. */
|
|
2492
|
+
interface UsbDeviceIdentifier {
|
|
2493
|
+
vid: string;
|
|
2494
|
+
pid: string;
|
|
2495
|
+
}
|
|
2496
|
+
/**
|
|
2497
|
+
* One entry of a device type's USB manifest, a peripheral the device is
|
|
2498
|
+
* *permitted* to export. This is the declared allowlist, not a live bus scan:
|
|
2499
|
+
* an entry here may still be unplugged.
|
|
2500
|
+
*/
|
|
2501
|
+
interface UsbExportDefinition {
|
|
2502
|
+
/** Stable key for this entry, used in the UI and the audit trail. */
|
|
2503
|
+
key: string;
|
|
2504
|
+
/** Human-readable label (e.g. `SEGGER J-Link`). */
|
|
2505
|
+
label: string;
|
|
2506
|
+
/**
|
|
2507
|
+
* Every VID:PID this peripheral can present. A product id is per *mode*, so
|
|
2508
|
+
* an entry lists each mode the peripheral may legitimately appear in.
|
|
2509
|
+
*/
|
|
2510
|
+
ids: UsbDeviceIdentifier[];
|
|
2511
|
+
/**
|
|
2512
|
+
* Restrict to specific physical units by USB serial. VID:PID identifies a
|
|
2513
|
+
* *model*, so leaving this unset allows any unit of it.
|
|
2514
|
+
*/
|
|
2515
|
+
serials?: string[];
|
|
2516
|
+
description?: string;
|
|
2517
|
+
}
|
|
2518
|
+
interface UsbExportList {
|
|
2519
|
+
exports: UsbExportDefinition[];
|
|
2520
|
+
}
|
|
2521
|
+
interface UsbTicketRequest {
|
|
2522
|
+
deviceId: string;
|
|
2523
|
+
/** Four hex digits, as sysfs reports it (`1366`). */
|
|
2524
|
+
vid: string;
|
|
2525
|
+
/** Four hex digits (`1020`). */
|
|
2526
|
+
pid: string;
|
|
2527
|
+
/** Required when the device type pins serials, or to disambiguate units. */
|
|
2528
|
+
serial?: string;
|
|
2529
|
+
}
|
|
2530
|
+
interface UsbTicketResponse {
|
|
2531
|
+
/** Single-use, short-lived. Redeemed once on the `/ws/usbip` upgrade. */
|
|
2532
|
+
ticket: string;
|
|
2533
|
+
/** The manifest entry the request matched, what the ticket authorizes. */
|
|
2534
|
+
export: UsbExportDefinition;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
/**
|
|
2538
|
+
* Device shell: the one HTTP call that precedes the WebSocket session.
|
|
2539
|
+
*
|
|
2540
|
+
* Hand-written for the same reason as `usb.ts`. These endpoints are
|
|
2541
|
+
* deliberately absent from the published spec (`api/v1/DESIGN.md` scopes the
|
|
2542
|
+
* public API to backend integration), so there is nothing to generate from.
|
|
2543
|
+
* They stay in the SDK anyway to keep bearer auth, retries and typed errors in
|
|
2544
|
+
* one client.
|
|
2545
|
+
*
|
|
2546
|
+
* The shape below is kept in step with
|
|
2547
|
+
* `app/controllers/v1/terminal_controller.ts` by hand.
|
|
2548
|
+
*/
|
|
2549
|
+
|
|
2550
|
+
interface TerminalTicketRequest {
|
|
2551
|
+
deviceId: string;
|
|
2552
|
+
}
|
|
2553
|
+
interface TerminalTicketResponse {
|
|
2554
|
+
/** Single-use and short-lived. Redeemed once on the `/ws/terminal` upgrade. */
|
|
2555
|
+
ticket: string;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
interface OrbitClientOptions {
|
|
2559
|
+
/** Personal access token (`oat_…`) created in the dashboard at Account → API tokens. */
|
|
2560
|
+
token: string;
|
|
2561
|
+
/** API origin. Defaults to `https://orbit.omirion.com`. */
|
|
2562
|
+
baseUrl?: string;
|
|
2563
|
+
/** Max automatic retries for 429/502/503/504 and network errors. Default `2`. */
|
|
2564
|
+
maxRetries?: number;
|
|
2565
|
+
/** Base exponential-backoff delay in milliseconds. Default `500`. */
|
|
2566
|
+
retryBaseDelayMs?: number;
|
|
2567
|
+
/** Custom `fetch` implementation (e.g. for tests or non-standard runtimes). */
|
|
2568
|
+
fetch?: typeof fetch;
|
|
2569
|
+
}
|
|
2570
|
+
interface ListProjectsParams {
|
|
2571
|
+
/** Restrict to one organisation. Narrows the reachable set, never widens it. */
|
|
2572
|
+
organizationId?: string;
|
|
2573
|
+
limit?: number;
|
|
2574
|
+
cursor?: string;
|
|
2575
|
+
}
|
|
2576
|
+
interface IterateProjectsParams {
|
|
2577
|
+
organizationId?: string;
|
|
2578
|
+
limit?: number;
|
|
2579
|
+
}
|
|
2580
|
+
interface ListDeviceTypesParams {
|
|
2581
|
+
/** Exact slug to filter to. */
|
|
2582
|
+
slug?: string;
|
|
2583
|
+
limit?: number;
|
|
2584
|
+
cursor?: string;
|
|
2585
|
+
}
|
|
2586
|
+
interface IterateDeviceTypesParams {
|
|
2587
|
+
slug?: string;
|
|
2588
|
+
limit?: number;
|
|
2589
|
+
}
|
|
2590
|
+
interface ListDevicesParams {
|
|
2591
|
+
/** Restrict to one project (must be in this token's scope). */
|
|
2592
|
+
projectId?: string;
|
|
2593
|
+
/** Filter to the device with this exact hardware fingerprint (e.g. modem IMEI). */
|
|
2594
|
+
fingerprint?: string;
|
|
2595
|
+
/** Filter to devices whose device type carries this exact slug. */
|
|
2596
|
+
deviceTypeSlug?: string;
|
|
2597
|
+
limit?: number;
|
|
2598
|
+
cursor?: string;
|
|
2599
|
+
status?: 'online' | 'offline';
|
|
2600
|
+
}
|
|
2601
|
+
interface IterateDevicesParams {
|
|
2602
|
+
projectId?: string;
|
|
2603
|
+
fingerprint?: string;
|
|
2604
|
+
deviceTypeSlug?: string;
|
|
2605
|
+
limit?: number;
|
|
2606
|
+
status?: 'online' | 'offline';
|
|
2607
|
+
}
|
|
2608
|
+
type AdmissionStatus = Admission['status'];
|
|
2609
|
+
type DeploymentStatus = FirmwareDeployment['status'];
|
|
2610
|
+
interface ListAdmissionsParams {
|
|
2611
|
+
/** Restrict to one project (must be in this token's scope). */
|
|
2612
|
+
projectId?: string;
|
|
2613
|
+
/** Filter to the request raised by this exact hardware fingerprint. */
|
|
2614
|
+
fingerprint?: string;
|
|
2615
|
+
status?: AdmissionStatus;
|
|
2616
|
+
limit?: number;
|
|
2617
|
+
cursor?: string;
|
|
2618
|
+
}
|
|
2619
|
+
interface IterateAdmissionsParams {
|
|
2620
|
+
projectId?: string;
|
|
2621
|
+
fingerprint?: string;
|
|
2622
|
+
status?: AdmissionStatus;
|
|
2623
|
+
limit?: number;
|
|
2624
|
+
}
|
|
2625
|
+
interface ListDeploymentsParams {
|
|
2626
|
+
deviceId?: string;
|
|
2627
|
+
bundleId?: string;
|
|
2628
|
+
status?: DeploymentStatus;
|
|
2629
|
+
limit?: number;
|
|
2630
|
+
cursor?: string;
|
|
2631
|
+
}
|
|
2632
|
+
interface IterateDeploymentsParams {
|
|
2633
|
+
deviceId?: string;
|
|
2634
|
+
bundleId?: string;
|
|
2635
|
+
status?: DeploymentStatus;
|
|
2636
|
+
limit?: number;
|
|
2637
|
+
}
|
|
2638
|
+
interface TelemetryHistoryParams {
|
|
2639
|
+
/** Window size in hours (1–168). Defaults to the server default (6). */
|
|
2640
|
+
hours?: number;
|
|
2641
|
+
}
|
|
2642
|
+
interface ListBundlesParams {
|
|
2643
|
+
/** Restrict to one project (must be in this token's scope). */
|
|
2644
|
+
projectId?: string;
|
|
2645
|
+
/** Exact hardware target, as recorded on the bundle (e.g. `cm5-gateway`). */
|
|
2646
|
+
compatible?: string;
|
|
2647
|
+
/** Case-insensitive substring of the bundle version (e.g. `0.10`). */
|
|
2648
|
+
version?: string;
|
|
2649
|
+
limit?: number;
|
|
2650
|
+
cursor?: string;
|
|
2651
|
+
}
|
|
2652
|
+
interface IterateBundlesParams {
|
|
2653
|
+
projectId?: string;
|
|
2654
|
+
compatible?: string;
|
|
2655
|
+
version?: string;
|
|
2656
|
+
limit?: number;
|
|
2657
|
+
}
|
|
2658
|
+
interface UploadFirmwareParams {
|
|
2659
|
+
/** The bundle file: `.raucb` for `kind: 'rauc'`, `.bin` for `kind: 'mcuboot'`. */
|
|
2660
|
+
file: Blob | File;
|
|
2661
|
+
/** Target project. Must be in this token's scope. */
|
|
2662
|
+
projectId: string;
|
|
2663
|
+
/** Bundle kind. Defaults to `rauc` when omitted. */
|
|
2664
|
+
kind?: 'rauc' | 'mcuboot';
|
|
2665
|
+
/**
|
|
2666
|
+
* Bundle version. Decoded from the binary (RAUC manifest, MCUboot image
|
|
2667
|
+
* header) and ignored if sent.
|
|
2668
|
+
*/
|
|
2669
|
+
version?: string;
|
|
2670
|
+
/**
|
|
2671
|
+
* Hardware target. Optional for `rauc`, where it is decoded from the
|
|
2672
|
+
* manifest; **required for `mcuboot`**, whose header has no target field.
|
|
2673
|
+
*/
|
|
2674
|
+
compatible?: string;
|
|
2675
|
+
description?: string | null;
|
|
2676
|
+
}
|
|
2677
|
+
interface CancelDeploymentParams {
|
|
2678
|
+
/**
|
|
2679
|
+
* Abort a deployment already in flight (`downloading` / `installing`), where
|
|
2680
|
+
* the device may be partway through an install. Required for those states,
|
|
2681
|
+
* and recorded on the deployment.
|
|
2682
|
+
*/
|
|
2683
|
+
force?: boolean;
|
|
2684
|
+
}
|
|
2685
|
+
interface RollbackDeploymentParams {
|
|
2686
|
+
/** Free text recorded on the rollback row and echoed to the device. */
|
|
2687
|
+
reason?: string;
|
|
2688
|
+
}
|
|
2689
|
+
interface ListWebhooksParams {
|
|
2690
|
+
/** Restrict to one project (must be in this token's scope). */
|
|
2691
|
+
projectId?: string;
|
|
2692
|
+
limit?: number;
|
|
2693
|
+
cursor?: string;
|
|
2694
|
+
}
|
|
2695
|
+
interface IterateWebhooksParams {
|
|
2696
|
+
projectId?: string;
|
|
2697
|
+
limit?: number;
|
|
2698
|
+
}
|
|
2699
|
+
interface WebhookDeliveriesParams {
|
|
2700
|
+
status?: 'pending' | 'delivered' | 'failed';
|
|
2701
|
+
limit?: number;
|
|
2702
|
+
cursor?: string;
|
|
2703
|
+
}
|
|
2704
|
+
interface IterateWebhookDeliveriesParams {
|
|
2705
|
+
status?: 'pending' | 'delivered' | 'failed';
|
|
2706
|
+
limit?: number;
|
|
2707
|
+
}
|
|
2708
|
+
/**
|
|
2709
|
+
* The ergonomic entry point to the Omirion Orbit public API. Wraps the
|
|
2710
|
+
* generated transport client with bearer auth, automatic retries with backoff,
|
|
2711
|
+
* typed errors, response unwrapping, and cursor auto-pagination.
|
|
2712
|
+
*
|
|
2713
|
+
* ```ts
|
|
2714
|
+
* const orbit = new OrbitClient({ token: process.env.ORBIT_TOKEN! })
|
|
2715
|
+
* for await (const device of orbit.devices.iterate({ status: 'online' })) {
|
|
2716
|
+
* const sample = await orbit.telemetry.latest(device.id)
|
|
2717
|
+
* }
|
|
2718
|
+
* ```
|
|
2719
|
+
*/
|
|
2720
|
+
declare class OrbitClient {
|
|
2721
|
+
#private;
|
|
2722
|
+
/**
|
|
2723
|
+
* Who this token authenticates as, what it may do, and which projects it
|
|
2724
|
+
* reaches. Requires no ability, the cheapest way to verify a token works.
|
|
2725
|
+
*/
|
|
2726
|
+
readonly me: () => Promise<Identity>;
|
|
2727
|
+
/**
|
|
2728
|
+
* Projects as a resource. Requires `api:projects:read`; {@link me} returns
|
|
2729
|
+
* the same ids under no ability.
|
|
2730
|
+
*/
|
|
2731
|
+
readonly projects: {
|
|
2732
|
+
/** A single page of projects. */
|
|
2733
|
+
list: (params?: ListProjectsParams) => Promise<ProjectListPage>;
|
|
2734
|
+
/** Every project across all pages, fetched lazily. */
|
|
2735
|
+
iterate: (params?: IterateProjectsParams) => AsyncGenerator<Project, void, unknown>;
|
|
2736
|
+
/** A project by id. */
|
|
2737
|
+
get: (id: string) => Promise<Project>;
|
|
2738
|
+
/**
|
|
2739
|
+
* Provisioning (app) token. `token` is returned once and never again, so
|
|
2740
|
+
* persist it from this result rather than expecting to read it back.
|
|
2741
|
+
*/
|
|
2742
|
+
appToken: {
|
|
2743
|
+
/** Mint the token. Rejects with 409 when the project already has one. */
|
|
2744
|
+
create: (projectId: string) => Promise<ProjectAppToken>;
|
|
2745
|
+
/**
|
|
2746
|
+
* Replace the token, invalidating the previous one. Units still carrying
|
|
2747
|
+
* the old value can no longer enrol; already-provisioned devices hold
|
|
2748
|
+
* their own device token and are unaffected.
|
|
2749
|
+
*/
|
|
2750
|
+
rotate: (projectId: string) => Promise<ProjectAppToken>;
|
|
2751
|
+
};
|
|
2752
|
+
};
|
|
2753
|
+
/**
|
|
2754
|
+
* Device types: the models a fleet identifies as. Reads need
|
|
2755
|
+
* `api:devices:read`; writes need `api:device-types:manage`.
|
|
2756
|
+
*/
|
|
2757
|
+
readonly deviceTypes: {
|
|
2758
|
+
/** A single page of device types in a project (counts, not manifests). */
|
|
2759
|
+
list: (projectId: string, params?: ListDeviceTypesParams) => Promise<DeviceTypeListPage>;
|
|
2760
|
+
/** Every device type in a project across all pages, fetched lazily. */
|
|
2761
|
+
iterate: (projectId: string, params?: IterateDeviceTypesParams) => AsyncGenerator<DeviceTypeListPage['data'][number], void, unknown>;
|
|
2762
|
+
/** One device type by slug, with its manifests in full. */
|
|
2763
|
+
get: (projectId: string, slug: string) => Promise<DeviceType>;
|
|
2764
|
+
/** Declare a device type. Rejects with 409 when the slug is taken. */
|
|
2765
|
+
create: (projectId: string, body: DeviceTypeCreateRequest) => Promise<DeviceType>;
|
|
2766
|
+
/** Partial update. A manifest sent here replaces the stored one wholesale. */
|
|
2767
|
+
update: (projectId: string, slug: string, body: DeviceTypeUpdateRequest) => Promise<DeviceType>;
|
|
2768
|
+
/** Delete a type no device uses. Rejects with 409 while devices still reference it. */
|
|
2769
|
+
delete: (projectId: string, slug: string) => Promise<void>;
|
|
2770
|
+
};
|
|
2771
|
+
readonly devices: {
|
|
2772
|
+
/** A single page of devices. */
|
|
2773
|
+
list: (params?: ListDevicesParams) => Promise<DeviceListPage>;
|
|
2774
|
+
/** A device by id. */
|
|
2775
|
+
get: (id: string) => Promise<Device>;
|
|
2776
|
+
/** Every device across all pages, fetched lazily. */
|
|
2777
|
+
iterate: (params?: IterateDevicesParams) => AsyncGenerator<DeviceListItem, void, unknown>;
|
|
2778
|
+
/** Permanently delete a device (releases its licensing seat; evicts the live agent). */
|
|
2779
|
+
delete: (id: string) => Promise<void>;
|
|
2780
|
+
/**
|
|
2781
|
+
* Rotate the device token in place, keeping the device and its history.
|
|
2782
|
+
* The new token is returned once and cannot be retrieved again.
|
|
2783
|
+
*/
|
|
2784
|
+
resetToken: (id: string) => Promise<DeviceTokenReset>;
|
|
2785
|
+
};
|
|
2786
|
+
readonly admissions: {
|
|
2787
|
+
/** A single page of admission (fleet-join) requests. */
|
|
2788
|
+
list: (params?: ListAdmissionsParams) => Promise<AdmissionListPage>;
|
|
2789
|
+
/** Every admission across all pages, fetched lazily. */
|
|
2790
|
+
iterate: (params?: IterateAdmissionsParams) => AsyncGenerator<Admission, void, unknown>;
|
|
2791
|
+
/** An admission request by id. */
|
|
2792
|
+
get: (id: string) => Promise<Admission>;
|
|
2793
|
+
/** Accept a pending admission, provisioning a device (returns admission + device). */
|
|
2794
|
+
accept: (id: string, params: AdmissionAcceptRequest) => Promise<AdmissionAcceptResponse>;
|
|
2795
|
+
/** Reject a pending admission permanently. */
|
|
2796
|
+
reject: (id: string) => Promise<Admission>;
|
|
2797
|
+
/**
|
|
2798
|
+
* Dismiss a pending admission without provisioning and without a permanent
|
|
2799
|
+
* refusal: the request reopens as `pending` when the same fingerprint next
|
|
2800
|
+
* asks to enrol.
|
|
2801
|
+
*/
|
|
2802
|
+
dismiss: (id: string) => Promise<Admission>;
|
|
2803
|
+
};
|
|
2804
|
+
readonly telemetry: {
|
|
2805
|
+
/** Most recent sample for a device, or `null` if it never reported. */
|
|
2806
|
+
latest: (deviceId: string) => Promise<TelemetrySample | null>;
|
|
2807
|
+
/** A time-window of samples (ascending). */
|
|
2808
|
+
history: (deviceId: string, params?: TelemetryHistoryParams) => Promise<TelemetrySample[]>;
|
|
2809
|
+
/** Metric manifest of a device's type, or `null` if it has none. */
|
|
2810
|
+
manifest: (deviceId: string) => Promise<TelemetryManifest | null>;
|
|
2811
|
+
};
|
|
2812
|
+
readonly firmware: {
|
|
2813
|
+
/** Upload a RAUC bundle; returns the stored bundle. */
|
|
2814
|
+
upload: (params: UploadFirmwareParams) => Promise<FirmwareBundle>;
|
|
2815
|
+
/** Delete a bundle (refused while it has an in-flight deployment). */
|
|
2816
|
+
deleteBundle: (id: string) => Promise<void>;
|
|
2817
|
+
bundles: {
|
|
2818
|
+
/** A single page of bundles. */
|
|
2819
|
+
list: (params?: ListBundlesParams) => Promise<FirmwareBundleListPage>;
|
|
2820
|
+
/** Every bundle across all pages, fetched lazily. */
|
|
2821
|
+
iterate: (params?: IterateBundlesParams) => AsyncGenerator<FirmwareBundle, void, unknown>;
|
|
2822
|
+
/** A bundle by id. */
|
|
2823
|
+
get: (id: string) => Promise<FirmwareBundle>;
|
|
2824
|
+
};
|
|
2825
|
+
deployments: {
|
|
2826
|
+
/** Roll a bundle out to devices; returns one deployment per device. */
|
|
2827
|
+
trigger: (params: FirmwareDeploymentTriggerRequest) => Promise<FirmwareDeployment[]>;
|
|
2828
|
+
/** A single page of deployments. */
|
|
2829
|
+
list: (params?: ListDeploymentsParams) => Promise<FirmwareDeploymentListPage>;
|
|
2830
|
+
/** Every deployment across all pages, fetched lazily. */
|
|
2831
|
+
iterate: (params?: IterateDeploymentsParams) => AsyncGenerator<FirmwareDeployment, void, unknown>;
|
|
2832
|
+
/** A deployment by id. Poll it to follow a rollout. */
|
|
2833
|
+
get: (id: string) => Promise<FirmwareDeployment>;
|
|
2834
|
+
/**
|
|
2835
|
+
* Cancel a deployment. A `pending` one cancels with no flag; one already
|
|
2836
|
+
* in flight needs `force`. A terminal one throws `ConflictError`.
|
|
2837
|
+
*/
|
|
2838
|
+
cancel: (id: string, params?: CancelDeploymentParams) => Promise<FirmwareDeployment>;
|
|
2839
|
+
/**
|
|
2840
|
+
* Roll back a `succeeded` deployment's device to its previous firmware.
|
|
2841
|
+
* Returns a *new* deployment (not the source one), so poll it the same
|
|
2842
|
+
* way as a forward rollout. Throws `ConflictError` if the source deployment
|
|
2843
|
+
* is not `succeeded`, or `ValidationError` if the rollback could not be
|
|
2844
|
+
* dispatched (device offline, delivery failed, or unsupported by the
|
|
2845
|
+
* device type).
|
|
2846
|
+
*/
|
|
2847
|
+
rollback: (id: string, params?: RollbackDeploymentParams) => Promise<FirmwareDeployment>;
|
|
2848
|
+
};
|
|
2849
|
+
};
|
|
2850
|
+
readonly commands: {
|
|
2851
|
+
/**
|
|
2852
|
+
* Run a declared command on a device (name + typed args, no shell).
|
|
2853
|
+
*
|
|
2854
|
+
* Branch on `queued`: `false` means the device ran it and the result fields
|
|
2855
|
+
* are populated; `true` means it was accepted for store-and-forward
|
|
2856
|
+
* delivery, so poll {@link OrbitClient.commands.get} until `status` is
|
|
2857
|
+
* terminal.
|
|
2858
|
+
*/
|
|
2859
|
+
exec: (deviceId: string, command: CommandRequest) => Promise<CommandResult>;
|
|
2860
|
+
/** The durable record of one invocation, the pull path for a queued dispatch. */
|
|
2861
|
+
get: (deviceId: string, invocationId: string) => Promise<CommandInvocation>;
|
|
2862
|
+
/** The command manifest of the device's type, or `null` if it declares none. */
|
|
2863
|
+
manifest: (deviceId: string) => Promise<CommandManifest | null>;
|
|
2864
|
+
};
|
|
2865
|
+
/**
|
|
2866
|
+
* USB/IP passthrough. Requires the `api:usb:attach` ability, which grants raw
|
|
2867
|
+
* USB access to whatever hardware is attached to the device, so treat a token
|
|
2868
|
+
* carrying it accordingly.
|
|
2869
|
+
*
|
|
2870
|
+
* Hand-written rather than generated; see `usb.ts` for why.
|
|
2871
|
+
*/
|
|
2872
|
+
readonly usb: {
|
|
2873
|
+
/** What the device's type permits exporting (the declared allowlist). */
|
|
2874
|
+
list: (deviceId: string) => Promise<UsbExportDefinition[]>;
|
|
2875
|
+
/**
|
|
2876
|
+
* Authorize one peripheral and mint a single-use ticket for the tunnel.
|
|
2877
|
+
* Short-lived: open `/ws/usbip` with it promptly or mint another.
|
|
2878
|
+
*/
|
|
2879
|
+
ticket: (params: UsbTicketRequest) => Promise<UsbTicketResponse>;
|
|
2880
|
+
};
|
|
2881
|
+
/**
|
|
2882
|
+
* Device shell. Requires the `api:terminal:open` ability, which is the widest
|
|
2883
|
+
* grant the API offers: the agent runs as root, so the session is a root
|
|
2884
|
+
* shell bounded by no manifest. Treat a token carrying it accordingly.
|
|
2885
|
+
*
|
|
2886
|
+
* Hand-written rather than generated; see `terminal.ts` for why.
|
|
2887
|
+
*/
|
|
2888
|
+
readonly terminal: {
|
|
2889
|
+
/**
|
|
2890
|
+
* Mint a single-use ticket for a shell session. Short-lived: open
|
|
2891
|
+
* `/ws/terminal` with it promptly or mint another.
|
|
2892
|
+
*/
|
|
2893
|
+
ticket: (params: TerminalTicketRequest) => Promise<TerminalTicketResponse>;
|
|
2894
|
+
};
|
|
2895
|
+
readonly webhooks: {
|
|
2896
|
+
/** A single page of webhook subscriptions. */
|
|
2897
|
+
list: (params?: ListWebhooksParams) => Promise<WebhookSubscriptionPage>;
|
|
2898
|
+
/** Every subscription across all pages, fetched lazily. */
|
|
2899
|
+
iterate: (params?: IterateWebhooksParams) => AsyncGenerator<WebhookSubscription, void, unknown>;
|
|
2900
|
+
/** Create a subscription. The signing `secret` is only in this response, store it now. */
|
|
2901
|
+
create: (params: WebhookCreateRequest) => Promise<WebhookCreateResponse>;
|
|
2902
|
+
/** A subscription by id (without its secret). */
|
|
2903
|
+
get: (id: string) => Promise<WebhookSubscription>;
|
|
2904
|
+
/** Update the URL, event-type filter and/or enabled flag. */
|
|
2905
|
+
update: (id: string, params: WebhookUpdateRequest) => Promise<WebhookSubscription>;
|
|
2906
|
+
/** Delete the subscription and its delivery log. */
|
|
2907
|
+
delete: (id: string) => Promise<void>;
|
|
2908
|
+
/** A single page of the subscription's delivery log (newest first). */
|
|
2909
|
+
deliveries: (id: string, params?: WebhookDeliveriesParams) => Promise<WebhookDeliveryPage>;
|
|
2910
|
+
/** Every delivery across all pages, fetched lazily. */
|
|
2911
|
+
iterateDeliveries: (id: string, params?: IterateWebhookDeliveriesParams) => AsyncGenerator<WebhookDelivery, void, unknown>;
|
|
2912
|
+
};
|
|
2913
|
+
constructor(options: OrbitClientOptions);
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
/**
|
|
2917
|
+
* Typed errors. The `/api/v1` surface returns several different error envelope
|
|
2918
|
+
* shapes; {@link normalizeError} folds them all into one typed hierarchy so
|
|
2919
|
+
* callers can `catch` a specific class instead of inspecting status codes:
|
|
2920
|
+
*
|
|
2921
|
+
* - standard `{ errors: [{ code, message, field }] }`
|
|
2922
|
+
* - device-RPC (502) `{ errors: [{ code, message }] }` (no `field`)
|
|
2923
|
+
* - firmware (409) `{ error, message }` (e.g. BUNDLE_ALREADY_EXISTS)
|
|
2924
|
+
* - validation (422) `{ errors: [{ message, rule, field }] }`
|
|
2925
|
+
* - bare auth (401) `{ errors: [{ message }] }` (no `code`)
|
|
2926
|
+
*/
|
|
2927
|
+
interface OrbitErrorOptions {
|
|
2928
|
+
status?: number;
|
|
2929
|
+
code?: string;
|
|
2930
|
+
field?: string | null;
|
|
2931
|
+
body?: unknown;
|
|
2932
|
+
response?: Response;
|
|
2933
|
+
cause?: unknown;
|
|
2934
|
+
}
|
|
2935
|
+
/** Base class for every error thrown by the SDK. */
|
|
2936
|
+
declare class OrbitError extends Error {
|
|
2937
|
+
/** HTTP status, when the failure came from a response. */
|
|
2938
|
+
readonly status?: number;
|
|
2939
|
+
/** Stable machine-readable code (e.g. `E_RESOURCE_NOT_FOUND`), when present. */
|
|
2940
|
+
readonly code?: string;
|
|
2941
|
+
/** Offending field for validation errors, when present. */
|
|
2942
|
+
readonly field?: string | null;
|
|
2943
|
+
/** Raw parsed response body. */
|
|
2944
|
+
readonly body?: unknown;
|
|
2945
|
+
/** The raw `Response`, when one was received. */
|
|
2946
|
+
readonly response?: Response;
|
|
2947
|
+
constructor(message: string, options?: OrbitErrorOptions);
|
|
2948
|
+
}
|
|
2949
|
+
/** 401, missing/invalid/expired/revoked token. */
|
|
2950
|
+
declare class AuthenticationError extends OrbitError {
|
|
2951
|
+
}
|
|
2952
|
+
/** 403, the token is missing the required ability. */
|
|
2953
|
+
declare class InsufficientScopeError extends OrbitError {
|
|
2954
|
+
}
|
|
2955
|
+
/**
|
|
2956
|
+
* 404, resource not found. Note: a 404 on an id you believe exists usually
|
|
2957
|
+
* means it is outside this token's project scope, not that it is truly absent.
|
|
2958
|
+
*/
|
|
2959
|
+
declare class ResourceNotFoundError extends OrbitError {
|
|
2960
|
+
}
|
|
2961
|
+
/** 400, malformed request (bad query param, missing form field, …). */
|
|
2962
|
+
declare class BadRequestError extends OrbitError {
|
|
2963
|
+
}
|
|
2964
|
+
/** One field error inside a 422 envelope. */
|
|
2965
|
+
interface ValidationFieldError {
|
|
2966
|
+
/** The human-readable failure for this field. */
|
|
2967
|
+
message: string;
|
|
2968
|
+
/** Dot path of the offending field (e.g. `manifest.version`), when known. */
|
|
2969
|
+
field: string | null;
|
|
2970
|
+
}
|
|
2971
|
+
/**
|
|
2972
|
+
* 422, request-body validation failed. `fieldErrors` carries every entry of
|
|
2973
|
+
* the envelope (`E_VALIDATION_FAILURE` emits one per field), while `message`
|
|
2974
|
+
* and `field` reflect the first one.
|
|
2975
|
+
*/
|
|
2976
|
+
declare class ValidationError extends OrbitError {
|
|
2977
|
+
readonly fieldErrors: ValidationFieldError[];
|
|
2978
|
+
constructor(message: string, options?: OrbitErrorOptions & {
|
|
2979
|
+
fieldErrors?: ValidationFieldError[];
|
|
2980
|
+
});
|
|
2981
|
+
}
|
|
2982
|
+
/** 409, a firmware bundle with the same projectId+version+compatible exists. */
|
|
2983
|
+
declare class BundleExistsError extends OrbitError {
|
|
2984
|
+
}
|
|
2985
|
+
/** 502, the device is offline or the command transport failed. */
|
|
2986
|
+
declare class DeviceRpcError extends OrbitError {
|
|
2987
|
+
}
|
|
2988
|
+
/** 5xx, an unexpected server error. */
|
|
2989
|
+
declare class ServerError extends OrbitError {
|
|
2990
|
+
}
|
|
2991
|
+
/** The request failed before any response was received (DNS, TLS, offline). */
|
|
2992
|
+
declare class NetworkError extends OrbitError {
|
|
2993
|
+
}
|
|
2994
|
+
/** 429, rate limited. Carries the server's `Retry-After`, when provided. */
|
|
2995
|
+
declare class RateLimitError extends OrbitError {
|
|
2996
|
+
readonly retryAfterSeconds?: number;
|
|
2997
|
+
constructor(message: string, options?: OrbitErrorOptions & {
|
|
2998
|
+
retryAfterSeconds?: number;
|
|
2999
|
+
});
|
|
3000
|
+
}
|
|
3001
|
+
/** Read a numeric `Retry-After` (seconds) from a response, if present. */
|
|
3002
|
+
declare function parseRetryAfterSeconds(response?: Response): number | undefined;
|
|
3003
|
+
/** Map an HTTP status + parsed body into the matching typed error. */
|
|
3004
|
+
declare function normalizeError(status: number, body: unknown, response?: Response): OrbitError;
|
|
3005
|
+
|
|
3006
|
+
/**
|
|
3007
|
+
* A single telemetry reading joined to its manifest definition. Telemetry
|
|
3008
|
+
* samples are keyed by abbreviated, device-type-specific metric keys; the
|
|
3009
|
+
* decoder resolves each key to its human label, unit, and type so callers
|
|
3010
|
+
* don't have to memorise the manifest.
|
|
3011
|
+
*/
|
|
3012
|
+
interface DecodedMetric {
|
|
3013
|
+
/** The raw metric key (snake_case) as stored on the sample. */
|
|
3014
|
+
key: string;
|
|
3015
|
+
/** Human-readable label from the manifest, or the key if not in the manifest. */
|
|
3016
|
+
label: string;
|
|
3017
|
+
/** The reading. */
|
|
3018
|
+
value: number | boolean | string;
|
|
3019
|
+
/** Unit of measurement, when the manifest defines one. */
|
|
3020
|
+
unit?: string;
|
|
3021
|
+
/** Value type from the manifest. */
|
|
3022
|
+
type?: MetricDefinition['type'];
|
|
3023
|
+
/** Semantic device class (Home-Assistant convention), when defined. */
|
|
3024
|
+
deviceClass?: string;
|
|
3025
|
+
/** Group key for UI grouping, when defined. */
|
|
3026
|
+
group?: string;
|
|
3027
|
+
/** The full manifest definition, when the key was found in the manifest. */
|
|
3028
|
+
definition?: MetricDefinition;
|
|
3029
|
+
}
|
|
3030
|
+
/**
|
|
3031
|
+
* Decode a telemetry sample's `metrics` map into labelled rows using the
|
|
3032
|
+
* device type's manifest (from `client.telemetry.manifest(deviceId)`). Keys absent
|
|
3033
|
+
* from the manifest are passed through with the key as the label.
|
|
3034
|
+
*/
|
|
3035
|
+
declare function decodeSample(sample: TelemetrySample, manifest: TelemetryManifest): DecodedMetric[];
|
|
3036
|
+
/** Like {@link decodeSample}, applied to a history window. */
|
|
3037
|
+
declare function decodeSamples(samples: TelemetrySample[], manifest: TelemetryManifest): Array<{
|
|
3038
|
+
recordedAt: string;
|
|
3039
|
+
metrics: DecodedMetric[];
|
|
3040
|
+
}>;
|
|
3041
|
+
|
|
3042
|
+
/** One page of a cursor-paginated list. */
|
|
3043
|
+
interface Page<T> {
|
|
3044
|
+
data: T[];
|
|
3045
|
+
nextCursor: string | null;
|
|
3046
|
+
hasMore: boolean;
|
|
3047
|
+
}
|
|
3048
|
+
/**
|
|
3049
|
+
* Turn a cursor-paginated endpoint into an async iterator that yields every
|
|
3050
|
+
* item across all pages, fetching the next page lazily as you consume it.
|
|
3051
|
+
*
|
|
3052
|
+
* ```ts
|
|
3053
|
+
* for await (const device of paginate((cursor) => fetchPage(cursor))) { … }
|
|
3054
|
+
* ```
|
|
3055
|
+
*/
|
|
3056
|
+
declare function paginate<T>(fetchPage: (cursor?: string) => Promise<Page<T>>): AsyncGenerator<T, void, unknown>;
|
|
3057
|
+
|
|
3058
|
+
/**
|
|
3059
|
+
* Webhook receiver helpers, verify `X-Orbit-Signature` on events pushed by
|
|
3060
|
+
* Orbit's outbound webhooks and parse the JSON envelope.
|
|
3061
|
+
*
|
|
3062
|
+
* The signature is `HMAC-SHA256(secret, `${timestamp}.${rawBody}`)` hex-encoded,
|
|
3063
|
+
* where `timestamp` is the `X-Orbit-Timestamp` header (unix seconds) and
|
|
3064
|
+
* `rawBody` is the exact request body bytes. Receivers should reject events
|
|
3065
|
+
* whose timestamp is more than 300 seconds from their clock (replay window);
|
|
3066
|
+
* Orbit re-signs retries with a fresh timestamp.
|
|
3067
|
+
*
|
|
3068
|
+
* Uses the Web Crypto API, so it works in Node ≥ 18, Deno, Bun, and edge
|
|
3069
|
+
* runtimes alike.
|
|
3070
|
+
*/
|
|
3071
|
+
/** Default replay tolerance, in seconds. */
|
|
3072
|
+
declare const WEBHOOK_REPLAY_TOLERANCE_SECONDS = 300;
|
|
3073
|
+
/** The JSON envelope Orbit POSTs to a webhook endpoint. */
|
|
3074
|
+
interface OrbitWebhookEvent<TData = Record<string, unknown>> {
|
|
3075
|
+
/** Event UUID, the receiver-side idempotency key. */
|
|
3076
|
+
id: string;
|
|
3077
|
+
/** Event type, e.g. `device.online` or `telemetry.metric_changed`. */
|
|
3078
|
+
type: string;
|
|
3079
|
+
/** ISO-8601 emission time. */
|
|
3080
|
+
createdAt: string;
|
|
3081
|
+
/** Project the emitting device belongs to. */
|
|
3082
|
+
projectId: string;
|
|
3083
|
+
/** Event-type-specific payload. */
|
|
3084
|
+
data: TData;
|
|
3085
|
+
}
|
|
3086
|
+
interface VerifyWebhookSignatureParams {
|
|
3087
|
+
/** The subscription's signing secret (`whsec_…`, shown once at creation). */
|
|
3088
|
+
secret: string;
|
|
3089
|
+
/** The EXACT raw request body, do not re-serialize parsed JSON. */
|
|
3090
|
+
rawBody: string;
|
|
3091
|
+
/** `X-Orbit-Signature` header (hex). */
|
|
3092
|
+
signature: string;
|
|
3093
|
+
/** `X-Orbit-Timestamp` header (unix seconds). */
|
|
3094
|
+
timestamp: number | string;
|
|
3095
|
+
/** Replay window in seconds. Defaults to {@link WEBHOOK_REPLAY_TOLERANCE_SECONDS}. */
|
|
3096
|
+
toleranceSeconds?: number;
|
|
3097
|
+
/** Override "now" (unix seconds), mainly for tests. */
|
|
3098
|
+
nowSeconds?: number;
|
|
3099
|
+
}
|
|
3100
|
+
/** Compute the hex HMAC-SHA256 signature over `${timestamp}.${rawBody}`. */
|
|
3101
|
+
declare function signWebhookPayload(secret: string, timestamp: number, rawBody: string): Promise<string>;
|
|
3102
|
+
/**
|
|
3103
|
+
* Verify an Orbit webhook delivery: replay-window check on the timestamp,
|
|
3104
|
+
* then a constant-time comparison of the expected signature.
|
|
3105
|
+
*/
|
|
3106
|
+
declare function verifyWebhookSignature(params: VerifyWebhookSignatureParams): Promise<boolean>;
|
|
3107
|
+
/**
|
|
3108
|
+
* Verify a delivery and parse its envelope in one call. Returns the typed
|
|
3109
|
+
* event, or `null` when the signature (or replay window) check fails.
|
|
3110
|
+
*/
|
|
3111
|
+
declare function parseWebhookEvent<TData = Record<string, unknown>>(params: VerifyWebhookSignatureParams): Promise<OrbitWebhookEvent<TData> | null>;
|
|
3112
|
+
|
|
3113
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
|
|
3114
|
+
/**
|
|
3115
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
3116
|
+
* individual options. This might be also useful if you want to implement a
|
|
3117
|
+
* custom client.
|
|
3118
|
+
*/
|
|
3119
|
+
client?: Client;
|
|
3120
|
+
/**
|
|
3121
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
3122
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
3123
|
+
*/
|
|
3124
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
3125
|
+
};
|
|
3126
|
+
/**
|
|
3127
|
+
* Who this token authenticates as
|
|
3128
|
+
*
|
|
3129
|
+
* Returns the authenticated user, the presented token’s abilities and project scope, and the projects reachable with both. Requires no ability beyond a valid token. Call it to confirm a token works and to discover the `projectId` values other endpoints accept.
|
|
3130
|
+
*/
|
|
3131
|
+
declare const getIdentity: <ThrowOnError extends boolean = false>(options?: Options<GetIdentityData, ThrowOnError>) => RequestResult<GetIdentityResponses, GetIdentityErrors, ThrowOnError>;
|
|
3132
|
+
/**
|
|
3133
|
+
* List projects
|
|
3134
|
+
*
|
|
3135
|
+
* Paginated list of the projects this token reaches (the caller’s organisation access intersected with the token’s project scope). Cursor-based; pass `meta.nextCursor` from the previous page as the `cursor` query parameter.
|
|
3136
|
+
*
|
|
3137
|
+
* Requires `api:projects:read`. Discovering project **ids** alone does not: `GET /api/v1/me` returns them under no ability so a token holding none can still address other endpoints. This endpoint reads the project as a resource, so it is gated and grows independently.
|
|
3138
|
+
*/
|
|
3139
|
+
declare const listProjects: <ThrowOnError extends boolean = false>(options?: Options<ListProjectsData, ThrowOnError>) => RequestResult<ListProjectsResponses, ListProjectsErrors, ThrowOnError>;
|
|
3140
|
+
/**
|
|
3141
|
+
* Get a project
|
|
3142
|
+
*
|
|
3143
|
+
* One project by id. Requires `api:projects:read`. A project outside the token’s reach answers 404 rather than 403, so the refusal does not confirm it exists.
|
|
3144
|
+
*/
|
|
3145
|
+
declare const getProject: <ThrowOnError extends boolean = false>(options: Options<GetProjectData, ThrowOnError>) => RequestResult<GetProjectResponses, GetProjectErrors, ThrowOnError>;
|
|
3146
|
+
/**
|
|
3147
|
+
* Mint the project provisioning (app) token
|
|
3148
|
+
*
|
|
3149
|
+
* Mints the `omr_prj_…` token devices present to enrol into this project. The plaintext value is returned **once, in this response, and is never retrievable again**. The server stores only its sha256. Store it before discarding the response.
|
|
3150
|
+
*
|
|
3151
|
+
* Refuses with 409 when the project already has one; use the rotate endpoint to replace it. Requires `api:projects:manage`, deliberately separate from `api:projects:read`: an app token admits new devices and so consumes licensing seats.
|
|
3152
|
+
*/
|
|
3153
|
+
declare const createProjectAppToken: <ThrowOnError extends boolean = false>(options: Options<CreateProjectAppTokenData, ThrowOnError>) => RequestResult<CreateProjectAppTokenResponses, CreateProjectAppTokenErrors, ThrowOnError>;
|
|
3154
|
+
/**
|
|
3155
|
+
* Rotate the project provisioning (app) token
|
|
3156
|
+
*
|
|
3157
|
+
* Issues a fresh `omr_prj_…` token and invalidates the previous one, if any. The plaintext value is returned **once** and never again.
|
|
3158
|
+
*
|
|
3159
|
+
* **This is destructive for unprovisioned devices.** Any unit still carrying the old token can no longer enrol until it is reflashed or reconfigured; devices that already hold their own device token are unaffected, since enrolment is the only step the app token takes part in. Requires `api:projects:manage`.
|
|
3160
|
+
*/
|
|
3161
|
+
declare const rotateProjectAppToken: <ThrowOnError extends boolean = false>(options: Options<RotateProjectAppTokenData, ThrowOnError>) => RequestResult<RotateProjectAppTokenResponses, RotateProjectAppTokenErrors, ThrowOnError>;
|
|
3162
|
+
/**
|
|
3163
|
+
* List devices
|
|
3164
|
+
*
|
|
3165
|
+
* Paginated list of devices across every project this token is scoped to (intersected with the caller's org access). Cursor-based; pass `meta.nextCursor` from the previous page as the `cursor` query parameter.
|
|
3166
|
+
*/
|
|
3167
|
+
declare const listDevices: <ThrowOnError extends boolean = false>(options?: Options<ListDevicesData, ThrowOnError>) => RequestResult<ListDevicesResponses, ListDevicesErrors, ThrowOnError>;
|
|
3168
|
+
/**
|
|
3169
|
+
* Delete a device
|
|
3170
|
+
*
|
|
3171
|
+
* Permanently removes the device: releases its licensing seat and evicts any live agent (it re-admits on next connect). Must belong to a project this token can manage. Requires the `api:devices:manage` ability.
|
|
3172
|
+
*/
|
|
3173
|
+
declare const deleteDevice: <ThrowOnError extends boolean = false>(options: Options<DeleteDeviceData, ThrowOnError>) => RequestResult<DeleteDeviceResponses, DeleteDeviceErrors, ThrowOnError>;
|
|
3174
|
+
/**
|
|
3175
|
+
* Get a device
|
|
3176
|
+
*
|
|
3177
|
+
* Returns the device with the given UUID. Must belong to a project this token can read.
|
|
3178
|
+
*/
|
|
3179
|
+
declare const getDevice: <ThrowOnError extends boolean = false>(options: Options<GetDeviceData, ThrowOnError>) => RequestResult<GetDeviceResponses, GetDeviceErrors, ThrowOnError>;
|
|
3180
|
+
/**
|
|
3181
|
+
* Reset a device token
|
|
3182
|
+
*
|
|
3183
|
+
* Rotates the device token in place, keeping the device id, name, device-type link and history (unlike delete, which throws them away). The previous token is invalidated and any live agent is evicted so it re-admits/reconnects with the new one (a device that lost its token recovers automatically on its next admission). The new token is returned once and cannot be retrieved again. Must belong to a project this token can manage. Requires the `api:devices:manage` ability.
|
|
3184
|
+
*/
|
|
3185
|
+
declare const resetDeviceToken: <ThrowOnError extends boolean = false>(options: Options<ResetDeviceTokenData, ThrowOnError>) => RequestResult<ResetDeviceTokenResponses, ResetDeviceTokenErrors, ThrowOnError>;
|
|
3186
|
+
/**
|
|
3187
|
+
* Latest telemetry sample for a device
|
|
3188
|
+
*
|
|
3189
|
+
* Returns the most recent telemetry sample. `null` if the device has never reported.
|
|
3190
|
+
*/
|
|
3191
|
+
declare const getLatestTelemetry: <ThrowOnError extends boolean = false>(options: Options<GetLatestTelemetryData, ThrowOnError>) => RequestResult<GetLatestTelemetryResponses, GetLatestTelemetryErrors, ThrowOnError>;
|
|
3192
|
+
/**
|
|
3193
|
+
* Telemetry history for a device
|
|
3194
|
+
*
|
|
3195
|
+
* Returns a time-window of telemetry samples. Defaults to the last 6 hours.
|
|
3196
|
+
*/
|
|
3197
|
+
declare const getTelemetryHistory: <ThrowOnError extends boolean = false>(options: Options<GetTelemetryHistoryData, ThrowOnError>) => RequestResult<GetTelemetryHistoryResponses, GetTelemetryHistoryErrors, ThrowOnError>;
|
|
3198
|
+
/**
|
|
3199
|
+
* Metric manifest for a device
|
|
3200
|
+
*
|
|
3201
|
+
* The metric definitions (label, unit, type, range) of the device's type, i.e. the schema its telemetry samples decode against. `null` when the device type declares no manifest. Requires the `api:telemetry:read` ability.
|
|
3202
|
+
*/
|
|
3203
|
+
declare const getTelemetryManifest: <ThrowOnError extends boolean = false>(options: Options<GetTelemetryManifestData, ThrowOnError>) => RequestResult<GetTelemetryManifestResponses, GetTelemetryManifestErrors, ThrowOnError>;
|
|
3204
|
+
/**
|
|
3205
|
+
* List admission requests
|
|
3206
|
+
*
|
|
3207
|
+
* Paginated list of device admission requests across every project this token is scoped to. Filter by `status` (e.g. `pending`) to find requests awaiting review, or by `fingerprint` to resolve the request a specific unit raised. Cursor-based; pass `meta.nextCursor` as the `cursor` query parameter. Requires the `api:admissions:read` ability.
|
|
3208
|
+
*/
|
|
3209
|
+
declare const listAdmissions: <ThrowOnError extends boolean = false>(options?: Options<ListAdmissionsData, ThrowOnError>) => RequestResult<ListAdmissionsResponses, ListAdmissionsErrors, ThrowOnError>;
|
|
3210
|
+
/**
|
|
3211
|
+
* Get an admission request
|
|
3212
|
+
*
|
|
3213
|
+
* Returns the admission request with the given UUID. Must belong to a project this token can read. Requires the `api:admissions:read` ability.
|
|
3214
|
+
*/
|
|
3215
|
+
declare const getAdmission: <ThrowOnError extends boolean = false>(options: Options<GetAdmissionData, ThrowOnError>) => RequestResult<GetAdmissionResponses, GetAdmissionErrors, ThrowOnError>;
|
|
3216
|
+
/**
|
|
3217
|
+
* Accept an admission request
|
|
3218
|
+
*
|
|
3219
|
+
* Approves a pending admission and provisions a new device in the request’s project. The agent that raised the request receives its device token on its next admission poll. A `deviceTypeId` is required (must belong to the same project). Pass the type resolved from the device’s declared model, or another of the project’s types to override it. Requires the `api:admissions:manage` ability.
|
|
3220
|
+
*/
|
|
3221
|
+
declare const acceptAdmission: <ThrowOnError extends boolean = false>(options: Options<AcceptAdmissionData, ThrowOnError>) => RequestResult<AcceptAdmissionResponses, AcceptAdmissionErrors, ThrowOnError>;
|
|
3222
|
+
/**
|
|
3223
|
+
* Reject an admission request
|
|
3224
|
+
*
|
|
3225
|
+
* Rejects a pending admission permanently. No device is provisioned. Requires the `api:admissions:manage` ability.
|
|
3226
|
+
*/
|
|
3227
|
+
declare const rejectAdmission: <ThrowOnError extends boolean = false>(options: Options<RejectAdmissionData, ThrowOnError>) => RequestResult<RejectAdmissionResponses, RejectAdmissionErrors, ThrowOnError>;
|
|
3228
|
+
/**
|
|
3229
|
+
* Dismiss an admission request
|
|
3230
|
+
*
|
|
3231
|
+
* Dismisses a pending admission without provisioning a device and without refusing the unit permanently. Unlike `reject`, this is not a verdict the device has to live with: the next time the same fingerprint asks to enrol, the request reopens as `pending` and appears in the queue again. Use it for "not now" (an unrecognised unit, a fleet you are not ready to admit); use `reject` when the unit must stay out.
|
|
3232
|
+
*
|
|
3233
|
+
* Requires the `api:admissions:manage` ability.
|
|
3234
|
+
*/
|
|
3235
|
+
declare const dismissAdmission: <ThrowOnError extends boolean = false>(options: Options<DismissAdmissionData, ThrowOnError>) => RequestResult<DismissAdmissionResponses, DismissAdmissionErrors, ThrowOnError>;
|
|
3236
|
+
/**
|
|
3237
|
+
* Upload a firmware bundle
|
|
3238
|
+
*
|
|
3239
|
+
* Streams a firmware bundle into project storage and creates the corresponding `firmware_bundles` row. Returns the bundle envelope (id, kind, sha256, sizeBytes, …). The `kind` field selects the image format: `rauc` (default, `.raucb`, Linux A/B) or `mcuboot` (signed MCUboot `.bin` for microcontrollers). Version and hardware target are decoded from the binary where it carries them (rauc: both from the manifest; mcuboot: version from the image header). The `version`/`compatible` form fields are only needed for what the binary lacks (mcuboot target). To roll the bundle out to devices, trigger a deployment via `POST /api/v1/firmware/deployments`. 512 MB hard cap.
|
|
3240
|
+
*/
|
|
3241
|
+
declare const uploadFirmware: <ThrowOnError extends boolean = false>(options?: Options<UploadFirmwareData, ThrowOnError>) => RequestResult<UploadFirmwareResponses, UploadFirmwareErrors, ThrowOnError>;
|
|
3242
|
+
/**
|
|
3243
|
+
* List firmware bundles
|
|
3244
|
+
*
|
|
3245
|
+
* Paginated list of firmware bundles across every project this token is scoped to. Cursor-based; pass `meta.nextCursor` from the previous page as the `cursor` query parameter. Filter by `projectId`, by exact `compatible` target, or by a `version` substring to find the bundle to roll out. Deleted bundles are omitted; their deployment history remains readable through the deployments endpoints. Requires the `api:firmware:read` ability.
|
|
3246
|
+
*/
|
|
3247
|
+
declare const listFirmwareBundles: <ThrowOnError extends boolean = false>(options?: Options<ListFirmwareBundlesData, ThrowOnError>) => RequestResult<ListFirmwareBundlesResponses, ListFirmwareBundlesErrors, ThrowOnError>;
|
|
3248
|
+
/**
|
|
3249
|
+
* Delete a firmware bundle
|
|
3250
|
+
*
|
|
3251
|
+
* Soft-deletes a bundle and frees its stored object; deployment history is retained for audit. A bundle with a genuinely in-flight deployment is refused (409) until it is canceled. Must belong to a project this token can write. Requires the `api:firmware:write` ability.
|
|
3252
|
+
*/
|
|
3253
|
+
declare const deleteFirmwareBundle: <ThrowOnError extends boolean = false>(options: Options<DeleteFirmwareBundleData, ThrowOnError>) => RequestResult<DeleteFirmwareBundleResponses, DeleteFirmwareBundleErrors, ThrowOnError>;
|
|
3254
|
+
/**
|
|
3255
|
+
* Get a firmware bundle
|
|
3256
|
+
*
|
|
3257
|
+
* Returns one bundle: kind, version, hardware target, size and `sha256`, so a caller can verify what it is about to roll out. Requires the `api:firmware:read` ability.
|
|
3258
|
+
*/
|
|
3259
|
+
declare const getFirmwareBundle: <ThrowOnError extends boolean = false>(options: Options<GetFirmwareBundleData, ThrowOnError>) => RequestResult<GetFirmwareBundleResponses, GetFirmwareBundleErrors, ThrowOnError>;
|
|
3260
|
+
/**
|
|
3261
|
+
* List firmware deployments
|
|
3262
|
+
*
|
|
3263
|
+
* Paginated list of firmware deployments across every project this token is scoped to, newest activity first via the opaque cursor. Filter by `deviceId`, `bundleId` or `status` to track a rollout. Requires the `api:firmware:read` ability.
|
|
3264
|
+
*/
|
|
3265
|
+
declare const listFirmwareDeployments: <ThrowOnError extends boolean = false>(options?: Options<ListFirmwareDeploymentsData, ThrowOnError>) => RequestResult<ListFirmwareDeploymentsResponses, ListFirmwareDeploymentsErrors, ThrowOnError>;
|
|
3266
|
+
/**
|
|
3267
|
+
* Trigger a firmware deployment
|
|
3268
|
+
*
|
|
3269
|
+
* Creates one deployment per device for the given bundle and dispatches it immediately to any device that is currently online; offline devices stay `pending` and install on their next reconnect. Every device must belong to the bundle’s project. A device whose recorded hardware compatibility contradicts the bundle’s declared target is rejected (422) before any deployment row is created. Requires the `api:firmware:write` ability.
|
|
3270
|
+
*/
|
|
3271
|
+
declare const triggerFirmwareDeployment: <ThrowOnError extends boolean = false>(options?: Options<TriggerFirmwareDeploymentData, ThrowOnError>) => RequestResult<TriggerFirmwareDeploymentResponses, TriggerFirmwareDeploymentErrors, ThrowOnError>;
|
|
3272
|
+
/**
|
|
3273
|
+
* Get a firmware deployment
|
|
3274
|
+
*
|
|
3275
|
+
* Returns the current state of a single deployment (status, phase, progress %, and any error or install result reported by the agent). Poll this to follow a rollout. Requires the `api:firmware:read` ability.
|
|
3276
|
+
*/
|
|
3277
|
+
declare const getFirmwareDeployment: <ThrowOnError extends boolean = false>(options: Options<GetFirmwareDeploymentData, ThrowOnError>) => RequestResult<GetFirmwareDeploymentResponses, GetFirmwareDeploymentErrors, ThrowOnError>;
|
|
3278
|
+
/**
|
|
3279
|
+
* Cancel a firmware deployment
|
|
3280
|
+
*
|
|
3281
|
+
* Marks a deployment `canceled`. A `pending` deployment (the device has not picked it up yet) cancels with no flag. One already in flight (`downloading` / `installing`) requires `force: true`, because the device may be partway through an install; the forced abort is recorded in the deployment’s `error` and `message`. A deployment that already reached a terminal state is refused with 409. Cancelling is what unblocks deleting the bundle, which is refused while a deployment is genuinely in flight. Requires the `api:firmware:write` ability.
|
|
3282
|
+
*/
|
|
3283
|
+
declare const cancelFirmwareDeployment: <ThrowOnError extends boolean = false>(options: Options<CancelFirmwareDeploymentData, ThrowOnError>) => RequestResult<CancelFirmwareDeploymentResponses, CancelFirmwareDeploymentErrors, ThrowOnError>;
|
|
3284
|
+
/**
|
|
3285
|
+
* Roll back a firmware deployment
|
|
3286
|
+
*
|
|
3287
|
+
* Issues a real rollback for the device behind a succeeded deployment: a RAUC slot-status flip on a gateway, or an MCUboot test-swap back to the previous image on an MCU. This creates and returns a *new* synthetic deployment row (not the source one) so a poller can follow the rollback the same way it follows a forward rollout. The device must be online, since the bootloader state being flipped is only valid right now. Requires the `api:firmware:write` ability.
|
|
3288
|
+
*/
|
|
3289
|
+
declare const rollbackFirmwareDeployment: <ThrowOnError extends boolean = false>(options: Options<RollbackFirmwareDeploymentData, ThrowOnError>) => RequestResult<RollbackFirmwareDeploymentResponses, RollbackFirmwareDeploymentErrors, ThrowOnError>;
|
|
3290
|
+
/**
|
|
3291
|
+
* Run a command on a device
|
|
3292
|
+
*
|
|
3293
|
+
* Dispatches a declared command (name + typed args) to the device over the MQTT data plane. The command is validated against the device type's command manifest before publishing: an undeclared name, a missing required arg, or a wrongly-typed arg is rejected with 422. See `GET /api/v1/devices/{id}/commands` for the declared set. Delivery follows the device type's dispatch profile: `interactive` devices run it now and the call returns 200 with the result (or 502 if offline); `queued` devices accept it for store-and-forward delivery on their next check-in and the call returns 202 with `{ invocationId, status, queued: true }`. Poll `GET /api/v1/devices/{id}/commands/{invocationId}` for the eventual result. Requires the `api:command:exec` ability and project scope over the device. Audited.
|
|
3294
|
+
*/
|
|
3295
|
+
declare const execDeviceCommand: <ThrowOnError extends boolean = false>(options: Options<ExecDeviceCommandData, ThrowOnError>) => RequestResult<ExecDeviceCommandResponses, ExecDeviceCommandErrors, ThrowOnError>;
|
|
3296
|
+
/**
|
|
3297
|
+
* Get a command invocation result
|
|
3298
|
+
*
|
|
3299
|
+
* Returns the durable record of a single command invocation. Its lifecycle `status` and, once terminal, its result (`success`, `exitCode`, `output`, `error`, `durationMs`). This is the pull counterpart to the `command.result` webhook: poll it after a queued (202) dispatch to retrieve the eventual outcome, so a missed or unsubscribed webhook delivery never makes a recorded result unrecoverable. The `invocationId` is the value returned by `POST /api/v1/devices/{id}/command`. Requires the `api:command:exec` ability and project scope over the device.
|
|
3300
|
+
*/
|
|
3301
|
+
declare const getDeviceCommandInvocation: <ThrowOnError extends boolean = false>(options: Options<GetDeviceCommandInvocationData, ThrowOnError>) => RequestResult<GetDeviceCommandInvocationResponses, GetDeviceCommandInvocationErrors, ThrowOnError>;
|
|
3302
|
+
/**
|
|
3303
|
+
* Commands a device supports
|
|
3304
|
+
*
|
|
3305
|
+
* The command manifest of the device's type, i.e. the declared commands (name + typed arg schema) that `POST /api/v1/devices/{id}/command` will accept for this device. `null` when the device type declares no manifest (every command is then rejected with 422). Requires the `api:devices:read` ability.
|
|
3306
|
+
*/
|
|
3307
|
+
declare const getDeviceCommands: <ThrowOnError extends boolean = false>(options: Options<GetDeviceCommandsData, ThrowOnError>) => RequestResult<GetDeviceCommandsResponses, GetDeviceCommandsErrors, ThrowOnError>;
|
|
3308
|
+
/**
|
|
3309
|
+
* Delete the command manifest of a device type
|
|
3310
|
+
*
|
|
3311
|
+
* Clears the declared command manifest. Devices of this type then reject every command with 422 until a new manifest is declared. Requires the `api:device-types:manage` ability.
|
|
3312
|
+
*/
|
|
3313
|
+
declare const deleteCommandManifest: <ThrowOnError extends boolean = false>(options: Options<DeleteCommandManifestData, ThrowOnError>) => RequestResult<DeleteCommandManifestResponses, DeleteCommandManifestErrors, ThrowOnError>;
|
|
3314
|
+
/**
|
|
3315
|
+
* Command manifest for a device type
|
|
3316
|
+
*
|
|
3317
|
+
* The declared command manifest for the device type with the given slug, or `null` when none is declared. Requires the `api:devices:read` ability.
|
|
3318
|
+
*/
|
|
3319
|
+
declare const getCommandManifest: <ThrowOnError extends boolean = false>(options: Options<GetCommandManifestData, ThrowOnError>) => RequestResult<GetCommandManifestResponses, GetCommandManifestErrors, ThrowOnError>;
|
|
3320
|
+
/**
|
|
3321
|
+
* Declare the command manifest for a device type
|
|
3322
|
+
*
|
|
3323
|
+
* Replaces the whole command manifest document for the device type (it is a single contract, not a collection of rows). Takes effect immediately: subsequent `POST /api/v1/devices/{id}/command` calls are validated against the new manifest. Requires the `api:device-types:manage` ability.
|
|
3324
|
+
*/
|
|
3325
|
+
declare const updateCommandManifest: <ThrowOnError extends boolean = false>(options: Options<UpdateCommandManifestData, ThrowOnError>) => RequestResult<UpdateCommandManifestResponses, UpdateCommandManifestErrors, ThrowOnError>;
|
|
3326
|
+
/**
|
|
3327
|
+
* List device types in a project
|
|
3328
|
+
*
|
|
3329
|
+
* Paginated list of the project’s device types. Cursor-based; pass `meta.nextCursor` from the previous page as the `cursor` query parameter. List items carry manifest **counts** rather than the manifests themselves. Read one type to get those in full.
|
|
3330
|
+
*
|
|
3331
|
+
* Requires `api:devices:read`.
|
|
3332
|
+
*/
|
|
3333
|
+
declare const listDeviceTypes: <ThrowOnError extends boolean = false>(options: Options<ListDeviceTypesData, ThrowOnError>) => RequestResult<ListDeviceTypesResponses, ListDeviceTypesErrors, ThrowOnError>;
|
|
3334
|
+
/**
|
|
3335
|
+
* Create a device type
|
|
3336
|
+
*
|
|
3337
|
+
* Declares a device type in the project. The owning project comes from the path, not the body, because device types are project-scoped and never created org-wide (#47). `version` defaults to `1.0.0`.
|
|
3338
|
+
*
|
|
3339
|
+
* Requires `api:device-types:manage`.
|
|
3340
|
+
*/
|
|
3341
|
+
declare const createDeviceType: <ThrowOnError extends boolean = false>(options: Options<CreateDeviceTypeData, ThrowOnError>) => RequestResult<CreateDeviceTypeResponses, CreateDeviceTypeErrors, ThrowOnError>;
|
|
3342
|
+
/**
|
|
3343
|
+
* Delete a device type
|
|
3344
|
+
*
|
|
3345
|
+
* Deletes a device type that no device is using. A device’s type is mandatory (#238) and the foreign key is `RESTRICT`, so a type still assigned to devices is refused with 409 and the count, so reassign or delete those devices first.
|
|
3346
|
+
*
|
|
3347
|
+
* Requires `api:device-types:manage`.
|
|
3348
|
+
*/
|
|
3349
|
+
declare const deleteDeviceType: <ThrowOnError extends boolean = false>(options: Options<DeleteDeviceTypeData, ThrowOnError>) => RequestResult<DeleteDeviceTypeResponses, DeleteDeviceTypeErrors, ThrowOnError>;
|
|
3350
|
+
/**
|
|
3351
|
+
* Get a device type
|
|
3352
|
+
*
|
|
3353
|
+
* One device type by slug, with its telemetry, command and USB manifests in full. Requires `api:devices:read`.
|
|
3354
|
+
*/
|
|
3355
|
+
declare const getDeviceType: <ThrowOnError extends boolean = false>(options: Options<GetDeviceTypeData, ThrowOnError>) => RequestResult<GetDeviceTypeResponses, GetDeviceTypeErrors, ThrowOnError>;
|
|
3356
|
+
/**
|
|
3357
|
+
* Update a device type
|
|
3358
|
+
*
|
|
3359
|
+
* Partial update: every field is optional and only the ones sent change. The slug is the identifier and cannot be changed; create a new type instead. Sending a manifest replaces it wholesale rather than merging into it.
|
|
3360
|
+
*
|
|
3361
|
+
* Requires `api:device-types:manage`.
|
|
3362
|
+
*/
|
|
3363
|
+
declare const updateDeviceType: <ThrowOnError extends boolean = false>(options: Options<UpdateDeviceTypeData, ThrowOnError>) => RequestResult<UpdateDeviceTypeResponses, UpdateDeviceTypeErrors, ThrowOnError>;
|
|
3364
|
+
/**
|
|
3365
|
+
* List webhook subscriptions
|
|
3366
|
+
*
|
|
3367
|
+
* Paginated list of webhook subscriptions across every project this token is scoped to. Requires the `api:webhooks:read` ability.
|
|
3368
|
+
*/
|
|
3369
|
+
declare const listWebhooks: <ThrowOnError extends boolean = false>(options?: Options<ListWebhooksData, ThrowOnError>) => RequestResult<ListWebhooksResponses, ListWebhooksErrors, ThrowOnError>;
|
|
3370
|
+
/**
|
|
3371
|
+
* Create a webhook subscription
|
|
3372
|
+
*
|
|
3373
|
+
* Registers an endpoint that receives signed device events for the given project. The response includes the HMAC signing `secret` **exactly once**. Store it now; it cannot be retrieved again (delete and recreate the subscription to rotate it). URLs must be https in production and must not target private/internal addresses. Requires the `api:webhooks:manage` ability.
|
|
3374
|
+
*/
|
|
3375
|
+
declare const createWebhook: <ThrowOnError extends boolean = false>(options?: Options<CreateWebhookData, ThrowOnError>) => RequestResult<CreateWebhookResponses, CreateWebhookErrors, ThrowOnError>;
|
|
3376
|
+
/**
|
|
3377
|
+
* Delete a webhook subscription
|
|
3378
|
+
*
|
|
3379
|
+
* Deletes the subscription and its delivery log. Requires the `api:webhooks:manage` ability.
|
|
3380
|
+
*/
|
|
3381
|
+
declare const deleteWebhook: <ThrowOnError extends boolean = false>(options: Options<DeleteWebhookData, ThrowOnError>) => RequestResult<DeleteWebhookResponses, DeleteWebhookErrors, ThrowOnError>;
|
|
3382
|
+
/**
|
|
3383
|
+
* Get a webhook subscription
|
|
3384
|
+
*
|
|
3385
|
+
* Returns the subscription with the given UUID (without its secret). Requires the `api:webhooks:read` ability.
|
|
3386
|
+
*/
|
|
3387
|
+
declare const getWebhook: <ThrowOnError extends boolean = false>(options: Options<GetWebhookData, ThrowOnError>) => RequestResult<GetWebhookResponses, GetWebhookErrors, ThrowOnError>;
|
|
3388
|
+
/**
|
|
3389
|
+
* Update a webhook subscription
|
|
3390
|
+
*
|
|
3391
|
+
* Updates the URL, event-type filter and/or enabled flag. Re-enabling a subscription resets its failure counter. Requires the `api:webhooks:manage` ability.
|
|
3392
|
+
*/
|
|
3393
|
+
declare const updateWebhook: <ThrowOnError extends boolean = false>(options: Options<UpdateWebhookData, ThrowOnError>) => RequestResult<UpdateWebhookResponses, UpdateWebhookErrors, ThrowOnError>;
|
|
3394
|
+
/**
|
|
3395
|
+
* List deliveries for a webhook subscription
|
|
3396
|
+
*
|
|
3397
|
+
* Attempt log of recent deliveries (newest first): status, attempt count, last HTTP status / error, and retry schedule. Requires the `api:webhooks:read` ability.
|
|
3398
|
+
*/
|
|
3399
|
+
declare const listWebhookDeliveries: <ThrowOnError extends boolean = false>(options: Options<ListWebhookDeliveriesData, ThrowOnError>) => RequestResult<ListWebhookDeliveriesResponses, ListWebhookDeliveriesErrors, ThrowOnError>;
|
|
3400
|
+
|
|
3401
|
+
type index_AcceptAdmissionData = AcceptAdmissionData;
|
|
3402
|
+
type index_AcceptAdmissionError = AcceptAdmissionError;
|
|
3403
|
+
type index_AcceptAdmissionErrors = AcceptAdmissionErrors;
|
|
3404
|
+
type index_AcceptAdmissionResponse = AcceptAdmissionResponse;
|
|
3405
|
+
type index_AcceptAdmissionResponses = AcceptAdmissionResponses;
|
|
3406
|
+
type index_Admission = Admission;
|
|
3407
|
+
type index_AdmissionAcceptRequest = AdmissionAcceptRequest;
|
|
3408
|
+
type index_AdmissionAcceptResponse = AdmissionAcceptResponse;
|
|
3409
|
+
type index_AdmissionListPage = AdmissionListPage;
|
|
3410
|
+
type index_CancelFirmwareDeploymentData = CancelFirmwareDeploymentData;
|
|
3411
|
+
type index_CancelFirmwareDeploymentError = CancelFirmwareDeploymentError;
|
|
3412
|
+
type index_CancelFirmwareDeploymentErrors = CancelFirmwareDeploymentErrors;
|
|
3413
|
+
type index_CancelFirmwareDeploymentResponse = CancelFirmwareDeploymentResponse;
|
|
3414
|
+
type index_CancelFirmwareDeploymentResponses = CancelFirmwareDeploymentResponses;
|
|
3415
|
+
type index_CommandArgDefinition = CommandArgDefinition;
|
|
3416
|
+
type index_CommandDefinition = CommandDefinition;
|
|
3417
|
+
type index_CommandInvocation = CommandInvocation;
|
|
3418
|
+
type index_CommandManifest = CommandManifest;
|
|
3419
|
+
type index_CommandRequest = CommandRequest;
|
|
3420
|
+
type index_CommandResult = CommandResult;
|
|
3421
|
+
type index_CreateDeviceTypeData = CreateDeviceTypeData;
|
|
3422
|
+
type index_CreateDeviceTypeError = CreateDeviceTypeError;
|
|
3423
|
+
type index_CreateDeviceTypeErrors = CreateDeviceTypeErrors;
|
|
3424
|
+
type index_CreateDeviceTypeResponse = CreateDeviceTypeResponse;
|
|
3425
|
+
type index_CreateDeviceTypeResponses = CreateDeviceTypeResponses;
|
|
3426
|
+
type index_CreateProjectAppTokenData = CreateProjectAppTokenData;
|
|
3427
|
+
type index_CreateProjectAppTokenError = CreateProjectAppTokenError;
|
|
3428
|
+
type index_CreateProjectAppTokenErrors = CreateProjectAppTokenErrors;
|
|
3429
|
+
type index_CreateProjectAppTokenResponse = CreateProjectAppTokenResponse;
|
|
3430
|
+
type index_CreateProjectAppTokenResponses = CreateProjectAppTokenResponses;
|
|
3431
|
+
type index_CreateWebhookData = CreateWebhookData;
|
|
3432
|
+
type index_CreateWebhookError = CreateWebhookError;
|
|
3433
|
+
type index_CreateWebhookErrors = CreateWebhookErrors;
|
|
3434
|
+
type index_CreateWebhookResponse = CreateWebhookResponse;
|
|
3435
|
+
type index_CreateWebhookResponses = CreateWebhookResponses;
|
|
3436
|
+
type index_DeleteCommandManifestData = DeleteCommandManifestData;
|
|
3437
|
+
type index_DeleteCommandManifestError = DeleteCommandManifestError;
|
|
3438
|
+
type index_DeleteCommandManifestErrors = DeleteCommandManifestErrors;
|
|
3439
|
+
type index_DeleteCommandManifestResponses = DeleteCommandManifestResponses;
|
|
3440
|
+
type index_DeleteDeviceData = DeleteDeviceData;
|
|
3441
|
+
type index_DeleteDeviceError = DeleteDeviceError;
|
|
3442
|
+
type index_DeleteDeviceErrors = DeleteDeviceErrors;
|
|
3443
|
+
type index_DeleteDeviceResponses = DeleteDeviceResponses;
|
|
3444
|
+
type index_DeleteDeviceTypeData = DeleteDeviceTypeData;
|
|
3445
|
+
type index_DeleteDeviceTypeError = DeleteDeviceTypeError;
|
|
3446
|
+
type index_DeleteDeviceTypeErrors = DeleteDeviceTypeErrors;
|
|
3447
|
+
type index_DeleteDeviceTypeResponses = DeleteDeviceTypeResponses;
|
|
3448
|
+
type index_DeleteFirmwareBundleData = DeleteFirmwareBundleData;
|
|
3449
|
+
type index_DeleteFirmwareBundleError = DeleteFirmwareBundleError;
|
|
3450
|
+
type index_DeleteFirmwareBundleErrors = DeleteFirmwareBundleErrors;
|
|
3451
|
+
type index_DeleteFirmwareBundleResponses = DeleteFirmwareBundleResponses;
|
|
3452
|
+
type index_DeleteWebhookData = DeleteWebhookData;
|
|
3453
|
+
type index_DeleteWebhookError = DeleteWebhookError;
|
|
3454
|
+
type index_DeleteWebhookErrors = DeleteWebhookErrors;
|
|
3455
|
+
type index_DeleteWebhookResponses = DeleteWebhookResponses;
|
|
3456
|
+
type index_Device = Device;
|
|
3457
|
+
type index_DeviceListItem = DeviceListItem;
|
|
3458
|
+
type index_DeviceListPage = DeviceListPage;
|
|
3459
|
+
type index_DeviceTokenReset = DeviceTokenReset;
|
|
3460
|
+
type index_DeviceType = DeviceType;
|
|
3461
|
+
type index_DeviceTypeCreateRequest = DeviceTypeCreateRequest;
|
|
3462
|
+
type index_DeviceTypeListItem = DeviceTypeListItem;
|
|
3463
|
+
type index_DeviceTypeListPage = DeviceTypeListPage;
|
|
3464
|
+
type index_DeviceTypeUpdateRequest = DeviceTypeUpdateRequest;
|
|
3465
|
+
type index_DismissAdmissionData = DismissAdmissionData;
|
|
3466
|
+
type index_DismissAdmissionError = DismissAdmissionError;
|
|
3467
|
+
type index_DismissAdmissionErrors = DismissAdmissionErrors;
|
|
3468
|
+
type index_DismissAdmissionResponse = DismissAdmissionResponse;
|
|
3469
|
+
type index_DismissAdmissionResponses = DismissAdmissionResponses;
|
|
3470
|
+
type index_ErrorItem = ErrorItem;
|
|
3471
|
+
type index_ErrorResponse = ErrorResponse;
|
|
3472
|
+
type index_ExecDeviceCommandData = ExecDeviceCommandData;
|
|
3473
|
+
type index_ExecDeviceCommandError = ExecDeviceCommandError;
|
|
3474
|
+
type index_ExecDeviceCommandErrors = ExecDeviceCommandErrors;
|
|
3475
|
+
type index_ExecDeviceCommandResponse = ExecDeviceCommandResponse;
|
|
3476
|
+
type index_ExecDeviceCommandResponses = ExecDeviceCommandResponses;
|
|
3477
|
+
type index_FirmwareBundle = FirmwareBundle;
|
|
3478
|
+
type index_FirmwareBundleListPage = FirmwareBundleListPage;
|
|
3479
|
+
type index_FirmwareConflictResponse = FirmwareConflictResponse;
|
|
3480
|
+
type index_FirmwareDeployment = FirmwareDeployment;
|
|
3481
|
+
type index_FirmwareDeploymentCancelRequest = FirmwareDeploymentCancelRequest;
|
|
3482
|
+
type index_FirmwareDeploymentListPage = FirmwareDeploymentListPage;
|
|
3483
|
+
type index_FirmwareDeploymentRollbackRequest = FirmwareDeploymentRollbackRequest;
|
|
3484
|
+
type index_FirmwareDeploymentTriggerRequest = FirmwareDeploymentTriggerRequest;
|
|
3485
|
+
type index_FirmwareDeploymentTriggerResponse = FirmwareDeploymentTriggerResponse;
|
|
3486
|
+
type index_FirmwareUploadRequest = FirmwareUploadRequest;
|
|
3487
|
+
type index_FirmwareUploadResponse = FirmwareUploadResponse;
|
|
3488
|
+
type index_GetAdmissionData = GetAdmissionData;
|
|
3489
|
+
type index_GetAdmissionError = GetAdmissionError;
|
|
3490
|
+
type index_GetAdmissionErrors = GetAdmissionErrors;
|
|
3491
|
+
type index_GetAdmissionResponse = GetAdmissionResponse;
|
|
3492
|
+
type index_GetAdmissionResponses = GetAdmissionResponses;
|
|
3493
|
+
type index_GetCommandManifestData = GetCommandManifestData;
|
|
3494
|
+
type index_GetCommandManifestError = GetCommandManifestError;
|
|
3495
|
+
type index_GetCommandManifestErrors = GetCommandManifestErrors;
|
|
3496
|
+
type index_GetCommandManifestResponse = GetCommandManifestResponse;
|
|
3497
|
+
type index_GetCommandManifestResponses = GetCommandManifestResponses;
|
|
3498
|
+
type index_GetDeviceCommandInvocationData = GetDeviceCommandInvocationData;
|
|
3499
|
+
type index_GetDeviceCommandInvocationError = GetDeviceCommandInvocationError;
|
|
3500
|
+
type index_GetDeviceCommandInvocationErrors = GetDeviceCommandInvocationErrors;
|
|
3501
|
+
type index_GetDeviceCommandInvocationResponse = GetDeviceCommandInvocationResponse;
|
|
3502
|
+
type index_GetDeviceCommandInvocationResponses = GetDeviceCommandInvocationResponses;
|
|
3503
|
+
type index_GetDeviceCommandsData = GetDeviceCommandsData;
|
|
3504
|
+
type index_GetDeviceCommandsError = GetDeviceCommandsError;
|
|
3505
|
+
type index_GetDeviceCommandsErrors = GetDeviceCommandsErrors;
|
|
3506
|
+
type index_GetDeviceCommandsResponse = GetDeviceCommandsResponse;
|
|
3507
|
+
type index_GetDeviceCommandsResponses = GetDeviceCommandsResponses;
|
|
3508
|
+
type index_GetDeviceData = GetDeviceData;
|
|
3509
|
+
type index_GetDeviceError = GetDeviceError;
|
|
3510
|
+
type index_GetDeviceErrors = GetDeviceErrors;
|
|
3511
|
+
type index_GetDeviceResponse = GetDeviceResponse;
|
|
3512
|
+
type index_GetDeviceResponses = GetDeviceResponses;
|
|
3513
|
+
type index_GetDeviceTypeData = GetDeviceTypeData;
|
|
3514
|
+
type index_GetDeviceTypeError = GetDeviceTypeError;
|
|
3515
|
+
type index_GetDeviceTypeErrors = GetDeviceTypeErrors;
|
|
3516
|
+
type index_GetDeviceTypeResponse = GetDeviceTypeResponse;
|
|
3517
|
+
type index_GetDeviceTypeResponses = GetDeviceTypeResponses;
|
|
3518
|
+
type index_GetFirmwareBundleData = GetFirmwareBundleData;
|
|
3519
|
+
type index_GetFirmwareBundleError = GetFirmwareBundleError;
|
|
3520
|
+
type index_GetFirmwareBundleErrors = GetFirmwareBundleErrors;
|
|
3521
|
+
type index_GetFirmwareBundleResponse = GetFirmwareBundleResponse;
|
|
3522
|
+
type index_GetFirmwareBundleResponses = GetFirmwareBundleResponses;
|
|
3523
|
+
type index_GetFirmwareDeploymentData = GetFirmwareDeploymentData;
|
|
3524
|
+
type index_GetFirmwareDeploymentError = GetFirmwareDeploymentError;
|
|
3525
|
+
type index_GetFirmwareDeploymentErrors = GetFirmwareDeploymentErrors;
|
|
3526
|
+
type index_GetFirmwareDeploymentResponse = GetFirmwareDeploymentResponse;
|
|
3527
|
+
type index_GetFirmwareDeploymentResponses = GetFirmwareDeploymentResponses;
|
|
3528
|
+
type index_GetIdentityData = GetIdentityData;
|
|
3529
|
+
type index_GetIdentityError = GetIdentityError;
|
|
3530
|
+
type index_GetIdentityErrors = GetIdentityErrors;
|
|
3531
|
+
type index_GetIdentityResponse = GetIdentityResponse;
|
|
3532
|
+
type index_GetIdentityResponses = GetIdentityResponses;
|
|
3533
|
+
type index_GetLatestTelemetryData = GetLatestTelemetryData;
|
|
3534
|
+
type index_GetLatestTelemetryError = GetLatestTelemetryError;
|
|
3535
|
+
type index_GetLatestTelemetryErrors = GetLatestTelemetryErrors;
|
|
3536
|
+
type index_GetLatestTelemetryResponse = GetLatestTelemetryResponse;
|
|
3537
|
+
type index_GetLatestTelemetryResponses = GetLatestTelemetryResponses;
|
|
3538
|
+
type index_GetProjectData = GetProjectData;
|
|
3539
|
+
type index_GetProjectError = GetProjectError;
|
|
3540
|
+
type index_GetProjectErrors = GetProjectErrors;
|
|
3541
|
+
type index_GetProjectResponse = GetProjectResponse;
|
|
3542
|
+
type index_GetProjectResponses = GetProjectResponses;
|
|
3543
|
+
type index_GetTelemetryHistoryData = GetTelemetryHistoryData;
|
|
3544
|
+
type index_GetTelemetryHistoryError = GetTelemetryHistoryError;
|
|
3545
|
+
type index_GetTelemetryHistoryErrors = GetTelemetryHistoryErrors;
|
|
3546
|
+
type index_GetTelemetryHistoryResponse = GetTelemetryHistoryResponse;
|
|
3547
|
+
type index_GetTelemetryHistoryResponses = GetTelemetryHistoryResponses;
|
|
3548
|
+
type index_GetTelemetryManifestData = GetTelemetryManifestData;
|
|
3549
|
+
type index_GetTelemetryManifestError = GetTelemetryManifestError;
|
|
3550
|
+
type index_GetTelemetryManifestErrors = GetTelemetryManifestErrors;
|
|
3551
|
+
type index_GetTelemetryManifestResponse = GetTelemetryManifestResponse;
|
|
3552
|
+
type index_GetTelemetryManifestResponses = GetTelemetryManifestResponses;
|
|
3553
|
+
type index_GetWebhookData = GetWebhookData;
|
|
3554
|
+
type index_GetWebhookError = GetWebhookError;
|
|
3555
|
+
type index_GetWebhookErrors = GetWebhookErrors;
|
|
3556
|
+
type index_GetWebhookResponse = GetWebhookResponse;
|
|
3557
|
+
type index_GetWebhookResponses = GetWebhookResponses;
|
|
3558
|
+
type index_Identity = Identity;
|
|
3559
|
+
type index_IdentityProject = IdentityProject;
|
|
3560
|
+
type index_IdentityToken = IdentityToken;
|
|
3561
|
+
type index_IdentityUser = IdentityUser;
|
|
3562
|
+
type index_ListAdmissionsData = ListAdmissionsData;
|
|
3563
|
+
type index_ListAdmissionsError = ListAdmissionsError;
|
|
3564
|
+
type index_ListAdmissionsErrors = ListAdmissionsErrors;
|
|
3565
|
+
type index_ListAdmissionsResponse = ListAdmissionsResponse;
|
|
3566
|
+
type index_ListAdmissionsResponses = ListAdmissionsResponses;
|
|
3567
|
+
type index_ListDeviceTypesData = ListDeviceTypesData;
|
|
3568
|
+
type index_ListDeviceTypesError = ListDeviceTypesError;
|
|
3569
|
+
type index_ListDeviceTypesErrors = ListDeviceTypesErrors;
|
|
3570
|
+
type index_ListDeviceTypesResponse = ListDeviceTypesResponse;
|
|
3571
|
+
type index_ListDeviceTypesResponses = ListDeviceTypesResponses;
|
|
3572
|
+
type index_ListDevicesData = ListDevicesData;
|
|
3573
|
+
type index_ListDevicesError = ListDevicesError;
|
|
3574
|
+
type index_ListDevicesErrors = ListDevicesErrors;
|
|
3575
|
+
type index_ListDevicesResponse = ListDevicesResponse;
|
|
3576
|
+
type index_ListDevicesResponses = ListDevicesResponses;
|
|
3577
|
+
type index_ListFirmwareBundlesData = ListFirmwareBundlesData;
|
|
3578
|
+
type index_ListFirmwareBundlesError = ListFirmwareBundlesError;
|
|
3579
|
+
type index_ListFirmwareBundlesErrors = ListFirmwareBundlesErrors;
|
|
3580
|
+
type index_ListFirmwareBundlesResponse = ListFirmwareBundlesResponse;
|
|
3581
|
+
type index_ListFirmwareBundlesResponses = ListFirmwareBundlesResponses;
|
|
3582
|
+
type index_ListFirmwareDeploymentsData = ListFirmwareDeploymentsData;
|
|
3583
|
+
type index_ListFirmwareDeploymentsError = ListFirmwareDeploymentsError;
|
|
3584
|
+
type index_ListFirmwareDeploymentsErrors = ListFirmwareDeploymentsErrors;
|
|
3585
|
+
type index_ListFirmwareDeploymentsResponse = ListFirmwareDeploymentsResponse;
|
|
3586
|
+
type index_ListFirmwareDeploymentsResponses = ListFirmwareDeploymentsResponses;
|
|
3587
|
+
type index_ListProjectsData = ListProjectsData;
|
|
3588
|
+
type index_ListProjectsError = ListProjectsError;
|
|
3589
|
+
type index_ListProjectsErrors = ListProjectsErrors;
|
|
3590
|
+
type index_ListProjectsResponse = ListProjectsResponse;
|
|
3591
|
+
type index_ListProjectsResponses = ListProjectsResponses;
|
|
3592
|
+
type index_ListWebhookDeliveriesData = ListWebhookDeliveriesData;
|
|
3593
|
+
type index_ListWebhookDeliveriesError = ListWebhookDeliveriesError;
|
|
3594
|
+
type index_ListWebhookDeliveriesErrors = ListWebhookDeliveriesErrors;
|
|
3595
|
+
type index_ListWebhookDeliveriesResponse = ListWebhookDeliveriesResponse;
|
|
3596
|
+
type index_ListWebhookDeliveriesResponses = ListWebhookDeliveriesResponses;
|
|
3597
|
+
type index_ListWebhooksData = ListWebhooksData;
|
|
3598
|
+
type index_ListWebhooksError = ListWebhooksError;
|
|
3599
|
+
type index_ListWebhooksErrors = ListWebhooksErrors;
|
|
3600
|
+
type index_ListWebhooksResponse = ListWebhooksResponse;
|
|
3601
|
+
type index_ListWebhooksResponses = ListWebhooksResponses;
|
|
3602
|
+
type index_MetricDefinition = MetricDefinition;
|
|
3603
|
+
type index_MetricGroup = MetricGroup;
|
|
3604
|
+
type index_Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options<TData, ThrowOnError, TResponse>;
|
|
3605
|
+
type index_PageMeta = PageMeta;
|
|
3606
|
+
type index_Project = Project;
|
|
3607
|
+
type index_ProjectAppToken = ProjectAppToken;
|
|
3608
|
+
type index_ProjectListPage = ProjectListPage;
|
|
3609
|
+
type index_RejectAdmissionData = RejectAdmissionData;
|
|
3610
|
+
type index_RejectAdmissionError = RejectAdmissionError;
|
|
3611
|
+
type index_RejectAdmissionErrors = RejectAdmissionErrors;
|
|
3612
|
+
type index_RejectAdmissionResponse = RejectAdmissionResponse;
|
|
3613
|
+
type index_RejectAdmissionResponses = RejectAdmissionResponses;
|
|
3614
|
+
type index_ResetDeviceTokenData = ResetDeviceTokenData;
|
|
3615
|
+
type index_ResetDeviceTokenError = ResetDeviceTokenError;
|
|
3616
|
+
type index_ResetDeviceTokenErrors = ResetDeviceTokenErrors;
|
|
3617
|
+
type index_ResetDeviceTokenResponse = ResetDeviceTokenResponse;
|
|
3618
|
+
type index_ResetDeviceTokenResponses = ResetDeviceTokenResponses;
|
|
3619
|
+
type index_RollbackFirmwareDeploymentData = RollbackFirmwareDeploymentData;
|
|
3620
|
+
type index_RollbackFirmwareDeploymentError = RollbackFirmwareDeploymentError;
|
|
3621
|
+
type index_RollbackFirmwareDeploymentErrors = RollbackFirmwareDeploymentErrors;
|
|
3622
|
+
type index_RollbackFirmwareDeploymentResponse = RollbackFirmwareDeploymentResponse;
|
|
3623
|
+
type index_RollbackFirmwareDeploymentResponses = RollbackFirmwareDeploymentResponses;
|
|
3624
|
+
type index_RotateProjectAppTokenData = RotateProjectAppTokenData;
|
|
3625
|
+
type index_RotateProjectAppTokenError = RotateProjectAppTokenError;
|
|
3626
|
+
type index_RotateProjectAppTokenErrors = RotateProjectAppTokenErrors;
|
|
3627
|
+
type index_RotateProjectAppTokenResponse = RotateProjectAppTokenResponse;
|
|
3628
|
+
type index_RotateProjectAppTokenResponses = RotateProjectAppTokenResponses;
|
|
3629
|
+
type index_TelemetryHistory = TelemetryHistory;
|
|
3630
|
+
type index_TelemetryManifest = TelemetryManifest;
|
|
3631
|
+
type index_TelemetrySample = TelemetrySample;
|
|
3632
|
+
type index_TriggerFirmwareDeploymentData = TriggerFirmwareDeploymentData;
|
|
3633
|
+
type index_TriggerFirmwareDeploymentError = TriggerFirmwareDeploymentError;
|
|
3634
|
+
type index_TriggerFirmwareDeploymentErrors = TriggerFirmwareDeploymentErrors;
|
|
3635
|
+
type index_TriggerFirmwareDeploymentResponse = TriggerFirmwareDeploymentResponse;
|
|
3636
|
+
type index_TriggerFirmwareDeploymentResponses = TriggerFirmwareDeploymentResponses;
|
|
3637
|
+
type index_UpdateCommandManifestData = UpdateCommandManifestData;
|
|
3638
|
+
type index_UpdateCommandManifestError = UpdateCommandManifestError;
|
|
3639
|
+
type index_UpdateCommandManifestErrors = UpdateCommandManifestErrors;
|
|
3640
|
+
type index_UpdateCommandManifestResponse = UpdateCommandManifestResponse;
|
|
3641
|
+
type index_UpdateCommandManifestResponses = UpdateCommandManifestResponses;
|
|
3642
|
+
type index_UpdateDeviceTypeData = UpdateDeviceTypeData;
|
|
3643
|
+
type index_UpdateDeviceTypeError = UpdateDeviceTypeError;
|
|
3644
|
+
type index_UpdateDeviceTypeErrors = UpdateDeviceTypeErrors;
|
|
3645
|
+
type index_UpdateDeviceTypeResponse = UpdateDeviceTypeResponse;
|
|
3646
|
+
type index_UpdateDeviceTypeResponses = UpdateDeviceTypeResponses;
|
|
3647
|
+
type index_UpdateWebhookData = UpdateWebhookData;
|
|
3648
|
+
type index_UpdateWebhookError = UpdateWebhookError;
|
|
3649
|
+
type index_UpdateWebhookErrors = UpdateWebhookErrors;
|
|
3650
|
+
type index_UpdateWebhookResponse = UpdateWebhookResponse;
|
|
3651
|
+
type index_UpdateWebhookResponses = UpdateWebhookResponses;
|
|
3652
|
+
type index_UploadFirmwareData = UploadFirmwareData;
|
|
3653
|
+
type index_UploadFirmwareError = UploadFirmwareError;
|
|
3654
|
+
type index_UploadFirmwareErrors = UploadFirmwareErrors;
|
|
3655
|
+
type index_UploadFirmwareResponse = UploadFirmwareResponse;
|
|
3656
|
+
type index_UploadFirmwareResponses = UploadFirmwareResponses;
|
|
3657
|
+
type index_WebhookCreateRequest = WebhookCreateRequest;
|
|
3658
|
+
type index_WebhookCreateResponse = WebhookCreateResponse;
|
|
3659
|
+
type index_WebhookDelivery = WebhookDelivery;
|
|
3660
|
+
type index_WebhookDeliveryAttempt = WebhookDeliveryAttempt;
|
|
3661
|
+
type index_WebhookDeliveryPage = WebhookDeliveryPage;
|
|
3662
|
+
type index_WebhookEventType = WebhookEventType;
|
|
3663
|
+
type index_WebhookRetryPolicy = WebhookRetryPolicy;
|
|
3664
|
+
type index_WebhookSubscription = WebhookSubscription;
|
|
3665
|
+
type index_WebhookSubscriptionPage = WebhookSubscriptionPage;
|
|
3666
|
+
type index_WebhookUpdateRequest = WebhookUpdateRequest;
|
|
3667
|
+
declare const index_acceptAdmission: typeof acceptAdmission;
|
|
3668
|
+
declare const index_cancelFirmwareDeployment: typeof cancelFirmwareDeployment;
|
|
3669
|
+
declare const index_createDeviceType: typeof createDeviceType;
|
|
3670
|
+
declare const index_createProjectAppToken: typeof createProjectAppToken;
|
|
3671
|
+
declare const index_createWebhook: typeof createWebhook;
|
|
3672
|
+
declare const index_deleteCommandManifest: typeof deleteCommandManifest;
|
|
3673
|
+
declare const index_deleteDevice: typeof deleteDevice;
|
|
3674
|
+
declare const index_deleteDeviceType: typeof deleteDeviceType;
|
|
3675
|
+
declare const index_deleteFirmwareBundle: typeof deleteFirmwareBundle;
|
|
3676
|
+
declare const index_deleteWebhook: typeof deleteWebhook;
|
|
3677
|
+
declare const index_dismissAdmission: typeof dismissAdmission;
|
|
3678
|
+
declare const index_execDeviceCommand: typeof execDeviceCommand;
|
|
3679
|
+
declare const index_getAdmission: typeof getAdmission;
|
|
3680
|
+
declare const index_getCommandManifest: typeof getCommandManifest;
|
|
3681
|
+
declare const index_getDevice: typeof getDevice;
|
|
3682
|
+
declare const index_getDeviceCommandInvocation: typeof getDeviceCommandInvocation;
|
|
3683
|
+
declare const index_getDeviceCommands: typeof getDeviceCommands;
|
|
3684
|
+
declare const index_getDeviceType: typeof getDeviceType;
|
|
3685
|
+
declare const index_getFirmwareBundle: typeof getFirmwareBundle;
|
|
3686
|
+
declare const index_getFirmwareDeployment: typeof getFirmwareDeployment;
|
|
3687
|
+
declare const index_getIdentity: typeof getIdentity;
|
|
3688
|
+
declare const index_getLatestTelemetry: typeof getLatestTelemetry;
|
|
3689
|
+
declare const index_getProject: typeof getProject;
|
|
3690
|
+
declare const index_getTelemetryHistory: typeof getTelemetryHistory;
|
|
3691
|
+
declare const index_getTelemetryManifest: typeof getTelemetryManifest;
|
|
3692
|
+
declare const index_getWebhook: typeof getWebhook;
|
|
3693
|
+
declare const index_listAdmissions: typeof listAdmissions;
|
|
3694
|
+
declare const index_listDeviceTypes: typeof listDeviceTypes;
|
|
3695
|
+
declare const index_listDevices: typeof listDevices;
|
|
3696
|
+
declare const index_listFirmwareBundles: typeof listFirmwareBundles;
|
|
3697
|
+
declare const index_listFirmwareDeployments: typeof listFirmwareDeployments;
|
|
3698
|
+
declare const index_listProjects: typeof listProjects;
|
|
3699
|
+
declare const index_listWebhookDeliveries: typeof listWebhookDeliveries;
|
|
3700
|
+
declare const index_listWebhooks: typeof listWebhooks;
|
|
3701
|
+
declare const index_rejectAdmission: typeof rejectAdmission;
|
|
3702
|
+
declare const index_resetDeviceToken: typeof resetDeviceToken;
|
|
3703
|
+
declare const index_rollbackFirmwareDeployment: typeof rollbackFirmwareDeployment;
|
|
3704
|
+
declare const index_rotateProjectAppToken: typeof rotateProjectAppToken;
|
|
3705
|
+
declare const index_triggerFirmwareDeployment: typeof triggerFirmwareDeployment;
|
|
3706
|
+
declare const index_updateCommandManifest: typeof updateCommandManifest;
|
|
3707
|
+
declare const index_updateDeviceType: typeof updateDeviceType;
|
|
3708
|
+
declare const index_updateWebhook: typeof updateWebhook;
|
|
3709
|
+
declare const index_uploadFirmware: typeof uploadFirmware;
|
|
3710
|
+
declare namespace index {
|
|
3711
|
+
export { type index_AcceptAdmissionData as AcceptAdmissionData, type index_AcceptAdmissionError as AcceptAdmissionError, type index_AcceptAdmissionErrors as AcceptAdmissionErrors, type index_AcceptAdmissionResponse as AcceptAdmissionResponse, type index_AcceptAdmissionResponses as AcceptAdmissionResponses, type index_Admission as Admission, type index_AdmissionAcceptRequest as AdmissionAcceptRequest, type index_AdmissionAcceptResponse as AdmissionAcceptResponse, type index_AdmissionListPage as AdmissionListPage, type index_CancelFirmwareDeploymentData as CancelFirmwareDeploymentData, type index_CancelFirmwareDeploymentError as CancelFirmwareDeploymentError, type index_CancelFirmwareDeploymentErrors as CancelFirmwareDeploymentErrors, type index_CancelFirmwareDeploymentResponse as CancelFirmwareDeploymentResponse, type index_CancelFirmwareDeploymentResponses as CancelFirmwareDeploymentResponses, type ClientOptions$1 as ClientOptions, type index_CommandArgDefinition as CommandArgDefinition, type index_CommandDefinition as CommandDefinition, type index_CommandInvocation as CommandInvocation, type index_CommandManifest as CommandManifest, type index_CommandRequest as CommandRequest, type index_CommandResult as CommandResult, type index_CreateDeviceTypeData as CreateDeviceTypeData, type index_CreateDeviceTypeError as CreateDeviceTypeError, type index_CreateDeviceTypeErrors as CreateDeviceTypeErrors, type index_CreateDeviceTypeResponse as CreateDeviceTypeResponse, type index_CreateDeviceTypeResponses as CreateDeviceTypeResponses, type index_CreateProjectAppTokenData as CreateProjectAppTokenData, type index_CreateProjectAppTokenError as CreateProjectAppTokenError, type index_CreateProjectAppTokenErrors as CreateProjectAppTokenErrors, type index_CreateProjectAppTokenResponse as CreateProjectAppTokenResponse, type index_CreateProjectAppTokenResponses as CreateProjectAppTokenResponses, type index_CreateWebhookData as CreateWebhookData, type index_CreateWebhookError as CreateWebhookError, type index_CreateWebhookErrors as CreateWebhookErrors, type index_CreateWebhookResponse as CreateWebhookResponse, type index_CreateWebhookResponses as CreateWebhookResponses, type index_DeleteCommandManifestData as DeleteCommandManifestData, type index_DeleteCommandManifestError as DeleteCommandManifestError, type index_DeleteCommandManifestErrors as DeleteCommandManifestErrors, type index_DeleteCommandManifestResponses as DeleteCommandManifestResponses, type index_DeleteDeviceData as DeleteDeviceData, type index_DeleteDeviceError as DeleteDeviceError, type index_DeleteDeviceErrors as DeleteDeviceErrors, type index_DeleteDeviceResponses as DeleteDeviceResponses, type index_DeleteDeviceTypeData as DeleteDeviceTypeData, type index_DeleteDeviceTypeError as DeleteDeviceTypeError, type index_DeleteDeviceTypeErrors as DeleteDeviceTypeErrors, type index_DeleteDeviceTypeResponses as DeleteDeviceTypeResponses, type index_DeleteFirmwareBundleData as DeleteFirmwareBundleData, type index_DeleteFirmwareBundleError as DeleteFirmwareBundleError, type index_DeleteFirmwareBundleErrors as DeleteFirmwareBundleErrors, type index_DeleteFirmwareBundleResponses as DeleteFirmwareBundleResponses, type index_DeleteWebhookData as DeleteWebhookData, type index_DeleteWebhookError as DeleteWebhookError, type index_DeleteWebhookErrors as DeleteWebhookErrors, type index_DeleteWebhookResponses as DeleteWebhookResponses, type index_Device as Device, type index_DeviceListItem as DeviceListItem, type index_DeviceListPage as DeviceListPage, type index_DeviceTokenReset as DeviceTokenReset, type index_DeviceType as DeviceType, type index_DeviceTypeCreateRequest as DeviceTypeCreateRequest, type index_DeviceTypeListItem as DeviceTypeListItem, type index_DeviceTypeListPage as DeviceTypeListPage, type index_DeviceTypeUpdateRequest as DeviceTypeUpdateRequest, type index_DismissAdmissionData as DismissAdmissionData, type index_DismissAdmissionError as DismissAdmissionError, type index_DismissAdmissionErrors as DismissAdmissionErrors, type index_DismissAdmissionResponse as DismissAdmissionResponse, type index_DismissAdmissionResponses as DismissAdmissionResponses, type index_ErrorItem as ErrorItem, type index_ErrorResponse as ErrorResponse, type index_ExecDeviceCommandData as ExecDeviceCommandData, type index_ExecDeviceCommandError as ExecDeviceCommandError, type index_ExecDeviceCommandErrors as ExecDeviceCommandErrors, type index_ExecDeviceCommandResponse as ExecDeviceCommandResponse, type index_ExecDeviceCommandResponses as ExecDeviceCommandResponses, type index_FirmwareBundle as FirmwareBundle, type index_FirmwareBundleListPage as FirmwareBundleListPage, type index_FirmwareConflictResponse as FirmwareConflictResponse, type index_FirmwareDeployment as FirmwareDeployment, type index_FirmwareDeploymentCancelRequest as FirmwareDeploymentCancelRequest, type index_FirmwareDeploymentListPage as FirmwareDeploymentListPage, type index_FirmwareDeploymentRollbackRequest as FirmwareDeploymentRollbackRequest, type index_FirmwareDeploymentTriggerRequest as FirmwareDeploymentTriggerRequest, type index_FirmwareDeploymentTriggerResponse as FirmwareDeploymentTriggerResponse, type index_FirmwareUploadRequest as FirmwareUploadRequest, type index_FirmwareUploadResponse as FirmwareUploadResponse, type index_GetAdmissionData as GetAdmissionData, type index_GetAdmissionError as GetAdmissionError, type index_GetAdmissionErrors as GetAdmissionErrors, type index_GetAdmissionResponse as GetAdmissionResponse, type index_GetAdmissionResponses as GetAdmissionResponses, type index_GetCommandManifestData as GetCommandManifestData, type index_GetCommandManifestError as GetCommandManifestError, type index_GetCommandManifestErrors as GetCommandManifestErrors, type index_GetCommandManifestResponse as GetCommandManifestResponse, type index_GetCommandManifestResponses as GetCommandManifestResponses, type index_GetDeviceCommandInvocationData as GetDeviceCommandInvocationData, type index_GetDeviceCommandInvocationError as GetDeviceCommandInvocationError, type index_GetDeviceCommandInvocationErrors as GetDeviceCommandInvocationErrors, type index_GetDeviceCommandInvocationResponse as GetDeviceCommandInvocationResponse, type index_GetDeviceCommandInvocationResponses as GetDeviceCommandInvocationResponses, type index_GetDeviceCommandsData as GetDeviceCommandsData, type index_GetDeviceCommandsError as GetDeviceCommandsError, type index_GetDeviceCommandsErrors as GetDeviceCommandsErrors, type index_GetDeviceCommandsResponse as GetDeviceCommandsResponse, type index_GetDeviceCommandsResponses as GetDeviceCommandsResponses, type index_GetDeviceData as GetDeviceData, type index_GetDeviceError as GetDeviceError, type index_GetDeviceErrors as GetDeviceErrors, type index_GetDeviceResponse as GetDeviceResponse, type index_GetDeviceResponses as GetDeviceResponses, type index_GetDeviceTypeData as GetDeviceTypeData, type index_GetDeviceTypeError as GetDeviceTypeError, type index_GetDeviceTypeErrors as GetDeviceTypeErrors, type index_GetDeviceTypeResponse as GetDeviceTypeResponse, type index_GetDeviceTypeResponses as GetDeviceTypeResponses, type index_GetFirmwareBundleData as GetFirmwareBundleData, type index_GetFirmwareBundleError as GetFirmwareBundleError, type index_GetFirmwareBundleErrors as GetFirmwareBundleErrors, type index_GetFirmwareBundleResponse as GetFirmwareBundleResponse, type index_GetFirmwareBundleResponses as GetFirmwareBundleResponses, type index_GetFirmwareDeploymentData as GetFirmwareDeploymentData, type index_GetFirmwareDeploymentError as GetFirmwareDeploymentError, type index_GetFirmwareDeploymentErrors as GetFirmwareDeploymentErrors, type index_GetFirmwareDeploymentResponse as GetFirmwareDeploymentResponse, type index_GetFirmwareDeploymentResponses as GetFirmwareDeploymentResponses, type index_GetIdentityData as GetIdentityData, type index_GetIdentityError as GetIdentityError, type index_GetIdentityErrors as GetIdentityErrors, type index_GetIdentityResponse as GetIdentityResponse, type index_GetIdentityResponses as GetIdentityResponses, type index_GetLatestTelemetryData as GetLatestTelemetryData, type index_GetLatestTelemetryError as GetLatestTelemetryError, type index_GetLatestTelemetryErrors as GetLatestTelemetryErrors, type index_GetLatestTelemetryResponse as GetLatestTelemetryResponse, type index_GetLatestTelemetryResponses as GetLatestTelemetryResponses, type index_GetProjectData as GetProjectData, type index_GetProjectError as GetProjectError, type index_GetProjectErrors as GetProjectErrors, type index_GetProjectResponse as GetProjectResponse, type index_GetProjectResponses as GetProjectResponses, type index_GetTelemetryHistoryData as GetTelemetryHistoryData, type index_GetTelemetryHistoryError as GetTelemetryHistoryError, type index_GetTelemetryHistoryErrors as GetTelemetryHistoryErrors, type index_GetTelemetryHistoryResponse as GetTelemetryHistoryResponse, type index_GetTelemetryHistoryResponses as GetTelemetryHistoryResponses, type index_GetTelemetryManifestData as GetTelemetryManifestData, type index_GetTelemetryManifestError as GetTelemetryManifestError, type index_GetTelemetryManifestErrors as GetTelemetryManifestErrors, type index_GetTelemetryManifestResponse as GetTelemetryManifestResponse, type index_GetTelemetryManifestResponses as GetTelemetryManifestResponses, type index_GetWebhookData as GetWebhookData, type index_GetWebhookError as GetWebhookError, type index_GetWebhookErrors as GetWebhookErrors, type index_GetWebhookResponse as GetWebhookResponse, type index_GetWebhookResponses as GetWebhookResponses, type index_Identity as Identity, type index_IdentityProject as IdentityProject, type index_IdentityToken as IdentityToken, type index_IdentityUser as IdentityUser, type index_ListAdmissionsData as ListAdmissionsData, type index_ListAdmissionsError as ListAdmissionsError, type index_ListAdmissionsErrors as ListAdmissionsErrors, type index_ListAdmissionsResponse as ListAdmissionsResponse, type index_ListAdmissionsResponses as ListAdmissionsResponses, type index_ListDeviceTypesData as ListDeviceTypesData, type index_ListDeviceTypesError as ListDeviceTypesError, type index_ListDeviceTypesErrors as ListDeviceTypesErrors, type index_ListDeviceTypesResponse as ListDeviceTypesResponse, type index_ListDeviceTypesResponses as ListDeviceTypesResponses, type index_ListDevicesData as ListDevicesData, type index_ListDevicesError as ListDevicesError, type index_ListDevicesErrors as ListDevicesErrors, type index_ListDevicesResponse as ListDevicesResponse, type index_ListDevicesResponses as ListDevicesResponses, type index_ListFirmwareBundlesData as ListFirmwareBundlesData, type index_ListFirmwareBundlesError as ListFirmwareBundlesError, type index_ListFirmwareBundlesErrors as ListFirmwareBundlesErrors, type index_ListFirmwareBundlesResponse as ListFirmwareBundlesResponse, type index_ListFirmwareBundlesResponses as ListFirmwareBundlesResponses, type index_ListFirmwareDeploymentsData as ListFirmwareDeploymentsData, type index_ListFirmwareDeploymentsError as ListFirmwareDeploymentsError, type index_ListFirmwareDeploymentsErrors as ListFirmwareDeploymentsErrors, type index_ListFirmwareDeploymentsResponse as ListFirmwareDeploymentsResponse, type index_ListFirmwareDeploymentsResponses as ListFirmwareDeploymentsResponses, type index_ListProjectsData as ListProjectsData, type index_ListProjectsError as ListProjectsError, type index_ListProjectsErrors as ListProjectsErrors, type index_ListProjectsResponse as ListProjectsResponse, type index_ListProjectsResponses as ListProjectsResponses, type index_ListWebhookDeliveriesData as ListWebhookDeliveriesData, type index_ListWebhookDeliveriesError as ListWebhookDeliveriesError, type index_ListWebhookDeliveriesErrors as ListWebhookDeliveriesErrors, type index_ListWebhookDeliveriesResponse as ListWebhookDeliveriesResponse, type index_ListWebhookDeliveriesResponses as ListWebhookDeliveriesResponses, type index_ListWebhooksData as ListWebhooksData, type index_ListWebhooksError as ListWebhooksError, type index_ListWebhooksErrors as ListWebhooksErrors, type index_ListWebhooksResponse as ListWebhooksResponse, type index_ListWebhooksResponses as ListWebhooksResponses, type index_MetricDefinition as MetricDefinition, type index_MetricGroup as MetricGroup, type index_Options as Options, type index_PageMeta as PageMeta, type index_Project as Project, type index_ProjectAppToken as ProjectAppToken, type index_ProjectListPage as ProjectListPage, type index_RejectAdmissionData as RejectAdmissionData, type index_RejectAdmissionError as RejectAdmissionError, type index_RejectAdmissionErrors as RejectAdmissionErrors, type index_RejectAdmissionResponse as RejectAdmissionResponse, type index_RejectAdmissionResponses as RejectAdmissionResponses, type index_ResetDeviceTokenData as ResetDeviceTokenData, type index_ResetDeviceTokenError as ResetDeviceTokenError, type index_ResetDeviceTokenErrors as ResetDeviceTokenErrors, type index_ResetDeviceTokenResponse as ResetDeviceTokenResponse, type index_ResetDeviceTokenResponses as ResetDeviceTokenResponses, type index_RollbackFirmwareDeploymentData as RollbackFirmwareDeploymentData, type index_RollbackFirmwareDeploymentError as RollbackFirmwareDeploymentError, type index_RollbackFirmwareDeploymentErrors as RollbackFirmwareDeploymentErrors, type index_RollbackFirmwareDeploymentResponse as RollbackFirmwareDeploymentResponse, type index_RollbackFirmwareDeploymentResponses as RollbackFirmwareDeploymentResponses, type index_RotateProjectAppTokenData as RotateProjectAppTokenData, type index_RotateProjectAppTokenError as RotateProjectAppTokenError, type index_RotateProjectAppTokenErrors as RotateProjectAppTokenErrors, type index_RotateProjectAppTokenResponse as RotateProjectAppTokenResponse, type index_RotateProjectAppTokenResponses as RotateProjectAppTokenResponses, type index_TelemetryHistory as TelemetryHistory, type index_TelemetryManifest as TelemetryManifest, type index_TelemetrySample as TelemetrySample, type index_TriggerFirmwareDeploymentData as TriggerFirmwareDeploymentData, type index_TriggerFirmwareDeploymentError as TriggerFirmwareDeploymentError, type index_TriggerFirmwareDeploymentErrors as TriggerFirmwareDeploymentErrors, type index_TriggerFirmwareDeploymentResponse as TriggerFirmwareDeploymentResponse, type index_TriggerFirmwareDeploymentResponses as TriggerFirmwareDeploymentResponses, type index_UpdateCommandManifestData as UpdateCommandManifestData, type index_UpdateCommandManifestError as UpdateCommandManifestError, type index_UpdateCommandManifestErrors as UpdateCommandManifestErrors, type index_UpdateCommandManifestResponse as UpdateCommandManifestResponse, type index_UpdateCommandManifestResponses as UpdateCommandManifestResponses, type index_UpdateDeviceTypeData as UpdateDeviceTypeData, type index_UpdateDeviceTypeError as UpdateDeviceTypeError, type index_UpdateDeviceTypeErrors as UpdateDeviceTypeErrors, type index_UpdateDeviceTypeResponse as UpdateDeviceTypeResponse, type index_UpdateDeviceTypeResponses as UpdateDeviceTypeResponses, type index_UpdateWebhookData as UpdateWebhookData, type index_UpdateWebhookError as UpdateWebhookError, type index_UpdateWebhookErrors as UpdateWebhookErrors, type index_UpdateWebhookResponse as UpdateWebhookResponse, type index_UpdateWebhookResponses as UpdateWebhookResponses, type index_UploadFirmwareData as UploadFirmwareData, type index_UploadFirmwareError as UploadFirmwareError, type index_UploadFirmwareErrors as UploadFirmwareErrors, type index_UploadFirmwareResponse as UploadFirmwareResponse, type index_UploadFirmwareResponses as UploadFirmwareResponses, type index_WebhookCreateRequest as WebhookCreateRequest, type index_WebhookCreateResponse as WebhookCreateResponse, type index_WebhookDelivery as WebhookDelivery, type index_WebhookDeliveryAttempt as WebhookDeliveryAttempt, type index_WebhookDeliveryPage as WebhookDeliveryPage, type index_WebhookEventType as WebhookEventType, type index_WebhookRetryPolicy as WebhookRetryPolicy, type index_WebhookSubscription as WebhookSubscription, type index_WebhookSubscriptionPage as WebhookSubscriptionPage, type index_WebhookUpdateRequest as WebhookUpdateRequest, index_acceptAdmission as acceptAdmission, index_cancelFirmwareDeployment as cancelFirmwareDeployment, index_createDeviceType as createDeviceType, index_createProjectAppToken as createProjectAppToken, index_createWebhook as createWebhook, index_deleteCommandManifest as deleteCommandManifest, index_deleteDevice as deleteDevice, index_deleteDeviceType as deleteDeviceType, index_deleteFirmwareBundle as deleteFirmwareBundle, index_deleteWebhook as deleteWebhook, index_dismissAdmission as dismissAdmission, index_execDeviceCommand as execDeviceCommand, index_getAdmission as getAdmission, index_getCommandManifest as getCommandManifest, index_getDevice as getDevice, index_getDeviceCommandInvocation as getDeviceCommandInvocation, index_getDeviceCommands as getDeviceCommands, index_getDeviceType as getDeviceType, index_getFirmwareBundle as getFirmwareBundle, index_getFirmwareDeployment as getFirmwareDeployment, index_getIdentity as getIdentity, index_getLatestTelemetry as getLatestTelemetry, index_getProject as getProject, index_getTelemetryHistory as getTelemetryHistory, index_getTelemetryManifest as getTelemetryManifest, index_getWebhook as getWebhook, index_listAdmissions as listAdmissions, index_listDeviceTypes as listDeviceTypes, index_listDevices as listDevices, index_listFirmwareBundles as listFirmwareBundles, index_listFirmwareDeployments as listFirmwareDeployments, index_listProjects as listProjects, index_listWebhookDeliveries as listWebhookDeliveries, index_listWebhooks as listWebhooks, index_rejectAdmission as rejectAdmission, index_resetDeviceToken as resetDeviceToken, index_rollbackFirmwareDeployment as rollbackFirmwareDeployment, index_rotateProjectAppToken as rotateProjectAppToken, index_triggerFirmwareDeployment as triggerFirmwareDeployment, index_updateCommandManifest as updateCommandManifest, index_updateDeviceType as updateDeviceType, index_updateWebhook as updateWebhook, index_uploadFirmware as uploadFirmware };
|
|
3712
|
+
}
|
|
3713
|
+
|
|
3714
|
+
export { type Admission, type AdmissionAcceptRequest, type AdmissionAcceptResponse, type AdmissionListPage, AuthenticationError, BadRequestError, BundleExistsError, type CancelDeploymentParams, type CommandArgDefinition, type CommandDefinition, type CommandInvocation, type CommandManifest, type CommandRequest, type CommandResult, type DecodedMetric, type Device, type DeviceListItem, type DeviceListPage, DeviceRpcError, type DeviceTokenReset, type DeviceType, type DeviceTypeCreateRequest, type DeviceTypeListItem, type DeviceTypeListPage, type DeviceTypeUpdateRequest, type ErrorItem, type ErrorResponse, type FirmwareBundle, type FirmwareBundleListPage, type FirmwareDeployment, type FirmwareDeploymentCancelRequest, type FirmwareDeploymentListPage, type FirmwareDeploymentTriggerRequest, type FirmwareUploadResponse, type Identity, type IdentityProject, type IdentityToken, type IdentityUser, InsufficientScopeError, type IterateBundlesParams, type IterateDeploymentsParams, type IterateDevicesParams, type IterateWebhookDeliveriesParams, type IterateWebhooksParams, type ListBundlesParams, type ListDeploymentsParams, type ListDevicesParams, type ListWebhooksParams, type MetricDefinition, type MetricGroup, NetworkError, OrbitClient, type OrbitClientOptions, OrbitError, type OrbitErrorOptions, type OrbitWebhookEvent, type Page, type PageMeta, type Project, type ProjectAppToken, type ProjectListPage, RateLimitError, ResourceNotFoundError, ServerError, type TelemetryHistory, type TelemetryHistoryParams, type TelemetryManifest, type TelemetrySample, type TerminalTicketRequest, type TerminalTicketResponse, type UploadFirmwareParams, type UsbDeviceIdentifier, type UsbExportDefinition, type UsbExportList, type UsbTicketRequest, type UsbTicketResponse, ValidationError, type ValidationFieldError, type VerifyWebhookSignatureParams, WEBHOOK_REPLAY_TOLERANCE_SECONDS, type WebhookCreateRequest, type WebhookCreateResponse, type WebhookDeliveriesParams, type WebhookDelivery, type WebhookDeliveryPage, type WebhookEventType, type WebhookSubscription, type WebhookSubscriptionPage, type WebhookUpdateRequest, decodeSample, decodeSamples, normalizeError, paginate, parseRetryAfterSeconds, parseWebhookEvent, index as raw, signWebhookPayload, verifyWebhookSignature };
|