claimProvenance#

Interfaces#

ClaimBelief#

Defined in: claimProvenance.ts:18

One actor’s belief in a MatchClaim, since date (YYYY-MM-DD).

Properties#

actor#

readonly actor: string

Defined in: claimProvenance.ts:19

belief#

readonly belief: "true" | "false" | "unlikely"

Defined in: claimProvenance.ts:20

date#

readonly date: string

Defined in: claimProvenance.ts:21

note?#

readonly optional note?: string

Defined in: claimProvenance.ts:22


ClaimProvenance#

Defined in: claimProvenance.ts:42

A MatchClaim’s ID and its provenance; null for one stated without.

Properties#

id#

readonly id: string

Defined in: claimProvenance.ts:43

provenance#

readonly provenance: ClaimProvenanceEntry | null

Defined in: claimProvenance.ts:44


ClaimProvenanceEntry#

Defined in: claimProvenance.ts:30

A MatchClaim’s provenance entry, TimeToShare’s: how it was made (who stated it, when, how, by which service, on what basis, how closely it matches, a note) and who believes it. Absent members are left out.

Properties#

basis?#

readonly optional basis?: readonly string[]

Defined in: claimProvenance.ts:35

beliefs?#

readonly optional beliefs?: readonly ClaimBelief[]

Defined in: claimProvenance.ts:38

date?#

readonly optional date?: string

Defined in: claimProvenance.ts:32

match?#

readonly optional match?: string

Defined in: claimProvenance.ts:36

method?#

readonly optional method?: string

Defined in: claimProvenance.ts:33

note?#

readonly optional note?: string

Defined in: claimProvenance.ts:37

service?#

readonly optional service?: string

Defined in: claimProvenance.ts:34

stated_by?#

readonly optional stated_by?: readonly string[]

Defined in: claimProvenance.ts:31


StatedBelief#

Defined in: claimProvenance.ts:48

An actor’s belief in the MatchClaim claim, stated on date (YYYY-MM-DD).

Properties#

actor#

readonly actor: string

Defined in: claimProvenance.ts:50

belief#

readonly belief: "true" | "false" | "unlikely"

Defined in: claimProvenance.ts:51

claim#

readonly claim: string

Defined in: claimProvenance.ts:49

date#

readonly date: string

Defined in: claimProvenance.ts:52

Type Aliases#

BeliefWord#

BeliefWord = typeof BELIEFS[number]

Defined in: claimProvenance.ts:15

A belief word: "true", "false" or "unlikely".

Variables#

MALFORMED_BELIEF_ANSWER#

const MALFORMED_BELIEF_ANSWER: "the belief answer is not a Parquet file" = "the belief answer is not a Parquet file"

Defined in: claimProvenance.ts:60

The message of a belief answer that is no Parquet file.


MALFORMED_PROVENANCE#

const MALFORMED_PROVENANCE: "the provenance answer is not the provenance of the MatchClaims asked for" = "the provenance answer is not the provenance of the MatchClaims asked for"

Defined in: claimProvenance.ts:56

The message of a provenance answer that is not of the route’s form.


PARQUET_MEDIA_TYPE#

const PARQUET_MEDIA_TYPE: "application/vnd.apache.parquet" = "application/vnd.apache.parquet"

Defined in: claimProvenance.ts:63

The media type of a Parquet file, the belief route’s answer.

Functions#

isParquet()#

isParquet(bytes): boolean

Defined in: claimProvenance.ts:178

Whether bytes can be a Parquet file: PAR1 at its start and at its end.

Parameters#

bytes#

Uint8Array

Returns#

boolean


isRecord()#

isRecord(value): value is object

Defined in: claimProvenance.ts:80

Whether value is a JSON object: neither null nor a list.

Parameters#

value#

unknown

Returns#

value is object


member()#

member(value, key): unknown

Defined in: claimProvenance.ts:85

The member key of value; undefined where it has none.

Parameters#

value#

object

key#

string

Returns#

unknown


parametersRequest()#

parametersRequest(parameters, manifest, table): Blob

Defined in: claimProvenance.ts:72

A request of the routes taking parameters: the parameters’ UTF-8 length (little-endian), the parameters as JSON, then the request of POST /api/match-claims.

Parameters#

parameters#

object

manifest#

string

table#

Blob

Returns#

Blob


provenanceOf()#

provenanceOf(body, asked): readonly ClaimProvenance[] | undefined

Defined in: claimProvenance.ts:156

The provenance of the MatchClaims asked that a 2xx body of the provenance route holds, or undefined when the body is not of its form: {"claims": [{"id", "provenance"}]} with one entry per ID asked, in that order, each provenance an entry or null.

Parameters#

body#

unknown

asked#

readonly string[]

Returns#

readonly ClaimProvenance[] | undefined