@amigo-ai/platform-sdk 0.4.7 → 0.5.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/dist/index.mjs CHANGED
@@ -1481,6 +1481,23 @@ var DataSourcesResource = class extends WorkspaceScopedResource {
1481
1481
  })
1482
1482
  );
1483
1483
  }
1484
+ /**
1485
+ * Trigger a one-off manual sync of a data source.
1486
+ *
1487
+ * Bypasses the business-hours gate and per-resource cadence counter on
1488
+ * connector-runner. Resolves with `{ status: "started", ... }` once the
1489
+ * request is queued — the poll itself runs asynchronously. Platform-api
1490
+ * returns 409 if the source is already mid-sync (see
1491
+ * `TriggerSyncConflictResponse` for the body shape), 503 if
1492
+ * connector-runner is unreachable.
1493
+ */
1494
+ async triggerSync(dataSourceId2) {
1495
+ return extractData(
1496
+ await this.client.POST("/v1/{workspace_id}/data-sources/{data_source_id}/sync", {
1497
+ params: { path: { workspace_id: this.workspaceId, data_source_id: dataSourceId2 } }
1498
+ })
1499
+ );
1500
+ }
1484
1501
  };
1485
1502
 
1486
1503
  // src/resources/world.ts