SDK Models#

This documentation auto-generates details about the Pydantic models used in the SDK.

For the most part, these models are used to define the API interface.

Imports#

Import process classes for the Destiny SDK.

pydantic model libs.sdk.src.destiny_sdk.imports.ImportBatchIn[source]#

Input for creating an import batch.

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];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchIn"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchIn</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchIn&#xA;&#xA;Input for creating an import batch.&#xA;"];
}

Show JSON schema
{
   "title": "ImportBatchIn",
   "description": "Input for creating an import batch.",
   "type": "object",
   "properties": {
      "storage_url": {
         "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n    ",
         "format": "uri",
         "maxLength": 2083,
         "minLength": 1,
         "title": "Storage Url",
         "type": "string"
      }
   },
   "required": [
      "storage_url"
   ]
}

Fields:
field storage_url: HttpUrl [Required][source]#

The URL at which the set of references for this batch are stored. The file is a jsonl with each line formatted according to ReferenceFileInput.

pydantic model libs.sdk.src.destiny_sdk.imports.ImportBatchRead[source]#

Core import batch class.

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];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchRead</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportBatchStatus</td></tr><tr><td>import_record_id</td><td port="import_record_id">UUID</td></tr><tr><td>import_record</td><td port="import_record">ImportRecordRead | None</td></tr><tr><td>import_results</td><td port="import_results">list[ImportResultRead] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchRead&#xA;&#xA;Core import batch class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportRecordRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportRecordRead</b></td></tr><tr><td>search_string</td><td port="search_string">str | None</td></tr><tr><td>searched_at</td><td port="searched_at">PastDatetime</td></tr><tr><td>processor_name</td><td port="processor_name">str</td></tr><tr><td>processor_version</td><td port="processor_version">str</td></tr><tr><td>notes</td><td port="notes">str | None</td></tr><tr><td>expected_reference_count</td><td port="expected_reference_count">int</td></tr><tr><td>source_name</td><td port="source_name">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportRecordStatus</td></tr><tr><td>batches</td><td port="batches">list[ImportBatchRead] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportRecordRead&#xA;&#xA;Core import record class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_record:e -> "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportResultRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportResultRead</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">Optional[UUID]</td></tr><tr><td>failure_details</td><td port="failure_details">str | None</td></tr><tr><td>import_batch</td><td port="import_batch">ImportBatchRead | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportResultRead&#xA;&#xA;Core import result class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_results:e -> "libs.sdk.src.destiny_sdk.imports.ImportResultRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":batches:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportResultRead":import_batch:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "$defs": {
      "ImportBatchRead": {
         "description": "Core import batch class.",
         "properties": {
            "storage_url": {
               "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n    ",
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "title": "Storage Url",
               "type": "string"
            },
            "id": {
               "description": "The ID of the import batch",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "status": {
               "$ref": "#/$defs/ImportBatchStatus",
               "default": "created",
               "description": "The status of the batch."
            },
            "import_record_id": {
               "description": "The ID of the import record this batch is associated with",
               "format": "uuid4",
               "title": "Import Record Id",
               "type": "string"
            },
            "import_record": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ImportRecordRead"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The parent import record."
            },
            "import_results": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ImportResultRead"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The results from processing the batch.",
               "title": "Import Results"
            }
         },
         "required": [
            "storage_url",
            "id",
            "import_record_id"
         ],
         "title": "ImportBatchRead",
         "type": "object"
      },
      "ImportBatchStatus": {
         "description": "Describes the status of an import batch.",
         "enum": [
            "created",
            "started",
            "failed",
            "partially_failed",
            "completed"
         ],
         "title": "ImportBatchStatus",
         "type": "string"
      },
      "ImportRecordRead": {
         "description": "Core import record class.",
         "properties": {
            "search_string": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The search string used to produce this import",
               "title": "Search String"
            },
            "searched_at": {
               "description": "\nThe timestamp (including timezone) at which the search which produced\nthis import was conducted. If no timezone is included, the timestamp\nis assumed to be in UTC.\n        ",
               "format": "date-time",
               "title": "Searched At",
               "type": "string"
            },
            "processor_name": {
               "description": "The name of the processor that is importing the data.",
               "title": "Processor Name",
               "type": "string"
            },
            "processor_version": {
               "description": "The version of the processor that is importing the data.",
               "title": "Processor Version",
               "type": "string"
            },
            "notes": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "\nAny additional notes regarding the import (eg. reason for importing, known\nissues).\n        ",
               "title": "Notes"
            },
            "expected_reference_count": {
               "description": "\nThe number of references expected to be included in this import.\n-1 is accepted if the number is unknown.\n",
               "minimum": -1,
               "title": "Expected Reference Count",
               "type": "integer"
            },
            "source_name": {
               "description": "The source of the reference being imported (eg. Open Alex)",
               "title": "Source Name",
               "type": "string"
            },
            "id": {
               "description": "The ID of the import record",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "status": {
               "$ref": "#/$defs/ImportRecordStatus",
               "default": "created",
               "description": "The status of the import record"
            },
            "batches": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ImportBatchRead"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "A list of batches for the import record",
               "title": "Batches"
            }
         },
         "required": [
            "processor_name",
            "processor_version",
            "expected_reference_count",
            "source_name",
            "id"
         ],
         "title": "ImportRecordRead",
         "type": "object"
      },
      "ImportRecordStatus": {
         "description": "Describes the status of an import record.",
         "enum": [
            "created",
            "started",
            "completed"
         ],
         "title": "ImportRecordStatus",
         "type": "string"
      },
      "ImportResultRead": {
         "description": "Core import result class.",
         "properties": {
            "id": {
               "description": "The ID of the import result.",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "reference_id": {
               "anyOf": [
                  {
                     "format": "uuid4",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The ID of the reference created by this import result.",
               "title": "Reference Id"
            },
            "failure_details": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The details of the failure, if the import result failed.",
               "title": "Failure Details"
            },
            "import_batch": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ImportBatchRead"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The parent import batch."
            }
         },
         "required": [
            "id"
         ],
         "title": "ImportResultRead",
         "type": "object"
      }
   },
   "$ref": "#/$defs/ImportBatchRead"
}

Fields:
field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the import batch

Constraints:
  • uuid_version = 4

field import_record: ImportRecordRead | None = None[source]#

The parent import record.

field import_record_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the import record this batch is associated with

Constraints:
  • uuid_version = 4

field import_results: list[ImportResultRead] | None = None[source]#

The results from processing the batch.

field status: ImportBatchStatus = ImportBatchStatus.CREATED[source]#

The status of the batch.

field storage_url: HttpUrl [Required][source]#

The URL at which the set of references for this batch are stored. The file is a jsonl with each line formatted according to ReferenceFileInput.

class libs.sdk.src.destiny_sdk.imports.ImportBatchStatus(*values)[source]#

Describes the status of an import batch.

COMPLETED = 'completed'[source]#

Processing has been completed.

CREATED = 'created'[source]#

Created, but no processing has started.

FAILED = 'failed'[source]#

Processing has failed.

PARTIALLY_FAILED = 'partially_failed'[source]#

Some references succeeded while others failed.

STARTED = 'started'[source]#

Processing has started on the batch.

pydantic model libs.sdk.src.destiny_sdk.imports.ImportBatchSummary[source]#

A view for an import batch that includes a summary of its 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];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchSummary"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchSummary</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>import_batch_id</td><td port="import_batch_id">UUID</td></tr><tr><td>import_batch_status</td><td port="import_batch_status">ImportBatchStatus</td></tr><tr><td>results</td><td port="results">dict[ImportResultStatus, int]</td></tr><tr><td>failure_details</td><td port="failure_details">list[str] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchSummary&#xA;&#xA;A view for an import batch that includes a summary of its results.&#\
xA;"];
}

Show JSON schema
{
   "title": "ImportBatchSummary",
   "description": "A view for an import batch that includes a summary of its results.",
   "type": "object",
   "properties": {
      "storage_url": {
         "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n    ",
         "format": "uri",
         "maxLength": 2083,
         "minLength": 1,
         "title": "Storage Url",
         "type": "string"
      },
      "id": {
         "description": "\nThe identifier of the batch.\n",
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      },
      "import_batch_id": {
         "description": "The ID of the batch being summarised",
         "format": "uuid4",
         "title": "Import Batch Id",
         "type": "string"
      },
      "import_batch_status": {
         "$ref": "#/$defs/ImportBatchStatus",
         "description": "The status of the batch being summarised"
      },
      "results": {
         "additionalProperties": {
            "type": "integer"
         },
         "description": "A count of references by their current import status.",
         "propertyNames": {
            "$ref": "#/$defs/ImportResultStatus"
         },
         "title": "Results",
         "type": "object"
      },
      "failure_details": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "description": "\n        The details of the failures that occurred.\n        Each failure will start with `\"Entry x\"` where x is the line number of the\n        jsonl object attempted to be imported.\n        ",
         "title": "Failure Details"
      }
   },
   "$defs": {
      "ImportBatchStatus": {
         "description": "Describes the status of an import batch.",
         "enum": [
            "created",
            "started",
            "failed",
            "partially_failed",
            "completed"
         ],
         "title": "ImportBatchStatus",
         "type": "string"
      },
      "ImportResultStatus": {
         "description": "Describes the status of an import result.",
         "enum": [
            "created",
            "started",
            "completed",
            "partially_failed",
            "failed",
            "retrying"
         ],
         "title": "ImportResultStatus",
         "type": "string"
      }
   },
   "required": [
      "storage_url",
      "id",
      "import_batch_id",
      "import_batch_status",
      "results",
      "failure_details"
   ]
}

Fields:
field failure_details: list[str] | None [Required][source]#

The details of the failures that occurred. Each failure will start with “Entry x” where x is the line number of the jsonl object attempted to be imported.

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The identifier of the batch.

Constraints:
  • uuid_version = 4

field import_batch_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the batch being summarised

Constraints:
  • uuid_version = 4

field import_batch_status: ImportBatchStatus [Required][source]#

The status of the batch being summarised

field results: dict[ImportResultStatus, int] [Required][source]#

A count of references by their current import status.

field storage_url: HttpUrl [Required][source]#

The URL at which the set of references for this batch are stored. The file is a jsonl with each line formatted according to ReferenceFileInput.

pydantic model libs.sdk.src.destiny_sdk.imports.ImportRecordIn[source]#

Input for creating an import record.

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];
   "libs.sdk.src.destiny_sdk.imports.ImportRecordIn"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportRecordIn</b></td></tr><tr><td>search_string</td><td port="search_string">str | None</td></tr><tr><td>searched_at</td><td port="searched_at">PastDatetime</td></tr><tr><td>processor_name</td><td port="processor_name">str</td></tr><tr><td>processor_version</td><td port="processor_version">str</td></tr><tr><td>notes</td><td port="notes">str | None</td></tr><tr><td>expected_reference_count</td><td port="expected_reference_count">int</td></tr><tr><td>source_name</td><td port="source_name">str</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportRecordIn&#xA;&#xA;Input for creating an import record.&#xA;"];
}

Show JSON schema
{
   "title": "ImportRecordIn",
   "description": "Input for creating an import record.",
   "type": "object",
   "properties": {
      "search_string": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The search string used to produce this import",
         "title": "Search String"
      },
      "searched_at": {
         "description": "\nThe timestamp (including timezone) at which the search which produced\nthis import was conducted. If no timezone is included, the timestamp\nis assumed to be in UTC.\n        ",
         "format": "date-time",
         "title": "Searched At",
         "type": "string"
      },
      "processor_name": {
         "description": "The name of the processor that is importing the data.",
         "title": "Processor Name",
         "type": "string"
      },
      "processor_version": {
         "description": "The version of the processor that is importing the data.",
         "title": "Processor Version",
         "type": "string"
      },
      "notes": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nAny additional notes regarding the import (eg. reason for importing, known\nissues).\n        ",
         "title": "Notes"
      },
      "expected_reference_count": {
         "description": "\nThe number of references expected to be included in this import.\n-1 is accepted if the number is unknown.\n",
         "minimum": -1,
         "title": "Expected Reference Count",
         "type": "integer"
      },
      "source_name": {
         "description": "The source of the reference being imported (eg. Open Alex)",
         "title": "Source Name",
         "type": "string"
      }
   },
   "required": [
      "processor_name",
      "processor_version",
      "expected_reference_count",
      "source_name"
   ]
}

Fields:
field expected_reference_count: int [Required][source]#

The number of references expected to be included in this import. -1 is accepted if the number is unknown.

Constraints:
  • ge = -1

field notes: str | None = None[source]#

Any additional notes regarding the import (eg. reason for importing, known issues).

field processor_name: str [Required][source]#

The name of the processor that is importing the data.

field processor_version: str [Required][source]#

The version of the processor that is importing the data.

field search_string: str | None = None[source]#

The search string used to produce this import

field searched_at: PastDatetime [Optional][source]#

The timestamp (including timezone) at which the search which produced this import was conducted. If no timezone is included, the timestamp is assumed to be in UTC.

field source_name: str [Required][source]#

The source of the reference being imported (eg. Open Alex)

pydantic model libs.sdk.src.destiny_sdk.imports.ImportRecordRead[source]#

