@polintpro/proposit-core 0.8.5 → 0.8.6
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/extensions/ieee/formatting.d.ts +30 -0
- package/dist/extensions/ieee/formatting.d.ts.map +1 -0
- package/dist/extensions/ieee/formatting.js +1053 -0
- package/dist/extensions/ieee/formatting.js.map +1 -0
- package/dist/extensions/ieee/index.d.ts +2 -0
- package/dist/extensions/ieee/index.d.ts.map +1 -1
- package/dist/extensions/ieee/index.js +2 -0
- package/dist/extensions/ieee/index.js.map +1 -1
- package/dist/extensions/ieee/references.d.ts +853 -94
- package/dist/extensions/ieee/references.d.ts.map +1 -1
- package/dist/extensions/ieee/references.js +621 -142
- package/dist/extensions/ieee/references.js.map +1 -1
- package/dist/extensions/ieee/relaxed.d.ts +1371 -0
- package/dist/extensions/ieee/relaxed.d.ts.map +1 -0
- package/dist/extensions/ieee/relaxed.js +160 -0
- package/dist/extensions/ieee/relaxed.js.map +1 -0
- package/dist/extensions/ieee/source.d.ts +195 -47
- package/dist/extensions/ieee/source.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// IEEE Citation Reference Schemas
|
|
2
2
|
// https://journals.ieeeauthorcenter.ieee.org/wp-content/uploads/sites/7/IEEE_Reference_Guide.pdf
|
|
3
3
|
import Type, {} from "typebox";
|
|
4
|
+
import { EncodableDate } from "../../lib/schemata/shared.js";
|
|
4
5
|
// ---------------------------------------------------------------------------
|
|
5
6
|
// Reference type discriminator
|
|
6
7
|
// ---------------------------------------------------------------------------
|
|
@@ -46,111 +47,277 @@ const BaseReferenceSchema = Type.Object({
|
|
|
46
47
|
type: ReferenceTypeSchema,
|
|
47
48
|
});
|
|
48
49
|
// ---------------------------------------------------------------------------
|
|
50
|
+
// Structured author name
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
export const AuthorSchema = Type.Object({
|
|
53
|
+
givenNames: Type.String({
|
|
54
|
+
minLength: 1,
|
|
55
|
+
description: "Full given/first names (e.g. Jane Marie)",
|
|
56
|
+
}),
|
|
57
|
+
familyName: Type.String({ minLength: 1, description: "Family/last name" }),
|
|
58
|
+
suffix: Type.Optional(Type.String({
|
|
59
|
+
minLength: 1,
|
|
60
|
+
description: "Name suffix (Jr., Sr., III, etc.)",
|
|
61
|
+
})),
|
|
62
|
+
});
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
49
64
|
// Textual sources
|
|
50
65
|
// ---------------------------------------------------------------------------
|
|
51
66
|
export const BookReferenceSchema = Type.Intersect([
|
|
52
67
|
BaseReferenceSchema,
|
|
53
68
|
Type.Object({
|
|
54
69
|
type: Type.Literal("Book"),
|
|
55
|
-
title: Type.String(),
|
|
56
|
-
year: Type.String(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
title: Type.String({ minLength: 1, description: "Book title" }),
|
|
71
|
+
year: Type.String({
|
|
72
|
+
pattern: "^\\d{4}$",
|
|
73
|
+
description: "Four-digit publication year",
|
|
74
|
+
}),
|
|
75
|
+
authors: Type.Array(AuthorSchema, {
|
|
76
|
+
minItems: 1,
|
|
77
|
+
description: "Author names",
|
|
78
|
+
}),
|
|
79
|
+
edition: Type.Optional(Type.String({ minLength: 1, description: "Edition identifier" })),
|
|
80
|
+
publisher: Type.String({
|
|
81
|
+
minLength: 1,
|
|
82
|
+
description: "Publisher name",
|
|
83
|
+
}),
|
|
84
|
+
location: Type.Optional(Type.String({
|
|
85
|
+
minLength: 1,
|
|
86
|
+
description: "Publication location",
|
|
87
|
+
})),
|
|
88
|
+
isbn: Type.Optional(Type.String({
|
|
89
|
+
pattern: "^(?:\\d{9}[\\dX]|\\d{13})$",
|
|
90
|
+
description: "ISBN-10 or ISBN-13 (digits only)",
|
|
91
|
+
})),
|
|
62
92
|
}),
|
|
63
93
|
]);
|
|
64
94
|
export const WebsiteReferenceSchema = Type.Intersect([
|
|
65
95
|
BaseReferenceSchema,
|
|
66
96
|
Type.Object({
|
|
67
97
|
type: Type.Literal("Website"),
|
|
68
|
-
authors: Type.Array(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
98
|
+
authors: Type.Array(AuthorSchema, {
|
|
99
|
+
minItems: 1,
|
|
100
|
+
description: "Author names",
|
|
101
|
+
}),
|
|
102
|
+
pageTitle: Type.String({
|
|
103
|
+
minLength: 1,
|
|
104
|
+
description: "Title of the web page",
|
|
105
|
+
}),
|
|
106
|
+
websiteTitle: Type.String({
|
|
107
|
+
minLength: 1,
|
|
108
|
+
description: "Title of the website",
|
|
109
|
+
}),
|
|
110
|
+
accessedDate: EncodableDate,
|
|
111
|
+
url: Type.String({
|
|
112
|
+
format: "uri",
|
|
113
|
+
minLength: 1,
|
|
114
|
+
description: "URL of the web page",
|
|
115
|
+
}),
|
|
73
116
|
}),
|
|
74
117
|
]);
|
|
75
118
|
export const BookChapterReferenceSchema = Type.Intersect([
|
|
76
119
|
BaseReferenceSchema,
|
|
77
120
|
Type.Object({
|
|
78
121
|
type: Type.Literal("BookChapter"),
|
|
79
|
-
chapterTitle: Type.String(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
122
|
+
chapterTitle: Type.String({
|
|
123
|
+
minLength: 1,
|
|
124
|
+
description: "Chapter title",
|
|
125
|
+
}),
|
|
126
|
+
year: Type.String({
|
|
127
|
+
pattern: "^\\d{4}$",
|
|
128
|
+
description: "Four-digit publication year",
|
|
129
|
+
}),
|
|
130
|
+
authors: Type.Array(AuthorSchema, {
|
|
131
|
+
minItems: 1,
|
|
132
|
+
description: "Chapter author names",
|
|
133
|
+
}),
|
|
134
|
+
bookTitle: Type.String({
|
|
135
|
+
minLength: 1,
|
|
136
|
+
description: "Book title",
|
|
137
|
+
}),
|
|
138
|
+
editors: Type.Optional(Type.Array(AuthorSchema, {
|
|
139
|
+
description: "Editor names",
|
|
140
|
+
})),
|
|
141
|
+
publisher: Type.String({
|
|
142
|
+
minLength: 1,
|
|
143
|
+
description: "Publisher name",
|
|
144
|
+
}),
|
|
145
|
+
location: Type.String({
|
|
146
|
+
minLength: 1,
|
|
147
|
+
description: "Publication location",
|
|
148
|
+
}),
|
|
149
|
+
pages: Type.Optional(Type.String({ minLength: 1, description: "Page range" })),
|
|
150
|
+
isbn: Type.Optional(Type.String({
|
|
151
|
+
pattern: "^(?:\\d{9}[\\dX]|\\d{13})$",
|
|
152
|
+
description: "ISBN-10 or ISBN-13 (digits only)",
|
|
153
|
+
})),
|
|
87
154
|
}),
|
|
88
155
|
]);
|
|
89
156
|
export const HandbookReferenceSchema = Type.Intersect([
|
|
90
157
|
BaseReferenceSchema,
|
|
91
158
|
Type.Object({
|
|
92
159
|
type: Type.Literal("Handbook"),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
160
|
+
title: Type.String({
|
|
161
|
+
minLength: 1,
|
|
162
|
+
description: "Handbook title",
|
|
163
|
+
}),
|
|
164
|
+
year: Type.String({
|
|
165
|
+
pattern: "^\\d{4}$",
|
|
166
|
+
description: "Four-digit publication year",
|
|
167
|
+
}),
|
|
168
|
+
publisher: Type.String({
|
|
169
|
+
minLength: 1,
|
|
170
|
+
description: "Publisher name",
|
|
171
|
+
}),
|
|
172
|
+
edition: Type.Optional(Type.String({ minLength: 1, description: "Edition identifier" })),
|
|
173
|
+
location: Type.String({
|
|
174
|
+
minLength: 1,
|
|
175
|
+
description: "Publication location",
|
|
176
|
+
}),
|
|
177
|
+
isbn: Type.Optional(Type.String({
|
|
178
|
+
pattern: "^(?:\\d{9}[\\dX]|\\d{13})$",
|
|
179
|
+
description: "ISBN-10 or ISBN-13 (digits only)",
|
|
180
|
+
})),
|
|
98
181
|
}),
|
|
99
182
|
]);
|
|
100
183
|
export const TechnicalReportReferenceSchema = Type.Intersect([
|
|
101
184
|
BaseReferenceSchema,
|
|
102
185
|
Type.Object({
|
|
103
186
|
type: Type.Literal("TechnicalReport"),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
187
|
+
title: Type.String({
|
|
188
|
+
minLength: 1,
|
|
189
|
+
description: "Report title",
|
|
190
|
+
}),
|
|
191
|
+
year: Type.String({
|
|
192
|
+
pattern: "^\\d{4}$",
|
|
193
|
+
description: "Four-digit publication year",
|
|
194
|
+
}),
|
|
195
|
+
authors: Type.Array(AuthorSchema, {
|
|
196
|
+
minItems: 1,
|
|
197
|
+
description: "Author names",
|
|
198
|
+
}),
|
|
199
|
+
reportNumber: Type.String({
|
|
200
|
+
minLength: 1,
|
|
201
|
+
description: "Report number or identifier",
|
|
202
|
+
}),
|
|
203
|
+
institution: Type.String({
|
|
204
|
+
minLength: 1,
|
|
205
|
+
description: "Issuing institution",
|
|
206
|
+
}),
|
|
207
|
+
location: Type.String({
|
|
208
|
+
minLength: 1,
|
|
209
|
+
description: "Institution location",
|
|
210
|
+
}),
|
|
108
211
|
}),
|
|
109
212
|
]);
|
|
110
213
|
export const StandardReferenceSchema = Type.Intersect([
|
|
111
214
|
BaseReferenceSchema,
|
|
112
215
|
Type.Object({
|
|
113
216
|
type: Type.Literal("Standard"),
|
|
114
|
-
organization: Type.String(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
217
|
+
organization: Type.String({
|
|
218
|
+
minLength: 1,
|
|
219
|
+
description: "Standards organization name",
|
|
220
|
+
}),
|
|
221
|
+
standardNumber: Type.String({
|
|
222
|
+
minLength: 1,
|
|
223
|
+
description: "Standard number or identifier",
|
|
224
|
+
}),
|
|
225
|
+
title: Type.String({
|
|
226
|
+
minLength: 1,
|
|
227
|
+
description: "Standard title",
|
|
228
|
+
}),
|
|
229
|
+
date: EncodableDate,
|
|
118
230
|
}),
|
|
119
231
|
]);
|
|
120
232
|
export const ThesisReferenceSchema = Type.Intersect([
|
|
121
233
|
BaseReferenceSchema,
|
|
122
234
|
Type.Object({
|
|
123
235
|
type: Type.Literal("Thesis"),
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
236
|
+
title: Type.String({
|
|
237
|
+
minLength: 1,
|
|
238
|
+
description: "Thesis title",
|
|
239
|
+
}),
|
|
240
|
+
year: Type.String({
|
|
241
|
+
pattern: "^\\d{4}$",
|
|
242
|
+
description: "Four-digit publication year",
|
|
243
|
+
}),
|
|
244
|
+
authors: Type.Array(AuthorSchema, {
|
|
245
|
+
minItems: 1,
|
|
246
|
+
description: "Author names",
|
|
247
|
+
}),
|
|
248
|
+
degree: Type.String({
|
|
249
|
+
minLength: 1,
|
|
250
|
+
description: "Degree type (e.g. Ph.D., M.S.)",
|
|
251
|
+
}),
|
|
252
|
+
institution: Type.String({
|
|
253
|
+
minLength: 1,
|
|
254
|
+
description: "Granting institution",
|
|
255
|
+
}),
|
|
256
|
+
location: Type.String({
|
|
257
|
+
minLength: 1,
|
|
258
|
+
description: "Institution location",
|
|
259
|
+
}),
|
|
128
260
|
}),
|
|
129
261
|
]);
|
|
130
262
|
export const PatentReferenceSchema = Type.Intersect([
|
|
131
263
|
BaseReferenceSchema,
|
|
132
264
|
Type.Object({
|
|
133
265
|
type: Type.Literal("Patent"),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
266
|
+
title: Type.String({
|
|
267
|
+
minLength: 1,
|
|
268
|
+
description: "Patent title",
|
|
269
|
+
}),
|
|
270
|
+
inventors: Type.Array(AuthorSchema, {
|
|
271
|
+
minItems: 1,
|
|
272
|
+
description: "Inventor names",
|
|
273
|
+
}),
|
|
274
|
+
country: Type.String({
|
|
275
|
+
minLength: 1,
|
|
276
|
+
description: "Country of patent",
|
|
277
|
+
}),
|
|
278
|
+
patentNumber: Type.String({
|
|
279
|
+
minLength: 1,
|
|
280
|
+
description: "Patent number",
|
|
281
|
+
}),
|
|
282
|
+
date: EncodableDate,
|
|
138
283
|
}),
|
|
139
284
|
]);
|
|
140
285
|
export const DictionaryReferenceSchema = Type.Intersect([
|
|
141
286
|
BaseReferenceSchema,
|
|
142
287
|
Type.Object({
|
|
143
288
|
type: Type.Literal("Dictionary"),
|
|
144
|
-
|
|
145
|
-
|
|
289
|
+
title: Type.String({
|
|
290
|
+
minLength: 1,
|
|
291
|
+
description: "Entry title",
|
|
292
|
+
}),
|
|
293
|
+
year: Type.String({
|
|
294
|
+
pattern: "^\\d{4}$",
|
|
295
|
+
description: "Four-digit publication year",
|
|
296
|
+
}),
|
|
297
|
+
publisher: Type.String({
|
|
298
|
+
minLength: 1,
|
|
299
|
+
description: "Publisher name",
|
|
300
|
+
}),
|
|
301
|
+
edition: Type.Optional(Type.String({ minLength: 1, description: "Edition identifier" })),
|
|
146
302
|
}),
|
|
147
303
|
]);
|
|
148
304
|
export const EncyclopediaReferenceSchema = Type.Intersect([
|
|
149
305
|
BaseReferenceSchema,
|
|
150
306
|
Type.Object({
|
|
151
307
|
type: Type.Literal("Encyclopedia"),
|
|
152
|
-
|
|
153
|
-
|
|
308
|
+
title: Type.String({
|
|
309
|
+
minLength: 1,
|
|
310
|
+
description: "Entry title",
|
|
311
|
+
}),
|
|
312
|
+
year: Type.String({
|
|
313
|
+
pattern: "^\\d{4}$",
|
|
314
|
+
description: "Four-digit publication year",
|
|
315
|
+
}),
|
|
316
|
+
publisher: Type.String({
|
|
317
|
+
minLength: 1,
|
|
318
|
+
description: "Publisher name",
|
|
319
|
+
}),
|
|
320
|
+
edition: Type.Optional(Type.String({ minLength: 1, description: "Edition identifier" })),
|
|
154
321
|
}),
|
|
155
322
|
]);
|
|
156
323
|
// ---------------------------------------------------------------------------
|
|
@@ -160,33 +327,74 @@ export const JournalArticleReferenceSchema = Type.Intersect([
|
|
|
160
327
|
BaseReferenceSchema,
|
|
161
328
|
Type.Object({
|
|
162
329
|
type: Type.Literal("JournalArticle"),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
330
|
+
title: Type.String({
|
|
331
|
+
minLength: 1,
|
|
332
|
+
description: "Article title",
|
|
333
|
+
}),
|
|
334
|
+
year: Type.String({
|
|
335
|
+
pattern: "^\\d{4}$",
|
|
336
|
+
description: "Four-digit publication year",
|
|
337
|
+
}),
|
|
338
|
+
authors: Type.Array(AuthorSchema, {
|
|
339
|
+
minItems: 1,
|
|
340
|
+
description: "Author names",
|
|
341
|
+
}),
|
|
342
|
+
journalTitle: Type.String({
|
|
343
|
+
minLength: 1,
|
|
344
|
+
description: "Journal title",
|
|
345
|
+
}),
|
|
346
|
+
volume: Type.Optional(Type.String({ minLength: 1, description: "Volume number" })),
|
|
347
|
+
issue: Type.Optional(Type.String({ minLength: 1, description: "Issue number" })),
|
|
348
|
+
pages: Type.Optional(Type.String({ minLength: 1, description: "Page range" })),
|
|
349
|
+
doi: Type.Optional(Type.String({
|
|
350
|
+
pattern: "^10\\..+/.+$",
|
|
351
|
+
description: "DOI identifier",
|
|
352
|
+
})),
|
|
169
353
|
}),
|
|
170
354
|
]);
|
|
171
355
|
export const MagazineArticleReferenceSchema = Type.Intersect([
|
|
172
356
|
BaseReferenceSchema,
|
|
173
357
|
Type.Object({
|
|
174
358
|
type: Type.Literal("MagazineArticle"),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
359
|
+
title: Type.String({
|
|
360
|
+
minLength: 1,
|
|
361
|
+
description: "Article title",
|
|
362
|
+
}),
|
|
363
|
+
year: Type.String({
|
|
364
|
+
pattern: "^\\d{4}$",
|
|
365
|
+
description: "Four-digit publication year",
|
|
366
|
+
}),
|
|
367
|
+
authors: Type.Array(AuthorSchema, {
|
|
368
|
+
minItems: 1,
|
|
369
|
+
description: "Author names",
|
|
370
|
+
}),
|
|
371
|
+
magazineTitle: Type.String({
|
|
372
|
+
minLength: 1,
|
|
373
|
+
description: "Magazine title",
|
|
374
|
+
}),
|
|
375
|
+
volume: Type.Optional(Type.String({ minLength: 1, description: "Volume number" })),
|
|
376
|
+
issue: Type.Optional(Type.String({ minLength: 1, description: "Issue number" })),
|
|
377
|
+
pages: Type.Optional(Type.String({ minLength: 1, description: "Page range" })),
|
|
180
378
|
}),
|
|
181
379
|
]);
|
|
182
380
|
export const NewspaperArticleReferenceSchema = Type.Intersect([
|
|
183
381
|
BaseReferenceSchema,
|
|
184
382
|
Type.Object({
|
|
185
383
|
type: Type.Literal("NewspaperArticle"),
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
384
|
+
title: Type.String({
|
|
385
|
+
minLength: 1,
|
|
386
|
+
description: "Article title",
|
|
387
|
+
}),
|
|
388
|
+
authors: Type.Array(AuthorSchema, {
|
|
389
|
+
minItems: 1,
|
|
390
|
+
description: "Author names",
|
|
391
|
+
}),
|
|
392
|
+
newspaperTitle: Type.String({
|
|
393
|
+
minLength: 1,
|
|
394
|
+
description: "Newspaper title",
|
|
395
|
+
}),
|
|
396
|
+
date: EncodableDate,
|
|
397
|
+
pages: Type.Optional(Type.String({ minLength: 1, description: "Page range" })),
|
|
190
398
|
}),
|
|
191
399
|
]);
|
|
192
400
|
// ---------------------------------------------------------------------------
|
|
@@ -196,24 +404,54 @@ export const ConferencePaperReferenceSchema = Type.Intersect([
|
|
|
196
404
|
BaseReferenceSchema,
|
|
197
405
|
Type.Object({
|
|
198
406
|
type: Type.Literal("ConferencePaper"),
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
407
|
+
title: Type.String({
|
|
408
|
+
minLength: 1,
|
|
409
|
+
description: "Paper title",
|
|
410
|
+
}),
|
|
411
|
+
authors: Type.Array(AuthorSchema, {
|
|
412
|
+
minItems: 1,
|
|
413
|
+
description: "Author names",
|
|
414
|
+
}),
|
|
415
|
+
conferenceName: Type.String({
|
|
416
|
+
minLength: 1,
|
|
417
|
+
description: "Conference name",
|
|
418
|
+
}),
|
|
419
|
+
location: Type.String({
|
|
420
|
+
minLength: 1,
|
|
421
|
+
description: "Conference location",
|
|
422
|
+
}),
|
|
423
|
+
date: EncodableDate,
|
|
424
|
+
pages: Type.Optional(Type.String({ minLength: 1, description: "Page range" })),
|
|
425
|
+
doi: Type.Optional(Type.String({
|
|
426
|
+
pattern: "^10\\..+/.+$",
|
|
427
|
+
description: "DOI identifier",
|
|
428
|
+
})),
|
|
205
429
|
}),
|
|
206
430
|
]);
|
|
207
431
|
export const ConferenceProceedingsReferenceSchema = Type.Intersect([
|
|
208
432
|
BaseReferenceSchema,
|
|
209
433
|
Type.Object({
|
|
210
434
|
type: Type.Literal("ConferenceProceedings"),
|
|
211
|
-
editors: Type.Optional(Type.Array(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
435
|
+
editors: Type.Optional(Type.Array(AuthorSchema, {
|
|
436
|
+
description: "Editor names",
|
|
437
|
+
})),
|
|
438
|
+
conferenceName: Type.String({
|
|
439
|
+
minLength: 1,
|
|
440
|
+
description: "Conference name",
|
|
441
|
+
}),
|
|
442
|
+
location: Type.String({
|
|
443
|
+
minLength: 1,
|
|
444
|
+
description: "Conference location",
|
|
445
|
+
}),
|
|
446
|
+
date: EncodableDate,
|
|
447
|
+
publisher: Type.String({
|
|
448
|
+
minLength: 1,
|
|
449
|
+
description: "Publisher name",
|
|
450
|
+
}),
|
|
451
|
+
isbn: Type.Optional(Type.String({
|
|
452
|
+
pattern: "^(?:\\d{9}[\\dX]|\\d{13})$",
|
|
453
|
+
description: "ISBN-10 or ISBN-13 (digits only)",
|
|
454
|
+
})),
|
|
217
455
|
}),
|
|
218
456
|
]);
|
|
219
457
|
// ---------------------------------------------------------------------------
|
|
@@ -223,63 +461,149 @@ export const DatasetReferenceSchema = Type.Intersect([
|
|
|
223
461
|
BaseReferenceSchema,
|
|
224
462
|
Type.Object({
|
|
225
463
|
type: Type.Literal("Dataset"),
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
464
|
+
title: Type.String({
|
|
465
|
+
minLength: 1,
|
|
466
|
+
description: "Dataset title",
|
|
467
|
+
}),
|
|
468
|
+
year: Type.String({
|
|
469
|
+
pattern: "^\\d{4}$",
|
|
470
|
+
description: "Four-digit publication year",
|
|
471
|
+
}),
|
|
472
|
+
authors: Type.Optional(Type.Array(AuthorSchema, {
|
|
473
|
+
description: "Author names",
|
|
474
|
+
})),
|
|
475
|
+
repository: Type.String({
|
|
476
|
+
minLength: 1,
|
|
477
|
+
description: "Repository name",
|
|
478
|
+
}),
|
|
479
|
+
version: Type.Optional(Type.String({ minLength: 1, description: "Dataset version" })),
|
|
480
|
+
doi: Type.Optional(Type.String({
|
|
481
|
+
pattern: "^10\\..+/.+$",
|
|
482
|
+
description: "DOI identifier",
|
|
483
|
+
})),
|
|
484
|
+
url: Type.String({
|
|
485
|
+
format: "uri",
|
|
486
|
+
minLength: 1,
|
|
487
|
+
description: "URL of the dataset",
|
|
488
|
+
}),
|
|
231
489
|
}),
|
|
232
490
|
]);
|
|
233
491
|
export const SoftwareReferenceSchema = Type.Intersect([
|
|
234
492
|
BaseReferenceSchema,
|
|
235
493
|
Type.Object({
|
|
236
494
|
type: Type.Literal("Software"),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
495
|
+
title: Type.String({
|
|
496
|
+
minLength: 1,
|
|
497
|
+
description: "Software title",
|
|
498
|
+
}),
|
|
499
|
+
year: Type.String({
|
|
500
|
+
pattern: "^\\d{4}$",
|
|
501
|
+
description: "Four-digit publication year",
|
|
502
|
+
}),
|
|
503
|
+
authors: Type.Optional(Type.Array(AuthorSchema, {
|
|
504
|
+
description: "Author names",
|
|
505
|
+
})),
|
|
506
|
+
version: Type.Optional(Type.String({ minLength: 1, description: "Software version" })),
|
|
507
|
+
publisher: Type.Optional(Type.String({ minLength: 1, description: "Publisher name" })),
|
|
508
|
+
doi: Type.Optional(Type.String({
|
|
509
|
+
pattern: "^10\\..+/.+$",
|
|
510
|
+
description: "DOI identifier",
|
|
511
|
+
})),
|
|
512
|
+
url: Type.String({
|
|
513
|
+
format: "uri",
|
|
514
|
+
minLength: 1,
|
|
515
|
+
description: "URL of the software",
|
|
516
|
+
}),
|
|
242
517
|
}),
|
|
243
518
|
]);
|
|
244
519
|
export const OnlineDocumentReferenceSchema = Type.Intersect([
|
|
245
520
|
BaseReferenceSchema,
|
|
246
521
|
Type.Object({
|
|
247
522
|
type: Type.Literal("OnlineDocument"),
|
|
248
|
-
authors: Type.Optional(Type.Array(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
523
|
+
authors: Type.Optional(Type.Array(AuthorSchema, {
|
|
524
|
+
description: "Author names",
|
|
525
|
+
})),
|
|
526
|
+
title: Type.String({
|
|
527
|
+
minLength: 1,
|
|
528
|
+
description: "Document title",
|
|
529
|
+
}),
|
|
530
|
+
publisher: Type.Optional(Type.String({ minLength: 1, description: "Publisher name" })),
|
|
531
|
+
url: Type.String({
|
|
532
|
+
format: "uri",
|
|
533
|
+
minLength: 1,
|
|
534
|
+
description: "URL of the document",
|
|
535
|
+
}),
|
|
536
|
+
accessedDate: EncodableDate,
|
|
253
537
|
}),
|
|
254
538
|
]);
|
|
255
539
|
export const BlogReferenceSchema = Type.Intersect([
|
|
256
540
|
BaseReferenceSchema,
|
|
257
541
|
Type.Object({
|
|
258
542
|
type: Type.Literal("Blog"),
|
|
259
|
-
author:
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
543
|
+
author: AuthorSchema,
|
|
544
|
+
postTitle: Type.String({
|
|
545
|
+
minLength: 1,
|
|
546
|
+
description: "Blog post title",
|
|
547
|
+
}),
|
|
548
|
+
blogName: Type.String({
|
|
549
|
+
minLength: 1,
|
|
550
|
+
description: "Blog name",
|
|
551
|
+
}),
|
|
552
|
+
date: EncodableDate,
|
|
553
|
+
url: Type.String({
|
|
554
|
+
format: "uri",
|
|
555
|
+
minLength: 1,
|
|
556
|
+
description: "URL of the blog post",
|
|
557
|
+
}),
|
|
558
|
+
accessedDate: EncodableDate,
|
|
263
559
|
}),
|
|
264
560
|
]);
|
|
265
561
|
export const SocialMediaReferenceSchema = Type.Intersect([
|
|
266
562
|
BaseReferenceSchema,
|
|
267
563
|
Type.Object({
|
|
268
564
|
type: Type.Literal("SocialMedia"),
|
|
269
|
-
author:
|
|
270
|
-
platform: Type.String(
|
|
271
|
-
|
|
272
|
-
|
|
565
|
+
author: AuthorSchema,
|
|
566
|
+
platform: Type.String({
|
|
567
|
+
minLength: 1,
|
|
568
|
+
description: "Social media platform name",
|
|
569
|
+
}),
|
|
570
|
+
postDate: EncodableDate,
|
|
571
|
+
url: Type.String({
|
|
572
|
+
format: "uri",
|
|
573
|
+
minLength: 1,
|
|
574
|
+
description: "URL of the post",
|
|
575
|
+
}),
|
|
273
576
|
}),
|
|
274
577
|
]);
|
|
275
578
|
export const PreprintReferenceSchema = Type.Intersect([
|
|
276
579
|
BaseReferenceSchema,
|
|
277
580
|
Type.Object({
|
|
278
581
|
type: Type.Literal("Preprint"),
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
582
|
+
title: Type.String({
|
|
583
|
+
minLength: 1,
|
|
584
|
+
description: "Paper title",
|
|
585
|
+
}),
|
|
586
|
+
year: Type.String({
|
|
587
|
+
pattern: "^\\d{4}$",
|
|
588
|
+
description: "Four-digit publication year",
|
|
589
|
+
}),
|
|
590
|
+
authors: Type.Array(AuthorSchema, {
|
|
591
|
+
minItems: 1,
|
|
592
|
+
description: "Author names",
|
|
593
|
+
}),
|
|
594
|
+
server: Type.String({
|
|
595
|
+
minLength: 1,
|
|
596
|
+
description: "Preprint server name",
|
|
597
|
+
}),
|
|
598
|
+
doi: Type.Optional(Type.String({
|
|
599
|
+
pattern: "^10\\..+/.+$",
|
|
600
|
+
description: "DOI identifier",
|
|
601
|
+
})),
|
|
602
|
+
url: Type.String({
|
|
603
|
+
format: "uri",
|
|
604
|
+
minLength: 1,
|
|
605
|
+
description: "URL of the preprint",
|
|
606
|
+
}),
|
|
283
607
|
}),
|
|
284
608
|
]);
|
|
285
609
|
// ---------------------------------------------------------------------------
|
|
@@ -289,42 +613,95 @@ export const VideoReferenceSchema = Type.Intersect([
|
|
|
289
613
|
BaseReferenceSchema,
|
|
290
614
|
Type.Object({
|
|
291
615
|
type: Type.Literal("Video"),
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
616
|
+
title: Type.String({
|
|
617
|
+
minLength: 1,
|
|
618
|
+
description: "Video title",
|
|
619
|
+
}),
|
|
620
|
+
authors: Type.Optional(Type.Array(AuthorSchema, {
|
|
621
|
+
description: "Author or creator names",
|
|
622
|
+
})),
|
|
623
|
+
releaseDate: Type.Optional(EncodableDate),
|
|
624
|
+
platform: Type.String({
|
|
625
|
+
minLength: 1,
|
|
626
|
+
description: "Video hosting platform",
|
|
627
|
+
}),
|
|
628
|
+
url: Type.String({
|
|
629
|
+
format: "uri",
|
|
630
|
+
minLength: 1,
|
|
631
|
+
description: "URL of the video",
|
|
632
|
+
}),
|
|
633
|
+
accessedDate: EncodableDate,
|
|
296
634
|
}),
|
|
297
635
|
]);
|
|
298
636
|
export const PodcastReferenceSchema = Type.Intersect([
|
|
299
637
|
BaseReferenceSchema,
|
|
300
638
|
Type.Object({
|
|
301
639
|
type: Type.Literal("Podcast"),
|
|
302
|
-
authors: Type.Optional(Type.Array(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
640
|
+
authors: Type.Optional(Type.Array(AuthorSchema, {
|
|
641
|
+
description: "Host or producer names",
|
|
642
|
+
})),
|
|
643
|
+
episodeTitle: Type.String({
|
|
644
|
+
minLength: 1,
|
|
645
|
+
description: "Episode title",
|
|
646
|
+
}),
|
|
647
|
+
seriesTitle: Type.String({
|
|
648
|
+
minLength: 1,
|
|
649
|
+
description: "Podcast series title",
|
|
650
|
+
}),
|
|
651
|
+
platform: Type.String({
|
|
652
|
+
minLength: 1,
|
|
653
|
+
description: "Podcast platform",
|
|
654
|
+
}),
|
|
655
|
+
url: Type.String({
|
|
656
|
+
format: "uri",
|
|
657
|
+
minLength: 1,
|
|
658
|
+
description: "URL of the episode",
|
|
659
|
+
}),
|
|
660
|
+
accessedDate: EncodableDate,
|
|
308
661
|
}),
|
|
309
662
|
]);
|
|
310
663
|
export const CourseReferenceSchema = Type.Intersect([
|
|
311
664
|
BaseReferenceSchema,
|
|
312
665
|
Type.Object({
|
|
313
666
|
type: Type.Literal("Course"),
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
667
|
+
title: Type.String({
|
|
668
|
+
minLength: 1,
|
|
669
|
+
description: "Course title",
|
|
670
|
+
}),
|
|
671
|
+
year: Type.String({
|
|
672
|
+
pattern: "^\\d{4}$",
|
|
673
|
+
description: "Four-digit publication year",
|
|
674
|
+
}),
|
|
675
|
+
instructor: AuthorSchema,
|
|
676
|
+
institution: Type.String({
|
|
677
|
+
minLength: 1,
|
|
678
|
+
description: "Offering institution",
|
|
679
|
+
}),
|
|
680
|
+
courseCode: Type.Optional(Type.String({ minLength: 1, description: "Course code" })),
|
|
681
|
+
term: Type.String({
|
|
682
|
+
minLength: 1,
|
|
683
|
+
description: "Academic term",
|
|
684
|
+
}),
|
|
318
685
|
}),
|
|
319
686
|
]);
|
|
320
687
|
export const PresentationReferenceSchema = Type.Intersect([
|
|
321
688
|
BaseReferenceSchema,
|
|
322
689
|
Type.Object({
|
|
323
690
|
type: Type.Literal("Presentation"),
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
691
|
+
title: Type.String({
|
|
692
|
+
minLength: 1,
|
|
693
|
+
description: "Presentation title",
|
|
694
|
+
}),
|
|
695
|
+
presenter: AuthorSchema,
|
|
696
|
+
eventTitle: Type.String({
|
|
697
|
+
minLength: 1,
|
|
698
|
+
description: "Event or conference title",
|
|
699
|
+
}),
|
|
700
|
+
location: Type.String({
|
|
701
|
+
minLength: 1,
|
|
702
|
+
description: "Event location",
|
|
703
|
+
}),
|
|
704
|
+
date: EncodableDate,
|
|
328
705
|
}),
|
|
329
706
|
]);
|
|
330
707
|
// ---------------------------------------------------------------------------
|
|
@@ -334,26 +711,26 @@ export const InterviewReferenceSchema = Type.Intersect([
|
|
|
334
711
|
BaseReferenceSchema,
|
|
335
712
|
Type.Object({
|
|
336
713
|
type: Type.Literal("Interview"),
|
|
337
|
-
interviewee:
|
|
338
|
-
interviewer: Type.Optional(
|
|
339
|
-
date:
|
|
714
|
+
interviewee: AuthorSchema,
|
|
715
|
+
interviewer: Type.Optional(AuthorSchema),
|
|
716
|
+
date: EncodableDate,
|
|
340
717
|
}),
|
|
341
718
|
]);
|
|
342
719
|
export const PersonalCommunicationReferenceSchema = Type.Intersect([
|
|
343
720
|
BaseReferenceSchema,
|
|
344
721
|
Type.Object({
|
|
345
722
|
type: Type.Literal("PersonalCommunication"),
|
|
346
|
-
person:
|
|
347
|
-
date:
|
|
723
|
+
person: AuthorSchema,
|
|
724
|
+
date: EncodableDate,
|
|
348
725
|
}),
|
|
349
726
|
]);
|
|
350
727
|
export const EmailReferenceSchema = Type.Intersect([
|
|
351
728
|
BaseReferenceSchema,
|
|
352
729
|
Type.Object({
|
|
353
730
|
type: Type.Literal("Email"),
|
|
354
|
-
sender:
|
|
355
|
-
recipient:
|
|
356
|
-
date:
|
|
731
|
+
sender: AuthorSchema,
|
|
732
|
+
recipient: AuthorSchema,
|
|
733
|
+
date: EncodableDate,
|
|
357
734
|
}),
|
|
358
735
|
]);
|
|
359
736
|
// ---------------------------------------------------------------------------
|
|
@@ -363,29 +740,57 @@ export const LawReferenceSchema = Type.Intersect([
|
|
|
363
740
|
BaseReferenceSchema,
|
|
364
741
|
Type.Object({
|
|
365
742
|
type: Type.Literal("Law"),
|
|
366
|
-
title: Type.String(
|
|
367
|
-
|
|
368
|
-
|
|
743
|
+
title: Type.String({
|
|
744
|
+
minLength: 1,
|
|
745
|
+
description: "Law title",
|
|
746
|
+
}),
|
|
747
|
+
jurisdiction: Type.String({
|
|
748
|
+
minLength: 1,
|
|
749
|
+
description: "Jurisdiction",
|
|
750
|
+
}),
|
|
751
|
+
dateEnacted: EncodableDate,
|
|
369
752
|
}),
|
|
370
753
|
]);
|
|
371
754
|
export const CourtCaseReferenceSchema = Type.Intersect([
|
|
372
755
|
BaseReferenceSchema,
|
|
373
756
|
Type.Object({
|
|
374
757
|
type: Type.Literal("CourtCase"),
|
|
375
|
-
caseName: Type.String(
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
758
|
+
caseName: Type.String({
|
|
759
|
+
minLength: 1,
|
|
760
|
+
description: "Case name",
|
|
761
|
+
}),
|
|
762
|
+
court: Type.String({
|
|
763
|
+
minLength: 1,
|
|
764
|
+
description: "Court name",
|
|
765
|
+
}),
|
|
766
|
+
date: EncodableDate,
|
|
767
|
+
reporter: Type.Optional(Type.String({ minLength: 1, description: "Reporter citation" })),
|
|
379
768
|
}),
|
|
380
769
|
]);
|
|
381
770
|
export const GovernmentPublicationReferenceSchema = Type.Intersect([
|
|
382
771
|
BaseReferenceSchema,
|
|
383
772
|
Type.Object({
|
|
384
773
|
type: Type.Literal("GovernmentPublication"),
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
774
|
+
title: Type.String({
|
|
775
|
+
minLength: 1,
|
|
776
|
+
description: "Publication title",
|
|
777
|
+
}),
|
|
778
|
+
date: EncodableDate,
|
|
779
|
+
authors: Type.Optional(Type.Array(AuthorSchema, {
|
|
780
|
+
description: "Author names",
|
|
781
|
+
})),
|
|
782
|
+
agency: Type.String({
|
|
783
|
+
minLength: 1,
|
|
784
|
+
description: "Government agency",
|
|
785
|
+
}),
|
|
786
|
+
reportNumber: Type.Optional(Type.String({
|
|
787
|
+
minLength: 1,
|
|
788
|
+
description: "Report number",
|
|
789
|
+
})),
|
|
790
|
+
location: Type.String({
|
|
791
|
+
minLength: 1,
|
|
792
|
+
description: "Publication location",
|
|
793
|
+
}),
|
|
389
794
|
}),
|
|
390
795
|
]);
|
|
391
796
|
// ---------------------------------------------------------------------------
|
|
@@ -395,18 +800,54 @@ export const DatasheetReferenceSchema = Type.Intersect([
|
|
|
395
800
|
BaseReferenceSchema,
|
|
396
801
|
Type.Object({
|
|
397
802
|
type: Type.Literal("Datasheet"),
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
803
|
+
title: Type.String({
|
|
804
|
+
minLength: 1,
|
|
805
|
+
description: "Datasheet title",
|
|
806
|
+
}),
|
|
807
|
+
year: Type.String({
|
|
808
|
+
pattern: "^\\d{4}$",
|
|
809
|
+
description: "Four-digit publication year",
|
|
810
|
+
}),
|
|
811
|
+
manufacturer: Type.String({
|
|
812
|
+
minLength: 1,
|
|
813
|
+
description: "Manufacturer name",
|
|
814
|
+
}),
|
|
815
|
+
partNumber: Type.String({
|
|
816
|
+
minLength: 1,
|
|
817
|
+
description: "Part number",
|
|
818
|
+
}),
|
|
819
|
+
url: Type.String({
|
|
820
|
+
format: "uri",
|
|
821
|
+
minLength: 1,
|
|
822
|
+
description: "URL of the datasheet",
|
|
823
|
+
}),
|
|
401
824
|
}),
|
|
402
825
|
]);
|
|
403
826
|
export const ProductManualReferenceSchema = Type.Intersect([
|
|
404
827
|
BaseReferenceSchema,
|
|
405
828
|
Type.Object({
|
|
406
829
|
type: Type.Literal("ProductManual"),
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
830
|
+
title: Type.String({
|
|
831
|
+
minLength: 1,
|
|
832
|
+
description: "Manual title",
|
|
833
|
+
}),
|
|
834
|
+
year: Type.String({
|
|
835
|
+
pattern: "^\\d{4}$",
|
|
836
|
+
description: "Four-digit publication year",
|
|
837
|
+
}),
|
|
838
|
+
manufacturer: Type.String({
|
|
839
|
+
minLength: 1,
|
|
840
|
+
description: "Manufacturer name",
|
|
841
|
+
}),
|
|
842
|
+
model: Type.String({
|
|
843
|
+
minLength: 1,
|
|
844
|
+
description: "Product model",
|
|
845
|
+
}),
|
|
846
|
+
url: Type.Optional(Type.String({
|
|
847
|
+
format: "uri",
|
|
848
|
+
minLength: 1,
|
|
849
|
+
description: "URL of the manual",
|
|
850
|
+
})),
|
|
410
851
|
}),
|
|
411
852
|
]);
|
|
412
853
|
// ---------------------------------------------------------------------------
|
|
@@ -447,4 +888,42 @@ export const IEEEReferenceSchema = Type.Union([
|
|
|
447
888
|
DatasheetReferenceSchema,
|
|
448
889
|
ProductManualReferenceSchema,
|
|
449
890
|
]);
|
|
891
|
+
// ---------------------------------------------------------------------------
|
|
892
|
+
// Schema map keyed by reference type
|
|
893
|
+
// ---------------------------------------------------------------------------
|
|
894
|
+
export const IEEEReferenceSchemaMap = {
|
|
895
|
+
Book: BookReferenceSchema,
|
|
896
|
+
Website: WebsiteReferenceSchema,
|
|
897
|
+
BookChapter: BookChapterReferenceSchema,
|
|
898
|
+
Handbook: HandbookReferenceSchema,
|
|
899
|
+
TechnicalReport: TechnicalReportReferenceSchema,
|
|
900
|
+
Standard: StandardReferenceSchema,
|
|
901
|
+
Thesis: ThesisReferenceSchema,
|
|
902
|
+
Patent: PatentReferenceSchema,
|
|
903
|
+
Dictionary: DictionaryReferenceSchema,
|
|
904
|
+
Encyclopedia: EncyclopediaReferenceSchema,
|
|
905
|
+
JournalArticle: JournalArticleReferenceSchema,
|
|
906
|
+
MagazineArticle: MagazineArticleReferenceSchema,
|
|
907
|
+
NewspaperArticle: NewspaperArticleReferenceSchema,
|
|
908
|
+
ConferencePaper: ConferencePaperReferenceSchema,
|
|
909
|
+
ConferenceProceedings: ConferenceProceedingsReferenceSchema,
|
|
910
|
+
Dataset: DatasetReferenceSchema,
|
|
911
|
+
Software: SoftwareReferenceSchema,
|
|
912
|
+
OnlineDocument: OnlineDocumentReferenceSchema,
|
|
913
|
+
Blog: BlogReferenceSchema,
|
|
914
|
+
SocialMedia: SocialMediaReferenceSchema,
|
|
915
|
+
Preprint: PreprintReferenceSchema,
|
|
916
|
+
Video: VideoReferenceSchema,
|
|
917
|
+
Podcast: PodcastReferenceSchema,
|
|
918
|
+
Course: CourseReferenceSchema,
|
|
919
|
+
Presentation: PresentationReferenceSchema,
|
|
920
|
+
Interview: InterviewReferenceSchema,
|
|
921
|
+
PersonalCommunication: PersonalCommunicationReferenceSchema,
|
|
922
|
+
Email: EmailReferenceSchema,
|
|
923
|
+
Law: LawReferenceSchema,
|
|
924
|
+
CourtCase: CourtCaseReferenceSchema,
|
|
925
|
+
GovernmentPublication: GovernmentPublicationReferenceSchema,
|
|
926
|
+
Datasheet: DatasheetReferenceSchema,
|
|
927
|
+
ProductManual: ProductManualReferenceSchema,
|
|
928
|
+
};
|
|
450
929
|
//# sourceMappingURL=references.js.map
|