@yanqirenshi/model.tm 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +143 -2
- package/dist/check.d.ts +18 -0
- package/dist/check.d.ts.map +1 -0
- package/dist/check.js +107 -0
- package/dist/cjs/check.js +111 -0
- package/dist/cjs/defaults.js +145 -0
- package/dist/cjs/fields.js +77 -0
- package/dist/cjs/index.js +55 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/patch.js +274 -0
- package/dist/cjs/schema.js +179 -0
- package/dist/cjs/types.js +8 -0
- package/dist/defaults.d.ts +67 -0
- package/dist/defaults.d.ts.map +1 -0
- package/dist/defaults.js +133 -0
- package/dist/fields.d.ts +19 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +72 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/patch.d.ts +31 -0
- package/dist/patch.d.ts.map +1 -0
- package/dist/patch.js +264 -0
- package/dist/schema.d.ts +768 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +176 -0
- package/dist/types.d.ts +140 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/package.json +54 -5
- package/src/check.ts +137 -0
- package/src/defaults.ts +172 -0
- package/src/fields.ts +82 -0
- package/src/index.ts +30 -0
- package/src/patch.ts +338 -0
- package/src/schema.ts +194 -0
- package/src/types.ts +165 -0
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,768 @@
|
|
|
1
|
+
export declare const IDENTIFIERS_SCHEMA: {
|
|
2
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly 'x-id-start': number;
|
|
6
|
+
readonly type: "array";
|
|
7
|
+
readonly items: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly id: {
|
|
11
|
+
readonly type: readonly ["integer", "string"];
|
|
12
|
+
};
|
|
13
|
+
readonly name: {
|
|
14
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
15
|
+
readonly oneOf: readonly [{
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "object";
|
|
19
|
+
readonly properties: {
|
|
20
|
+
readonly logical: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
};
|
|
23
|
+
readonly physical: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
};
|
|
26
|
+
readonly description: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly additionalProperties: true;
|
|
31
|
+
}];
|
|
32
|
+
};
|
|
33
|
+
readonly description: {
|
|
34
|
+
readonly type: readonly ["string", "null"];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly required: readonly ["id", "name"];
|
|
38
|
+
readonly additionalProperties: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export declare const ATTRIBUTES_SCHEMA: {
|
|
42
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
43
|
+
readonly title: string;
|
|
44
|
+
readonly description: string;
|
|
45
|
+
readonly 'x-id-start': number;
|
|
46
|
+
readonly type: "array";
|
|
47
|
+
readonly items: {
|
|
48
|
+
readonly type: "object";
|
|
49
|
+
readonly properties: {
|
|
50
|
+
readonly id: {
|
|
51
|
+
readonly type: readonly ["integer", "string"];
|
|
52
|
+
};
|
|
53
|
+
readonly name: {
|
|
54
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
55
|
+
readonly oneOf: readonly [{
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
}, {
|
|
58
|
+
readonly type: "object";
|
|
59
|
+
readonly properties: {
|
|
60
|
+
readonly logical: {
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
};
|
|
63
|
+
readonly physical: {
|
|
64
|
+
readonly type: "string";
|
|
65
|
+
};
|
|
66
|
+
readonly description: {
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly additionalProperties: true;
|
|
71
|
+
}];
|
|
72
|
+
};
|
|
73
|
+
readonly description: {
|
|
74
|
+
readonly type: readonly ["string", "null"];
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly required: readonly ["id", "name"];
|
|
78
|
+
readonly additionalProperties: true;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export declare const ENTITIES_SCHEMA: {
|
|
82
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
83
|
+
readonly title: "TM のエンティティ";
|
|
84
|
+
readonly description: "TM (T字形ER) のエンティティ。type は 10 種の種別 (これ以外は d3.ter が描画時に例外にする)。識別子・属性はマスタの id を参照するインスタンスとして持ち、インスタンスの id は全エンティティを通して一意 (関係の details がこれを指す)。name は文字列か論理名・物理名の組。position はドラッグで書き換わる。size の w / h が 0 のときは内容に合わせる。";
|
|
85
|
+
readonly 'x-id-start': 30000;
|
|
86
|
+
readonly type: "array";
|
|
87
|
+
readonly items: {
|
|
88
|
+
readonly type: "object";
|
|
89
|
+
readonly properties: {
|
|
90
|
+
readonly id: {
|
|
91
|
+
readonly type: readonly ["integer", "string"];
|
|
92
|
+
};
|
|
93
|
+
readonly type: {
|
|
94
|
+
readonly enum: readonly import("./types.js").TmEntityType[];
|
|
95
|
+
};
|
|
96
|
+
readonly name: {
|
|
97
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
98
|
+
readonly oneOf: readonly [{
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
}, {
|
|
101
|
+
readonly type: "object";
|
|
102
|
+
readonly properties: {
|
|
103
|
+
readonly logical: {
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
};
|
|
106
|
+
readonly physical: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
readonly description: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
readonly additionalProperties: true;
|
|
114
|
+
}];
|
|
115
|
+
};
|
|
116
|
+
readonly description: {
|
|
117
|
+
readonly type: readonly ["string", "null"];
|
|
118
|
+
};
|
|
119
|
+
readonly position: {
|
|
120
|
+
readonly type: "object";
|
|
121
|
+
readonly properties: {
|
|
122
|
+
readonly x: {
|
|
123
|
+
readonly type: "number";
|
|
124
|
+
};
|
|
125
|
+
readonly y: {
|
|
126
|
+
readonly type: "number";
|
|
127
|
+
};
|
|
128
|
+
readonly z: {
|
|
129
|
+
readonly type: "number";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
readonly required: readonly ["x", "y"];
|
|
133
|
+
readonly additionalProperties: false;
|
|
134
|
+
};
|
|
135
|
+
readonly size: {
|
|
136
|
+
readonly type: "object";
|
|
137
|
+
readonly properties: {
|
|
138
|
+
readonly w: {
|
|
139
|
+
readonly type: "number";
|
|
140
|
+
readonly minimum: 0;
|
|
141
|
+
};
|
|
142
|
+
readonly h: {
|
|
143
|
+
readonly type: "number";
|
|
144
|
+
readonly minimum: 0;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly required: readonly ["w", "h"];
|
|
148
|
+
readonly additionalProperties: false;
|
|
149
|
+
};
|
|
150
|
+
readonly identifiers: {
|
|
151
|
+
readonly type: "array";
|
|
152
|
+
readonly items: {
|
|
153
|
+
readonly type: "object";
|
|
154
|
+
readonly properties: {
|
|
155
|
+
readonly [x: string]: {
|
|
156
|
+
readonly type: readonly ["integer", "string"];
|
|
157
|
+
} | {
|
|
158
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
159
|
+
readonly oneOf: readonly [{
|
|
160
|
+
readonly type: "string";
|
|
161
|
+
}, {
|
|
162
|
+
readonly type: "object";
|
|
163
|
+
readonly properties: {
|
|
164
|
+
readonly logical: {
|
|
165
|
+
readonly type: "string";
|
|
166
|
+
};
|
|
167
|
+
readonly physical: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
};
|
|
170
|
+
readonly description: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly additionalProperties: true;
|
|
175
|
+
}];
|
|
176
|
+
} | {
|
|
177
|
+
readonly type: readonly ["string", "null"];
|
|
178
|
+
};
|
|
179
|
+
readonly id: {
|
|
180
|
+
readonly type: readonly ["integer", "string"];
|
|
181
|
+
};
|
|
182
|
+
readonly name: {
|
|
183
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
184
|
+
readonly oneOf: readonly [{
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
}, {
|
|
187
|
+
readonly type: "object";
|
|
188
|
+
readonly properties: {
|
|
189
|
+
readonly logical: {
|
|
190
|
+
readonly type: "string";
|
|
191
|
+
};
|
|
192
|
+
readonly physical: {
|
|
193
|
+
readonly type: "string";
|
|
194
|
+
};
|
|
195
|
+
readonly description: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly additionalProperties: true;
|
|
200
|
+
}];
|
|
201
|
+
};
|
|
202
|
+
readonly description: {
|
|
203
|
+
readonly type: readonly ["string", "null"];
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
readonly required: readonly ["id", "identifier" | "attribute"];
|
|
207
|
+
readonly additionalProperties: true;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
readonly attributes: {
|
|
211
|
+
readonly type: "array";
|
|
212
|
+
readonly items: {
|
|
213
|
+
readonly type: "object";
|
|
214
|
+
readonly properties: {
|
|
215
|
+
readonly [x: string]: {
|
|
216
|
+
readonly type: readonly ["integer", "string"];
|
|
217
|
+
} | {
|
|
218
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
219
|
+
readonly oneOf: readonly [{
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
}, {
|
|
222
|
+
readonly type: "object";
|
|
223
|
+
readonly properties: {
|
|
224
|
+
readonly logical: {
|
|
225
|
+
readonly type: "string";
|
|
226
|
+
};
|
|
227
|
+
readonly physical: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
};
|
|
230
|
+
readonly description: {
|
|
231
|
+
readonly type: "string";
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
readonly additionalProperties: true;
|
|
235
|
+
}];
|
|
236
|
+
} | {
|
|
237
|
+
readonly type: readonly ["string", "null"];
|
|
238
|
+
};
|
|
239
|
+
readonly id: {
|
|
240
|
+
readonly type: readonly ["integer", "string"];
|
|
241
|
+
};
|
|
242
|
+
readonly name: {
|
|
243
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
244
|
+
readonly oneOf: readonly [{
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
}, {
|
|
247
|
+
readonly type: "object";
|
|
248
|
+
readonly properties: {
|
|
249
|
+
readonly logical: {
|
|
250
|
+
readonly type: "string";
|
|
251
|
+
};
|
|
252
|
+
readonly physical: {
|
|
253
|
+
readonly type: "string";
|
|
254
|
+
};
|
|
255
|
+
readonly description: {
|
|
256
|
+
readonly type: "string";
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
readonly additionalProperties: true;
|
|
260
|
+
}];
|
|
261
|
+
};
|
|
262
|
+
readonly description: {
|
|
263
|
+
readonly type: readonly ["string", "null"];
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
readonly required: readonly ["id", "identifier" | "attribute"];
|
|
267
|
+
readonly additionalProperties: true;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
readonly required: readonly ["id", "type", "name"];
|
|
272
|
+
readonly additionalProperties: true;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
export declare const RELATIONSHIPS_SCHEMA: {
|
|
276
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
277
|
+
readonly title: "TM のリレーションシップ";
|
|
278
|
+
readonly description: "エンティティの間の結線。from.entity / to.entity はエンティティの id (同じエンティティを指すと自己結線 = 再帰のループ)。端点の cardinality (1 / 3) と optionality (0 / 1) は無ければ記号を描かない。position は接続位置の角度 (0=真下・時計回り)。details は線を取り付けるインスタンス (省略すると先頭の識別子)。subset はサブセット結線の区分コード (same は =、different は ×)。mapping は結線の中点から垂下する対応表・対照表・再帰表 (再帰表は自己結線にだけ)。";
|
|
279
|
+
readonly 'x-id-start': 1;
|
|
280
|
+
readonly type: "array";
|
|
281
|
+
readonly items: {
|
|
282
|
+
readonly type: "object";
|
|
283
|
+
readonly properties: {
|
|
284
|
+
readonly id: {
|
|
285
|
+
readonly type: readonly ["integer", "string"];
|
|
286
|
+
};
|
|
287
|
+
readonly type: {
|
|
288
|
+
readonly type: readonly ["string", "null"];
|
|
289
|
+
};
|
|
290
|
+
readonly from: {
|
|
291
|
+
readonly $ref: "#/$defs/end";
|
|
292
|
+
};
|
|
293
|
+
readonly to: {
|
|
294
|
+
readonly $ref: "#/$defs/end";
|
|
295
|
+
};
|
|
296
|
+
readonly details: {
|
|
297
|
+
readonly type: "array";
|
|
298
|
+
readonly items: {
|
|
299
|
+
readonly type: "object";
|
|
300
|
+
readonly properties: {
|
|
301
|
+
readonly from: {
|
|
302
|
+
readonly $ref: "#/$defs/detail_end";
|
|
303
|
+
};
|
|
304
|
+
readonly to: {
|
|
305
|
+
readonly $ref: "#/$defs/detail_end";
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
readonly required: readonly ["from", "to"];
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
readonly subset: {
|
|
312
|
+
readonly type: readonly ["object", "null"];
|
|
313
|
+
readonly properties: {
|
|
314
|
+
readonly kind: {
|
|
315
|
+
readonly enum: readonly ["same", "different"];
|
|
316
|
+
};
|
|
317
|
+
readonly code: {
|
|
318
|
+
readonly type: "string";
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
readonly required: readonly ["kind", "code"];
|
|
322
|
+
};
|
|
323
|
+
readonly mapping: {
|
|
324
|
+
readonly type: readonly ["object", "null"];
|
|
325
|
+
readonly properties: {
|
|
326
|
+
readonly entity: {
|
|
327
|
+
readonly type: readonly ["integer", "string"];
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
readonly required: readonly ["entity"];
|
|
331
|
+
};
|
|
332
|
+
readonly label: {
|
|
333
|
+
readonly type: readonly ["string", "null"];
|
|
334
|
+
};
|
|
335
|
+
readonly description: {
|
|
336
|
+
readonly type: readonly ["string", "null"];
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
readonly required: readonly ["id", "from", "to"];
|
|
340
|
+
readonly additionalProperties: true;
|
|
341
|
+
};
|
|
342
|
+
readonly $defs: {
|
|
343
|
+
readonly end: {
|
|
344
|
+
readonly type: "object";
|
|
345
|
+
readonly properties: {
|
|
346
|
+
readonly entity: {
|
|
347
|
+
readonly type: readonly ["integer", "string"];
|
|
348
|
+
};
|
|
349
|
+
readonly cardinality: {
|
|
350
|
+
readonly enum: readonly import("./types.js").TmCardinality[];
|
|
351
|
+
readonly description: "1 か 多 (3)。無ければ記号を描かない";
|
|
352
|
+
};
|
|
353
|
+
readonly optionality: {
|
|
354
|
+
readonly enum: readonly import("./types.js").TmOptionality[];
|
|
355
|
+
readonly description: "0 は任意 (○)、1 は必須 (横棒)。無ければ記号を描かない";
|
|
356
|
+
};
|
|
357
|
+
readonly position: {
|
|
358
|
+
readonly type: "number";
|
|
359
|
+
readonly description: "接続位置の角度。0=真下・時計回り (90=左 / 180=真上 / 270=右)";
|
|
360
|
+
};
|
|
361
|
+
readonly id: {
|
|
362
|
+
readonly description: "旧来の項目。端点の識別子のインスタンスの id (details に置き換わった)";
|
|
363
|
+
readonly type: readonly ["integer", "string"];
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
readonly required: readonly ["entity"];
|
|
367
|
+
readonly additionalProperties: true;
|
|
368
|
+
};
|
|
369
|
+
readonly detail_end: {
|
|
370
|
+
readonly type: "object";
|
|
371
|
+
readonly properties: {
|
|
372
|
+
readonly id: {
|
|
373
|
+
readonly type: readonly ["integer", "string"];
|
|
374
|
+
};
|
|
375
|
+
readonly description: {
|
|
376
|
+
readonly type: readonly ["string", "null"];
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
readonly required: readonly ["id"];
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
/** コレクション名 → スキーマ */
|
|
384
|
+
export declare const SCHEMAS: {
|
|
385
|
+
readonly identifiers: {
|
|
386
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
387
|
+
readonly title: string;
|
|
388
|
+
readonly description: string;
|
|
389
|
+
readonly 'x-id-start': number;
|
|
390
|
+
readonly type: "array";
|
|
391
|
+
readonly items: {
|
|
392
|
+
readonly type: "object";
|
|
393
|
+
readonly properties: {
|
|
394
|
+
readonly id: {
|
|
395
|
+
readonly type: readonly ["integer", "string"];
|
|
396
|
+
};
|
|
397
|
+
readonly name: {
|
|
398
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
399
|
+
readonly oneOf: readonly [{
|
|
400
|
+
readonly type: "string";
|
|
401
|
+
}, {
|
|
402
|
+
readonly type: "object";
|
|
403
|
+
readonly properties: {
|
|
404
|
+
readonly logical: {
|
|
405
|
+
readonly type: "string";
|
|
406
|
+
};
|
|
407
|
+
readonly physical: {
|
|
408
|
+
readonly type: "string";
|
|
409
|
+
};
|
|
410
|
+
readonly description: {
|
|
411
|
+
readonly type: "string";
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
readonly additionalProperties: true;
|
|
415
|
+
}];
|
|
416
|
+
};
|
|
417
|
+
readonly description: {
|
|
418
|
+
readonly type: readonly ["string", "null"];
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
readonly required: readonly ["id", "name"];
|
|
422
|
+
readonly additionalProperties: true;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly attributes: {
|
|
426
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
427
|
+
readonly title: string;
|
|
428
|
+
readonly description: string;
|
|
429
|
+
readonly 'x-id-start': number;
|
|
430
|
+
readonly type: "array";
|
|
431
|
+
readonly items: {
|
|
432
|
+
readonly type: "object";
|
|
433
|
+
readonly properties: {
|
|
434
|
+
readonly id: {
|
|
435
|
+
readonly type: readonly ["integer", "string"];
|
|
436
|
+
};
|
|
437
|
+
readonly name: {
|
|
438
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
439
|
+
readonly oneOf: readonly [{
|
|
440
|
+
readonly type: "string";
|
|
441
|
+
}, {
|
|
442
|
+
readonly type: "object";
|
|
443
|
+
readonly properties: {
|
|
444
|
+
readonly logical: {
|
|
445
|
+
readonly type: "string";
|
|
446
|
+
};
|
|
447
|
+
readonly physical: {
|
|
448
|
+
readonly type: "string";
|
|
449
|
+
};
|
|
450
|
+
readonly description: {
|
|
451
|
+
readonly type: "string";
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
readonly additionalProperties: true;
|
|
455
|
+
}];
|
|
456
|
+
};
|
|
457
|
+
readonly description: {
|
|
458
|
+
readonly type: readonly ["string", "null"];
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
readonly required: readonly ["id", "name"];
|
|
462
|
+
readonly additionalProperties: true;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
readonly entities: {
|
|
466
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
467
|
+
readonly title: "TM のエンティティ";
|
|
468
|
+
readonly description: "TM (T字形ER) のエンティティ。type は 10 種の種別 (これ以外は d3.ter が描画時に例外にする)。識別子・属性はマスタの id を参照するインスタンスとして持ち、インスタンスの id は全エンティティを通して一意 (関係の details がこれを指す)。name は文字列か論理名・物理名の組。position はドラッグで書き換わる。size の w / h が 0 のときは内容に合わせる。";
|
|
469
|
+
readonly 'x-id-start': 30000;
|
|
470
|
+
readonly type: "array";
|
|
471
|
+
readonly items: {
|
|
472
|
+
readonly type: "object";
|
|
473
|
+
readonly properties: {
|
|
474
|
+
readonly id: {
|
|
475
|
+
readonly type: readonly ["integer", "string"];
|
|
476
|
+
};
|
|
477
|
+
readonly type: {
|
|
478
|
+
readonly enum: readonly import("./types.js").TmEntityType[];
|
|
479
|
+
};
|
|
480
|
+
readonly name: {
|
|
481
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
482
|
+
readonly oneOf: readonly [{
|
|
483
|
+
readonly type: "string";
|
|
484
|
+
}, {
|
|
485
|
+
readonly type: "object";
|
|
486
|
+
readonly properties: {
|
|
487
|
+
readonly logical: {
|
|
488
|
+
readonly type: "string";
|
|
489
|
+
};
|
|
490
|
+
readonly physical: {
|
|
491
|
+
readonly type: "string";
|
|
492
|
+
};
|
|
493
|
+
readonly description: {
|
|
494
|
+
readonly type: "string";
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
readonly additionalProperties: true;
|
|
498
|
+
}];
|
|
499
|
+
};
|
|
500
|
+
readonly description: {
|
|
501
|
+
readonly type: readonly ["string", "null"];
|
|
502
|
+
};
|
|
503
|
+
readonly position: {
|
|
504
|
+
readonly type: "object";
|
|
505
|
+
readonly properties: {
|
|
506
|
+
readonly x: {
|
|
507
|
+
readonly type: "number";
|
|
508
|
+
};
|
|
509
|
+
readonly y: {
|
|
510
|
+
readonly type: "number";
|
|
511
|
+
};
|
|
512
|
+
readonly z: {
|
|
513
|
+
readonly type: "number";
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
readonly required: readonly ["x", "y"];
|
|
517
|
+
readonly additionalProperties: false;
|
|
518
|
+
};
|
|
519
|
+
readonly size: {
|
|
520
|
+
readonly type: "object";
|
|
521
|
+
readonly properties: {
|
|
522
|
+
readonly w: {
|
|
523
|
+
readonly type: "number";
|
|
524
|
+
readonly minimum: 0;
|
|
525
|
+
};
|
|
526
|
+
readonly h: {
|
|
527
|
+
readonly type: "number";
|
|
528
|
+
readonly minimum: 0;
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
readonly required: readonly ["w", "h"];
|
|
532
|
+
readonly additionalProperties: false;
|
|
533
|
+
};
|
|
534
|
+
readonly identifiers: {
|
|
535
|
+
readonly type: "array";
|
|
536
|
+
readonly items: {
|
|
537
|
+
readonly type: "object";
|
|
538
|
+
readonly properties: {
|
|
539
|
+
readonly [x: string]: {
|
|
540
|
+
readonly type: readonly ["integer", "string"];
|
|
541
|
+
} | {
|
|
542
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
543
|
+
readonly oneOf: readonly [{
|
|
544
|
+
readonly type: "string";
|
|
545
|
+
}, {
|
|
546
|
+
readonly type: "object";
|
|
547
|
+
readonly properties: {
|
|
548
|
+
readonly logical: {
|
|
549
|
+
readonly type: "string";
|
|
550
|
+
};
|
|
551
|
+
readonly physical: {
|
|
552
|
+
readonly type: "string";
|
|
553
|
+
};
|
|
554
|
+
readonly description: {
|
|
555
|
+
readonly type: "string";
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
readonly additionalProperties: true;
|
|
559
|
+
}];
|
|
560
|
+
} | {
|
|
561
|
+
readonly type: readonly ["string", "null"];
|
|
562
|
+
};
|
|
563
|
+
readonly id: {
|
|
564
|
+
readonly type: readonly ["integer", "string"];
|
|
565
|
+
};
|
|
566
|
+
readonly name: {
|
|
567
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
568
|
+
readonly oneOf: readonly [{
|
|
569
|
+
readonly type: "string";
|
|
570
|
+
}, {
|
|
571
|
+
readonly type: "object";
|
|
572
|
+
readonly properties: {
|
|
573
|
+
readonly logical: {
|
|
574
|
+
readonly type: "string";
|
|
575
|
+
};
|
|
576
|
+
readonly physical: {
|
|
577
|
+
readonly type: "string";
|
|
578
|
+
};
|
|
579
|
+
readonly description: {
|
|
580
|
+
readonly type: "string";
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
readonly additionalProperties: true;
|
|
584
|
+
}];
|
|
585
|
+
};
|
|
586
|
+
readonly description: {
|
|
587
|
+
readonly type: readonly ["string", "null"];
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
readonly required: readonly ["id", "identifier" | "attribute"];
|
|
591
|
+
readonly additionalProperties: true;
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
readonly attributes: {
|
|
595
|
+
readonly type: "array";
|
|
596
|
+
readonly items: {
|
|
597
|
+
readonly type: "object";
|
|
598
|
+
readonly properties: {
|
|
599
|
+
readonly [x: string]: {
|
|
600
|
+
readonly type: readonly ["integer", "string"];
|
|
601
|
+
} | {
|
|
602
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
603
|
+
readonly oneOf: readonly [{
|
|
604
|
+
readonly type: "string";
|
|
605
|
+
}, {
|
|
606
|
+
readonly type: "object";
|
|
607
|
+
readonly properties: {
|
|
608
|
+
readonly logical: {
|
|
609
|
+
readonly type: "string";
|
|
610
|
+
};
|
|
611
|
+
readonly physical: {
|
|
612
|
+
readonly type: "string";
|
|
613
|
+
};
|
|
614
|
+
readonly description: {
|
|
615
|
+
readonly type: "string";
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
readonly additionalProperties: true;
|
|
619
|
+
}];
|
|
620
|
+
} | {
|
|
621
|
+
readonly type: readonly ["string", "null"];
|
|
622
|
+
};
|
|
623
|
+
readonly id: {
|
|
624
|
+
readonly type: readonly ["integer", "string"];
|
|
625
|
+
};
|
|
626
|
+
readonly name: {
|
|
627
|
+
readonly description: "文字列、または論理名と物理名の組";
|
|
628
|
+
readonly oneOf: readonly [{
|
|
629
|
+
readonly type: "string";
|
|
630
|
+
}, {
|
|
631
|
+
readonly type: "object";
|
|
632
|
+
readonly properties: {
|
|
633
|
+
readonly logical: {
|
|
634
|
+
readonly type: "string";
|
|
635
|
+
};
|
|
636
|
+
readonly physical: {
|
|
637
|
+
readonly type: "string";
|
|
638
|
+
};
|
|
639
|
+
readonly description: {
|
|
640
|
+
readonly type: "string";
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
readonly additionalProperties: true;
|
|
644
|
+
}];
|
|
645
|
+
};
|
|
646
|
+
readonly description: {
|
|
647
|
+
readonly type: readonly ["string", "null"];
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
readonly required: readonly ["id", "identifier" | "attribute"];
|
|
651
|
+
readonly additionalProperties: true;
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
readonly required: readonly ["id", "type", "name"];
|
|
656
|
+
readonly additionalProperties: true;
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
readonly relationships: {
|
|
660
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
661
|
+
readonly title: "TM のリレーションシップ";
|
|
662
|
+
readonly description: "エンティティの間の結線。from.entity / to.entity はエンティティの id (同じエンティティを指すと自己結線 = 再帰のループ)。端点の cardinality (1 / 3) と optionality (0 / 1) は無ければ記号を描かない。position は接続位置の角度 (0=真下・時計回り)。details は線を取り付けるインスタンス (省略すると先頭の識別子)。subset はサブセット結線の区分コード (same は =、different は ×)。mapping は結線の中点から垂下する対応表・対照表・再帰表 (再帰表は自己結線にだけ)。";
|
|
663
|
+
readonly 'x-id-start': 1;
|
|
664
|
+
readonly type: "array";
|
|
665
|
+
readonly items: {
|
|
666
|
+
readonly type: "object";
|
|
667
|
+
readonly properties: {
|
|
668
|
+
readonly id: {
|
|
669
|
+
readonly type: readonly ["integer", "string"];
|
|
670
|
+
};
|
|
671
|
+
readonly type: {
|
|
672
|
+
readonly type: readonly ["string", "null"];
|
|
673
|
+
};
|
|
674
|
+
readonly from: {
|
|
675
|
+
readonly $ref: "#/$defs/end";
|
|
676
|
+
};
|
|
677
|
+
readonly to: {
|
|
678
|
+
readonly $ref: "#/$defs/end";
|
|
679
|
+
};
|
|
680
|
+
readonly details: {
|
|
681
|
+
readonly type: "array";
|
|
682
|
+
readonly items: {
|
|
683
|
+
readonly type: "object";
|
|
684
|
+
readonly properties: {
|
|
685
|
+
readonly from: {
|
|
686
|
+
readonly $ref: "#/$defs/detail_end";
|
|
687
|
+
};
|
|
688
|
+
readonly to: {
|
|
689
|
+
readonly $ref: "#/$defs/detail_end";
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
readonly required: readonly ["from", "to"];
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
readonly subset: {
|
|
696
|
+
readonly type: readonly ["object", "null"];
|
|
697
|
+
readonly properties: {
|
|
698
|
+
readonly kind: {
|
|
699
|
+
readonly enum: readonly ["same", "different"];
|
|
700
|
+
};
|
|
701
|
+
readonly code: {
|
|
702
|
+
readonly type: "string";
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
readonly required: readonly ["kind", "code"];
|
|
706
|
+
};
|
|
707
|
+
readonly mapping: {
|
|
708
|
+
readonly type: readonly ["object", "null"];
|
|
709
|
+
readonly properties: {
|
|
710
|
+
readonly entity: {
|
|
711
|
+
readonly type: readonly ["integer", "string"];
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
readonly required: readonly ["entity"];
|
|
715
|
+
};
|
|
716
|
+
readonly label: {
|
|
717
|
+
readonly type: readonly ["string", "null"];
|
|
718
|
+
};
|
|
719
|
+
readonly description: {
|
|
720
|
+
readonly type: readonly ["string", "null"];
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
readonly required: readonly ["id", "from", "to"];
|
|
724
|
+
readonly additionalProperties: true;
|
|
725
|
+
};
|
|
726
|
+
readonly $defs: {
|
|
727
|
+
readonly end: {
|
|
728
|
+
readonly type: "object";
|
|
729
|
+
readonly properties: {
|
|
730
|
+
readonly entity: {
|
|
731
|
+
readonly type: readonly ["integer", "string"];
|
|
732
|
+
};
|
|
733
|
+
readonly cardinality: {
|
|
734
|
+
readonly enum: readonly import("./types.js").TmCardinality[];
|
|
735
|
+
readonly description: "1 か 多 (3)。無ければ記号を描かない";
|
|
736
|
+
};
|
|
737
|
+
readonly optionality: {
|
|
738
|
+
readonly enum: readonly import("./types.js").TmOptionality[];
|
|
739
|
+
readonly description: "0 は任意 (○)、1 は必須 (横棒)。無ければ記号を描かない";
|
|
740
|
+
};
|
|
741
|
+
readonly position: {
|
|
742
|
+
readonly type: "number";
|
|
743
|
+
readonly description: "接続位置の角度。0=真下・時計回り (90=左 / 180=真上 / 270=右)";
|
|
744
|
+
};
|
|
745
|
+
readonly id: {
|
|
746
|
+
readonly description: "旧来の項目。端点の識別子のインスタンスの id (details に置き換わった)";
|
|
747
|
+
readonly type: readonly ["integer", "string"];
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
readonly required: readonly ["entity"];
|
|
751
|
+
readonly additionalProperties: true;
|
|
752
|
+
};
|
|
753
|
+
readonly detail_end: {
|
|
754
|
+
readonly type: "object";
|
|
755
|
+
readonly properties: {
|
|
756
|
+
readonly id: {
|
|
757
|
+
readonly type: readonly ["integer", "string"];
|
|
758
|
+
};
|
|
759
|
+
readonly description: {
|
|
760
|
+
readonly type: readonly ["string", "null"];
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
readonly required: readonly ["id"];
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
};
|
|
768
|
+
//# sourceMappingURL=schema.d.ts.map
|