Core import record class.

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];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchRead</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportBatchStatus</td></tr><tr><td>import_record_id</td><td port="import_record_id">UUID</td></tr><tr><td>import_record</td><td port="import_record">ImportRecordRead | None</td></tr><tr><td>import_results</td><td port="import_results">list[ImportResultRead] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchRead&#xA;&#xA;Core import batch class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportRecordRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportRecordRead</b></td></tr><tr><td>search_string</td><td port="search_string">str | None</td></tr><tr><td>searched_at</td><td port="searched_at">PastDatetime</td></tr><tr><td>processor_name</td><td port="processor_name">str</td></tr><tr><td>processor_version</td><td port="processor_version">str</td></tr><tr><td>notes</td><td port="notes">str | None</td></tr><tr><td>expected_reference_count</td><td port="expected_reference_count">int</td></tr><tr><td>source_name</td><td port="source_name">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportRecordStatus</td></tr><tr><td>batches</td><td port="batches">list[ImportBatchRead] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportRecordRead&#xA;&#xA;Core import record class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_record:e -> "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportResultRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportResultRead</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">Optional[UUID]</td></tr><tr><td>failure_details</td><td port="failure_details">str | None</td></tr><tr><td>import_batch</td><td port="import_batch">ImportBatchRead | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportResultRead&#xA;&#xA;Core import result class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_results:e -> "libs.sdk.src.destiny_sdk.imports.ImportResultRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":batches:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportResultRead":import_batch:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "$defs": {
      "ImportBatchRead": {
         "description": "Core import batch class.",
         "properties": {
            "storage_url": {
               "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n    ",
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "title": "Storage Url",
               "type": "string"
            },
            "id": {
               "description": "The ID of the import batch",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "status": {
               "$ref": "#/$defs/ImportBatchStatus",
               "default": "created",
               "description": "The status of the batch."
            },
            "import_record_id": {
               "description": "The ID of the import record this batch is associated with",
               "format": "uuid4",
               "title": "Import Record Id",
               "type": "string"
            },
            "import_record": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ImportRecordRead"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The parent import record."
            },
            "import_results": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ImportResultRead"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The results from processing the batch.",
               "title": "Import Results"
            }
         },
         "required": [
            "storage_url",
            "id",
            "import_record_id"
         ],
         "title": "ImportBatchRead",
         "type": "object"
      },
      "ImportBatchStatus": {
         "description": "Describes the status of an import batch.",
         "enum": [
            "created",
            "started",
            "failed",
            "partially_failed",
            "completed"
         ],
         "title": "ImportBatchStatus",
         "type": "string"
      },
      "ImportRecordRead": {
         "description": "Core import record class.",
         "properties": {
            "search_string": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The search string used to produce this import",
               "title": "Search String"
            },
            "searched_at": {
               "description": "\nThe timestamp (including timezone) at which the search which produced\nthis import was conducted. If no timezone is included, the timestamp\nis assumed to be in UTC.\n        ",
               "format": "date-time",
               "title": "Searched At",
               "type": "string"
            },
            "processor_name": {
               "description": "The name of the processor that is importing the data.",
               "title": "Processor Name",
               "type": "string"
            },
            "processor_version": {
               "description": "The version of the processor that is importing the data.",
               "title": "Processor Version",
               "type": "string"
            },
            "notes": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "\nAny additional notes regarding the import (eg. reason for importing, known\nissues).\n        ",
               "title": "Notes"
            },
            "expected_reference_count": {
               "description": "\nThe number of references expected to be included in this import.\n-1 is accepted if the number is unknown.\n",
               "minimum": -1,
               "title": "Expected Reference Count",
               "type": "integer"
            },
            "source_name": {
               "description": "The source of the reference being imported (eg. Open Alex)",
               "title": "Source Name",
               "type": "string"
            },
            "id": {
               "description": "The ID of the import record",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "status": {
               "$ref": "#/$defs/ImportRecordStatus",
               "default": "created",
               "description": "The status of the import record"
            },
            "batches": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ImportBatchRead"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "A list of batches for the import record",
               "title": "Batches"
            }
         },
         "required": [
            "processor_name",
            "processor_version",
            "expected_reference_count",
            "source_name",
            "id"
         ],
         "title": "ImportRecordRead",
         "type": "object"
      },
      "ImportRecordStatus": {
         "description": "Describes the status of an import record.",
         "enum": [
            "created",
            "started",
            "completed"
         ],
         "title": "ImportRecordStatus",
         "type": "string"
      },
      "ImportResultRead": {
         "description": "Core import result class.",
         "properties": {
            "id": {
               "description": "The ID of the import result.",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "reference_id": {
               "anyOf": [
                  {
                     "format": "uuid4",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The ID of the reference created by this import result.",
               "title": "Reference Id"
            },
            "failure_details": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The details of the failure, if the import result failed.",
               "title": "Failure Details"
            },
            "import_batch": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ImportBatchRead"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The parent import batch."
            }
         },
         "required": [
            "id"
         ],
         "title": "ImportResultRead",
         "type": "object"
      }
   },
   "$ref": "#/$defs/ImportRecordRead"
}

Fields:
field batches: list[ImportBatchRead] | None = None[source]#

A list of batches for the import record

field expected_reference_count: int [Required][source]#

The number of references expected to be included in this import. -1 is accepted if the number is unknown.

Constraints:
  • ge = -1

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the import record

Constraints:
  • uuid_version = 4

field notes: str | None = None[source]#

Any additional notes regarding the import (eg. reason for importing, known issues).

field processor_name: str [Required][source]#

The name of the processor that is importing the data.

field processor_version: str [Required][source]#

The version of the processor that is importing the data.

field search_string: str | None = None[source]#

The search string used to produce this import

field searched_at: PastDatetime [Optional][source]#

The timestamp (including timezone) at which the search which produced this import was conducted. If no timezone is included, the timestamp is assumed to be in UTC.

field source_name: str [Required][source]#

The source of the reference being imported (eg. Open Alex)

field status: ImportRecordStatus = ImportRecordStatus.CREATED[source]#

The status of the import record

class libs.sdk.src.destiny_sdk.imports.ImportRecordStatus(*values)[source]#

Describes the status of an import record.

COMPLETED = 'completed'[source]#

Processing has been completed.

CREATED = 'created'[source]#

Created, but no processing has started.

STARTED = 'started'[source]#

Processing has started on the batch.

pydantic model libs.sdk.src.destiny_sdk.imports.ImportResultRead[source]#

Core import result class.

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];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchRead</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportBatchStatus</td></tr><tr><td>import_record_id</td><td port="import_record_id">UUID</td></tr><tr><td>import_record</td><td port="import_record">ImportRecordRead | None</td></tr><tr><td>import_results</td><td port="import_results">list[ImportResultRead] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchRead&#xA;&#xA;Core import batch class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportRecordRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportRecordRead</b></td></tr><tr><td>search_string</td><td port="search_string">str | None</td></tr><tr><td>searched_at</td><td port="searched_at">PastDatetime</td></tr><tr><td>processor_name</td><td port="processor_name">str</td></tr><tr><td>processor_version</td><td port="processor_version">str</td></tr><tr><td>notes</td><td port="notes">str | None</td></tr><tr><td>expected_reference_count</td><td port="expected_reference_count">int</td></tr><tr><td>source_name</td><td port="source_name">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportRecordStatus</td></tr><tr><td>batches</td><td port="batches">list[ImportBatchRead] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportRecordRead&#xA;&#xA;Core import record class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_record:e -> "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportResultRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportResultRead</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">Optional[UUID]</td></tr><tr><td>failure_details</td><td port="failure_details">str | None</td></tr><tr><td>import_batch</td><td port="import_batch">ImportBatchRead | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.imports.ImportResultRead&#xA;&#xA;Core import result class.&#xA;"];
   "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_results:e -> "libs.sdk.src.destiny_sdk.imports.ImportResultRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":batches:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.imports.ImportResultRead":import_batch:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "$defs": {
      "ImportBatchRead": {
         "description": "Core import batch class.",
         "properties": {
            "storage_url": {
               "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n    ",
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "title": "Storage Url",
               "type": "string"
            },
            "id": {
               "description": "The ID of the import batch",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "status": {
               "$ref": "#/$defs/ImportBatchStatus",
               "default": "created",
               "description": "The status of the batch."
            },
            "import_record_id": {
               "description": "The ID of the import record this batch is associated with",
               "format": "uuid4",
               "title": "Import Record Id",
               "type": "string"
            },
            "import_record": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ImportRecordRead"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The parent import record."
            },
            "import_results": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ImportResultRead"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The results from processing the batch.",
               "title": "Import Results"
            }
         },
         "required": [
            "storage_url",
            "id",
            "import_record_id"
         ],
         "title": "ImportBatchRead",
         "type": "object"
      },
      "ImportBatchStatus": {
         "description": "Describes the status of an import batch.",
         "enum": [
            "created",
            "started",
            "failed",
            "partially_failed",
            "completed"
         ],
         "title": "ImportBatchStatus",
         "type": "string"
      },
      "ImportRecordRead": {
         "description": "Core import record class.",
         "properties": {
            "search_string": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The search string used to produce this import",
               "title": "Search String"
            },
            "searched_at": {
               "description": "\nThe timestamp (including timezone) at which the search which produced\nthis import was conducted. If no timezone is included, the timestamp\nis assumed to be in UTC.\n        ",
               "format": "date-time",
               "title": "Searched At",
               "type": "string"
            },
            "processor_name": {
               "description": "The name of the processor that is importing the data.",
               "title": "Processor Name",
               "type": "string"
            },
            "processor_version": {
               "description": "The version of the processor that is importing the data.",
               "title": "Processor Version",
               "type": "string"
            },
            "notes": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "\nAny additional notes regarding the import (eg. reason for importing, known\nissues).\n        ",
               "title": "Notes"
            },
            "expected_reference_count": {
               "description": "\nThe number of references expected to be included in this import.\n-1 is accepted if the number is unknown.\n",
               "minimum": -1,
               "title": "Expected Reference Count",
               "type": "integer"
            },
            "source_name": {
               "description": "The source of the reference being imported (eg. Open Alex)",
               "title": "Source Name",
               "type": "string"
            },
            "id": {
               "description": "The ID of the import record",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "status": {
               "$ref": "#/$defs/ImportRecordStatus",
               "default": "created",
               "description": "The status of the import record"
            },
            "batches": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ImportBatchRead"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "A list of batches for the import record",
               "title": "Batches"
            }
         },
         "required": [
            "processor_name",
            "processor_version",
            "expected_reference_count",
            "source_name",
            "id"
         ],
         "title": "ImportRecordRead",
         "type": "object"
      },
      "ImportRecordStatus": {
         "description": "Describes the status of an import record.",
         "enum": [
            "created",
            "started",
            "completed"
         ],
         "title": "ImportRecordStatus",
         "type": "string"
      },
      "ImportResultRead": {
         "description": "Core import result class.",
         "properties": {
            "id": {
               "description": "The ID of the import result.",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "reference_id": {
               "anyOf": [
                  {
                     "format": "uuid4",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The ID of the reference created by this import result.",
               "title": "Reference Id"
            },
            "failure_details": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The details of the failure, if the import result failed.",
               "title": "Failure Details"
            },
            "import_batch": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ImportBatchRead"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The parent import batch."
            }
         },
         "required": [
            "id"
         ],
         "title": "ImportResultRead",
         "type": "object"
      }
   },
   "$ref": "#/$defs/ImportResultRead"
}

Fields:
field failure_details: str | None = None[source]#

The details of the failure, if the import result failed.

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the import result.

Constraints:
  • uuid_version = 4

field import_batch: ImportBatchRead | None = None[source]#

The parent import batch.

field reference_id: Annotated[UUID, UuidVersion(uuid_version=4)] | None = None[source]#

The ID of the reference created by this import result.

class libs.sdk.src.destiny_sdk.imports.ImportResultStatus(*values)[source]#

Describes the status of an import result.

COMPLETED = 'completed'[source]#

The reference has been created.

CREATED = 'created'[source]#

Created, but no processing has started.

FAILED = 'failed'[source]#

The reference failed to be created. See the result’s failure_details field for more information.

PARTIALLY_FAILED = 'partially_failed'[source]#

The reference was created but one or more enhancements or identifiers failed to be added. See the result’s failure_details field for more information.

RETRYING = 'retrying'[source]#

Processing has failed, but is being retried.

STARTED = 'started'[source]#

The reference is currently being processed.

Visibility#

Visibility enum for repository data.

class libs.sdk.src.destiny_sdk.visibility.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).

HIDDEN = 'hidden'[source]#

Is not visible, but may be passed to data mining processes.

PUBLIC = 'public'[source]#

Visible to the general public without authentication.

RESTRICTED = 'restricted'[source]#

Requires authentication to be visible.

Robots#

Schemas that define inputs/outputs for robots.

pydantic model libs.sdk.src.destiny_sdk.robots.EnhancementRequestIn[source]#

The model for requesting multiple enhancements on specific 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];
   "libs.sdk.src.destiny_sdk.robots.EnhancementRequestIn"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementRequestIn</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>reference_ids</td><td port="reference_ids">list[UUID]</td></tr><tr><td>source</td><td port="source">str | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.EnhancementRequestIn&#xA;&#xA;The model for requesting multiple enhancements on specific references.&#\
xA;"];
}

Show JSON schema
{
   "title": "EnhancementRequestIn",
   "description": "The model for requesting multiple enhancements on specific references.",
   "type": "object",
   "properties": {
      "robot_id": {
         "description": "The robot to be used to create the enhancements.",
         "format": "uuid4",
         "title": "Robot Id",
         "type": "string"
      },
      "reference_ids": {
         "description": "The IDs of the references to be enhanced.",
         "items": {
            "format": "uuid4",
            "type": "string"
         },
         "title": "Reference Ids",
         "type": "array"
      },
      "source": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The source of the batch enhancement request.",
         "title": "Source"
      }
   },
   "required": [
      "robot_id",
      "reference_ids"
   ]
}

Fields:
field reference_ids: list[UUID4] [Required][source]#

The IDs of the references to be enhanced.

field robot_id: UUID4 [Required][source]#

The robot to be used to create the enhancements.

Constraints:
  • uuid_version = 4

field source: str | None = None[source]#

The source of the batch enhancement request.

pydantic model libs.sdk.src.destiny_sdk.robots.EnhancementRequestRead[source]#

Core batch enhancement request class.

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];
   "libs.sdk.src.destiny_sdk.robots.EnhancementRequestRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementRequestRead</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>reference_ids</td><td port="reference_ids">list[UUID]</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>request_status</td><td port="request_status">EnhancementRequestStatus</td></tr><tr><td>reference_data_url</td><td port="reference_data_url">HttpUrl | None</td></tr><tr><td>result_storage_url</td><td port="result_storage_url">HttpUrl | None</td></tr><tr><td>validation_result_url</td><td port="validation_result_url">HttpUrl | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.EnhancementRequestRead&#xA;&#xA;Core batch enhancement request class.&#xA;"];
}

