@ideascol/agents-generator-sdk 0.6.1 → 0.7.2

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.
Files changed (39) hide show
  1. package/dist/bin/cli.js +861 -78
  2. package/dist/index.js +869 -79
  3. package/dist/lib/clients/agents-generator/index.d.ts +24 -0
  4. package/dist/lib/clients/agents-generator/models/AgentBreakdown.d.ts +10 -0
  5. package/dist/lib/clients/agents-generator/models/AgentDiffResponse.d.ts +7 -0
  6. package/dist/lib/clients/agents-generator/models/AgentFolderCreate.d.ts +18 -0
  7. package/dist/lib/clients/agents-generator/models/AgentFolderResponse.d.ts +24 -0
  8. package/dist/lib/clients/agents-generator/models/AgentFolderUpdate.d.ts +6 -0
  9. package/dist/lib/clients/agents-generator/models/AgentRequest.d.ts +4 -0
  10. package/dist/lib/clients/agents-generator/models/AgentTokenUsageSummary.d.ts +11 -0
  11. package/dist/lib/clients/agents-generator/models/AssignAgentRequest.d.ts +3 -0
  12. package/dist/lib/clients/agents-generator/models/ConversationTokenUsageSummary.d.ts +9 -0
  13. package/dist/lib/clients/agents-generator/models/DiscardDraftResponse.d.ts +6 -0
  14. package/dist/lib/clients/agents-generator/models/GetAgentResponse.d.ts +4 -0
  15. package/dist/lib/clients/agents-generator/models/ModelBreakdown.d.ts +11 -0
  16. package/dist/lib/clients/agents-generator/models/NodeData.d.ts +4 -0
  17. package/dist/lib/clients/agents-generator/models/PublishAgentResponse.d.ts +7 -0
  18. package/dist/lib/clients/agents-generator/models/TokenUsageLogResponse.d.ts +19 -0
  19. package/dist/lib/clients/agents-generator/models/UserBreakdown.d.ts +10 -0
  20. package/dist/lib/clients/agents-generator/models/UserTokenUsageSummary.d.ts +11 -0
  21. package/dist/lib/clients/agents-generator/models/WebhookConfigCreate.d.ts +5 -0
  22. package/dist/lib/clients/agents-generator/models/WebhookConfigUpdate.d.ts +5 -0
  23. package/dist/lib/clients/agents-generator/models/WorkspaceTokenUsageSummary.d.ts +13 -0
  24. package/dist/lib/clients/agents-generator/services/AdminAgentFoldersService.d.ts +64 -0
  25. package/dist/lib/clients/agents-generator/services/AdminAgentsService.d.ts +30 -0
  26. package/dist/lib/clients/agents-generator/services/AdminConversationsService.d.ts +9 -0
  27. package/dist/lib/clients/agents-generator/services/AdminTokenUsageService.d.ts +92 -0
  28. package/dist/lib/clients/agents-generator/services/AdminWebhookConfigsService.d.ts +31 -0
  29. package/dist/lib/clients/agents-generator/services/AdminWorkspacesService.d.ts +3 -3
  30. package/dist/lib/clients/agents-generator/services/AgentFoldersService.d.ts +64 -0
  31. package/dist/lib/clients/agents-generator/services/AgentService.d.ts +30 -0
  32. package/dist/lib/clients/agents-generator/services/ConversationsService.d.ts +11 -1
  33. package/dist/lib/clients/agents-generator/services/PublicConversationsService.d.ts +11 -1
  34. package/dist/lib/clients/agents-generator/services/TokenUsageService.d.ts +92 -0
  35. package/dist/lib/clients/agents-generator/services/WebhookConfigsService.d.ts +57 -0
  36. package/dist/lib/clients/agents-generator/services/WebhooksService.d.ts +13 -0
  37. package/dist/lib/clients/agents-generator/services/WorkspaceCollaboratorsService.d.ts +3 -3
  38. package/dist/lib/index.d.ts +2 -1
  39. package/package.json +1 -1
