@apifuse/provider-sdk 2.2.0-beta.4 → 2.2.0-beta.40
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 +501 -13
- package/CHANGELOG.md +165 -1
- package/README.md +72 -14
- package/SUBMISSION.md +1 -1
- package/bin/apifuse-check.ts +88 -4
- package/bin/apifuse-dev.ts +38 -5
- package/bin/apifuse-pack-check.ts +22 -2
- package/bin/apifuse-pack-smoke.ts +57 -2
- package/bin/apifuse-pack-types.ts +356 -38
- package/bin/apifuse-perf.ts +14 -13
- package/bin/apifuse-record.ts +691 -68
- package/bin/apifuse-submit-check.ts +518 -37
- 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 +8 -0
- package/dist/cli/create.d.ts +3 -0
- package/dist/cli/create.js +34 -35
- 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 +4 -4
- package/dist/cli/templates/provider/index.ts.tpl +6 -3
- package/dist/cli/templates/provider/operations/ping.ts.tpl +2 -1
- package/dist/config/loader.d.ts +177 -16
- package/dist/config/loader.js +424 -127
- package/dist/contract-serialization.js +4 -8
- package/dist/contract-types.d.ts +1 -0
- package/dist/contract.js +2 -0
- package/dist/declaration-validation.d.ts +32 -0
- package/dist/declaration-validation.js +207 -0
- package/dist/define.d.ts +51 -25
- package/dist/define.js +752 -38
- package/dist/error-resolution.d.ts +4 -0
- package/dist/error-resolution.js +122 -0
- package/dist/errors.d.ts +18 -0
- package/dist/errors.js +40 -0
- package/dist/fixture-sanitization.d.ts +28 -0
- package/dist/fixture-sanitization.js +217 -0
- package/dist/health-scenario.d.ts +1842 -0
- package/dist/health-scenario.js +624 -0
- package/dist/index.d.ts +19 -9
- package/dist/index.js +10 -6
- package/dist/lint.d.ts +6 -1
- package/dist/lint.js +362 -3
- 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 +8 -2
- package/dist/provider.js +3 -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/executor.d.ts +2 -2
- package/dist/runtime/executor.js +26 -2
- package/dist/runtime/http.d.ts +1 -0
- package/dist/runtime/http.js +515 -53
- 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/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 +3 -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 +526 -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 +407 -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 +60 -0
- package/dist/runtime/resolver.js +737 -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 +28 -3
- package/dist/runtime/stealth.js +519 -255
- 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 +61 -0
- package/dist/serve.d.ts +1 -1
- package/dist/serve.js +1 -1
- package/dist/server/index.d.ts +5 -3
- package/dist/server/index.js +3 -3
- 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 +114 -0
- package/dist/server/self-test.js +784 -148
- package/dist/server/serve-implementation.d.ts +213 -0
- package/dist/server/serve-implementation.js +2173 -0
- package/dist/server/serve.d.ts +1 -70
- package/dist/server/serve.js +1 -1130
- package/dist/server/trace-output.d.ts +4 -0
- package/dist/server/trace-output.js +20 -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.js +16 -7
- 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 +545 -23
- package/dist/types.js +1 -0
- package/package.json +44 -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/commands.ts +10 -0
- package/src/cli/create.ts +42 -35
- 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 +4 -4
- package/src/cli/templates/provider/index.ts.tpl +6 -3
- package/src/cli/templates/provider/operations/ping.ts.tpl +2 -1
- package/src/config/loader.ts +665 -163
- package/src/contract-serialization.ts +5 -7
- package/src/contract-types.ts +1 -0
- package/src/contract.ts +2 -0
- package/src/declaration-validation.ts +266 -0
- package/src/define.ts +970 -87
- package/src/error-resolution.ts +127 -0
- package/src/errors.ts +52 -0
- package/src/fixture-sanitization.ts +248 -0
- package/src/health-scenario.ts +875 -0
- package/src/index.ts +204 -8
- package/src/lint.ts +408 -4
- 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 +133 -0
- 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/executor.ts +40 -7
- package/src/runtime/http.ts +641 -61
- 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/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 +20 -0
- package/src/runtime/resolver-shared.ts +17 -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 +700 -0
- package/src/runtime/resolver-vendors/hosts.ts +38 -0
- package/src/runtime/resolver-vendors/twocaptcha.ts +539 -0
- package/src/runtime/resolver-vendors/types.ts +212 -0
- package/src/runtime/resolver.ts +1103 -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 +675 -289
- package/src/runtime/stt.ts +1 -19
- package/src/runtime/timeout.ts +18 -0
- package/src/runtime/trace-config.ts +77 -0
- package/src/serve.ts +6 -1
- package/src/server/index.ts +37 -2
- package/src/server/self-test-input-tokens.ts +29 -14
- package/src/server/self-test.ts +1025 -175
- package/src/server/serve-implementation.ts +3250 -0
- package/src/server/serve.ts +1 -1626
- package/src/server/trace-output.ts +32 -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 +17 -7
- 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 +660 -38
- 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,89 @@ export {
|
|
|
29
36
|
defineSmsOtpMatcher,
|
|
30
37
|
defineStreamOperation,
|
|
31
38
|
every,
|
|
32
|
-
type
|
|
39
|
+
type AuthStartNoInputGuard,
|
|
40
|
+
type ProviderBuilder,
|
|
41
|
+
type ProviderContextOf,
|
|
42
|
+
type ProviderDeclaration,
|
|
33
43
|
} from "./define.js";
|
|
44
|
+
export {
|
|
45
|
+
AssertionExpressionSchema,
|
|
46
|
+
AssertionPredicateSchema,
|
|
47
|
+
AssertStepSchema,
|
|
48
|
+
BoundedJsonPathSchema,
|
|
49
|
+
CandidateBlockSchema,
|
|
50
|
+
CandidatePolicySchema,
|
|
51
|
+
CredentialRefDeclarationSchema,
|
|
52
|
+
defineHealthScenario,
|
|
53
|
+
HealthScenarioSchema,
|
|
54
|
+
HealthStepSchema,
|
|
55
|
+
ExtractStepSchema,
|
|
56
|
+
FindFirstSchema,
|
|
57
|
+
GuardStepSchema,
|
|
58
|
+
JournalPolicySchema,
|
|
59
|
+
JsonTemplateSchema,
|
|
60
|
+
ManualTriggerPolicySchema,
|
|
61
|
+
OperandSchema,
|
|
62
|
+
OperationStepSchema,
|
|
63
|
+
QuantifierSchema,
|
|
64
|
+
ReferenceSchema,
|
|
65
|
+
RetryPolicySchema,
|
|
66
|
+
SafeRegexSchema,
|
|
67
|
+
ScopedAssertionExpressionSchema,
|
|
68
|
+
ScopedAssertionPredicateSchema,
|
|
69
|
+
ScopedItemReferenceSchema,
|
|
70
|
+
ScopedOperandSchema,
|
|
71
|
+
StepReferenceSchema,
|
|
72
|
+
RelativeDateNodeSchema,
|
|
73
|
+
ValueTypeSchema,
|
|
74
|
+
} from "./health-scenario.js";
|
|
75
|
+
export type {
|
|
76
|
+
AssertionExpression,
|
|
77
|
+
AssertionPredicate,
|
|
78
|
+
AttemptReference,
|
|
79
|
+
AssertResult,
|
|
80
|
+
AssertStep,
|
|
81
|
+
BoundedJsonPath,
|
|
82
|
+
CandidateBlock,
|
|
83
|
+
CandidatePolicy,
|
|
84
|
+
CandidateReference,
|
|
85
|
+
CredentialReference,
|
|
86
|
+
CredentialRefDeclaration,
|
|
87
|
+
EstablishedConnectionReference,
|
|
88
|
+
ExtractStep,
|
|
89
|
+
FindFirst,
|
|
90
|
+
GuardAttribution,
|
|
91
|
+
GuardReasonCode,
|
|
92
|
+
GuardResult,
|
|
93
|
+
GuardStep,
|
|
94
|
+
HealthScenario,
|
|
95
|
+
HealthStep,
|
|
96
|
+
JsonTemplate,
|
|
97
|
+
JournalPolicy,
|
|
98
|
+
ManualTriggerPolicy,
|
|
99
|
+
NonEmpty,
|
|
100
|
+
OperationResult,
|
|
101
|
+
OperationStep,
|
|
102
|
+
Operand,
|
|
103
|
+
Quantifier,
|
|
104
|
+
ReferenceNode,
|
|
105
|
+
Reference,
|
|
106
|
+
RelativeDateNode,
|
|
107
|
+
RetryPolicy,
|
|
108
|
+
SafeRegex,
|
|
109
|
+
ScopedAssertionExpression,
|
|
110
|
+
ScopedAssertionPredicate,
|
|
111
|
+
ScopedItemReference,
|
|
112
|
+
ScopedOperand,
|
|
113
|
+
StepBase,
|
|
114
|
+
StepReference,
|
|
115
|
+
ExtractResult,
|
|
116
|
+
ValueType,
|
|
117
|
+
} from "./health-scenario.js";
|
|
34
118
|
export type { DevServerOptions } from "./dev.js";
|
|
35
119
|
export { createDevServer, startDevServer } from "./dev.js";
|
|
36
120
|
export * from "./errors.js";
|
|
121
|
+
export * from "./observability.js";
|
|
37
122
|
export * from "./user-input.js";
|
|
38
123
|
export * from "./i18n/index.js";
|
|
39
124
|
export {
|
|
@@ -45,12 +130,11 @@ export * from "./recipes/gov-api.js";
|
|
|
45
130
|
export * from "./recipes/rest-api.js";
|
|
46
131
|
export { createFlowContext, createScratchpad } from "./runtime/auth-flow.js";
|
|
47
132
|
export type { BrowserClientOptions } from "./runtime/browser.js";
|
|
48
|
-
export { BrowserClient, createBrowserClient } from "./runtime/browser.js";
|
|
49
133
|
export {
|
|
134
|
+
APIFUSE__CACHE__KEY_PEPPER_ENV,
|
|
50
135
|
createBypassProviderCache,
|
|
51
136
|
createProviderCache,
|
|
52
137
|
type ProviderCacheOptions,
|
|
53
|
-
resetProviderCacheForTests,
|
|
54
138
|
} from "./runtime/cache.js";
|
|
55
139
|
export {
|
|
56
140
|
type CreateProviderChoiceContextOptions,
|
|
@@ -65,6 +149,25 @@ export {
|
|
|
65
149
|
export { createEnvContext } from "./runtime/env.js";
|
|
66
150
|
export { executeOperation } from "./runtime/executor.js";
|
|
67
151
|
export { createHttpClient } from "./runtime/http.js";
|
|
152
|
+
export {
|
|
153
|
+
NativeEgressGrantExpiredError,
|
|
154
|
+
NativeEgressNotDeclaredError,
|
|
155
|
+
NativeIdleTimeoutError,
|
|
156
|
+
NativeNetworkError,
|
|
157
|
+
NativeProxyExpiredError,
|
|
158
|
+
} from "./runtime/native-network-errors.js";
|
|
159
|
+
export type {
|
|
160
|
+
NativeGatewayProxy,
|
|
161
|
+
NativeGatewayProxyResolutionInput,
|
|
162
|
+
NativeGatewayProxySkipReason,
|
|
163
|
+
NativeGatewayProxySynthesizer,
|
|
164
|
+
NativeGatewayProxySynthesisResult,
|
|
165
|
+
NativeGatewayProxySynthesisInput,
|
|
166
|
+
NativeNetworkClientOptions,
|
|
167
|
+
NativeNetworkErrorCode,
|
|
168
|
+
VendorCredentialLookup,
|
|
169
|
+
VendorCredentialResolver,
|
|
170
|
+
} from "./runtime/native-network.js";
|
|
68
171
|
export type { Insight, InsightSeverity } from "./runtime/insights.js";
|
|
69
172
|
export { generateInsights } from "./runtime/insights.js";
|
|
70
173
|
export {
|
|
@@ -72,13 +175,49 @@ export {
|
|
|
72
175
|
type InstrumentedProviderContext,
|
|
73
176
|
wrapWithInstrumentation,
|
|
74
177
|
} from "./runtime/instrumentation.js";
|
|
75
|
-
export {
|
|
178
|
+
export type { PrevalidateResult } from "./runtime/prevalidate.js";
|
|
76
179
|
export { getProviderBaseUrl } from "./runtime/provider.js";
|
|
180
|
+
export type {
|
|
181
|
+
ProxyTelemetryLogPayload,
|
|
182
|
+
ProxyTelemetryResolvedPayload,
|
|
183
|
+
ProxyTelemetryUnresolvedPayload,
|
|
184
|
+
} from "./runtime/proxy-telemetry.js";
|
|
185
|
+
export {
|
|
186
|
+
APIFUSE__CDP_POOL__URL,
|
|
187
|
+
APIFUSE__RESOLVER__2CAPTCHA__API_KEY,
|
|
188
|
+
APIFUSE__RESOLVER__CAPMONSTER__API_KEY,
|
|
189
|
+
APIFUSE__RESOLVER__CAPSOLVER__API_KEY,
|
|
190
|
+
APIFUSE__RESOLVER__TIMEOUT_MS,
|
|
191
|
+
DEFAULT_RESOLVER_TIMEOUT_MS,
|
|
192
|
+
} from "./runtime/resolver-config.js";
|
|
193
|
+
export { createUnsupportedResolverClient } from "./runtime/resolver-shared.js";
|
|
194
|
+
export type { ResolverRuntimeOptions } from "./runtime/resolver.js";
|
|
195
|
+
export type { ResolverVendorTransport } from "./runtime/resolver-vendors/types.js";
|
|
196
|
+
export {
|
|
197
|
+
assertRequiredSecretsPresent,
|
|
198
|
+
listMissingRequiredSecrets,
|
|
199
|
+
MISSING_SECRET_CODE,
|
|
200
|
+
} from "./runtime/secrets.js";
|
|
77
201
|
export {
|
|
78
202
|
createUnsupportedProviderRuntimeState,
|
|
79
203
|
UnsupportedProviderStateError,
|
|
80
204
|
} from "./runtime/state.js";
|
|
81
|
-
export {
|
|
205
|
+
export {
|
|
206
|
+
APIFUSE__OCR__API_KEY_ENV,
|
|
207
|
+
APIFUSE__OCR__BACKEND_ENV,
|
|
208
|
+
APIFUSE__OCR__BASE_URL_ENV,
|
|
209
|
+
APIFUSE__OCR__CLOUDFLARE_API_TOKEN_ENV,
|
|
210
|
+
APIFUSE__OCR__MODEL_ENV,
|
|
211
|
+
CLOUDFLARE_ACCOUNT_ID_ENV,
|
|
212
|
+
CLOUDFLARE_WORKERS_AI_OCR_BACKEND,
|
|
213
|
+
createCloudflareWorkersAiOcrClient,
|
|
214
|
+
createOcrClientFromEnv,
|
|
215
|
+
createOpenAiCompatibleOcrClient,
|
|
216
|
+
createUnsupportedOcrClient,
|
|
217
|
+
DEFAULT_CLOUDFLARE_WORKERS_AI_OCR_MODEL,
|
|
218
|
+
extractCaptchaCandidates,
|
|
219
|
+
OPENAI_COMPATIBLE_OCR_BACKEND,
|
|
220
|
+
} from "./runtime/ocr.js";
|
|
82
221
|
export {
|
|
83
222
|
APIFUSE__STT__BACKEND_ENV,
|
|
84
223
|
APIFUSE__STT__CLOUDFLARE_API_TOKEN_ENV,
|
|
@@ -111,7 +250,13 @@ export {
|
|
|
111
250
|
sensitive,
|
|
112
251
|
z,
|
|
113
252
|
} from "./schema.js";
|
|
114
|
-
export {
|
|
253
|
+
export {
|
|
254
|
+
createServerApp,
|
|
255
|
+
createServerAppAsync,
|
|
256
|
+
ERROR_OBSERVABILITY_HEADER,
|
|
257
|
+
type ServeOptions,
|
|
258
|
+
serve,
|
|
259
|
+
} from "./server/serve.js";
|
|
115
260
|
export { getStealthProfile, listStealthProfiles } from "./stealth/profiles.js";
|
|
116
261
|
export * from "./stream.js";
|
|
117
262
|
export type {
|
|
@@ -124,6 +269,7 @@ export type {
|
|
|
124
269
|
AuthMode,
|
|
125
270
|
AuthTurn,
|
|
126
271
|
Bcp47Locale,
|
|
272
|
+
BrowserCookie,
|
|
127
273
|
BrowserEngine,
|
|
128
274
|
BrowserOptions,
|
|
129
275
|
BrowserResourceBody,
|
|
@@ -132,6 +278,7 @@ export type {
|
|
|
132
278
|
BrowserResourcePolicy,
|
|
133
279
|
BrowserResourceRequest,
|
|
134
280
|
BrowserResourceRoute,
|
|
281
|
+
ChallengeSolution,
|
|
135
282
|
ConnectionMode,
|
|
136
283
|
ContextDeclaration,
|
|
137
284
|
CookieJar,
|
|
@@ -160,6 +307,9 @@ export type {
|
|
|
160
307
|
HealthJourneyStep,
|
|
161
308
|
HttpClient,
|
|
162
309
|
HttpMethod,
|
|
310
|
+
HttpRedirectFailureReason,
|
|
311
|
+
HttpRedirectPolicy,
|
|
312
|
+
HttpRedirectPolicyMode,
|
|
163
313
|
HttpResponse,
|
|
164
314
|
HttpRetryOptions,
|
|
165
315
|
HttpRetrySummary,
|
|
@@ -169,6 +319,33 @@ export type {
|
|
|
169
319
|
Iso3166Alpha2CountryCode,
|
|
170
320
|
Iso4217CurrencyCode,
|
|
171
321
|
Iso8601Duration,
|
|
322
|
+
NativeContext,
|
|
323
|
+
NativeNetworkClient,
|
|
324
|
+
NativeNetworkCloseReason,
|
|
325
|
+
NativeNetworkConnection,
|
|
326
|
+
NativeNetworkConnectInput,
|
|
327
|
+
NativeNetworkConnectOptions,
|
|
328
|
+
NativeNetworkDynamicGrantOptions,
|
|
329
|
+
NativeNetworkEgressGrant,
|
|
330
|
+
NativeProviderConfig,
|
|
331
|
+
NativeProxyDrainHandler,
|
|
332
|
+
NativeProxyEgressInfo,
|
|
333
|
+
NativeProxyExpiringEvent,
|
|
334
|
+
NativeProxyExpiringReason,
|
|
335
|
+
NativeTcpDynamicEgressRule,
|
|
336
|
+
NativeTcpEgressGrant,
|
|
337
|
+
NativeTcpEgressRule,
|
|
338
|
+
NativeTcpPortRange,
|
|
339
|
+
NativeTcpTlsMode,
|
|
340
|
+
NativeTlsConnectOptions,
|
|
341
|
+
OcrCaptchaCandidate,
|
|
342
|
+
OcrCaptchaOptions,
|
|
343
|
+
OcrCaptchaResult,
|
|
344
|
+
OcrContext,
|
|
345
|
+
OcrImageInput,
|
|
346
|
+
OcrRecognizeRequest,
|
|
347
|
+
OcrResult,
|
|
348
|
+
OcrWarning,
|
|
172
349
|
OperationAnnotations,
|
|
173
350
|
OperationApprovalPolicy,
|
|
174
351
|
OperationContractMetadata,
|
|
@@ -176,6 +353,7 @@ export type {
|
|
|
176
353
|
OperationDeprecationMetadata,
|
|
177
354
|
OperationDocMeta,
|
|
178
355
|
OperationErrorCode,
|
|
356
|
+
ProviderErrorStatus,
|
|
179
357
|
OperationHandlerResult,
|
|
180
358
|
OperationInputExample,
|
|
181
359
|
OperationLifecycle,
|
|
@@ -197,12 +375,20 @@ export type {
|
|
|
197
375
|
ProviderCacheResponseMeta,
|
|
198
376
|
ProviderCacheResult,
|
|
199
377
|
ProviderChoiceBindingOptions,
|
|
378
|
+
ProviderChoiceConsumeMode,
|
|
379
|
+
ProviderChoiceConsumeResult,
|
|
200
380
|
ProviderChoiceContext,
|
|
381
|
+
ProviderChoiceExplicitParseResult,
|
|
201
382
|
ProviderChoiceIssueOptions,
|
|
202
383
|
ProviderChoiceParseOptions,
|
|
384
|
+
ProviderChallenge,
|
|
385
|
+
ProviderChallengeKind,
|
|
203
386
|
ProviderContext,
|
|
387
|
+
ProviderContextFor,
|
|
204
388
|
ProviderDefinition,
|
|
205
389
|
ProviderDeploymentOverrides,
|
|
390
|
+
ProviderFileRef,
|
|
391
|
+
ProviderFilesContext,
|
|
206
392
|
ProviderHealthMonitorConfig,
|
|
207
393
|
ProviderHealthProbeConfig,
|
|
208
394
|
ProviderLocale,
|
|
@@ -211,14 +397,19 @@ export type {
|
|
|
211
397
|
ProviderLogoProfile,
|
|
212
398
|
ProviderLogoSource,
|
|
213
399
|
ProviderMeta,
|
|
400
|
+
ProviderOcrConfig,
|
|
214
401
|
ProviderProxyConfig,
|
|
215
402
|
ProviderProxyMode,
|
|
216
403
|
ProviderProxyPolicy,
|
|
404
|
+
ProxiedOAuthConfig,
|
|
217
405
|
ProviderProxyProvider,
|
|
218
406
|
ProviderProxySessionAffinity,
|
|
219
407
|
ProviderPublicConnectionMode,
|
|
220
408
|
ProviderPublicProfile,
|
|
221
409
|
ProviderReviewed,
|
|
410
|
+
ProviderResolvedFile,
|
|
411
|
+
ProviderResolverConfig,
|
|
412
|
+
ProviderResolverVendor,
|
|
222
413
|
ProviderRuntimeState,
|
|
223
414
|
ProviderSecretDeclaration,
|
|
224
415
|
ProviderStateDurationString,
|
|
@@ -228,6 +419,8 @@ export type {
|
|
|
228
419
|
ProviderSttMode,
|
|
229
420
|
ProviderSupportLevel,
|
|
230
421
|
RequestOptions,
|
|
422
|
+
RedirectRunReason,
|
|
423
|
+
ResolverContext,
|
|
231
424
|
Rfc3339Instant,
|
|
232
425
|
SchemaLike,
|
|
233
426
|
SmsOrigin,
|
|
@@ -237,9 +430,12 @@ export type {
|
|
|
237
430
|
StandardSchemaV1,
|
|
238
431
|
StateCasResult,
|
|
239
432
|
StateNamespaceOptions,
|
|
433
|
+
StateNamespaceScope,
|
|
240
434
|
StateValue,
|
|
241
435
|
StateWriteOptions,
|
|
242
436
|
StealthClient,
|
|
437
|
+
StealthCookieStore,
|
|
438
|
+
StealthCookieStoreV1,
|
|
243
439
|
StealthFetchOptions,
|
|
244
440
|
StealthPlatform,
|
|
245
441
|
StealthProfile,
|