Show JSON schema
{
   "title": "EnhancementRequestRead",
   "description": "Core batch enhancement request class.",
   "type": "object",
   "properties": {
      "robot_id": {
         "description": "The robot to be used to create the enhancements.",
         "format": "uuid4",
         "title": "Robot Id",
         "type": "string"
      },
      "reference_ids": {
         "description": "The IDs of the references to be enhanced.",
         "items": {
            "format": "uuid4",
            "type": "string"
         },
         "title": "Reference Ids",
         "type": "array"
      },
      "source": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The source of the batch enhancement request.",
         "title": "Source"
      },
      "id": {
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      },
      "request_status": {
         "$ref": "#/$defs/EnhancementRequestStatus",
         "description": "The status of the request to create enhancements"
      },
      "reference_data_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nThe URL at which the set of references are stored. The file is a jsonl with each line\nformatted according to\n:class:`Reference <libs.sdk.src.destiny_sdk.references.Reference>`.\n, one reference per line.\nEach reference may have identifiers or enhancements attached, as\nrequired by the robot.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n        ",
         "title": "Reference Data Url"
      },
      "result_storage_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nThe URL at which the set of enhancements are stored. The file is to be a jsonl\nwith each line formatted according to\n:class:`EnhancementResultEntry <libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry>`.\nThis field is only relevant to robots.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n        ",
         "title": "Result Storage Url"
      },
      "validation_result_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nThe URL at which the result of the enhancement request is stored.\nThis file is a txt file, one line per reference, with either an error\nor a success message.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n        ",
         "title": "Validation Result Url"
      },
      "error": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Error encountered during the enhancement process. This is only used if the entire enhancement request failed, rather than an individual reference. If there was an error with processing an individual reference, it is passed in the validation result file.",
         "title": "Error"
      }
   },
   "$defs": {
      "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"
      }
   },
   "required": [
      "robot_id",
      "reference_ids",
      "id",
      "request_status"
   ]
}

Fields:
field error: str | None = None[source]#

Error encountered during the enhancement process. This is only used if the entire enhancement request failed, rather than an individual reference. If there was an error with processing an individual reference, it is passed in the validation result file.

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
Constraints:
  • uuid_version = 4

field reference_data_url: HttpUrl | None = None[source]#

The URL at which the set of references are stored. The file is a jsonl with each line formatted according to Reference. , one reference per line. Each reference may have identifiers or enhancements attached, as required by the robot. If the URL expires, a new one can be generated using GET /enhancement-requests/{request_id}/.

field reference_ids: list[UUID4] [Required][source]#

The IDs of the references to be enhanced.

field request_status: EnhancementRequestStatus [Required][source]#

The status of the request to create enhancements

field result_storage_url: HttpUrl | None = None[source]#

The URL at which the set of enhancements are stored. The file is to be a jsonl with each line formatted according to EnhancementResultEntry. This field is only relevant to robots. If the URL expires, a new one can be generated using GET /enhancement-requests/{request_id}/.

field robot_id: UUID4 [Required][source]#

The robot to be used to create the enhancements.

Constraints:
  • uuid_version = 4

field source: str | None = None[source]#

The source of the batch enhancement request.

field validation_result_url: HttpUrl | None = None[source]#

The URL at which the result of the enhancement request is stored. This file is a txt file, one line per reference, with either an error or a success message. If the URL expires, a new one can be generated using GET /enhancement-requests/{request_id}/.

class libs.sdk.src.destiny_sdk.robots.EnhancementRequestStatus(*values)[source]#

The status of an enhancement request.

ACCEPTED = 'accepted'[source]#

Enhancement request has been accepted by the robot.

COMPLETED = 'completed'[source]#

All enhancements have been created.

FAILED = 'failed'[source]#

All enhancements failed to create.

IMPORTING = 'importing'[source]#

Enhancements have been received by the repo and are being imported.

INDEXING = 'indexing'[source]#

Enhancements have been imported and are being indexed.

INDEXING_FAILED = 'indexing_failed'[source]#

Enhancements have been imported but indexing failed.

PARTIAL_FAILED = 'partial_failed'[source]#

Some enhancements failed to create.

PROCESSING = 'processing'[source]#

Enhancement request is being processed by the robot.

RECEIVED = 'received'[source]#

Enhancement request has been received by the repo.

REJECTED = 'rejected'[source]#

Enhancement request has been rejected by the robot.

libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry[source]#

The result for a single reference when processed by an enhancement request. This is a single entry in the result file.

alias of Annotated[Enhancement | LinkedRobotError, FieldInfo(annotation=NoneType, required=True)]

pydantic model libs.sdk.src.destiny_sdk.robots.LinkedRobotError[source]#

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.

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];
   "libs.sdk.src.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</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.LinkedRobotError&#xA;&#xA;A record of something going wrong when processing an individual reference.&#\
xA;&#xA;Used in results for batch requests - in single requests, the reference&#xA;id is derived from the request id.&#xA;"];
}

Show JSON schema
{
   "title": "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.",
   "type": "object",
   "properties": {
      "message": {
         "description": "Message which describes the error encountered during processing",
         "title": "Message",
         "type": "string"
      },
      "reference_id": {
         "description": "The ID of the reference which caused the error.",
         "format": "uuid4",
         "title": "Reference Id",
         "type": "string"
      }
   },
   "required": [
      "message",
      "reference_id"
   ]
}

Fields:
field message: Annotated[str, Field(description='Message which describes the error encountered during processing')] [Required][source]#

Message which describes the error encountered during processing

field reference_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the reference which caused the error.

Constraints:
  • uuid_version = 4

classmethod from_jsonl(jsonl: str) Self[source]#

Create an object from a JSONL string.

Parameters:

jsonl (str) – The JSONL string to parse.

Returns:

The created object.

Return type:

Self

to_jsonl() str[source]#

Convert the model to a JSONL string.

Returns:

The JSONL string representation of the model.

Return type:

str

pydantic model libs.sdk.src.destiny_sdk.robots.ProvisionedRobot[source]#

The model for a provisioned robot.

Used only when a robot is initially created, or when cycling a robot’s client_secret.

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];
   "libs.sdk.src.destiny_sdk.robots.ProvisionedRobot"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProvisionedRobot</b></td></tr><tr><td>name</td><td port="name">str</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>owner</td><td port="owner">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>client_secret</td><td port="client_secret">str</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.ProvisionedRobot&#xA;&#xA;The model for a provisioned robot.&#xA;&#xA;Used only when a robot is \
initially created,&#xA;or when cycling a robot's client_secret.&#xA;"];
}

Show JSON schema
{
   "title": "ProvisionedRobot",
   "description": "The model for a provisioned robot.\n\nUsed only when a robot is initially created,\nor when cycling a robot's client_secret.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the robot, must be unique.",
         "title": "Name",
         "type": "string"
      },
      "description": {
         "description": "Description of the enhancement the robot provides.",
         "title": "Description",
         "type": "string"
      },
      "owner": {
         "description": "The owner/publisher of the robot.",
         "title": "Owner",
         "type": "string"
      },
      "id": {
         "description": "The id of the robot provided by destiny repository. Used as the client_id when sending HMAC authenticated requests.",
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      },
      "client_secret": {
         "description": "The client secret of the robot, used as the secret key when sending HMAC authenticated requests.",
         "title": "Client Secret",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "description",
      "owner",
      "id",
      "client_secret"
   ]
}

Config:
  • extra: str = forbid

Fields:
field client_secret: str [Required][source]#

The client secret of the robot, used as the secret key when sending HMAC authenticated requests.

field description: str [Required][source]#

Description of the enhancement the robot provides.

field id: UUID4 [Required][source]#

The id of the robot provided by destiny repository. Used as the client_id when sending HMAC authenticated requests.

Constraints:
  • uuid_version = 4

field name: str [Required][source]#

The name of the robot, must be unique.

field owner: str [Required][source]#

The owner/publisher of the robot.

pydantic model libs.sdk.src.destiny_sdk.robots.Robot[source]#

Then model for a registered 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];
   "libs.sdk.src.destiny_sdk.robots.Robot"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Robot</b></td></tr><tr><td>name</td><td port="name">str</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>owner</td><td port="owner">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.Robot&#xA;&#xA;Then model for a registered robot.&#xA;"];
}

Show JSON schema
{
   "title": "Robot",
   "description": "Then model for a registered robot.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the robot, must be unique.",
         "title": "Name",
         "type": "string"
      },
      "description": {
         "description": "Description of the enhancement the robot provides.",
         "title": "Description",
         "type": "string"
      },
      "owner": {
         "description": "The owner/publisher of the robot.",
         "title": "Owner",
         "type": "string"
      },
      "id": {
         "description": "The id of the robot provided by destiny repository. Used as the client_id when sending HMAC authenticated requests.",
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "description",
      "owner",
      "id"
   ]
}

Config:
  • extra: str = forbid

Fields:
field description: str [Required][source]#

Description of the enhancement the robot provides.

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The id of the robot provided by destiny repository. Used as the client_id when sending HMAC authenticated requests.

Constraints:
  • uuid_version = 4

field name: str [Required][source]#

The name of the robot, must be unique.

field owner: str [Required][source]#

The owner/publisher of the robot.

pydantic model libs.sdk.src.destiny_sdk.robots.RobotAutomation[source]#

Core Robot Automation class.

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];
   "libs.sdk.src.destiny_sdk.robots.RobotAutomation"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotAutomation</b></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><tr><td>id</td><td port="id">UUID</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotAutomation&#xA;&#xA;Core Robot Automation class.&#xA;&#xA;This is used as a source of truth \
for an Elasticsearch index that percolates&#xA;references or enhancements against the queries. If a query matches, a request&#xA;\
is sent to the specified robot to perform the enhancement.&#xA;"];
}

Show JSON schema
{
   "title": "RobotAutomation",
   "description": "Core Robot Automation class.\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": {
      "robot_id": {
         "description": "The ID of the robot that will be used to enhance the reference.",
         "format": "uuid4",
         "title": "Robot Id",
         "type": "string"
      },
      "query": {
         "additionalProperties": true,
         "description": "The percolator query that will be used to match references  or enhancements against.",
         "title": "Query",
         "type": "object"
      },
      "id": {
         "description": "The ID of the robot automation.",
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      }
   },
   "required": [
      "robot_id",
      "query",
      "id"
   ]
}

Fields:
field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the robot automation.

Constraints:
  • uuid_version = 4

field query: dict[str, Any] [Required][source]#

The percolator query that will be used to match references or enhancements against.

field robot_id: UUID4 [Required][source]#

The ID of the robot that will be used to enhance the reference.

Constraints:
  • uuid_version = 4

pydantic model libs.sdk.src.destiny_sdk.robots.RobotAutomationIn[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];
   "libs.sdk.src.destiny_sdk.robots.RobotAutomationIn"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotAutomationIn</b></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="libs.sdk.src.destiny_sdk.robots.RobotAutomationIn&#xA;&#xA;Automation model for a robot.&#xA;&#xA;This is used as a source of truth \
for an Elasticsearch index that percolates&#xA;references or enhancements against the queries. If a query matches, a request&#xA;\
is sent to the specified robot to perform the enhancement.&#xA;"];
}

Show JSON schema
{
   "title": "RobotAutomationIn",
   "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": {
      "robot_id": {
         "description": "The ID of the robot that will be used to enhance the reference.",
         "format": "uuid4",
         "title": "Robot Id",
         "type": "string"
      },
      "query": {
         "additionalProperties": true,
         "description": "The percolator query that will be used to match references  or enhancements against.",
         "title": "Query",
         "type": "object"
      }
   },
   "required": [
      "robot_id",
      "query"
   ]
}

Fields:
field query: dict[str, Any] [Required][source]#

The percolator query that will be used to match references or enhancements against.

field robot_id: UUID4 [Required][source]#

The ID of the robot that will be used to enhance the reference.

Constraints:
  • uuid_version = 4

pydantic model libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatch[source]#

A robot enhancement batch from the repo to 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];
   "libs.sdk.src.destiny_sdk.robots.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>reference_storage_url</td><td port="reference_storage_url">HttpUrl</td></tr><tr><td>result_storage_url</td><td port="result_storage_url">HttpUrl</td></tr><tr><td>extra_fields</td><td port="extra_fields">dict | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatch&#xA;&#xA;A robot enhancement batch from the repo to a robot.&#xA;"];
}

Show JSON schema
{
   "title": "RobotEnhancementBatch",
   "description": "A robot enhancement batch from the repo to a robot.",
   "type": "object",
   "properties": {
      "id": {
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      },
      "reference_storage_url": {
         "description": "\nThe URL at which the set of references are stored. The file is a jsonl\nwith each line formatted according to\n:class:`Reference <libs.sdk.src.destiny_sdk.references.Reference>`, one\nreference per line.\nEach reference may have identifiers or enhancements attached, as\nrequired by the robot.\nIf the URL expires, a new one can be generated using\n``GET /robot-enhancement-batches/{batch_id}/``.\n",
         "format": "uri",
         "maxLength": 2083,
         "minLength": 1,
         "title": "Reference Storage Url",
         "type": "string"
      },
      "result_storage_url": {
         "description": "\nThe URL at which the set of enhancements are to be stored. The file is to be a jsonl\nwith each line formatted according to\n:class:`EnhancementResultEntry <libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry>`.\nIf the URL expires, a new one can be generated using\n``GET /robot-enhancement-batches/{batch_id}/``.\n",
         "format": "uri",
         "maxLength": 2083,
         "minLength": 1,
         "title": "Result Storage Url",
         "type": "string"
      },
      "extra_fields": {
         "anyOf": [
            {
               "additionalProperties": true,
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Extra fields to pass to the robot. TBC.",
         "title": "Extra Fields"
      }
   },
   "required": [
      "id",
      "reference_storage_url",
      "result_storage_url"
   ]
}

Fields:
field extra_fields: dict | None = None[source]#

Extra fields to pass to the robot. TBC.

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
Constraints:
  • uuid_version = 4

field reference_storage_url: HttpUrl [Required][source]#

The URL at which the set of references are stored. The file is a jsonl with each line formatted according to Reference, one reference per line. Each reference may have identifiers or enhancements attached, as required by the robot. If the URL expires, a new one can be generated using GET /robot-enhancement-batches/{batch_id}/.

field result_storage_url: HttpUrl [Required][source]#

The URL at which the set of enhancements are to be stored. The file is to be a jsonl with each line formatted according to EnhancementResultEntry. If the URL expires, a new one can be generated using GET /robot-enhancement-batches/{batch_id}/.

pydantic model libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchRead[source]#

Core robot enhancement batch class.

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];
   "libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchRead"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotEnhancementBatchRead</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_data_url</td><td port="reference_data_url">HttpUrl | None</td></tr><tr><td>result_storage_url</td><td port="result_storage_url">HttpUrl | None</td></tr><tr><td>validation_result_url</td><td port="validation_result_url">HttpUrl | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchRead&#xA;&#xA;Core robot enhancement batch class.&#xA;"];
}

