@noresponse/node 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +24 -0
  3. package/dist/commonjs/client.d.ts +20 -0
  4. package/dist/commonjs/client.d.ts.map +1 -1
  5. package/dist/commonjs/client.js +37 -2
  6. package/dist/commonjs/client.js.map +1 -1
  7. package/dist/commonjs/funcs/key-usage-record.d.ts +18 -0
  8. package/dist/commonjs/funcs/key-usage-record.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/key-usage-record.js +149 -0
  10. package/dist/commonjs/funcs/key-usage-record.js.map +1 -0
  11. package/dist/commonjs/index.d.ts +3 -2
  12. package/dist/commonjs/index.d.ts.map +1 -1
  13. package/dist/commonjs/index.js +9 -1
  14. package/dist/commonjs/index.js.map +1 -1
  15. package/dist/commonjs/key-usage.d.ts +89 -0
  16. package/dist/commonjs/key-usage.d.ts.map +1 -0
  17. package/dist/commonjs/key-usage.js +221 -0
  18. package/dist/commonjs/key-usage.js.map +1 -0
  19. package/dist/commonjs/lib/config.d.ts +2 -2
  20. package/dist/commonjs/lib/config.js +2 -2
  21. package/dist/commonjs/models/account.d.ts +1 -1
  22. package/dist/commonjs/models/assessment.d.ts +1 -1
  23. package/dist/commonjs/models/index.d.ts +3 -0
  24. package/dist/commonjs/models/index.d.ts.map +1 -1
  25. package/dist/commonjs/models/index.js +3 -0
  26. package/dist/commonjs/models/index.js.map +1 -1
  27. package/dist/commonjs/models/key-usage-batch-request.d.ts +16 -0
  28. package/dist/commonjs/models/key-usage-batch-request.d.ts.map +1 -0
  29. package/dist/commonjs/models/key-usage-batch-request.js +47 -0
  30. package/dist/commonjs/models/key-usage-batch-request.js.map +1 -0
  31. package/dist/commonjs/models/key-usage-batch.d.ts +28 -0
  32. package/dist/commonjs/models/key-usage-batch.d.ts.map +1 -0
  33. package/dist/commonjs/models/key-usage-batch.js +56 -0
  34. package/dist/commonjs/models/key-usage-batch.js.map +1 -0
  35. package/dist/commonjs/models/key-usage-event.d.ts +53 -0
  36. package/dist/commonjs/models/key-usage-event.d.ts.map +1 -0
  37. package/dist/commonjs/models/key-usage-event.js +63 -0
  38. package/dist/commonjs/models/key-usage-event.js.map +1 -0
  39. package/dist/commonjs/models/operations/index.d.ts +1 -0
  40. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  41. package/dist/commonjs/models/operations/index.js +1 -0
  42. package/dist/commonjs/models/operations/index.js.map +1 -1
  43. package/dist/commonjs/models/operations/record-key-usage.d.ts +29 -0
  44. package/dist/commonjs/models/operations/record-key-usage.d.ts.map +1 -0
  45. package/dist/commonjs/models/operations/record-key-usage.js +68 -0
  46. package/dist/commonjs/models/operations/record-key-usage.js.map +1 -0
  47. package/dist/commonjs/models/reason-code.d.ts +1 -0
  48. package/dist/commonjs/models/reason-code.d.ts.map +1 -1
  49. package/dist/commonjs/models/reason-code.js +1 -0
  50. package/dist/commonjs/models/reason-code.js.map +1 -1
  51. package/dist/commonjs/sdk/key-usage.d.ts +12 -0
  52. package/dist/commonjs/sdk/key-usage.d.ts.map +1 -0
  53. package/dist/commonjs/sdk/key-usage.js +19 -0
  54. package/dist/commonjs/sdk/key-usage.js.map +1 -0
  55. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  56. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  57. package/dist/commonjs/sdk/sdk.js +5 -0
  58. package/dist/commonjs/sdk/sdk.js.map +1 -1
  59. package/dist/esm/client.d.ts +20 -0
  60. package/dist/esm/client.d.ts.map +1 -1
  61. package/dist/esm/client.js +35 -1
  62. package/dist/esm/client.js.map +1 -1
  63. package/dist/esm/funcs/key-usage-record.d.ts +18 -0
  64. package/dist/esm/funcs/key-usage-record.d.ts.map +1 -0
  65. package/dist/esm/funcs/key-usage-record.js +113 -0
  66. package/dist/esm/funcs/key-usage-record.js.map +1 -0
  67. package/dist/esm/index.d.ts +3 -2
  68. package/dist/esm/index.d.ts.map +1 -1
  69. package/dist/esm/index.js +2 -1
  70. package/dist/esm/index.js.map +1 -1
  71. package/dist/esm/key-usage.d.ts +89 -0
  72. package/dist/esm/key-usage.d.ts.map +1 -0
  73. package/dist/esm/key-usage.js +217 -0
  74. package/dist/esm/key-usage.js.map +1 -0
  75. package/dist/esm/lib/config.d.ts +2 -2
  76. package/dist/esm/lib/config.js +2 -2
  77. package/dist/esm/models/account.d.ts +1 -1
  78. package/dist/esm/models/assessment.d.ts +1 -1
  79. package/dist/esm/models/index.d.ts +3 -0
  80. package/dist/esm/models/index.d.ts.map +1 -1
  81. package/dist/esm/models/index.js +3 -0
  82. package/dist/esm/models/index.js.map +1 -1
  83. package/dist/esm/models/key-usage-batch-request.d.ts +16 -0
  84. package/dist/esm/models/key-usage-batch-request.d.ts.map +1 -0
  85. package/dist/esm/models/key-usage-batch-request.js +10 -0
  86. package/dist/esm/models/key-usage-batch-request.js.map +1 -0
  87. package/dist/esm/models/key-usage-batch.d.ts +28 -0
  88. package/dist/esm/models/key-usage-batch.d.ts.map +1 -0
  89. package/dist/esm/models/key-usage-batch.js +19 -0
  90. package/dist/esm/models/key-usage-batch.js.map +1 -0
  91. package/dist/esm/models/key-usage-event.d.ts +53 -0
  92. package/dist/esm/models/key-usage-event.d.ts.map +1 -0
  93. package/dist/esm/models/key-usage-event.js +26 -0
  94. package/dist/esm/models/key-usage-event.js.map +1 -0
  95. package/dist/esm/models/operations/index.d.ts +1 -0
  96. package/dist/esm/models/operations/index.d.ts.map +1 -1
  97. package/dist/esm/models/operations/index.js +1 -0
  98. package/dist/esm/models/operations/index.js.map +1 -1
  99. package/dist/esm/models/operations/record-key-usage.d.ts +29 -0
  100. package/dist/esm/models/operations/record-key-usage.d.ts.map +1 -0
  101. package/dist/esm/models/operations/record-key-usage.js +30 -0
  102. package/dist/esm/models/operations/record-key-usage.js.map +1 -0
  103. package/dist/esm/models/reason-code.d.ts +1 -0
  104. package/dist/esm/models/reason-code.d.ts.map +1 -1
  105. package/dist/esm/models/reason-code.js +1 -0
  106. package/dist/esm/models/reason-code.js.map +1 -1
  107. package/dist/esm/sdk/key-usage.d.ts +12 -0
  108. package/dist/esm/sdk/key-usage.d.ts.map +1 -0
  109. package/dist/esm/sdk/key-usage.js +15 -0
  110. package/dist/esm/sdk/key-usage.js.map +1 -0
  111. package/dist/esm/sdk/sdk.d.ts +3 -0
  112. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  113. package/dist/esm/sdk/sdk.js +5 -0
  114. package/dist/esm/sdk/sdk.js.map +1 -1
  115. package/package.json +3 -3
