@opensanctions/followthemoney 4.5.2 → 4.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/defaultModel.json +3 -48
- package/dist/followthemoney.es.js +63 -62
- package/dist/followthemoney.es.js.map +1 -1
- package/dist/followthemoney.umd.js +67 -64
- package/dist/followthemoney.umd.js.map +1 -1
- package/dist/model.d.ts +0 -6
- package/dist/model.js +2 -13
- package/dist/model.js.map +1 -1
- package/package.json +7 -5
package/dist/defaultModel.json
CHANGED
|
@@ -1084,12 +1084,7 @@
|
|
|
1084
1084
|
},
|
|
1085
1085
|
"Company": {
|
|
1086
1086
|
"caption": [
|
|
1087
|
-
"name"
|
|
1088
|
-
"alias",
|
|
1089
|
-
"abbreviation",
|
|
1090
|
-
"weakAlias",
|
|
1091
|
-
"previousName",
|
|
1092
|
-
"registrationNumber"
|
|
1087
|
+
"name"
|
|
1093
1088
|
],
|
|
1094
1089
|
"description": "A corporation, usually for profit. Does not distinguish between private and public companies, and can also be used to model more specific constructs like trusts and funds. Companies are assets, so they can be owned by other legal entities.\n",
|
|
1095
1090
|
"extends": [
|
|
@@ -1797,15 +1792,6 @@
|
|
|
1797
1792
|
"matchable": true,
|
|
1798
1793
|
"plural": "Cryptocurrency wallets",
|
|
1799
1794
|
"properties": {
|
|
1800
|
-
"accountId": {
|
|
1801
|
-
"description": "Platform-specific user/account identifier",
|
|
1802
|
-
"label": "Account ID",
|
|
1803
|
-
"matchable": true,
|
|
1804
|
-
"maxLength": 64,
|
|
1805
|
-
"name": "accountId",
|
|
1806
|
-
"qname": "CryptoWallet:accountId",
|
|
1807
|
-
"type": "identifier"
|
|
1808
|
-
},
|
|
1809
1795
|
"balance": {
|
|
1810
1796
|
"label": "Balance",
|
|
1811
1797
|
"maxLength": 250,
|
|
@@ -3169,14 +3155,6 @@
|
|
|
3169
3155
|
"label": "Image",
|
|
3170
3156
|
"plural": "Images",
|
|
3171
3157
|
"properties": {
|
|
3172
|
-
"credit": {
|
|
3173
|
-
"description": "The credit or attribution for the image.",
|
|
3174
|
-
"label": "Credit",
|
|
3175
|
-
"maxLength": 1024,
|
|
3176
|
-
"name": "credit",
|
|
3177
|
-
"qname": "Image:credit",
|
|
3178
|
-
"type": "string"
|
|
3179
|
-
},
|
|
3180
3158
|
"pictured": {
|
|
3181
3159
|
"label": "Pictured",
|
|
3182
3160
|
"matchable": true,
|
|
@@ -3380,10 +3358,6 @@
|
|
|
3380
3358
|
"LegalEntity": {
|
|
3381
3359
|
"caption": [
|
|
3382
3360
|
"name",
|
|
3383
|
-
"alias",
|
|
3384
|
-
"abbreviation",
|
|
3385
|
-
"weakAlias",
|
|
3386
|
-
"previousName",
|
|
3387
3361
|
"email",
|
|
3388
3362
|
"phone",
|
|
3389
3363
|
"registrationNumber"
|
|
@@ -3402,14 +3376,6 @@
|
|
|
3402
3376
|
"matchable": true,
|
|
3403
3377
|
"plural": "Legal entities",
|
|
3404
3378
|
"properties": {
|
|
3405
|
-
"abbreviation": {
|
|
3406
|
-
"description": "Abbreviated name or acronym",
|
|
3407
|
-
"label": "Abbreviation",
|
|
3408
|
-
"maxLength": 384,
|
|
3409
|
-
"name": "abbreviation",
|
|
3410
|
-
"qname": "LegalEntity:abbreviation",
|
|
3411
|
-
"type": "name"
|
|
3412
|
-
},
|
|
3413
3379
|
"agencyClient": {
|
|
3414
3380
|
"label": "Clients",
|
|
3415
3381
|
"matchable": true,
|
|
@@ -4585,12 +4551,7 @@
|
|
|
4585
4551
|
},
|
|
4586
4552
|
"Organization": {
|
|
4587
4553
|
"caption": [
|
|
4588
|
-
"name"
|
|
4589
|
-
"alias",
|
|
4590
|
-
"abbreviation",
|
|
4591
|
-
"weakAlias",
|
|
4592
|
-
"previousName",
|
|
4593
|
-
"registrationNumber"
|
|
4554
|
+
"name"
|
|
4594
4555
|
],
|
|
4595
4556
|
"description": "Any type of incorporated entity that cannot be owned by another (see Company). This might include charities, foundations or state-owned enterprises, depending on their jurisdiction.\n",
|
|
4596
4557
|
"extends": [
|
|
@@ -5222,9 +5183,7 @@
|
|
|
5222
5183
|
"caption": [
|
|
5223
5184
|
"name",
|
|
5224
5185
|
"alias",
|
|
5225
|
-
"previousName",
|
|
5226
5186
|
"weakAlias",
|
|
5227
|
-
"abbreviation",
|
|
5228
5187
|
"lastName",
|
|
5229
5188
|
"email",
|
|
5230
5189
|
"phone"
|
|
@@ -5835,11 +5794,7 @@
|
|
|
5835
5794
|
},
|
|
5836
5795
|
"PublicBody": {
|
|
5837
5796
|
"caption": [
|
|
5838
|
-
"name"
|
|
5839
|
-
"alias",
|
|
5840
|
-
"abbreviation",
|
|
5841
|
-
"weakAlias",
|
|
5842
|
-
"previousName"
|
|
5797
|
+
"name"
|
|
5843
5798
|
],
|
|
5844
5799
|
"description": "A public body, such as a ministry, department or state company.\n",
|
|
5845
5800
|
"extends": [
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { randomUUID } from 'crypto';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* An entity proxy which provides simplified access to the
|
|
5
3
|
* properties and schema associated with an entity.
|
|
@@ -241,6 +239,65 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
241
239
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
242
240
|
};
|
|
243
241
|
|
|
242
|
+
const byteToHex = [];
|
|
243
|
+
for (let i = 0; i < 256; ++i) {
|
|
244
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
245
|
+
}
|
|
246
|
+
function unsafeStringify(arr, offset = 0) {
|
|
247
|
+
return (byteToHex[arr[offset + 0]] +
|
|
248
|
+
byteToHex[arr[offset + 1]] +
|
|
249
|
+
byteToHex[arr[offset + 2]] +
|
|
250
|
+
byteToHex[arr[offset + 3]] +
|
|
251
|
+
'-' +
|
|
252
|
+
byteToHex[arr[offset + 4]] +
|
|
253
|
+
byteToHex[arr[offset + 5]] +
|
|
254
|
+
'-' +
|
|
255
|
+
byteToHex[arr[offset + 6]] +
|
|
256
|
+
byteToHex[arr[offset + 7]] +
|
|
257
|
+
'-' +
|
|
258
|
+
byteToHex[arr[offset + 8]] +
|
|
259
|
+
byteToHex[arr[offset + 9]] +
|
|
260
|
+
'-' +
|
|
261
|
+
byteToHex[arr[offset + 10]] +
|
|
262
|
+
byteToHex[arr[offset + 11]] +
|
|
263
|
+
byteToHex[arr[offset + 12]] +
|
|
264
|
+
byteToHex[arr[offset + 13]] +
|
|
265
|
+
byteToHex[arr[offset + 14]] +
|
|
266
|
+
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
let getRandomValues;
|
|
270
|
+
const rnds8 = new Uint8Array(16);
|
|
271
|
+
function rng() {
|
|
272
|
+
if (!getRandomValues) {
|
|
273
|
+
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
274
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
275
|
+
}
|
|
276
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
277
|
+
}
|
|
278
|
+
return getRandomValues(rnds8);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
282
|
+
var native = { randomUUID };
|
|
283
|
+
|
|
284
|
+
function _v4(options, buf, offset) {
|
|
285
|
+
options = options || {};
|
|
286
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
287
|
+
if (rnds.length < 16) {
|
|
288
|
+
throw new Error('Random bytes length must be >= 16');
|
|
289
|
+
}
|
|
290
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
291
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
292
|
+
return unsafeStringify(rnds);
|
|
293
|
+
}
|
|
294
|
+
function v4(options, buf, offset) {
|
|
295
|
+
if (native.randomUUID && true && !options) {
|
|
296
|
+
return native.randomUUID();
|
|
297
|
+
}
|
|
298
|
+
return _v4(options);
|
|
299
|
+
}
|
|
300
|
+
|
|
244
301
|
/**
|
|
245
302
|
* Definition of a property, with relevant metadata for type,
|
|
246
303
|
* labels and other useful criteria.
|
|
@@ -529,17 +586,6 @@ class Model {
|
|
|
529
586
|
return new Entity(this, raw);
|
|
530
587
|
}
|
|
531
588
|
}
|
|
532
|
-
/**
|
|
533
|
-
* Generate a new random UUID.
|
|
534
|
-
*
|
|
535
|
-
* @returns a new UUID.
|
|
536
|
-
*/
|
|
537
|
-
generateRandomId() {
|
|
538
|
-
if (typeof crypto !== 'undefined' && crypto.randomUUID) {
|
|
539
|
-
return crypto.randomUUID(); // Browser
|
|
540
|
-
}
|
|
541
|
-
return randomUUID(); // Node.js
|
|
542
|
-
}
|
|
543
589
|
/**
|
|
544
590
|
* Make a new object with the given schema, and generate a random ID for
|
|
545
591
|
* it.
|
|
@@ -548,7 +594,7 @@ class Model {
|
|
|
548
594
|
*/
|
|
549
595
|
createEntity(schema, namespace) {
|
|
550
596
|
return __awaiter(this, void 0, void 0, function* () {
|
|
551
|
-
const rawId =
|
|
597
|
+
const rawId = v4();
|
|
552
598
|
const id = namespace ? yield namespace.sign(rawId) : rawId;
|
|
553
599
|
return this.getEntity({
|
|
554
600
|
id,
|
|
@@ -2328,12 +2374,7 @@ var schemata = {
|
|
|
2328
2374
|
},
|
|
2329
2375
|
Company: {
|
|
2330
2376
|
caption: [
|
|
2331
|
-
"name"
|
|
2332
|
-
"alias",
|
|
2333
|
-
"abbreviation",
|
|
2334
|
-
"weakAlias",
|
|
2335
|
-
"previousName",
|
|
2336
|
-
"registrationNumber"
|
|
2377
|
+
"name"
|
|
2337
2378
|
],
|
|
2338
2379
|
description: "A corporation, usually for profit. Does not distinguish between private and public companies, and can also be used to model more specific constructs like trusts and funds. Companies are assets, so they can be owned by other legal entities.\n",
|
|
2339
2380
|
"extends": [
|
|
@@ -3042,15 +3083,6 @@ var schemata = {
|
|
|
3042
3083
|
matchable: true,
|
|
3043
3084
|
plural: "Cryptocurrency wallets",
|
|
3044
3085
|
properties: {
|
|
3045
|
-
accountId: {
|
|
3046
|
-
description: "Platform-specific user/account identifier",
|
|
3047
|
-
label: "Account ID",
|
|
3048
|
-
matchable: true,
|
|
3049
|
-
maxLength: 64,
|
|
3050
|
-
name: "accountId",
|
|
3051
|
-
qname: "CryptoWallet:accountId",
|
|
3052
|
-
type: "identifier"
|
|
3053
|
-
},
|
|
3054
3086
|
balance: {
|
|
3055
3087
|
label: "Balance",
|
|
3056
3088
|
maxLength: 250,
|
|
@@ -4419,14 +4451,6 @@ var schemata = {
|
|
|
4419
4451
|
label: "Image",
|
|
4420
4452
|
plural: "Images",
|
|
4421
4453
|
properties: {
|
|
4422
|
-
credit: {
|
|
4423
|
-
description: "The credit or attribution for the image.",
|
|
4424
|
-
label: "Credit",
|
|
4425
|
-
maxLength: 1024,
|
|
4426
|
-
name: "credit",
|
|
4427
|
-
qname: "Image:credit",
|
|
4428
|
-
type: "string"
|
|
4429
|
-
},
|
|
4430
4454
|
pictured: {
|
|
4431
4455
|
label: "Pictured",
|
|
4432
4456
|
matchable: true,
|
|
@@ -4632,10 +4656,6 @@ var schemata = {
|
|
|
4632
4656
|
LegalEntity: {
|
|
4633
4657
|
caption: [
|
|
4634
4658
|
"name",
|
|
4635
|
-
"alias",
|
|
4636
|
-
"abbreviation",
|
|
4637
|
-
"weakAlias",
|
|
4638
|
-
"previousName",
|
|
4639
4659
|
"email",
|
|
4640
4660
|
"phone",
|
|
4641
4661
|
"registrationNumber"
|
|
@@ -4654,14 +4674,6 @@ var schemata = {
|
|
|
4654
4674
|
matchable: true,
|
|
4655
4675
|
plural: "Legal entities",
|
|
4656
4676
|
properties: {
|
|
4657
|
-
abbreviation: {
|
|
4658
|
-
description: "Abbreviated name or acronym",
|
|
4659
|
-
label: "Abbreviation",
|
|
4660
|
-
maxLength: 384,
|
|
4661
|
-
name: "abbreviation",
|
|
4662
|
-
qname: "LegalEntity:abbreviation",
|
|
4663
|
-
type: "name"
|
|
4664
|
-
},
|
|
4665
4677
|
agencyClient: {
|
|
4666
4678
|
label: "Clients",
|
|
4667
4679
|
matchable: true,
|
|
@@ -5839,12 +5851,7 @@ var schemata = {
|
|
|
5839
5851
|
},
|
|
5840
5852
|
Organization: {
|
|
5841
5853
|
caption: [
|
|
5842
|
-
"name"
|
|
5843
|
-
"alias",
|
|
5844
|
-
"abbreviation",
|
|
5845
|
-
"weakAlias",
|
|
5846
|
-
"previousName",
|
|
5847
|
-
"registrationNumber"
|
|
5854
|
+
"name"
|
|
5848
5855
|
],
|
|
5849
5856
|
description: "Any type of incorporated entity that cannot be owned by another (see Company). This might include charities, foundations or state-owned enterprises, depending on their jurisdiction.\n",
|
|
5850
5857
|
"extends": [
|
|
@@ -6480,9 +6487,7 @@ var schemata = {
|
|
|
6480
6487
|
caption: [
|
|
6481
6488
|
"name",
|
|
6482
6489
|
"alias",
|
|
6483
|
-
"previousName",
|
|
6484
6490
|
"weakAlias",
|
|
6485
|
-
"abbreviation",
|
|
6486
6491
|
"lastName",
|
|
6487
6492
|
"email",
|
|
6488
6493
|
"phone"
|
|
@@ -7095,11 +7100,7 @@ var schemata = {
|
|
|
7095
7100
|
},
|
|
7096
7101
|
PublicBody: {
|
|
7097
7102
|
caption: [
|
|
7098
|
-
"name"
|
|
7099
|
-
"alias",
|
|
7100
|
-
"abbreviation",
|
|
7101
|
-
"weakAlias",
|
|
7102
|
-
"previousName"
|
|
7103
|
+
"name"
|
|
7103
7104
|
],
|
|
7104
7105
|
description: "A public body, such as a ministry, department or state company.\n",
|
|
7105
7106
|
"extends": [
|