Show JSON schema
{
   "title": "RobotEnhancementBatchRead",
   "description": "Core robot enhancement batch class.",
   "type": "object",
   "properties": {
      "robot_id": {
         "description": "The robot to be used to create the enhancements.",
         "format": "uuid4",
         "title": "Robot Id",
         "type": "string"
      },
      "source": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The source of the batch enhancement request.",
         "title": "Source"
      },
      "id": {
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      },
      "reference_data_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nThe URL at which the set of references are stored. The file is a jsonl with each line\nformatted according to\n:class:`Reference <libs.sdk.src.destiny_sdk.references.Reference>`.\n, one reference per line.\nEach reference may have identifiers or enhancements attached, as\nrequired by the robot.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n        ",
         "title": "Reference Data Url"
      },
      "result_storage_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nThe URL at which the set of enhancements are stored. The file is to be a jsonl\nwith each line formatted according to\n:class:`EnhancementResultEntry <libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry>`.\nThis field is only relevant to robots.\nIf the URL expires, a new one can be generated using\n``GET /robot-enhancement-batches/{batch_id}/``.\n        ",
         "title": "Result Storage Url"
      },
      "validation_result_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nThe URL at which the result of the enhancement request is stored.\nThis file is a txt file, one line per reference, with either an error\nor a success message.\nIf the URL expires, a new one can be generated using\n``GET /robot-enhancement-batches/{batch_id}/``.\n        ",
         "title": "Validation Result Url"
      },
      "error": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Error encountered during the enhancement process. This is only used if the entire enhancement batch failed, rather than an individual reference. If there was an error with processing an individual reference, it is passed in the validation result file.",
         "title": "Error"
      }
   },
   "required": [
      "robot_id",
      "id"
   ]
}

Fields:
field error: str | None = None[source]#

Error encountered during the enhancement process. This is only used if the entire enhancement batch failed, rather than an individual reference. If there was an error with processing an individual reference, it is passed in the validation result file.

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
Constraints:
  • uuid_version = 4

field reference_data_url: HttpUrl | None = None[source]#

The URL at which the set of references are stored. The file is a jsonl with each line formatted according to Reference. , one reference per line. Each reference may have identifiers or enhancements attached, as required by the robot. If the URL expires, a new one can be generated using GET /enhancement-requests/{request_id}/.

field result_storage_url: HttpUrl | None = None[source]#

The URL at which the set of enhancements are stored. The file is to be a jsonl with each line formatted according to EnhancementResultEntry. This field is only relevant to robots. If the URL expires, a new one can be generated using GET /robot-enhancement-batches/{batch_id}/.

field robot_id: UUID4 [Required][source]#

The robot to be used to create the enhancements.

Constraints:
  • uuid_version = 4

field source: str | None = None[source]#

The source of the batch enhancement request.

field validation_result_url: HttpUrl | None = None[source]#

The URL at which the result of the enhancement request is stored. This file is a txt file, one line per reference, with either an error or a success message. If the URL expires, a new one can be generated using GET /robot-enhancement-batches/{batch_id}/.

pydantic model libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchResult[source]#

Used to indicate that the robot has finished processing a batch.

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];
   "libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchResult"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotEnhancementBatchResult</b></td></tr><tr><td>request_id</td><td port="request_id">UUID</td></tr><tr><td>error</td><td port="error">RobotError | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchResult&#xA;&#xA;Used to indicate that the robot has finished processing a batch.&#\
xA;"];
   "libs.sdk.src.destiny_sdk.robots.RobotError"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotError</b></td></tr><tr><td>message</td><td port="message">str</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotError&#xA;&#xA;A record of something going wrong with the robot.&#xA;"];
   "libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchResult":error:e -> "libs.sdk.src.destiny_sdk.robots.RobotError":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "RobotEnhancementBatchResult",
   "description": "Used to indicate that the robot has finished processing a batch.",
   "type": "object",
   "properties": {
      "request_id": {
         "format": "uuid4",
         "title": "Request Id",
         "type": "string"
      },
      "error": {
         "anyOf": [
            {
               "$ref": "#/$defs/RobotError"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nError the robot encountered while creating enhancements. If this field is populated,\nwe assume the entire robot enhancement batch failed,\nrather than an individual reference.\nIf there was an error with processing an individual reference, it should be passed in\nthe result file and this field should be left as None. Vice-versa, if this field is\nNone, the repository will assume that the result file is ready for processing.\n"
      }
   },
   "$defs": {
      "RobotError": {
         "description": "A record of something going wrong with the robot.",
         "properties": {
            "message": {
               "description": "Message which describes the error encountered during processing",
               "title": "Message",
               "type": "string"
            }
         },
         "required": [
            "message"
         ],
         "title": "RobotError",
         "type": "object"
      }
   },
   "required": [
      "request_id"
   ]
}

Fields:
field error: RobotError | None = None[source]#

Error the robot encountered while creating enhancements. If this field is populated, we assume the entire robot enhancement batch failed, rather than an individual reference. If there was an error with processing an individual reference, it should be passed in the result file and this field should be left as None. Vice-versa, if this field is None, the repository will assume that the result file is ready for processing.

field request_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
Constraints:
  • uuid_version = 4

pydantic model libs.sdk.src.destiny_sdk.robots.RobotError[source]#

A record of something going wrong with the 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];
   "libs.sdk.src.destiny_sdk.robots.RobotError"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotError</b></td></tr><tr><td>message</td><td port="message">str</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotError&#xA;&#xA;A record of something going wrong with the robot.&#xA;"];
}

Show JSON schema
{
   "title": "RobotError",
   "description": "A record of something going wrong with the robot.",
   "type": "object",
   "properties": {
      "message": {
         "description": "Message which describes the error encountered during processing",
         "title": "Message",
         "type": "string"
      }
   },
   "required": [
      "message"
   ]
}

Fields:
field message: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Message which describes the error encountered during processing')] [Required][source]#

Message which describes the error encountered during processing

pydantic model libs.sdk.src.destiny_sdk.robots.RobotIn[source]#

The model for registering a new 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];
   "libs.sdk.src.destiny_sdk.robots.RobotIn"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotIn</b></td></tr><tr><td>name</td><td port="name">str</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>owner</td><td port="owner">str</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotIn&#xA;&#xA;The model for registering a new robot.&#xA;"];
}

Show JSON schema
{
   "title": "RobotIn",
   "description": "The model for registering a new robot.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the robot, must be unique.",
         "title": "Name",
         "type": "string"
      },
      "description": {
         "description": "Description of the enhancement the robot provides.",
         "title": "Description",
         "type": "string"
      },
      "owner": {
         "description": "The owner/publisher of the robot.",
         "title": "Owner",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "description",
      "owner"
   ]
}

Config:
  • extra: str = forbid

Fields:
field description: str [Required][source]#

Description of the enhancement the robot provides.

field name: str [Required][source]#

The name of the robot, must be unique.

field owner: str [Required][source]#

The owner/publisher of the robot.

pydantic model libs.sdk.src.destiny_sdk.robots.RobotRequest[source]#

A batch enhancement request from the repo to 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];
   "libs.sdk.src.destiny_sdk.robots.RobotRequest"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotRequest</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_storage_url</td><td port="reference_storage_url">HttpUrl</td></tr><tr><td>result_storage_url</td><td port="result_storage_url">HttpUrl</td></tr><tr><td>extra_fields</td><td port="extra_fields">dict | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotRequest&#xA;&#xA;A batch enhancement request from the repo to a robot.&#xA;"];
}

Show JSON schema
{
   "title": "RobotRequest",
   "description": "A batch enhancement request from the repo to a robot.",
   "type": "object",
   "properties": {
      "id": {
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      },
      "reference_storage_url": {
         "description": "\nThe URL at which the set of references are stored. The file is a jsonl\nwith each line formatted according to\n:class:`Reference <libs.sdk.src.destiny_sdk.references.Reference>`, one\nreference per line.\nEach reference may have identifiers or enhancements attached, as\nrequired by the robot.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n",
         "format": "uri",
         "maxLength": 2083,
         "minLength": 1,
         "title": "Reference Storage Url",
         "type": "string"
      },
      "result_storage_url": {
         "description": "\nThe URL at which the set of enhancements are to be stored. The file is to be a jsonl\nwith each line formatted according to\n:class:`EnhancementResultEntry <libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry>`.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n",
         "format": "uri",
         "maxLength": 2083,
         "minLength": 1,
         "title": "Result Storage Url",
         "type": "string"
      },
      "extra_fields": {
         "anyOf": [
            {
               "additionalProperties": true,
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Extra fields to pass to the robot. TBC.",
         "title": "Extra Fields"
      }
   },
   "required": [
      "id",
      "reference_storage_url",
      "result_storage_url"
   ]
}

Fields:
field extra_fields: dict | None = None[source]#

Extra fields to pass to the robot. TBC.

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
Constraints:
  • uuid_version = 4

field reference_storage_url: HttpUrl [Required][source]#

The URL at which the set of references are stored. The file is a jsonl with each line formatted according to Reference, one reference per line. Each reference may have identifiers or enhancements attached, as required by the robot. If the URL expires, a new one can be generated using GET /enhancement-requests/{request_id}/.

field result_storage_url: HttpUrl [Required][source]#

The URL at which the set of enhancements are to be stored. The file is to be a jsonl with each line formatted according to EnhancementResultEntry. If the URL expires, a new one can be generated using GET /enhancement-requests/{request_id}/.

pydantic model libs.sdk.src.destiny_sdk.robots.RobotResult[source]#

Used to indicate to the repository that the robot has finished processing.

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];
   "libs.sdk.src.destiny_sdk.robots.RobotError"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotError</b></td></tr><tr><td>message</td><td port="message">str</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotError&#xA;&#xA;A record of something going wrong with the robot.&#xA;"];
   "libs.sdk.src.destiny_sdk.robots.RobotResult"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotResult</b></td></tr><tr><td>request_id</td><td port="request_id">UUID</td></tr><tr><td>error</td><td port="error">RobotError | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotResult&#xA;&#xA;Used to indicate to the repository that the robot has finished processing.&#\
xA;"];
   "libs.sdk.src.destiny_sdk.robots.RobotResult":error:e -> "libs.sdk.src.destiny_sdk.robots.RobotError":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "RobotResult",
   "description": "Used to indicate to the repository that the robot has finished processing.",
   "type": "object",
   "properties": {
      "request_id": {
         "format": "uuid4",
         "title": "Request Id",
         "type": "string"
      },
      "error": {
         "anyOf": [
            {
               "$ref": "#/$defs/RobotError"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "\nError the robot encountered while creating enhancements. If this field is populated,\nwe assume the entire enhancement request or http request request failed,\nrather than an individual reference.\nIf there was an error with processing an individual reference, it should be passed in\nthe result file and this field should be left as None. Vice-versa, if this field is\nNone, the repository will assume that the result file is ready for processing.\n"
      }
   },
   "$defs": {
      "RobotError": {
         "description": "A record of something going wrong with the robot.",
         "properties": {
            "message": {
               "description": "Message which describes the error encountered during processing",
               "title": "Message",
               "type": "string"
            }
         },
         "required": [
            "message"
         ],
         "title": "RobotError",
         "type": "object"
      }
   },
   "required": [
      "request_id"
   ]
}

Fields:
field error: RobotError | None = None[source]#

Error the robot encountered while creating enhancements. If this field is populated, we assume the entire enhancement request or http request request failed, rather than an individual reference. If there was an error with processing an individual reference, it should be passed in the result file and this field should be left as None. Vice-versa, if this field is None, the repository will assume that the result file is ready for processing.

field request_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
Constraints:
  • uuid_version = 4

pydantic model libs.sdk.src.destiny_sdk.robots.RobotResultValidationEntry[source]#

A single entry in the validation result file for 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];
   "libs.sdk.src.destiny_sdk.robots.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">Optional[UUID]</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.robots.RobotResultValidationEntry&#xA;&#xA;A single entry in the validation result file for a batch enhancement \
request.&#xA;"];
}

Show JSON schema
{
   "title": "RobotResultValidationEntry",
   "description": "A single entry in the validation result file for a batch enhancement request.",
   "type": "object",
   "properties": {
      "reference_id": {
         "anyOf": [
            {
               "format": "uuid4",
               "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"
      }
   }
}

Fields:
field error: str | None = None[source]#

Error encountered during the enhancement process for this reference. If this is empty, the enhancement was successfully created.

field reference_id: Annotated[UUID, UuidVersion(uuid_version=4)] | None = None[source]#

The ID of the reference which was enhanced. If this is empty, the EnhancementResultEntry could not be parsed.

classmethod from_jsonl(jsonl: str) Self[source]#

Create an object from a JSONL string.

Parameters:

jsonl (str) – The JSONL string to parse.

Returns:

The created object.

Return type:

Self

to_jsonl() str[source]#

Convert the model to a JSONL string.

Returns:

The JSONL string representation of the model.

Return type:

str

Enhancements#

Enhancement classes for the Destiny Repository.

pydantic model libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement[source]#

An enhancement which is specific to the abstract of a reference.

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.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement&#xA;&#xA;An enhancement which is specific to the abstract of a \
reference.&#xA;&#xA;This is separate from the `BibliographicMetadata` for two reasons:&#xA;&#xA;1. Abstracts are increasingly missing \
from sources like OpenAlex, and may be&#xA;backfilled from other sources, without the bibliographic metadata.&#xA;2. They are also \
subject to copyright limitations in ways which metadata are&#xA;not, and thus need separate visibility controls.&#xA;"];
}

Show JSON schema
{
   "title": "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.",
   "type": "object",
   "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"
      }
   },
   "$defs": {
      "AbstractProcessType": {
         "description": "The process used to acquire the abstract.",
         "enum": [
            "uninverted",
            "closed_api",
            "other"
         ],
         "title": "AbstractProcessType",
         "type": "string"
      }
   },
   "required": [
      "process",
      "abstract"
   ]
}

Fields:
field abstract: str [Required][source]#

The abstract of the reference.

field enhancement_type: Literal[EnhancementType.ABSTRACT] = EnhancementType.ABSTRACT[source]#
field process: AbstractProcessType [Required][source]#

The process used to acquire the abstract.

class libs.sdk.src.destiny_sdk.enhancements.AbstractProcessType(*values)[source]#

The process used to acquire the abstract.

CLOSED_API = 'closed_api'[source]#

closed_api

OTHER = 'other'[source]#

other

UNINVERTED = 'uninverted'[source]#

uninverted

libs.sdk.src.destiny_sdk.enhancements.Annotation[source]#

