mdmodels-core 0.2.1 → 0.2.2
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/mdmodels-core.d.ts +93 -93
- package/mdmodels-core_bg.wasm +0 -0
- package/package.json +1 -1
package/mdmodels-core.d.ts
CHANGED
|
@@ -81,48 +81,99 @@ export enum Templates {
|
|
|
81
81
|
Julia = 19,
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* A raw key-value representation of an attribute option.
|
|
85
85
|
*
|
|
86
|
-
*
|
|
86
|
+
* This struct provides a simple string-based representation of options,
|
|
87
|
+
* which is useful for serialization/deserialization and when working
|
|
88
|
+
* with untyped data.
|
|
87
89
|
*/
|
|
88
|
-
export
|
|
90
|
+
export interface RawOption {
|
|
91
|
+
/**
|
|
92
|
+
* The key/name of the option
|
|
93
|
+
*/
|
|
94
|
+
key: string;
|
|
95
|
+
/**
|
|
96
|
+
* The string value of the option
|
|
97
|
+
*/
|
|
98
|
+
value: string;
|
|
99
|
+
}
|
|
89
100
|
|
|
90
101
|
/**
|
|
91
|
-
* Represents
|
|
102
|
+
* Represents an option for an attribute in a data model.
|
|
103
|
+
*
|
|
104
|
+
* This enum provides a strongly-typed representation of various attribute options
|
|
105
|
+
* that can be used to configure and constrain attributes in a data model.
|
|
106
|
+
*
|
|
107
|
+
* The options are grouped into several categories:
|
|
108
|
+
* - JSON Schema validation options (e.g., minimum/maximum values, length constraints)
|
|
109
|
+
* - SQL database options (e.g., primary key)
|
|
110
|
+
* - LinkML specific options (e.g., readonly, recommended)
|
|
111
|
+
* - Custom options via the `Other` variant
|
|
112
|
+
*
|
|
92
113
|
*/
|
|
93
|
-
export
|
|
114
|
+
export type AttrOption = { Example: string } | { MinimumValue: number } | { MaximumValue: number } | { MinItems: number } | { MaxItems: number } | { MinLength: number } | { MaxLength: number } | { Pattern: string } | { Unique: boolean } | { MultipleOf: number } | { ExclusiveMinimum: number } | { ExclusiveMaximum: number } | { PrimaryKey: boolean } | { ReadOnly: boolean } | { Recommended: boolean } | { Other: { key: string; value: string } };
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Represents an enumeration with a name and mappings.
|
|
118
|
+
*/
|
|
119
|
+
export interface Enumeration {
|
|
94
120
|
/**
|
|
95
|
-
*
|
|
121
|
+
* Name of the enumeration.
|
|
96
122
|
*/
|
|
97
|
-
|
|
123
|
+
name: string;
|
|
98
124
|
/**
|
|
99
|
-
*
|
|
125
|
+
* Mappings associated with the enumeration.
|
|
100
126
|
*/
|
|
101
|
-
|
|
127
|
+
mappings: Map<string, string>;
|
|
102
128
|
/**
|
|
103
|
-
*
|
|
129
|
+
* Documentation string for the enumeration.
|
|
104
130
|
*/
|
|
105
|
-
|
|
131
|
+
docstring: string;
|
|
106
132
|
/**
|
|
107
|
-
*
|
|
133
|
+
* The line number of the enumeration
|
|
108
134
|
*/
|
|
109
|
-
|
|
135
|
+
position: Position | undefined;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Represents an object with a name, attributes, docstring, and an optional term.
|
|
140
|
+
*/
|
|
141
|
+
export interface Object {
|
|
110
142
|
/**
|
|
111
|
-
*
|
|
143
|
+
* Name of the object.
|
|
112
144
|
*/
|
|
113
|
-
|
|
145
|
+
name: string;
|
|
114
146
|
/**
|
|
115
|
-
*
|
|
147
|
+
* List of attributes associated with the object.
|
|
116
148
|
*/
|
|
117
|
-
|
|
149
|
+
attributes: Attribute[];
|
|
118
150
|
/**
|
|
119
|
-
*
|
|
151
|
+
* Documentation string for the object.
|
|
120
152
|
*/
|
|
121
|
-
|
|
153
|
+
docstring: string;
|
|
122
154
|
/**
|
|
123
|
-
*
|
|
155
|
+
* Optional term associated with the object.
|
|
124
156
|
*/
|
|
125
|
-
|
|
157
|
+
term?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Parent object of the object.
|
|
160
|
+
*/
|
|
161
|
+
parent?: string;
|
|
162
|
+
/**
|
|
163
|
+
* The line number of the object
|
|
164
|
+
*/
|
|
165
|
+
position?: Position;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface PositionRange {
|
|
169
|
+
start: number;
|
|
170
|
+
end: number;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface Position {
|
|
174
|
+
line: number;
|
|
175
|
+
column: PositionRange;
|
|
176
|
+
offset: PositionRange;
|
|
126
177
|
}
|
|
127
178
|
|
|
128
179
|
export interface DataModel {
|
|
@@ -197,100 +248,49 @@ export interface Attribute {
|
|
|
197
248
|
*/
|
|
198
249
|
export type XMLType = { Attribute: { is_attr: boolean; name: string } } | { Element: { is_attr: boolean; name: string } } | { Wrapped: { is_attr: boolean; name: string; wrapped: string[] | undefined } };
|
|
199
250
|
|
|
200
|
-
export interface PositionRange {
|
|
201
|
-
start: number;
|
|
202
|
-
end: number;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface Position {
|
|
206
|
-
line: number;
|
|
207
|
-
column: PositionRange;
|
|
208
|
-
offset: PositionRange;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
251
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* This struct provides a simple string-based representation of options,
|
|
215
|
-
* which is useful for serialization/deserialization and when working
|
|
216
|
-
* with untyped data.
|
|
217
|
-
*/
|
|
218
|
-
export interface RawOption {
|
|
219
|
-
/**
|
|
220
|
-
* The key/name of the option
|
|
221
|
-
*/
|
|
222
|
-
key: string;
|
|
223
|
-
/**
|
|
224
|
-
* The string value of the option
|
|
225
|
-
*/
|
|
226
|
-
value: string;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Represents an option for an attribute in a data model.
|
|
231
|
-
*
|
|
232
|
-
* This enum provides a strongly-typed representation of various attribute options
|
|
233
|
-
* that can be used to configure and constrain attributes in a data model.
|
|
234
|
-
*
|
|
235
|
-
* The options are grouped into several categories:
|
|
236
|
-
* - JSON Schema validation options (e.g., minimum/maximum values, length constraints)
|
|
237
|
-
* - SQL database options (e.g., primary key)
|
|
238
|
-
* - LinkML specific options (e.g., readonly, recommended)
|
|
239
|
-
* - Custom options via the `Other` variant
|
|
252
|
+
* Represents different types of model imports.
|
|
240
253
|
*
|
|
254
|
+
* Can be either a remote URL or a local file path.
|
|
241
255
|
*/
|
|
242
|
-
export type
|
|
256
|
+
export type ImportType = { Remote: string } | { Local: string };
|
|
243
257
|
|
|
244
258
|
/**
|
|
245
|
-
* Represents
|
|
259
|
+
* Represents the front matter data of a markdown file.
|
|
246
260
|
*/
|
|
247
|
-
export interface
|
|
248
|
-
/**
|
|
249
|
-
* Name of the enumeration.
|
|
250
|
-
*/
|
|
251
|
-
name: string;
|
|
252
|
-
/**
|
|
253
|
-
* Mappings associated with the enumeration.
|
|
254
|
-
*/
|
|
255
|
-
mappings: Map<string, string>;
|
|
261
|
+
export interface FrontMatter {
|
|
256
262
|
/**
|
|
257
|
-
*
|
|
263
|
+
* Identifier field of the model.
|
|
258
264
|
*/
|
|
259
|
-
|
|
265
|
+
id: string | undefined;
|
|
260
266
|
/**
|
|
261
|
-
*
|
|
267
|
+
* A boolean field with a default value, renamed from `id-field`.
|
|
262
268
|
*/
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Represents an object with a name, attributes, docstring, and an optional term.
|
|
268
|
-
*/
|
|
269
|
-
export interface Object {
|
|
269
|
+
"id-field"?: boolean;
|
|
270
270
|
/**
|
|
271
|
-
*
|
|
271
|
+
* Optional hashmap of prefixes.
|
|
272
272
|
*/
|
|
273
|
-
|
|
273
|
+
prefixes: Map<string, string> | undefined;
|
|
274
274
|
/**
|
|
275
|
-
*
|
|
275
|
+
* Optional namespace map.
|
|
276
276
|
*/
|
|
277
|
-
|
|
277
|
+
nsmap: Map<string, string> | undefined;
|
|
278
278
|
/**
|
|
279
|
-
*
|
|
279
|
+
* A string field with a default value representing the repository URL.
|
|
280
280
|
*/
|
|
281
|
-
|
|
281
|
+
repo?: string;
|
|
282
282
|
/**
|
|
283
|
-
*
|
|
283
|
+
* A string field with a default value representing the prefix.
|
|
284
284
|
*/
|
|
285
|
-
|
|
285
|
+
prefix?: string;
|
|
286
286
|
/**
|
|
287
|
-
*
|
|
287
|
+
* Import remote or local models.
|
|
288
288
|
*/
|
|
289
|
-
|
|
289
|
+
imports?: Map<string, ImportType>;
|
|
290
290
|
/**
|
|
291
|
-
*
|
|
291
|
+
* Allow empty models.
|
|
292
292
|
*/
|
|
293
|
-
|
|
293
|
+
"allow-empty"?: boolean;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
/**
|
package/mdmodels-core_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED