@ambulancewa/linxio-js 2.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2000 @@
1
+ import { Socket } from 'socket.io-client';
2
+
3
+ /** Linxio identifiers are usually numbers, but some dashboard payloads emit strings. */
4
+ type LinxioId = number | string;
5
+ /** ISO-8601 date/time string, usually with a timezone offset. */
6
+ type ISODateString = string;
7
+ type JsonPrimitive = boolean | null | number | string;
8
+ type JsonValue = JsonPrimitive | JsonValue[] | {
9
+ [key: string]: JsonValue;
10
+ };
11
+ type JsonObject = {
12
+ [key: string]: JsonValue;
13
+ };
14
+ type QueryPrimitive = boolean | number | string;
15
+ type QueryValue = Date | QueryPrimitive | QueryPrimitive[] | readonly QueryPrimitive[] | null | undefined;
16
+ /** Query parameter bag accepted by low-level requests and list methods. */
17
+ type QueryParams = Record<string, QueryValue>;
18
+ type SortDirection = "asc" | "desc";
19
+ /** File formats accepted by Linxio export/report endpoints. */
20
+ type LinxioFileFormat = "csv" | "pdf" | "xlsx";
21
+ type LinxioResourceStatus = "active" | "archived" | "deleted" | "disabled" | "inactive";
22
+ /** Open object shape used for dashboard-derived payloads with partially inferred fields. */
23
+ type LinxioRecord = Record<string, unknown>;
24
+ /** Field names to request via Linxio's `fields[]` query parameter. */
25
+ type FieldSelector<TField extends string = string> = readonly TField[] | TField[];
26
+ /** Common paginated-list parameters used across Linxio endpoints. */
27
+ type ListParams<TField extends string = string> = QueryParams & {
28
+ fields?: FieldSelector<TField>;
29
+ limit?: number;
30
+ page?: number;
31
+ sort?: string;
32
+ };
33
+ /** Date-range parameters used by report and route endpoints. */
34
+ type DateRangeParams = {
35
+ dateFrom?: ISODateString;
36
+ dateTo?: ISODateString;
37
+ endDate?: ISODateString;
38
+ startDate?: ISODateString;
39
+ };
40
+ /** Normalized pagination metadata returned by SDK list methods. */
41
+ type LinxioPaginationMeta = {
42
+ limit: number;
43
+ page: number;
44
+ total: number;
45
+ };
46
+ /** Normalized page returned by SDK list methods. */
47
+ type LinxioPage<TData> = LinxioPaginationMeta & {
48
+ additionalFields?: Record<string, unknown>;
49
+ aggregations?: unknown;
50
+ data: TData[];
51
+ meta: LinxioPaginationMeta;
52
+ };
53
+ type LinxioPageEnvelope<TData> = {
54
+ additionalFields?: Record<string, unknown>;
55
+ aggregations?: unknown;
56
+ data?: TData[];
57
+ limit?: number;
58
+ meta?: Partial<LinxioPaginationMeta>;
59
+ page?: number;
60
+ total?: number;
61
+ };
62
+ /** Latitude/longitude coordinate. */
63
+ type LatLng = {
64
+ lat: number;
65
+ lng: number;
66
+ };
67
+ type LinxioUserSummary = {
68
+ fullName?: string | null;
69
+ id: LinxioId;
70
+ };
71
+ type LinxioCurrency = {
72
+ code: string;
73
+ decimals?: number;
74
+ id?: LinxioId;
75
+ name?: string;
76
+ symbol?: string;
77
+ };
78
+
79
+ /** Fetch-compatible function used by the SDK HTTP layer. */
80
+ type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
81
+ /** HTTP methods accepted by {@link HttpClient.request}. */
82
+ type HttpMethod = "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
83
+ /** Response parser to use for a request. Defaults to JSON. */
84
+ type ResponseType = "arrayBuffer" | "blob" | "json" | "raw" | "text";
85
+ /** Retry policy for Linxio requests. */
86
+ type RetryOptions = {
87
+ /** Initial backoff delay in milliseconds. Set to `0` in tests. */
88
+ delayMs?: number;
89
+ /** Maximum exponential backoff delay. */
90
+ maxDelayMs?: number;
91
+ /** Retry POST/PATCH/PUT/DELETE requests. Defaults to false. */
92
+ retryUnsafeMethods?: boolean;
93
+ /** Number of retries after the first attempt. Defaults to 3. */
94
+ retries?: number;
95
+ };
96
+ /** Per-request options accepted by the low-level HTTP client. */
97
+ type LinxioHttpRequestOptions = {
98
+ /** Request body for mutation methods. Objects are JSON encoded. */
99
+ body?: unknown;
100
+ /** Additional request headers. */
101
+ headers?: HeadersInit;
102
+ /** Optional idempotency key for caller-managed retry safety. */
103
+ idempotencyKey?: string;
104
+ /** Query parameters to append to the request URL. */
105
+ params?: QueryParams;
106
+ /** Response parser override. */
107
+ responseType?: ResponseType;
108
+ /** Abort signal for caller-managed cancellation. */
109
+ signal?: AbortSignal;
110
+ /** Skip the bearer token for this request. */
111
+ skipAuth?: boolean;
112
+ /** Skip automatic refresh handling for this request. */
113
+ skipAuthRefresh?: boolean;
114
+ /** Override the client timeout for this request. */
115
+ timeoutMs?: number;
116
+ };
117
+ /** Constructor configuration for {@link HttpClient}. */
118
+ type LinxioHttpConfig = {
119
+ /** REST API base URL. */
120
+ baseUrl?: string;
121
+ /** Fetch implementation. Defaults to `globalThis.fetch`. */
122
+ fetch?: FetchLike;
123
+ /** Refresh-token provider used for automatic 401 recovery. */
124
+ getRefreshToken?: () => string | undefined;
125
+ /** JWT provider used to set the Authorization header. */
126
+ getToken?: () => string | undefined;
127
+ /** Called when the SDK receives a fresh token from `/token/refresh`. */
128
+ onSession?: (session: {
129
+ expireAt?: string;
130
+ refreshToken?: string;
131
+ token?: string;
132
+ }) => void;
133
+ /** Retry policy for idempotent requests. */
134
+ retry?: RetryOptions;
135
+ /** Default timeout in milliseconds. */
136
+ timeoutMs?: number;
137
+ };
138
+ /**
139
+ * Low-level fetch-based Linxio HTTP client.
140
+ *
141
+ * Domain services use this class internally. It is exported for advanced
142
+ * scripts that need custom endpoints while retaining auth headers, timeouts,
143
+ * idempotent retries, parsed API errors, and automatic token refresh.
144
+ */
145
+ declare class HttpClient {
146
+ /** Normalized REST API base URL without a trailing slash. */
147
+ readonly baseUrl: string;
148
+ private readonly fetcher;
149
+ private readonly getRefreshToken;
150
+ private readonly getToken;
151
+ private readonly onSession?;
152
+ private readonly retry;
153
+ private readonly timeoutMs;
154
+ private refreshInFlight?;
155
+ constructor(config?: LinxioHttpConfig);
156
+ /** Send a GET request. */
157
+ get<TResponse = unknown>(path: string, options?: LinxioHttpRequestOptions): Promise<TResponse>;
158
+ /** Send a POST request. */
159
+ post<TResponse = unknown>(path: string, body?: unknown, options?: LinxioHttpRequestOptions): Promise<TResponse>;
160
+ /** Send a PATCH request. */
161
+ patch<TResponse = unknown>(path: string, body?: unknown, options?: LinxioHttpRequestOptions): Promise<TResponse>;
162
+ /** Send a PUT request. */
163
+ put<TResponse = unknown>(path: string, body?: unknown, options?: LinxioHttpRequestOptions): Promise<TResponse>;
164
+ /** Send a DELETE request. */
165
+ delete<TResponse = unknown>(path: string, options?: LinxioHttpRequestOptions): Promise<TResponse>;
166
+ /** Send a request with an arbitrary HTTP method. */
167
+ request<TResponse = unknown>(method: HttpMethod, path: string, options?: LinxioHttpRequestOptions): Promise<TResponse>;
168
+ /** Build the final request URL, including query parameters. */
169
+ buildUrl(path: string, params?: QueryParams): URL;
170
+ private requestWithRefresh;
171
+ private refreshSession;
172
+ private sendWithRetries;
173
+ private sendOnce;
174
+ private prepareHeaders;
175
+ private parseResponse;
176
+ private shouldRetryMethod;
177
+ private delayForAttempt;
178
+ private pathForError;
179
+ }
180
+
181
+ /** Linxio realtime Socket.IO namespace. */
182
+ type LinxioRealtimeNamespace = "coordinates" | "notifications";
183
+ /** Live vehicle position payload received from the coordinates socket. */
184
+ type LinxioTrackingPosition = LinxioRecord & LatLng & {
185
+ address?: string | null;
186
+ deviceId?: LinxioId;
187
+ driverId?: LinxioId | null;
188
+ heading?: number | null;
189
+ speed?: number | null;
190
+ ts?: ISODateString;
191
+ vehicleId: LinxioId;
192
+ };
193
+ /** Notification payload received from the notifications socket. */
194
+ type LinxioNotification = LinxioRecord & {
195
+ id?: LinxioId;
196
+ message?: string;
197
+ occurredAt?: ISODateString;
198
+ readAt?: ISODateString | null;
199
+ type?: string;
200
+ vehicleId?: LinxioId | null;
201
+ };
202
+ /** Acknowledgement returned by Linxio's realtime `subscribe` event. */
203
+ type LinxioRealtimeSubscribeAck = {
204
+ error?: string;
205
+ success?: boolean;
206
+ [key: string]: unknown;
207
+ };
208
+ /** Subscription handle for code that prefers object cleanup. */
209
+ type LinxioRealtimeSubscription = {
210
+ unsubscribe: () => void;
211
+ };
212
+
213
+ /** Configuration for Linxio Socket.IO connections. */
214
+ type RealtimeClientOptions = {
215
+ /** Realtime host. Defaults to `https://track.linxio.com`. */
216
+ baseUrl?: string;
217
+ /** Token provider used when `connect()` is called without an explicit token. */
218
+ getToken?: () => string | undefined;
219
+ /** Socket.IO path. Linxio uses `/socket.io`. */
220
+ path?: string;
221
+ /** Maximum reconnection attempts before Socket.IO gives up. */
222
+ reconnectionAttempts?: number;
223
+ };
224
+ /** Handler called when a realtime payload is received. */
225
+ type RealtimeEventHandler<TPayload> = (payload: TPayload) => void;
226
+ /** Function returned by realtime listeners to detach the handler. */
227
+ type RealtimeUnsubscribe = () => void;
228
+ /**
229
+ * Socket.IO client for Linxio live tracking and notifications.
230
+ *
231
+ * Linxio documents two namespaces: `coordinates` for live vehicle positions and
232
+ * `notifications` for configured notification messages.
233
+ */
234
+ declare class RealtimeClient {
235
+ private readonly baseUrl;
236
+ private readonly getToken;
237
+ private readonly path;
238
+ private readonly reconnectionAttempts;
239
+ private readonly sockets;
240
+ constructor(options?: RealtimeClientOptions);
241
+ /** Connect to a Linxio realtime namespace and reuse existing sockets. */
242
+ connect(namespace: LinxioRealtimeNamespace, token?: string | undefined): Socket;
243
+ /** Subscribe the current realtime socket to a set of vehicle IDs. */
244
+ subscribe(vehicleIds: readonly LinxioId[], namespace?: LinxioRealtimeNamespace): Promise<LinxioRealtimeSubscribeAck>;
245
+ /**
246
+ * Subscribe to live vehicle coordinates.
247
+ *
248
+ * The returned function removes event handlers. It does not disconnect the
249
+ * socket, allowing other subscriptions to keep running.
250
+ */
251
+ onPosition(vehicleIds: readonly LinxioId[], handler: RealtimeEventHandler<LinxioTrackingPosition>): RealtimeUnsubscribe;
252
+ /** Listen for Linxio notification messages. */
253
+ onNotification(handler: RealtimeEventHandler<LinxioNotification>): RealtimeUnsubscribe;
254
+ /** Listen for a custom notification event type emitted by Linxio. */
255
+ onNotificationType<TPayload = LinxioNotification>(type: string, handler: RealtimeEventHandler<TPayload>): RealtimeUnsubscribe;
256
+ /** Disconnect one namespace or every active realtime socket. */
257
+ disconnect(namespace?: LinxioRealtimeNamespace): void;
258
+ }
259
+
260
+ /** Context attached to SDK errors. */
261
+ type LinxioErrorContext = {
262
+ cause?: unknown;
263
+ method?: string;
264
+ path?: string;
265
+ requestId?: string;
266
+ };
267
+ /** Base class for all SDK-defined errors. */
268
+ declare class LinxioError extends Error {
269
+ readonly cause?: unknown;
270
+ readonly method?: string;
271
+ readonly path?: string;
272
+ readonly requestId?: string;
273
+ constructor(message: string, context?: LinxioErrorContext);
274
+ }
275
+ /** Thrown when the SDK is missing required runtime configuration. */
276
+ declare class LinxioConfigurationError extends LinxioError {
277
+ constructor(message: string, context?: LinxioErrorContext);
278
+ }
279
+ /** Thrown when a request fails before Linxio returns an HTTP response. */
280
+ declare class LinxioNetworkError extends LinxioError {
281
+ constructor(message: string, context?: LinxioErrorContext);
282
+ }
283
+ /** Thrown when a request exceeds its configured timeout. */
284
+ declare class LinxioTimeoutError extends LinxioNetworkError {
285
+ constructor(message: string, context?: LinxioErrorContext);
286
+ }
287
+ /** Context attached to {@link LinxioApiError}. */
288
+ type LinxioApiErrorContext = LinxioErrorContext & {
289
+ body?: unknown;
290
+ headers?: Headers;
291
+ status: number;
292
+ statusText?: string;
293
+ };
294
+ /**
295
+ * Thrown when Linxio returns a non-2xx HTTP response.
296
+ *
297
+ * Inspect `status`, `body`, `requestId`, `method`, and `path` for diagnostics.
298
+ */
299
+ declare class LinxioApiError extends LinxioError {
300
+ readonly body?: unknown;
301
+ readonly headers?: Headers;
302
+ readonly status: number;
303
+ readonly statusText?: string;
304
+ constructor(message: string, context: LinxioApiErrorContext);
305
+ get isAuthenticationError(): boolean;
306
+ get isRateLimitError(): boolean;
307
+ get isValidationError(): boolean;
308
+ }
309
+ /** Thrown for SDK-side authentication failures before an API response exists. */
310
+ declare class LinxioAuthenticationError extends LinxioError {
311
+ constructor(message: string, context?: LinxioErrorContext);
312
+ }
313
+ /** Thrown when client-side validation fails. */
314
+ declare class LinxioValidationError extends LinxioError {
315
+ readonly issues?: unknown;
316
+ constructor(message: string, context?: LinxioErrorContext & {
317
+ issues?: unknown;
318
+ });
319
+ }
320
+ /** Thrown by the realtime Socket.IO client. */
321
+ declare class LinxioRealtimeError extends LinxioError {
322
+ constructor(message: string, context?: LinxioErrorContext);
323
+ }
324
+
325
+ /** Successful SDK operation result. */
326
+ type LinxioSuccess<TData> = {
327
+ /** Data returned by Linxio. */
328
+ data: TData;
329
+ /** Always `null` when the operation succeeds. */
330
+ error: null;
331
+ };
332
+ /** Failed SDK operation result. */
333
+ type LinxioFailure<TError extends LinxioError = LinxioError> = {
334
+ /** Always `null` when the operation fails. */
335
+ data: null;
336
+ /** Typed SDK error with request context where available. */
337
+ error: TError;
338
+ };
339
+ /** Standard result returned by SDK service methods. */
340
+ type LinxioResult<TData, TError extends LinxioError = LinxioError> = LinxioFailure<TError> | LinxioSuccess<TData>;
341
+ /** Successful paginated SDK result. */
342
+ type LinxioPageSuccess<TData> = LinxioPaginationMeta & {
343
+ /** Additional fields returned by selected Linxio endpoints. */
344
+ additionalFields?: Record<string, unknown>;
345
+ /** Aggregation data returned by selected Linxio endpoints. */
346
+ aggregations?: unknown;
347
+ /** Records returned for the current page. */
348
+ data: TData[];
349
+ /** Always `null` when the operation succeeds. */
350
+ error: null;
351
+ /** Normalized pagination metadata. */
352
+ meta: LinxioPaginationMeta;
353
+ };
354
+ /** Failed paginated SDK result. */
355
+ type LinxioPageFailure<TError extends LinxioError = LinxioError> = {
356
+ /** Always `null` when the operation fails. */
357
+ data: null;
358
+ /** Typed SDK error with request context where available. */
359
+ error: TError;
360
+ /** Page limit is unavailable when the request fails. */
361
+ limit: null;
362
+ /** Pagination metadata is unavailable when the request fails. */
363
+ meta: null;
364
+ /** Page number is unavailable when the request fails. */
365
+ page: null;
366
+ /** Total count is unavailable when the request fails. */
367
+ total: null;
368
+ };
369
+ /** Paginated result returned by SDK list/report methods. */
370
+ type LinxioPageResult<TData, TError extends LinxioError = LinxioError> = LinxioPageFailure<TError> | LinxioPageSuccess<TData>;
371
+ /** Create a successful result object. */
372
+ declare function ok<TData>(data: TData): LinxioSuccess<TData>;
373
+ /** Create a failed result object from an unknown thrown value. */
374
+ declare function fail(error: unknown): LinxioFailure<LinxioError>;
375
+ /** Convert a throwing promise factory into a standard SDK result. */
376
+ declare function toResult<TData>(operation: () => Promise<TData>): Promise<LinxioResult<TData>>;
377
+ /** Create a successful paginated result object. */
378
+ declare function pageOk<TData>(page: LinxioPage<TData>): LinxioPageSuccess<TData>;
379
+ /** Create a failed paginated result object from an unknown thrown value. */
380
+ declare function pageFail(error: unknown): LinxioPageFailure<LinxioError>;
381
+ /** Return `true` when a result contains a typed SDK error. */
382
+ declare function isLinxioFailure(result: LinxioPageResult<unknown> | LinxioResult<unknown>): result is LinxioFailure | LinxioPageFailure;
383
+ /** Return the data from a result or throw the contained SDK error. */
384
+ declare function unwrapLinxioResult<TData>(result: LinxioResult<TData>): TData;
385
+ /** Return the page result or throw the contained SDK error. */
386
+ declare function unwrapLinxioPageResult<TData>(result: LinxioPageResult<TData>): LinxioPageSuccess<TData>;
387
+ /** Convert arbitrary thrown values into the SDK base error type. */
388
+ declare function toLinxioError(error: unknown): LinxioError;
389
+
390
+ /** Linxio team type returned by login and current-user endpoints. */
391
+ type LinxioTeamType = "admin" | "client" | "reseller" | (string & {});
392
+ /** Credentials for `client.auth.login()`. */
393
+ type LinxioLoginRequest = {
394
+ domain?: string;
395
+ email: string;
396
+ password: string;
397
+ };
398
+ /** Response returned by the documented `/login` endpoint. */
399
+ type LinxioLoginResponse = {
400
+ expireAt?: ISODateString;
401
+ loginWithId?: boolean;
402
+ otp_required?: boolean;
403
+ refreshToken?: string;
404
+ roleId?: LinxioId;
405
+ teamType?: LinxioTeamType;
406
+ token: string;
407
+ };
408
+ /** Response returned by `/token/refresh`. */
409
+ type LinxioRefreshTokenResponse = {
410
+ expireAt?: ISODateString;
411
+ refreshToken?: string;
412
+ token: string;
413
+ };
414
+ /** In-memory token state used by {@link import("../client").LinxioClient}. */
415
+ type LinxioSession = {
416
+ expireAt?: ISODateString;
417
+ refreshToken?: string;
418
+ token?: string;
419
+ };
420
+ /** Payload for OTP verification when Linxio requires a one-time password. */
421
+ type LinxioOtpVerificationRequest = {
422
+ code: string;
423
+ email: string;
424
+ };
425
+ /** Current-user object returned by `/me`; fields vary by role and requested selectors. */
426
+ type LinxioCurrentUser = JsonObject & {
427
+ dateFormat?: string;
428
+ email?: string;
429
+ fullName?: string;
430
+ id?: LinxioId;
431
+ permissions?: string[];
432
+ team?: JsonObject & {
433
+ clientId?: LinxioId;
434
+ id?: LinxioId;
435
+ name?: string;
436
+ resellerId?: LinxioId;
437
+ };
438
+ teamType?: LinxioTeamType;
439
+ };
440
+
441
+ declare abstract class BaseService {
442
+ protected readonly http: HttpClient;
443
+ constructor(http: HttpClient);
444
+ protected getPage<TData, TField extends string = string>(path: string, params?: ListParams<TField>, options?: LinxioHttpRequestOptions): Promise<LinxioPageResult<TData>>;
445
+ protected result<TData>(operation: () => Promise<TData>): Promise<LinxioResult<TData>>;
446
+ protected listParams<TField extends string>(params?: ListParams<TField>): QueryParams;
447
+ }
448
+
449
+ /** Authentication and session-related Linxio endpoints. */
450
+ declare class AuthService extends BaseService {
451
+ private readonly setSession;
452
+ constructor(http: HttpClient, setSession: (session: LinxioSession) => void);
453
+ /**
454
+ * Log in with Linxio credentials.
455
+ *
456
+ * The returned JWT and refresh token are stored in the parent client so
457
+ * subsequent requests are authenticated automatically.
458
+ */
459
+ login(request: LinxioLoginRequest): Promise<LinxioResult<LinxioLoginResponse>>;
460
+ /** Verify a one-time password when Linxio requires OTP for the account. */
461
+ verifyOtp(request: LinxioOtpVerificationRequest): Promise<LinxioResult<LinxioLoginResponse>>;
462
+ /** Refresh a JWT manually and update the client session. */
463
+ refresh(refreshToken: string): Promise<LinxioResult<LinxioSession>>;
464
+ /** Fetch the current authenticated Linxio user. */
465
+ me(fields?: FieldSelector<string>): Promise<LinxioResult<LinxioCurrentUser>>;
466
+ /** Log out the current Linxio session server-side. */
467
+ logout(): Promise<LinxioResult<void>>;
468
+ private applySession;
469
+ }
470
+
471
+ /** Dash cam event endpoints discovered from the dashboard bundle. */
472
+ declare class CamerasService extends BaseService {
473
+ /** List camera events. */
474
+ events(params?: ListParams): Promise<LinxioPageResult<LinxioRecord>>;
475
+ /** List camera event types. */
476
+ eventTypes(): Promise<LinxioResult<LinxioRecord[]>>;
477
+ }
478
+
479
+ /** Client account record. */
480
+ type LinxioClientAccount = LinxioRecord & {
481
+ id: LinxioId;
482
+ name?: string | null;
483
+ timezone?: LinxioId | null;
484
+ };
485
+ /** Parameters for client user list endpoints. */
486
+ type LinxioClientUserListParams = ListParams & {
487
+ role?: string;
488
+ };
489
+ /** Reseller account record. */
490
+ type LinxioReseller = LinxioRecord & {
491
+ id: LinxioId;
492
+ name?: string | null;
493
+ };
494
+
495
+ /** Common field names for user list responses. */
496
+ type UserField = "id" | "email" | "fullName" | "name" | "surname" | "role" | "status" | (string & {});
497
+ /** User record returned by Linxio user endpoints. */
498
+ type LinxioUser = LinxioRecord & {
499
+ email?: string | null;
500
+ fullName?: string | null;
501
+ id: LinxioId;
502
+ name?: string | null;
503
+ role?: string | null;
504
+ status?: string | null;
505
+ surname?: string | null;
506
+ };
507
+ /** Payload for creating or updating a user. */
508
+ type LinxioUserPayload = LinxioRecord & {
509
+ email?: string;
510
+ firstName?: string;
511
+ fullName?: string;
512
+ lastName?: string;
513
+ name?: string;
514
+ phone?: string;
515
+ roleId?: LinxioId;
516
+ surname?: string;
517
+ };
518
+ /** Parameters for `client.users.list()`. */
519
+ type LinxioUserListParams = ListParams<UserField> & {
520
+ role?: string;
521
+ };
522
+
523
+ /** Client account and client-user endpoints. */
524
+ declare class ClientsService extends BaseService {
525
+ /** List client accounts from the dashboard-derived endpoint. */
526
+ list(params?: LinxioClientUserListParams): Promise<LinxioPageResult<LinxioClientAccount>>;
527
+ /** Fetch one client account by ID. */
528
+ get(clientId: LinxioId): Promise<LinxioResult<LinxioClientAccount>>;
529
+ /** List users for a client account. */
530
+ listUsers(clientId: LinxioId, params?: LinxioClientUserListParams): Promise<LinxioPageResult<LinxioUser>>;
531
+ /** Load every user page for a client account into a single result. */
532
+ iterateUsers(clientId: LinxioId, params?: LinxioClientUserListParams): Promise<LinxioResult<LinxioUser[]>>;
533
+ /** Stream users for a client account without loading every user at once. */
534
+ streamUsers(clientId: LinxioId, params?: LinxioClientUserListParams): AsyncGenerator<LinxioUser, void, undefined>;
535
+ /** Create a user within a client account. */
536
+ createUser(clientId: LinxioId, payload: LinxioUserPayload): Promise<LinxioResult<LinxioUser>>;
537
+ /** Update a user within a client account. */
538
+ updateUser(clientId: LinxioId, userId: LinxioId, payload: LinxioUserPayload): Promise<LinxioResult<LinxioUser>>;
539
+ /** Fetch one user within a client account. */
540
+ getUser(clientId: LinxioId, userId: LinxioId): Promise<LinxioResult<LinxioUser>>;
541
+ }
542
+ /** Reseller endpoints discovered from the dashboard bundle. */
543
+ declare class ResellersService extends BaseService {
544
+ /** List reseller accounts. */
545
+ list(): Promise<LinxioResult<LinxioReseller[]>>;
546
+ /** Fetch one reseller account by ID. */
547
+ get(resellerId: LinxioId): Promise<LinxioResult<LinxioReseller>>;
548
+ }
549
+
550
+ /** Common field names for Linxio device list responses. */
551
+ type DeviceField = "id" | "imei" | "serial" | "status" | "vehicle" | "usage" | "vendor" | "model" | "trackerData" | "deviceInstallation" | (string & {});
552
+ /** Device record returned by Linxio device endpoints. */
553
+ type LinxioDevice = LinxioRecord & {
554
+ createdAt?: ISODateString | null;
555
+ createdBy?: LinxioUserAuditSummary | null;
556
+ deviceInstallation?: LinxioDeviceInstallation | null;
557
+ hasCameras?: boolean;
558
+ hw?: string | null;
559
+ iccid?: string | null;
560
+ id: LinxioId;
561
+ imei?: string | null;
562
+ imsi?: string | null;
563
+ installDate?: ISODateString | null;
564
+ isDeactivated?: boolean;
565
+ isFixWithSpeed?: boolean;
566
+ isUnavailable?: boolean;
567
+ lastActiveTime?: ISODateString | null;
568
+ lastCoordinates?: (LatLng & {
569
+ ts?: ISODateString;
570
+ }) | null;
571
+ lastDataReceivedAt?: ISODateString | null;
572
+ model?: LinxioDeviceModel | string | null;
573
+ phone?: string | null;
574
+ port?: number | null;
575
+ professionalInstall?: boolean | null;
576
+ serial?: string | null;
577
+ sn?: string | null;
578
+ status?: string | null;
579
+ statusExt?: string | null;
580
+ statusUpdatedAt?: ISODateString | null;
581
+ sw?: string | null;
582
+ team?: LinxioTeamSummary | null;
583
+ trackerData?: LinxioRecord | null;
584
+ uninstallDate?: ISODateString | null;
585
+ updatedAt?: ISODateString | null;
586
+ updatedBy?: LinxioUserAuditSummary | null;
587
+ usage?: string | null;
588
+ vehicleId?: LinxioId | null;
589
+ vendor?: LinxioDeviceVendor | string | null;
590
+ };
591
+ /** Parameters for `client.devices.list()`. */
592
+ type LinxioDeviceListParams = ListParams<DeviceField>;
593
+ /** Payload for creating or updating a device. */
594
+ type LinxioDevicePayload = LinxioRecord & {
595
+ imei?: string;
596
+ serial?: string;
597
+ typeId?: LinxioId;
598
+ usage?: string;
599
+ vendorId?: LinxioId;
600
+ };
601
+ /** Payload for installing a device into a vehicle. */
602
+ type LinxioDeviceInstallationPayload = LinxioRecord & {
603
+ installedAt?: ISODateString;
604
+ odometer?: number;
605
+ vehicleId: LinxioId;
606
+ };
607
+ /** Payload for uninstalling a device from a vehicle. */
608
+ type LinxioDeviceUninstallPayload = LinxioRecord & {
609
+ odometer?: number;
610
+ uninstalledAt?: ISODateString;
611
+ };
612
+ /** Coordinate reported by a device. */
613
+ type LinxioDeviceCoordinate = LinxioRecord & LatLng & {
614
+ deviceId?: LinxioId;
615
+ id?: LinxioId;
616
+ ts?: ISODateString;
617
+ };
618
+ /** Optional filters for recent device coordinates. */
619
+ type LinxioDeviceCoordinateParams = DateRangeParams & QueryParams & {
620
+ filter?: string;
621
+ sameTimeEachDay?: boolean;
622
+ };
623
+ /** Lookup parameters for the live `/devices/installation/` endpoint. */
624
+ type LinxioDeviceInstallationLookupParams = QueryParams & {
625
+ deviceImei?: string;
626
+ vehicleRegNo?: string;
627
+ };
628
+ /** Device vendor record from the dashboard-derived vendor endpoint. */
629
+ type LinxioDeviceVendor = LinxioRecord & {
630
+ id?: LinxioId;
631
+ models?: LinxioDeviceModel[];
632
+ name?: string;
633
+ };
634
+ /** Device model nested under vendor and device responses. */
635
+ type LinxioDeviceModel = LinxioRecord & {
636
+ id?: LinxioId;
637
+ name?: string;
638
+ vendorId?: LinxioId;
639
+ };
640
+ /** Device installation row from the dashboard-derived installation endpoint. */
641
+ type LinxioDeviceInstallation = LinxioRecord & {
642
+ device?: LinxioRecord | null;
643
+ deviceId?: LinxioId;
644
+ files?: LinxioRecord[];
645
+ id?: LinxioId;
646
+ installDate?: ISODateString | null;
647
+ installedAt?: ISODateString | null;
648
+ odometer?: number | null;
649
+ uninstallDate?: ISODateString | null;
650
+ uninstalledAt?: ISODateString | null;
651
+ vehicle?: LinxioRecord | null;
652
+ vehicleId?: LinxioId;
653
+ };
654
+ /** Camera record associated with a device. */
655
+ type LinxioDeviceCamera = LinxioRecord & {
656
+ deviceId?: LinxioId;
657
+ expiredAt?: ISODateString | null;
658
+ id?: LinxioId;
659
+ isAvailable?: boolean;
660
+ name?: string;
661
+ status?: string;
662
+ type?: string;
663
+ url?: string;
664
+ };
665
+ type LinxioTeamSummary = LinxioRecord & {
666
+ clientId?: LinxioId | null;
667
+ clientName?: string | null;
668
+ id?: LinxioId;
669
+ resellerId?: LinxioId | null;
670
+ resellerName?: string | null;
671
+ type?: string;
672
+ };
673
+ type LinxioUserAuditSummary = LinxioRecord & {
674
+ email?: string | null;
675
+ fullName?: string | null;
676
+ id?: LinxioId;
677
+ teamType?: string | null;
678
+ };
679
+
680
+ /** Common field names for Linxio sensor list responses. */
681
+ type SensorField = "id" | "label" | "sensorId" | "systemStatus" | "team" | "type" | (string & {});
682
+ /** Sensor record returned by Linxio sensor endpoints. */
683
+ type LinxioSensor = LinxioRecord & {
684
+ createdAt?: ISODateString | null;
685
+ createdBy?: LinxioRecord | null;
686
+ deviceId?: LinxioId | null;
687
+ id: LinxioId;
688
+ isAutoCreated?: boolean;
689
+ label?: string | null;
690
+ name?: string | null;
691
+ sensorId?: string | null;
692
+ systemStatus?: string | null;
693
+ team?: LinxioRecord | null;
694
+ type?: string | null;
695
+ updatedAt?: ISODateString | null;
696
+ updatedBy?: LinxioRecord | null;
697
+ vehicleId?: LinxioId | null;
698
+ };
699
+ /** Parameters for `client.sensors.list()`. */
700
+ type LinxioSensorListParams = ListParams<SensorField>;
701
+ /** Temperature/humidity reading returned by sensor reports. */
702
+ type LinxioTemperatureHumidityReading = LinxioRecord & {
703
+ humidity?: number | null;
704
+ occurredAt?: ISODateString;
705
+ sensorId?: LinxioId;
706
+ temperature?: number | null;
707
+ vehicleId?: LinxioId;
708
+ };
709
+ /** Parameters for temperature/humidity sensor reports. */
710
+ type LinxioSensorReportParams = DateRangeParams & ListParams & {
711
+ sensorId?: LinxioId;
712
+ vehicleId?: LinxioId;
713
+ };
714
+
715
+ /** Device inventory, install, uninstall, coordinate, and sensor endpoints. */
716
+ declare class DevicesService extends BaseService {
717
+ /** List devices using Linxio's documented `/devices/json` endpoint. */
718
+ list(params?: LinxioDeviceListParams): Promise<LinxioPageResult<LinxioDevice>>;
719
+ /** Load every device page into a single result. */
720
+ iterate(params?: LinxioDeviceListParams): Promise<LinxioResult<LinxioDevice[]>>;
721
+ /** Stream every device page without loading the whole inventory at once. */
722
+ stream(params?: LinxioDeviceListParams): AsyncGenerator<LinxioDevice, void, undefined>;
723
+ /** Fetch one device by internal Linxio device ID. */
724
+ get(deviceId: LinxioId): Promise<LinxioResult<LinxioDevice>>;
725
+ /** Create a device. */
726
+ create(payload: LinxioDevicePayload): Promise<LinxioResult<LinxioDevice>>;
727
+ /** Update a device using Linxio's documented PATCH endpoint. */
728
+ update(deviceId: LinxioId, payload: LinxioDevicePayload): Promise<LinxioResult<LinxioDevice>>;
729
+ /** Install a device into a vehicle. */
730
+ install(deviceId: LinxioId, payload: LinxioDeviceInstallationPayload): Promise<LinxioResult<LinxioDevice>>;
731
+ /** Uninstall a device from its current vehicle. */
732
+ uninstall(deviceId: LinxioId, payload?: LinxioDeviceUninstallPayload): Promise<LinxioResult<LinxioDevice>>;
733
+ /** Soft-archive a device when the dashboard endpoint is available. */
734
+ archive(deviceId: LinxioId): Promise<LinxioResult<void>>;
735
+ /** Restore a previously archived device. */
736
+ restore(deviceId: LinxioId): Promise<LinxioResult<void>>;
737
+ /** Fetch recent coordinates for a device from the dashboard-derived endpoint. */
738
+ coordinates(deviceId: LinxioId, params?: LinxioDeviceCoordinateParams): Promise<LinxioResult<LinxioDeviceCoordinate[]>>;
739
+ /** List sensor history rows for a device. */
740
+ sensors(deviceId: LinxioId, params?: LinxioSensorListParams): Promise<LinxioPageResult<LinxioSensor>>;
741
+ /** Fetch device history entries from the dashboard-derived endpoint. */
742
+ history(deviceId: LinxioId): Promise<LinxioResult<LinxioRecord[]>>;
743
+ /** List device vendors from the dashboard-derived endpoint. */
744
+ vendors(): Promise<LinxioResult<LinxioDeviceVendor[]>>;
745
+ /** Look up a device installation by device IMEI or vehicle registration. */
746
+ installation(params?: LinxioDeviceInstallationLookupParams): Promise<LinxioResult<LinxioDeviceInstallation | null>>;
747
+ /** Backwards-compatible alias for `installation()`. */
748
+ installations(params?: LinxioDeviceInstallationLookupParams): Promise<LinxioResult<LinxioDeviceInstallation | null>>;
749
+ /** List cameras attached to a device from the dashboard-derived endpoint. */
750
+ cameras(deviceId: LinxioId): Promise<LinxioResult<LinxioDeviceCamera[]>>;
751
+ }
752
+
753
+ /** Common field names for driver list responses. */
754
+ type DriverField = "id" | "fullName" | "name" | "surname" | "email" | "phone" | "role" | (string & {});
755
+ /** Driver user record. */
756
+ type LinxioDriver = LinxioRecord & {
757
+ email?: string | null;
758
+ fullName?: string | null;
759
+ id: LinxioId;
760
+ name?: string | null;
761
+ phone?: string | null;
762
+ surname?: string | null;
763
+ };
764
+ /** Parameters for `client.drivers.list()`. */
765
+ type LinxioDriverListParams = ListParams<DriverField> & {
766
+ clientId?: LinxioId;
767
+ };
768
+
769
+ /** Driver listing and vehicle assignment endpoints. */
770
+ declare class DriversService extends BaseService {
771
+ /** List drivers, optionally via the documented client-users driver endpoint. */
772
+ list(params?: LinxioDriverListParams): Promise<LinxioPageResult<LinxioDriver>>;
773
+ /** Load every driver page into a single result. */
774
+ iterate(params?: LinxioDriverListParams): Promise<LinxioResult<LinxioDriver[]>>;
775
+ /** Stream every driver page without loading every driver at once. */
776
+ stream(params?: LinxioDriverListParams): AsyncGenerator<LinxioDriver, void, undefined>;
777
+ /** Assign a driver to a vehicle. */
778
+ assignToVehicle(vehicleId: LinxioId, driverId: LinxioId): Promise<LinxioResult<void>>;
779
+ /** Unassign a driver from a vehicle. */
780
+ unassignFromVehicle(vehicleId: LinxioId, driverId: LinxioId): Promise<LinxioResult<void>>;
781
+ }
782
+
783
+ /** Common field names for fuel record list responses. */
784
+ type FuelRecordField = "transactionDate" | "vehicleIds" | "driverId" | "refueled" | "total" | "fuelPrice" | "petrolStation" | (string & {});
785
+ /** Fuel transaction record. */
786
+ type LinxioFuelRecord = LinxioRecord & {
787
+ driver?: string | null;
788
+ fuelCardNumber?: string | null;
789
+ fuelPrice?: number | null;
790
+ id: LinxioId;
791
+ petrolStation?: string | null;
792
+ refueled?: number | null;
793
+ total?: number | null;
794
+ transactionDate?: ISODateString;
795
+ vehicle?: LinxioRecord | null;
796
+ };
797
+ /** Fuel summary row. */
798
+ type LinxioFuelSummaryRecord = LinxioRecord & {
799
+ depot?: string | null;
800
+ groups?: string | null;
801
+ mileage?: number | null;
802
+ refueled?: number | null;
803
+ regNo?: string | null;
804
+ total?: number | null;
805
+ };
806
+ /** Parameters for fuel list and summary endpoints. */
807
+ type LinxioFuelListParams = ListParams<FuelRecordField>;
808
+ /** Fuel card record. */
809
+ type LinxioFuelCard = LinxioRecord & {
810
+ cardNumber?: string;
811
+ id: LinxioId;
812
+ vehicleId?: LinxioId | null;
813
+ };
814
+
815
+ /** Fuel card, fuel transaction, and fuel summary endpoints. */
816
+ declare class FuelService extends BaseService {
817
+ /** List fuel transaction records from the dashboard-derived endpoint. */
818
+ records(params?: LinxioFuelListParams): Promise<LinxioPageResult<LinxioFuelRecord>>;
819
+ /** Load every fuel transaction page into a single result. */
820
+ iterateRecords(params?: LinxioFuelListParams): Promise<LinxioResult<LinxioFuelRecord[]>>;
821
+ /** Stream fuel transaction records without loading every record at once. */
822
+ streamRecords(params?: LinxioFuelListParams): AsyncGenerator<LinxioFuelRecord, void, undefined>;
823
+ /** Fetch fuel summary rows. */
824
+ summary(params?: LinxioFuelListParams): Promise<LinxioPageResult<LinxioFuelSummaryRecord>>;
825
+ /** Fetch fuel transaction records grouped or filtered by vehicle. */
826
+ recordsByVehicle(params?: LinxioFuelListParams): Promise<LinxioPageResult<LinxioFuelRecord>>;
827
+ /** List fuel cards. */
828
+ cards(params?: LinxioFuelListParams): Promise<LinxioPageResult<LinxioFuelCard>>;
829
+ /** List fuel types configured by Linxio. */
830
+ fuelTypes(): Promise<LinxioResult<LinxioRecord[]>>;
831
+ /** Assign a fuel transaction to a vehicle. */
832
+ assignTransaction(recordId: LinxioId, vehicleId: LinxioId): Promise<LinxioResult<LinxioFuelRecord>>;
833
+ }
834
+
835
+ /** Shape type accepted by Linxio geofence/area endpoints. */
836
+ type GeofenceType = "circle" | "polygon" | "polyline" | "rectangle" | (string & {});
837
+ /** Geofence object. Linxio's API calls these `areas`. */
838
+ type LinxioGeofence = LinxioRecord & {
839
+ color?: string | null;
840
+ coordinates?: LatLng[];
841
+ id: LinxioId;
842
+ name: string;
843
+ radius?: number | null;
844
+ type?: GeofenceType;
845
+ };
846
+ /** Parameters for `client.geofences.list()`. */
847
+ type LinxioGeofenceListParams = ListParams;
848
+ /** Payload for creating or updating a geofence. */
849
+ type LinxioGeofencePayload = LinxioRecord & {
850
+ color?: string;
851
+ coordinates?: LatLng[];
852
+ name: string;
853
+ radius?: number;
854
+ type: GeofenceType;
855
+ };
856
+ /** Dashboard area group record. */
857
+ type LinxioAreaGroup = LinxioRecord & {
858
+ id: LinxioId;
859
+ name: string;
860
+ };
861
+ /** Payload accepted by dashboard-derived area group endpoints. */
862
+ type LinxioAreaGroupPayload = LinxioRecord & {
863
+ name: string;
864
+ };
865
+
866
+ /** Geofence/area endpoints. Linxio calls geofences `areas` in the API. */
867
+ declare class GeofencesService extends BaseService {
868
+ /** List geofence objects. */
869
+ list(params?: LinxioGeofenceListParams): Promise<LinxioPageResult<LinxioGeofence>>;
870
+ /** Load every geofence page into a single result. */
871
+ iterate(params?: LinxioGeofenceListParams): Promise<LinxioResult<LinxioGeofence[]>>;
872
+ /** Stream every geofence page without loading every geofence at once. */
873
+ stream(params?: LinxioGeofenceListParams): AsyncGenerator<LinxioGeofence, void, undefined>;
874
+ /** Fetch one geofence by Linxio area ID. */
875
+ get(areaId: LinxioId): Promise<LinxioResult<LinxioGeofence>>;
876
+ /** Create a geofence object. */
877
+ create(payload: LinxioGeofencePayload): Promise<LinxioResult<LinxioGeofence>>;
878
+ /** Update a geofence object using the dashboard-derived endpoint. */
879
+ update(areaId: LinxioId, payload: Partial<LinxioGeofencePayload>): Promise<LinxioResult<LinxioGeofence>>;
880
+ /** Permanently delete a geofence object. Prefer `archive()` if you need reversibility. */
881
+ delete(areaId: LinxioId): Promise<LinxioResult<void>>;
882
+ /** Soft-archive a geofence object when the dashboard endpoint is available. */
883
+ archive(areaId: LinxioId): Promise<LinxioResult<void>>;
884
+ /** Restore a previously archived geofence object. */
885
+ restore(areaId: LinxioId): Promise<LinxioResult<void>>;
886
+ /** List area groups from the dashboard-derived endpoint. */
887
+ listGroups(): Promise<LinxioResult<LinxioAreaGroup[]>>;
888
+ /** Fetch one area group from the dashboard-derived endpoint. */
889
+ getGroup(groupId: LinxioId): Promise<LinxioResult<LinxioAreaGroup>>;
890
+ /** Create an area group from the dashboard-derived endpoint. */
891
+ createGroup(payload: LinxioAreaGroupPayload): Promise<LinxioResult<LinxioAreaGroup>>;
892
+ /** Update an area group from the dashboard-derived endpoint. */
893
+ updateGroup(groupId: LinxioId, payload: Partial<LinxioAreaGroupPayload>): Promise<LinxioResult<LinxioAreaGroup>>;
894
+ /** Delete an area group. Prefer archive/restore when reversibility matters. */
895
+ deleteGroup(groupId: LinxioId): Promise<LinxioResult<void>>;
896
+ /** Soft-archive an area group from the dashboard-derived endpoint. */
897
+ archiveGroup(groupId: LinxioId): Promise<LinxioResult<void>>;
898
+ /** Restore an archived area group from the dashboard-derived endpoint. */
899
+ restoreGroup(groupId: LinxioId): Promise<LinxioResult<void>>;
900
+ }
901
+
902
+ /**
903
+ * Shared shape for dashboard reference-data records whose complete schema is
904
+ * tenant-configurable or not fully visible in the captured dashboard bundles.
905
+ */
906
+ type LinxioMetadataRecord = LinxioRecord & {
907
+ /** Stable identifier when the endpoint returns one. */
908
+ id?: LinxioId;
909
+ /** Machine-readable code, slug, or setting key. */
910
+ code?: string;
911
+ /** Human-readable label. */
912
+ label?: string;
913
+ /** Human-readable name. */
914
+ name?: string;
915
+ /** Sort order used by dashboard dropdowns. */
916
+ order?: number;
917
+ /** Machine-readable value used by dashboard dropdowns. */
918
+ value?: string;
919
+ };
920
+ /** Country map returned by the dashboard country reference endpoint. */
921
+ type LinxioCountryMap = Record<string, string>;
922
+ /** @deprecated Use `LinxioCountryMap`; Linxio returns a keyed map, not rows. */
923
+ type LinxioCountry = LinxioCountryMap;
924
+ /** Role option returned by the dashboard roles endpoint. */
925
+ type LinxioRole = LinxioMetadataRecord & {
926
+ /** Role display name. */
927
+ name?: string;
928
+ /** Role scope or team type when supplied. */
929
+ type?: string;
930
+ };
931
+ /** Plan option returned by the dashboard plans endpoint. */
932
+ type LinxioPlan = LinxioMetadataRecord & {
933
+ /** Plan display name. */
934
+ name?: string;
935
+ };
936
+ /** Timezone option returned by the dashboard timezones endpoint. */
937
+ type LinxioTimezone = LinxioMetadataRecord & {
938
+ /** IANA timezone name or Linxio timezone value. */
939
+ name?: string;
940
+ /** UTC offset label when supplied. */
941
+ offset?: string;
942
+ };
943
+ /** Theme definition returned by the dashboard theme endpoints. */
944
+ type LinxioTheme = LinxioMetadataRecord & {
945
+ /** Theme display name. */
946
+ name?: string;
947
+ };
948
+ /** Current-plan permission keys returned by Linxio. */
949
+ type LinxioCurrentPlan = string[];
950
+ /** Platform domain settings used by hosted Linxio tenants. */
951
+ type LinxioPlatformDomain = LinxioRecord & {
952
+ /** Tenant domain when supplied. */
953
+ domain?: string;
954
+ /** Hostname when supplied. */
955
+ host?: string;
956
+ };
957
+ /** Language option returned by the dashboard language settings endpoint. */
958
+ type LinxioLanguage = LinxioMetadataRecord & {
959
+ /** Locale or language code. */
960
+ code?: string;
961
+ /** Language display name. */
962
+ name?: string;
963
+ };
964
+ /** Tenant/user/role scoped setting returned by dashboard settings endpoints. */
965
+ type LinxioSettingRecord = LinxioRecord & {
966
+ id?: LinxioId | string;
967
+ name?: string;
968
+ role?: LinxioRecord | null;
969
+ team?: LinxioRecord | null;
970
+ user?: LinxioRecord | null;
971
+ value?: unknown;
972
+ };
973
+ /** Map API provider option returned by Linxio settings. */
974
+ type LinxioMapApiOption = LinxioSettingRecord;
975
+ /** Provider setting returned by the dashboard provider endpoint. */
976
+ type LinxioProviderSetting = LinxioSettingRecord;
977
+ /** Digital-form feature settings returned by Linxio. */
978
+ type LinxioDigitalFormSettings = LinxioSettingRecord;
979
+ /** Eco-speed feature settings returned by Linxio. */
980
+ type LinxioEcoSpeedSettings = LinxioSettingRecord;
981
+ /** Excessive-idling feature settings returned by Linxio. */
982
+ type LinxioExcessiveIdlingSettings = LinxioSettingRecord;
983
+
984
+ /** Read-only dashboard reference data and tenant settings. */
985
+ declare class MetadataService extends BaseService {
986
+ /** Fetch country options as a map keyed by country code. */
987
+ countries(): Promise<LinxioResult<LinxioCountryMap>>;
988
+ /** List user roles available to the authenticated Linxio account. */
989
+ roles(): Promise<LinxioResult<LinxioRole[]>>;
990
+ /** List plan definitions visible to the authenticated Linxio account. */
991
+ plans(): Promise<LinxioResult<LinxioPlan[]>>;
992
+ /** List timezone options used by Linxio tenant and user settings. */
993
+ timezones(): Promise<LinxioResult<LinxioTimezone[]>>;
994
+ /** List dashboard theme definitions. */
995
+ themes(): Promise<LinxioResult<LinxioTheme[]>>;
996
+ /** Fetch the current user's active dashboard theme. */
997
+ myTheme(): Promise<LinxioResult<LinxioTheme>>;
998
+ /** Fetch current-plan permission keys. */
999
+ currentPlan(): Promise<LinxioResult<LinxioCurrentPlan>>;
1000
+ /** Fetch the hosted-domain settings for the current platform. */
1001
+ platformDomain(): Promise<LinxioResult<LinxioPlatformDomain>>;
1002
+ /** List language options used by Linxio settings screens. */
1003
+ languages(): Promise<LinxioResult<LinxioLanguage[]>>;
1004
+ /** Fetch the map API setting record for the current tenant. */
1005
+ mapApiOptions(): Promise<LinxioResult<LinxioMapApiOption>>;
1006
+ /** Fetch dashboard provider settings visible to the current account. */
1007
+ providers(): Promise<LinxioResult<LinxioProviderSetting>>;
1008
+ /** Fetch tenant-level digital-form settings. */
1009
+ digitalFormSettings(): Promise<LinxioResult<LinxioDigitalFormSettings>>;
1010
+ /** Fetch tenant-level eco-speed settings. */
1011
+ ecoSpeedSettings(): Promise<LinxioResult<LinxioEcoSpeedSettings>>;
1012
+ /** Fetch tenant-level excessive-idling settings. */
1013
+ excessiveIdlingSettings(): Promise<LinxioResult<LinxioExcessiveIdlingSettings>>;
1014
+ }
1015
+
1016
+ /** Common parameters for report endpoints. */
1017
+ type LinxioReportParams = DateRangeParams & ListParams & {
1018
+ format?: LinxioFileFormat;
1019
+ };
1020
+ /** Scheduled report record. */
1021
+ type LinxioScheduledReport = LinxioRecord & {
1022
+ format?: LinxioFileFormat;
1023
+ id: LinxioId;
1024
+ name?: string;
1025
+ status?: "active" | "disabled" | (string & {});
1026
+ type?: string;
1027
+ };
1028
+ /** Payload for creating a scheduled report. */
1029
+ type LinxioScheduledReportPayload = LinxioRecord & {
1030
+ format: LinxioFileFormat;
1031
+ name: string;
1032
+ params?: Record<string, unknown>;
1033
+ type: string;
1034
+ };
1035
+ /** Digital form record. */
1036
+ type LinxioDigitalForm = LinxioRecord & {
1037
+ id: LinxioId;
1038
+ name?: string;
1039
+ status?: string;
1040
+ };
1041
+
1042
+ /** Scheduled report endpoints discovered from the dashboard bundle. */
1043
+ declare class ReportsService extends BaseService {
1044
+ /** List scheduled reports. */
1045
+ scheduled(params?: LinxioReportParams): Promise<LinxioPageResult<LinxioScheduledReport>>;
1046
+ /** Fetch the scheduled-report template used by the Linxio dashboard. */
1047
+ scheduledTemplate(): Promise<LinxioResult<LinxioRecord>>;
1048
+ /** Fetch one scheduled report. */
1049
+ getScheduled(reportId: LinxioId): Promise<LinxioResult<LinxioScheduledReport>>;
1050
+ /** Create a scheduled report. */
1051
+ createScheduled(payload: LinxioScheduledReportPayload): Promise<LinxioResult<LinxioScheduledReport>>;
1052
+ /** Update a scheduled report. */
1053
+ updateScheduled(reportId: LinxioId, payload: Partial<LinxioScheduledReportPayload>): Promise<LinxioResult<LinxioScheduledReport>>;
1054
+ /** Delete a scheduled report. */
1055
+ deleteScheduled(reportId: LinxioId): Promise<LinxioResult<void>>;
1056
+ /** Restore a scheduled report from the dashboard-derived endpoint. */
1057
+ restoreScheduled(reportId: LinxioId): Promise<LinxioResult<void>>;
1058
+ }
1059
+ /** Digital form endpoints discovered from the dashboard bundle. */
1060
+ declare class DigitalFormsService extends BaseService {
1061
+ /** List digital forms. */
1062
+ list(): Promise<LinxioResult<LinxioDigitalForm[]>>;
1063
+ /** Fetch one digital form. */
1064
+ get(formId: LinxioId): Promise<LinxioResult<LinxioDigitalForm>>;
1065
+ /** Fetch one digital form answer. */
1066
+ answer(answerId: LinxioId): Promise<LinxioResult<LinxioRecord>>;
1067
+ /** Download a digital form answer as a PDF Blob. */
1068
+ answerPdf(answerId: LinxioId): Promise<LinxioResult<Blob>>;
1069
+ }
1070
+
1071
+ /** Optional vehicle route fields. `coordinates` may produce very large responses. */
1072
+ type RouteField = "coordinates" | "driver" | "vehicle" | "address" | (string & {});
1073
+ /** One route coordinate point. */
1074
+ type LinxioRouteCoordinate = LinxioRecord & LatLng & {
1075
+ id?: LinxioId;
1076
+ nullable?: boolean;
1077
+ ts?: ISODateString;
1078
+ };
1079
+ /** Start or finish point for a route segment. */
1080
+ type LinxioRoutePoint = {
1081
+ address?: string | null;
1082
+ lastCoordinates?: (LatLng & {
1083
+ ts?: ISODateString;
1084
+ }) | null;
1085
+ };
1086
+ /** One route segment returned by Linxio. */
1087
+ type LinxioVehicleRoute = LinxioRecord & {
1088
+ address?: string | null;
1089
+ avgSpeed?: number | null;
1090
+ comment?: string | null;
1091
+ coordinates?: LinxioRouteCoordinate[];
1092
+ deviceId?: LinxioId | null;
1093
+ distance?: number | string | null;
1094
+ driverId?: LinxioId | null;
1095
+ duration?: number | null;
1096
+ id: LinxioId;
1097
+ maxSpeed?: number | null;
1098
+ pointFinish?: LinxioRoutePoint | null;
1099
+ pointStart?: LinxioRoutePoint | null;
1100
+ scope?: unknown;
1101
+ type?: "driving" | "idle" | "stopped" | (string & {});
1102
+ vehicleId: LinxioId;
1103
+ };
1104
+ /** Route response group for a vehicle/driver pair. */
1105
+ type LinxioVehicleRoutesGroup = LinxioRecord & {
1106
+ driverId?: LinxioId | null;
1107
+ routes: LinxioVehicleRoute[];
1108
+ vehicleId: LinxioId;
1109
+ };
1110
+ /** Parameters for `client.routes.getVehicleRoutes()`. */
1111
+ type LinxioVehicleRoutesParams = DateRangeParams & Omit<ListParams<RouteField>, "fields"> & {
1112
+ fields?: RouteField[];
1113
+ };
1114
+
1115
+ /** Vehicle route history endpoints. */
1116
+ declare class RoutesService extends BaseService {
1117
+ /**
1118
+ * Fetch route history for a vehicle.
1119
+ *
1120
+ * Requesting `fields: ["coordinates"]` can return very large responses, so
1121
+ * only include coordinates when your script really needs every point.
1122
+ */
1123
+ getVehicleRoutes(vehicleId: LinxioId, params: LinxioVehicleRoutesParams): Promise<LinxioResult<LinxioVehicleRoutesGroup[]>>;
1124
+ }
1125
+
1126
+ /** Sensor inventory and temperature/humidity report endpoints. */
1127
+ declare class SensorsService extends BaseService {
1128
+ /** List sensors from the dashboard-derived endpoint. */
1129
+ list(params?: LinxioSensorListParams): Promise<LinxioPageResult<LinxioSensor>>;
1130
+ /** Load every sensor page into a single result. */
1131
+ iterate(params?: LinxioSensorListParams): Promise<LinxioResult<LinxioSensor[]>>;
1132
+ /** Stream sensors without loading the whole inventory at once. */
1133
+ stream(params?: LinxioSensorListParams): AsyncGenerator<LinxioSensor, void, undefined>;
1134
+ /** Fetch one sensor by internal Linxio sensor ID. */
1135
+ get(sensorId: LinxioId): Promise<LinxioResult<LinxioSensor>>;
1136
+ /** Install or pair a sensor with a device. */
1137
+ install(sensorId: LinxioId, deviceId: LinxioId): Promise<LinxioResult<LinxioSensor>>;
1138
+ /** Fetch the documented temperature/humidity report grouped by device sensor. */
1139
+ deviceTemperatureHumidityReport(params?: LinxioSensorReportParams): Promise<LinxioPageResult<LinxioTemperatureHumidityReading>>;
1140
+ /** Fetch the documented temperature/humidity report grouped by vehicle. */
1141
+ vehicleTemperatureHumidityReport(params?: LinxioSensorReportParams): Promise<LinxioPageResult<LinxioTemperatureHumidityReading>>;
1142
+ /** Load every device temperature/humidity report page into a single result. */
1143
+ iterateDeviceTemperatureHumidityReport(params?: LinxioSensorReportParams): Promise<LinxioResult<LinxioTemperatureHumidityReading[]>>;
1144
+ /** Stream the device temperature/humidity report one reading at a time. */
1145
+ streamDeviceTemperatureHumidityReport(params?: LinxioSensorReportParams): AsyncGenerator<LinxioTemperatureHumidityReading, void, undefined>;
1146
+ }
1147
+
1148
+ /** User management endpoints. */
1149
+ declare class UsersService extends BaseService {
1150
+ /** List users from the dashboard-derived endpoint. */
1151
+ list(params?: LinxioUserListParams): Promise<LinxioPageResult<LinxioUser>>;
1152
+ /** Load every user page into a single result. */
1153
+ iterate(params?: LinxioUserListParams): Promise<LinxioResult<LinxioUser[]>>;
1154
+ /** Stream every user page without loading every user at once. */
1155
+ stream(params?: LinxioUserListParams): AsyncGenerator<LinxioUser, void, undefined>;
1156
+ /** Fetch one user by ID. */
1157
+ get(userId: LinxioId): Promise<LinxioResult<LinxioUser>>;
1158
+ /** Create a user. */
1159
+ create(payload: LinxioUserPayload): Promise<LinxioResult<LinxioUser>>;
1160
+ /** Update a user. */
1161
+ update(userId: LinxioId, payload: LinxioUserPayload): Promise<LinxioResult<LinxioUser>>;
1162
+ /** Soft-archive a user. */
1163
+ archive(userId: LinxioId): Promise<LinxioResult<void>>;
1164
+ /** Restore a previously archived user. */
1165
+ restore(userId: LinxioId): Promise<LinxioResult<void>>;
1166
+ }
1167
+
1168
+ /** Common field names for Linxio vehicle list responses. */
1169
+ type VehicleField = "id" | "regNo" | "defaultLabel" | "model" | "depotName" | "depot" | "groupsList" | "groups" | "driver" | "type" | "typeId" | "typeName" | "make" | "makeModel" | "vin" | "deviceId" | "status" | "lastLoggedAt" | "lastCoordinates" | "todayData" | (string & {});
1170
+ /** Vehicle record returned by Linxio vehicle endpoints. */
1171
+ type LinxioVehicle = LinxioRecord & {
1172
+ areas?: LinxioVehicleAreaAssignment[];
1173
+ averageDailyMileage?: number | null;
1174
+ averageFuel?: number | null;
1175
+ co2Emissions?: number | null;
1176
+ createdAt?: ISODateString | null;
1177
+ createdBy?: LinxioUserAuditSummary | null;
1178
+ defaultLabel?: string | null;
1179
+ depot?: LinxioVehicleDepot | null;
1180
+ depotName?: string | null;
1181
+ deviceId?: LinxioId | null;
1182
+ driver?: LinxioVehicleDriver | string | null;
1183
+ driverId?: LinxioId | null;
1184
+ ecoSpeed?: number | null;
1185
+ emissionClass?: string | null;
1186
+ engineCapacity?: number | null;
1187
+ engineOnTime?: number | null;
1188
+ enginePower?: number | null;
1189
+ excessiveIdling?: number | null;
1190
+ fuelTankCapacity?: number | null;
1191
+ fuelType?: LinxioId | null;
1192
+ grossWeight?: number | null;
1193
+ groups?: LinxioVehicleGroup[];
1194
+ groupsList?: string | null;
1195
+ id: LinxioId;
1196
+ lastCoordinates?: (LatLng & {
1197
+ ts?: ISODateString;
1198
+ }) | null;
1199
+ lastLoggedAt?: ISODateString | null;
1200
+ make?: string | null;
1201
+ makeModel?: string | null;
1202
+ model?: string | null;
1203
+ picture?: string | null;
1204
+ regCertNo?: string | null;
1205
+ regDate?: ISODateString | null;
1206
+ regNo?: string | null;
1207
+ status?: string | null;
1208
+ team?: LinxioTeamSummary | null;
1209
+ teamId?: LinxioId | null;
1210
+ todayData?: {
1211
+ avgSpeed?: number;
1212
+ distance?: number;
1213
+ duration?: number;
1214
+ idleDuration?: number;
1215
+ } | null;
1216
+ type?: string | null;
1217
+ typeId?: LinxioId | null;
1218
+ typeName?: string | null;
1219
+ unavailableMessage?: string | null;
1220
+ updatedAt?: ISODateString | null;
1221
+ updatedBy?: LinxioUserAuditSummary | null;
1222
+ vin?: string | null;
1223
+ year?: number | null;
1224
+ };
1225
+ /** Depot object nested in vehicle responses. */
1226
+ type LinxioVehicleDepot = LinxioRecord & {
1227
+ color?: string | null;
1228
+ createdAt?: ISODateString | null;
1229
+ id: LinxioId;
1230
+ name?: string | null;
1231
+ status?: LinxioId | string | null;
1232
+ };
1233
+ /** Vehicle group object nested in vehicle responses. */
1234
+ type LinxioVehicleGroup = LinxioRecord & {
1235
+ color?: string | null;
1236
+ id: LinxioId;
1237
+ name?: string | null;
1238
+ };
1239
+ /** Current area assignment nested in vehicle responses. */
1240
+ type LinxioVehicleAreaAssignment = LinxioRecord & {
1241
+ area?: LinxioRecord & {
1242
+ color?: string | null;
1243
+ id?: LinxioId;
1244
+ name?: string | null;
1245
+ status?: string | null;
1246
+ };
1247
+ arrived?: ISODateString | null;
1248
+ departed?: ISODateString | null;
1249
+ driverArrived?: ISODateString | null;
1250
+ driverDeparted?: ISODateString | null;
1251
+ id?: LinxioId;
1252
+ };
1253
+ /** Driver object nested in vehicle responses when a driver is assigned. */
1254
+ type LinxioVehicleDriver = LinxioUser & {
1255
+ driverFOBId?: string | null;
1256
+ driverSensorId?: string | null;
1257
+ lastLoggedAt?: ISODateString | null;
1258
+ name?: string | null;
1259
+ surname?: string | null;
1260
+ };
1261
+ /** Parameters for `client.vehicles.list()`. */
1262
+ type LinxioVehicleListParams = ListParams<VehicleField>;
1263
+ /** Payload for creating or updating a vehicle. */
1264
+ type LinxioVehiclePayload = LinxioRecord & {
1265
+ defaultLabel?: string;
1266
+ depotId?: LinxioId | null;
1267
+ groupIds?: LinxioId[];
1268
+ model?: string;
1269
+ regNo?: string;
1270
+ typeId?: LinxioId;
1271
+ vin?: string;
1272
+ };
1273
+ /** Vehicle odometer reading returned by Linxio. */
1274
+ type LinxioOdometer = LinxioRecord & {
1275
+ accuracy?: number | null;
1276
+ deviceId?: LinxioId | null;
1277
+ driverId?: LinxioId | null;
1278
+ id?: LinxioId | null;
1279
+ isSyncedWithDevice?: boolean;
1280
+ lastTrackerRecordOccurredAt?: ISODateString | null;
1281
+ lastTrackerRecordOdometer?: number | null;
1282
+ occurredAt?: ISODateString | null;
1283
+ odometer: number;
1284
+ vehicleId: LinxioId;
1285
+ };
1286
+ /** Optional parameters for fetching odometer values. */
1287
+ type LinxioOdometerParams = {
1288
+ occurredAt?: ISODateString;
1289
+ };
1290
+ /** Payload for recalibrating a vehicle odometer. */
1291
+ type LinxioOdometerRecalibration = {
1292
+ occurredAt: ISODateString;
1293
+ odometer: number;
1294
+ };
1295
+ /** Current engine-hours reading for a vehicle. */
1296
+ type LinxioEngineHours = LinxioRecord & {
1297
+ engineHours: number;
1298
+ id?: LinxioId;
1299
+ occurredAt?: ISODateString | null;
1300
+ prevEngineHours?: number | null;
1301
+ vehicleId: LinxioId;
1302
+ };
1303
+ /** Count response returned by dashboard-derived count endpoints. */
1304
+ type LinxioCount = LinxioRecord & {
1305
+ count?: number;
1306
+ total?: number;
1307
+ };
1308
+ /** Vehicle type record returned by the dashboard-derived vehicle types endpoint. */
1309
+ type LinxioVehicleType = LinxioRecord & {
1310
+ default?: string | null;
1311
+ driving?: string | null;
1312
+ id: LinxioId;
1313
+ idling?: string | null;
1314
+ name?: string;
1315
+ order?: number;
1316
+ status?: string | null;
1317
+ stopped?: string | null;
1318
+ };
1319
+ /** Optional filters accepted by `client.vehicles.count()`. */
1320
+ type LinxioVehicleCountParams = QueryParams;
1321
+ /** Parameters for `client.vehicles.types()`. */
1322
+ type LinxioVehicleTypeParams = QueryParams & {
1323
+ limit?: number;
1324
+ sort?: string;
1325
+ };
1326
+
1327
+ /** Vehicle inventory, odometer, and vehicle lifecycle endpoints. */
1328
+ declare class VehiclesService extends BaseService {
1329
+ /** List vehicles using Linxio's documented `/vehicles/fields/json` endpoint. */
1330
+ list(params?: LinxioVehicleListParams): Promise<LinxioPageResult<LinxioVehicle>>;
1331
+ /** Load every vehicle page into a single result. */
1332
+ iterate(params?: LinxioVehicleListParams): Promise<LinxioResult<LinxioVehicle[]>>;
1333
+ /** Stream every vehicle page without loading the whole fleet at once. */
1334
+ stream(params?: LinxioVehicleListParams): AsyncGenerator<LinxioVehicle, void, undefined>;
1335
+ /** Fetch one vehicle by internal Linxio vehicle ID. */
1336
+ get(vehicleId: LinxioId): Promise<LinxioResult<LinxioVehicle>>;
1337
+ /** Create a vehicle. Validate payloads carefully against your Linxio tenant requirements. */
1338
+ create(payload: LinxioVehiclePayload): Promise<LinxioResult<LinxioVehicle>>;
1339
+ /** Update a vehicle using Linxio's documented POST update endpoint. */
1340
+ update(vehicleId: LinxioId, payload: LinxioVehiclePayload): Promise<LinxioResult<LinxioVehicle>>;
1341
+ /** Soft-archive a vehicle when the dashboard endpoint is available. */
1342
+ archive(vehicleId: LinxioId): Promise<LinxioResult<void>>;
1343
+ /** Restore a previously archived vehicle when the dashboard endpoint is available. */
1344
+ restore(vehicleId: LinxioId): Promise<LinxioResult<void>>;
1345
+ /** Get a vehicle odometer reading, optionally at a specific occurrence time. */
1346
+ getOdometer(vehicleId: LinxioId, params?: LinxioOdometerParams): Promise<LinxioResult<LinxioOdometer>>;
1347
+ /** Recalibrate a vehicle odometer in metres. */
1348
+ recalibrateOdometer(vehicleId: LinxioId, payload: LinxioOdometerRecalibration): Promise<LinxioResult<LinxioOdometer>>;
1349
+ /** Fetch current engine hours from the dashboard-derived endpoint. */
1350
+ getEngineHours(vehicleId: LinxioId): Promise<LinxioResult<LinxioEngineHours>>;
1351
+ /** Count vehicles using the dashboard-derived count endpoint. */
1352
+ count(params?: LinxioVehicleCountParams): Promise<LinxioResult<LinxioCount>>;
1353
+ /** List vehicle types using the dashboard-derived vehicle type endpoint. */
1354
+ types(params?: LinxioVehicleTypeParams): Promise<LinxioPageResult<LinxioVehicleType>>;
1355
+ }
1356
+
1357
+ /**
1358
+ * Configuration for {@link createClient}.
1359
+ *
1360
+ * Pass `token` and `refreshToken` when you already have a Linxio session, or
1361
+ * call `client.auth.login()` and the SDK will keep the returned tokens in
1362
+ * memory for this client instance.
1363
+ */
1364
+ type LinxioClientOptions = {
1365
+ /** Override the REST API base URL. Defaults to `https://api.linxio.com/api`. */
1366
+ baseUrl?: string;
1367
+ /** Custom fetch implementation for tests, proxies, or non-standard runtimes. */
1368
+ fetch?: FetchLike;
1369
+ /** Override the Socket.IO tracking host. Defaults to `https://track.linxio.com`. */
1370
+ realtimeBaseUrl?: string;
1371
+ /** Refresh token used for automatic 401 recovery. */
1372
+ refreshToken?: string;
1373
+ /** Retry policy for idempotent requests. */
1374
+ retry?: RetryOptions;
1375
+ /** Per-request timeout in milliseconds. Defaults to 30 seconds. */
1376
+ timeoutMs?: number;
1377
+ /** JWT bearer token used for authenticated requests. */
1378
+ token?: string;
1379
+ };
1380
+ /**
1381
+ * Main Linxio SDK entry point.
1382
+ *
1383
+ * Create one instance per Linxio account/session and reuse it across your app.
1384
+ * The client exposes domain services for common workflows and `request()` for
1385
+ * tenant-specific endpoints that are not represented by a service yet.
1386
+ *
1387
+ * @example
1388
+ * ```ts
1389
+ * import { createClient } from "linxio-js";
1390
+ *
1391
+ * const linxio = createClient();
1392
+ * await linxio.auth.login({ email, password });
1393
+ *
1394
+ * const { data, error } = await linxio.vehicles.list({
1395
+ * fields: ["id", "regNo"],
1396
+ * });
1397
+ *
1398
+ * if (error) {
1399
+ * throw error;
1400
+ * }
1401
+ *
1402
+ * console.log(data);
1403
+ * ```
1404
+ */
1405
+ declare class LinxioClient {
1406
+ /** Authentication, session, and current-user helpers. */
1407
+ readonly auth: AuthService;
1408
+ /** Dash cam event helpers discovered from the dashboard bundle. */
1409
+ readonly cameras: CamerasService;
1410
+ /** Client account and client-user helpers. */
1411
+ readonly clients: ClientsService;
1412
+ /** Device inventory, install, uninstall, sensor, and coordinate helpers. */
1413
+ readonly devices: DevicesService;
1414
+ /** Digital forms and form answer helpers discovered from the dashboard bundle. */
1415
+ readonly digitalForms: DigitalFormsService;
1416
+ /** Driver listing and vehicle assignment helpers. */
1417
+ readonly drivers: DriversService;
1418
+ /** Fuel card, fuel record, and fuel summary helpers discovered from the dashboard bundle. */
1419
+ readonly fuel: FuelService;
1420
+ /** Geofence/area and area-group helpers. */
1421
+ readonly geofences: GeofencesService;
1422
+ /** Low-level HTTP client for advanced integrations. */
1423
+ readonly http: HttpClient;
1424
+ /** Read-only reference data and tenant settings discovered from the dashboard bundle. */
1425
+ readonly metadata: MetadataService;
1426
+ /** Socket.IO live tracking and notification client. */
1427
+ readonly realtime: RealtimeClient;
1428
+ /** Scheduled report helpers discovered from the dashboard bundle. */
1429
+ readonly reports: ReportsService;
1430
+ /** Reseller account helpers discovered from the dashboard bundle. */
1431
+ readonly resellers: ResellersService;
1432
+ /** Vehicle route history helpers. */
1433
+ readonly routes: RoutesService;
1434
+ /** Temperature/humidity sensor helpers. */
1435
+ readonly sensors: SensorsService;
1436
+ /** User management helpers. */
1437
+ readonly users: UsersService;
1438
+ /** Vehicle inventory, odometer, and engine-hours helpers. */
1439
+ readonly vehicles: VehiclesService;
1440
+ private currentSession;
1441
+ constructor(options?: LinxioClientOptions);
1442
+ /**
1443
+ * Replace or partially update the in-memory session used by this client.
1444
+ *
1445
+ * This is useful when you persist tokens yourself and want to hydrate a
1446
+ * client without calling `auth.login()` again.
1447
+ */
1448
+ setSession(session: LinxioSession): void;
1449
+ /** Return a copy of the current in-memory session. */
1450
+ session(): LinxioSession;
1451
+ /**
1452
+ * Send a raw API request with the same auth, retry, timeout, and refresh
1453
+ * behavior used by the domain services.
1454
+ */
1455
+ request<TResponse = unknown>(method: HttpMethod, path: string, options?: LinxioHttpRequestOptions): Promise<TResponse>;
1456
+ }
1457
+ /**
1458
+ * Create a Linxio SDK client.
1459
+ *
1460
+ * @example
1461
+ * ```ts
1462
+ * const linxio = createClient({ token, refreshToken });
1463
+ * const { data, error } = await linxio.vehicles.iterate({ limit: 100 });
1464
+ *
1465
+ * if (error) {
1466
+ * throw error;
1467
+ * }
1468
+ *
1469
+ * for (const vehicle of data) {
1470
+ * console.log(vehicle.id, vehicle.regNo);
1471
+ * }
1472
+ * ```
1473
+ */
1474
+ declare function createClient(options?: LinxioClientOptions): LinxioClient;
1475
+
1476
+ type LinxioEndpointSource = "dashboard" | "public-docs";
1477
+ type LinxioEndpointDefinition = {
1478
+ method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
1479
+ path: string;
1480
+ source: LinxioEndpointSource;
1481
+ };
1482
+ declare const linxioEndpoints: {
1483
+ readonly auth: {
1484
+ readonly login: {
1485
+ readonly method: "POST";
1486
+ readonly path: "/login";
1487
+ readonly source: "public-docs";
1488
+ };
1489
+ readonly logout: {
1490
+ readonly method: "POST";
1491
+ readonly path: "/logout";
1492
+ readonly source: "dashboard";
1493
+ };
1494
+ readonly me: {
1495
+ readonly method: "GET";
1496
+ readonly path: "/me";
1497
+ readonly source: "dashboard";
1498
+ };
1499
+ readonly refreshToken: {
1500
+ readonly method: "POST";
1501
+ readonly path: "/token/refresh";
1502
+ readonly source: "dashboard";
1503
+ };
1504
+ readonly verifyOtp: {
1505
+ readonly method: "POST";
1506
+ readonly path: "/login/otp";
1507
+ readonly source: "dashboard";
1508
+ };
1509
+ };
1510
+ readonly cameras: {
1511
+ readonly eventTypes: {
1512
+ readonly method: "GET";
1513
+ readonly path: "/devices/cameras/events/types";
1514
+ readonly source: "dashboard";
1515
+ };
1516
+ readonly events: {
1517
+ readonly method: "GET";
1518
+ readonly path: "/devices/cameras/events";
1519
+ readonly source: "dashboard";
1520
+ };
1521
+ };
1522
+ readonly clients: {
1523
+ readonly get: {
1524
+ readonly method: "GET";
1525
+ readonly path: "/clients/{clientId}";
1526
+ readonly source: "dashboard";
1527
+ };
1528
+ readonly list: {
1529
+ readonly method: "GET";
1530
+ readonly path: "/clients/json";
1531
+ readonly source: "dashboard";
1532
+ };
1533
+ readonly users: {
1534
+ readonly create: {
1535
+ readonly method: "POST";
1536
+ readonly path: "/clients/{clientId}/users";
1537
+ readonly source: "public-docs";
1538
+ };
1539
+ readonly get: {
1540
+ readonly method: "GET";
1541
+ readonly path: "/clients/{clientId}/users/{userId}";
1542
+ readonly source: "public-docs";
1543
+ };
1544
+ readonly list: {
1545
+ readonly method: "GET";
1546
+ readonly path: "/clients/{clientId}/users";
1547
+ readonly source: "public-docs";
1548
+ };
1549
+ readonly update: {
1550
+ readonly method: "POST";
1551
+ readonly path: "/clients/{clientId}/users/{userId}";
1552
+ readonly source: "public-docs";
1553
+ };
1554
+ };
1555
+ };
1556
+ readonly devices: {
1557
+ readonly archive: {
1558
+ readonly method: "PATCH";
1559
+ readonly path: "/devices/{deviceId}/archive";
1560
+ readonly source: "dashboard";
1561
+ };
1562
+ readonly coordinates: {
1563
+ readonly method: "GET";
1564
+ readonly path: "/devices/{deviceId}/coordinates";
1565
+ readonly source: "dashboard";
1566
+ };
1567
+ readonly cameras: {
1568
+ readonly method: "GET";
1569
+ readonly path: "/devices/{deviceId}/cameras";
1570
+ readonly source: "dashboard";
1571
+ };
1572
+ readonly create: {
1573
+ readonly method: "POST";
1574
+ readonly path: "/devices";
1575
+ readonly source: "public-docs";
1576
+ };
1577
+ readonly get: {
1578
+ readonly method: "GET";
1579
+ readonly path: "/devices/{deviceId}";
1580
+ readonly source: "public-docs";
1581
+ };
1582
+ readonly install: {
1583
+ readonly method: "POST";
1584
+ readonly path: "/devices/{deviceId}/install";
1585
+ readonly source: "public-docs";
1586
+ };
1587
+ readonly list: {
1588
+ readonly method: "GET";
1589
+ readonly path: "/devices/json";
1590
+ readonly source: "public-docs";
1591
+ };
1592
+ readonly history: {
1593
+ readonly method: "GET";
1594
+ readonly path: "/devices/{deviceId}/history";
1595
+ readonly source: "dashboard";
1596
+ };
1597
+ readonly installations: {
1598
+ readonly method: "GET";
1599
+ readonly path: "/devices/installation/";
1600
+ readonly source: "dashboard";
1601
+ };
1602
+ readonly sensors: {
1603
+ readonly list: {
1604
+ readonly method: "GET";
1605
+ readonly path: "/devices/{deviceId}/sensors/history";
1606
+ readonly source: "dashboard";
1607
+ };
1608
+ };
1609
+ readonly uninstall: {
1610
+ readonly method: "POST";
1611
+ readonly path: "/devices/{deviceId}/uninstall";
1612
+ readonly source: "public-docs";
1613
+ };
1614
+ readonly update: {
1615
+ readonly method: "PATCH";
1616
+ readonly path: "/devices/{deviceId}";
1617
+ readonly source: "public-docs";
1618
+ };
1619
+ readonly vendors: {
1620
+ readonly method: "GET";
1621
+ readonly path: "/devices/vendors/";
1622
+ readonly source: "dashboard";
1623
+ };
1624
+ };
1625
+ readonly drivers: {
1626
+ readonly assignToVehicle: {
1627
+ readonly method: "POST";
1628
+ readonly path: "/vehicle/{vehicleId}/set-driver/{driverId}";
1629
+ readonly source: "public-docs";
1630
+ };
1631
+ readonly list: {
1632
+ readonly method: "GET";
1633
+ readonly path: "/clients/{clientId}/users?role=driver";
1634
+ readonly source: "public-docs";
1635
+ };
1636
+ readonly unassignFromVehicle: {
1637
+ readonly method: "POST";
1638
+ readonly path: "/vehicle/{vehicleId}/unset-driver/{driverId}";
1639
+ readonly source: "public-docs";
1640
+ };
1641
+ };
1642
+ readonly fuel: {
1643
+ readonly assignTransaction: {
1644
+ readonly method: "PATCH";
1645
+ readonly path: "/fuel-cards/record/{recordId}";
1646
+ readonly source: "dashboard";
1647
+ };
1648
+ readonly cards: {
1649
+ readonly method: "GET";
1650
+ readonly path: "/fuel-cards/json";
1651
+ readonly source: "dashboard";
1652
+ };
1653
+ readonly records: {
1654
+ readonly method: "GET";
1655
+ readonly path: "/fuel-cards/json";
1656
+ readonly source: "dashboard";
1657
+ };
1658
+ readonly recordsByVehicle: {
1659
+ readonly method: "GET";
1660
+ readonly path: "/fuel-cards-by-vehicle/json";
1661
+ readonly source: "dashboard";
1662
+ };
1663
+ readonly summary: {
1664
+ readonly method: "GET";
1665
+ readonly path: "/fuel-summary-report";
1666
+ readonly source: "dashboard";
1667
+ };
1668
+ readonly fuelTypes: {
1669
+ readonly method: "GET";
1670
+ readonly path: "/fuel-types";
1671
+ readonly source: "dashboard";
1672
+ };
1673
+ };
1674
+ readonly geofences: {
1675
+ readonly archive: {
1676
+ readonly method: "PATCH";
1677
+ readonly path: "/areas/{areaId}/archive";
1678
+ readonly source: "dashboard";
1679
+ };
1680
+ readonly create: {
1681
+ readonly method: "POST";
1682
+ readonly path: "/areas";
1683
+ readonly source: "public-docs";
1684
+ };
1685
+ readonly delete: {
1686
+ readonly method: "DELETE";
1687
+ readonly path: "/areas/{areaId}";
1688
+ readonly source: "public-docs";
1689
+ };
1690
+ readonly get: {
1691
+ readonly method: "GET";
1692
+ readonly path: "/areas/{areaId}";
1693
+ readonly source: "dashboard";
1694
+ };
1695
+ readonly list: {
1696
+ readonly method: "GET";
1697
+ readonly path: "/areas";
1698
+ readonly source: "public-docs";
1699
+ };
1700
+ readonly restore: {
1701
+ readonly method: "PATCH";
1702
+ readonly path: "/areas/{areaId}/restore";
1703
+ readonly source: "dashboard";
1704
+ };
1705
+ readonly groups: {
1706
+ readonly archive: {
1707
+ readonly method: "PATCH";
1708
+ readonly path: "/area-groups/{groupId}/archive";
1709
+ readonly source: "dashboard";
1710
+ };
1711
+ readonly create: {
1712
+ readonly method: "POST";
1713
+ readonly path: "/area-groups";
1714
+ readonly source: "dashboard";
1715
+ };
1716
+ readonly delete: {
1717
+ readonly method: "DELETE";
1718
+ readonly path: "/area-groups/{groupId}";
1719
+ readonly source: "dashboard";
1720
+ };
1721
+ readonly get: {
1722
+ readonly method: "GET";
1723
+ readonly path: "/area-groups/{groupId}";
1724
+ readonly source: "dashboard";
1725
+ };
1726
+ readonly list: {
1727
+ readonly method: "GET";
1728
+ readonly path: "/area-groups";
1729
+ readonly source: "dashboard";
1730
+ };
1731
+ readonly restore: {
1732
+ readonly method: "PATCH";
1733
+ readonly path: "/area-groups/{groupId}/restore";
1734
+ readonly source: "dashboard";
1735
+ };
1736
+ readonly update: {
1737
+ readonly method: "PATCH";
1738
+ readonly path: "/area-groups/{groupId}";
1739
+ readonly source: "dashboard";
1740
+ };
1741
+ };
1742
+ };
1743
+ readonly metadata: {
1744
+ readonly countries: {
1745
+ readonly method: "GET";
1746
+ readonly path: "/country/list";
1747
+ readonly source: "dashboard";
1748
+ };
1749
+ readonly currentPlan: {
1750
+ readonly method: "GET";
1751
+ readonly path: "/permissions/current-plan";
1752
+ readonly source: "dashboard";
1753
+ };
1754
+ readonly digitalFormSettings: {
1755
+ readonly method: "GET";
1756
+ readonly path: "/settings/digitalForm";
1757
+ readonly source: "dashboard";
1758
+ };
1759
+ readonly ecoSpeedSettings: {
1760
+ readonly method: "GET";
1761
+ readonly path: "/settings/ecoSpeed";
1762
+ readonly source: "dashboard";
1763
+ };
1764
+ readonly excessiveIdlingSettings: {
1765
+ readonly method: "GET";
1766
+ readonly path: "/settings/excessiveIdling";
1767
+ readonly source: "dashboard";
1768
+ };
1769
+ readonly languages: {
1770
+ readonly method: "GET";
1771
+ readonly path: "/settings/language/list";
1772
+ readonly source: "dashboard";
1773
+ };
1774
+ readonly mapApiOptions: {
1775
+ readonly method: "GET";
1776
+ readonly path: "/settings/mapApiOptions";
1777
+ readonly source: "dashboard";
1778
+ };
1779
+ readonly myTheme: {
1780
+ readonly method: "GET";
1781
+ readonly path: "/themes/my";
1782
+ readonly source: "dashboard";
1783
+ };
1784
+ readonly platformDomain: {
1785
+ readonly method: "GET";
1786
+ readonly path: "/platform-settings/domain";
1787
+ readonly source: "dashboard";
1788
+ };
1789
+ readonly plans: {
1790
+ readonly method: "GET";
1791
+ readonly path: "/plans";
1792
+ readonly source: "dashboard";
1793
+ };
1794
+ readonly providers: {
1795
+ readonly method: "GET";
1796
+ readonly path: "/settings/provider";
1797
+ readonly source: "dashboard";
1798
+ };
1799
+ readonly roles: {
1800
+ readonly method: "GET";
1801
+ readonly path: "/roles";
1802
+ readonly source: "dashboard";
1803
+ };
1804
+ readonly themes: {
1805
+ readonly method: "GET";
1806
+ readonly path: "/themes";
1807
+ readonly source: "dashboard";
1808
+ };
1809
+ readonly timezones: {
1810
+ readonly method: "GET";
1811
+ readonly path: "/timezones";
1812
+ readonly source: "dashboard";
1813
+ };
1814
+ };
1815
+ readonly realtime: {
1816
+ readonly coordinates: {
1817
+ readonly method: "GET";
1818
+ readonly path: "https://track.linxio.com/coordinates";
1819
+ readonly source: "public-docs";
1820
+ };
1821
+ readonly notifications: {
1822
+ readonly method: "GET";
1823
+ readonly path: "https://track.linxio.com/notifications";
1824
+ readonly source: "public-docs";
1825
+ };
1826
+ };
1827
+ readonly reports: {
1828
+ readonly digitalFormAnswer: {
1829
+ readonly method: "GET";
1830
+ readonly path: "/digital-form/answer/{answerId}";
1831
+ readonly source: "dashboard";
1832
+ };
1833
+ readonly digitalFormAnswerPdf: {
1834
+ readonly method: "GET";
1835
+ readonly path: "/digital-form/answer/{answerId}/pdf";
1836
+ readonly source: "dashboard";
1837
+ };
1838
+ readonly deleteScheduledReport: {
1839
+ readonly method: "DELETE";
1840
+ readonly path: "/scheduled-report/{reportId}";
1841
+ readonly source: "dashboard";
1842
+ };
1843
+ readonly getScheduledReport: {
1844
+ readonly method: "GET";
1845
+ readonly path: "/scheduled-report/{reportId}";
1846
+ readonly source: "dashboard";
1847
+ };
1848
+ readonly scheduledReport: {
1849
+ readonly method: "GET";
1850
+ readonly path: "/scheduled-report";
1851
+ readonly source: "dashboard";
1852
+ };
1853
+ readonly restoreScheduledReport: {
1854
+ readonly method: "PATCH";
1855
+ readonly path: "/scheduled-report/{reportId}/restore";
1856
+ readonly source: "dashboard";
1857
+ };
1858
+ readonly scheduledTemplate: {
1859
+ readonly method: "GET";
1860
+ readonly path: "/scheduled-report/template";
1861
+ readonly source: "dashboard";
1862
+ };
1863
+ readonly updateScheduledReport: {
1864
+ readonly method: "PATCH";
1865
+ readonly path: "/scheduled-report/{reportId}";
1866
+ readonly source: "dashboard";
1867
+ };
1868
+ };
1869
+ readonly sensors: {
1870
+ readonly tempHumidityDeviceReport: {
1871
+ readonly method: "GET";
1872
+ readonly path: "/devices/sensors/report/temp-and-humidity";
1873
+ readonly source: "public-docs";
1874
+ };
1875
+ readonly tempHumidityVehicleReport: {
1876
+ readonly method: "GET";
1877
+ readonly path: "/vehicles/report/sensors/temp-and-humidity";
1878
+ readonly source: "public-docs";
1879
+ };
1880
+ };
1881
+ readonly vehicles: {
1882
+ readonly archive: {
1883
+ readonly method: "PATCH";
1884
+ readonly path: "/vehicles/{vehicleId}/archive";
1885
+ readonly source: "dashboard";
1886
+ };
1887
+ readonly create: {
1888
+ readonly method: "POST";
1889
+ readonly path: "/vehicles";
1890
+ readonly source: "public-docs";
1891
+ };
1892
+ readonly count: {
1893
+ readonly method: "GET";
1894
+ readonly path: "/vehicles/count";
1895
+ readonly source: "dashboard";
1896
+ };
1897
+ readonly engineHours: {
1898
+ readonly method: "GET";
1899
+ readonly path: "/vehicles/{vehicleId}/engine-hours/current";
1900
+ readonly source: "dashboard";
1901
+ };
1902
+ readonly get: {
1903
+ readonly method: "GET";
1904
+ readonly path: "/vehicles/{vehicleId}";
1905
+ readonly source: "public-docs";
1906
+ };
1907
+ readonly list: {
1908
+ readonly method: "GET";
1909
+ readonly path: "/vehicles/fields/json";
1910
+ readonly source: "public-docs";
1911
+ };
1912
+ readonly odometer: {
1913
+ readonly method: "GET";
1914
+ readonly path: "/vehicles/{vehicleId}/odometer";
1915
+ readonly source: "public-docs";
1916
+ };
1917
+ readonly recalibrateOdometer: {
1918
+ readonly method: "POST";
1919
+ readonly path: "/vehicles/{vehicleId}/odometer";
1920
+ readonly source: "public-docs";
1921
+ };
1922
+ readonly restore: {
1923
+ readonly method: "POST";
1924
+ readonly path: "/vehicles/{vehicleId}/restore";
1925
+ readonly source: "dashboard";
1926
+ };
1927
+ readonly routes: {
1928
+ readonly method: "GET";
1929
+ readonly path: "/vehicles/{vehicleId}/routes";
1930
+ readonly source: "public-docs";
1931
+ };
1932
+ readonly update: {
1933
+ readonly method: "POST";
1934
+ readonly path: "/vehicles/{vehicleId}";
1935
+ readonly source: "public-docs";
1936
+ };
1937
+ readonly types: {
1938
+ readonly method: "GET";
1939
+ readonly path: "/vehicles/types";
1940
+ readonly source: "dashboard";
1941
+ };
1942
+ };
1943
+ };
1944
+
1945
+ /** Dashboard source file used by endpoint discovery helpers. */
1946
+ type DashboardSourceFile = {
1947
+ /** JavaScript source content captured from the Linxio dashboard. */
1948
+ content: string;
1949
+ /** Source filename used for evidence reporting. */
1950
+ filename: string;
1951
+ };
1952
+ type DashboardEndpointMethod = "DELETE" | "GET" | "PATCH" | "POST" | "PUT" | "UNKNOWN";
1953
+ /** Endpoint evidence extracted from Linxio dashboard JavaScript bundles. */
1954
+ type DashboardEndpointEvidence = {
1955
+ /** Source bundle filenames where the endpoint candidate appeared. */
1956
+ files: string[];
1957
+ /** HTTP methods inferred from nearby client calls. */
1958
+ methods: DashboardEndpointMethod[];
1959
+ /** Number of times the normalized path appeared. */
1960
+ occurrences: number;
1961
+ /** Normalized API path with dynamic template segments replaced by `{param}`. */
1962
+ path: string;
1963
+ };
1964
+ /** Coverage comparison between dashboard evidence and SDK endpoint definitions. */
1965
+ type DashboardEndpointCoverage = {
1966
+ /** Dashboard-observed endpoints represented in the SDK endpoint catalogue. */
1967
+ dashboardCovered: DashboardEndpointEvidence[];
1968
+ /** Dashboard-observed endpoints not yet represented in the SDK endpoint catalogue. */
1969
+ dashboardOnly: DashboardEndpointEvidence[];
1970
+ /** SDK catalogue endpoints not observed in the analysed dashboard bundle set. */
1971
+ sdkOnly: LinxioEndpointDefinition[];
1972
+ };
1973
+ /** Inputs accepted by {@link compareDashboardEndpointCoverage}. */
1974
+ type DashboardEndpointCoverageInput = {
1975
+ dashboardEndpoints: readonly DashboardEndpointEvidence[];
1976
+ sdkEndpoints: readonly LinxioEndpointDefinition[];
1977
+ };
1978
+ /** Extract endpoint candidates from Linxio dashboard JavaScript bundles. */
1979
+ declare function extractDashboardEndpoints(sources: readonly DashboardSourceFile[]): DashboardEndpointEvidence[];
1980
+ /** Compare extracted dashboard endpoints against SDK endpoint definitions. */
1981
+ declare function compareDashboardEndpointCoverage({ dashboardEndpoints, sdkEndpoints, }: DashboardEndpointCoverageInput): DashboardEndpointCoverage;
1982
+ /** Flatten a nested SDK endpoint catalogue into endpoint definitions. */
1983
+ declare function flattenEndpointDefinitions(catalogue: unknown): LinxioEndpointDefinition[];
1984
+
1985
+ /**
1986
+ * Load every page from a Linxio paginated endpoint into a single result.
1987
+ *
1988
+ * Services expose domain-specific wrappers around this helper, but it is
1989
+ * exported for advanced users building custom endpoint integrations.
1990
+ */
1991
+ declare function collectPages<TData, TParams extends ListParams>(loadPage: (params: TParams) => Promise<LinxioPageResult<TData>>, params?: TParams): Promise<LinxioResult<TData[]>>;
1992
+ /**
1993
+ * Stream a Linxio paginated endpoint one item at a time.
1994
+ *
1995
+ * This helper throws the typed SDK error if any page fails. Use
1996
+ * {@link collectPages} when you prefer a `{ data, error }` result.
1997
+ */
1998
+ declare function streamPages<TData, TParams extends ListParams>(loadPage: (params: TParams) => Promise<LinxioPageResult<TData>>, params?: TParams): AsyncGenerator<TData, void, undefined>;
1999
+
2000
+ export { AuthService, BaseService, CamerasService, ClientsService, type DashboardEndpointCoverage, type DashboardEndpointCoverageInput, type DashboardEndpointEvidence, type DashboardEndpointMethod, type DashboardSourceFile, type DateRangeParams, type DeviceField, DevicesService, DigitalFormsService, type DriverField, DriversService, type FetchLike, type FieldSelector, type FuelRecordField, FuelService, type GeofenceType, GeofencesService, HttpClient, type HttpMethod, type ISODateString, type JsonObject, type JsonPrimitive, type JsonValue, type LatLng, LinxioApiError, type LinxioApiErrorContext, type LinxioAreaGroup, type LinxioAreaGroupPayload, LinxioAuthenticationError, LinxioClient, type LinxioClientAccount, type LinxioClientOptions, type LinxioClientUserListParams, LinxioConfigurationError, type LinxioCount, type LinxioCountry, type LinxioCountryMap, type LinxioCurrency, type LinxioCurrentPlan, type LinxioCurrentUser, type LinxioDevice, type LinxioDeviceCamera, type LinxioDeviceCoordinate, type LinxioDeviceCoordinateParams, type LinxioDeviceInstallation, type LinxioDeviceInstallationLookupParams, type LinxioDeviceInstallationPayload, type LinxioDeviceListParams, type LinxioDeviceModel, type LinxioDevicePayload, type LinxioDeviceUninstallPayload, type LinxioDeviceVendor, type LinxioDigitalForm, type LinxioDigitalFormSettings, type LinxioDriver, type LinxioDriverListParams, type LinxioEcoSpeedSettings, type LinxioEndpointDefinition, type LinxioEndpointSource, type LinxioEngineHours, LinxioError, type LinxioErrorContext, type LinxioExcessiveIdlingSettings, type LinxioFailure, type LinxioFileFormat, type LinxioFuelCard, type LinxioFuelListParams, type LinxioFuelRecord, type LinxioFuelSummaryRecord, type LinxioGeofence, type LinxioGeofenceListParams, type LinxioGeofencePayload, type LinxioHttpConfig, type LinxioHttpRequestOptions, type LinxioId, type LinxioLanguage, type LinxioLoginRequest, type LinxioLoginResponse, type LinxioMapApiOption, type LinxioMetadataRecord, LinxioNetworkError, type LinxioNotification, type LinxioOdometer, type LinxioOdometerParams, type LinxioOdometerRecalibration, type LinxioOtpVerificationRequest, type LinxioPage, type LinxioPageEnvelope, type LinxioPageFailure, type LinxioPageResult, type LinxioPageSuccess, type LinxioPaginationMeta, type LinxioPlan, type LinxioPlatformDomain, type LinxioProviderSetting, LinxioRealtimeError, type LinxioRealtimeNamespace, type LinxioRealtimeSubscribeAck, type LinxioRealtimeSubscription, type LinxioRecord, type LinxioRefreshTokenResponse, type LinxioReportParams, type LinxioReseller, type LinxioResourceStatus, type LinxioResult, type LinxioRole, type LinxioRouteCoordinate, type LinxioRoutePoint, type LinxioScheduledReport, type LinxioScheduledReportPayload, type LinxioSensor, type LinxioSensorListParams, type LinxioSensorReportParams, type LinxioSession, type LinxioSettingRecord, type LinxioSuccess, type LinxioTeamSummary, type LinxioTeamType, type LinxioTemperatureHumidityReading, type LinxioTheme, LinxioTimeoutError, type LinxioTimezone, type LinxioTrackingPosition, type LinxioUser, type LinxioUserAuditSummary, type LinxioUserListParams, type LinxioUserPayload, type LinxioUserSummary, LinxioValidationError, type LinxioVehicle, type LinxioVehicleAreaAssignment, type LinxioVehicleCountParams, type LinxioVehicleDepot, type LinxioVehicleDriver, type LinxioVehicleGroup, type LinxioVehicleListParams, type LinxioVehiclePayload, type LinxioVehicleRoute, type LinxioVehicleRoutesGroup, type LinxioVehicleRoutesParams, type LinxioVehicleType, type LinxioVehicleTypeParams, type ListParams, MetadataService, type QueryParams, type QueryPrimitive, type QueryValue, RealtimeClient, type RealtimeClientOptions, type RealtimeEventHandler, type RealtimeUnsubscribe, ReportsService, ResellersService, type ResponseType, type RetryOptions, type RouteField, RoutesService, type SensorField, SensorsService, type SortDirection, type UserField, UsersService, type VehicleField, VehiclesService, collectPages, compareDashboardEndpointCoverage, createClient, extractDashboardEndpoints, fail, flattenEndpointDefinitions, isLinxioFailure, linxioEndpoints, ok, pageFail, pageOk, streamPages, toLinxioError, toResult, unwrapLinxioPageResult, unwrapLinxioResult };