@@ -0,0 +1,18 @@
1
+ import { NoResponseCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { NoResponseError } from "../models/errors/no-response-error.js";
6
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
7
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Report requests made with API keys your signup gate issued.
13
+ *
14
+ * @remarks
15
+ * Records requests made with API keys your signup gate issued to your accounts, one event per request: the key's SHA-256 (the issued_credential.sha256 the account's assessment carried), the client IP, the time and optionally the user agent, model and token counts. Most callers use the SDK's usage buffer, which batches events and sends them in the background. Sampling is allowed: sample_rate weights an event's request and token counts. Requires the assess scope. Idempotency-Key is required and handled as on POST /v1/assessments: a retry with the same key and body answers the same record with Idempotent-Replayed: true and counts nothing again; a different body answers 409. A batch holds 1 to 500 events and at most 256 KiB. No raw event is kept: usage is aggregated per key, and IPs, user agents and models are kept only as keyed digests, with the IP's country, for 24 hours. When one key is used from 20 or more IP addresses, or 3 or more countries, within 24 hours, every account whose assessment carried that key gets the shared_api_key reason for 30 days.
16
+ */
17
+ export declare function keyUsageRecord(client: NoResponseCore, request: operations.RecordKeyUsageRequest, options?: RequestOptions): APIPromise<Result<operations.RecordKeyUsageResponse, errors.BadRequestError | errors.AuthenticationError | errors.PermissionDeniedError | errors.NotFoundError | errors.ConflictError | errors.RateLimitError | NoResponseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=key-usage-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key-usage-record.d.ts","sourceRoot":"","sources":["../../../src/funcs/key-usage-record.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAM5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sBAAsB,EAC/B,MAAM,CAAC,eAAe,GACtB,MAAM,CAAC,mBAAmB,GAC1B,MAAM,CAAC,qBAAqB,GAC5B,MAAM,CAAC,aAAa,GACpB,MAAM,CAAC,aAAa,GACpB,MAAM,CAAC,cAAc,GACrB,eAAe,GACf,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,113 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
3
+ import { matchStatusCode } from "../lib/http.js";
4
+ import * as M from "../lib/matchers.js";
5
+ import { compactMap } from "../lib/primitives.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
8
+ import { pathToFunc } from "../lib/url.js";
9
+ import * as errors from "../models/errors/index.js";
10
+ import * as operations from "../models/operations/index.js";
11
+ import { APIPromise } from "../types/async.js";
12
+ /**
13
+ * Report requests made with API keys your signup gate issued.
14
+ *
15
+ * @remarks
16
+ * Records requests made with API keys your signup gate 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
+ */
18
+ export function keyUsageRecord(client, request, options) {
19
+ return new APIPromise($do(client, request, options));
20
+ }
21
+ async function $do(client, request, options) {
22
+ const parsed = safeParse(request, (value) => z.parse(operations.RecordKeyUsageRequest$outboundSchema, value), "Input validation failed");
23
+ if (!parsed.ok) {
24
+ return [parsed, { status: "invalid" }];
25
+ }
26
+ const payload = parsed.value;
27
+ const body = encodeJSON("body", payload.body, { explode: true });
28
+ const path = pathToFunc("/v1/key_usage/batches")();
29
+ const headers = new Headers(compactMap({
30
+ "Content-Type": "application/json",
31
+ Accept: "application/json",
32
+ "Idempotency-Key": encodeSimple("Idempotency-Key", payload["Idempotency-Key"], { explode: false, charEncoding: "none" }),
33
+ }));
34
+ const secConfig = await extractSecurity(client._options.apiKey);
35
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
36
+ const requestSecurity = resolveGlobalSecurity(securityInput);
37
+ const context = {
38
+ options: client._options,
39
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
40
+ operationID: "recordKeyUsage",
41
+ oAuth2Scopes: null,
42
+ resolvedSecurity: requestSecurity,
43
+ securitySource: client._options.apiKey,
44
+ retryConfig: options?.retries
45
+ || client._options.retryConfig
46
+ || {
47
+ strategy: "backoff",
48
+ backoff: {
49
+ initialInterval: 500,
50
+ maxInterval: 8000,
51
+ exponent: 2,
52
+ maxElapsedTime: 30000,
53
+ },
54
+ retryConnectionErrors: true,
55
+ }
56
+ || { strategy: "none" },
57
+ retryCodes: options?.retryCodes || ["408", "429", "5XX"],
58
+ };
59
+ const requestRes = client._createRequest(context, {
60
+ security: requestSecurity,
61
+ method: "POST",
62
+ baseURL: options?.serverURL,
63
+ path: path,
64
+ headers: headers,
65
+ body: body,
66
+ userAgent: client._options.userAgent,
67
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
68
+ }, options);
69
+ if (!requestRes.ok) {
70
+ return [requestRes, { status: "invalid" }];
71
+ }
72
+ const req = requestRes.value;
73
+ const doResult = await client._do(req, {
74
+ context,
75
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
76
+ retryConfig: context.retryConfig,
77
+ retryCodes: context.retryCodes,
78
+ });
79
+ if (!doResult.ok) {
80
+ return [doResult, { status: "request-error", request: req }];
81
+ }
82
+ const response = doResult.value;
83
+ const responseFields = {
84
+ HttpMeta: { Response: response, Request: req },
85
+ };
86
+ const [result] = await M.match(M.json(202, operations.RecordKeyUsageResponse$inboundSchema, {
87
+ hdrs: true,
88
+ key: "Result",
89
+ }), M.jsonErr(400, errors.BadRequestError$inboundSchema, {
90
+ ctype: "application/problem+json",
91
+ hdrs: true,
92
+ }), M.jsonErr(401, errors.AuthenticationError$inboundSchema, {
93
+ ctype: "application/problem+json",
94
+ hdrs: true,
95
+ }), M.jsonErr(403, errors.PermissionDeniedError$inboundSchema, {
96
+ ctype: "application/problem+json",
97
+ hdrs: true,
98
+ }), M.jsonErr(404, errors.NotFoundError$inboundSchema, {
99
+ ctype: "application/problem+json",
100
+ hdrs: true,
101
+ }), M.jsonErr(409, errors.ConflictError$inboundSchema, {
102
+ ctype: "application/problem+json",
103
+ hdrs: true,
104
+ }), M.jsonErr(429, errors.RateLimitError$inboundSchema, {
105
+ ctype: "application/problem+json",
106
+ hdrs: true,
107
+ }), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
108
+ if (!result.ok) {
109
+ return [result, { status: "complete", request: req, response }];
110
+ }
111
+ return [result, { status: "complete", request: req, response }];
112
+ }
113
+ //# sourceMappingURL=key-usage-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key-usage-record.js","sourceRoot":"","sources":["../../../src/funcs/key-usage-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE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EAAE,MAAM,CAAC,iCAAiC,EAAE;QACvD,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,IAAI;KACX,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,mCAAmC,EAAE;QACzD,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,IAAI;KACX,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,2BAA2B,EAAE;QACjD,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,IAAI;KACX,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,2BAA2B,EAAE;QACjD,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,IAAI;KACX,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,4BAA4B,EAAE;QAClD,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,IAAI;KACX,CAAC,EACF,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,CACjE"}
@@ -2,15 +2,16 @@
2
2
  * @noresponse/node entry point. Hand-written (listed in .genignore); the
3
3
  * generated client lives under ./sdk, ./funcs, ./models and ./lib.
4
4
  */
5
- export { NoResponse, Assessments, Accounts, Keys, 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";
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
7
  export { constructEvent, verificationResponse, isExpiredEvent, WebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, type WebhookEvent, type AssessmentUpdatedEvent, type AssessmentExpiredEvent, type EndpointVerificationEvent, type AccountDeletedEvent, type AssessmentExpired, type EndpointVerification, type AccountDeleted, 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";
11
11
  export { hashIssuedCredential } from "./issued-credential.js";
12
+ export { KeyUsageBuffer, MAX_BATCH_EVENTS, MAX_BATCH_BYTES, DEFAULT_BATCH_SIZE, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_QUEUE, type KeyUsageFact, type KeyUsageBufferOptions, type KeyUsageStats, type KeyUsageSender, } from "./key-usage.js";
12
13
  export * from "./models/index.js";
13
- export type { CreateAssessmentRequest, DeleteAccountRequest, DeleteAssessmentRequest, GetAccountRequest, GetAssessmentRequest, ListAccountAssessmentsRequest, RecordAssessmentOutcomeRequest, } from "./models/operations/index.js";
14
+ export type { CreateAssessmentRequest, DeleteAccountRequest, DeleteAssessmentRequest, GetAccountRequest, GetAssessmentRequest, ListAccountAssessmentsRequest, RecordAssessmentOutcomeRequest, RecordKeyUsageRequest, } from "./models/operations/index.js";
14
15
  export { SDK_METADATA, ServerList, type SDKOptions } from "./lib/config.js";
15
16
  export { HTTPClient, type Fetcher, type HTTPClientOptions } from "./lib/http.js";
16
17
  export type { Logger } from "./lib/logger.js";
@@ -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,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,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK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AW,CAAC"}
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,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,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"}
package/dist/esm/index.js CHANGED
@@ -2,13 +2,14 @@
2
2
  * @noresponse/node entry point. Hand-written (listed in .genignore); the
3
3
  * generated client lives under ./sdk, ./funcs, ./models and ./lib.
4
4
  */
5
- export { NoResponse, Assessments, Accounts, Keys, WebhookEndpoints, Integrations, DEFAULT_BASE_URL, DEFAULT_TIMEOUT_MS, } from "./client.js";
5
+ export { NoResponse, Assessments, Accounts, Keys, KeyUsage, WebhookEndpoints, Integrations, DEFAULT_BASE_URL, DEFAULT_TIMEOUT_MS, } from "./client.js";
6
6
  export * from "./errors.js";
7
7
  export { constructEvent, verificationResponse, isExpiredEvent, WebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, } from "./webhooks.js";
8
8
  export { handleLateResult, lateResultAction, clerkActions, workosActions, auth0Actions, logOnlyActions, ProviderActionError, DEFAULT_LATE_RESULT_POLICY, } from "./late-results.js";
9
9
  export { fromAuth0, fromClerk, fromCognito, fromEntra, fromFirebase, fromKeycloak, fromOIDC, fromOry, fromOryOAuth2, fromSupabase, fromWorkOS, } from "./auth.js";
10
10
  export { DEFAULT_WAIT_TIMEOUT_MS, MIN_POLL_INTERVAL_MS } from "./wait.js";
11
11
  export { hashIssuedCredential } from "./issued-credential.js";
12
+ export { KeyUsageBuffer, MAX_BATCH_EVENTS, MAX_BATCH_BYTES, DEFAULT_BATCH_SIZE, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_QUEUE, } from "./key-usage.js";
12
13
  export * from "./models/index.js";
13
14
  export { SDK_METADATA, ServerList } from "./lib/config.js";
14
15
  export { HTTPClient } from "./lib/http.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,GAWnB,MAAM,aAAa,CAAC;AACrB,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,yBAAyB,GAa1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,0BAA0B,GAW3B,MAAM,mBAAmB,CAAC;AA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wBAAwB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,GAKlB,MAAM,gBAAgB,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAWlC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAwC,MAAM,eAAe,CAAC;AAIjF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,89 @@
1
+ import type * as models from "./models/index.js";
2
+ /** Most events in one batch, and most bytes in one batch body. */
3
+ export declare const MAX_BATCH_EVENTS = 500;
4
+ export declare const MAX_BATCH_BYTES: number;
5
+ export declare const DEFAULT_BATCH_SIZE = 100;
6
+ export declare const DEFAULT_FLUSH_INTERVAL_MS = 5000;
7
+ export declare const DEFAULT_MAX_QUEUE = 10000;
8
+ /** One request made with an issued key. */
9
+ export type KeyUsageFact = {
10
+ /** The issued key itself. It is hashed in this process and only the hash is sent. */
11
+ key?: string;
12
+ /** SHA-256 of the issued key (hashIssuedCredential), when you already hold it. */
13
+ keySha256?: string;
14
+ /** The client IP address the request came from. */
15
+ ip: string;
16
+ /** The request's User-Agent header; cut to 512 characters. */
17
+ userAgent?: string;
18
+ /** The model or product the request used, such as gpt-4o-mini. */
19
+ model?: string;
20
+ inputTokens?: number;
21
+ outputTokens?: number;
22
+ /** When the request was made. Defaults to now. */
23
+ occurredAt?: Date | string;
24
+ };
25
+ export type KeyUsageBufferOptions = {
26
+ /** Send once this many facts are queued. Default 100, at most 500. */
27
+ batchSize?: number;
28
+ /** Send whatever is queued this often, in milliseconds. Default 5000. The timer never keeps the process alive. */
29
+ flushIntervalMs?: number;
30
+ /** Most facts held in memory. Default 10 000. When full, the oldest fact is dropped. */
31
+ maxQueue?: number;
32
+ /** Record this share of facts, from above 0 to 1. Default 1 (every fact). Sent as sample_rate so totals stay right. */
33
+ sampleRate?: number;
34
+ /** Called with each error a background send hit. The facts of that batch are counted in `failed`. */
35
+ onError?: (error: unknown) => void;
36
+ /** The sampler's random source, for tests. Default Math.random. */
37
+ random?: () => number;
38
+ };
39
+ export type KeyUsageStats = {
40
+ /** Facts waiting to be sent. */
41
+ queued: number;
42
+ /** Facts the API accepted or ignored. */
43
+ sent: number;
44
+ /** Facts dropped because the queue was full or the buffer was closed. */
45
+ dropped: number;
46
+ /** Facts whose batch failed after the client's retries. */
47
+ failed: number;
48
+ /** Facts refused before queueing: no key, no IP, or an unreadable time. */
49
+ invalid: number;
50
+ };
51
+ /** What the buffer sends through: `client.keyUsage`. */
52
+ export interface KeyUsageSender {
53
+ record(batch: models.KeyUsageBatchRequest, options?: {
54
+ idempotencyKey?: string;
55
+ }): Promise<unknown>;
56
+ }
57
+ /**
58
+ * Buffers key usage and sends it to POST /v1/key_usage/batches in the
59
+ * background. Create one per process with `client.keyUsage.buffer()`, call
60
+ * `record` on every request made with an issued key, and `close()` on
61
+ * shutdown.
62
+ */
63
+ export declare class KeyUsageBuffer {
64
+ private readonly sender;
65
+ private readonly queue;
66
+ private readonly batchSize;
67
+ private readonly maxQueue;
68
+ private readonly sampleRate;
69
+ private readonly onError;
70
+ private readonly random;
71
+ private readonly timer;
72
+ private inflight;
73
+ private closed;
74
+ private counts;
75
+ constructor(sender: KeyUsageSender, options?: KeyUsageBufferOptions);
76
+ /** Queue one fact. Never blocks and never throws; a fact without a key, an IP or a readable time is counted in `invalid`. */
77
+ record(fact: KeyUsageFact): void;
78
+ /** Send everything queued now, and resolve once it has been sent or has failed. */
79
+ flush(): Promise<void>;
80
+ /** Stop the timer, send what is queued and refuse further facts (counted as dropped). */
81
+ close(): Promise<void>;
82
+ stats(): KeyUsageStats;
83
+ /** One send loop at a time; it drains the queue in batches. */
84
+ private pump;
85
+ private drain;
86
+ /** The oldest facts that fit one batch: at most 500 events and MAX_BATCH_BYTES of body. */
87
+ private take;
88
+ }
89
+ //# sourceMappingURL=key-usage.d.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nB,2FAA2F;IAC3F,OAAO,CAAC,IAAI;CAWb"}
@@ -0,0 +1,217 @@
1
+ /**
2
+ * The key usage buffer. Hand-written; not generated.
3
+ *
4
+ * Your API gateway calls `record` once per request made with a key your signup
5
+ * gate issued. The buffer keeps the facts in memory and sends them to POST
6
+ * /v1/key_usage/batches in the background: when `batchSize` facts are queued,
7
+ * every `flushIntervalMs`, and on `flush()` or `close()`. `record` never
8
+ * blocks and never throws. When the queue is full the oldest fact is dropped
9
+ * and counted. A raw key passed as `key` is hashed here and never sent.
10
+ */
11
+ import { hashIssuedCredential } from "./issued-credential.js";
12
+ /** Most events in one batch, and most bytes in one batch body. */
13
+ export const MAX_BATCH_EVENTS = 500;
14
+ export const MAX_BATCH_BYTES = 256 * 1024;
15
+ export const DEFAULT_BATCH_SIZE = 100;
16
+ export const DEFAULT_FLUSH_INTERVAL_MS = 5000;
17
+ export const DEFAULT_MAX_QUEUE = 10000;
18
+ const MAX_USER_AGENT = 512;
19
+ const MAX_TOKENS = 1000000000;
20
+ const SHA256 = /^[0-9a-f]{64}$/;
21
+ const MODEL = /^[A-Za-z0-9][A-Za-z0-9._:/@+-]{0,127}$/;
22
+ // The server reads at most MAX_BATCH_BYTES; keep a little room for the envelope.
23
+ const BODY_BUDGET = MAX_BATCH_BYTES - 64;
24
+ const ENVELOPE_BYTES = '{"events":[]}'.length;
25
+ function wireSize(event) {
26
+ const wire = { key_sha256: event.keySha256, ip: event.ip, occurred_at: event.occurredAt };
27
+ if (event.userAgent !== undefined)
28
+ wire["user_agent"] = event.userAgent;
29
+ if (event.model !== undefined)
30
+ wire["model"] = event.model;
31
+ if (event.inputTokens !== undefined)
32
+ wire["input_tokens"] = event.inputTokens;
33
+ if (event.outputTokens !== undefined)
34
+ wire["output_tokens"] = event.outputTokens;
35
+ // The generated client sends sample_rate always, 1 by default.
36
+ wire["sample_rate"] = event.sampleRate ?? 1;
37
+ // Byte length of the UTF-8 encoding, plus the separating comma.
38
+ return new TextEncoder().encode(JSON.stringify(wire)).length + 1;
39
+ }
40
+ function tokens(value) {
41
+ return typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= MAX_TOKENS ? value : undefined;
42
+ }
43
+ function userAgent(value) {
44
+ if (typeof value !== "string")
45
+ return undefined;
46
+ // eslint-disable-next-line no-control-regex
47
+ const cleaned = Array.from(value.replace(/[\u0000-\u001f\u007f]/g, " ")).slice(0, MAX_USER_AGENT).join("").trim();
48
+ return cleaned === "" ? undefined : cleaned;
49
+ }
50
+ function occurred(value) {
51
+ if (value === undefined)
52
+ return new Date().toISOString();
53
+ const date = value instanceof Date ? value : typeof value === "string" ? new Date(value) : undefined;
54
+ if (!date || Number.isNaN(date.getTime()))
55
+ return undefined;
56
+ return date.toISOString();
57
+ }
58
+ function toEvent(fact, sampleRate) {
59
+ let keySha256;
60
+ if (typeof fact.keySha256 === "string" && SHA256.test(fact.keySha256.toLowerCase())) {
61
+ keySha256 = fact.keySha256.toLowerCase();
62
+ }
63
+ else if (typeof fact.key === "string" && fact.key !== "") {
64
+ keySha256 = hashIssuedCredential(fact.key);
65
+ }
66
+ if (keySha256 === undefined)
67
+ return undefined;
68
+ if (typeof fact.ip !== "string")
69
+ return undefined;
70
+ const ip = fact.ip.trim();
71
+ // eslint-disable-next-line no-control-regex
72
+ if (ip.length < 2 || ip.length > 64 || /[\u0000-\u001f\u007f]/.test(ip))
73
+ return undefined;
74
+ const occurredAt = occurred(fact.occurredAt);
75
+ if (occurredAt === undefined)
76
+ return undefined;
77
+ const event = { keySha256, ip, occurredAt };
78
+ const agent = userAgent(fact.userAgent);
79
+ if (agent !== undefined)
80
+ event.userAgent = agent;
81
+ if (typeof fact.model === "string" && MODEL.test(fact.model))
82
+ event.model = fact.model;
83
+ const input = tokens(fact.inputTokens);
84
+ if (input !== undefined)
85
+ event.inputTokens = input;
86
+ const output = tokens(fact.outputTokens);
87
+ if (output !== undefined)
88
+ event.outputTokens = output;
89
+ if (sampleRate < 1)
90
+ event.sampleRate = sampleRate;
91
+ return event;
92
+ }
93
+ function positiveInteger(value, fallback, name, max = Number.MAX_SAFE_INTEGER) {
94
+ if (value === undefined)
95
+ return fallback;
96
+ if (!Number.isInteger(value) || value <= 0 || value > max)
97
+ throw new TypeError(`${name} must be an integer from 1 to ${max}`);
98
+ return value;
99
+ }
100
+ /**
101
+ * Buffers key usage and sends it to POST /v1/key_usage/batches in the
102
+ * background. Create one per process with `client.keyUsage.buffer()`, call
103
+ * `record` on every request made with an issued key, and `close()` on
104
+ * shutdown.
105
+ */
106
+ export class KeyUsageBuffer {
107
+ sender;
108
+ queue = [];
109
+ batchSize;
110
+ maxQueue;
111
+ sampleRate;
112
+ onError;
113
+ random;
114
+ timer;
115
+ inflight = null;
116
+ closed = false;
117
+ counts = { sent: 0, dropped: 0, failed: 0, invalid: 0 };
118
+ constructor(sender, options = {}) {
119
+ this.sender = sender;
120
+ this.batchSize = positiveInteger(options.batchSize, DEFAULT_BATCH_SIZE, "batchSize", MAX_BATCH_EVENTS);
121
+ this.maxQueue = positiveInteger(options.maxQueue, DEFAULT_MAX_QUEUE, "maxQueue");
122
+ const interval = positiveInteger(options.flushIntervalMs, DEFAULT_FLUSH_INTERVAL_MS, "flushIntervalMs");
123
+ const rate = options.sampleRate ?? 1;
124
+ if (typeof rate !== "number" || !(rate > 0 && rate <= 1))
125
+ throw new TypeError("sampleRate must be above 0 and at most 1");
126
+ this.sampleRate = rate;
127
+ this.onError = options.onError;
128
+ this.random = options.random ?? Math.random;
129
+ this.timer = setInterval(() => {
130
+ if (this.queue.length > 0)
131
+ void this.pump();
132
+ }, interval);
133
+ this.timer.unref?.();
134
+ }
135
+ /** Queue one fact. Never blocks and never throws; a fact without a key, an IP or a readable time is counted in `invalid`. */
136
+ record(fact) {
137
+ try {
138
+ if (this.closed) {
139
+ this.counts.dropped++;
140
+ return;
141
+ }
142
+ if (this.sampleRate < 1 && this.random() >= this.sampleRate)
143
+ return;
144
+ const event = toEvent(fact, this.sampleRate);
145
+ if (event === undefined) {
146
+ this.counts.invalid++;
147
+ return;
148
+ }
149
+ while (this.queue.length >= this.maxQueue) {
150
+ this.queue.shift();
151
+ this.counts.dropped++;
152
+ }
153
+ this.queue.push({ event, bytes: wireSize(event) });
154
+ if (this.queue.length >= this.batchSize && this.inflight === null)
155
+ void this.pump();
156
+ }
157
+ catch {
158
+ this.counts.invalid++;
159
+ }
160
+ }
161
+ /** Send everything queued now, and resolve once it has been sent or has failed. */
162
+ async flush() {
163
+ while (this.inflight !== null || this.queue.length > 0)
164
+ await this.pump();
165
+ }
166
+ /** Stop the timer, send what is queued and refuse further facts (counted as dropped). */
167
+ async close() {
168
+ this.closed = true;
169
+ if (this.timer !== undefined)
170
+ clearInterval(this.timer);
171
+ await this.flush();
172
+ }
173
+ stats() {
174
+ return { queued: this.queue.length, ...this.counts };
175
+ }
176
+ /** One send loop at a time; it drains the queue in batches. */
177
+ pump() {
178
+ if (this.inflight === null) {
179
+ this.inflight = this.drain().finally(() => {
180
+ this.inflight = null;
181
+ });
182
+ }
183
+ return this.inflight;
184
+ }
185
+ async drain() {
186
+ while (this.queue.length > 0) {
187
+ const batch = this.take();
188
+ try {
189
+ await this.sender.record({ events: batch.map((item) => item.event) }, { idempotencyKey: globalThis.crypto.randomUUID() });
190
+ this.counts.sent += batch.length;
191
+ }
192
+ catch (error) {
193
+ this.counts.failed += batch.length;
194
+ try {
195
+ this.onError?.(error);
196
+ }
197
+ catch {
198
+ // A failing callback must not stop the buffer.
199
+ }
200
+ }
201
+ }
202
+ }
203
+ /** The oldest facts that fit one batch: at most 500 events and MAX_BATCH_BYTES of body. */
204
+ take() {
205
+ let bytes = ENVELOPE_BYTES;
206
+ let count = 0;
207
+ while (count < this.queue.length && count < MAX_BATCH_EVENTS) {
208
+ const next = this.queue[count].bytes;
209
+ if (count > 0 && bytes + next > BODY_BUDGET)
210
+ break;
211
+ bytes += next;
212
+ count++;
213
+ }
214
+ return this.queue.splice(0, count);
215
+ }
216
+ }
217
+ //# sourceMappingURL=key-usage.js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AAC;oBACH,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;gBACxB,CAAC;gBAAC,MAAM,CAAC;oBACP,+CAA+C;gBACjD,CAAC;YACH,CAAC;QACH,CAAC;IAAA,CACF;IAED,2FAA2F;IACnF,IAAI,GAAa;QACvB,IAAI,KAAK,GAAG,cAAc,CAAC;QAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,OAAO,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,GAAG,gBAAgB,EAAE,CAAC;YAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAE,CAAC,KAAK,CAAC;YACtC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,IAAI,GAAG,WAAW;gBAAE,MAAM;YACnD,KAAK,IAAI,IAAI,CAAC;YACd,KAAK,EAAE,CAAC;QACV,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAAA,CACpC;CACF"}
@@ -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: "3.0.1";
34
+ readonly sdkVersion: "3.0.3";
35
35
  readonly genVersion: "internal";
36
- readonly userAgent: "noresponse-sdk/typescript 3.0.1 internal 1 @noresponse/node";
36
+ readonly userAgent: "noresponse-sdk/typescript 3.0.3 internal 1 @noresponse/node";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
@@ -24,8 +24,8 @@ export function serverURLFromOptions(options) {
24
24
  export const SDK_METADATA = {
25
25
  language: "typescript",
26
26
  openapiDocVersion: "1",
27
- sdkVersion: "3.0.1",
27
+ sdkVersion: "3.0.3",
28
28
  genVersion: "internal",
29
- userAgent: "noresponse-sdk/typescript 3.0.1 internal 1 @noresponse/node",
29
+ userAgent: "noresponse-sdk/typescript 3.0.3 internal 1 @noresponse/node",
30
30
  };
31
31
  //# sourceMappingURL=config.js.map
@@ -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 tenant'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. Its assessments are the account's history (GET /v1/accounts/{account_id}/assessments).
7
+ * Body of the 200 answer to GET /v1/accounts/{account_id}: the one current risk of one of the calling tenant'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
  /**
@@ -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 tenant'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. Its assessments are the account's history (GET /v1/accounts/{account_id}/assessments).
34
+ * Body of the 200 answer to GET /v1/accounts/{account_id}: the one current risk of one of the calling tenant'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
  /**
@@ -55,6 +55,9 @@ export * from "./ip-summary-type.js";
55
55
  export * from "./ip-summary.js";
56
56
  export * from "./key-rotation-request.js";
57
57
  export * from "./key-rotation.js";
58
+ export * from "./key-usage-batch-request.js";
59
+ export * from "./key-usage-batch.js";
60
+ export * from "./key-usage-event.js";
58
61
  export * from "./lane.js";
59
62
  export * from "./line-type.js";
60
63
  export * from "./not-found-error-code.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBA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C;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC"}
@@ -55,6 +55,9 @@ export * from "./ip-summary-type.js";
55
55
  export * from "./ip-summary.js";
56
56
  export * from "./key-rotation-request.js";
57
57
  export * from "./key-rotation.js";
58
+ export * from "./key-usage-batch-request.js";
59
+ export * from "./key-usage-batch.js";
60
+ export * from "./key-usage-event.js";
58
61
  export * from "./lane.js";
59
62
  export * from "./line-type.js";
60
63
  export * from "./not-found-error-code.js";