Union type for all annotations.

alias of Annotated[BooleanAnnotation | ScoreAnnotation, FieldInfo(annotation=NoneType, required=True, discriminator=’annotation_type’)]

pydantic model libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement[source]#

An enhancement which is composed of a list of Annotations.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement&#xA;&#xA;An enhancement which is composed of a list of Annotations.&#\
xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation&#xA;&#xA;An annotation is a way of tagging the content with a label of some \
kind.&#xA;&#xA;This class will probably be broken up in the future, but covers most of our&#xA;initial cases.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation&#xA;&#xA;An annotation which represents the score for a label.&#xA;&#xA;This \
is similar to a BooleanAnnotation, but lacks a boolean determination&#xA;as to the application of the label.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "AnnotationEnhancement",
   "description": "An enhancement which is composed of a list of Annotations.",
   "type": "object",
   "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"
      }
   },
   "$defs": {
      "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"
      },
      "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"
      }
   },
   "required": [
      "annotations"
   ]
}

Fields:
field annotations: list[Annotated[BooleanAnnotation | ScoreAnnotation, FieldInfo(annotation=NoneType, required=True, discriminator='annotation_type')]] [Required][source]#
Constraints:
  • min_length = 1

field enhancement_type: Literal[EnhancementType.ANNOTATION] = EnhancementType.ANNOTATION[source]#
class libs.sdk.src.destiny_sdk.enhancements.AnnotationType(*values)[source]#

The type of annotation.

This is used to identify the type of annotation in the Annotation class.

BOOLEAN = 'boolean'[source]#

An annotation which is the boolean application of a label across a reference.

SCORE = 'score'[source]#

An annotation which is a score for a label across a reference, without a boolean value.

class libs.sdk.src.destiny_sdk.enhancements.AuthorPosition(*values)[source]#

The position of an author in a list of authorships.

Maps to the data from OpenAlex.

FIRST = 'first'[source]#

The first author.

LAST = 'last'[source]#

The last author.

MIDDLE = 'middle'[source]#

Any middle author.

pydantic model libs.sdk.src.destiny_sdk.enhancements.Authorship[source]#

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) for our purposes.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.Authorship&#xA;&#xA;Represents a single author and their association with a reference.&#xA;&#\
xA;This is a simplification of the OpenAlex [Authorship&#xA;object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.&#xA;"];
}

Show JSON schema
{
   "title": "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.",
   "type": "object",
   "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."
      }
   },
   "$defs": {
      "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"
      }
   },
   "required": [
      "display_name",
      "position"
   ]
}

Fields:
field display_name: str [Required][source]#

The display name of the author. Expected format FIRSTNAME <MIDDLENAME> LASTNAME. Providing display_name in an unexpected format will affect search performance.

field orcid: str | None = None[source]#

The ORCid of the author.

field position: AuthorPosition [Required][source]#

The position of the author within the list of authors.

pydantic model libs.sdk.src.destiny_sdk.enhancements.BaseAnnotation[source]#

Base class for annotations, defining the minimal required 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];
   "libs.sdk.src.destiny_sdk.enhancements.BaseAnnotation"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BaseAnnotation</b></td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.BaseAnnotation&#xA;&#xA;Base class for annotations, defining the minimal required fields.&#\
xA;"];
}

Show JSON schema
{
   "title": "BaseAnnotation",
   "description": "Base class for annotations, defining the minimal required fields.",
   "type": "object",
   "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"
      }
   },
   "required": [
      "scheme",
      "label"
   ]
}

Fields:
field label: str [Required][source]#

A high level label for this annotation like the name of the topic

field scheme: str [Required][source]#

An identifier for the scheme of annotation

Constraints:
  • pattern = ^[^/]+$

property qualified_label: str[source]#

The qualified label for this annotation.

pydantic model libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement[source]#

An enhancement which is made up of bibliographic metadata.

Generally this will be sourced from a database such as OpenAlex or similar. For directly contributed references, these may not be complete.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.Authorship&#xA;&#xA;Represents a single author and their association with a reference.&#xA;&#\
xA;This is a simplification of the OpenAlex [Authorship&#xA;object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.&#xA;"];
   "libs.sdk.src.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></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement&#xA;&#xA;An enhancement which is made up of bibliographic \
metadata.&#xA;&#xA;Generally this will be sourced from a database such as OpenAlex or similar.&#xA;For directly contributed references, \
these may not be complete.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "libs.sdk.src.destiny_sdk.enhancements.Authorship":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "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.",
   "type": "object",
   "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"
      }
   },
   "$defs": {
      "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"
      }
   }
}

Fields:
field authorship: list[Authorship] | None = None[source]#

A list of Authorships belonging to this reference.

field cited_by_count: int | None = None[source]#

(From OpenAlex) The number of citations to this work. These are the times that other works have cited this work

field created_date: date | None = None[source]#

The ISO8601 date this metadata record was created

field enhancement_type: Literal[EnhancementType.BIBLIOGRAPHIC] = EnhancementType.BIBLIOGRAPHIC[source]#
field publication_date: date | None = None[source]#

The date which the version of record was published.

field publication_year: int | None = None[source]#

The year in which the version of record was published.

field publisher: str | None = None[source]#

The name of the entity which published the version of record.

field title: str | None = None[source]#

The title of the reference.

field updated_date: date | None = None[source]#

The ISO8601 date of the last OpenAlex update to this metadata

property fingerprint: str[source]#

The fingerprint of this bibliographic metadata enhancement.

Excludes updated_at from the fingerprint calculation, meaning that two raw enhancements with identical data but different export dates will be considered the same.

pydantic model libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation[source]#

An annotation is a way of tagging the content with a label of some kind.

This class will probably be broken up in the future, but covers most of our initial cases.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation&#xA;&#xA;An annotation is a way of tagging the content with a label of some \
kind.&#xA;&#xA;This class will probably be broken up in the future, but covers most of our&#xA;initial cases.&#xA;"];
}

Show JSON schema
{
   "title": "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.",
   "type": "object",
   "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"
   ]
}

Fields:
field annotation_type: Literal[AnnotationType.BOOLEAN] = AnnotationType.BOOLEAN[source]#
field data: dict [Optional][source]#

An object representation of the annotation including any confidence scores or descriptions.

field label: str [Required][source]#

A high level label for this annotation like the name of the topic

field scheme: str [Required][source]#

An identifier for the scheme of annotation

Constraints:
  • pattern = ^[^/]+$

field score: float | None = None[source]#

A confidence score for this annotation

field value: bool [Required][source]#

Boolean flag for this annotation

property qualified_label: str[source]#

The qualified label for this annotation.

class libs.sdk.src.destiny_sdk.enhancements.DriverVersion(*values)[source]#

The version based on the DRIVER guidelines versioning scheme.

(Borrowed from OpenAlex)

ACCEPTED_VERSION = 'acceptedVersion'[source]#

The document after having completed peer review and being officially accepted for publication. It will lack publisher formatting, but the content should be interchangeable with that of the publishedVersion.

OTHER = 'other'[source]#

Other version.

PUBLISHED_VERSION = 'publishedVersion'[source]#

The document’s version of record. This is the most authoritative version.

SUBMITTED_VERSION = 'submittedVersion'[source]#

The document as submitted to the publisher by the authors, but before peer-review. Its content may differ significantly from that of the accepted article.

pydantic model libs.sdk.src.destiny_sdk.enhancements.Enhancement[source]#

Core enhancement class.

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];
   "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&#xA;&#xA;An external identifier representing a DOI.&#xA;"];
   "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&#xA;&#xA;An external identifier representing an ERIC Number.&#xA;&#xA;An ERIC Number is defined \
as a unqiue identifiying number preceeded by&#xA;EJ (for a journal article) or ED (for a non-journal document).&#xA;"];
   "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&#xA;&#xA;An external identifier representing an OpenAlex ID.&#xA;"];
   "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&#xA;&#xA;An external identifier not otherwise defined by the repository.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a ProQuest ID.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a PubMed ID.&#xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement&#xA;&#xA;An enhancement which is specific to the abstract of a \
reference.&#xA;&#xA;This is separate from the `BibliographicMetadata` for two reasons:&#xA;&#xA;1. Abstracts are increasingly missing \
from sources like OpenAlex, and may be&#xA;backfilled from other sources, without the bibliographic metadata.&#xA;2. They are also \
subject to copyright limitations in ways which metadata are&#xA;not, and thus need separate visibility controls.&#xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement&#xA;&#xA;An enhancement which is composed of a list of Annotations.&#\
xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation&#xA;&#xA;An annotation is a way of tagging the content with a label of some \
kind.&#xA;&#xA;This class will probably be broken up in the future, but covers most of our&#xA;initial cases.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation&#xA;&#xA;An annotation which represents the score for a label.&#xA;&#xA;This \
is similar to a BooleanAnnotation, but lacks a boolean determination&#xA;as to the application of the label.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.Authorship&#xA;&#xA;Represents a single author and their association with a reference.&#xA;&#\
xA;This is a simplification of the OpenAlex [Authorship&#xA;object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.&#xA;"];
   "libs.sdk.src.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></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement&#xA;&#xA;An enhancement which is made up of bibliographic \
metadata.&#xA;&#xA;Generally this will be sourced from a database such as OpenAlex or similar.&#xA;For directly contributed references, \
these may not be complete.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "libs.sdk.src.destiny_sdk.enhancements.Authorship":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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">Optional[UUID]</td></tr><tr><td>reference_id</td><td port="reference_id">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] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | RawEnhancement</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.Enhancement&#xA;&#xA;Core enhancement class.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement&#xA;&#xA;An enhancement which describes locations where this reference \
can be found.&#xA;&#xA;This maps closely (almost exactly) to OpenAlex's locations.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.RawEnhancement&#xA;&#xA;An enhancement for storing raw/arbitrary/unstructured data.&#xA;&#\
xA;Data in these enhancements is intended for future conversion into structured form.&#xA;&#xA;This enhancement accepts any fields \
passed in to `data`. These enhancements cannot&#xA;be created by robots.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.RawEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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[Union[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, UUID]]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement&#xA;&#xA;An enhancement for storing associations between references.&#\
xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.Location&#xA;&#xA;A location where a reference can be found.&#xA;&#xA;This maps almost completely \
to the OpenAlex&#xA;[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":locations:e -> "libs.sdk.src.destiny_sdk.enhancements.Location":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "Enhancement",
   "description": "Core enhancement class.",
   "type": "object",
   "properties": {
      "id": {
         "anyOf": [
            {
               "format": "uuid4",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The ID of the enhancement. Populated by the repository when sending enhancements with references.",
         "title": "Id"
      },
      "reference_id": {
         "description": "The ID of the reference this enhancement is associated with.",
         "format": "uuid4",
         "title": "Reference Id",
         "type": "string"
      },
      "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": "uuid4",
                  "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",
               "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/RawEnhancement"
            }
         ],
         "title": "Content"
      }
   },
   "$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"
            }
         },
         "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.",
               "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$",
               "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 unqiue identifiying number preceeded by\nEJ (for a journal article) or ED (for a non-journal document).",
         "properties": {
            "identifier": {
               "description": "The ERIC Number of the reference.",
               "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"
      },
      "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.",
               "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",
               "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 of the reference.",
               "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"
      },
      "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"
                           }
                        ]
                     },
                     {
                        "format": "uuid4",
                        "type": "string"
                     }
                  ]
               },
               "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"
      }
   },
   "required": [
      "reference_id",
      "source",
      "visibility",
      "content"
   ]
}

Fields:
field content: Annotated[BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | RawEnhancement, FieldInfo(annotation=NoneType, required=True, discriminator='enhancement_type'), FieldInfo(annotation=NoneType, required=True, description='The content of the enhancement.', discriminator='enhancement_type')] [Required][source]#

The content of the enhancement.

field derived_from: list[Annotated[UUID, UuidVersion(uuid_version=4)]] | None = None[source]#

List of enhancement IDs that this enhancement was derived from.

field id: Annotated[UUID, UuidVersion(uuid_version=4)] | None = None[source]#

The ID of the enhancement. Populated by the repository when sending enhancements with references.

field reference_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the reference this enhancement is associated with.

Constraints:
  • uuid_version = 4

field robot_version: str | None = None[source]#

The version of the robot that generated the content.

field source: str [Required][source]#

The enhancement source for tracking provenance.

field visibility: Visibility [Required][source]#

The level of visibility of the enhancement

classmethod from_jsonl(jsonl: str) Self[source]#

Create an object from a JSONL string.

Parameters:

jsonl (str) – The JSONL string to parse.

Returns:

The created object.

Return type:

Self

to_jsonl() str[source]#

Convert the model to a JSONL string.

Returns:

The JSONL string representation of the model.

Return type:

str

libs.sdk.src.destiny_sdk.enhancements.EnhancementContent[source]#

Union type for all enhancement content types.

alias of Annotated[BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | RawEnhancement, FieldInfo(annotation=NoneType, required=True, discriminator=’enhancement_type’)]

pydantic model libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput[source]#

