@noresponse/node 7.0.0 → 7.0.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/CHANGELOG.md +11 -0
- package/README.md +5 -7
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/account-decision.d.ts +3 -2
- package/dist/commonjs/models/account-decision.d.ts.map +1 -1
- package/dist/commonjs/models/account-decision.js +2 -1
- package/dist/commonjs/models/account-decision.js.map +1 -1
- package/dist/commonjs/models/account-decisions-by-flow.d.ts +4 -4
- package/dist/commonjs/models/account-risk-changed.d.ts +1 -1
- package/dist/commonjs/models/account-risk.d.ts +1 -1
- package/dist/commonjs/models/account.d.ts +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/account-decision.d.ts +3 -2
- package/dist/esm/models/account-decision.d.ts.map +1 -1
- package/dist/esm/models/account-decision.js +2 -1
- package/dist/esm/models/account-decision.js.map +1 -1
- package/dist/esm/models/account-decisions-by-flow.d.ts +4 -4
- package/dist/esm/models/account-risk-changed.d.ts +1 -1
- package/dist/esm/models/account-risk.d.ts +1 -1
- package/dist/esm/models/account.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 7.0.2
|
|
4
|
+
|
|
5
|
+
No changes detected.
|
|
6
|
+
|
|
7
|
+
## 7.0.1
|
|
8
|
+
|
|
9
|
+
* `sdk.assessments.create()`: `response.account.risk.decision.enum(held)` **Added**
|
|
10
|
+
* `sdk.assessments.get()`: `response.account.risk.decision.enum(held)` **Added**
|
|
11
|
+
* `sdk.accounts.listChanged()`: `response.items[].risk.decision.enum(held)` **Added**
|
|
12
|
+
* `sdk.accounts.get()`: `response.risk.decision.enum(held)` **Added**
|
|
13
|
+
|
|
3
14
|
## 7.0.0
|
|
4
15
|
|
|
5
16
|
No changes detected.
|
package/README.md
CHANGED
|
@@ -305,18 +305,14 @@ async function handler(req, res) {
|
|
|
305
305
|
return res.status(204).end();
|
|
306
306
|
}
|
|
307
307
|
if (event.type === "account.risk_changed") {
|
|
308
|
-
// The
|
|
309
|
-
//
|
|
310
|
-
applyDecisions(event.data.account.id, event.data.account.decisionsByFlow);
|
|
308
|
+
// The one event to act on: a flow's decision changed, at data.account.riskVersion.
|
|
309
|
+
// This verifier alone does not enforce it: use handleRiskChange (below) as this endpoint's receiver.
|
|
311
310
|
return res.status(204).end();
|
|
312
311
|
}
|
|
313
312
|
if ("assessmentId" in event.data) {
|
|
314
313
|
forget(event.data.assessmentId); // the terminal expiry notice: GET now answers 404
|
|
315
|
-
} else if (event.test) {
|
|
316
|
-
// sendTestEvent's fixed example assessment: apply nothing
|
|
317
|
-
} else if (isNewer(event.data)) { // keep the highest detail.assessmentVersion per assessment
|
|
318
|
-
apply(event.data); // the full assessment, as assessments.get returns it
|
|
319
314
|
}
|
|
315
|
+
// Any other assessment.updated reports progress only: apply nothing.
|
|
320
316
|
res.status(204).end();
|
|
321
317
|
}
|
|
322
318
|
```
|
|
@@ -352,6 +348,8 @@ if (result.riskVersion !== undefined) await users.update(result.account!.id, { e
|
|
|
352
348
|
|
|
353
349
|
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.
|
|
354
350
|
|
|
351
|
+
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 does nothing, so admit the account yourself from the result's account. See https://docs.noresponse.org/guides/late-results.
|
|
352
|
+
|
|
355
353
|
## Auth adapters
|
|
356
354
|
|
|
357
355
|
Map a session your backend has already verified into `authContext`:
|
|
@@ -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.0.
|
|
34
|
+
readonly sdkVersion: "7.0.2";
|
|
35
35
|
readonly genVersion: "internal";
|
|
36
|
-
readonly userAgent: "noresponse-sdk/typescript 7.0.
|
|
36
|
+
readonly userAgent: "noresponse-sdk/typescript 7.0.2 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.0.
|
|
31
|
+
sdkVersion: "7.0.2",
|
|
32
32
|
genVersion: "internal",
|
|
33
|
-
userAgent: "noresponse-sdk/typescript 7.0.
|
|
33
|
+
userAgent: "noresponse-sdk/typescript 7.0.2 internal 1 @noresponse/node",
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
4
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
5
5
|
*/
|
|
6
6
|
export declare const AccountDecision: {
|
|
7
7
|
readonly Allow: "allow";
|
|
8
8
|
readonly StepUp: "step_up";
|
|
9
9
|
readonly Review: "review";
|
|
10
10
|
readonly Block: "block";
|
|
11
|
+
readonly Held: "held";
|
|
11
12
|
};
|
|
12
13
|
/**
|
|
13
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
14
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
14
15
|
*/
|
|
15
16
|
export type AccountDecision = OpenEnum<typeof AccountDecision>;
|
|
16
17
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-decision.d.ts","sourceRoot":"","sources":["../../../src/models/account-decision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"account-decision.d.ts","sourceRoot":"","sources":["../../../src/models/account-decision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE/D,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,WAAW,CACvD,eAAe,EACf,OAAO,CACmC,CAAC;AAC7C,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,WAAW,CACxD,MAAM,EACN,eAAe,CAC4B,CAAC"}
|
|
@@ -36,13 +36,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.AccountDecision$outboundSchema = exports.AccountDecision$inboundSchema = exports.AccountDecision = void 0;
|
|
37
37
|
const openEnums = __importStar(require("../types/enums.js"));
|
|
38
38
|
/**
|
|
39
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
39
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
40
40
|
*/
|
|
41
41
|
exports.AccountDecision = {
|
|
42
42
|
Allow: "allow",
|
|
43
43
|
StepUp: "step_up",
|
|
44
44
|
Review: "review",
|
|
45
45
|
Block: "block",
|
|
46
|
+
Held: "held",
|
|
46
47
|
};
|
|
47
48
|
/** @internal */
|
|
48
49
|
exports.AccountDecision$inboundSchema = openEnums.inboundSchema(exports.AccountDecision);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-decision.js","sourceRoot":"","sources":["../../../src/models/account-decision.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,SAAS,8CAA0B;AAG/C;;GAEG;AACU,QAAA,eAAe,GAAG;IAC7B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"account-decision.js","sourceRoot":"","sources":["../../../src/models/account-decision.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,SAAS,8CAA0B;AAG/C;;GAEG;AACU,QAAA,eAAe,GAAG;IAC7B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACJ,CAAC;AAMX,gBAAgB;AACH,QAAA,6BAA6B,GAGtC,SAAS,CAAC,aAAa,CAAC,QAAA,eAAe,CAAC,CAAC;AAC7C,gBAAgB;AACH,QAAA,8BAA8B,GAGvC,SAAS,CAAC,cAAc,CAAC,QAAA,eAAe,CAAC,CAAC"}
|
|
@@ -3,19 +3,19 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { AccountDecision } from "./account-decision.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
5
|
/**
|
|
6
|
-
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them.
|
|
6
|
+
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them. The flow of the current assessment is held while that flow's admission is held and the assessment's investigation has not completed.
|
|
7
7
|
*/
|
|
8
8
|
export type AccountDecisionsByFlow = {
|
|
9
9
|
/**
|
|
10
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
10
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
11
11
|
*/
|
|
12
12
|
accountCreation: AccountDecision;
|
|
13
13
|
/**
|
|
14
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
14
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
15
15
|
*/
|
|
16
16
|
login: AccountDecision;
|
|
17
17
|
/**
|
|
18
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
18
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
19
19
|
*/
|
|
20
20
|
purchase: AccountDecision;
|
|
21
21
|
};
|
|
@@ -12,7 +12,7 @@ export type AccountRiskChanged = {
|
|
|
12
12
|
*/
|
|
13
13
|
account: Account;
|
|
14
14
|
/**
|
|
15
|
-
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them.
|
|
15
|
+
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them. The flow of the current assessment is held while that flow's admission is held and the assessment's investigation has not completed.
|
|
16
16
|
*/
|
|
17
17
|
previousDecisionsByFlow: AccountDecisionsByFlow;
|
|
18
18
|
};
|
|
@@ -9,7 +9,7 @@ export type AccountRisk = {
|
|
|
9
9
|
*/
|
|
10
10
|
score: number;
|
|
11
11
|
/**
|
|
12
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
12
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
13
13
|
*/
|
|
14
14
|
decision: AccountDecision;
|
|
15
15
|
/**
|
|
@@ -17,7 +17,7 @@ export type Account = {
|
|
|
17
17
|
id: string;
|
|
18
18
|
risk: AccountRisk;
|
|
19
19
|
/**
|
|
20
|
-
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them.
|
|
20
|
+
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them. The flow of the current assessment is held while that flow's admission is held and the assessment's investigation has not completed.
|
|
21
21
|
*/
|
|
22
22
|
decisionsByFlow: AccountDecisionsByFlow;
|
|
23
23
|
/**
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -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.0.
|
|
34
|
+
readonly sdkVersion: "7.0.2";
|
|
35
35
|
readonly genVersion: "internal";
|
|
36
|
-
readonly userAgent: "noresponse-sdk/typescript 7.0.
|
|
36
|
+
readonly userAgent: "noresponse-sdk/typescript 7.0.2 internal 1 @noresponse/node";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -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.0.
|
|
27
|
+
sdkVersion: "7.0.2",
|
|
28
28
|
genVersion: "internal",
|
|
29
|
-
userAgent: "noresponse-sdk/typescript 7.0.
|
|
29
|
+
userAgent: "noresponse-sdk/typescript 7.0.2 internal 1 @noresponse/node",
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
4
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
5
5
|
*/
|
|
6
6
|
export declare const AccountDecision: {
|
|
7
7
|
readonly Allow: "allow";
|
|
8
8
|
readonly StepUp: "step_up";
|
|
9
9
|
readonly Review: "review";
|
|
10
10
|
readonly Block: "block";
|
|
11
|
+
readonly Held: "held";
|
|
11
12
|
};
|
|
12
13
|
/**
|
|
13
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
14
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
14
15
|
*/
|
|
15
16
|
export type AccountDecision = OpenEnum<typeof AccountDecision>;
|
|
16
17
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-decision.d.ts","sourceRoot":"","sources":["../../../src/models/account-decision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"account-decision.d.ts","sourceRoot":"","sources":["../../../src/models/account-decision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE/D,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,WAAW,CACvD,eAAe,EACf,OAAO,CACmC,CAAC;AAC7C,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,WAAW,CACxD,MAAM,EACN,eAAe,CAC4B,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as openEnums from "../types/enums.js";
|
|
2
2
|
/**
|
|
3
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
3
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
4
4
|
*/
|
|
5
5
|
export const AccountDecision = {
|
|
6
6
|
Allow: "allow",
|
|
7
7
|
StepUp: "step_up",
|
|
8
8
|
Review: "review",
|
|
9
9
|
Block: "block",
|
|
10
|
+
Held: "held",
|
|
10
11
|
};
|
|
11
12
|
/** @internal */
|
|
12
13
|
export const AccountDecision$inboundSchema = openEnums.inboundSchema(AccountDecision);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-decision.js","sourceRoot":"","sources":["../../../src/models/account-decision.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"account-decision.js","sourceRoot":"","sources":["../../../src/models/account-decision.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACJ,CAAC;AAMX,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAGtC,SAAS,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;AAC7C,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAGvC,SAAS,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -3,19 +3,19 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { AccountDecision } from "./account-decision.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
5
|
/**
|
|
6
|
-
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them.
|
|
6
|
+
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them. The flow of the current assessment is held while that flow's admission is held and the assessment's investigation has not completed.
|
|
7
7
|
*/
|
|
8
8
|
export type AccountDecisionsByFlow = {
|
|
9
9
|
/**
|
|
10
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
10
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
11
11
|
*/
|
|
12
12
|
accountCreation: AccountDecision;
|
|
13
13
|
/**
|
|
14
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
14
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
15
15
|
*/
|
|
16
16
|
login: AccountDecision;
|
|
17
17
|
/**
|
|
18
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
18
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
19
19
|
*/
|
|
20
20
|
purchase: AccountDecision;
|
|
21
21
|
};
|
|
@@ -12,7 +12,7 @@ export type AccountRiskChanged = {
|
|
|
12
12
|
*/
|
|
13
13
|
account: Account;
|
|
14
14
|
/**
|
|
15
|
-
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them.
|
|
15
|
+
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them. The flow of the current assessment is held while that flow's admission is held and the assessment's investigation has not completed.
|
|
16
16
|
*/
|
|
17
17
|
previousDecisionsByFlow: AccountDecisionsByFlow;
|
|
18
18
|
};
|
|
@@ -9,7 +9,7 @@ export type AccountRisk = {
|
|
|
9
9
|
*/
|
|
10
10
|
score: number;
|
|
11
11
|
/**
|
|
12
|
-
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
12
|
+
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
|
|
13
13
|
*/
|
|
14
14
|
decision: AccountDecision;
|
|
15
15
|
/**
|
|
@@ -17,7 +17,7 @@ export type Account = {
|
|
|
17
17
|
id: string;
|
|
18
18
|
risk: AccountRisk;
|
|
19
19
|
/**
|
|
20
|
-
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them.
|
|
20
|
+
* The decision for each flow: the account's score under that flow's thresholds. A flow the workspace has not set uses its account_creation thresholds, so the flows differ only where it set them. The flow of the current assessment is held while that flow's admission is held and the assessment's investigation has not completed.
|
|
21
21
|
*/
|
|
22
22
|
decisionsByFlow: AccountDecisionsByFlow;
|
|
23
23
|
/**
|