@trackunit/custom-field-api 0.1.67 → 0.1.68
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 +105 -29
- package/index.esm.js +105 -29
- package/package.json +1 -1
- package/src/generated/graphql-api/gql.d.ts +2 -2
- package/src/generated/graphql-api/graphql.d.ts +20 -20
package/index.cjs.js
CHANGED
|
@@ -29,7 +29,7 @@ const CustomFieldValueAndDefinitionFragmentDoc = {
|
|
|
29
29
|
selectionSet: {
|
|
30
30
|
kind: "SelectionSet",
|
|
31
31
|
selections: [
|
|
32
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
32
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
33
33
|
{
|
|
34
34
|
kind: "Field",
|
|
35
35
|
name: { kind: "Name", value: "owner" },
|
|
@@ -116,15 +116,45 @@ const CustomFieldValueAndDefinitionFragmentDoc = {
|
|
|
116
116
|
selectionSet: {
|
|
117
117
|
kind: "SelectionSet",
|
|
118
118
|
selections: [
|
|
119
|
-
{
|
|
119
|
+
{
|
|
120
|
+
kind: "Field",
|
|
121
|
+
name: { kind: "Name", value: "numberValue" },
|
|
122
|
+
arguments: [
|
|
123
|
+
{
|
|
124
|
+
kind: "Argument",
|
|
125
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
126
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
120
130
|
{
|
|
121
131
|
kind: "Field",
|
|
122
132
|
name: { kind: "Name", value: "definition" },
|
|
123
133
|
selectionSet: {
|
|
124
134
|
kind: "SelectionSet",
|
|
125
135
|
selections: [
|
|
126
|
-
{
|
|
127
|
-
|
|
136
|
+
{
|
|
137
|
+
kind: "Field",
|
|
138
|
+
name: { kind: "Name", value: "minimumNumber" },
|
|
139
|
+
arguments: [
|
|
140
|
+
{
|
|
141
|
+
kind: "Argument",
|
|
142
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
143
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
kind: "Field",
|
|
149
|
+
name: { kind: "Name", value: "maximumNumber" },
|
|
150
|
+
arguments: [
|
|
151
|
+
{
|
|
152
|
+
kind: "Argument",
|
|
153
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
154
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
128
158
|
{ kind: "Field", name: { kind: "Name", value: "unitSi" } },
|
|
129
159
|
{ kind: "Field", name: { kind: "Name", value: "unitUs" } },
|
|
130
160
|
{ kind: "Field", name: { kind: "Name", value: "isInteger" } },
|
|
@@ -209,7 +239,7 @@ const CustomFieldDefinitionFragmentDoc = {
|
|
|
209
239
|
selectionSet: {
|
|
210
240
|
kind: "SelectionSet",
|
|
211
241
|
selections: [
|
|
212
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
242
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
213
243
|
{
|
|
214
244
|
kind: "Field",
|
|
215
245
|
name: { kind: "Name", value: "translations" },
|
|
@@ -274,13 +304,6 @@ const GetCustomFieldsForAssetDocument = {
|
|
|
274
304
|
{
|
|
275
305
|
kind: "Field",
|
|
276
306
|
name: { kind: "Name", value: "customFields" },
|
|
277
|
-
arguments: [
|
|
278
|
-
{
|
|
279
|
-
kind: "Argument",
|
|
280
|
-
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
281
|
-
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
282
|
-
},
|
|
283
|
-
],
|
|
284
307
|
selectionSet: {
|
|
285
308
|
kind: "SelectionSet",
|
|
286
309
|
selections: [
|
|
@@ -330,7 +353,7 @@ const GetCustomFieldsForAssetDocument = {
|
|
|
330
353
|
selectionSet: {
|
|
331
354
|
kind: "SelectionSet",
|
|
332
355
|
selections: [
|
|
333
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
356
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
334
357
|
{
|
|
335
358
|
kind: "Field",
|
|
336
359
|
name: { kind: "Name", value: "owner" },
|
|
@@ -417,15 +440,45 @@ const GetCustomFieldsForAssetDocument = {
|
|
|
417
440
|
selectionSet: {
|
|
418
441
|
kind: "SelectionSet",
|
|
419
442
|
selections: [
|
|
420
|
-
{
|
|
443
|
+
{
|
|
444
|
+
kind: "Field",
|
|
445
|
+
name: { kind: "Name", value: "numberValue" },
|
|
446
|
+
arguments: [
|
|
447
|
+
{
|
|
448
|
+
kind: "Argument",
|
|
449
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
450
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
451
|
+
},
|
|
452
|
+
],
|
|
453
|
+
},
|
|
421
454
|
{
|
|
422
455
|
kind: "Field",
|
|
423
456
|
name: { kind: "Name", value: "definition" },
|
|
424
457
|
selectionSet: {
|
|
425
458
|
kind: "SelectionSet",
|
|
426
459
|
selections: [
|
|
427
|
-
{
|
|
428
|
-
|
|
460
|
+
{
|
|
461
|
+
kind: "Field",
|
|
462
|
+
name: { kind: "Name", value: "minimumNumber" },
|
|
463
|
+
arguments: [
|
|
464
|
+
{
|
|
465
|
+
kind: "Argument",
|
|
466
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
467
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
kind: "Field",
|
|
473
|
+
name: { kind: "Name", value: "maximumNumber" },
|
|
474
|
+
arguments: [
|
|
475
|
+
{
|
|
476
|
+
kind: "Argument",
|
|
477
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
478
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
479
|
+
},
|
|
480
|
+
],
|
|
481
|
+
},
|
|
429
482
|
{ kind: "Field", name: { kind: "Name", value: "unitSi" } },
|
|
430
483
|
{ kind: "Field", name: { kind: "Name", value: "unitUs" } },
|
|
431
484
|
{ kind: "Field", name: { kind: "Name", value: "isInteger" } },
|
|
@@ -538,13 +591,6 @@ const GetCustomFieldsForSiteDocument = {
|
|
|
538
591
|
{
|
|
539
592
|
kind: "Field",
|
|
540
593
|
name: { kind: "Name", value: "customFields" },
|
|
541
|
-
arguments: [
|
|
542
|
-
{
|
|
543
|
-
kind: "Argument",
|
|
544
|
-
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
545
|
-
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
546
|
-
},
|
|
547
|
-
],
|
|
548
594
|
selectionSet: {
|
|
549
595
|
kind: "SelectionSet",
|
|
550
596
|
selections: [
|
|
@@ -594,7 +640,7 @@ const GetCustomFieldsForSiteDocument = {
|
|
|
594
640
|
selectionSet: {
|
|
595
641
|
kind: "SelectionSet",
|
|
596
642
|
selections: [
|
|
597
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
643
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
598
644
|
{
|
|
599
645
|
kind: "Field",
|
|
600
646
|
name: { kind: "Name", value: "owner" },
|
|
@@ -681,15 +727,45 @@ const GetCustomFieldsForSiteDocument = {
|
|
|
681
727
|
selectionSet: {
|
|
682
728
|
kind: "SelectionSet",
|
|
683
729
|
selections: [
|
|
684
|
-
{
|
|
730
|
+
{
|
|
731
|
+
kind: "Field",
|
|
732
|
+
name: { kind: "Name", value: "numberValue" },
|
|
733
|
+
arguments: [
|
|
734
|
+
{
|
|
735
|
+
kind: "Argument",
|
|
736
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
737
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
738
|
+
},
|
|
739
|
+
],
|
|
740
|
+
},
|
|
685
741
|
{
|
|
686
742
|
kind: "Field",
|
|
687
743
|
name: { kind: "Name", value: "definition" },
|
|
688
744
|
selectionSet: {
|
|
689
745
|
kind: "SelectionSet",
|
|
690
746
|
selections: [
|
|
691
|
-
{
|
|
692
|
-
|
|
747
|
+
{
|
|
748
|
+
kind: "Field",
|
|
749
|
+
name: { kind: "Name", value: "minimumNumber" },
|
|
750
|
+
arguments: [
|
|
751
|
+
{
|
|
752
|
+
kind: "Argument",
|
|
753
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
754
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
755
|
+
},
|
|
756
|
+
],
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
kind: "Field",
|
|
760
|
+
name: { kind: "Name", value: "maximumNumber" },
|
|
761
|
+
arguments: [
|
|
762
|
+
{
|
|
763
|
+
kind: "Argument",
|
|
764
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
765
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
766
|
+
},
|
|
767
|
+
],
|
|
768
|
+
},
|
|
693
769
|
{ kind: "Field", name: { kind: "Name", value: "unitSi" } },
|
|
694
770
|
{ kind: "Field", name: { kind: "Name", value: "unitUs" } },
|
|
695
771
|
{ kind: "Field", name: { kind: "Name", value: "isInteger" } },
|
|
@@ -847,7 +923,7 @@ const GetCustomFieldDefinitionsDocument = {
|
|
|
847
923
|
selectionSet: {
|
|
848
924
|
kind: "SelectionSet",
|
|
849
925
|
selections: [
|
|
850
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
926
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
851
927
|
{
|
|
852
928
|
kind: "Field",
|
|
853
929
|
name: { kind: "Name", value: "translations" },
|
|
@@ -907,7 +983,7 @@ const useCustomFieldDefinitions = ({ entityType, filterQuery, owners, }) => {
|
|
|
907
983
|
.map(def => {
|
|
908
984
|
var _a, _b, _c, _d;
|
|
909
985
|
return ({
|
|
910
|
-
id: def.
|
|
986
|
+
id: def.id,
|
|
911
987
|
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 : "",
|
|
912
988
|
type: def.type,
|
|
913
989
|
owner: (_d = def.owner) === null || _d === void 0 ? void 0 : _d.ownerType,
|
package/index.esm.js
CHANGED
|
@@ -25,7 +25,7 @@ const CustomFieldValueAndDefinitionFragmentDoc = {
|
|
|
25
25
|
selectionSet: {
|
|
26
26
|
kind: "SelectionSet",
|
|
27
27
|
selections: [
|
|
28
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
28
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
29
29
|
{
|
|
30
30
|
kind: "Field",
|
|
31
31
|
name: { kind: "Name", value: "owner" },
|
|
@@ -112,15 +112,45 @@ const CustomFieldValueAndDefinitionFragmentDoc = {
|
|
|
112
112
|
selectionSet: {
|
|
113
113
|
kind: "SelectionSet",
|
|
114
114
|
selections: [
|
|
115
|
-
{
|
|
115
|
+
{
|
|
116
|
+
kind: "Field",
|
|
117
|
+
name: { kind: "Name", value: "numberValue" },
|
|
118
|
+
arguments: [
|
|
119
|
+
{
|
|
120
|
+
kind: "Argument",
|
|
121
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
122
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
116
126
|
{
|
|
117
127
|
kind: "Field",
|
|
118
128
|
name: { kind: "Name", value: "definition" },
|
|
119
129
|
selectionSet: {
|
|
120
130
|
kind: "SelectionSet",
|
|
121
131
|
selections: [
|
|
122
|
-
{
|
|
123
|
-
|
|
132
|
+
{
|
|
133
|
+
kind: "Field",
|
|
134
|
+
name: { kind: "Name", value: "minimumNumber" },
|
|
135
|
+
arguments: [
|
|
136
|
+
{
|
|
137
|
+
kind: "Argument",
|
|
138
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
139
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
kind: "Field",
|
|
145
|
+
name: { kind: "Name", value: "maximumNumber" },
|
|
146
|
+
arguments: [
|
|
147
|
+
{
|
|
148
|
+
kind: "Argument",
|
|
149
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
150
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
},
|
|
124
154
|
{ kind: "Field", name: { kind: "Name", value: "unitSi" } },
|
|
125
155
|
{ kind: "Field", name: { kind: "Name", value: "unitUs" } },
|
|
126
156
|
{ kind: "Field", name: { kind: "Name", value: "isInteger" } },
|
|
@@ -205,7 +235,7 @@ const CustomFieldDefinitionFragmentDoc = {
|
|
|
205
235
|
selectionSet: {
|
|
206
236
|
kind: "SelectionSet",
|
|
207
237
|
selections: [
|
|
208
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
238
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
209
239
|
{
|
|
210
240
|
kind: "Field",
|
|
211
241
|
name: { kind: "Name", value: "translations" },
|
|
@@ -270,13 +300,6 @@ const GetCustomFieldsForAssetDocument = {
|
|
|
270
300
|
{
|
|
271
301
|
kind: "Field",
|
|
272
302
|
name: { kind: "Name", value: "customFields" },
|
|
273
|
-
arguments: [
|
|
274
|
-
{
|
|
275
|
-
kind: "Argument",
|
|
276
|
-
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
277
|
-
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
278
|
-
},
|
|
279
|
-
],
|
|
280
303
|
selectionSet: {
|
|
281
304
|
kind: "SelectionSet",
|
|
282
305
|
selections: [
|
|
@@ -326,7 +349,7 @@ const GetCustomFieldsForAssetDocument = {
|
|
|
326
349
|
selectionSet: {
|
|
327
350
|
kind: "SelectionSet",
|
|
328
351
|
selections: [
|
|
329
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
352
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
330
353
|
{
|
|
331
354
|
kind: "Field",
|
|
332
355
|
name: { kind: "Name", value: "owner" },
|
|
@@ -413,15 +436,45 @@ const GetCustomFieldsForAssetDocument = {
|
|
|
413
436
|
selectionSet: {
|
|
414
437
|
kind: "SelectionSet",
|
|
415
438
|
selections: [
|
|
416
|
-
{
|
|
439
|
+
{
|
|
440
|
+
kind: "Field",
|
|
441
|
+
name: { kind: "Name", value: "numberValue" },
|
|
442
|
+
arguments: [
|
|
443
|
+
{
|
|
444
|
+
kind: "Argument",
|
|
445
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
446
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
447
|
+
},
|
|
448
|
+
],
|
|
449
|
+
},
|
|
417
450
|
{
|
|
418
451
|
kind: "Field",
|
|
419
452
|
name: { kind: "Name", value: "definition" },
|
|
420
453
|
selectionSet: {
|
|
421
454
|
kind: "SelectionSet",
|
|
422
455
|
selections: [
|
|
423
|
-
{
|
|
424
|
-
|
|
456
|
+
{
|
|
457
|
+
kind: "Field",
|
|
458
|
+
name: { kind: "Name", value: "minimumNumber" },
|
|
459
|
+
arguments: [
|
|
460
|
+
{
|
|
461
|
+
kind: "Argument",
|
|
462
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
463
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
464
|
+
},
|
|
465
|
+
],
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
kind: "Field",
|
|
469
|
+
name: { kind: "Name", value: "maximumNumber" },
|
|
470
|
+
arguments: [
|
|
471
|
+
{
|
|
472
|
+
kind: "Argument",
|
|
473
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
474
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
},
|
|
425
478
|
{ kind: "Field", name: { kind: "Name", value: "unitSi" } },
|
|
426
479
|
{ kind: "Field", name: { kind: "Name", value: "unitUs" } },
|
|
427
480
|
{ kind: "Field", name: { kind: "Name", value: "isInteger" } },
|
|
@@ -534,13 +587,6 @@ const GetCustomFieldsForSiteDocument = {
|
|
|
534
587
|
{
|
|
535
588
|
kind: "Field",
|
|
536
589
|
name: { kind: "Name", value: "customFields" },
|
|
537
|
-
arguments: [
|
|
538
|
-
{
|
|
539
|
-
kind: "Argument",
|
|
540
|
-
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
541
|
-
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
542
|
-
},
|
|
543
|
-
],
|
|
544
590
|
selectionSet: {
|
|
545
591
|
kind: "SelectionSet",
|
|
546
592
|
selections: [
|
|
@@ -590,7 +636,7 @@ const GetCustomFieldsForSiteDocument = {
|
|
|
590
636
|
selectionSet: {
|
|
591
637
|
kind: "SelectionSet",
|
|
592
638
|
selections: [
|
|
593
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
639
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
594
640
|
{
|
|
595
641
|
kind: "Field",
|
|
596
642
|
name: { kind: "Name", value: "owner" },
|
|
@@ -677,15 +723,45 @@ const GetCustomFieldsForSiteDocument = {
|
|
|
677
723
|
selectionSet: {
|
|
678
724
|
kind: "SelectionSet",
|
|
679
725
|
selections: [
|
|
680
|
-
{
|
|
726
|
+
{
|
|
727
|
+
kind: "Field",
|
|
728
|
+
name: { kind: "Name", value: "numberValue" },
|
|
729
|
+
arguments: [
|
|
730
|
+
{
|
|
731
|
+
kind: "Argument",
|
|
732
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
733
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
734
|
+
},
|
|
735
|
+
],
|
|
736
|
+
},
|
|
681
737
|
{
|
|
682
738
|
kind: "Field",
|
|
683
739
|
name: { kind: "Name", value: "definition" },
|
|
684
740
|
selectionSet: {
|
|
685
741
|
kind: "SelectionSet",
|
|
686
742
|
selections: [
|
|
687
|
-
{
|
|
688
|
-
|
|
743
|
+
{
|
|
744
|
+
kind: "Field",
|
|
745
|
+
name: { kind: "Name", value: "minimumNumber" },
|
|
746
|
+
arguments: [
|
|
747
|
+
{
|
|
748
|
+
kind: "Argument",
|
|
749
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
750
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
751
|
+
},
|
|
752
|
+
],
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
kind: "Field",
|
|
756
|
+
name: { kind: "Name", value: "maximumNumber" },
|
|
757
|
+
arguments: [
|
|
758
|
+
{
|
|
759
|
+
kind: "Argument",
|
|
760
|
+
name: { kind: "Name", value: "systemOfMeasurement" },
|
|
761
|
+
value: { kind: "Variable", name: { kind: "Name", value: "systemOfMeasurement" } },
|
|
762
|
+
},
|
|
763
|
+
],
|
|
764
|
+
},
|
|
689
765
|
{ kind: "Field", name: { kind: "Name", value: "unitSi" } },
|
|
690
766
|
{ kind: "Field", name: { kind: "Name", value: "unitUs" } },
|
|
691
767
|
{ kind: "Field", name: { kind: "Name", value: "isInteger" } },
|
|
@@ -843,7 +919,7 @@ const GetCustomFieldDefinitionsDocument = {
|
|
|
843
919
|
selectionSet: {
|
|
844
920
|
kind: "SelectionSet",
|
|
845
921
|
selections: [
|
|
846
|
-
{ kind: "Field", name: { kind: "Name", value: "
|
|
922
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
847
923
|
{
|
|
848
924
|
kind: "Field",
|
|
849
925
|
name: { kind: "Name", value: "translations" },
|
|
@@ -903,7 +979,7 @@ const useCustomFieldDefinitions = ({ entityType, filterQuery, owners, }) => {
|
|
|
903
979
|
.map(def => {
|
|
904
980
|
var _a, _b, _c, _d;
|
|
905
981
|
return ({
|
|
906
|
-
id: def.
|
|
982
|
+
id: def.id,
|
|
907
983
|
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 : "",
|
|
908
984
|
type: def.type,
|
|
909
985
|
owner: (_d = def.owner) === null || _d === void 0 ? void 0 : _d.ownerType,
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
|
|
|
11
11
|
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
12
12
|
*/
|
|
13
13
|
declare const documents: {
|
|
14
|
-
"query GetCustomFieldsForAsset($entityId: String!, $systemOfMeasurement: SystemOfMeasurement) {\n asset(id: $entityId) {\n customFields
|
|
14
|
+
"query GetCustomFieldsForAsset($entityId: String!, $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\nfragment CustomFieldValueAndDefinition on CustomFieldValueAndDefinition {\n __typename\n type\n definition {\n id\n owner {\n irisAppId\n marketplaceEntry {\n name\n }\n }\n entityType\n title\n description\n uiVisible\n uiEditable\n key\n }\n ... on BooleanFieldValueAndDefinition {\n booleanValue\n }\n ... on DateFieldValueAndDefinition {\n dateValue\n }\n ... on DropDownFieldValueAndDefinition {\n stringArrayValue\n definition {\n allValues\n multiSelect\n }\n }\n ... on EmailFieldValueAndDefinition {\n stringValue\n }\n ... on JsonFieldValueAndDefinition {\n jsonValue\n }\n ... on NumberFieldValueAndDefinition {\n numberValue(systemOfMeasurement: $systemOfMeasurement)\n definition {\n minimumNumber(systemOfMeasurement: $systemOfMeasurement)\n maximumNumber(systemOfMeasurement: $systemOfMeasurement)\n unitSi\n unitUs\n isInteger\n }\n }\n ... on MonetaryFieldValueAndDefinition {\n numberValue\n definition {\n minimumNumber\n maximumNumber\n currency\n }\n }\n ... on PhoneNumberFieldValueAndDefinition {\n stringValue\n }\n ... on StringFieldValueAndDefinition {\n stringValue\n definition {\n maximumLength\n minimumLength\n pattern\n }\n }\n ... on WebAddressFieldValueAndDefinition {\n stringValue\n }\n}\n\nquery GetCustomFieldDefinitions($entityType: CustomFieldEntityType = ASSET) {\n customFieldDefinitions(uiVisible: true, first: 100, entityType: $entityType) {\n edges {\n node {\n ...CustomFieldDefinition\n }\n }\n pageInfo {\n count\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment CustomFieldDefinition on CustomFieldDefinition {\n id\n translations {\n description\n title\n language\n }\n owner {\n ownerType\n }\n type\n}": DocumentNode<types.GetCustomFieldsForAssetQuery, types.Exact<{
|
|
15
15
|
entityId: string;
|
|
16
16
|
systemOfMeasurement: types.InputMaybe<types.SystemOfMeasurement>;
|
|
17
17
|
}>>;
|
|
@@ -32,6 +32,6 @@ export declare function graphql(source: string): unknown;
|
|
|
32
32
|
/**
|
|
33
33
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
34
34
|
*/
|
|
35
|
-
export declare function graphql(source: "query GetCustomFieldsForAsset($entityId: String!, $systemOfMeasurement: SystemOfMeasurement) {\n asset(id: $entityId) {\n customFields
|
|
35
|
+
export declare function graphql(source: "query GetCustomFieldsForAsset($entityId: String!, $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\nfragment CustomFieldValueAndDefinition on CustomFieldValueAndDefinition {\n __typename\n type\n definition {\n id\n owner {\n irisAppId\n marketplaceEntry {\n name\n }\n }\n entityType\n title\n description\n uiVisible\n uiEditable\n key\n }\n ... on BooleanFieldValueAndDefinition {\n booleanValue\n }\n ... on DateFieldValueAndDefinition {\n dateValue\n }\n ... on DropDownFieldValueAndDefinition {\n stringArrayValue\n definition {\n allValues\n multiSelect\n }\n }\n ... on EmailFieldValueAndDefinition {\n stringValue\n }\n ... on JsonFieldValueAndDefinition {\n jsonValue\n }\n ... on NumberFieldValueAndDefinition {\n numberValue(systemOfMeasurement: $systemOfMeasurement)\n definition {\n minimumNumber(systemOfMeasurement: $systemOfMeasurement)\n maximumNumber(systemOfMeasurement: $systemOfMeasurement)\n unitSi\n unitUs\n isInteger\n }\n }\n ... on MonetaryFieldValueAndDefinition {\n numberValue\n definition {\n minimumNumber\n maximumNumber\n currency\n }\n }\n ... on PhoneNumberFieldValueAndDefinition {\n stringValue\n }\n ... on StringFieldValueAndDefinition {\n stringValue\n definition {\n maximumLength\n minimumLength\n pattern\n }\n }\n ... on WebAddressFieldValueAndDefinition {\n stringValue\n }\n}\n\nquery GetCustomFieldDefinitions($entityType: CustomFieldEntityType = ASSET) {\n customFieldDefinitions(uiVisible: true, first: 100, entityType: $entityType) {\n edges {\n node {\n ...CustomFieldDefinition\n }\n }\n pageInfo {\n count\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment CustomFieldDefinition on CustomFieldDefinition {\n id\n translations {\n description\n title\n language\n }\n owner {\n ownerType\n }\n type\n}"): (typeof documents)["query GetCustomFieldsForAsset($entityId: String!, $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\nfragment CustomFieldValueAndDefinition on CustomFieldValueAndDefinition {\n __typename\n type\n definition {\n id\n owner {\n irisAppId\n marketplaceEntry {\n name\n }\n }\n entityType\n title\n description\n uiVisible\n uiEditable\n key\n }\n ... on BooleanFieldValueAndDefinition {\n booleanValue\n }\n ... on DateFieldValueAndDefinition {\n dateValue\n }\n ... on DropDownFieldValueAndDefinition {\n stringArrayValue\n definition {\n allValues\n multiSelect\n }\n }\n ... on EmailFieldValueAndDefinition {\n stringValue\n }\n ... on JsonFieldValueAndDefinition {\n jsonValue\n }\n ... on NumberFieldValueAndDefinition {\n numberValue(systemOfMeasurement: $systemOfMeasurement)\n definition {\n minimumNumber(systemOfMeasurement: $systemOfMeasurement)\n maximumNumber(systemOfMeasurement: $systemOfMeasurement)\n unitSi\n unitUs\n isInteger\n }\n }\n ... on MonetaryFieldValueAndDefinition {\n numberValue\n definition {\n minimumNumber\n maximumNumber\n currency\n }\n }\n ... on PhoneNumberFieldValueAndDefinition {\n stringValue\n }\n ... on StringFieldValueAndDefinition {\n stringValue\n definition {\n maximumLength\n minimumLength\n pattern\n }\n }\n ... on WebAddressFieldValueAndDefinition {\n stringValue\n }\n}\n\nquery GetCustomFieldDefinitions($entityType: CustomFieldEntityType = ASSET) {\n customFieldDefinitions(uiVisible: true, first: 100, entityType: $entityType) {\n edges {\n node {\n ...CustomFieldDefinition\n }\n }\n pageInfo {\n count\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment CustomFieldDefinition on CustomFieldDefinition {\n id\n translations {\n description\n title\n language\n }\n owner {\n ownerType\n }\n type\n}"];
|
|
36
36
|
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
|
|
37
37
|
export {};
|
|
@@ -173,7 +173,7 @@ type CustomFieldValueAndDefinition_BooleanFieldValueAndDefinition_Fragment = {
|
|
|
173
173
|
type: CustomFieldType;
|
|
174
174
|
definition: {
|
|
175
175
|
__typename?: "BooleanFieldDefinition";
|
|
176
|
-
|
|
176
|
+
id: string;
|
|
177
177
|
entityType: CustomFieldEntityType | null;
|
|
178
178
|
title: string | null;
|
|
179
179
|
description: string | null;
|
|
@@ -198,7 +198,7 @@ type CustomFieldValueAndDefinition_DateFieldValueAndDefinition_Fragment = {
|
|
|
198
198
|
type: CustomFieldType;
|
|
199
199
|
definition: {
|
|
200
200
|
__typename?: "DateFieldDefinition";
|
|
201
|
-
|
|
201
|
+
id: string;
|
|
202
202
|
entityType: CustomFieldEntityType | null;
|
|
203
203
|
title: string | null;
|
|
204
204
|
description: string | null;
|
|
@@ -225,7 +225,7 @@ type CustomFieldValueAndDefinition_DropDownFieldValueAndDefinition_Fragment = {
|
|
|
225
225
|
__typename?: "DropDownFieldDefinition";
|
|
226
226
|
allValues: Array<string> | null;
|
|
227
227
|
multiSelect: boolean | null;
|
|
228
|
-
|
|
228
|
+
id: string;
|
|
229
229
|
entityType: CustomFieldEntityType | null;
|
|
230
230
|
title: string | null;
|
|
231
231
|
description: string | null;
|
|
@@ -250,7 +250,7 @@ type CustomFieldValueAndDefinition_EmailFieldValueAndDefinition_Fragment = {
|
|
|
250
250
|
type: CustomFieldType;
|
|
251
251
|
definition: {
|
|
252
252
|
__typename?: "EmailFieldDefinition";
|
|
253
|
-
|
|
253
|
+
id: string;
|
|
254
254
|
entityType: CustomFieldEntityType | null;
|
|
255
255
|
title: string | null;
|
|
256
256
|
description: string | null;
|
|
@@ -275,7 +275,7 @@ type CustomFieldValueAndDefinition_JsonFieldValueAndDefinition_Fragment = {
|
|
|
275
275
|
type: CustomFieldType;
|
|
276
276
|
definition: {
|
|
277
277
|
__typename?: "JsonFieldDefinition";
|
|
278
|
-
|
|
278
|
+
id: string;
|
|
279
279
|
entityType: CustomFieldEntityType | null;
|
|
280
280
|
title: string | null;
|
|
281
281
|
description: string | null;
|
|
@@ -303,7 +303,7 @@ type CustomFieldValueAndDefinition_MonetaryFieldValueAndDefinition_Fragment = {
|
|
|
303
303
|
minimumNumber: number | null;
|
|
304
304
|
maximumNumber: number | null;
|
|
305
305
|
currency: string | null;
|
|
306
|
-
|
|
306
|
+
id: string;
|
|
307
307
|
entityType: CustomFieldEntityType | null;
|
|
308
308
|
title: string | null;
|
|
309
309
|
description: string | null;
|
|
@@ -333,7 +333,7 @@ type CustomFieldValueAndDefinition_NumberFieldValueAndDefinition_Fragment = {
|
|
|
333
333
|
unitSi: UnitSi | null;
|
|
334
334
|
unitUs: UnitUs | null;
|
|
335
335
|
isInteger: boolean | null;
|
|
336
|
-
|
|
336
|
+
id: string;
|
|
337
337
|
entityType: CustomFieldEntityType | null;
|
|
338
338
|
title: string | null;
|
|
339
339
|
description: string | null;
|
|
@@ -358,7 +358,7 @@ type CustomFieldValueAndDefinition_PhoneNumberFieldValueAndDefinition_Fragment =
|
|
|
358
358
|
type: CustomFieldType;
|
|
359
359
|
definition: {
|
|
360
360
|
__typename?: "PhoneNumberFieldDefinition";
|
|
361
|
-
|
|
361
|
+
id: string;
|
|
362
362
|
entityType: CustomFieldEntityType | null;
|
|
363
363
|
title: string | null;
|
|
364
364
|
description: string | null;
|
|
@@ -386,7 +386,7 @@ type CustomFieldValueAndDefinition_StringFieldValueAndDefinition_Fragment = {
|
|
|
386
386
|
maximumLength: number | null;
|
|
387
387
|
minimumLength: number | null;
|
|
388
388
|
pattern: string | null;
|
|
389
|
-
|
|
389
|
+
id: string;
|
|
390
390
|
entityType: CustomFieldEntityType | null;
|
|
391
391
|
title: string | null;
|
|
392
392
|
description: string | null;
|
|
@@ -411,7 +411,7 @@ type CustomFieldValueAndDefinition_WebAddressFieldValueAndDefinition_Fragment =
|
|
|
411
411
|
type: CustomFieldType;
|
|
412
412
|
definition: {
|
|
413
413
|
__typename?: "WebAddressFieldDefinition";
|
|
414
|
-
|
|
414
|
+
id: string;
|
|
415
415
|
entityType: CustomFieldEntityType | null;
|
|
416
416
|
title: string | null;
|
|
417
417
|
description: string | null;
|
|
@@ -432,7 +432,7 @@ type CustomFieldValueAndDefinition_WebAddressFieldValueAndDefinition_Fragment =
|
|
|
432
432
|
};
|
|
433
433
|
type CustomFieldDefinition_BooleanFieldDefinition_Fragment = {
|
|
434
434
|
__typename?: "BooleanFieldDefinition";
|
|
435
|
-
|
|
435
|
+
id: string;
|
|
436
436
|
type: CustomFieldType;
|
|
437
437
|
translations: Array<{
|
|
438
438
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -449,7 +449,7 @@ type CustomFieldDefinition_BooleanFieldDefinition_Fragment = {
|
|
|
449
449
|
};
|
|
450
450
|
type CustomFieldDefinition_DateFieldDefinition_Fragment = {
|
|
451
451
|
__typename?: "DateFieldDefinition";
|
|
452
|
-
|
|
452
|
+
id: string;
|
|
453
453
|
type: CustomFieldType;
|
|
454
454
|
translations: Array<{
|
|
455
455
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -466,7 +466,7 @@ type CustomFieldDefinition_DateFieldDefinition_Fragment = {
|
|
|
466
466
|
};
|
|
467
467
|
type CustomFieldDefinition_DropDownFieldDefinition_Fragment = {
|
|
468
468
|
__typename?: "DropDownFieldDefinition";
|
|
469
|
-
|
|
469
|
+
id: string;
|
|
470
470
|
type: CustomFieldType;
|
|
471
471
|
translations: Array<{
|
|
472
472
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -483,7 +483,7 @@ type CustomFieldDefinition_DropDownFieldDefinition_Fragment = {
|
|
|
483
483
|
};
|
|
484
484
|
type CustomFieldDefinition_EmailFieldDefinition_Fragment = {
|
|
485
485
|
__typename?: "EmailFieldDefinition";
|
|
486
|
-
|
|
486
|
+
id: string;
|
|
487
487
|
type: CustomFieldType;
|
|
488
488
|
translations: Array<{
|
|
489
489
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -500,7 +500,7 @@ type CustomFieldDefinition_EmailFieldDefinition_Fragment = {
|
|
|
500
500
|
};
|
|
501
501
|
type CustomFieldDefinition_JsonFieldDefinition_Fragment = {
|
|
502
502
|
__typename?: "JsonFieldDefinition";
|
|
503
|
-
|
|
503
|
+
id: string;
|
|
504
504
|
type: CustomFieldType;
|
|
505
505
|
translations: Array<{
|
|
506
506
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -517,7 +517,7 @@ type CustomFieldDefinition_JsonFieldDefinition_Fragment = {
|
|
|
517
517
|
};
|
|
518
518
|
type CustomFieldDefinition_MonetaryFieldDefinition_Fragment = {
|
|
519
519
|
__typename?: "MonetaryFieldDefinition";
|
|
520
|
-
|
|
520
|
+
id: string;
|
|
521
521
|
type: CustomFieldType;
|
|
522
522
|
translations: Array<{
|
|
523
523
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -534,7 +534,7 @@ type CustomFieldDefinition_MonetaryFieldDefinition_Fragment = {
|
|
|
534
534
|
};
|
|
535
535
|
type CustomFieldDefinition_NumberFieldDefinition_Fragment = {
|
|
536
536
|
__typename?: "NumberFieldDefinition";
|
|
537
|
-
|
|
537
|
+
id: string;
|
|
538
538
|
type: CustomFieldType;
|
|
539
539
|
translations: Array<{
|
|
540
540
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -551,7 +551,7 @@ type CustomFieldDefinition_NumberFieldDefinition_Fragment = {
|
|
|
551
551
|
};
|
|
552
552
|
type CustomFieldDefinition_PhoneNumberFieldDefinition_Fragment = {
|
|
553
553
|
__typename?: "PhoneNumberFieldDefinition";
|
|
554
|
-
|
|
554
|
+
id: string;
|
|
555
555
|
type: CustomFieldType;
|
|
556
556
|
translations: Array<{
|
|
557
557
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -568,7 +568,7 @@ type CustomFieldDefinition_PhoneNumberFieldDefinition_Fragment = {
|
|
|
568
568
|
};
|
|
569
569
|
type CustomFieldDefinition_StringFieldDefinition_Fragment = {
|
|
570
570
|
__typename?: "StringFieldDefinition";
|
|
571
|
-
|
|
571
|
+
id: string;
|
|
572
572
|
type: CustomFieldType;
|
|
573
573
|
translations: Array<{
|
|
574
574
|
__typename?: "CustomFieldDefinitionTranslations";
|
|
@@ -585,7 +585,7 @@ type CustomFieldDefinition_StringFieldDefinition_Fragment = {
|
|
|
585
585
|
};
|
|
586
586
|
type CustomFieldDefinition_WebAddressFieldDefinition_Fragment = {
|
|
587
587
|
__typename?: "WebAddressFieldDefinition";
|
|
588
|
-
|
|
588
|
+
id: string;
|
|
589
589
|
type: CustomFieldType;
|
|
590
590
|
translations: Array<{
|
|
591
591
|
__typename?: "CustomFieldDefinitionTranslations";
|