@ideascol/agents-generator-sdk 0.6.1 → 0.7.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.
Files changed (32) hide show
  1. package/dist/bin/cli.js +603 -13
  2. package/dist/index.js +608 -14
  3. package/dist/lib/clients/agents-generator/index.d.ts +19 -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/PublishAgentResponse.d.ts +7 -0
  17. package/dist/lib/clients/agents-generator/models/TokenUsageLogResponse.d.ts +19 -0
  18. package/dist/lib/clients/agents-generator/models/UserBreakdown.d.ts +10 -0
  19. package/dist/lib/clients/agents-generator/models/UserTokenUsageSummary.d.ts +11 -0
  20. package/dist/lib/clients/agents-generator/models/WorkspaceTokenUsageSummary.d.ts +13 -0
  21. package/dist/lib/clients/agents-generator/services/AdminAgentFoldersService.d.ts +64 -0
  22. package/dist/lib/clients/agents-generator/services/AdminAgentsService.d.ts +30 -0
  23. package/dist/lib/clients/agents-generator/services/AdminTokenUsageService.d.ts +92 -0
  24. package/dist/lib/clients/agents-generator/services/AdminWorkspacesService.d.ts +3 -3
  25. package/dist/lib/clients/agents-generator/services/AgentFoldersService.d.ts +64 -0
  26. package/dist/lib/clients/agents-generator/services/AgentService.d.ts +30 -0
  27. package/dist/lib/clients/agents-generator/services/ConversationsService.d.ts +2 -1
  28. package/dist/lib/clients/agents-generator/services/PublicConversationsService.d.ts +2 -1
  29. package/dist/lib/clients/agents-generator/services/TokenUsageService.d.ts +92 -0
  30. package/dist/lib/clients/agents-generator/services/WorkspaceCollaboratorsService.d.ts +3 -3
  31. package/dist/lib/index.d.ts +2 -1
  32. package/package.json +1 -1
@@ -21,9 +21,10 @@ 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>;
29
30
  }
@@ -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
+ }
@@ -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.1",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "bun test",