Enhancement model used to marshall a file input to new 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];
   "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&#xA;&#xA;An external identifier representing a DOI.&#xA;"];
   "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&#xA;&#xA;An external identifier representing an ERIC Number.&#xA;&#xA;An ERIC Number is defined \
as a unqiue identifiying number preceeded by&#xA;EJ (for a journal article) or ED (for a non-journal document).&#xA;"];
   "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&#xA;&#xA;An external identifier representing an OpenAlex ID.&#xA;"];
   "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&#xA;&#xA;An external identifier not otherwise defined by the repository.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a ProQuest ID.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a PubMed ID.&#xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement&#xA;&#xA;An enhancement which is specific to the abstract of a \
reference.&#xA;&#xA;This is separate from the `BibliographicMetadata` for two reasons:&#xA;&#xA;1. Abstracts are increasingly missing \
from sources like OpenAlex, and may be&#xA;backfilled from other sources, without the bibliographic metadata.&#xA;2. They are also \
subject to copyright limitations in ways which metadata are&#xA;not, and thus need separate visibility controls.&#xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement&#xA;&#xA;An enhancement which is composed of a list of Annotations.&#\
xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation&#xA;&#xA;An annotation is a way of tagging the content with a label of some \
kind.&#xA;&#xA;This class will probably be broken up in the future, but covers most of our&#xA;initial cases.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation&#xA;&#xA;An annotation which represents the score for a label.&#xA;&#xA;This \
is similar to a BooleanAnnotation, but lacks a boolean determination&#xA;as to the application of the label.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.Authorship&#xA;&#xA;Represents a single author and their association with a reference.&#xA;&#\
xA;This is a simplification of the OpenAlex [Authorship&#xA;object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.&#xA;"];
   "libs.sdk.src.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></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement&#xA;&#xA;An enhancement which is made up of bibliographic \
metadata.&#xA;&#xA;Generally this will be sourced from a database such as OpenAlex or similar.&#xA;For directly contributed references, \
these may not be complete.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "libs.sdk.src.destiny_sdk.enhancements.Authorship":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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 | RawEnhancement</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput&#xA;&#xA;Enhancement model used to marshall a file input to new references.&#\
xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement&#xA;&#xA;An enhancement which describes locations where this reference \
can be found.&#xA;&#xA;This maps closely (almost exactly) to OpenAlex's locations.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.RawEnhancement&#xA;&#xA;An enhancement for storing raw/arbitrary/unstructured data.&#xA;&#\
xA;Data in these enhancements is intended for future conversion into structured form.&#xA;&#xA;This enhancement accepts any fields \
passed in to `data`. These enhancements cannot&#xA;be created by robots.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.RawEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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[Union[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, UUID]]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement&#xA;&#xA;An enhancement for storing associations between references.&#\
xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.Location&#xA;&#xA;A location where a reference can be found.&#xA;&#xA;This maps almost completely \
to the OpenAlex&#xA;[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":locations:e -> "libs.sdk.src.destiny_sdk.enhancements.Location":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "EnhancementFileInput",
   "description": "Enhancement model used to marshall a file input to new references.",
   "type": "object",
   "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",
               "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/RawEnhancement"
            }
         ],
         "title": "Content"
      }
   },
   "$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"
            }
         },
         "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.",
               "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$",
               "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 unqiue identifiying number preceeded by\nEJ (for a journal article) or ED (for a non-journal document).",
         "properties": {
            "identifier": {
               "description": "The ERIC Number of the reference.",
               "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"
      },
      "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.",
               "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",
               "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 of the reference.",
               "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"
      },
      "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"
                           }
                        ]
                     },
                     {
                        "format": "uuid4",
                        "type": "string"
                     }
                  ]
               },
               "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"
      }
   },
   "required": [
      "source",
      "visibility",
      "content"
   ]
}

Fields:
field content: Annotated[BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | RawEnhancement, FieldInfo(annotation=NoneType, required=True, discriminator='enhancement_type')] [Required][source]#

The content of the enhancement.

field robot_version: str | None = None (alias 'processor_version')[source]#

The version of the robot that generated the content.

field source: str [Required][source]#

The enhancement source for tracking provenance.

field visibility: Visibility [Required][source]#

The level of visibility of the enhancement

class libs.sdk.src.destiny_sdk.enhancements.EnhancementType(*values)[source]#

The type of enhancement.

This is used to identify the type of enhancement in the Enhancement class.

ABSTRACT = 'abstract'[source]#

The abstract of a reference.

ANNOTATION = 'annotation'[source]#

A free-form enhancement for tagging with labels.

BIBLIOGRAPHIC = 'bibliographic'[source]#

Bibliographic metadata.

FULL_TEXT = 'full_text'[source]#

The full text of the reference. (To be implemented)

LOCATION = 'location'[source]#

Locations where the reference can be found.

RAW = 'raw'[source]#

A free form enhancement for arbitrary/unstructured data.

REFERENCE_ASSOCIATION = 'reference_association'[source]#

Associations to other references.

pydantic model libs.sdk.src.destiny_sdk.enhancements.Location[source]#

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)

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.Location&#xA;&#xA;A location where a reference can be found.&#xA;&#xA;This maps almost completely \
to the OpenAlex&#xA;[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)&#xA;"];
}

Show JSON schema
{
   "title": "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)",
   "type": "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"
      }
   },
   "$defs": {
      "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"
      }
   }
}

Fields:
field extra: dict | None = None[source]#

Any extra metadata about this location

field is_oa: bool | None = None[source]#

(From OpenAlex): True if an Open Access (OA) version of this work is available at this location. May be left as null if this is unknown (and thus) treated effectively as false.

field landing_page_url: HttpUrl | None = None[source]#

(From OpenAlex): The landing page URL for this location.

field license: str | None = None[source]#

(From OpenAlex): The location’s publishing license. This can be a Creative Commons license such as cc0 or cc-by, a publisher-specific license, or null which means we are not able to determine a license for this location.

field pdf_url: HttpUrl | None = None[source]#

(From OpenAlex): A URL where you can find this location as a PDF.

field version: DriverVersion | None = None[source]#

The version (according to the DRIVER versioning scheme) of this location.

pydantic model libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement[source]#

An enhancement which describes locations where this reference can be found.

This maps closely (almost exactly) to OpenAlex’s locations.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.Location&#xA;&#xA;A location where a reference can be found.&#xA;&#xA;This maps almost completely \
to the OpenAlex&#xA;[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)&#xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement&#xA;&#xA;An enhancement which describes locations where this reference \
can be found.&#xA;&#xA;This maps closely (almost exactly) to OpenAlex's locations.&#xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":locations:e -> "libs.sdk.src.destiny_sdk.enhancements.Location":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "LocationEnhancement",
   "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.",
   "type": "object",
   "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"
      }
   },
   "$defs": {
      "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"
      },
      "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"
      }
   },
   "required": [
      "locations"
   ]
}

Fields:
field enhancement_type: Literal[EnhancementType.LOCATION] = EnhancementType.LOCATION[source]#
field locations: list[Location] [Required][source]#

A list of locations where this reference can be found.

Constraints:
  • min_length = 1

pydantic model libs.sdk.src.destiny_sdk.enhancements.RawEnhancement[source]#

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.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.RawEnhancement&#xA;&#xA;An enhancement for storing raw/arbitrary/unstructured data.&#xA;&#\
xA;Data in these enhancements is intended for future conversion into structured form.&#xA;&#xA;This enhancement accepts any fields \
passed in to `data`. These enhancements cannot&#xA;be created by robots.&#xA;"];
}

Show JSON schema
{
   "title": "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.",
   "type": "object",
   "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"
   ]
}

Fields:
Validators:
field data: Any [Required][source]#

Unstructured data for later processing.

Validated by:
field description: str [Required][source]#

Description of the data to aid in future refinement.

Validated by:
field enhancement_type: Literal[EnhancementType.RAW] = EnhancementType.RAW[source]#
Validated by:
field metadata: dict[str, Any] [Optional][source]#

Additional metadata to aid in future structuring of raw data

Validated by:
field source_export_date: datetime [Required][source]#

Date the enhancement data was retrieved.

Validated by:
validator forbid_no_data  »  all fields[source]#

Prevent a raw enhancement from being created with no data.

property fingerprint: str[source]#

The unique fingerprint of this raw enhancement.

Excludes the source_export_date from the fingerprint calculation, meaning that two raw enhancements with identical data but different export dates will be considered the same.

Unstructured data in data and metadata is included in the fingerprint, sorted by key.

pydantic model libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement[source]#

An enhancement for storing associations between 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];
   "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&#xA;&#xA;An external identifier representing a DOI.&#xA;"];
   "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&#xA;&#xA;An external identifier representing an ERIC Number.&#xA;&#xA;An ERIC Number is defined \
as a unqiue identifiying number preceeded by&#xA;EJ (for a journal article) or ED (for a non-journal document).&#xA;"];
   "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&#xA;&#xA;An external identifier representing an OpenAlex ID.&#xA;"];
   "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&#xA;&#xA;An external identifier not otherwise defined by the repository.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a ProQuest ID.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a PubMed ID.&#xA;"];
   "libs.sdk.src.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[Union[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, UUID]]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement&#xA;&#xA;An enhancement for storing associations between references.&#\
xA;"];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "ReferenceAssociationEnhancement",
   "description": "An enhancement for storing associations between references.",
   "type": "object",
   "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"
                     }
                  ]
               },
               {
                  "format": "uuid4",
                  "type": "string"
               }
            ]
         },
         "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\"."
      }
   },
   "$defs": {
      "DOIIdentifier": {
         "description": "An external identifier representing a DOI.",
         "properties": {
            "identifier": {
               "description": "The DOI of the reference.",
               "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$",
               "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 unqiue identifiying number preceeded by\nEJ (for a journal article) or ED (for a non-journal document).",
         "properties": {
            "identifier": {
               "description": "The ERIC Number of the reference.",
               "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.",
               "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",
               "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 of the reference.",
               "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"
      },
      "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"
      }
   },
   "required": [
      "associated_reference_ids",
      "association_type"
   ]
}

Fields:
field associated_reference_ids: list[Annotated[Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')] | Annotated[UUID, UuidVersion(uuid_version=4)], FieldInfo(annotation=NoneType, required=True)]] [Required][source]#

A list of Identifiers which are associated to this reference. These can either be ExternalIdentifiers or resolved repository UUID4s.

Constraints:
  • min_length = 1

field association_type: ReferenceAssociationType [Required][source]#

The type of association between this reference and the associated ones. Direction is important: “this reference <association_type> associated reference”.

field enhancement_type: Literal[EnhancementType.REFERENCE_ASSOCIATION] = EnhancementType.REFERENCE_ASSOCIATION[source]#
class libs.sdk.src.destiny_sdk.enhancements.ReferenceAssociationType(*values)[source]#

The type of association between references.

Direction is important: “this reference <association_type> associated reference”.

CITES = 'cites'[source]#

This reference cites the related reference.

IS_CITED_BY = 'is_cited_by'[source]#

This reference is cited by the related reference.

IS_SIMILAR_TO = 'is_similar_to'[source]#

This reference is similar to the related reference.

pydantic model libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation[source]#

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.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation&#xA;&#xA;An annotation which represents the score for a label.&#xA;&#xA;This \
is similar to a BooleanAnnotation, but lacks a boolean determination&#xA;as to the application of the label.&#xA;"];
}

Show JSON schema
{
   "title": "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.",
   "type": "object",
   "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"
   ]
}

Fields:
field annotation_type: Literal[AnnotationType.SCORE] = AnnotationType.SCORE[source]#
field data: dict [Optional][source]#

An object representation of the annotation including any confidence scores or descriptions.

field label: str [Required][source]#

A high level label for this annotation like the name of the topic

field scheme: str [Required][source]#

An identifier for the scheme of annotation

Constraints:
  • pattern = ^[^/]+$

field score: float [Required][source]#

Score for this annotation

property qualified_label: str[source]#

The qualified label for this annotation.

Identifiers#

Identifier classes for the Destiny SDK.

pydantic model libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier[source]#

An external identifier representing a DOI.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier&#xA;&#xA;An external identifier representing a DOI.&#xA;"];
}

Show JSON schema
{
   "title": "DOIIdentifier",
   "description": "An external identifier representing a DOI.",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The DOI of the reference.",
         "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$",
         "title": "Identifier",
         "type": "string"
      },
      "identifier_type": {
         "const": "doi",
         "default": "doi",
         "description": "The type of identifier used.",
         "title": "Identifier Type",
         "type": "string"
      }
   },
   "required": [
      "identifier"
   ]
}

Fields:
Validators:
field identifier: str [Required][source]#

The DOI of the reference.

Constraints:
  • pattern = ^10.d{4,9}/[-._;()/:a-zA-Z0-9%<>[]+&]+$

Validated by:
field identifier_type: Literal[ExternalIdentifierType.DOI] = ExternalIdentifierType.DOI[source]#

The type of identifier used.

validator remove_doi_url  »  identifier[source]#

Remove the URL part of the DOI if it exists.

pydantic model libs.sdk.src.destiny_sdk.identifiers.ERICIdentifier[source]#

An external identifier representing an ERIC Number.

An ERIC Number is defined as a unqiue identifiying number preceeded by EJ (for a journal article) or ED (for a non-journal document).

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.ERICIdentifier&#xA;&#xA;An external identifier representing an ERIC Number.&#xA;&#xA;An ERIC \
Number is defined as a unqiue identifiying number preceeded by&#xA;EJ (for a journal article) or ED (for a non-journal document)\
.&#xA;"];
}

Show JSON schema
{
   "title": "ERICIdentifier",
   "description": "An external identifier representing an ERIC Number.\n\nAn ERIC Number is defined as a unqiue identifiying number preceeded by\nEJ (for a journal article) or ED (for a non-journal document).",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The ERIC Number of the reference.",
         "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"
   ]
}

Fields:
Validators:
field identifier: str [Required][source]#

The ERIC Number of the reference.

Constraints:
  • pattern = E[D|J][0-9]+$

Validated by:
field identifier_type: Literal[ExternalIdentifierType.ERIC] = ExternalIdentifierType.ERIC[source]#

The type of identifier used.

validator remove_eric_url  »  identifier[source]#

Remove the URL part of the ERIC ID if it exists.

libs.sdk.src.destiny_sdk.identifiers.ExternalIdentifier[source]#

Union type for all external identifiers.

alias of Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator=’identifier_type’)]

class libs.sdk.src.destiny_sdk.identifiers.ExternalIdentifierType(*values)[source]#

The type of identifier used to identify a reference.

This is used to identify the type of identifier used in the ExternalIdentifier class.

DOI = 'doi'[source]#

A DOI (Digital Object Identifier) which is a unique identifier for a document.

ERIC = 'eric'[source]#

An ERIC (Education Resources Information Identifier) ID which is a unique identifier for a document in ERIC.

OPEN_ALEX = 'open_alex'[source]#

An OpenAlex ID which is a unique identifier for a document in OpenAlex.

OTHER = 'other'[source]#

Any other identifier not defined. This should be used sparingly.

PM_ID = 'pm_id'[source]#

A PubMed ID which is a unique identifier for a document in PubMed.

PRO_QUEST = 'pro_quest'[source]#

A ProQuest ID which is a unqiue identifier for a document in ProQuest.

libs.sdk.src.destiny_sdk.identifiers.Identifier[source]#

Any identifier including external identifiers and repository UUID4s.

alias of Annotated[Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator=’identifier_type’)] | Annotated[UUID, UuidVersion(uuid_version=4)], FieldInfo(annotation=NoneType, required=True)]

pydantic model libs.sdk.src.destiny_sdk.identifiers.IdentifierLookup[source]#