@@ -0,0 +1,64 @@
1
+ import type { AgentFolderCreate } from '../models/AgentFolderCreate';
2
+ import type { AgentFolderResponse } from '../models/AgentFolderResponse';
3
+ import type { AgentFolderUpdate } from '../models/AgentFolderUpdate';
4
+ import type { AssignAgentRequest } from '../models/AssignAgentRequest';
5
+ import type { CancelablePromise } from '../core/CancelablePromise';
6
+ export declare class AgentFoldersService {
7
+ /**
8
+ * Create Agent Folder
9
+ * Create a new agent folder
10
+ * @param requestBody
11
+ * @param workspaceId
12
+ * @returns AgentFolderResponse Successful Response
13
+ * @throws ApiError
14
+ */
15
+ static createAgentFolder(requestBody: AgentFolderCreate, workspaceId?: (string | null)): CancelablePromise<AgentFolderResponse>;
16
+ /**
17
+ * Get Agent Folders
18
+ * Get all agent folders with agent counts
19
+ * @param skip
20
+ * @param limit
21
+ * @param workspaceId
22
+ * @returns AgentFolderResponse Successful Response
23
+ * @throws ApiError
24
+ */
25
+ static getAgentFolders(skip?: number, limit?: number, workspaceId?: (string | null)): CancelablePromise<Array<AgentFolderResponse>>;
26
+ /**
27
+ * Get Agent Folder
28
+ * Get a specific agent folder by ID
29
+ * @param folderId
30
+ * @param workspaceId
31
+ * @returns AgentFolderResponse Successful Response
32
+ * @throws ApiError
33
+ */
34
+ static getAgentFolder(folderId: string, workspaceId?: (string | null)): CancelablePromise<AgentFolderResponse>;
35
+ /**
36
+ * Update Agent Folder
37
+ * Update an agent folder
38
+ * @param folderId
39
+ * @param requestBody
40
+ * @param workspaceId
41
+ * @returns AgentFolderResponse Successful Response
42
+ * @throws ApiError
43
+ */
44
+ static updateAgentFolder(folderId: string, requestBody: AgentFolderUpdate, workspaceId?: (string | null)): CancelablePromise<AgentFolderResponse>;
45
+ /**
46
+ * Delete Agent Folder
47
+ * Delete an agent folder (agents will be unassigned, not deleted)
48
+ * @param folderId
49
+ * @param workspaceId
50
+ * @returns any Successful Response
51
+ * @throws ApiError
52
+ */
53
+ static deleteAgentFolder(folderId: string, workspaceId?: (string | null)): CancelablePromise<Record<string, any>>;
54
+ /**
55
+ * Assign Agent To Folder
56
+ * Assign an agent to a folder or remove from folder (set folder_id to null)
57
+ * @param agentId
58
+ * @param requestBody
59
+ * @param workspaceId
60
+ * @returns any Successful Response
61
+ * @throws ApiError
62
+ */
63
+ static assignAgentToFolder(agentId: string, requestBody: AssignAgentRequest, workspaceId?: (string | null)): CancelablePromise<Record<string, any>>;
64
+ }
@@ -1,9 +1,12 @@
1
+ import type { AgentDiffResponse } from '../models/AgentDiffResponse';
1
2
  import type { AgentInitResponse } from '../models/AgentInitResponse';
2
3
  import type { AgentQueryRequest } from '../models/AgentQueryRequest';
3
4
  import type { AgentQueryResponse } from '../models/AgentQueryResponse';
4
5
  import type { AgentRequest } from '../models/AgentRequest';
5
6
  import type { CreateAgentResponse } from '../models/CreateAgentResponse';
7
+ import type { DiscardDraftResponse } from '../models/DiscardDraftResponse';
6
8
  import type { GetAgentResponse } from '../models/GetAgentResponse';
9
+ import type { PublishAgentResponse } from '../models/PublishAgentResponse';
7
10
  import type { CancelablePromise } from '../core/CancelablePromise';
