@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
|
@@ -8,10 +8,10 @@ export const IpSummary$inboundSchema = z
|
|
|
8
8
|
.pipe(z.object({
|
|
9
9
|
country: types.optional(types.string()),
|
|
10
10
|
type: types.optional(IpSummaryType$inboundSchema),
|
|
11
|
-
|
|
11
|
+
seen_in_workspace: types.optional(types.number()),
|
|
12
12
|
}), z.transform((v) => {
|
|
13
13
|
return remap$(v, {
|
|
14
|
-
"
|
|
14
|
+
"seen_in_workspace": "seenInWorkspace",
|
|
15
15
|
});
|
|
16
16
|
}));
|
|
17
17
|
export function ipSummaryFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ip-summary.js","sourceRoot":"","sources":["../../../src/models/ip-summary.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,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAEL,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAoB9B,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAAsC,CAAC;KACxE,IAAI,CACH,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACvC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IACjD,
|
|
1
|
+
{"version":3,"file":"ip-summary.js","sourceRoot":"","sources":["../../../src/models/ip-summary.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,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAEL,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAoB9B,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAAsC,CAAC;KACxE,IAAI,CACH,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACvC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IACjD,iBAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;CAClD,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,mBAAmB,EAAE,iBAAiB;KACvC,CAAC,CAAC;AAAA,CACJ,CAAC,CACH,CAAC;AAEJ,MAAM,UAAU,iBAAiB,CAC/B,UAAkB,EAC8B;IAChD,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnD,uCAAuC,CACxC,CAAC;AAAA,CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
/**
|
|
3
|
-
* POST /v1/keys/rotate body. The
|
|
3
|
+
* POST /v1/keys/rotate body. The workspace and the key being rotated are the API key that signs the request, so neither is a body member. An empty object takes the default overlap.
|
|
4
4
|
*/
|
|
5
5
|
export type KeyRotationRequest = {
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { KeyUsageEvent, KeyUsageEvent$Outbound } from "./key-usage-event.js";
|
|
3
3
|
/**
|
|
4
|
-
* POST /v1/key_usage/batches body: facts about requests made with API keys your
|
|
4
|
+
* POST /v1/key_usage/batches body: facts about requests made with API keys your platform issued to your accounts, one event per request. Each event names the key by the SHA-256 that the assessment's issued_credential.sha256 carried, not the key itself. The SDKs buffer events and send them in the background. A batch holds 1 to 500 events and at most 256 KiB. Idempotency-Key is required and binds the body as on POST /v1/assessments, so a retried batch is counted once.
|
|
5
5
|
*/
|
|
6
6
|
export type KeyUsageBatchRequest = {
|
|
7
7
|
events: Array<KeyUsageEvent>;
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type CreateAssessmentRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* Opaque client key, 16 to 128 characters of [A-Za-z0-9._:-] (a UUID or ULID fits). Scoped to the
|
|
7
|
+
* Opaque client key, 16 to 128 characters of [A-Za-z0-9._:-] (a UUID or ULID fits). Scoped to the workspace principal and bound to the canonical body for 24 hours.
|
|
8
8
|
*/
|
|
9
9
|
idempotencyKey: string;
|
|
10
10
|
body: models.AssessmentRequest;
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type DeleteAccountRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* The account_id the
|
|
7
|
+
* The account_id the workspace sends with its assessments, as one path segment (percent-encode '|' and ':' if the client requires it). A value that does not match the account_id shape answers 400 invalid_request.
|
|
8
8
|
*/
|
|
9
9
|
accountId: string;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
3
3
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
4
4
|
export type DeleteIntegrationRequest = {
|
|
5
5
|
/**
|
|
6
|
-
* Path segment, matched case-sensitively. A value that does not match the integration_id shape, or another
|
|
6
|
+
* Path segment, matched case-sensitively. A value that does not match the integration_id shape, or another workspace's id, answers 404.
|
|
7
7
|
*/
|
|
8
8
|
integrationId: string;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
3
3
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
4
4
|
export type DeleteWebhookEndpointRequest = {
|
|
5
5
|
/**
|
|
6
|
-
* The endpoint's whe_ id. An id that is unknown, malformed or another
|
|
6
|
+
* The endpoint's whe_ id. An id that is unknown, malformed or another workspace's answers 404.
|
|
7
7
|
*/
|
|
8
8
|
endpointId: string;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type GetAccountRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* The account_id the
|
|
7
|
+
* The account_id the workspace sends with its assessments, as one path segment (percent-encode '|' and ':' if the client requires it). A value that does not match the account_id shape answers 400 invalid_request.
|
|
8
8
|
*/
|
|
9
9
|
accountId: string;
|
|
10
10
|
};
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type ListAccountAssessmentsRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* The account_id the
|
|
7
|
+
* The account_id the workspace sends with its assessments, as one path segment (percent-encode '|' and ':' if the client requires it). A value that does not match the account_id shape answers 400 invalid_request.
|
|
8
8
|
*/
|
|
9
9
|
accountId: string;
|
|
10
10
|
/**
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type ListWebhookDeliveriesRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* The endpoint's whe_ id. An id that is unknown, malformed or another
|
|
7
|
+
* The endpoint's whe_ id. An id that is unknown, malformed or another workspace's answers 404.
|
|
8
8
|
*/
|
|
9
9
|
endpointId: string;
|
|
10
10
|
/**
|
|
@@ -8,7 +8,7 @@ export type RecordAssessmentOutcomeRequest = {
|
|
|
8
8
|
*/
|
|
9
9
|
assessmentId: string;
|
|
10
10
|
/**
|
|
11
|
-
* Opaque client key, 16 to 128 characters of [A-Za-z0-9._:-] (a UUID or ULID fits). Scoped to the
|
|
11
|
+
* Opaque client key, 16 to 128 characters of [A-Za-z0-9._:-] (a UUID or ULID fits). Scoped to the workspace principal and bound to the canonical body for 24 hours.
|
|
12
12
|
*/
|
|
13
13
|
idempotencyKey: string;
|
|
14
14
|
body: models.AssessmentOutcomeRequest;
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type RecordKeyUsageRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* Opaque client key, 16 to 128 characters of [A-Za-z0-9._:-] (a UUID or ULID fits). Scoped to the
|
|
7
|
+
* Opaque client key, 16 to 128 characters of [A-Za-z0-9._:-] (a UUID or ULID fits). Scoped to the workspace principal and bound to the canonical body for 24 hours.
|
|
8
8
|
*/
|
|
9
9
|
idempotencyKey: string;
|
|
10
10
|
body: models.KeyUsageBatchRequest;
|
|
@@ -4,11 +4,11 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type ReplayWebhookDeliveryRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* The endpoint's whe_ id. An id that is unknown, malformed or another
|
|
7
|
+
* The endpoint's whe_ id. An id that is unknown, malformed or another workspace's answers 404.
|
|
8
8
|
*/
|
|
9
9
|
endpointId: string;
|
|
10
10
|
/**
|
|
11
|
-
* The evt_ id of a delivery the endpoint's log holds, as GET /v1/webhooks/{endpoint_id}/deliveries lists it. An id that is malformed, not sent to this endpoint, past the log's retention or another
|
|
11
|
+
* The evt_ id of a delivery the endpoint's log holds, as GET /v1/webhooks/{endpoint_id}/deliveries lists it. An id that is malformed, not sent to this endpoint, past the log's retention or another workspace's answers 404.
|
|
12
12
|
*/
|
|
13
13
|
eventId: string;
|
|
14
14
|
body: models.WebhookReplayRequest;
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type RotateIntegrationSecretRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* Path segment, matched case-sensitively. A value that does not match the integration_id shape, or another
|
|
7
|
+
* Path segment, matched case-sensitively. A value that does not match the integration_id shape, or another workspace's id, answers 404.
|
|
8
8
|
*/
|
|
9
9
|
integrationId: string;
|
|
10
10
|
body: models.IntegrationRotationRequest;
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type RotateWebhookSigningKeyRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* The endpoint's whe_ id. An id that is unknown, malformed or another
|
|
7
|
+
* The endpoint's whe_ id. An id that is unknown, malformed or another workspace's answers 404.
|
|
8
8
|
*/
|
|
9
9
|
endpointId: string;
|
|
10
10
|
body: models.WebhookKeyRotationRequest;
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
|
4
4
|
import * as models from "../index.js";
|
|
5
5
|
export type SendWebhookTestEventRequest = {
|
|
6
6
|
/**
|
|
7
|
-
* The endpoint's whe_ id. An id that is unknown, malformed or another
|
|
7
|
+
* The endpoint's whe_ id. An id that is unknown, malformed or another workspace's answers 404.
|
|
8
8
|
*/
|
|
9
9
|
endpointId: string;
|
|
10
10
|
body: models.WebhookTestRequest;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* 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
|
|
4
|
+
* 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.
|
|
5
5
|
*/
|
|
6
6
|
export declare const Outcome: {
|
|
7
7
|
readonly ConfirmedAbuse: "confirmed_abuse";
|
|
@@ -12,7 +12,7 @@ export declare const Outcome: {
|
|
|
12
12
|
readonly Unknown: "unknown";
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* 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
|
|
15
|
+
* 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.
|
|
16
16
|
*/
|
|
17
17
|
export type Outcome = OpenEnum<typeof Outcome>;
|
|
18
18
|
/** @internal */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as openEnums from "../types/enums.js";
|
|
2
2
|
/**
|
|
3
|
-
* 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
|
|
3
|
+
* 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.
|
|
4
4
|
*/
|
|
5
5
|
export const Outcome = {
|
|
6
6
|
ConfirmedAbuse: "confirmed_abuse",
|
|
@@ -4,7 +4,7 @@ import { OpenEnum } from "../types/enums.js";
|
|
|
4
4
|
* Machine codes an HTTP 403 answer can carry.
|
|
5
5
|
*/
|
|
6
6
|
export declare const PermissionDeniedErrorCode: {
|
|
7
|
-
readonly
|
|
7
|
+
readonly WorkspaceForbidden: "workspace_forbidden";
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Machine codes an HTTP 403 answer can carry.
|
|
@@ -3,7 +3,7 @@ import * as openEnums from "../types/enums.js";
|
|
|
3
3
|
* Machine codes an HTTP 403 answer can carry.
|
|
4
4
|
*/
|
|
5
5
|
export const PermissionDeniedErrorCode = {
|
|
6
|
-
|
|
6
|
+
WorkspaceForbidden: "workspace_forbidden",
|
|
7
7
|
};
|
|
8
8
|
/** @internal */
|
|
9
9
|
export const PermissionDeniedErrorCode$inboundSchema = openEnums.inboundSchema(PermissionDeniedErrorCode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission-denied-error-code.js","sourceRoot":"","sources":["../../../src/models/permission-denied-error-code.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,
|
|
1
|
+
{"version":3,"file":"permission-denied-error-code.js","sourceRoot":"","sources":["../../../src/models/permission-denied-error-code.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,kBAAkB,EAAE,qBAAqB;CACjC,CAAC;AAQX,gBAAgB;AAChB,MAAM,CAAC,MAAM,uCAAuC,GAGhD,SAAS,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC"}
|
|
@@ -15,7 +15,7 @@ export declare const ReasonCode: {
|
|
|
15
15
|
readonly ProxyIp: "proxy_ip";
|
|
16
16
|
readonly SeenBefore: "seen_before";
|
|
17
17
|
readonly SharedIp: "shared_ip";
|
|
18
|
-
readonly
|
|
18
|
+
readonly ManyRecentAccounts: "many_recent_accounts";
|
|
19
19
|
readonly EstablishedAccounts: "established_accounts";
|
|
20
20
|
readonly AgedIdentity: "aged_identity";
|
|
21
21
|
readonly BreachNameMatch: "breach_name_match";
|
|
@@ -14,7 +14,7 @@ export const ReasonCode = {
|
|
|
14
14
|
ProxyIp: "proxy_ip",
|
|
15
15
|
SeenBefore: "seen_before",
|
|
16
16
|
SharedIp: "shared_ip",
|
|
17
|
-
|
|
17
|
+
ManyRecentAccounts: "many_recent_accounts",
|
|
18
18
|
EstablishedAccounts: "established_accounts",
|
|
19
19
|
AgedIdentity: "aged_identity",
|
|
20
20
|
BreachNameMatch: "breach_name_match",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reason-code.js","sourceRoot":"","sources":["../../../src/models/reason-code.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,aAAa;IACzB,eAAe,EAAE,kBAAkB;IACnC,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,YAAY;IACvB,gBAAgB,EAAE,mBAAmB;IACrC,eAAe,EAAE,kBAAkB;IACnC,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,WAAW;IACrB,
|
|
1
|
+
{"version":3,"file":"reason-code.js","sourceRoot":"","sources":["../../../src/models/reason-code.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,aAAa;IACzB,eAAe,EAAE,kBAAkB;IACnC,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,YAAY;IACvB,gBAAgB,EAAE,mBAAmB;IACrC,eAAe,EAAE,kBAAkB;IACnC,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,sBAAsB;IAC1C,mBAAmB,EAAE,sBAAsB;IAC3C,YAAY,EAAE,eAAe;IAC7B,eAAe,EAAE,mBAAmB;IACpC,kBAAkB,EAAE,qBAAqB;IACzC,kBAAkB,EAAE,sBAAsB;IAC1C,mBAAmB,EAAE,uBAAuB;IAC5C,sBAAsB,EAAE,0BAA0B;IAClD,sBAAsB,EAAE,0BAA0B;IAClD,oBAAoB,EAAE,wBAAwB;IAC9C,eAAe,EAAE,mBAAmB;IACpC,oBAAoB,EAAE,wBAAwB;IAC9C,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,mBAAmB;IACpC,iBAAiB,EAAE,qBAAqB;IACxC,iBAAiB,EAAE,qBAAqB;IACxC,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE,kBAAkB;IAClC,gBAAgB,EAAE,mBAAmB;IACrC,uBAAuB,EAAE,2BAA2B;IACpD,qBAAqB,EAAE,yBAAyB;IAChD,0BAA0B,EAAE,+BAA+B;IAC3D,cAAc,EAAE,kBAAkB;IAClC,YAAY,EAAE,eAAe;IAC7B,YAAY,EAAE,gBAAgB;CACtB,CAAC;AAMX,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GACnC,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -14,7 +14,7 @@ export type RiskSummary = {
|
|
|
14
14
|
email?: RiskSummaryEmail | undefined;
|
|
15
15
|
username?: RiskSummaryUsername | undefined;
|
|
16
16
|
/**
|
|
17
|
-
* Facts about the submitted IP from the offline database and this
|
|
17
|
+
* Facts about the submitted IP from the offline database and this workspace's own recent assessments. Every member is optional; absent makes no claim.
|
|
18
18
|
*/
|
|
19
19
|
ip?: IpSummary | undefined;
|
|
20
20
|
/**
|
|
@@ -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;
|
package/dist/esm/sdk/accounts.js
CHANGED
|
@@ -27,7 +27,7 @@ export class Accounts extends ClientSDK {
|
|
|
27
27
|
* Page through one account's unexpired assessments.
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
* 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
|
|
30
|
+
* 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.
|
|
31
31
|
*/
|
|
32
32
|
async listAssessments(request, options) {
|
|
33
33
|
return unwrapResultIterator(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;
|
|
@@ -11,7 +11,7 @@ export class Assessments extends ClientSDK {
|
|
|
11
11
|
* Assess identifiers for a signup or gateway decision.
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Assesses one
|
|
14
|
+
* 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.
|
|
15
15
|
*/
|
|
16
16
|
async create(request, options) {
|
|
17
17
|
return unwrapAsync(assessmentsCreate(this, request, options));
|
|
@@ -20,7 +20,7 @@ export class Assessments extends ClientSDK {
|
|
|
20
20
|
* Poll the authoritative assessment of one assessment.
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
|
-
* 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
|
|
23
|
+
* 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.
|
|
24
24
|
*/
|
|
25
25
|
async get(request, options) {
|
|
26
26
|
return unwrapAsync(assessmentsGet(this, request, options));
|
|
@@ -47,7 +47,7 @@ export class Assessments extends ClientSDK {
|
|
|
47
47
|
* Page through one account's unexpired assessments.
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
|
-
* 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
|
|
50
|
+
* 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.
|
|
51
51
|
*/
|
|
52
52
|
async query(request, options) {
|
|
53
53
|
return unwrapResultIterator(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.
|
|
@@ -15,7 +15,7 @@ export class Integrations extends ClientSDK {
|
|
|
15
15
|
return unwrapAsync(integrationsCreate(this, request, options));
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* List the
|
|
18
|
+
* List the workspace's integrations.
|
|
19
19
|
*
|
|
20
20
|
* @remarks
|
|
21
21
|
* 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
|
}
|
|
@@ -3,10 +3,10 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
3
3
|
import { unwrapAsync } from "../types/fp.js";
|
|
4
4
|
export class KeyUsage extends ClientSDK {
|
|
5
5
|
/**
|
|
6
|
-
* Report requests made with API keys your
|
|
6
|
+
* Report requests made with API keys your platform issued.
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
|
-
* Records requests made with API keys your
|
|
9
|
+
* 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.
|
|
10
10
|
*/
|
|
11
11
|
async record(request, options) {
|
|
12
12
|
return unwrapAsync(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;
|
|
@@ -10,7 +10,7 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
10
10
|
import { unwrapResultIterator } from "../types/operations.js";
|
|
11
11
|
export class WebhookEndpoints extends ClientSDK {
|
|
12
12
|
/**
|
|
13
|
-
* List the
|
|
13
|
+
* List the workspace's webhook endpoints.
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* 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.
|
|
@@ -58,7 +58,7 @@ export class WebhookEndpoints extends ClientSDK {
|
|
|
58
58
|
* List an endpoint's delivery attempts.
|
|
59
59
|
*
|
|
60
60
|
* @remarks
|
|
61
|
-
* 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
|
|
61
|
+
* 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.
|
|
62
62
|
*/
|
|
63
63
|
async listDeliveries(request, options) {
|
|
64
64
|
return unwrapResultIterator(webhookEndpointsListDeliveries(this, request, options));
|
package/dist/esm/webhooks.d.ts
CHANGED
|
@@ -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 {
|