@trackunit/custom-field-api 0.1.178 → 0.1.180
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 +14 -52
- package/index.esm.js +14 -50
- package/package.json +5 -4
- package/src/generated/graphql-api/gql.d.ts +1 -1
- package/src/generated/graphql-api/graphql.d.ts +7 -33
package/index.cjs.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var client = require('@apollo/client');
|
|
6
4
|
var reactCoreHooks = require('@trackunit/react-core-hooks');
|
|
7
5
|
var sharedUtils = require('@trackunit/shared-utils');
|
|
@@ -2135,7 +2133,10 @@ const useAllCustomFieldDefinitions = ({ entityType, filterQuery, owners, systemO
|
|
|
2135
2133
|
.filter(def => (onlyEditable ? def.uiEditable : true))
|
|
2136
2134
|
.map(def => {
|
|
2137
2135
|
var _a, _b, _c;
|
|
2138
|
-
return (
|
|
2136
|
+
return ({
|
|
2137
|
+
...def,
|
|
2138
|
+
title: (_c = (_b = (_a = def.translations) === null || _a === void 0 ? void 0 : _a.find(t => (t === null || t === void 0 ? void 0 : t.language) === language || (t === null || t === void 0 ? void 0 : t.language) === "en")) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : "",
|
|
2139
|
+
});
|
|
2139
2140
|
})
|
|
2140
2141
|
.filter(def => (filterQuery ? def.title.toLowerCase().includes(filterQuery.toLowerCase()) : true)), [definitionsArray, filterQuery, language, owners, onlyEditable]);
|
|
2141
2142
|
const appNameFromId = react.useCallback((appId) => {
|
|
@@ -2293,7 +2294,10 @@ const useCustomFieldDefinitions = ({ entityType, filterQuery, owners, systemOfMe
|
|
|
2293
2294
|
.filter(def => (onlyEditable ? def.uiEditable : true))
|
|
2294
2295
|
.map(def => {
|
|
2295
2296
|
var _a, _b, _c;
|
|
2296
|
-
return (
|
|
2297
|
+
return ({
|
|
2298
|
+
...def,
|
|
2299
|
+
title: (_c = (_b = (_a = def.translations) === null || _a === void 0 ? void 0 : _a.find(t => (t === null || t === void 0 ? void 0 : t.language) === language || (t === null || t === void 0 ? void 0 : t.language) === "en")) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : "",
|
|
2300
|
+
});
|
|
2297
2301
|
})
|
|
2298
2302
|
.filter(def => (filterQuery ? def.title.toLowerCase().includes(filterQuery.toLowerCase()) : true)), [definitionsArray, filterQuery, language, owners, onlyEditable]);
|
|
2299
2303
|
const appNameFromId = react.useCallback((appId) => {
|
|
@@ -2420,55 +2424,13 @@ const customFieldHasValue = (field) => {
|
|
|
2420
2424
|
}
|
|
2421
2425
|
};
|
|
2422
2426
|
|
|
2423
|
-
/******************************************************************************
|
|
2424
|
-
Copyright (c) Microsoft Corporation.
|
|
2425
|
-
|
|
2426
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2427
|
-
purpose with or without fee is hereby granted.
|
|
2428
|
-
|
|
2429
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2430
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2431
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2432
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2433
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2434
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2435
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2436
|
-
***************************************************************************** */
|
|
2437
|
-
|
|
2438
|
-
function __rest(s, e) {
|
|
2439
|
-
var t = {};
|
|
2440
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2441
|
-
t[p] = s[p];
|
|
2442
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2443
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2444
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2445
|
-
t[p[i]] = s[p[i]];
|
|
2446
|
-
}
|
|
2447
|
-
return t;
|
|
2448
|
-
}
|
|
2449
|
-
|
|
2450
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2451
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2452
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2453
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2454
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2455
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2456
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2457
|
-
});
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
2461
|
-
var e = new Error(message);
|
|
2462
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
2463
|
-
};
|
|
2464
|
-
|
|
2465
2427
|
/**
|
|
2466
2428
|
* Execute custom fields update from form data
|
|
2467
2429
|
*/
|
|
2468
2430
|
const useUpdateCustomFieldValues = (entityId, entityType, customFields, systemOfMeasurement = reactCoreContextsApi.SystemOfMeasurement.Si) => {
|
|
2469
2431
|
const [setCustomFieldValues, { data: saveResult, loading: savingCustomFields }] = client.useMutation(UpdateCustomFieldValuesDocument, { refetchQueries: ["GetCustomFieldsForAsset"] });
|
|
2470
|
-
const customFieldsMap = react.useMemo(() => customFields.reduce((acc, current) => (
|
|
2471
|
-
const updateCustomFields = react.useCallback((data) =>
|
|
2432
|
+
const customFieldsMap = react.useMemo(() => customFields.reduce((acc, current) => ({ ...acc, [current.definition.id]: current }), {}), [customFields]);
|
|
2433
|
+
const updateCustomFields = react.useCallback(async (data) => {
|
|
2472
2434
|
// Transform data to custom field updates
|
|
2473
2435
|
const fieldUpdates = sharedUtils.objectKeys(data)
|
|
2474
2436
|
.map(fieldId => {
|
|
@@ -2485,17 +2447,17 @@ const useUpdateCustomFieldValues = (entityId, entityType, customFields, systemOf
|
|
|
2485
2447
|
.filter(({ editable }) => editable)
|
|
2486
2448
|
.map(({ id, value, definition }) => {
|
|
2487
2449
|
if (definition && irisAppRuntimeCore.isValidCustomFieldValue(value)) {
|
|
2488
|
-
const
|
|
2450
|
+
const { type, ...newValue } = irisAppRuntimeCore.getCustomFieldValueToSaveFromRawValue(definition, value);
|
|
2489
2451
|
return {
|
|
2490
2452
|
definitionId: id,
|
|
2491
|
-
value:
|
|
2453
|
+
value: { ...newValue },
|
|
2492
2454
|
};
|
|
2493
2455
|
}
|
|
2494
2456
|
return null;
|
|
2495
2457
|
})
|
|
2496
2458
|
.filter(sharedUtils.nonNullable);
|
|
2497
2459
|
// execute update
|
|
2498
|
-
const customFieldsUpdateResponse =
|
|
2460
|
+
const customFieldsUpdateResponse = await setCustomFieldValues({
|
|
2499
2461
|
variables: {
|
|
2500
2462
|
entityId,
|
|
2501
2463
|
entityType,
|
|
@@ -2504,7 +2466,7 @@ const useUpdateCustomFieldValues = (entityId, entityType, customFields, systemOf
|
|
|
2504
2466
|
},
|
|
2505
2467
|
});
|
|
2506
2468
|
return customFieldsUpdateResponse;
|
|
2507
|
-
}
|
|
2469
|
+
}, [customFieldsMap, entityId, entityType, setCustomFieldValues, systemOfMeasurement]);
|
|
2508
2470
|
return react.useMemo(() => ({
|
|
2509
2471
|
updateCustomFields,
|
|
2510
2472
|
result: saveResult,
|
package/index.esm.js
CHANGED
|
@@ -2131,7 +2131,10 @@ const useAllCustomFieldDefinitions = ({ entityType, filterQuery, owners, systemO
|
|
|
2131
2131
|
.filter(def => (onlyEditable ? def.uiEditable : true))
|
|
2132
2132
|
.map(def => {
|
|
2133
2133
|
var _a, _b, _c;
|
|
2134
|
-
return (
|
|
2134
|
+
return ({
|
|
2135
|
+
...def,
|
|
2136
|
+
title: (_c = (_b = (_a = def.translations) === null || _a === void 0 ? void 0 : _a.find(t => (t === null || t === void 0 ? void 0 : t.language) === language || (t === null || t === void 0 ? void 0 : t.language) === "en")) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : "",
|
|
2137
|
+
});
|
|
2135
2138
|
})
|
|
2136
2139
|
.filter(def => (filterQuery ? def.title.toLowerCase().includes(filterQuery.toLowerCase()) : true)), [definitionsArray, filterQuery, language, owners, onlyEditable]);
|
|
2137
2140
|
const appNameFromId = useCallback((appId) => {
|
|
@@ -2289,7 +2292,10 @@ const useCustomFieldDefinitions = ({ entityType, filterQuery, owners, systemOfMe
|
|
|
2289
2292
|
.filter(def => (onlyEditable ? def.uiEditable : true))
|
|
2290
2293
|
.map(def => {
|
|
2291
2294
|
var _a, _b, _c;
|
|
2292
|
-
return (
|
|
2295
|
+
return ({
|
|
2296
|
+
...def,
|
|
2297
|
+
title: (_c = (_b = (_a = def.translations) === null || _a === void 0 ? void 0 : _a.find(t => (t === null || t === void 0 ? void 0 : t.language) === language || (t === null || t === void 0 ? void 0 : t.language) === "en")) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : "",
|
|
2298
|
+
});
|
|
2293
2299
|
})
|
|
2294
2300
|
.filter(def => (filterQuery ? def.title.toLowerCase().includes(filterQuery.toLowerCase()) : true)), [definitionsArray, filterQuery, language, owners, onlyEditable]);
|
|
2295
2301
|
const appNameFromId = useCallback((appId) => {
|
|
@@ -2416,55 +2422,13 @@ const customFieldHasValue = (field) => {
|
|
|
2416
2422
|
}
|
|
2417
2423
|
};
|
|
2418
2424
|
|
|
2419
|
-
/******************************************************************************
|
|
2420
|
-
Copyright (c) Microsoft Corporation.
|
|
2421
|
-
|
|
2422
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2423
|
-
purpose with or without fee is hereby granted.
|
|
2424
|
-
|
|
2425
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2426
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2427
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2428
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2429
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2430
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2431
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2432
|
-
***************************************************************************** */
|
|
2433
|
-
|
|
2434
|
-
function __rest(s, e) {
|
|
2435
|
-
var t = {};
|
|
2436
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2437
|
-
t[p] = s[p];
|
|
2438
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2439
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2440
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2441
|
-
t[p[i]] = s[p[i]];
|
|
2442
|
-
}
|
|
2443
|
-
return t;
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2447
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2448
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2449
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2450
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2451
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2452
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2453
|
-
});
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
2457
|
-
var e = new Error(message);
|
|
2458
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
2459
|
-
};
|
|
2460
|
-
|
|
2461
2425
|
/**
|
|
2462
2426
|
* Execute custom fields update from form data
|
|
2463
2427
|
*/
|
|
2464
2428
|
const useUpdateCustomFieldValues = (entityId, entityType, customFields, systemOfMeasurement = SystemOfMeasurement.Si) => {
|
|
2465
2429
|
const [setCustomFieldValues, { data: saveResult, loading: savingCustomFields }] = useMutation(UpdateCustomFieldValuesDocument, { refetchQueries: ["GetCustomFieldsForAsset"] });
|
|
2466
|
-
const customFieldsMap = useMemo(() => customFields.reduce((acc, current) => (
|
|
2467
|
-
const updateCustomFields = useCallback((data) =>
|
|
2430
|
+
const customFieldsMap = useMemo(() => customFields.reduce((acc, current) => ({ ...acc, [current.definition.id]: current }), {}), [customFields]);
|
|
2431
|
+
const updateCustomFields = useCallback(async (data) => {
|
|
2468
2432
|
// Transform data to custom field updates
|
|
2469
2433
|
const fieldUpdates = objectKeys(data)
|
|
2470
2434
|
.map(fieldId => {
|
|
@@ -2481,17 +2445,17 @@ const useUpdateCustomFieldValues = (entityId, entityType, customFields, systemOf
|
|
|
2481
2445
|
.filter(({ editable }) => editable)
|
|
2482
2446
|
.map(({ id, value, definition }) => {
|
|
2483
2447
|
if (definition && isValidCustomFieldValue(value)) {
|
|
2484
|
-
const
|
|
2448
|
+
const { type, ...newValue } = getCustomFieldValueToSaveFromRawValue(definition, value);
|
|
2485
2449
|
return {
|
|
2486
2450
|
definitionId: id,
|
|
2487
|
-
value:
|
|
2451
|
+
value: { ...newValue },
|
|
2488
2452
|
};
|
|
2489
2453
|
}
|
|
2490
2454
|
return null;
|
|
2491
2455
|
})
|
|
2492
2456
|
.filter(nonNullable);
|
|
2493
2457
|
// execute update
|
|
2494
|
-
const customFieldsUpdateResponse =
|
|
2458
|
+
const customFieldsUpdateResponse = await setCustomFieldValues({
|
|
2495
2459
|
variables: {
|
|
2496
2460
|
entityId,
|
|
2497
2461
|
entityType,
|
|
@@ -2500,7 +2464,7 @@ const useUpdateCustomFieldValues = (entityId, entityType, customFields, systemOf
|
|
|
2500
2464
|
},
|
|
2501
2465
|
});
|
|
2502
2466
|
return customFieldsUpdateResponse;
|
|
2503
|
-
}
|
|
2467
|
+
}, [customFieldsMap, entityId, entityType, setCustomFieldValues, systemOfMeasurement]);
|
|
2504
2468
|
return useMemo(() => ({
|
|
2505
2469
|
updateCustomFields,
|
|
2506
2470
|
result: saveResult,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/custom-field-api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.180",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.x"
|
|
6
6
|
},
|
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
"@trackunit/iris-app-api": "*",
|
|
15
15
|
"@apollo/client": "3.10.4",
|
|
16
16
|
"@trackunit/react-core-contexts-test": "*",
|
|
17
|
-
"react": "
|
|
17
|
+
"react": "18.3.1",
|
|
18
18
|
"@trackunit/shared-utils": "*",
|
|
19
19
|
"@trackunit/react-core-hooks": "*",
|
|
20
20
|
"@trackunit/iris-app-runtime-core": "*",
|
|
21
21
|
"@trackunit/react-core-contexts-api": "*"
|
|
22
22
|
},
|
|
23
23
|
"module": "./index.esm.js",
|
|
24
|
-
"main": "./index.cjs.js"
|
|
25
|
-
|
|
24
|
+
"main": "./index.cjs.js",
|
|
25
|
+
"types": "./index.esm.d.ts"
|
|
26
|
+
}
|
|
@@ -12,7 +12,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
|
|
|
12
12
|
*/
|
|
13
13
|
declare const documents: {
|
|
14
14
|
"query GetCustomFieldsForAsset($entityId: ID!, $systemOfMeasurement: SystemOfMeasurement) {\n asset(id: $entityId) {\n customFields {\n edges {\n node {\n ...CustomFieldValueAndDefinition\n }\n }\n }\n }\n}\n\nquery GetCustomFieldsForSite($entityId: ID!, $systemOfMeasurement: SystemOfMeasurement) {\n site(id: $entityId) {\n customFields {\n edges {\n node {\n ...CustomFieldValueAndDefinition\n }\n }\n }\n }\n}\n\nquery GetCustomFieldsForAssetForIrisApp($entityId: ID!, $systemOfMeasurement: SystemOfMeasurement, $irisAppId: String!) {\n asset(id: $entityId) {\n customFields(owner: {ownerType: IRIS_APP, irisAppId: $irisAppId}) {\n edges {\n node {\n ...CustomFieldValueAndDefinition\n }\n }\n }\n }\n}\n\nquery GetCustomFieldsForSiteForIrisApp($entityId: ID!, $systemOfMeasurement: SystemOfMeasurement, $irisAppId: String!) {\n site(id: $entityId) {\n customFields(owner: {ownerType: IRIS_APP, irisAppId: $irisAppId}) {\n edges {\n node {\n ...CustomFieldValueAndDefinition\n }\n }\n }\n }\n}\n\nfragment CustomFieldValueAndDefinition on CustomFieldValueAndDefinition {\n __typename\n definition {\n __typename\n description\n entityType\n id\n key\n owner {\n irisAppId\n marketplaceEntry {\n name\n }\n ownerType\n }\n title\n translations {\n description\n title\n language\n }\n type\n uiEditable\n uiVisible\n ... on DropDownFieldDefinition {\n allValues\n multiSelect\n }\n ... on NumberFieldDefinition {\n isInteger\n maximumNumber(systemOfMeasurement: $systemOfMeasurement)\n minimumNumber(systemOfMeasurement: $systemOfMeasurement)\n unitSi\n unitUs\n }\n ... on MonetaryFieldDefinition {\n currency\n maximumNumber\n minimumNumber\n }\n ... on StringFieldDefinition {\n maximumLength\n minimumLength\n pattern\n }\n }\n valueEditable\n ... on BooleanFieldValueAndDefinition {\n booleanValue\n }\n ... on DateFieldValueAndDefinition {\n dateValue\n }\n ... on DropDownFieldValueAndDefinition {\n stringArrayValue\n }\n ... on EmailFieldValueAndDefinition {\n stringValue\n }\n ... on JsonFieldValueAndDefinition {\n jsonValue\n }\n ... on NumberFieldValueAndDefinition {\n numberValue(systemOfMeasurement: $systemOfMeasurement)\n }\n ... on MonetaryFieldValueAndDefinition {\n numberValue\n }\n ... on PhoneNumberFieldValueAndDefinition {\n stringValue\n }\n ... on StringFieldValueAndDefinition {\n stringValue\n }\n ... on WebAddressFieldValueAndDefinition {\n stringValue\n }\n}\n\nquery GetCustomFieldDefinitions($entityType: CustomFieldEntityType = ASSET, $systemOfMeasurement: SystemOfMeasurement) {\n customFieldDefinitions(uiVisible: true, first: 100, entityType: $entityType) {\n edges {\n node {\n ...CustomFieldDefinition\n }\n }\n }\n}\n\nquery GetCustomFieldDefinitionsForIrisApp($entityType: CustomFieldEntityType = ASSET, $systemOfMeasurement: SystemOfMeasurement, $irisAppId: String!) {\n customFieldDefinitions(\n uiVisible: true\n first: 100\n entityType: $entityType\n owner: {ownerType: IRIS_APP, irisAppId: $irisAppId}\n ) {\n edges {\n node {\n ...CustomFieldDefinition\n }\n }\n }\n}\n\nfragment CustomFieldDefinition on CustomFieldDefinition {\n __typename\n description\n entityType\n id\n key\n owner {\n irisAppId\n marketplaceEntry {\n name\n }\n ownerType\n }\n title\n translations {\n description\n title\n language\n }\n type\n uiEditable\n uiVisible\n ... on DropDownFieldDefinition {\n allValues\n multiSelect\n }\n ... on NumberFieldDefinition {\n isInteger\n maximumNumber(systemOfMeasurement: $systemOfMeasurement)\n minimumNumber(systemOfMeasurement: $systemOfMeasurement)\n unitSi\n unitUs\n }\n ... on MonetaryFieldDefinition {\n currency\n maximumNumber\n minimumNumber\n }\n ... on StringFieldDefinition {\n maximumLength\n minimumLength\n pattern\n }\n}\n\nmutation UpdateCustomFieldValues($customFields: [SetCustomFieldValueInput!]!, $entityId: ID!, $entityType: CustomFieldEntityType!, $systemOfMeasurement: SystemOfMeasurement) {\n customFieldSetValues(\n input: {entityIds: [$entityId], entityType: $entityType, values: $customFields}\n systemOfMeasurement: $systemOfMeasurement\n ) {\n success\n fieldsWithInvalidValues {\n definitionId\n }\n }\n}": DocumentNode<types.GetCustomFieldsForAssetQuery, types.Exact<{
|
|
15
|
-
entityId:
|
|
15
|
+
entityId: types.Scalars["ID"]["input"];
|
|
16
16
|
systemOfMeasurement: types.InputMaybe<types.SystemOfMeasurement>;
|
|
17
17
|
}>>;
|
|
18
18
|
};
|
|
@@ -1396,37 +1396,11 @@ export type UpdateCustomFieldValuesMutation = {
|
|
|
1396
1396
|
};
|
|
1397
1397
|
export declare const CustomFieldValueAndDefinitionFragmentDoc: DocumentNode<CustomFieldValueAndDefinitionFragment, unknown>;
|
|
1398
1398
|
export declare const CustomFieldDefinitionFragmentDoc: DocumentNode<CustomFieldDefinitionFragment, unknown>;
|
|
1399
|
-
export declare const GetCustomFieldsForAssetDocument: DocumentNode<GetCustomFieldsForAssetQuery,
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
export declare const
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
}>>;
|
|
1407
|
-
export declare const GetCustomFieldsForAssetForIrisAppDocument: DocumentNode<GetCustomFieldsForAssetForIrisAppQuery, Exact<{
|
|
1408
|
-
entityId: Scalars["ID"]["input"];
|
|
1409
|
-
systemOfMeasurement: InputMaybe<SystemOfMeasurement>;
|
|
1410
|
-
irisAppId: Scalars["String"]["input"];
|
|
1411
|
-
}>>;
|
|
1412
|
-
export declare const GetCustomFieldsForSiteForIrisAppDocument: DocumentNode<GetCustomFieldsForSiteForIrisAppQuery, Exact<{
|
|
1413
|
-
entityId: Scalars["ID"]["input"];
|
|
1414
|
-
systemOfMeasurement: InputMaybe<SystemOfMeasurement>;
|
|
1415
|
-
irisAppId: Scalars["String"]["input"];
|
|
1416
|
-
}>>;
|
|
1417
|
-
export declare const GetCustomFieldDefinitionsDocument: DocumentNode<GetCustomFieldDefinitionsQuery, Exact<{
|
|
1418
|
-
entityType?: InputMaybe<CustomFieldEntityType>;
|
|
1419
|
-
systemOfMeasurement: InputMaybe<SystemOfMeasurement>;
|
|
1420
|
-
}>>;
|
|
1421
|
-
export declare const GetCustomFieldDefinitionsForIrisAppDocument: DocumentNode<GetCustomFieldDefinitionsForIrisAppQuery, Exact<{
|
|
1422
|
-
entityType?: InputMaybe<CustomFieldEntityType>;
|
|
1423
|
-
systemOfMeasurement: InputMaybe<SystemOfMeasurement>;
|
|
1424
|
-
irisAppId: Scalars["String"]["input"];
|
|
1425
|
-
}>>;
|
|
1426
|
-
export declare const UpdateCustomFieldValuesDocument: DocumentNode<UpdateCustomFieldValuesMutation, Exact<{
|
|
1427
|
-
customFields: Array<SetCustomFieldValueInput> | SetCustomFieldValueInput;
|
|
1428
|
-
entityId: Scalars["ID"]["input"];
|
|
1429
|
-
entityType: CustomFieldEntityType;
|
|
1430
|
-
systemOfMeasurement: InputMaybe<SystemOfMeasurement>;
|
|
1431
|
-
}>>;
|
|
1399
|
+
export declare const GetCustomFieldsForAssetDocument: DocumentNode<GetCustomFieldsForAssetQuery, GetCustomFieldsForAssetQueryVariables>;
|
|
1400
|
+
export declare const GetCustomFieldsForSiteDocument: DocumentNode<GetCustomFieldsForSiteQuery, GetCustomFieldsForSiteQueryVariables>;
|
|
1401
|
+
export declare const GetCustomFieldsForAssetForIrisAppDocument: DocumentNode<GetCustomFieldsForAssetForIrisAppQuery, GetCustomFieldsForAssetForIrisAppQueryVariables>;
|
|
1402
|
+
export declare const GetCustomFieldsForSiteForIrisAppDocument: DocumentNode<GetCustomFieldsForSiteForIrisAppQuery, GetCustomFieldsForSiteForIrisAppQueryVariables>;
|
|
1403
|
+
export declare const GetCustomFieldDefinitionsDocument: DocumentNode<GetCustomFieldDefinitionsQuery, GetCustomFieldDefinitionsQueryVariables>;
|
|
1404
|
+
export declare const GetCustomFieldDefinitionsForIrisAppDocument: DocumentNode<GetCustomFieldDefinitionsForIrisAppQuery, GetCustomFieldDefinitionsForIrisAppQueryVariables>;
|
|
1405
|
+
export declare const UpdateCustomFieldValuesDocument: DocumentNode<UpdateCustomFieldValuesMutation, UpdateCustomFieldValuesMutationVariables>;
|
|
1432
1406
|
export {};
|