@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/api.md CHANGED
@@ -180,6 +180,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
180
180
  - `delete`
181
181
  - `getStatus`
182
182
  - `getSyncHistory`
183
+ - `triggerSync`
183
184
 
184
185
  ### `world`
185
186
 
package/dist/index.cjs CHANGED
@@ -1561,6 +1561,23 @@ var DataSourcesResource = class extends WorkspaceScopedResource {
1561
1561
  })
1562
1562
  );
1563
1563
  }
1564
+ /**
1565
+ * Trigger a one-off manual sync of a data source.
1566
+ *
1567
+ * Bypasses the business-hours gate and per-resource cadence counter on
1568
+ * connector-runner. Resolves with `{ status: "started", ... }` once the
1569
+ * request is queued — the poll itself runs asynchronously. Platform-api
1570
+ * returns 409 if the source is already mid-sync (see
1571
+ * `TriggerSyncConflictResponse` for the body shape), 503 if
1572
+ * connector-runner is unreachable.
1573
+ */
1574
+ async triggerSync(dataSourceId2) {
1575
+ return extractData(
1576
+ await this.client.POST("/v1/{workspace_id}/data-sources/{data_source_id}/sync", {
1577
+ params: { path: { workspace_id: this.workspaceId, data_source_id: dataSourceId2 } }
1578
+ })
1579
+ );
1580
+ }
1564
1581
  };
1565
1582
 
1566
1583
  // src/resources/world.ts