Reference Models#
This documentation auto-generates details about the Pydantic models defined in
app/domain/references/models/models.py.
Models associated with references.
- pydantic model app.domain.references.models.models.AnnotationFilter[source]#
Model representing an annotation filter for searching references.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.AnnotationFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationFilter</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str | None</td></tr><tr><td>score</td><td port="score">float | None</td></tr></table>>,
tooltip="app.domain.references.models.models.AnnotationFilter

Model representing an annotation filter for searching references.&#\
xA;"];
}](../../_images/graphviz-74bbc3d70ed98e7e4a3a458d69b4f31fcc13827a.png)
Show JSON schema
{ "title": "AnnotationFilter", "description": "Model representing an annotation filter for searching references.", "type": "object", "properties": { "scheme": { "description": "The annotation scheme to filter on.", "title": "Scheme", "type": "string" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The annotation label to filter on.", "title": "Label" }, "score": { "anyOf": [ { "maximum": 1.0, "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Optional score threshold for the annotation filter.", "title": "Score" } }, "required": [ "scheme" ] }
- pydantic model app.domain.references.models.models.Candidate[source]#
A candidate canonical reference with route provenance.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.Candidate" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Candidate</b></td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>rank</td><td port="rank">int</td></tr><tr><td>routes</td><td port="routes">list[CandidateElasticsearchRoute | CandidateIdentifierRoute]</td></tr><tr><td>reference</td><td port="reference">CandidateReference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Candidate

A candidate canonical reference with route provenance.
"];
"app.domain.references.models.models.CandidateElasticsearchRoute" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateElasticsearchRoute</b></td></tr><tr><td>type</td><td port="type">Literal['elasticsearch']</td></tr><tr><td>policy</td><td port="policy">str</td></tr><tr><td>rank</td><td port="rank">int</td></tr><tr><td>score</td><td port="score">float</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateElasticsearchRoute

Provenance for a candidate surfaced by the Elasticsearch \
query.
"];
"app.domain.references.models.models.Candidate":routes:e -> "app.domain.references.models.models.CandidateElasticsearchRoute":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateIdentifierRoute" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifierRoute</b></td></tr><tr><td>type</td><td port="type">Literal['identifier']</td></tr><tr><td>matched_identifiers</td><td port="matched_identifiers">list[CandidateIdentifier]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifierRoute

Provenance for a candidate surfaced by an exact identifier \
match.
"];
"app.domain.references.models.models.Candidate":routes:e -> "app.domain.references.models.models.CandidateIdentifierRoute":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateReference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateReference</b></td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>authors</td><td port="authors">list[str]</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>identifiers</td><td port="identifiers">list[CandidateIdentifier]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateReference

Hydrated bibliographic fields of a candidate reference.
"];
"app.domain.references.models.models.Candidate":reference:e -> "app.domain.references.models.models.CandidateReference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifier

An external identifier used as candidate-search input and match \
provenance.

Narrows :class:`GenericExternalIdentifier` to require an explicit type;
candidate search does not accept \
database-id (untyped) lookups.
"];
"app.domain.references.models.models.CandidateIdentifierRoute":matched_identifiers:e -> "app.domain.references.models.models.CandidateIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateReference":identifiers:e -> "app.domain.references.models.models.CandidateIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-f59baac87df050dc1287d20a8fe38a65d94a24cc.png)
Show JSON schema
{ "title": "Candidate", "description": "A candidate canonical reference with route provenance.", "type": "object", "properties": { "reference_id": { "format": "uuid", "title": "Reference Id", "type": "string" }, "rank": { "description": "Overall rank across all routes (1-based).", "title": "Rank", "type": "integer" }, "routes": { "description": "How this candidate was surfaced (ES and/or identifier).", "items": { "discriminator": { "mapping": { "elasticsearch": "#/$defs/CandidateElasticsearchRoute", "identifier": "#/$defs/CandidateIdentifierRoute" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/CandidateElasticsearchRoute" }, { "$ref": "#/$defs/CandidateIdentifierRoute" } ] }, "title": "Routes", "type": "array" }, "reference": { "anyOf": [ { "$ref": "#/$defs/CandidateReference" }, { "type": "null" } ], "default": null, "description": "Hydrated bibliographic fields; omitted when hydrate is false." } }, "$defs": { "CandidateElasticsearchRoute": { "description": "Provenance for a candidate surfaced by the Elasticsearch query.", "properties": { "type": { "const": "elasticsearch", "default": "elasticsearch", "title": "Type", "type": "string" }, "policy": { "description": "The retrieval policy that surfaced the candidate.", "title": "Policy", "type": "string" }, "rank": { "description": "Rank within the Elasticsearch results (1-based).", "title": "Rank", "type": "integer" }, "score": { "description": "The Elasticsearch relevance score.", "title": "Score", "type": "number" } }, "required": [ "policy", "rank", "score" ], "title": "CandidateElasticsearchRoute", "type": "object" }, "CandidateIdentifier": { "description": "An external identifier used as candidate-search input and match provenance.\n\nNarrows :class:`GenericExternalIdentifier` to require an explicit type;\ncandidate search does not accept database-id (untyped) lookups.", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "$ref": "#/$defs/ExternalIdentifierType", "description": "The type of the identifier, e.g. doi, pm_id, open_alex." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "required": [ "identifier", "identifier_type" ], "title": "CandidateIdentifier", "type": "object" }, "CandidateIdentifierRoute": { "description": "Provenance for a candidate surfaced by an exact identifier match.", "properties": { "type": { "const": "identifier", "default": "identifier", "title": "Type", "type": "string" }, "matched_identifiers": { "description": "The input identifiers that matched this candidate.", "items": { "$ref": "#/$defs/CandidateIdentifier" }, "title": "Matched Identifiers", "type": "array" } }, "required": [ "matched_identifiers" ], "title": "CandidateIdentifierRoute", "type": "object" }, "CandidateReference": { "description": "Hydrated bibliographic fields of a candidate reference.", "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Title" }, "authors": { "items": { "type": "string" }, "title": "Authors", "type": "array" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Publication Year" }, "identifiers": { "items": { "$ref": "#/$defs/CandidateIdentifier" }, "title": "Identifiers", "type": "array" } }, "title": "CandidateReference", "type": "object" }, "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" } }, "required": [ "reference_id", "rank", "routes" ] }
- Fields:
- field reference: CandidateReference | None = None[source]#
Hydrated bibliographic fields; omitted when hydrate is false.
- field routes: list[Annotated[CandidateElasticsearchRoute | CandidateIdentifierRoute, FieldInfo(annotation=NoneType, required=True, discriminator='type')]] [Required][source]#
How this candidate was surfaced (ES and/or identifier).
- pydantic model app.domain.references.models.models.CandidateCanonicalSearchFields[source]#
Fields used for candidate canonical selection.
The retrieval policy is interpreted by
app.domain.references.services.deduplication_service.build_candidate_canonical_search_query().Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateCanonicalSearchFields" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateCanonicalSearchFields</b></td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>authors</td><td port="authors">list[str]</td></tr><tr><td>title</td><td port="title">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateCanonicalSearchFields

Fields used for candidate canonical selection.
&#\
xA;The retrieval policy is interpreted by
:func:`app.domain.references.services.deduplication_service.build_candidate_canonical_\
search_query`.
"];
}](../../_images/graphviz-2d558a5f65a439989219196d6c8f6cd54230e558.png)
Show JSON schema
{ "title": "CandidateCanonicalSearchFields", "description": "Fields used for candidate canonical selection.\n\nThe retrieval policy is interpreted by\n:func:`app.domain.references.services.deduplication_service.build_candidate_canonical_search_query`.", "type": "object", "properties": { "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The publication year of the reference.", "title": "Publication Year" }, "authors": { "description": "The authors of the reference.", "items": { "type": "string" }, "title": "Authors", "type": "array" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" } } }
- pydantic model app.domain.references.models.models.CandidateCanonicalSearchQuery[source]#
Service-owned candidate query specification for Elasticsearch translation.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateCanonicalSearchQuery" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateCanonicalSearchQuery</b></td></tr><tr><td>title</td><td port="title">str</td></tr><tr><td>title_fuzziness</td><td port="title_fuzziness">str</td></tr><tr><td>title_boost</td><td port="title_boost">float</td></tr><tr><td>title_operator</td><td port="title_operator">Literal['or']</td></tr><tr><td>title_minimum_should_match</td><td port="title_minimum_should_match">str</td></tr><tr><td>author_terms</td><td port="author_terms">tuple[str, ...]</td></tr><tr><td>author_tie_breaker</td><td port="author_tie_breaker">float</td></tr><tr><td>publication_year_range</td><td port="publication_year_range">tuple[int, int] | None</td></tr><tr><td>publication_year_decay</td><td port="publication_year_decay">YearDecay | None</td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">DuplicateDetermination</td></tr><tr><td>excluded_reference_id</td><td port="excluded_reference_id">UUID | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateCanonicalSearchQuery

Service-owned candidate query specification for Elasticsearch \
translation.
"];
"app.domain.references.models.models.YearDecay" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>YearDecay</b></td></tr><tr><td>offset</td><td port="offset">int</td></tr><tr><td>scale</td><td port="scale">int</td></tr><tr><td>decay</td><td port="decay">float</td></tr><tr><td>weight</td><td port="weight">float</td></tr><tr><td>origin</td><td port="origin">int</td></tr></table>>,
tooltip="app.domain.references.models.models.YearDecay

Resolved decay spec carried on a candidate query; origin is required.
"];
"app.domain.references.models.models.CandidateCanonicalSearchQuery":publication_year_decay:e -> "app.domain.references.models.models.YearDecay":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-7f9f779227ff90045003a8bcececc223fdc3772f.png)
Show JSON schema
{ "title": "CandidateCanonicalSearchQuery", "description": "Service-owned candidate query specification for Elasticsearch translation.", "type": "object", "properties": { "title": { "title": "Title", "type": "string" }, "title_fuzziness": { "title": "Title Fuzziness", "type": "string" }, "title_boost": { "title": "Title Boost", "type": "number" }, "title_operator": { "const": "or", "title": "Title Operator", "type": "string" }, "title_minimum_should_match": { "title": "Title Minimum Should Match", "type": "string" }, "author_terms": { "items": { "type": "string" }, "title": "Author Terms", "type": "array" }, "author_tie_breaker": { "title": "Author Tie Breaker", "type": "number" }, "publication_year_range": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "integer" }, { "type": "integer" } ], "type": "array" }, { "type": "null" } ], "title": "Publication Year Range" }, "publication_year_decay": { "anyOf": [ { "$ref": "#/$defs/YearDecay" }, { "type": "null" } ], "default": null }, "duplicate_determination": { "$ref": "#/$defs/DuplicateDetermination" }, "excluded_reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "title": "Excluded Reference Id" } }, "$defs": { "DuplicateDetermination": { "description": "The determination of whether a reference is a duplicate.\n\nThis encodes both a status and a determination.", "enum": [ "pending", "nominated", "duplicate", "exact_duplicate", "canonical", "unresolved", "unsearchable", "decoupled" ], "title": "DuplicateDetermination", "type": "string" }, "YearDecay": { "description": "Resolved decay spec carried on a candidate query; origin is required.", "properties": { "offset": { "default": 1, "minimum": 0, "title": "Offset", "type": "integer" }, "scale": { "default": 9, "exclusiveMinimum": 0, "title": "Scale", "type": "integer" }, "decay": { "default": 0.5, "exclusiveMaximum": 1, "exclusiveMinimum": 0, "title": "Decay", "type": "number" }, "weight": { "default": 0.1, "minimum": 0, "title": "Weight", "type": "number" }, "origin": { "title": "Origin", "type": "integer" } }, "required": [ "origin" ], "title": "YearDecay", "type": "object" } }, "required": [ "title", "title_fuzziness", "title_boost", "title_operator", "title_minimum_should_match", "author_terms", "author_tie_breaker", "publication_year_range", "duplicate_determination", "excluded_reference_id" ] }
- Config:
frozen: bool = True
- Fields:
- field duplicate_determination: DuplicateDetermination [Required][source]#
- pydantic model app.domain.references.models.models.CandidateElasticsearchRoute[source]#
Provenance for a candidate surfaced by the Elasticsearch query.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateElasticsearchRoute" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateElasticsearchRoute</b></td></tr><tr><td>type</td><td port="type">Literal['elasticsearch']</td></tr><tr><td>policy</td><td port="policy">str</td></tr><tr><td>rank</td><td port="rank">int</td></tr><tr><td>score</td><td port="score">float</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateElasticsearchRoute

Provenance for a candidate surfaced by the Elasticsearch \
query.
"];
}](../../_images/graphviz-aa4cfc64df4dec77e020a3e90c26f76fa23c66af.png)
Show JSON schema
{ "title": "CandidateElasticsearchRoute", "description": "Provenance for a candidate surfaced by the Elasticsearch query.", "type": "object", "properties": { "type": { "const": "elasticsearch", "default": "elasticsearch", "title": "Type", "type": "string" }, "policy": { "description": "The retrieval policy that surfaced the candidate.", "title": "Policy", "type": "string" }, "rank": { "description": "Rank within the Elasticsearch results (1-based).", "title": "Rank", "type": "integer" }, "score": { "description": "The Elasticsearch relevance score.", "title": "Score", "type": "number" } }, "required": [ "policy", "rank", "score" ] }
- pydantic model app.domain.references.models.models.CandidateIdentifier[source]#
An external identifier used as candidate-search input and match provenance.
Narrows
GenericExternalIdentifierto require an explicit type; candidate search does not accept database-id (untyped) lookups.Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifier

An external identifier used as candidate-search input and match \
provenance.

Narrows :class:`GenericExternalIdentifier` to require an explicit type;
candidate search does not accept \
database-id (untyped) lookups.
"];
}](../../_images/graphviz-9d0f0bde3d800dcbf1cb8316f28cc4f8294add38.png)
Show JSON schema
{ "title": "CandidateIdentifier", "description": "An external identifier used as candidate-search input and match provenance.\n\nNarrows :class:`GenericExternalIdentifier` to require an explicit type;\ncandidate search does not accept database-id (untyped) lookups.", "type": "object", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "$ref": "#/$defs/ExternalIdentifierType", "description": "The type of the identifier, e.g. doi, pm_id, open_alex." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "$defs": { "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" } }, "required": [ "identifier", "identifier_type" ] }
- Fields:
- field identifier_type: ExternalIdentifierType [Required][source]#
The type of the identifier, e.g. doi, pm_id, open_alex.
- classmethod from_specific(external_identifier: Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')]) Self[source]#
Create a generic external identifier from a specific implementation.
- pydantic model app.domain.references.models.models.CandidateIdentifierRoute[source]#
Provenance for a candidate surfaced by an exact identifier match.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifier

An external identifier used as candidate-search input and match \
provenance.

Narrows :class:`GenericExternalIdentifier` to require an explicit type;
candidate search does not accept \
database-id (untyped) lookups.
"];
"app.domain.references.models.models.CandidateIdentifierRoute" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifierRoute</b></td></tr><tr><td>type</td><td port="type">Literal['identifier']</td></tr><tr><td>matched_identifiers</td><td port="matched_identifiers">list[CandidateIdentifier]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifierRoute

Provenance for a candidate surfaced by an exact identifier \
match.
"];
"app.domain.references.models.models.CandidateIdentifierRoute":matched_identifiers:e -> "app.domain.references.models.models.CandidateIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-6fe32240fb6c74f964531ca30d51556655dbad5d.png)
Show JSON schema
{ "title": "CandidateIdentifierRoute", "description": "Provenance for a candidate surfaced by an exact identifier match.", "type": "object", "properties": { "type": { "const": "identifier", "default": "identifier", "title": "Type", "type": "string" }, "matched_identifiers": { "description": "The input identifiers that matched this candidate.", "items": { "$ref": "#/$defs/CandidateIdentifier" }, "title": "Matched Identifiers", "type": "array" } }, "$defs": { "CandidateIdentifier": { "description": "An external identifier used as candidate-search input and match provenance.\n\nNarrows :class:`GenericExternalIdentifier` to require an explicit type;\ncandidate search does not accept database-id (untyped) lookups.", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "$ref": "#/$defs/ExternalIdentifierType", "description": "The type of the identifier, e.g. doi, pm_id, open_alex." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "required": [ "identifier", "identifier_type" ], "title": "CandidateIdentifier", "type": "object" }, "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" } }, "required": [ "matched_identifiers" ] }
- Fields:
- field matched_identifiers: list[CandidateIdentifier] [Required][source]#
The input identifiers that matched this candidate.
- pydantic model app.domain.references.models.models.CandidateReference[source]#
Hydrated bibliographic fields of a candidate reference.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifier

An external identifier used as candidate-search input and match \
provenance.

Narrows :class:`GenericExternalIdentifier` to require an explicit type;
candidate search does not accept \
database-id (untyped) lookups.
"];
"app.domain.references.models.models.CandidateReference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateReference</b></td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>authors</td><td port="authors">list[str]</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>identifiers</td><td port="identifiers">list[CandidateIdentifier]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateReference

Hydrated bibliographic fields of a candidate reference.
"];
"app.domain.references.models.models.CandidateReference":identifiers:e -> "app.domain.references.models.models.CandidateIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-992e76495c2ca576cf1912b5b6396db51e69cda2.png)
Show JSON schema
{ "title": "CandidateReference", "description": "Hydrated bibliographic fields of a candidate reference.", "type": "object", "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Title" }, "authors": { "items": { "type": "string" }, "title": "Authors", "type": "array" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Publication Year" }, "identifiers": { "items": { "$ref": "#/$defs/CandidateIdentifier" }, "title": "Identifiers", "type": "array" } }, "$defs": { "CandidateIdentifier": { "description": "An external identifier used as candidate-search input and match provenance.\n\nNarrows :class:`GenericExternalIdentifier` to require an explicit type;\ncandidate search does not accept database-id (untyped) lookups.", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "$ref": "#/$defs/ExternalIdentifierType", "description": "The type of the identifier, e.g. doi, pm_id, open_alex." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "required": [ "identifier", "identifier_type" ], "title": "CandidateIdentifier", "type": "object" }, "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" } } }
- Fields:
- field identifiers: list[CandidateIdentifier] [Optional][source]#
- pydantic model app.domain.references.models.models.CandidateSelectionDiagnostics[source]#
Retrieval diagnostics for evaluation.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateSelectionDiagnostics" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateSelectionDiagnostics</b></td></tr><tr><td>es_took_ms</td><td port="es_took_ms">int | None</td></tr><tr><td>es_total_hits</td><td port="es_total_hits">int | None</td></tr><tr><td>es_returned</td><td port="es_returned">int</td></tr><tr><td>identifier_returned</td><td port="identifier_returned">int</td></tr><tr><td>candidate_count</td><td port="candidate_count">int</td></tr><tr><td>truncated</td><td port="truncated">bool</td></tr><tr><td>kth_es_score</td><td port="kth_es_score">float | None</td></tr><tr><td>lowest_es_score</td><td port="lowest_es_score">float | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateSelectionDiagnostics

Retrieval diagnostics for evaluation.
"];
}](../../_images/graphviz-707e414e20eccc700910f49e898039768ed7f11a.png)
Show JSON schema
{ "title": "CandidateSelectionDiagnostics", "description": "Retrieval diagnostics for evaluation.", "type": "object", "properties": { "es_took_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Es Took Ms" }, "es_total_hits": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Es Total Hits" }, "es_returned": { "default": 0, "title": "Es Returned", "type": "integer" }, "identifier_returned": { "default": 0, "title": "Identifier Returned", "type": "integer" }, "candidate_count": { "default": 0, "title": "Candidate Count", "type": "integer" }, "truncated": { "default": false, "title": "Truncated", "type": "boolean" }, "kth_es_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Kth Es Score" }, "lowest_es_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Lowest Es Score" } } }
- Fields:
- pydantic model app.domain.references.models.models.CandidateSelectionInput[source]#
The reference to find candidates for.
Provide exactly one of a stored
reference_id(projected into search fields server-side) or an inline set of candidate-search fields.Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifier

An external identifier used as candidate-search input and match \
provenance.

Narrows :class:`GenericExternalIdentifier` to require an explicit type;
candidate search does not accept \
database-id (untyped) lookups.
"];
"app.domain.references.models.models.CandidateSelectionInput" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateSelectionInput</b></td></tr><tr><td>reference_id</td><td port="reference_id">UUID | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>authors</td><td port="authors">list[str]</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>identifiers</td><td port="identifiers">list[CandidateIdentifier]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateSelectionInput

The reference to find candidates for.

Provide exactly \
one of a stored ``reference_id`` (projected into search
fields server-side) or an inline set of candidate-search fields.
"];
"app.domain.references.models.models.CandidateSelectionInput":identifiers:e -> "app.domain.references.models.models.CandidateIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-abb5400e014fad56ceb8ce49dcca66f25f94c00c.png)
Show JSON schema
{ "title": "CandidateSelectionInput", "description": "The reference to find candidates for.\n\nProvide exactly one of a stored ``reference_id`` (projected into search\nfields server-side) or an inline set of candidate-search fields.", "type": "object", "properties": { "reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "A stored reference to hydrate and project into search fields.", "title": "Reference Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title to search on.", "title": "Title" }, "authors": { "description": "The authors to search on.", "items": { "type": "string" }, "title": "Authors", "type": "array" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The publication year to search on.", "title": "Publication Year" }, "identifiers": { "description": "Identifiers to union with the Elasticsearch candidates.", "items": { "$ref": "#/$defs/CandidateIdentifier" }, "title": "Identifiers", "type": "array" } }, "$defs": { "CandidateIdentifier": { "description": "An external identifier used as candidate-search input and match provenance.\n\nNarrows :class:`GenericExternalIdentifier` to require an explicit type;\ncandidate search does not accept database-id (untyped) lookups.", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "$ref": "#/$defs/ExternalIdentifierType", "description": "The type of the identifier, e.g. doi, pm_id, open_alex." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "required": [ "identifier", "identifier_type" ], "title": "CandidateIdentifier", "type": "object" }, "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" } } }
- Fields:
- Validators:
validate_exactly_one_input_mode»all fields
- field identifiers: list[CandidateIdentifier] [Optional][source]#
Identifiers to union with the Elasticsearch candidates.
- Validated by:
- field reference_id: UUID | None = None[source]#
A stored reference to hydrate and project into search fields.
- Validated by:
- pydantic model app.domain.references.models.models.CandidateSelectionRequest[source]#
A request for candidate canonical references, for dedup evaluation.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CandidateIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifier

An external identifier used as candidate-search input and match \
provenance.

Narrows :class:`GenericExternalIdentifier` to require an explicit type;
candidate search does not accept \
database-id (untyped) lookups.
"];
"app.domain.references.models.models.CandidateSelectionInput" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateSelectionInput</b></td></tr><tr><td>reference_id</td><td port="reference_id">UUID | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>authors</td><td port="authors">list[str]</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>identifiers</td><td port="identifiers">list[CandidateIdentifier]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateSelectionInput

The reference to find candidates for.

Provide exactly \
one of a stored ``reference_id`` (projected into search
fields server-side) or an inline set of candidate-search fields.
"];
"app.domain.references.models.models.CandidateSelectionInput":identifiers:e -> "app.domain.references.models.models.CandidateIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateSelectionRequest" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateSelectionRequest</b></td></tr><tr><td>input</td><td port="input">CandidateSelectionInput</td></tr><tr><td>retrieval_policy</td><td port="retrieval_policy">RetrievalPolicyName</td></tr><tr><td>k</td><td port="k">int | None</td></tr><tr><td>hydrate</td><td port="hydrate">bool</td></tr><tr><td>track_total_hits</td><td port="track_total_hits">bool</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateSelectionRequest

