@isrd-isi-edu/ermrestjs 2.0.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.
Files changed (71) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +55 -0
  3. package/dist/ermrest.d.ts +3481 -0
  4. package/dist/ermrest.js +45 -0
  5. package/dist/ermrest.js.gz +0 -0
  6. package/dist/ermrest.js.map +1 -0
  7. package/dist/ermrest.min.js +45 -0
  8. package/dist/ermrest.min.js.gz +0 -0
  9. package/dist/ermrest.min.js.map +1 -0
  10. package/dist/ermrest.ver.txt +1 -0
  11. package/dist/stats.html +4949 -0
  12. package/js/ag_reference.js +1483 -0
  13. package/js/core.js +4931 -0
  14. package/js/datapath.js +336 -0
  15. package/js/export.js +956 -0
  16. package/js/filters.js +192 -0
  17. package/js/format.js +344 -0
  18. package/js/hatrac.js +1130 -0
  19. package/js/json_ld_validator.js +285 -0
  20. package/js/parser.js +2320 -0
  21. package/js/setup/node.js +27 -0
  22. package/js/utils/helpers.js +2300 -0
  23. package/js/utils/json_ld_schema.js +680 -0
  24. package/js/utils/pseudocolumn_helpers.js +2196 -0
  25. package/package.json +79 -0
  26. package/src/index.ts +204 -0
  27. package/src/models/comment.ts +14 -0
  28. package/src/models/deferred-promise.ts +16 -0
  29. package/src/models/display-name.ts +5 -0
  30. package/src/models/errors.ts +408 -0
  31. package/src/models/path-prefix-alias-mapping.ts +130 -0
  32. package/src/models/reference/bulk-create-foreign-key-object.ts +133 -0
  33. package/src/models/reference/citation.ts +98 -0
  34. package/src/models/reference/contextualize.ts +535 -0
  35. package/src/models/reference/google-dataset-metadata.ts +72 -0
  36. package/src/models/reference/index.ts +14 -0
  37. package/src/models/reference/page.ts +520 -0
  38. package/src/models/reference/reference-aggregate-fn.ts +37 -0
  39. package/src/models/reference/reference.ts +2813 -0
  40. package/src/models/reference/related-reference.ts +467 -0
  41. package/src/models/reference/tuple.ts +652 -0
  42. package/src/models/reference-column/asset-pseudo-column.ts +498 -0
  43. package/src/models/reference-column/column-aggregate.ts +313 -0
  44. package/src/models/reference-column/facet-column.ts +1380 -0
  45. package/src/models/reference-column/foreign-key-pseudo-column.ts +626 -0
  46. package/src/models/reference-column/inbound-foreign-key-pseudo-column.ts +131 -0
  47. package/src/models/reference-column/index.ts +13 -0
  48. package/src/models/reference-column/key-pseudo-column.ts +236 -0
  49. package/src/models/reference-column/pseudo-column.ts +850 -0
  50. package/src/models/reference-column/reference-column.ts +740 -0
  51. package/src/models/source-object-node.ts +156 -0
  52. package/src/models/source-object-wrapper.ts +694 -0
  53. package/src/models/table-source-definitions.ts +98 -0
  54. package/src/services/authn.ts +43 -0
  55. package/src/services/catalog.ts +37 -0
  56. package/src/services/config.ts +202 -0
  57. package/src/services/error.ts +247 -0
  58. package/src/services/handlebars.ts +607 -0
  59. package/src/services/history.ts +136 -0
  60. package/src/services/http.ts +536 -0
  61. package/src/services/logger.ts +70 -0
  62. package/src/services/mustache.ts +0 -0
  63. package/src/utils/column-utils.ts +308 -0
  64. package/src/utils/constants.ts +526 -0
  65. package/src/utils/markdown-utils.ts +855 -0
  66. package/src/utils/reference-utils.ts +1658 -0
  67. package/src/utils/template-utils.ts +0 -0
  68. package/src/utils/type-utils.ts +89 -0
  69. package/src/utils/value-utils.ts +127 -0
  70. package/tsconfig.json +30 -0
  71. package/vite.config.mts +104 -0
