@trackunit/filters-graphql-hook 0.0.15 → 0.0.17
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 +30 -18
- package/index.esm.js +30 -18
- package/package.json +1 -1
- package/src/generated/graphql-api/graphql.d.ts +137 -120
package/index.cjs.js
CHANGED
|
@@ -187,6 +187,10 @@ const assetType = {
|
|
|
187
187
|
Other: "OTHER",
|
|
188
188
|
Tool: "TOOL",
|
|
189
189
|
};
|
|
190
|
+
const metadataCompleteness = {
|
|
191
|
+
Complete: "COMPLETE",
|
|
192
|
+
Partial: "PARTIAL",
|
|
193
|
+
};
|
|
190
194
|
const rentalStatus = {
|
|
191
195
|
Available: "Available",
|
|
192
196
|
InRepair: "InRepair",
|
|
@@ -287,16 +291,16 @@ const useActiveAssetFilters = (filters) => {
|
|
|
287
291
|
const customFields = useCustomFieldFilters({ filters });
|
|
288
292
|
// TODO make typesafe checks for all filters
|
|
289
293
|
const filter = react.useMemo(() => {
|
|
290
|
-
var _a, _b;
|
|
294
|
+
var _a, _b, _c, _d;
|
|
291
295
|
if (!filters) {
|
|
292
296
|
return {};
|
|
293
297
|
}
|
|
294
298
|
const followExist = filters.followed === "ALL" ? undefined : true;
|
|
295
299
|
return {
|
|
296
300
|
assetIds: stringArrayOrUndefined(filters.assetIds),
|
|
297
|
-
searchQuery: filters.search === ""
|
|
301
|
+
searchQuery: typeof filters.search === "string" && filters.search !== "" ? filters.search : undefined,
|
|
298
302
|
activities: fixTypes(filters.activity, assetActivityState),
|
|
299
|
-
boundingBox: filters.boundingBox ? filters.boundingBox : undefined,
|
|
303
|
+
boundingBox: isBoundingBox(filters.boundingBox) ? filters.boundingBox : undefined,
|
|
300
304
|
brands: stringArrayOrUndefined(filters.brands),
|
|
301
305
|
types: stringArrayOrUndefined(filters.types),
|
|
302
306
|
criticalities: fixTypes(filters.criticality, assetCriticalityState),
|
|
@@ -306,12 +310,15 @@ const useActiveAssetFilters = (filters) => {
|
|
|
306
310
|
models: stringArrayOrUndefined(filters.models),
|
|
307
311
|
ownerAccountIds: valueNameArrayOrUndefined(filters.ownerAccountIds),
|
|
308
312
|
assetTypes: fixTypes(filters.assetType, assetType),
|
|
313
|
+
metadataCompleteness: ((_b = valueNameArrayOrUndefined(filters.metadataCompleteness)) === null || _b === void 0 ? void 0 : _b[0]) === "ALL"
|
|
314
|
+
? undefined
|
|
315
|
+
: (_c = fixTypes(valueNameArrayOrUndefined(filters.metadataCompleteness), metadataCompleteness)) === null || _c === void 0 ? void 0 : _c[0],
|
|
309
316
|
servicePlanStatuses: fixTypes(filters.serviceStatus, servicePlanStatus),
|
|
310
317
|
servicePlanAssignments: fixTypes(filters.servicePlanStatus, servicePlanStatus),
|
|
311
318
|
servicePlanIds: valueNameArrayOrUndefined(filters.servicePlan),
|
|
312
319
|
serviceProviderIds: valueNameArrayOrUndefined(filters.serviceProvider),
|
|
313
320
|
//currently we support only 1 filter value to be set so there won't be a second value, soon the partnerId will be transformed to a normal filter and will support an array of strings
|
|
314
|
-
partnerId: (
|
|
321
|
+
partnerId: (_d = valueNameArrayOrUndefined(filters.partner)) === null || _d === void 0 ? void 0 : _d[0],
|
|
315
322
|
groups: valueNameArrayOrUndefined(filters.groups),
|
|
316
323
|
siteIds: valueNameArrayOrUndefined(filters.siteIds),
|
|
317
324
|
siteTypes: fixTypes(filters.siteType, siteTypeSfs),
|
|
@@ -319,10 +326,16 @@ const useActiveAssetFilters = (filters) => {
|
|
|
319
326
|
rentalStatus: fixTypes(filters.rentalStatus, rentalStatus),
|
|
320
327
|
customFields: valuesIfNotEmpty(customFields),
|
|
321
328
|
systemOfMeasurement: systemOfMeasurement,
|
|
329
|
+
customerIds: valueNameArrayOrUndefined(filters.customerIds),
|
|
322
330
|
};
|
|
323
331
|
}, [filters, customFields, systemOfMeasurement]);
|
|
324
332
|
return filter;
|
|
325
333
|
};
|
|
334
|
+
const isBoundingBox = (value) => {
|
|
335
|
+
return value
|
|
336
|
+
? typeof value === "object" && Object.keys(value).includes("nw") && Object.keys(value).includes("se")
|
|
337
|
+
: false;
|
|
338
|
+
};
|
|
326
339
|
|
|
327
340
|
/**
|
|
328
341
|
* This hook is used to convert the sorting state from the AssetSortingContext to the AssetSortInput used by the GraphQL API
|
|
@@ -359,21 +372,20 @@ const useAssetQueryFilters = (props) => {
|
|
|
359
372
|
const filters = useActiveAssetFilters(props.filters);
|
|
360
373
|
const sort = useAssetSortInput();
|
|
361
374
|
const { systemOfMeasurement } = reactCoreHooks.useCurrentUserSystemOfMeasurement();
|
|
362
|
-
const assetQueryVariables = react.useMemo(() => ({
|
|
363
|
-
filters,
|
|
364
|
-
sort,
|
|
365
|
-
first: props.first || 50,
|
|
366
|
-
systemOfMeasurement: systemOfMeasurement,
|
|
367
|
-
// TODO only load custom fields active filters and visible custom field columns in table
|
|
368
|
-
// definitionIds:
|
|
369
|
-
// filters.customFields && filters.customFields.length > 0
|
|
370
|
-
// ? filters.customFields.map(customField => customField.definitionId!)
|
|
371
|
-
// : undefined,
|
|
372
|
-
definitionIds: undefined,
|
|
373
|
-
}), [filters, props.first, sort, systemOfMeasurement]);
|
|
374
375
|
return react.useMemo(() => ({
|
|
375
|
-
assetQueryVariables:
|
|
376
|
-
|
|
376
|
+
assetQueryVariables: {
|
|
377
|
+
filters,
|
|
378
|
+
sort,
|
|
379
|
+
first: props.first || 50,
|
|
380
|
+
systemOfMeasurement: systemOfMeasurement !== null && systemOfMeasurement !== void 0 ? systemOfMeasurement : "SI",
|
|
381
|
+
// TODO only load custom fields active filters and visible custom field columns in table
|
|
382
|
+
// definitionIds:
|
|
383
|
+
// filters.customFields && filters.customFields.length > 0
|
|
384
|
+
// ? filters.customFields.map(customField => customField.definitionId!)
|
|
385
|
+
// : undefined,
|
|
386
|
+
definitionIds: undefined,
|
|
387
|
+
},
|
|
388
|
+
}), [filters, props.first, sort, systemOfMeasurement]);
|
|
377
389
|
};
|
|
378
390
|
|
|
379
391
|
/*
|
package/index.esm.js
CHANGED
|
@@ -183,6 +183,10 @@ const assetType = {
|
|
|
183
183
|
Other: "OTHER",
|
|
184
184
|
Tool: "TOOL",
|
|
185
185
|
};
|
|
186
|
+
const metadataCompleteness = {
|
|
187
|
+
Complete: "COMPLETE",
|
|
188
|
+
Partial: "PARTIAL",
|
|
189
|
+
};
|
|
186
190
|
const rentalStatus = {
|
|
187
191
|
Available: "Available",
|
|
188
192
|
InRepair: "InRepair",
|
|
@@ -283,16 +287,16 @@ const useActiveAssetFilters = (filters) => {
|
|
|
283
287
|
const customFields = useCustomFieldFilters({ filters });
|
|
284
288
|
// TODO make typesafe checks for all filters
|
|
285
289
|
const filter = useMemo(() => {
|
|
286
|
-
var _a, _b;
|
|
290
|
+
var _a, _b, _c, _d;
|
|
287
291
|
if (!filters) {
|
|
288
292
|
return {};
|
|
289
293
|
}
|
|
290
294
|
const followExist = filters.followed === "ALL" ? undefined : true;
|
|
291
295
|
return {
|
|
292
296
|
assetIds: stringArrayOrUndefined(filters.assetIds),
|
|
293
|
-
searchQuery: filters.search === ""
|
|
297
|
+
searchQuery: typeof filters.search === "string" && filters.search !== "" ? filters.search : undefined,
|
|
294
298
|
activities: fixTypes(filters.activity, assetActivityState),
|
|
295
|
-
boundingBox: filters.boundingBox ? filters.boundingBox : undefined,
|
|
299
|
+
boundingBox: isBoundingBox(filters.boundingBox) ? filters.boundingBox : undefined,
|
|
296
300
|
brands: stringArrayOrUndefined(filters.brands),
|
|
297
301
|
types: stringArrayOrUndefined(filters.types),
|
|
298
302
|
criticalities: fixTypes(filters.criticality, assetCriticalityState),
|
|
@@ -302,12 +306,15 @@ const useActiveAssetFilters = (filters) => {
|
|
|
302
306
|
models: stringArrayOrUndefined(filters.models),
|
|
303
307
|
ownerAccountIds: valueNameArrayOrUndefined(filters.ownerAccountIds),
|
|
304
308
|
assetTypes: fixTypes(filters.assetType, assetType),
|
|
309
|
+
metadataCompleteness: ((_b = valueNameArrayOrUndefined(filters.metadataCompleteness)) === null || _b === void 0 ? void 0 : _b[0]) === "ALL"
|
|
310
|
+
? undefined
|
|
311
|
+
: (_c = fixTypes(valueNameArrayOrUndefined(filters.metadataCompleteness), metadataCompleteness)) === null || _c === void 0 ? void 0 : _c[0],
|
|
305
312
|
servicePlanStatuses: fixTypes(filters.serviceStatus, servicePlanStatus),
|
|
306
313
|
servicePlanAssignments: fixTypes(filters.servicePlanStatus, servicePlanStatus),
|
|
307
314
|
servicePlanIds: valueNameArrayOrUndefined(filters.servicePlan),
|
|
308
315
|
serviceProviderIds: valueNameArrayOrUndefined(filters.serviceProvider),
|
|
309
316
|
//currently we support only 1 filter value to be set so there won't be a second value, soon the partnerId will be transformed to a normal filter and will support an array of strings
|
|
310
|
-
partnerId: (
|
|
317
|
+
partnerId: (_d = valueNameArrayOrUndefined(filters.partner)) === null || _d === void 0 ? void 0 : _d[0],
|
|
311
318
|
groups: valueNameArrayOrUndefined(filters.groups),
|
|
312
319
|
siteIds: valueNameArrayOrUndefined(filters.siteIds),
|
|
313
320
|
siteTypes: fixTypes(filters.siteType, siteTypeSfs),
|
|
@@ -315,10 +322,16 @@ const useActiveAssetFilters = (filters) => {
|
|
|
315
322
|
rentalStatus: fixTypes(filters.rentalStatus, rentalStatus),
|
|
316
323
|
customFields: valuesIfNotEmpty(customFields),
|
|
317
324
|
systemOfMeasurement: systemOfMeasurement,
|
|
325
|
+
customerIds: valueNameArrayOrUndefined(filters.customerIds),
|
|
318
326
|
};
|
|
319
327
|
}, [filters, customFields, systemOfMeasurement]);
|
|
320
328
|
return filter;
|
|
321
329
|
};
|
|
330
|
+
const isBoundingBox = (value) => {
|
|
331
|
+
return value
|
|
332
|
+
? typeof value === "object" && Object.keys(value).includes("nw") && Object.keys(value).includes("se")
|
|
333
|
+
: false;
|
|
334
|
+
};
|
|
322
335
|
|
|
323
336
|
/**
|
|
324
337
|
* This hook is used to convert the sorting state from the AssetSortingContext to the AssetSortInput used by the GraphQL API
|
|
@@ -355,21 +368,20 @@ const useAssetQueryFilters = (props) => {
|
|
|
355
368
|
const filters = useActiveAssetFilters(props.filters);
|
|
356
369
|
const sort = useAssetSortInput();
|
|
357
370
|
const { systemOfMeasurement } = useCurrentUserSystemOfMeasurement();
|
|
358
|
-
const assetQueryVariables = useMemo(() => ({
|
|
359
|
-
filters,
|
|
360
|
-
sort,
|
|
361
|
-
first: props.first || 50,
|
|
362
|
-
systemOfMeasurement: systemOfMeasurement,
|
|
363
|
-
// TODO only load custom fields active filters and visible custom field columns in table
|
|
364
|
-
// definitionIds:
|
|
365
|
-
// filters.customFields && filters.customFields.length > 0
|
|
366
|
-
// ? filters.customFields.map(customField => customField.definitionId!)
|
|
367
|
-
// : undefined,
|
|
368
|
-
definitionIds: undefined,
|
|
369
|
-
}), [filters, props.first, sort, systemOfMeasurement]);
|
|
370
371
|
return useMemo(() => ({
|
|
371
|
-
assetQueryVariables:
|
|
372
|
-
|
|
372
|
+
assetQueryVariables: {
|
|
373
|
+
filters,
|
|
374
|
+
sort,
|
|
375
|
+
first: props.first || 50,
|
|
376
|
+
systemOfMeasurement: systemOfMeasurement !== null && systemOfMeasurement !== void 0 ? systemOfMeasurement : "SI",
|
|
377
|
+
// TODO only load custom fields active filters and visible custom field columns in table
|
|
378
|
+
// definitionIds:
|
|
379
|
+
// filters.customFields && filters.customFields.length > 0
|
|
380
|
+
// ? filters.customFields.map(customField => customField.definitionId!)
|
|
381
|
+
// : undefined,
|
|
382
|
+
definitionIds: undefined,
|
|
383
|
+
},
|
|
384
|
+
}), [filters, props.first, sort, systemOfMeasurement]);
|
|
373
385
|
};
|
|
374
386
|
|
|
375
387
|
/*
|
package/package.json
CHANGED
|
@@ -7,6 +7,17 @@ export type Exact<T extends {
|
|
|
7
7
|
}> = {
|
|
8
8
|
[K in keyof T]: T[K];
|
|
9
9
|
};
|
|
10
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
11
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
12
|
+
};
|
|
13
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
14
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
15
|
+
};
|
|
16
|
+
export type MakeEmpty<T extends {
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}, K extends keyof T> = {
|
|
19
|
+
[_ in K]?: never;
|
|
20
|
+
};
|
|
10
21
|
export type Incremental<T> = T | {
|
|
11
22
|
[P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never;
|
|
12
23
|
};
|
|
@@ -87,7 +98,127 @@ export declare const assetCriticalityState: {
|
|
|
87
98
|
readonly None: "NONE";
|
|
88
99
|
};
|
|
89
100
|
export type AssetCriticalityState = (typeof assetCriticalityState)[keyof typeof assetCriticalityState];
|
|
90
|
-
|
|
101
|
+
export declare const assetLastSeen: {
|
|
102
|
+
readonly Last_7Days: "LAST_7_DAYS";
|
|
103
|
+
readonly Last_24Hours: "LAST_24_HOURS";
|
|
104
|
+
readonly Last_30Days: "LAST_30_DAYS";
|
|
105
|
+
readonly LastHour: "LAST_HOUR";
|
|
106
|
+
readonly OlderThan_30Days: "OLDER_THAN_30_DAYS";
|
|
107
|
+
};
|
|
108
|
+
export type AssetLastSeen = (typeof assetLastSeen)[keyof typeof assetLastSeen];
|
|
109
|
+
export declare const assetSortByProperty: {
|
|
110
|
+
readonly AccessManagement: "ACCESS_MANAGEMENT";
|
|
111
|
+
readonly Activity: "ACTIVITY";
|
|
112
|
+
readonly Brand: "BRAND";
|
|
113
|
+
readonly Category: "CATEGORY";
|
|
114
|
+
readonly Criticality: "CRITICALITY";
|
|
115
|
+
readonly CustomField: "CUSTOM_FIELD";
|
|
116
|
+
readonly ExternalReference: "EXTERNAL_REFERENCE";
|
|
117
|
+
readonly Location: "LOCATION";
|
|
118
|
+
readonly LocationUpdatedAt: "LOCATION_UPDATED_AT";
|
|
119
|
+
readonly Model: "MODEL";
|
|
120
|
+
readonly Name: "NAME";
|
|
121
|
+
readonly OwnerAccountName: "OWNER_ACCOUNT_NAME";
|
|
122
|
+
readonly ProductionYear: "PRODUCTION_YEAR";
|
|
123
|
+
readonly SerialNumber: "SERIAL_NUMBER";
|
|
124
|
+
readonly ServicePlanAssignmentStatus: "SERVICE_PLAN_ASSIGNMENT_STATUS";
|
|
125
|
+
readonly ServicePlanOverdueness: "SERVICE_PLAN_OVERDUENESS";
|
|
126
|
+
readonly ServicePlanStatus: "SERVICE_PLAN_STATUS";
|
|
127
|
+
readonly TelematicsDeviceSerialNumber: "TELEMATICS_DEVICE_SERIAL_NUMBER";
|
|
128
|
+
readonly Type: "TYPE";
|
|
129
|
+
};
|
|
130
|
+
export type AssetSortByProperty = (typeof assetSortByProperty)[keyof typeof assetSortByProperty];
|
|
131
|
+
export declare const assetType: {
|
|
132
|
+
readonly Attachment: "ATTACHMENT";
|
|
133
|
+
readonly Equipment: "EQUIPMENT";
|
|
134
|
+
readonly Gateway: "GATEWAY";
|
|
135
|
+
readonly Machine: "MACHINE";
|
|
136
|
+
readonly Other: "OTHER";
|
|
137
|
+
readonly Tool: "TOOL";
|
|
138
|
+
};
|
|
139
|
+
export type AssetType = (typeof assetType)[keyof typeof assetType];
|
|
140
|
+
export declare const customFieldOwnerType: {
|
|
141
|
+
readonly Account: "ACCOUNT";
|
|
142
|
+
readonly IrisApp: "IRIS_APP";
|
|
143
|
+
readonly Trackunit: "TRACKUNIT";
|
|
144
|
+
};
|
|
145
|
+
export type CustomFieldOwnerType = (typeof customFieldOwnerType)[keyof typeof customFieldOwnerType];
|
|
146
|
+
export declare const customerTypeSfs: {
|
|
147
|
+
readonly Contractor: "CONTRACTOR";
|
|
148
|
+
readonly Dealer: "DEALER";
|
|
149
|
+
readonly Distributor: "DISTRIBUTOR";
|
|
150
|
+
readonly NotOnCustomer: "NOT_ON_CUSTOMER";
|
|
151
|
+
readonly Oem: "OEM";
|
|
152
|
+
readonly Other: "OTHER";
|
|
153
|
+
readonly Rental: "RENTAL";
|
|
154
|
+
readonly Service: "SERVICE";
|
|
155
|
+
};
|
|
156
|
+
export type CustomerTypeSfs = (typeof customerTypeSfs)[keyof typeof customerTypeSfs];
|
|
157
|
+
export declare const digitalKeyMode: {
|
|
158
|
+
readonly Disabled: "DISABLED";
|
|
159
|
+
readonly LockedForAll: "LOCKED_FOR_ALL";
|
|
160
|
+
readonly NeverInitialized: "NEVER_INITIALIZED";
|
|
161
|
+
readonly Unknown: "UNKNOWN";
|
|
162
|
+
readonly UnlockedForAll: "UNLOCKED_FOR_ALL";
|
|
163
|
+
readonly UnlockedForAllFixed: "UNLOCKED_FOR_ALL_FIXED";
|
|
164
|
+
readonly UnlockedForKey: "UNLOCKED_FOR_KEY";
|
|
165
|
+
readonly UnlockedForKeyAndPin: "UNLOCKED_FOR_KEY_AND_PIN";
|
|
166
|
+
readonly UnlockedForPin: "UNLOCKED_FOR_PIN";
|
|
167
|
+
readonly Unsupported: "UNSUPPORTED";
|
|
168
|
+
};
|
|
169
|
+
export type DigitalKeyMode = (typeof digitalKeyMode)[keyof typeof digitalKeyMode];
|
|
170
|
+
export declare const metadataCompleteness: {
|
|
171
|
+
readonly Complete: "COMPLETE";
|
|
172
|
+
readonly Partial: "PARTIAL";
|
|
173
|
+
};
|
|
174
|
+
export type MetadataCompleteness = (typeof metadataCompleteness)[keyof typeof metadataCompleteness];
|
|
175
|
+
export declare const rentalStatus: {
|
|
176
|
+
readonly Available: "Available";
|
|
177
|
+
readonly InRepair: "InRepair";
|
|
178
|
+
readonly NotOnContract: "NotOnContract";
|
|
179
|
+
readonly OffRent: "OffRent";
|
|
180
|
+
readonly OnRent: "OnRent";
|
|
181
|
+
readonly Other: "Other";
|
|
182
|
+
readonly PickupReady: "PickupReady";
|
|
183
|
+
readonly Reserved: "Reserved";
|
|
184
|
+
readonly Returned: "Returned";
|
|
185
|
+
readonly Transfer: "Transfer";
|
|
186
|
+
};
|
|
187
|
+
export type RentalStatus = (typeof rentalStatus)[keyof typeof rentalStatus];
|
|
188
|
+
export declare const servicePlanStatus: {
|
|
189
|
+
readonly Complete: "COMPLETE";
|
|
190
|
+
readonly Draft: "DRAFT";
|
|
191
|
+
readonly FullyConfigured: "FULLY_CONFIGURED";
|
|
192
|
+
readonly HasPlan: "HAS_PLAN";
|
|
193
|
+
readonly HasServiceProvider: "HAS_SERVICE_PROVIDER";
|
|
194
|
+
readonly MissingPlan: "MISSING_PLAN";
|
|
195
|
+
readonly MissingProvider: "MISSING_PROVIDER";
|
|
196
|
+
readonly Overdue: "OVERDUE";
|
|
197
|
+
readonly Planned: "PLANNED";
|
|
198
|
+
readonly Unknown: "UNKNOWN";
|
|
199
|
+
readonly Upcoming: "UPCOMING";
|
|
200
|
+
};
|
|
201
|
+
export type ServicePlanStatus = (typeof servicePlanStatus)[keyof typeof servicePlanStatus];
|
|
202
|
+
export declare const siteTypeSfs: {
|
|
203
|
+
readonly Area: "AREA";
|
|
204
|
+
readonly ClassicPoi: "CLASSIC_POI";
|
|
205
|
+
readonly ClassicZone: "CLASSIC_ZONE";
|
|
206
|
+
readonly ConstructionSite: "CONSTRUCTION_SITE";
|
|
207
|
+
readonly Depot: "DEPOT";
|
|
208
|
+
readonly NotOnSite: "NOT_ON_SITE";
|
|
209
|
+
readonly WorkPlace: "WORK_PLACE";
|
|
210
|
+
};
|
|
211
|
+
export type SiteTypeSfs = (typeof siteTypeSfs)[keyof typeof siteTypeSfs];
|
|
212
|
+
export declare const sortOrder: {
|
|
213
|
+
readonly Asc: "ASC";
|
|
214
|
+
readonly Desc: "DESC";
|
|
215
|
+
};
|
|
216
|
+
export type SortOrder = (typeof sortOrder)[keyof typeof sortOrder];
|
|
217
|
+
export declare const systemOfMeasurement: {
|
|
218
|
+
readonly Si: "SI";
|
|
219
|
+
readonly UsCustomary: "US_CUSTOMARY";
|
|
220
|
+
};
|
|
221
|
+
export type SystemOfMeasurement = (typeof systemOfMeasurement)[keyof typeof systemOfMeasurement];
|
|
91
222
|
export type AssetFiltersInput = {
|
|
92
223
|
/** List of activities */
|
|
93
224
|
activities?: InputMaybe<Array<AssetActivityState>>;
|
|
@@ -105,6 +236,10 @@ export type AssetFiltersInput = {
|
|
|
105
236
|
criticalities?: InputMaybe<Array<AssetCriticalityState>>;
|
|
106
237
|
/** List of custom fields to filter by */
|
|
107
238
|
customFields?: InputMaybe<Array<CustomFieldFilter>>;
|
|
239
|
+
/** List of customerIds */
|
|
240
|
+
customerIds?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
241
|
+
/** List of customer types */
|
|
242
|
+
customerTypes?: InputMaybe<Array<CustomerTypeSfs>>;
|
|
108
243
|
/** Digital key mode of the asset */
|
|
109
244
|
digitalKeyModes?: InputMaybe<Array<DigitalKeyMode>>;
|
|
110
245
|
/** List of external references */
|
|
@@ -117,7 +252,7 @@ export type AssetFiltersInput = {
|
|
|
117
252
|
groups?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
118
253
|
/** Filter by when was the asset last seen */
|
|
119
254
|
lastSeen?: InputMaybe<AssetLastSeen>;
|
|
120
|
-
/** Filter by
|
|
255
|
+
/** Filter by PARTIAL or COMPLETE asset metadata information */
|
|
121
256
|
metadataCompleteness?: InputMaybe<MetadataCompleteness>;
|
|
122
257
|
/** List of models */
|
|
123
258
|
models?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
@@ -156,37 +291,6 @@ export type AssetFiltersInput = {
|
|
|
156
291
|
/** List of types (also known as subtypes) */
|
|
157
292
|
types?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
158
293
|
};
|
|
159
|
-
export declare const assetLastSeen: {
|
|
160
|
-
readonly Last_7Days: "LAST_7_DAYS";
|
|
161
|
-
readonly Last_24Hours: "LAST_24_HOURS";
|
|
162
|
-
readonly Last_30Days: "LAST_30_DAYS";
|
|
163
|
-
readonly LastHour: "LAST_HOUR";
|
|
164
|
-
readonly OlderThan_30Days: "OLDER_THAN_30_DAYS";
|
|
165
|
-
};
|
|
166
|
-
export type AssetLastSeen = (typeof assetLastSeen)[keyof typeof assetLastSeen];
|
|
167
|
-
export declare const assetSortByProperty: {
|
|
168
|
-
readonly AccessManagement: "ACCESS_MANAGEMENT";
|
|
169
|
-
readonly Activity: "ACTIVITY";
|
|
170
|
-
readonly Brand: "BRAND";
|
|
171
|
-
readonly Category: "CATEGORY";
|
|
172
|
-
readonly Criticality: "CRITICALITY";
|
|
173
|
-
readonly CustomField: "CUSTOM_FIELD";
|
|
174
|
-
readonly ExternalReference: "EXTERNAL_REFERENCE";
|
|
175
|
-
readonly Location: "LOCATION";
|
|
176
|
-
readonly LocationUpdatedAt: "LOCATION_UPDATED_AT";
|
|
177
|
-
readonly Model: "MODEL";
|
|
178
|
-
readonly Name: "NAME";
|
|
179
|
-
readonly OwnerAccountName: "OWNER_ACCOUNT_NAME";
|
|
180
|
-
readonly ProductionYear: "PRODUCTION_YEAR";
|
|
181
|
-
readonly SerialNumber: "SERIAL_NUMBER";
|
|
182
|
-
readonly ServicePlanAssignmentStatus: "SERVICE_PLAN_ASSIGNMENT_STATUS";
|
|
183
|
-
readonly ServicePlanOverdueness: "SERVICE_PLAN_OVERDUENESS";
|
|
184
|
-
readonly ServicePlanStatus: "SERVICE_PLAN_STATUS";
|
|
185
|
-
readonly TelematicsDeviceSerialNumber: "TELEMATICS_DEVICE_SERIAL_NUMBER";
|
|
186
|
-
readonly Type: "TYPE";
|
|
187
|
-
};
|
|
188
|
-
export type AssetSortByProperty = (typeof assetSortByProperty)[keyof typeof assetSortByProperty];
|
|
189
|
-
/** Asset sort input. */
|
|
190
294
|
export type AssetSortInput = {
|
|
191
295
|
/** When sorting by Custom Field specify the custom field definition to sort by. */
|
|
192
296
|
customFieldDefinitionId?: InputMaybe<Scalars["ID"]["input"]>;
|
|
@@ -197,16 +301,6 @@ export type AssetSortInput = {
|
|
|
197
301
|
/** When sorting by location, sorting will be relative to this location */
|
|
198
302
|
relativeToLocation?: InputMaybe<CoordinatesInput>;
|
|
199
303
|
};
|
|
200
|
-
export declare const assetType: {
|
|
201
|
-
readonly Attachment: "ATTACHMENT";
|
|
202
|
-
readonly Equipment: "EQUIPMENT";
|
|
203
|
-
readonly Gateway: "GATEWAY";
|
|
204
|
-
readonly Machine: "MACHINE";
|
|
205
|
-
readonly Other: "OTHER";
|
|
206
|
-
readonly Tool: "TOOL";
|
|
207
|
-
};
|
|
208
|
-
export type AssetType = (typeof assetType)[keyof typeof assetType];
|
|
209
|
-
/** Bounding box input. */
|
|
210
304
|
export type BoundingBoxInput = {
|
|
211
305
|
/** The coordinates for the North/West values of the bounding box. */
|
|
212
306
|
nw: CoordinatesInput;
|
|
@@ -215,26 +309,22 @@ export type BoundingBoxInput = {
|
|
|
215
309
|
/** The zoom level from which the bound box spans. */
|
|
216
310
|
zoom?: InputMaybe<Scalars["Float"]["input"]>;
|
|
217
311
|
};
|
|
218
|
-
/** Bounding shape input. */
|
|
219
312
|
export type BoundingShapeInput = {
|
|
220
313
|
/** Points of coordinates for the bounding shape. */
|
|
221
314
|
points: Array<CoordinatesInput>;
|
|
222
315
|
};
|
|
223
|
-
/** Coordinates input */
|
|
224
316
|
export type CoordinatesInput = {
|
|
225
317
|
/** The latitude of the coordinate. */
|
|
226
318
|
latitude: Scalars["Float"]["input"];
|
|
227
319
|
/** The longitude of the coordinate. */
|
|
228
320
|
longitude: Scalars["Float"]["input"];
|
|
229
321
|
};
|
|
230
|
-
/** Custom field date range */
|
|
231
322
|
export type CustomFieldDateRange = {
|
|
232
323
|
/** The first date to include. */
|
|
233
324
|
from?: InputMaybe<Scalars["String"]["input"]>;
|
|
234
325
|
/** The last date to include. */
|
|
235
326
|
to?: InputMaybe<Scalars["String"]["input"]>;
|
|
236
327
|
};
|
|
237
|
-
/** Filter by custom field value */
|
|
238
328
|
export type CustomFieldFilter = {
|
|
239
329
|
/** The boolean value of the custom field value input. */
|
|
240
330
|
booleanValue?: InputMaybe<Scalars["Boolean"]["input"]>;
|
|
@@ -253,14 +343,12 @@ export type CustomFieldFilter = {
|
|
|
253
343
|
/** The string value of the custom field value input. */
|
|
254
344
|
stringValue?: InputMaybe<Scalars["String"]["input"]>;
|
|
255
345
|
};
|
|
256
|
-
/** Custom field number range */
|
|
257
346
|
export type CustomFieldNumberRange = {
|
|
258
347
|
/** The smallest number to include. */
|
|
259
348
|
from?: InputMaybe<Scalars["Float"]["input"]>;
|
|
260
349
|
/** The lagest number to include. */
|
|
261
350
|
to?: InputMaybe<Scalars["Float"]["input"]>;
|
|
262
351
|
};
|
|
263
|
-
/** Custom field owner input. */
|
|
264
352
|
export type CustomFieldOwnerInput = {
|
|
265
353
|
/** The account ID of the custom field owner input. */
|
|
266
354
|
accountId?: InputMaybe<Scalars["ID"]["input"]>;
|
|
@@ -269,77 +357,6 @@ export type CustomFieldOwnerInput = {
|
|
|
269
357
|
/** The owner type of the custom field owner input. */
|
|
270
358
|
ownerType: CustomFieldOwnerType;
|
|
271
359
|
};
|
|
272
|
-
export declare const customFieldOwnerType: {
|
|
273
|
-
readonly Account: "ACCOUNT";
|
|
274
|
-
readonly IrisApp: "IRIS_APP";
|
|
275
|
-
readonly Trackunit: "TRACKUNIT";
|
|
276
|
-
};
|
|
277
|
-
export type CustomFieldOwnerType = (typeof customFieldOwnerType)[keyof typeof customFieldOwnerType];
|
|
278
|
-
export declare const digitalKeyMode: {
|
|
279
|
-
readonly Disabled: "DISABLED";
|
|
280
|
-
readonly LockedForAll: "LOCKED_FOR_ALL";
|
|
281
|
-
readonly NeverInitialized: "NEVER_INITIALIZED";
|
|
282
|
-
readonly Unknown: "UNKNOWN";
|
|
283
|
-
readonly UnlockedForAll: "UNLOCKED_FOR_ALL";
|
|
284
|
-
readonly UnlockedForAllFixed: "UNLOCKED_FOR_ALL_FIXED";
|
|
285
|
-
readonly UnlockedForKey: "UNLOCKED_FOR_KEY";
|
|
286
|
-
readonly UnlockedForKeyAndPin: "UNLOCKED_FOR_KEY_AND_PIN";
|
|
287
|
-
readonly UnlockedForPin: "UNLOCKED_FOR_PIN";
|
|
288
|
-
readonly Unsupported: "UNSUPPORTED";
|
|
289
|
-
};
|
|
290
|
-
export type DigitalKeyMode = (typeof digitalKeyMode)[keyof typeof digitalKeyMode];
|
|
291
|
-
export declare const metadataCompleteness: {
|
|
292
|
-
readonly Complete: "COMPLETE";
|
|
293
|
-
readonly Partial: "PARTIAL";
|
|
294
|
-
};
|
|
295
|
-
export type MetadataCompleteness = (typeof metadataCompleteness)[keyof typeof metadataCompleteness];
|
|
296
|
-
export declare const rentalStatus: {
|
|
297
|
-
readonly Available: "Available";
|
|
298
|
-
readonly InRepair: "InRepair";
|
|
299
|
-
readonly NotOnContract: "NotOnContract";
|
|
300
|
-
readonly OffRent: "OffRent";
|
|
301
|
-
readonly OnRent: "OnRent";
|
|
302
|
-
readonly Other: "Other";
|
|
303
|
-
readonly PickupReady: "PickupReady";
|
|
304
|
-
readonly Reserved: "Reserved";
|
|
305
|
-
readonly Returned: "Returned";
|
|
306
|
-
readonly Transfer: "Transfer";
|
|
307
|
-
};
|
|
308
|
-
export type RentalStatus = (typeof rentalStatus)[keyof typeof rentalStatus];
|
|
309
|
-
export declare const servicePlanStatus: {
|
|
310
|
-
readonly Complete: "COMPLETE";
|
|
311
|
-
readonly Draft: "DRAFT";
|
|
312
|
-
readonly FullyConfigured: "FULLY_CONFIGURED";
|
|
313
|
-
readonly HasPlan: "HAS_PLAN";
|
|
314
|
-
readonly HasServiceProvider: "HAS_SERVICE_PROVIDER";
|
|
315
|
-
readonly MissingPlan: "MISSING_PLAN";
|
|
316
|
-
readonly MissingProvider: "MISSING_PROVIDER";
|
|
317
|
-
readonly Overdue: "OVERDUE";
|
|
318
|
-
readonly Planned: "PLANNED";
|
|
319
|
-
readonly Unknown: "UNKNOWN";
|
|
320
|
-
readonly Upcoming: "UPCOMING";
|
|
321
|
-
};
|
|
322
|
-
export type ServicePlanStatus = (typeof servicePlanStatus)[keyof typeof servicePlanStatus];
|
|
323
|
-
export declare const siteTypeSfs: {
|
|
324
|
-
readonly Area: "AREA";
|
|
325
|
-
readonly ClassicPoi: "CLASSIC_POI";
|
|
326
|
-
readonly ClassicZone: "CLASSIC_ZONE";
|
|
327
|
-
readonly ConstructionSite: "CONSTRUCTION_SITE";
|
|
328
|
-
readonly Depot: "DEPOT";
|
|
329
|
-
readonly NotOnSite: "NOT_ON_SITE";
|
|
330
|
-
readonly WorkPlace: "WORK_PLACE";
|
|
331
|
-
};
|
|
332
|
-
export type SiteTypeSfs = (typeof siteTypeSfs)[keyof typeof siteTypeSfs];
|
|
333
|
-
export declare const sortOrder: {
|
|
334
|
-
readonly Asc: "ASC";
|
|
335
|
-
readonly Desc: "DESC";
|
|
336
|
-
};
|
|
337
|
-
export type SortOrder = (typeof sortOrder)[keyof typeof sortOrder];
|
|
338
|
-
export declare const systemOfMeasurement: {
|
|
339
|
-
readonly Si: "SI";
|
|
340
|
-
readonly UsCustomary: "US_CUSTOMARY";
|
|
341
|
-
};
|
|
342
|
-
export type SystemOfMeasurement = (typeof systemOfMeasurement)[keyof typeof systemOfMeasurement];
|
|
343
360
|
export type GetFilteredAssetsQueryVariables = Exact<{
|
|
344
361
|
filters?: InputMaybe<AssetFiltersInput>;
|
|
345
362
|
sort?: InputMaybe<AssetSortInput>;
|