A request for candidate canonical references, for dedup evaluation.&#\
xA;"];
"app.domain.references.models.models.CandidateSelectionRequest":input:e -> "app.domain.references.models.models.CandidateSelectionInput":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../../_images/graphviz-3df099ca4bf399f4758696cb4dca3962d5a86e29.png)
Show JSON schema
{ "title": "CandidateSelectionRequest", "description": "A request for candidate canonical references, for dedup evaluation.", "type": "object", "properties": { "input": { "$ref": "#/$defs/CandidateSelectionInput", "description": "The reference to find candidates for." }, "retrieval_policy": { "$ref": "#/$defs/RetrievalPolicyName", "default": "current_fuzzy_v1", "description": "Named, server-side retrieval policy fixing the full candidate regime (query shape, year strategy, identifier union). Defaults to the current fuzzy baseline." }, "k": { "anyOf": [ { "maximum": 1000, "minimum": 1, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of candidates to retrieve. Defaults to the configured value.", "title": "K" }, "hydrate": { "default": true, "description": "Include hydrated bibliographic fields on each candidate.", "title": "Hydrate", "type": "boolean" }, "track_total_hits": { "default": true, "description": "Exact total-hit count (true, past the ES 10k cap) or the Elasticsearch default lower bound (false, as on the nomination path).", "title": "Track Total Hits", "type": "boolean" } }, "$defs": { "CandidateIdentifier": { "description": "An external identifier used as candidate-search input and match provenance.\n\nNarrows :class:`GenericExternalIdentifier` to require an explicit type;\ncandidate search does not accept database-id (untyped) lookups.", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "$ref": "#/$defs/ExternalIdentifierType", "description": "The type of the identifier, e.g. doi, pm_id, open_alex." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "required": [ "identifier", "identifier_type" ], "title": "CandidateIdentifier", "type": "object" }, "CandidateSelectionInput": { "description": "The reference to find candidates for.\n\nProvide exactly one of a stored ``reference_id`` (projected into search\nfields server-side) or an inline set of candidate-search fields.", "properties": { "reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "A stored reference to hydrate and project into search fields.", "title": "Reference Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title to search on.", "title": "Title" }, "authors": { "description": "The authors to search on.", "items": { "type": "string" }, "title": "Authors", "type": "array" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The publication year to search on.", "title": "Publication Year" }, "identifiers": { "description": "Identifiers to union with the Elasticsearch candidates.", "items": { "$ref": "#/$defs/CandidateIdentifier" }, "title": "Identifiers", "type": "array" } }, "title": "CandidateSelectionInput", "type": "object" }, "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" }, "RetrievalPolicyName": { "description": "Named, versioned candidate-retrieval policies for the Candidate Selection API.\n\nEach value fixes a full retrieval regime (query shape, year strategy,\nidentifier union) under a stable name so recall@K stays comparable across\nruns. A name's semantics never change; a new regime gets a new name.", "enum": [ "current_fuzzy_v1", "no_year_filter_v1", "no_year_filter_year_optional_v1", "soft_year_decay_v1", "soft_year_decay_nonfuzzy_probe_v1" ], "title": "RetrievalPolicyName", "type": "string" } }, "additionalProperties": false, "required": [ "input" ] }
- Config:
extra: str = forbid
- Fields:
- field input: CandidateSelectionInput [Required][source]#
The reference to find candidates for.
- field k: int | None = None[source]#
Number of candidates to retrieve. Defaults to the configured value.
- Constraints:
ge = 1
le = 1000
- field retrieval_policy: RetrievalPolicyName = RetrievalPolicyName.CURRENT_FUZZY_V1[source]#
Named, server-side retrieval policy fixing the full candidate regime (query shape, year strategy, identifier union). Defaults to the current fuzzy baseline.
- pydantic model app.domain.references.models.models.CandidateSelectionResult[source]#
Ranked candidates and diagnostics for a candidate-selection request.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.Candidate" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Candidate</b></td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>rank</td><td port="rank">int</td></tr><tr><td>routes</td><td port="routes">list[CandidateElasticsearchRoute | CandidateIdentifierRoute]</td></tr><tr><td>reference</td><td port="reference">CandidateReference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Candidate

A candidate canonical reference with route provenance.
"];
"app.domain.references.models.models.CandidateElasticsearchRoute" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateElasticsearchRoute</b></td></tr><tr><td>type</td><td port="type">Literal['elasticsearch']</td></tr><tr><td>policy</td><td port="policy">str</td></tr><tr><td>rank</td><td port="rank">int</td></tr><tr><td>score</td><td port="score">float</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateElasticsearchRoute

Provenance for a candidate surfaced by the Elasticsearch \
query.
"];
"app.domain.references.models.models.Candidate":routes:e -> "app.domain.references.models.models.CandidateElasticsearchRoute":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateIdentifierRoute" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifierRoute</b></td></tr><tr><td>type</td><td port="type">Literal['identifier']</td></tr><tr><td>matched_identifiers</td><td port="matched_identifiers">list[CandidateIdentifier]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifierRoute

Provenance for a candidate surfaced by an exact identifier \
match.
"];
"app.domain.references.models.models.Candidate":routes:e -> "app.domain.references.models.models.CandidateIdentifierRoute":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateReference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateReference</b></td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>authors</td><td port="authors">list[str]</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>identifiers</td><td port="identifiers">list[CandidateIdentifier]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateReference

Hydrated bibliographic fields of a candidate reference.
"];
"app.domain.references.models.models.Candidate":reference:e -> "app.domain.references.models.models.CandidateReference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateIdentifier

An external identifier used as candidate-search input and match \
provenance.

Narrows :class:`GenericExternalIdentifier` to require an explicit type;
candidate search does not accept \
database-id (untyped) lookups.
"];
"app.domain.references.models.models.CandidateIdentifierRoute":matched_identifiers:e -> "app.domain.references.models.models.CandidateIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateReference":identifiers:e -> "app.domain.references.models.models.CandidateIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateSelectionDiagnostics" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateSelectionDiagnostics</b></td></tr><tr><td>es_took_ms</td><td port="es_took_ms">int | None</td></tr><tr><td>es_total_hits</td><td port="es_total_hits">int | None</td></tr><tr><td>es_returned</td><td port="es_returned">int</td></tr><tr><td>identifier_returned</td><td port="identifier_returned">int</td></tr><tr><td>candidate_count</td><td port="candidate_count">int</td></tr><tr><td>truncated</td><td port="truncated">bool</td></tr><tr><td>kth_es_score</td><td port="kth_es_score">float | None</td></tr><tr><td>lowest_es_score</td><td port="lowest_es_score">float | None</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateSelectionDiagnostics

Retrieval diagnostics for evaluation.
"];
"app.domain.references.models.models.CandidateSelectionResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CandidateSelectionResult</b></td></tr><tr><td>retrieval_policy</td><td port="retrieval_policy">RetrievalPolicyName</td></tr><tr><td>index_version</td><td port="index_version">str | None</td></tr><tr><td>k_requested</td><td port="k_requested">int</td></tr><tr><td>input_searchability</td><td port="input_searchability">InputSearchability</td></tr><tr><td>diagnostics</td><td port="diagnostics">CandidateSelectionDiagnostics</td></tr><tr><td>candidates</td><td port="candidates">list[Candidate]</td></tr></table>>,
tooltip="app.domain.references.models.models.CandidateSelectionResult

Ranked candidates and diagnostics for a candidate-selection \
request.
"];
"app.domain.references.models.models.CandidateSelectionResult":candidates:e -> "app.domain.references.models.models.Candidate":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.CandidateSelectionResult":diagnostics:e -> "app.domain.references.models.models.CandidateSelectionDiagnostics":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.InputSearchability" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>InputSearchability</b></td></tr><tr><td>searchable</td><td port="searchable">bool</td></tr><tr><td>reason</td><td port="reason">str</td></tr></table>>,
tooltip="app.domain.references.models.models.InputSearchability

Whether the input meets the Elasticsearch bibliographic searchability \
gate.
"];
"app.domain.references.models.models.CandidateSelectionResult":input_searchability:e -> "app.domain.references.models.models.InputSearchability":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../../_images/graphviz-b74703d651d7a0cf0383be2ab9c6e3af1a602f39.png)
Show JSON schema
{ "title": "CandidateSelectionResult", "description": "Ranked candidates and diagnostics for a candidate-selection request.", "type": "object", "properties": { "retrieval_policy": { "$ref": "#/$defs/RetrievalPolicyName", "default": "current_fuzzy_v1" }, "index_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The reference index version the candidates were drawn from.", "title": "Index Version" }, "k_requested": { "title": "K Requested", "type": "integer" }, "input_searchability": { "$ref": "#/$defs/InputSearchability" }, "diagnostics": { "$ref": "#/$defs/CandidateSelectionDiagnostics" }, "candidates": { "items": { "$ref": "#/$defs/Candidate" }, "title": "Candidates", "type": "array" } }, "$defs": { "Candidate": { "description": "A candidate canonical reference with route provenance.", "properties": { "reference_id": { "format": "uuid", "title": "Reference Id", "type": "string" }, "rank": { "description": "Overall rank across all routes (1-based).", "title": "Rank", "type": "integer" }, "routes": { "description": "How this candidate was surfaced (ES and/or identifier).", "items": { "discriminator": { "mapping": { "elasticsearch": "#/$defs/CandidateElasticsearchRoute", "identifier": "#/$defs/CandidateIdentifierRoute" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/CandidateElasticsearchRoute" }, { "$ref": "#/$defs/CandidateIdentifierRoute" } ] }, "title": "Routes", "type": "array" }, "reference": { "anyOf": [ { "$ref": "#/$defs/CandidateReference" }, { "type": "null" } ], "default": null, "description": "Hydrated bibliographic fields; omitted when hydrate is false." } }, "required": [ "reference_id", "rank", "routes" ], "title": "Candidate", "type": "object" }, "CandidateElasticsearchRoute": { "description": "Provenance for a candidate surfaced by the Elasticsearch query.", "properties": { "type": { "const": "elasticsearch", "default": "elasticsearch", "title": "Type", "type": "string" }, "policy": { "description": "The retrieval policy that surfaced the candidate.", "title": "Policy", "type": "string" }, "rank": { "description": "Rank within the Elasticsearch results (1-based).", "title": "Rank", "type": "integer" }, "score": { "description": "The Elasticsearch relevance score.", "title": "Score", "type": "number" } }, "required": [ "policy", "rank", "score" ], "title": "CandidateElasticsearchRoute", "type": "object" }, "CandidateIdentifier": { "description": "An external identifier used as candidate-search input and match provenance.\n\nNarrows :class:`GenericExternalIdentifier` to require an explicit type;\ncandidate search does not accept database-id (untyped) lookups.", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "$ref": "#/$defs/ExternalIdentifierType", "description": "The type of the identifier, e.g. doi, pm_id, open_alex." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "required": [ "identifier", "identifier_type" ], "title": "CandidateIdentifier", "type": "object" }, "CandidateIdentifierRoute": { "description": "Provenance for a candidate surfaced by an exact identifier match.", "properties": { "type": { "const": "identifier", "default": "identifier", "title": "Type", "type": "string" }, "matched_identifiers": { "description": "The input identifiers that matched this candidate.", "items": { "$ref": "#/$defs/CandidateIdentifier" }, "title": "Matched Identifiers", "type": "array" } }, "required": [ "matched_identifiers" ], "title": "CandidateIdentifierRoute", "type": "object" }, "CandidateReference": { "description": "Hydrated bibliographic fields of a candidate reference.", "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Title" }, "authors": { "items": { "type": "string" }, "title": "Authors", "type": "array" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Publication Year" }, "identifiers": { "items": { "$ref": "#/$defs/CandidateIdentifier" }, "title": "Identifiers", "type": "array" } }, "title": "CandidateReference", "type": "object" }, "CandidateSelectionDiagnostics": { "description": "Retrieval diagnostics for evaluation.", "properties": { "es_took_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Es Took Ms" }, "es_total_hits": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Es Total Hits" }, "es_returned": { "default": 0, "title": "Es Returned", "type": "integer" }, "identifier_returned": { "default": 0, "title": "Identifier Returned", "type": "integer" }, "candidate_count": { "default": 0, "title": "Candidate Count", "type": "integer" }, "truncated": { "default": false, "title": "Truncated", "type": "boolean" }, "kth_es_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Kth Es Score" }, "lowest_es_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Lowest Es Score" } }, "title": "CandidateSelectionDiagnostics", "type": "object" }, "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" }, "InputSearchability": { "description": "Whether the input meets the Elasticsearch bibliographic searchability gate.", "properties": { "searchable": { "description": "Whether the input meets the Elasticsearch searchability gate (title, authors, and publication year unless the selected retrieval policy makes it optional). Exact identifier matching runs regardless, so candidates may be present even when this is false.", "title": "Searchable", "type": "boolean" }, "reason": { "description": "Explanation of the searchability decision.", "title": "Reason", "type": "string" } }, "required": [ "searchable", "reason" ], "title": "InputSearchability", "type": "object" }, "RetrievalPolicyName": { "description": "Named, versioned candidate-retrieval policies for the Candidate Selection API.\n\nEach value fixes a full retrieval regime (query shape, year strategy,\nidentifier union) under a stable name so recall@K stays comparable across\nruns. A name's semantics never change; a new regime gets a new name.", "enum": [ "current_fuzzy_v1", "no_year_filter_v1", "no_year_filter_year_optional_v1", "soft_year_decay_v1", "soft_year_decay_nonfuzzy_probe_v1" ], "title": "RetrievalPolicyName", "type": "string" } }, "required": [ "k_requested", "input_searchability", "diagnostics" ] }
- Fields:
- field diagnostics: CandidateSelectionDiagnostics [Required][source]#
- field index_version: str | None = None[source]#
The reference index version the candidates were drawn from.
- field input_searchability: InputSearchability [Required][source]#
- field retrieval_policy: RetrievalPolicyName = RetrievalPolicyName.CURRENT_FUZZY_V1[source]#
- pydantic model app.domain.references.models.models.CrossFacetAxis[source]#
One resolved axis of a cross-facet aggregation.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CrossFacetAxis" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CrossFacetAxis</b></td></tr><tr><td>token</td><td port="token">str</td></tr><tr><td>facet_type</td><td port="facet_type">FacetType</td></tr><tr><td>include</td><td port="include">frozenset[str] | None</td></tr><tr><td>size</td><td port="size">int</td></tr></table>>,
tooltip="app.domain.references.models.models.CrossFacetAxis

One resolved axis of a cross-facet aggregation.
"];
}](../../_images/graphviz-0f4515589be4efabf140deb61340a9567d023941.png)
Show JSON schema
{ "title": "CrossFacetAxis", "description": "One resolved axis of a cross-facet aggregation.", "type": "object", "properties": { "token": { "description": "The original axis request string (literal or scheme URI).", "title": "Token", "type": "string" }, "facet_type": { "$ref": "#/$defs/FacetType", "description": "The facet whose field this axis aggregates on." }, "include": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "uniqueItems": true }, { "type": "null" } ], "description": "The concept URIs scoping a scheme axis (used as the terms ``include`` set). ``None`` for other axes, whose field domain is bounded.", "title": "Include" }, "size": { "description": "The terms ``size`` to request for this axis's bucket count.", "exclusiveMinimum": 0, "title": "Size", "type": "integer" } }, "$defs": { "FacetType": { "description": "A facet supported by the reference search facets endpoint.", "enum": [ "concepts", "countries", "country_wb_regions" ], "title": "FacetType", "type": "string" } }, "required": [ "token", "facet_type", "include", "size" ] }
- Config:
frozen: bool = True
- Fields:
- field include: frozenset[str] | None [Required][source]#
The concept URIs scoping a scheme axis (used as the terms
includeset).Nonefor other axes, whose field domain is bounded.
- pydantic model app.domain.references.models.models.CrossFacetCell[source]#
A single non-zero cell of a cross-facet matrix.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.CrossFacetCell" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>CrossFacetCell</b></td></tr><tr><td>axes</td><td port="axes">tuple[str, str]</td></tr><tr><td>count</td><td port="count">int</td></tr></table>>,
tooltip="app.domain.references.models.models.CrossFacetCell

A single non-zero cell of a cross-facet matrix.
"];
}](../../_images/graphviz-225bdb9d54909647fcef3978cf8baaa06d98e665.png)
Show JSON schema
{ "title": "CrossFacetCell", "description": "A single non-zero cell of a cross-facet matrix.", "type": "object", "properties": { "axes": { "description": "The cell's value on each axis, in requested axis order.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "string" }, { "type": "string" } ], "title": "Axes", "type": "array" }, "count": { "description": "References matching both axis values together.", "title": "Count", "type": "integer" } }, "required": [ "axes", "count" ] }
- Fields:
- class app.domain.references.models.models.DuplicateDetermination(*values)[source]#
The determination of whether a reference is a duplicate.
This encodes both a status and a determination.
- DECOUPLED = 'decoupled'[source]#
A decision has been made, but needs further attention. This could be due to a change in the canonical mapping, or a reference with existing duplicates being marked as a duplicate.
- EXACT_DUPLICATE = 'exact_duplicate'[source]#
[TERMINAL] The reference is an identical subset of another reference and has been removed. This is rare and generally occurs in repeated imports.
- NOMINATED = 'nominated'[source]#
Candidate canonicals have been identified for the reference and it is being further deduplicated.
- UNSEARCHABLE = 'unsearchable'[source]#
[TERMINAL] The reference does not have sufficient metadata to be automatically matched to other references, or the duplicate detection process has been explicitly disabled.
- classmethod get_terminal_states() set[DuplicateDetermination][source]#
Return the set of terminal DuplicateDetermination states.
- pydantic model app.domain.references.models.models.Enhancement[source]#
Core enhancement model with database attributes included.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.Enhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Enhancement</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>created_at</td><td port="created_at">datetime | None</td></tr><tr><td>updated_at</td><td port="updated_at">datetime | None</td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>derived_from</td><td port="derived_from">list[UUID] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Enhancement

Core enhancement model with database attributes included.
"];
"app.domain.references.models.models.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>blob</td><td port="blob">BlobStorageFile</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="app.domain.references.models.models.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.&#\
xA;
We separate this from the SDK model as it contains a file pointer, not
the URL to the file itself.
"];
"app.domain.references.models.models.Enhancement":content:e -> "app.domain.references.models.models.FullTextEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Reference</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[LinkedExternalIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[Enhancement] | None</td></tr><tr><td>duplicate_decision</td><td port="duplicate_decision">ReferenceDuplicateDecision | None</td></tr><tr><td>canonical_reference</td><td port="canonical_reference">Reference | None</td></tr><tr><td>duplicate_references</td><td port="duplicate_references">list[Reference] | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Reference

Core reference model with database attributes included.
"];
"app.domain.references.models.models.Enhancement":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>updated_date</td><td port="updated_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>pagination</td><td port="pagination">Pagination | None</td></tr><tr><td>publication_venue</td><td port="publication_venue">PublicationVenue | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.RawEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RawEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.RAW]</td></tr><tr><td>source_export_date</td><td port="source_export_date">datetime</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>metadata</td><td port="metadata">dict[str, Any]</td></tr><tr><td>data</td><td port="data">Any</td></tr></table>>,
tooltip="destiny_sdk.enhancements.RawEnhancement

An enhancement for storing raw/arbitrary/unstructured data.

Data in these \
enhancements is intended for future conversion into structured form.

This enhancement accepts any fields passed in to `\
data`. These enhancements cannot
be created by robots.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.RawEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceAssociationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.REFERENCE_ASSOCIATION]</td></tr><tr><td>associated_reference_ids</td><td port="associated_reference_ids">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | UUID | UUID]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement

An enhancement for storing associations between references.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.FullTextEnhancement":blob:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.LinkedExternalIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedExternalIdentifier</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>identifier</td><td port="identifier">DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedExternalIdentifier

External identifier model with database attributes included.&#\
xA;"];
"app.domain.references.models.models.LinkedExternalIdentifier":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":enhancements:e -> "app.domain.references.models.models.Enhancement":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":identifiers:e -> "app.domain.references.models.models.LinkedExternalIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":canonical_reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":duplicate_references:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceDuplicateDecision" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceDuplicateDecision</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>enhancement_id</td><td port="enhancement_id">UUID | None</td></tr><tr><td>active_decision</td><td port="active_decision">bool</td></tr><tr><td>candidate_canonical_ids</td><td port="candidate_canonical_ids">list[UUID]</td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">DuplicateDetermination</td></tr><tr><td>canonical_reference_id</td><td port="canonical_reference_id">UUID | None</td></tr><tr><td>detail</td><td port="detail">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceDuplicateDecision

Model representing a decision on whether a reference is \
a duplicate.
"];
"app.domain.references.models.models.Reference":duplicate_decision:e -> "app.domain.references.models.models.ReferenceDuplicateDecision":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Pagination" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Pagination</b></td></tr><tr><td>volume</td><td port="volume">str | None</td></tr><tr><td>issue</td><td port="issue">str | None</td></tr><tr><td>first_page</td><td port="first_page">str | None</td></tr><tr><td>last_page</td><td port="last_page">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Pagination

Pagination information for journal articles.

Maps to OpenAlex's work.biblio \
object. All fields are strings to match
OpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":pagination:e -> "destiny_sdk.enhancements.Pagination":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.PublicationVenue" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationVenue</b></td></tr><tr><td>display_name</td><td port="display_name">str | None</td></tr><tr><td>venue_type</td><td port="venue_type">PublicationVenueType | None</td></tr><tr><td>issn</td><td port="issn">list[str] | None</td></tr><tr><td>issn_l</td><td port="issn_l">str | None</td></tr><tr><td>host_organization_name</td><td port="host_organization_name">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.PublicationVenue

A publication venue (journal, repository, conference, etc.).
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":publication_venue:e -> "destiny_sdk.enhancements.PublicationVenue":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-c4a4f33c6dce3750cb8716ce69bbde86c4041471.png)
Show JSON schema
{ "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "updated_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date of the last OpenAlex update to this metadata", "title": "Updated Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "pagination": { "anyOf": [ { "$ref": "#/$defs/Pagination" }, { "type": "null" } ], "default": null, "description": "Pagination info (volume, issue, pages)." }, "publication_venue": { "anyOf": [ { "$ref": "#/$defs/PublicationVenue" }, { "type": "null" } ], "default": null, "description": "Publication venue information (journal, repository, etc.)." } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "DuplicateDetermination": { "description": "The determination of whether a reference is a duplicate.\n\nThis encodes both a status and a determination.", "enum": [ "pending", "nominated", "duplicate", "exact_duplicate", "canonical", "unresolved", "unsearchable", "decoupled" ], "title": "DuplicateDetermination", "type": "string" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "Enhancement": { "description": "Core enhancement model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "created_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was created.", "title": "Created At" }, "updated_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was last updated.", "title": "Updated At" }, "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "robot_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Robot Version" }, "derived_from": { "anyOf": [ { "items": { "format": "uuid", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of enhancement IDs that this enhancement was derived from.", "title": "Derived From" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "full_text": "#/$defs/FullTextEnhancement", "linked_data": "#/$defs/LinkedDataEnhancement", "location": "#/$defs/LocationEnhancement", "raw": "#/$defs/RawEnhancement", "reference_association": "#/$defs/ReferenceAssociationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" }, { "$ref": "#/$defs/ReferenceAssociationEnhancement" }, { "$ref": "#/$defs/LinkedDataEnhancement" }, { "$ref": "#/$defs/FullTextEnhancement" }, { "$ref": "#/$defs/RawEnhancement" } ], "title": "Content" }, "reference_id": { "description": "The ID of the reference this enhancement is associated with.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this enhancement is associated with." } }, "required": [ "source", "visibility", "content", "reference_id" ], "title": "Enhancement", "type": "object" }, "FullTextEnhancement": { "description": "An enhancement for storing a link to the full text and its metadata.\n\nWe separate this from the SDK model as it contains a file pointer, not\nthe URL to the file itself.", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "blob": { "$ref": "#/$defs/BlobStorageFile", "description": "Blob storage pointer to the full text file." }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "required": [ "blob" ], "title": "FullTextEnhancement", "type": "object" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "LinkedExternalIdentifier": { "description": "External identifier model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "identifier": { "description": "The identifier itself.", "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ], "title": "Identifier" }, "reference_id": { "description": "The ID of the reference this identifier identifies.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this identifier identifies." } }, "required": [ "identifier", "reference_id" ], "title": "LinkedExternalIdentifier", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "Pagination": { "description": "Pagination information for journal articles.\n\nMaps to OpenAlex's work.biblio object. All fields are strings to match\nOpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".", "properties": { "volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The volume number of the journal/publication.", "title": "Volume" }, "issue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The issue number of the journal/publication.", "title": "Issue" }, "first_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The first page number of the reference in the publication.", "title": "First Page" }, "last_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The last page number of the reference in the publication.", "title": "Last Page" } }, "title": "Pagination", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "PublicationVenue": { "description": "A publication venue (journal, repository, conference, etc.).", "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The display name of the venue (journal name, repository name, etc.)", "title": "Display Name" }, "venue_type": { "anyOf": [ { "$ref": "#/$defs/PublicationVenueType" }, { "type": "null" } ], "default": null, "description": "The type of venue: journal, repository, book, conference, etc." }, "issn": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of ISSNs associated with this venue (print and electronic)", "title": "Issn" }, "issn_l": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The linking ISSN - a canonical ISSN for the venue across format changes", "title": "Issn L" }, "host_organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Display name of the host organization (publisher)", "title": "Host Organization Name" } }, "title": "PublicationVenue", "type": "object" }, "PublicationVenueType": { "description": "Type of publication venue.\n\nAligns with OpenAlex source types.", "enum": [ "journal", "repository", "conference", "ebook_platform", "book_series", "other" ], "title": "PublicationVenueType", "type": "string" }, "RawEnhancement": { "description": "An enhancement for storing raw/arbitrary/unstructured data.\n\nData in these enhancements is intended for future conversion into structured form.\n\nThis enhancement accepts any fields passed in to `data`. These enhancements cannot\nbe created by robots.", "properties": { "enhancement_type": { "const": "raw", "default": "raw", "title": "Enhancement Type", "type": "string" }, "source_export_date": { "description": "Date the enhancement data was retrieved.", "format": "date-time", "title": "Source Export Date", "type": "string" }, "description": { "description": "Description of the data to aid in future refinement.", "title": "Description", "type": "string" }, "metadata": { "additionalProperties": true, "description": "Additional metadata to aid in future structuring of raw data", "title": "Metadata", "type": "object" }, "data": { "description": "Unstructured data for later processing.", "title": "Data" } }, "required": [ "source_export_date", "description", "data" ], "title": "RawEnhancement", "type": "object" }, "Reference": { "description": "Core reference model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "anyOf": [ { "items": { "$ref": "#/$defs/LinkedExternalIdentifier" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `LinkedExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/Enhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" }, "duplicate_decision": { "anyOf": [ { "$ref": "#/$defs/ReferenceDuplicateDecision" }, { "type": "null" } ], "default": null, "description": "The current active duplicate decision for this reference. If None, either duplicate_decision has not been preloaded or the duplicate status is pending." }, "canonical_reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The canonical reference that this reference is a duplicate of" }, "duplicate_references": { "anyOf": [ { "items": { "$ref": "#/$defs/Reference" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of references that this reference duplicates", "title": "Duplicate References" } }, "title": "Reference", "type": "object" }, "ReferenceAssociationEnhancement": { "description": "An enhancement for storing associations between references.", "properties": { "enhancement_type": { "const": "reference_association", "default": "reference_association", "title": "Enhancement Type", "type": "string" }, "associated_reference_ids": { "description": "A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.", "items": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." } ] }, "minItems": 1, "title": "Associated Reference Ids", "type": "array" }, "association_type": { "$ref": "#/$defs/ReferenceAssociationType", "description": "The type of association between this reference and the associated ones. Direction is important: \"this reference <association_type> associated reference\"." } }, "required": [ "associated_reference_ids", "association_type" ], "title": "ReferenceAssociationEnhancement", "type": "object" }, "ReferenceAssociationType": { "description": "The type of association between references.\n\nDirection is important: \"this reference <association_type> associated reference\".", "enum": [ "cites", "is_cited_by", "is_similar_to" ], "title": "ReferenceAssociationType", "type": "string" }, "ReferenceDuplicateDecision": { "description": "Model representing a decision on whether a reference is a duplicate.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference being evaluated.", "format": "uuid", "title": "Reference Id", "type": "string" }, "enhancement_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement that triggered this duplicate decision, if any.", "title": "Enhancement Id" }, "active_decision": { "default": false, "description": "Whether this is the active decision for the reference.", "title": "Active Decision", "type": "boolean" }, "candidate_canonical_ids": { "description": "A list of candidate canonical IDs for the reference.", "items": { "format": "uuid", "type": "string" }, "title": "Candidate Canonical Ids", "type": "array" }, "duplicate_determination": { "$ref": "#/$defs/DuplicateDetermination", "default": "pending", "description": "The duplicate status of the reference." }, "canonical_reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the canonical reference this reference duplicates.", "title": "Canonical Reference Id" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional additional detail about the decision.", "title": "Detail" } }, "required": [ "reference_id" ], "title": "ReferenceDuplicateDecision", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).\n\nTODO: Implement data governance layer to manage this.", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "$ref": "#/$defs/Enhancement" }
- Config:
from_attributes: bool = True
- Fields:
- field content: Annotated[BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement, FieldInfo(annotation=NoneType, required=True, discriminator='enhancement_type')] [Required][source]#
The content of the enhancement.
- field created_at: datetime.datetime | None = None[source]#
The timestamp at which the object was created.
- field derived_from: list[UUID] | None = None[source]#
List of enhancement IDs that this enhancement was derived from.
- field reference: Reference | None = None[source]#
The reference this enhancement is associated with.
- field reference_id: UUID [Required][source]#
The ID of the reference this enhancement is associated with.
- field robot_version: str | None = None[source]#
The version of the robot that generated the content.
- field updated_at: datetime.datetime | None = None[source]#
The timestamp at which the object was last updated.
- field visibility: Visibility [Required][source]#
The level of visibility of the enhancement
- pydantic model app.domain.references.models.models.EnhancementRequest[source]#
Request to add enhancements to a list of references.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.EnhancementRequest" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementRequest</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_ids</td><td port="reference_ids">list[UUID]</td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>request_status</td><td port="request_status">EnhancementRequestStatus</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>enhancement_parameters</td><td port="enhancement_parameters">dict | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr><tr><td>reference_data_file</td><td port="reference_data_file">BlobStorageFile | None</td></tr><tr><td>result_file</td><td port="result_file">BlobStorageFile | None</td></tr><tr><td>validation_result_file</td><td port="validation_result_file">BlobStorageFile | None</td></tr><tr><td>pending_enhancements</td><td port="pending_enhancements">list[PendingEnhancement] | None</td></tr></table>>,
tooltip="app.domain.references.models.models.EnhancementRequest

Request to add enhancements to a list of references.
"];
"app.domain.references.models.models.PendingEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PendingEnhancement</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>enhancement_request_id</td><td port="enhancement_request_id">UUID | None</td></tr><tr><td>robot_enhancement_batch_id</td><td port="robot_enhancement_batch_id">UUID | None</td></tr><tr><td>status</td><td port="status">PendingEnhancementStatus</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>expires_at</td><td port="expires_at">datetime</td></tr><tr><td>retry_of</td><td port="retry_of">UUID | None</td></tr></table>>,
tooltip="app.domain.references.models.models.PendingEnhancement

A pending enhancement.
"];
"app.domain.references.models.models.EnhancementRequest":pending_enhancements:e -> "app.domain.references.models.models.PendingEnhancement":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.EnhancementRequest":reference_data_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.EnhancementRequest":result_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.EnhancementRequest":validation_result_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-571d2eafd67fdd23ffc9672350807f4228d415ba.png)
Show JSON schema
{ "title": "EnhancementRequest", "description": "Request to add enhancements to a list of references.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_ids": { "description": "The IDs of the references these enhancements are associated with.", "items": { "format": "uuid", "type": "string" }, "title": "Reference Ids", "type": "array" }, "robot_id": { "description": "The robot to request the enhancement from.", "format": "uuid", "title": "Robot Id", "type": "string" }, "request_status": { "$ref": "#/$defs/EnhancementRequestStatus", "default": "received", "description": "The status of the request to create an enhancement." }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source of the batch enhancement request.", "title": "Source" }, "enhancement_parameters": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Additional optional parameters to pass through to the robot.", "title": "Enhancement Parameters" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\nProcedural error affecting all references encountered during the enhancement process.\nErrors for individual references are provided <TBC>.\n", "title": "Error" }, "reference_data_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file containing the reference data for the robot." }, "result_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file containing the result data from the robot." }, "validation_result_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file containing the validation result data from the robot." }, "pending_enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/PendingEnhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of pending enhancements for the request.", "title": "Pending Enhancements" } }, "$defs": { "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "EnhancementRequestStatus": { "description": "The status of an enhancement request.", "enum": [ "received", "accepted", "processing", "rejected", "partial_failed", "failed", "importing", "indexing", "indexing_failed", "completed" ], "title": "EnhancementRequestStatus", "type": "string" }, "PendingEnhancement": { "description": "A pending enhancement.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference to be enhanced.", "format": "uuid", "title": "Reference Id", "type": "string" }, "robot_id": { "description": "The ID of the robot that will perform the enhancement.", "format": "uuid", "title": "Robot Id", "type": "string" }, "enhancement_request_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the batch enhancement request that this pending enhancement belongs to.", "title": "Enhancement Request Id" }, "robot_enhancement_batch_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the robot enhancement batch that this pending enhancement belongs to.", "title": "Robot Enhancement Batch Id" }, "status": { "$ref": "#/$defs/PendingEnhancementStatus", "default": "pending", "description": "The status of the pending enhancement." }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source of the pending enhancement for provenance tracking, if not an enhancement request.", "title": "Source" }, "expires_at": { "default": "1970-01-01T00:00:00Z", "description": "The datetime at which the pending enhancement expires.", "format": "date-time", "title": "Expires At", "type": "string" }, "retry_of": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the pending enhancement that this is a retry of, if any.", "title": "Retry Of" } }, "required": [ "reference_id", "robot_id" ], "title": "PendingEnhancement", "type": "object" }, "PendingEnhancementStatus": { "description": "The status of a pending enhancement.\n\n**Allowed values**:\n- `pending`: Enhancement is waiting to be processed.\n- `processing`: Enhancement is currently being processed.\n- `importing`: Enhancement is currently being imported.\n- `indexing`: Enhancement is currently being indexed.\n- `indexing_failed`: Enhancement indexing has failed.\n- `discarded`: Enhancement has been discarded as an exact duplicate.\n- `completed`: Enhancement has been processed successfully.\n- `failed`: Enhancement processing has failed.\n- `expired`: Enhancement lease has expired during processing.", "enum": [ "pending", "processing", "importing", "indexing", "indexing_failed", "discarded", "completed", "failed", "expired" ], "title": "PendingEnhancementStatus", "type": "string" } }, "required": [ "reference_ids", "robot_id" ] }
- Config:
from_attributes: bool = True
- Fields:
pending_enhancements (list[app.domain.references.models.models.PendingEnhancement] | None)reference_data_file (app.persistence.blob.models.BlobStorageFile | None)request_status (app.domain.references.models.models.EnhancementRequestStatus)result_file (app.persistence.blob.models.BlobStorageFile | None)validation_result_file (app.persistence.blob.models.BlobStorageFile | None)
- field enhancement_parameters: dict | None = None[source]#
Additional optional parameters to pass through to the robot.
- field error: str | None = None[source]#
Procedural error affecting all references encountered during the enhancement process. Errors for individual references are provided <TBC>.
- field pending_enhancements: list[PendingEnhancement] | None = None[source]#
List of pending enhancements for the request.
- field reference_data_file: BlobStorageFile | None = None[source]#
The file containing the reference data for the robot.
- field reference_ids: list[UUID] [Required][source]#
The IDs of the references these enhancements are associated with.
- field request_status: EnhancementRequestStatus = EnhancementRequestStatus.RECEIVED[source]#
The status of the request to create an enhancement.
- field result_file: BlobStorageFile | None = None[source]#
The file containing the result data from the robot.
- field validation_result_file: BlobStorageFile | None = None[source]#
The file containing the validation result data from the robot.
- class app.domain.references.models.models.EnhancementRequestStatus(*values)[source]#
The status of an enhancement request.
- pydantic model app.domain.references.models.models.Export[source]#
A queued job that produces a downloadable file of references.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.Export" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Export</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>export_format</td><td port="export_format">ExportFormat</td></tr><tr><td>status</td><td port="status">ExportStatus</td></tr><tr><td>result_file</td><td port="result_file">BlobStorageFile | None</td></tr><tr><td>n_references</td><td port="n_references">int | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Export

A queued job that produces a downloadable file of references.
"];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.Export":result_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-50e534f1728d76069c1ab6a50426ea6798fe4a09.png)
Show JSON schema
{ "title": "Export", "description": "A queued job that produces a downloadable file of references.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "export_format": { "$ref": "#/$defs/ExportFormat", "default": "jsonl", "description": "The serialization format of the produced file." }, "status": { "$ref": "#/$defs/ExportStatus", "default": "pending", "description": "The current status of the export job." }, "result_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file produced by the job, once completed." }, "n_references": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of references in the produced file.", "title": "N References" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error message, if the job failed.", "title": "Error" } }, "$defs": { "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "ExportFormat": { "description": "The serialization format of a reference export.", "enum": [ "jsonl", "ris" ], "title": "ExportFormat", "type": "string" }, "ExportStatus": { "description": "The status of an export job.", "enum": [ "pending", "running", "completed", "failed" ], "title": "ExportStatus", "type": "string" } } }
- Config:
from_attributes: bool = True
- Fields:
- field export_format: ExportFormat = ExportFormat.JSONL[source]#
The serialization format of the produced file.
- field result_file: BlobStorageFile | None = None[source]#
The file produced by the job, once completed.
- field status: ExportStatus = ExportStatus.PENDING[source]#
The current status of the export job.
- class app.domain.references.models.models.ExportFormat(*values)[source]#
The serialization format of a reference export.
- class app.domain.references.models.models.ExportStatus(*values)[source]#
The status of an export job.
- class app.domain.references.models.models.FacetType(*values)[source]#
A facet supported by the reference search facets endpoint.
- pydantic model app.domain.references.models.models.FullTextEnhancement[source]#
An enhancement for storing a link to the full text and its metadata.
We separate this from the SDK model as it contains a file pointer, not the URL to the file itself.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>blob</td><td port="blob">BlobStorageFile</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="app.domain.references.models.models.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.&#\
xA;
We separate this from the SDK model as it contains a file pointer, not
the URL to the file itself.
"];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.FullTextEnhancement":blob:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../../_images/graphviz-f198bd65255da8b01cbd3d155d9f0dbcf3b0df89.png)
Show JSON schema
{ "title": "FullTextEnhancement", "description": "An enhancement for storing a link to the full text and its metadata.\n\nWe separate this from the SDK model as it contains a file pointer, not\nthe URL to the file itself.", "type": "object", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "blob": { "$ref": "#/$defs/BlobStorageFile", "description": "Blob storage pointer to the full text file." }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "$defs": { "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" } }, "required": [ "blob" ] }
- field blob: BlobStorageFile [Required][source]#
Blob storage pointer to the full text file.
- field byte_size: int | None = None[source]#
Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.
- field is_oa: bool | None = None[source]#
If this full text is Open Access. May be left as null if this is unknown.
- field retrieved_at: datetime | None = None[source]#
The timestamp when this full text was retrieved.
- field sha256_checksum: str | None = None[source]#
SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.
- field source_url: HttpUrl | None = None[source]#
The URL of the source from which this full text was obtained.
- field version: DriverVersion | None = None[source]#
The version (according to the DRIVER versioning scheme) of this full text.
- pydantic model app.domain.references.models.models.GenericExternalIdentifier[source]#
Generic external identifier model for all subtypes.
The identifier is casted to a string for all inheriters.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.GenericExternalIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>GenericExternalIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType | None</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.GenericExternalIdentifier

Generic external identifier model for all subtypes.
&#\
xA;The identifier is casted to a string for all inheriters.
"];
}](../../_images/graphviz-9c76a215b2464a24fa7b976183f409b9d98b7baf.png)
Show JSON schema
{ "title": "GenericExternalIdentifier", "description": "Generic external identifier model for all subtypes.\n\nThe identifier is casted to a string for all inheriters.", "type": "object", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "anyOf": [ { "$ref": "#/$defs/ExternalIdentifierType" }, { "type": "null" } ], "description": "The type of the identifier. If None, identifier is a database id." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "$defs": { "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" } }, "required": [ "identifier", "identifier_type" ] }
- Fields:
- field identifier_type: ExternalIdentifierType | None [Required][source]#
The type of the identifier. If None, identifier is a database id.
- classmethod from_specific(external_identifier: Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')]) Self[source]#
Create a generic external identifier from a specific implementation.
- pydantic model app.domain.references.models.models.IdentifierLookup[source]#
Model to search for an external identifier.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.IdentifierLookup" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>IdentifierLookup</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">ExternalIdentifierType | None</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.IdentifierLookup

Model to search for an external identifier.
"];
}](../../_images/graphviz-2d3b2e7cc3b734d3ea209049477aceb4bdae2852.png)
Show JSON schema
{ "title": "IdentifierLookup", "description": "Model to search for an external identifier.", "type": "object", "properties": { "identifier": { "description": "The identifier itself.", "title": "Identifier", "type": "string" }, "identifier_type": { "anyOf": [ { "$ref": "#/$defs/ExternalIdentifierType" }, { "type": "null" } ], "description": "The type of the identifier. If None, identifier is a database id." }, "other_identifier_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the other identifier.", "title": "Other Identifier Name" } }, "$defs": { "ExternalIdentifierType": { "description": "The type of identifier used to identify a reference.\n\nThis is used to identify the type of identifier used in the `ExternalIdentifier`\nclass.", "enum": [ "doi", "eric", "pm_id", "pro_quest", "open_alex", "other" ], "title": "ExternalIdentifierType", "type": "string" } }, "required": [ "identifier", "identifier_type" ] }
- field identifier_type: ExternalIdentifierType | None [Required][source]#
The type of the identifier. If None, identifier is a database id.
- classmethod from_generic(identifier: GenericExternalIdentifier) Self[source]#
Build a lookup from a loosely-typed identifier, validating and canonicalising.
Raises
pydantic.ValidationErrorif the value is not a valid identifier of its declared type.
- classmethod from_specific(external_identifier: Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')]) Self[source]#
Create a generic external identifier from a specific implementation.
- pydantic model app.domain.references.models.models.InputSearchability[source]#
Whether the input meets the Elasticsearch bibliographic searchability gate.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.InputSearchability" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>InputSearchability</b></td></tr><tr><td>searchable</td><td port="searchable">bool</td></tr><tr><td>reason</td><td port="reason">str</td></tr></table>>,
tooltip="app.domain.references.models.models.InputSearchability

Whether the input meets the Elasticsearch bibliographic searchability \
gate.
"];
}](../../_images/graphviz-2cf8203e83e3fd7287ff86ef83dbfcaae19a5eb1.png)
Show JSON schema
{ "title": "InputSearchability", "description": "Whether the input meets the Elasticsearch bibliographic searchability gate.", "type": "object", "properties": { "searchable": { "description": "Whether the input meets the Elasticsearch searchability gate (title, authors, and publication year unless the selected retrieval policy makes it optional). Exact identifier matching runs regardless, so candidates may be present even when this is false.", "title": "Searchable", "type": "boolean" }, "reason": { "description": "Explanation of the searchability decision.", "title": "Reason", "type": "string" } }, "required": [ "searchable", "reason" ] }
- Fields:
- pydantic model app.domain.references.models.models.LinkedDataConceptFilter[source]#
A set of fully-qualified concept URIs to match on
linked_data_concepts.Within a single filter, references must carry at least one of the listed URIs (logical OR). Multiple filters on a query are ANDed together.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.LinkedDataConceptFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataConceptFilter</b></td></tr><tr><td>concept_uris</td><td port="concept_uris">list[str]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataConceptFilter

