turbot-runner 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/turbot_runner.rb +0 -2
- data/lib/turbot_runner/processor.rb +7 -70
- data/lib/turbot_runner/version.rb +1 -1
- data/schema/schemas/company-schema.json +69 -22
- data/schema/schemas/financial-payment-schema.json +12 -5
- data/schema/schemas/includes/address.json +36 -13
- data/schema/schemas/includes/alternative_name.json +32 -9
- data/schema/schemas/includes/company-for-nesting.json +70 -23
- data/schema/schemas/includes/company.json +15 -6
- data/schema/schemas/includes/filing.json +48 -16
- data/schema/schemas/includes/financial-payment-data-object.json +73 -21
- data/schema/schemas/includes/identifier.json +14 -8
- data/schema/schemas/includes/industry_code.json +25 -12
- data/schema/schemas/includes/licence-data-object.json +40 -13
- data/schema/schemas/includes/officer.json +66 -46
- data/schema/schemas/includes/organisation.json +6 -5
- data/schema/schemas/includes/permission.json +36 -17
- data/schema/schemas/includes/person.json +14 -13
- data/schema/schemas/includes/person_name.json +36 -12
- data/schema/schemas/includes/previous_name.json +19 -9
- data/schema/schemas/includes/share-parcel-data.json +55 -40
- data/schema/schemas/includes/share-parcel.json +71 -56
- data/schema/schemas/includes/subsidiary-relationship-data.json +19 -8
- data/schema/schemas/includes/total-shares.json +13 -6
- data/schema/schemas/includes/unknown_entity_type.json +6 -5
- data/schema/schemas/licence-schema.json +157 -17
- data/schema/schemas/primary-data-schema.json +18 -16
- data/schema/schemas/share-parcel-schema.json +8 -7
- data/schema/schemas/simple-financial-payment-schema.json +47 -11
- data/schema/schemas/simple-licence-schema.json +21 -6
- data/schema/schemas/simple-subsidiary-schema.json +15 -4
- data/schema/schemas/subsidiary-relationship-schema.json +26 -7
- data/spec/lib/processor_spec.rb +3 -75
- metadata +5 -10
- data/lib/turbot_runner/validator.rb +0 -77
- data/lib/turbot_runner/validators.rb +0 -12
- data/schema/schemas/rich-licence-schema.json +0 -103
- data/spec/lib/validator_spec.rb +0 -235
- data/spec/lib/validators_spec.rb +0 -48
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"type": "object",
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
4
3
|
"description": "A company in OpenCorporates",
|
4
|
+
"type": "object",
|
5
5
|
"properties": {
|
6
6
|
"company_number": {
|
7
7
|
"type": "string",
|
@@ -20,13 +20,16 @@
|
|
20
20
|
"maxLength": 5
|
21
21
|
},
|
22
22
|
"incorporation_date": {
|
23
|
-
"type": "
|
23
|
+
"type": "string",
|
24
|
+
"format": "date"
|
24
25
|
},
|
25
26
|
"dissolution_date": {
|
26
|
-
"type": "
|
27
|
+
"type": "string",
|
28
|
+
"format": "date"
|
27
29
|
},
|
28
30
|
"retrieved_at": {
|
29
|
-
"type": "
|
31
|
+
"type": "string",
|
32
|
+
"format": "date-time"
|
30
33
|
},
|
31
34
|
"current_status": {
|
32
35
|
"type": "string"
|
@@ -98,43 +101,71 @@
|
|
98
101
|
}
|
99
102
|
},
|
100
103
|
"branch": {
|
101
|
-
"type": [
|
104
|
+
"type": [
|
105
|
+
"string",
|
106
|
+
"null"
|
107
|
+
],
|
102
108
|
"description": "A flag to denote whether a company is a branch entity. This should only be set if the company is a type of branch (otherwise should be null). In general the only option here is 'F' for a 'Foreign' branch, i.e. an out-of-jurisdiction entity that has registered as having a presence in the jurisdiction. In the US this is sometimes called a Foreign Corporation",
|
103
|
-
"enum": [
|
109
|
+
"enum": [
|
110
|
+
"F",
|
111
|
+
"L",
|
112
|
+
null
|
113
|
+
]
|
104
114
|
},
|
105
115
|
"all_attributes": {
|
106
116
|
"type": "object",
|
107
117
|
"description": "Other arbitrary attributes for a given company",
|
108
118
|
"properties": {
|
109
119
|
"jurisdiction_of_origin": {
|
110
|
-
"type": [
|
120
|
+
"type": [
|
121
|
+
"string",
|
122
|
+
"null"
|
123
|
+
],
|
111
124
|
"description": "The jurisdiction of the 'home' company if this is a branch",
|
112
125
|
"minLength": 1
|
113
126
|
},
|
114
127
|
"home_company_number": {
|
115
|
-
"type": [
|
128
|
+
"type": [
|
129
|
+
"string",
|
130
|
+
"null"
|
131
|
+
],
|
116
132
|
"description": "If the entity is a 'branch', this is the company_number of the 'home' company in the home company's jurisdiction",
|
117
133
|
"minLength": 1
|
118
134
|
},
|
119
135
|
"home_legal_name": {
|
120
|
-
"type": [
|
136
|
+
"type": [
|
137
|
+
"string",
|
138
|
+
"null"
|
139
|
+
],
|
121
140
|
"description": "The legal name of the 'home' company in its jurisdiction if this is a branch, and the name is different from the legal name of the branch",
|
122
141
|
"minLength": 1
|
123
142
|
},
|
124
143
|
"registered_agent_address": {
|
125
|
-
"type": [
|
144
|
+
"type": [
|
145
|
+
"string",
|
146
|
+
"null"
|
147
|
+
],
|
126
148
|
"description": "The address of the 'Agent', a public address to which legal papers can be served",
|
127
149
|
"minLength": 1
|
128
150
|
},
|
129
151
|
"registered_agent_name": {
|
130
|
-
"type": [
|
131
|
-
|
152
|
+
"type": [
|
153
|
+
"string",
|
154
|
+
"null"
|
155
|
+
],
|
156
|
+
"description": "The 'Agent' of the company – a person or entity that is empowered to accept service for the company",
|
132
157
|
"minLength": 1
|
133
158
|
},
|
134
159
|
"number_of_employees": {
|
135
160
|
"anyOf": [
|
136
|
-
{
|
137
|
-
|
161
|
+
{
|
162
|
+
"type": "string",
|
163
|
+
"minLength": 1
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"type": "number",
|
167
|
+
"minimum": 0
|
168
|
+
}
|
138
169
|
],
|
139
170
|
"description": "The number of employees"
|
140
171
|
},
|
@@ -143,7 +174,9 @@
|
|
143
174
|
"description": "Information on the merger of this company into a 'survivor' company",
|
144
175
|
"properties": {
|
145
176
|
"surviving_company": {
|
146
|
-
"type": [
|
177
|
+
"type": [
|
178
|
+
"object"
|
179
|
+
],
|
147
180
|
"description": "the surviving_company that this has been merged into",
|
148
181
|
"properties": {
|
149
182
|
"name": {
|
@@ -162,21 +195,35 @@
|
|
162
195
|
"minLength": 2
|
163
196
|
}
|
164
197
|
},
|
165
|
-
"anyOf": [
|
166
|
-
|
198
|
+
"anyOf": [
|
199
|
+
{
|
200
|
+
"required": [
|
201
|
+
"name"
|
202
|
+
]
|
203
|
+
},
|
204
|
+
{
|
205
|
+
"required": [
|
206
|
+
"company_number"
|
207
|
+
]
|
208
|
+
}
|
209
|
+
]
|
167
210
|
},
|
168
211
|
"effective_date": {
|
212
|
+
"description": "The date of the merger",
|
169
213
|
"type": "string",
|
170
|
-
"format": "date"
|
171
|
-
"description": "The date of the merger"
|
214
|
+
"format": "date"
|
172
215
|
}
|
173
216
|
},
|
174
217
|
"additionalProperties": false,
|
175
|
-
"required": [
|
218
|
+
"required": [
|
219
|
+
"surviving_company"
|
220
|
+
]
|
176
221
|
}
|
177
222
|
}
|
178
223
|
}
|
179
224
|
},
|
180
225
|
"additionalProperties": false,
|
181
|
-
"required": [
|
182
|
-
|
226
|
+
"required": [
|
227
|
+
"name"
|
228
|
+
]
|
229
|
+
}
|
@@ -1,16 +1,25 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
3
|
"description": "A company which is the subject of a statement",
|
4
4
|
"type": "object",
|
5
5
|
"properties": {
|
6
|
-
"name": {
|
7
|
-
|
8
|
-
|
6
|
+
"name": {
|
7
|
+
"type": "string"
|
8
|
+
},
|
9
|
+
"jurisdiction": {
|
10
|
+
"type": "string"
|
11
|
+
},
|
12
|
+
"company_number": {
|
13
|
+
"type": "string"
|
14
|
+
},
|
9
15
|
"identifier": {
|
10
16
|
"type": "string",
|
11
17
|
"description": "An official identifier paired with a code for the issuer of the identifier, e.g sec/12345",
|
12
18
|
"pattern": "^[^/]+/[^/]+$"
|
13
19
|
}
|
14
20
|
},
|
15
|
-
"required": [
|
16
|
-
|
21
|
+
"required": [
|
22
|
+
"name",
|
23
|
+
"jurisdiction"
|
24
|
+
]
|
25
|
+
}
|
@@ -1,20 +1,52 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
3
|
"description": "A statutory filing",
|
4
4
|
"type": "object",
|
5
|
-
"properties": {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
"properties": {
|
6
|
+
"title": {
|
7
|
+
"type": "string"
|
8
|
+
},
|
9
|
+
"date": {
|
10
|
+
"type": "string",
|
11
|
+
"format": "date"
|
12
|
+
},
|
13
|
+
"description": {
|
14
|
+
"type": "string"
|
15
|
+
},
|
16
|
+
"uid": {
|
17
|
+
"type": "string"
|
18
|
+
},
|
19
|
+
"url": {
|
20
|
+
"type": "string"
|
21
|
+
},
|
22
|
+
"filing_type_code": {
|
23
|
+
"type": "string"
|
24
|
+
},
|
25
|
+
"filing_type_name": {
|
26
|
+
"type": "string"
|
27
|
+
},
|
28
|
+
"other_attributes": {
|
29
|
+
"type": "object"
|
30
|
+
}
|
13
31
|
},
|
14
|
-
"required": [
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
32
|
+
"required": [
|
33
|
+
"date"
|
34
|
+
],
|
35
|
+
"anyOf": [
|
36
|
+
{
|
37
|
+
"required": [
|
38
|
+
"title"
|
39
|
+
]
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"required": [
|
43
|
+
"description"
|
44
|
+
]
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"required": [
|
48
|
+
"filing_type_name"
|
49
|
+
]
|
50
|
+
}
|
51
|
+
]
|
52
|
+
}
|
@@ -1,60 +1,112 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
3
|
"type": "object",
|
4
4
|
"properties": {
|
5
|
-
"data_type": {
|
5
|
+
"data_type": {
|
6
|
+
"enum": [
|
7
|
+
"financial_payment"
|
8
|
+
]
|
9
|
+
},
|
6
10
|
"source_url": {
|
7
|
-
"type": "string"
|
11
|
+
"type": "string"
|
12
|
+
},
|
8
13
|
"confidence": {
|
9
|
-
"type": "string"
|
14
|
+
"type": "string"
|
15
|
+
},
|
10
16
|
"properties": {
|
11
17
|
"type": "object",
|
12
18
|
"properties": {
|
13
19
|
"value": {
|
14
20
|
"description": "The amount transacted (e.g. 19.95)",
|
15
|
-
"type": "string"
|
21
|
+
"type": "string"
|
22
|
+
},
|
16
23
|
"payee_name": {
|
17
24
|
"description": "The name of the payee (the entity that received the money)",
|
18
|
-
"type": "string"
|
25
|
+
"type": "string"
|
26
|
+
},
|
19
27
|
"currency": {
|
20
28
|
"description": "The currency of the payment (three letter symbol, e.g. USD, GBP, EUR)",
|
21
|
-
"type": "string"
|
29
|
+
"type": "string"
|
30
|
+
},
|
22
31
|
"date": {
|
23
32
|
"description": "The date on which the payment was made",
|
24
|
-
"type": "date"
|
33
|
+
"type": "date"
|
34
|
+
},
|
25
35
|
"transaction_number": {
|
26
36
|
"description": "The unique identifier for the transaction, scoped to this bot",
|
27
|
-
"type": "string"
|
37
|
+
"type": "string"
|
38
|
+
},
|
28
39
|
"jurisdiction": {
|
29
40
|
"description": "The jurisdiction of the body that made the payment, eg. UK, France, Delaware, Manchester",
|
30
|
-
"type": "string"
|
41
|
+
"type": "string"
|
42
|
+
},
|
31
43
|
"more_details_url": {
|
32
44
|
"description": "A url from which more details can be seen (may be the same as the source_url)",
|
33
|
-
"type": [
|
45
|
+
"type": [
|
46
|
+
"string",
|
47
|
+
null
|
48
|
+
]
|
49
|
+
},
|
34
50
|
"description": {
|
35
51
|
"description": "The description of the transaction as given in the raw data",
|
36
|
-
"type": [
|
52
|
+
"type": [
|
53
|
+
"string",
|
54
|
+
null
|
55
|
+
]
|
56
|
+
},
|
37
57
|
"expense_type": {
|
38
58
|
"description": "The type of expense -- can be either capital, revenue (i.e. current expenditure) or null",
|
39
|
-
"enum": [
|
59
|
+
"enum": [
|
60
|
+
"capital",
|
61
|
+
"revenue",
|
62
|
+
null
|
63
|
+
]
|
64
|
+
},
|
40
65
|
"expense_area": {
|
41
66
|
"description": "category (in words) of the expenditure",
|
42
|
-
"type": [
|
67
|
+
"type": [
|
68
|
+
"string",
|
69
|
+
null
|
70
|
+
]
|
71
|
+
},
|
43
72
|
"entity_name": {
|
44
73
|
"description": "The name of the government entity that made the payment, e.g. Environment Agency",
|
45
|
-
"type": "string"
|
74
|
+
"type": "string"
|
75
|
+
},
|
46
76
|
"entity_uri": {
|
47
77
|
"description": "A unique URL (ideally a dereferencable URI) for the government entity",
|
48
|
-
"type": [
|
78
|
+
"type": [
|
79
|
+
"string",
|
80
|
+
null
|
81
|
+
]
|
82
|
+
},
|
49
83
|
"department_name": {
|
50
84
|
"description": "The name of the government department which the entity belongs to (if relevant), e.g. Department of Health",
|
51
|
-
"type": [
|
85
|
+
"type": [
|
86
|
+
"string",
|
87
|
+
null
|
88
|
+
]
|
89
|
+
},
|
52
90
|
"csv_line_number": {
|
53
91
|
"description": "If the source for the data is a CSV file, you can optionally include the line number of the CSV from which this data was retrieved",
|
54
|
-
"type": [
|
92
|
+
"type": [
|
93
|
+
"string",
|
94
|
+
null
|
95
|
+
]
|
96
|
+
}
|
55
97
|
},
|
56
|
-
"required": [
|
98
|
+
"required": [
|
99
|
+
"value",
|
100
|
+
"payee_name",
|
101
|
+
"date",
|
102
|
+
"currency"
|
103
|
+
]
|
57
104
|
}
|
58
105
|
},
|
59
|
-
"required": [
|
60
|
-
|
106
|
+
"required": [
|
107
|
+
"data_type",
|
108
|
+
"properties",
|
109
|
+
"source_url",
|
110
|
+
"confidence"
|
111
|
+
]
|
112
|
+
}
|
@@ -1,12 +1,18 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
3
|
"description": "An identifier for an entity (possibly other things, e.g. securities in the future). Examples are tax IDs, non-profit IDs, SEC CIK numbers, Federal Reserve RSSD id. The main requirements for an identifier is that they should be well-defined, and issued by a government or have statutory standing",
|
4
4
|
"type": "object",
|
5
|
-
"properties": {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
"properties": {
|
6
|
+
"uid": {
|
7
|
+
"type": "string"
|
8
|
+
},
|
9
|
+
"identifier_system_code": {
|
10
|
+
"type": "string",
|
11
|
+
"description": "An identifier representing the identifier scheme. Some examples of this are us_fein (US Federal tax number), us_sec_cik (US Securities and Exchange Commission CIK), gb_ccew (Charity Commission of England & Wales), lei (Global Legal Entity Identifier Schems)"
|
12
|
+
}
|
10
13
|
},
|
11
|
-
"required": [
|
12
|
-
|
14
|
+
"required": [
|
15
|
+
"code",
|
16
|
+
"code_scheme_id"
|
17
|
+
]
|
18
|
+
}
|
@@ -1,16 +1,29 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
3
|
"description": "An industry code from a standard code list (e.g. NAICS 2007 or NACE 2)",
|
4
4
|
"type": "object",
|
5
|
-
"properties": {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"type": "string"
|
8
|
+
},
|
9
|
+
"code": {
|
10
|
+
"type": "string"
|
11
|
+
},
|
12
|
+
"code_scheme_id": {
|
13
|
+
"type": "string",
|
14
|
+
"description": "An identifier representing industry code scheme. At the moment these are eu_nace_2, uk_sic_2003, uk_sic_2007, us_naics_2002, us_naics_2007, be_nace_2008, dk_db_2007, nz_bic_2006, no_sic_2007, anz_sic_2006, nz_bic_2006, in_nic_2004_mca, ca_qc_cae, lu_nace_2. For other code schemes, or details of these, contact info@opencorporates.com"
|
15
|
+
},
|
16
|
+
"start_date": {
|
17
|
+
"type": "string",
|
18
|
+
"format": "date"
|
19
|
+
},
|
20
|
+
"end_date": {
|
21
|
+
"type": "string",
|
22
|
+
"format": "date"
|
23
|
+
}
|
13
24
|
},
|
14
|
-
"required": [
|
15
|
-
|
16
|
-
|
25
|
+
"required": [
|
26
|
+
"code",
|
27
|
+
"code_scheme_id"
|
28
|
+
]
|
29
|
+
}
|