summaryrefslogtreecommitdiff
path: root/scraper/client/types.js
blob: 049b2761f27f0bb42d4d72c65dcf73bb16fbc53e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export const asType = (type, name) => [type, name].join('_').toUpperCase()
export const tagAsType = (type, names) => (
  names.reduce((tags, name) => {
    tags[name] = asType(type, name)
    return tags
  }, {})
)

export const api = tagAsType('api', [
  'loading', 'loaded', 'error', 'set_paper_key',
])

export const system = tagAsType('system', [
  'set_sorted_citations',
])

export const init = '@@INIT'

export const USES_DATASET = {
  YES: "1",
  NO: "-1",
  UNKNOWN: "0",
  NO_DATA: "-2",
}

export const ADDRESS_TYPE_ENUM = {
  'edu': 1,
  'company': 3,
  'mil': 10,
}