A set of fully-qualified concept URIs to match on ``linked_\
data_concepts``.

Within a single filter, references must carry at least one of the listed URIs
(logical OR). Multiple \
filters on a query are ANDed together.
"];
}](../../_images/graphviz-e8a43ad183b4e08ad844fa20e25c6cc646dd2772.png)
Show JSON schema
{ "title": "LinkedDataConceptFilter", "description": "A set of fully-qualified concept URIs to match on ``linked_data_concepts``.\n\nWithin a single filter, references must carry at least one of the listed URIs\n(logical OR). Multiple filters on a query are ANDed together.", "type": "object", "properties": { "concept_uris": { "description": "Concept URIs to match. At least one must appear on the reference.", "items": { "type": "string" }, "minItems": 1, "title": "Concept Uris", "type": "array" } }, "required": [ "concept_uris" ] }
- Fields:
- pydantic model app.domain.references.models.models.LinkedDataCountryFilter[source]#
A set of ISO 3166-1 alpha-2 codes to match on
linked_data_countries.OR within a filter; AND between filters.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.LinkedDataCountryFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataCountryFilter</b></td></tr><tr><td>country_codes</td><td port="country_codes">list[str]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataCountryFilter

A set of ISO 3166-1 alpha-2 codes to match on ``linked_data_\
countries``.

OR within a filter; AND between filters.
"];
}](../../_images/graphviz-8a712aef6c5a554d6df186adf2a99a0364e2864e.png)
Show JSON schema
{ "title": "LinkedDataCountryFilter", "description": "A set of ISO 3166-1 alpha-2 codes to match on ``linked_data_countries``.\n\nOR within a filter; AND between filters.", "type": "object", "properties": { "country_codes": { "description": "ISO 3166-1 alpha-2 country codes. At least one must appear on the reference.", "items": { "pattern": "^[A-Z]{2}$", "type": "string" }, "minItems": 1, "title": "Country Codes", "type": "array" } }, "required": [ "country_codes" ] }
- Fields:
- field country_codes: list[~typing.Annotated[str, ~pydantic.types.StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=^[A-Z]{2}$)]] [Required][source]#
ISO 3166-1 alpha-2 country codes. At least one must appear on the reference.
- Constraints:
min_length = 1
- pydantic model app.domain.references.models.models.LinkedDataCountryWBRegionFilter[source]#
A set of World Bank region IDs to match on
linked_data_country_wb_regions.OR within a filter; AND between filters.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.LinkedDataCountryWBRegionFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataCountryWBRegionFilter</b></td></tr><tr><td>region_ids</td><td port="region_ids">list[Literal['EAS', 'ECS', 'LCN', 'MEA', 'NAC', 'SAS', 'SSF']]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataCountryWBRegionFilter

A set of World Bank region IDs to match on ``linked_\
data_country_wb_regions``.

OR within a filter; AND between filters.
"];
}](../../_images/graphviz-a4243d92419b6bb90ffc113af873e9e3fa1ee637.png)
Show JSON schema
{ "title": "LinkedDataCountryWBRegionFilter", "description": "A set of World Bank region IDs to match on ``linked_data_country_wb_regions``.\n\nOR within a filter; AND between filters.", "type": "object", "properties": { "region_ids": { "description": "World Bank region IDs. At least one must appear on the reference.", "items": { "enum": [ "EAS", "ECS", "LCN", "MEA", "NAC", "SAS", "SSF" ], "type": "string" }, "minItems": 1, "title": "Region Ids", "type": "array" } }, "required": [ "region_ids" ] }
- pydantic model app.domain.references.models.models.LinkedDataProjection[source]#
Result of projecting a LinkedDataEnhancement into flat searchable fields.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.LinkedDataProjection" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataProjection</b></td></tr><tr><td>concepts</td><td port="concepts">set[str]</td></tr><tr><td>labels</td><td port="labels">set[str]</td></tr><tr><td>evaluated_properties</td><td port="evaluated_properties">set[str]</td></tr><tr><td>countries</td><td port="countries">set[str]</td></tr><tr><td>country_wb_regions</td><td port="country_wb_regions">set[str]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataProjection

Result of projecting a LinkedDataEnhancement into flat searchable \
fields.
"];
}](../../_images/graphviz-3e28a024a87d2bec6cb4ac1d6068eed2ebd3984d.png)
Show JSON schema
{ "title": "LinkedDataProjection", "description": "Result of projecting a LinkedDataEnhancement into flat searchable fields.", "type": "object", "properties": { "concepts": { "items": { "type": "string" }, "title": "Concepts", "type": "array", "uniqueItems": true }, "labels": { "items": { "type": "string" }, "title": "Labels", "type": "array", "uniqueItems": true }, "evaluated_properties": { "items": { "type": "string" }, "title": "Evaluated Properties", "type": "array", "uniqueItems": true }, "countries": { "items": { "type": "string" }, "title": "Countries", "type": "array", "uniqueItems": true }, "country_wb_regions": { "items": { "type": "string" }, "title": "Country Wb Regions", "type": "array", "uniqueItems": true } } }
- Fields:
- pydantic model app.domain.references.models.models.LinkedExternalIdentifier[source]#
External identifier model with database attributes included.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.Enhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Enhancement</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>created_at</td><td port="created_at">datetime | None</td></tr><tr><td>updated_at</td><td port="updated_at">datetime | None</td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>derived_from</td><td port="derived_from">list[UUID] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Enhancement

Core enhancement model with database attributes included.
"];
"app.domain.references.models.models.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>blob</td><td port="blob">BlobStorageFile</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="app.domain.references.models.models.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.&#\
xA;
We separate this from the SDK model as it contains a file pointer, not
the URL to the file itself.
"];
"app.domain.references.models.models.Enhancement":content:e -> "app.domain.references.models.models.FullTextEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Reference</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[LinkedExternalIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[Enhancement] | None</td></tr><tr><td>duplicate_decision</td><td port="duplicate_decision">ReferenceDuplicateDecision | None</td></tr><tr><td>canonical_reference</td><td port="canonical_reference">Reference | None</td></tr><tr><td>duplicate_references</td><td port="duplicate_references">list[Reference] | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Reference

Core reference model with database attributes included.
"];
"app.domain.references.models.models.Enhancement":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>updated_date</td><td port="updated_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>pagination</td><td port="pagination">Pagination | None</td></tr><tr><td>publication_venue</td><td port="publication_venue">PublicationVenue | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.RawEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RawEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.RAW]</td></tr><tr><td>source_export_date</td><td port="source_export_date">datetime</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>metadata</td><td port="metadata">dict[str, Any]</td></tr><tr><td>data</td><td port="data">Any</td></tr></table>>,
tooltip="destiny_sdk.enhancements.RawEnhancement

An enhancement for storing raw/arbitrary/unstructured data.

Data in these \
enhancements is intended for future conversion into structured form.

This enhancement accepts any fields passed in to `\
data`. These enhancements cannot
be created by robots.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.RawEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceAssociationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.REFERENCE_ASSOCIATION]</td></tr><tr><td>associated_reference_ids</td><td port="associated_reference_ids">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | UUID | UUID]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement

An enhancement for storing associations between references.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.FullTextEnhancement":blob:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.LinkedExternalIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedExternalIdentifier</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>identifier</td><td port="identifier">DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedExternalIdentifier

External identifier model with database attributes included.&#\
xA;"];
"app.domain.references.models.models.LinkedExternalIdentifier":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":enhancements:e -> "app.domain.references.models.models.Enhancement":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":identifiers:e -> "app.domain.references.models.models.LinkedExternalIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":canonical_reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":duplicate_references:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceDuplicateDecision" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceDuplicateDecision</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>enhancement_id</td><td port="enhancement_id">UUID | None</td></tr><tr><td>active_decision</td><td port="active_decision">bool</td></tr><tr><td>candidate_canonical_ids</td><td port="candidate_canonical_ids">list[UUID]</td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">DuplicateDetermination</td></tr><tr><td>canonical_reference_id</td><td port="canonical_reference_id">UUID | None</td></tr><tr><td>detail</td><td port="detail">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceDuplicateDecision

Model representing a decision on whether a reference is \
a duplicate.
"];
"app.domain.references.models.models.Reference":duplicate_decision:e -> "app.domain.references.models.models.ReferenceDuplicateDecision":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Pagination" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Pagination</b></td></tr><tr><td>volume</td><td port="volume">str | None</td></tr><tr><td>issue</td><td port="issue">str | None</td></tr><tr><td>first_page</td><td port="first_page">str | None</td></tr><tr><td>last_page</td><td port="last_page">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Pagination

Pagination information for journal articles.

Maps to OpenAlex's work.biblio \
object. All fields are strings to match
OpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":pagination:e -> "destiny_sdk.enhancements.Pagination":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.PublicationVenue" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationVenue</b></td></tr><tr><td>display_name</td><td port="display_name">str | None</td></tr><tr><td>venue_type</td><td port="venue_type">PublicationVenueType | None</td></tr><tr><td>issn</td><td port="issn">list[str] | None</td></tr><tr><td>issn_l</td><td port="issn_l">str | None</td></tr><tr><td>host_organization_name</td><td port="host_organization_name">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.PublicationVenue