@@ -0,0 +1,680 @@
1
+ /* eslint-disable prettier/prettier */
2
+ /**
3
+ * This JSON was generated with the help of scripts/google_dataset/schema_org_sparql.py
4
+ * Format :
5
+ * {
6
+ * SchemaOrgClass: {
7
+ * "properties": {
8
+ * Prop1:{"types":[Type1, Type2, ...]},
9
+ * Prop2: {"types":[Type1, Type2, ...]},
10
+ * ...}
11
+ * },
12
+ * "requiredProperties": [Prop2,...],
13
+ * "parent": SchemaOrgParentClass
14
+ * }
15
+ * }
16
+ * Here `parent` is a class who properties are inherited by the child class SchemaOrgClass and can be used in the JSON-LD for SchemaOrgClass
17
+ * This JSON consists of a subset of the original list of properties and types provided by schema.org
18
+ * The original list and description of each property can be found by going to schema.org/SchemaOrgClass , for example schema.org/Dataset
19
+ * The details of any property can be found by going to schema.org/Prop , for example schema.org/citation
20
+ */
21
+ export const jsonldSchemaPropObj = Object.freeze({
22
+ CreativeWork: {
23
+ properties: {
24
+ about: {
25
+ types: ['Thing'],
26
+ },
27
+ abstract: {
28
+ types: ['Text'],
29
+ },
30
+ accessMode: {
31
+ types: ['Text'],
32
+ },
33
+ accessibilityAPI: {
34
+ types: ['Text'],
35
+ },
36
+ accessibilityControl: {
37
+ types: ['Text'],
38
+ },
39
+ accessibilityFeature: {
40
+ types: ['Text'],
41
+ },
42
+ accessibilityHazard: {
43
+ types: ['Text'],
44
+ },
45
+ accessibilitySummary: {
46
+ types: ['Text'],
47
+ },
48
+ accountablePerson: {
49
+ types: ['Person'],
50
+ },
51
+ acquireLicensePage: {
52
+ types: ['CreativeWork', 'URL'],
53
+ },
54
+ alternativeHeadline: {
55
+ types: ['Text'],
56
+ },
57
+ assesses: {
58
+ types: ['Text'],
59
+ },
60
+ author: {
61
+ types: ['Organization', 'Person'],
62
+ },
63
+ award: {
64
+ types: ['Text'],
65
+ },
66
+ character: {
67
+ types: ['Person'],
68
+ },
69
+ citation: {
70
+ types: ['CreativeWork', 'Text'],
71
+ },
72
+ comment: {
73
+ types: ['Comment'],
74
+ },
75
+ commentCount: {
76
+ types: ['Integer'],
77
+ },
78
+ conditionsOfAccess: {
79
+ types: ['Text'],
80
+ },
81
+ contentRating: {
82
+ types: ['Text'],
83
+ },
84
+ contentReferenceTime: {
85
+ types: ['DateTime'],
86
+ },
87
+ contributor: {
88
+ types: ['Organization', 'Person'],
89
+ },
90
+ copyrightHolder: {
91
+ types: ['Organization', 'Person'],
92
+ },
93
+ copyrightNotice: {
94
+ types: ['Text'],
95
+ },
96
+ copyrightYear: {
97
+ types: ['Number'],
98
+ },
99
+ correction: {
100
+ types: ['Text', 'URL'],
101
+ },
102
+ creativeWorkStatus: {
103
+ types: ['Text'],
104
+ },
105
+ creator: {
106
+ types: ['Organization', 'Person'],
107
+ },
108
+ creditText: {
109
+ types: ['Text'],
110
+ },
111
+ dateCreated: {
112
+ types: ['Date', 'DateTime'],
113
+ },
114
+ dateModified: {
115
+ types: ['Date', 'DateTime'],
116
+ },
117
+ datePublished: {
118
+ types: ['Date', 'DateTime'],
119
+ },
120
+ discussionUrl: {
121
+ types: ['URL'],
122
+ },
123
+ editEIDR: {
124
+ types: ['Text', 'URL'],
125
+ },
126
+ editor: {
127
+ types: ['Person'],
128
+ },
129
+ educationalLevel: {
130
+ types: ['Text', 'URL'],
131
+ },
132
+ educationalUse: {
133
+ types: ['Text'],
134
+ },
135
+ encodingFormat: {
136
+ types: ['Text', 'URL'],
137
+ },
138
+ exampleOfWork: {
139
+ types: ['CreativeWork'],
140
+ },
141
+ expires: {
142
+ types: ['Date'],
143
+ },
144
+ funder: {
145
+ types: ['Organization', 'Person'],
146
+ },
147
+ genre: {
148
+ types: ['Text', 'URL'],
149
+ },
150
+ hasPart: {
151
+ types: ['CreativeWork'],
152
+ },
153
+ headline: {
154
+ types: ['Text'],
155
+ },
156
+ inLanguage: {
157
+ types: ['Language', 'Text'],
158
+ },
159
+ interactivityType: {
160
+ types: ['Text'],
161
+ },
162
+ isAccessibleForFree: {
163
+ types: ['Boolean'],
164
+ },
165
+ isBasedOn: {
166
+ types: ['CreativeWork', 'URL'],
167
+ },
168
+ isFamilyFriendly: {
169
+ types: ['Boolean'],
170
+ },
171
+ isPartOf: {
172
+ types: ['CreativeWork', 'URL'],
173
+ },
174
+ keywords: {
175
+ types: ['Text', 'URL'],
176
+ },
177
+ learningResourceType: {
178
+ types: ['Text'],
179
+ },
180
+ license: {
181
+ types: ['CreativeWork', 'URL'],
182
+ },
183
+ mainEntity: {
184
+ types: ['Thing'],
185
+ },
186
+ maintainer: {
187
+ types: ['Organization', 'Person'],
188
+ },
189
+ material: {
190
+ types: ['Text', 'URL'],
191
+ },
192
+ materialExtent: {
193
+ types: ['Text'],
194
+ },
195
+ mentions: {
196
+ types: ['Thing'],
197
+ },
198
+ pattern: {
199
+ types: ['Text'],
200
+ },
201
+ position: {
202
+ types: ['Integer', 'Text'],
203
+ },
204
+ producer: {
205
+ types: ['Organization', 'Person'],
206
+ },
207
+ provider: {
208
+ types: ['Organization', 'Person'],
209
+ },
210
+ publisher: {
211
+ types: ['Organization', 'Person'],
212
+ },
213
+ publisherImprint: {
214
+ types: ['Organization'],
215
+ },
216
+ publishingPrinciples: {
217
+ types: ['CreativeWork', 'URL'],
218
+ },
219
+ schemaVersion: {
220
+ types: ['Text', 'URL'],
221
+ },
222
+ sdDatePublished: {
223
+ types: ['Date'],
224
+ },
225
+ sdLicense: {
226
+ types: ['CreativeWork', 'URL'],
227
+ },
228
+ sdPublisher: {
229
+ types: ['Organization', 'Person'],
230
+ },
231
+ size: {
232
+ types: ['Text'],
233
+ },
234
+ sourceOrganization: {
235
+ types: ['Organization'],
236
+ },
237
+ sponsor: {
238
+ types: ['Organization', 'Person'],
239
+ },
240
+ teaches: {
241
+ types: ['Text'],
242
+ },
243
+ temporal: {
244
+ types: ['DateTime', 'Text'],
245
+ },
246
+ temporalCoverage: {
247
+ types: ['DateTime', 'Text', 'URL'],
248
+ },
249
+ text: {
250
+ types: ['Text'],
251
+ },
252
+ thumbnailUrl: {
253
+ types: ['URL'],
254
+ },
255
+ translationOfWork: {
256
+ types: ['CreativeWork'],
257
+ },
258
+ translator: {
259
+ types: ['Organization', 'Person'],
260
+ },
261
+ typicalAgeRange: {
262
+ types: ['Text'],
263
+ },
264
+ usageInfo: {
265
+ types: ['CreativeWork', 'URL'],
266
+ },
267
+ version: {
268
+ types: ['Number', 'Text'],
269
+ },
270
+ workExample: {
271
+ types: ['CreativeWork'],
272
+ },
273
+ workTranslation: {
274
+ types: ['CreativeWork'],
275
+ },
276
+ },
277
+ requiredProperties: [],
278
+ parent: 'Thing',
279
+ },
280
+ Organization: {
281
+ properties: {
282
+ actionableFeedbackPolicy: {
283
+ types: ['CreativeWork', 'URL'],
284
+ },
285
+ address: {
286
+ types: ['Text'],
287
+ },
288
+ alumni: {
289
+ types: ['Person'],
290
+ },
291
+ areaServed: {
292
+ types: ['Text'],
293
+ },
294
+ award: {
295
+ types: ['Text'],
296
+ },
297
+ brand: {
298
+ types: ['Organization'],
299
+ },
300
+ correctionsPolicy: {
301
+ types: ['CreativeWork', 'URL'],
302
+ },
303
+ department: {
304
+ types: ['Organization'],
305
+ },
306
+ dissolutionDate: {
307
+ types: ['Date'],
308
+ },
309
+ diversityPolicy: {
310
+ types: ['CreativeWork', 'URL'],
311
+ },
312
+ diversityStaffingReport: {
313
+ types: ['URL'],
314
+ },
315
+ duns: {
316
+ types: ['Text'],
317
+ },
318
+ email: {
319
+ types: ['Text'],
320
+ },
321
+ employee: {
322
+ types: ['Person'],
323
+ },
324
+ ethicsPolicy: {
325
+ types: ['CreativeWork', 'URL'],
326
+ },
327
+ faxNumber: {
328
+ types: ['Text'],
329
+ },
330
+ founder: {
331
+ types: ['Person'],
332
+ },
333
+ foundingDate: {
334
+ types: ['Date'],
335
+ },
336
+ funder: {
337
+ types: ['Organization', 'Person'],
338
+ },
339
+ globalLocationNumber: {
340
+ types: ['Text'],
341
+ },
342
+ isicV4: {
343
+ types: ['Text'],
344
+ },
345
+ knowsAbout: {
346
+ types: ['Text', 'Thing', 'URL'],
347
+ },
348
+ knowsLanguage: {
349
+ types: ['Language', 'Text'],
350
+ },
351
+ legalName: {
352
+ types: ['Text'],
353
+ },
354
+ leiCode: {
355
+ types: ['Text'],
356
+ },
357
+ location: {
358
+ types: ['Text'],
359
+ },
360
+ logo: {
361
+ types: ['URL'],
362
+ },
363
+ member: {
364
+ types: ['Organization', 'Person'],
365
+ },
366
+ memberOf: {
367
+ types: ['Organization'],
368
+ },
369
+ naics: {
370
+ types: ['Text'],
371
+ },
372
+ ownershipFundingInfo: {
373
+ types: ['CreativeWork', 'Text', 'URL'],
374
+ },
375
+ parentOrganization: {
376
+ types: ['Organization'],
377
+ },
378
+ publishingPrinciples: {
379
+ types: ['CreativeWork', 'URL'],
380
+ },
381
+ slogan: {
382
+ types: ['Text'],
383
+ },
384
+ sponsor: {
385
+ types: ['Organization', 'Person'],
386
+ },
387
+ subOrganization: {
388
+ types: ['Organization'],
389
+ },
390
+ taxID: {
391
+ types: ['Text'],
392
+ },
393
+ telephone: {
394
+ types: ['Text'],
395
+ },
396
+ unnamedSourcesPolicy: {
397
+ types: ['CreativeWork', 'URL'],
398
+ },
399
+ vatID: {
400
+ types: ['Text'],
401
+ },
402
+ },
403
+ requiredProperties: ['name'],
404
+ parent: 'Thing',
405
+ },
406
+ Person: {
407
+ properties: {
408
+ additionalName: {
409
+ types: ['Text'],
410
+ },
411
+ address: {
412
+ types: ['Text'],
413
+ },
414
+ affiliation: {
415
+ types: ['Organization'],
416
+ },
417
+ alumniOf: {
418
+ types: ['Organization'],
419
+ },
420
+ award: {
421
+ types: ['Text'],
422
+ },
423
+ birthDate: {
424
+ types: ['Date'],
425
+ },
426
+ brand: {
427
+ types: ['Organization'],
428
+ },
429
+ callSign: {
430
+ types: ['Text'],
431
+ },
432
+ children: {
433
+ types: ['Person'],
434
+ },
435
+ colleague: {
436
+ types: ['Person', 'URL'],
437
+ },
438
+ deathDate: {
439
+ types: ['Date'],
440
+ },
441
+ duns: {
442
+ types: ['Text'],
443
+ },
444
+ email: {
445
+ types: ['Text'],
446
+ },
447
+ familyName: {
448
+ types: ['Text'],
449
+ },
450
+ faxNumber: {
451
+ types: ['Text'],
452
+ },
453
+ follows: {
454
+ types: ['Person'],
455
+ },
456
+ funder: {
457
+ types: ['Organization', 'Person'],
458
+ },
459
+ gender: {
460
+ types: ['Text'],
461
+ },
462
+ givenName: {
463
+ types: ['Text'],
464
+ },
465
+ globalLocationNumber: {
466
+ types: ['Text'],
467
+ },
468
+ honorificPrefix: {
469
+ types: ['Text'],
470
+ },
471
+ honorificSuffix: {
472
+ types: ['Text'],
473
+ },
474
+ isicV4: {
475
+ types: ['Text'],
476
+ },
477
+ jobTitle: {
478
+ types: ['Text'],
479
+ },
480
+ knows: {
481
+ types: ['Person'],
482
+ },
483
+ knowsAbout: {
484
+ types: ['Text', 'Thing', 'URL'],
485
+ },
486
+ knowsLanguage: {
487
+ types: ['Language', 'Text'],
488
+ },
489
+ memberOf: {
490
+ types: ['Organization'],
491
+ },
492
+ naics: {
493
+ types: ['Text'],
494
+ },
495
+ parent: {
496
+ types: ['Person'],
497
+ },
498
+ publishingPrinciples: {
499
+ types: ['CreativeWork', 'URL'],
500
+ },
501
+ relatedTo: {
502
+ types: ['Person'],
503
+ },
504
+ sibling: {
505
+ types: ['Person'],
506
+ },
507
+ sponsor: {
508
+ types: ['Organization', 'Person'],
509
+ },
510
+ spouse: {
511
+ types: ['Person'],
512
+ },
513
+ taxID: {
514
+ types: ['Text'],
515
+ },
516
+ telephone: {
517
+ types: ['Text'],
518
+ },
519
+ vatID: {
520
+ types: ['Text'],
521
+ },
522
+ worksFor: {
523
+ types: ['Organization'],
524
+ },
525
+ },
526
+ requiredProperties: ['name'],
527
+ parent: 'Thing',
528
+ },
529
+ Thing: {
530
+ properties: {
531
+ additionalType: {
532
+ types: ['URL'],
533
+ },
534
+ alternateName: {
535
+ types: ['Text'],
536
+ },
537
+ description: {
538
+ types: ['Text'],
539
+ },
540
+ disambiguatingDescription: {
541
+ types: ['Text'],
542
+ },
543
+ identifier: {
544
+ types: ['Text', 'URL'],
545
+ },
546
+ image: {
547
+ types: ['URL'],
548
+ },
549
+ mainEntityOfPage: {
550
+ types: ['CreativeWork', 'URL'],
551
+ },
552
+ name: {
553
+ types: ['Text'],
554
+ },
555
+ sameAs: {
556
+ types: ['URL'],
557
+ },
558
+ subjectOf: {
559
+ types: ['CreativeWork'],
560
+ },
561
+ url: {
562
+ types: ['URL'],
563
+ },
564
+ },
565
+ requiredProperties: [],
566
+ parent: null,
567
+ },
568
+ MediaObject: {
569
+ properties: {
570
+ bitrate: {
571
+ types: ['Text'],
572
+ },
573
+ contentSize: {
574
+ types: ['Text'],
575
+ },
576
+ contentUrl: {
577
+ types: ['URL'],
578
+ },
579
+ embedUrl: {
580
+ types: ['URL'],
581
+ },
582
+ encodesCreativeWork: {
583
+ types: ['CreativeWork'],
584
+ },
585
+ encodingFormat: {
586
+ types: ['Text', 'URL'],
587
+ },
588
+ endTime: {
589
+ types: ['DateTime'],
590
+ },
591
+ ineligibleRegion: {
592
+ types: ['Text'],
593
+ },
594
+ playerType: {
595
+ types: ['Text'],
596
+ },
597
+ productionCompany: {
598
+ types: ['Organization'],
599
+ },
600
+ requiresSubscription: {
601
+ types: ['Boolean'],
602
+ },
603
+ startTime: {
604
+ types: ['DateTime'],
605
+ },
606
+ uploadDate: {
607
+ types: ['Date'],
608
+ },
609
+ },
610
+ requiredProperties: [],
611
+ parent: 'CreativeWork',
612
+ },
613
+ DataCatalog: {
614
+ properties: {
615
+ dataset: {
616
+ types: ['Dataset'],
617
+ },
618
+ measurementTechnique: {
619
+ types: ['Text', 'URL'],
620
+ },
621
+ },
622
+ requiredProperties: ['name'],
623
+ parent: 'CreativeWork',
624
+ },
625
+ Dataset: {
626
+ properties: {
627
+ distribution: {
628
+ types: ['DataDownload'],
629
+ },
630
+ includedInDataCatalog: {
631
+ types: ['DataCatalog'],
632
+ },
633
+ issn: {
634
+ types: ['Text'],
635
+ },
636
+ measurementTechnique: {
637
+ types: ['Text', 'URL'],
638
+ },
639
+ variableMeasured: {
640
+ types: ['Text'],
641
+ },
642
+ },
643
+ requiredProperties: ['name', 'description'],
644
+ parent: 'CreativeWork',
645
+ },
646
+ Comment: {
647
+ properties: {
648
+ downvoteCount: {
649
+ types: ['Integer'],
650
+ },
651
+ parentItem: {
652
+ types: ['Comment'],
653
+ },
654
+ upvoteCount: {
655
+ types: ['Integer'],
656
+ },
657
+ },
658
+ requiredProperties: [],
659
+ parent: 'CreativeWork',
660
+ },
661
+ DataDownload: {
662
+ properties: {
663
+ measurementTechnique: {
664
+ types: ['Text', 'URL'],
665
+ },
666
+ },
667
+ requiredProperties: ['contentUrl', 'encodingFormat'],
668
+ parent: 'MediaObject',
669
+ },
670
+ Intangible: {
671
+ properties: {},
672
+ requiredProperties: [],
673
+ parent: 'Thing',
674
+ },
675
+ Language: {
676
+ properties: {},
677
+ requiredProperties: [],
678
+ parent: 'Intangible',
679
+ },
680
+ });