8
11
  export declare class AgentService {
9
12
  /**
@@ -48,6 +51,33 @@ export declare class AgentService {
48
51
  * @throws ApiError
49
52
  */
50
53
  static deleteAgent(agentId: string, workspaceId?: (string | null)): CancelablePromise<Record<string, any>>;
54
+ /**
55
+ * Publish Agent
56
+ * Publish the current draft as the live version.
57
+ * @param agentId
58
+ * @param workspaceId
59
+ * @returns PublishAgentResponse Successful Response
60
+ * @throws ApiError
61
+ */
62
+ static publishAgent(agentId: string, workspaceId?: (string | null)): CancelablePromise<PublishAgentResponse>;
63
+ /**
64
+ * Discard Draft
65
+ * Discard draft changes and revert to the last published version.
66
+ * @param agentId
67
+ * @param workspaceId
68
+ * @returns DiscardDraftResponse Successful Response
69
+ * @throws ApiError
70
+ */
71
+ static discardDraft(agentId: string, workspaceId?: (string | null)): CancelablePromise<DiscardDraftResponse>;
72
+ /**
73
+ * Get Agent Diff
74
+ * Get a diff between the current draft and the last published version.
75
+ * @param agentId
76
+ * @param workspaceId
77
+ * @returns AgentDiffResponse Successful Response
78
+ * @throws ApiError
79
+ */
80
+ static getAgentDiff(agentId: string, workspaceId?: (string | null)): CancelablePromise<AgentDiffResponse>;
51
81
  /**
52
82
  * Get Workspace Conversations Total
53
83
  * Get the total count of conversations for all agents in a workspace.
@@ -46,9 +46,19 @@ export declare class ConversationsService {
46
46
  * Add Message
47
47
  * @param conversationId
48
48
  * @param requestBody
49
+ * @param useDraft Use draft (unpublished) agent data. Set to true for studio test chat.
49
50
  * @param accept Content type to receive: 'text/event-stream' for streaming or 'text/plain' for plain text
50
51
  * @returns any Successful response
51
52
  * @throws ApiError
52
53
  */
53
- static addMessage(conversationId: string, requestBody: MessageCreate, accept?: (string | null)): CancelablePromise<any>;
54
+ static addMessage(conversationId: string, requestBody: MessageCreate, useDraft?: boolean, accept?: (string | null)): CancelablePromise<any>;
55
+ /**
56
+ * Get Research Status
57
+ * Get the status of any pending deep research request for a conversation.
58
+ * Used by the frontend to poll for completion while waiting for webhook delivery.
59
+ * @param conversationId
60
+ * @returns any Successful Response
61
+ * @throws ApiError
62
+ */
63
+ static getResearchStatus(conversationId: string): CancelablePromise<Record<string, any>>;
54
64
  }
@@ -21,9 +21,19 @@ export declare class PublicConversationsService {
21
21
  * Add Message
22
22
  * @param conversationId
23
23
  * @param requestBody
24
+ * @param useDraft Use draft (unpublished) agent data. Set to true for studio test chat.
24
25
  * @param accept Content type to receive: 'text/event-stream' for streaming or 'text/plain' for plain text
25
26
  * @returns any Successful response
26
27
  * @throws ApiError
27
28
  */
28
- static addMessage(conversationId: string, requestBody: MessageCreate, accept?: (string | null)): CancelablePromise<any>;
29
+ static addMessage(conversationId: string, requestBody: MessageCreate, useDraft?: boolean, accept?: (string | null)): CancelablePromise<any>;
30
+ /**
31
+ * Get Research Status
32
+ * Get the status of any pending deep research request for a conversation.
33
+ * Used by the frontend to poll for completion while waiting for webhook delivery.
34
+ * @param conversationId
35
+ * @returns any Successful Response
36
+ * @throws ApiError
37
+ */
38
+ static getResearchStatus(conversationId: string): CancelablePromise<Record<string, any>>;
29
39
  }