A publication venue (journal, repository, conference, etc.).
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":publication_venue:e -> "destiny_sdk.enhancements.PublicationVenue":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-c4a4f33c6dce3750cb8716ce69bbde86c4041471.png)
Show JSON schema
{ "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "updated_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date of the last OpenAlex update to this metadata", "title": "Updated Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "pagination": { "anyOf": [ { "$ref": "#/$defs/Pagination" }, { "type": "null" } ], "default": null, "description": "Pagination info (volume, issue, pages)." }, "publication_venue": { "anyOf": [ { "$ref": "#/$defs/PublicationVenue" }, { "type": "null" } ], "default": null, "description": "Publication venue information (journal, repository, etc.)." } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "DuplicateDetermination": { "description": "The determination of whether a reference is a duplicate.\n\nThis encodes both a status and a determination.", "enum": [ "pending", "nominated", "duplicate", "exact_duplicate", "canonical", "unresolved", "unsearchable", "decoupled" ], "title": "DuplicateDetermination", "type": "string" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "Enhancement": { "description": "Core enhancement model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "created_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was created.", "title": "Created At" }, "updated_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was last updated.", "title": "Updated At" }, "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "robot_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Robot Version" }, "derived_from": { "anyOf": [ { "items": { "format": "uuid", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of enhancement IDs that this enhancement was derived from.", "title": "Derived From" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "full_text": "#/$defs/FullTextEnhancement", "linked_data": "#/$defs/LinkedDataEnhancement", "location": "#/$defs/LocationEnhancement", "raw": "#/$defs/RawEnhancement", "reference_association": "#/$defs/ReferenceAssociationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" }, { "$ref": "#/$defs/ReferenceAssociationEnhancement" }, { "$ref": "#/$defs/LinkedDataEnhancement" }, { "$ref": "#/$defs/FullTextEnhancement" }, { "$ref": "#/$defs/RawEnhancement" } ], "title": "Content" }, "reference_id": { "description": "The ID of the reference this enhancement is associated with.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this enhancement is associated with." } }, "required": [ "source", "visibility", "content", "reference_id" ], "title": "Enhancement", "type": "object" }, "FullTextEnhancement": { "description": "An enhancement for storing a link to the full text and its metadata.\n\nWe separate this from the SDK model as it contains a file pointer, not\nthe URL to the file itself.", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "blob": { "$ref": "#/$defs/BlobStorageFile", "description": "Blob storage pointer to the full text file." }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "required": [ "blob" ], "title": "FullTextEnhancement", "type": "object" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "LinkedExternalIdentifier": { "description": "External identifier model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "identifier": { "description": "The identifier itself.", "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ], "title": "Identifier" }, "reference_id": { "description": "The ID of the reference this identifier identifies.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this identifier identifies." } }, "required": [ "identifier", "reference_id" ], "title": "LinkedExternalIdentifier", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "Pagination": { "description": "Pagination information for journal articles.\n\nMaps to OpenAlex's work.biblio object. All fields are strings to match\nOpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".", "properties": { "volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The volume number of the journal/publication.", "title": "Volume" }, "issue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The issue number of the journal/publication.", "title": "Issue" }, "first_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The first page number of the reference in the publication.", "title": "First Page" }, "last_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The last page number of the reference in the publication.", "title": "Last Page" } }, "title": "Pagination", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "PublicationVenue": { "description": "A publication venue (journal, repository, conference, etc.).", "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The display name of the venue (journal name, repository name, etc.)", "title": "Display Name" }, "venue_type": { "anyOf": [ { "$ref": "#/$defs/PublicationVenueType" }, { "type": "null" } ], "default": null, "description": "The type of venue: journal, repository, book, conference, etc." }, "issn": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of ISSNs associated with this venue (print and electronic)", "title": "Issn" }, "issn_l": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The linking ISSN - a canonical ISSN for the venue across format changes", "title": "Issn L" }, "host_organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Display name of the host organization (publisher)", "title": "Host Organization Name" } }, "title": "PublicationVenue", "type": "object" }, "PublicationVenueType": { "description": "Type of publication venue.\n\nAligns with OpenAlex source types.", "enum": [ "journal", "repository", "conference", "ebook_platform", "book_series", "other" ], "title": "PublicationVenueType", "type": "string" }, "RawEnhancement": { "description": "An enhancement for storing raw/arbitrary/unstructured data.\n\nData in these enhancements is intended for future conversion into structured form.\n\nThis enhancement accepts any fields passed in to `data`. These enhancements cannot\nbe created by robots.", "properties": { "enhancement_type": { "const": "raw", "default": "raw", "title": "Enhancement Type", "type": "string" }, "source_export_date": { "description": "Date the enhancement data was retrieved.", "format": "date-time", "title": "Source Export Date", "type": "string" }, "description": { "description": "Description of the data to aid in future refinement.", "title": "Description", "type": "string" }, "metadata": { "additionalProperties": true, "description": "Additional metadata to aid in future structuring of raw data", "title": "Metadata", "type": "object" }, "data": { "description": "Unstructured data for later processing.", "title": "Data" } }, "required": [ "source_export_date", "description", "data" ], "title": "RawEnhancement", "type": "object" }, "Reference": { "description": "Core reference model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "anyOf": [ { "items": { "$ref": "#/$defs/LinkedExternalIdentifier" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `LinkedExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/Enhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" }, "duplicate_decision": { "anyOf": [ { "$ref": "#/$defs/ReferenceDuplicateDecision" }, { "type": "null" } ], "default": null, "description": "The current active duplicate decision for this reference. If None, either duplicate_decision has not been preloaded or the duplicate status is pending." }, "canonical_reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The canonical reference that this reference is a duplicate of" }, "duplicate_references": { "anyOf": [ { "items": { "$ref": "#/$defs/Reference" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of references that this reference duplicates", "title": "Duplicate References" } }, "title": "Reference", "type": "object" }, "ReferenceAssociationEnhancement": { "description": "An enhancement for storing associations between references.", "properties": { "enhancement_type": { "const": "reference_association", "default": "reference_association", "title": "Enhancement Type", "type": "string" }, "associated_reference_ids": { "description": "A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.", "items": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." } ] }, "minItems": 1, "title": "Associated Reference Ids", "type": "array" }, "association_type": { "$ref": "#/$defs/ReferenceAssociationType", "description": "The type of association between this reference and the associated ones. Direction is important: \"this reference <association_type> associated reference\"." } }, "required": [ "associated_reference_ids", "association_type" ], "title": "ReferenceAssociationEnhancement", "type": "object" }, "ReferenceAssociationType": { "description": "The type of association between references.\n\nDirection is important: \"this reference <association_type> associated reference\".", "enum": [ "cites", "is_cited_by", "is_similar_to" ], "title": "ReferenceAssociationType", "type": "string" }, "ReferenceDuplicateDecision": { "description": "Model representing a decision on whether a reference is a duplicate.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference being evaluated.", "format": "uuid", "title": "Reference Id", "type": "string" }, "enhancement_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement that triggered this duplicate decision, if any.", "title": "Enhancement Id" }, "active_decision": { "default": false, "description": "Whether this is the active decision for the reference.", "title": "Active Decision", "type": "boolean" }, "candidate_canonical_ids": { "description": "A list of candidate canonical IDs for the reference.", "items": { "format": "uuid", "type": "string" }, "title": "Candidate Canonical Ids", "type": "array" }, "duplicate_determination": { "$ref": "#/$defs/DuplicateDetermination", "default": "pending", "description": "The duplicate status of the reference." }, "canonical_reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the canonical reference this reference duplicates.", "title": "Canonical Reference Id" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional additional detail about the decision.", "title": "Detail" } }, "required": [ "reference_id" ], "title": "ReferenceDuplicateDecision", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).\n\nTODO: Implement data governance layer to manage this.", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "$ref": "#/$defs/LinkedExternalIdentifier" }
- Config:
from_attributes: bool = True
- Fields:
- field identifier: Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')] [Required][source]#
The identifier itself.
- pydantic model app.domain.references.models.models.PendingEnhancement[source]#
A pending enhancement.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.PendingEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PendingEnhancement</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>enhancement_request_id</td><td port="enhancement_request_id">UUID | None</td></tr><tr><td>robot_enhancement_batch_id</td><td port="robot_enhancement_batch_id">UUID | None</td></tr><tr><td>status</td><td port="status">PendingEnhancementStatus</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>expires_at</td><td port="expires_at">datetime</td></tr><tr><td>retry_of</td><td port="retry_of">UUID | None</td></tr></table>>,
tooltip="app.domain.references.models.models.PendingEnhancement

A pending enhancement.
"];
}](../../_images/graphviz-b58f67ddd4ed1ac8ed67e8bdaf1554ec4cf92c71.png)
Show JSON schema
{ "title": "PendingEnhancement", "description": "A pending enhancement.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference to be enhanced.", "format": "uuid", "title": "Reference Id", "type": "string" }, "robot_id": { "description": "The ID of the robot that will perform the enhancement.", "format": "uuid", "title": "Robot Id", "type": "string" }, "enhancement_request_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the batch enhancement request that this pending enhancement belongs to.", "title": "Enhancement Request Id" }, "robot_enhancement_batch_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the robot enhancement batch that this pending enhancement belongs to.", "title": "Robot Enhancement Batch Id" }, "status": { "$ref": "#/$defs/PendingEnhancementStatus", "default": "pending", "description": "The status of the pending enhancement." }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source of the pending enhancement for provenance tracking, if not an enhancement request.", "title": "Source" }, "expires_at": { "default": "1970-01-01T00:00:00Z", "description": "The datetime at which the pending enhancement expires.", "format": "date-time", "title": "Expires At", "type": "string" }, "retry_of": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the pending enhancement that this is a retry of, if any.", "title": "Retry Of" } }, "$defs": { "PendingEnhancementStatus": { "description": "The status of a pending enhancement.\n\n**Allowed values**:\n- `pending`: Enhancement is waiting to be processed.\n- `processing`: Enhancement is currently being processed.\n- `importing`: Enhancement is currently being imported.\n- `indexing`: Enhancement is currently being indexed.\n- `indexing_failed`: Enhancement indexing has failed.\n- `discarded`: Enhancement has been discarded as an exact duplicate.\n- `completed`: Enhancement has been processed successfully.\n- `failed`: Enhancement processing has failed.\n- `expired`: Enhancement lease has expired during processing.", "enum": [ "pending", "processing", "importing", "indexing", "indexing_failed", "discarded", "completed", "failed", "expired" ], "title": "PendingEnhancementStatus", "type": "string" } }, "required": [ "reference_id", "robot_id" ] }
- Config:
from_attributes: bool = True
- Fields:
- Validators:
check_enhancement_request_or_source_present»all fields
- field enhancement_request_id: UUID | None = None[source]#
The ID of the batch enhancement request that this pending enhancement belongs to.
- Validated by:
- field expires_at: datetime = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)[source]#
The datetime at which the pending enhancement expires.
- Validated by:
- field retry_of: UUID | None = None[source]#
The ID of the pending enhancement that this is a retry of, if any.
- Validated by:
- field robot_enhancement_batch_id: UUID | None = None[source]#
The ID of the robot enhancement batch that this pending enhancement belongs to.
- Validated by:
- field robot_id: UUID [Required][source]#
The ID of the robot that will perform the enhancement.
- Validated by:
- field source: str | None = None[source]#
The source of the pending enhancement for provenance tracking, if not an enhancement request.
- Validated by:
- field status: PendingEnhancementStatus = PendingEnhancementStatus.PENDING[source]#
The status of the pending enhancement.
- Validated by:
- validator set_expires_at » expires_at[source]#
Allow setting expires_at as a timedelta from now on instantiation.
- class app.domain.references.models.models.PendingEnhancementStatus(*values)[source]#
The status of a pending enhancement.
Allowed values: - pending: Enhancement is waiting to be processed. - processing: Enhancement is currently being processed. - importing: Enhancement is currently being imported. - indexing: Enhancement is currently being indexed. - indexing_failed: Enhancement indexing has failed. - discarded: Enhancement has been discarded as an exact duplicate. - completed: Enhancement has been processed successfully. - failed: Enhancement processing has failed. - expired: Enhancement lease has expired during processing.
- can_transition_to(new_status: StateMachineType) bool[source]#
Check if transition from current status to new status is allowed.
- Args:
new_status: The target status to transition to
- Returns:
True if transition is allowed, False otherwise
- guard_transition(new_status: StateMachineType, entity_id: object) None[source]#
Guard against invalid state transitions.
Raises StateTransitionError if transition is not allowed.
- Args:
new_status: The target status to transition to entity_id: The ID of the entity attempting the transition
- Raises:
StateTransitionError: If the transition is not allowed
- classmethod transitions() dict[PendingEnhancementStatus, set[PendingEnhancementStatus]][source]#
Define the allowed state transitions for pending enhancements.
Returns a mapping of current status to set of allowed next statuses. Empty set means the status is terminal (no transitions allowed).
stateDiagram-v2 PENDING --> PROCESSING PROCESSING --> IMPORTING PROCESSING --> EXPIRED PROCESSING --> FAILED IMPORTING --> INDEXING IMPORTING --> DISCARDED IMPORTING --> FAILED INDEXING --> COMPLETED INDEXING --> INDEXING_FAILED
- pydantic model app.domain.references.models.models.PublicationYearRange[source]#
A range of publication years for filtering search results.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.PublicationYearRange" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationYearRange</b></td></tr><tr><td>start</td><td port="start">int | None</td></tr><tr><td>end</td><td port="end">int | None</td></tr></table>>,
tooltip="app.domain.references.models.models.PublicationYearRange