An external identifier lookup.

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];
   "libs.sdk.src.destiny_sdk.identifiers.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="libs.sdk.src.destiny_sdk.identifiers.IdentifierLookup&#xA;&#xA;An external identifier lookup.&#xA;"];
}

Show JSON schema
{
   "title": "IdentifierLookup",
   "description": "An external identifier lookup.",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The identifier value.",
         "title": "Identifier",
         "type": "string"
      },
      "identifier_type": {
         "anyOf": [
            {
               "$ref": "#/$defs/ExternalIdentifierType"
            },
            {
               "type": "null"
            }
         ],
         "description": "The type of identifier used. If not provided, it is assumed to be a DESTINY identifier."
      },
      "other_identifier_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the undocumented identifier type.",
         "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: str [Required][source]#

The identifier value.

field identifier_type: ExternalIdentifierType | None [Required][source]#

The type of identifier used. If not provided, it is assumed to be a DESTINY identifier.

field other_identifier_name: str | None = None[source]#

The name of the undocumented identifier type.

classmethod from_identifier(identifier: Annotated[Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')] | Annotated[UUID, UuidVersion(uuid_version=4)], FieldInfo(annotation=NoneType, required=True)]) Self[source]#

Create an IdentifierLookup from an ExternalIdentifier or UUID4.

classmethod parse(identifier_lookup_string: str, delimiter: str = ':') Self[source]#

Parse an identifier string into an IdentifierLookup.

serialize() str[source]#

Serialize the identifier lookup to a string.

to_identifier() Annotated[Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')] | Annotated[UUID, UuidVersion(uuid_version=4)], FieldInfo(annotation=NoneType, required=True)][source]#

Convert into an ExternalIdentifier or UUID4 if it has no identifier_type.

pydantic model libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier[source]#

An external identifier which identifies a 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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier&#xA;&#xA;An external identifier representing a DOI.&#xA;"];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.ERICIdentifier&#xA;&#xA;An external identifier representing an ERIC Number.&#xA;&#xA;An ERIC \
Number is defined as a unqiue identifiying number preceeded by&#xA;EJ (for a journal article) or ED (for a non-journal document)\
.&#xA;"];
   "libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedExternalIdentifier</b></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></table>>,
      tooltip="libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier&#xA;&#xA;An external identifier which identifies a reference.&#xA;"];
   "libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.ERICIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier&#xA;&#xA;An external identifier representing an OpenAlex ID.&#xA;"];
   "libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier&#xA;&#xA;An external identifier not otherwise defined by the repository.&#xA;"];
   "libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.ProQuestIdentifier&#xA;&#xA;An external identifier representing a ProQuest ID.&#xA;"];
   "libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.ProQuestIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier&#xA;&#xA;An external identifier representing a PubMed ID.&#xA;"];
   "libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "LinkedExternalIdentifier",
   "description": "An external identifier which identifies a reference.",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The identifier of the reference.",
         "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": "uuid4",
         "title": "Reference Id",
         "type": "string"
      }
   },
   "$defs": {
      "DOIIdentifier": {
         "description": "An external identifier representing a DOI.",
         "properties": {
            "identifier": {
               "description": "The DOI of the reference.",
               "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$",
               "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 unqiue identifiying number preceeded by\nEJ (for a journal article) or ED (for a non-journal document).",
         "properties": {
            "identifier": {
               "description": "The ERIC Number of the reference.",
               "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.",
               "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",
               "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 of the reference.",
               "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"
      }
   },
   "required": [
      "identifier",
      "reference_id"
   ]
}

Fields:
field identifier: Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')] [Required][source]#

The identifier of the reference.

field reference_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the reference this identifier identifies.

Constraints:
  • uuid_version = 4

pydantic model libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier[source]#

An external identifier representing an OpenAlex ID.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier&#xA;&#xA;An external identifier representing an OpenAlex ID.&#xA;"];
}

Show JSON schema
{
   "title": "OpenAlexIdentifier",
   "description": "An external identifier representing an OpenAlex ID.",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The OpenAlex ID of the reference.",
         "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"
   ]
}

Fields:
Validators:
field identifier: str [Required][source]#

The OpenAlex ID of the reference.

Constraints:
  • pattern = ^Wd+$

Validated by:
field identifier_type: Literal[ExternalIdentifierType.OPEN_ALEX] = ExternalIdentifierType.OPEN_ALEX[source]#

The type of identifier used.

validator remove_open_alex_url  »  identifier[source]#

Remove the OpenAlex URL if it exists.

pydantic model libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier[source]#

An external identifier not otherwise defined by the repository.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier&#xA;&#xA;An external identifier not otherwise defined by the repository.&#xA;"];
}

Show JSON schema
{
   "title": "OtherIdentifier",
   "description": "An external identifier not otherwise defined by the repository.",
   "type": "object",
   "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"
   ]
}

Fields:
field identifier: str [Required][source]#

The identifier of the reference.

field identifier_type: Literal[ExternalIdentifierType.OTHER] = ExternalIdentifierType.OTHER[source]#

The type of identifier used.

field other_identifier_name: str [Required][source]#

The name of the undocumented identifier type.

pydantic model libs.sdk.src.destiny_sdk.identifiers.ProQuestIdentifier[source]#

An external identifier representing a ProQuest ID.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.ProQuestIdentifier&#xA;&#xA;An external identifier representing a ProQuest ID.&#xA;"];
}

Show JSON schema
{
   "title": "ProQuestIdentifier",
   "description": "An external identifier representing a ProQuest ID.",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The ProQuest id of the reference",
         "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"
   ]
}

Fields:
Validators:
field identifier: str [Required][source]#

The ProQuest id of the reference

Constraints:
  • pattern = [0-9]+$

Validated by:
field identifier_type: Literal[ExternalIdentifierType.PRO_QUEST] = ExternalIdentifierType.PRO_QUEST[source]#

The type of identifier used.

validator remove_proquest_url  »  identifier[source]#

Remove the URL part of the ProQuest id if it exists.

pydantic model libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier[source]#

An external identifier representing a PubMed ID.

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];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier&#xA;&#xA;An external identifier representing a PubMed ID.&#xA;"];
}

Show JSON schema
{
   "title": "PubMedIdentifier",
   "description": "An external identifier representing a PubMed ID.",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The PubMed ID of the reference.",
         "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"
   ]
}

Fields:
field identifier: int [Required][source]#

The PubMed ID of the reference.

field identifier_type: Literal[ExternalIdentifierType.PM_ID] = ExternalIdentifierType.PM_ID[source]#

The type of identifier used.

References#

Reference classes for the Destiny SDK.

pydantic model libs.sdk.src.destiny_sdk.references.Reference[source]#

Core reference class.

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];
   "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&#xA;&#xA;An enhancement which is specific to the abstract of a reference.&#xA;&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:&#xA;&#xA;1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be&#xA;backfilled from other sources, without the bibliographic metadata.&#xA;2. They are also subject to \
copyright limitations in ways which metadata are&#xA;not, and thus need separate visibility controls.&#xA;"];
   "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&#xA;&#xA;An enhancement which is composed of a list of Annotations.&#xA;"];
   "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&#xA;&#xA;An annotation is a way of tagging the content with a label of some kind.&#xA;&#\
xA;This class will probably be broken up in the future, but covers most of our&#xA;initial cases.&#xA;"];
   "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&#xA;&#xA;An annotation which represents the score for a label.&#xA;&#xA;This is similar \
to a BooleanAnnotation, but lacks a boolean determination&#xA;as to the application of the label.&#xA;"];
   "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&#xA;&#xA;Represents a single author and their association with a reference.&#xA;&#xA;This is \
a simplification of the OpenAlex [Authorship&#xA;object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.&#xA;"];
   "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></table>>,
      tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement&#xA;&#xA;An enhancement which is made up of bibliographic metadata.&#xA;&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.&#xA;For directly contributed references, these may \
not be complete.&#xA;"];
   "destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "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">Optional[UUID]</td></tr><tr><td>reference_id</td><td port="reference_id">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] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | RawEnhancement</td></tr></table>>,
      tooltip="destiny_sdk.enhancements.Enhancement&#xA;&#xA;Core enhancement class.&#xA;"];
   "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.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&#xA;&#xA;An enhancement which describes locations where this reference can be found.&#\
xA;&#xA;This maps closely (almost exactly) to OpenAlex's locations.&#xA;"];
   "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&#xA;&#xA;An enhancement for storing raw/arbitrary/unstructured data.&#xA;&#xA;Data in these \
enhancements is intended for future conversion into structured form.&#xA;&#xA;This enhancement accepts any fields passed in to `\
data`. These enhancements cannot&#xA;be created by robots.&#xA;"];
   "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[Union[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, UUID]]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
      tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement&#xA;&#xA;An enhancement for storing associations between references.&#xA;"];
   "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&#xA;&#xA;A location where a reference can be found.&#xA;&#xA;This maps almost completely to the \
OpenAlex&#xA;[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)&#xA;"];
   "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&#xA;&#xA;An external identifier representing a DOI.&#xA;"];
   "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&#xA;&#xA;An external identifier representing an ERIC Number.&#xA;&#xA;An ERIC Number is defined \
as a unqiue identifiying number preceeded by&#xA;EJ (for a journal article) or ED (for a non-journal document).&#xA;"];
   "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&#xA;&#xA;An external identifier representing an OpenAlex ID.&#xA;"];
   "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&#xA;&#xA;An external identifier not otherwise defined by the repository.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a ProQuest ID.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a PubMed ID.&#xA;"];
   "destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Reference</b></td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>id</td><td port="id">UUID</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[Enhancement] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.references.Reference&#xA;&#xA;Core reference class.&#xA;"];
   "libs.sdk.src.destiny_sdk.references.Reference":enhancements:e -> "destiny_sdk.enhancements.Enhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "Reference",
   "description": "Core reference class.",
   "type": "object",
   "properties": {
      "visibility": {
         "$ref": "#/$defs/Visibility",
         "default": "public",
         "description": "The level of visibility of the reference"
      },
      "id": {
         "description": "The ID of the reference",
         "format": "uuid4",
         "title": "Id",
         "type": "string"
      },
      "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/Enhancement"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "A list of enhancements for the reference",
         "title": "Enhancements"
      }
   },
   "$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"
            }
         },
         "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.",
               "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$",
               "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 unqiue identifiying number preceeded by\nEJ (for a journal article) or ED (for a non-journal document).",
         "properties": {
            "identifier": {
               "description": "The ERIC Number of the reference.",
               "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": [
                  {
                     "format": "uuid4",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The ID of the enhancement. Populated by the repository when sending enhancements with references.",
               "title": "Id"
            },
            "reference_id": {
               "description": "The ID of the reference this enhancement is associated with.",
               "format": "uuid4",
               "title": "Reference Id",
               "type": "string"
            },
            "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": "uuid4",
                        "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",
                     "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/RawEnhancement"
                  }
               ],
               "title": "Content"
            }
         },
         "required": [
            "reference_id",
            "source",
            "visibility",
            "content"
         ],
         "title": "Enhancement",
         "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.",
               "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",
               "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 of the reference.",
               "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"
      },
      "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"
                           }
                        ]
                     },
                     {
                        "format": "uuid4",
                        "type": "string"
                     }
                  ]
               },
               "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"
      }
   },
   "required": [
      "id"
   ]
}

Fields:
field enhancements: list[Enhancement] | None = None[source]#

A list of enhancements for the reference

field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#

The ID of the reference

Constraints:
  • uuid_version = 4

field identifiers: list[Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')]] | None = None[source]#

A list of ExternalIdentifiers for the Reference

field visibility: Visibility = Visibility.PUBLIC[source]#

The level of visibility of the reference

classmethod from_es(es_reference: dict) Self[source]#

Create a Reference from an Elasticsearch document.

classmethod from_jsonl(jsonl: str) Self[source]#

Create an object from a JSONL string.

Parameters:

jsonl (str) – The JSONL string to parse.

Returns:

The created object.

Return type:

Self

to_jsonl() str[source]#

Convert the model to a JSONL string.

Returns:

The JSONL string representation of the model.

Return type:

str

pydantic model libs.sdk.src.destiny_sdk.references.ReferenceFileInput[source]#

Enhancement model used to marshall a file input.

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];
   "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&#xA;&#xA;An enhancement which is specific to the abstract of a reference.&#xA;&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:&#xA;&#xA;1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be&#xA;backfilled from other sources, without the bibliographic metadata.&#xA;2. They are also subject to \
copyright limitations in ways which metadata are&#xA;not, and thus need separate visibility controls.&#xA;"];
   "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&#xA;&#xA;An enhancement which is composed of a list of Annotations.&#xA;"];
   "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&#xA;&#xA;An annotation is a way of tagging the content with a label of some kind.&#xA;&#\
xA;This class will probably be broken up in the future, but covers most of our&#xA;initial cases.&#xA;"];
   "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&#xA;&#xA;An annotation which represents the score for a label.&#xA;&#xA;This is similar \
to a BooleanAnnotation, but lacks a boolean determination&#xA;as to the application of the label.&#xA;"];
   "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&#xA;&#xA;Represents a single author and their association with a reference.&#xA;&#xA;This is \
a simplification of the OpenAlex [Authorship&#xA;object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.&#xA;"];
   "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></table>>,
      tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement&#xA;&#xA;An enhancement which is made up of bibliographic metadata.&#xA;&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.&#xA;For directly contributed references, these may \
