@antfly/sdk 0.0.13 → 0.0.14
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/dist/index.cjs +10 -4
- package/dist/index.d.cts +596 -290
- package/dist/index.d.ts +596 -290
- package/dist/index.js +10 -4
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -137,7 +137,7 @@ var AntflyClient = class {
|
|
|
137
137
|
Accept: "application/x-ndjson"
|
|
138
138
|
};
|
|
139
139
|
if (authHeader) {
|
|
140
|
-
headers
|
|
140
|
+
headers.Authorization = authHeader;
|
|
141
141
|
}
|
|
142
142
|
Object.assign(headers, config.headers);
|
|
143
143
|
const response = await fetch(`${config.baseUrl}/tables/${tableName}/lookup`, {
|
|
@@ -363,7 +363,7 @@ var AntflyClient = class {
|
|
|
363
363
|
};
|
|
364
364
|
const authHeader = this.getAuthHeader();
|
|
365
365
|
if (authHeader) {
|
|
366
|
-
headers
|
|
366
|
+
headers.Authorization = authHeader;
|
|
367
367
|
}
|
|
368
368
|
return createClient({
|
|
369
369
|
baseUrl: this.config.baseUrl,
|
|
@@ -415,7 +415,8 @@ var AntflyClient = class {
|
|
|
415
415
|
* Private helper for multiquery requests to avoid code duplication
|
|
416
416
|
*/
|
|
417
417
|
async performMultiquery(path, requests, tableName) {
|
|
418
|
-
const ndjson = requests.map((request) => JSON.stringify(request)).join("\n")
|
|
418
|
+
const ndjson = `${requests.map((request) => JSON.stringify(request)).join("\n")}
|
|
419
|
+
`;
|
|
419
420
|
if (path === "/tables/{tableName}/query" && tableName) {
|
|
420
421
|
const { data, error } = await this.client.POST("/tables/{tableName}/query", {
|
|
421
422
|
params: { path: { tableName } },
|
|
@@ -460,7 +461,7 @@ var AntflyClient = class {
|
|
|
460
461
|
};
|
|
461
462
|
const authHeader = this.getAuthHeader();
|
|
462
463
|
if (authHeader) {
|
|
463
|
-
headers
|
|
464
|
+
headers.Authorization = authHeader;
|
|
464
465
|
}
|
|
465
466
|
Object.assign(headers, this.config.headers);
|
|
466
467
|
const abortController = new AbortController();
|
|
@@ -547,6 +548,11 @@ var AntflyClient = class {
|
|
|
547
548
|
callbacks.onStepStarted(JSON.parse(data));
|
|
548
549
|
}
|
|
549
550
|
break;
|
|
551
|
+
case "step_progress":
|
|
552
|
+
if (callbacks.onStepProgress) {
|
|
553
|
+
callbacks.onStepProgress(JSON.parse(data));
|
|
554
|
+
}
|
|
555
|
+
break;
|
|
550
556
|
case "step_completed":
|
|
551
557
|
if (callbacks.onStepCompleted) {
|
|
552
558
|
callbacks.onStepCompleted(JSON.parse(data));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfly/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "TypeScript SDK for Antfly API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"license": "Apache-2.0",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/antflydb/antfly
|
|
36
|
-
"directory": "packages/sdk"
|
|
35
|
+
"url": "git+https://github.com/antflydb/antfly.git",
|
|
36
|
+
"directory": "ts/packages/sdk"
|
|
37
37
|
},
|
|
38
38
|
"bugs": {
|
|
39
|
-
"url": "https://github.com/antflydb/antfly
|
|
39
|
+
"url": "https://github.com/antflydb/antfly/issues"
|
|
40
40
|
},
|
|
41
|
-
"homepage": "https://github.com/antflydb/antfly
|
|
41
|
+
"homepage": "https://github.com/antflydb/antfly/tree/main/ts/packages/sdk#readme",
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^25.3.3",
|
|
44
44
|
"@vitest/ui": "^4.0.18",
|
|
@@ -61,8 +61,7 @@
|
|
|
61
61
|
"test:ui": "vitest --ui",
|
|
62
62
|
"test:coverage": "vitest run --coverage",
|
|
63
63
|
"typecheck": "tsc --noEmit",
|
|
64
|
-
"lint": "biome check . --write",
|
|
65
|
-
"format": "biome format --write .",
|
|
64
|
+
"lint": "biome check . --write --unsafe",
|
|
66
65
|
"generate": "openapi-typescript ../../../openapi.yaml -o ./src/antfly-api.d.ts --default-non-nullable=false && openapi-typescript ../../../bleve-query-openapi.yaml --client fetch -o ./src/bleve-query.d.ts --default-non-nullable=false",
|
|
67
66
|
"clean": "rm -rf dist",
|
|
68
67
|
"example:node": "tsx examples/node-example.ts"
|