A range of publication years for filtering search results.
"];
}](../../_images/graphviz-adb2a27712b9ecd95b3c51e9eeb1ed8afad43610.png)
Show JSON schema
{ "title": "PublicationYearRange", "description": "A range of publication years for filtering search results.", "type": "object", "properties": { "start": { "anyOf": [ { "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Start year (inclusive)", "title": "Start" }, "end": { "anyOf": [ { "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "End year (inclusive)", "title": "End" } } }
- Fields:
- Validators:
validate_end_ge_start»all fields
- pydantic model app.domain.references.models.models.Reference[source]#
Core reference model with database attributes included.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.Enhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Enhancement</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>created_at</td><td port="created_at">datetime | None</td></tr><tr><td>updated_at</td><td port="updated_at">datetime | None</td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>derived_from</td><td port="derived_from">list[UUID] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Enhancement

Core enhancement model with database attributes included.
"];
"app.domain.references.models.models.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>blob</td><td port="blob">BlobStorageFile</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="app.domain.references.models.models.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.&#\
xA;
We separate this from the SDK model as it contains a file pointer, not
the URL to the file itself.
"];
"app.domain.references.models.models.Enhancement":content:e -> "app.domain.references.models.models.FullTextEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Reference</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[LinkedExternalIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[Enhancement] | None</td></tr><tr><td>duplicate_decision</td><td port="duplicate_decision">ReferenceDuplicateDecision | None</td></tr><tr><td>canonical_reference</td><td port="canonical_reference">Reference | None</td></tr><tr><td>duplicate_references</td><td port="duplicate_references">list[Reference] | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Reference

Core reference model with database attributes included.
"];
"app.domain.references.models.models.Enhancement":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>updated_date</td><td port="updated_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>pagination</td><td port="pagination">Pagination | None</td></tr><tr><td>publication_venue</td><td port="publication_venue">PublicationVenue | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.RawEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RawEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.RAW]</td></tr><tr><td>source_export_date</td><td port="source_export_date">datetime</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>metadata</td><td port="metadata">dict[str, Any]</td></tr><tr><td>data</td><td port="data">Any</td></tr></table>>,
tooltip="destiny_sdk.enhancements.RawEnhancement

An enhancement for storing raw/arbitrary/unstructured data.

Data in these \
enhancements is intended for future conversion into structured form.

This enhancement accepts any fields passed in to `\
data`. These enhancements cannot
be created by robots.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.RawEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceAssociationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.REFERENCE_ASSOCIATION]</td></tr><tr><td>associated_reference_ids</td><td port="associated_reference_ids">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | UUID | UUID]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement

An enhancement for storing associations between references.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.FullTextEnhancement":blob:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.LinkedExternalIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedExternalIdentifier</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>identifier</td><td port="identifier">DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedExternalIdentifier

External identifier model with database attributes included.&#\
xA;"];
"app.domain.references.models.models.LinkedExternalIdentifier":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":enhancements:e -> "app.domain.references.models.models.Enhancement":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":identifiers:e -> "app.domain.references.models.models.LinkedExternalIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":canonical_reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":duplicate_references:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceDuplicateDecision" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceDuplicateDecision</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>enhancement_id</td><td port="enhancement_id">UUID | None</td></tr><tr><td>active_decision</td><td port="active_decision">bool</td></tr><tr><td>candidate_canonical_ids</td><td port="candidate_canonical_ids">list[UUID]</td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">DuplicateDetermination</td></tr><tr><td>canonical_reference_id</td><td port="canonical_reference_id">UUID | None</td></tr><tr><td>detail</td><td port="detail">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceDuplicateDecision

Model representing a decision on whether a reference is \
a duplicate.
"];
"app.domain.references.models.models.Reference":duplicate_decision:e -> "app.domain.references.models.models.ReferenceDuplicateDecision":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Pagination" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Pagination</b></td></tr><tr><td>volume</td><td port="volume">str | None</td></tr><tr><td>issue</td><td port="issue">str | None</td></tr><tr><td>first_page</td><td port="first_page">str | None</td></tr><tr><td>last_page</td><td port="last_page">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Pagination

Pagination information for journal articles.

Maps to OpenAlex's work.biblio \
object. All fields are strings to match
OpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":pagination:e -> "destiny_sdk.enhancements.Pagination":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.PublicationVenue" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationVenue</b></td></tr><tr><td>display_name</td><td port="display_name">str | None</td></tr><tr><td>venue_type</td><td port="venue_type">PublicationVenueType | None</td></tr><tr><td>issn</td><td port="issn">list[str] | None</td></tr><tr><td>issn_l</td><td port="issn_l">str | None</td></tr><tr><td>host_organization_name</td><td port="host_organization_name">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.PublicationVenue

A publication venue (journal, repository, conference, etc.).
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":publication_venue:e -> "destiny_sdk.enhancements.PublicationVenue":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-c4a4f33c6dce3750cb8716ce69bbde86c4041471.png)
Show JSON schema
{ "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "updated_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date of the last OpenAlex update to this metadata", "title": "Updated Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "pagination": { "anyOf": [ { "$ref": "#/$defs/Pagination" }, { "type": "null" } ], "default": null, "description": "Pagination info (volume, issue, pages)." }, "publication_venue": { "anyOf": [ { "$ref": "#/$defs/PublicationVenue" }, { "type": "null" } ], "default": null, "description": "Publication venue information (journal, repository, etc.)." } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "DuplicateDetermination": { "description": "The determination of whether a reference is a duplicate.\n\nThis encodes both a status and a determination.", "enum": [ "pending", "nominated", "duplicate", "exact_duplicate", "canonical", "unresolved", "unsearchable", "decoupled" ], "title": "DuplicateDetermination", "type": "string" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "Enhancement": { "description": "Core enhancement model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "created_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was created.", "title": "Created At" }, "updated_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was last updated.", "title": "Updated At" }, "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "robot_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Robot Version" }, "derived_from": { "anyOf": [ { "items": { "format": "uuid", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of enhancement IDs that this enhancement was derived from.", "title": "Derived From" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "full_text": "#/$defs/FullTextEnhancement", "linked_data": "#/$defs/LinkedDataEnhancement", "location": "#/$defs/LocationEnhancement", "raw": "#/$defs/RawEnhancement", "reference_association": "#/$defs/ReferenceAssociationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" }, { "$ref": "#/$defs/ReferenceAssociationEnhancement" }, { "$ref": "#/$defs/LinkedDataEnhancement" }, { "$ref": "#/$defs/FullTextEnhancement" }, { "$ref": "#/$defs/RawEnhancement" } ], "title": "Content" }, "reference_id": { "description": "The ID of the reference this enhancement is associated with.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this enhancement is associated with." } }, "required": [ "source", "visibility", "content", "reference_id" ], "title": "Enhancement", "type": "object" }, "FullTextEnhancement": { "description": "An enhancement for storing a link to the full text and its metadata.\n\nWe separate this from the SDK model as it contains a file pointer, not\nthe URL to the file itself.", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "blob": { "$ref": "#/$defs/BlobStorageFile", "description": "Blob storage pointer to the full text file." }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "required": [ "blob" ], "title": "FullTextEnhancement", "type": "object" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "LinkedExternalIdentifier": { "description": "External identifier model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "identifier": { "description": "The identifier itself.", "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ], "title": "Identifier" }, "reference_id": { "description": "The ID of the reference this identifier identifies.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this identifier identifies." } }, "required": [ "identifier", "reference_id" ], "title": "LinkedExternalIdentifier", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "Pagination": { "description": "Pagination information for journal articles.\n\nMaps to OpenAlex's work.biblio object. All fields are strings to match\nOpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".", "properties": { "volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The volume number of the journal/publication.", "title": "Volume" }, "issue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The issue number of the journal/publication.", "title": "Issue" }, "first_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The first page number of the reference in the publication.", "title": "First Page" }, "last_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The last page number of the reference in the publication.", "title": "Last Page" } }, "title": "Pagination", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "PublicationVenue": { "description": "A publication venue (journal, repository, conference, etc.).", "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The display name of the venue (journal name, repository name, etc.)", "title": "Display Name" }, "venue_type": { "anyOf": [ { "$ref": "#/$defs/PublicationVenueType" }, { "type": "null" } ], "default": null, "description": "The type of venue: journal, repository, book, conference, etc." }, "issn": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of ISSNs associated with this venue (print and electronic)", "title": "Issn" }, "issn_l": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The linking ISSN - a canonical ISSN for the venue across format changes", "title": "Issn L" }, "host_organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Display name of the host organization (publisher)", "title": "Host Organization Name" } }, "title": "PublicationVenue", "type": "object" }, "PublicationVenueType": { "description": "Type of publication venue.\n\nAligns with OpenAlex source types.", "enum": [ "journal", "repository", "conference", "ebook_platform", "book_series", "other" ], "title": "PublicationVenueType", "type": "string" }, "RawEnhancement": { "description": "An enhancement for storing raw/arbitrary/unstructured data.\n\nData in these enhancements is intended for future conversion into structured form.\n\nThis enhancement accepts any fields passed in to `data`. These enhancements cannot\nbe created by robots.", "properties": { "enhancement_type": { "const": "raw", "default": "raw", "title": "Enhancement Type", "type": "string" }, "source_export_date": { "description": "Date the enhancement data was retrieved.", "format": "date-time", "title": "Source Export Date", "type": "string" }, "description": { "description": "Description of the data to aid in future refinement.", "title": "Description", "type": "string" }, "metadata": { "additionalProperties": true, "description": "Additional metadata to aid in future structuring of raw data", "title": "Metadata", "type": "object" }, "data": { "description": "Unstructured data for later processing.", "title": "Data" } }, "required": [ "source_export_date", "description", "data" ], "title": "RawEnhancement", "type": "object" }, "Reference": { "description": "Core reference model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "anyOf": [ { "items": { "$ref": "#/$defs/LinkedExternalIdentifier" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `LinkedExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/Enhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" }, "duplicate_decision": { "anyOf": [ { "$ref": "#/$defs/ReferenceDuplicateDecision" }, { "type": "null" } ], "default": null, "description": "The current active duplicate decision for this reference. If None, either duplicate_decision has not been preloaded or the duplicate status is pending." }, "canonical_reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The canonical reference that this reference is a duplicate of" }, "duplicate_references": { "anyOf": [ { "items": { "$ref": "#/$defs/Reference" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of references that this reference duplicates", "title": "Duplicate References" } }, "title": "Reference", "type": "object" }, "ReferenceAssociationEnhancement": { "description": "An enhancement for storing associations between references.", "properties": { "enhancement_type": { "const": "reference_association", "default": "reference_association", "title": "Enhancement Type", "type": "string" }, "associated_reference_ids": { "description": "A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.", "items": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." } ] }, "minItems": 1, "title": "Associated Reference Ids", "type": "array" }, "association_type": { "$ref": "#/$defs/ReferenceAssociationType", "description": "The type of association between this reference and the associated ones. Direction is important: \"this reference <association_type> associated reference\"." } }, "required": [ "associated_reference_ids", "association_type" ], "title": "ReferenceAssociationEnhancement", "type": "object" }, "ReferenceAssociationType": { "description": "The type of association between references.\n\nDirection is important: \"this reference <association_type> associated reference\".", "enum": [ "cites", "is_cited_by", "is_similar_to" ], "title": "ReferenceAssociationType", "type": "string" }, "ReferenceDuplicateDecision": { "description": "Model representing a decision on whether a reference is a duplicate.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference being evaluated.", "format": "uuid", "title": "Reference Id", "type": "string" }, "enhancement_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement that triggered this duplicate decision, if any.", "title": "Enhancement Id" }, "active_decision": { "default": false, "description": "Whether this is the active decision for the reference.", "title": "Active Decision", "type": "boolean" }, "candidate_canonical_ids": { "description": "A list of candidate canonical IDs for the reference.", "items": { "format": "uuid", "type": "string" }, "title": "Candidate Canonical Ids", "type": "array" }, "duplicate_determination": { "$ref": "#/$defs/DuplicateDetermination", "default": "pending", "description": "The duplicate status of the reference." }, "canonical_reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the canonical reference this reference duplicates.", "title": "Canonical Reference Id" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional additional detail about the decision.", "title": "Detail" } }, "required": [ "reference_id" ], "title": "ReferenceDuplicateDecision", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).\n\nTODO: Implement data governance layer to manage this.", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "$ref": "#/$defs/Reference" }
- Config:
from_attributes: bool = True
- Fields:
canonical_reference (app.domain.references.models.models.Reference | None)duplicate_decision (app.domain.references.models.models.ReferenceDuplicateDecision | None)duplicate_references (list[app.domain.references.models.models.Reference] | None)enhancements (list[app.domain.references.models.models.Enhancement] | None)identifiers (list[app.domain.references.models.models.LinkedExternalIdentifier] | None)
- field canonical_reference: Reference | None = None[source]#
The canonical reference that this reference is a duplicate of
- field duplicate_decision: ReferenceDuplicateDecision | None = None[source]#
The current active duplicate decision for this reference. If None, either duplicate_decision has not been preloaded or the duplicate status is pending.
- field duplicate_references: list[Reference] | None = None[source]#
A list of references that this reference duplicates
- field enhancements: list[Enhancement] | None = None[source]#
A list of enhancements for the reference
- field identifiers: list[LinkedExternalIdentifier] | None = None[source]#
A list of LinkedExternalIdentifiers for the Reference
- field visibility: Visibility = Visibility.PUBLIC[source]#
The level of visibility of the reference
- check_serializability() None[source]#
Check that incoming SDK model is json-serializable.
This should be called during all domain model conversions.
- Raises:
ValidationError: If the model is not json-serializable.
- is_superset(reference: Reference) bool[source]#
Check if this Reference is a superset of the given Reference.
This compares enhancements, identifiers and visibility, removing persistence differences (eg database ids), to verify if the content is identical. If the given Reference has anything unique, this will return False.
- Parameters:
reference (Reference) – The reference to compare against.
- Returns:
True if the given Reference is a subset of this Reference, else False.
- Return type:
bool
- property has_duplicates: bool | None[source]#
Whether this reference has any duplicate references pointing to it.
Will return None if duplicate references are not preloaded.
- pydantic model app.domain.references.models.models.ReferenceDuplicateDecision[source]#
Model representing a decision on whether a reference is a duplicate.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.ReferenceDuplicateDecision" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceDuplicateDecision</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>enhancement_id</td><td port="enhancement_id">UUID | None</td></tr><tr><td>active_decision</td><td port="active_decision">bool</td></tr><tr><td>candidate_canonical_ids</td><td port="candidate_canonical_ids">list[UUID]</td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">DuplicateDetermination</td></tr><tr><td>canonical_reference_id</td><td port="canonical_reference_id">UUID | None</td></tr><tr><td>detail</td><td port="detail">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceDuplicateDecision

Model representing a decision on whether a reference is \
a duplicate.
"];
}](../../_images/graphviz-2aa00d27d7eb829791283a7083cd9ffd99a5c9ae.png)
Show JSON schema
{ "title": "ReferenceDuplicateDecision", "description": "Model representing a decision on whether a reference is a duplicate.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference being evaluated.", "format": "uuid", "title": "Reference Id", "type": "string" }, "enhancement_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement that triggered this duplicate decision, if any.", "title": "Enhancement Id" }, "active_decision": { "default": false, "description": "Whether this is the active decision for the reference.", "title": "Active Decision", "type": "boolean" }, "candidate_canonical_ids": { "description": "A list of candidate canonical IDs for the reference.", "items": { "format": "uuid", "type": "string" }, "title": "Candidate Canonical Ids", "type": "array" }, "duplicate_determination": { "$ref": "#/$defs/DuplicateDetermination", "default": "pending", "description": "The duplicate status of the reference." }, "canonical_reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the canonical reference this reference duplicates.", "title": "Canonical Reference Id" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional additional detail about the decision.", "title": "Detail" } }, "$defs": { "DuplicateDetermination": { "description": "The determination of whether a reference is a duplicate.\n\nThis encodes both a status and a determination.", "enum": [ "pending", "nominated", "duplicate", "exact_duplicate", "canonical", "unresolved", "unsearchable", "decoupled" ], "title": "DuplicateDetermination", "type": "string" } }, "required": [ "reference_id" ] }
- Config:
from_attributes: bool = True
- Fields:
- Validators:
check_active_decision_is_terminal»all fieldscheck_canonical_reference_id_populated_iff_duplicate»all fields
- field candidate_canonical_ids: list[UUID] [Optional][source]#
A list of candidate canonical IDs for the reference.
- field canonical_reference_id: UUID | None = None[source]#
The ID of the canonical reference this reference duplicates.
- field duplicate_determination: DuplicateDetermination = DuplicateDetermination.PENDING[source]#
The duplicate status of the reference.
- field enhancement_id: UUID | None = None[source]#
The ID of the enhancement that triggered this duplicate decision, if any.
- validator check_active_decision_is_terminal » all fields[source]#
Assert that active decisions are only set for terminal states.
- pydantic model app.domain.references.models.models.ReferenceDuplicateDeterminationResult[source]#
Model representing the result of a duplicate determination.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.ReferenceDuplicateDeterminationResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceDuplicateDeterminationResult</b></td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">Literal[DuplicateDetermination.CANONICAL, DuplicateDetermination.DUPLICATE, DuplicateDetermination.UNRESOLVED, DuplicateDetermination.UNSEARCHABLE]</td></tr><tr><td>canonical_reference_id</td><td port="canonical_reference_id">UUID | None</td></tr><tr><td>detail</td><td port="detail">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceDuplicateDeterminationResult

Model representing the result of a duplicate \
determination.
"];
}](../../_images/graphviz-0dc2e4683b6bae54954ba8bce0002c04fedb27a6.png)
Show JSON schema
{ "title": "ReferenceDuplicateDeterminationResult", "description": "Model representing the result of a duplicate determination.", "type": "object", "properties": { "duplicate_determination": { "enum": [ "canonical", "duplicate", "unresolved", "unsearchable" ], "title": "Duplicate Determination", "type": "string" }, "canonical_reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the determined canonical reference.", "title": "Canonical Reference Id" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional detail about the determination process, particularly where the determination is UNRESOLVED or UNSEARCHABLE.", "title": "Detail" } }, "required": [ "duplicate_determination" ] }
- Fields:
- Validators:
check_canonical_reference_id_populated_iff_duplicate»all fields
- field canonical_reference_id: UUID | None = None[source]#
The ID of the determined canonical reference.
- Validated by:
- field detail: str | None = None[source]#
Optional detail about the determination process, particularly where the determination is UNRESOLVED or UNSEARCHABLE.
- Validated by:
- pydantic model app.domain.references.models.models.ReferenceExport[source]#
A queued job that produces a file of an explicit list of references.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.ReferenceExport" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceExport</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>export_format</td><td port="export_format">ExportFormat</td></tr><tr><td>status</td><td port="status">ExportStatus</td></tr><tr><td>result_file</td><td port="result_file">BlobStorageFile | None</td></tr><tr><td>n_references</td><td port="n_references">int | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr><tr><td>reference_ids</td><td port="reference_ids">list[UUID]</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceExport

A queued job that produces a file of an explicit list of references.&#\
xA;"];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.ReferenceExport":result_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-bbc892b27830845ff2f3baaa1e754ac20b66400e.png)
Show JSON schema
{ "title": "ReferenceExport", "description": "A queued job that produces a file of an explicit list of references.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "export_format": { "$ref": "#/$defs/ExportFormat", "default": "jsonl", "description": "The serialization format of the produced file." }, "status": { "$ref": "#/$defs/ExportStatus", "default": "pending", "description": "The current status of the export job." }, "result_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file produced by the job, once completed." }, "n_references": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of references in the produced file.", "title": "N References" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error message, if the job failed.", "title": "Error" }, "reference_ids": { "description": "The references to export.", "items": { "format": "uuid", "type": "string" }, "title": "Reference Ids", "type": "array" } }, "$defs": { "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "ExportFormat": { "description": "The serialization format of a reference export.", "enum": [ "jsonl", "ris" ], "title": "ExportFormat", "type": "string" }, "ExportStatus": { "description": "The status of an export job.", "enum": [ "pending", "running", "completed", "failed" ], "title": "ExportStatus", "type": "string" } }, "required": [ "reference_ids" ] }
- Config:
from_attributes: bool = True
- Fields:
- field export_format: ExportFormat = ExportFormat.JSONL[source]#
The serialization format of the produced file.
- field result_file: BlobStorageFile | None = None[source]#
The file produced by the job, once completed.
- field status: ExportStatus = ExportStatus.PENDING[source]#
The current status of the export job.
- pydantic model app.domain.references.models.models.ReferenceIds[source]#
Model representing a list of reference IDs.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.ReferenceIds" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceIds</b></td></tr><tr><td>reference_ids</td><td port="reference_ids">list[UUID]</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceIds

Model representing a list of reference IDs.
"];
}](../../_images/graphviz-312224a23e07655b8b9633d241a520d149d56912.png)
Show JSON schema
{ "title": "ReferenceIds", "description": "Model representing a list of reference IDs.", "type": "object", "properties": { "reference_ids": { "description": "A list of reference IDs.", "items": { "format": "uuid", "type": "string" }, "title": "Reference Ids", "type": "array" } }, "required": [ "reference_ids" ] }
- Fields:
- pydantic model app.domain.references.models.models.ReferenceSearchFields[source]#
Projection representing fields used for searching references.
This model is a projection of
app.domain.references.models.models.Reference.This is injected into the root of Elasticsearch Reference documents for easy searching.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.ReferenceSearchFields" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceSearchFields</b></td></tr><tr><td>abstract</td><td port="abstract">str | None</td></tr><tr><td>authors</td><td port="authors">list[str]</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>annotations</td><td port="annotations">list[str]</td></tr><tr><td>evaluated_schemes</td><td port="evaluated_schemes">list[str]</td></tr><tr><td>destiny_inclusion_score</td><td port="destiny_inclusion_score">float | None</td></tr><tr><td>linked_data_content</td><td port="linked_data_content">LinkedDataEnhancement | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceSearchFields

Projection representing fields used for searching references.&#\
xA;
This model is a projection of
:class:`app.domain.references.models.models.Reference`.

This is injected into \
the root of Elasticsearch Reference documents for easy
searching.
"];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"app.domain.references.models.models.ReferenceSearchFields":linked_data_content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-b0a4fb5038fc05746d8a8df87f27abea08b308bf.png)
Show JSON schema
{ "title": "ReferenceSearchFields", "description": "Projection representing fields used for searching references.\n\nThis model is a projection of\n:class:`app.domain.references.models.models.Reference`.\n\nThis is injected into the root of Elasticsearch Reference documents for easy\nsearching.", "type": "object", "properties": { "abstract": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The abstract of the reference.", "title": "Abstract" }, "authors": { "description": "The authors of the reference.", "items": { "type": "string" }, "title": "Authors", "type": "array" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The publication date of the reference.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The publication year of the reference.", "title": "Publication Year" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "annotations": { "description": "List of true annotations on the reference.Each annotation is in the format `<scheme>/<label>`.", "items": { "type": "string" }, "title": "Annotations", "type": "array" }, "evaluated_schemes": { "description": "List of annotation schemes that have been evaluated on the reference.", "items": { "type": "string" }, "title": "Evaluated Schemes", "type": "array" }, "destiny_inclusion_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The inclusion score on the destiny domain inclusion annotation, if evaluated.", "title": "Destiny Inclusion Score" }, "linked_data_content": { "anyOf": [ { "$ref": "#/$defs/LinkedDataEnhancement" }, { "type": "null" } ], "default": null, "description": "The content of the highest-priority LINKED_DATA enhancement, if any. This is the raw enhancement content before projection into searchable concepts and labels." } }, "$defs": { "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" } } }
- Fields:
- Validators:
- field annotations: list[str] [Optional][source]#
List of true annotations on the reference.Each annotation is in the format <scheme>/<label>.
- Validated by:
- field destiny_inclusion_score: float | None = None[source]#
The inclusion score on the destiny domain inclusion annotation, if evaluated.
- field evaluated_schemes: list[str] [Optional][source]#
List of annotation schemes that have been evaluated on the reference.
- Validated by:
- field linked_data_content: LinkedDataEnhancement | None = None[source]#
The content of the highest-priority LINKED_DATA enhancement, if any. This is the raw enhancement content before projection into searchable concepts and labels.
- validator normalise_string_list_validator » authors, evaluated_schemes, annotations[source]#
Normalise string list fields by stripping whitespace.
- validator normalise_string_validator » abstract, title[source]#
Normalise string fields by stripping whitespace.
- to_canonical_candidate_search_fields() CandidateCanonicalSearchFields[source]#
Return fields needed for candidate canonical selection.
- pydantic model app.domain.references.models.models.ReferenceSearchProjection[source]#
Pre-computed projection of a Reference for ES indexing.
Contains only the fields that ES indexes, constructed by the synchronizer from a Reference and its projections. Inherits SQLAttributeMixin for the id field and to satisfy the GenericDomainModelType bound required by the ES persistence layer.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.LinkedDataProjection" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataProjection</b></td></tr><tr><td>concepts</td><td port="concepts">set[str]</td></tr><tr><td>labels</td><td port="labels">set[str]</td></tr><tr><td>evaluated_properties</td><td port="evaluated_properties">set[str]</td></tr><tr><td>countries</td><td port="countries">set[str]</td></tr><tr><td>country_wb_regions</td><td port="country_wb_regions">set[str]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataProjection

Result of projecting a LinkedDataEnhancement into flat searchable \
fields.
"];
"app.domain.references.models.models.ReferenceSearchFields" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceSearchFields</b></td></tr><tr><td>abstract</td><td port="abstract">str | None</td></tr><tr><td>authors</td><td port="authors">list[str]</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>annotations</td><td port="annotations">list[str]</td></tr><tr><td>evaluated_schemes</td><td port="evaluated_schemes">list[str]</td></tr><tr><td>destiny_inclusion_score</td><td port="destiny_inclusion_score">float | None</td></tr><tr><td>linked_data_content</td><td port="linked_data_content">LinkedDataEnhancement | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceSearchFields

Projection representing fields used for searching references.&#\
xA;
This model is a projection of
:class:`app.domain.references.models.models.Reference`.

This is injected into \
the root of Elasticsearch Reference documents for easy
searching.
"];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"app.domain.references.models.models.ReferenceSearchFields":linked_data_content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceSearchProjection" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceSearchProjection</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">DuplicateDetermination | None</td></tr><tr><td>search_fields</td><td port="search_fields">ReferenceSearchFields</td></tr><tr><td>linked_data_projection</td><td port="linked_data_projection">LinkedDataProjection | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceSearchProjection

Pre-computed projection of a Reference for ES indexing.&#\
xA;
Contains only the fields that ES indexes, constructed by the synchronizer
from a Reference and its projections. Inherits \
SQLAttributeMixin for the
id field and to satisfy the GenericDomainModelType bound required by the
ES persistence layer.&#\
xA;"];
"app.domain.references.models.models.ReferenceSearchProjection":linked_data_projection:e -> "app.domain.references.models.models.LinkedDataProjection":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceSearchProjection":search_fields:e -> "app.domain.references.models.models.ReferenceSearchFields":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../../_images/graphviz-25f41c3b19181a6b76e9e199954ce5b2124542aa.png)
Show JSON schema
{ "title": "ReferenceSearchProjection", "description": "Pre-computed projection of a Reference for ES indexing.\n\nContains only the fields that ES indexes, constructed by the synchronizer\nfrom a Reference and its projections. Inherits SQLAttributeMixin for the\nid field and to satisfy the GenericDomainModelType bound required by the\nES persistence layer.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the reference." }, "duplicate_determination": { "anyOf": [ { "$ref": "#/$defs/DuplicateDetermination" }, { "type": "null" } ], "default": null, "description": "The duplicate determination, if any." }, "search_fields": { "$ref": "#/$defs/ReferenceSearchFields", "description": "Pre-computed search fields for Elasticsearch indexing." }, "linked_data_projection": { "anyOf": [ { "$ref": "#/$defs/LinkedDataProjection" }, { "type": "null" } ], "default": null, "description": "Pre-computed linked data projection, if any." } }, "$defs": { "DuplicateDetermination": { "description": "The determination of whether a reference is a duplicate.\n\nThis encodes both a status and a determination.", "enum": [ "pending", "nominated", "duplicate", "exact_duplicate", "canonical", "unresolved", "unsearchable", "decoupled" ], "title": "DuplicateDetermination", "type": "string" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "LinkedDataProjection": { "description": "Result of projecting a LinkedDataEnhancement into flat searchable fields.", "properties": { "concepts": { "items": { "type": "string" }, "title": "Concepts", "type": "array", "uniqueItems": true }, "labels": { "items": { "type": "string" }, "title": "Labels", "type": "array", "uniqueItems": true }, "evaluated_properties": { "items": { "type": "string" }, "title": "Evaluated Properties", "type": "array", "uniqueItems": true }, "countries": { "items": { "type": "string" }, "title": "Countries", "type": "array", "uniqueItems": true }, "country_wb_regions": { "items": { "type": "string" }, "title": "Country Wb Regions", "type": "array", "uniqueItems": true } }, "title": "LinkedDataProjection", "type": "object" }, "ReferenceSearchFields": { "description": "Projection representing fields used for searching references.\n\nThis model is a projection of\n:class:`app.domain.references.models.models.Reference`.\n\nThis is injected into the root of Elasticsearch Reference documents for easy\nsearching.", "properties": { "abstract": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The abstract of the reference.", "title": "Abstract" }, "authors": { "description": "The authors of the reference.", "items": { "type": "string" }, "title": "Authors", "type": "array" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The publication date of the reference.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The publication year of the reference.", "title": "Publication Year" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "annotations": { "description": "List of true annotations on the reference.Each annotation is in the format `<scheme>/<label>`.", "items": { "type": "string" }, "title": "Annotations", "type": "array" }, "evaluated_schemes": { "description": "List of annotation schemes that have been evaluated on the reference.", "items": { "type": "string" }, "title": "Evaluated Schemes", "type": "array" }, "destiny_inclusion_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The inclusion score on the destiny domain inclusion annotation, if evaluated.", "title": "Destiny Inclusion Score" }, "linked_data_content": { "anyOf": [ { "$ref": "#/$defs/LinkedDataEnhancement" }, { "type": "null" } ], "default": null, "description": "The content of the highest-priority LINKED_DATA enhancement, if any. This is the raw enhancement content before projection into searchable concepts and labels." } }, "title": "ReferenceSearchFields", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).\n\nTODO: Implement data governance layer to manage this.", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "required": [ "visibility", "search_fields" ] }
- Config:
from_attributes: bool = True
- Fields:
- field duplicate_determination: DuplicateDetermination | None = None[source]#
The duplicate determination, if any.
- field linked_data_projection: LinkedDataProjection | None = None[source]#
Pre-computed linked data projection, if any.
- field search_fields: ReferenceSearchFields [Required][source]#
Pre-computed search fields for Elasticsearch indexing.
- field visibility: Visibility [Required][source]#
The level of visibility of the reference.
- pydantic model app.domain.references.models.models.ReferenceSearchResult[source]#
Wrapping class for Elasticsearch search results.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.Enhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Enhancement</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>created_at</td><td port="created_at">datetime | None</td></tr><tr><td>updated_at</td><td port="updated_at">datetime | None</td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>derived_from</td><td port="derived_from">list[UUID] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Enhancement

Core enhancement model with database attributes included.
"];
"app.domain.references.models.models.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>blob</td><td port="blob">BlobStorageFile</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="app.domain.references.models.models.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.&#\
xA;
We separate this from the SDK model as it contains a file pointer, not
the URL to the file itself.
"];
"app.domain.references.models.models.Enhancement":content:e -> "app.domain.references.models.models.FullTextEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Reference</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[LinkedExternalIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[Enhancement] | None</td></tr><tr><td>duplicate_decision</td><td port="duplicate_decision">ReferenceDuplicateDecision | None</td></tr><tr><td>canonical_reference</td><td port="canonical_reference">Reference | None</td></tr><tr><td>duplicate_references</td><td port="duplicate_references">list[Reference] | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Reference

Core reference model with database attributes included.
"];
"app.domain.references.models.models.Enhancement":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>updated_date</td><td port="updated_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>pagination</td><td port="pagination">Pagination | None</td></tr><tr><td>publication_venue</td><td port="publication_venue">PublicationVenue | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.RawEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RawEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.RAW]</td></tr><tr><td>source_export_date</td><td port="source_export_date">datetime</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>metadata</td><td port="metadata">dict[str, Any]</td></tr><tr><td>data</td><td port="data">Any</td></tr></table>>,
tooltip="destiny_sdk.enhancements.RawEnhancement

An enhancement for storing raw/arbitrary/unstructured data.

Data in these \
enhancements is intended for future conversion into structured form.

This enhancement accepts any fields passed in to `\
data`. These enhancements cannot
be created by robots.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.RawEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceAssociationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.REFERENCE_ASSOCIATION]</td></tr><tr><td>associated_reference_ids</td><td port="associated_reference_ids">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | UUID | UUID]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement

An enhancement for storing associations between references.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.FullTextEnhancement":blob:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.LinkedExternalIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedExternalIdentifier</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>identifier</td><td port="identifier">DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedExternalIdentifier

External identifier model with database attributes included.&#\
xA;"];
"app.domain.references.models.models.LinkedExternalIdentifier":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":enhancements:e -> "app.domain.references.models.models.Enhancement":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":identifiers:e -> "app.domain.references.models.models.LinkedExternalIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":canonical_reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":duplicate_references:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceDuplicateDecision" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceDuplicateDecision</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>enhancement_id</td><td port="enhancement_id">UUID | None</td></tr><tr><td>active_decision</td><td port="active_decision">bool</td></tr><tr><td>candidate_canonical_ids</td><td port="candidate_canonical_ids">list[UUID]</td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">DuplicateDetermination</td></tr><tr><td>canonical_reference_id</td><td port="canonical_reference_id">UUID | None</td></tr><tr><td>detail</td><td port="detail">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceDuplicateDecision

Model representing a decision on whether a reference is \
a duplicate.
"];
"app.domain.references.models.models.Reference":duplicate_decision:e -> "app.domain.references.models.models.ReferenceDuplicateDecision":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceSearchResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceSearchResult</b></td></tr><tr><td>references</td><td port="references">list[Reference]</td></tr><tr><td>total</td><td port="total">int</td></tr><tr><td>page</td><td port="page">int</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceSearchResult

Wrapping class for Elasticsearch search results.
"];
"app.domain.references.models.models.ReferenceSearchResult":references:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Pagination" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Pagination</b></td></tr><tr><td>volume</td><td port="volume">str | None</td></tr><tr><td>issue</td><td port="issue">str | None</td></tr><tr><td>first_page</td><td port="first_page">str | None</td></tr><tr><td>last_page</td><td port="last_page">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Pagination

Pagination information for journal articles.

Maps to OpenAlex's work.biblio \
object. All fields are strings to match
OpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":pagination:e -> "destiny_sdk.enhancements.Pagination":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.PublicationVenue" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationVenue</b></td></tr><tr><td>display_name</td><td port="display_name">str | None</td></tr><tr><td>venue_type</td><td port="venue_type">PublicationVenueType | None</td></tr><tr><td>issn</td><td port="issn">list[str] | None</td></tr><tr><td>issn_l</td><td port="issn_l">str | None</td></tr><tr><td>host_organization_name</td><td port="host_organization_name">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.PublicationVenue

A publication venue (journal, repository, conference, etc.).
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":publication_venue:e -> "destiny_sdk.enhancements.PublicationVenue":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-ac842a0b43a0dd512ae47fea063e19c220c7e375.png)
Show JSON schema
{ "title": "ReferenceSearchResult", "description": "Wrapping class for Elasticsearch search results.", "type": "object", "properties": { "references": { "description": "The list of references returned from the search query.", "items": { "$ref": "#/$defs/Reference" }, "title": "References", "type": "array" }, "total": { "description": "The total number of results matching the search query.", "title": "Total", "type": "integer" }, "page": { "description": "The page number of the results.", "title": "Page", "type": "integer" } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "updated_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date of the last OpenAlex update to this metadata", "title": "Updated Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "pagination": { "anyOf": [ { "$ref": "#/$defs/Pagination" }, { "type": "null" } ], "default": null, "description": "Pagination info (volume, issue, pages)." }, "publication_venue": { "anyOf": [ { "$ref": "#/$defs/PublicationVenue" }, { "type": "null" } ], "default": null, "description": "Publication venue information (journal, repository, etc.)." } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "DuplicateDetermination": { "description": "The determination of whether a reference is a duplicate.\n\nThis encodes both a status and a determination.", "enum": [ "pending", "nominated", "duplicate", "exact_duplicate", "canonical", "unresolved", "unsearchable", "decoupled" ], "title": "DuplicateDetermination", "type": "string" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "Enhancement": { "description": "Core enhancement model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "created_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was created.", "title": "Created At" }, "updated_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was last updated.", "title": "Updated At" }, "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "robot_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Robot Version" }, "derived_from": { "anyOf": [ { "items": { "format": "uuid", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of enhancement IDs that this enhancement was derived from.", "title": "Derived From" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "full_text": "#/$defs/FullTextEnhancement", "linked_data": "#/$defs/LinkedDataEnhancement", "location": "#/$defs/LocationEnhancement", "raw": "#/$defs/RawEnhancement", "reference_association": "#/$defs/ReferenceAssociationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" }, { "$ref": "#/$defs/ReferenceAssociationEnhancement" }, { "$ref": "#/$defs/LinkedDataEnhancement" }, { "$ref": "#/$defs/FullTextEnhancement" }, { "$ref": "#/$defs/RawEnhancement" } ], "title": "Content" }, "reference_id": { "description": "The ID of the reference this enhancement is associated with.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this enhancement is associated with." } }, "required": [ "source", "visibility", "content", "reference_id" ], "title": "Enhancement", "type": "object" }, "FullTextEnhancement": { "description": "An enhancement for storing a link to the full text and its metadata.\n\nWe separate this from the SDK model as it contains a file pointer, not\nthe URL to the file itself.", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "blob": { "$ref": "#/$defs/BlobStorageFile", "description": "Blob storage pointer to the full text file." }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "required": [ "blob" ], "title": "FullTextEnhancement", "type": "object" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "LinkedExternalIdentifier": { "description": "External identifier model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "identifier": { "description": "The identifier itself.", "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ], "title": "Identifier" }, "reference_id": { "description": "The ID of the reference this identifier identifies.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this identifier identifies." } }, "required": [ "identifier", "reference_id" ], "title": "LinkedExternalIdentifier", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "Pagination": { "description": "Pagination information for journal articles.\n\nMaps to OpenAlex's work.biblio object. All fields are strings to match\nOpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".", "properties": { "volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The volume number of the journal/publication.", "title": "Volume" }, "issue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The issue number of the journal/publication.", "title": "Issue" }, "first_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The first page number of the reference in the publication.", "title": "First Page" }, "last_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The last page number of the reference in the publication.", "title": "Last Page" } }, "title": "Pagination", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "PublicationVenue": { "description": "A publication venue (journal, repository, conference, etc.).", "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The display name of the venue (journal name, repository name, etc.)", "title": "Display Name" }, "venue_type": { "anyOf": [ { "$ref": "#/$defs/PublicationVenueType" }, { "type": "null" } ], "default": null, "description": "The type of venue: journal, repository, book, conference, etc." }, "issn": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of ISSNs associated with this venue (print and electronic)", "title": "Issn" }, "issn_l": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The linking ISSN - a canonical ISSN for the venue across format changes", "title": "Issn L" }, "host_organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Display name of the host organization (publisher)", "title": "Host Organization Name" } }, "title": "PublicationVenue", "type": "object" }, "PublicationVenueType": { "description": "Type of publication venue.\n\nAligns with OpenAlex source types.", "enum": [ "journal", "repository", "conference", "ebook_platform", "book_series", "other" ], "title": "PublicationVenueType", "type": "string" }, "RawEnhancement": { "description": "An enhancement for storing raw/arbitrary/unstructured data.\n\nData in these enhancements is intended for future conversion into structured form.\n\nThis enhancement accepts any fields passed in to `data`. These enhancements cannot\nbe created by robots.", "properties": { "enhancement_type": { "const": "raw", "default": "raw", "title": "Enhancement Type", "type": "string" }, "source_export_date": { "description": "Date the enhancement data was retrieved.", "format": "date-time", "title": "Source Export Date", "type": "string" }, "description": { "description": "Description of the data to aid in future refinement.", "title": "Description", "type": "string" }, "metadata": { "additionalProperties": true, "description": "Additional metadata to aid in future structuring of raw data", "title": "Metadata", "type": "object" }, "data": { "description": "Unstructured data for later processing.", "title": "Data" } }, "required": [ "source_export_date", "description", "data" ], "title": "RawEnhancement", "type": "object" }, "Reference": { "description": "Core reference model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "anyOf": [ { "items": { "$ref": "#/$defs/LinkedExternalIdentifier" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `LinkedExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/Enhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" }, "duplicate_decision": { "anyOf": [ { "$ref": "#/$defs/ReferenceDuplicateDecision" }, { "type": "null" } ], "default": null, "description": "The current active duplicate decision for this reference. If None, either duplicate_decision has not been preloaded or the duplicate status is pending." }, "canonical_reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The canonical reference that this reference is a duplicate of" }, "duplicate_references": { "anyOf": [ { "items": { "$ref": "#/$defs/Reference" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of references that this reference duplicates", "title": "Duplicate References" } }, "title": "Reference", "type": "object" }, "ReferenceAssociationEnhancement": { "description": "An enhancement for storing associations between references.", "properties": { "enhancement_type": { "const": "reference_association", "default": "reference_association", "title": "Enhancement Type", "type": "string" }, "associated_reference_ids": { "description": "A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.", "items": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." } ] }, "minItems": 1, "title": "Associated Reference Ids", "type": "array" }, "association_type": { "$ref": "#/$defs/ReferenceAssociationType", "description": "The type of association between this reference and the associated ones. Direction is important: \"this reference <association_type> associated reference\"." } }, "required": [ "associated_reference_ids", "association_type" ], "title": "ReferenceAssociationEnhancement", "type": "object" }, "ReferenceAssociationType": { "description": "The type of association between references.\n\nDirection is important: \"this reference <association_type> associated reference\".", "enum": [ "cites", "is_cited_by", "is_similar_to" ], "title": "ReferenceAssociationType", "type": "string" }, "ReferenceDuplicateDecision": { "description": "Model representing a decision on whether a reference is a duplicate.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference being evaluated.", "format": "uuid", "title": "Reference Id", "type": "string" }, "enhancement_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement that triggered this duplicate decision, if any.", "title": "Enhancement Id" }, "active_decision": { "default": false, "description": "Whether this is the active decision for the reference.", "title": "Active Decision", "type": "boolean" }, "candidate_canonical_ids": { "description": "A list of candidate canonical IDs for the reference.", "items": { "format": "uuid", "type": "string" }, "title": "Candidate Canonical Ids", "type": "array" }, "duplicate_determination": { "$ref": "#/$defs/DuplicateDetermination", "default": "pending", "description": "The duplicate status of the reference." }, "canonical_reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the canonical reference this reference duplicates.", "title": "Canonical Reference Id" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional additional detail about the decision.", "title": "Detail" } }, "required": [ "reference_id" ], "title": "ReferenceDuplicateDecision", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).\n\nTODO: Implement data governance layer to manage this.", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "required": [ "total", "page" ] }
- pydantic model app.domain.references.models.models.ReferenceWithChangeset[source]#
Reference model with a changeset included.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.Enhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Enhancement</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>created_at</td><td port="created_at">datetime | None</td></tr><tr><td>updated_at</td><td port="updated_at">datetime | None</td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>derived_from</td><td port="derived_from">list[UUID] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Enhancement

Core enhancement model with database attributes included.
"];
"app.domain.references.models.models.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>blob</td><td port="blob">BlobStorageFile</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="app.domain.references.models.models.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.&#\
xA;
We separate this from the SDK model as it contains a file pointer, not
the URL to the file itself.
"];
"app.domain.references.models.models.Enhancement":content:e -> "app.domain.references.models.models.FullTextEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Reference</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[LinkedExternalIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[Enhancement] | None</td></tr><tr><td>duplicate_decision</td><td port="duplicate_decision">ReferenceDuplicateDecision | None</td></tr><tr><td>canonical_reference</td><td port="canonical_reference">Reference | None</td></tr><tr><td>duplicate_references</td><td port="duplicate_references">list[Reference] | None</td></tr></table>>,
tooltip="app.domain.references.models.models.Reference

Core reference model with database attributes included.
"];
"app.domain.references.models.models.Enhancement":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>updated_date</td><td port="updated_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>pagination</td><td port="pagination">Pagination | None</td></tr><tr><td>publication_venue</td><td port="publication_venue">PublicationVenue | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.RawEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RawEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.RAW]</td></tr><tr><td>source_export_date</td><td port="source_export_date">datetime</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>metadata</td><td port="metadata">dict[str, Any]</td></tr><tr><td>data</td><td port="data">Any</td></tr></table>>,
tooltip="destiny_sdk.enhancements.RawEnhancement

An enhancement for storing raw/arbitrary/unstructured data.

Data in these \
enhancements is intended for future conversion into structured form.

This enhancement accepts any fields passed in to `\
data`. These enhancements cannot
be created by robots.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.RawEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceAssociationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.REFERENCE_ASSOCIATION]</td></tr><tr><td>associated_reference_ids</td><td port="associated_reference_ids">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | UUID | UUID]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement

An enhancement for storing associations between references.
"];
"app.domain.references.models.models.Enhancement":content:e -> "destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.FullTextEnhancement":blob:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.LinkedExternalIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedExternalIdentifier</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>identifier</td><td port="identifier">DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>reference</td><td port="reference">Reference | None</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedExternalIdentifier

External identifier model with database attributes included.&#\
xA;"];
"app.domain.references.models.models.LinkedExternalIdentifier":reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"app.domain.references.models.models.LinkedExternalIdentifier":identifier:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":enhancements:e -> "app.domain.references.models.models.Enhancement":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":identifiers:e -> "app.domain.references.models.models.LinkedExternalIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":canonical_reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.Reference":duplicate_references:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceDuplicateDecision" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceDuplicateDecision</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>enhancement_id</td><td port="enhancement_id">UUID | None</td></tr><tr><td>active_decision</td><td port="active_decision">bool</td></tr><tr><td>candidate_canonical_ids</td><td port="candidate_canonical_ids">list[UUID]</td></tr><tr><td>duplicate_determination</td><td port="duplicate_determination">DuplicateDetermination</td></tr><tr><td>canonical_reference_id</td><td port="canonical_reference_id">UUID | None</td></tr><tr><td>detail</td><td port="detail">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceDuplicateDecision

Model representing a decision on whether a reference is \
a duplicate.
"];
"app.domain.references.models.models.Reference":duplicate_decision:e -> "app.domain.references.models.models.ReferenceDuplicateDecision":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceWithChangeset" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceWithChangeset</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[LinkedExternalIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[Enhancement] | None</td></tr><tr><td>duplicate_decision</td><td port="duplicate_decision">ReferenceDuplicateDecision | None</td></tr><tr><td>canonical_reference</td><td port="canonical_reference">Reference | None</td></tr><tr><td>duplicate_references</td><td port="duplicate_references">list[Reference] | None</td></tr><tr><td>changeset</td><td port="changeset">Reference</td></tr></table>>,
tooltip="app.domain.references.models.models.ReferenceWithChangeset

Reference model with a changeset included.
"];
"app.domain.references.models.models.ReferenceWithChangeset":enhancements:e -> "app.domain.references.models.models.Enhancement":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceWithChangeset":identifiers:e -> "app.domain.references.models.models.LinkedExternalIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceWithChangeset":canonical_reference:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceWithChangeset":changeset:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceWithChangeset":duplicate_references:e -> "app.domain.references.models.models.Reference":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.domain.references.models.models.ReferenceWithChangeset":duplicate_decision:e -> "app.domain.references.models.models.ReferenceDuplicateDecision":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Pagination" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Pagination</b></td></tr><tr><td>volume</td><td port="volume">str | None</td></tr><tr><td>issue</td><td port="issue">str | None</td></tr><tr><td>first_page</td><td port="first_page">str | None</td></tr><tr><td>last_page</td><td port="last_page">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Pagination

Pagination information for journal articles.

Maps to OpenAlex's work.biblio \
object. All fields are strings to match
OpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":pagination:e -> "destiny_sdk.enhancements.Pagination":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.PublicationVenue" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationVenue</b></td></tr><tr><td>display_name</td><td port="display_name">str | None</td></tr><tr><td>venue_type</td><td port="venue_type">PublicationVenueType | None</td></tr><tr><td>issn</td><td port="issn">list[str] | None</td></tr><tr><td>issn_l</td><td port="issn_l">str | None</td></tr><tr><td>host_organization_name</td><td port="host_organization_name">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.PublicationVenue

A publication venue (journal, repository, conference, etc.).
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":publication_venue:e -> "destiny_sdk.enhancements.PublicationVenue":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-29ca4a1ad5550ec6a53d762a5ce80696229ebc61.png)
Show JSON schema
{ "title": "ReferenceWithChangeset", "description": "Reference model with a changeset included.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "anyOf": [ { "items": { "$ref": "#/$defs/LinkedExternalIdentifier" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `LinkedExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/Enhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" }, "duplicate_decision": { "anyOf": [ { "$ref": "#/$defs/ReferenceDuplicateDecision" }, { "type": "null" } ], "default": null, "description": "The current active duplicate decision for this reference. If None, either duplicate_decision has not been preloaded or the duplicate status is pending." }, "canonical_reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The canonical reference that this reference is a duplicate of" }, "duplicate_references": { "anyOf": [ { "items": { "$ref": "#/$defs/Reference" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of references that this reference duplicates", "title": "Duplicate References" }, "changeset": { "$ref": "#/$defs/Reference", "description": "The changeset that was applied to the reference. This is purely additive." } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "updated_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date of the last OpenAlex update to this metadata", "title": "Updated Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "pagination": { "anyOf": [ { "$ref": "#/$defs/Pagination" }, { "type": "null" } ], "default": null, "description": "Pagination info (volume, issue, pages)." }, "publication_venue": { "anyOf": [ { "$ref": "#/$defs/PublicationVenue" }, { "type": "null" } ], "default": null, "description": "Publication venue information (journal, repository, etc.)." } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "DuplicateDetermination": { "description": "The determination of whether a reference is a duplicate.\n\nThis encodes both a status and a determination.", "enum": [ "pending", "nominated", "duplicate", "exact_duplicate", "canonical", "unresolved", "unsearchable", "decoupled" ], "title": "DuplicateDetermination", "type": "string" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "Enhancement": { "description": "Core enhancement model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "created_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was created.", "title": "Created At" }, "updated_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp at which the object was last updated.", "title": "Updated At" }, "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "robot_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Robot Version" }, "derived_from": { "anyOf": [ { "items": { "format": "uuid", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of enhancement IDs that this enhancement was derived from.", "title": "Derived From" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "full_text": "#/$defs/FullTextEnhancement", "linked_data": "#/$defs/LinkedDataEnhancement", "location": "#/$defs/LocationEnhancement", "raw": "#/$defs/RawEnhancement", "reference_association": "#/$defs/ReferenceAssociationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" }, { "$ref": "#/$defs/ReferenceAssociationEnhancement" }, { "$ref": "#/$defs/LinkedDataEnhancement" }, { "$ref": "#/$defs/FullTextEnhancement" }, { "$ref": "#/$defs/RawEnhancement" } ], "title": "Content" }, "reference_id": { "description": "The ID of the reference this enhancement is associated with.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this enhancement is associated with." } }, "required": [ "source", "visibility", "content", "reference_id" ], "title": "Enhancement", "type": "object" }, "FullTextEnhancement": { "description": "An enhancement for storing a link to the full text and its metadata.\n\nWe separate this from the SDK model as it contains a file pointer, not\nthe URL to the file itself.", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "blob": { "$ref": "#/$defs/BlobStorageFile", "description": "Blob storage pointer to the full text file." }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "required": [ "blob" ], "title": "FullTextEnhancement", "type": "object" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "LinkedExternalIdentifier": { "description": "External identifier model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "identifier": { "description": "The identifier itself.", "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ], "title": "Identifier" }, "reference_id": { "description": "The ID of the reference this identifier identifies.", "format": "uuid", "title": "Reference Id", "type": "string" }, "reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The reference this identifier identifies." } }, "required": [ "identifier", "reference_id" ], "title": "LinkedExternalIdentifier", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "Pagination": { "description": "Pagination information for journal articles.\n\nMaps to OpenAlex's work.biblio object. All fields are strings to match\nOpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".", "properties": { "volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The volume number of the journal/publication.", "title": "Volume" }, "issue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The issue number of the journal/publication.", "title": "Issue" }, "first_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The first page number of the reference in the publication.", "title": "First Page" }, "last_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The last page number of the reference in the publication.", "title": "Last Page" } }, "title": "Pagination", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "PublicationVenue": { "description": "A publication venue (journal, repository, conference, etc.).", "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The display name of the venue (journal name, repository name, etc.)", "title": "Display Name" }, "venue_type": { "anyOf": [ { "$ref": "#/$defs/PublicationVenueType" }, { "type": "null" } ], "default": null, "description": "The type of venue: journal, repository, book, conference, etc." }, "issn": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of ISSNs associated with this venue (print and electronic)", "title": "Issn" }, "issn_l": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The linking ISSN - a canonical ISSN for the venue across format changes", "title": "Issn L" }, "host_organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Display name of the host organization (publisher)", "title": "Host Organization Name" } }, "title": "PublicationVenue", "type": "object" }, "PublicationVenueType": { "description": "Type of publication venue.\n\nAligns with OpenAlex source types.", "enum": [ "journal", "repository", "conference", "ebook_platform", "book_series", "other" ], "title": "PublicationVenueType", "type": "string" }, "RawEnhancement": { "description": "An enhancement for storing raw/arbitrary/unstructured data.\n\nData in these enhancements is intended for future conversion into structured form.\n\nThis enhancement accepts any fields passed in to `data`. These enhancements cannot\nbe created by robots.", "properties": { "enhancement_type": { "const": "raw", "default": "raw", "title": "Enhancement Type", "type": "string" }, "source_export_date": { "description": "Date the enhancement data was retrieved.", "format": "date-time", "title": "Source Export Date", "type": "string" }, "description": { "description": "Description of the data to aid in future refinement.", "title": "Description", "type": "string" }, "metadata": { "additionalProperties": true, "description": "Additional metadata to aid in future structuring of raw data", "title": "Metadata", "type": "object" }, "data": { "description": "Unstructured data for later processing.", "title": "Data" } }, "required": [ "source_export_date", "description", "data" ], "title": "RawEnhancement", "type": "object" }, "Reference": { "description": "Core reference model with database attributes included.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "anyOf": [ { "items": { "$ref": "#/$defs/LinkedExternalIdentifier" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `LinkedExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/Enhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" }, "duplicate_decision": { "anyOf": [ { "$ref": "#/$defs/ReferenceDuplicateDecision" }, { "type": "null" } ], "default": null, "description": "The current active duplicate decision for this reference. If None, either duplicate_decision has not been preloaded or the duplicate status is pending." }, "canonical_reference": { "anyOf": [ { "$ref": "#/$defs/Reference" }, { "type": "null" } ], "default": null, "description": "The canonical reference that this reference is a duplicate of" }, "duplicate_references": { "anyOf": [ { "items": { "$ref": "#/$defs/Reference" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of references that this reference duplicates", "title": "Duplicate References" } }, "title": "Reference", "type": "object" }, "ReferenceAssociationEnhancement": { "description": "An enhancement for storing associations between references.", "properties": { "enhancement_type": { "const": "reference_association", "default": "reference_association", "title": "Enhancement Type", "type": "string" }, "associated_reference_ids": { "description": "A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.", "items": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." } ] }, "minItems": 1, "title": "Associated Reference Ids", "type": "array" }, "association_type": { "$ref": "#/$defs/ReferenceAssociationType", "description": "The type of association between this reference and the associated ones. Direction is important: \"this reference <association_type> associated reference\"." } }, "required": [ "associated_reference_ids", "association_type" ], "title": "ReferenceAssociationEnhancement", "type": "object" }, "ReferenceAssociationType": { "description": "The type of association between references.\n\nDirection is important: \"this reference <association_type> associated reference\".", "enum": [ "cites", "is_cited_by", "is_similar_to" ], "title": "ReferenceAssociationType", "type": "string" }, "ReferenceDuplicateDecision": { "description": "Model representing a decision on whether a reference is a duplicate.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference being evaluated.", "format": "uuid", "title": "Reference Id", "type": "string" }, "enhancement_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement that triggered this duplicate decision, if any.", "title": "Enhancement Id" }, "active_decision": { "default": false, "description": "Whether this is the active decision for the reference.", "title": "Active Decision", "type": "boolean" }, "candidate_canonical_ids": { "description": "A list of candidate canonical IDs for the reference.", "items": { "format": "uuid", "type": "string" }, "title": "Candidate Canonical Ids", "type": "array" }, "duplicate_determination": { "$ref": "#/$defs/DuplicateDetermination", "default": "pending", "description": "The duplicate status of the reference." }, "canonical_reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the canonical reference this reference duplicates.", "title": "Canonical Reference Id" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional additional detail about the decision.", "title": "Detail" } }, "required": [ "reference_id" ], "title": "ReferenceDuplicateDecision", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).\n\nTODO: Implement data governance layer to manage this.", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "required": [ "changeset" ] }
- Config:
from_attributes: bool = True
- Fields:
- field canonical_reference: Reference | None = None[source]#
The canonical reference that this reference is a duplicate of
- field changeset: Reference [Required][source]#
The changeset that was applied to the reference. This is purely additive.
- field duplicate_decision: ReferenceDuplicateDecision | None = None[source]#
The current active duplicate decision for this reference. If None, either duplicate_decision has not been preloaded or the duplicate status is pending.
- field duplicate_references: list['Reference'] | None = None[source]#
A list of references that this reference duplicates
- field enhancements: list['Enhancement'] | None = None[source]#
A list of enhancements for the reference
- field identifiers: list['LinkedExternalIdentifier'] | None = None[source]#
A list of LinkedExternalIdentifiers for the Reference
- field visibility: Visibility = Visibility.PUBLIC[source]#
The level of visibility of the reference
- check_serializability() None[source]#
Check that incoming SDK model is json-serializable.
This should be called during all domain model conversions.
- Raises:
ValidationError: If the model is not json-serializable.
- is_superset(reference: Reference) bool[source]#
Check if this Reference is a superset of the given Reference.
This compares enhancements, identifiers and visibility, removing persistence differences (eg database ids), to verify if the content is identical. If the given Reference has anything unique, this will return False.
- Parameters:
reference (Reference) – The reference to compare against.
- Returns:
True if the given Reference is a subset of this Reference, else False.
- Return type:
bool
- property has_duplicates: bool | None[source]#
Whether this reference has any duplicate references pointing to it.
Will return None if duplicate references are not preloaded.
- class app.domain.references.models.models.RetrievalPolicyName(*values)[source]#
Named, versioned candidate-retrieval policies for the Candidate Selection API.
Each value fixes a full retrieval regime (query shape, year strategy, identifier union) under a stable name so recall@K stays comparable across runs. A name’s semantics never change; a new regime gets a new name.
- CURRENT_FUZZY_V1 = 'current_fuzzy_v1'[source]#
Control: fuzzy title/author match with a hard +/-1 publication-year window; requires publication year as input. Mirrors the baseline gate.
- NO_YEAR_FILTER_V1 = 'no_year_filter_v1'[source]#
Drops the year filter from the query, but still requires publication year as input.
- NO_YEAR_FILTER_YEAR_OPTIONAL_V1 = 'no_year_filter_year_optional_v1'[source]#
Drops the year filter and makes publication year optional as input.
- pydantic model app.domain.references.models.models.RobotAutomation[source]#
Automation model for a robot.
This is used as a source of truth for an Elasticsearch index that percolates references or enhancements against the queries. If a query matches, a request is sent to the specified robot to perform the enhancement.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.RobotAutomation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotAutomation</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>query</td><td port="query">dict[str, Any]</td></tr></table>>,
tooltip="app.domain.references.models.models.RobotAutomation

Automation model for a robot.

This is used as a source of \
truth for an Elasticsearch index that percolates
references or enhancements against the queries. If a query matches, a request&#\
xA;is sent to the specified robot to perform the enhancement.
"];
}](../../_images/graphviz-e2f9ac67c02bc88a5e3397586fe9f5c212c4db1b.png)
Show JSON schema
{ "title": "RobotAutomation", "description": "Automation model for a robot.\n\nThis is used as a source of truth for an Elasticsearch index that percolates\nreferences or enhancements against the queries. If a query matches, a request\nis sent to the specified robot to perform the enhancement.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "robot_id": { "description": "The ID of the robot that will be used to enhance the reference.", "format": "uuid", "title": "Robot Id", "type": "string" }, "query": { "additionalProperties": true, "description": "The query that will be used to match references against.", "title": "Query", "type": "object" } }, "required": [ "robot_id", "query" ] }
- Config:
from_attributes: bool = True
- Fields:
- field query: dict[str, Any] [Required][source]#
The query that will be used to match references against.
- pydantic model app.domain.references.models.models.RobotAutomationPercolationResult[source]#
Result of a percolation query against RobotAutomations.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.RobotAutomationPercolationResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotAutomationPercolationResult</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>reference_ids</td><td port="reference_ids">set[UUID]</td></tr></table>>,
tooltip="app.domain.references.models.models.RobotAutomationPercolationResult

Result of a percolation query against RobotAutomations.&#\
xA;"];
}](../../_images/graphviz-d8ef8d3e0e70369b4ca7a92cda0aed02e5511961.png)
Show JSON schema
{ "title": "RobotAutomationPercolationResult", "description": "Result of a percolation query against RobotAutomations.", "type": "object", "properties": { "robot_id": { "format": "uuid", "title": "Robot Id", "type": "string" }, "reference_ids": { "items": { "format": "uuid", "type": "string" }, "title": "Reference Ids", "type": "array", "uniqueItems": true } }, "required": [ "robot_id", "reference_ids" ] }
- pydantic model app.domain.references.models.models.RobotEnhancementBatch[source]#
A batch of references to be enhanced by a robot.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.PendingEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PendingEnhancement</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>enhancement_request_id</td><td port="enhancement_request_id">UUID | None</td></tr><tr><td>robot_enhancement_batch_id</td><td port="robot_enhancement_batch_id">UUID | None</td></tr><tr><td>status</td><td port="status">PendingEnhancementStatus</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>expires_at</td><td port="expires_at">datetime</td></tr><tr><td>retry_of</td><td port="retry_of">UUID | None</td></tr></table>>,
tooltip="app.domain.references.models.models.PendingEnhancement

