@lincs.project/webannotation-schema 1.6.0 → 1.7.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/dist/index.d.mts +18 -9
- package/dist/index.d.ts +18 -9
- package/dist/index.js +128 -97
- package/dist/index.mjs +128 -96
- package/dist/v1/jsonld/schema.jsonld +172 -106
- package/dist/v1/standalone/linc-wa-validator.js +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2117,13 +2117,17 @@ declare const definitionSchema: JSONSchemaType<Definition>;
|
|
|
2117
2117
|
|
|
2118
2118
|
declare const Status: readonly ["edit:statusDraft", "edit:statusApproved", "edit:statusPublished"];
|
|
2119
2119
|
type Status = (typeof Status)[number];
|
|
2120
|
-
declare const Motivation: readonly ["identifying", "describing", "correcting", "tagging", "classifying", "linking", "citing"];
|
|
2121
|
-
type Motivation = (typeof Motivation)[number];
|
|
2122
2120
|
declare const WebAnnotation: z.ZodObject<{
|
|
2123
2121
|
'@context': z.ZodTuple<[z.ZodLiteral<"http://www.w3.org/ns/anno.jsonld">, z.ZodLiteral<"https://wa.lincsproject.ca/v1/ns/anno.jsonld">], null>;
|
|
2124
2122
|
id: z.ZodString;
|
|
2125
2123
|
type: z.ZodTuple<[z.ZodLiteral<"Annotation">, z.ZodLiteral<"crm:E33_Linguistic_Object">], null>;
|
|
2126
|
-
motivation: z.
|
|
2124
|
+
motivation: z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"identifying">, z.ZodLiteral<"describing">, z.ZodLiteral<"correcting">, z.ZodLiteral<"tagging">, z.ZodLiteral<"classifying">, z.ZodLiteral<"linking">, z.ZodLiteral<"citing">]>, z.ZodObject<{
|
|
2125
|
+
type: z.ZodLiteral<"crm:E55_Type">;
|
|
2126
|
+
}, "strip", z.ZodTypeAny, {
|
|
2127
|
+
type: "crm:E55_Type";
|
|
2128
|
+
}, {
|
|
2129
|
+
type: "crm:E55_Type";
|
|
2130
|
+
}>>;
|
|
2127
2131
|
created: z.ZodString;
|
|
2128
2132
|
modified: z.ZodOptional<z.ZodString>;
|
|
2129
2133
|
creator: z.ZodOptional<z.ZodObject<{
|
|
@@ -3456,7 +3460,9 @@ declare const WebAnnotation: z.ZodObject<{
|
|
|
3456
3460
|
description?: string | undefined;
|
|
3457
3461
|
}[]);
|
|
3458
3462
|
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
3459
|
-
motivation:
|
|
3463
|
+
motivation: Partial<Record<"identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", {
|
|
3464
|
+
type: "crm:E55_Type";
|
|
3465
|
+
}>>;
|
|
3460
3466
|
created: string;
|
|
3461
3467
|
generator: {
|
|
3462
3468
|
id: string;
|
|
@@ -3746,7 +3752,9 @@ declare const WebAnnotation: z.ZodObject<{
|
|
|
3746
3752
|
description?: string | undefined;
|
|
3747
3753
|
}[]);
|
|
3748
3754
|
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
3749
|
-
motivation:
|
|
3755
|
+
motivation: Partial<Record<"identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", {
|
|
3756
|
+
type: "crm:E55_Type";
|
|
3757
|
+
}>>;
|
|
3750
3758
|
created: string;
|
|
3751
3759
|
generator: {
|
|
3752
3760
|
id: string;
|
|
@@ -4119,7 +4127,9 @@ declare const validator: _ajv.ValidateFunction<Required<{
|
|
|
4119
4127
|
description?: string | undefined;
|
|
4120
4128
|
}[]);
|
|
4121
4129
|
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
4122
|
-
motivation:
|
|
4130
|
+
motivation: Partial<Record<"identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", {
|
|
4131
|
+
type: "crm:E55_Type";
|
|
4132
|
+
}>>;
|
|
4123
4133
|
created: string;
|
|
4124
4134
|
generator: {
|
|
4125
4135
|
id: string;
|
|
@@ -4195,7 +4205,6 @@ type index_KeywordFolksnomyEntityType = KeywordFolksnomyEntityType;
|
|
|
4195
4205
|
type index_Language = Language;
|
|
4196
4206
|
type index_Link = Link;
|
|
4197
4207
|
type index_LinkEntityType = LinkEntityType;
|
|
4198
|
-
type index_Motivation = Motivation;
|
|
4199
4208
|
type index_Note = Note;
|
|
4200
4209
|
type index_NoteEntityType = NoteEntityType;
|
|
4201
4210
|
type index_Organization = Organization;
|
|
@@ -4288,7 +4297,7 @@ declare const index_workSchema: typeof workSchema;
|
|
|
4288
4297
|
declare const index_xpathSelectorExtendedSchema: typeof xpathSelectorExtendedSchema;
|
|
4289
4298
|
declare const index_xpathSelectorSchema: typeof xpathSelectorSchema;
|
|
4290
4299
|
declare namespace index {
|
|
4291
|
-
export { type index_Body as Body, type index_BodyChoice as BodyChoice, type index_BodyEntityType as BodyEntityType, type index_Certainty as Certainty, type index_Citation as Citation, type index_CitationEntityType as CitationEntityType, type index_ConceptualObject as ConceptualObject, type index_ConceptualObjectEntityType as ConceptualObjectEntityType, type index_Correction as Correction, type index_CorrectionEntityType as CorrectionEntityType, index_DATE_RANGE_PATTERN as DATE_RANGE_PATTERN, type index_Date as Date, type index_DateEntityType as DateEntityType, type index_Definition as Definition, type index_Event as Event, type index_EventEntityType as EventEntityType, type index_Format as Format, type index_IdentifiedBy as IdentifiedBy, type index_Keyword as Keyword, type index_KeywordEntityType as KeywordEntityType, type index_KeywordFolksnomy as KeywordFolksnomy, type index_KeywordFolksnomyEntityType as KeywordFolksnomyEntityType, type index_Language as Language, type index_Link as Link, type index_LinkEntityType as LinkEntityType, type
|
|
4300
|
+
export { type index_Body as Body, type index_BodyChoice as BodyChoice, type index_BodyEntityType as BodyEntityType, type index_Certainty as Certainty, type index_Citation as Citation, type index_CitationEntityType as CitationEntityType, type index_ConceptualObject as ConceptualObject, type index_ConceptualObjectEntityType as ConceptualObjectEntityType, type index_Correction as Correction, type index_CorrectionEntityType as CorrectionEntityType, index_DATE_RANGE_PATTERN as DATE_RANGE_PATTERN, type index_Date as Date, type index_DateEntityType as DateEntityType, type index_Definition as Definition, type index_Event as Event, type index_EventEntityType as EventEntityType, type index_Format as Format, type index_IdentifiedBy as IdentifiedBy, type index_Keyword as Keyword, type index_KeywordEntityType as KeywordEntityType, type index_KeywordFolksnomy as KeywordFolksnomy, type index_KeywordFolksnomyEntityType as KeywordFolksnomyEntityType, type index_Language as Language, type index_Link as Link, type index_LinkEntityType as LinkEntityType, type index_Note as Note, type index_NoteEntityType as NoteEntityType, type index_Organization as Organization, type index_OrganizationEntityType as OrganizationEntityType, type index_Person as Person, type index_PersonEntityType as PersonEntityType, type index_PhysicalThing as PhysicalThing, type index_PhysicalThingEntityType as PhysicalThingEntityType, type index_Place as Place, type index_PlaceEntityType as PlaceEntityType, type index_Precision as Precision, type index_Quality as Quality, type index_RangeSelector as RangeSelector, type index_Selector as Selector, type index_Software as Software, type index_Source as Source, type index_Status as Status, type index_Target as Target, type index_TextPositionSelector as TextPositionSelector, type index_TextPositionSelectorExtended as TextPositionSelectorExtended, type index_TextQuoteSelector as TextQuoteSelector, type index_TextQuoteSelectorExtended as TextQuoteSelectorExtended, type index_User as User, index_VERSION as VERSION, type index_ValidateResult as ValidateResult, type index_ValidationError as ValidationError, type index_WebAnnotation as WebAnnotation, type index_Work as Work, type index_WorkEntityType as WorkEntityType, type index_XpathSelector as XpathSelector, type index_XpathSelectorExtended as XpathSelectorExtended, index_ajv as ajv, index_bodyChoiceSchema as bodyChoiceSchema, index_bodyEntityTypeSchema as bodyEntityTypeSchema, index_bodyIdDescription as bodyIdDescription, index_bodySchema as bodySchema, index_certaintySchema as certaintySchema, index_citationEntityTypeSchema as citationEntityTypeSchema, index_citationSchema as citationSchema, index_conceptualObjectEntityTypeSchema as conceptualObjectEntityTypeSchema, index_conceptualObjectSchema as conceptualObjectSchema, index_contextUri as contextUri, index_correctionEntityTypeSchema as correctionEntityTypeSchema, index_correctionSchema as correctionSchema, index_creatorSchema as creatorSchema, index_dateEntityTypeSchema as dateEntityTypeSchema, index_dateSchema as dateSchema, index_definitionSchema as definitionSchema, index_defsId as defsId, index_eventEntityTypeSchema as eventEntityTypeSchema, index_eventSchema as eventSchema, index_formatSchema as formatSchema, index_indentifyBySchema as indentifyBySchema, index_keywordEntityTypeSchema as keywordEntityTypeSchema, index_keywordFolksnomyEntityTypeSchema as keywordFolksnomyEntityTypeSchema, index_keywordFolksnomySchema as keywordFolksnomySchema, index_keywordSchema as keywordSchema, index_languageSchema as languageSchema, index_linkEntityTypeSchema as linkEntityTypeSchema, index_linkSchema as linkSchema, index_noteEntityTypeSchema as noteEntityTypeSchema, index_noteSchema as noteSchema, index_organizationEntityTypeSchema as organizationEntityTypeSchema, index_organizationSchema as organizationSchema, index_personEntityTypeSchema as personEntityTypeSchema, index_personSchema as personSchema, index_physicalThingEntityTypeSchema as physicalThingEntityTypeSchema, index_physicalThingSchema as physicalThingSchema, index_placeEntityTypeSchema as placeEntityTypeSchema, index_placeSchema as placeSchema, index_precisionSchema as precisionSchema, index_rangeSelectorSchema as rangeSelectorSchema, index_schemaContext as schemaContext, index_schemaId as schemaId, index_selectorIdDescription as selectorIdDescription, index_selectorRefinedByDescription as selectorRefinedByDescription, index_selectorSchema as selectorSchema, index_softwareSchema as softwareSchema, index_sourceSchema as sourceSchema, index_targetSchema as targetSchema, index_textPositionSelectorExtendedSchema as textPositionSelectorExtendedSchema, index_textPositionSelectorSchema as textPositionSelectorSchema, index_textQuoteSelectorExtendedSchema as textQuoteSelectorExtendedSchema, index_textQuoteSelectorSchema as textQuoteSelectorSchema, index_validate as validate, index_validator as validator, index_webAnnotationSchema as webAnnotationSchema, index_workEntityTypeSchema as workEntityTypeSchema, index_workSchema as workSchema, index_xpathSelectorExtendedSchema as xpathSelectorExtendedSchema, index_xpathSelectorSchema as xpathSelectorSchema };
|
|
4292
4301
|
}
|
|
4293
4302
|
|
|
4294
|
-
export { Body, BodyChoice, BodyEntityType, Certainty, Citation, CitationEntityType, ConceptualObject, ConceptualObjectEntityType, Correction, CorrectionEntityType, DATE_RANGE_PATTERN, Date, DateEntityType, type Definition, Event, EventEntityType, Format, IdentifiedBy, Keyword, KeywordEntityType, KeywordFolksnomy, KeywordFolksnomyEntityType, Language, Link, LinkEntityType,
|
|
4303
|
+
export { Body, BodyChoice, BodyEntityType, Certainty, Citation, CitationEntityType, ConceptualObject, ConceptualObjectEntityType, Correction, CorrectionEntityType, DATE_RANGE_PATTERN, Date, DateEntityType, type Definition, Event, EventEntityType, Format, IdentifiedBy, Keyword, KeywordEntityType, KeywordFolksnomy, KeywordFolksnomyEntityType, Language, Link, LinkEntityType, Note, NoteEntityType, Organization, OrganizationEntityType, Person, PersonEntityType, PhysicalThing, PhysicalThingEntityType, Place, PlaceEntityType, Precision, Quality, RangeSelector, Selector, Software, Source, Status, Target, TextPositionSelector, TextPositionSelectorExtended, TextQuoteSelector, TextQuoteSelectorExtended, User, VERSION, ValidateResult, ValidationError, WebAnnotation, Work, WorkEntityType, XpathSelector, XpathSelectorExtended, ajv, bodyChoiceSchema, bodyEntityTypeSchema, bodyIdDescription, bodySchema, certaintySchema, citationEntityTypeSchema, citationSchema, conceptualObjectEntityTypeSchema, conceptualObjectSchema, contextUri, correctionEntityTypeSchema, correctionSchema, creatorSchema, dateEntityTypeSchema, dateSchema, definitionSchema, defsId, eventEntityTypeSchema, eventSchema, formatSchema, indentifyBySchema, keywordEntityTypeSchema, keywordFolksnomyEntityTypeSchema, keywordFolksnomySchema, keywordSchema, languageSchema, linkEntityTypeSchema, linkSchema, noteEntityTypeSchema, noteSchema, organizationEntityTypeSchema, organizationSchema, personEntityTypeSchema, personSchema, physicalThingEntityTypeSchema, physicalThingSchema, placeEntityTypeSchema, placeSchema, precisionSchema, rangeSelectorSchema, schemaContext, schemaId, selectorIdDescription, selectorRefinedByDescription, selectorSchema, softwareSchema, sourceSchema, targetSchema, textPositionSelectorExtendedSchema, textPositionSelectorSchema, textQuoteSelectorExtendedSchema, textQuoteSelectorSchema, index as v1, validate, validator, webAnnotationSchema, workEntityTypeSchema, workSchema, xpathSelectorExtendedSchema, xpathSelectorSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -2117,13 +2117,17 @@ declare const definitionSchema: JSONSchemaType<Definition>;
|
|
|
2117
2117
|
|
|
2118
2118
|
declare const Status: readonly ["edit:statusDraft", "edit:statusApproved", "edit:statusPublished"];
|
|
2119
2119
|
type Status = (typeof Status)[number];
|
|
2120
|
-
declare const Motivation: readonly ["identifying", "describing", "correcting", "tagging", "classifying", "linking", "citing"];
|
|
2121
|
-
type Motivation = (typeof Motivation)[number];
|
|
2122
2120
|
declare const WebAnnotation: z.ZodObject<{
|
|
2123
2121
|
'@context': z.ZodTuple<[z.ZodLiteral<"http://www.w3.org/ns/anno.jsonld">, z.ZodLiteral<"https://wa.lincsproject.ca/v1/ns/anno.jsonld">], null>;
|
|
2124
2122
|
id: z.ZodString;
|
|
2125
2123
|
type: z.ZodTuple<[z.ZodLiteral<"Annotation">, z.ZodLiteral<"crm:E33_Linguistic_Object">], null>;
|
|
2126
|
-
motivation: z.
|
|
2124
|
+
motivation: z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"identifying">, z.ZodLiteral<"describing">, z.ZodLiteral<"correcting">, z.ZodLiteral<"tagging">, z.ZodLiteral<"classifying">, z.ZodLiteral<"linking">, z.ZodLiteral<"citing">]>, z.ZodObject<{
|
|
2125
|
+
type: z.ZodLiteral<"crm:E55_Type">;
|
|
2126
|
+
}, "strip", z.ZodTypeAny, {
|
|
2127
|
+
type: "crm:E55_Type";
|
|
2128
|
+
}, {
|
|
2129
|
+
type: "crm:E55_Type";
|
|
2130
|
+
}>>;
|
|
2127
2131
|
created: z.ZodString;
|
|
2128
2132
|
modified: z.ZodOptional<z.ZodString>;
|
|
2129
2133
|
creator: z.ZodOptional<z.ZodObject<{
|
|
@@ -3456,7 +3460,9 @@ declare const WebAnnotation: z.ZodObject<{
|
|
|
3456
3460
|
description?: string | undefined;
|
|
3457
3461
|
}[]);
|
|
3458
3462
|
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
3459
|
-
motivation:
|
|
3463
|
+
motivation: Partial<Record<"identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", {
|
|
3464
|
+
type: "crm:E55_Type";
|
|
3465
|
+
}>>;
|
|
3460
3466
|
created: string;
|
|
3461
3467
|
generator: {
|
|
3462
3468
|
id: string;
|
|
@@ -3746,7 +3752,9 @@ declare const WebAnnotation: z.ZodObject<{
|
|
|
3746
3752
|
description?: string | undefined;
|
|
3747
3753
|
}[]);
|
|
3748
3754
|
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
3749
|
-
motivation:
|
|
3755
|
+
motivation: Partial<Record<"identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", {
|
|
3756
|
+
type: "crm:E55_Type";
|
|
3757
|
+
}>>;
|
|
3750
3758
|
created: string;
|
|
3751
3759
|
generator: {
|
|
3752
3760
|
id: string;
|
|
@@ -4119,7 +4127,9 @@ declare const validator: _ajv.ValidateFunction<Required<{
|
|
|
4119
4127
|
description?: string | undefined;
|
|
4120
4128
|
}[]);
|
|
4121
4129
|
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
4122
|
-
motivation:
|
|
4130
|
+
motivation: Partial<Record<"identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", {
|
|
4131
|
+
type: "crm:E55_Type";
|
|
4132
|
+
}>>;
|
|
4123
4133
|
created: string;
|
|
4124
4134
|
generator: {
|
|
4125
4135
|
id: string;
|
|
@@ -4195,7 +4205,6 @@ type index_KeywordFolksnomyEntityType = KeywordFolksnomyEntityType;
|
|
|
4195
4205
|
type index_Language = Language;
|
|
4196
4206
|
type index_Link = Link;
|
|
4197
4207
|
type index_LinkEntityType = LinkEntityType;
|
|
4198
|
-
type index_Motivation = Motivation;
|
|
4199
4208
|
type index_Note = Note;
|
|
4200
4209
|
type index_NoteEntityType = NoteEntityType;
|
|
4201
4210
|
type index_Organization = Organization;
|
|
@@ -4288,7 +4297,7 @@ declare const index_workSchema: typeof workSchema;
|
|
|
4288
4297
|
declare const index_xpathSelectorExtendedSchema: typeof xpathSelectorExtendedSchema;
|
|
4289
4298
|
declare const index_xpathSelectorSchema: typeof xpathSelectorSchema;
|
|
4290
4299
|
declare namespace index {
|
|
4291
|
-
export { type index_Body as Body, type index_BodyChoice as BodyChoice, type index_BodyEntityType as BodyEntityType, type index_Certainty as Certainty, type index_Citation as Citation, type index_CitationEntityType as CitationEntityType, type index_ConceptualObject as ConceptualObject, type index_ConceptualObjectEntityType as ConceptualObjectEntityType, type index_Correction as Correction, type index_CorrectionEntityType as CorrectionEntityType, index_DATE_RANGE_PATTERN as DATE_RANGE_PATTERN, type index_Date as Date, type index_DateEntityType as DateEntityType, type index_Definition as Definition, type index_Event as Event, type index_EventEntityType as EventEntityType, type index_Format as Format, type index_IdentifiedBy as IdentifiedBy, type index_Keyword as Keyword, type index_KeywordEntityType as KeywordEntityType, type index_KeywordFolksnomy as KeywordFolksnomy, type index_KeywordFolksnomyEntityType as KeywordFolksnomyEntityType, type index_Language as Language, type index_Link as Link, type index_LinkEntityType as LinkEntityType, type
|
|
4300
|
+
export { type index_Body as Body, type index_BodyChoice as BodyChoice, type index_BodyEntityType as BodyEntityType, type index_Certainty as Certainty, type index_Citation as Citation, type index_CitationEntityType as CitationEntityType, type index_ConceptualObject as ConceptualObject, type index_ConceptualObjectEntityType as ConceptualObjectEntityType, type index_Correction as Correction, type index_CorrectionEntityType as CorrectionEntityType, index_DATE_RANGE_PATTERN as DATE_RANGE_PATTERN, type index_Date as Date, type index_DateEntityType as DateEntityType, type index_Definition as Definition, type index_Event as Event, type index_EventEntityType as EventEntityType, type index_Format as Format, type index_IdentifiedBy as IdentifiedBy, type index_Keyword as Keyword, type index_KeywordEntityType as KeywordEntityType, type index_KeywordFolksnomy as KeywordFolksnomy, type index_KeywordFolksnomyEntityType as KeywordFolksnomyEntityType, type index_Language as Language, type index_Link as Link, type index_LinkEntityType as LinkEntityType, type index_Note as Note, type index_NoteEntityType as NoteEntityType, type index_Organization as Organization, type index_OrganizationEntityType as OrganizationEntityType, type index_Person as Person, type index_PersonEntityType as PersonEntityType, type index_PhysicalThing as PhysicalThing, type index_PhysicalThingEntityType as PhysicalThingEntityType, type index_Place as Place, type index_PlaceEntityType as PlaceEntityType, type index_Precision as Precision, type index_Quality as Quality, type index_RangeSelector as RangeSelector, type index_Selector as Selector, type index_Software as Software, type index_Source as Source, type index_Status as Status, type index_Target as Target, type index_TextPositionSelector as TextPositionSelector, type index_TextPositionSelectorExtended as TextPositionSelectorExtended, type index_TextQuoteSelector as TextQuoteSelector, type index_TextQuoteSelectorExtended as TextQuoteSelectorExtended, type index_User as User, index_VERSION as VERSION, type index_ValidateResult as ValidateResult, type index_ValidationError as ValidationError, type index_WebAnnotation as WebAnnotation, type index_Work as Work, type index_WorkEntityType as WorkEntityType, type index_XpathSelector as XpathSelector, type index_XpathSelectorExtended as XpathSelectorExtended, index_ajv as ajv, index_bodyChoiceSchema as bodyChoiceSchema, index_bodyEntityTypeSchema as bodyEntityTypeSchema, index_bodyIdDescription as bodyIdDescription, index_bodySchema as bodySchema, index_certaintySchema as certaintySchema, index_citationEntityTypeSchema as citationEntityTypeSchema, index_citationSchema as citationSchema, index_conceptualObjectEntityTypeSchema as conceptualObjectEntityTypeSchema, index_conceptualObjectSchema as conceptualObjectSchema, index_contextUri as contextUri, index_correctionEntityTypeSchema as correctionEntityTypeSchema, index_correctionSchema as correctionSchema, index_creatorSchema as creatorSchema, index_dateEntityTypeSchema as dateEntityTypeSchema, index_dateSchema as dateSchema, index_definitionSchema as definitionSchema, index_defsId as defsId, index_eventEntityTypeSchema as eventEntityTypeSchema, index_eventSchema as eventSchema, index_formatSchema as formatSchema, index_indentifyBySchema as indentifyBySchema, index_keywordEntityTypeSchema as keywordEntityTypeSchema, index_keywordFolksnomyEntityTypeSchema as keywordFolksnomyEntityTypeSchema, index_keywordFolksnomySchema as keywordFolksnomySchema, index_keywordSchema as keywordSchema, index_languageSchema as languageSchema, index_linkEntityTypeSchema as linkEntityTypeSchema, index_linkSchema as linkSchema, index_noteEntityTypeSchema as noteEntityTypeSchema, index_noteSchema as noteSchema, index_organizationEntityTypeSchema as organizationEntityTypeSchema, index_organizationSchema as organizationSchema, index_personEntityTypeSchema as personEntityTypeSchema, index_personSchema as personSchema, index_physicalThingEntityTypeSchema as physicalThingEntityTypeSchema, index_physicalThingSchema as physicalThingSchema, index_placeEntityTypeSchema as placeEntityTypeSchema, index_placeSchema as placeSchema, index_precisionSchema as precisionSchema, index_rangeSelectorSchema as rangeSelectorSchema, index_schemaContext as schemaContext, index_schemaId as schemaId, index_selectorIdDescription as selectorIdDescription, index_selectorRefinedByDescription as selectorRefinedByDescription, index_selectorSchema as selectorSchema, index_softwareSchema as softwareSchema, index_sourceSchema as sourceSchema, index_targetSchema as targetSchema, index_textPositionSelectorExtendedSchema as textPositionSelectorExtendedSchema, index_textPositionSelectorSchema as textPositionSelectorSchema, index_textQuoteSelectorExtendedSchema as textQuoteSelectorExtendedSchema, index_textQuoteSelectorSchema as textQuoteSelectorSchema, index_validate as validate, index_validator as validator, index_webAnnotationSchema as webAnnotationSchema, index_workEntityTypeSchema as workEntityTypeSchema, index_workSchema as workSchema, index_xpathSelectorExtendedSchema as xpathSelectorExtendedSchema, index_xpathSelectorSchema as xpathSelectorSchema };
|
|
4292
4301
|
}
|
|
4293
4302
|
|
|
4294
|
-
export { Body, BodyChoice, BodyEntityType, Certainty, Citation, CitationEntityType, ConceptualObject, ConceptualObjectEntityType, Correction, CorrectionEntityType, DATE_RANGE_PATTERN, Date, DateEntityType, type Definition, Event, EventEntityType, Format, IdentifiedBy, Keyword, KeywordEntityType, KeywordFolksnomy, KeywordFolksnomyEntityType, Language, Link, LinkEntityType,
|
|
4303
|
+
export { Body, BodyChoice, BodyEntityType, Certainty, Citation, CitationEntityType, ConceptualObject, ConceptualObjectEntityType, Correction, CorrectionEntityType, DATE_RANGE_PATTERN, Date, DateEntityType, type Definition, Event, EventEntityType, Format, IdentifiedBy, Keyword, KeywordEntityType, KeywordFolksnomy, KeywordFolksnomyEntityType, Language, Link, LinkEntityType, Note, NoteEntityType, Organization, OrganizationEntityType, Person, PersonEntityType, PhysicalThing, PhysicalThingEntityType, Place, PlaceEntityType, Precision, Quality, RangeSelector, Selector, Software, Source, Status, Target, TextPositionSelector, TextPositionSelectorExtended, TextQuoteSelector, TextQuoteSelectorExtended, User, VERSION, ValidateResult, ValidationError, WebAnnotation, Work, WorkEntityType, XpathSelector, XpathSelectorExtended, ajv, bodyChoiceSchema, bodyEntityTypeSchema, bodyIdDescription, bodySchema, certaintySchema, citationEntityTypeSchema, citationSchema, conceptualObjectEntityTypeSchema, conceptualObjectSchema, contextUri, correctionEntityTypeSchema, correctionSchema, creatorSchema, dateEntityTypeSchema, dateSchema, definitionSchema, defsId, eventEntityTypeSchema, eventSchema, formatSchema, indentifyBySchema, keywordEntityTypeSchema, keywordFolksnomyEntityTypeSchema, keywordFolksnomySchema, keywordSchema, languageSchema, linkEntityTypeSchema, linkSchema, noteEntityTypeSchema, noteSchema, organizationEntityTypeSchema, organizationSchema, personEntityTypeSchema, personSchema, physicalThingEntityTypeSchema, physicalThingSchema, placeEntityTypeSchema, placeSchema, precisionSchema, rangeSelectorSchema, schemaContext, schemaId, selectorIdDescription, selectorRefinedByDescription, selectorSchema, softwareSchema, sourceSchema, targetSchema, textPositionSelectorExtendedSchema, textPositionSelectorSchema, textQuoteSelectorExtendedSchema, textQuoteSelectorSchema, index as v1, validate, validator, webAnnotationSchema, workEntityTypeSchema, workSchema, xpathSelectorExtendedSchema, xpathSelectorSchema };
|
package/dist/index.js
CHANGED
|
@@ -52,7 +52,6 @@ __export(src_exports, {
|
|
|
52
52
|
KeywordFolksnomyEntityType: () => KeywordFolksnomyEntityType,
|
|
53
53
|
Link: () => Link,
|
|
54
54
|
LinkEntityType: () => LinkEntityType,
|
|
55
|
-
Motivation: () => Motivation,
|
|
56
55
|
Note: () => Note,
|
|
57
56
|
NoteEntityType: () => NoteEntityType,
|
|
58
57
|
Organization: () => Organization,
|
|
@@ -1487,40 +1486,69 @@ var definitionSchema = {
|
|
|
1487
1486
|
};
|
|
1488
1487
|
|
|
1489
1488
|
// src/v1/schema/root.ts
|
|
1489
|
+
var import_zod27 = require("zod");
|
|
1490
|
+
|
|
1491
|
+
// src/v1/schema/definitions/motivation.ts
|
|
1490
1492
|
var import_zod26 = require("zod");
|
|
1493
|
+
var MotivationInstance = import_zod26.z.union([
|
|
1494
|
+
import_zod26.z.literal("identifying"),
|
|
1495
|
+
import_zod26.z.literal("describing"),
|
|
1496
|
+
import_zod26.z.literal("correcting"),
|
|
1497
|
+
import_zod26.z.literal("tagging"),
|
|
1498
|
+
import_zod26.z.literal("classifying"),
|
|
1499
|
+
import_zod26.z.literal("linking"),
|
|
1500
|
+
import_zod26.z.literal("citing")
|
|
1501
|
+
]);
|
|
1502
|
+
var MotivationType = import_zod26.z.object({
|
|
1503
|
+
type: import_zod26.z.literal("crm:E55_Type")
|
|
1504
|
+
});
|
|
1505
|
+
var Motivation = import_zod26.z.record(MotivationInstance, MotivationType).describe("The relationship between an Annotation and a Motivation.");
|
|
1506
|
+
var motivationType = {
|
|
1507
|
+
type: "object",
|
|
1508
|
+
properties: {
|
|
1509
|
+
type: { type: "string", const: "crm:E55_Type" }
|
|
1510
|
+
},
|
|
1511
|
+
required: ["type"]
|
|
1512
|
+
};
|
|
1513
|
+
var motivationSchema = {
|
|
1514
|
+
type: "object",
|
|
1515
|
+
description: "The relationship between an Annotation and a Motivation.",
|
|
1516
|
+
properties: {
|
|
1517
|
+
identifying: { ...motivationType, nullable: true },
|
|
1518
|
+
describing: { ...motivationType, nullable: true },
|
|
1519
|
+
correcting: { ...motivationType, nullable: true },
|
|
1520
|
+
tagging: { ...motivationType, nullable: true },
|
|
1521
|
+
classifying: { ...motivationType, nullable: true },
|
|
1522
|
+
linking: { ...motivationType, nullable: true },
|
|
1523
|
+
citing: { ...motivationType, nullable: true }
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1527
|
+
// src/v1/schema/root.ts
|
|
1491
1528
|
var Status = ["edit:statusDraft", "edit:statusApproved", "edit:statusPublished"];
|
|
1492
|
-
var
|
|
1493
|
-
"
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
"tagging",
|
|
1497
|
-
"classifying",
|
|
1498
|
-
"linking",
|
|
1499
|
-
"citing"
|
|
1500
|
-
];
|
|
1501
|
-
var WebAnnotation = import_zod26.z.object({
|
|
1502
|
-
"@context": import_zod26.z.tuple([
|
|
1503
|
-
import_zod26.z.literal("http://www.w3.org/ns/anno.jsonld").describe("W3C Web Annotation Context."),
|
|
1504
|
-
import_zod26.z.literal(contextUri).describe("LINCS Web Annotation Context.")
|
|
1529
|
+
var WebAnnotation = import_zod27.z.object({
|
|
1530
|
+
"@context": import_zod27.z.tuple([
|
|
1531
|
+
import_zod27.z.literal("http://www.w3.org/ns/anno.jsonld").describe("W3C Web Annotation Context."),
|
|
1532
|
+
import_zod27.z.literal(contextUri).describe("LINCS Web Annotation Context.")
|
|
1505
1533
|
]).describe(
|
|
1506
1534
|
"The context that determines the meaning of the JSON as an Annotation. The itens should point to a URI containing the defiintion used in this schema."
|
|
1507
1535
|
),
|
|
1508
|
-
id:
|
|
1509
|
-
type:
|
|
1510
|
-
motivation:
|
|
1511
|
-
created:
|
|
1512
|
-
modified:
|
|
1536
|
+
id: import_zod27.z.string().url().describe("The identity of the Annotation."),
|
|
1537
|
+
type: import_zod27.z.tuple([import_zod27.z.literal("Annotation"), import_zod27.z.literal("crm:E33_Linguistic_Object")]).describe("The type of the Annotation."),
|
|
1538
|
+
motivation: Motivation,
|
|
1539
|
+
created: import_zod27.z.string().datetime().describe("The time at which the resource was created."),
|
|
1540
|
+
modified: import_zod27.z.string().datetime().optional().describe("The time at which the resource was modified, after creation."),
|
|
1513
1541
|
creator: User.describe("The agent responsible for creating the resource.").optional(),
|
|
1514
|
-
contributor:
|
|
1542
|
+
contributor: import_zod27.z.array(User.describe("The agents responsible for modifying the resource.")).nonempty().optional().describe("The agents responsible for modifying the resource."),
|
|
1515
1543
|
generator: Software.describe(
|
|
1516
1544
|
"The agent responsible for generating the serialization of the Annotation. "
|
|
1517
1545
|
),
|
|
1518
1546
|
target: Target.describe("The relationship between an Annotation and its Target."),
|
|
1519
|
-
body:
|
|
1547
|
+
body: import_zod27.z.union([BodyChoice, Body, import_zod27.z.array(Body)]).describe("The relationship between an Annotation and its Body."),
|
|
1520
1548
|
certainty: Certainty.optional(),
|
|
1521
1549
|
precision: Precision.optional(),
|
|
1522
|
-
label:
|
|
1523
|
-
status:
|
|
1550
|
+
label: import_zod27.z.string().min(1, { message: "The label cannot be empty" }).optional().describe("The descriptive label for the annotation"),
|
|
1551
|
+
status: import_zod27.z.enum(Status).describe("The status of this annotation in a workflow.")
|
|
1524
1552
|
}).describe("Web Annotation Root");
|
|
1525
1553
|
var webAnnotationSchema = {
|
|
1526
1554
|
$id: schemaId,
|
|
@@ -1552,16 +1580,7 @@ var webAnnotationSchema = {
|
|
|
1552
1580
|
],
|
|
1553
1581
|
description: "The type of the Annotation."
|
|
1554
1582
|
},
|
|
1555
|
-
motivation:
|
|
1556
|
-
type: "array",
|
|
1557
|
-
minItems: 2,
|
|
1558
|
-
maxItems: 2,
|
|
1559
|
-
items: [
|
|
1560
|
-
{ type: "string", enum: Motivation },
|
|
1561
|
-
{ type: "string", const: "crm:E55_Type" }
|
|
1562
|
-
],
|
|
1563
|
-
description: "The relationship between an Annotation and a Motivation."
|
|
1564
|
-
},
|
|
1583
|
+
motivation: motivationSchema,
|
|
1565
1584
|
created: {
|
|
1566
1585
|
type: "string",
|
|
1567
1586
|
format: "date-time",
|
|
@@ -1610,6 +1629,7 @@ var webAnnotationSchema = {
|
|
|
1610
1629
|
"body",
|
|
1611
1630
|
"status"
|
|
1612
1631
|
],
|
|
1632
|
+
additionalProperties: false,
|
|
1613
1633
|
allOf: [
|
|
1614
1634
|
{
|
|
1615
1635
|
if: {
|
|
@@ -1638,13 +1658,15 @@ var webAnnotationSchema = {
|
|
|
1638
1658
|
type: "object",
|
|
1639
1659
|
properties: {
|
|
1640
1660
|
motivation: {
|
|
1641
|
-
type: "
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1661
|
+
type: "object",
|
|
1662
|
+
properties: {
|
|
1663
|
+
identifying: {
|
|
1664
|
+
type: "object",
|
|
1665
|
+
properties: {
|
|
1666
|
+
type: { type: "string", const: "crm:E55_Type" }
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1648
1670
|
}
|
|
1649
1671
|
}
|
|
1650
1672
|
},
|
|
@@ -1664,13 +1686,15 @@ var webAnnotationSchema = {
|
|
|
1664
1686
|
type: "object",
|
|
1665
1687
|
properties: {
|
|
1666
1688
|
motivation: {
|
|
1667
|
-
type: "
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1689
|
+
type: "object",
|
|
1690
|
+
properties: {
|
|
1691
|
+
describing: {
|
|
1692
|
+
type: "object",
|
|
1693
|
+
properties: {
|
|
1694
|
+
type: { type: "string", const: "crm:E55_Type" }
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1674
1698
|
}
|
|
1675
1699
|
}
|
|
1676
1700
|
},
|
|
@@ -1690,13 +1714,15 @@ var webAnnotationSchema = {
|
|
|
1690
1714
|
type: "object",
|
|
1691
1715
|
properties: {
|
|
1692
1716
|
motivation: {
|
|
1693
|
-
type: "
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1717
|
+
type: "object",
|
|
1718
|
+
properties: {
|
|
1719
|
+
correcting: {
|
|
1720
|
+
type: "object",
|
|
1721
|
+
properties: {
|
|
1722
|
+
type: { type: "string", const: "crm:E55_Type" }
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1700
1726
|
}
|
|
1701
1727
|
}
|
|
1702
1728
|
},
|
|
@@ -1716,13 +1742,15 @@ var webAnnotationSchema = {
|
|
|
1716
1742
|
type: "object",
|
|
1717
1743
|
properties: {
|
|
1718
1744
|
motivation: {
|
|
1719
|
-
type: "
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1745
|
+
type: "object",
|
|
1746
|
+
properties: {
|
|
1747
|
+
tagging: {
|
|
1748
|
+
type: "object",
|
|
1749
|
+
properties: {
|
|
1750
|
+
type: { type: "string", const: "crm:E55_Type" }
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1726
1754
|
}
|
|
1727
1755
|
}
|
|
1728
1756
|
},
|
|
@@ -1742,13 +1770,15 @@ var webAnnotationSchema = {
|
|
|
1742
1770
|
type: "object",
|
|
1743
1771
|
properties: {
|
|
1744
1772
|
motivation: {
|
|
1745
|
-
type: "
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1773
|
+
type: "object",
|
|
1774
|
+
properties: {
|
|
1775
|
+
classifying: {
|
|
1776
|
+
type: "object",
|
|
1777
|
+
properties: {
|
|
1778
|
+
type: { type: "string", const: "crm:E55_Type" }
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1752
1782
|
}
|
|
1753
1783
|
}
|
|
1754
1784
|
},
|
|
@@ -1768,13 +1798,15 @@ var webAnnotationSchema = {
|
|
|
1768
1798
|
type: "object",
|
|
1769
1799
|
properties: {
|
|
1770
1800
|
motivation: {
|
|
1771
|
-
type: "
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1801
|
+
type: "object",
|
|
1802
|
+
properties: {
|
|
1803
|
+
linking: {
|
|
1804
|
+
type: "object",
|
|
1805
|
+
properties: {
|
|
1806
|
+
type: { type: "string", const: "crm:E55_Type" }
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1778
1810
|
}
|
|
1779
1811
|
}
|
|
1780
1812
|
},
|
|
@@ -1794,13 +1826,15 @@ var webAnnotationSchema = {
|
|
|
1794
1826
|
type: "object",
|
|
1795
1827
|
properties: {
|
|
1796
1828
|
motivation: {
|
|
1797
|
-
type: "
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1829
|
+
type: "object",
|
|
1830
|
+
properties: {
|
|
1831
|
+
citing: {
|
|
1832
|
+
type: "object",
|
|
1833
|
+
properties: {
|
|
1834
|
+
type: { type: "string", const: "crm:E55_Type" }
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1804
1838
|
}
|
|
1805
1839
|
}
|
|
1806
1840
|
}
|
|
@@ -1811,8 +1845,7 @@ var webAnnotationSchema = {
|
|
|
1811
1845
|
}
|
|
1812
1846
|
}
|
|
1813
1847
|
}
|
|
1814
|
-
]
|
|
1815
|
-
additionalProperties: false
|
|
1848
|
+
]
|
|
1816
1849
|
};
|
|
1817
1850
|
|
|
1818
1851
|
// src/v1/validator/index.ts
|
|
@@ -1821,18 +1854,18 @@ var import_ajv = __toESM(require("ajv"));
|
|
|
1821
1854
|
var import_ajv_formats = __toESM(require("ajv-formats"));
|
|
1822
1855
|
|
|
1823
1856
|
// src/v1/validator/types.ts
|
|
1824
|
-
var
|
|
1825
|
-
var ValidationError =
|
|
1826
|
-
message:
|
|
1827
|
-
path:
|
|
1828
|
-
suggestion:
|
|
1829
|
-
context:
|
|
1830
|
-
errorType:
|
|
1831
|
-
}).and(
|
|
1857
|
+
var import_zod28 = require("zod");
|
|
1858
|
+
var ValidationError = import_zod28.z.object({
|
|
1859
|
+
message: import_zod28.z.string(),
|
|
1860
|
+
path: import_zod28.z.string(),
|
|
1861
|
+
suggestion: import_zod28.z.string().optional(),
|
|
1862
|
+
context: import_zod28.z.object({
|
|
1863
|
+
errorType: import_zod28.z.string()
|
|
1864
|
+
}).and(import_zod28.z.unknown())
|
|
1832
1865
|
});
|
|
1833
|
-
var ValidateResult =
|
|
1834
|
-
valid:
|
|
1835
|
-
errors:
|
|
1866
|
+
var ValidateResult = import_zod28.z.object({
|
|
1867
|
+
valid: import_zod28.z.boolean(),
|
|
1868
|
+
errors: import_zod28.z.array(ValidationError).optional()
|
|
1836
1869
|
});
|
|
1837
1870
|
|
|
1838
1871
|
// src/v1/validator/index.ts
|
|
@@ -1887,7 +1920,6 @@ __export(v1_exports, {
|
|
|
1887
1920
|
KeywordFolksnomyEntityType: () => KeywordFolksnomyEntityType,
|
|
1888
1921
|
Link: () => Link,
|
|
1889
1922
|
LinkEntityType: () => LinkEntityType,
|
|
1890
|
-
Motivation: () => Motivation,
|
|
1891
1923
|
Note: () => Note,
|
|
1892
1924
|
NoteEntityType: () => NoteEntityType,
|
|
1893
1925
|
Organization: () => Organization,
|
|
@@ -2004,7 +2036,6 @@ __export(v1_exports, {
|
|
|
2004
2036
|
KeywordFolksnomyEntityType,
|
|
2005
2037
|
Link,
|
|
2006
2038
|
LinkEntityType,
|
|
2007
|
-
Motivation,
|
|
2008
2039
|
Note,
|
|
2009
2040
|
NoteEntityType,
|
|
2010
2041
|
Organization,
|