@noresponse/node 4.0.1 → 5.0.1
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 +39 -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-attempt.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/models/webhook-replay.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-attempt.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/models/webhook-replay.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
|
@@ -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));
|
|
@@ -13,7 +13,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
13
13
|
* List an endpoint's delivery attempts.
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* 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
|
|
16
|
+
* 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.
|
|
17
17
|
*/
|
|
18
18
|
export declare function webhookEndpointsListDeliveries(client: NoResponseCore, request: operations.ListWebhookDeliveriesRequest, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListWebhookDeliveriesResponse, 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
|
* List an endpoint's delivery attempts.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* 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
|
|
17
|
+
* 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.
|
|
18
18
|
*/
|
|
19
19
|
export function webhookEndpointsListDeliveries(client, request, options) {
|
|
20
20
|
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 webhook endpoints.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* 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.
|
|
@@ -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 webhook endpoints.
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
13
|
* 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.
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { NoResponse, Assessments, Accounts, Keys, KeyUsage, WebhookEndpoints, Integrations, DEFAULT_BASE_URL, DEFAULT_TIMEOUT_MS, type NoResponseOptions, type CreateOptions, type GetOptions, type ListAssessmentsOptions, type AssessmentPage, type ListDeliveriesOptions, type DeliveryPage, type ResponseMeta, type WithMeta, type WaitOptions, } from "./client.js";
|
|
6
6
|
export * from "./errors.js";
|
|
7
|
-
export { constructEvent, verificationResponse, isExpiredEvent, WebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, type WebhookEvent, type AssessmentUpdatedEvent, type AssessmentExpiredEvent, type EndpointVerificationEvent, type AccountDeletedEvent, type
|
|
7
|
+
export { constructEvent, verificationResponse, isExpiredEvent, WebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, type WebhookEvent, type AssessmentUpdatedEvent, type AssessmentExpiredEvent, type EndpointVerificationEvent, type AccountDeletedEvent, type WorkspaceDeletedEvent, type EndpointDisabledEvent, type AccountRiskChangedEvent, type AssessmentExpired, type EndpointVerification, type AccountDeleted, type WorkspaceDeleted, type EndpointDisabled, type AccountRiskChanged, type ConstructEventOptions, type HeaderInput, type WebhookSecrets, type WebhookErrorCode, } from "./webhooks.js";
|
|
8
8
|
export { handleLateResult, lateResultAction, clerkActions, workosActions, auth0Actions, logOnlyActions, ProviderActionError, DEFAULT_LATE_RESULT_POLICY, type LateResult, type LateResultAction, type LateResultOptions, type LateResultPolicy, type LateResultActor, type LateResultProvider, type ClerkActionsOptions, type WorkOSActionsOptions, type Auth0ActionsOptions, type LogOnlyActionsOptions, } from "./late-results.js";
|
|
9
9
|
export { fromAuth0, fromClerk, fromCognito, fromEntra, fromFirebase, fromKeycloak, fromOIDC, fromOry, fromOryOAuth2, fromSupabase, fromWorkOS, type VerifiedClaims, type AuthContextOverrides, } from "./auth.js";
|
|
10
10
|
export { DEFAULT_WAIT_TIMEOUT_MS, MIN_POLL_INTERVAL_MS } from "./wait.js";
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AACrB,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AACrB,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,aAAa,EACb,YAAY,EACZ,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,oBAAoB,GAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,YAAY,EACV,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,KAAK,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACjF,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SHA-256 of an API key your
|
|
2
|
+
* SHA-256 of an API key your platform issued to the new account, as 64
|
|
3
3
|
* lower-case hex characters. The key never leaves your backend: send only this
|
|
4
4
|
* hash, as `issuedCredential.sha256` on the assessment request. The key is
|
|
5
5
|
* hashed as its UTF-8 bytes exactly as given, with no trimming or
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
/**
|
|
3
|
-
* SHA-256 of an API key your
|
|
3
|
+
* SHA-256 of an API key your platform issued to the new account, as 64
|
|
4
4
|
* lower-case hex characters. The key never leaves your backend: send only this
|
|
5
5
|
* hash, as `issuedCredential.sha256` on the assessment request. The key is
|
|
6
6
|
* hashed as its UTF-8 bytes exactly as given, with no trimming or
|
package/dist/esm/key-usage.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The key usage buffer. Hand-written; not generated.
|
|
3
3
|
*
|
|
4
|
-
* Your API gateway calls `record` once per request made with a key your
|
|
5
|
-
*
|
|
4
|
+
* Your API gateway calls `record` once per request made with a key your platform
|
|
5
|
+
* issued. The buffer keeps the facts in memory and sends them to POST
|
|
6
6
|
* /v1/key_usage/batches in the background: when `batchSize` facts are queued,
|
|
7
7
|
* every `flushIntervalMs`, and on `flush()` or `close()`. `record` never
|
|
8
8
|
* blocks and never throws. When the queue is full the oldest fact is dropped
|
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: "
|
|
34
|
+
readonly sdkVersion: "5.0.1";
|
|
35
35
|
readonly genVersion: "internal";
|
|
36
|
-
readonly userAgent: "noresponse-sdk/typescript
|
|
36
|
+
readonly userAgent: "noresponse-sdk/typescript 5.0.1 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: "
|
|
27
|
+
sdkVersion: "5.0.1",
|
|
28
28
|
genVersion: "internal",
|
|
29
|
-
userAgent: "noresponse-sdk/typescript
|
|
29
|
+
userAgent: "noresponse-sdk/typescript 5.0.1 internal 1 @noresponse/node",
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=config.js.map
|
|
@@ -3,13 +3,13 @@ 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
|
|
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.
|
|
7
7
|
*/
|
|
8
8
|
export type AccountDecisionsByFlow = {
|
|
9
9
|
/**
|
|
10
10
|
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
accountCreation: AccountDecision;
|
|
13
13
|
/**
|
|
14
14
|
* block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. Your application applies it.
|
|
15
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-decisions-by-flow.d.ts","sourceRoot":"","sources":["../../../src/models/account-decisions-by-flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"account-decisions-by-flow.d.ts","sourceRoot":"","sources":["../../../src/models/account-decisions-by-flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;IACjC;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,WAAW,CAC9D,sBAAsB,EACtB,OAAO,CAYR,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
2
3
|
import { safeParse } from "../lib/schemas.js";
|
|
3
4
|
import { AccountDecision$inboundSchema, } from "./account-decision.js";
|
|
4
5
|
/** @internal */
|
|
5
|
-
export const AccountDecisionsByFlow$inboundSchema = z.object({
|
|
6
|
-
|
|
6
|
+
export const AccountDecisionsByFlow$inboundSchema = z.pipe(z.object({
|
|
7
|
+
account_creation: AccountDecision$inboundSchema,
|
|
7
8
|
login: AccountDecision$inboundSchema,
|
|
8
9
|
purchase: AccountDecision$inboundSchema,
|
|
9
|
-
})
|
|
10
|
+
}), z.transform((v) => {
|
|
11
|
+
return remap$(v, {
|
|
12
|
+
"account_creation": "accountCreation",
|
|
13
|
+
});
|
|
14
|
+
}));
|
|
10
15
|
export function accountDecisionsByFlowFromJSON(jsonString) {
|
|
11
16
|
return safeParse(jsonString, (x) => AccountDecisionsByFlow$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountDecisionsByFlow' from JSON`);
|
|
12
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-decisions-by-flow.js","sourceRoot":"","sources":["../../../src/models/account-decisions-by-flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAEL,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAqB/B,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAG7C,CAAC,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"account-decisions-by-flow.js","sourceRoot":"","sources":["../../../src/models/account-decisions-by-flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAEL,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAqB/B,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAG7C,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,gBAAgB,EAAE,6BAA6B;IAC/C,KAAK,EAAE,6BAA6B;IACpC,QAAQ,EAAE,6BAA6B;CACxC,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,kBAAkB,EAAE,iBAAiB;KACtC,CAAC,CAAC;AAAA,CACJ,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,8BAA8B,CAC5C,UAAkB,EAC2C;IAC7D,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oCAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AAAA,CACH"}
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4-mini";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
4
4
|
/**
|
|
5
|
-
* Body of the 200 answer to DELETE /v1/accounts/{account_id}: the calling
|
|
5
|
+
* Body of the 200 answer to DELETE /v1/accounts/{account_id}: the calling workspace's account was erased in the environment of the calling key. Every assessment of the account went, with its revisions, evidence, outcomes and the identity-graph marks its outcomes set, and an assessment that was still running when the call arrived is stopped. Afterwards GET /v1/accounts/{account_id} and GET /v1/assessments/{assessment_id} of each erased assessment answer 404, and the history page is empty. The call is idempotent: a repeat, or an account with nothing to erase, answers 200 with assessments_deleted 0. The account_id can be assessed again later, as a new account.
|
|
6
6
|
*/
|
|
7
7
|
export type AccountDeletion = {
|
|
8
8
|
/**
|
|
@@ -4,7 +4,7 @@ import { AccountDecisionsByFlow } from "./account-decisions-by-flow.js";
|
|
|
4
4
|
import { AccountRisk } from "./account-risk.js";
|
|
5
5
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
6
6
|
/**
|
|
7
|
-
* Body of the 200 answer to GET /v1/accounts/{account_id}: the one current risk of one of the calling
|
|
7
|
+
* Body of the 200 answer to GET /v1/accounts/{account_id}: the one current risk of one of the calling workspace's accounts. It is the risk of the account's latest assessment that has a decision (status complete or partial), by created_at and then assessment_id, scored exactly as GET /v1/assessments/{assessment_id} scores that assessment, plus the account's own reason shared_api_key when a key issued to the account was used from many IP addresses or countries (POST /v1/key_usage/batches). Its assessments are the account's history (GET /v1/accounts/{account_id}/assessments).
|
|
8
8
|
*/
|
|
9
9
|
export type Account = {
|
|
10
10
|
/**
|
|
@@ -12,12 +12,12 @@ export type Account = {
|
|
|
12
12
|
*/
|
|
13
13
|
schemaVersion: "1";
|
|
14
14
|
/**
|
|
15
|
-
* The account_id the
|
|
15
|
+
* The account_id the workspace sends with its assessments.
|
|
16
16
|
*/
|
|
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
|
|
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.
|
|
21
21
|
*/
|
|
22
22
|
decisionsByFlow: AccountDecisionsByFlow;
|
|
23
23
|
/**
|
|
@@ -3,7 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { AssessmentDeletionAccount } from "./assessment-deletion-account.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
5
|
/**
|
|
6
|
-
* Body of the 200 answer to DELETE /v1/assessments/{assessment_id}: one of the calling
|
|
6
|
+
* Body of the 200 answer to DELETE /v1/assessments/{assessment_id}: one of the calling workspace's assessments was deleted, with its versions, evidence, outcomes and the identity-graph marks its outcomes set. Afterwards GET /v1/assessments/{assessment_id} answers 404 and the assessment leaves the account's history. The account is scored again from what remains: account.current_assessment_id names the assessment GET /v1/accounts/{account_id} now serves its risk from, and is absent when the account has no assessment with a decision left. Deleting an assessment that is already gone answers 404.
|
|
7
7
|
*/
|
|
8
8
|
export type AssessmentDeletion = {
|
|
9
9
|
/**
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
|
4
4
|
import { HookPoint } from "./hook-point.js";
|
|
5
5
|
import { Transport } from "./transport.js";
|
|
6
6
|
/**
|
|
7
|
-
* The identity fields of the auth context the assessment was made with, echoed for the
|
|
7
|
+
* The identity fields of the auth context the assessment was made with, echoed for the workspace's own correlation: the request's auth_context, or the one a hosted provider hook (POST /hooks/{integration_id}) built, with transport provider_hook and its hook_point. Present exactly when the request carried an auth_context, and the same on every revision of the assessment. Values are as the request or the hook sent them; tokens, timestamps, roles and scopes are not echoed, and the echo does not change the score.
|
|
8
8
|
*/
|
|
9
9
|
export type AssessmentDetailAuthContext = {
|
|
10
10
|
/**
|
|
@@ -18,11 +18,11 @@ export type AssessmentDetail = {
|
|
|
18
18
|
*/
|
|
19
19
|
schemaVersion: "1";
|
|
20
20
|
/**
|
|
21
|
-
* Opaque, server-assigned assessment id: 'asm_' and a 26-character Crockford base32 ULID. Unique within the
|
|
21
|
+
* Opaque, server-assigned assessment id: 'asm_' and a 26-character Crockford base32 ULID. Unique within the workspace; another workspace's assessment id answers 404.
|
|
22
22
|
*/
|
|
23
23
|
assessmentId: string;
|
|
24
24
|
/**
|
|
25
|
-
* Your own opaque identifier for the account being checked, scoped to your
|
|
25
|
+
* Your own opaque identifier for the account being checked, scoped to your workspace. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
|
|
26
26
|
*/
|
|
27
27
|
accountId: string;
|
|
28
28
|
/**
|
|
@@ -54,7 +54,7 @@ export type AssessmentDetail = {
|
|
|
54
54
|
*/
|
|
55
55
|
incompleteSources: Array<IncompleteSource>;
|
|
56
56
|
/**
|
|
57
|
-
* Version of the hand-authored heuristic weights that produced the recommendation, for example 'risk-2026-10.7'. A
|
|
57
|
+
* 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'.
|
|
58
58
|
*/
|
|
59
59
|
policyVersion: string;
|
|
60
60
|
/**
|
|
@@ -80,7 +80,7 @@ export type AssessmentDetail = {
|
|
|
80
80
|
assessmentUrl?: string | undefined;
|
|
81
81
|
timing: AssessmentDetailTiming;
|
|
82
82
|
/**
|
|
83
|
-
* The identity fields of the auth context the assessment was made with, echoed for the
|
|
83
|
+
* The identity fields of the auth context the assessment was made with, echoed for the workspace's own correlation: the request's auth_context, or the one a hosted provider hook (POST /hooks/{integration_id}) built, with transport provider_hook and its hook_point. Present exactly when the request carried an auth_context, and the same on every revision of the assessment. Values are as the request or the hook sent them; tokens, timestamps, roles and scopes are not echoed, and the echo does not change the score.
|
|
84
84
|
*/
|
|
85
85
|
authContext?: AssessmentDetailAuthContext | undefined;
|
|
86
86
|
};
|
|
@@ -3,7 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { AssessmentDetail } from "./assessment-detail.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
5
|
/**
|
|
6
|
-
* Body of the 200 answer to POST /v1/assessments/query: one page of the calling
|
|
6
|
+
* Body of the 200 answer to POST /v1/assessments/query: one page of the calling workspace's unexpired assessments for one account, newest first, each at its latest assessment_version, as its detail; the account's current risk is GET /v1/accounts/{account_id}. Every item's account_id equals the page's. An assessment past its expires_at is not listed. next_cursor is present only when another page exists.
|
|
7
7
|
*/
|
|
8
8
|
export type AssessmentList = {
|
|
9
9
|
/**
|
|
@@ -11,12 +11,12 @@ export type AssessmentList = {
|
|
|
11
11
|
*/
|
|
12
12
|
schemaVersion: "1";
|
|
13
13
|
/**
|
|
14
|
-
* Your own opaque identifier for the account being checked, scoped to your
|
|
14
|
+
* Your own opaque identifier for the account being checked, scoped to your workspace. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
|
|
15
15
|
*/
|
|
16
16
|
accountId: string;
|
|
17
17
|
items: Array<AssessmentDetail>;
|
|
18
18
|
/**
|
|
19
|
-
* Opaque cursor for the next page, bound to your
|
|
19
|
+
* Opaque cursor for the next page, bound to your workspace and the account_id it was issued for. Pass it back unchanged in the next query; a tampered, foreign or expired cursor answers 400 invalid_cursor.
|
|
20
20
|
*/
|
|
21
21
|
nextCursor?: string | undefined;
|
|
22
22
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { Outcome } from "./outcome.js";
|
|
3
3
|
/**
|
|
4
|
-
* POST /v1/assessments/{assessment_id}/outcomes body: what the provider later learned about the account it assessed. The assessment is named by the path and the
|
|
4
|
+
* POST /v1/assessments/{assessment_id}/outcomes body: what the provider later learned about the account it assessed. The assessment is named by the path and the workspace by the API key, so neither is a body member. Idempotency-Key is required and binds the body as it does on POST /v1/assessments.
|
|
5
5
|
*/
|
|
6
6
|
export type AssessmentOutcomeRequest = {
|
|
7
7
|
/**
|
|
8
|
-
* What the provider later learned about the assessed account. confirmed_abuse, account_takeover and chargeback report abuse; false_positive and legitimate withdraw an earlier abuse report of this
|
|
8
|
+
* What the provider later learned about the assessed account. confirmed_abuse, account_takeover and chargeback report abuse; false_positive and legitimate withdraw an earlier abuse report of this workspace for the assessment; unknown is recorded only. Outcomes are append-only and the latest one recorded for an assessment wins.
|
|
9
9
|
*/
|
|
10
10
|
outcome: Outcome;
|
|
11
11
|
/**
|
|
@@ -7,15 +7,15 @@ import { Outcome } from "./outcome.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export type AssessmentOutcome = {
|
|
9
9
|
/**
|
|
10
|
-
* Opaque, server-assigned id of one recorded outcome: 'out_' and a 26-character Crockford base32 ULID. Unique within the
|
|
10
|
+
* Opaque, server-assigned id of one recorded outcome: 'out_' and a 26-character Crockford base32 ULID. Unique within the workspace.
|
|
11
11
|
*/
|
|
12
12
|
id: string;
|
|
13
13
|
/**
|
|
14
|
-
* Opaque, server-assigned assessment id: 'asm_' and a 26-character Crockford base32 ULID. Unique within the
|
|
14
|
+
* Opaque, server-assigned assessment id: 'asm_' and a 26-character Crockford base32 ULID. Unique within the workspace; another workspace's assessment id answers 404.
|
|
15
15
|
*/
|
|
16
16
|
assessmentId: string;
|
|
17
17
|
/**
|
|
18
|
-
* What the provider later learned about the assessed account. confirmed_abuse, account_takeover and chargeback report abuse; false_positive and legitimate withdraw an earlier abuse report of this
|
|
18
|
+
* What the provider later learned about the assessed account. confirmed_abuse, account_takeover and chargeback report abuse; false_positive and legitimate withdraw an earlier abuse report of this workspace for the assessment; unknown is recorded only. Outcomes are append-only and the latest one recorded for an assessment wins.
|
|
19
19
|
*/
|
|
20
20
|
outcome: Outcome;
|
|
21
21
|
/**
|
|
@@ -5,12 +5,12 @@ import { ResponseMode } from "./response-mode.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export type AssessmentQuery = {
|
|
7
7
|
/**
|
|
8
|
-
* Your own opaque identifier for the account being checked, scoped to your
|
|
8
|
+
* Your own opaque identifier for the account being checked, scoped to your workspace. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
|
|
9
9
|
*/
|
|
10
10
|
accountId: string;
|
|
11
11
|
limit?: number | undefined;
|
|
12
12
|
/**
|
|
13
|
-
* next_cursor from the previous page, unchanged. Opaque, MAC'd and bound to the
|
|
13
|
+
* next_cursor from the previous page, unchanged. Opaque, MAC'd and bound to the workspace and account_id.
|
|
14
14
|
*/
|
|
15
15
|
cursor?: string | undefined;
|
|
16
16
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { Platform } from "./platform.js";
|
|
3
3
|
/**
|
|
4
|
-
* Optional context observed by
|
|
4
|
+
* Optional context observed by the client of the user. The server parses these hints into coarse features, leaves raw user_agent and opaque ids out of every answer, and weighs a mismatch with the other evidence.
|
|
5
5
|
*/
|
|
6
6
|
export type AssessmentRequestClientContext = {
|
|
7
7
|
/**
|
|
@@ -21,15 +21,15 @@ export type AssessmentRequestClientContext = {
|
|
|
21
21
|
*/
|
|
22
22
|
appVersion?: string | undefined;
|
|
23
23
|
/**
|
|
24
|
-
* The raw User-Agent header of the
|
|
24
|
+
* The raw User-Agent header of the request that the user sent, at most 512 characters. It is parsed into coarse features and left out of every answer.
|
|
25
25
|
*/
|
|
26
26
|
userAgent?: string | undefined;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Workspace-scoped opaque identifier your application mints and rotates when the account or device changes. Send an id of your own, not a hardware fingerprint.
|
|
29
29
|
*/
|
|
30
30
|
deviceId?: string | undefined;
|
|
31
31
|
/**
|
|
32
|
-
* Opaque signup session identifier. It is used for
|
|
32
|
+
* Opaque signup session identifier. It is used for workspace-scoped velocity and replay checks only.
|
|
33
33
|
*/
|
|
34
34
|
sessionId?: string | undefined;
|
|
35
35
|
/**
|
|
@@ -20,7 +20,7 @@ export type AssessmentRequestIdentifiers = {
|
|
|
20
20
|
*/
|
|
21
21
|
name?: string | undefined;
|
|
22
22
|
/**
|
|
23
|
-
* The
|
|
23
|
+
* The account_creation's client IP address: an IPv4 dotted quad without leading zeros, or an IPv6 address in its RFC 5952 text form (lower case, no leading zeros, the longest zero run compressed). Send an IPv4 client as a dotted quad, not IPv4-mapped. No zone, port or prefix. The server refuses a non-canonical IPv6 spelling, and every private, loopback, link-local, multicast, documentation or otherwise reserved address (the IANA special-purpose registries), with 400: only a public address says anything about a signup.
|
|
24
24
|
*/
|
|
25
25
|
ip?: string | undefined;
|
|
26
26
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
/**
|
|
3
|
-
* Optional. When
|
|
3
|
+
* Optional. When your platform issues an API key to the new account, send SHA-256 of that key, so later usage of the key, or a leaked copy, ties back to this assessment. Each SDK has a helper that computes it. Send only the hash: customer keys are high-entropy, so the hash reveals nothing about them. The assessment stores it, and no response, webhook or log carries it.
|
|
4
4
|
*/
|
|
5
5
|
export type AssessmentRequestIssuedCredential = {
|
|
6
6
|
/**
|
|
@@ -4,7 +4,7 @@ import * as z from "zod/v4-mini";
|
|
|
4
4
|
*/
|
|
5
5
|
export type AssessmentRequestPolicyContext = {
|
|
6
6
|
/**
|
|
7
|
-
* ISO 3166-1 alpha-2 region of the
|
|
7
|
+
* ISO 3166-1 alpha-2 region of the user, as the provider determines it.
|
|
8
8
|
*/
|
|
9
9
|
region?: string | undefined;
|
|
10
10
|
};
|
|
@@ -8,15 +8,15 @@ import { Depth } from "./depth.js";
|
|
|
8
8
|
import { Flow } from "./flow.js";
|
|
9
9
|
import { ResponseMode } from "./response-mode.js";
|
|
10
10
|
/**
|
|
11
|
-
* POST /v1/assessments body. At least one of email, username or phone is required; name and ip only refine an assessment. No field carries a password, hash, token or breach value, and unknown members are refused. The email local part is kept as received and only the domain is lower-cased; the username is compared case-insensitively; the phone is strict E.164 and is assessed asynchronously. The whole body is capped at 32768 bytes. client_context holds bounded hints from the
|
|
11
|
+
* POST /v1/assessments body. At least one of email, username or phone is required; name and ip only refine an assessment. No field carries a password, hash, token or breach value, and unknown members are refused. The email local part is kept as received and only the domain is lower-cased; the username is compared case-insensitively; the phone is strict E.164 and is assessed asynchronously. The whole body is capped at 32768 bytes. client_context holds bounded hints from the client of the user; auth_context holds normalised claims from a session your backend has verified. Raw tokens are refused.
|
|
12
12
|
*/
|
|
13
13
|
export type AssessmentRequest = {
|
|
14
14
|
/**
|
|
15
|
-
* Your own opaque identifier for the account being checked, scoped to your
|
|
15
|
+
* Your own opaque identifier for the account being checked, scoped to your workspace. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
|
|
16
16
|
*/
|
|
17
17
|
accountId: string;
|
|
18
18
|
/**
|
|
19
|
-
* The
|
|
19
|
+
* The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
|
|
20
20
|
*/
|
|
21
21
|
flow: Flow;
|
|
22
22
|
/**
|
|
@@ -44,7 +44,7 @@ export type AssessmentRequest = {
|
|
|
44
44
|
*/
|
|
45
45
|
responseMode?: ResponseMode | undefined;
|
|
46
46
|
/**
|
|
47
|
-
* Optional context observed by
|
|
47
|
+
* Optional context observed by the client of the user. The server parses these hints into coarse features, leaves raw user_agent and opaque ids out of every answer, and weighs a mismatch with the other evidence.
|
|
48
48
|
*/
|
|
49
49
|
clientContext?: AssessmentRequestClientContext | undefined;
|
|
50
50
|
/**
|
|
@@ -52,7 +52,7 @@ export type AssessmentRequest = {
|
|
|
52
52
|
*/
|
|
53
53
|
authContext?: AuthContext | undefined;
|
|
54
54
|
/**
|
|
55
|
-
* Optional. When
|
|
55
|
+
* Optional. When your platform issues an API key to the new account, send SHA-256 of that key, so later usage of the key, or a leaked copy, ties back to this assessment. Each SDK has a helper that computes it. Send only the hash: customer keys are high-entropy, so the hash reveals nothing about them. The assessment stores it, and no response, webhook or log carries it.
|
|
56
56
|
*/
|
|
57
57
|
issuedCredential?: AssessmentRequestIssuedCredential | undefined;
|
|
58
58
|
};
|
|
@@ -23,7 +23,7 @@ export type Assessment = {
|
|
|
23
23
|
*/
|
|
24
24
|
status: Status;
|
|
25
25
|
/**
|
|
26
|
-
* The
|
|
26
|
+
* The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
|
|
27
27
|
*/
|
|
28
28
|
flow: Flow;
|
|
29
29
|
/**
|
|
@@ -31,7 +31,7 @@ export type Assessment = {
|
|
|
31
31
|
*/
|
|
32
32
|
depth: Depth;
|
|
33
33
|
/**
|
|
34
|
-
* Body of the 200 answer to GET /v1/accounts/{account_id}: the one current risk of one of the calling
|
|
34
|
+
* Body of the 200 answer to GET /v1/accounts/{account_id}: the one current risk of one of the calling workspace's accounts. It is the risk of the account's latest assessment that has a decision (status complete or partial), by created_at and then assessment_id, scored exactly as GET /v1/assessments/{assessment_id} scores that assessment, plus the account's own reason shared_api_key when a key issued to the account was used from many IP addresses or countries (POST /v1/key_usage/batches). Its assessments are the account's history (GET /v1/accounts/{account_id}/assessments).
|
|
35
35
|
*/
|
|
36
36
|
account?: Account | undefined;
|
|
37
37
|
/**
|
|
@@ -36,7 +36,7 @@ export type AuthContext = {
|
|
|
36
36
|
*/
|
|
37
37
|
organizationId?: string | undefined;
|
|
38
38
|
/**
|
|
39
|
-
* The provider
|
|
39
|
+
* The provider workspace identifier, when distinct from organization_id.
|
|
40
40
|
*/
|
|
41
41
|
tenantId?: string | undefined;
|
|
42
42
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
4
|
+
* The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
|
|
5
5
|
*/
|
|
6
6
|
export declare const Flow: {
|
|
7
|
-
readonly
|
|
7
|
+
readonly AccountCreation: "account_creation";
|
|
8
8
|
readonly Login: "login";
|
|
9
9
|
readonly Purchase: "purchase";
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* The
|
|
12
|
+
* The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
|
|
13
13
|
*/
|
|
14
14
|
export type Flow = OpenEnum<typeof Flow>;
|
|
15
15
|
/** @internal */
|
package/dist/esm/models/flow.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as openEnums from "../types/enums.js";
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
3
|
+
* The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
|
|
4
4
|
*/
|
|
5
5
|
export const Flow = {
|
|
6
|
-
|
|
6
|
+
AccountCreation: "account_creation",
|
|
7
7
|
Login: "login",
|
|
8
8
|
Purchase: "purchase",
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../../src/models/flow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,
|
|
1
|
+
{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../../src/models/flow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,eAAe,EAAE,kBAAkB;IACnC,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACZ,CAAC;AAMX,gBAAgB;AAChB,MAAM,CAAC,MAAM,kBAAkB,GAAiC,SAAS;KACtE,aAAa,CAAC,IAAI,CAAC,CAAC;AACvB,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAgC,SAAS;KACtE,cAAc,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -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 { Integration } from "./integration.js";
|
|
5
5
|
/**
|
|
6
|
-
* GET /v1/integrations: every integration of the
|
|
6
|
+
* GET /v1/integrations: every integration of the workspace, oldest first, at most 10. No secret is ever listed.
|
|
7
7
|
*/
|
|
8
8
|
export type IntegrationList = {
|
|
9
9
|
items: Array<Integration>;
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4-mini";
|
|
|
2
2
|
import { IntegrationHookPoint } from "./integration-hook-point.js";
|
|
3
3
|
import { IntegrationPlatform } from "./integration-platform.js";
|
|
4
4
|
/**
|
|
5
|
-
* POST /v1/integrations body. Registers a hosted endpoint for one authentication provider. The
|
|
5
|
+
* POST /v1/integrations body. Registers a hosted endpoint for one authentication provider. The workspace is the API key that signs the request, so the body has no workspace field and refuses one like any other unknown member. A WorkOS integration needs signing_secret, the Actions secret shown in the WorkOS dashboard, which NoResponse uses to verify each Action request and to sign its answer. An Auth0 integration sends no signing_secret: NoResponse generates the shared secret and returns it once.
|
|
6
6
|
*/
|
|
7
7
|
export type IntegrationRequest = {
|
|
8
8
|
/**
|
|
@@ -8,7 +8,7 @@ import { IntegrationPlatform } from "./integration-platform.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export type Integration = {
|
|
10
10
|
/**
|
|
11
|
-
* Opaque, server-assigned integration id: int_ and a 26-character Crockford base32 ULID. Another
|
|
11
|
+
* Opaque, server-assigned integration id: int_ and a 26-character Crockford base32 ULID. Another workspace's integration id answers 404.
|
|
12
12
|
*/
|
|
13
13
|
integrationId: string;
|
|
14
14
|
/**
|