A pending enhancement.
"];
"app.domain.references.models.models.RobotEnhancementBatch" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotEnhancementBatch</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>reference_data_file</td><td port="reference_data_file">BlobStorageFile | None</td></tr><tr><td>result_file</td><td port="result_file">BlobStorageFile | None</td></tr><tr><td>validation_result_file</td><td port="validation_result_file">BlobStorageFile | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr><tr><td>pending_enhancements</td><td port="pending_enhancements">list[PendingEnhancement] | None</td></tr></table>>,
tooltip="app.domain.references.models.models.RobotEnhancementBatch

A batch of references to be enhanced by a robot.
"];
"app.domain.references.models.models.RobotEnhancementBatch":pending_enhancements:e -> "app.domain.references.models.models.PendingEnhancement":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.RobotEnhancementBatch":reference_data_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.RobotEnhancementBatch":result_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.RobotEnhancementBatch":validation_result_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-385d01e466fa68326697df8b75210f945d210926.png)
Show JSON schema
{ "title": "RobotEnhancementBatch", "description": "A batch of references to be enhanced by a robot.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "robot_id": { "description": "The ID of the robot that will perform the enhancement.", "format": "uuid", "title": "Robot Id", "type": "string" }, "reference_data_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file containing the references to be enhanced." }, "result_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file containing the enhancement results." }, "validation_result_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file containing validation result data from the repository." }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error encountered during the enhancement batch process.", "title": "Error" }, "pending_enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/PendingEnhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The pending enhancements in this batch.", "title": "Pending Enhancements" } }, "$defs": { "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "PendingEnhancement": { "description": "A pending enhancement.", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "reference_id": { "description": "The ID of the reference to be enhanced.", "format": "uuid", "title": "Reference Id", "type": "string" }, "robot_id": { "description": "The ID of the robot that will perform the enhancement.", "format": "uuid", "title": "Robot Id", "type": "string" }, "enhancement_request_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the batch enhancement request that this pending enhancement belongs to.", "title": "Enhancement Request Id" }, "robot_enhancement_batch_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the robot enhancement batch that this pending enhancement belongs to.", "title": "Robot Enhancement Batch Id" }, "status": { "$ref": "#/$defs/PendingEnhancementStatus", "default": "pending", "description": "The status of the pending enhancement." }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source of the pending enhancement for provenance tracking, if not an enhancement request.", "title": "Source" }, "expires_at": { "default": "1970-01-01T00:00:00Z", "description": "The datetime at which the pending enhancement expires.", "format": "date-time", "title": "Expires At", "type": "string" }, "retry_of": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the pending enhancement that this is a retry of, if any.", "title": "Retry Of" } }, "required": [ "reference_id", "robot_id" ], "title": "PendingEnhancement", "type": "object" }, "PendingEnhancementStatus": { "description": "The status of a pending enhancement.\n\n**Allowed values**:\n- `pending`: Enhancement is waiting to be processed.\n- `processing`: Enhancement is currently being processed.\n- `importing`: Enhancement is currently being imported.\n- `indexing`: Enhancement is currently being indexed.\n- `indexing_failed`: Enhancement indexing has failed.\n- `discarded`: Enhancement has been discarded as an exact duplicate.\n- `completed`: Enhancement has been processed successfully.\n- `failed`: Enhancement processing has failed.\n- `expired`: Enhancement lease has expired during processing.", "enum": [ "pending", "processing", "importing", "indexing", "indexing_failed", "discarded", "completed", "failed", "expired" ], "title": "PendingEnhancementStatus", "type": "string" } }, "required": [ "robot_id" ] }
- Config:
from_attributes: bool = True
- Fields:
pending_enhancements (list[app.domain.references.models.models.PendingEnhancement] | None)reference_data_file (app.persistence.blob.models.BlobStorageFile | None)result_file (app.persistence.blob.models.BlobStorageFile | None)validation_result_file (app.persistence.blob.models.BlobStorageFile | None)
- field pending_enhancements: list[PendingEnhancement] | None = None[source]#
The pending enhancements in this batch.
- field reference_data_file: BlobStorageFile | None = None[source]#
The file containing the references to be enhanced.
- field result_file: BlobStorageFile | None = None[source]#
The file containing the enhancement results.
- field validation_result_file: BlobStorageFile | None = None[source]#
The file containing validation result data from the repository.
- pydantic model app.domain.references.models.models.RobotResultValidationEntry[source]#
A single entry in the validation result file for a enhancement request.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.RobotResultValidationEntry" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotResultValidationEntry</b></td></tr><tr><td>reference_id</td><td port="reference_id">UUID | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
tooltip="app.domain.references.models.models.RobotResultValidationEntry

A single entry in the validation result file for a enhancement \
request.
"];
}](../../_images/graphviz-c6811d2d94d9d186ae0c17bee927c0f6c98c4b3b.png)
Show JSON schema
{ "title": "RobotResultValidationEntry", "description": "A single entry in the validation result file for a enhancement request.", "type": "object", "properties": { "reference_id": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the reference which was enhanced. If this is empty, the EnhancementResultEntry could not be parsed.", "title": "Reference Id" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error encountered during the enhancement process for this reference. If this is empty, the enhancement was successfully created.", "title": "Error" } } }
- field error: str | None = None[source]#
Error encountered during the enhancement process for this reference. If this is empty, the enhancement was successfully created.
- pydantic model app.domain.references.models.models.SearchExport[source]#
A queued job that produces a file of references matching a search.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.AnnotationFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationFilter</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str | None</td></tr><tr><td>score</td><td port="score">float | None</td></tr></table>>,
tooltip="app.domain.references.models.models.AnnotationFilter

Model representing an annotation filter for searching references.&#\
xA;"];
"app.domain.references.models.models.LinkedDataConceptFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataConceptFilter</b></td></tr><tr><td>concept_uris</td><td port="concept_uris">list[str]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataConceptFilter

A set of fully-qualified concept URIs to match on ``linked_\
data_concepts``.

Within a single filter, references must carry at least one of the listed URIs
(logical OR). Multiple \
filters on a query are ANDed together.
"];
"app.domain.references.models.models.LinkedDataCountryFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataCountryFilter</b></td></tr><tr><td>country_codes</td><td port="country_codes">list[str]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataCountryFilter

A set of ISO 3166-1 alpha-2 codes to match on ``linked_data_\
countries``.

OR within a filter; AND between filters.
"];
"app.domain.references.models.models.LinkedDataCountryWBRegionFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataCountryWBRegionFilter</b></td></tr><tr><td>region_ids</td><td port="region_ids">list[Literal['EAS', 'ECS', 'LCN', 'MEA', 'NAC', 'SAS', 'SSF']]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataCountryWBRegionFilter

A set of World Bank region IDs to match on ``linked_\
data_country_wb_regions``.

OR within a filter; AND between filters.
"];
"app.domain.references.models.models.PublicationYearRange" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationYearRange</b></td></tr><tr><td>start</td><td port="start">int | None</td></tr><tr><td>end</td><td port="end">int | None</td></tr></table>>,
tooltip="app.domain.references.models.models.PublicationYearRange

A range of publication years for filtering search results.
"];
"app.domain.references.models.models.SearchExport" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>SearchExport</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>export_format</td><td port="export_format">ExportFormat</td></tr><tr><td>status</td><td port="status">ExportStatus</td></tr><tr><td>result_file</td><td port="result_file">BlobStorageFile | None</td></tr><tr><td>n_references</td><td port="n_references">int | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr><tr><td>query</td><td port="query">SearchQuery</td></tr><tr><td>sort</td><td port="sort">list[str] | None</td></tr><tr><td>truncated</td><td port="truncated">bool</td></tr></table>>,
tooltip="app.domain.references.models.models.SearchExport

A queued job that produces a file of references matching a search.
"];
"app.domain.references.models.models.SearchQuery" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>SearchQuery</b></td></tr><tr><td>query_string</td><td port="query_string">str</td></tr><tr><td>annotation_filters</td><td port="annotation_filters">list[AnnotationFilter]</td></tr><tr><td>publication_year_range</td><td port="publication_year_range">PublicationYearRange | None</td></tr><tr><td>linked_data_concept_filters</td><td port="linked_data_concept_filters">list[LinkedDataConceptFilter]</td></tr><tr><td>linked_data_country_filters</td><td port="linked_data_country_filters">list[LinkedDataCountryFilter]</td></tr><tr><td>linked_data_country_wb_region_filters</td><td port="linked_data_country_wb_region_filters">list[LinkedDataCountryWBRegionFilter]</td></tr></table>>,
tooltip="app.domain.references.models.models.SearchQuery

A specification for searching references.
"];
"app.domain.references.models.models.SearchExport":query:e -> "app.domain.references.models.models.SearchQuery":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"app.persistence.blob.models.BlobStorageFile" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BlobStorageFile</b></td></tr><tr><td>location</td><td port="location">BlobStorageLocation</td></tr><tr><td>container</td><td port="container">str</td></tr><tr><td>path</td><td port="path">str</td></tr><tr><td>filename</td><td port="filename">str</td></tr></table>>,
tooltip="app.persistence.blob.models.BlobStorageFile

