@allus-fyi/company-data 0.0.3 → 0.0.4
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/cjs/index.js +3 -3
- package/dist/esm/index.js +3 -3
- package/dist/types/index.d.ts +3 -3
- package/docs/config.md +2 -2
- package/docs/errors.md +3 -3
- package/docs/model.md +1 -1
- package/docs/webhooks.md +3 -3
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* buffer + pump), the `Client` facade, and the webhook receiver helpers. `Client`
|
|
13
13
|
* is the one object an integrating company touches.
|
|
14
14
|
*
|
|
15
|
-
* Both ESM (`import { Client } from '@allus/company-data'`) and CommonJS
|
|
16
|
-
* (`const { Client } = require('@allus/company-data')`) are supported via the
|
|
15
|
+
* Both ESM (`import { Client } from '@allus-fyi/company-data'`) and CommonJS
|
|
16
|
+
* (`const { Client } = require('@allus-fyi/company-data')`) are supported via the
|
|
17
17
|
* package's `exports` map.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -71,4 +71,4 @@ Object.defineProperty(exports, "loadAccountKey", { enumerable: true, get: functi
|
|
|
71
71
|
var xml_js_1 = require("./xml.js");
|
|
72
72
|
Object.defineProperty(exports, "parseXml", { enumerable: true, get: function () { return xml_js_1.parseXml; } });
|
|
73
73
|
Object.defineProperty(exports, "XmlParseError", { enumerable: true, get: function () { return xml_js_1.XmlParseError; } });
|
|
74
|
-
exports.VERSION = '0.
|
|
74
|
+
exports.VERSION = '0.0.4'; // keep in sync with package.json
|
package/dist/esm/index.js
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* buffer + pump), the `Client` facade, and the webhook receiver helpers. `Client`
|
|
12
12
|
* is the one object an integrating company touches.
|
|
13
13
|
*
|
|
14
|
-
* Both ESM (`import { Client } from '@allus/company-data'`) and CommonJS
|
|
15
|
-
* (`const { Client } = require('@allus/company-data')`) are supported via the
|
|
14
|
+
* Both ESM (`import { Client } from '@allus-fyi/company-data'`) and CommonJS
|
|
15
|
+
* (`const { Client } = require('@allus-fyi/company-data')`) are supported via the
|
|
16
16
|
* package's `exports` map.
|
|
17
17
|
*/
|
|
18
18
|
// client facade — the main entry point
|
|
@@ -34,4 +34,4 @@ export { Pump, MAX_BATCH } from './pump.js';
|
|
|
34
34
|
export { verifyWebhook, parseWebhook, handleWebhook, loadAccountKey } from './webhooks.js';
|
|
35
35
|
// XML (XXE-safe parser — exported for advanced use / testing)
|
|
36
36
|
export { parseXml, XmlParseError } from './xml.js';
|
|
37
|
-
export const VERSION = '0.
|
|
37
|
+
export const VERSION = '0.0.4'; // keep in sync with package.json
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* buffer + pump), the `Client` facade, and the webhook receiver helpers. `Client`
|
|
12
12
|
* is the one object an integrating company touches.
|
|
13
13
|
*
|
|
14
|
-
* Both ESM (`import { Client } from '@allus/company-data'`) and CommonJS
|
|
15
|
-
* (`const { Client } = require('@allus/company-data')`) are supported via the
|
|
14
|
+
* Both ESM (`import { Client } from '@allus-fyi/company-data'`) and CommonJS
|
|
15
|
+
* (`const { Client } = require('@allus-fyi/company-data')`) are supported via the
|
|
16
16
|
* package's `exports` map.
|
|
17
17
|
*/
|
|
18
18
|
export { Client } from './client.js';
|
|
@@ -33,4 +33,4 @@ export type { FetchChanges, DecryptChange, Handler, Logger, OnError, ProcessOpti
|
|
|
33
33
|
export { verifyWebhook, parseWebhook, handleWebhook, loadAccountKey } from './webhooks.js';
|
|
34
34
|
export type { Headers } from './webhooks.js';
|
|
35
35
|
export { parseXml, XmlParseError } from './xml.js';
|
|
36
|
-
export declare const VERSION = "0.
|
|
36
|
+
export declare const VERSION = "0.0.4";
|
package/docs/config.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Config reference
|
|
2
2
|
|
|
3
|
-
`Config` (`import { Config } from '@allus/company-data'`).
|
|
3
|
+
`Config` (`import { Config } from '@allus-fyi/company-data'`).
|
|
4
4
|
|
|
5
5
|
A single JSON file holds the whole SDK configuration. **Config-only key handling is
|
|
6
6
|
a hard rule:** no SDK method ever takes a key, passphrase, or secret as an argument
|
|
@@ -40,7 +40,7 @@ Config.fromEnv(): Config // build entirely from ALLUS_* env va
|
|
|
40
40
|
In practice you build the client directly:
|
|
41
41
|
|
|
42
42
|
```ts
|
|
43
|
-
import { Client } from '@allus/company-data';
|
|
43
|
+
import { Client } from '@allus-fyi/company-data';
|
|
44
44
|
const client = Client.fromConfig('allus.json'); // == new Client(Config.fromFile('allus.json'))
|
|
45
45
|
const client2 = Client.fromEnv(); // == new Client(Config.fromEnv())
|
|
46
46
|
```
|
package/docs/errors.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Error model
|
|
2
2
|
|
|
3
3
|
Same taxonomy + names across all six SDKs. All importable from
|
|
4
|
-
`@allus/company-data`. Every error extends a common `AllusError` base.
|
|
4
|
+
`@allus-fyi/company-data`. Every error extends a common `AllusError` base.
|
|
5
5
|
|
|
6
6
|
```ts
|
|
7
7
|
import {
|
|
8
8
|
AllusError, ConfigError, AuthError, ApiError, DecryptError, WebhookError, RateLimitError,
|
|
9
|
-
} from '@allus/company-data';
|
|
9
|
+
} from '@allus-fyi/company-data';
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
| Error | Thrown when |
|
|
@@ -71,7 +71,7 @@ If you catch it, wait `err.retryAfter` (or a default) before retrying.
|
|
|
71
71
|
import {
|
|
72
72
|
Client, ConfigError, AuthError, ApiError,
|
|
73
73
|
DecryptError, WebhookError, RateLimitError,
|
|
74
|
-
} from '@allus/company-data';
|
|
74
|
+
} from '@allus-fyi/company-data';
|
|
75
75
|
|
|
76
76
|
try {
|
|
77
77
|
const client = Client.fromConfig('allus.json');
|
package/docs/model.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Output model reference
|
|
2
2
|
|
|
3
3
|
The conclusions — the only objects you work with. Importable from
|
|
4
|
-
`@allus/company-data`. Each carries `.raw` (the underlying hardened API object;
|
|
4
|
+
`@allus-fyi/company-data`. Each carries `.raw` (the underlying hardened API object;
|
|
5
5
|
never contains the person's source field).
|
|
6
6
|
|
|
7
7
|
## `RequestField`
|
package/docs/webhooks.md
CHANGED
|
@@ -38,7 +38,7 @@ decrypt/type closures explicitly — used by `Client` internally; you'll normall
|
|
|
38
38
|
the client methods inside an app.
|
|
39
39
|
|
|
40
40
|
```ts
|
|
41
|
-
import { verifyWebhook, parseWebhook, handleWebhook } from '@allus/company-data';
|
|
41
|
+
import { verifyWebhook, parseWebhook, handleWebhook } from '@allus-fyi/company-data';
|
|
42
42
|
|
|
43
43
|
verifyWebhook(rawBody, headers, config): boolean
|
|
44
44
|
parseWebhook(rawBody, headers, config, { typeForSlug, decryptValue, binaryFetch?, accountKey? }): Change
|
|
@@ -51,7 +51,7 @@ handleWebhook(rawBody, headers, config, { typeForSlug, decryptValue, binaryFetch
|
|
|
51
51
|
|
|
52
52
|
```ts
|
|
53
53
|
import express from 'express';
|
|
54
|
-
import { Client, WebhookError } from '@allus/company-data';
|
|
54
|
+
import { Client, WebhookError } from '@allus-fyi/company-data';
|
|
55
55
|
|
|
56
56
|
const app = express();
|
|
57
57
|
const client = Client.fromConfig('allus.json');
|
|
@@ -78,7 +78,7 @@ app.post('/allus/webhook', express.raw({ type: '*/*' }), (req, res) => {
|
|
|
78
78
|
|
|
79
79
|
```ts
|
|
80
80
|
import Fastify from 'fastify';
|
|
81
|
-
import { Client, WebhookError } from '@allus/company-data';
|
|
81
|
+
import { Client, WebhookError } from '@allus-fyi/company-data';
|
|
82
82
|
|
|
83
83
|
const app = Fastify();
|
|
84
84
|
const client = Client.fromConfig('allus.json');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allus-fyi/company-data",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "TypeScript/Node SDK for the allus company-data API: typed, plaintext, slug-keyed conclusions with transparent decryption.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "allme.fyi",
|