@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 CHANGED
@@ -192,7 +192,7 @@ var AntflyClient = class {
192
192
  Accept: "application/x-ndjson"
193
193
  };
194
194
  if (authHeader) {
195
- headers["Authorization"] = authHeader;
195
+ headers.Authorization = authHeader;
196
196
  }
197
197
  Object.assign(headers, config.headers);
198
198
  const response = await fetch(`${config.baseUrl}/tables/${tableName}/lookup`, {
@@ -418,7 +418,7 @@ var AntflyClient = class {
418
418
  };
419
419
  const authHeader = this.getAuthHeader();
420
420
  if (authHeader) {
421
- headers["Authorization"] = authHeader;
421
+ headers.Authorization = authHeader;
422
422
  }
423
423
  return (0, import_openapi_fetch.default)({
424
424
  baseUrl: this.config.baseUrl,
@@ -470,7 +470,8 @@ var AntflyClient = class {
470
470
  * Private helper for multiquery requests to avoid code duplication
471
471
  */
472
472
  async performMultiquery(path, requests, tableName) {
473
- const ndjson = requests.map((request) => JSON.stringify(request)).join("\n") + "\n";
473
+ const ndjson = `${requests.map((request) => JSON.stringify(request)).join("\n")}
474
+ `;
474
475
  if (path === "/tables/{tableName}/query" && tableName) {
475
476
  const { data, error } = await this.client.POST("/tables/{tableName}/query", {
476
477
  params: { path: { tableName } },
@@ -515,7 +516,7 @@ var AntflyClient = class {
515
516
  };
516
517
  const authHeader = this.getAuthHeader();
517
518
  if (authHeader) {
518
- headers["Authorization"] = authHeader;
519
+ headers.Authorization = authHeader;
519
520
  }
520
521
  Object.assign(headers, this.config.headers);
521
522
  const abortController = new AbortController();
@@ -602,6 +603,11 @@ var AntflyClient = class {
602
603
  callbacks.onStepStarted(JSON.parse(data));
603
604
  }
604
605
  break;
606
+ case "step_progress":
607
+ if (callbacks.onStepProgress) {
608
+ callbacks.onStepProgress(JSON.parse(data));
609
+ }
610
+ break;
605
611
  case "step_completed":
606
612
  if (callbacks.onStepCompleted) {
607
613
  callbacks.onStepCompleted(JSON.parse(data));