Model to represent Blob Storage files.
"];
"app.domain.references.models.models.SearchExport":result_file:e -> "app.persistence.blob.models.BlobStorageFile":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":annotation_filters:e -> "app.domain.references.models.models.AnnotationFilter":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":linked_data_concept_filters:e -> "app.domain.references.models.models.LinkedDataConceptFilter":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":linked_data_country_filters:e -> "app.domain.references.models.models.LinkedDataCountryFilter":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":linked_data_country_wb_region_filters:e -> "app.domain.references.models.models.LinkedDataCountryWBRegionFilter":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":publication_year_range:e -> "app.domain.references.models.models.PublicationYearRange":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-7a566e17515abe2be24ef781931a6fdea628a235.png)
Show JSON schema
{ "title": "SearchExport", "description": "A queued job that produces a file of references matching a search.", "type": "object", "properties": { "id": { "description": "The autogenerated database ID.", "format": "uuid", "title": "Id", "type": "string" }, "export_format": { "$ref": "#/$defs/ExportFormat", "default": "jsonl", "description": "The serialization format of the produced file." }, "status": { "$ref": "#/$defs/ExportStatus", "default": "pending", "description": "The current status of the export job." }, "result_file": { "anyOf": [ { "$ref": "#/$defs/BlobStorageFile" }, { "type": "null" } ], "default": null, "description": "The file produced by the job, once completed." }, "n_references": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of references in the produced file.", "title": "N References" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error message, if the job failed.", "title": "Error" }, "query": { "$ref": "#/$defs/SearchQuery", "description": "The search specification this export resolves." }, "sort": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Sort fields, in the same form `/references/search/` accepts.", "title": "Sort" }, "truncated": { "default": false, "description": "Whether the matching result set was larger than the server's result-window cap. When true, the JSONL contains only the first window's worth of matches.", "title": "Truncated", "type": "boolean" } }, "$defs": { "AnnotationFilter": { "description": "Model representing an annotation filter for searching references.", "properties": { "scheme": { "description": "The annotation scheme to filter on.", "title": "Scheme", "type": "string" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The annotation label to filter on.", "title": "Label" }, "score": { "anyOf": [ { "maximum": 1.0, "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Optional score threshold for the annotation filter.", "title": "Score" } }, "required": [ "scheme" ], "title": "AnnotationFilter", "type": "object" }, "BlobStorageFile": { "description": "Model to represent Blob Storage files.", "properties": { "location": { "$ref": "#/$defs/BlobStorageLocation", "description": "The location of the blob storage." }, "container": { "description": "The name of the container in blob storage.", "pattern": "^[^/]*$", "title": "Container", "type": "string" }, "path": { "description": "The path to the file in blob storage.", "title": "Path", "type": "string" }, "filename": { "description": "The name of the file in blob storage.", "pattern": "^[^/]*$", "title": "Filename", "type": "string" } }, "required": [ "location", "container", "path", "filename" ], "title": "BlobStorageFile", "type": "object" }, "BlobStorageLocation": { "description": "Blob Storage locations.", "enum": [ "azure", "minio", "http", "https" ], "title": "BlobStorageLocation", "type": "string" }, "ExportFormat": { "description": "The serialization format of a reference export.", "enum": [ "jsonl", "ris" ], "title": "ExportFormat", "type": "string" }, "ExportStatus": { "description": "The status of an export job.", "enum": [ "pending", "running", "completed", "failed" ], "title": "ExportStatus", "type": "string" }, "LinkedDataConceptFilter": { "description": "A set of fully-qualified concept URIs to match on ``linked_data_concepts``.\n\nWithin a single filter, references must carry at least one of the listed URIs\n(logical OR). Multiple filters on a query are ANDed together.", "properties": { "concept_uris": { "description": "Concept URIs to match. At least one must appear on the reference.", "items": { "type": "string" }, "minItems": 1, "title": "Concept Uris", "type": "array" } }, "required": [ "concept_uris" ], "title": "LinkedDataConceptFilter", "type": "object" }, "LinkedDataCountryFilter": { "description": "A set of ISO 3166-1 alpha-2 codes to match on ``linked_data_countries``.\n\nOR within a filter; AND between filters.", "properties": { "country_codes": { "description": "ISO 3166-1 alpha-2 country codes. At least one must appear on the reference.", "items": { "pattern": "^[A-Z]{2}$", "type": "string" }, "minItems": 1, "title": "Country Codes", "type": "array" } }, "required": [ "country_codes" ], "title": "LinkedDataCountryFilter", "type": "object" }, "LinkedDataCountryWBRegionFilter": { "description": "A set of World Bank region IDs to match on ``linked_data_country_wb_regions``.\n\nOR within a filter; AND between filters.", "properties": { "region_ids": { "description": "World Bank region IDs. At least one must appear on the reference.", "items": { "enum": [ "EAS", "ECS", "LCN", "MEA", "NAC", "SAS", "SSF" ], "type": "string" }, "minItems": 1, "title": "Region Ids", "type": "array" } }, "required": [ "region_ids" ], "title": "LinkedDataCountryWBRegionFilter", "type": "object" }, "PublicationYearRange": { "description": "A range of publication years for filtering search results.", "properties": { "start": { "anyOf": [ { "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Start year (inclusive)", "title": "Start" }, "end": { "anyOf": [ { "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "End year (inclusive)", "title": "End" } }, "title": "PublicationYearRange", "type": "object" }, "SearchQuery": { "description": "A specification for searching references.", "properties": { "query_string": { "description": "The Lucene query string to search with.", "title": "Query String", "type": "string" }, "annotation_filters": { "description": "Annotation filters to AND with the query string.", "items": { "$ref": "#/$defs/AnnotationFilter" }, "title": "Annotation Filters", "type": "array" }, "publication_year_range": { "anyOf": [ { "$ref": "#/$defs/PublicationYearRange" }, { "type": "null" } ], "default": null, "description": "Publication year range to AND with the query string." }, "linked_data_concept_filters": { "description": "Concept URI filters to AND with the query string. Each filter is an OR-set of URIs.", "items": { "$ref": "#/$defs/LinkedDataConceptFilter" }, "title": "Linked Data Concept Filters", "type": "array" }, "linked_data_country_filters": { "description": "Country code filters to AND with the query string. Each filter is an OR-set of ISO 3166-1 alpha-2 codes.", "items": { "$ref": "#/$defs/LinkedDataCountryFilter" }, "title": "Linked Data Country Filters", "type": "array" }, "linked_data_country_wb_region_filters": { "description": "World Bank region filters to AND with the query string. Each filter is an OR-set of region IDs.", "items": { "$ref": "#/$defs/LinkedDataCountryWBRegionFilter" }, "title": "Linked Data Country Wb Region Filters", "type": "array" } }, "required": [ "query_string" ], "title": "SearchQuery", "type": "object" } }, "required": [ "query" ] }
- Config:
from_attributes: bool = True
- Fields:
- field export_format: ExportFormat = ExportFormat.JSONL[source]#
The serialization format of the produced file.
- field query: SearchQuery [Required][source]#
The search specification this export resolves.
- field result_file: BlobStorageFile | None = None[source]#
The file produced by the job, once completed.
- field sort: list[str] | None = None[source]#
Sort fields, in the same form /references/search/ accepts.
- field status: ExportStatus = ExportStatus.PENDING[source]#
The current status of the export job.
- app.domain.references.models.models.SearchExportStatus[source]#
alias of
ExportStatus
- pydantic model app.domain.references.models.models.SearchQuery[source]#
A specification for searching references.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.AnnotationFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationFilter</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str | None</td></tr><tr><td>score</td><td port="score">float | None</td></tr></table>>,
tooltip="app.domain.references.models.models.AnnotationFilter

Model representing an annotation filter for searching references.&#\
xA;"];
"app.domain.references.models.models.LinkedDataConceptFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataConceptFilter</b></td></tr><tr><td>concept_uris</td><td port="concept_uris">list[str]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataConceptFilter

A set of fully-qualified concept URIs to match on ``linked_\
data_concepts``.

Within a single filter, references must carry at least one of the listed URIs
(logical OR). Multiple \
filters on a query are ANDed together.
"];
"app.domain.references.models.models.LinkedDataCountryFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataCountryFilter</b></td></tr><tr><td>country_codes</td><td port="country_codes">list[str]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataCountryFilter

A set of ISO 3166-1 alpha-2 codes to match on ``linked_data_\
countries``.

OR within a filter; AND between filters.
"];
"app.domain.references.models.models.LinkedDataCountryWBRegionFilter" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataCountryWBRegionFilter</b></td></tr><tr><td>region_ids</td><td port="region_ids">list[Literal['EAS', 'ECS', 'LCN', 'MEA', 'NAC', 'SAS', 'SSF']]</td></tr></table>>,
tooltip="app.domain.references.models.models.LinkedDataCountryWBRegionFilter

A set of World Bank region IDs to match on ``linked_\
data_country_wb_regions``.

OR within a filter; AND between filters.
"];
"app.domain.references.models.models.PublicationYearRange" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationYearRange</b></td></tr><tr><td>start</td><td port="start">int | None</td></tr><tr><td>end</td><td port="end">int | None</td></tr></table>>,
tooltip="app.domain.references.models.models.PublicationYearRange

A range of publication years for filtering search results.
"];
"app.domain.references.models.models.SearchQuery" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>SearchQuery</b></td></tr><tr><td>query_string</td><td port="query_string">str</td></tr><tr><td>annotation_filters</td><td port="annotation_filters">list[AnnotationFilter]</td></tr><tr><td>publication_year_range</td><td port="publication_year_range">PublicationYearRange | None</td></tr><tr><td>linked_data_concept_filters</td><td port="linked_data_concept_filters">list[LinkedDataConceptFilter]</td></tr><tr><td>linked_data_country_filters</td><td port="linked_data_country_filters">list[LinkedDataCountryFilter]</td></tr><tr><td>linked_data_country_wb_region_filters</td><td port="linked_data_country_wb_region_filters">list[LinkedDataCountryWBRegionFilter]</td></tr></table>>,
tooltip="app.domain.references.models.models.SearchQuery

A specification for searching references.
"];
"app.domain.references.models.models.SearchQuery":annotation_filters:e -> "app.domain.references.models.models.AnnotationFilter":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":linked_data_concept_filters:e -> "app.domain.references.models.models.LinkedDataConceptFilter":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":linked_data_country_filters:e -> "app.domain.references.models.models.LinkedDataCountryFilter":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":linked_data_country_wb_region_filters:e -> "app.domain.references.models.models.LinkedDataCountryWBRegionFilter":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"app.domain.references.models.models.SearchQuery":publication_year_range:e -> "app.domain.references.models.models.PublicationYearRange":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-8f104c9221836a240e307a270eab34639a00efb3.png)
Show JSON schema
{ "title": "SearchQuery", "description": "A specification for searching references.", "type": "object", "properties": { "query_string": { "description": "The Lucene query string to search with.", "title": "Query String", "type": "string" }, "annotation_filters": { "description": "Annotation filters to AND with the query string.", "items": { "$ref": "#/$defs/AnnotationFilter" }, "title": "Annotation Filters", "type": "array" }, "publication_year_range": { "anyOf": [ { "$ref": "#/$defs/PublicationYearRange" }, { "type": "null" } ], "default": null, "description": "Publication year range to AND with the query string." }, "linked_data_concept_filters": { "description": "Concept URI filters to AND with the query string. Each filter is an OR-set of URIs.", "items": { "$ref": "#/$defs/LinkedDataConceptFilter" }, "title": "Linked Data Concept Filters", "type": "array" }, "linked_data_country_filters": { "description": "Country code filters to AND with the query string. Each filter is an OR-set of ISO 3166-1 alpha-2 codes.", "items": { "$ref": "#/$defs/LinkedDataCountryFilter" }, "title": "Linked Data Country Filters", "type": "array" }, "linked_data_country_wb_region_filters": { "description": "World Bank region filters to AND with the query string. Each filter is an OR-set of region IDs.", "items": { "$ref": "#/$defs/LinkedDataCountryWBRegionFilter" }, "title": "Linked Data Country Wb Region Filters", "type": "array" } }, "$defs": { "AnnotationFilter": { "description": "Model representing an annotation filter for searching references.", "properties": { "scheme": { "description": "The annotation scheme to filter on.", "title": "Scheme", "type": "string" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The annotation label to filter on.", "title": "Label" }, "score": { "anyOf": [ { "maximum": 1.0, "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Optional score threshold for the annotation filter.", "title": "Score" } }, "required": [ "scheme" ], "title": "AnnotationFilter", "type": "object" }, "LinkedDataConceptFilter": { "description": "A set of fully-qualified concept URIs to match on ``linked_data_concepts``.\n\nWithin a single filter, references must carry at least one of the listed URIs\n(logical OR). Multiple filters on a query are ANDed together.", "properties": { "concept_uris": { "description": "Concept URIs to match. At least one must appear on the reference.", "items": { "type": "string" }, "minItems": 1, "title": "Concept Uris", "type": "array" } }, "required": [ "concept_uris" ], "title": "LinkedDataConceptFilter", "type": "object" }, "LinkedDataCountryFilter": { "description": "A set of ISO 3166-1 alpha-2 codes to match on ``linked_data_countries``.\n\nOR within a filter; AND between filters.", "properties": { "country_codes": { "description": "ISO 3166-1 alpha-2 country codes. At least one must appear on the reference.", "items": { "pattern": "^[A-Z]{2}$", "type": "string" }, "minItems": 1, "title": "Country Codes", "type": "array" } }, "required": [ "country_codes" ], "title": "LinkedDataCountryFilter", "type": "object" }, "LinkedDataCountryWBRegionFilter": { "description": "A set of World Bank region IDs to match on ``linked_data_country_wb_regions``.\n\nOR within a filter; AND between filters.", "properties": { "region_ids": { "description": "World Bank region IDs. At least one must appear on the reference.", "items": { "enum": [ "EAS", "ECS", "LCN", "MEA", "NAC", "SAS", "SSF" ], "type": "string" }, "minItems": 1, "title": "Region Ids", "type": "array" } }, "required": [ "region_ids" ], "title": "LinkedDataCountryWBRegionFilter", "type": "object" }, "PublicationYearRange": { "description": "A range of publication years for filtering search results.", "properties": { "start": { "anyOf": [ { "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Start year (inclusive)", "title": "Start" }, "end": { "anyOf": [ { "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "End year (inclusive)", "title": "End" } }, "title": "PublicationYearRange", "type": "object" } }, "required": [ "query_string" ] }
- Fields:
annotation_filters (list[app.domain.references.models.models.AnnotationFilter])linked_data_concept_filters (list[app.domain.references.models.models.LinkedDataConceptFilter])linked_data_country_filters (list[app.domain.references.models.models.LinkedDataCountryFilter])publication_year_range (app.domain.references.models.models.PublicationYearRange | None)
- field annotation_filters: list[AnnotationFilter] [Optional][source]#
Annotation filters to AND with the query string.
- field linked_data_concept_filters: list[LinkedDataConceptFilter] [Optional][source]#
Concept URI filters to AND with the query string. Each filter is an OR-set of URIs.
- field linked_data_country_filters: list[LinkedDataCountryFilter] [Optional][source]#
Country code filters to AND with the query string. Each filter is an OR-set of ISO 3166-1 alpha-2 codes.
- field linked_data_country_wb_region_filters: list[LinkedDataCountryWBRegionFilter] [Optional][source]#
World Bank region filters to AND with the query string. Each filter is an OR-set of region IDs.
- field publication_year_range: PublicationYearRange | None = None[source]#
Publication year range to AND with the query string.
- pydantic model app.domain.references.models.models.SiblingGroup[source]#
A user-selected subset of a sibling set, for sibling-aware facet aggregation.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.SiblingGroup" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>SiblingGroup</b></td></tr><tr><td>selected</td><td port="selected">tuple[str, ...]</td></tr><tr><td>siblings_including_selected</td><td port="siblings_including_selected">frozenset[str] | None</td></tr></table>>,
tooltip="app.domain.references.models.models.SiblingGroup

A user-selected subset of a sibling set, for sibling-aware facet aggregation.&#\
xA;"];
}](../../_images/graphviz-7fd48a74d5509b0153cca32b73bba0ceb1d0b8fa.png)
Show JSON schema
{ "title": "SiblingGroup", "description": "A user-selected subset of a sibling set, for sibling-aware facet aggregation.", "type": "object", "properties": { "selected": { "description": "Values the user selected from this sibling set.", "items": { "type": "string" }, "title": "Selected", "type": "array" }, "siblings_including_selected": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "uniqueItems": true }, { "type": "null" } ], "description": "Union of the user's selection and their siblings, used as the ``include`` set for the group's facet aggregation. ``None`` signals universal mode: every value of the field is treated as a sibling, so the agg uses no ``include`` filter.", "title": "Siblings Including Selected" } }, "required": [ "selected", "siblings_including_selected" ] }
- Config:
frozen: bool = True
- Fields:
- class app.domain.references.models.models.Visibility(*values)[source]#
The visibility of a data element in the repository.
This is used to manage whether information should be publicly available or restricted (generally due to copyright constraints from publishers).
TODO: Implement data governance layer to manage this.
- pydantic model app.domain.references.models.models.YearDecay[source]#
Resolved decay spec carried on a candidate query; origin is required.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.YearDecay" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>YearDecay</b></td></tr><tr><td>offset</td><td port="offset">int</td></tr><tr><td>scale</td><td port="scale">int</td></tr><tr><td>decay</td><td port="decay">float</td></tr><tr><td>weight</td><td port="weight">float</td></tr><tr><td>origin</td><td port="origin">int</td></tr></table>>,
tooltip="app.domain.references.models.models.YearDecay

Resolved decay spec carried on a candidate query; origin is required.
"];
}](../../_images/graphviz-0f6b96327edc85999c846754e5517e354c93120b.png)
Show JSON schema
{ "title": "YearDecay", "description": "Resolved decay spec carried on a candidate query; origin is required.", "type": "object", "properties": { "offset": { "default": 1, "minimum": 0, "title": "Offset", "type": "integer" }, "scale": { "default": 9, "exclusiveMinimum": 0, "title": "Scale", "type": "integer" }, "decay": { "default": 0.5, "exclusiveMaximum": 1, "exclusiveMinimum": 0, "title": "Decay", "type": "number" }, "weight": { "default": 0.1, "minimum": 0, "title": "Weight", "type": "number" }, "origin": { "title": "Origin", "type": "integer" } }, "required": [ "origin" ] }
- Config:
frozen: bool = True
- Fields:
- pydantic model app.domain.references.models.models.YearDecayConfig[source]#
Immutable, versioned publication-year decay parameters (no query origin).
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.models.YearDecayConfig" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>YearDecayConfig</b></td></tr><tr><td>offset</td><td port="offset">int</td></tr><tr><td>scale</td><td port="scale">int</td></tr><tr><td>decay</td><td port="decay">float</td></tr><tr><td>weight</td><td port="weight">float</td></tr></table>>,
tooltip="app.domain.references.models.models.YearDecayConfig

Immutable, versioned publication-year decay parameters (no query origin)\
.
"];
}](../../_images/graphviz-29b6a1fd06ec9c631f5a883b657607c0f3411575.png)
Show JSON schema
{ "title": "YearDecayConfig", "description": "Immutable, versioned publication-year decay parameters (no query origin).", "type": "object", "properties": { "offset": { "default": 1, "minimum": 0, "title": "Offset", "type": "integer" }, "scale": { "default": 9, "exclusiveMinimum": 0, "title": "Scale", "type": "integer" }, "decay": { "default": 0.5, "exclusiveMaximum": 1, "exclusiveMinimum": 0, "title": "Decay", "type": "number" }, "weight": { "default": 0.1, "minimum": 0, "title": "Weight", "type": "number" } } }
- Config:
frozen: bool = True
- Fields:
Pydantic models and adapters used to validate reference data.
A validator differs from an anti-corruption service in that it returns information about the parsing process as well as the converted data.
- pydantic model app.domain.references.models.validators.EnhancementParseResult[source]#
Result of an attempt to parse an enhancement.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.validators.EnhancementParseResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementParseResult</b></td></tr><tr><td>enhancement</td><td port="enhancement">EnhancementFileInput | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
tooltip="app.domain.references.models.validators.EnhancementParseResult

Result of an attempt to parse an enhancement.
"];
"destiny_sdk.enhancements.EnhancementFileInput" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementFileInput</b></td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement</td></tr></table>>,
tooltip="destiny_sdk.enhancements.EnhancementFileInput

Enhancement model used to marshall a file input to new references.
"];
"app.domain.references.models.validators.EnhancementParseResult":enhancement:e -> "destiny_sdk.enhancements.EnhancementFileInput":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>updated_date</td><td port="updated_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>pagination</td><td port="pagination">Pagination | None</td></tr><tr><td>publication_venue</td><td port="publication_venue">PublicationVenue | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Pagination" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Pagination</b></td></tr><tr><td>volume</td><td port="volume">str | None</td></tr><tr><td>issue</td><td port="issue">str | None</td></tr><tr><td>first_page</td><td port="first_page">str | None</td></tr><tr><td>last_page</td><td port="last_page">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Pagination

Pagination information for journal articles.

Maps to OpenAlex's work.biblio \
object. All fields are strings to match
OpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":pagination:e -> "destiny_sdk.enhancements.Pagination":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.PublicationVenue" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationVenue</b></td></tr><tr><td>display_name</td><td port="display_name">str | None</td></tr><tr><td>venue_type</td><td port="venue_type">PublicationVenueType | None</td></tr><tr><td>issn</td><td port="issn">list[str] | None</td></tr><tr><td>issn_l</td><td port="issn_l">str | None</td></tr><tr><td>host_organization_name</td><td port="host_organization_name">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.PublicationVenue

A publication venue (journal, repository, conference, etc.).
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":publication_venue:e -> "destiny_sdk.enhancements.PublicationVenue":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>file_url</td><td port="file_url">HttpUrl</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.
&#\
xA;Full texts are not for the sharing of copyrighted material without a license.
They are to maintain files for validation and \
to allow permitted text and data
mining activities.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.FullTextEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.RawEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RawEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.RAW]</td></tr><tr><td>source_export_date</td><td port="source_export_date">datetime</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>metadata</td><td port="metadata">dict[str, Any]</td></tr><tr><td>data</td><td port="data">Any</td></tr></table>>,
tooltip="destiny_sdk.enhancements.RawEnhancement

An enhancement for storing raw/arbitrary/unstructured data.

Data in these \
enhancements is intended for future conversion into structured form.

This enhancement accepts any fields passed in to `\
data`. These enhancements cannot
be created by robots.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.RawEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceAssociationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.REFERENCE_ASSOCIATION]</td></tr><tr><td>associated_reference_ids</td><td port="associated_reference_ids">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | UUID | UUID]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement

