@expandai/sdk 0.17.0 → 0.17.1
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/LICENSE +2 -1
- package/README.md +83 -307
- package/build/dts/Client.d.ts +61 -0
- package/build/dts/Client.d.ts.map +1 -0
- package/build/dts/Error.d.ts +90 -0
- package/build/dts/Error.d.ts.map +1 -0
- package/build/dts/FetchJson.d.ts +364 -0
- package/build/dts/FetchJson.d.ts.map +1 -0
- package/build/dts/Generated.d.ts +1863 -0
- package/build/dts/Generated.d.ts.map +1 -0
- package/build/dts/HttpClientHelpers.d.ts +5 -0
- package/build/dts/HttpClientHelpers.d.ts.map +1 -0
- package/build/dts/Internal.d.ts +49 -0
- package/build/dts/Internal.d.ts.map +1 -0
- package/build/dts/Playground.d.ts +24 -0
- package/build/dts/Playground.d.ts.map +1 -0
- package/build/dts/Service.d.ts +277 -0
- package/build/dts/Service.d.ts.map +1 -0
- package/build/dts/index.d.ts +6 -0
- package/build/dts/index.d.ts.map +1 -0
- package/build/esm/Client.js +87 -0
- package/build/esm/Client.js.map +1 -0
- package/build/esm/Error.js +91 -0
- package/build/esm/Error.js.map +1 -0
- package/build/esm/FetchJson.js +70 -0
- package/build/esm/FetchJson.js.map +1 -0
- package/build/esm/Generated.js +646 -0
- package/build/esm/Generated.js.map +1 -0
- package/build/esm/HttpClientHelpers.js +14 -0
- package/build/esm/HttpClientHelpers.js.map +1 -0
- package/build/esm/Internal.js +95 -0
- package/build/esm/Internal.js.map +1 -0
- package/build/esm/Playground.js +55 -0
- package/build/esm/Playground.js.map +1 -0
- package/build/esm/Service.js +174 -0
- package/build/esm/Service.js.map +1 -0
- package/build/esm/index.js +4 -0
- package/build/esm/index.js.map +1 -0
- package/package.json +53 -136
- package/src/Client.ts +128 -0
- package/src/Error.ts +105 -0
- package/src/FetchJson.ts +109 -0
- package/src/Generated.ts +949 -0
- package/src/HttpClientHelpers.ts +24 -0
- package/src/Internal.ts +246 -0
- package/src/Playground.ts +76 -0
- package/src/Service.ts +264 -0
- package/src/index.ts +27 -21
- package/CHANGELOG.md +0 -238
- package/api-promise.d.mts +0 -2
- package/api-promise.d.mts.map +0 -1
- package/api-promise.d.ts +0 -2
- package/api-promise.d.ts.map +0 -1
- package/api-promise.js +0 -6
- package/api-promise.js.map +0 -1
- package/api-promise.mjs +0 -2
- package/api-promise.mjs.map +0 -1
- package/client.d.mts +0 -184
- package/client.d.mts.map +0 -1
- package/client.d.ts +0 -184
- package/client.d.ts.map +0 -1
- package/client.js +0 -476
- package/client.js.map +0 -1
- package/client.mjs +0 -472
- package/client.mjs.map +0 -1
- package/core/api-promise.d.mts +0 -46
- package/core/api-promise.d.mts.map +0 -1
- package/core/api-promise.d.ts +0 -46
- package/core/api-promise.d.ts.map +0 -1
- package/core/api-promise.js +0 -74
- package/core/api-promise.js.map +0 -1
- package/core/api-promise.mjs +0 -70
- package/core/api-promise.mjs.map +0 -1
- package/core/error.d.mts +0 -46
- package/core/error.d.mts.map +0 -1
- package/core/error.d.ts +0 -46
- package/core/error.d.ts.map +0 -1
- package/core/error.js +0 -113
- package/core/error.js.map +0 -1
- package/core/error.mjs +0 -97
- package/core/error.mjs.map +0 -1
- package/core/resource.d.mts +0 -6
- package/core/resource.d.mts.map +0 -1
- package/core/resource.d.ts +0 -6
- package/core/resource.d.ts.map +0 -1
- package/core/resource.js +0 -11
- package/core/resource.js.map +0 -1
- package/core/resource.mjs +0 -7
- package/core/resource.mjs.map +0 -1
- package/core/uploads.d.mts +0 -3
- package/core/uploads.d.mts.map +0 -1
- package/core/uploads.d.ts +0 -3
- package/core/uploads.d.ts.map +0 -1
- package/core/uploads.js +0 -6
- package/core/uploads.js.map +0 -1
- package/core/uploads.mjs +0 -2
- package/core/uploads.mjs.map +0 -1
- package/error.d.mts +0 -2
- package/error.d.mts.map +0 -1
- package/error.d.ts +0 -2
- package/error.d.ts.map +0 -1
- package/error.js +0 -6
- package/error.js.map +0 -1
- package/error.mjs +0 -2
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -6
- package/index.d.mts.map +0 -1
- package/index.d.ts +0 -6
- package/index.d.ts.map +0 -1
- package/index.js +0 -30
- package/index.js.map +0 -1
- package/index.mjs +0 -7
- package/index.mjs.map +0 -1
- package/internal/builtin-types.d.mts +0 -73
- package/internal/builtin-types.d.mts.map +0 -1
- package/internal/builtin-types.d.ts +0 -73
- package/internal/builtin-types.d.ts.map +0 -1
- package/internal/builtin-types.js +0 -4
- package/internal/builtin-types.js.map +0 -1
- package/internal/builtin-types.mjs +0 -3
- package/internal/builtin-types.mjs.map +0 -1
- package/internal/detect-platform.d.mts +0 -15
- package/internal/detect-platform.d.mts.map +0 -1
- package/internal/detect-platform.d.ts +0 -15
- package/internal/detect-platform.d.ts.map +0 -1
- package/internal/detect-platform.js +0 -162
- package/internal/detect-platform.js.map +0 -1
- package/internal/detect-platform.mjs +0 -157
- package/internal/detect-platform.mjs.map +0 -1
- package/internal/errors.d.mts +0 -3
- package/internal/errors.d.mts.map +0 -1
- package/internal/errors.d.ts +0 -3
- package/internal/errors.d.ts.map +0 -1
- package/internal/errors.js +0 -41
- package/internal/errors.js.map +0 -1
- package/internal/errors.mjs +0 -36
- package/internal/errors.mjs.map +0 -1
- package/internal/headers.d.mts +0 -20
- package/internal/headers.d.mts.map +0 -1
- package/internal/headers.d.ts +0 -20
- package/internal/headers.d.ts.map +0 -1
- package/internal/headers.js +0 -79
- package/internal/headers.js.map +0 -1
- package/internal/headers.mjs +0 -74
- package/internal/headers.mjs.map +0 -1
- package/internal/parse.d.mts +0 -12
- package/internal/parse.d.mts.map +0 -1
- package/internal/parse.d.ts +0 -12
- package/internal/parse.d.ts.map +0 -1
- package/internal/parse.js +0 -40
- package/internal/parse.js.map +0 -1
- package/internal/parse.mjs +0 -37
- package/internal/parse.mjs.map +0 -1
- package/internal/request-options.d.mts +0 -75
- package/internal/request-options.d.mts.map +0 -1
- package/internal/request-options.d.ts +0 -75
- package/internal/request-options.d.ts.map +0 -1
- package/internal/request-options.js +0 -14
- package/internal/request-options.js.map +0 -1
- package/internal/request-options.mjs +0 -10
- package/internal/request-options.mjs.map +0 -1
- package/internal/shim-types.d.mts +0 -17
- package/internal/shim-types.d.mts.map +0 -1
- package/internal/shim-types.d.ts +0 -17
- package/internal/shim-types.d.ts.map +0 -1
- package/internal/shim-types.js +0 -4
- package/internal/shim-types.js.map +0 -1
- package/internal/shim-types.mjs +0 -3
- package/internal/shim-types.mjs.map +0 -1
- package/internal/shims.d.mts +0 -20
- package/internal/shims.d.mts.map +0 -1
- package/internal/shims.d.ts +0 -20
- package/internal/shims.d.ts.map +0 -1
- package/internal/shims.js +0 -92
- package/internal/shims.js.map +0 -1
- package/internal/shims.mjs +0 -85
- package/internal/shims.mjs.map +0 -1
- package/internal/to-file.d.mts +0 -45
- package/internal/to-file.d.mts.map +0 -1
- package/internal/to-file.d.ts +0 -45
- package/internal/to-file.d.ts.map +0 -1
- package/internal/to-file.js +0 -91
- package/internal/to-file.js.map +0 -1
- package/internal/to-file.mjs +0 -88
- package/internal/to-file.mjs.map +0 -1
- package/internal/tslib.js +0 -81
- package/internal/tslib.mjs +0 -17
- package/internal/types.d.mts +0 -69
- package/internal/types.d.mts.map +0 -1
- package/internal/types.d.ts +0 -69
- package/internal/types.d.ts.map +0 -1
- package/internal/types.js +0 -4
- package/internal/types.js.map +0 -1
- package/internal/types.mjs +0 -3
- package/internal/types.mjs.map +0 -1
- package/internal/uploads.d.mts +0 -42
- package/internal/uploads.d.mts.map +0 -1
- package/internal/uploads.d.ts +0 -42
- package/internal/uploads.d.ts.map +0 -1
- package/internal/uploads.js +0 -141
- package/internal/uploads.js.map +0 -1
- package/internal/uploads.mjs +0 -131
- package/internal/uploads.mjs.map +0 -1
- package/internal/utils/base64.d.mts +0 -3
- package/internal/utils/base64.d.mts.map +0 -1
- package/internal/utils/base64.d.ts +0 -3
- package/internal/utils/base64.d.ts.map +0 -1
- package/internal/utils/base64.js +0 -38
- package/internal/utils/base64.js.map +0 -1
- package/internal/utils/base64.mjs +0 -33
- package/internal/utils/base64.mjs.map +0 -1
- package/internal/utils/bytes.d.mts +0 -4
- package/internal/utils/bytes.d.mts.map +0 -1
- package/internal/utils/bytes.d.ts +0 -4
- package/internal/utils/bytes.d.ts.map +0 -1
- package/internal/utils/bytes.js +0 -31
- package/internal/utils/bytes.js.map +0 -1
- package/internal/utils/bytes.mjs +0 -26
- package/internal/utils/bytes.mjs.map +0 -1
- package/internal/utils/env.d.mts +0 -9
- package/internal/utils/env.d.mts.map +0 -1
- package/internal/utils/env.d.ts +0 -9
- package/internal/utils/env.d.ts.map +0 -1
- package/internal/utils/env.js +0 -22
- package/internal/utils/env.js.map +0 -1
- package/internal/utils/env.mjs +0 -18
- package/internal/utils/env.mjs.map +0 -1
- package/internal/utils/log.d.mts +0 -37
- package/internal/utils/log.d.mts.map +0 -1
- package/internal/utils/log.d.ts +0 -37
- package/internal/utils/log.d.ts.map +0 -1
- package/internal/utils/log.js +0 -86
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -80
- package/internal/utils/log.mjs.map +0 -1
- package/internal/utils/path.d.mts +0 -15
- package/internal/utils/path.d.mts.map +0 -1
- package/internal/utils/path.d.ts +0 -15
- package/internal/utils/path.d.ts.map +0 -1
- package/internal/utils/path.js +0 -79
- package/internal/utils/path.js.map +0 -1
- package/internal/utils/path.mjs +0 -74
- package/internal/utils/path.mjs.map +0 -1
- package/internal/utils/sleep.d.mts +0 -2
- package/internal/utils/sleep.d.mts.map +0 -1
- package/internal/utils/sleep.d.ts +0 -2
- package/internal/utils/sleep.d.ts.map +0 -1
- package/internal/utils/sleep.js +0 -7
- package/internal/utils/sleep.js.map +0 -1
- package/internal/utils/sleep.mjs +0 -3
- package/internal/utils/sleep.mjs.map +0 -1
- package/internal/utils/uuid.d.mts +0 -5
- package/internal/utils/uuid.d.mts.map +0 -1
- package/internal/utils/uuid.d.ts +0 -5
- package/internal/utils/uuid.d.ts.map +0 -1
- package/internal/utils/uuid.js +0 -19
- package/internal/utils/uuid.js.map +0 -1
- package/internal/utils/uuid.mjs +0 -15
- package/internal/utils/uuid.mjs.map +0 -1
- package/internal/utils/values.d.mts +0 -18
- package/internal/utils/values.d.mts.map +0 -1
- package/internal/utils/values.d.ts +0 -18
- package/internal/utils/values.d.ts.map +0 -1
- package/internal/utils/values.js +0 -112
- package/internal/utils/values.js.map +0 -1
- package/internal/utils/values.mjs +0 -94
- package/internal/utils/values.mjs.map +0 -1
- package/internal/utils.d.mts +0 -7
- package/internal/utils.d.mts.map +0 -1
- package/internal/utils.d.ts +0 -7
- package/internal/utils.d.ts.map +0 -1
- package/internal/utils.js +0 -11
- package/internal/utils.js.map +0 -1
- package/internal/utils.mjs +0 -8
- package/internal/utils.mjs.map +0 -1
- package/resource.d.mts +0 -2
- package/resource.d.mts.map +0 -1
- package/resource.d.ts +0 -2
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -6
- package/resource.js.map +0 -1
- package/resource.mjs +0 -2
- package/resource.mjs.map +0 -1
- package/resources/index.d.mts +0 -2
- package/resources/index.d.mts.map +0 -1
- package/resources/index.d.ts +0 -2
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -4
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -3
- package/resources/index.mjs.map +0 -1
- package/resources/top-level.d.mts +0 -469
- package/resources/top-level.d.mts.map +0 -1
- package/resources/top-level.d.ts +0 -469
- package/resources/top-level.d.ts.map +0 -1
- package/resources/top-level.js +0 -4
- package/resources/top-level.js.map +0 -1
- package/resources/top-level.mjs +0 -3
- package/resources/top-level.mjs.map +0 -1
- package/resources.d.mts +0 -2
- package/resources.d.mts.map +0 -1
- package/resources.d.ts +0 -2
- package/resources.d.ts.map +0 -1
- package/resources.js +0 -5
- package/resources.js.map +0 -1
- package/resources.mjs +0 -2
- package/resources.mjs.map +0 -1
- package/src/api-promise.ts +0 -2
- package/src/client.ts +0 -744
- package/src/core/README.md +0 -3
- package/src/core/api-promise.ts +0 -92
- package/src/core/error.ts +0 -130
- package/src/core/resource.ts +0 -11
- package/src/core/uploads.ts +0 -2
- package/src/error.ts +0 -2
- package/src/internal/README.md +0 -3
- package/src/internal/builtin-types.ts +0 -93
- package/src/internal/detect-platform.ts +0 -196
- package/src/internal/errors.ts +0 -33
- package/src/internal/headers.ts +0 -97
- package/src/internal/parse.ts +0 -56
- package/src/internal/request-options.ts +0 -91
- package/src/internal/shim-types.ts +0 -26
- package/src/internal/shims.ts +0 -107
- package/src/internal/to-file.ts +0 -154
- package/src/internal/types.ts +0 -95
- package/src/internal/uploads.ts +0 -187
- package/src/internal/utils/base64.ts +0 -40
- package/src/internal/utils/bytes.ts +0 -32
- package/src/internal/utils/env.ts +0 -18
- package/src/internal/utils/log.ts +0 -127
- package/src/internal/utils/path.ts +0 -88
- package/src/internal/utils/sleep.ts +0 -3
- package/src/internal/utils/uuid.ts +0 -17
- package/src/internal/utils/values.ts +0 -105
- package/src/internal/utils.ts +0 -8
- package/src/lib/.keep +0 -4
- package/src/resource.ts +0 -2
- package/src/resources/index.ts +0 -3
- package/src/resources/top-level.ts +0 -552
- package/src/resources.ts +0 -1
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -2
- package/src/version.ts +0 -1
- package/uploads.d.mts +0 -2
- package/uploads.d.mts.map +0 -1
- package/uploads.d.ts +0 -2
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -6
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -2
- package/uploads.mjs.map +0 -1
- package/version.d.mts +0 -2
- package/version.d.mts.map +0 -1
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js +0 -5
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { HttpClient } from '@effect/platform';
|
|
2
|
+
import * as Generated from '@expandai/sdk/Generated';
|
|
3
|
+
import { Effect, Schema as S } from 'effect';
|
|
4
|
+
/** Search snippet with the extracted `json` value preserved (statejson snippets only). */
|
|
5
|
+
export declare const FetchSearchSnippetWithJson: S.Struct<{
|
|
6
|
+
type: S.optionalWith<S.Literal<["text"]>, {
|
|
7
|
+
nullable: true;
|
|
8
|
+
default: () => "text";
|
|
9
|
+
}>;
|
|
10
|
+
source: S.Literal<["markdown", "appendix", "statejson"]>;
|
|
11
|
+
text: typeof S.String;
|
|
12
|
+
json: S.optionalWith<typeof S.Unknown, {
|
|
13
|
+
nullable: true;
|
|
14
|
+
}>;
|
|
15
|
+
score: S.filter<S.filter<typeof S.Number>>;
|
|
16
|
+
location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
|
|
17
|
+
nullable: true;
|
|
18
|
+
}>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const FetchSearchResultWithJson: S.Struct<{
|
|
21
|
+
query: typeof S.String;
|
|
22
|
+
snippets: S.Array$<S.Struct<{
|
|
23
|
+
type: S.optionalWith<S.Literal<["text"]>, {
|
|
24
|
+
nullable: true;
|
|
25
|
+
default: () => "text";
|
|
26
|
+
}>;
|
|
27
|
+
source: S.Literal<["markdown", "appendix", "statejson"]>;
|
|
28
|
+
text: typeof S.String;
|
|
29
|
+
json: S.optionalWith<typeof S.Unknown, {
|
|
30
|
+
nullable: true;
|
|
31
|
+
}>;
|
|
32
|
+
score: S.filter<S.filter<typeof S.Number>>;
|
|
33
|
+
location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
|
|
34
|
+
nullable: true;
|
|
35
|
+
}>;
|
|
36
|
+
}>>;
|
|
37
|
+
meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
|
|
38
|
+
nullable: true;
|
|
39
|
+
}>;
|
|
40
|
+
}>;
|
|
41
|
+
declare const FetchObjectModeResultWithJson_base: S.Class<FetchObjectModeResultWithJson, {
|
|
42
|
+
meta: typeof Generated.FetchObjectModeMeta;
|
|
43
|
+
markdown: typeof S.String;
|
|
44
|
+
json: S.Array$<typeof Generated.FetchObjectModeEvidence>;
|
|
45
|
+
data: S.optionalWith<S.Struct<{
|
|
46
|
+
assets: S.optionalWith<S.Array$<typeof Generated.FetchAssetReference>, {
|
|
47
|
+
nullable: true;
|
|
48
|
+
}>;
|
|
49
|
+
captureTelemetry: S.optionalWith<typeof Generated.CaptureTelemetryInfo, {
|
|
50
|
+
nullable: true;
|
|
51
|
+
}>;
|
|
52
|
+
search: S.optionalWith<S.Struct<{
|
|
53
|
+
query: typeof S.String;
|
|
54
|
+
snippets: S.Array$<S.Struct<{
|
|
55
|
+
type: S.optionalWith<S.Literal<["text"]>, {
|
|
56
|
+
nullable: true;
|
|
57
|
+
default: () => "text";
|
|
58
|
+
}>;
|
|
59
|
+
source: S.Literal<["markdown", "appendix", "statejson"]>;
|
|
60
|
+
text: typeof S.String;
|
|
61
|
+
json: S.optionalWith<typeof S.Unknown, {
|
|
62
|
+
nullable: true;
|
|
63
|
+
}>;
|
|
64
|
+
score: S.filter<S.filter<typeof S.Number>>;
|
|
65
|
+
location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
|
|
66
|
+
nullable: true;
|
|
67
|
+
}>;
|
|
68
|
+
}>>;
|
|
69
|
+
meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
|
|
70
|
+
nullable: true;
|
|
71
|
+
}>;
|
|
72
|
+
}>, {
|
|
73
|
+
nullable: true;
|
|
74
|
+
}>;
|
|
75
|
+
}>, {
|
|
76
|
+
nullable: true;
|
|
77
|
+
}>;
|
|
78
|
+
}, S.Struct.Encoded<{
|
|
79
|
+
meta: typeof Generated.FetchObjectModeMeta;
|
|
80
|
+
markdown: typeof S.String;
|
|
81
|
+
json: S.Array$<typeof Generated.FetchObjectModeEvidence>;
|
|
82
|
+
data: S.optionalWith<S.Struct<{
|
|
83
|
+
assets: S.optionalWith<S.Array$<typeof Generated.FetchAssetReference>, {
|
|
84
|
+
nullable: true;
|
|
85
|
+
}>;
|
|
86
|
+
captureTelemetry: S.optionalWith<typeof Generated.CaptureTelemetryInfo, {
|
|
87
|
+
nullable: true;
|
|
88
|
+
}>;
|
|
89
|
+
search: S.optionalWith<S.Struct<{
|
|
90
|
+
query: typeof S.String;
|
|
91
|
+
snippets: S.Array$<S.Struct<{
|
|
92
|
+
type: S.optionalWith<S.Literal<["text"]>, {
|
|
93
|
+
nullable: true;
|
|
94
|
+
default: () => "text";
|
|
95
|
+
}>;
|
|
96
|
+
source: S.Literal<["markdown", "appendix", "statejson"]>;
|
|
97
|
+
text: typeof S.String;
|
|
98
|
+
json: S.optionalWith<typeof S.Unknown, {
|
|
99
|
+
nullable: true;
|
|
100
|
+
}>;
|
|
101
|
+
score: S.filter<S.filter<typeof S.Number>>;
|
|
102
|
+
location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
|
|
103
|
+
nullable: true;
|
|
104
|
+
}>;
|
|
105
|
+
}>>;
|
|
106
|
+
meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
|
|
107
|
+
nullable: true;
|
|
108
|
+
}>;
|
|
109
|
+
}>, {
|
|
110
|
+
nullable: true;
|
|
111
|
+
}>;
|
|
112
|
+
}>, {
|
|
113
|
+
nullable: true;
|
|
114
|
+
}>;
|
|
115
|
+
}>, never, {
|
|
116
|
+
readonly markdown: string;
|
|
117
|
+
} & {
|
|
118
|
+
readonly meta: {
|
|
119
|
+
readonly url: string;
|
|
120
|
+
readonly markdown?: {
|
|
121
|
+
readonly url: string;
|
|
122
|
+
readonly moreTokens: number;
|
|
123
|
+
} | undefined;
|
|
124
|
+
readonly appendix?: {
|
|
125
|
+
readonly url: string;
|
|
126
|
+
readonly links: {
|
|
127
|
+
readonly sameDomain: number;
|
|
128
|
+
readonly external: number;
|
|
129
|
+
};
|
|
130
|
+
} | undefined;
|
|
131
|
+
readonly description?: string | undefined;
|
|
132
|
+
readonly version: 1;
|
|
133
|
+
readonly capturedAt: string;
|
|
134
|
+
readonly snapshotId: string;
|
|
135
|
+
readonly lang: string;
|
|
136
|
+
readonly pageType: string;
|
|
137
|
+
readonly playground: string;
|
|
138
|
+
readonly title?: string | undefined;
|
|
139
|
+
readonly finalUrl?: string | undefined;
|
|
140
|
+
readonly canonical?: string | undefined;
|
|
141
|
+
readonly author?: string | undefined;
|
|
142
|
+
readonly createdAt?: string | undefined;
|
|
143
|
+
readonly updatedAt?: string | undefined;
|
|
144
|
+
readonly image?: string | undefined;
|
|
145
|
+
readonly paginationNext?: string | undefined;
|
|
146
|
+
readonly stateJson?: {
|
|
147
|
+
readonly moreTokens: number;
|
|
148
|
+
} | undefined;
|
|
149
|
+
readonly blocked?: string | undefined;
|
|
150
|
+
readonly loadingStatus?: string | undefined;
|
|
151
|
+
};
|
|
152
|
+
} & {
|
|
153
|
+
readonly json: readonly {
|
|
154
|
+
readonly keys?: readonly string[] | undefined;
|
|
155
|
+
readonly url?: string | undefined;
|
|
156
|
+
readonly moreTokens?: number | undefined;
|
|
157
|
+
readonly id: number;
|
|
158
|
+
readonly kind: "inline" | "network";
|
|
159
|
+
readonly role: "ld+json" | "next-data" | "nuxt" | "apollo-state" | "initial-state" | "application-json" | "script-tag" | "data-attribute" | "network-json" | "network-response" | "other";
|
|
160
|
+
readonly score: number;
|
|
161
|
+
readonly method?: string | undefined;
|
|
162
|
+
}[];
|
|
163
|
+
} & {
|
|
164
|
+
readonly data?: {
|
|
165
|
+
readonly search?: {
|
|
166
|
+
readonly meta?: {
|
|
167
|
+
readonly durationMs: number;
|
|
168
|
+
readonly sources: readonly {
|
|
169
|
+
readonly source: "markdown" | "appendix" | "statejson";
|
|
170
|
+
readonly chunkCount: number;
|
|
171
|
+
readonly batchCount: number;
|
|
172
|
+
readonly ranker: "zeroentropy" | "local_lexical";
|
|
173
|
+
readonly fallback: boolean;
|
|
174
|
+
readonly fallbackReason?: "timeout" | "error" | undefined;
|
|
175
|
+
readonly durationMs: number;
|
|
176
|
+
}[];
|
|
177
|
+
} | undefined;
|
|
178
|
+
readonly query: string;
|
|
179
|
+
readonly snippets: readonly {
|
|
180
|
+
readonly json?: unknown;
|
|
181
|
+
readonly score: number;
|
|
182
|
+
readonly source: "markdown" | "appendix" | "statejson";
|
|
183
|
+
readonly type: "text";
|
|
184
|
+
readonly text: string;
|
|
185
|
+
readonly location?: {
|
|
186
|
+
readonly markdownBlockId?: string | undefined;
|
|
187
|
+
readonly nodeIds?: readonly number[] | undefined;
|
|
188
|
+
readonly stateJsonSourceId?: number | undefined;
|
|
189
|
+
readonly jsonPath?: string | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
}[];
|
|
192
|
+
} | undefined;
|
|
193
|
+
readonly assets?: readonly {
|
|
194
|
+
readonly id: string;
|
|
195
|
+
readonly kind: "data-url";
|
|
196
|
+
readonly placeholder: string;
|
|
197
|
+
readonly archiveKey: string;
|
|
198
|
+
readonly mimeType: string;
|
|
199
|
+
readonly sha256: string;
|
|
200
|
+
readonly bytes: number;
|
|
201
|
+
}[] | undefined;
|
|
202
|
+
readonly captureTelemetry?: {
|
|
203
|
+
readonly requestedStyleMode?: "compat_full" | "native_default" | undefined;
|
|
204
|
+
readonly selected: "rust";
|
|
205
|
+
readonly actual: "rust";
|
|
206
|
+
readonly actualStyleMode?: "compat_full" | "native_default" | undefined;
|
|
207
|
+
readonly rolloutApplied: boolean;
|
|
208
|
+
readonly preparedSessionHit?: boolean | undefined;
|
|
209
|
+
readonly nativePoolHit?: boolean | undefined;
|
|
210
|
+
readonly preparedPageHit?: boolean | undefined;
|
|
211
|
+
readonly nativePoolCapacity?: number | undefined;
|
|
212
|
+
readonly nativePoolProfile?: string | undefined;
|
|
213
|
+
readonly poolHit?: boolean | undefined;
|
|
214
|
+
readonly connectMs?: number | undefined;
|
|
215
|
+
readonly warmConnectionAgeMs?: number | undefined;
|
|
216
|
+
readonly iconBackendDecision?: "cpu" | "remote_gpu" | undefined;
|
|
217
|
+
} | undefined;
|
|
218
|
+
} | undefined;
|
|
219
|
+
}, {}, {}>;
|
|
220
|
+
export declare class FetchObjectModeResultWithJson extends FetchObjectModeResultWithJson_base {
|
|
221
|
+
}
|
|
222
|
+
declare const FetchSnapshotSearchResultWithJson_base: S.Class<FetchSnapshotSearchResultWithJson, {
|
|
223
|
+
snapshotId: S.filter<typeof S.String>;
|
|
224
|
+
response: typeof Generated.ResponseInfo;
|
|
225
|
+
search: S.Struct<{
|
|
226
|
+
query: typeof S.String;
|
|
227
|
+
snippets: S.Array$<S.Struct<{
|
|
228
|
+
type: S.optionalWith<S.Literal<["text"]>, {
|
|
229
|
+
nullable: true;
|
|
230
|
+
default: () => "text";
|
|
231
|
+
}>;
|
|
232
|
+
source: S.Literal<["markdown", "appendix", "statejson"]>;
|
|
233
|
+
text: typeof S.String;
|
|
234
|
+
json: S.optionalWith<typeof S.Unknown, {
|
|
235
|
+
nullable: true;
|
|
236
|
+
}>;
|
|
237
|
+
score: S.filter<S.filter<typeof S.Number>>;
|
|
238
|
+
location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
|
|
239
|
+
nullable: true;
|
|
240
|
+
}>;
|
|
241
|
+
}>>;
|
|
242
|
+
meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
|
|
243
|
+
nullable: true;
|
|
244
|
+
}>;
|
|
245
|
+
}>;
|
|
246
|
+
durationMs: S.filter<typeof S.Number>;
|
|
247
|
+
}, S.Struct.Encoded<{
|
|
248
|
+
snapshotId: S.filter<typeof S.String>;
|
|
249
|
+
response: typeof Generated.ResponseInfo;
|
|
250
|
+
search: S.Struct<{
|
|
251
|
+
query: typeof S.String;
|
|
252
|
+
snippets: S.Array$<S.Struct<{
|
|
253
|
+
type: S.optionalWith<S.Literal<["text"]>, {
|
|
254
|
+
nullable: true;
|
|
255
|
+
default: () => "text";
|
|
256
|
+
}>;
|
|
257
|
+
source: S.Literal<["markdown", "appendix", "statejson"]>;
|
|
258
|
+
text: typeof S.String;
|
|
259
|
+
json: S.optionalWith<typeof S.Unknown, {
|
|
260
|
+
nullable: true;
|
|
261
|
+
}>;
|
|
262
|
+
score: S.filter<S.filter<typeof S.Number>>;
|
|
263
|
+
location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
|
|
264
|
+
nullable: true;
|
|
265
|
+
}>;
|
|
266
|
+
}>>;
|
|
267
|
+
meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
|
|
268
|
+
nullable: true;
|
|
269
|
+
}>;
|
|
270
|
+
}>;
|
|
271
|
+
durationMs: S.filter<typeof S.Number>;
|
|
272
|
+
}>, never, {
|
|
273
|
+
readonly search: {
|
|
274
|
+
readonly meta?: {
|
|
275
|
+
readonly durationMs: number;
|
|
276
|
+
readonly sources: readonly {
|
|
277
|
+
readonly source: "markdown" | "appendix" | "statejson";
|
|
278
|
+
readonly chunkCount: number;
|
|
279
|
+
readonly batchCount: number;
|
|
280
|
+
readonly ranker: "zeroentropy" | "local_lexical";
|
|
281
|
+
readonly fallback: boolean;
|
|
282
|
+
readonly fallbackReason?: "timeout" | "error" | undefined;
|
|
283
|
+
readonly durationMs: number;
|
|
284
|
+
}[];
|
|
285
|
+
} | undefined;
|
|
286
|
+
readonly query: string;
|
|
287
|
+
readonly snippets: readonly {
|
|
288
|
+
readonly json?: unknown;
|
|
289
|
+
readonly score: number;
|
|
290
|
+
readonly source: "markdown" | "appendix" | "statejson";
|
|
291
|
+
readonly type: "text";
|
|
292
|
+
readonly text: string;
|
|
293
|
+
readonly location?: {
|
|
294
|
+
readonly markdownBlockId?: string | undefined;
|
|
295
|
+
readonly nodeIds?: readonly number[] | undefined;
|
|
296
|
+
readonly stateJsonSourceId?: number | undefined;
|
|
297
|
+
readonly jsonPath?: string | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
}[];
|
|
300
|
+
};
|
|
301
|
+
} & {
|
|
302
|
+
readonly response: {
|
|
303
|
+
readonly url: string;
|
|
304
|
+
readonly requestedUrl?: string | undefined;
|
|
305
|
+
readonly originStatusCode?: number | undefined;
|
|
306
|
+
readonly redirectStatusCode?: number | undefined;
|
|
307
|
+
readonly headers?: {} | undefined;
|
|
308
|
+
};
|
|
309
|
+
} & {
|
|
310
|
+
readonly snapshotId: string;
|
|
311
|
+
} & {
|
|
312
|
+
readonly durationMs: number;
|
|
313
|
+
}, {}, {}>;
|
|
314
|
+
export declare class FetchSnapshotSearchResultWithJson extends FetchSnapshotSearchResultWithJson_base {
|
|
315
|
+
}
|
|
316
|
+
/** Mirrors `Generated.Client['fetchFetchJson']` but decodes the 200 body with `json` preserved. */
|
|
317
|
+
export declare const fetchObjectModeJson: (httpClient: HttpClient.HttpClient, options: {
|
|
318
|
+
readonly params: typeof Generated.FetchFetchJsonParams.Encoded;
|
|
319
|
+
readonly payload: typeof Generated.FetchFetchJsonRequest.Encoded;
|
|
320
|
+
}) => Effect.Effect<FetchObjectModeResultWithJson, {
|
|
321
|
+
readonly message: string;
|
|
322
|
+
readonly _tag: "HttpApiDecodeError";
|
|
323
|
+
readonly issues: readonly {
|
|
324
|
+
readonly message: string;
|
|
325
|
+
readonly _tag: "Type" | "Pointer" | "Unexpected" | "Missing" | "Composite" | "Refinement" | "Transformation" | "Forbidden";
|
|
326
|
+
readonly path: readonly (string | number | {
|
|
327
|
+
readonly _tag: "symbol";
|
|
328
|
+
readonly key: string;
|
|
329
|
+
})[];
|
|
330
|
+
}[];
|
|
331
|
+
} | {
|
|
332
|
+
readonly message: string;
|
|
333
|
+
readonly _tag: "BadRequest";
|
|
334
|
+
} | Generated.AuthFailed | {
|
|
335
|
+
readonly _tag: "FetchBlocked";
|
|
336
|
+
readonly url: string;
|
|
337
|
+
readonly blockedType?: string | undefined;
|
|
338
|
+
} | Generated.PayloadTooLarge | Generated.TooManyRequests | Generated.InternalError | Generated.ServiceUnavailable | {
|
|
339
|
+
readonly _tag: "AccessBlocked";
|
|
340
|
+
readonly organizationId: string;
|
|
341
|
+
readonly blockedUntil?: string | null | undefined;
|
|
342
|
+
} | import("@effect/platform/HttpClientError").HttpClientError | import("effect/ParseResult").ParseError, never>;
|
|
343
|
+
/** Mirrors `Generated.Client['fetchFetchSearch']` but decodes the 200 body with `json` preserved. */
|
|
344
|
+
export declare const fetchSnapshotSearch: (httpClient: HttpClient.HttpClient, options: typeof Generated.FetchFetchSearchRequest.Encoded) => Effect.Effect<FetchSnapshotSearchResultWithJson, {
|
|
345
|
+
readonly message: string;
|
|
346
|
+
readonly _tag: "HttpApiDecodeError";
|
|
347
|
+
readonly issues: readonly {
|
|
348
|
+
readonly message: string;
|
|
349
|
+
readonly _tag: "Type" | "Pointer" | "Unexpected" | "Missing" | "Composite" | "Refinement" | "Transformation" | "Forbidden";
|
|
350
|
+
readonly path: readonly (string | number | {
|
|
351
|
+
readonly _tag: "symbol";
|
|
352
|
+
readonly key: string;
|
|
353
|
+
})[];
|
|
354
|
+
}[];
|
|
355
|
+
} | {
|
|
356
|
+
readonly message: string;
|
|
357
|
+
readonly _tag: "BadRequest";
|
|
358
|
+
} | Generated.AuthFailed | Generated.PayloadTooLarge | Generated.TooManyRequests | Generated.InternalError | Generated.ServiceUnavailable | {
|
|
359
|
+
readonly _tag: "AccessBlocked";
|
|
360
|
+
readonly organizationId: string;
|
|
361
|
+
readonly blockedUntil?: string | null | undefined;
|
|
362
|
+
} | Generated.FetchSnapshotSearchNotFound | import("@effect/platform/HttpClientError").HttpClientError | import("effect/ParseResult").ParseError, never>;
|
|
363
|
+
export {};
|
|
364
|
+
//# sourceMappingURL=FetchJson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FetchJson.d.ts","sourceRoot":"","sources":["../../src/FetchJson.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAyC,MAAM,kBAAkB,CAAA;AACpF,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE5C,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;EAOrC,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;EAIpC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,qBAAa,6BAA8B,SAAQ,kCAcjD;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,iCAAkC,SAAQ,sCAOrD;CAAG;AAEL,mGAAmG;AACnG,eAAO,MAAM,mBAAmB,GAC/B,YAAY,UAAU,CAAC,UAAU,EACjC,SAAS;IACR,QAAQ,CAAC,MAAM,EAAE,OAAO,SAAS,CAAC,oBAAoB,CAAC,OAAO,CAAA;IAC9D,QAAQ,CAAC,OAAO,EAAE,OAAO,SAAS,CAAC,qBAAqB,CAAC,OAAO,CAAA;CAChE;;;;;;;;;;;;;;;;;;;;;;gHAqBA,CAAA;AAEF,qGAAqG;AACrG,eAAO,MAAM,mBAAmB,GAC/B,YAAY,UAAU,CAAC,UAAU,EACjC,SAAS,OAAO,SAAS,CAAC,uBAAuB,CAAC,OAAO;;;;;;;;;;;;;;;;;;wJAqBxD,CAAA"}
|