@postxl/schema 1.2.1 → 1.3.1
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/dist/field/defaults.d.ts +3 -0
- package/dist/field/defaults.js +5 -1
- package/dist/model/model.json-decoder.d.ts +1 -0
- package/dist/model/model.json-decoder.js +6 -0
- package/dist/model/model.transformer.d.ts +5 -1
- package/dist/model/model.transformer.js +2 -1
- package/dist/model/model.types.d.ts +7 -0
- package/dist/project-schema/project-schema.json-decoder.d.ts +1 -0
- package/dist/project-schema/project-schema.transformer.d.ts +2 -0
- package/dist/project-schema/project-schema.transformer.js +53 -1
- package/dist/samples/portfolex.schema.json +6 -3
- package/dist/samples/sample-schemas.d.ts +45 -184
- package/dist/samples/steerex.schema.json +697 -4356
- package/package.json +2 -2
package/dist/field/defaults.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export declare const standardFieldName_createdAt: string & import("zod").$brand<
|
|
|
5
5
|
export declare const standardFieldName_updatedAt: string & import("zod").$brand<"PXL.FieldName">;
|
|
6
6
|
export declare const standardFieldName_name: string & import("zod").$brand<"PXL.FieldName">;
|
|
7
7
|
export declare const standardFieldName_label: string & import("zod").$brand<"PXL.FieldName">;
|
|
8
|
+
export declare const standardFieldName_key: string & import("zod").$brand<"PXL.FieldName">;
|
|
9
|
+
export declare const standardFieldName_excelKey: string & import("zod").$brand<"PXL.FieldName">;
|
|
10
|
+
export declare const standardFieldName_slug: string & import("zod").$brand<"PXL.FieldName">;
|
|
8
11
|
export declare const standardFieldNames: (string & import("zod").$brand<"PXL.FieldName">)[];
|
|
9
12
|
export declare const standardField_id: FieldJSONInput;
|
|
10
13
|
export declare const standardField_createdAt: FieldJSONInput;
|
package/dist/field/defaults.js
CHANGED
|
@@ -33,13 +33,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.standardFields = exports.standardField_name = exports.standardField_updatedAt = exports.standardField_createdAt = exports.standardField_id = exports.standardFieldNames = exports.standardFieldName_label = exports.standardFieldName_name = exports.standardFieldName_updatedAt = exports.standardFieldName_createdAt = exports.standardFieldName_id = void 0;
|
|
36
|
+
exports.standardFields = exports.standardField_name = exports.standardField_updatedAt = exports.standardField_createdAt = exports.standardField_id = exports.standardFieldNames = exports.standardFieldName_slug = exports.standardFieldName_excelKey = exports.standardFieldName_key = exports.standardFieldName_label = exports.standardFieldName_name = exports.standardFieldName_updatedAt = exports.standardFieldName_createdAt = exports.standardFieldName_id = void 0;
|
|
37
37
|
const Branded = __importStar(require("./shared/brands"));
|
|
38
38
|
exports.standardFieldName_id = Branded.toFieldIdName('id');
|
|
39
39
|
exports.standardFieldName_createdAt = Branded.toFieldName('createdAt');
|
|
40
40
|
exports.standardFieldName_updatedAt = Branded.toFieldName('updatedAt');
|
|
41
41
|
exports.standardFieldName_name = Branded.toFieldName('name');
|
|
42
42
|
exports.standardFieldName_label = Branded.toFieldName('label');
|
|
43
|
+
// Field names used as fallback for keyField resolution (in order: key, excelKey, slug, id)
|
|
44
|
+
exports.standardFieldName_key = Branded.toFieldName('key');
|
|
45
|
+
exports.standardFieldName_excelKey = Branded.toFieldName('excelKey');
|
|
46
|
+
exports.standardFieldName_slug = Branded.toFieldName('slug');
|
|
43
47
|
exports.standardFieldNames = [
|
|
44
48
|
exports.standardFieldName_id,
|
|
45
49
|
exports.standardFieldName_createdAt,
|
|
@@ -13,6 +13,7 @@ export declare const zModelJSON: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.Z
|
|
|
13
13
|
standardFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
14
|
defaultField: z.ZodOptional<z.ZodString>;
|
|
15
15
|
labelField: z.ZodOptional<z.ZodString>;
|
|
16
|
+
keyField: z.ZodOptional<z.ZodString>;
|
|
16
17
|
indexes: z.ZodOptional<z.ZodArray<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PXL.FieldName", "out">>>>;
|
|
17
18
|
seed: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
18
19
|
source: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -80,6 +80,12 @@ Example use case: default language, root region in region tree.`),
|
|
|
80
80
|
.string()
|
|
81
81
|
.optional().describe(`The name of the field that is used in the UI as the label of the entity.
|
|
82
82
|
The label field must be a string field. If not provided, the \`name\` field is used as the label.`),
|
|
83
|
+
keyField: zod_1.z
|
|
84
|
+
//
|
|
85
|
+
.string()
|
|
86
|
+
.optional().describe(`The name of the field that is used as the key (unique identifier) for the entity.
|
|
87
|
+
The key field must be a scalar string field. If not provided, the fallback order is: \`key\`, \`excelKey\`, \`slug\`, then \`id\`.
|
|
88
|
+
The key field is used in navigation, Excel import, and other places where a human-readable identifier is needed.`),
|
|
83
89
|
indexes: zod_1.z
|
|
84
90
|
//
|
|
85
91
|
.array(zod_1.z.array(brands_1.zFieldName).min(2, { error: 'Index must have at least 2 fields' }))
|
|
@@ -11,6 +11,7 @@ export declare function modelJSONTransformer(input: ModelJSON, ctx: z.Refinement
|
|
|
11
11
|
databaseName: string & z.core.$brand<"PXL.DatabaseModelName">;
|
|
12
12
|
defaultFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
13
13
|
labelFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
14
|
+
keyFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
14
15
|
isReadonly: boolean;
|
|
15
16
|
excelName: string;
|
|
16
17
|
description: string;
|
|
@@ -43,16 +44,18 @@ declare function addDefaults({ description, fields, standardFields, seed, faker,
|
|
|
43
44
|
schema?: string | undefined;
|
|
44
45
|
defaultField?: string | undefined;
|
|
45
46
|
labelField?: string | undefined;
|
|
47
|
+
keyField?: string | undefined;
|
|
46
48
|
source?: Record<string, unknown> | undefined;
|
|
47
49
|
};
|
|
48
50
|
type WithDefaults = ReturnType<typeof addDefaults>;
|
|
49
|
-
declare function brandModel({ name, schema, databaseName, standardFields, defaultField, labelField, ...input }: WithDefaults): {
|
|
51
|
+
declare function brandModel({ name, schema, databaseName, standardFields, defaultField, labelField, keyField, ...input }: WithDefaults): {
|
|
50
52
|
name: string & z.core.$brand<"PXL.ModelName">;
|
|
51
53
|
schema: (string & z.core.$brand<"PXL.DatabaseSchemaName">) | undefined;
|
|
52
54
|
databaseName: string & z.core.$brand<"PXL.DatabaseModelName">;
|
|
53
55
|
standardFields: (string & z.core.$brand<"PXL.FieldName">)[];
|
|
54
56
|
defaultFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
55
57
|
labelFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
58
|
+
keyFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
56
59
|
isReadonly: boolean;
|
|
57
60
|
excelName: string;
|
|
58
61
|
description: string;
|
|
@@ -80,6 +83,7 @@ declare function combineFields({ fields, standardFields, ...model }: BrandedMode
|
|
|
80
83
|
databaseName: string & z.core.$brand<"PXL.DatabaseModelName">;
|
|
81
84
|
defaultFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
82
85
|
labelFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
86
|
+
keyFieldName: (string & z.core.$brand<"PXL.FieldName">) | undefined;
|
|
83
87
|
isReadonly: boolean;
|
|
84
88
|
excelName: string;
|
|
85
89
|
description: string;
|
|
@@ -65,7 +65,7 @@ function addDefaults({ description, fields, standardFields, seed, faker, ...inpu
|
|
|
65
65
|
},
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function brandModel({ name, schema, databaseName, standardFields, defaultField, labelField, ...input }) {
|
|
68
|
+
function brandModel({ name, schema, databaseName, standardFields, defaultField, labelField, keyField, ...input }) {
|
|
69
69
|
return {
|
|
70
70
|
...input,
|
|
71
71
|
name: (0, model_brands_1.toModelName)(name),
|
|
@@ -74,6 +74,7 @@ function brandModel({ name, schema, databaseName, standardFields, defaultField,
|
|
|
74
74
|
standardFields: standardFields.map((f) => Field.toFieldName(f)),
|
|
75
75
|
defaultFieldName: defaultField ? Field.toFieldName(defaultField) : undefined,
|
|
76
76
|
labelFieldName: labelField ? Field.toFieldName(labelField) : undefined,
|
|
77
|
+
keyFieldName: keyField ? Field.toFieldName(keyField) : undefined,
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
80
|
function combineFields({ fields, standardFields, ...model }, ctx) {
|
|
@@ -13,6 +13,13 @@ export type Model = {
|
|
|
13
13
|
idField: Field.FieldId;
|
|
14
14
|
defaultField: Field.FieldDatabaseNative | undefined;
|
|
15
15
|
labelField: Field.FieldDatabaseNative;
|
|
16
|
+
/**
|
|
17
|
+
* The field used as the key/unique identifier for the entity.
|
|
18
|
+
* Used in navigation, Excel import, and other places where a human-readable identifier is needed.
|
|
19
|
+
* Must be a scalar string field. Resolved from: explicit keyField, or fallback to key, excelKey, slug, id (in that order).
|
|
20
|
+
* Always defined since id field is always present.
|
|
21
|
+
*/
|
|
22
|
+
keyField: Field.FieldDatabaseNative;
|
|
16
23
|
indexes: ModelIndex[];
|
|
17
24
|
seed: Seed[];
|
|
18
25
|
/**
|
|
@@ -23,6 +23,7 @@ export declare const zProjectSchemaJSON: z.ZodPipe<z.ZodTransform<unknown, unkno
|
|
|
23
23
|
standardFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
24
|
defaultField: z.ZodOptional<z.ZodString>;
|
|
25
25
|
labelField: z.ZodOptional<z.ZodString>;
|
|
26
|
+
keyField: z.ZodOptional<z.ZodString>;
|
|
26
27
|
indexes: z.ZodOptional<z.ZodArray<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PXL.FieldName", "out">>>>;
|
|
27
28
|
seed: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
28
29
|
source: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -28,6 +28,7 @@ export declare const zProjectSchema: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown,
|
|
|
28
28
|
standardFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
29
|
defaultField: z.ZodOptional<z.ZodString>;
|
|
30
30
|
labelField: z.ZodOptional<z.ZodString>;
|
|
31
|
+
keyField: z.ZodOptional<z.ZodString>;
|
|
31
32
|
indexes: z.ZodOptional<z.ZodArray<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PXL.FieldName", "out">>>>;
|
|
32
33
|
seed: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
33
34
|
source: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -73,6 +74,7 @@ export declare const zProjectSchema: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown,
|
|
|
73
74
|
standardFields?: string[] | undefined;
|
|
74
75
|
defaultField?: string | undefined;
|
|
75
76
|
labelField?: string | undefined;
|
|
77
|
+
keyField?: string | undefined;
|
|
76
78
|
indexes?: (string & z.core.$brand<"PXL.FieldName">)[][] | undefined;
|
|
77
79
|
seed?: any[] | undefined;
|
|
78
80
|
source?: Record<string, unknown> | undefined;
|
|
@@ -270,13 +270,15 @@ function transformModel(model, projectSchema, ctx) {
|
|
|
270
270
|
const idField = extractIdField(fields, model, ctx);
|
|
271
271
|
const defaultField = extractDefaultField(model, fields, ctx);
|
|
272
272
|
const labelField = extractLabelField(model, fields, ctx);
|
|
273
|
-
const
|
|
273
|
+
const keyField = extractKeyField(model, fields, idField, ctx);
|
|
274
|
+
const { defaultFieldName, labelFieldName, keyFieldName, ...remainingModel } = model;
|
|
274
275
|
return {
|
|
275
276
|
...remainingModel,
|
|
276
277
|
databaseSchema: model.schema ?? projectSchema.defaultDatabaseSchema,
|
|
277
278
|
fields,
|
|
278
279
|
defaultField,
|
|
279
280
|
labelField,
|
|
281
|
+
keyField,
|
|
280
282
|
idField,
|
|
281
283
|
};
|
|
282
284
|
}
|
|
@@ -444,3 +446,53 @@ function extractLabelFieldFromNameOrIdField({ name }, fields, ctx) {
|
|
|
444
446
|
}
|
|
445
447
|
return fallbackField;
|
|
446
448
|
}
|
|
449
|
+
function extractKeyField({ keyFieldName, ...model }, fields, idField, ctx) {
|
|
450
|
+
if (keyFieldName === undefined) {
|
|
451
|
+
return extractKeyFieldFromFallbacks(fields, idField);
|
|
452
|
+
}
|
|
453
|
+
const keyField = fields.get(keyFieldName);
|
|
454
|
+
if (keyField === undefined) {
|
|
455
|
+
ctx.addIssue({
|
|
456
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
457
|
+
message: `Key field ${keyFieldName} is not defined in model ${model.name}!`,
|
|
458
|
+
});
|
|
459
|
+
return zod_1.z.NEVER;
|
|
460
|
+
}
|
|
461
|
+
if (keyField.kind !== 'scalar' && keyField.kind !== 'id') {
|
|
462
|
+
ctx.addIssue({
|
|
463
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
464
|
+
message: `Key field ${keyFieldName} in model ${model.name} must be a scalar string field, but instead is of type ${Field.getFieldType(keyField)}!`,
|
|
465
|
+
});
|
|
466
|
+
return zod_1.z.NEVER;
|
|
467
|
+
}
|
|
468
|
+
const type = keyField.kind === 'scalar' ? keyField.type : keyField.unbrandedTypeName;
|
|
469
|
+
if (type !== 'string') {
|
|
470
|
+
ctx.addIssue({
|
|
471
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
472
|
+
message: `Key field ${keyFieldName} in model ${model.name} must be of type \`string\`, but instead is of type ${type}!`,
|
|
473
|
+
});
|
|
474
|
+
return zod_1.z.NEVER;
|
|
475
|
+
}
|
|
476
|
+
return keyField;
|
|
477
|
+
}
|
|
478
|
+
function extractKeyFieldFromFallbacks(fields, idField) {
|
|
479
|
+
// Fallback order: key, excelKey, slug, id
|
|
480
|
+
// Only consider string scalar fields for the fallbacks (except id which is always string)
|
|
481
|
+
const keyField = fields.get(Field.standardFieldName_key);
|
|
482
|
+
if (keyField !== undefined && isStringScalarField(keyField)) {
|
|
483
|
+
return keyField;
|
|
484
|
+
}
|
|
485
|
+
const excelKeyField = fields.get(Field.standardFieldName_excelKey);
|
|
486
|
+
if (excelKeyField !== undefined && isStringScalarField(excelKeyField)) {
|
|
487
|
+
return excelKeyField;
|
|
488
|
+
}
|
|
489
|
+
const slugField = fields.get(Field.standardFieldName_slug);
|
|
490
|
+
if (slugField !== undefined && isStringScalarField(slugField)) {
|
|
491
|
+
return slugField;
|
|
492
|
+
}
|
|
493
|
+
// id field is always present and is always a string
|
|
494
|
+
return idField;
|
|
495
|
+
}
|
|
496
|
+
function isStringScalarField(field) {
|
|
497
|
+
return field.kind === 'scalar' && field.type === 'string';
|
|
498
|
+
}
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
{ "name": "target", "excelName": "target", "type": "String", "label": "Target" },
|
|
57
57
|
{ "name": "isotope", "excelName": "isotope", "type": "String", "label": "Isotope" },
|
|
58
58
|
{ "name": "txDx", "excelName": "txDx", "type": "String", "label": "TxDx" },
|
|
59
|
-
{ "name": "indicationId", "excelName": "indication", "type": "Indication", "label": "Indication" }
|
|
59
|
+
{ "name": "indicationId", "excelName": "indication", "type": "Indication", "label": "Indication" },
|
|
60
|
+
{ "name": "color", "excelName": "color", "type": "String?", "label": "Color" }
|
|
60
61
|
],
|
|
61
62
|
"standardFields": [],
|
|
62
63
|
"seed": [
|
|
@@ -257,7 +258,8 @@
|
|
|
257
258
|
{ "name": "fteRegulatory", "excelName": "fteRegulatory", "type": "Float?", "label": "FTE Regulatory" },
|
|
258
259
|
{ "name": "fteCmc", "excelName": "fteCmc", "type": "Float?", "label": "FTE CMC" },
|
|
259
260
|
{ "name": "isEvent", "excelName": "isEvent", "type": "Boolean", "label": "Is Event?" },
|
|
260
|
-
{ "name": "successorMask", "excelName": "successorMask", "type": "Int", "label": "Successor Mask" }
|
|
261
|
+
{ "name": "successorMask", "excelName": "successorMask", "type": "Int", "label": "Successor Mask" },
|
|
262
|
+
{ "name": "color", "excelName": "color", "type": "String?", "label": "Color" }
|
|
261
263
|
],
|
|
262
264
|
"standardFields": [],
|
|
263
265
|
"seed": [
|
|
@@ -288,7 +290,8 @@
|
|
|
288
290
|
"schema": "Data",
|
|
289
291
|
"fields": [
|
|
290
292
|
{ "name": "id", "excelName": "indication", "type": "String", "label": "Indication" },
|
|
291
|
-
{ "name": "abbreviation", "excelName": "abbreviation", "type": "String", "label": "Abbreviation" }
|
|
293
|
+
{ "name": "abbreviation", "excelName": "abbreviation", "type": "String", "label": "Abbreviation" },
|
|
294
|
+
{ "name": "color", "excelName": "color", "type": "String?", "label": "Color" }
|
|
292
295
|
],
|
|
293
296
|
"standardFields": [],
|
|
294
297
|
"seed": [
|
|
@@ -1056,27 +1056,22 @@ export declare const sampleSchemas: {
|
|
|
1056
1056
|
type: string;
|
|
1057
1057
|
label: string;
|
|
1058
1058
|
description: string;
|
|
1059
|
-
isUnique
|
|
1059
|
+
isUnique: boolean;
|
|
1060
1060
|
} | {
|
|
1061
1061
|
name: string;
|
|
1062
1062
|
type: string;
|
|
1063
1063
|
label: string;
|
|
1064
1064
|
description: string;
|
|
1065
|
-
isUnique
|
|
1066
|
-
})[];
|
|
1067
|
-
standardFields: string[];
|
|
1068
|
-
labelField: string;
|
|
1069
|
-
seed: ({
|
|
1070
|
-
id: string;
|
|
1071
|
-
name: string;
|
|
1072
|
-
code: string;
|
|
1073
|
-
parentId: null;
|
|
1065
|
+
isUnique?: never;
|
|
1074
1066
|
} | {
|
|
1075
|
-
id: string;
|
|
1076
1067
|
name: string;
|
|
1077
|
-
|
|
1078
|
-
|
|
1068
|
+
type: string;
|
|
1069
|
+
label: string;
|
|
1070
|
+
description?: never;
|
|
1071
|
+
isUnique?: never;
|
|
1079
1072
|
})[];
|
|
1073
|
+
standardFields?: never;
|
|
1074
|
+
labelField?: never;
|
|
1080
1075
|
} | {
|
|
1081
1076
|
name: string;
|
|
1082
1077
|
description: string;
|
|
@@ -1084,119 +1079,50 @@ export declare const sampleSchemas: {
|
|
|
1084
1079
|
fields: ({
|
|
1085
1080
|
name: string;
|
|
1086
1081
|
type: string;
|
|
1087
|
-
label
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
isUnique?: never;
|
|
1091
|
-
} | {
|
|
1092
|
-
name: string;
|
|
1093
|
-
type: string;
|
|
1094
|
-
label: string;
|
|
1095
|
-
description: string;
|
|
1096
|
-
faker?: never;
|
|
1097
|
-
isUnique?: never;
|
|
1082
|
+
label?: never;
|
|
1083
|
+
commonFields?: never;
|
|
1084
|
+
members?: never;
|
|
1098
1085
|
} | {
|
|
1099
1086
|
name: string;
|
|
1100
1087
|
type: string;
|
|
1101
1088
|
label: string;
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1089
|
+
commonFields: never[];
|
|
1090
|
+
members: {
|
|
1091
|
+
type: string;
|
|
1092
|
+
label: string;
|
|
1093
|
+
fields: {
|
|
1094
|
+
name: string;
|
|
1095
|
+
type: string;
|
|
1096
|
+
}[];
|
|
1097
|
+
}[];
|
|
1105
1098
|
})[];
|
|
1106
|
-
standardFields
|
|
1107
|
-
labelField
|
|
1108
|
-
seed: {
|
|
1109
|
-
id: string;
|
|
1110
|
-
name: string;
|
|
1111
|
-
email: string;
|
|
1112
|
-
role: string;
|
|
1113
|
-
hierarchyId: string;
|
|
1114
|
-
}[];
|
|
1099
|
+
standardFields?: never;
|
|
1100
|
+
labelField?: never;
|
|
1115
1101
|
} | {
|
|
1116
1102
|
name: string;
|
|
1117
1103
|
description: string;
|
|
1118
1104
|
schema: string;
|
|
1119
|
-
|
|
1105
|
+
standardFields: string[];
|
|
1106
|
+
fields: {
|
|
1120
1107
|
name: string;
|
|
1121
1108
|
type: string;
|
|
1122
1109
|
label: string;
|
|
1123
1110
|
description: string;
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1111
|
+
}[];
|
|
1112
|
+
labelField?: never;
|
|
1113
|
+
} | {
|
|
1114
|
+
name: string;
|
|
1115
|
+
description: string;
|
|
1116
|
+
schema: string;
|
|
1117
|
+
fields: {
|
|
1129
1118
|
name: string;
|
|
1130
1119
|
type: string;
|
|
1131
1120
|
label: string;
|
|
1132
1121
|
description: string;
|
|
1133
1122
|
isUnique: boolean;
|
|
1134
|
-
|
|
1135
|
-
prismaRelationFieldName?: never;
|
|
1136
|
-
seed?: never;
|
|
1137
|
-
} | {
|
|
1138
|
-
name: string;
|
|
1139
|
-
type: string;
|
|
1140
|
-
label: string;
|
|
1141
|
-
description: string;
|
|
1142
|
-
faker?: never;
|
|
1143
|
-
isUnique?: never;
|
|
1144
|
-
prismaRelationFieldName?: never;
|
|
1145
|
-
seed?: never;
|
|
1146
|
-
} | {
|
|
1147
|
-
name: string;
|
|
1148
|
-
type: string;
|
|
1149
|
-
label: string;
|
|
1150
|
-
description: string;
|
|
1151
|
-
prismaRelationFieldName: string;
|
|
1152
|
-
faker?: never;
|
|
1153
|
-
isUnique?: never;
|
|
1154
|
-
seed?: never;
|
|
1155
|
-
} | {
|
|
1156
|
-
name: string;
|
|
1157
|
-
type: string;
|
|
1158
|
-
label: string;
|
|
1159
|
-
description: string;
|
|
1160
|
-
seed: boolean;
|
|
1161
|
-
faker?: never;
|
|
1162
|
-
isUnique?: never;
|
|
1163
|
-
prismaRelationFieldName?: never;
|
|
1164
|
-
})[];
|
|
1123
|
+
}[];
|
|
1165
1124
|
standardFields: string[];
|
|
1166
|
-
labelField
|
|
1167
|
-
seed: ({
|
|
1168
|
-
id: string;
|
|
1169
|
-
title: string;
|
|
1170
|
-
code: string;
|
|
1171
|
-
description: string;
|
|
1172
|
-
hierarchyId: string;
|
|
1173
|
-
ownerId: string;
|
|
1174
|
-
responsibleId: string;
|
|
1175
|
-
startDate: string;
|
|
1176
|
-
endDate: string;
|
|
1177
|
-
isManagementAttentionNeeded: boolean;
|
|
1178
|
-
trafficLight: string;
|
|
1179
|
-
approvalStatus: string;
|
|
1180
|
-
targetSavings: number;
|
|
1181
|
-
targetDate: string;
|
|
1182
|
-
notes: string;
|
|
1183
|
-
} | {
|
|
1184
|
-
id: string;
|
|
1185
|
-
title: string;
|
|
1186
|
-
code: string;
|
|
1187
|
-
description: string;
|
|
1188
|
-
hierarchyId: string;
|
|
1189
|
-
ownerId: string;
|
|
1190
|
-
responsibleId: string;
|
|
1191
|
-
startDate: string;
|
|
1192
|
-
endDate: string;
|
|
1193
|
-
isManagementAttentionNeeded: boolean;
|
|
1194
|
-
trafficLight: string;
|
|
1195
|
-
approvalStatus: string;
|
|
1196
|
-
targetSavings: null;
|
|
1197
|
-
targetDate: string;
|
|
1198
|
-
notes: string;
|
|
1199
|
-
})[];
|
|
1125
|
+
labelField?: never;
|
|
1200
1126
|
} | {
|
|
1201
1127
|
name: string;
|
|
1202
1128
|
description: string;
|
|
@@ -1206,62 +1132,32 @@ export declare const sampleSchemas: {
|
|
|
1206
1132
|
type: string;
|
|
1207
1133
|
label: string;
|
|
1208
1134
|
description: string;
|
|
1209
|
-
faker: string;
|
|
1210
1135
|
prismaRelationFieldName?: never;
|
|
1136
|
+
excelName?: never;
|
|
1211
1137
|
} | {
|
|
1212
1138
|
name: string;
|
|
1213
1139
|
type: string;
|
|
1214
1140
|
label: string;
|
|
1141
|
+
prismaRelationFieldName: string;
|
|
1215
1142
|
description: string;
|
|
1216
|
-
|
|
1217
|
-
prismaRelationFieldName?: never;
|
|
1143
|
+
excelName?: never;
|
|
1218
1144
|
} | {
|
|
1219
1145
|
name: string;
|
|
1220
1146
|
type: string;
|
|
1221
1147
|
label: string;
|
|
1148
|
+
excelName: string;
|
|
1222
1149
|
description: string;
|
|
1223
|
-
prismaRelationFieldName
|
|
1224
|
-
faker?: never;
|
|
1225
|
-
})[];
|
|
1226
|
-
standardFields: string[];
|
|
1227
|
-
labelField: string;
|
|
1228
|
-
seed: ({
|
|
1229
|
-
id: string;
|
|
1230
|
-
title: string;
|
|
1231
|
-
description: string;
|
|
1232
|
-
initiativeId: string;
|
|
1233
|
-
indicatorId: null;
|
|
1234
|
-
responsibleId: string;
|
|
1235
|
-
status: string;
|
|
1236
|
-
deadline: string;
|
|
1150
|
+
prismaRelationFieldName?: never;
|
|
1237
1151
|
} | {
|
|
1238
|
-
id: string;
|
|
1239
|
-
title: string;
|
|
1240
|
-
description: string;
|
|
1241
|
-
initiativeId: string;
|
|
1242
|
-
indicatorId: string;
|
|
1243
|
-
responsibleId: string;
|
|
1244
|
-
status: string;
|
|
1245
|
-
deadline: string;
|
|
1246
|
-
})[];
|
|
1247
|
-
} | {
|
|
1248
|
-
name: string;
|
|
1249
|
-
description: string;
|
|
1250
|
-
schema: string;
|
|
1251
|
-
fields: {
|
|
1252
1152
|
name: string;
|
|
1253
1153
|
type: string;
|
|
1254
1154
|
label: string;
|
|
1155
|
+
excelName: string;
|
|
1156
|
+
prismaRelationFieldName: string;
|
|
1255
1157
|
description: string;
|
|
1256
|
-
}[];
|
|
1257
|
-
standardFields
|
|
1258
|
-
labelField
|
|
1259
|
-
seed: {
|
|
1260
|
-
id: string;
|
|
1261
|
-
name: string;
|
|
1262
|
-
unit: string;
|
|
1263
|
-
numberFormat: string;
|
|
1264
|
-
}[];
|
|
1158
|
+
})[];
|
|
1159
|
+
standardFields?: never;
|
|
1160
|
+
labelField?: never;
|
|
1265
1161
|
} | {
|
|
1266
1162
|
name: string;
|
|
1267
1163
|
description: string;
|
|
@@ -1271,51 +1167,16 @@ export declare const sampleSchemas: {
|
|
|
1271
1167
|
type: string;
|
|
1272
1168
|
label: string;
|
|
1273
1169
|
description: string;
|
|
1274
|
-
|
|
1170
|
+
isUnique?: never;
|
|
1275
1171
|
} | {
|
|
1276
1172
|
name: string;
|
|
1277
1173
|
type: string;
|
|
1278
1174
|
label: string;
|
|
1279
1175
|
description: string;
|
|
1280
|
-
|
|
1176
|
+
isUnique: boolean;
|
|
1281
1177
|
})[];
|
|
1282
1178
|
standardFields: string[];
|
|
1283
1179
|
labelField: string;
|
|
1284
|
-
seed: {
|
|
1285
|
-
id: string;
|
|
1286
|
-
name: string;
|
|
1287
|
-
startDate: string;
|
|
1288
|
-
endDate: string;
|
|
1289
|
-
}[];
|
|
1290
|
-
} | {
|
|
1291
|
-
name: string;
|
|
1292
|
-
description: string;
|
|
1293
|
-
schema: string;
|
|
1294
|
-
fields: {
|
|
1295
|
-
name: string;
|
|
1296
|
-
type: string;
|
|
1297
|
-
label: string;
|
|
1298
|
-
description: string;
|
|
1299
|
-
}[];
|
|
1300
|
-
standardFields: string[];
|
|
1301
|
-
seed: ({
|
|
1302
|
-
id: string;
|
|
1303
|
-
indicatorId: string;
|
|
1304
|
-
initiativeId: string;
|
|
1305
|
-
periodId: string;
|
|
1306
|
-
valueActual: number;
|
|
1307
|
-
valueForecast: null;
|
|
1308
|
-
valueBudget: number;
|
|
1309
|
-
} | {
|
|
1310
|
-
id: string;
|
|
1311
|
-
indicatorId: string;
|
|
1312
|
-
initiativeId: string;
|
|
1313
|
-
periodId: string;
|
|
1314
|
-
valueActual: null;
|
|
1315
|
-
valueForecast: null;
|
|
1316
|
-
valueBudget: number;
|
|
1317
|
-
})[];
|
|
1318
|
-
labelField?: never;
|
|
1319
1180
|
})[];
|
|
1320
1181
|
enums: {
|
|
1321
1182
|
name: string;
|