An enhancement for storing associations between references.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-af5c76077b204c8aef68583a3b6793d7a95559ef.png)
Show JSON schema
{ "title": "EnhancementParseResult", "description": "Result of an attempt to parse an enhancement.", "type": "object", "properties": { "enhancement": { "anyOf": [ { "$ref": "#/$defs/EnhancementFileInput" }, { "type": "null" } ], "default": null, "description": "The enhancement to create" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error encountered during the parsing process", "title": "Error" } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "updated_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date of the last OpenAlex update to this metadata", "title": "Updated Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "pagination": { "anyOf": [ { "$ref": "#/$defs/Pagination" }, { "type": "null" } ], "default": null, "description": "Pagination info (volume, issue, pages)." }, "publication_venue": { "anyOf": [ { "$ref": "#/$defs/PublicationVenue" }, { "type": "null" } ], "default": null, "description": "Publication venue information (journal, repository, etc.)." } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "EnhancementFileInput": { "description": "Enhancement model used to marshall a file input to new references.", "properties": { "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "processor_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Processor Version" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "full_text": "#/$defs/FullTextEnhancement", "linked_data": "#/$defs/LinkedDataEnhancement", "location": "#/$defs/LocationEnhancement", "raw": "#/$defs/RawEnhancement", "reference_association": "#/$defs/ReferenceAssociationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" }, { "$ref": "#/$defs/ReferenceAssociationEnhancement" }, { "$ref": "#/$defs/LinkedDataEnhancement" }, { "$ref": "#/$defs/FullTextEnhancement" }, { "$ref": "#/$defs/RawEnhancement" } ], "title": "Content" } }, "required": [ "source", "visibility", "content" ], "title": "EnhancementFileInput", "type": "object" }, "FullTextEnhancement": { "description": "An enhancement for storing a link to the full text and its metadata.\n\nFull texts are not for the sharing of copyrighted material without a license.\nThey are to maintain files for validation and to allow permitted text and data\nmining activities.", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "file_url": { "description": "URL to the full text file", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "File Url", "type": "string" }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "required": [ "file_url" ], "title": "FullTextEnhancement", "type": "object" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "Pagination": { "description": "Pagination information for journal articles.\n\nMaps to OpenAlex's work.biblio object. All fields are strings to match\nOpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".", "properties": { "volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The volume number of the journal/publication.", "title": "Volume" }, "issue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The issue number of the journal/publication.", "title": "Issue" }, "first_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The first page number of the reference in the publication.", "title": "First Page" }, "last_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The last page number of the reference in the publication.", "title": "Last Page" } }, "title": "Pagination", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "PublicationVenue": { "description": "A publication venue (journal, repository, conference, etc.).", "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The display name of the venue (journal name, repository name, etc.)", "title": "Display Name" }, "venue_type": { "anyOf": [ { "$ref": "#/$defs/PublicationVenueType" }, { "type": "null" } ], "default": null, "description": "The type of venue: journal, repository, book, conference, etc." }, "issn": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of ISSNs associated with this venue (print and electronic)", "title": "Issn" }, "issn_l": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The linking ISSN - a canonical ISSN for the venue across format changes", "title": "Issn L" }, "host_organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Display name of the host organization (publisher)", "title": "Host Organization Name" } }, "title": "PublicationVenue", "type": "object" }, "PublicationVenueType": { "description": "Type of publication venue.\n\nAligns with OpenAlex source types.", "enum": [ "journal", "repository", "conference", "ebook_platform", "book_series", "other" ], "title": "PublicationVenueType", "type": "string" }, "RawEnhancement": { "description": "An enhancement for storing raw/arbitrary/unstructured data.\n\nData in these enhancements is intended for future conversion into structured form.\n\nThis enhancement accepts any fields passed in to `data`. These enhancements cannot\nbe created by robots.", "properties": { "enhancement_type": { "const": "raw", "default": "raw", "title": "Enhancement Type", "type": "string" }, "source_export_date": { "description": "Date the enhancement data was retrieved.", "format": "date-time", "title": "Source Export Date", "type": "string" }, "description": { "description": "Description of the data to aid in future refinement.", "title": "Description", "type": "string" }, "metadata": { "additionalProperties": true, "description": "Additional metadata to aid in future structuring of raw data", "title": "Metadata", "type": "object" }, "data": { "description": "Unstructured data for later processing.", "title": "Data" } }, "required": [ "source_export_date", "description", "data" ], "title": "RawEnhancement", "type": "object" }, "ReferenceAssociationEnhancement": { "description": "An enhancement for storing associations between references.", "properties": { "enhancement_type": { "const": "reference_association", "default": "reference_association", "title": "Enhancement Type", "type": "string" }, "associated_reference_ids": { "description": "A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.", "items": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." } ] }, "minItems": 1, "title": "Associated Reference Ids", "type": "array" }, "association_type": { "$ref": "#/$defs/ReferenceAssociationType", "description": "The type of association between this reference and the associated ones. Direction is important: \"this reference <association_type> associated reference\"." } }, "required": [ "associated_reference_ids", "association_type" ], "title": "ReferenceAssociationEnhancement", "type": "object" }, "ReferenceAssociationType": { "description": "The type of association between references.\n\nDirection is important: \"this reference <association_type> associated reference\".", "enum": [ "cites", "is_cited_by", "is_similar_to" ], "title": "ReferenceAssociationType", "type": "string" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } } }
- field enhancement: EnhancementFileInput | None = None[source]#
The enhancement to create
- pydantic model app.domain.references.models.validators.EnhancementResultValidator[source]#
Result of a batch enhancement request.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.validators.EnhancementResultValidator" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementResultValidator</b></td></tr><tr><td>enhancement_to_add</td><td port="enhancement_to_add">Enhancement | None</td></tr><tr><td>robot_error</td><td port="robot_error">LinkedRobotError | None</td></tr><tr><td>parse_failure</td><td port="parse_failure">str | None</td></tr></table>>,
tooltip="app.domain.references.models.validators.EnhancementResultValidator

Result of a batch enhancement request.
"];
"destiny_sdk.enhancements.Enhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Enhancement</b></td></tr><tr><td>id</td><td port="id">UUID | UUID | None</td></tr><tr><td>reference_id</td><td port="reference_id">UUID | UUID</td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>derived_from</td><td port="derived_from">list[UUID | UUID] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement</td></tr><tr><td>created_at</td><td port="created_at">datetime | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Enhancement

Core enhancement class.
"];
"app.domain.references.models.validators.EnhancementResultValidator":enhancement_to_add:e -> "destiny_sdk.enhancements.Enhancement":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.robots.LinkedRobotError" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedRobotError</b></td></tr><tr><td>message</td><td port="message">str</td></tr><tr><td>reference_id</td><td port="reference_id">UUID | UUID</td></tr></table>>,
tooltip="destiny_sdk.robots.LinkedRobotError

A record of something going wrong when processing an individual reference.

\
Used in results for batch requests - in single requests, the reference
id is derived from the request id.
"];
"app.domain.references.models.validators.EnhancementResultValidator":robot_error:e -> "destiny_sdk.robots.LinkedRobotError":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>updated_date</td><td port="updated_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>pagination</td><td port="pagination">Pagination | None</td></tr><tr><td>publication_venue</td><td port="publication_venue">PublicationVenue | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Pagination" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Pagination</b></td></tr><tr><td>volume</td><td port="volume">str | None</td></tr><tr><td>issue</td><td port="issue">str | None</td></tr><tr><td>first_page</td><td port="first_page">str | None</td></tr><tr><td>last_page</td><td port="last_page">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Pagination

Pagination information for journal articles.

Maps to OpenAlex's work.biblio \
object. All fields are strings to match
OpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":pagination:e -> "destiny_sdk.enhancements.Pagination":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.PublicationVenue" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationVenue</b></td></tr><tr><td>display_name</td><td port="display_name">str | None</td></tr><tr><td>venue_type</td><td port="venue_type">PublicationVenueType | None</td></tr><tr><td>issn</td><td port="issn">list[str] | None</td></tr><tr><td>issn_l</td><td port="issn_l">str | None</td></tr><tr><td>host_organization_name</td><td port="host_organization_name">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.PublicationVenue

A publication venue (journal, repository, conference, etc.).
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":publication_venue:e -> "destiny_sdk.enhancements.PublicationVenue":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>file_url</td><td port="file_url">HttpUrl</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.
&#\
xA;Full texts are not for the sharing of copyrighted material without a license.
They are to maintain files for validation and \
to allow permitted text and data
mining activities.
"];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.FullTextEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.RawEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RawEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.RAW]</td></tr><tr><td>source_export_date</td><td port="source_export_date">datetime</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>metadata</td><td port="metadata">dict[str, Any]</td></tr><tr><td>data</td><td port="data">Any</td></tr></table>>,
tooltip="destiny_sdk.enhancements.RawEnhancement

An enhancement for storing raw/arbitrary/unstructured data.

Data in these \
enhancements is intended for future conversion into structured form.

This enhancement accepts any fields passed in to `\
data`. These enhancements cannot
be created by robots.
"];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.RawEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceAssociationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.REFERENCE_ASSOCIATION]</td></tr><tr><td>associated_reference_ids</td><td port="associated_reference_ids">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | UUID | UUID]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement

An enhancement for storing associations between references.
"];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../../_images/graphviz-27d81264cbece94c6c8b0d20b79d3e3b1a5e3b84.png)
Show JSON schema
{ "title": "EnhancementResultValidator", "description": "Result of a batch enhancement request.", "type": "object", "properties": { "enhancement_to_add": { "anyOf": [ { "$ref": "#/$defs/Enhancement" }, { "type": "null" } ], "default": null, "description": "An enhancement to add to the references" }, "robot_error": { "anyOf": [ { "$ref": "#/$defs/LinkedRobotError" }, { "type": "null" } ], "default": null, "description": "An error encountered by the robot during processing" }, "parse_failure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An error encountered while parsing the batch enhancement result", "title": "Parse Failure" } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "updated_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date of the last OpenAlex update to this metadata", "title": "Updated Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "pagination": { "anyOf": [ { "$ref": "#/$defs/Pagination" }, { "type": "null" } ], "default": null, "description": "Pagination info (volume, issue, pages)." }, "publication_venue": { "anyOf": [ { "$ref": "#/$defs/PublicationVenue" }, { "type": "null" } ], "default": null, "description": "Publication venue information (journal, repository, etc.)." } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "Enhancement": { "description": "Core enhancement class.", "properties": { "id": { "anyOf": [ { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement. Populated by the repository when sending enhancements with references.", "title": "Id" }, "reference_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "The ID of the reference this enhancement is associated with.", "title": "Reference Id" }, "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "robot_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Robot Version" }, "derived_from": { "anyOf": [ { "items": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of enhancement IDs that this enhancement was derived from.", "title": "Derived From" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "full_text": "#/$defs/FullTextEnhancement", "linked_data": "#/$defs/LinkedDataEnhancement", "location": "#/$defs/LocationEnhancement", "raw": "#/$defs/RawEnhancement", "reference_association": "#/$defs/ReferenceAssociationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" }, { "$ref": "#/$defs/ReferenceAssociationEnhancement" }, { "$ref": "#/$defs/LinkedDataEnhancement" }, { "$ref": "#/$defs/FullTextEnhancement" }, { "$ref": "#/$defs/RawEnhancement" } ], "title": "Content" }, "created_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 datetime when the enhancement was added to the repository. This field is populated by the repository, if it is included on an incoming enhancement it will be ignored.", "title": "Created At" } }, "required": [ "reference_id", "source", "visibility", "content" ], "title": "Enhancement", "type": "object" }, "FullTextEnhancement": { "description": "An enhancement for storing a link to the full text and its metadata.\n\nFull texts are not for the sharing of copyrighted material without a license.\nThey are to maintain files for validation and to allow permitted text and data\nmining activities.", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "file_url": { "description": "URL to the full text file", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "File Url", "type": "string" }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "required": [ "file_url" ], "title": "FullTextEnhancement", "type": "object" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "LinkedRobotError": { "description": "A record of something going wrong when processing an individual reference.\n\nUsed in results for batch requests - in single requests, the reference\nid is derived from the request id.", "properties": { "message": { "description": "Message which describes the error encountered during processing", "title": "Message", "type": "string" }, "reference_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "The ID of the reference which caused the error.", "title": "Reference Id" } }, "required": [ "message", "reference_id" ], "title": "LinkedRobotError", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "Pagination": { "description": "Pagination information for journal articles.\n\nMaps to OpenAlex's work.biblio object. All fields are strings to match\nOpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".", "properties": { "volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The volume number of the journal/publication.", "title": "Volume" }, "issue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The issue number of the journal/publication.", "title": "Issue" }, "first_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The first page number of the reference in the publication.", "title": "First Page" }, "last_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The last page number of the reference in the publication.", "title": "Last Page" } }, "title": "Pagination", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "PublicationVenue": { "description": "A publication venue (journal, repository, conference, etc.).", "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The display name of the venue (journal name, repository name, etc.)", "title": "Display Name" }, "venue_type": { "anyOf": [ { "$ref": "#/$defs/PublicationVenueType" }, { "type": "null" } ], "default": null, "description": "The type of venue: journal, repository, book, conference, etc." }, "issn": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of ISSNs associated with this venue (print and electronic)", "title": "Issn" }, "issn_l": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The linking ISSN - a canonical ISSN for the venue across format changes", "title": "Issn L" }, "host_organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Display name of the host organization (publisher)", "title": "Host Organization Name" } }, "title": "PublicationVenue", "type": "object" }, "PublicationVenueType": { "description": "Type of publication venue.\n\nAligns with OpenAlex source types.", "enum": [ "journal", "repository", "conference", "ebook_platform", "book_series", "other" ], "title": "PublicationVenueType", "type": "string" }, "RawEnhancement": { "description": "An enhancement for storing raw/arbitrary/unstructured data.\n\nData in these enhancements is intended for future conversion into structured form.\n\nThis enhancement accepts any fields passed in to `data`. These enhancements cannot\nbe created by robots.", "properties": { "enhancement_type": { "const": "raw", "default": "raw", "title": "Enhancement Type", "type": "string" }, "source_export_date": { "description": "Date the enhancement data was retrieved.", "format": "date-time", "title": "Source Export Date", "type": "string" }, "description": { "description": "Description of the data to aid in future refinement.", "title": "Description", "type": "string" }, "metadata": { "additionalProperties": true, "description": "Additional metadata to aid in future structuring of raw data", "title": "Metadata", "type": "object" }, "data": { "description": "Unstructured data for later processing.", "title": "Data" } }, "required": [ "source_export_date", "description", "data" ], "title": "RawEnhancement", "type": "object" }, "ReferenceAssociationEnhancement": { "description": "An enhancement for storing associations between references.", "properties": { "enhancement_type": { "const": "reference_association", "default": "reference_association", "title": "Enhancement Type", "type": "string" }, "associated_reference_ids": { "description": "A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.", "items": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." } ] }, "minItems": 1, "title": "Associated Reference Ids", "type": "array" }, "association_type": { "$ref": "#/$defs/ReferenceAssociationType", "description": "The type of association between this reference and the associated ones. Direction is important: \"this reference <association_type> associated reference\"." } }, "required": [ "associated_reference_ids", "association_type" ], "title": "ReferenceAssociationEnhancement", "type": "object" }, "ReferenceAssociationType": { "description": "The type of association between references.\n\nDirection is important: \"this reference <association_type> associated reference\".", "enum": [ "cites", "is_cited_by", "is_similar_to" ], "title": "ReferenceAssociationType", "type": "string" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } } }
- Fields:
- field enhancement_to_add: Enhancement | None = None[source]#
An enhancement to add to the references
- field parse_failure: str | None = None[source]#
An error encountered while parsing the batch enhancement result
- field robot_error: LinkedRobotError | None = None[source]#
An error encountered by the robot during processing
- pydantic model app.domain.references.models.validators.ExternalIdentifierParseResult[source]#
Result of an attempt to parse an external identifier.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.validators.ExternalIdentifierParseResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ExternalIdentifierParseResult</b></td></tr><tr><td>external_identifier</td><td port="external_identifier">DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
tooltip="app.domain.references.models.validators.ExternalIdentifierParseResult

Result of an attempt to parse an external identifier.&#\
xA;"];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"app.domain.references.models.validators.ExternalIdentifierParseResult":external_identifier:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"app.domain.references.models.validators.ExternalIdentifierParseResult":external_identifier:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"app.domain.references.models.validators.ExternalIdentifierParseResult":external_identifier:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"app.domain.references.models.validators.ExternalIdentifierParseResult":external_identifier:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"app.domain.references.models.validators.ExternalIdentifierParseResult":external_identifier:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"app.domain.references.models.validators.ExternalIdentifierParseResult":external_identifier:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
}](../../_images/graphviz-65da1d54ca085a55b9943039c8293bcaaead4b59.png)
Show JSON schema
{ "title": "ExternalIdentifierParseResult", "description": "Result of an attempt to parse an external identifier.", "type": "object", "properties": { "external_identifier": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "type": "null" } ], "default": null, "description": "The external identifier to create", "title": "External Identifier" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error encountered during the parsing process", "title": "Error" } }, "$defs": { "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" } } }
- Fields:
- field external_identifier: Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')] | None = None[source]#
The external identifier to create
- pydantic model app.domain.references.models.validators.ReferenceCreateResult[source]#
Result of an attempt to create a reference.
If reference is None, no reference was created and errors will be populated. If reference exists and there are errors, the reference was created but there were errors in the hydration. If reference exists and there are no errors, the reference was created and all enhancements/identifiers were hydrated successfully from the input. If duplicate_decision_id is set, the reference is pending deduplication.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.validators.ReferenceCreateResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceCreateResult</b></td></tr><tr><td>reference</td><td port="reference">ReferenceFileInput | None</td></tr><tr><td>errors</td><td port="errors">list[str]</td></tr><tr><td>reference_id</td><td port="reference_id">UUID | UUID | None</td></tr><tr><td>duplicate_decision_id</td><td port="duplicate_decision_id">UUID | UUID | None</td></tr></table>>,
tooltip="app.domain.references.models.validators.ReferenceCreateResult

Result of an attempt to create a reference.

If reference \
is None, no reference was created and errors will be populated.
If reference exists and there are errors, the reference was \
created but there
were errors in the hydration.
If reference exists and there are no errors, the reference was created and \
all
enhancements/identifiers were hydrated successfully from the input.
If duplicate_decision_id is set, the reference is \
pending deduplication.
"];
"destiny_sdk.references.ReferenceFileInput" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceFileInput</b></td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[EnhancementFileInput] | None</td></tr></table>>,
tooltip="destiny_sdk.references.ReferenceFileInput

Enhancement model used to marshall a file input.
"];
"app.domain.references.models.validators.ReferenceCreateResult":reference:e -> "destiny_sdk.references.ReferenceFileInput":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>updated_date</td><td port="updated_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr><tr><td>pagination</td><td port="pagination">Pagination | None</td></tr><tr><td>publication_venue</td><td port="publication_venue">PublicationVenue | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.Pagination" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Pagination</b></td></tr><tr><td>volume</td><td port="volume">str | None</td></tr><tr><td>issue</td><td port="issue">str | None</td></tr><tr><td>first_page</td><td port="first_page">str | None</td></tr><tr><td>last_page</td><td port="last_page">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Pagination

Pagination information for journal articles.

Maps to OpenAlex's work.biblio \
object. All fields are strings to match
OpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":pagination:e -> "destiny_sdk.enhancements.Pagination":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.PublicationVenue" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PublicationVenue</b></td></tr><tr><td>display_name</td><td port="display_name">str | None</td></tr><tr><td>venue_type</td><td port="venue_type">PublicationVenueType | None</td></tr><tr><td>issn</td><td port="issn">list[str] | None</td></tr><tr><td>issn_l</td><td port="issn_l">str | None</td></tr><tr><td>host_organization_name</td><td port="host_organization_name">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.PublicationVenue

A publication venue (journal, repository, conference, etc.).
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":publication_venue:e -> "destiny_sdk.enhancements.PublicationVenue":_root:w [arrowhead=noneteeodot,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementFileInput</b></td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | LinkedDataEnhancement | FullTextEnhancement | RawEnhancement</td></tr></table>>,
tooltip="destiny_sdk.enhancements.EnhancementFileInput

Enhancement model used to marshall a file input to new references.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.FullTextEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>FullTextEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.FULL_TEXT]</td></tr><tr><td>file_url</td><td port="file_url">HttpUrl</td></tr><tr><td>byte_size</td><td port="byte_size">int | None</td></tr><tr><td>sha256_checksum</td><td port="sha256_checksum">str | None</td></tr><tr><td>mime_type</td><td port="mime_type">str</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>source_url</td><td port="source_url">HttpUrl | None</td></tr><tr><td>retrieved_at</td><td port="retrieved_at">datetime | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.FullTextEnhancement

An enhancement for storing a link to the full text and its metadata.
&#\
xA;Full texts are not for the sharing of copyrighted material without a license.
They are to maintain files for validation and \
to allow permitted text and data
mining activities.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.FullTextEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LinkedDataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedDataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LINKED_DATA]</td></tr><tr><td>vocabulary_uri</td><td port="vocabulary_uri">HttpUrl</td></tr><tr><td>data</td><td port="data">dict[str, JsonValue]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LinkedDataEnhancement

An enhancement for storing structured data in a linked data format.
&#\
xA;The content is a JSON-LD document conforming to the vocabulary and
context specified. This enhancement type is produced by \
mapping robots
that transform RawEnhancement data into the shared vocabulary.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.LinkedDataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.RawEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RawEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.RAW]</td></tr><tr><td>source_export_date</td><td port="source_export_date">datetime</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>metadata</td><td port="metadata">dict[str, Any]</td></tr><tr><td>data</td><td port="data">Any</td></tr></table>>,
tooltip="destiny_sdk.enhancements.RawEnhancement

An enhancement for storing raw/arbitrary/unstructured data.

Data in these \
enhancements is intended for future conversion into structured form.

This enhancement accepts any fields passed in to `\
data`. These enhancements cannot
be created by robots.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.RawEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceAssociationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.REFERENCE_ASSOCIATION]</td></tr><tr><td>associated_reference_ids</td><td port="associated_reference_ids">list[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier | UUID | UUID]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement

An enhancement for storing associations between references.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.ERICIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ERICIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.ERIC]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ERICIdentifier

An external identifier representing an ERIC Number.

An ERIC Number is defined \
as a unique identifying number preceded by
ED (for a non-journal document) or EJ (for a journal article).
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.ProQuestIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProQuestIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PRO_QUEST]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.ProQuestIdentifier

An external identifier representing a ProQuest ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.references.ReferenceFileInput":enhancements:e -> "destiny_sdk.enhancements.EnhancementFileInput":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
"destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=crowodot,
arrowtail=nonenone];
}](../../_images/graphviz-35f8da018da7a87856a07bdeb4931e0434073704.png)
Show JSON schema
{ "title": "ReferenceCreateResult", "description": "Result of an attempt to create a reference.\n\nIf reference is None, no reference was created and errors will be populated.\nIf reference exists and there are errors, the reference was created but there\nwere errors in the hydration.\nIf reference exists and there are no errors, the reference was created and all\nenhancements/identifiers were hydrated successfully from the input.\nIf duplicate_decision_id is set, the reference is pending deduplication.", "type": "object", "properties": { "reference": { "anyOf": [ { "$ref": "#/$defs/ReferenceFileInput" }, { "type": "null" } ], "default": null, "description": "The validated reference input." }, "errors": { "description": "A list of errors encountered during the creation process", "items": { "type": "string" }, "title": "Errors", "type": "array" }, "reference_id": { "anyOf": [ { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." }, { "type": "null" } ], "default": null, "description": "The ID of the created reference, if created", "title": "Reference Id" }, "duplicate_decision_id": { "anyOf": [ { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." }, { "type": "null" } ], "default": null, "description": "The ID of the pending duplicate decision, if required", "title": "Duplicate Decision Id" } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "updated_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date of the last OpenAlex update to this metadata", "title": "Updated Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" }, "pagination": { "anyOf": [ { "$ref": "#/$defs/Pagination" }, { "type": "null" } ], "default": null, "description": "Pagination info (volume, issue, pages)." }, "publication_venue": { "anyOf": [ { "$ref": "#/$defs/PublicationVenue" }, { "type": "null" } ], "default": null, "description": "Publication venue information (journal, repository, etc.)." } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference. Format: '10.<registrant>/<suffix>' where registrant is 4-9 digits and suffix is any non-whitespace characters. Examples: 10.1000/journal.pone.0001, 10.18730/9WQ$D, 10.1000/\u00e9dition", "pattern": "^10\\.\\d{4,9}/\\S+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "ERICIdentifier": { "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unique identifying number preceded by\nED (for a non-journal document) or EJ (for a journal article).", "properties": { "identifier": { "description": "The ERIC Number. Format: 'ED' or 'EJ' followed by digits. Example: ED123456 or EJ789012", "pattern": "E[D|J][0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "eric", "default": "eric", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ERICIdentifier", "type": "object" }, "EnhancementFileInput": { "description": "Enhancement model used to marshall a file input to new references.", "properties": { "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "processor_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Processor Version" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "full_text": "#/$defs/FullTextEnhancement", "linked_data": "#/$defs/LinkedDataEnhancement", "location": "#/$defs/LocationEnhancement", "raw": "#/$defs/RawEnhancement", "reference_association": "#/$defs/ReferenceAssociationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" }, { "$ref": "#/$defs/ReferenceAssociationEnhancement" }, { "$ref": "#/$defs/LinkedDataEnhancement" }, { "$ref": "#/$defs/FullTextEnhancement" }, { "$ref": "#/$defs/RawEnhancement" } ], "title": "Content" } }, "required": [ "source", "visibility", "content" ], "title": "EnhancementFileInput", "type": "object" }, "FullTextEnhancement": { "description": "An enhancement for storing a link to the full text and its metadata.\n\nFull texts are not for the sharing of copyrighted material without a license.\nThey are to maintain files for validation and to allow permitted text and data\nmining activities.", "properties": { "enhancement_type": { "const": "full_text", "default": "full_text", "title": "Enhancement Type", "type": "string" }, "file_url": { "description": "URL to the full text file", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "File Url", "type": "string" }, "byte_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the file in bytes. If provided on import, will be used to validate the file size. Will always be present on enhancements from the repository.", "title": "Byte Size" }, "sha256_checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "SHA256 checksum of the file. If provided on import, will be used to verify the integrity of the file. Will always be present on enhancements from the repository.", "title": "Sha256 Checksum" }, "mime_type": { "default": "application/pdf", "description": "The MIME type of the file.", "title": "Mime Type", "type": "string" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "The version (according to the DRIVER versioning scheme) of this full text." }, "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If this full text is Open Access. May be left as null if this is unknown.", "title": "Is Oa" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The publishing license for this full text.", "examples": [ "apache-2-0", "cc-by", "cc-by-nc", "cc-by-nc-nd", "cc-by-nc-sa", "cc-by-nd", "cc-by-sa", "gpl-v2", "gpl-v3", "isc", "mit", "other-oa", "public-domain" ], "title": "License" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source from which this full text was obtained.", "title": "Source" }, "source_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the source from which this full text was obtained.", "title": "Source Url" }, "retrieved_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "The timestamp when this full text was retrieved.", "title": "Retrieved At" } }, "required": [ "file_url" ], "title": "FullTextEnhancement", "type": "object" }, "JsonValue": {}, "LinkedDataEnhancement": { "description": "An enhancement for storing structured data in a linked data format.\n\nThe content is a JSON-LD document conforming to the vocabulary and\ncontext specified. This enhancement type is produced by mapping robots\nthat transform RawEnhancement data into the shared vocabulary.", "properties": { "enhancement_type": { "const": "linked_data", "default": "linked_data", "title": "Enhancement Type", "type": "string" }, "vocabulary_uri": { "description": "The URI of the vocabulary against which this data was produced. Used for compatibility checking.", "examples": [ "https://vocab.evrepo.org/vocabulary/v1" ], "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Vocabulary Uri", "type": "string" }, "data": { "additionalProperties": { "$ref": "#/$defs/JsonValue" }, "description": "The JSON-LD content. Must contain an '@context' key with a valid URI string. When combined with the @context, this forms a complete linked data graph.", "title": "Data", "type": "object" } }, "required": [ "vocabulary_uri", "data" ], "title": "LinkedDataEnhancement", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference. Format: 'W' followed by digits. Example: W2741809807", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "Pagination": { "description": "Pagination information for journal articles.\n\nMaps to OpenAlex's work.biblio object. All fields are strings to match\nOpenAlex's format, which may include non-numeric values like \"Spring\" or \"A1\".", "properties": { "volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The volume number of the journal/publication.", "title": "Volume" }, "issue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The issue number of the journal/publication.", "title": "Issue" }, "first_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The first page number of the reference in the publication.", "title": "First Page" }, "last_page": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The last page number of the reference in the publication.", "title": "Last Page" } }, "title": "Pagination", "type": "object" }, "ProQuestIdentifier": { "description": "An external identifier representing a ProQuest ID.", "properties": { "identifier": { "description": "The ProQuest ID of the reference. Format: numeric digits only. Example: 12345678", "pattern": "[0-9]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "pro_quest", "default": "pro_quest", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "ProQuestIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID (PMID) of the reference. Example: 12345678", "exclusiveMinimum": 0, "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "PublicationVenue": { "description": "A publication venue (journal, repository, conference, etc.).", "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The display name of the venue (journal name, repository name, etc.)", "title": "Display Name" }, "venue_type": { "anyOf": [ { "$ref": "#/$defs/PublicationVenueType" }, { "type": "null" } ], "default": null, "description": "The type of venue: journal, repository, book, conference, etc." }, "issn": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of ISSNs associated with this venue (print and electronic)", "title": "Issn" }, "issn_l": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The linking ISSN - a canonical ISSN for the venue across format changes", "title": "Issn L" }, "host_organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Display name of the host organization (publisher)", "title": "Host Organization Name" } }, "title": "PublicationVenue", "type": "object" }, "PublicationVenueType": { "description": "Type of publication venue.\n\nAligns with OpenAlex source types.", "enum": [ "journal", "repository", "conference", "ebook_platform", "book_series", "other" ], "title": "PublicationVenueType", "type": "string" }, "RawEnhancement": { "description": "An enhancement for storing raw/arbitrary/unstructured data.\n\nData in these enhancements is intended for future conversion into structured form.\n\nThis enhancement accepts any fields passed in to `data`. These enhancements cannot\nbe created by robots.", "properties": { "enhancement_type": { "const": "raw", "default": "raw", "title": "Enhancement Type", "type": "string" }, "source_export_date": { "description": "Date the enhancement data was retrieved.", "format": "date-time", "title": "Source Export Date", "type": "string" }, "description": { "description": "Description of the data to aid in future refinement.", "title": "Description", "type": "string" }, "metadata": { "additionalProperties": true, "description": "Additional metadata to aid in future structuring of raw data", "title": "Metadata", "type": "object" }, "data": { "description": "Unstructured data for later processing.", "title": "Data" } }, "required": [ "source_export_date", "description", "data" ], "title": "RawEnhancement", "type": "object" }, "ReferenceAssociationEnhancement": { "description": "An enhancement for storing associations between references.", "properties": { "enhancement_type": { "const": "reference_association", "default": "reference_association", "title": "Enhancement Type", "type": "string" }, "associated_reference_ids": { "description": "A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.", "items": { "anyOf": [ { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, { "anyOf": [ { "format": "uuid4", "type": "string" }, { "format": "uuid7", "type": "string" } ], "description": "A DESTINY UUID, which can be either UUID4 or UUID7." } ] }, "minItems": 1, "title": "Associated Reference Ids", "type": "array" }, "association_type": { "$ref": "#/$defs/ReferenceAssociationType", "description": "The type of association between this reference and the associated ones. Direction is important: \"this reference <association_type> associated reference\"." } }, "required": [ "associated_reference_ids", "association_type" ], "title": "ReferenceAssociationEnhancement", "type": "object" }, "ReferenceAssociationType": { "description": "The type of association between references.\n\nDirection is important: \"this reference <association_type> associated reference\".", "enum": [ "cites", "is_cited_by", "is_similar_to" ], "title": "ReferenceAssociationType", "type": "string" }, "ReferenceFileInput": { "description": "Enhancement model used to marshall a file input.", "properties": { "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "anyOf": [ { "items": { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "eric": "#/$defs/ERICIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier", "pro_quest": "#/$defs/ProQuestIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/ERICIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/ProQuestIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `ExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/EnhancementFileInput" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" } }, "title": "ReferenceFileInput", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "pattern": "^[^/]+$", "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } } }
- Fields:
- field duplicate_decision_id: Annotated[Annotated[UUID, UuidVersion(uuid_version=4)] | Annotated[UUID, UuidVersion(uuid_version=7)], FieldInfo(annotation=NoneType, required=True, description='A DESTINY UUID, which can be either UUID4 or UUID7.')] | None = None[source]#
The ID of the pending duplicate decision, if required
- field errors: list[str] [Optional][source]#
A list of errors encountered during the creation process
- field reference: ReferenceFileInput | None = None[source]#
The validated reference input.
- field reference_id: Annotated[Annotated[UUID, UuidVersion(uuid_version=4)] | Annotated[UUID, UuidVersion(uuid_version=7)], FieldInfo(annotation=NoneType, required=True, description='A DESTINY UUID, which can be either UUID4 or UUID7.')] | None = None[source]#
The ID of the created reference, if created
- pydantic model app.domain.references.models.validators.ReferenceFileInputValidator[source]#
Validator for the top-level schema of a reference entry from a file.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"app.domain.references.models.validators.ReferenceFileInputValidator" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceFileInputValidator</b></td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[JSON]</td></tr><tr><td>enhancements</td><td port="enhancements">list[JSON]</td></tr></table>>,
tooltip="app.domain.references.models.validators.ReferenceFileInputValidator

Validator for the top-level schema of a reference entry \
from a file.
"];
}](../../_images/graphviz-47d72be228bfdc118a44b3a8434af43072df11cb.png)
Show JSON schema
{ "title": "ReferenceFileInputValidator", "description": "Validator for the top-level schema of a reference entry from a file.", "type": "object", "properties": { "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "items": { "$ref": "#/$defs/JSON" }, "minItems": 1, "title": "Identifiers", "type": "array" }, "enhancements": { "items": { "$ref": "#/$defs/JSON" }, "title": "Enhancements", "type": "array" } }, "$defs": { "JSON": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/JSON" }, "type": "object" }, { "items": { "$ref": "#/$defs/JSON" }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" } ] }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).\n\nTODO: Implement data governance layer to manage this.", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "additionalProperties": false, "required": [ "identifiers" ] }
- Config:
extra: str = forbid
- Fields:
- field visibility: Visibility = Visibility.PUBLIC[source]#
The level of visibility of the reference
- app.domain.references.models.validators.parse_identifier_lookup_from_string(identifier_lookup_string: str, delimiter: str = ':') IdentifierLookup[source]#
Parse an identifier lookup string into an IdentifierLookup object.