@@ -0,0 +1,92 @@
1
+ import type { AgentTokenUsageSummary } from '../models/AgentTokenUsageSummary';
2
+ import type { ConversationTokenUsageSummary } from '../models/ConversationTokenUsageSummary';
3
+ import type { TokenUsageLogResponse } from '../models/TokenUsageLogResponse';
4
+ import type { UserTokenUsageSummary } from '../models/UserTokenUsageSummary';
5
+ import type { WorkspaceTokenUsageSummary } from '../models/WorkspaceTokenUsageSummary';
6
+ import type { CancelablePromise } from '../core/CancelablePromise';
7
+ export declare class TokenUsageService {
8
+ /**
9
+ * Get Agent Token Usage
10
+ * Get token usage logs for a specific agent
11
+ * @param agentId
12
+ * @param startDate Filter from date (ISO format)
13
+ * @param endDate Filter to date (ISO format)
14
+ * @param skip
15
+ * @param limit
16
+ * @returns TokenUsageLogResponse Successful Response
17
+ * @throws ApiError
18
+ */
19
+ static getAgentTokenUsage(agentId: string, startDate?: (string | null), endDate?: (string | null), skip?: number, limit?: number): CancelablePromise<Array<TokenUsageLogResponse>>;
20
+ /**
21
+ * Get Agent Token Usage Summary
22
+ * Get aggregated token usage summary for a specific agent
23
+ * @param agentId
24
+ * @param startDate Filter from date (ISO format)
25
+ * @param endDate Filter to date (ISO format)
26
+ * @returns AgentTokenUsageSummary Successful Response
27
+ * @throws ApiError
28
+ */
29
+ static getAgentTokenUsageSummary(agentId: string, startDate?: (string | null), endDate?: (string | null)): CancelablePromise<AgentTokenUsageSummary>;
30
+ /**
31
+ * Get Conversation Token Usage
32
+ * Get token usage logs for a specific conversation
33
+ * @param conversationId
34
+ * @param skip
35
+ * @param limit
36
+ * @returns TokenUsageLogResponse Successful Response
37
+ * @throws ApiError
38
+ */
39
+ static getConversationTokenUsage(conversationId: string, skip?: number, limit?: number): CancelablePromise<Array<TokenUsageLogResponse>>;
40
+ /**
41
+ * Get Conversation Token Usage Summary
42
+ * Get aggregated token usage summary for a specific conversation
43
+ * @param conversationId
44
+ * @returns ConversationTokenUsageSummary Successful Response
45
+ * @throws ApiError
46
+ */
47
+ static getConversationTokenUsageSummary(conversationId: string): CancelablePromise<ConversationTokenUsageSummary>;
48
+ /**
49
+ * Get My Token Usage
50
+ * Get token usage logs for the current authenticated user
51
+ * @param workspaceId Filter by workspace
52
+ * @param startDate Filter from date (ISO format)
53
+ * @param endDate Filter to date (ISO format)
54
+ * @param skip
55
+ * @param limit
56
+ * @returns TokenUsageLogResponse Successful Response
57
+ * @throws ApiError
58
+ */
59
+ static getMyTokenUsage(workspaceId?: (string | null), startDate?: (string | null), endDate?: (string | null), skip?: number, limit?: number): CancelablePromise<Array<TokenUsageLogResponse>>;
60
+ /**
61
+ * Get My Token Usage Summary
62
+ * Get aggregated token usage summary for the current authenticated user
63
+ * @param workspaceId Filter by workspace
64
+ * @param startDate Filter from date (ISO format)
65
+ * @param endDate Filter to date (ISO format)
66
+ * @returns UserTokenUsageSummary Successful Response
67
+ * @throws ApiError
68
+ */
69
+ static getMyTokenUsageSummary(workspaceId?: (string | null), startDate?: (string | null), endDate?: (string | null)): CancelablePromise<UserTokenUsageSummary>;
70
+ /**
71
+ * Get Workspace Token Usage
72
+ * Get token usage logs for a specific workspace
73
+ * @param workspaceId
74
+ * @param startDate Filter from date (ISO format)
75
+ * @param endDate Filter to date (ISO format)
76
+ * @param skip
77
+ * @param limit
78
+ * @returns TokenUsageLogResponse Successful Response
79
+ * @throws ApiError
80
+ */
81
+ static getWorkspaceTokenUsage(workspaceId: string, startDate?: (string | null), endDate?: (string | null), skip?: number, limit?: number): CancelablePromise<Array<TokenUsageLogResponse>>;
82
+ /**
83
+ * Get Workspace Token Usage Summary
84
+ * Get aggregated token usage summary for a specific workspace
85
+ * @param workspaceId
86
+ * @param startDate Filter from date (ISO format)
87
+ * @param endDate Filter to date (ISO format)
88
+ * @returns WorkspaceTokenUsageSummary Successful Response
89
+ * @throws ApiError
90
+ */
91
+ static getWorkspaceTokenUsageSummary(workspaceId: string, startDate?: (string | null), endDate?: (string | null)): CancelablePromise<WorkspaceTokenUsageSummary>;
92
+ }
@@ -0,0 +1,57 @@
1
+ import type { WebhookConfigCreate } from '../models/WebhookConfigCreate';
2
+ import type { WebhookConfigUpdate } from '../models/WebhookConfigUpdate';
3
+ import type { CancelablePromise } from '../core/CancelablePromise';
4
+ export declare class WebhookConfigsService {
5
+ /**
6
+ * Create Webhook Config
7
+ * Create a new webhook configuration - only admin and owner roles can create
8
+ * @param requestBody
9
+ * @param workspaceId
10
+ * @returns any Successful Response
11
+ * @throws ApiError
12
+ */
13
+ static createWebhookConfig(requestBody: WebhookConfigCreate, workspaceId?: (string | null)): CancelablePromise<Record<string, any>>;
14
+ /**
15
+ * List Webhook Configs
16
+ * List all webhook configurations for a workspace
17
+ * @param workspaceId
18
+ * @returns any Successful Response
19
+ * @throws ApiError
20
+ */
21
+ static listWebhookConfigs(workspaceId?: (string | null)): CancelablePromise<Record<string, any>>;
22
+ /**
23
+ * List Webhook Events
24
+ * List webhook event logs for a workspace
25
+ * @param workspaceId
26
+ * @param limit
27
+ * @param offset
28
+ * @returns any Successful Response
29
+ * @throws ApiError
30
+ */
31
+ static listWebhookEvents(workspaceId?: (string | null), limit?: number, offset?: number): CancelablePromise<Record<string, any>>;
32
+ /**
33
+ * Get Webhook Config
34
+ * Get a specific webhook configuration
35
+ * @param configId
36
+ * @returns any Successful Response
37
+ * @throws ApiError
38
+ */
39
+ static getWebhookConfig(configId: string): CancelablePromise<Record<string, any>>;
40
+ /**
41
+ * Update Webhook Config
42
+ * Update a webhook configuration - only admin and owner roles can update
43
+ * @param configId
44
+ * @param requestBody
45
+ * @returns any Successful Response
46
+ * @throws ApiError
47
+ */
48
+ static updateWebhookConfig(configId: string, requestBody: WebhookConfigUpdate): CancelablePromise<Record<string, any>>;
49
+ /**
50
+ * Delete Webhook Config
51
+ * Delete a webhook configuration - only admin and owner roles can delete
52
+ * @param configId
53
+ * @returns any Successful Response
54
+ * @throws ApiError
55
+ */
56
+ static deleteWebhookConfig(configId: string): CancelablePromise<Record<string, any>>;
57
+ }
@@ -0,0 +1,13 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class WebhooksService {
3
+ /**
4
+ * Receive Openai Webhook
5
+ * Receive webhook events from OpenAI.
6
+ * This endpoint is called by OpenAI when events like response.completed occur.
7
+ * It verifies the webhook signature and processes the event.
8
+ * @param workspaceId
9
+ * @returns any Successful Response
10
+ * @throws ApiError
11
+ */
12
+ static receiveOpenaiWebhookWebhooksOpenaiWorkspaceIdPost(workspaceId: string): CancelablePromise<any>;
13
+ }
@@ -6,7 +6,7 @@ export declare class WorkspaceCollaboratorsService {
6
6
  /**
7
7
  * Add Collaborator
8
8
  * Add a collaborator to a workspace.
9
- * Only workspace owners can add collaborators.
9
+ * Only workspace owners and admins can add collaborators.
10
10
  * @param workspaceId ID of the workspace to add the collaborator to
11
11
  * @param requestBody
12
12
  * @returns WorkspaceCollaboratorResponse Successful Response
@@ -34,7 +34,7 @@ export declare class WorkspaceCollaboratorsService {
34
34
  /**
35
35
  * Update Collaborator
36
36
  * Update a collaborator's role.
37
- * Only workspace owners can update collaborators.
37
+ * Only workspace owners and admins can update collaborators.
38
38
  * @param workspaceId
39
39
  * @param collaboratorId
40
40
  * @param requestBody
@@ -45,7 +45,7 @@ export declare class WorkspaceCollaboratorsService {
45
45
  /**
46
46
  * Delete Collaborator
47
47
  * Remove a collaborator from a workspace.
48
- * Only workspace owners can remove collaborators.
48
+ * Only workspace owners and admins can remove collaborators.
49
49
  * @param workspaceId
50
50
  * @param collaboratorId
51
51
  * @returns any Successful Response
@@ -1,4 +1,4 @@
1
- import { ApiError, CancelablePromise, CancelError, ConversationsService, MessageCreate, OpenAPI, AgentService, McpServersService, RootService, FileLibraryService, CredentialsService, AdminAgentsService, PublicAgentsService, PublicConversationsService, AdminConversationsService, AdminCredentialsService, AdminFileLibraryService, AdminMcpServersService, AdminWorkspacesService, WorkspaceCollaboratorsService, AdminApiKeysService, PresenceService, ModelsService, SchemaGeneratorService } from "./clients/agents-generator";
1
+ import { ApiError, CancelablePromise, CancelError, ConversationsService, MessageCreate, OpenAPI, AgentService, McpServersService, RootService, FileLibraryService, CredentialsService, AdminAgentsService, PublicAgentsService, PublicConversationsService, AdminConversationsService, AdminCredentialsService, AdminFileLibraryService, AdminMcpServersService, AdminWorkspacesService, WorkspaceCollaboratorsService, AdminApiKeysService, PresenceService, ModelsService, SchemaGeneratorService, TokenUsageService } from "./clients/agents-generator";
2
2
  export * from "./clients/agents-generator";
3
3
  export interface StreamEvent {
4
4
  type: string;
@@ -56,6 +56,7 @@ export declare class AgentClient {
56
56
  apiKeys: typeof AdminApiKeysService;
57
57
  presence: typeof PresenceService;
58
58
  schema: typeof SchemaGeneratorService;
59
+ tokenUsage: typeof TokenUsageService;
59
60
  };
60
61
  public: {
61
62
  agents: typeof PublicAgentsService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ideascol/agents-generator-sdk",
3
- "version": "0.6.1",
3
+ "version": "0.7.2",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "bun test",