@noresponse/node 7.1.1 → 7.1.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.1.3
4
+
5
+ No changes detected.
6
+
7
+ ## 7.1.2
8
+
9
+ No changes detected.
10
+
3
11
  ## 7.1.1
4
12
 
5
13
  * `sdk.accounts.recordEnforcement()`:
package/README.md CHANGED
@@ -1,10 +1,14 @@
1
- <img src="https://raw.githubusercontent.com/noresponsehq/.github/main/profile/sdk-header.png" alt="NoResponse" width="100%">
1
+ <a href="https://noresponse.org"><img src="https://raw.githubusercontent.com/noresponsehq/.github/main/profile/sdk-header.png" alt="NoResponse · Identity Intelligence" width="100%"></a>
2
2
 
3
- # @noresponse/node
3
+ # NoResponse for TypeScript and Node.js
4
4
 
5
- The NoResponse client for Node.js. It assesses an account creation, login or purchase, polls a pending assessment, pages through an account's history, records what you later learned, rotates your API key and verifies webhooks.
5
+ Assess sign-ups, logins and purchases with the NoResponse Identity Intelligence API.
6
6
 
7
- Node.js 20 or later. ESM and CommonJS. TypeScript types included. The client is generated from the NoResponse OpenAPI document; webhooks, auth adapters and the wait helper are hand-written.
7
+ Node.js 20+ · ESM and CommonJS · TypeScript types included.
8
+
9
+ [Documentation](https://docs.noresponse.org/sdks/typescript) · [API reference](https://docs.noresponse.org/api-reference) · [Releases](https://github.com/noresponsehq/node/releases)
10
+
11
+ ## Install
8
12
 
9
13
  ```sh
10
14
  npm install @noresponse/node
@@ -34,6 +38,19 @@ if (assessment.account) {
34
38
 
35
39
  Keep the API key on your server. The client throws at construction without one.
36
40
 
41
+ ## Go further
42
+
43
+ | Task | Guide |
44
+ | --- | --- |
45
+ | Configure this client and explore its methods | [TypeScript and Node.js SDK guide](https://docs.noresponse.org/sdks/typescript) |
46
+ | Act when an account's decision changes | [Late results](https://docs.noresponse.org/guides/late-results) |
47
+ | Explore request and response fields | [API reference](https://docs.noresponse.org/api-reference) |
48
+
49
+ <details>
50
+ <summary><strong>SDK reference</strong> · configuration, methods, errors and webhooks</summary>
51
+
52
+ [Configuration](#configuration) · [Assessments](#assessments) · [Keys](#keys) · [Integrations](#integrations) · [Response metadata](#response-metadata) · [Errors](#errors) · [Retries](#retries) · [Issued keys](#issued-keys) · [Key usage](#key-usage) · [Webhooks](#webhooks) · [Auth adapters](#auth-adapters) · [Logging](#logging) · [Standalone functions](#standalone-functions)
53
+
37
54
  ## Configuration
38
55
 
39
56
  ```ts
@@ -348,7 +365,7 @@ if (result.riskVersion !== undefined) await users.update(result.account!.id, { e
348
365
  | `active` | `login` | `block` | `restrict`, `revoke_sessions` |
349
366
  | `restricted` | `login` | `allow` | `unrestrict`, only with `reinstate` |
350
367
 
351
- Nothing deletes a user. Clerk bans (and unbans), Auth0 sets `blocked`, and WorkOS, which has no block, writes `noresponse_state` to the user's metadata (gate sign-in on it) and revokes every session. On an Auth0 plan without the sessions API the revoke blocks the user too and reports `restrict`. Each action, or `none` when nothing is needed, is recorded with `accounts.recordEnforcement` at the `riskVersion` read, and `result.enforcements` lists them. A refused action is recorded as `failed` and throws `ProviderActionError`: answer 5xx so the delivery is retried. A test event, an erased account and an account at or below `enforcedRiskVersion` act on nothing (`result.skipped`). To catch up after dropped deliveries, pass each account of `nr.accounts.listChanged({ unenforced: true })` to `enforceAccount`. For your own user store, `customProvider({ restrict: async (userId) => ..., revoke_sessions: async (userId) => ... })` takes one function per action you support; an action without one is recorded as failed.
368
+ Nothing deletes a user. Clerk bans (and unbans), Auth0 sets `blocked`, and WorkOS, which has no block on a user, writes `noresponse_state` to the user's metadata (gate sign-in on it) and revokes every session. On an Auth0 plan without the sessions API the revoke blocks the user too and reports `restrict`. Each action, or `none` when nothing is needed, is recorded with `accounts.recordEnforcement` at the `riskVersion` read, and `result.enforcements` lists them. A refused action is recorded as `failed` and throws `ProviderActionError`: answer 5xx so the delivery is retried. A test event, an erased account and an account at or below `enforcedRiskVersion` act on nothing (`result.skipped`). To catch up after dropped deliveries, pass each account of `nr.accounts.listChanged({ unenforced: true })` to `enforceAccount`. For your own user store, `customProvider({ restrict: async (userId) => ..., revoke_sessions: async (userId) => ... })` takes one function per action you support; an action without one is recorded as failed.
352
369
 
353
370
  A held flow (workspace settings `admission: held`) answers `held` until its investigation completes or `hold_seconds` pass, and the handler records `none` for it. When the final decision arrives as `account.risk_changed`, an `onboarding` or `provisional` account fails onboarding or is refused activation on `review` or `block`. On `allow` the handler records `activate` (no provider call; a custom provider runs its own `activate`), so admit the account when the result's enforcements hold it. An account at `allow` that needs no change, such as an `active` one after a held login, is recorded as `none`. Either way the account leaves the unenforced list. See https://docs.noresponse.org/guides/late-results.
354
371
 
@@ -384,8 +401,11 @@ const result = await assessmentsCreate(new NoResponseCore({ apiKey }), { idempot
384
401
  if (result.ok) console.log(result.value.result.status);
385
402
  ```
386
403
 
404
+ </details>
405
+
387
406
  ## Support
388
407
 
389
- Documentation: https://docs.noresponse.org. Issues: https://github.com/noresponsehq/node/issues. Quote `meta.requestId` or `error.requestId` when you write to us.
408
+ [Open an issue](https://github.com/noresponsehq/node/issues) and include the request ID from the response or error.
409
+ Keep API keys and personal data out of issues.
390
410
 
391
- Apache-2.0.
411
+ [Apache-2.0](LICENSE).
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
31
31
  export declare const SDK_METADATA: {
32
32
  readonly language: "typescript";
33
33
  readonly openapiDocVersion: "1";
34
- readonly sdkVersion: "7.1.1";
34
+ readonly sdkVersion: "7.1.3";
35
35
  readonly genVersion: "internal";
36
- readonly userAgent: "noresponse-sdk/typescript 7.1.1 internal 1 @noresponse/node";
36
+ readonly userAgent: "noresponse-sdk/typescript 7.1.3 internal 1 @noresponse/node";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
@@ -28,8 +28,8 @@ function serverURLFromOptions(options) {
28
28
  exports.SDK_METADATA = {
29
29
  language: "typescript",
30
30
  openapiDocVersion: "1",
31
- sdkVersion: "7.1.1",
31
+ sdkVersion: "7.1.3",
32
32
  genVersion: "internal",
33
- userAgent: "noresponse-sdk/typescript 7.1.1 internal 1 @noresponse/node",
33
+ userAgent: "noresponse-sdk/typescript 7.1.3 internal 1 @noresponse/node",
34
34
  };
35
35
  //# sourceMappingURL=config.js.map
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
31
31
  export declare const SDK_METADATA: {
32
32
  readonly language: "typescript";
33
33
  readonly openapiDocVersion: "1";
34
- readonly sdkVersion: "7.1.1";
34
+ readonly sdkVersion: "7.1.3";
35
35
  readonly genVersion: "internal";
36
- readonly userAgent: "noresponse-sdk/typescript 7.1.1 internal 1 @noresponse/node";
36
+ readonly userAgent: "noresponse-sdk/typescript 7.1.3 internal 1 @noresponse/node";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
@@ -24,8 +24,8 @@ export function serverURLFromOptions(options) {
24
24
  export const SDK_METADATA = {
25
25
  language: "typescript",
26
26
  openapiDocVersion: "1",
27
- sdkVersion: "7.1.1",
27
+ sdkVersion: "7.1.3",
28
28
  genVersion: "internal",
29
- userAgent: "noresponse-sdk/typescript 7.1.1 internal 1 @noresponse/node",
29
+ userAgent: "noresponse-sdk/typescript 7.1.3 internal 1 @noresponse/node",
30
30
  };
31
31
  //# sourceMappingURL=config.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noresponse/node",
3
- "version": "7.1.1",
3
+ "version": "7.1.3",
4
4
  "author": "NoResponse",
5
5
  "bugs": {
6
6
  "url": "https://github.com/noresponsehq/node/issues"