@boxrouter/sdk 0.0.1-alpha.0 → 0.12.190
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/NOTICE +29 -5
- package/README.md +497 -24
- package/dist/addresses.d.ts +5 -0
- package/dist/addresses.js +10 -0
- package/dist/api-error.d.ts +62 -0
- package/dist/api-error.js +264 -0
- package/dist/boxrouter.d.ts +68 -0
- package/dist/boxrouter.js +291 -0
- package/dist/browser-session/index.d.ts +17 -0
- package/dist/browser-session/index.js +48 -0
- package/dist/browser-session/operations.gen.d.ts +272 -0
- package/dist/browser-session/operations.gen.js +58 -0
- package/dist/browser-session/responseContracts/api_keys.d.ts +2 -0
- package/dist/browser-session/responseContracts/api_keys.js +10 -0
- package/dist/browser-session/responseContracts/credits.d.ts +2 -0
- package/dist/browser-session/responseContracts/credits.js +8 -0
- package/dist/browser-session/responseContracts/github.d.ts +2 -0
- package/dist/browser-session/responseContracts/github.js +11 -0
- package/dist/browser-session/responseContracts/identity.d.ts +2 -0
- package/dist/browser-session/responseContracts/identity.js +30 -0
- package/dist/browser-session/responseContracts/organizations.d.ts +2 -0
- package/dist/browser-session/responseContracts/organizations.js +17 -0
- package/dist/browser-session/responseContracts/privacy.d.ts +2 -0
- package/dist/browser-session/responseContracts/privacy.js +7 -0
- package/dist/browser-session/responseContracts.gen.d.ts +3 -0
- package/dist/browser-session/responseContracts.gen.js +10 -0
- package/dist/browser-session/responseValidators/api_keys-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/api_keys-diagnostics.d.cts +4 -0
- package/dist/browser-session/responseValidators/api_keys.cjs +2 -0
- package/dist/browser-session/responseValidators/api_keys.d.cts +4 -0
- package/dist/browser-session/responseValidators/credits-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/credits-diagnostics.d.cts +3 -0
- package/dist/browser-session/responseValidators/credits.cjs +2 -0
- package/dist/browser-session/responseValidators/credits.d.cts +3 -0
- package/dist/browser-session/responseValidators/github-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/github-diagnostics.d.cts +3 -0
- package/dist/browser-session/responseValidators/github.cjs +2 -0
- package/dist/browser-session/responseValidators/github.d.cts +3 -0
- package/dist/browser-session/responseValidators/identity-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/identity-diagnostics.d.cts +23 -0
- package/dist/browser-session/responseValidators/identity.cjs +2 -0
- package/dist/browser-session/responseValidators/identity.d.cts +23 -0
- package/dist/browser-session/responseValidators/organizations-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/organizations-diagnostics.d.cts +15 -0
- package/dist/browser-session/responseValidators/organizations.cjs +2 -0
- package/dist/browser-session/responseValidators/organizations.d.cts +15 -0
- package/dist/browser-session/responseValidators/privacy-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/privacy-diagnostics.d.cts +2 -0
- package/dist/browser-session/responseValidators/privacy.cjs +2 -0
- package/dist/browser-session/responseValidators/privacy.d.cts +2 -0
- package/dist/client/client.gen.d.ts +1 -1
- package/dist/client/client.gen.js +46 -94
- package/dist/client/index.d.ts +10 -10
- package/dist/client/index.js +16 -5
- package/dist/client/types.gen.d.ts +6 -6
- package/dist/client/types.gen.js +2 -1
- package/dist/client/utils.gen.d.ts +2 -2
- package/dist/client/utils.gen.js +31 -20
- package/dist/client.gen.d.ts +2 -2
- package/dist/client.gen.js +5 -2
- package/dist/command-check.gen.d.ts +14 -0
- package/dist/command-check.gen.js +23 -0
- package/dist/command-input.gen.d.ts +6 -0
- package/dist/command-input.gen.js +45 -0
- package/dist/core/auth.gen.js +5 -1
- package/dist/core/binaryStream.d.ts +8 -0
- package/dist/core/binaryStream.js +76 -0
- package/dist/core/bodySerializer.gen.d.ts +1 -1
- package/dist/core/bodySerializer.gen.js +8 -5
- package/dist/core/commandValidators.cjs +1 -0
- package/dist/core/commandValidators.d.cts +14 -0
- package/dist/core/eventValidation.d.ts +17 -0
- package/dist/core/eventValidation.js +56 -0
- package/dist/core/eventValidators.cjs +1 -0
- package/dist/core/eventValidators.d.cts +2 -0
- package/dist/core/json.d.ts +3 -0
- package/dist/core/json.js +33 -0
- package/dist/core/params.gen.js +4 -1
- package/dist/core/pathSerializer.gen.js +20 -11
- package/dist/core/queryKeySerializer.gen.js +12 -6
- package/dist/core/responseContracts/actions.d.ts +2 -0
- package/dist/core/responseContracts/actions.js +30 -0
- package/dist/core/responseContracts/agents.d.ts +2 -0
- package/dist/core/responseContracts/agents.js +7 -0
- package/dist/core/responseContracts/artifacts.d.ts +2 -0
- package/dist/core/responseContracts/artifacts.js +8 -0
- package/dist/core/responseContracts/commands.d.ts +2 -0
- package/dist/core/responseContracts/commands.js +6 -0
- package/dist/core/responseContracts/credits.d.ts +2 -0
- package/dist/core/responseContracts/credits.js +27 -0
- package/dist/core/responseContracts/files.d.ts +2 -0
- package/dist/core/responseContracts/files.js +15 -0
- package/dist/core/responseContracts/github.d.ts +2 -0
- package/dist/core/responseContracts/github.js +8 -0
- package/dist/core/responseContracts/images.d.ts +2 -0
- package/dist/core/responseContracts/images.js +8 -0
- package/dist/core/responseContracts/launchRuns.d.ts +2 -0
- package/dist/core/responseContracts/launchRuns.js +10 -0
- package/dist/core/responseContracts/launches.d.ts +2 -0
- package/dist/core/responseContracts/launches.js +10 -0
- package/dist/core/responseContracts/operations.d.ts +2 -0
- package/dist/core/responseContracts/operations.js +7 -0
- package/dist/core/responseContracts/previews.d.ts +2 -0
- package/dist/core/responseContracts/previews.js +8 -0
- package/dist/core/responseContracts/pricing.d.ts +2 -0
- package/dist/core/responseContracts/pricing.js +6 -0
- package/dist/core/responseContracts/processes.d.ts +2 -0
- package/dist/core/responseContracts/processes.js +11 -0
- package/dist/core/responseContracts/provider_accounts.d.ts +2 -0
- package/dist/core/responseContracts/provider_accounts.js +13 -0
- package/dist/core/responseContracts/providers.d.ts +2 -0
- package/dist/core/responseContracts/providers.js +6 -0
- package/dist/core/responseContracts/routing.d.ts +2 -0
- package/dist/core/responseContracts/routing.js +8 -0
- package/dist/core/responseContracts/sandboxes.d.ts +2 -0
- package/dist/core/responseContracts/sandboxes.js +15 -0
- package/dist/core/responseContracts/secrets.d.ts +2 -0
- package/dist/core/responseContracts/secrets.js +8 -0
- package/dist/core/responseContracts/spend_limits.d.ts +2 -0
- package/dist/core/responseContracts/spend_limits.js +8 -0
- package/dist/core/responseContracts/terminals.d.ts +2 -0
- package/dist/core/responseContracts/terminals.js +11 -0
- package/dist/core/responseContracts/usage.d.ts +2 -0
- package/dist/core/responseContracts/usage.js +7 -0
- package/dist/core/responseContracts/volumes.d.ts +2 -0
- package/dist/core/responseContracts/volumes.js +19 -0
- package/dist/core/responseContracts.gen.d.ts +3 -0
- package/dist/core/responseContracts.gen.js +27 -0
- package/dist/core/responseModes.d.ts +19 -0
- package/dist/core/responseModes.js +13 -0
- package/dist/core/responseValidation.d.ts +44 -0
- package/dist/core/responseValidation.js +174 -0
- package/dist/core/responseValidators/actions-diagnostics.cjs +4 -0
- package/dist/core/responseValidators/actions-diagnostics.d.cts +24 -0
- package/dist/core/responseValidators/actions.cjs +2 -0
- package/dist/core/responseValidators/actions.d.cts +24 -0
- package/dist/core/responseValidators/agents-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/agents-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/agents.cjs +2 -0
- package/dist/core/responseValidators/agents.d.cts +2 -0
- package/dist/core/responseValidators/artifacts-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/artifacts-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/artifacts.cjs +2 -0
- package/dist/core/responseValidators/artifacts.d.cts +2 -0
- package/dist/core/responseValidators/commands-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/commands-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/commands.cjs +2 -0
- package/dist/core/responseValidators/commands.d.cts +1 -0
- package/dist/core/responseValidators/compact.cjs +122 -0
- package/dist/core/responseValidators/credits-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/credits-diagnostics.d.cts +21 -0
- package/dist/core/responseValidators/credits.cjs +2 -0
- package/dist/core/responseValidators/credits.d.cts +21 -0
- package/dist/core/responseValidators/files-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/files-diagnostics.d.cts +5 -0
- package/dist/core/responseValidators/files.cjs +2 -0
- package/dist/core/responseValidators/files.d.cts +5 -0
- package/dist/core/responseValidators/github-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/github-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/github.cjs +2 -0
- package/dist/core/responseValidators/github.d.cts +2 -0
- package/dist/core/responseValidators/images-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/images-diagnostics.d.cts +3 -0
- package/dist/core/responseValidators/images.cjs +2 -0
- package/dist/core/responseValidators/images.d.cts +3 -0
- package/dist/core/responseValidators/launchRuns-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/launchRuns-diagnostics.d.cts +5 -0
- package/dist/core/responseValidators/launchRuns.cjs +2 -0
- package/dist/core/responseValidators/launchRuns.d.cts +5 -0
- package/dist/core/responseValidators/launches-diagnostics.cjs +10 -0
- package/dist/core/responseValidators/launches-diagnostics.d.cts +5 -0
- package/dist/core/responseValidators/launches.cjs +2 -0
- package/dist/core/responseValidators/launches.d.cts +5 -0
- package/dist/core/responseValidators/operations-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/operations-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/operations.cjs +2 -0
- package/dist/core/responseValidators/operations.d.cts +2 -0
- package/dist/core/responseValidators/previews-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/previews-diagnostics.d.cts +3 -0
- package/dist/core/responseValidators/previews.cjs +2 -0
- package/dist/core/responseValidators/previews.d.cts +3 -0
- package/dist/core/responseValidators/pricing-diagnostics.cjs +7 -0
- package/dist/core/responseValidators/pricing-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/pricing.cjs +2 -0
- package/dist/core/responseValidators/pricing.d.cts +1 -0
- package/dist/core/responseValidators/processes-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/processes-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/processes.cjs +2 -0
- package/dist/core/responseValidators/processes.d.cts +2 -0
- package/dist/core/responseValidators/provider_accounts-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/provider_accounts-diagnostics.d.cts +8 -0
- package/dist/core/responseValidators/provider_accounts.cjs +2 -0
- package/dist/core/responseValidators/provider_accounts.d.cts +8 -0
- package/dist/core/responseValidators/providers-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/providers-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/providers.cjs +2 -0
- package/dist/core/responseValidators/providers.d.cts +1 -0
- package/dist/core/responseValidators/routing-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/routing-diagnostics.d.cts +3 -0
- package/dist/core/responseValidators/routing.cjs +2 -0
- package/dist/core/responseValidators/routing.d.cts +3 -0
- package/dist/core/responseValidators/sandboxes-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/sandboxes-diagnostics.d.cts +10 -0
- package/dist/core/responseValidators/sandboxes.cjs +2 -0
- package/dist/core/responseValidators/sandboxes.d.cts +10 -0
- package/dist/core/responseValidators/secrets-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/secrets-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/secrets.cjs +2 -0
- package/dist/core/responseValidators/secrets.d.cts +1 -0
- package/dist/core/responseValidators/spend_limits-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/spend_limits-diagnostics.d.cts +3 -0
- package/dist/core/responseValidators/spend_limits.cjs +2 -0
- package/dist/core/responseValidators/spend_limits.d.cts +3 -0
- package/dist/core/responseValidators/terminals-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/terminals-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/terminals.cjs +2 -0
- package/dist/core/responseValidators/terminals.d.cts +2 -0
- package/dist/core/responseValidators/usage-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/usage-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/usage.cjs +2 -0
- package/dist/core/responseValidators/usage.d.cts +1 -0
- package/dist/core/responseValidators/volumes-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/volumes-diagnostics.d.cts +10 -0
- package/dist/core/responseValidators/volumes.cjs +2 -0
- package/dist/core/responseValidators/volumes.d.cts +10 -0
- package/dist/core/serverSentEvents.gen.d.ts +21 -62
- package/dist/core/serverSentEvents.gen.js +297 -116
- package/dist/core/streamErrors.d.ts +32 -0
- package/dist/core/streamErrors.js +51 -0
- package/dist/core/types.gen.d.ts +2 -2
- package/dist/core/types.gen.js +2 -1
- package/dist/core/utils.gen.d.ts +1 -1
- package/dist/core/utils.gen.js +16 -10
- package/dist/creation.gen.d.ts +21 -0
- package/dist/creation.gen.js +35 -0
- package/dist/data-origin.d.ts +25 -0
- package/dist/data-origin.js +57 -0
- package/dist/error-codes.gen.d.ts +2 -0
- package/dist/error-codes.gen.js +2 -0
- package/dist/idempotency.gen.d.ts +1 -0
- package/dist/idempotency.gen.js +60 -0
- package/dist/images.d.ts +74 -0
- package/dist/images.js +88 -0
- package/dist/index.d.ts +22 -2
- package/dist/index.js +79 -1
- package/dist/launch-input.gen.d.ts +9 -0
- package/dist/launch-input.gen.js +83 -0
- package/dist/launch.d.ts +28 -0
- package/dist/launch.js +222 -0
- package/dist/namespace-actions.d.mts +307 -0
- package/dist/namespace-actions.mjs +595 -0
- package/dist/namespace-agents.d.mts +33 -0
- package/dist/namespace-agents.mjs +40 -0
- package/dist/namespace-artifacts.d.mts +46 -0
- package/dist/namespace-artifacts.mjs +69 -0
- package/dist/namespace-base.d.mts +7 -0
- package/dist/namespace-base.mjs +7 -0
- package/dist/namespace-commands.d.mts +57 -0
- package/dist/namespace-commands.mjs +57 -0
- package/dist/namespace-credits.d.mts +213 -0
- package/dist/namespace-credits.mjs +476 -0
- package/dist/namespace-files.d.mts +203 -0
- package/dist/namespace-files.mjs +334 -0
- package/dist/namespace-github.d.mts +50 -0
- package/dist/namespace-github.mjs +68 -0
- package/dist/namespace-images.d.mts +52 -0
- package/dist/namespace-images.mjs +78 -0
- package/dist/namespace-launch_runs.d.mts +89 -0
- package/dist/namespace-launch_runs.mjs +133 -0
- package/dist/namespace-launches.d.mts +89 -0
- package/dist/namespace-launches.mjs +133 -0
- package/dist/namespace-operations.d.mts +45 -0
- package/dist/namespace-operations.mjs +52 -0
- package/dist/namespace-previews.d.mts +79 -0
- package/dist/namespace-previews.mjs +101 -0
- package/dist/namespace-pricing.d.mts +31 -0
- package/dist/namespace-pricing.mjs +22 -0
- package/dist/namespace-processes.d.mts +125 -0
- package/dist/namespace-processes.mjs +184 -0
- package/dist/namespace-provider_accounts.d.mts +156 -0
- package/dist/namespace-provider_accounts.mjs +241 -0
- package/dist/namespace-providers.d.mts +28 -0
- package/dist/namespace-providers.mjs +24 -0
- package/dist/namespace-routing.d.mts +64 -0
- package/dist/namespace-routing.mjs +86 -0
- package/dist/namespace-sandboxes.d.mts +287 -0
- package/dist/namespace-sandboxes.mjs +402 -0
- package/dist/namespace-secrets.d.mts +46 -0
- package/dist/namespace-secrets.mjs +68 -0
- package/dist/namespace-spend_limits.d.mts +48 -0
- package/dist/namespace-spend_limits.mjs +70 -0
- package/dist/namespace-terminals.d.mts +112 -0
- package/dist/namespace-terminals.mjs +177 -0
- package/dist/namespace-usage.d.mts +46 -0
- package/dist/namespace-usage.mjs +53 -0
- package/dist/namespace-volumes.d.mts +110 -0
- package/dist/namespace-volumes.mjs +269 -0
- package/dist/operations.d.ts +14 -0
- package/dist/operations.js +31 -0
- package/dist/retry.d.ts +8 -0
- package/dist/retry.js +63 -0
- package/dist/routing-choices.gen.d.ts +132 -0
- package/dist/routing-choices.gen.js +136 -0
- package/dist/routing.d.ts +23 -0
- package/dist/routing.js +38 -0
- package/dist/sandbox-handle.gen.d.ts +8 -0
- package/dist/sandbox-handle.gen.js +14 -0
- package/dist/sandboxes.d.ts +213 -0
- package/dist/sandboxes.js +507 -0
- package/dist/sdk.gen.d.ts +2016 -12
- package/dist/sdk.gen.js +3862 -16
- package/dist/server-timing.d.ts +19 -0
- package/dist/server-timing.gen.d.ts +265 -0
- package/dist/server-timing.gen.js +254 -0
- package/dist/server-timing.js +421 -0
- package/dist/spend-limits.d.ts +17 -0
- package/dist/spend-limits.js +26 -0
- package/dist/telemetry.d.ts +51 -0
- package/dist/telemetry.gen.d.ts +1 -0
- package/dist/telemetry.gen.js +5 -0
- package/dist/telemetry.js +438 -0
- package/dist/terminal.d.ts +61 -0
- package/dist/terminal.js +266 -0
- package/dist/transfer.d.ts +75 -0
- package/dist/transfer.js +389 -0
- package/dist/types.gen.d.ts +14936 -110
- package/dist/types.gen.js +2 -1
- package/dist/user-agent.d.ts +2 -0
- package/dist/user-agent.js +18 -0
- package/dist/version.gen.d.ts +1 -0
- package/dist/version.gen.js +5 -0
- package/dist/volumes.d.ts +33 -0
- package/dist/volumes.js +221 -0
- package/dist/waits.d.ts +31 -0
- package/dist/waits.js +42 -0
- package/dist/workflow-policy.gen.d.ts +41 -0
- package/dist/workflow-policy.gen.js +45 -0
- package/package.json +124 -14
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const validate0: (value: unknown) => boolean;
|
|
2
|
+
export declare const validate1: (value: unknown) => boolean;
|
|
3
|
+
export declare const validate2: (value: unknown) => boolean;
|
|
4
|
+
export declare const validate3: (value: unknown) => boolean;
|
|
5
|
+
export declare const validate4: (value: unknown) => boolean;
|
|
6
|
+
export declare const validate5: (value: unknown) => boolean;
|
|
7
|
+
export declare const validate6: (value: unknown) => boolean;
|
|
8
|
+
export declare const validate7: (value: unknown) => boolean;
|
|
9
|
+
export declare const validate8: (value: unknown) => boolean;
|
|
10
|
+
export declare const validate9: (value: unknown) => boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = require("./compact.cjs")({"roots":{"validate0":{"$":0},"validate1":{"$":1},"validate2":{"$":3},"validate3":{"$":2},"validate4":{"$":4},"validate5":{"$":5},"validate6":{"$":61},"validate7":{"$":63},"validate8":{"$":5},"validate9":{"$":5}},"definitions":[{"type":"object","required":["automation","version","executable"],"properties":{"automation":{"type":"array","minItems":1,"items":{"type":"string","enum":["playwright","cdp"]}},"version":{"type":"string"},"executable":{"type":"string"}}},{"type":"object","required":["state","keeps","outside_grant","lifetime"],"properties":{"state":{"type":"string","enum":["paused"]},"keeps":{"type":"string","enum":["files_only","files_and_memory"]},"outside_grant":{"type":"array","items":{"type":"string","enum":["keeps"]}},"lifetime":{"$":2},"pause_expires_at":{"type":["string","null"],"format":"date-time"}}},{"type":"object","required":["seconds","remaining_seconds","ends_at","kept_until","at_end","max_seconds","extendable"],"properties":{"seconds":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"remaining_seconds":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"ends_at":{"type":["string","null"],"format":"date-time"},"kept_until":{"type":["string","null"],"format":"date-time"},"at_end":{"type":"string","enum":["destroy","pause"]},"max_seconds":{"anyOf":[{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},{"type":"string","enum":["unlimited","unknown"]},{"type":"object","required":["at_least"],"properties":{"at_least":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}}}}]},"extendable":{"type":"boolean"}}},{"type":"object","required":["state","cold_restart","outside_grant","lifetime"],"properties":{"state":{"type":"string","enum":["running"]},"cold_restart":{"type":"boolean"},"outside_grant":{"type":"array","items":{"type":"string","enum":["cold_restart"]}},"lifetime":{"$":2}}},{"type":"object","required":["policy"],"properties":{"policy":{"type":"string","enum":["deny_all","allowlist","denylist","open"]}}},{"type":"object","required":["id","state","state_reason","failure","native_state","observed_at","state_recorded_at","created_at","ready_at","ended_at","labels","lifetime","route","contract","request","hidden_secrets","tcp_ports","recorder","limits"],"properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"},"state":{"type":"string"},"state_reason":{"type":["string","null"]},"failure":{"anyOf":[{"$":6},{"type":"null"}]},"native_state":{"type":["string","null"]},"observed_at":{"type":"string","format":"date-time"},"state_recorded_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"ready_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"created_at_source":{"anyOf":[{"$":7},{"type":"null"}]},"created_at_how":{"type":["string","null"],"minLength":1},"created_at_step":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"ready_at_source":{"anyOf":[{"$":7},{"type":"null"}]},"ready_at_how":{"type":["string","null"],"minLength":1},"ready_at_step":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"ended_at_source":{"anyOf":[{"$":7},{"type":"null"}]},"ended_at_how":{"type":["string","null"],"minLength":1},"ended_at_step":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"cost_source":{"anyOf":[{"$":7},{"type":"null"}]},"cost_how":{"type":["string","null"],"minLength":1},"cost_step":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"origin":{"anyOf":[{"$":8},{"type":"null"}]},"labels":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":["string","null"]},"resources":{"type":"object","properties":{"cpu":{"exclusiveMinimum":0,"allOf":[{"anyOf":[{"type":["number","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"exclusiveMinimum":0}},"memory_mib":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"disk_mib":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}}}},"image":{"anyOf":[{"$":11},{"type":"null"}]},"image_setup":{"$":12},"usage":{"anyOf":[{"type":"object","required":["provider","started","region","size","intervals","creations"],"properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},"class":{"type":"object","required":["name","source","observed_at","how"],"properties":{"name":{"type":["string","null"],"minLength":1},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"name":{"type":"null"}}},"else":{"properties":{"name":{"type":"string"}}}},"started":{"type":"object","required":["at","source","observed_at","how"],"properties":{"at":{"type":["string","null"]},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"at":{"type":"null"}}},"else":{"properties":{"at":{"$":13}}}},"region":{"type":"object","required":["name","source","observed_at","how"],"properties":{"name":{"type":["string","null"],"minLength":1},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"name":{"type":"null"}}},"else":{"properties":{"name":{"type":"string"}}}},"size":{"type":"object","required":["source","observed_at","how"],"properties":{"cpu":{"exclusiveMinimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"exclusiveMinimum":0}},"memory_mib":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"disk_mib":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"gpu":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"gpu_model":{"type":"string","pattern":"^[a-z][a-z0-9-]*:[a-z0-9][a-z0-9-]*$"},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"not":{"anyOf":[{"required":["cpu"]},{"required":["memory_mib"]},{"required":["disk_mib"]},{"required":["gpu"]},{"required":["gpu_model"]}]}},"else":{"anyOf":[{"required":["cpu"]},{"required":["memory_mib"]},{"required":["disk_mib"]},{"required":["gpu"]}]},"allOf":[{"if":{"required":["gpu"]},"then":{"required":["gpu_model"]}},{"if":{"required":["gpu_model"]},"then":{"required":["gpu"]}}]},"intervals":{"type":"array","minItems":1,"items":{"type":"object","required":["state","seconds","source","observed_at","how"],"properties":{"size":{"$":16},"snapshot_storage":{"$":17},"state":{"enum":["running","paused","stopped"]},"seconds":{"anyOf":[{"minimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},{"$":18},{"type":"null"}]},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"seconds":{"type":"null"}}},"else":{"properties":{"seconds":{"allOf":[{"anyOf":[{"type":["number","object"]},{"x-boxrouter-bigint":true}]}]}}}}},"creations":{"type":"object","required":["count","source","observed_at","how"],"properties":{"count":{"minimum":0,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"count":{"type":"null"}}},"else":{"properties":{"count":{"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}]}}}},"active_cpu":{"type":"object","required":["seconds","source","observed_at","how"],"properties":{"seconds":{"minimum":0,"allOf":[{"anyOf":[{"type":["number","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"seconds":{"type":"null"}}},"else":{"properties":{"seconds":{"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}]}}}},"egress":{"type":"object","required":["bytes","source","observed_at","how"],"properties":{"bytes":{"minimum":0,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"bytes":{"type":"null"}}},"else":{"properties":{"bytes":{"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}]}}}},"snapshot_storage":{"type":"object","required":["source","observed_at","how"],"properties":{"gb":{"minimum":0,"allOf":[{"anyOf":[{"type":["number","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"max_gb":{"minimum":0,"allOf":[{"anyOf":[{"type":["number","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14},"bytes":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}}},"if":{"$":15},"then":{"properties":{"gb":{"type":"null"}}},"else":{"anyOf":[{"required":["gb"],"properties":{"gb":{"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}]}}},{"required":["bytes"]}]}}},"additionalProperties":false},{"type":"object","required":["provider","started","region","size","intervals","creations"],"properties":{"provider":{"$":19},"class":{"$":20},"started":{"$":21},"region":{"$":22},"size":{"type":"object","required":["source","observed_at","how"],"properties":{"cpu":{"$":23},"memory_mib":{"$":24},"disk_mib":{"$":25},"gpu":{"const":0},"gpu_model":{"$":26},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"$":27},"else":{"$":28},"allOf":[{"if":{"required":["gpu"]},"then":{"required":["gpu_model"]}},{"if":{"required":["gpu_model"]},"then":{"required":["gpu"]}}]},"intervals":{"$":29},"creations":{"$":30},"active_cpu":{"$":31},"egress":{"$":32}},"additionalProperties":false},{"type":"null"}]},"cost":{"anyOf":[{"type":"object","required":["label","total","lines","held_back_by","exclusions","price_version","as_of"],"properties":{"label":{"enum":["reported","calculated","unknown"]},"total":{"anyOf":[{"$":33},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","required":["what","quantity","unit","rate","amount","quantity_source"],"properties":{"what":{"enum":["cpu","memory","disk","gpu","machine","creation","egress","snapshot_storage"]},"quantity":{"$":34},"unit":{"type":"string","minLength":1},"rate":{"$":34},"amount":{"$":34},"quantity_source":{"$":35},"text":{"type":"string","minLength":1},"sources":{"type":"object","required":["amount"],"properties":{"quantity":{"type":"string","minLength":1},"rate":{"type":"string","minLength":1},"amount":{"type":"string","minLength":1}}}}}},"held_back_by":{"type":"array","items":{"type":"string","minLength":1}},"exclusions":{"type":"array","items":{"type":"string","minLength":1}},"price_version":{"type":["string","null"],"pattern":"^[a-z][a-z0-9-]*@[0-9]{4}-[0-9]{2}-[0-9]{2}(?:-([01][0-9]|2[0-3])[0-5][0-9][0-5][0-9]Z)?$"},"as_of":{"$":13},"per_hour":{"$":36},"reported_figure":{"type":"object","required":["source","observed_at","how"],"properties":{"source":{"$":35,"const":"provider"},"observed_at":{"$":13},"how":{"type":"string","minLength":1}}},"summary":{"type":"string","minLength":1}},"allOf":[{"if":{"properties":{"label":{"const":"unknown"}},"required":["label"]},"then":{"properties":{"total":{"type":"null"}}},"else":{"properties":{"total":{"type":"object"}}}},{"if":{"properties":{"label":{"const":"reported"}},"required":["label"]},"then":{"required":["reported_figure"]},"else":{"not":{"required":["reported_figure"]}}}],"additionalProperties":false},{"type":"object","required":["label","total"],"properties":{"label":{"$":38},"total":{"$":39},"summary":{"$":40}},"if":{"properties":{"label":{"const":"unknown"}},"required":["label"]},"then":{"properties":{"total":{"type":"null"}}},"else":{"properties":{"total":{"type":"object"}}},"additionalProperties":false},{"type":"null"}]},"charge":{"anyOf":[{"$":41},{"type":"null"}]},"funded_until":{"type":["string","null"],"format":"date-time"},"connectable":{"type":"boolean"},"lifetime":{"$":2},"route":{"$":43},"contract":{"anyOf":[{"$":51},{"type":"null"}]},"request":{"$":53},"hidden_secrets":{"type":["object","null"],"propertyNames":{"$":54},"additionalProperties":{"$":55}},"tcp_ports":{"type":["array","null"],"items":{"$":57}},"recorder":{"type":["object","null"]},"limits":{"$":58},"volume":{"anyOf":[{"$":59},{"type":"null"}]},"operation_id":{"type":["string","null"],"minLength":1},"account":{"type":"object","required":["healthy","detail"],"properties":{"healthy":{"type":"boolean"},"detail":{"type":["string","null"]}}}}},{"type":"object","required":["summary","provider_state","native_code","native_message","observed_at"],"properties":{"summary":{"type":"string","minLength":1,"maxLength":200},"provider_state":{"type":["string","null"]},"native_code":{"type":["string","null"],"pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"native_message":{"type":["string","null"],"maxLength":512},"observed_at":{"type":"string","format":"date-time"}}},{"type":"string","enum":["provider","published","measured","recorded","calculated","unknown"]},{"anyOf":[{"$":9},{"$":10}]},{"type":"object","required":["source","run_id","job_id"],"properties":{"source":{"type":"string","enum":["github_actions"]},"repository":{"type":"string","minLength":1},"workflow":{"type":["string","null"],"minLength":1},"run_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"},"run_number":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"job_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"},"job_name":{"type":"string","minLength":1},"run_url":{"type":"string","format":"uri"},"job_url":{"type":"string","format":"uri"}}},{"type":"object","required":["source","launch_id","agent","agent_name"],"properties":{"source":{"type":"string","enum":["agents"]},"launch_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"},"agent":{"type":"string","minLength":1},"agent_name":{"type":"string","minLength":1},"repository":{"type":["string","null"],"minLength":1},"sha":{"type":["string","null"],"pattern":"^[0-9a-f]{40}$"}}},{"type":"object","required":["value","source"],"properties":{"value":{"type":"string","minLength":1},"source":{"$":7}}},{"type":"object","required":["provider","duration_ms"],"properties":{"provider":{"type":"string","minLength":1},"duration_ms":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}}}},{"type":"string","format":"date-time","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?Z$"},{"type":"string","minLength":1},{"properties":{"source":{"const":"unknown"}},"required":["source"]},{"type":"object","required":["source","observed_at","how"],"properties":{"cpu":{"exclusiveMinimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"exclusiveMinimum":0}},"memory_mib":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"disk_mib":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"gpu":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"gpu_model":{"type":"string","pattern":"^[a-z][a-z0-9-]*:[a-z0-9][a-z0-9-]*$"},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"not":{"anyOf":[{"required":["cpu"]},{"required":["memory_mib"]},{"required":["disk_mib"]},{"required":["gpu"]},{"required":["gpu_model"]}]}},"else":{"anyOf":[{"required":["cpu"]},{"required":["memory_mib"]},{"required":["disk_mib"]},{"required":["gpu"]}]},"allOf":[{"if":{"required":["gpu"]},"then":{"required":["gpu_model"]}},{"if":{"required":["gpu_model"]},"then":{"required":["gpu"]}}]},{"type":"object","required":["source","observed_at","how"],"properties":{"gb":{"minimum":0,"allOf":[{"anyOf":[{"type":["number","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"max_gb":{"minimum":0,"allOf":[{"anyOf":[{"type":["number","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14},"bytes":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}}},"if":{"$":15},"then":{"properties":{"gb":{"type":"null"}}},"else":{"anyOf":[{"required":["gb"],"properties":{"gb":{"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}]}}},{"required":["bytes"]}]}},{"type":"object","required":["low","high"],"properties":{"low":{"minimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"high":{"minimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}}}},{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},{"type":"object","required":["name","source","observed_at","how"],"properties":{"name":{"type":["string","null"],"minLength":1},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"name":{"type":"null"}}},"else":{"properties":{"name":{"type":"string"}}}},{"type":"object","required":["at","source","observed_at","how"],"properties":{"at":{"type":["string","null"]},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"at":{"type":"null"}}},"else":{"properties":{"at":{"$":13}}}},{"type":"object","required":["name","source","observed_at","how"],"properties":{"name":{"type":["string","null"],"minLength":1},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"name":{"type":"null"}}},"else":{"properties":{"name":{"type":"string"}}}},{"exclusiveMinimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"exclusiveMinimum":0}},{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},{"type":"string","pattern":"^[a-z][a-z0-9-]*:[a-z0-9][a-z0-9-]*$"},{"not":{"anyOf":[{"required":["cpu"]},{"required":["memory_mib"]},{"required":["disk_mib"]},{"required":["gpu"]},{"required":["gpu_model"]}]}},{"anyOf":[{"required":["cpu"]},{"required":["memory_mib"]},{"required":["disk_mib"]},{"required":["gpu"]}]},{"type":"array","minItems":1,"items":{"type":"object","required":["state","seconds","source","observed_at","how"],"properties":{"size":{"$":16},"snapshot_storage":{"$":17},"state":{"enum":["running","paused","stopped"]},"seconds":{"anyOf":[{"minimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},{"$":18},{"type":"null"}]},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"seconds":{"type":"null"}}},"else":{"properties":{"seconds":{"allOf":[{"anyOf":[{"type":["number","object"]},{"x-boxrouter-bigint":true}]}]}}}}},{"type":"object","required":["count","source","observed_at","how"],"properties":{"count":{"minimum":0,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"count":{"type":"null"}}},"else":{"properties":{"count":{"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}]}}}},{"type":"object","required":["seconds","source","observed_at","how"],"properties":{"seconds":{"minimum":0,"allOf":[{"anyOf":[{"type":["number","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"seconds":{"type":"null"}}},"else":{"properties":{"seconds":{"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}]}}}},{"type":"object","required":["bytes","source","observed_at","how"],"properties":{"bytes":{"minimum":0,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"source":{"$":7},"observed_at":{"$":13},"how":{"$":14}},"if":{"$":15},"then":{"properties":{"bytes":{"type":"null"}}},"else":{"properties":{"bytes":{"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}]}}}},{"type":"object","required":["low","high"],"properties":{"low":{"$":34},"high":{"$":34}}},{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},{"type":"string","enum":["provider","published","measured","recorded","calculated","unknown"]},{"$":37},{"type":"object","required":["low","high"],"properties":{"low":{"$":34},"high":{"$":34}}},{"enum":["reported","calculated","unknown"]},{"anyOf":[{"$":33},{"type":"null"}]},{"type":"string","minLength":1},{"type":"object","required":["status","reserved_nanodollars","held_nanodollars","lifetime_seconds"],"properties":{"status":{"type":"string"},"reserved_nanodollars":{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,18})$"},"held_nanodollars":{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,18})$"},"lifetime_seconds":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"funding":{"type":"string"},"first_charged_nanodollars":{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,18})$"},"amount_nanodollars":{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,18})$"},"returned_nanodollars":{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,18})$"},"create_fee_nanodollars":{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,18})$"},"basis":{"type":["string","null"]},"settled_at":{"type":"string","format":"date-time"},"corrections":{"type":"array","maxItems":1000,"items":{"$":42}}},"allOf":[{"if":{"properties":{"status":{"const":"charged"}},"required":["status"]},"then":{"required":["first_charged_nanodollars","amount_nanodollars","returned_nanodollars","settled_at","corrections"]},"else":{"properties":{"first_charged_nanodollars":false,"amount_nanodollars":false,"returned_nanodollars":false,"create_fee_nanodollars":false,"basis":false,"settled_at":false,"corrections":false}}}]},{"type":"object","required":["at","delta_nanodollars","reason"],"properties":{"at":{"type":"string","format":"date-time"},"delta_nanodollars":{"type":"string","maxLength":20,"pattern":"^(-?[1-9][0-9]{0,18})$"},"reason":{"type":"string"}}},{"type":"object","required":["provider","class","adapter_version","selection"],"properties":{"id":{"type":["string","null"]},"provider":{"type":"string"},"class":{"type":["string","null"]},"adapter_version":{"type":["string","null"]},"account_id":{"type":["string","null"]},"supply":{"type":["string","null"]},"region":{"type":["string","null"]},"native_id":{"type":["string","null"]},"selection":{"anyOf":[{"$":44},{"type":"null"}]}}},{"type":"object","required":["considered","eligible","ranked_by","excluded","attempts"],"properties":{"considered":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"eligible":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"ranked_by":{"type":["string","null"],"enum":["price","time","providers","order",null]},"excluded":{"type":"array","items":{"$":45}},"preparation_skips":{"type":"array","items":{"$":47}},"attempts":{"type":"array","items":{"type":"object","required":["provider","native_code","native_status"],"properties":{"provider":{"type":"string"},"native_code":{"type":["string","null"]},"native_status":{"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}]},"route_id":{"type":["string","null"],"maxLength":128},"account_id":{"type":["string","null"],"maxLength":128},"supply":{"type":["string","null"],"maxLength":32},"cause":{"$":48}}}},"fallbacks_allowed":{"type":"boolean"},"stopped_reason":{"$":49},"funding_group":{"$":50},"workspace_mode":{"type":"string"}}},{"type":"object","required":["provider","class","account_id","failed"],"properties":{"provider":{"type":"string"},"class":{"type":["string","null"]},"account_id":{"type":["string","null"]},"failed":{"type":"array","items":{"$":46}}}},{"type":"object","required":["reason"],"properties":{"reason":{"type":"string"},"gate":{"type":"string"},"knob":{"type":"string"},"resource":{"type":"string"},"extra":{"type":"string"},"limit":{"type":"string"},"detail":{"type":["string","null"]},"details":{"type":"object","additionalProperties":true},"fix":{"type":["string","null"]},"asked":{},"offered":{},"narrowed_by":{"type":["string","null"],"enum":["account",null]},"between":{"type":"array","items":{"type":"string"}},"value":{}}},{"type":"object","required":["provider","reason_code"],"properties":{"provider":{"type":"string","minLength":1},"route_id":{"type":["string","null"],"maxLength":128},"account_id":{"type":["string","null"],"maxLength":128},"reason_code":{"type":"string","minLength":1},"cause":{"$":48}}},{"type":"string","minLength":1,"maxLength":64},{"type":["string","null"]},{"type":"string"},{"type":"object","required":["spec_version","gates","resources","attested"],"properties":{"spec_version":{"type":"string","pattern":"^(boxspec|sandbox-provider-spec)/[0-9]+\\.[0-9]+(-draft(\\.[0-9]+)?)?$"},"gates":{"type":"object","additionalProperties":{"$":52}},"resources":{"type":"object","additionalProperties":true},"attested":{"type":"object","additionalProperties":{"type":"object","required":["source","read"],"properties":{"source":{"type":"string"},"read":{"type":"string","format":"date"}}}}}},{"type":"object","required":["variant","basis","granted","also","settings","unavailable"],"properties":{"variant":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"basis":{"type":"string","enum":["implemented","proven"]},"granted":{"type":"object","additionalProperties":true},"also":{"type":"object","additionalProperties":true},"settings":{"type":"object","additionalProperties":true},"unavailable":{"type":["string","null"]}}},{"type":"object","additionalProperties":true},{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Z][A-Z0-9_]{0,127}$"},{"type":"object","required":["placeholder","hosts"],"properties":{"placeholder":{"type":"string","minLength":1},"hosts":{"type":"array","uniqueItems":true,"items":{"allOf":[{"$":56},{"type":"string"}]}}}},{"type":"string","anyOf":[{"pattern":"^(?=.{1,253}(?![\\s\\S]))(?![0-9.]+(?![\\s\\S]))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?![\\s\\S])"},{"pattern":"^(?=.{3,255}(?![\\s\\S]))\\*\\.(?![0-9.]+(?![\\s\\S]))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?![\\s\\S])"}]},{"type":"object","required":["host","port","tls"],"properties":{"host":{"type":"string","minLength":1},"port":{"minimum":1,"maximum":65535,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1,"maximum":65535}},"tls":{"type":"string","enum":["none","terminated"]}}},{"type":"object","properties":{"buffered_output_bytes":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"file_transfer_bytes":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"upload_max_bytes":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"download_max_bytes":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"inline_transfer_max_bytes":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}}}},{"type":"object","required":["id","path","access","restored_checkpoint","restore_duration_ms"],"properties":{"id":{"$":60},"path":{"type":"string"},"access":{"type":"string","enum":["write","read","shared","branch"]},"restored_checkpoint":{"minimum":1,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"restore_duration_ms":{"minimum":0,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}}}},{"type":"string","pattern":"^vol_[0-9a-f]{32}$"},{"type":"object","required":["data","next_cursor","counts"],"properties":{"data":{"type":"array","items":{"$":5}},"next_cursor":{"type":["string","null"]},"counts":{"$":62}}},{"type":"object","required":["live","ended","by_state"],"properties":{"live":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"ended":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"by_state":{"type":"object","additionalProperties":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}}}}},{"type":"object","required":["spec_version","request","eligible","excluded","nearest","closest"],"properties":{"spec_version":{"type":"string","pattern":"^(boxspec|sandbox-provider-spec)/[0-9]+\\.[0-9]+(-draft(\\.[0-9]+)?)?$"},"request":{"allOf":[{"$":64}]},"eligible":{"type":"array","items":{"$":86}},"excluded":{"type":"array","items":{"$":45}},"nearest":{"type":"array","items":{"type":"object","required":["change","then_eligible"],"properties":{"change":{"type":"object","additionalProperties":true},"then_eligible":{"type":"array","items":{"type":"string"}}}}},"closest":{"anyOf":[{"$":45},{"type":"null"}]}}},{"type":"object","properties":{"lifetime_seconds":{"minimum":60,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":60}},"at_end":{"type":"string","enum":["destroy","pause"]},"requirements":{"$":65},"resources":{"$":76},"preferences":{"$":77},"privacy":{"$":79},"route":{"$":80},"volume":{"$":81},"image":{"$":82},"registry_credentials":{"type":"object","required":["username","password"],"properties":{"username":{"type":"string","minLength":1,"pattern":"^[^\\u0000]*$"},"password":{"type":"string","minLength":1,"pattern":"^[^\\u0000]*$"}}},"env":{"type":"object","maxProperties":256,"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"secret_refs":{"$":84},"secret_values":{"type":"object","minProperties":1,"maxProperties":256,"propertyNames":{"$":54},"additionalProperties":{"type":"string","maxLength":16384,"pattern":"^[^\\u0000]*$"}},"labels":{"type":"object","maxProperties":64,"propertyNames":{"maxLength":63},"additionalProperties":{"type":"string","maxLength":255}}},"allOf":[{"if":{"required":["secret_values"]},"then":{"required":["requirements"],"properties":{"requirements":{"required":["hidden_secrets"]}}}},{"if":{"required":["volume","image"]},"then":{"properties":{"image":{"anyOf":[{"type":"string","allOf":[{"not":{"const":"provider_default"}},{"not":{"pattern":"^prepared:sha256:"}}]},{"$":83}]}}}},{"if":{"required":["image"],"properties":{"image":{"type":"object","required":["provider_artifact"]}}},"then":{"required":["preferences"],"properties":{"preferences":{"required":["only"],"properties":{"only":{"maxItems":1}}}}}}]},{"type":"object","properties":{"custom_images":{"$":66},"desktop":{"$":67},"hidden_secrets":{"$":68},"idle_shutdown":{"$":69},"network_lockdown":{"$":70},"pause_resume":{"$":71},"previews":{"$":72},"processes":{"$":73},"tcp_ports":{"$":74},"terminal":{"$":75}},"if":{"required":["previews"],"properties":{"previews":{"required":["survives_pause"]}}},"then":{"anyOf":[{"required":["pause_resume"]},{"required":["idle_shutdown"]}]}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","required":["inject_into"],"properties":{"transparent":{"type":"boolean"},"intercepts":{"anyOf":[{"enum":["injected_hosts","all_https"]},{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["injected_hosts","all_https"]}}]},"inject_into":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$":56}}}},{"type":"object","properties":{"custom_idle_time":{"type":"boolean"},"idle_seconds":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}}},"allOf":[{"if":{"required":["idle_seconds"]},"then":{"properties":{"custom_idle_time":{"const":true}}}},{"if":{"required":["idle_seconds"]},"then":{"required":["custom_idle_time"],"properties":{"custom_idle_time":{"const":true}}}}]},{"type":"object","required":["policy"],"properties":{"policy":{"enum":["deny_all","allowlist","denylist","open"]},"allow":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","minLength":1}},"deny":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","minLength":1,"pattern":"^[^*]*$"}}},"allOf":[{"if":{"properties":{"policy":{"const":"deny_all"}},"required":["policy"]},"then":{"not":{"anyOf":[{"required":["allow"]},{"required":["deny"]}]}}},{"if":{"properties":{"policy":{"const":"allowlist"}},"required":["policy"]},"then":{"required":["allow"],"not":{"required":["deny"]}}},{"if":{"properties":{"policy":{"const":"denylist"}},"required":["policy"]},"then":{"required":["deny"],"not":{"required":["allow"]}}}]},{"type":"object","properties":{"keeps":{"anyOf":[{"enum":["files_only","files_and_memory"]},{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["files_only","files_and_memory"]}}]}}},{"type":"object","required":["access","ports"],"properties":{"access":{"anyOf":[{"enum":["any","public","private"]},{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["public","private"]}}]},"revocable":{"type":"boolean"},"link_lifetime_seconds":{"exclusiveMinimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"exclusiveMinimum":0}},"websocket":{"type":"boolean"},"loopback":{"type":"boolean"},"survives_pause":{"type":"boolean"},"ports":{"type":"array","minItems":1,"uniqueItems":true,"items":{"minimum":1,"maximum":65535,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1,"maximum":65535}}}}},{"type":"object","properties":{"input":{"type":"boolean"}}},{"type":"object","required":["tls","ports"],"properties":{"tls":{"anyOf":[{"enum":["any","none"]},{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["none"]}}]},"ports":{"type":"array","minItems":1,"uniqueItems":true,"items":{"minimum":1,"maximum":65535,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1,"maximum":65535}}}}},{"type":"object","properties":{}},{"type":"object","properties":{"cpu_min":{"exclusiveMinimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"exclusiveMinimum":0}},"memory_min_mib":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"disk_min_mib":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"extendable_lifetime":{"type":"boolean","const":true},"region":{"type":"string","minLength":1},"kernel":{"anyOf":[{"enum":["shared","filtered","dedicated"]},{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["shared","filtered","dedicated"]}}]},"paused_retention_seconds":{"exclusiveMinimum":0,"allOf":[{"anyOf":[{"type":"number"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"exclusiveMinimum":0}},"arch":{"anyOf":[{"enum":["amd64","arm64"]},{"type":"array","minItems":1,"uniqueItems":true,"items":{"enum":["amd64","arm64"]}}]},"run_seconds":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"process_seconds":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}}}},{"type":"object","properties":{"order":{"type":"array","uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"}},"only":{"$":78},"ignore":{"type":"array","uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"}},"sort":{"type":"string","enum":["price","time"]},"allow_fallbacks":{"type":"boolean"}}},{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"}},{"type":"object","properties":{"data_collection":{"type":"string","enum":["allow","deny"]},"zdr":{"type":"boolean"},"boxrouter_content_retention":{"type":"string","enum":["ordinary","transient"]}}},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"},"account_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\u0000]*$"},"supply":{"type":"string","enum":["byok","managed"]}}},{"type":"object","required":["id"],"properties":{"id":{"$":60},"path":{"type":"string","pattern":"^/[^\\u0000]*$"},"checkpoint":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"access":{"type":"string","enum":["write","read","shared","branch"]}}},{"anyOf":[{"type":"string","const":"provider_default"},{"type":"string","minLength":1,"not":{"const":"provider_default"}},{"type":"object","required":["dockerfile"],"properties":{"dockerfile":{"type":"string","minLength":1},"context_artifact_id":{"type":"string","minLength":1}}},{"$":83},{"type":"object","required":["private_oci"],"properties":{"private_oci":{"type":"string","minLength":1}}}]},{"type":"object","required":["provider_artifact"],"properties":{"provider_artifact":{"type":"string","minLength":1}}},{"type":"object","propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{"$":85}},{"type":"object","required":["secret_name"],"properties":{"secret_name":{"$":54}}},{"type":"object","required":["provider","class","account_id","supply","adapter_version","gates","resources","attested","lifetime"],"properties":{"provider":{"type":"string"},"class":{"type":["string","null"]},"account_id":{"type":["string","null"]},"supply":{"type":"string"},"adapter_version":{"type":"string"},"gates":{"type":"object","additionalProperties":{"$":52}},"resources":{"type":"object","additionalProperties":true},"attested":{"type":"object","additionalProperties":true},"lifetime":{"$":2},"ranking":{"$":87},"request_overrides":{"type":"object","required":["image"],"properties":{"image":{"$":82}}}}},{"type":"object","required":["position","reason","explanation","price"],"properties":{"position":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"reason":{"type":"string"},"explanation":{"type":"string"},"price":{"type":"object","required":["usd_per_hour","kind","basis"],"properties":{"usd_per_hour":{"type":["string","null"],"pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"kind":{"type":"string"},"basis":{"type":"string"}}}}}]});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const validate0: (value: unknown) => boolean;
|
|
2
|
+
export declare const validate1: (value: unknown) => boolean;
|
|
3
|
+
export declare const validate2: (value: unknown) => boolean;
|
|
4
|
+
export declare const validate3: (value: unknown) => boolean;
|
|
5
|
+
export declare const validate4: (value: unknown) => boolean;
|
|
6
|
+
export declare const validate5: (value: unknown) => boolean;
|
|
7
|
+
export declare const validate6: (value: unknown) => boolean;
|
|
8
|
+
export declare const validate7: (value: unknown) => boolean;
|
|
9
|
+
export declare const validate8: (value: unknown) => boolean;
|
|
10
|
+
export declare const validate9: (value: unknown) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.validate0 = validate313;const schema307 = {"type":"object","required":["secrets"],"properties":{"secrets":{"type":"array","items":{"$ref":"#/components/schemas/Secret"}}}};const schema308 = {"type":"object","required":["name","created_at","updated_at"],"properties":{"name":{"$ref":"#/components/schemas/SecretName"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}};const schema40 = {"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Z][A-Z0-9_]{0,127}$"};const func1 = require("ajv/dist/runtime/ucs2length").default;const pattern5 = new RegExp("^[A-Z][A-Z0-9_]{0,127}$", "u");const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"];function validate314(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate314.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.name === undefined) && (missing0 = "name")) || ((data.created_at === undefined) && (missing0 = "created_at"))) || ((data.updated_at === undefined) && (missing0 = "updated_at"))){validate314.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.name !== undefined){let data0 = data.name;const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(typeof data0 === "string"){if(func1(data0) > 128){validate314.errors = [{instancePath:instancePath+"/name",schemaPath:"#/components/schemas/SecretName/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"}];return false;}else {if(func1(data0) < 1){validate314.errors = [{instancePath:instancePath+"/name",schemaPath:"#/components/schemas/SecretName/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern5.test(data0)){validate314.errors = [{instancePath:instancePath+"/name",schemaPath:"#/components/schemas/SecretName/pattern",keyword:"pattern",params:{pattern: "^[A-Z][A-Z0-9_]{0,127}$"},message:"must match pattern \""+"^[A-Z][A-Z0-9_]{0,127}$"+"\""}];return false;}}}}else {validate314.errors = [{instancePath:instancePath+"/name",schemaPath:"#/components/schemas/SecretName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.created_at !== undefined){let data1 = data.created_at;const _errs4 = errors;if(errors === _errs4){if(errors === _errs4){if(typeof data1 === "string"){if(!(formats0.validate(data1))){validate314.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate314.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.updated_at !== undefined){let data2 = data.updated_at;const _errs6 = errors;if(errors === _errs6){if(errors === _errs6){if(typeof data2 === "string"){if(!(formats0.validate(data2))){validate314.errors = [{instancePath:instancePath+"/updated_at",schemaPath:"#/properties/updated_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate314.errors = [{instancePath:instancePath+"/updated_at",schemaPath:"#/properties/updated_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate314.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate314.errors = vErrors;return errors === 0;}validate314.evaluated = {"props":{"name":true,"created_at":true,"updated_at":true},"dynamicProps":false,"dynamicItems":false};function validate313(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate313.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.secrets === undefined) && (missing0 = "secrets")){validate313.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.secrets !== undefined){let data0 = data.secrets;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate314(data0[i0], {instancePath:instancePath+"/secrets/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate314.errors : vErrors.concat(validate314.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}else {validate313.errors = [{instancePath:instancePath+"/secrets",schemaPath:"#/properties/secrets/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}}}}else {validate313.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate313.errors = vErrors;return errors === 0;}validate313.evaluated = {"props":{"secrets":true},"dynamicProps":false,"dynamicItems":false};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validate0: (value: unknown) => boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = require("./compact.cjs")({"roots":{"validate0":{"$":0}},"definitions":[{"type":"object","required":["secrets"],"properties":{"secrets":{"type":"array","items":{"$":1}}}},{"type":"object","required":["name","created_at","updated_at"],"properties":{"name":{"$":2},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Z][A-Z0-9_]{0,127}$"}]});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validate0: (value: unknown) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.validate0 = validate301;const schema292 = {"type":"object","required":["mode","workspace"],"properties":{"mode":{"type":"string","enum":["test","live"],"description":"Billing book mode these limits apply to."},"workspace":{"anyOf":[{"$ref":"#/components/schemas/SpendLimit"},{"type":"null"}]},"workspace_spent_nanodollars":{"description":"Managed usage counted against the workspace cap so far in its current period, holds included, as a canonical base-10 nonnegative 64-bit nanodollar string. Null when no workspace cap is set.","anyOf":[{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"},{"type":"null"}]}}};const schema293 = {"type":"object","required":["limit_usd","limit_period"],"properties":{"limit_usd":{"$ref":"#/components/schemas/SpendLimitUsd"},"limit_period":{"$ref":"#/components/schemas/SpendLimitPeriod"}},"description":"A cap on managed compute spend. Both fields are always set; clear a cap with the delete operation."};const schema294 = {"type":"string","pattern":"^(?:0\\.[0-9]*[1-9][0-9]{0,8}|[1-9][0-9]*(?:\\.[0-9]{1,9})?)$","description":"Positive exact USD amount as a decimal string with at most nine fractional digits."};const schema295 = {"type":"string","enum":["total","daily","monthly"]};const pattern200 = new RegExp("^(?:0\\.[0-9]*[1-9][0-9]{0,8}|[1-9][0-9]*(?:\\.[0-9]{1,9})?)$", "u");function validate302(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate302.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.limit_usd === undefined) && (missing0 = "limit_usd")) || ((data.limit_period === undefined) && (missing0 = "limit_period"))){validate302.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.limit_usd !== undefined){let data0 = data.limit_usd;const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(typeof data0 === "string"){if(!pattern200.test(data0)){validate302.errors = [{instancePath:instancePath+"/limit_usd",schemaPath:"#/components/schemas/SpendLimitUsd/pattern",keyword:"pattern",params:{pattern: "^(?:0\\.[0-9]*[1-9][0-9]{0,8}|[1-9][0-9]*(?:\\.[0-9]{1,9})?)$"},message:"must match pattern \""+"^(?:0\\.[0-9]*[1-9][0-9]{0,8}|[1-9][0-9]*(?:\\.[0-9]{1,9})?)$"+"\""}];return false;}}else {validate302.errors = [{instancePath:instancePath+"/limit_usd",schemaPath:"#/components/schemas/SpendLimitUsd/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.limit_period !== undefined){let data1 = data.limit_period;const _errs4 = errors;if(typeof data1 !== "string"){validate302.errors = [{instancePath:instancePath+"/limit_period",schemaPath:"#/components/schemas/SpendLimitPeriod/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data1 === "total") || (data1 === "daily")) || (data1 === "monthly"))){validate302.errors = [{instancePath:instancePath+"/limit_period",schemaPath:"#/components/schemas/SpendLimitPeriod/enum",keyword:"enum",params:{allowedValues: schema295.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}else {validate302.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate302.errors = vErrors;return errors === 0;}validate302.evaluated = {"props":{"limit_usd":true,"limit_period":true},"dynamicProps":false,"dynamicItems":false};const func1 = require("ajv/dist/runtime/ucs2length").default;const pattern184 = new RegExp("^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$", "u");function validate301(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate301.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.mode === undefined) && (missing0 = "mode")) || ((data.workspace === undefined) && (missing0 = "workspace"))){validate301.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.mode !== undefined){let data0 = data.mode;const _errs1 = errors;if(typeof data0 !== "string"){validate301.errors = [{instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data0 === "test") || (data0 === "live"))){validate301.errors = [{instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues: schema292.properties.mode.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.workspace !== undefined){let data1 = data.workspace;const _errs3 = errors;const _errs4 = errors;let valid1 = false;const _errs5 = errors;if(!(validate302(data1, {instancePath:instancePath+"/workspace",parentData:data,parentDataProperty:"workspace",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate302.errors : vErrors.concat(validate302.errors);errors = vErrors.length;}var _valid0 = _errs5 === errors;valid1 = valid1 || _valid0;if(_valid0){var props0 = {};props0.limit_usd = true;props0.limit_period = true;}const _errs6 = errors;if(data1 !== null){const err0 = {instancePath:instancePath+"/workspace",schemaPath:"#/properties/workspace/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;if(!valid1){const err1 = {instancePath:instancePath+"/workspace",schemaPath:"#/properties/workspace/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;validate301.errors = vErrors;return false;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.workspace_spent_nanodollars !== undefined){let data2 = data.workspace_spent_nanodollars;const _errs8 = errors;const _errs9 = errors;let valid2 = false;const _errs10 = errors;if(errors === _errs10){if(typeof data2 === "string"){if(func1(data2) > 19){const err2 = {instancePath:instancePath+"/workspace_spent_nanodollars",schemaPath:"#/properties/workspace_spent_nanodollars/anyOf/0/maxLength",keyword:"maxLength",params:{limit: 19},message:"must NOT have more than 19 characters"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {if(!pattern184.test(data2)){const err3 = {instancePath:instancePath+"/workspace_spent_nanodollars",schemaPath:"#/properties/workspace_spent_nanodollars/anyOf/0/pattern",keyword:"pattern",params:{pattern: "^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"},message:"must match pattern \""+"^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"+"\""};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}else {const err4 = {instancePath:instancePath+"/workspace_spent_nanodollars",schemaPath:"#/properties/workspace_spent_nanodollars/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid1 = _errs10 === errors;valid2 = valid2 || _valid1;const _errs12 = errors;if(data2 !== null){const err5 = {instancePath:instancePath+"/workspace_spent_nanodollars",schemaPath:"#/properties/workspace_spent_nanodollars/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid1 = _errs12 === errors;valid2 = valid2 || _valid1;if(!valid2){const err6 = {instancePath:instancePath+"/workspace_spent_nanodollars",schemaPath:"#/properties/workspace_spent_nanodollars/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate301.errors = vErrors;return false;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}var valid0 = _errs8 === errors;}else {var valid0 = true;}}}}}else {validate301.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate301.errors = vErrors;return errors === 0;}validate301.evaluated = {"props":{"mode":true,"workspace":true,"workspace_spent_nanodollars":true},"dynamicProps":false,"dynamicItems":false};exports.validate1 = validate304;const schema296 = {"type":"object","required":["mode","scope","spend_limit"],"properties":{"mode":{"type":"string","enum":["test","live"]},"scope":{"type":"string","enum":["workspace"]},"spend_limit":{"anyOf":[{"$ref":"#/components/schemas/SpendLimit"},{"type":"null"}]}}};function validate304(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate304.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.mode === undefined) && (missing0 = "mode")) || ((data.scope === undefined) && (missing0 = "scope"))) || ((data.spend_limit === undefined) && (missing0 = "spend_limit"))){validate304.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.mode !== undefined){let data0 = data.mode;const _errs1 = errors;if(typeof data0 !== "string"){validate304.errors = [{instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data0 === "test") || (data0 === "live"))){validate304.errors = [{instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues: schema296.properties.mode.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.scope !== undefined){let data1 = data.scope;const _errs3 = errors;if(typeof data1 !== "string"){validate304.errors = [{instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(data1 === "workspace")){validate304.errors = [{instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/enum",keyword:"enum",params:{allowedValues: schema296.properties.scope.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.spend_limit !== undefined){let data2 = data.spend_limit;const _errs5 = errors;const _errs6 = errors;let valid1 = false;const _errs7 = errors;if(!(validate302(data2, {instancePath:instancePath+"/spend_limit",parentData:data,parentDataProperty:"spend_limit",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate302.errors : vErrors.concat(validate302.errors);errors = vErrors.length;}var _valid0 = _errs7 === errors;valid1 = valid1 || _valid0;if(_valid0){var props0 = {};props0.limit_usd = true;props0.limit_period = true;}const _errs8 = errors;if(data2 !== null){const err0 = {instancePath:instancePath+"/spend_limit",schemaPath:"#/properties/spend_limit/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs8 === errors;valid1 = valid1 || _valid0;if(!valid1){const err1 = {instancePath:instancePath+"/spend_limit",schemaPath:"#/properties/spend_limit/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;validate304.errors = vErrors;return false;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}else {validate304.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate304.errors = vErrors;return errors === 0;}validate304.evaluated = {"props":{"mode":true,"scope":true,"spend_limit":true},"dynamicProps":false,"dynamicItems":false};exports.validate2 = validate306;function validate306(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate306.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.mode === undefined) && (missing0 = "mode")) || ((data.scope === undefined) && (missing0 = "scope"))) || ((data.spend_limit === undefined) && (missing0 = "spend_limit"))){validate306.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.mode !== undefined){let data0 = data.mode;const _errs1 = errors;if(typeof data0 !== "string"){validate306.errors = [{instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data0 === "test") || (data0 === "live"))){validate306.errors = [{instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues: schema296.properties.mode.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.scope !== undefined){let data1 = data.scope;const _errs3 = errors;if(typeof data1 !== "string"){validate306.errors = [{instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(data1 === "workspace")){validate306.errors = [{instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/enum",keyword:"enum",params:{allowedValues: schema296.properties.scope.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.spend_limit !== undefined){let data2 = data.spend_limit;const _errs5 = errors;const _errs6 = errors;let valid1 = false;const _errs7 = errors;if(!(validate302(data2, {instancePath:instancePath+"/spend_limit",parentData:data,parentDataProperty:"spend_limit",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate302.errors : vErrors.concat(validate302.errors);errors = vErrors.length;}var _valid0 = _errs7 === errors;valid1 = valid1 || _valid0;if(_valid0){var props0 = {};props0.limit_usd = true;props0.limit_period = true;}const _errs8 = errors;if(data2 !== null){const err0 = {instancePath:instancePath+"/spend_limit",schemaPath:"#/properties/spend_limit/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs8 === errors;valid1 = valid1 || _valid0;if(!valid1){const err1 = {instancePath:instancePath+"/spend_limit",schemaPath:"#/properties/spend_limit/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;validate306.errors = vErrors;return false;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}else {validate306.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate306.errors = vErrors;return errors === 0;}validate306.evaluated = {"props":{"mode":true,"scope":true,"spend_limit":true},"dynamicProps":false,"dynamicItems":false};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = require("./compact.cjs")({"roots":{"validate0":{"$":0},"validate1":{"$":4},"validate2":{"$":4}},"definitions":[{"type":"object","required":["mode","workspace"],"properties":{"mode":{"type":"string","enum":["test","live"]},"workspace":{"anyOf":[{"$":1},{"type":"null"}]},"workspace_spent_nanodollars":{"anyOf":[{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"},{"type":"null"}]}}},{"type":"object","required":["limit_usd","limit_period"],"properties":{"limit_usd":{"$":2},"limit_period":{"$":3}}},{"type":"string","pattern":"^(?:0\\.[0-9]*[1-9][0-9]{0,8}|[1-9][0-9]*(?:\\.[0-9]{1,9})?)$"},{"type":"string","enum":["total","daily","monthly"]},{"type":"object","required":["mode","scope","spend_limit"],"properties":{"mode":{"type":"string","enum":["test","live"]},"scope":{"type":"string","enum":["workspace"]},"spend_limit":{"anyOf":[{"$":1},{"type":"null"}]}}}]});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.validate0 = validate311;const schema305 = {"type":"object","required":["id","sandbox_id","state","exit_code"],"properties":{"id":{"type":"string"},"sandbox_id":{"type":"string"},"state":{"type":"string","description":"Known states are running, exited and unknown."},"exit_code":{"description":"Present only after a confirmed shell exit; 129 follows a hang-up. Null is not success.","allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}]}}};function validate311(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate311.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.id === undefined) && (missing0 = "id")) || ((data.sandbox_id === undefined) && (missing0 = "sandbox_id"))) || ((data.state === undefined) && (missing0 = "state"))) || ((data.exit_code === undefined) && (missing0 = "exit_code"))){validate311.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate311.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.sandbox_id !== undefined){const _errs3 = errors;if(typeof data.sandbox_id !== "string"){validate311.errors = [{instancePath:instancePath+"/sandbox_id",schemaPath:"#/properties/sandbox_id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.state !== undefined){const _errs5 = errors;if(typeof data.state !== "string"){validate311.errors = [{instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.exit_code !== undefined){let data3 = data.exit_code;const _errs7 = errors;const _errs9 = errors;let valid2 = false;const _errs10 = errors;if((!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) && (data3 !== null)){const err0 = {instancePath:instancePath+"/exit_code",schemaPath:"#/properties/exit_code/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema305.properties.exit_code.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;const _errs12 = errors;if(typeof data3 !== "bigint"){const err1 = {instancePath:instancePath+"/exit_code",schemaPath:"#/properties/exit_code/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const err2 = {instancePath:instancePath+"/exit_code",schemaPath:"#/properties/exit_code/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate311.errors = vErrors;return false;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}var valid0 = _errs7 === errors;}else {var valid0 = true;}}}}}}else {validate311.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate311.errors = vErrors;return errors === 0;}validate311.evaluated = {"props":{"id":true,"sandbox_id":true,"state":true,"exit_code":true},"dynamicProps":false,"dynamicItems":false};exports.validate1 = validate312;function validate312(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate312.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.id === undefined) && (missing0 = "id")) || ((data.sandbox_id === undefined) && (missing0 = "sandbox_id"))) || ((data.state === undefined) && (missing0 = "state"))) || ((data.exit_code === undefined) && (missing0 = "exit_code"))){validate312.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate312.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.sandbox_id !== undefined){const _errs3 = errors;if(typeof data.sandbox_id !== "string"){validate312.errors = [{instancePath:instancePath+"/sandbox_id",schemaPath:"#/properties/sandbox_id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.state !== undefined){const _errs5 = errors;if(typeof data.state !== "string"){validate312.errors = [{instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.exit_code !== undefined){let data3 = data.exit_code;const _errs7 = errors;const _errs9 = errors;let valid2 = false;const _errs10 = errors;if((!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) && (data3 !== null)){const err0 = {instancePath:instancePath+"/exit_code",schemaPath:"#/properties/exit_code/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema305.properties.exit_code.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;const _errs12 = errors;if(typeof data3 !== "bigint"){const err1 = {instancePath:instancePath+"/exit_code",schemaPath:"#/properties/exit_code/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const err2 = {instancePath:instancePath+"/exit_code",schemaPath:"#/properties/exit_code/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate312.errors = vErrors;return false;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}var valid0 = _errs7 === errors;}else {var valid0 = true;}}}}}}else {validate312.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate312.errors = vErrors;return errors === 0;}validate312.evaluated = {"props":{"id":true,"sandbox_id":true,"state":true,"exit_code":true},"dynamicProps":false,"dynamicItems":false};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = require("./compact.cjs")({"roots":{"validate0":{"$":0},"validate1":{"$":0}},"definitions":[{"type":"object","required":["id","sandbox_id","state","exit_code"],"properties":{"id":{"type":"string"},"sandbox_id":{"type":"string"},"state":{"type":"string"},"exit_code":{"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}]}}}]});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.validate0 = validate308;const schema298 = {"type":"object","required":["as_of","data","next_cursor"],"properties":{"as_of":{"type":"string","format":"date-time","description":"UTC timestamp of the repeatable-read snapshot used to compose this page."},"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageReportRow"}},"next_cursor":{"type":["string","null"],"minLength":1,"maxLength":512}}};const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"];const schema299 = {"type":"object","required":["period","group_key","sandbox_count","compute_seconds","compute_seconds_unknown_sandboxes","charge_usd","held_usd","byok_provider_cost_usd","byok_provider_cost_unknown_sandboxes"],"properties":{"period":{"type":"string","minLength":1,"description":"Inclusive UTC date range for non-day groups, UTC day for day groups, or `current` for the current open-hold snapshot."},"group_key":{"type":["string","null"],"minLength":1,"description":"Provider, UTC day (or `current`), API-key ID, or sandbox ID; null means the source key could not be attributed."},"sandbox_count":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"compute_seconds":{"type":["object","null"],"required":["low","high"],"properties":{"low":{"$ref":"#/components/schemas/Seconds"},"high":{"$ref":"#/components/schemas/Seconds"}},"description":"Exact conservative interval bounds in seconds; null when no computable interval is present or any contributing duration is unknown."},"compute_seconds_unknown_sandboxes":{"minimum":0,"description":"Sandboxes with missing or uncertain compute-duration evidence.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"charge_usd":{"$ref":"#/components/schemas/Usd","description":"Exact settled managed-compute charge recognized within this row."},"held_usd":{"$ref":"#/components/schemas/Usd","description":"Current managed reservation amount; this is a snapshot and may change on the next request."},"byok_provider_cost_usd":{"anyOf":[{"$ref":"#/components/schemas/Usd"},{"type":"null"}],"description":"Exact BYOK provider cost in USD, from each sandbox's provider-reported cost or its provider usage records priced at list rates. Null when any contributing BYOK sandbox has an unknown provider cost; partial subtotals and local-clock costs are never returned. This is separate from the BoxRouter customer charge."},"byok_provider_cost_unknown_sandboxes":{"minimum":0,"description":"BYOK sandboxes whose provider cost is unknown. Any positive count makes byok_provider_cost_usd null.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"pending_holds":{"type":"object","required":["count","oldest_age_seconds","cause"],"properties":{"count":{"minimum":1,"description":"Managed holds in this row whose create has no known sandbox identity yet. They keep counting in `held_usd` until an operator binds or settles them.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"oldest_age_seconds":{"minimum":0,"description":"Seconds since the oldest such hold was reserved; null when unknown.","allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"cause":{"type":"string","x-boxrouter-open-enum":true,"description":"Why the holds are pending. Clients must tolerate causes they do not know."}},"description":"Present only when the row includes such holds; absent otherwise. Absence means none, not zero."}},"allOf":[{"if":{"properties":{"byok_provider_cost_unknown_sandboxes":{"minimum":1,"x-boxrouter-bigint-range":{"minimum":1}}},"required":["byok_provider_cost_unknown_sandboxes"]},"then":{"properties":{"byok_provider_cost_usd":{"type":"null"}}}}]};const schema300 = {"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$","description":"Exact decimal string; never rounded through a JSON floating-point number."};const schema302 = {"type":"string","pattern":"^(0|[1-9][0-9]*)\\.[0-9]{9}$","description":"Exact USD decimal string with nanodollar precision."};const func1 = require("ajv/dist/runtime/ucs2length").default;const pattern202 = new RegExp("^(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$", "u");const pattern204 = new RegExp("^(0|[1-9][0-9]*)\\.[0-9]{9}$", "u");function validate309(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate309.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.byok_provider_cost_unknown_sandboxes === undefined) && (missing0 = "byok_provider_cost_unknown_sandboxes")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.byok_provider_cost_unknown_sandboxes !== undefined){let data0 = data.byok_provider_cost_unknown_sandboxes;const _errs4 = errors;if(typeof data0 === "bigint"){if(data0 < 1){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(errors === _errs4){if((typeof data0 == "number") && (isFinite(data0))){if(data0 < 1 || isNaN(data0)){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.byok_provider_cost_usd !== undefined){if(data.byok_provider_cost_usd !== null){validate309.errors = [{instancePath:instancePath+"/byok_provider_cost_usd",schemaPath:"#/allOf/0/then/properties/byok_provider_cost_usd/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.byok_provider_cost_usd = true;props0.byok_provider_cost_unknown_sandboxes = true;}}if(!valid1){const err3 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;validate309.errors = vErrors;return false;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((((((data.period === undefined) && (missing1 = "period")) || ((data.group_key === undefined) && (missing1 = "group_key"))) || ((data.sandbox_count === undefined) && (missing1 = "sandbox_count"))) || ((data.compute_seconds === undefined) && (missing1 = "compute_seconds"))) || ((data.compute_seconds_unknown_sandboxes === undefined) && (missing1 = "compute_seconds_unknown_sandboxes"))) || ((data.charge_usd === undefined) && (missing1 = "charge_usd"))) || ((data.held_usd === undefined) && (missing1 = "held_usd"))) || ((data.byok_provider_cost_usd === undefined) && (missing1 = "byok_provider_cost_usd"))) || ((data.byok_provider_cost_unknown_sandboxes === undefined) && (missing1 = "byok_provider_cost_unknown_sandboxes"))){validate309.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(props0 !== true){props0 = props0 || {};props0.period = true;props0.group_key = true;props0.sandbox_count = true;props0.compute_seconds = true;props0.compute_seconds_unknown_sandboxes = true;props0.charge_usd = true;props0.held_usd = true;props0.byok_provider_cost_usd = true;props0.byok_provider_cost_unknown_sandboxes = true;props0.pending_holds = true;}if(data.period !== undefined){let data2 = data.period;const _errs8 = errors;if(errors === _errs8){if(typeof data2 === "string"){if(func1(data2) < 1){validate309.errors = [{instancePath:instancePath+"/period",schemaPath:"#/properties/period/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}else {validate309.errors = [{instancePath:instancePath+"/period",schemaPath:"#/properties/period/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid4 = _errs8 === errors;}else {var valid4 = true;}if(valid4){if(data.group_key !== undefined){let data3 = data.group_key;const _errs10 = errors;if((typeof data3 !== "string") && (data3 !== null)){validate309.errors = [{instancePath:instancePath+"/group_key",schemaPath:"#/properties/group_key/type",keyword:"type",params:{type: schema299.properties.group_key.type},message:"must be string,null"}];return false;}if(errors === _errs10){if(typeof data3 === "string"){if(func1(data3) < 1){validate309.errors = [{instancePath:instancePath+"/group_key",schemaPath:"#/properties/group_key/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}var valid4 = _errs10 === errors;}else {var valid4 = true;}if(valid4){if(data.sandbox_count !== undefined){let data4 = data.sandbox_count;const _errs12 = errors;const _errs13 = errors;const _errs14 = errors;let valid6 = false;const _errs15 = errors;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err4 = {instancePath:instancePath+"/sandbox_count",schemaPath:"#/properties/sandbox_count/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs15 === errors;valid6 = valid6 || _valid1;const _errs17 = errors;if(typeof data4 !== "bigint"){const err5 = {instancePath:instancePath+"/sandbox_count",schemaPath:"#/properties/sandbox_count/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid1 = _errs17 === errors;valid6 = valid6 || _valid1;if(!valid6){const err6 = {instancePath:instancePath+"/sandbox_count",schemaPath:"#/properties/sandbox_count/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate309.errors = vErrors;return false;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}var valid5 = _errs13 === errors;if(valid5){if(typeof data4 === "bigint"){if(data4 < 1){validate309.errors = [{instancePath:instancePath+"/sandbox_count",schemaPath:"#/properties/sandbox_count/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs12){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 1 || isNaN(data4)){validate309.errors = [{instancePath:instancePath+"/sandbox_count",schemaPath:"#/properties/sandbox_count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid4 = _errs12 === errors;}else {var valid4 = true;}if(valid4){if(data.compute_seconds !== undefined){let data5 = data.compute_seconds;const _errs18 = errors;if((!(data5 && typeof data5 == "object" && !Array.isArray(data5))) && (data5 !== null)){validate309.errors = [{instancePath:instancePath+"/compute_seconds",schemaPath:"#/properties/compute_seconds/type",keyword:"type",params:{type: schema299.properties.compute_seconds.type},message:"must be object,null"}];return false;}if(errors === _errs18){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){let missing2;if(((data5.low === undefined) && (missing2 = "low")) || ((data5.high === undefined) && (missing2 = "high"))){validate309.errors = [{instancePath:instancePath+"/compute_seconds",schemaPath:"#/properties/compute_seconds/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(data5.low !== undefined){let data6 = data5.low;const _errs20 = errors;const _errs21 = errors;if(errors === _errs21){if(typeof data6 === "string"){if(!pattern202.test(data6)){validate309.errors = [{instancePath:instancePath+"/compute_seconds/low",schemaPath:"#/components/schemas/Seconds/pattern",keyword:"pattern",params:{pattern: "^(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$"},message:"must match pattern \""+"^(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$"+"\""}];return false;}}else {validate309.errors = [{instancePath:instancePath+"/compute_seconds/low",schemaPath:"#/components/schemas/Seconds/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid7 = _errs20 === errors;}else {var valid7 = true;}if(valid7){if(data5.high !== undefined){let data7 = data5.high;const _errs23 = errors;const _errs24 = errors;if(errors === _errs24){if(typeof data7 === "string"){if(!pattern202.test(data7)){validate309.errors = [{instancePath:instancePath+"/compute_seconds/high",schemaPath:"#/components/schemas/Seconds/pattern",keyword:"pattern",params:{pattern: "^(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$"},message:"must match pattern \""+"^(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$"+"\""}];return false;}}else {validate309.errors = [{instancePath:instancePath+"/compute_seconds/high",schemaPath:"#/components/schemas/Seconds/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid7 = _errs23 === errors;}else {var valid7 = true;}}}}}var valid4 = _errs18 === errors;}else {var valid4 = true;}if(valid4){if(data.compute_seconds_unknown_sandboxes !== undefined){let data8 = data.compute_seconds_unknown_sandboxes;const _errs26 = errors;const _errs27 = errors;const _errs28 = errors;let valid11 = false;const _errs29 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err7 = {instancePath:instancePath+"/compute_seconds_unknown_sandboxes",schemaPath:"#/properties/compute_seconds_unknown_sandboxes/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid2 = _errs29 === errors;valid11 = valid11 || _valid2;const _errs31 = errors;if(typeof data8 !== "bigint"){const err8 = {instancePath:instancePath+"/compute_seconds_unknown_sandboxes",schemaPath:"#/properties/compute_seconds_unknown_sandboxes/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid2 = _errs31 === errors;valid11 = valid11 || _valid2;if(!valid11){const err9 = {instancePath:instancePath+"/compute_seconds_unknown_sandboxes",schemaPath:"#/properties/compute_seconds_unknown_sandboxes/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;validate309.errors = vErrors;return false;}else {errors = _errs28;if(vErrors !== null){if(_errs28){vErrors.length = _errs28;}else {vErrors = null;}}}var valid10 = _errs27 === errors;if(valid10){if(typeof data8 === "bigint"){if(data8 < 0){validate309.errors = [{instancePath:instancePath+"/compute_seconds_unknown_sandboxes",schemaPath:"#/properties/compute_seconds_unknown_sandboxes/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs26){if((typeof data8 == "number") && (isFinite(data8))){if(data8 < 0 || isNaN(data8)){validate309.errors = [{instancePath:instancePath+"/compute_seconds_unknown_sandboxes",schemaPath:"#/properties/compute_seconds_unknown_sandboxes/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid4 = _errs26 === errors;}else {var valid4 = true;}if(valid4){if(data.charge_usd !== undefined){let data9 = data.charge_usd;const _errs32 = errors;const _errs33 = errors;if(errors === _errs33){if(typeof data9 === "string"){if(!pattern204.test(data9)){validate309.errors = [{instancePath:instancePath+"/charge_usd",schemaPath:"#/components/schemas/Usd/pattern",keyword:"pattern",params:{pattern: "^(0|[1-9][0-9]*)\\.[0-9]{9}$"},message:"must match pattern \""+"^(0|[1-9][0-9]*)\\.[0-9]{9}$"+"\""}];return false;}}else {validate309.errors = [{instancePath:instancePath+"/charge_usd",schemaPath:"#/components/schemas/Usd/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid4 = _errs32 === errors;}else {var valid4 = true;}if(valid4){if(data.held_usd !== undefined){let data10 = data.held_usd;const _errs35 = errors;const _errs36 = errors;if(errors === _errs36){if(typeof data10 === "string"){if(!pattern204.test(data10)){validate309.errors = [{instancePath:instancePath+"/held_usd",schemaPath:"#/components/schemas/Usd/pattern",keyword:"pattern",params:{pattern: "^(0|[1-9][0-9]*)\\.[0-9]{9}$"},message:"must match pattern \""+"^(0|[1-9][0-9]*)\\.[0-9]{9}$"+"\""}];return false;}}else {validate309.errors = [{instancePath:instancePath+"/held_usd",schemaPath:"#/components/schemas/Usd/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid4 = _errs35 === errors;}else {var valid4 = true;}if(valid4){if(data.byok_provider_cost_usd !== undefined){let data11 = data.byok_provider_cost_usd;const _errs38 = errors;const _errs39 = errors;let valid14 = false;const _errs40 = errors;const _errs41 = errors;if(errors === _errs41){if(typeof data11 === "string"){if(!pattern204.test(data11)){const err10 = {instancePath:instancePath+"/byok_provider_cost_usd",schemaPath:"#/components/schemas/Usd/pattern",keyword:"pattern",params:{pattern: "^(0|[1-9][0-9]*)\\.[0-9]{9}$"},message:"must match pattern \""+"^(0|[1-9][0-9]*)\\.[0-9]{9}$"+"\""};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/byok_provider_cost_usd",schemaPath:"#/components/schemas/Usd/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}var _valid3 = _errs40 === errors;valid14 = valid14 || _valid3;const _errs43 = errors;if(data11 !== null){const err12 = {instancePath:instancePath+"/byok_provider_cost_usd",schemaPath:"#/properties/byok_provider_cost_usd/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid3 = _errs43 === errors;valid14 = valid14 || _valid3;if(!valid14){const err13 = {instancePath:instancePath+"/byok_provider_cost_usd",schemaPath:"#/properties/byok_provider_cost_usd/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;validate309.errors = vErrors;return false;}else {errors = _errs39;if(vErrors !== null){if(_errs39){vErrors.length = _errs39;}else {vErrors = null;}}}var valid4 = _errs38 === errors;}else {var valid4 = true;}if(valid4){if(data.byok_provider_cost_unknown_sandboxes !== undefined){let data12 = data.byok_provider_cost_unknown_sandboxes;const _errs45 = errors;const _errs46 = errors;const _errs47 = errors;let valid17 = false;const _errs48 = errors;if(!(((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12))) && (isFinite(data12)))){const err14 = {instancePath:instancePath+"/byok_provider_cost_unknown_sandboxes",schemaPath:"#/properties/byok_provider_cost_unknown_sandboxes/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid4 = _errs48 === errors;valid17 = valid17 || _valid4;const _errs50 = errors;if(typeof data12 !== "bigint"){const err15 = {instancePath:instancePath+"/byok_provider_cost_unknown_sandboxes",schemaPath:"#/properties/byok_provider_cost_unknown_sandboxes/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid4 = _errs50 === errors;valid17 = valid17 || _valid4;if(!valid17){const err16 = {instancePath:instancePath+"/byok_provider_cost_unknown_sandboxes",schemaPath:"#/properties/byok_provider_cost_unknown_sandboxes/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;validate309.errors = vErrors;return false;}else {errors = _errs47;if(vErrors !== null){if(_errs47){vErrors.length = _errs47;}else {vErrors = null;}}}var valid16 = _errs46 === errors;if(valid16){if(typeof data12 === "bigint"){if(data12 < 0){validate309.errors = [{instancePath:instancePath+"/byok_provider_cost_unknown_sandboxes",schemaPath:"#/properties/byok_provider_cost_unknown_sandboxes/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs45){if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 0 || isNaN(data12)){validate309.errors = [{instancePath:instancePath+"/byok_provider_cost_unknown_sandboxes",schemaPath:"#/properties/byok_provider_cost_unknown_sandboxes/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid4 = _errs45 === errors;}else {var valid4 = true;}if(valid4){if(data.pending_holds !== undefined){let data13 = data.pending_holds;const _errs51 = errors;if(errors === _errs51){if(data13 && typeof data13 == "object" && !Array.isArray(data13)){let missing3;if((((data13.count === undefined) && (missing3 = "count")) || ((data13.oldest_age_seconds === undefined) && (missing3 = "oldest_age_seconds"))) || ((data13.cause === undefined) && (missing3 = "cause"))){validate309.errors = [{instancePath:instancePath+"/pending_holds",schemaPath:"#/properties/pending_holds/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data13.count !== undefined){let data14 = data13.count;const _errs53 = errors;const _errs54 = errors;const _errs55 = errors;let valid20 = false;const _errs56 = errors;if(!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))){const err17 = {instancePath:instancePath+"/pending_holds/count",schemaPath:"#/properties/pending_holds/properties/count/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid5 = _errs56 === errors;valid20 = valid20 || _valid5;const _errs58 = errors;if(typeof data14 !== "bigint"){const err18 = {instancePath:instancePath+"/pending_holds/count",schemaPath:"#/properties/pending_holds/properties/count/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid5 = _errs58 === errors;valid20 = valid20 || _valid5;if(!valid20){const err19 = {instancePath:instancePath+"/pending_holds/count",schemaPath:"#/properties/pending_holds/properties/count/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;validate309.errors = vErrors;return false;}else {errors = _errs55;if(vErrors !== null){if(_errs55){vErrors.length = _errs55;}else {vErrors = null;}}}var valid19 = _errs54 === errors;if(valid19){if(typeof data14 === "bigint"){if(data14 < 1){validate309.errors = [{instancePath:instancePath+"/pending_holds/count",schemaPath:"#/properties/pending_holds/properties/count/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs53){if((typeof data14 == "number") && (isFinite(data14))){if(data14 < 1 || isNaN(data14)){validate309.errors = [{instancePath:instancePath+"/pending_holds/count",schemaPath:"#/properties/pending_holds/properties/count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid18 = _errs53 === errors;}else {var valid18 = true;}if(valid18){if(data13.oldest_age_seconds !== undefined){let data15 = data13.oldest_age_seconds;const _errs59 = errors;const _errs60 = errors;const _errs61 = errors;let valid22 = false;const _errs62 = errors;if((!(((typeof data15 == "number") && (!(data15 % 1) && !isNaN(data15))) && (isFinite(data15)))) && (data15 !== null)){const err20 = {instancePath:instancePath+"/pending_holds/oldest_age_seconds",schemaPath:"#/properties/pending_holds/properties/oldest_age_seconds/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema299.properties.pending_holds.properties.oldest_age_seconds.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid6 = _errs62 === errors;valid22 = valid22 || _valid6;const _errs64 = errors;if(typeof data15 !== "bigint"){const err21 = {instancePath:instancePath+"/pending_holds/oldest_age_seconds",schemaPath:"#/properties/pending_holds/properties/oldest_age_seconds/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid6 = _errs64 === errors;valid22 = valid22 || _valid6;if(!valid22){const err22 = {instancePath:instancePath+"/pending_holds/oldest_age_seconds",schemaPath:"#/properties/pending_holds/properties/oldest_age_seconds/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;validate309.errors = vErrors;return false;}else {errors = _errs61;if(vErrors !== null){if(_errs61){vErrors.length = _errs61;}else {vErrors = null;}}}var valid21 = _errs60 === errors;if(valid21){if(typeof data15 === "bigint"){if(data15 < 0){validate309.errors = [{instancePath:instancePath+"/pending_holds/oldest_age_seconds",schemaPath:"#/properties/pending_holds/properties/oldest_age_seconds/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs59){if((typeof data15 == "number") && (isFinite(data15))){if(data15 < 0 || isNaN(data15)){validate309.errors = [{instancePath:instancePath+"/pending_holds/oldest_age_seconds",schemaPath:"#/properties/pending_holds/properties/oldest_age_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid18 = _errs59 === errors;}else {var valid18 = true;}if(valid18){if(data13.cause !== undefined){const _errs65 = errors;if(typeof data13.cause !== "string"){validate309.errors = [{instancePath:instancePath+"/pending_holds/cause",schemaPath:"#/properties/pending_holds/properties/cause/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid18 = _errs65 === errors;}else {var valid18 = true;}}}}}else {validate309.errors = [{instancePath:instancePath+"/pending_holds",schemaPath:"#/properties/pending_holds/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid4 = _errs51 === errors;}else {var valid4 = true;}}}}}}}}}}}}else {validate309.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate309.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate309.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate308(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate308.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.as_of === undefined) && (missing0 = "as_of")) || ((data.data === undefined) && (missing0 = "data"))) || ((data.next_cursor === undefined) && (missing0 = "next_cursor"))){validate308.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.as_of !== undefined){let data0 = data.as_of;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0.validate(data0))){validate308.errors = [{instancePath:instancePath+"/as_of",schemaPath:"#/properties/as_of/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate308.errors = [{instancePath:instancePath+"/as_of",schemaPath:"#/properties/as_of/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data1 = data.data;const _errs3 = errors;if(errors === _errs3){if(Array.isArray(data1)){var valid1 = true;const len0 = data1.length;for(let i0=0; i0<len0; i0++){const _errs5 = errors;if(!(validate309(data1[i0], {instancePath:instancePath+"/data/" + i0,parentData:data1,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate309.errors : vErrors.concat(validate309.errors);errors = vErrors.length;}var valid1 = _errs5 === errors;if(!valid1){break;}}}else {validate308.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.next_cursor !== undefined){let data3 = data.next_cursor;const _errs6 = errors;if((typeof data3 !== "string") && (data3 !== null)){validate308.errors = [{instancePath:instancePath+"/next_cursor",schemaPath:"#/properties/next_cursor/type",keyword:"type",params:{type: schema298.properties.next_cursor.type},message:"must be string,null"}];return false;}if(errors === _errs6){if(typeof data3 === "string"){if(func1(data3) > 512){validate308.errors = [{instancePath:instancePath+"/next_cursor",schemaPath:"#/properties/next_cursor/maxLength",keyword:"maxLength",params:{limit: 512},message:"must NOT have more than 512 characters"}];return false;}else {if(func1(data3) < 1){validate308.errors = [{instancePath:instancePath+"/next_cursor",schemaPath:"#/properties/next_cursor/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate308.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate308.errors = vErrors;return errors === 0;}validate308.evaluated = {"props":{"as_of":true,"data":true,"next_cursor":true},"dynamicProps":false,"dynamicItems":false};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validate0: (value: unknown) => boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = require("./compact.cjs")({"roots":{"validate0":{"$":0}},"definitions":[{"type":"object","required":["as_of","data","next_cursor"],"properties":{"as_of":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$":1}},"next_cursor":{"type":["string","null"],"minLength":1,"maxLength":512}}},{"type":"object","required":["period","group_key","sandbox_count","compute_seconds","compute_seconds_unknown_sandboxes","charge_usd","held_usd","byok_provider_cost_usd","byok_provider_cost_unknown_sandboxes"],"properties":{"period":{"type":"string","minLength":1},"group_key":{"type":["string","null"],"minLength":1},"sandbox_count":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"compute_seconds":{"type":["object","null"],"required":["low","high"],"properties":{"low":{"$":2},"high":{"$":2}}},"compute_seconds_unknown_sandboxes":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"charge_usd":{"$":3},"held_usd":{"$":3},"byok_provider_cost_usd":{"anyOf":[{"$":3},{"type":"null"}]},"byok_provider_cost_unknown_sandboxes":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"pending_holds":{"type":"object","required":["count","oldest_age_seconds","cause"],"properties":{"count":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"oldest_age_seconds":{"minimum":0,"allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"cause":{"type":"string"}}}},"allOf":[{"if":{"properties":{"byok_provider_cost_unknown_sandboxes":{"minimum":1,"x-boxrouter-bigint-range":{"minimum":1}}},"required":["byok_provider_cost_unknown_sandboxes"]},"then":{"properties":{"byok_provider_cost_usd":{"type":"null"}}}}]},{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$"},{"type":"string","pattern":"^(0|[1-9][0-9]*)\\.[0-9]{9}$"}]});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validate0: (value: unknown) => boolean;
|