not be complete.&#xA;"];
   "destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w   [arrowhead=noneteetee,
      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 | RawEnhancement</td></tr></table>>,
      tooltip="destiny_sdk.enhancements.EnhancementFileInput&#xA;&#xA;Enhancement model used to marshall a file input to new references.&#xA;"];
   "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.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&#xA;&#xA;An enhancement which describes locations where this reference can be found.&#\
xA;&#xA;This maps closely (almost exactly) to OpenAlex's locations.&#xA;"];
   "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&#xA;&#xA;An enhancement for storing raw/arbitrary/unstructured data.&#xA;&#xA;Data in these \
enhancements is intended for future conversion into structured form.&#xA;&#xA;This enhancement accepts any fields passed in to `\
data`. These enhancements cannot&#xA;be created by robots.&#xA;"];
   "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[Union[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, UUID]]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
      tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement&#xA;&#xA;An enhancement for storing associations between references.&#xA;"];
   "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&#xA;&#xA;A location where a reference can be found.&#xA;&#xA;This maps almost completely to the \
OpenAlex&#xA;[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)&#xA;"];
   "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&#xA;&#xA;An external identifier representing a DOI.&#xA;"];
   "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&#xA;&#xA;An external identifier representing an ERIC Number.&#xA;&#xA;An ERIC Number is defined \
as a unqiue identifiying number preceeded by&#xA;EJ (for a journal article) or ED (for a non-journal document).&#xA;"];
   "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&#xA;&#xA;An external identifier representing an OpenAlex ID.&#xA;"];
   "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&#xA;&#xA;An external identifier not otherwise defined by the repository.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a ProQuest ID.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a PubMed ID.&#xA;"];
   "destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "libs.sdk.src.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="libs.sdk.src.destiny_sdk.references.ReferenceFileInput&#xA;&#xA;Enhancement model used to marshall a file input.&#xA;"];
   "libs.sdk.src.destiny_sdk.references.ReferenceFileInput":enhancements:e -> "destiny_sdk.enhancements.EnhancementFileInput":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "ReferenceFileInput",
   "description": "Enhancement model used to marshall a file input.",
   "type": "object",
   "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"
      }
   },
   "$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"
            }
         },
         "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.",
               "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$",
               "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 unqiue identifiying number preceeded by\nEJ (for a journal article) or ED (for a non-journal document).",
         "properties": {
            "identifier": {
               "description": "The ERIC Number of the reference.",
               "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",
                     "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/RawEnhancement"
                  }
               ],
               "title": "Content"
            }
         },
         "required": [
            "source",
            "visibility",
            "content"
         ],
         "title": "EnhancementFileInput",
         "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.",
               "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",
               "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 of the reference.",
               "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"
      },
      "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"
                           }
                        ]
                     },
                     {
                        "format": "uuid4",
                        "type": "string"
                     }
                  ]
               },
               "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 enhancements: list[EnhancementFileInput] | None = None[source]#

A list of enhancements for the reference

field identifiers: list[Annotated[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')]] | None = None[source]#

A list of ExternalIdentifiers for the Reference

field visibility: Visibility = Visibility.PUBLIC[source]#

The level of visibility of the reference

classmethod from_jsonl(jsonl: str) Self[source]#

Create an object from a JSONL string.

Parameters:

jsonl (str) – The JSONL string to parse.

Returns:

The created object.

Return type:

Self

to_jsonl() str[source]#

Convert the model to a JSONL string.

Returns:

The JSONL string representation of the model.

Return type:

str

pydantic model libs.sdk.src.destiny_sdk.references.ReferenceSearchResult[source]#

A search result for 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];
   "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&#xA;&#xA;An enhancement which is specific to the abstract of a reference.&#xA;&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:&#xA;&#xA;1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be&#xA;backfilled from other sources, without the bibliographic metadata.&#xA;2. They are also subject to \
copyright limitations in ways which metadata are&#xA;not, and thus need separate visibility controls.&#xA;"];
   "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&#xA;&#xA;An enhancement which is composed of a list of Annotations.&#xA;"];
   "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&#xA;&#xA;An annotation is a way of tagging the content with a label of some kind.&#xA;&#\
xA;This class will probably be broken up in the future, but covers most of our&#xA;initial cases.&#xA;"];
   "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&#xA;&#xA;An annotation which represents the score for a label.&#xA;&#xA;This is similar \
to a BooleanAnnotation, but lacks a boolean determination&#xA;as to the application of the label.&#xA;"];
   "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&#xA;&#xA;Represents a single author and their association with a reference.&#xA;&#xA;This is \
a simplification of the OpenAlex [Authorship&#xA;object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.&#xA;"];
   "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></table>>,
      tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement&#xA;&#xA;An enhancement which is made up of bibliographic metadata.&#xA;&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.&#xA;For directly contributed references, these may \
not be complete.&#xA;"];
   "destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "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">Optional[UUID]</td></tr><tr><td>reference_id</td><td port="reference_id">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] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement | ReferenceAssociationEnhancement | RawEnhancement</td></tr></table>>,
      tooltip="destiny_sdk.enhancements.Enhancement&#xA;&#xA;Core enhancement class.&#xA;"];
   "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.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&#xA;&#xA;An enhancement which describes locations where this reference can be found.&#\
xA;&#xA;This maps closely (almost exactly) to OpenAlex's locations.&#xA;"];
   "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&#xA;&#xA;An enhancement for storing raw/arbitrary/unstructured data.&#xA;&#xA;Data in these \
enhancements is intended for future conversion into structured form.&#xA;&#xA;This enhancement accepts any fields passed in to `\
data`. These enhancements cannot&#xA;be created by robots.&#xA;"];
   "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[Union[DOIIdentifier | ERICIdentifier | PubMedIdentifier | ProQuestIdentifier | OpenAlexIdentifier | OtherIdentifier, UUID]]</td></tr><tr><td>association_type</td><td port="association_type">ReferenceAssociationType</td></tr></table>>,
      tooltip="destiny_sdk.enhancements.ReferenceAssociationEnhancement&#xA;&#xA;An enhancement for storing associations between references.&#xA;"];
   "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&#xA;&#xA;A location where a reference can be found.&#xA;&#xA;This maps almost completely to the \
OpenAlex&#xA;[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)&#xA;"];
   "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&#xA;&#xA;An external identifier representing a DOI.&#xA;"];
   "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&#xA;&#xA;An external identifier representing an ERIC Number.&#xA;&#xA;An ERIC Number is defined \
as a unqiue identifiying number preceeded by&#xA;EJ (for a journal article) or ED (for a non-journal document).&#xA;"];
   "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&#xA;&#xA;An external identifier representing an OpenAlex ID.&#xA;"];
   "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&#xA;&#xA;An external identifier not otherwise defined by the repository.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a ProQuest ID.&#xA;"];
   "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&#xA;&#xA;An external identifier representing a PubMed ID.&#xA;"];
   "destiny_sdk.enhancements.ReferenceAssociationEnhancement":associated_reference_ids:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
   "destiny_sdk.search.SearchResultPage"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>SearchResultPage</b></td></tr><tr><td>count</td><td port="count">int</td></tr><tr><td>number</td><td port="number">int</td></tr></table>>,
      tooltip="destiny_sdk.search.SearchResultPage&#xA;&#xA;Information about the page of search results.&#xA;"];
   "destiny_sdk.search.SearchResultTotal"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>SearchResultTotal</b></td></tr><tr><td>count</td><td port="count">int</td></tr><tr><td>is_lower_bound</td><td port="is_lower_bound">bool</td></tr></table>>,
      tooltip="destiny_sdk.search.SearchResultTotal&#xA;&#xA;Information about the total number of search results.&#xA;"];
   "libs.sdk.src.destiny_sdk.references.Reference"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Reference</b></td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>id</td><td port="id">UUID</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[Enhancement] | None</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.references.Reference&#xA;&#xA;Core reference class.&#xA;"];
   "libs.sdk.src.destiny_sdk.references.Reference":enhancements:e -> "destiny_sdk.enhancements.Enhancement":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.ERICIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.ProQuestIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceSearchResult"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceSearchResult</b></td></tr><tr><td>total</td><td port="total">SearchResultTotal</td></tr><tr><td>page</td><td port="page">SearchResultPage</td></tr><tr><td>references</td><td port="references">list[Reference]</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.references.ReferenceSearchResult&#xA;&#xA;A search result for references.&#xA;"];
   "libs.sdk.src.destiny_sdk.references.ReferenceSearchResult":page:e -> "destiny_sdk.search.SearchResultPage":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceSearchResult":total:e -> "destiny_sdk.search.SearchResultTotal":_root:w   [arrowhead=noneteetee,
      arrowtail=nonenone];
   "libs.sdk.src.destiny_sdk.references.ReferenceSearchResult":references:e -> "libs.sdk.src.destiny_sdk.references.Reference":_root:w   [arrowhead=crownone,
      arrowtail=nonenone];
}

Show JSON schema
{
   "title": "ReferenceSearchResult",
   "description": "A search result for references.",
   "type": "object",
   "properties": {
      "total": {
         "$ref": "#/$defs/SearchResultTotal",
         "description": "The total number of results matching the search criteria."
      },
      "page": {
         "$ref": "#/$defs/SearchResultPage",
         "description": "Information about the page of results."
      },
      "references": {
         "description": "The references returned by the search.",
         "items": {
            "$ref": "#/$defs/Reference"
         },
         "title": "References",
         "type": "array"
      }
   },
   "$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"
            }
         },
         "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.",
               "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$",
               "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 unqiue identifiying number preceeded by\nEJ (for a journal article) or ED (for a non-journal document).",
         "properties": {
            "identifier": {
               "description": "The ERIC Number of the reference.",
               "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": [
                  {
                     "format": "uuid4",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The ID of the enhancement. Populated by the repository when sending enhancements with references.",
               "title": "Id"
            },
            "reference_id": {
               "description": "The ID of the reference this enhancement is associated with.",
               "format": "uuid4",
               "title": "Reference Id",
               "type": "string"
            },
            "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": "uuid4",
                        "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",
                     "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/RawEnhancement"
                  }
               ],
               "title": "Content"
            }
         },
         "required": [
            "reference_id",
            "source",
            "visibility",
            "content"
         ],
         "title": "Enhancement",
         "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.",
               "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",
               "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 of the reference.",
               "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"
      },
      "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 class.",
         "properties": {
            "visibility": {
               "$ref": "#/$defs/Visibility",
               "default": "public",
               "description": "The level of visibility of the reference"
            },
            "id": {
               "description": "The ID of the reference",
               "format": "uuid4",
               "title": "Id",
               "type": "string"
            },
            "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/Enhancement"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "A list of enhancements for the reference",
               "title": "Enhancements"
            }
         },
         "required": [
            "id"
         ],
         "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"
                           }
                        ]
                     },
                     {
                        "format": "uuid4",
                        "type": "string"
                     }
                  ]
               },
               "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"
      },
      "SearchResultPage": {
         "description": "Information about the page of search results.",
         "properties": {
            "count": {
               "description": "The number of results on this page.",
               "title": "Count",
               "type": "integer"
            },
            "number": {
               "description": "The page number of results returned, indexed from 1.",
               "title": "Number",
               "type": "integer"
            }
         },
         "required": [
            "count",
            "number"
         ],
         "title": "SearchResultPage",
         "type": "object"
      },
      "SearchResultTotal": {
         "description": "Information about the total number of search results.",
         "properties": {
            "count": {
               "description": "The total number of results matching the search criteria.",
               "title": "Count",
               "type": "integer"
            },
            "is_lower_bound": {
               "description": "Whether the count is a lower bound (true) or exact (false).",
               "title": "Is Lower Bound",
               "type": "boolean"
            }
         },
         "required": [
            "count",
            "is_lower_bound"
         ],
         "title": "SearchResultTotal",
         "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"
      }
   },
   "required": [
      "total",
      "page",
      "references"
   ]
}

Fields:
field page: SearchResultPage [Required][source]#

Information about the page of results.

field references: list[Reference] [Required][source]#

The references returned by the search.

field total: SearchResultTotal [Required][source]#

The total number of results matching the search criteria.

Search#

Models for search queries and results.

pydantic model libs.sdk.src.destiny_sdk.search.AnnotationFilter[source]#

An annotation filter for search queries.

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];
   "libs.sdk.src.destiny_sdk.search.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="libs.sdk.src.destiny_sdk.search.AnnotationFilter&#xA;&#xA;An annotation filter for search queries.&#xA;"];
}

Show JSON schema
{
   "title": "AnnotationFilter",
   "description": "An annotation filter for search queries.",
   "type": "object",
   "properties": {
      "scheme": {
         "description": "The annotation scheme to filter by.",
         "pattern": "^[^/]+$",
         "title": "Scheme",
         "type": "string"
      },
      "label": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The annotation label to filter by.",
         "title": "Label"
      },
      "score": {
         "anyOf": [
            {
               "maximum": 1.0,
               "minimum": 0.0,
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The minimum score for the annotation filter.",
         "title": "Score"
      }
   },
   "required": [
      "scheme"
   ]
}

Fields:
field label: str | None = None[source]#

The annotation label to filter by.

field scheme: str [Required][source]#

The annotation scheme to filter by.

Constraints:
  • pattern = ^[^/]+$

field score: float | None = None[source]#

The minimum score for the annotation filter.

Constraints:
  • ge = 0.0

  • le = 1.0

pydantic model libs.sdk.src.destiny_sdk.search.SearchResultPage[source]#

Information about the page of 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];
   "libs.sdk.src.destiny_sdk.search.SearchResultPage"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>SearchResultPage</b></td></tr><tr><td>count</td><td port="count">int</td></tr><tr><td>number</td><td port="number">int</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.search.SearchResultPage&#xA;&#xA;Information about the page of search results.&#xA;"];
}

Show JSON schema
{
   "title": "SearchResultPage",
   "description": "Information about the page of search results.",
   "type": "object",
   "properties": {
      "count": {
         "description": "The number of results on this page.",
         "title": "Count",
         "type": "integer"
      },
      "number": {
         "description": "The page number of results returned, indexed from 1.",
         "title": "Number",
         "type": "integer"
      }
   },
   "required": [
      "count",
      "number"
   ]
}

Fields:
field count: int [Required][source]#

The number of results on this page.

field number: int [Required][source]#

The page number of results returned, indexed from 1.

pydantic model libs.sdk.src.destiny_sdk.search.SearchResultTotal[source]#

Information about the total number of 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];
   "libs.sdk.src.destiny_sdk.search.SearchResultTotal"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>SearchResultTotal</b></td></tr><tr><td>count</td><td port="count">int</td></tr><tr><td>is_lower_bound</td><td port="is_lower_bound">bool</td></tr></table>>,
      tooltip="libs.sdk.src.destiny_sdk.search.SearchResultTotal&#xA;&#xA;Information about the total number of search results.&#xA;"];
}

Show JSON schema
{
   "title": "SearchResultTotal",
   "description": "Information about the total number of search results.",
   "type": "object",
   "properties": {
      "count": {
         "description": "The total number of results matching the search criteria.",
         "title": "Count",
         "type": "integer"
      },
      "is_lower_bound": {
         "description": "Whether the count is a lower bound (true) or exact (false).",
         "title": "Is Lower Bound",
         "type": "boolean"
      }
   },
   "required": [
      "count",
      "is_lower_bound"
   ]
}

Fields:
field count: int [Required][source]#

The total number of results matching the search criteria.

field is_lower_bound: bool [Required][source]#

Whether the count is a lower bound (true) or exact (false).