@trackunit/filters-graphql-hook 2.3.9 → 2.3.10-alpha-6c55bc583d7.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/index.cjs.js +46 -19
- package/index.esm.js +46 -19
- package/migrations/entry.js.map +1 -0
- package/package.json +9 -9
- package/src/generated/graphql-api/graphql.d.ts +61 -14
- package/src/parseAssetFiltersInput.d.ts +15 -13
package/index.cjs.js
CHANGED
|
@@ -295,6 +295,7 @@ const accessManagementMode = {
|
|
|
295
295
|
const assetActivityState = {
|
|
296
296
|
IDLING: "IDLING",
|
|
297
297
|
STOPPED: "STOPPED",
|
|
298
|
+
UNDEFINED: "UNDEFINED",
|
|
298
299
|
UNKNOWN: "UNKNOWN",
|
|
299
300
|
WORKING: "WORKING",
|
|
300
301
|
};
|
|
@@ -319,21 +320,21 @@ const assetType = {
|
|
|
319
320
|
TOOL: "TOOL",
|
|
320
321
|
VEHICLE: "VEHICLE",
|
|
321
322
|
};
|
|
322
|
-
const
|
|
323
|
+
const deviceHealthDeviceStatus = {
|
|
323
324
|
CRITICAL: "CRITICAL",
|
|
324
325
|
LOW: "LOW",
|
|
325
326
|
};
|
|
326
|
-
const
|
|
327
|
+
const deviceHealthIssueCategory = {
|
|
327
328
|
COVERAGE: "COVERAGE",
|
|
328
329
|
DEVICE_BATTERY: "DEVICE_BATTERY",
|
|
329
330
|
INSTALL_AND_CONFIGURATION: "INSTALL_AND_CONFIGURATION",
|
|
330
331
|
NON_REPORTING_DEVICE: "NON_REPORTING_DEVICE",
|
|
331
332
|
};
|
|
332
|
-
const
|
|
333
|
+
const deviceHealthIssueState = {
|
|
333
334
|
OPEN: "OPEN",
|
|
334
335
|
RESOLVED: "RESOLVED",
|
|
335
336
|
};
|
|
336
|
-
const
|
|
337
|
+
const deviceHealthIssueType = {
|
|
337
338
|
DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED",
|
|
338
339
|
DEVICE_BATTERY_APPROACHING_END_OF_LIFE: "DEVICE_BATTERY_APPROACHING_END_OF_LIFE",
|
|
339
340
|
LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE",
|
|
@@ -361,6 +362,7 @@ const rentalStatus = {
|
|
|
361
362
|
RESERVED: "RESERVED",
|
|
362
363
|
RETURNED: "RETURNED",
|
|
363
364
|
TRANSFER: "TRANSFER",
|
|
365
|
+
UNDEFINED: "UNDEFINED",
|
|
364
366
|
};
|
|
365
367
|
const servicePlanStatus = {
|
|
366
368
|
COMPLETE: "COMPLETE",
|
|
@@ -514,16 +516,16 @@ const useActiveAssetFilters = (filters) => {
|
|
|
514
516
|
telematicsDeviceIsConnected: valueBooleanOrUndefined(filters.telematicsConnected),
|
|
515
517
|
activeFilter: activeFilterToGraphQL(filters.activeFilter),
|
|
516
518
|
owningDepotSiteIds: valueNameArrayOrUndefined(filters.siteDepotOwnershipIds),
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
519
|
+
deviceHealthTypes: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthTypes), deviceHealthIssueType),
|
|
520
|
+
deviceHealthCategories: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthCategories), deviceHealthIssueCategory),
|
|
521
|
+
deviceHealthStates: (() => {
|
|
520
522
|
const hasSubFilters = (valueNameArrayOrUndefined(filters.fleetHealthTypes)?.length ?? 0) > 0 ||
|
|
521
523
|
(valueNameArrayOrUndefined(filters.fleetHealthCategories)?.length ?? 0) > 0 ||
|
|
522
524
|
(valueNameArrayOrUndefined(filters.fleetHealthStatus)?.length ?? 0) > 0;
|
|
523
525
|
// Default to OPEN when sub-filters are active
|
|
524
|
-
return fixTypes(hasSubFilters ? [
|
|
526
|
+
return fixTypes(hasSubFilters ? [deviceHealthIssueState.OPEN] : undefined, deviceHealthIssueState);
|
|
525
527
|
})(),
|
|
526
|
-
|
|
528
|
+
deviceHealthDeviceStatuses: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthStatus), deviceHealthDeviceStatus),
|
|
527
529
|
deviceTypes: valueNameArrayOrUndefined(filters.deviceTypes),
|
|
528
530
|
firmwareVersion: valueNameArrayOrUndefined(filters.firmwareVersion),
|
|
529
531
|
can1Profile: valueNameArrayOrUndefined(filters.can1Profile),
|
|
@@ -622,9 +624,9 @@ const assetFiltersInputSchema = zod.z
|
|
|
622
624
|
customerIds: zod.z.array(zod.z.string()).optional(),
|
|
623
625
|
deviceTypes: zod.z.array(zod.z.string()).optional(),
|
|
624
626
|
firmwareVersion: zod.z.array(zod.z.string()).optional(),
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
627
|
+
deviceHealthCategories: zod.z.array(zod.z.nativeEnum(deviceHealthIssueCategory)).optional(),
|
|
628
|
+
deviceHealthDeviceStatuses: zod.z.array(zod.z.nativeEnum(deviceHealthDeviceStatus)).optional(),
|
|
629
|
+
deviceHealthTypes: zod.z.array(zod.z.nativeEnum(deviceHealthIssueType)).optional(),
|
|
628
630
|
groups: zod.z.array(zod.z.string()).optional(),
|
|
629
631
|
customFields: zod.z.array(customFieldSchema).optional(),
|
|
630
632
|
insightsFilters: zod.z
|
|
@@ -709,6 +711,31 @@ const stripNullProperties = (value) => {
|
|
|
709
711
|
}
|
|
710
712
|
return value;
|
|
711
713
|
};
|
|
714
|
+
/**
|
|
715
|
+
* Legacy → current AssetFiltersInput key aliases. Old shared /goto links may still carry the
|
|
716
|
+
* pre-rename `fleetHealth*` keys, so they are normalized to the current `deviceHealth*` keys
|
|
717
|
+
* instead of being silently stripped.
|
|
718
|
+
*/
|
|
719
|
+
const legacyFilterKeyAliases = {
|
|
720
|
+
fleetHealthCategories: "deviceHealthCategories",
|
|
721
|
+
fleetHealthDeviceStatuses: "deviceHealthDeviceStatuses",
|
|
722
|
+
fleetHealthTypes: "deviceHealthTypes",
|
|
723
|
+
};
|
|
724
|
+
const renameLegacyFilterKeys = (value) => {
|
|
725
|
+
if (!isPlainObject(value)) {
|
|
726
|
+
return value;
|
|
727
|
+
}
|
|
728
|
+
const result = { ...value };
|
|
729
|
+
for (const [legacyKey, currentKey] of Object.entries(legacyFilterKeyAliases)) {
|
|
730
|
+
if (legacyKey in result) {
|
|
731
|
+
if (!(currentKey in result)) {
|
|
732
|
+
result[currentKey] = result[legacyKey];
|
|
733
|
+
}
|
|
734
|
+
delete result[legacyKey];
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
return result;
|
|
738
|
+
};
|
|
712
739
|
/**
|
|
713
740
|
* Validates an unknown payload against the supported public GraphQL AssetFiltersInput subset.
|
|
714
741
|
*
|
|
@@ -718,7 +745,7 @@ const stripNullProperties = (value) => {
|
|
|
718
745
|
* @returns {ParseAssetFiltersInputResult} The stripped, validated subset or a validation error.
|
|
719
746
|
*/
|
|
720
747
|
const parseAssetFiltersInput = (input) => {
|
|
721
|
-
const parsed = assetFiltersInputSchema.safeParse(stripNullProperties(input));
|
|
748
|
+
const parsed = assetFiltersInputSchema.safeParse(renameLegacyFilterKeys(stripNullProperties(input)));
|
|
722
749
|
if (!parsed.success) {
|
|
723
750
|
return { success: false, error: parsed.error.message };
|
|
724
751
|
}
|
|
@@ -821,14 +848,14 @@ const convertAssetFiltersInputToFilterBarValues = (input) => {
|
|
|
821
848
|
if (parsed.data.siteTypes !== undefined) {
|
|
822
849
|
filterBarValues.siteType = parsed.data.siteTypes;
|
|
823
850
|
}
|
|
824
|
-
if (parsed.data.
|
|
825
|
-
filterBarValues.fleetHealthTypes = toValueNameArray(parsed.data.
|
|
851
|
+
if (parsed.data.deviceHealthTypes !== undefined) {
|
|
852
|
+
filterBarValues.fleetHealthTypes = toValueNameArray(parsed.data.deviceHealthTypes);
|
|
826
853
|
}
|
|
827
|
-
if (parsed.data.
|
|
828
|
-
filterBarValues.fleetHealthCategories = toValueNameArray(parsed.data.
|
|
854
|
+
if (parsed.data.deviceHealthCategories !== undefined) {
|
|
855
|
+
filterBarValues.fleetHealthCategories = toValueNameArray(parsed.data.deviceHealthCategories);
|
|
829
856
|
}
|
|
830
|
-
if (parsed.data.
|
|
831
|
-
filterBarValues.fleetHealthStatus = toValueNameArray(parsed.data.
|
|
857
|
+
if (parsed.data.deviceHealthDeviceStatuses !== undefined) {
|
|
858
|
+
filterBarValues.fleetHealthStatus = toValueNameArray(parsed.data.deviceHealthDeviceStatuses);
|
|
832
859
|
}
|
|
833
860
|
if (parsed.data.accessManagementDesiredModes !== undefined) {
|
|
834
861
|
filterBarValues.accessManagementMode = parsed.data.accessManagementDesiredModes;
|
package/index.esm.js
CHANGED
|
@@ -293,6 +293,7 @@ const accessManagementMode = {
|
|
|
293
293
|
const assetActivityState = {
|
|
294
294
|
IDLING: "IDLING",
|
|
295
295
|
STOPPED: "STOPPED",
|
|
296
|
+
UNDEFINED: "UNDEFINED",
|
|
296
297
|
UNKNOWN: "UNKNOWN",
|
|
297
298
|
WORKING: "WORKING",
|
|
298
299
|
};
|
|
@@ -317,21 +318,21 @@ const assetType = {
|
|
|
317
318
|
TOOL: "TOOL",
|
|
318
319
|
VEHICLE: "VEHICLE",
|
|
319
320
|
};
|
|
320
|
-
const
|
|
321
|
+
const deviceHealthDeviceStatus = {
|
|
321
322
|
CRITICAL: "CRITICAL",
|
|
322
323
|
LOW: "LOW",
|
|
323
324
|
};
|
|
324
|
-
const
|
|
325
|
+
const deviceHealthIssueCategory = {
|
|
325
326
|
COVERAGE: "COVERAGE",
|
|
326
327
|
DEVICE_BATTERY: "DEVICE_BATTERY",
|
|
327
328
|
INSTALL_AND_CONFIGURATION: "INSTALL_AND_CONFIGURATION",
|
|
328
329
|
NON_REPORTING_DEVICE: "NON_REPORTING_DEVICE",
|
|
329
330
|
};
|
|
330
|
-
const
|
|
331
|
+
const deviceHealthIssueState = {
|
|
331
332
|
OPEN: "OPEN",
|
|
332
333
|
RESOLVED: "RESOLVED",
|
|
333
334
|
};
|
|
334
|
-
const
|
|
335
|
+
const deviceHealthIssueType = {
|
|
335
336
|
DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED",
|
|
336
337
|
DEVICE_BATTERY_APPROACHING_END_OF_LIFE: "DEVICE_BATTERY_APPROACHING_END_OF_LIFE",
|
|
337
338
|
LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE",
|
|
@@ -359,6 +360,7 @@ const rentalStatus = {
|
|
|
359
360
|
RESERVED: "RESERVED",
|
|
360
361
|
RETURNED: "RETURNED",
|
|
361
362
|
TRANSFER: "TRANSFER",
|
|
363
|
+
UNDEFINED: "UNDEFINED",
|
|
362
364
|
};
|
|
363
365
|
const servicePlanStatus = {
|
|
364
366
|
COMPLETE: "COMPLETE",
|
|
@@ -512,16 +514,16 @@ const useActiveAssetFilters = (filters) => {
|
|
|
512
514
|
telematicsDeviceIsConnected: valueBooleanOrUndefined(filters.telematicsConnected),
|
|
513
515
|
activeFilter: activeFilterToGraphQL(filters.activeFilter),
|
|
514
516
|
owningDepotSiteIds: valueNameArrayOrUndefined(filters.siteDepotOwnershipIds),
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
517
|
+
deviceHealthTypes: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthTypes), deviceHealthIssueType),
|
|
518
|
+
deviceHealthCategories: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthCategories), deviceHealthIssueCategory),
|
|
519
|
+
deviceHealthStates: (() => {
|
|
518
520
|
const hasSubFilters = (valueNameArrayOrUndefined(filters.fleetHealthTypes)?.length ?? 0) > 0 ||
|
|
519
521
|
(valueNameArrayOrUndefined(filters.fleetHealthCategories)?.length ?? 0) > 0 ||
|
|
520
522
|
(valueNameArrayOrUndefined(filters.fleetHealthStatus)?.length ?? 0) > 0;
|
|
521
523
|
// Default to OPEN when sub-filters are active
|
|
522
|
-
return fixTypes(hasSubFilters ? [
|
|
524
|
+
return fixTypes(hasSubFilters ? [deviceHealthIssueState.OPEN] : undefined, deviceHealthIssueState);
|
|
523
525
|
})(),
|
|
524
|
-
|
|
526
|
+
deviceHealthDeviceStatuses: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthStatus), deviceHealthDeviceStatus),
|
|
525
527
|
deviceTypes: valueNameArrayOrUndefined(filters.deviceTypes),
|
|
526
528
|
firmwareVersion: valueNameArrayOrUndefined(filters.firmwareVersion),
|
|
527
529
|
can1Profile: valueNameArrayOrUndefined(filters.can1Profile),
|
|
@@ -620,9 +622,9 @@ const assetFiltersInputSchema = z
|
|
|
620
622
|
customerIds: z.array(z.string()).optional(),
|
|
621
623
|
deviceTypes: z.array(z.string()).optional(),
|
|
622
624
|
firmwareVersion: z.array(z.string()).optional(),
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
625
|
+
deviceHealthCategories: z.array(z.nativeEnum(deviceHealthIssueCategory)).optional(),
|
|
626
|
+
deviceHealthDeviceStatuses: z.array(z.nativeEnum(deviceHealthDeviceStatus)).optional(),
|
|
627
|
+
deviceHealthTypes: z.array(z.nativeEnum(deviceHealthIssueType)).optional(),
|
|
626
628
|
groups: z.array(z.string()).optional(),
|
|
627
629
|
customFields: z.array(customFieldSchema).optional(),
|
|
628
630
|
insightsFilters: z
|
|
@@ -707,6 +709,31 @@ const stripNullProperties = (value) => {
|
|
|
707
709
|
}
|
|
708
710
|
return value;
|
|
709
711
|
};
|
|
712
|
+
/**
|
|
713
|
+
* Legacy → current AssetFiltersInput key aliases. Old shared /goto links may still carry the
|
|
714
|
+
* pre-rename `fleetHealth*` keys, so they are normalized to the current `deviceHealth*` keys
|
|
715
|
+
* instead of being silently stripped.
|
|
716
|
+
*/
|
|
717
|
+
const legacyFilterKeyAliases = {
|
|
718
|
+
fleetHealthCategories: "deviceHealthCategories",
|
|
719
|
+
fleetHealthDeviceStatuses: "deviceHealthDeviceStatuses",
|
|
720
|
+
fleetHealthTypes: "deviceHealthTypes",
|
|
721
|
+
};
|
|
722
|
+
const renameLegacyFilterKeys = (value) => {
|
|
723
|
+
if (!isPlainObject(value)) {
|
|
724
|
+
return value;
|
|
725
|
+
}
|
|
726
|
+
const result = { ...value };
|
|
727
|
+
for (const [legacyKey, currentKey] of Object.entries(legacyFilterKeyAliases)) {
|
|
728
|
+
if (legacyKey in result) {
|
|
729
|
+
if (!(currentKey in result)) {
|
|
730
|
+
result[currentKey] = result[legacyKey];
|
|
731
|
+
}
|
|
732
|
+
delete result[legacyKey];
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
return result;
|
|
736
|
+
};
|
|
710
737
|
/**
|
|
711
738
|
* Validates an unknown payload against the supported public GraphQL AssetFiltersInput subset.
|
|
712
739
|
*
|
|
@@ -716,7 +743,7 @@ const stripNullProperties = (value) => {
|
|
|
716
743
|
* @returns {ParseAssetFiltersInputResult} The stripped, validated subset or a validation error.
|
|
717
744
|
*/
|
|
718
745
|
const parseAssetFiltersInput = (input) => {
|
|
719
|
-
const parsed = assetFiltersInputSchema.safeParse(stripNullProperties(input));
|
|
746
|
+
const parsed = assetFiltersInputSchema.safeParse(renameLegacyFilterKeys(stripNullProperties(input)));
|
|
720
747
|
if (!parsed.success) {
|
|
721
748
|
return { success: false, error: parsed.error.message };
|
|
722
749
|
}
|
|
@@ -819,14 +846,14 @@ const convertAssetFiltersInputToFilterBarValues = (input) => {
|
|
|
819
846
|
if (parsed.data.siteTypes !== undefined) {
|
|
820
847
|
filterBarValues.siteType = parsed.data.siteTypes;
|
|
821
848
|
}
|
|
822
|
-
if (parsed.data.
|
|
823
|
-
filterBarValues.fleetHealthTypes = toValueNameArray(parsed.data.
|
|
849
|
+
if (parsed.data.deviceHealthTypes !== undefined) {
|
|
850
|
+
filterBarValues.fleetHealthTypes = toValueNameArray(parsed.data.deviceHealthTypes);
|
|
824
851
|
}
|
|
825
|
-
if (parsed.data.
|
|
826
|
-
filterBarValues.fleetHealthCategories = toValueNameArray(parsed.data.
|
|
852
|
+
if (parsed.data.deviceHealthCategories !== undefined) {
|
|
853
|
+
filterBarValues.fleetHealthCategories = toValueNameArray(parsed.data.deviceHealthCategories);
|
|
827
854
|
}
|
|
828
|
-
if (parsed.data.
|
|
829
|
-
filterBarValues.fleetHealthStatus = toValueNameArray(parsed.data.
|
|
855
|
+
if (parsed.data.deviceHealthDeviceStatuses !== undefined) {
|
|
856
|
+
filterBarValues.fleetHealthStatus = toValueNameArray(parsed.data.deviceHealthDeviceStatuses);
|
|
830
857
|
}
|
|
831
858
|
if (parsed.data.accessManagementDesiredModes !== undefined) {
|
|
832
859
|
filterBarValues.accessManagementMode = parsed.data.accessManagementDesiredModes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/filters/graphql-hook/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-graphql-hook",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.10-alpha-6c55bc583d7.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"@graphql-codegen/cli": "^5.0.3",
|
|
11
11
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
12
12
|
"zod": "^3.25.76",
|
|
13
|
-
"@trackunit/iris-app-build-utilities": "2.1.
|
|
14
|
-
"@trackunit/filters-filter-bar": "2.2.
|
|
15
|
-
"@trackunit/shared-utils": "1.15.
|
|
16
|
-
"@trackunit/iris-app-api": "2.1.
|
|
17
|
-
"@trackunit/react-core-contexts-test": "1.17.
|
|
18
|
-
"@trackunit/i18n-library-translation": "2.1.
|
|
19
|
-
"@trackunit/iris-app-runtime-core-api": "1.16.
|
|
20
|
-
"@trackunit/react-core-hooks": "1.18.
|
|
13
|
+
"@trackunit/iris-app-build-utilities": "2.1.6-alpha-6c55bc583d7.0",
|
|
14
|
+
"@trackunit/filters-filter-bar": "2.2.7-alpha-6c55bc583d7.0",
|
|
15
|
+
"@trackunit/shared-utils": "1.15.67-alpha-6c55bc583d7.0",
|
|
16
|
+
"@trackunit/iris-app-api": "2.1.5-alpha-6c55bc583d7.0",
|
|
17
|
+
"@trackunit/react-core-contexts-test": "1.17.74-alpha-6c55bc583d7.0",
|
|
18
|
+
"@trackunit/i18n-library-translation": "2.1.5-alpha-6c55bc583d7.0",
|
|
19
|
+
"@trackunit/iris-app-runtime-core-api": "1.16.73-alpha-6c55bc583d7.0",
|
|
20
|
+
"@trackunit/react-core-hooks": "1.18.5-alpha-6c55bc583d7.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@apollo/client": "^3.13.8",
|
|
@@ -144,6 +144,7 @@ export type AreaFilterGeoJsonGeometryType = (typeof areaFilterGeoJsonGeometryTyp
|
|
|
144
144
|
export declare const assetActivityState: {
|
|
145
145
|
readonly IDLING: "IDLING";
|
|
146
146
|
readonly STOPPED: "STOPPED";
|
|
147
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
147
148
|
readonly UNKNOWN: "UNKNOWN";
|
|
148
149
|
readonly WORKING: "WORKING";
|
|
149
150
|
};
|
|
@@ -403,6 +404,37 @@ export declare const customerTypeSFS: {
|
|
|
403
404
|
readonly SERVICE: "SERVICE";
|
|
404
405
|
};
|
|
405
406
|
export type CustomerTypeSFS = (typeof customerTypeSFS)[keyof typeof customerTypeSFS];
|
|
407
|
+
export declare const deviceHealthDeviceStatus: {
|
|
408
|
+
readonly CRITICAL: "CRITICAL";
|
|
409
|
+
readonly LOW: "LOW";
|
|
410
|
+
};
|
|
411
|
+
export type DeviceHealthDeviceStatus = (typeof deviceHealthDeviceStatus)[keyof typeof deviceHealthDeviceStatus];
|
|
412
|
+
export declare const deviceHealthIssueCategory: {
|
|
413
|
+
readonly COVERAGE: "COVERAGE";
|
|
414
|
+
readonly DEVICE_BATTERY: "DEVICE_BATTERY";
|
|
415
|
+
readonly INSTALL_AND_CONFIGURATION: "INSTALL_AND_CONFIGURATION";
|
|
416
|
+
readonly NON_REPORTING_DEVICE: "NON_REPORTING_DEVICE";
|
|
417
|
+
};
|
|
418
|
+
export type DeviceHealthIssueCategory = (typeof deviceHealthIssueCategory)[keyof typeof deviceHealthIssueCategory];
|
|
419
|
+
export declare const deviceHealthIssueState: {
|
|
420
|
+
readonly OPEN: "OPEN";
|
|
421
|
+
readonly RESOLVED: "RESOLVED";
|
|
422
|
+
};
|
|
423
|
+
export type DeviceHealthIssueState = (typeof deviceHealthIssueState)[keyof typeof deviceHealthIssueState];
|
|
424
|
+
export declare const deviceHealthIssueType: {
|
|
425
|
+
readonly DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED";
|
|
426
|
+
readonly DEVICE_BATTERY_APPROACHING_END_OF_LIFE: "DEVICE_BATTERY_APPROACHING_END_OF_LIFE";
|
|
427
|
+
readonly LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE";
|
|
428
|
+
readonly LOW_DEVICE_BATTERY: "LOW_DEVICE_BATTERY";
|
|
429
|
+
readonly LOW_DEVICE_INPUT_VOLTAGE: "LOW_DEVICE_INPUT_VOLTAGE";
|
|
430
|
+
readonly LOW_GPS_COVERAGE: "LOW_GPS_COVERAGE";
|
|
431
|
+
readonly NO_CAN_DATA_CONFIGURATION: "NO_CAN_DATA_CONFIGURATION";
|
|
432
|
+
readonly OPERATING_HOURS_FROM_CAN_MODIFIED: "OPERATING_HOURS_FROM_CAN_MODIFIED";
|
|
433
|
+
readonly OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY: "OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY";
|
|
434
|
+
readonly OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY: "OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY";
|
|
435
|
+
readonly UNUSUAL_OPERATING_HOURS: "UNUSUAL_OPERATING_HOURS";
|
|
436
|
+
};
|
|
437
|
+
export type DeviceHealthIssueType = (typeof deviceHealthIssueType)[keyof typeof deviceHealthIssueType];
|
|
406
438
|
export declare const digitalKeyMode: {
|
|
407
439
|
readonly DISABLED: "DISABLED";
|
|
408
440
|
readonly LOCKED_FOR_ALL: "LOCKED_FOR_ALL";
|
|
@@ -501,6 +533,7 @@ export declare const rentalStatus: {
|
|
|
501
533
|
readonly RESERVED: "RESERVED";
|
|
502
534
|
readonly RETURNED: "RETURNED";
|
|
503
535
|
readonly TRANSFER: "TRANSFER";
|
|
536
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
504
537
|
};
|
|
505
538
|
export type RentalStatus = (typeof rentalStatus)[keyof typeof rentalStatus];
|
|
506
539
|
export declare const servicePlanStatus: {
|
|
@@ -593,6 +626,16 @@ export type AssetFiltersInput = {
|
|
|
593
626
|
customerIds?: InputMaybe<Array<Scalars["ID"]["input"]>>;
|
|
594
627
|
/** List of customer types */
|
|
595
628
|
customerTypes?: InputMaybe<Array<CustomerTypeSFS>>;
|
|
629
|
+
/** Filter by Device Health Categories */
|
|
630
|
+
deviceHealthCategories?: InputMaybe<Array<DeviceHealthIssueCategory>>;
|
|
631
|
+
/** Filter by Device Health datetime range */
|
|
632
|
+
deviceHealthDateTimeRange?: InputMaybe<DateTimeRange>;
|
|
633
|
+
/** Filter by Device Health device statuses */
|
|
634
|
+
deviceHealthDeviceStatuses?: InputMaybe<Array<DeviceHealthDeviceStatus>>;
|
|
635
|
+
/** Filter by Device Health states */
|
|
636
|
+
deviceHealthStates?: InputMaybe<Array<DeviceHealthIssueState>>;
|
|
637
|
+
/** Filter by Device Health Types */
|
|
638
|
+
deviceHealthTypes?: InputMaybe<Array<DeviceHealthIssueType>>;
|
|
596
639
|
/** Filter by telematics device types */
|
|
597
640
|
deviceTypes?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
598
641
|
/**
|
|
@@ -604,20 +647,30 @@ export type AssetFiltersInput = {
|
|
|
604
647
|
externalReferences?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
605
648
|
/** Filter by reported firmware versions */
|
|
606
649
|
firmwareVersion?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
607
|
-
/**
|
|
650
|
+
/**
|
|
651
|
+
* Filter by Fleet Health Categories
|
|
652
|
+
* @deprecated Use `deviceHealthCategories` instead
|
|
653
|
+
*/
|
|
608
654
|
fleetHealthCategories?: InputMaybe<Array<FleetDataHealthIssueCategory>>;
|
|
609
655
|
/**
|
|
610
|
-
* Filter by Fleet Health
|
|
611
|
-
* @deprecated Use
|
|
656
|
+
* Filter by Fleet Health datetime range
|
|
657
|
+
* @deprecated Use `deviceHealthDateTimeRange` instead
|
|
612
658
|
*/
|
|
613
|
-
fleetHealthDateRange?: InputMaybe<DateRange>;
|
|
614
|
-
/** Filter by Fleet Health datetime range */
|
|
615
659
|
fleetHealthDateTimeRange?: InputMaybe<DateTimeRange>;
|
|
616
|
-
/**
|
|
660
|
+
/**
|
|
661
|
+
* Filter by Fleet Health device statuses
|
|
662
|
+
* @deprecated Use `deviceHealthDeviceStatuses` instead
|
|
663
|
+
*/
|
|
617
664
|
fleetHealthDeviceStatuses?: InputMaybe<Array<FleetDataHealthDeviceStatus>>;
|
|
618
|
-
/**
|
|
665
|
+
/**
|
|
666
|
+
* Filter by Fleet Health states
|
|
667
|
+
* @deprecated Use `deviceHealthStates` instead
|
|
668
|
+
*/
|
|
619
669
|
fleetHealthStates?: InputMaybe<Array<FleetDataHealthIssueState>>;
|
|
620
|
-
/**
|
|
670
|
+
/**
|
|
671
|
+
* Filter by Fleet Health Types
|
|
672
|
+
* @deprecated Use `deviceHealthTypes` instead
|
|
673
|
+
*/
|
|
621
674
|
fleetHealthTypes?: InputMaybe<Array<FleetDataHealthIssueType>>;
|
|
622
675
|
/** Filter by if the asset is followed */
|
|
623
676
|
followed?: InputMaybe<Scalars["Boolean"]["input"]>;
|
|
@@ -779,12 +832,6 @@ export type CustomFieldOwnerInput = {
|
|
|
779
832
|
/** The owner type of the custom field owner input. */
|
|
780
833
|
ownerType: CustomFieldOwnerType;
|
|
781
834
|
};
|
|
782
|
-
export type DateRange = {
|
|
783
|
-
/** end date */
|
|
784
|
-
end: Scalars["DateTime"]["input"];
|
|
785
|
-
/** start date */
|
|
786
|
-
start: Scalars["DateTime"]["input"];
|
|
787
|
-
};
|
|
788
835
|
export type DateTimeRange = {
|
|
789
836
|
/** Start date */
|
|
790
837
|
from?: InputMaybe<Scalars["DateTime"]["input"]>;
|
|
@@ -17,6 +17,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
17
17
|
activities: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
|
|
18
18
|
readonly IDLING: "IDLING";
|
|
19
19
|
readonly STOPPED: "STOPPED";
|
|
20
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
20
21
|
readonly UNKNOWN: "UNKNOWN";
|
|
21
22
|
readonly WORKING: "WORKING";
|
|
22
23
|
}>, "many">>;
|
|
@@ -92,17 +93,17 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
92
93
|
customerIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
93
94
|
deviceTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
94
95
|
firmwareVersion: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
|
-
|
|
96
|
+
deviceHealthCategories: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
|
|
96
97
|
readonly COVERAGE: "COVERAGE";
|
|
97
98
|
readonly DEVICE_BATTERY: "DEVICE_BATTERY";
|
|
98
99
|
readonly INSTALL_AND_CONFIGURATION: "INSTALL_AND_CONFIGURATION";
|
|
99
100
|
readonly NON_REPORTING_DEVICE: "NON_REPORTING_DEVICE";
|
|
100
101
|
}>, "many">>;
|
|
101
|
-
|
|
102
|
+
deviceHealthDeviceStatuses: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
|
|
102
103
|
readonly CRITICAL: "CRITICAL";
|
|
103
104
|
readonly LOW: "LOW";
|
|
104
105
|
}>, "many">>;
|
|
105
|
-
|
|
106
|
+
deviceHealthTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
|
|
106
107
|
readonly DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED";
|
|
107
108
|
readonly DEVICE_BATTERY_APPROACHING_END_OF_LIFE: "DEVICE_BATTERY_APPROACHING_END_OF_LIFE";
|
|
108
109
|
readonly LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE";
|
|
@@ -405,6 +406,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
405
406
|
readonly RESERVED: "RESERVED";
|
|
406
407
|
readonly RETURNED: "RETURNED";
|
|
407
408
|
readonly TRANSFER: "TRANSFER";
|
|
409
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
408
410
|
}>, "many">>;
|
|
409
411
|
searchQuery: z.ZodOptional<z.ZodString>;
|
|
410
412
|
serviceBooked: z.ZodOptional<z.ZodArray<z.ZodBoolean, "many">>;
|
|
@@ -452,7 +454,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
452
454
|
}, "strip", z.ZodTypeAny, {
|
|
453
455
|
accessManagementDesiredModes?: ("LOCKED_FOR_ALL" | "UNKNOWN" | "UNLOCKED_FOR_ALL" | "UNLOCKED_FOR_KEY" | "UNSUPPORTED")[] | undefined;
|
|
454
456
|
activeFilter?: boolean | undefined;
|
|
455
|
-
activities?: ("UNKNOWN" | "IDLING" | "STOPPED" | "WORKING")[] | undefined;
|
|
457
|
+
activities?: ("UNKNOWN" | "IDLING" | "STOPPED" | "UNDEFINED" | "WORKING")[] | undefined;
|
|
456
458
|
area?: {
|
|
457
459
|
type: "Polygon";
|
|
458
460
|
coordinates: ([number, number] | [number, number, number])[][];
|
|
@@ -484,11 +486,11 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
484
486
|
stringWildcardValue?: string | undefined;
|
|
485
487
|
}[] | undefined;
|
|
486
488
|
customerIds?: string[] | undefined;
|
|
489
|
+
deviceHealthCategories?: ("COVERAGE" | "DEVICE_BATTERY" | "INSTALL_AND_CONFIGURATION" | "NON_REPORTING_DEVICE")[] | undefined;
|
|
490
|
+
deviceHealthDeviceStatuses?: ("CRITICAL" | "LOW")[] | undefined;
|
|
491
|
+
deviceHealthTypes?: ("DATA_NOT_RECEIVED" | "DEVICE_BATTERY_APPROACHING_END_OF_LIFE" | "LOW_CELLULAR_COVERAGE" | "LOW_DEVICE_BATTERY" | "LOW_DEVICE_INPUT_VOLTAGE" | "LOW_GPS_COVERAGE" | "NO_CAN_DATA_CONFIGURATION" | "OPERATING_HOURS_FROM_CAN_MODIFIED" | "OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY" | "OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY" | "UNUSUAL_OPERATING_HOURS")[] | undefined;
|
|
487
492
|
deviceTypes?: string[] | undefined;
|
|
488
493
|
firmwareVersion?: string[] | undefined;
|
|
489
|
-
fleetHealthCategories?: ("COVERAGE" | "DEVICE_BATTERY" | "INSTALL_AND_CONFIGURATION" | "NON_REPORTING_DEVICE")[] | undefined;
|
|
490
|
-
fleetHealthDeviceStatuses?: ("CRITICAL" | "LOW")[] | undefined;
|
|
491
|
-
fleetHealthTypes?: ("DATA_NOT_RECEIVED" | "DEVICE_BATTERY_APPROACHING_END_OF_LIFE" | "LOW_CELLULAR_COVERAGE" | "LOW_DEVICE_BATTERY" | "LOW_DEVICE_INPUT_VOLTAGE" | "LOW_GPS_COVERAGE" | "NO_CAN_DATA_CONFIGURATION" | "OPERATING_HOURS_FROM_CAN_MODIFIED" | "OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY" | "OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY" | "UNUSUAL_OPERATING_HOURS")[] | undefined;
|
|
492
494
|
geometry?: {
|
|
493
495
|
type: "Polygon";
|
|
494
496
|
coordinates: ([number, number] | [number, number, number])[][];
|
|
@@ -556,7 +558,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
556
558
|
rentalContractOrderNumbers?: string[] | undefined;
|
|
557
559
|
rentalContractReferenceCodeDescriptionQuery?: string | undefined;
|
|
558
560
|
rentalContractReferenceCodes?: string[] | undefined;
|
|
559
|
-
rentalStatuses?: ("OTHER" | "AVAILABLE" | "IN_REPAIR" | "NOT_ON_CONTRACT" | "OFF_RENT" | "ON_RENT" | "PICK_UP_READY" | "RESERVED" | "RETURNED" | "TRANSFER")[] | undefined;
|
|
561
|
+
rentalStatuses?: ("UNDEFINED" | "OTHER" | "AVAILABLE" | "IN_REPAIR" | "NOT_ON_CONTRACT" | "OFF_RENT" | "ON_RENT" | "PICK_UP_READY" | "RESERVED" | "RETURNED" | "TRANSFER")[] | undefined;
|
|
560
562
|
searchQuery?: string | undefined;
|
|
561
563
|
serviceBooked?: boolean[] | undefined;
|
|
562
564
|
servicePlanAssignments?: ("UNKNOWN" | "COMPLETE" | "DRAFT" | "FULLY_CONFIGURED" | "HAS_PLAN" | "HAS_SERVICE_PROVIDER" | "MISSING_PLAN" | "MISSING_PROVIDER" | "OVERDUE" | "PLANNED" | "UPCOMING")[] | undefined;
|
|
@@ -571,7 +573,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
571
573
|
}, {
|
|
572
574
|
accessManagementDesiredModes?: ("LOCKED_FOR_ALL" | "UNKNOWN" | "UNLOCKED_FOR_ALL" | "UNLOCKED_FOR_KEY" | "UNSUPPORTED")[] | undefined;
|
|
573
575
|
activeFilter?: boolean | undefined;
|
|
574
|
-
activities?: ("UNKNOWN" | "IDLING" | "STOPPED" | "WORKING")[] | undefined;
|
|
576
|
+
activities?: ("UNKNOWN" | "IDLING" | "STOPPED" | "UNDEFINED" | "WORKING")[] | undefined;
|
|
575
577
|
area?: {
|
|
576
578
|
type: "Polygon";
|
|
577
579
|
coordinates: ([number, number] | [number, number, number])[][];
|
|
@@ -603,11 +605,11 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
603
605
|
stringWildcardValue?: string | undefined;
|
|
604
606
|
}[] | undefined;
|
|
605
607
|
customerIds?: string[] | undefined;
|
|
608
|
+
deviceHealthCategories?: ("COVERAGE" | "DEVICE_BATTERY" | "INSTALL_AND_CONFIGURATION" | "NON_REPORTING_DEVICE")[] | undefined;
|
|
609
|
+
deviceHealthDeviceStatuses?: ("CRITICAL" | "LOW")[] | undefined;
|
|
610
|
+
deviceHealthTypes?: ("DATA_NOT_RECEIVED" | "DEVICE_BATTERY_APPROACHING_END_OF_LIFE" | "LOW_CELLULAR_COVERAGE" | "LOW_DEVICE_BATTERY" | "LOW_DEVICE_INPUT_VOLTAGE" | "LOW_GPS_COVERAGE" | "NO_CAN_DATA_CONFIGURATION" | "OPERATING_HOURS_FROM_CAN_MODIFIED" | "OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY" | "OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY" | "UNUSUAL_OPERATING_HOURS")[] | undefined;
|
|
606
611
|
deviceTypes?: string[] | undefined;
|
|
607
612
|
firmwareVersion?: string[] | undefined;
|
|
608
|
-
fleetHealthCategories?: ("COVERAGE" | "DEVICE_BATTERY" | "INSTALL_AND_CONFIGURATION" | "NON_REPORTING_DEVICE")[] | undefined;
|
|
609
|
-
fleetHealthDeviceStatuses?: ("CRITICAL" | "LOW")[] | undefined;
|
|
610
|
-
fleetHealthTypes?: ("DATA_NOT_RECEIVED" | "DEVICE_BATTERY_APPROACHING_END_OF_LIFE" | "LOW_CELLULAR_COVERAGE" | "LOW_DEVICE_BATTERY" | "LOW_DEVICE_INPUT_VOLTAGE" | "LOW_GPS_COVERAGE" | "NO_CAN_DATA_CONFIGURATION" | "OPERATING_HOURS_FROM_CAN_MODIFIED" | "OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY" | "OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY" | "UNUSUAL_OPERATING_HOURS")[] | undefined;
|
|
611
613
|
geometry?: {
|
|
612
614
|
type: "Polygon";
|
|
613
615
|
coordinates: ([number, number] | [number, number, number])[][];
|
|
@@ -675,7 +677,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
675
677
|
rentalContractOrderNumbers?: string[] | undefined;
|
|
676
678
|
rentalContractReferenceCodeDescriptionQuery?: string | undefined;
|
|
677
679
|
rentalContractReferenceCodes?: string[] | undefined;
|
|
678
|
-
rentalStatuses?: ("OTHER" | "AVAILABLE" | "IN_REPAIR" | "NOT_ON_CONTRACT" | "OFF_RENT" | "ON_RENT" | "PICK_UP_READY" | "RESERVED" | "RETURNED" | "TRANSFER")[] | undefined;
|
|
680
|
+
rentalStatuses?: ("UNDEFINED" | "OTHER" | "AVAILABLE" | "IN_REPAIR" | "NOT_ON_CONTRACT" | "OFF_RENT" | "ON_RENT" | "PICK_UP_READY" | "RESERVED" | "RETURNED" | "TRANSFER")[] | undefined;
|
|
679
681
|
searchQuery?: string | undefined;
|
|
680
682
|
serviceBooked?: boolean[] | undefined;
|
|
681
683
|
servicePlanAssignments?: ("UNKNOWN" | "COMPLETE" | "DRAFT" | "FULLY_CONFIGURED" | "HAS_PLAN" | "HAS_SERVICE_PROVIDER" | "MISSING_PLAN" | "MISSING_PROVIDER" | "OVERDUE" | "PLANNED" | "UPCOMING")[] | undefined;
|