@howone/sdk 0.1.11 → 0.1.12

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.d.mts CHANGED
@@ -205,7 +205,7 @@ declare class AIWorkflowClient {
205
205
  * 按 ID 执行工作流:POST {baseUrl}/workflow/{workflowId}/execute
206
206
  * body: { input, options }
207
207
  */
208
- executeWorkflow(workflowId: string, input: Record<string, unknown>, options?: Record<string, unknown>): Promise<AIWorkflowResponse>;
208
+ executeWorkflow(workflowId: string, inputs: Record<string, unknown>, options?: Record<string, unknown>): Promise<AIWorkflowResponse>;
209
209
  }
210
210
  declare function createAIWorkflowClient(options?: AIWorkflowClientOptions): AIWorkflowClient;
211
211
  declare const aiWorkflow: AIWorkflowClient;
@@ -251,7 +251,7 @@ interface AxiosAIWorkflowOptions {
251
251
  * If `requestInstance` is provided it will be used directly; otherwise a new Request will be created.
252
252
  */
253
253
  declare function createAIWorkflowClientAxios(options?: AxiosAIWorkflowOptions): {
254
- executeWorkflow(workflowId: string, input: Record<string, unknown>, opts?: Record<string, unknown>): Promise<AIWorkflowResponse>;
254
+ executeWorkflow(workflowId: string, inputs: Record<string, unknown>, opts?: Record<string, unknown>): Promise<AIWorkflowResponse>;
255
255
  };
256
256
 
257
257
  type Visibility = 'private' | 'project' | 'public' | 'shared';
package/dist/index.d.ts CHANGED
@@ -205,7 +205,7 @@ declare class AIWorkflowClient {
205
205
  * 按 ID 执行工作流:POST {baseUrl}/workflow/{workflowId}/execute
206
206
  * body: { input, options }
207
207
  */
208
- executeWorkflow(workflowId: string, input: Record<string, unknown>, options?: Record<string, unknown>): Promise<AIWorkflowResponse>;
208
+ executeWorkflow(workflowId: string, inputs: Record<string, unknown>, options?: Record<string, unknown>): Promise<AIWorkflowResponse>;
209
209
  }
210
210
  declare function createAIWorkflowClient(options?: AIWorkflowClientOptions): AIWorkflowClient;
211
211
  declare const aiWorkflow: AIWorkflowClient;
@@ -251,7 +251,7 @@ interface AxiosAIWorkflowOptions {
251
251
  * If `requestInstance` is provided it will be used directly; otherwise a new Request will be created.
252
252
  */
253
253
  declare function createAIWorkflowClientAxios(options?: AxiosAIWorkflowOptions): {
254
- executeWorkflow(workflowId: string, input: Record<string, unknown>, opts?: Record<string, unknown>): Promise<AIWorkflowResponse>;
254
+ executeWorkflow(workflowId: string, inputs: Record<string, unknown>, opts?: Record<string, unknown>): Promise<AIWorkflowResponse>;
255
255
  };
256
256
 
257
257
  type Visibility = 'private' | 'project' | 'public' | 'shared';
package/dist/index.js CHANGED
@@ -309,7 +309,7 @@ var FloatingButton = ({
309
309
  // src/services/unified-oauth.ts
310
310
  var UnifiedAuthService = class {
311
311
  constructor() {
312
- this.API_BASE_URL = "https://create-x-backend.fly.dev";
312
+ this.API_BASE_URL = "https://create-x-backend-dev.fly.dev";
313
313
  }
314
314
  /**
315
315
  * 初始化 Google 登录流程
@@ -744,16 +744,16 @@ var AIWorkflowClient = class {
744
744
  * 按 ID 执行工作流:POST {baseUrl}/workflow/{workflowId}/execute
745
745
  * body: { input, options }
746
746
  */
747
- async executeWorkflow(workflowId, input, options) {
747
+ async executeWorkflow(workflowId, inputs, options) {
748
748
  if (!this.baseUrl) {
749
749
  throw new Error("AI workflow client requires a baseUrl (e.g. https://evoagentx-server.fly.dev)");
750
750
  }
751
- const url = `${this.baseUrl}/workflow/${encodeURIComponent(workflowId)}/execute`;
751
+ const url = `${this.baseUrl}/workflow/${workflowId}/execute`;
752
752
  try {
753
753
  const res = await this.fetchImpl(url, {
754
754
  method: "POST",
755
755
  headers: this.buildHeaders(),
756
- body: JSON.stringify({ input, options })
756
+ body: JSON.stringify({ inputs, options })
757
757
  });
758
758
  const data = await this.safeJson(res);
759
759
  if (!res.ok) {
@@ -897,9 +897,9 @@ function createAIWorkflowClientAxios(options = {}) {
897
897
  }
898
898
  });
899
899
  return {
900
- async executeWorkflow(workflowId, input, opts) {
901
- const url = `${baseUrl}/workflow/${encodeURIComponent(workflowId)}/execute`;
902
- const data = await client.post({ url, data: { input, options: opts } });
900
+ async executeWorkflow(workflowId, inputs, opts) {
901
+ const url = `${baseUrl}/workflow/${workflowId}/execute`;
902
+ const data = await client.post({ url, data: { inputs, options: opts } });
903
903
  return data;
904
904
  }
905
905
  };