@apifuse/provider-sdk 2.2.0-beta.5 → 2.2.0-beta.51
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/AUTHORING.md +537 -33
- package/CHANGELOG.md +205 -1
- package/README.md +83 -22
- package/SUBMISSION.md +2 -2
- package/bin/apifuse-check.ts +165 -11
- package/bin/apifuse-dev.ts +57 -13
- package/bin/apifuse-migrate-operation-declaration.ts +55 -0
- package/bin/apifuse-migrate-shape.ts +202 -0
- package/bin/apifuse-pack-check.ts +22 -2
- package/bin/apifuse-pack-smoke.ts +57 -2
- package/bin/apifuse-pack-types.ts +357 -38
- package/bin/apifuse-perf.ts +14 -13
- package/bin/apifuse-record.ts +709 -72
- package/bin/apifuse-submit-check.ts +2344 -324
- package/bin/apifuse-sync-assets.ts +117 -0
- package/bin/submit-check-delimited-text.ts +50 -0
- package/dist/auth-turn/index.d.ts +3 -3
- package/dist/auth-turn/index.js +1 -1
- package/dist/auth.d.ts +14 -0
- package/dist/auth.js +67 -0
- package/dist/ceremonies/index.d.ts +16 -0
- package/dist/ceremonies/index.js +141 -36
- package/dist/cli/commands.d.ts +1 -1
- package/dist/cli/commands.js +27 -0
- package/dist/cli/create.d.ts +4 -1
- package/dist/cli/create.js +42 -37
- package/dist/cli/migrate-operation-declaration.d.ts +59 -0
- package/dist/cli/migrate-operation-declaration.js +1249 -0
- package/dist/cli/migrate-operation-shape.d.ts +44 -0
- package/dist/cli/migrate-operation-shape.js +113 -0
- package/dist/cli/migrate-provider-shape.d.ts +52 -0
- package/dist/cli/migrate-provider-shape.js +578 -0
- package/dist/cli/prompt-assets.d.ts +80 -0
- package/dist/cli/prompt-assets.js +743 -0
- package/dist/cli/templates/provider/AGENTS.md.tpl +17 -8
- package/dist/cli/templates/provider/Dockerfile.tpl +1 -1
- package/dist/cli/templates/provider/README.md.tpl +5 -5
- package/dist/cli/templates/provider/index.ts.tpl +6 -3
- package/dist/cli/templates/provider/operations/ping.ts.tpl +4 -1
- package/dist/cli/templates/provider/provider.json.tpl +6 -0
- package/dist/config/loader.d.ts +179 -16
- package/dist/config/loader.js +435 -127
- package/dist/contract-serialization.js +4 -8
- package/dist/contract-types.d.ts +12 -5
- package/dist/contract.js +24 -10
- package/dist/declaration-validation.d.ts +33 -0
- package/dist/declaration-validation.js +266 -0
- package/dist/define.d.ts +66 -29
- package/dist/define.js +778 -69
- package/dist/dev.d.ts +3 -0
- package/dist/dev.js +1 -1
- package/dist/engine.d.ts +78 -0
- package/dist/engine.js +133 -0
- package/dist/error-observability.d.ts +7 -0
- package/dist/error-observability.js +61 -0
- package/dist/error-resolution.d.ts +4 -0
- package/dist/error-resolution.js +122 -0
- package/dist/errors.d.ts +33 -0
- package/dist/errors.js +40 -0
- package/dist/fixture-sanitization.d.ts +28 -0
- package/dist/fixture-sanitization.js +227 -0
- package/dist/health-scenario.d.ts +1842 -0
- package/dist/health-scenario.js +624 -0
- package/dist/index.d.ts +21 -10
- package/dist/index.js +12 -7
- package/dist/lint.d.ts +23 -11
- package/dist/lint.js +572 -69
- package/dist/native-address.d.ts +43 -0
- package/dist/native-address.js +281 -0
- package/dist/native-egress-policy.d.ts +31 -0
- package/dist/native-egress-policy.js +288 -0
- package/dist/observability.d.ts +5 -2
- package/dist/observability.js +48 -1
- package/dist/provider.d.ts +10 -2
- package/dist/provider.js +4 -1
- package/dist/runtime/auth-flow.d.ts +5 -1
- package/dist/runtime/auth-flow.js +6 -0
- package/dist/runtime/browser.d.ts +1 -0
- package/dist/runtime/browser.js +492 -49
- package/dist/runtime/cache.d.ts +1 -0
- package/dist/runtime/cache.js +169 -15
- package/dist/runtime/choice-wordlist.d.ts +9 -0
- package/dist/runtime/choice-wordlist.js +138 -0
- package/dist/runtime/choice.d.ts +13 -1
- package/dist/runtime/choice.js +490 -102
- package/dist/runtime/chrome149-header-order.d.ts +58 -0
- package/dist/runtime/chrome149-header-order.js +289 -0
- package/dist/runtime/env.js +12 -0
- package/dist/runtime/executor.d.ts +3 -2
- package/dist/runtime/executor.js +26 -25
- package/dist/runtime/http.d.ts +1 -0
- package/dist/runtime/http.js +515 -53
- package/dist/runtime/insights.js +2 -2
- package/dist/runtime/instrumentation.d.ts +2 -2
- package/dist/runtime/instrumentation.js +366 -8
- package/dist/runtime/native-network-errors.d.ts +33 -0
- package/dist/runtime/native-network-errors.js +69 -0
- package/dist/runtime/native-network.d.ts +96 -0
- package/dist/runtime/native-network.js +1232 -0
- package/dist/runtime/ocr.d.ts +29 -0
- package/dist/runtime/ocr.js +440 -0
- package/dist/runtime/otlp.d.ts +71 -2
- package/dist/runtime/otlp.js +397 -16
- package/dist/runtime/proxy-errors.js +6 -2
- package/dist/runtime/proxy-nodemaven.d.ts +56 -0
- package/dist/runtime/proxy-nodemaven.js +146 -0
- package/dist/runtime/proxy-telemetry.d.ts +80 -1
- package/dist/runtime/proxy-telemetry.js +154 -47
- package/dist/runtime/redirects.d.ts +29 -0
- package/dist/runtime/redirects.js +36 -0
- package/dist/runtime/redis.d.ts +1 -1
- package/dist/runtime/redis.js +4 -2
- package/dist/runtime/request-options.d.ts +68 -1
- package/dist/runtime/request-options.js +548 -0
- package/dist/runtime/resolver-config.d.ts +6 -0
- package/dist/runtime/resolver-config.js +6 -0
- package/dist/runtime/resolver-public.d.ts +1 -0
- package/dist/runtime/resolver-public.js +1 -0
- package/dist/runtime/resolver-shared.d.ts +14 -0
- package/dist/runtime/resolver-shared.js +12 -0
- package/dist/runtime/resolver-vendors/bindings.d.ts +48 -0
- package/dist/runtime/resolver-vendors/bindings.js +40 -0
- package/dist/runtime/resolver-vendors/browser.d.ts +22 -0
- package/dist/runtime/resolver-vendors/browser.js +377 -0
- package/dist/runtime/resolver-vendors/capsolver.d.ts +22 -0
- package/dist/runtime/resolver-vendors/capsolver.js +531 -0
- package/dist/runtime/resolver-vendors/hosts.d.ts +2 -0
- package/dist/runtime/resolver-vendors/hosts.js +33 -0
- package/dist/runtime/resolver-vendors/twocaptcha.d.ts +24 -0
- package/dist/runtime/resolver-vendors/twocaptcha.js +408 -0
- package/dist/runtime/resolver-vendors/types.d.ts +94 -0
- package/dist/runtime/resolver-vendors/types.js +96 -0
- package/dist/runtime/resolver.d.ts +72 -0
- package/dist/runtime/resolver.js +771 -0
- package/dist/runtime/secrets.d.ts +27 -0
- package/dist/runtime/secrets.js +51 -0
- package/dist/runtime/state.d.ts +3 -0
- package/dist/runtime/state.js +277 -71
- package/dist/runtime/stealth-cookies.d.ts +20 -0
- package/dist/runtime/stealth-cookies.js +111 -0
- package/dist/runtime/stealth.d.ts +41 -5
- package/dist/runtime/stealth.js +997 -291
- package/dist/runtime/stt.js +1 -12
- package/dist/runtime/timeout.d.ts +5 -0
- package/dist/runtime/timeout.js +12 -0
- package/dist/runtime/trace-config.d.ts +12 -0
- package/dist/runtime/trace-config.js +62 -0
- package/dist/runtime/trace.d.ts +5 -0
- package/dist/runtime/trace.js +43 -10
- package/dist/serve.d.ts +1 -1
- package/dist/serve.js +1 -1
- package/dist/server/error-observability.d.ts +1 -0
- package/dist/server/error-observability.js +1 -0
- package/dist/server/index.d.ts +5 -2
- package/dist/server/index.js +2 -2
- package/dist/server/self-test-input-tokens.d.ts +2 -1
- package/dist/server/self-test-input-tokens.js +18 -14
- package/dist/server/self-test.d.ts +14 -3
- package/dist/server/self-test.js +129 -58
- package/dist/server/serve-implementation.d.ts +230 -0
- package/dist/server/serve-implementation.js +2265 -0
- package/dist/server/serve.d.ts +1 -70
- package/dist/server/serve.js +1 -1131
- package/dist/server/trace-output.d.ts +6 -0
- package/dist/server/trace-output.js +79 -0
- package/dist/server/types.d.ts +30 -5
- package/dist/server/types.js +13 -1
- package/dist/stateful/errors.d.ts +19 -0
- package/dist/stateful/errors.js +24 -0
- package/dist/stateful/http-provider-event-emitter.d.ts +40 -0
- package/dist/stateful/http-provider-event-emitter.js +237 -0
- package/dist/stateful/http-session-owner-registry.d.ts +44 -0
- package/dist/stateful/http-session-owner-registry.js +210 -0
- package/dist/stateful/index.d.ts +18 -0
- package/dist/stateful/index.js +18 -0
- package/dist/stateful/provider-event-delivery-failures.d.ts +32 -0
- package/dist/stateful/provider-event-delivery-failures.js +43 -0
- package/dist/stateful/provider-event-pipeline-metrics.d.ts +46 -0
- package/dist/stateful/provider-event-pipeline-metrics.js +48 -0
- package/dist/stateful/provider-event-pipeline.d.ts +50 -0
- package/dist/stateful/provider-event-pipeline.js +1 -0
- package/dist/stateful/provider-events.d.ts +101 -0
- package/dist/stateful/provider-events.js +289 -0
- package/dist/stateful/session-key.d.ts +15 -0
- package/dist/stateful/session-key.js +86 -0
- package/dist/stateful/stateful-provider-adapter-context.d.ts +5 -0
- package/dist/stateful/stateful-provider-adapter-context.js +42 -0
- package/dist/stateful/stateful-provider-adapter-metrics.d.ts +15 -0
- package/dist/stateful/stateful-provider-adapter-metrics.js +21 -0
- package/dist/stateful/stateful-provider-adapter.d.ts +98 -0
- package/dist/stateful/stateful-provider-adapter.js +287 -0
- package/dist/stateful/stateful-provider-observability.d.ts +62 -0
- package/dist/stateful/stateful-provider-observability.js +161 -0
- package/dist/stateful/stateful-provider-owner-forwarder.d.ts +41 -0
- package/dist/stateful/stateful-provider-owner-forwarder.js +215 -0
- package/dist/stateful/stateful-provider-runtime-context.d.ts +32 -0
- package/dist/stateful/stateful-provider-runtime-context.js +60 -0
- package/dist/stateful/stateful-provider-runtime-executor.d.ts +34 -0
- package/dist/stateful/stateful-provider-runtime-executor.js +52 -0
- package/dist/stateful/stateful-provider-session-routing.d.ts +67 -0
- package/dist/stateful/stateful-provider-session-routing.js +345 -0
- package/dist/stateful/stateful-provider-session-runtime.d.ts +98 -0
- package/dist/stateful/stateful-provider-session-runtime.js +245 -0
- package/dist/stateful-signing.d.ts +18 -0
- package/dist/stateful-signing.js +27 -0
- package/dist/stealth/profiles.d.ts +9 -4
- package/dist/stealth/profiles.js +160 -211
- package/dist/stream-evidence.d.ts +74 -0
- package/dist/stream-evidence.js +785 -0
- package/dist/stream.js +7 -1
- package/dist/testing/index.d.ts +2 -1
- package/dist/testing/index.js +2 -1
- package/dist/testing/run.d.ts +32 -2
- package/dist/testing/run.js +489 -21
- package/dist/trace-sanitization.d.ts +5 -0
- package/dist/trace-sanitization.js +45 -0
- package/dist/types.d.ts +673 -131
- package/dist/types.js +1 -0
- package/package.json +45 -5
- package/src/auth-turn/index.ts +1 -1
- package/src/auth.ts +118 -0
- package/src/ceremonies/index.ts +189 -46
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/approval-override.ts.txt +6 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/codemod-syntax.ts.txt +3 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/connection-precedence.ts.txt +10 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/docs-conflict.ts.txt +8 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/examples-hoisted-array-spread.ts.txt +15 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/examples-imported-array-spread.ts.txt +9 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/examples-map.ts.txt +5 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/examples-mixed-array-spread.ts.txt +24 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/examples-operation.ts.txt +16 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/factory-map.ts.txt +3 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/hoist-all.ts.txt +31 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/hoisted-const.ts.txt +11 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/imported-spread.ts.txt +11 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/inline-map.ts.txt +11 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/inline-spread-cast-tail.ts.txt +21 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/inline-spread-ekitan.ts.txt +11 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/inline-spread-override.ts.txt +14 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/missing-english-locale.ts.txt +7 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/no-safety.ts.txt +6 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/non-literal.ts.txt +7 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/redundant-approval.ts.txt +6 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/safety-conflict.ts.txt +7 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/stream.ts.txt +7 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/tool-router-spread.ts.txt +15 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/unparseable.ts.txt +4 -0
- package/src/cli/__tests__/fixtures/migrate-operation-declaration/verbatim-template.ts.txt +12 -0
- package/src/cli/commands.ts +33 -0
- package/src/cli/create.ts +50 -37
- package/src/cli/migrate-operation-declaration.ts +1751 -0
- package/src/cli/migrate-operation-shape.ts +184 -0
- package/src/cli/migrate-provider-shape.ts +772 -0
- package/src/cli/prompt-assets.ts +865 -0
- package/src/cli/templates/provider/AGENTS.md.tpl +17 -8
- package/src/cli/templates/provider/Dockerfile.tpl +1 -1
- package/src/cli/templates/provider/README.md.tpl +5 -5
- package/src/cli/templates/provider/index.ts.tpl +6 -3
- package/src/cli/templates/provider/operations/ping.ts.tpl +4 -1
- package/src/cli/templates/provider/provider.json.tpl +6 -0
- package/src/config/loader.ts +690 -163
- package/src/contract-serialization.ts +5 -7
- package/src/contract-types.ts +12 -5
- package/src/contract.ts +24 -10
- package/src/declaration-validation.ts +330 -0
- package/src/define.ts +1048 -131
- package/src/dev.ts +4 -1
- package/src/engine.ts +279 -0
- package/src/error-observability.ts +64 -0
- package/src/error-resolution.ts +127 -0
- package/src/errors.ts +68 -0
- package/src/fixture-sanitization.ts +264 -0
- package/src/health-scenario.ts +875 -0
- package/src/index.ts +220 -13
- package/src/lint.ts +698 -90
- package/src/native-address.ts +340 -0
- package/src/native-egress-policy.ts +358 -0
- package/src/observability.ts +51 -1
- package/src/provider.ts +161 -3
- package/src/runtime/auth-flow.ts +12 -0
- package/src/runtime/browser.ts +661 -63
- package/src/runtime/cache.ts +189 -14
- package/src/runtime/choice-wordlist.ts +145 -0
- package/src/runtime/choice.ts +631 -120
- package/src/runtime/chrome149-header-order.ts +330 -0
- package/src/runtime/env.ts +13 -0
- package/src/runtime/executor.ts +43 -31
- package/src/runtime/http.ts +641 -61
- package/src/runtime/insights.ts +2 -2
- package/src/runtime/instrumentation.ts +520 -15
- package/src/runtime/native-network-errors.ts +99 -0
- package/src/runtime/native-network.ts +1605 -0
- package/src/runtime/ocr.ts +523 -0
- package/src/runtime/otlp.ts +467 -21
- package/src/runtime/proxy-errors.ts +12 -4
- package/src/runtime/proxy-nodemaven.ts +221 -0
- package/src/runtime/proxy-telemetry.ts +244 -75
- package/src/runtime/redirects.ts +66 -0
- package/src/runtime/redis.ts +7 -2
- package/src/runtime/request-options.ts +680 -1
- package/src/runtime/resolver-config.ts +6 -0
- package/src/runtime/resolver-public.ts +23 -0
- package/src/runtime/resolver-shared.ts +33 -0
- package/src/runtime/resolver-vendors/bindings.ts +56 -0
- package/src/runtime/resolver-vendors/browser.ts +533 -0
- package/src/runtime/resolver-vendors/capsolver.ts +707 -0
- package/src/runtime/resolver-vendors/hosts.ts +38 -0
- package/src/runtime/resolver-vendors/twocaptcha.ts +540 -0
- package/src/runtime/resolver-vendors/types.ts +212 -0
- package/src/runtime/resolver.ts +1157 -0
- package/src/runtime/secrets.ts +64 -0
- package/src/runtime/state.ts +394 -77
- package/src/runtime/stealth-cookies.ts +132 -0
- package/src/runtime/stealth.ts +1280 -336
- package/src/runtime/stt.ts +1 -19
- package/src/runtime/timeout.ts +18 -0
- package/src/runtime/trace-config.ts +78 -0
- package/src/runtime/trace.ts +57 -17
- package/src/serve.ts +6 -1
- package/src/server/error-observability.ts +1 -0
- package/src/server/index.ts +34 -2
- package/src/server/self-test-input-tokens.ts +29 -14
- package/src/server/self-test.ts +191 -68
- package/src/server/serve-implementation.ts +3378 -0
- package/src/server/serve.ts +1 -1632
- package/src/server/trace-output.ts +129 -0
- package/src/server/types.ts +13 -1
- package/src/stateful/README.md +146 -0
- package/src/stateful/errors.ts +35 -0
- package/src/stateful/http-provider-event-emitter.ts +314 -0
- package/src/stateful/http-session-owner-registry.ts +306 -0
- package/src/stateful/index.ts +18 -0
- package/src/stateful/provider-event-delivery-failures.ts +80 -0
- package/src/stateful/provider-event-pipeline-metrics.ts +95 -0
- package/src/stateful/provider-event-pipeline.ts +61 -0
- package/src/stateful/provider-events.ts +462 -0
- package/src/stateful/session-key.ts +111 -0
- package/src/stateful/stateful-provider-adapter-context.ts +59 -0
- package/src/stateful/stateful-provider-adapter-metrics.ts +48 -0
- package/src/stateful/stateful-provider-adapter.ts +562 -0
- package/src/stateful/stateful-provider-observability.ts +261 -0
- package/src/stateful/stateful-provider-owner-forwarder.ts +287 -0
- package/src/stateful/stateful-provider-runtime-context.ts +92 -0
- package/src/stateful/stateful-provider-runtime-executor.ts +96 -0
- package/src/stateful/stateful-provider-session-routing.ts +546 -0
- package/src/stateful/stateful-provider-session-runtime.ts +403 -0
- package/src/stateful-signing.ts +46 -0
- package/src/stealth/profiles.ts +202 -231
- package/src/stream-evidence.ts +988 -0
- package/src/stream.ts +8 -1
- package/src/testing/index.ts +10 -1
- package/src/testing/run.ts +658 -15
- package/src/trace-sanitization.ts +63 -0
- package/src/types.ts +788 -174
- package/dist/cli/templates/provider/CLAUDE.md.tpl +0 -1
- package/src/cli/templates/provider/CLAUDE.md.tpl +0 -1
- /package/dist/cli/templates/provider/{skills → .agents/skills}/fixtures-and-recording/SKILL.md.tpl +0 -0
- /package/dist/cli/templates/provider/{skills → .agents/skills}/health-checks-and-fail-closed/SKILL.md.tpl +0 -0
- /package/dist/cli/templates/provider/{skills → .agents/skills}/normalization-standards/SKILL.md.tpl +0 -0
- /package/dist/cli/templates/provider/{skills → .agents/skills}/pagination-and-counts/SKILL.md.tpl +0 -0
- /package/dist/cli/templates/provider/{skills → .agents/skills}/upstream-contract-verification/SKILL.md.tpl +0 -0
- /package/dist/cli/templates/provider/{skills → .agents/skills}/upstream-notes/README.md.tpl +0 -0
- /package/src/cli/templates/provider/{skills → .agents/skills}/fixtures-and-recording/SKILL.md.tpl +0 -0
- /package/src/cli/templates/provider/{skills → .agents/skills}/health-checks-and-fail-closed/SKILL.md.tpl +0 -0
- /package/src/cli/templates/provider/{skills → .agents/skills}/normalization-standards/SKILL.md.tpl +0 -0
- /package/src/cli/templates/provider/{skills → .agents/skills}/pagination-and-counts/SKILL.md.tpl +0 -0
- /package/src/cli/templates/provider/{skills → .agents/skills}/upstream-contract-verification/SKILL.md.tpl +0 -0
- /package/src/cli/templates/provider/{skills → .agents/skills}/upstream-notes/README.md.tpl +0 -0
package/src/index.ts
CHANGED
|
@@ -6,10 +6,17 @@ export * from "./choice-token.js";
|
|
|
6
6
|
export type {
|
|
7
7
|
ApiFuseConfig,
|
|
8
8
|
BrowserConfig,
|
|
9
|
-
|
|
9
|
+
ProxyCacheStatus,
|
|
10
|
+
ProxyProtocol,
|
|
11
|
+
ProxyResolutionOptions,
|
|
12
|
+
ProxyResolutionSource,
|
|
13
|
+
ProxyUserAgentSource,
|
|
14
|
+
ProxyVendorName,
|
|
15
|
+
ResolvedProxyConfig,
|
|
10
16
|
SessionConfig,
|
|
17
|
+
SmartproxyAllocatorBodyClass,
|
|
11
18
|
} from "./config/loader.js";
|
|
12
|
-
export { defineConfig, loadApiFuseConfig } from "./config/loader.js";
|
|
19
|
+
export { defineConfig, loadApiFuseConfig, resolveProxy } from "./config/loader.js";
|
|
13
20
|
export {
|
|
14
21
|
canonicalJson,
|
|
15
22
|
digestProviderContract,
|
|
@@ -29,11 +36,92 @@ export {
|
|
|
29
36
|
defineSmsOtpMatcher,
|
|
30
37
|
defineStreamOperation,
|
|
31
38
|
every,
|
|
32
|
-
type
|
|
39
|
+
type AuthStartNoInputGuard,
|
|
40
|
+
type OperationDefinitionFor,
|
|
41
|
+
type ProviderBuilder,
|
|
42
|
+
type ProviderContextOf,
|
|
43
|
+
type ProviderDeclaration,
|
|
44
|
+
type ProviderDefinitionFor,
|
|
33
45
|
} from "./define.js";
|
|
46
|
+
export {
|
|
47
|
+
AssertionExpressionSchema,
|
|
48
|
+
AssertionPredicateSchema,
|
|
49
|
+
AssertStepSchema,
|
|
50
|
+
BoundedJsonPathSchema,
|
|
51
|
+
CandidateBlockSchema,
|
|
52
|
+
CandidatePolicySchema,
|
|
53
|
+
CredentialRefDeclarationSchema,
|
|
54
|
+
defineHealthScenario,
|
|
55
|
+
HealthScenarioSchema,
|
|
56
|
+
HealthStepSchema,
|
|
57
|
+
ExtractStepSchema,
|
|
58
|
+
FindFirstSchema,
|
|
59
|
+
GuardStepSchema,
|
|
60
|
+
JournalPolicySchema,
|
|
61
|
+
JsonTemplateSchema,
|
|
62
|
+
ManualTriggerPolicySchema,
|
|
63
|
+
OperandSchema,
|
|
64
|
+
OperationStepSchema,
|
|
65
|
+
QuantifierSchema,
|
|
66
|
+
ReferenceSchema,
|
|
67
|
+
RetryPolicySchema,
|
|
68
|
+
SafeRegexSchema,
|
|
69
|
+
ScopedAssertionExpressionSchema,
|
|
70
|
+
ScopedAssertionPredicateSchema,
|
|
71
|
+
ScopedItemReferenceSchema,
|
|
72
|
+
ScopedOperandSchema,
|
|
73
|
+
StepReferenceSchema,
|
|
74
|
+
RelativeDateNodeSchema,
|
|
75
|
+
ValueTypeSchema,
|
|
76
|
+
} from "./health-scenario.js";
|
|
77
|
+
export type {
|
|
78
|
+
AssertionExpression,
|
|
79
|
+
AssertionPredicate,
|
|
80
|
+
AttemptReference,
|
|
81
|
+
AssertResult,
|
|
82
|
+
AssertStep,
|
|
83
|
+
BoundedJsonPath,
|
|
84
|
+
CandidateBlock,
|
|
85
|
+
CandidatePolicy,
|
|
86
|
+
CandidateReference,
|
|
87
|
+
CredentialReference,
|
|
88
|
+
CredentialRefDeclaration,
|
|
89
|
+
EstablishedConnectionReference,
|
|
90
|
+
ExtractStep,
|
|
91
|
+
FindFirst,
|
|
92
|
+
GuardAttribution,
|
|
93
|
+
GuardReasonCode,
|
|
94
|
+
GuardResult,
|
|
95
|
+
GuardStep,
|
|
96
|
+
HealthScenario,
|
|
97
|
+
HealthStep,
|
|
98
|
+
JsonTemplate,
|
|
99
|
+
JournalPolicy,
|
|
100
|
+
ManualTriggerPolicy,
|
|
101
|
+
NonEmpty,
|
|
102
|
+
OperationResult,
|
|
103
|
+
OperationStep,
|
|
104
|
+
Operand,
|
|
105
|
+
Quantifier,
|
|
106
|
+
ReferenceNode,
|
|
107
|
+
Reference,
|
|
108
|
+
RelativeDateNode,
|
|
109
|
+
RetryPolicy,
|
|
110
|
+
SafeRegex,
|
|
111
|
+
ScopedAssertionExpression,
|
|
112
|
+
ScopedAssertionPredicate,
|
|
113
|
+
ScopedItemReference,
|
|
114
|
+
ScopedOperand,
|
|
115
|
+
StepBase,
|
|
116
|
+
StepReference,
|
|
117
|
+
ExtractResult,
|
|
118
|
+
ValueType,
|
|
119
|
+
} from "./health-scenario.js";
|
|
34
120
|
export type { DevServerOptions } from "./dev.js";
|
|
35
121
|
export { createDevServer, startDevServer } from "./dev.js";
|
|
36
122
|
export * from "./errors.js";
|
|
123
|
+
export * from "./engine.js";
|
|
124
|
+
export * from "./observability.js";
|
|
37
125
|
export * from "./user-input.js";
|
|
38
126
|
export * from "./i18n/index.js";
|
|
39
127
|
export {
|
|
@@ -45,12 +133,11 @@ export * from "./recipes/gov-api.js";
|
|
|
45
133
|
export * from "./recipes/rest-api.js";
|
|
46
134
|
export { createFlowContext, createScratchpad } from "./runtime/auth-flow.js";
|
|
47
135
|
export type { BrowserClientOptions } from "./runtime/browser.js";
|
|
48
|
-
export { BrowserClient, createBrowserClient } from "./runtime/browser.js";
|
|
49
136
|
export {
|
|
137
|
+
APIFUSE__CACHE__KEY_PEPPER_ENV,
|
|
50
138
|
createBypassProviderCache,
|
|
51
139
|
createProviderCache,
|
|
52
140
|
type ProviderCacheOptions,
|
|
53
|
-
resetProviderCacheForTests,
|
|
54
141
|
} from "./runtime/cache.js";
|
|
55
142
|
export {
|
|
56
143
|
type CreateProviderChoiceContextOptions,
|
|
@@ -65,6 +152,25 @@ export {
|
|
|
65
152
|
export { createEnvContext } from "./runtime/env.js";
|
|
66
153
|
export { executeOperation } from "./runtime/executor.js";
|
|
67
154
|
export { createHttpClient } from "./runtime/http.js";
|
|
155
|
+
export {
|
|
156
|
+
NativeEgressGrantExpiredError,
|
|
157
|
+
NativeEgressNotDeclaredError,
|
|
158
|
+
NativeIdleTimeoutError,
|
|
159
|
+
NativeNetworkError,
|
|
160
|
+
NativeProxyExpiredError,
|
|
161
|
+
} from "./runtime/native-network-errors.js";
|
|
162
|
+
export type {
|
|
163
|
+
NativeGatewayProxy,
|
|
164
|
+
NativeGatewayProxyResolutionInput,
|
|
165
|
+
NativeGatewayProxySkipReason,
|
|
166
|
+
NativeGatewayProxySynthesizer,
|
|
167
|
+
NativeGatewayProxySynthesisResult,
|
|
168
|
+
NativeGatewayProxySynthesisInput,
|
|
169
|
+
NativeNetworkClientOptions,
|
|
170
|
+
NativeNetworkErrorCode,
|
|
171
|
+
VendorCredentialLookup,
|
|
172
|
+
VendorCredentialResolver,
|
|
173
|
+
} from "./runtime/native-network.js";
|
|
68
174
|
export type { Insight, InsightSeverity } from "./runtime/insights.js";
|
|
69
175
|
export { generateInsights } from "./runtime/insights.js";
|
|
70
176
|
export {
|
|
@@ -72,13 +178,49 @@ export {
|
|
|
72
178
|
type InstrumentedProviderContext,
|
|
73
179
|
wrapWithInstrumentation,
|
|
74
180
|
} from "./runtime/instrumentation.js";
|
|
75
|
-
export {
|
|
181
|
+
export type { PrevalidateResult } from "./runtime/prevalidate.js";
|
|
76
182
|
export { getProviderBaseUrl } from "./runtime/provider.js";
|
|
183
|
+
export type {
|
|
184
|
+
ProxyTelemetryLogPayload,
|
|
185
|
+
ProxyTelemetryResolvedPayload,
|
|
186
|
+
ProxyTelemetryUnresolvedPayload,
|
|
187
|
+
} from "./runtime/proxy-telemetry.js";
|
|
188
|
+
export {
|
|
189
|
+
APIFUSE__CDP_POOL__URL,
|
|
190
|
+
APIFUSE__RESOLVER__2CAPTCHA__API_KEY,
|
|
191
|
+
APIFUSE__RESOLVER__CAPMONSTER__API_KEY,
|
|
192
|
+
APIFUSE__RESOLVER__CAPSOLVER__API_KEY,
|
|
193
|
+
APIFUSE__RESOLVER__TIMEOUT_MS,
|
|
194
|
+
DEFAULT_RESOLVER_TIMEOUT_MS,
|
|
195
|
+
} from "./runtime/resolver-config.js";
|
|
196
|
+
export { createUnsupportedResolverClient } from "./runtime/resolver-shared.js";
|
|
197
|
+
export type { ResolverRuntimeOptions } from "./runtime/resolver.js";
|
|
198
|
+
export type { ResolverVendorTransport } from "./runtime/resolver-vendors/types.js";
|
|
199
|
+
export {
|
|
200
|
+
assertRequiredSecretsPresent,
|
|
201
|
+
listMissingRequiredSecrets,
|
|
202
|
+
MISSING_SECRET_CODE,
|
|
203
|
+
} from "./runtime/secrets.js";
|
|
77
204
|
export {
|
|
78
205
|
createUnsupportedProviderRuntimeState,
|
|
79
206
|
UnsupportedProviderStateError,
|
|
80
207
|
} from "./runtime/state.js";
|
|
81
|
-
export {
|
|
208
|
+
export {
|
|
209
|
+
APIFUSE__OCR__API_KEY_ENV,
|
|
210
|
+
APIFUSE__OCR__BACKEND_ENV,
|
|
211
|
+
APIFUSE__OCR__BASE_URL_ENV,
|
|
212
|
+
APIFUSE__OCR__CLOUDFLARE_API_TOKEN_ENV,
|
|
213
|
+
APIFUSE__OCR__MODEL_ENV,
|
|
214
|
+
CLOUDFLARE_ACCOUNT_ID_ENV,
|
|
215
|
+
CLOUDFLARE_WORKERS_AI_OCR_BACKEND,
|
|
216
|
+
createCloudflareWorkersAiOcrClient,
|
|
217
|
+
createOcrClientFromEnv,
|
|
218
|
+
createOpenAiCompatibleOcrClient,
|
|
219
|
+
createUnsupportedOcrClient,
|
|
220
|
+
DEFAULT_CLOUDFLARE_WORKERS_AI_OCR_MODEL,
|
|
221
|
+
extractCaptchaCandidates,
|
|
222
|
+
OPENAI_COMPATIBLE_OCR_BACKEND,
|
|
223
|
+
} from "./runtime/ocr.js";
|
|
82
224
|
export {
|
|
83
225
|
APIFUSE__STT__BACKEND_ENV,
|
|
84
226
|
APIFUSE__STT__CLOUDFLARE_API_TOKEN_ENV,
|
|
@@ -111,8 +253,20 @@ export {
|
|
|
111
253
|
sensitive,
|
|
112
254
|
z,
|
|
113
255
|
} from "./schema.js";
|
|
114
|
-
export {
|
|
115
|
-
|
|
256
|
+
export {
|
|
257
|
+
createServerApp,
|
|
258
|
+
createServerAppAsync,
|
|
259
|
+
ERROR_OBSERVABILITY_HEADER,
|
|
260
|
+
type ProviderErrorCauseFrame,
|
|
261
|
+
type ServeOptions,
|
|
262
|
+
serve,
|
|
263
|
+
} from "./server/serve.js";
|
|
264
|
+
export {
|
|
265
|
+
DEFAULT_STEALTH_BROWSER,
|
|
266
|
+
DEFAULT_STEALTH_OS,
|
|
267
|
+
getStealthProfile,
|
|
268
|
+
listStealthProfiles,
|
|
269
|
+
} from "./stealth/profiles.js";
|
|
116
270
|
export * from "./stream.js";
|
|
117
271
|
export type {
|
|
118
272
|
ApiFuseResponse,
|
|
@@ -124,6 +278,7 @@ export type {
|
|
|
124
278
|
AuthMode,
|
|
125
279
|
AuthTurn,
|
|
126
280
|
Bcp47Locale,
|
|
281
|
+
BrowserCookie,
|
|
127
282
|
BrowserEngine,
|
|
128
283
|
BrowserOptions,
|
|
129
284
|
BrowserResourceBody,
|
|
@@ -132,6 +287,7 @@ export type {
|
|
|
132
287
|
BrowserResourcePolicy,
|
|
133
288
|
BrowserResourceRequest,
|
|
134
289
|
BrowserResourceRoute,
|
|
290
|
+
ChallengeSolution,
|
|
135
291
|
ConnectionMode,
|
|
136
292
|
ContextDeclaration,
|
|
137
293
|
CookieJar,
|
|
@@ -160,6 +316,9 @@ export type {
|
|
|
160
316
|
HealthJourneyStep,
|
|
161
317
|
HttpClient,
|
|
162
318
|
HttpMethod,
|
|
319
|
+
HttpRedirectFailureReason,
|
|
320
|
+
HttpRedirectPolicy,
|
|
321
|
+
HttpRedirectPolicyMode,
|
|
163
322
|
HttpResponse,
|
|
164
323
|
HttpRetryOptions,
|
|
165
324
|
HttpRetrySummary,
|
|
@@ -169,22 +328,47 @@ export type {
|
|
|
169
328
|
Iso3166Alpha2CountryCode,
|
|
170
329
|
Iso4217CurrencyCode,
|
|
171
330
|
Iso8601Duration,
|
|
172
|
-
|
|
331
|
+
NativeContext,
|
|
332
|
+
NativeNetworkClient,
|
|
333
|
+
NativeNetworkCloseReason,
|
|
334
|
+
NativeNetworkConnection,
|
|
335
|
+
NativeNetworkConnectInput,
|
|
336
|
+
NativeNetworkConnectOptions,
|
|
337
|
+
NativeNetworkDynamicGrantOptions,
|
|
338
|
+
NativeNetworkEgressGrant,
|
|
339
|
+
NativeProviderConfig,
|
|
340
|
+
NativeProxyDrainHandler,
|
|
341
|
+
NativeProxyEgressInfo,
|
|
342
|
+
NativeProxyExpiringEvent,
|
|
343
|
+
NativeProxyExpiringReason,
|
|
344
|
+
NativeTcpDynamicEgressRule,
|
|
345
|
+
NativeTcpEgressGrant,
|
|
346
|
+
NativeTcpEgressRule,
|
|
347
|
+
NativeTcpPortRange,
|
|
348
|
+
NativeTcpTlsMode,
|
|
349
|
+
NativeTlsConnectOptions,
|
|
350
|
+
OcrCaptchaCandidate,
|
|
351
|
+
OcrCaptchaOptions,
|
|
352
|
+
OcrCaptchaResult,
|
|
353
|
+
OcrContext,
|
|
354
|
+
OcrImageInput,
|
|
355
|
+
OcrRecognizeRequest,
|
|
356
|
+
OcrResult,
|
|
357
|
+
OcrWarning,
|
|
173
358
|
OperationApprovalPolicy,
|
|
174
359
|
OperationContractMetadata,
|
|
175
360
|
OperationDefinition,
|
|
176
361
|
OperationDeprecationMetadata,
|
|
177
|
-
|
|
362
|
+
OperationExample,
|
|
178
363
|
OperationErrorCode,
|
|
364
|
+
ProviderErrorStatus,
|
|
179
365
|
OperationHandlerResult,
|
|
180
|
-
OperationInputExample,
|
|
181
366
|
OperationLifecycle,
|
|
182
367
|
OperationObservabilityConfig,
|
|
183
368
|
OperationObservabilitySensitiveConfig,
|
|
184
369
|
OperationRelationships,
|
|
185
370
|
OperationRiskClass,
|
|
186
371
|
OperationSensitivePath,
|
|
187
|
-
OperationToolRouterMetadata,
|
|
188
372
|
OperationTransport,
|
|
189
373
|
OperationTransportKind,
|
|
190
374
|
ProbeInterval,
|
|
@@ -197,12 +381,20 @@ export type {
|
|
|
197
381
|
ProviderCacheResponseMeta,
|
|
198
382
|
ProviderCacheResult,
|
|
199
383
|
ProviderChoiceBindingOptions,
|
|
384
|
+
ProviderChoiceConsumeMode,
|
|
385
|
+
ProviderChoiceConsumeResult,
|
|
200
386
|
ProviderChoiceContext,
|
|
387
|
+
ProviderChoiceExplicitParseResult,
|
|
201
388
|
ProviderChoiceIssueOptions,
|
|
202
389
|
ProviderChoiceParseOptions,
|
|
390
|
+
ProviderChallenge,
|
|
391
|
+
ProviderChallengeKind,
|
|
203
392
|
ProviderContext,
|
|
393
|
+
ProviderContextFor,
|
|
204
394
|
ProviderDefinition,
|
|
205
395
|
ProviderDeploymentOverrides,
|
|
396
|
+
ProviderFileRef,
|
|
397
|
+
ProviderFilesContext,
|
|
206
398
|
ProviderHealthMonitorConfig,
|
|
207
399
|
ProviderHealthProbeConfig,
|
|
208
400
|
ProviderLocale,
|
|
@@ -211,14 +403,20 @@ export type {
|
|
|
211
403
|
ProviderLogoProfile,
|
|
212
404
|
ProviderLogoSource,
|
|
213
405
|
ProviderMeta,
|
|
406
|
+
ProviderOcrConfig,
|
|
214
407
|
ProviderProxyConfig,
|
|
215
408
|
ProviderProxyMode,
|
|
216
409
|
ProviderProxyPolicy,
|
|
410
|
+
ProxiedOAuthConfig,
|
|
217
411
|
ProviderProxyProvider,
|
|
218
412
|
ProviderProxySessionAffinity,
|
|
219
413
|
ProviderPublicConnectionMode,
|
|
220
414
|
ProviderPublicProfile,
|
|
221
415
|
ProviderReviewed,
|
|
416
|
+
ProviderResolvedFile,
|
|
417
|
+
ProviderResolverConfig,
|
|
418
|
+
ProviderResolverVendor,
|
|
419
|
+
ProviderRuntimeTarget,
|
|
222
420
|
ProviderRuntimeState,
|
|
223
421
|
ProviderSecretDeclaration,
|
|
224
422
|
ProviderStateDurationString,
|
|
@@ -228,6 +426,8 @@ export type {
|
|
|
228
426
|
ProviderSttMode,
|
|
229
427
|
ProviderSupportLevel,
|
|
230
428
|
RequestOptions,
|
|
429
|
+
RedirectRunReason,
|
|
430
|
+
ResolverContext,
|
|
231
431
|
Rfc3339Instant,
|
|
232
432
|
SchemaLike,
|
|
233
433
|
SmsOrigin,
|
|
@@ -237,12 +437,19 @@ export type {
|
|
|
237
437
|
StandardSchemaV1,
|
|
238
438
|
StateCasResult,
|
|
239
439
|
StateNamespaceOptions,
|
|
440
|
+
StateNamespaceScope,
|
|
240
441
|
StateValue,
|
|
241
442
|
StateWriteOptions,
|
|
242
443
|
StealthClient,
|
|
444
|
+
StealthBrowser,
|
|
445
|
+
StealthCookieStore,
|
|
446
|
+
StealthCookieStoreV1,
|
|
243
447
|
StealthFetchOptions,
|
|
244
448
|
StealthPlatform,
|
|
245
449
|
StealthProfile,
|
|
450
|
+
StealthProfileDescriptor,
|
|
451
|
+
StealthProfileSelection,
|
|
452
|
+
StealthOS,
|
|
246
453
|
StealthRedirectHop,
|
|
247
454
|
StealthRedirectRunOptions,
|
|
248
455
|
StealthRedirectRunResult,
|