@expandai/sdk 0.17.1 → 0.18.0
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/README.md +4 -0
- package/build/dts/Client.d.ts +10 -4
- package/build/dts/Client.d.ts.map +1 -1
- package/build/dts/Error.d.ts.map +1 -1
- package/build/dts/FetchJson.d.ts +120 -132
- package/build/dts/FetchJson.d.ts.map +1 -1
- package/build/dts/Generated.d.ts +446 -492
- package/build/dts/Generated.d.ts.map +1 -1
- package/build/dts/HttpClientHelpers.d.ts +1 -1
- package/build/dts/Internal.d.ts +4 -3
- package/build/dts/Internal.d.ts.map +1 -1
- package/build/dts/Playground.d.ts +8 -4
- package/build/dts/Playground.d.ts.map +1 -1
- package/build/dts/Service.d.ts +78 -81
- package/build/dts/Service.d.ts.map +1 -1
- package/build/dts/index.d.ts +1 -1
- package/build/dts/index.d.ts.map +1 -1
- package/build/esm/Client.js +9 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/Error.js.map +1 -1
- package/build/esm/FetchJson.js +3 -3
- package/build/esm/FetchJson.js.map +1 -1
- package/build/esm/Generated.js +116 -94
- package/build/esm/Generated.js.map +1 -1
- package/build/esm/Internal.js +17 -7
- package/build/esm/Internal.js.map +1 -1
- package/build/esm/Playground.js +38 -18
- package/build/esm/Playground.js.map +1 -1
- package/build/esm/Service.js +23 -23
- package/build/esm/Service.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/package.json +22 -3
- package/src/Client.ts +15 -2
- package/src/FetchJson.ts +3 -3
- package/src/Generated.ts +173 -119
- package/src/Internal.ts +29 -7
- package/src/Playground.ts +54 -20
- package/src/Service.ts +39 -24
- package/src/index.ts +2 -0
package/README.md
CHANGED
|
@@ -109,6 +109,8 @@ while (status.batchedStatus === 'RUNNING' || status.batchedStatus === 'QUEUED')
|
|
|
109
109
|
console.log(status.results)
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
+
Each result has a persisted `status` (`QUEUED`, `RUNNING`, `SUCCEEDED`, `FAILED`, or `CANCELLED`) alongside its `data`.
|
|
113
|
+
|
|
112
114
|
### Effect service
|
|
113
115
|
|
|
114
116
|
```ts
|
|
@@ -132,6 +134,8 @@ const program = Effect.gen(function* () {
|
|
|
132
134
|
NodeRuntime.runMain(program.pipe(Effect.provide(ExpandService.layer({ apiKey: process.env.EXPAND_API_KEY }))))
|
|
133
135
|
```
|
|
134
136
|
|
|
137
|
+
The SDK generates an idempotency key and reuses it for automatic retries when one is omitted. Supply a stable `idempotencyKey` to deduplicate separate calls or calls made after a process restart. Reusing a key with a different payload returns `409 BatchedIdempotencyConflict`.
|
|
138
|
+
|
|
135
139
|
## License
|
|
136
140
|
|
|
137
141
|
[Apache 2.0](./LICENSE)
|
package/build/dts/Client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type BatchedParams, type BatchedResponse, type ExpandServiceOptions, type FetchJsonParams, type FetchJsonRequestOptions, type FetchJsonResponse, type FetchParams, type FetchRequestOptions, type FetchResponse, type FetchSearchParams, type FetchSearchResponse, type GetBatchedParams, type GetBatchedResponse, type RequestOptions } from './Service.js';
|
|
2
|
-
export type { BatchedParams, BatchedResponse, FetchJsonParams, FetchJsonRequestOptions, FetchJsonResponse, FetchParams, FetchRequestOptions, FetchResponse, FetchSearchParams, FetchSearchResponse, GetBatchedParams, GetBatchedResponse, } from './Service.js';
|
|
1
|
+
import { type BatchedParams, type BatchedRequestOptions, type BatchedResponse, type CancelBatchedResponse, type ExpandServiceOptions, type FetchJsonParams, type FetchJsonRequestOptions, type FetchJsonResponse, type FetchParams, type FetchRequestOptions, type FetchResponse, type FetchSearchParams, type FetchSearchResponse, type GetBatchedParams, type GetBatchedResponse, type RequestOptions } from './Service.js';
|
|
2
|
+
export type { BatchedParams, BatchedRequestOptions, BatchedResponse, CancelBatchedResponse, FetchJsonParams, FetchJsonRequestOptions, FetchJsonResponse, FetchParams, FetchRequestOptions, FetchResponse, FetchSearchParams, FetchSearchResponse, GetBatchedParams, GetBatchedResponse, } from './Service.js';
|
|
3
3
|
/** Options for constructing an {@link ExpandClient}. Same shape as `ExpandServiceOptions`. */
|
|
4
4
|
export type ExpandClientOptions = ExpandServiceOptions;
|
|
5
5
|
/**
|
|
@@ -39,14 +39,16 @@ export declare class ExpandClient {
|
|
|
39
39
|
* Kick off an asynchronous batched fetch over one or more URLs. Returns a batched-run ID that can
|
|
40
40
|
* be polled via {@link getBatched}.
|
|
41
41
|
*
|
|
42
|
-
*
|
|
42
|
+
* When `idempotencyKey` is omitted, the client generates one and reuses it for automatic retries.
|
|
43
|
+
* Provide a stable key to deduplicate separate calls or calls made after a process restart. Reusing
|
|
44
|
+
* a key with a different payload surfaces an idempotency conflict.
|
|
43
45
|
*
|
|
44
46
|
* @throws {ExpandClientApiError} on 4xx/5xx responses
|
|
45
47
|
* @throws {ExpandClientTimeoutError} when the request exceeds `timeoutMs`
|
|
46
48
|
* @throws {ExpandClientConnectionError} on network failures
|
|
47
49
|
* @throws {ExpandClientError} for any other failure
|
|
48
50
|
*/
|
|
49
|
-
batched(params: BatchedParams, options?:
|
|
51
|
+
batched(params: BatchedParams, options?: BatchedRequestOptions): Promise<BatchedResponse>;
|
|
50
52
|
/**
|
|
51
53
|
* Fetch the status and accumulated results for a batched run previously started by {@link batched}.
|
|
52
54
|
*
|
|
@@ -56,6 +58,10 @@ export declare class ExpandClient {
|
|
|
56
58
|
* @throws {ExpandClientError} for any other failure
|
|
57
59
|
*/
|
|
58
60
|
getBatched(id: string, options?: GetBatchedParams & RequestOptions): Promise<GetBatchedResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Request cancellation of a batched run. The command is idempotent and uses the configured retry policy.
|
|
63
|
+
*/
|
|
64
|
+
cancelBatched(id: string, options?: RequestOptions): Promise<CancelBatchedResponse>;
|
|
59
65
|
private run;
|
|
60
66
|
}
|
|
61
67
|
//# sourceMappingURL=Client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../src/Client.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,eAAe,EAEpB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,MAAM,cAAc,CAAA;AAErB,YAAY,EACX,aAAa,EACb,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,cAAc,CAAA;AAErB,8FAA8F;AAC9F,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;
|
|
1
|
+
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../src/Client.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EAEpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,MAAM,cAAc,CAAA;AAErB,YAAY,EACX,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,iBAA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AAY,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAIlF;CACD"}
|
package/build/dts/FetchJson.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@effect/platform';
|
|
2
|
-
import * as Generated from '@expandai/sdk/Generated';
|
|
3
2
|
import { Effect, Schema as S } from 'effect';
|
|
3
|
+
import * as Generated from './Generated.js';
|
|
4
4
|
/** Search snippet with the extracted `json` value preserved (statejson snippets only). */
|
|
5
5
|
export declare const FetchSearchSnippetWithJson: S.Struct<{
|
|
6
6
|
type: S.optionalWith<S.Literal<["text"]>, {
|
|
@@ -46,9 +46,6 @@ declare const FetchObjectModeResultWithJson_base: S.Class<FetchObjectModeResultW
|
|
|
46
46
|
assets: S.optionalWith<S.Array$<typeof Generated.FetchAssetReference>, {
|
|
47
47
|
nullable: true;
|
|
48
48
|
}>;
|
|
49
|
-
captureTelemetry: S.optionalWith<typeof Generated.CaptureTelemetryInfo, {
|
|
50
|
-
nullable: true;
|
|
51
|
-
}>;
|
|
52
49
|
search: S.optionalWith<S.Struct<{
|
|
53
50
|
query: typeof S.String;
|
|
54
51
|
snippets: S.Array$<S.Struct<{
|
|
@@ -83,9 +80,6 @@ declare const FetchObjectModeResultWithJson_base: S.Class<FetchObjectModeResultW
|
|
|
83
80
|
assets: S.optionalWith<S.Array$<typeof Generated.FetchAssetReference>, {
|
|
84
81
|
nullable: true;
|
|
85
82
|
}>;
|
|
86
|
-
captureTelemetry: S.optionalWith<typeof Generated.CaptureTelemetryInfo, {
|
|
87
|
-
nullable: true;
|
|
88
|
-
}>;
|
|
89
83
|
search: S.optionalWith<S.Struct<{
|
|
90
84
|
query: typeof S.String;
|
|
91
85
|
snippets: S.Array$<S.Struct<{
|
|
@@ -113,23 +107,63 @@ declare const FetchObjectModeResultWithJson_base: S.Class<FetchObjectModeResultW
|
|
|
113
107
|
nullable: true;
|
|
114
108
|
}>;
|
|
115
109
|
}>, never, {
|
|
110
|
+
readonly data?: {
|
|
111
|
+
readonly assets?: readonly {
|
|
112
|
+
readonly id: string;
|
|
113
|
+
readonly kind: "data-url";
|
|
114
|
+
readonly placeholder: string;
|
|
115
|
+
readonly archiveKey: string;
|
|
116
|
+
readonly mimeType: string;
|
|
117
|
+
readonly sha256: string;
|
|
118
|
+
readonly bytes: number;
|
|
119
|
+
}[] | undefined;
|
|
120
|
+
readonly search?: {
|
|
121
|
+
readonly query: string;
|
|
122
|
+
readonly snippets: readonly {
|
|
123
|
+
readonly type: "text";
|
|
124
|
+
readonly source: "appendix" | "markdown" | "statejson";
|
|
125
|
+
readonly text: string;
|
|
126
|
+
readonly json?: unknown;
|
|
127
|
+
readonly score: number;
|
|
128
|
+
readonly location?: {
|
|
129
|
+
readonly evidenceId?: number | undefined;
|
|
130
|
+
readonly markdownBlockId?: string | undefined;
|
|
131
|
+
readonly nodeIds?: readonly number[] | undefined;
|
|
132
|
+
readonly stateJsonSourceId?: number | undefined;
|
|
133
|
+
readonly jsonPath?: string | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
}[];
|
|
136
|
+
readonly meta?: {
|
|
137
|
+
readonly durationMs: number;
|
|
138
|
+
readonly sources: readonly {
|
|
139
|
+
readonly source: "appendix" | "markdown" | "statejson";
|
|
140
|
+
readonly chunkCount: number;
|
|
141
|
+
readonly batchCount: number;
|
|
142
|
+
readonly ranker: "local_lexical" | "zeroentropy";
|
|
143
|
+
readonly fallback: boolean;
|
|
144
|
+
readonly fallbackReason?: "error" | "timeout" | undefined;
|
|
145
|
+
readonly durationMs: number;
|
|
146
|
+
}[];
|
|
147
|
+
} | undefined;
|
|
148
|
+
} | undefined;
|
|
149
|
+
} | undefined;
|
|
150
|
+
} & {
|
|
151
|
+
readonly json: readonly {
|
|
152
|
+
readonly id: number;
|
|
153
|
+
readonly kind: "inline" | "network";
|
|
154
|
+
readonly role: "apollo-state" | "application-json" | "data-attribute" | "initial-state" | "ld+json" | "network-json" | "network-response" | "next-data" | "nuxt" | "other" | "script-tag";
|
|
155
|
+
readonly score: number;
|
|
156
|
+
readonly url?: string | undefined;
|
|
157
|
+
readonly method?: string | undefined;
|
|
158
|
+
readonly moreTokens?: number | undefined;
|
|
159
|
+
readonly keys?: readonly string[] | undefined;
|
|
160
|
+
}[];
|
|
161
|
+
} & {
|
|
116
162
|
readonly markdown: string;
|
|
117
163
|
} & {
|
|
118
164
|
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
165
|
readonly version: 1;
|
|
166
|
+
readonly url: string;
|
|
133
167
|
readonly capturedAt: string;
|
|
134
168
|
readonly snapshotId: string;
|
|
135
169
|
readonly lang: string;
|
|
@@ -138,84 +172,29 @@ declare const FetchObjectModeResultWithJson_base: S.Class<FetchObjectModeResultW
|
|
|
138
172
|
readonly title?: string | undefined;
|
|
139
173
|
readonly finalUrl?: string | undefined;
|
|
140
174
|
readonly canonical?: string | undefined;
|
|
175
|
+
readonly description?: string | undefined;
|
|
141
176
|
readonly author?: string | undefined;
|
|
142
177
|
readonly createdAt?: string | undefined;
|
|
143
178
|
readonly updatedAt?: string | undefined;
|
|
144
179
|
readonly image?: string | undefined;
|
|
145
180
|
readonly paginationNext?: string | undefined;
|
|
181
|
+
readonly appendix?: {
|
|
182
|
+
readonly url: string;
|
|
183
|
+
readonly links: {
|
|
184
|
+
readonly sameDomain: number;
|
|
185
|
+
readonly external: number;
|
|
186
|
+
};
|
|
187
|
+
} | undefined;
|
|
146
188
|
readonly stateJson?: {
|
|
147
189
|
readonly moreTokens: number;
|
|
148
190
|
} | undefined;
|
|
191
|
+
readonly markdown?: {
|
|
192
|
+
readonly url: string;
|
|
193
|
+
readonly moreTokens: number;
|
|
194
|
+
} | undefined;
|
|
149
195
|
readonly blocked?: string | undefined;
|
|
150
196
|
readonly loadingStatus?: string | undefined;
|
|
151
197
|
};
|
|
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
198
|
}, {}, {}>;
|
|
220
199
|
export declare class FetchObjectModeResultWithJson extends FetchObjectModeResultWithJson_base {
|
|
221
200
|
}
|
|
@@ -244,6 +223,7 @@ declare const FetchSnapshotSearchResultWithJson_base: S.Class<FetchSnapshotSearc
|
|
|
244
223
|
}>;
|
|
245
224
|
}>;
|
|
246
225
|
durationMs: S.filter<typeof S.Number>;
|
|
226
|
+
playground: typeof S.String;
|
|
247
227
|
}, S.Struct.Encoded<{
|
|
248
228
|
snapshotId: S.filter<typeof S.String>;
|
|
249
229
|
response: typeof Generated.ResponseInfo;
|
|
@@ -269,47 +249,51 @@ declare const FetchSnapshotSearchResultWithJson_base: S.Class<FetchSnapshotSearc
|
|
|
269
249
|
}>;
|
|
270
250
|
}>;
|
|
271
251
|
durationMs: S.filter<typeof S.Number>;
|
|
252
|
+
playground: typeof S.String;
|
|
272
253
|
}>, never, {
|
|
254
|
+
readonly durationMs: number;
|
|
255
|
+
} & {
|
|
256
|
+
readonly playground: string;
|
|
257
|
+
} & {
|
|
258
|
+
readonly response: {
|
|
259
|
+
readonly url: string;
|
|
260
|
+
readonly requestedUrl?: string | undefined;
|
|
261
|
+
readonly originStatusCode?: number | undefined;
|
|
262
|
+
readonly redirectStatusCode?: number | undefined;
|
|
263
|
+
readonly headers?: {} | undefined;
|
|
264
|
+
};
|
|
265
|
+
} & {
|
|
273
266
|
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
267
|
readonly query: string;
|
|
287
268
|
readonly snippets: readonly {
|
|
288
|
-
readonly json?: unknown;
|
|
289
|
-
readonly score: number;
|
|
290
|
-
readonly source: "markdown" | "appendix" | "statejson";
|
|
291
269
|
readonly type: "text";
|
|
270
|
+
readonly source: "appendix" | "markdown" | "statejson";
|
|
292
271
|
readonly text: string;
|
|
272
|
+
readonly json?: unknown;
|
|
273
|
+
readonly score: number;
|
|
293
274
|
readonly location?: {
|
|
275
|
+
readonly evidenceId?: number | undefined;
|
|
294
276
|
readonly markdownBlockId?: string | undefined;
|
|
295
277
|
readonly nodeIds?: readonly number[] | undefined;
|
|
296
278
|
readonly stateJsonSourceId?: number | undefined;
|
|
297
279
|
readonly jsonPath?: string | undefined;
|
|
298
280
|
} | undefined;
|
|
299
281
|
}[];
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
282
|
+
readonly meta?: {
|
|
283
|
+
readonly durationMs: number;
|
|
284
|
+
readonly sources: readonly {
|
|
285
|
+
readonly source: "appendix" | "markdown" | "statejson";
|
|
286
|
+
readonly chunkCount: number;
|
|
287
|
+
readonly batchCount: number;
|
|
288
|
+
readonly ranker: "local_lexical" | "zeroentropy";
|
|
289
|
+
readonly fallback: boolean;
|
|
290
|
+
readonly fallbackReason?: "error" | "timeout" | undefined;
|
|
291
|
+
readonly durationMs: number;
|
|
292
|
+
}[];
|
|
293
|
+
} | undefined;
|
|
308
294
|
};
|
|
309
295
|
} & {
|
|
310
296
|
readonly snapshotId: string;
|
|
311
|
-
} & {
|
|
312
|
-
readonly durationMs: number;
|
|
313
297
|
}, {}, {}>;
|
|
314
298
|
export declare class FetchSnapshotSearchResultWithJson extends FetchSnapshotSearchResultWithJson_base {
|
|
315
299
|
}
|
|
@@ -317,48 +301,52 @@ export declare class FetchSnapshotSearchResultWithJson extends FetchSnapshotSear
|
|
|
317
301
|
export declare const fetchObjectModeJson: (httpClient: HttpClient.HttpClient, options: {
|
|
318
302
|
readonly params: typeof Generated.FetchFetchJsonParams.Encoded;
|
|
319
303
|
readonly payload: typeof Generated.FetchFetchJsonRequest.Encoded;
|
|
320
|
-
}) => Effect.Effect<FetchObjectModeResultWithJson, {
|
|
321
|
-
readonly message: string;
|
|
322
|
-
readonly _tag: "HttpApiDecodeError";
|
|
304
|
+
}) => Effect.Effect<FetchObjectModeResultWithJson, Generated.AuthFailed | Generated.InternalError | import("effect/ParseResult").ParseError | Generated.ServiceUnavailable | Generated.TooManyRequests | {
|
|
323
305
|
readonly issues: readonly {
|
|
324
|
-
readonly
|
|
325
|
-
readonly _tag: "Type" | "Pointer" | "Unexpected" | "Missing" | "Composite" | "Refinement" | "Transformation" | "Forbidden";
|
|
306
|
+
readonly _tag: "Composite" | "Forbidden" | "Missing" | "Pointer" | "Refinement" | "Transformation" | "Type" | "Unexpected";
|
|
326
307
|
readonly path: readonly (string | number | {
|
|
327
308
|
readonly _tag: "symbol";
|
|
328
309
|
readonly key: string;
|
|
329
310
|
})[];
|
|
311
|
+
readonly message: string;
|
|
330
312
|
}[];
|
|
313
|
+
readonly message: string;
|
|
314
|
+
readonly _tag: "HttpApiDecodeError";
|
|
331
315
|
} | {
|
|
332
316
|
readonly message: string;
|
|
333
317
|
readonly _tag: "BadRequest";
|
|
334
|
-
} |
|
|
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";
|
|
318
|
+
} | {
|
|
340
319
|
readonly organizationId: string;
|
|
341
320
|
readonly blockedUntil?: string | null | undefined;
|
|
342
|
-
|
|
321
|
+
readonly _tag: "AccessBlocked";
|
|
322
|
+
} | {
|
|
323
|
+
readonly url: string;
|
|
324
|
+
readonly blockedType?: string | undefined;
|
|
325
|
+
readonly _tag: "FetchBlocked";
|
|
326
|
+
} | {
|
|
327
|
+
readonly _tag: "PayloadTooLarge";
|
|
328
|
+
} | import("@effect/platform/HttpClientError").HttpClientError, never>;
|
|
343
329
|
/** 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";
|
|
330
|
+
export declare const fetchSnapshotSearch: (httpClient: HttpClient.HttpClient, options: typeof Generated.FetchFetchSearchRequest.Encoded) => Effect.Effect<FetchSnapshotSearchResultWithJson, Generated.AuthFailed | Generated.FetchSnapshotSearchNotFound | Generated.InternalError | import("effect/ParseResult").ParseError | Generated.ServiceUnavailable | Generated.TooManyRequests | {
|
|
347
331
|
readonly issues: readonly {
|
|
348
|
-
readonly
|
|
349
|
-
readonly _tag: "Type" | "Pointer" | "Unexpected" | "Missing" | "Composite" | "Refinement" | "Transformation" | "Forbidden";
|
|
332
|
+
readonly _tag: "Composite" | "Forbidden" | "Missing" | "Pointer" | "Refinement" | "Transformation" | "Type" | "Unexpected";
|
|
350
333
|
readonly path: readonly (string | number | {
|
|
351
334
|
readonly _tag: "symbol";
|
|
352
335
|
readonly key: string;
|
|
353
336
|
})[];
|
|
337
|
+
readonly message: string;
|
|
354
338
|
}[];
|
|
339
|
+
readonly message: string;
|
|
340
|
+
readonly _tag: "HttpApiDecodeError";
|
|
355
341
|
} | {
|
|
356
342
|
readonly message: string;
|
|
357
343
|
readonly _tag: "BadRequest";
|
|
358
|
-
} |
|
|
359
|
-
readonly _tag: "
|
|
344
|
+
} | {
|
|
345
|
+
readonly _tag: "PayloadTooLarge";
|
|
346
|
+
} | {
|
|
360
347
|
readonly organizationId: string;
|
|
361
348
|
readonly blockedUntil?: string | null | undefined;
|
|
362
|
-
|
|
349
|
+
readonly _tag: "AccessBlocked";
|
|
350
|
+
} | import("@effect/platform/HttpClientError").HttpClientError, never>;
|
|
363
351
|
export {};
|
|
364
352
|
//# sourceMappingURL=FetchJson.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchJson.d.ts","sourceRoot":"","sources":["../../src/FetchJson.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAyC,MAAM,kBAAkB,CAA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