@noresponse/node 4.0.1 → 5.0.0
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 +35 -0
- package/README.md +9 -9
- package/dist/commonjs/client.d.ts +2 -2
- package/dist/commonjs/client.js +2 -2
- package/dist/commonjs/funcs/accounts-list-assessments.d.ts +1 -1
- package/dist/commonjs/funcs/accounts-list-assessments.js +1 -1
- package/dist/commonjs/funcs/assessments-create.d.ts +1 -1
- package/dist/commonjs/funcs/assessments-create.js +1 -1
- package/dist/commonjs/funcs/assessments-get.d.ts +1 -1
- package/dist/commonjs/funcs/assessments-get.js +1 -1
- package/dist/commonjs/funcs/assessments-query.d.ts +1 -1
- package/dist/commonjs/funcs/assessments-query.js +1 -1
- package/dist/commonjs/funcs/integrations-list.d.ts +1 -1
- package/dist/commonjs/funcs/integrations-list.js +1 -1
- package/dist/commonjs/funcs/key-usage-record.d.ts +2 -2
- package/dist/commonjs/funcs/key-usage-record.js +2 -2
- package/dist/commonjs/funcs/webhook-endpoints-list-deliveries.d.ts +1 -1
- package/dist/commonjs/funcs/webhook-endpoints-list-deliveries.js +1 -1
- package/dist/commonjs/funcs/webhook-endpoints-list.d.ts +1 -1
- package/dist/commonjs/funcs/webhook-endpoints-list.js +1 -1
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/issued-credential.d.ts +1 -1
- package/dist/commonjs/issued-credential.js +1 -1
- package/dist/commonjs/key-usage.js +2 -2
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/account-decisions-by-flow.d.ts +2 -2
- package/dist/commonjs/models/account-decisions-by-flow.d.ts.map +1 -1
- package/dist/commonjs/models/account-decisions-by-flow.js +8 -3
- package/dist/commonjs/models/account-decisions-by-flow.js.map +1 -1
- package/dist/commonjs/models/account-deletion.d.ts +1 -1
- package/dist/commonjs/models/account.d.ts +3 -3
- package/dist/commonjs/models/assessment-deletion.d.ts +1 -1
- package/dist/commonjs/models/assessment-detail-auth-context.d.ts +1 -1
- package/dist/commonjs/models/assessment-detail.d.ts +4 -4
- package/dist/commonjs/models/assessment-list.d.ts +3 -3
- package/dist/commonjs/models/assessment-outcome-request.d.ts +2 -2
- package/dist/commonjs/models/assessment-outcome.d.ts +3 -3
- package/dist/commonjs/models/assessment-query.d.ts +2 -2
- package/dist/commonjs/models/assessment-request-client-context.d.ts +4 -4
- package/dist/commonjs/models/assessment-request-identifiers.d.ts +1 -1
- package/dist/commonjs/models/assessment-request-issued-credential.d.ts +1 -1
- package/dist/commonjs/models/assessment-request-policy-context.d.ts +1 -1
- package/dist/commonjs/models/assessment-request.d.ts +5 -5
- package/dist/commonjs/models/assessment.d.ts +2 -2
- package/dist/commonjs/models/auth-context.d.ts +1 -1
- package/dist/commonjs/models/flow.d.ts +3 -3
- package/dist/commonjs/models/flow.js +2 -2
- package/dist/commonjs/models/flow.js.map +1 -1
- package/dist/commonjs/models/integration-list.d.ts +1 -1
- package/dist/commonjs/models/integration-request.d.ts +1 -1
- package/dist/commonjs/models/integration.d.ts +1 -1
- package/dist/commonjs/models/ip-summary.d.ts +3 -3
- package/dist/commonjs/models/ip-summary.d.ts.map +1 -1
- package/dist/commonjs/models/ip-summary.js +2 -2
- package/dist/commonjs/models/ip-summary.js.map +1 -1
- package/dist/commonjs/models/key-rotation-request.d.ts +1 -1
- package/dist/commonjs/models/key-usage-batch-request.d.ts +1 -1
- package/dist/commonjs/models/operations/create-assessment.d.ts +1 -1
- package/dist/commonjs/models/operations/delete-account.d.ts +1 -1
- package/dist/commonjs/models/operations/delete-integration.d.ts +1 -1
- package/dist/commonjs/models/operations/delete-webhook-endpoint.d.ts +1 -1
- package/dist/commonjs/models/operations/get-account.d.ts +1 -1
- package/dist/commonjs/models/operations/list-account-assessments.d.ts +1 -1
- package/dist/commonjs/models/operations/list-webhook-deliveries.d.ts +1 -1
- package/dist/commonjs/models/operations/record-assessment-outcome.d.ts +1 -1
- package/dist/commonjs/models/operations/record-key-usage.d.ts +1 -1
- package/dist/commonjs/models/operations/replay-webhook-delivery.d.ts +2 -2
- package/dist/commonjs/models/operations/rotate-integration-secret.d.ts +1 -1
- package/dist/commonjs/models/operations/rotate-webhook-signing-key.d.ts +1 -1
- package/dist/commonjs/models/operations/send-webhook-test-event.d.ts +1 -1
- package/dist/commonjs/models/outcome.d.ts +2 -2
- package/dist/commonjs/models/outcome.js +1 -1
- package/dist/commonjs/models/permission-denied-error-code.d.ts +1 -1
- package/dist/commonjs/models/permission-denied-error-code.js +1 -1
- package/dist/commonjs/models/permission-denied-error-code.js.map +1 -1
- package/dist/commonjs/models/reason-code.d.ts +1 -1
- package/dist/commonjs/models/reason-code.js +1 -1
- package/dist/commonjs/models/reason-code.js.map +1 -1
- package/dist/commonjs/models/risk-summary.d.ts +1 -1
- package/dist/commonjs/models/risk.d.ts +3 -3
- package/dist/commonjs/models/signal.d.ts +1 -1
- package/dist/commonjs/models/webhook-delivery-list.d.ts +2 -2
- package/dist/commonjs/models/webhook-endpoint-created.d.ts +1 -1
- package/dist/commonjs/models/webhook-endpoint-list.d.ts +1 -1
- package/dist/commonjs/models/webhook-endpoint-request.d.ts +1 -1
- package/dist/commonjs/models/webhook-endpoint.d.ts +1 -1
- package/dist/commonjs/sdk/accounts.d.ts +1 -1
- package/dist/commonjs/sdk/accounts.js +1 -1
- package/dist/commonjs/sdk/assessments.d.ts +3 -3
- package/dist/commonjs/sdk/assessments.js +3 -3
- package/dist/commonjs/sdk/integrations.d.ts +1 -1
- package/dist/commonjs/sdk/integrations.js +1 -1
- package/dist/commonjs/sdk/key-usage.d.ts +2 -2
- package/dist/commonjs/sdk/key-usage.js +2 -2
- package/dist/commonjs/sdk/webhook-endpoints.d.ts +2 -2
- package/dist/commonjs/sdk/webhook-endpoints.js +2 -2
- package/dist/commonjs/webhooks.d.ts +5 -5
- package/dist/commonjs/webhooks.d.ts.map +1 -1
- package/dist/commonjs/webhooks.js +2 -2
- package/dist/commonjs/webhooks.js.map +1 -1
- package/dist/esm/client.d.ts +2 -2
- package/dist/esm/client.js +2 -2
- package/dist/esm/funcs/accounts-list-assessments.d.ts +1 -1
- package/dist/esm/funcs/accounts-list-assessments.js +1 -1
- package/dist/esm/funcs/assessments-create.d.ts +1 -1
- package/dist/esm/funcs/assessments-create.js +1 -1
- package/dist/esm/funcs/assessments-get.d.ts +1 -1
- package/dist/esm/funcs/assessments-get.js +1 -1
- package/dist/esm/funcs/assessments-query.d.ts +1 -1
- package/dist/esm/funcs/assessments-query.js +1 -1
- package/dist/esm/funcs/integrations-list.d.ts +1 -1
- package/dist/esm/funcs/integrations-list.js +1 -1
- package/dist/esm/funcs/key-usage-record.d.ts +2 -2
- package/dist/esm/funcs/key-usage-record.js +2 -2
- package/dist/esm/funcs/webhook-endpoints-list-deliveries.d.ts +1 -1
- package/dist/esm/funcs/webhook-endpoints-list-deliveries.js +1 -1
- package/dist/esm/funcs/webhook-endpoints-list.d.ts +1 -1
- package/dist/esm/funcs/webhook-endpoints-list.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/issued-credential.d.ts +1 -1
- package/dist/esm/issued-credential.js +1 -1
- package/dist/esm/key-usage.js +2 -2
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/account-decisions-by-flow.d.ts +2 -2
- package/dist/esm/models/account-decisions-by-flow.d.ts.map +1 -1
- package/dist/esm/models/account-decisions-by-flow.js +8 -3
- package/dist/esm/models/account-decisions-by-flow.js.map +1 -1
- package/dist/esm/models/account-deletion.d.ts +1 -1
- package/dist/esm/models/account.d.ts +3 -3
- package/dist/esm/models/assessment-deletion.d.ts +1 -1
- package/dist/esm/models/assessment-detail-auth-context.d.ts +1 -1
- package/dist/esm/models/assessment-detail.d.ts +4 -4
- package/dist/esm/models/assessment-list.d.ts +3 -3
- package/dist/esm/models/assessment-outcome-request.d.ts +2 -2
- package/dist/esm/models/assessment-outcome.d.ts +3 -3
- package/dist/esm/models/assessment-query.d.ts +2 -2
- package/dist/esm/models/assessment-request-client-context.d.ts +4 -4
- package/dist/esm/models/assessment-request-identifiers.d.ts +1 -1
- package/dist/esm/models/assessment-request-issued-credential.d.ts +1 -1
- package/dist/esm/models/assessment-request-policy-context.d.ts +1 -1
- package/dist/esm/models/assessment-request.d.ts +5 -5
- package/dist/esm/models/assessment.d.ts +2 -2
- package/dist/esm/models/auth-context.d.ts +1 -1
- package/dist/esm/models/flow.d.ts +3 -3
- package/dist/esm/models/flow.js +2 -2
- package/dist/esm/models/flow.js.map +1 -1
- package/dist/esm/models/integration-list.d.ts +1 -1
- package/dist/esm/models/integration-request.d.ts +1 -1
- package/dist/esm/models/integration.d.ts +1 -1
- package/dist/esm/models/ip-summary.d.ts +3 -3
- package/dist/esm/models/ip-summary.d.ts.map +1 -1
- package/dist/esm/models/ip-summary.js +2 -2
- package/dist/esm/models/ip-summary.js.map +1 -1
- package/dist/esm/models/key-rotation-request.d.ts +1 -1
- package/dist/esm/models/key-usage-batch-request.d.ts +1 -1
- package/dist/esm/models/operations/create-assessment.d.ts +1 -1
- package/dist/esm/models/operations/delete-account.d.ts +1 -1
- package/dist/esm/models/operations/delete-integration.d.ts +1 -1
- package/dist/esm/models/operations/delete-webhook-endpoint.d.ts +1 -1
- package/dist/esm/models/operations/get-account.d.ts +1 -1
- package/dist/esm/models/operations/list-account-assessments.d.ts +1 -1
- package/dist/esm/models/operations/list-webhook-deliveries.d.ts +1 -1
- package/dist/esm/models/operations/record-assessment-outcome.d.ts +1 -1
- package/dist/esm/models/operations/record-key-usage.d.ts +1 -1
- package/dist/esm/models/operations/replay-webhook-delivery.d.ts +2 -2
- package/dist/esm/models/operations/rotate-integration-secret.d.ts +1 -1
- package/dist/esm/models/operations/rotate-webhook-signing-key.d.ts +1 -1
- package/dist/esm/models/operations/send-webhook-test-event.d.ts +1 -1
- package/dist/esm/models/outcome.d.ts +2 -2
- package/dist/esm/models/outcome.js +1 -1
- package/dist/esm/models/permission-denied-error-code.d.ts +1 -1
- package/dist/esm/models/permission-denied-error-code.js +1 -1
- package/dist/esm/models/permission-denied-error-code.js.map +1 -1
- package/dist/esm/models/reason-code.d.ts +1 -1
- package/dist/esm/models/reason-code.js +1 -1
- package/dist/esm/models/reason-code.js.map +1 -1
- package/dist/esm/models/risk-summary.d.ts +1 -1
- package/dist/esm/models/risk.d.ts +3 -3
- package/dist/esm/models/signal.d.ts +1 -1
- package/dist/esm/models/webhook-delivery-list.d.ts +2 -2
- package/dist/esm/models/webhook-endpoint-created.d.ts +1 -1
- package/dist/esm/models/webhook-endpoint-list.d.ts +1 -1
- package/dist/esm/models/webhook-endpoint-request.d.ts +1 -1
- package/dist/esm/models/webhook-endpoint.d.ts +1 -1
- package/dist/esm/sdk/accounts.d.ts +1 -1
- package/dist/esm/sdk/accounts.js +1 -1
- package/dist/esm/sdk/assessments.d.ts +3 -3
- package/dist/esm/sdk/assessments.js +3 -3
- package/dist/esm/sdk/integrations.d.ts +1 -1
- package/dist/esm/sdk/integrations.js +1 -1
- package/dist/esm/sdk/key-usage.d.ts +2 -2
- package/dist/esm/sdk/key-usage.js +2 -2
- package/dist/esm/sdk/webhook-endpoints.d.ts +2 -2
- package/dist/esm/sdk/webhook-endpoints.js +2 -2
- package/dist/esm/webhooks.d.ts +5 -5
- package/dist/esm/webhooks.d.ts.map +1 -1
- package/dist/esm/webhooks.js +2 -2
- package/dist/esm/webhooks.js.map +1 -1
- package/package.json +3 -3
|
@@ -22,11 +22,11 @@ export type Risk = {
|
|
|
22
22
|
*/
|
|
23
23
|
recommendation: Recommendation;
|
|
24
24
|
/**
|
|
25
|
-
* true when the
|
|
25
|
+
* true when the workspace's block threshold is set and score reached it. A provider hook can deny the account creation on it; the provider decides and enforces. It does not change recommendation. It is false while blocking is off, the default, and a body from before the flag existed omits it: read absent as false.
|
|
26
26
|
*/
|
|
27
27
|
block?: boolean | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* The block threshold this answer used: block is true exactly when score is at least this value. Absent while blocking is off. NoResponse sets it per
|
|
29
|
+
* The block threshold this answer used: block is true exactly when score is at least this value. Absent while blocking is off. NoResponse sets it per workspace on request, at or above the review threshold.
|
|
30
30
|
*/
|
|
31
31
|
blockThreshold?: number | undefined;
|
|
32
32
|
/**
|
|
@@ -34,7 +34,7 @@ export type Risk = {
|
|
|
34
34
|
*/
|
|
35
35
|
confidence: RiskConfidence;
|
|
36
36
|
/**
|
|
37
|
-
* Version of the hand-authored heuristic weights that produced the recommendation, for example 'risk-2026-10.7'. A
|
|
37
|
+
* Version of the hand-authored heuristic weights that produced the recommendation, for example 'risk-2026-10.7'. A workspace threshold override adds a +t<N> suffix, e.g. 'risk-2026-10.7+t3'.
|
|
38
38
|
*/
|
|
39
39
|
policyVersion: string;
|
|
40
40
|
/**
|
|
@@ -20,7 +20,7 @@ export type Signal = {
|
|
|
20
20
|
*/
|
|
21
21
|
outcome: SignalOutcome;
|
|
22
22
|
/**
|
|
23
|
-
* Opaque,
|
|
23
|
+
* Opaque, workspace-scoped projection of the source that produced a signal. It stays stable for your workspace while the projection key is unchanged and reveals no upstream provider, feed, breach table or source record.
|
|
24
24
|
*/
|
|
25
25
|
sourceId: string;
|
|
26
26
|
/**
|
|
@@ -3,7 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
4
4
|
import { WebhookDeliveryAttempt } from "./webhook-delivery-attempt.js";
|
|
5
5
|
/**
|
|
6
|
-
* The 200 answer of GET /v1/webhooks/{endpoint_id}/deliveries: one page of the endpoint's delivery attempts, newest first. Each item is one POST to the endpoint. Attempts are kept for 30 days, or the
|
|
6
|
+
* The 200 answer of GET /v1/webhooks/{endpoint_id}/deliveries: one page of the endpoint's delivery attempts, newest first. Each item is one POST to the endpoint. Attempts are kept for 30 days, or the workspace's retention_days when that is shorter, and are deleted with the assessment they carried. next_cursor is present only when another page exists.
|
|
7
7
|
*/
|
|
8
8
|
export type WebhookDeliveryList = {
|
|
9
9
|
/**
|
|
@@ -12,7 +12,7 @@ export type WebhookDeliveryList = {
|
|
|
12
12
|
endpointId: string;
|
|
13
13
|
items: Array<WebhookDeliveryAttempt>;
|
|
14
14
|
/**
|
|
15
|
-
* Opaque cursor for the next page, MAC'd by the server and bound to the
|
|
15
|
+
* Opaque cursor for the next page, MAC'd by the server and bound to the workspace and endpoint it was issued for. Pass it back unchanged as cursor; a tampered, foreign or expired cursor answers 400 invalid_cursor.
|
|
16
16
|
*/
|
|
17
17
|
nextCursor?: string | undefined;
|
|
18
18
|
};
|
|
@@ -8,7 +8,7 @@ import { WebhookEndpoint } from "./webhook-endpoint.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export type WebhookEndpointCreated = {
|
|
10
10
|
/**
|
|
11
|
-
* One of the
|
|
11
|
+
* One of the workspace's registered webhook endpoints. Signing secrets are not part of it: a secret is shown once, when it is issued (POST /v1/webhooks and POST /v1/webhooks/{endpoint_id}/rotate).
|
|
12
12
|
*/
|
|
13
13
|
endpoint: WebhookEndpoint;
|
|
14
14
|
/**
|
|
@@ -3,7 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
4
4
|
import { WebhookEndpoint } from "./webhook-endpoint.js";
|
|
5
5
|
/**
|
|
6
|
-
* GET /v1/webhooks answer: every endpoint of the calling
|
|
6
|
+
* GET /v1/webhooks answer: every endpoint of the calling workspace, in every state, ordered by endpoint_id. A workspace holds at most 5, so there is no page.
|
|
7
7
|
*/
|
|
8
8
|
export type WebhookEndpointList = {
|
|
9
9
|
items: Array<WebhookEndpoint>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { ResponseMode } from "./response-mode.js";
|
|
3
3
|
/**
|
|
4
|
-
* POST /v1/webhooks body. The
|
|
4
|
+
* POST /v1/webhooks body. The workspace is the API key that signs the request, so it is not a body member. The URL must be https on port 443 or 8443 with a DNS name, not an IP literal, and every address the name resolves to must be public.
|
|
5
5
|
*/
|
|
6
6
|
export type WebhookEndpointRequest = {
|
|
7
7
|
/**
|
|
@@ -5,7 +5,7 @@ import { ResponseMode } from "./response-mode.js";
|
|
|
5
5
|
import { SigningKey } from "./signing-key.js";
|
|
6
6
|
import { WebhookEndpointState } from "./webhook-endpoint-state.js";
|
|
7
7
|
/**
|
|
8
|
-
* One of the
|
|
8
|
+
* One of the workspace's registered webhook endpoints. Signing secrets are not part of it: a secret is shown once, when it is issued (POST /v1/webhooks and POST /v1/webhooks/{endpoint_id}/rotate).
|
|
9
9
|
*/
|
|
10
10
|
export type WebhookEndpoint = {
|
|
11
11
|
/**
|
|
@@ -20,7 +20,7 @@ export declare class Accounts extends ClientSDK {
|
|
|
20
20
|
* Page through one account's unexpired assessments.
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
|
-
* The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your
|
|
23
|
+
* The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope. The account_id travels in the URL; use POST /v1/assessments/query to keep it out of access logs.
|
|
24
24
|
*/
|
|
25
25
|
listAssessments(request: operations.ListAccountAssessmentsRequest, options?: RequestOptions): Promise<PageIterator<operations.ListAccountAssessmentsResponse, {
|
|
26
26
|
cursor: string;
|
|
@@ -30,7 +30,7 @@ class Accounts extends sdks_js_1.ClientSDK {
|
|
|
30
30
|
* Page through one account's unexpired assessments.
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your
|
|
33
|
+
* The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope. The account_id travels in the URL; use POST /v1/assessments/query to keep it out of access logs.
|
|
34
34
|
*/
|
|
35
35
|
async listAssessments(request, options) {
|
|
36
36
|
return (0, operations_js_1.unwrapResultIterator)((0, accounts_list_assessments_js_1.accountsListAssessments)(this, request, options));
|
|
@@ -7,14 +7,14 @@ export declare class Assessments extends ClientSDK {
|
|
|
7
7
|
* Assess identifiers for a signup or gateway decision.
|
|
8
8
|
*
|
|
9
9
|
* @remarks
|
|
10
|
-
* Assesses one
|
|
10
|
+
* Assesses one account creation, login or purchase (flow) and answers with the account's one current risk: account.risk.decision is the decision for this flow (allow, step_up, review or block, where block means your block threshold was reached), and detail holds this assessment's own facts. depth sets how long the answer waits for sources: quick waits only for the fast ones (500 ms), full for the whole budget (3000 ms at most); it defaults to full for account_creation and purchase and quick for login. 200 carries complete or partial, 202 carries pending with Location and Retry-After. While the account's first assessment is pending, account is absent: apply your own fallback for that, 429, 503 or a timeout. NoResponse blocks nothing itself; you decide. Requires the assess scope. Idempotency-Key is required and is bound to the body for 24 hours: the same key with the same body replays the latest assessment with Idempotent-Replayed: true and starts no new work; the same key with a different body answers 409 idempotency_key_reused. response_mode defaults to standard; detailed needs the detailed scope.
|
|
11
11
|
*/
|
|
12
12
|
create(request: operations.CreateAssessmentRequest, options?: RequestOptions): Promise<operations.CreateAssessmentResponse>;
|
|
13
13
|
/**
|
|
14
14
|
* Poll the authoritative assessment of one assessment.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another
|
|
17
|
+
* Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another workspace's assessment, an unknown or expired assessment and a malformed assessment_id all answer 404 not_found. response_mode=detailed needs the detailed scope.
|
|
18
18
|
*/
|
|
19
19
|
get(request: operations.GetAssessmentRequest, options?: RequestOptions): Promise<operations.GetAssessmentResponse>;
|
|
20
20
|
/**
|
|
@@ -35,7 +35,7 @@ export declare class Assessments extends ClientSDK {
|
|
|
35
35
|
* Page through one account's unexpired assessments.
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
|
-
* History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your
|
|
38
|
+
* History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope.
|
|
39
39
|
*/
|
|
40
40
|
query(request: models.AssessmentQuery, options?: RequestOptions): Promise<PageIterator<operations.QueryAccountAssessmentsResponse, {
|
|
41
41
|
cursor: string;
|
|
@@ -14,7 +14,7 @@ class Assessments extends sdks_js_1.ClientSDK {
|
|
|
14
14
|
* Assess identifiers for a signup or gateway decision.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Assesses one
|
|
17
|
+
* Assesses one account creation, login or purchase (flow) and answers with the account's one current risk: account.risk.decision is the decision for this flow (allow, step_up, review or block, where block means your block threshold was reached), and detail holds this assessment's own facts. depth sets how long the answer waits for sources: quick waits only for the fast ones (500 ms), full for the whole budget (3000 ms at most); it defaults to full for account_creation and purchase and quick for login. 200 carries complete or partial, 202 carries pending with Location and Retry-After. While the account's first assessment is pending, account is absent: apply your own fallback for that, 429, 503 or a timeout. NoResponse blocks nothing itself; you decide. Requires the assess scope. Idempotency-Key is required and is bound to the body for 24 hours: the same key with the same body replays the latest assessment with Idempotent-Replayed: true and starts no new work; the same key with a different body answers 409 idempotency_key_reused. response_mode defaults to standard; detailed needs the detailed scope.
|
|
18
18
|
*/
|
|
19
19
|
async create(request, options) {
|
|
20
20
|
return (0, fp_js_1.unwrapAsync)((0, assessments_create_js_1.assessmentsCreate)(this, request, options));
|
|
@@ -23,7 +23,7 @@ class Assessments extends sdks_js_1.ClientSDK {
|
|
|
23
23
|
* Poll the authoritative assessment of one assessment.
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
|
-
* Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another
|
|
26
|
+
* Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another workspace's assessment, an unknown or expired assessment and a malformed assessment_id all answer 404 not_found. response_mode=detailed needs the detailed scope.
|
|
27
27
|
*/
|
|
28
28
|
async get(request, options) {
|
|
29
29
|
return (0, fp_js_1.unwrapAsync)((0, assessments_get_js_1.assessmentsGet)(this, request, options));
|
|
@@ -50,7 +50,7 @@ class Assessments extends sdks_js_1.ClientSDK {
|
|
|
50
50
|
* Page through one account's unexpired assessments.
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your
|
|
53
|
+
* History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope.
|
|
54
54
|
*/
|
|
55
55
|
async query(request, options) {
|
|
56
56
|
return (0, operations_js_1.unwrapResultIterator)((0, assessments_query_js_1.assessmentsQuery)(this, request, options));
|
|
@@ -10,7 +10,7 @@ export declare class Integrations extends ClientSDK {
|
|
|
10
10
|
*/
|
|
11
11
|
create(request: models.IntegrationRequest, options?: RequestOptions): Promise<operations.CreateIntegrationResponse>;
|
|
12
12
|
/**
|
|
13
|
-
* List the
|
|
13
|
+
* List the workspace's integrations.
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* Every integration, oldest first. Listings carry no secrets. Requires the integrations scope.
|
|
@@ -18,7 +18,7 @@ class Integrations extends sdks_js_1.ClientSDK {
|
|
|
18
18
|
return (0, fp_js_1.unwrapAsync)((0, integrations_create_js_1.integrationsCreate)(this, request, options));
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* List the
|
|
21
|
+
* List the workspace's integrations.
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
24
|
* Every integration, oldest first. Listings carry no secrets. Requires the integrations scope.
|
|
@@ -2,10 +2,10 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as operations from "../models/operations/index.js";
|
|
3
3
|
export declare class KeyUsage extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
* Report requests made with API keys your
|
|
5
|
+
* Report requests made with API keys your platform issued.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Records requests made with API keys your
|
|
8
|
+
* Records requests made with API keys your platform issued to your accounts, one event per request: the key's SHA-256 (the issued_credential.sha256 the account's assessment carried), the client IP, the time and optionally the user agent, model and token counts. Most callers use the SDK's usage buffer, which batches events and sends them in the background. Sampling is allowed: sample_rate weights an event's request and token counts. Requires the assess scope. Idempotency-Key is required and handled as on POST /v1/assessments: a retry with the same key and body answers the same record with Idempotent-Replayed: true and counts nothing again; a different body answers 409. A batch holds 1 to 500 events and at most 256 KiB. No raw event is kept: usage is aggregated per key, and IPs, user agents and models are kept only as keyed digests, with the IP's country, for 24 hours. When one key is used from 20 or more IP addresses, or 3 or more countries, within 24 hours, every account whose assessment carried that key gets the shared_api_key reason for 30 days.
|
|
9
9
|
*/
|
|
10
10
|
record(request: operations.RecordKeyUsageRequest, options?: RequestOptions): Promise<operations.RecordKeyUsageResponse>;
|
|
11
11
|
}
|
|
@@ -6,10 +6,10 @@ const sdks_js_1 = require("../lib/sdks.js");
|
|
|
6
6
|
const fp_js_1 = require("../types/fp.js");
|
|
7
7
|
class KeyUsage extends sdks_js_1.ClientSDK {
|
|
8
8
|
/**
|
|
9
|
-
* Report requests made with API keys your
|
|
9
|
+
* Report requests made with API keys your platform issued.
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
|
12
|
-
* Records requests made with API keys your
|
|
12
|
+
* Records requests made with API keys your platform issued to your accounts, one event per request: the key's SHA-256 (the issued_credential.sha256 the account's assessment carried), the client IP, the time and optionally the user agent, model and token counts. Most callers use the SDK's usage buffer, which batches events and sends them in the background. Sampling is allowed: sample_rate weights an event's request and token counts. Requires the assess scope. Idempotency-Key is required and handled as on POST /v1/assessments: a retry with the same key and body answers the same record with Idempotent-Replayed: true and counts nothing again; a different body answers 409. A batch holds 1 to 500 events and at most 256 KiB. No raw event is kept: usage is aggregated per key, and IPs, user agents and models are kept only as keyed digests, with the IP's country, for 24 hours. When one key is used from 20 or more IP addresses, or 3 or more countries, within 24 hours, every account whose assessment carried that key gets the shared_api_key reason for 30 days.
|
|
13
13
|
*/
|
|
14
14
|
async record(request, options) {
|
|
15
15
|
return (0, fp_js_1.unwrapAsync)((0, key_usage_record_js_1.keyUsageRecord)(this, request, options));
|
|
@@ -4,7 +4,7 @@ import * as operations from "../models/operations/index.js";
|
|
|
4
4
|
import { PageIterator } from "../types/operations.js";
|
|
5
5
|
export declare class WebhookEndpoints extends ClientSDK {
|
|
6
6
|
/**
|
|
7
|
-
* List the
|
|
7
|
+
* List the workspace's webhook endpoints.
|
|
8
8
|
*
|
|
9
9
|
* @remarks
|
|
10
10
|
* Lists your webhook endpoints in every state, ordered by endpoint_id, with the ids of their signing keys and without secrets. Requires the webhooks scope.
|
|
@@ -42,7 +42,7 @@ export declare class WebhookEndpoints extends ClientSDK {
|
|
|
42
42
|
* List an endpoint's delivery attempts.
|
|
43
43
|
*
|
|
44
44
|
* @remarks
|
|
45
|
-
* Every POST the endpoint received, newest first: the event id and type, which attempt it was, whether it was a replay, delivered or failed, the response code, why it failed and how long it took. Attempts are kept for 30 days, or your retention_days when that is shorter, and are deleted with the assessment they carried. Requires the webhooks scope. Read-only and safe to retry. The cursor is opaque and bound to your
|
|
45
|
+
* Every POST the endpoint received, newest first: the event id and type, which attempt it was, whether it was a replay, delivered or failed, the response code, why it failed and how long it took. Attempts are kept for 30 days, or your retention_days when that is shorter, and are deleted with the assessment they carried. Requires the webhooks scope. Read-only and safe to retry. The cursor is opaque and bound to your workspace and the endpoint; a tampered or expired cursor answers 400 invalid_cursor.
|
|
46
46
|
*/
|
|
47
47
|
listDeliveries(request: operations.ListWebhookDeliveriesRequest, options?: RequestOptions): Promise<PageIterator<operations.ListWebhookDeliveriesResponse, {
|
|
48
48
|
cursor: string;
|
|
@@ -13,7 +13,7 @@ const fp_js_1 = require("../types/fp.js");
|
|
|
13
13
|
const operations_js_1 = require("../types/operations.js");
|
|
14
14
|
class WebhookEndpoints extends sdks_js_1.ClientSDK {
|
|
15
15
|
/**
|
|
16
|
-
* List the
|
|
16
|
+
* List the workspace's webhook endpoints.
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
* Lists your webhook endpoints in every state, ordered by endpoint_id, with the ids of their signing keys and without secrets. Requires the webhooks scope.
|
|
@@ -61,7 +61,7 @@ class WebhookEndpoints extends sdks_js_1.ClientSDK {
|
|
|
61
61
|
* List an endpoint's delivery attempts.
|
|
62
62
|
*
|
|
63
63
|
* @remarks
|
|
64
|
-
* Every POST the endpoint received, newest first: the event id and type, which attempt it was, whether it was a replay, delivered or failed, the response code, why it failed and how long it took. Attempts are kept for 30 days, or your retention_days when that is shorter, and are deleted with the assessment they carried. Requires the webhooks scope. Read-only and safe to retry. The cursor is opaque and bound to your
|
|
64
|
+
* Every POST the endpoint received, newest first: the event id and type, which attempt it was, whether it was a replay, delivered or failed, the response code, why it failed and how long it took. Attempts are kept for 30 days, or your retention_days when that is shorter, and are deleted with the assessment they carried. Requires the webhooks scope. Read-only and safe to retry. The cursor is opaque and bound to your workspace and the endpoint; a tampered or expired cursor answers 400 invalid_cursor.
|
|
65
65
|
*/
|
|
66
66
|
async listDeliveries(request, options) {
|
|
67
67
|
return (0, operations_js_1.unwrapResultIterator)((0, webhook_endpoints_list_deliveries_js_1.webhookEndpointsListDeliveries)(this, request, options));
|
|
@@ -37,7 +37,7 @@ export type AccountDeleted = {
|
|
|
37
37
|
* The workspace was deleted. Sent once per environment before its endpoints
|
|
38
38
|
* are torn down: the last event this endpoint receives.
|
|
39
39
|
*/
|
|
40
|
-
export type
|
|
40
|
+
export type WorkspaceDeleted = {
|
|
41
41
|
workspaceId: string;
|
|
42
42
|
environment: "live" | "test";
|
|
43
43
|
deletedAt: string;
|
|
@@ -99,13 +99,13 @@ export type AccountDeletedEvent = {
|
|
|
99
99
|
test: false;
|
|
100
100
|
data: AccountDeleted;
|
|
101
101
|
};
|
|
102
|
-
export type
|
|
102
|
+
export type WorkspaceDeletedEvent = {
|
|
103
103
|
id: string;
|
|
104
|
-
type: "
|
|
104
|
+
type: "workspace.deleted";
|
|
105
105
|
createdAt: string;
|
|
106
106
|
/** Always false. */
|
|
107
107
|
test: false;
|
|
108
|
-
data:
|
|
108
|
+
data: WorkspaceDeleted;
|
|
109
109
|
};
|
|
110
110
|
export type EndpointDisabledEvent = {
|
|
111
111
|
id: string;
|
|
@@ -123,7 +123,7 @@ export type AccountRiskChangedEvent = {
|
|
|
123
123
|
test: false;
|
|
124
124
|
data: AccountRiskChanged;
|
|
125
125
|
};
|
|
126
|
-
export type WebhookEvent = AssessmentUpdatedEvent | AssessmentExpiredEvent | EndpointVerificationEvent | AccountDeletedEvent |
|
|
126
|
+
export type WebhookEvent = AssessmentUpdatedEvent | AssessmentExpiredEvent | EndpointVerificationEvent | AccountDeletedEvent | WorkspaceDeletedEvent | EndpointDisabledEvent | AccountRiskChangedEvent;
|
|
127
127
|
export type WebhookErrorCode = "missing_header" | "duplicate_header" | "invalid_timestamp" | "unknown_key" | "invalid_signature" | "invalid_payload";
|
|
128
128
|
/** Thrown by constructEvent and verificationResponse. Answer 400 and do not process the delivery. */
|
|
129
129
|
export declare class WebhookVerificationError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/webhooks.ts"],"names":[],"mappings":"AAQA,OAAO,EAAyB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAwC,KAAK,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC1H,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAc7C,gIAAgI;AAChI,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACnC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;AAE5D,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC;AAE3E,MAAM,MAAM,qBAAqB,GAAG;IAClC,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,iBAAiB,GAAG;I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ClB,oBAAoB;IACpB,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB,sBAAsB,GACtB,sBAAsB,GACtB,yBAAyB,GACzB,mBAAmB,GACnB,qBAAqB,GACrB,qBAAqB,GACrB,uBAAuB,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,GACb,mBAAmB,GACnB,iBAAiB,CAAC;AAEtB,qGAAqG;AACrG,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,YAAY,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAIlD;CACF;AAqDD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,UAAU,GAAG,MAAM,EAC5B,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,GAAE,qBAA0B,GAClC,YAAY,CAuFd;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAK/E;AAED,qGAAqG;AACrG,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,IAAI,sBAAsB,CAEnF"}
|
|
@@ -179,12 +179,12 @@ function constructEvent(payload, headers, secrets, options = {}) {
|
|
|
179
179
|
}
|
|
180
180
|
return { id, type, createdAt: created_at, test: false, data: { accountId: account_id, assessmentsDeleted: assessments_deleted, deletedAt: deleted_at } };
|
|
181
181
|
}
|
|
182
|
-
if (type === "
|
|
182
|
+
if (type === "workspace.deleted") {
|
|
183
183
|
const { workspace_id, environment, deleted_at } = data;
|
|
184
184
|
if (typeof workspace_id !== "string" || !WORKSPACE_ID.test(workspace_id) ||
|
|
185
185
|
(environment !== "live" && environment !== "test") ||
|
|
186
186
|
typeof deleted_at !== "string" || !validDateTime(deleted_at)) {
|
|
187
|
-
fail("invalid_payload", "
|
|
187
|
+
fail("invalid_payload", "Workspace deleted event is malformed");
|
|
188
188
|
}
|
|
189
189
|
return { id, type, createdAt: created_at, test: false, data: { workspaceId: workspace_id, environment, deletedAt: deleted_at } };
|
|
190
190
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/webhooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,6CAA0D;AAC1D,MAAY,CAAC,wCAAoB;AACjC,oDAA0E;AAC1E,wFAA0H;AAC1H,0DAAmF;AAEtE,QAAA,yBAAyB,GAAG,GAAG,CAAC;AAE7C,MAAM,QAAQ,GAAG,CAAC,eAAe,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,sBAAsB,CAAU,CAAC;AACjH,MAAM,MAAM,GAAG,yBAAyB,CAAC;AACzC,MAAM,SAAS,GAAG,mBAAmB,CAAC;AACtC,MAAM,SAAS,GAAG,eAAe,CAAC;AAClC,MAAM,SAAS,GAAG,qBAAqB,CAAC;AACxC,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAChD,MAAM,aAAa,GAAG,8BAA8B,CAAC;AACrD,MAAM,UAAU,GAAG,sCAAsC,CAAC;AAC1D,MAAM,WAAW,GAAG,8BAA8B,CAAC;AACnD,MAAM,YAAY,GAAG,oCAAoC,CAAC;AAC1D,MAAM,QAAQ,GAAG,sEAAsE,CAAC;AA+JxF,qGAAqG;AACrG,8BAAsC,SAAQ,KAAK;IACxC,IAAI,CAAmB;IAChC,YAAY,IAAsB,EAAE,OAAe,EAAE;QACnD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAAA,CAClB;CACF;;AAED,SA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ED,mFAAmF;AACnF,8BAAqC,KAAmB,EAAyB;IAC/E,IAAI,KAAK,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;QAC3C,IAAI,CAAC,iBAAiB,EAAE,oCAAoC,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;AAAA,CAC5C;AAED,qGAAqG;AACrG,wBAA+B,KAAmB,EAAmC;IACnF,OAAO,KAAK,CAAC,IAAI,KAAK,oBAAoB,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC;AAAA,CAC/E"}
|
package/dist/esm/client.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export declare class Assessments {
|
|
|
78
78
|
private readonly inner;
|
|
79
79
|
constructor(inner: GeneratedAssessments);
|
|
80
80
|
/**
|
|
81
|
-
* Assess
|
|
81
|
+
* Assess an account creation, login or purchase. Returns the assessment whether the
|
|
82
82
|
* answer was 200 (complete or partial) or 202 (pending; see meta.retryAfter
|
|
83
83
|
* and assessments.wait). The idempotency key is generated when omitted and
|
|
84
84
|
* reused on every retry of this call.
|
|
@@ -131,7 +131,7 @@ export declare class Accounts {
|
|
|
131
131
|
listAssessments(accountId: string, options?: ListAssessmentsOptions): Promise<AssessmentPage>;
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
|
-
* Usage of the API keys your
|
|
134
|
+
* Usage of the API keys your platform issued to your accounts. Needs the
|
|
135
135
|
* `assess` scope. Most callers use `buffer()`, which batches facts and sends
|
|
136
136
|
* them in the background; `record` sends one batch now.
|
|
137
137
|
*/
|
package/dist/esm/client.js
CHANGED
|
@@ -135,7 +135,7 @@ export class Assessments {
|
|
|
135
135
|
this.inner = inner;
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
* Assess
|
|
138
|
+
* Assess an account creation, login or purchase. Returns the assessment whether the
|
|
139
139
|
* answer was 200 (complete or partial) or 202 (pending; see meta.retryAfter
|
|
140
140
|
* and assessments.wait). The idempotency key is generated when omitted and
|
|
141
141
|
* reused on every retry of this call.
|
|
@@ -249,7 +249,7 @@ export class Accounts {
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
|
-
* Usage of the API keys your
|
|
252
|
+
* Usage of the API keys your platform issued to your accounts. Needs the
|
|
253
253
|
* `assess` scope. Most callers use `buffer()`, which batches facts and sends
|
|
254
254
|
* them in the background; `record` sends one batch now.
|
|
255
255
|
*/
|
|
@@ -13,7 +13,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
13
13
|
* Page through one account's unexpired assessments.
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your
|
|
16
|
+
* The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope. The account_id travels in the URL; use POST /v1/assessments/query to keep it out of access logs.
|
|
17
17
|
*/
|
|
18
18
|
export declare function accountsListAssessments(client: NoResponseCore, request: operations.ListAccountAssessmentsRequest, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListAccountAssessmentsResponse, errors.BadRequestError | errors.AuthenticationError | errors.PermissionDeniedError | errors.NotFoundError | errors.ConflictError | errors.RateLimitError | NoResponseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
19
|
cursor: string;
|
|
@@ -14,7 +14,7 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
|
14
14
|
* Page through one account's unexpired assessments.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your
|
|
17
|
+
* The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope. The account_id travels in the URL; use POST /v1/assessments/query to keep it out of access logs.
|
|
18
18
|
*/
|
|
19
19
|
export function accountsListAssessments(client, request, options) {
|
|
20
20
|
return new APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Assess identifiers for a signup or gateway decision.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Assesses one
|
|
15
|
+
* Assesses one account creation, login or purchase (flow) and answers with the account's one current risk: account.risk.decision is the decision for this flow (allow, step_up, review or block, where block means your block threshold was reached), and detail holds this assessment's own facts. depth sets how long the answer waits for sources: quick waits only for the fast ones (500 ms), full for the whole budget (3000 ms at most); it defaults to full for account_creation and purchase and quick for login. 200 carries complete or partial, 202 carries pending with Location and Retry-After. While the account's first assessment is pending, account is absent: apply your own fallback for that, 429, 503 or a timeout. NoResponse blocks nothing itself; you decide. Requires the assess scope. Idempotency-Key is required and is bound to the body for 24 hours: the same key with the same body replays the latest assessment with Idempotent-Replayed: true and starts no new work; the same key with a different body answers 409 idempotency_key_reused. response_mode defaults to standard; detailed needs the detailed scope.
|
|
16
16
|
*/
|
|
17
17
|
export declare function assessmentsCreate(client: NoResponseCore, request: operations.CreateAssessmentRequest, options?: RequestOptions): APIPromise<Result<operations.CreateAssessmentResponse, errors.BadRequestError | errors.AuthenticationError | errors.PermissionDeniedError | errors.NotFoundError | errors.ConflictError | errors.RateLimitError | NoResponseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=assessments-create.d.ts.map
|
|
@@ -13,7 +13,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
13
13
|
* Assess identifiers for a signup or gateway decision.
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Assesses one
|
|
16
|
+
* Assesses one account creation, login or purchase (flow) and answers with the account's one current risk: account.risk.decision is the decision for this flow (allow, step_up, review or block, where block means your block threshold was reached), and detail holds this assessment's own facts. depth sets how long the answer waits for sources: quick waits only for the fast ones (500 ms), full for the whole budget (3000 ms at most); it defaults to full for account_creation and purchase and quick for login. 200 carries complete or partial, 202 carries pending with Location and Retry-After. While the account's first assessment is pending, account is absent: apply your own fallback for that, 429, 503 or a timeout. NoResponse blocks nothing itself; you decide. Requires the assess scope. Idempotency-Key is required and is bound to the body for 24 hours: the same key with the same body replays the latest assessment with Idempotent-Replayed: true and starts no new work; the same key with a different body answers 409 idempotency_key_reused. response_mode defaults to standard; detailed needs the detailed scope.
|
|
17
17
|
*/
|
|
18
18
|
export function assessmentsCreate(client, request, options) {
|
|
19
19
|
return new APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Poll the authoritative assessment of one assessment.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another
|
|
15
|
+
* Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another workspace's assessment, an unknown or expired assessment and a malformed assessment_id all answer 404 not_found. response_mode=detailed needs the detailed scope.
|
|
16
16
|
*/
|
|
17
17
|
export declare function assessmentsGet(client: NoResponseCore, request: operations.GetAssessmentRequest, options?: RequestOptions): APIPromise<Result<operations.GetAssessmentResponse, errors.BadRequestError | errors.AuthenticationError | errors.PermissionDeniedError | errors.NotFoundError | errors.ConflictError | errors.RateLimitError | NoResponseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=assessments-get.d.ts.map
|
|
@@ -13,7 +13,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
13
13
|
* Poll the authoritative assessment of one assessment.
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another
|
|
16
|
+
* Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another workspace's assessment, an unknown or expired assessment and a malformed assessment_id all answer 404 not_found. response_mode=detailed needs the detailed scope.
|
|
17
17
|
*/
|
|
18
18
|
export function assessmentsGet(client, request, options) {
|
|
19
19
|
return new APIPromise($do(client, request, options));
|
|
@@ -14,7 +14,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
14
14
|
* Page through one account's unexpired assessments.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your
|
|
17
|
+
* History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope.
|
|
18
18
|
*/
|
|
19
19
|
export declare function assessmentsQuery(client: NoResponseCore, request: models.AssessmentQuery, options?: RequestOptions): APIPromise<PageIterator<Result<operations.QueryAccountAssessmentsResponse, errors.BadRequestError | errors.AuthenticationError | errors.PermissionDeniedError | errors.NotFoundError | errors.ConflictError | errors.RateLimitError | NoResponseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
20
20
|
cursor: string;
|
|
@@ -15,7 +15,7 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
|
15
15
|
* Page through one account's unexpired assessments.
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your
|
|
18
|
+
* History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope.
|
|
19
19
|
*/
|
|
20
20
|
export function assessmentsQuery(client, request, options) {
|
|
21
21
|
return new APIPromise($do(client, request, options));
|
|
@@ -9,7 +9,7 @@ import * as operations from "../models/operations/index.js";
|
|
|
9
9
|
import { APIPromise } from "../types/async.js";
|
|
10
10
|
import { Result } from "../types/fp.js";
|
|
11
11
|
/**
|
|
12
|
-
* List the
|
|
12
|
+
* List the workspace's integrations.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Every integration, oldest first. Listings carry no secrets. Requires the integrations scope.
|
|
@@ -7,7 +7,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
7
7
|
import * as operations from "../models/operations/index.js";
|
|
8
8
|
import { APIPromise } from "../types/async.js";
|
|
9
9
|
/**
|
|
10
|
-
* List the
|
|
10
|
+
* List the workspace's integrations.
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
13
|
* Every integration, oldest first. Listings carry no secrets. Requires the integrations scope.
|
|
@@ -9,10 +9,10 @@ import * as operations from "../models/operations/index.js";
|
|
|
9
9
|
import { APIPromise } from "../types/async.js";
|
|
10
10
|
import { Result } from "../types/fp.js";
|
|
11
11
|
/**
|
|
12
|
-
* Report requests made with API keys your
|
|
12
|
+
* Report requests made with API keys your platform issued.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Records requests made with API keys your
|
|
15
|
+
* Records requests made with API keys your platform issued to your accounts, one event per request: the key's SHA-256 (the issued_credential.sha256 the account's assessment carried), the client IP, the time and optionally the user agent, model and token counts. Most callers use the SDK's usage buffer, which batches events and sends them in the background. Sampling is allowed: sample_rate weights an event's request and token counts. Requires the assess scope. Idempotency-Key is required and handled as on POST /v1/assessments: a retry with the same key and body answers the same record with Idempotent-Replayed: true and counts nothing again; a different body answers 409. A batch holds 1 to 500 events and at most 256 KiB. No raw event is kept: usage is aggregated per key, and IPs, user agents and models are kept only as keyed digests, with the IP's country, for 24 hours. When one key is used from 20 or more IP addresses, or 3 or more countries, within 24 hours, every account whose assessment carried that key gets the shared_api_key reason for 30 days.
|
|
16
16
|
*/
|
|
17
17
|
export declare function keyUsageRecord(client: NoResponseCore, request: operations.RecordKeyUsageRequest, options?: RequestOptions): APIPromise<Result<operations.RecordKeyUsageResponse, errors.BadRequestError | errors.AuthenticationError | errors.PermissionDeniedError | errors.NotFoundError | errors.ConflictError | errors.RateLimitError | NoResponseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=key-usage-record.d.ts.map
|
|
@@ -10,10 +10,10 @@ import * as errors from "../models/errors/index.js";
|
|
|
10
10
|
import * as operations from "../models/operations/index.js";
|
|
11
11
|
import { APIPromise } from "../types/async.js";
|
|
12
12
|
/**
|
|
13
|
-
* Report requests made with API keys your
|
|
13
|
+
* Report requests made with API keys your platform issued.
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Records requests made with API keys your
|
|
16
|
+
* Records requests made with API keys your platform issued to your accounts, one event per request: the key's SHA-256 (the issued_credential.sha256 the account's assessment carried), the client IP, the time and optionally the user agent, model and token counts. Most callers use the SDK's usage buffer, which batches events and sends them in the background. Sampling is allowed: sample_rate weights an event's request and token counts. Requires the assess scope. Idempotency-Key is required and handled as on POST /v1/assessments: a retry with the same key and body answers the same record with Idempotent-Replayed: true and counts nothing again; a different body answers 409. A batch holds 1 to 500 events and at most 256 KiB. No raw event is kept: usage is aggregated per key, and IPs, user agents and models are kept only as keyed digests, with the IP's country, for 24 hours. When one key is used from 20 or more IP addresses, or 3 or more countries, within 24 hours, every account whose assessment carried that key gets the shared_api_key reason for 30 days.
|
|
17
17
|
*/
|
|
18
18
|
export function keyUsageRecord(client, request, options) {
|
|
19
19
|
return new APIPromise($do(client, request, options));
|