@vertesia/client 1.1.0 → 1.1.1-dev.20260505.160410Z

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 (129) hide show
  1. package/lib/cjs/AccountApi.js +3 -3
  2. package/lib/cjs/AccountApi.js.map +1 -1
  3. package/lib/cjs/ApiKeysApi.js +8 -10
  4. package/lib/cjs/ApiKeysApi.js.map +1 -1
  5. package/lib/cjs/AppsApi.js +3 -1
  6. package/lib/cjs/AppsApi.js.map +1 -1
  7. package/lib/cjs/EnvironmentsApi.js.map +1 -1
  8. package/lib/cjs/GroupsApi.js.map +1 -1
  9. package/lib/cjs/InteractionsApi.js +5 -7
  10. package/lib/cjs/InteractionsApi.js.map +1 -1
  11. package/lib/cjs/OAuthClientsApi.js.map +1 -1
  12. package/lib/cjs/OAuthProvidersApi.js.map +1 -1
  13. package/lib/cjs/ProjectsApi.js +10 -1
  14. package/lib/cjs/ProjectsApi.js.map +1 -1
  15. package/lib/cjs/execute.js.map +1 -1
  16. package/lib/cjs/index.js.map +1 -1
  17. package/lib/cjs/store/CollectionsApi.js.map +1 -1
  18. package/lib/cjs/store/CostApi.js +7 -1
  19. package/lib/cjs/store/CostApi.js.map +1 -1
  20. package/lib/cjs/store/DashboardApi.js.map +1 -1
  21. package/lib/cjs/store/DataApi.js +3 -0
  22. package/lib/cjs/store/DataApi.js.map +1 -1
  23. package/lib/cjs/store/FilesApi.js +4 -2
  24. package/lib/cjs/store/FilesApi.js.map +1 -1
  25. package/lib/cjs/store/IndexingApi.js.map +1 -1
  26. package/lib/cjs/store/ObjectsApi.js.map +1 -1
  27. package/lib/cjs/store/WorkflowsApi.js +29 -5
  28. package/lib/cjs/store/WorkflowsApi.js.map +1 -1
  29. package/lib/esm/AccountApi.js +3 -3
  30. package/lib/esm/AccountApi.js.map +1 -1
  31. package/lib/esm/ApiKeysApi.js +9 -11
  32. package/lib/esm/ApiKeysApi.js.map +1 -1
  33. package/lib/esm/AppsApi.js +3 -1
  34. package/lib/esm/AppsApi.js.map +1 -1
  35. package/lib/esm/EnvironmentsApi.js.map +1 -1
  36. package/lib/esm/GroupsApi.js.map +1 -1
  37. package/lib/esm/InteractionsApi.js +6 -8
  38. package/lib/esm/InteractionsApi.js.map +1 -1
  39. package/lib/esm/OAuthClientsApi.js.map +1 -1
  40. package/lib/esm/OAuthProvidersApi.js.map +1 -1
  41. package/lib/esm/ProjectsApi.js +10 -1
  42. package/lib/esm/ProjectsApi.js.map +1 -1
  43. package/lib/esm/execute.js.map +1 -1
  44. package/lib/esm/index.js.map +1 -1
  45. package/lib/esm/store/CollectionsApi.js.map +1 -1
  46. package/lib/esm/store/CostApi.js +7 -1
  47. package/lib/esm/store/CostApi.js.map +1 -1
  48. package/lib/esm/store/DashboardApi.js.map +1 -1
  49. package/lib/esm/store/DataApi.js +3 -0
  50. package/lib/esm/store/DataApi.js.map +1 -1
  51. package/lib/esm/store/FilesApi.js +4 -2
  52. package/lib/esm/store/FilesApi.js.map +1 -1
  53. package/lib/esm/store/IndexingApi.js.map +1 -1
  54. package/lib/esm/store/ObjectsApi.js.map +1 -1
  55. package/lib/esm/store/WorkflowsApi.js +29 -5
  56. package/lib/esm/store/WorkflowsApi.js.map +1 -1
  57. package/lib/tsconfig.tsbuildinfo +1 -1
  58. package/lib/types/AccountApi.d.ts +6 -9
  59. package/lib/types/AccountApi.d.ts.map +1 -1
  60. package/lib/types/ApiKeysApi.d.ts +6 -3
  61. package/lib/types/ApiKeysApi.d.ts.map +1 -1
  62. package/lib/types/AppsApi.d.ts +3 -6
  63. package/lib/types/AppsApi.d.ts.map +1 -1
  64. package/lib/types/EnvironmentsApi.d.ts +1 -1
  65. package/lib/types/EnvironmentsApi.d.ts.map +1 -1
  66. package/lib/types/GroupsApi.d.ts +4 -6
  67. package/lib/types/GroupsApi.d.ts.map +1 -1
  68. package/lib/types/IamApi.d.ts +3 -8
  69. package/lib/types/IamApi.d.ts.map +1 -1
  70. package/lib/types/InteractionsApi.d.ts +8 -26
  71. package/lib/types/InteractionsApi.d.ts.map +1 -1
  72. package/lib/types/OAuthClientsApi.d.ts +2 -4
  73. package/lib/types/OAuthClientsApi.d.ts.map +1 -1
  74. package/lib/types/OAuthProvidersApi.d.ts +5 -11
  75. package/lib/types/OAuthProvidersApi.d.ts.map +1 -1
  76. package/lib/types/ProjectsApi.d.ts +4 -1
  77. package/lib/types/ProjectsApi.d.ts.map +1 -1
  78. package/lib/types/RunsApi.d.ts +1 -3
  79. package/lib/types/RunsApi.d.ts.map +1 -1
  80. package/lib/types/UsersApi.d.ts +2 -4
  81. package/lib/types/UsersApi.d.ts.map +1 -1
  82. package/lib/types/execute.d.ts +1 -2
  83. package/lib/types/execute.d.ts.map +1 -1
  84. package/lib/types/index.d.ts +5 -2
  85. package/lib/types/index.d.ts.map +1 -1
  86. package/lib/types/store/CollectionsApi.d.ts +4 -5
  87. package/lib/types/store/CollectionsApi.d.ts.map +1 -1
  88. package/lib/types/store/CostApi.d.ts +3 -6
  89. package/lib/types/store/CostApi.d.ts.map +1 -1
  90. package/lib/types/store/DashboardApi.d.ts +5 -16
  91. package/lib/types/store/DashboardApi.d.ts.map +1 -1
  92. package/lib/types/store/DataApi.d.ts +5 -41
  93. package/lib/types/store/DataApi.d.ts.map +1 -1
  94. package/lib/types/store/FilesApi.d.ts +6 -17
  95. package/lib/types/store/FilesApi.d.ts.map +1 -1
  96. package/lib/types/store/IndexingApi.d.ts +2 -8
  97. package/lib/types/store/IndexingApi.d.ts.map +1 -1
  98. package/lib/types/store/ObjectsApi.d.ts +7 -36
  99. package/lib/types/store/ObjectsApi.d.ts.map +1 -1
  100. package/lib/types/store/WorkflowsApi.d.ts +9 -18
  101. package/lib/types/store/WorkflowsApi.d.ts.map +1 -1
  102. package/lib/types/store/client.d.ts +2 -2
  103. package/lib/types/store/client.d.ts.map +1 -1
  104. package/lib/vertesia-client.js +1 -1
  105. package/lib/vertesia-client.js.map +1 -1
  106. package/package.json +5 -5
  107. package/src/AccountApi.ts +22 -7
  108. package/src/ApiKeysApi.ts +15 -9
  109. package/src/AppsApi.ts +21 -8
  110. package/src/EnvironmentsApi.ts +1 -1
  111. package/src/GroupsApi.ts +4 -4
  112. package/src/IamApi.ts +4 -4
  113. package/src/InteractionsApi.ts +11 -25
  114. package/src/OAuthClientsApi.ts +2 -1
  115. package/src/OAuthProvidersApi.ts +6 -4
  116. package/src/ProjectsApi.ts +14 -2
  117. package/src/RunsApi.ts +1 -1
  118. package/src/UsersApi.ts +2 -2
  119. package/src/execute.ts +2 -3
  120. package/src/index.ts +6 -2
  121. package/src/store/CollectionsApi.ts +16 -5
  122. package/src/store/CostApi.ts +15 -4
  123. package/src/store/DashboardApi.ts +8 -4
  124. package/src/store/DataApi.ts +13 -38
  125. package/src/store/FilesApi.ts +14 -13
  126. package/src/store/IndexingApi.ts +2 -7
  127. package/src/store/ObjectsApi.ts +13 -25
  128. package/src/store/WorkflowsApi.ts +48 -12
  129. package/src/store/client.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/client",
3
- "version": "1.1.0",
3
+ "version": "1.1.1-dev.20260505.160410Z",
4
4
  "type": "module",
5
5
  "types": "./lib/types/index.d.ts",
6
6
  "files": [
@@ -15,7 +15,7 @@
15
15
  "@rollup/plugin-node-resolve": "^16.0.1",
16
16
  "@rollup/plugin-terser": "^0.4.4",
17
17
  "@rollup/plugin-typescript": "^12.1.2",
18
- "@types/node": "^25.6.0",
18
+ "@types/node": "^24.1.0",
19
19
  "eslint": "^10.0.2",
20
20
  "rollup": "^4.59.0",
21
21
  "ts-dual-module": "^0.6.3",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "eventsource": "^3.0.6",
28
- "@vertesia/api-fetch-client": "1.1.0",
29
- "@vertesia/common": "1.1.0",
30
- "@llumiverse/common": "1.1.0"
28
+ "@vertesia/api-fetch-client": "1.1.1-dev.20260505.160410Z",
29
+ "@vertesia/common": "1.1.1-dev.20260505.160410Z",
30
+ "@llumiverse/common": "1.1.1-dev.20260505.151157Z"
31
31
  },
32
32
  "ts_dual_module": {
33
33
  "outDir": "lib"
package/src/AccountApi.ts CHANGED
@@ -1,5 +1,20 @@
1
1
  import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
2
- import { Account, InviteUserRequestPayload, InviteUserResponsePayload, OnboardingProgress, ProjectRef, StripeBillingStatusResponse, TransientToken, UpdateAccountPayload, User, UserInviteTokenData } from "@vertesia/common";
2
+ import {
3
+ Account,
4
+ AccountProjectsResponse,
5
+ GoogleProjectTokenResponse,
6
+ InviteAcceptanceResponse,
7
+ InviteDeclineResponse,
8
+ InviteUserRequestPayload,
9
+ InviteUserResponsePayload,
10
+ OnboardingProgress,
11
+ ProjectRef,
12
+ StripeBillingStatusResponse,
13
+ TransientToken,
14
+ UpdateAccountPayload,
15
+ User,
16
+ UserInviteTokenData,
17
+ } from "@vertesia/common";
3
18
 
4
19
  export default class AccountApi extends ApiTopic {
5
20
 
@@ -27,7 +42,7 @@ export default class AccountApi extends ApiTopic {
27
42
  * Get all projects for account
28
43
  */
29
44
  projects(): Promise<ProjectRef[]> {
30
- return this.get('/projects').then(res => res.data);
45
+ return this.get('/projects').then((res: AccountProjectsResponse) => res.data);
31
46
  }
32
47
 
33
48
  members(): Promise<User[]> {
@@ -59,17 +74,17 @@ export default class AccountApi extends ApiTopic {
59
74
 
60
75
  /**
61
76
  * Accept Invite for account
62
- * @returns UserInviteTokenData
77
+ * @returns InviteAcceptanceResponse
63
78
  * */
64
- acceptInvite(id: string): Promise<UserInviteTokenData> {
79
+ acceptInvite(id: string): Promise<InviteAcceptanceResponse> {
65
80
  return this.put(`/invites/${id}`);
66
81
  }
67
82
 
68
83
  /**
69
84
  * Delete Invite for account
70
- * @returns UserInviteTokenData
85
+ * @returns InviteDeclineResponse
71
86
  * */
72
- rejectInvite(id: string): Promise<UserInviteTokenData> {
87
+ rejectInvite(id: string): Promise<InviteDeclineResponse> {
73
88
  return this.delete(`/invites/${id}`);
74
89
  }
75
90
 
@@ -85,7 +100,7 @@ export default class AccountApi extends ApiTopic {
85
100
  * This token can be used to access exposed google cloud services
86
101
  * @returns
87
102
  */
88
- getGoogleToken(): Promise<{ principal: string, token: string }> {
103
+ getGoogleToken(): Promise<GoogleProjectTokenResponse> {
89
104
  return this.get('/google-token');
90
105
  }
91
106
 
package/src/ApiKeysApi.ts CHANGED
@@ -1,14 +1,11 @@
1
- import { ApiKey, ApiKeyWithValue, CreateOrUpdateApiKeyPayload, CreatePublicKeyPayload } from "@vertesia/common";
2
- import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
1
+ import { ApiKey, ApiKeyReadResponse, ApiKeyWithValue, AuthTokenResponse, CreateOrUpdateApiKeyPayload, CreatePublicKeyPayload, DeleteOperationResult } from '@vertesia/common';
2
+ import { ApiTopic, ClientBase } from '@vertesia/api-fetch-client';
3
3
 
4
4
  export class ApiKeysApi extends ApiTopic {
5
-
6
-
7
5
  constructor(parent: ClientBase) {
8
- super(parent, "/api/v1/apikeys")
6
+ super(parent, '/api/v1/apikeys');
9
7
  }
10
8
 
11
-
12
9
  /**
13
10
  * List all keys for account without values
14
11
  * @returns ApiKey[]
@@ -41,12 +38,21 @@ export class ApiKeysApi extends ApiTopic {
41
38
  * ALL REQUESTS ARE LOGGED IN SECURITY AUDIT LOG
42
39
  * @returns ApiKeyWithValue
43
40
  * */
44
- retrieve(id: string, withValue: boolean = false): Promise<ApiKey | ApiKeyWithValue> {
41
+ retrieve(id: string, withValue: true): Promise<ApiKeyWithValue>;
42
+ retrieve(id: string, withValue?: false): Promise<ApiKey>;
43
+ retrieve(id: string, withValue: boolean = false): Promise<ApiKeyReadResponse> {
45
44
  if (withValue) {
46
45
  return this.get(`/${id}`, { query: { withValue: true } });
47
- } else {
48
- return this.get(`/${id}`);
49
46
  }
47
+ return this.get(`/${id}`);
48
+ }
49
+
50
+ delete(id: string): Promise<DeleteOperationResult> {
51
+ return this.del(`/${id}`);
52
+ }
53
+
54
+ getToken(id: string): Promise<AuthTokenResponse> {
55
+ return this.get(`/${id}/token`);
50
56
  }
51
57
 
52
58
  /**
package/src/AppsApi.ts CHANGED
@@ -1,9 +1,20 @@
1
1
  import { ApiTopic, ClientBase, ServerError } from "@vertesia/api-fetch-client";
2
- import type { AppInstallation, AppInstallationKind, AppInstallationPayload, AppInstallationWithManifest, AppManifest, AppManifestData, AppToolCollection, ProjectRef, RequireAtLeastOne, ValidateUrlRequest, ValidateUrlResponse } from "@vertesia/common";
3
-
4
- export interface OrphanedAppInstallation extends Omit<AppInstallation, 'manifest'> {
5
- manifest: null,
6
- }
2
+ import type {
3
+ AppInstallation,
4
+ AppInstallationKind,
5
+ AppInstallationListEntry,
6
+ AppInstallationPayload,
7
+ AppInstallationWithManifest,
8
+ AppManifest,
9
+ AppManifestData,
10
+ AppToolCollection,
11
+ CountResult,
12
+ ProjectRef,
13
+ RequireAtLeastOne,
14
+ UpdateAppInstallationToolAllowlistPayload,
15
+ ValidateUrlRequest,
16
+ ValidateUrlResponse,
17
+ } from "@vertesia/common";
7
18
 
8
19
  export default class AppsApi extends ApiTopic {
9
20
 
@@ -61,7 +72,7 @@ export default class AppsApi extends ApiTopic {
61
72
  * @param installationId - the id of the app installation
62
73
  * @returns
63
74
  */
64
- uninstall(installationId: string) {
75
+ uninstall(installationId: string): Promise<CountResult> {
65
76
  return this.del(`/install/${installationId}`);
66
77
  }
67
78
 
@@ -118,7 +129,7 @@ export default class AppsApi extends ApiTopic {
118
129
  * For a user level list of available installations (with user permission check) use getInstalledApps
119
130
  * @returns
120
131
  */
121
- getAllAppInstallations(): Promise<(AppInstallationWithManifest | OrphanedAppInstallation)[]> {
132
+ getAllAppInstallations(): Promise<AppInstallationListEntry[]> {
122
133
  return this.get('/installations/all');
123
134
  }
124
135
 
@@ -143,7 +154,9 @@ export default class AppsApi extends ApiTopic {
143
154
  * Pass null to remove all restrictions (all tools permitted).
144
155
  */
145
156
  updateToolAllowlist(installId: string, tool_allowlist: string[] | null): Promise<AppInstallationWithManifest> {
146
- return this.put(`/installations/${installId}/tool-allowlist`, { payload: { tool_allowlist } });
157
+ return this.put(`/installations/${installId}/tool-allowlist`, {
158
+ payload: { tool_allowlist } satisfies UpdateAppInstallationToolAllowlistPayload,
159
+ });
147
160
  }
148
161
 
149
162
  /**
@@ -1,5 +1,5 @@
1
- import type { AIModel, EmbeddingsOptions, EmbeddingsResult, ModelSearchPayload } from "@llumiverse/common";
2
1
  import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
2
+ import type { AIModel, EmbeddingsOptions, EmbeddingsResult, ModelSearchPayload } from "@llumiverse/common";
3
3
  import {
4
4
  ExecutionEnvironment,
5
5
  ExecutionEnvironmentCreatePayload,
package/src/GroupsApi.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { UserGroup, UserRef } from "@vertesia/common";
1
+ import { CreateUserGroupPayload, DeleteByIdResult, UpdateUserGroupPayload, UserGroup, UserRef } from "@vertesia/common";
2
2
  import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
3
3
 
4
4
  export interface GroupsQueryOptions {
@@ -29,7 +29,7 @@ export class GroupsApi extends ApiTopic {
29
29
  * @param payload The group data to create
30
30
  * @returns The created UserGroup object
31
31
  */
32
- create(payload: Partial<UserGroup>): Promise<UserGroup> {
32
+ create(payload: CreateUserGroupPayload): Promise<UserGroup> {
33
33
  return this.post('/', { payload });
34
34
  }
35
35
 
@@ -48,7 +48,7 @@ export class GroupsApi extends ApiTopic {
48
48
  * @param payload The group data to update
49
49
  * @returns The updated UserGroup object
50
50
  */
51
- update(groupId: string, payload: Partial<UserGroup>): Promise<UserGroup> {
51
+ update(groupId: string, payload: UpdateUserGroupPayload): Promise<UserGroup> {
52
52
  return this.put('/' + groupId, { payload });
53
53
  }
54
54
 
@@ -57,7 +57,7 @@ export class GroupsApi extends ApiTopic {
57
57
  * @param groupId The ID of the group to delete
58
58
  * @returns Object with the deleted group ID
59
59
  */
60
- delete(groupId: string): Promise<{ id: string }> {
60
+ delete(groupId: string): Promise<DeleteByIdResult> {
61
61
  return this.del('/' + groupId);
62
62
  }
63
63
 
package/src/IamApi.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AccessControlEntry, ACECreatePayload, AcesQueryOptions, Permission, ProjectRoles } from "@vertesia/common";
1
+ import { AccessControlEntry, ACECreatePayload, AcesQueryOptions, DeleteByIdResult, RoleDefinition } from "@vertesia/common";
2
2
  import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
3
3
  import { GroupsApi } from "./GroupsApi.js";
4
4
 
@@ -27,7 +27,7 @@ export class RolesApi extends ApiTopic {
27
27
  super(parent, "/roles")
28
28
  }
29
29
 
30
- list(): Promise<{ name: ProjectRoles, permissions: Permission[] }[]> {
30
+ list(): Promise<RoleDefinition[]> {
31
31
  return this.get('/');
32
32
  }
33
33
 
@@ -63,8 +63,8 @@ export class AcesApi extends ApiTopic {
63
63
  return this.post('/', { payload })
64
64
  }
65
65
 
66
- delete(id: string): Promise<{ id: string }> {
66
+ delete(id: string): Promise<DeleteByIdResult> {
67
67
  return this.del('/' + id)
68
68
  }
69
69
 
70
- }
70
+ }
@@ -1,29 +1,17 @@
1
1
  import { ApiTopic, ClientBase, ServerError } from "@vertesia/api-fetch-client";
2
2
  import {
3
- AsyncExecutionPayload, ComputeInteractionFacetPayload, GenerateInteractionPayload, GenerateTestDataPayload, ImprovePromptPayload,
3
+ AsyncExecutionPayload, AsyncExecutionResult, ComputeInteractionFacetPayload, ComputedFacetResponse, GenerateInteractionPayload, GenerateTestDataPayload, GeneratedInteractionDefinition, GeneratedTestDataRecord, ImprovePromptPayload,
4
4
  ImprovePromptPayloadConfig,
5
5
  Interaction, InteractionCreatePayload, InteractionEndpoint, InteractionEndpointQuery,
6
6
  InteractionExecutionPayload, InteractionForkPayload,
7
7
  InteractionPublishPayload, InteractionRef, InteractionRefWithSchema, InteractionSearchPayload, InteractionSearchQuery,
8
- InteractionsExportPayload, InteractionTags, InteractionUpdatePayload,
8
+ InteractionsExportPayload, InteractionTags, InteractionUpdatePayload, PromptImprovementResponse,
9
9
  RateLimitRequestPayload, RateLimitRequestResponse, ResolvedInteractionExecutionInfo
10
10
  } from "@vertesia/common";
11
11
  import { VertesiaClient } from "./client.js";
12
12
  import { checkRateLimit, executeInteraction, executeInteractionAsync, executeInteractionByName } from "./execute.js";
13
13
  import { InteractionCatalogApi } from "./InteractionCatalogApi.js";
14
- import { EnhancedExecutionRun, EnhancedInteractionExecutionResult, enhanceExecutionRun, enhanceInteractionExecutionResult } from "./InteractionOutput.js";
15
-
16
- export interface ComputeInteractionFacetsResponse {
17
- tags?: { _id: string, count: number }[];
18
- status?: { _id: string, count: number }[];
19
- total?: { count: number }[];
20
- }
21
-
22
- export interface AsyncExecutionResult {
23
- runId: string;
24
- workflowId: string;
25
- agentRunId?: string;
26
- }
14
+ import { EnhancedInteractionExecutionResult, enhanceInteractionExecutionResult } from "./InteractionOutput.js";
27
15
 
28
16
  export default class InteractionsApi extends ApiTopic {
29
17
  catalog: InteractionCatalogApi;
@@ -81,9 +69,9 @@ export default class InteractionsApi extends ApiTopic {
81
69
  /**
82
70
  * Get the list of all interactions facets
83
71
  * @param payload query payload to filter facet search
84
- * @returns ComputeInteractionFacetsResponse[]
72
+ * @returns ComputedFacetResponse
85
73
  **/
86
- computeFacets(query: ComputeInteractionFacetPayload): Promise<ComputeInteractionFacetsResponse> {
74
+ computeFacets(query: ComputeInteractionFacetPayload): Promise<ComputedFacetResponse> {
87
75
  return this.post("/facets", {
88
76
  payload: query
89
77
  });
@@ -223,7 +211,7 @@ export default class InteractionsApi extends ApiTopic {
223
211
  /**
224
212
  * Generate Composable definition of an interaction
225
213
  **/
226
- generateInteraction(id: string, payload: GenerateInteractionPayload): Promise<any[]> {
214
+ generateInteraction(id: string, payload: GenerateInteractionPayload): Promise<GeneratedInteractionDefinition[]> {
227
215
 
228
216
  return this.post(`${id}/generate-interaction`, {
229
217
  payload
@@ -234,7 +222,7 @@ export default class InteractionsApi extends ApiTopic {
234
222
  /**
235
223
  * Generate Test Data for an interaction
236
224
  **/
237
- generateTestData(id: string, payload: GenerateTestDataPayload): Promise<any[]> {
225
+ generateTestData(id: string, payload: GenerateTestDataPayload): Promise<GeneratedTestDataRecord[]> {
238
226
 
239
227
  return this.post(`${id}/generate-test-data`, {
240
228
  payload
@@ -245,18 +233,16 @@ export default class InteractionsApi extends ApiTopic {
245
233
  * Suggest Improvement for a prompt
246
234
  * @deprecated use suggestPromptImprovements instead
247
235
  */
248
- async suggestImprovements<ResultT = any, ParamsT = any>(id: string, payload: ImprovePromptPayloadConfig): Promise<EnhancedExecutionRun<ResultT, ParamsT>> {
249
- const r = await this.post(`${id}/suggest-prompt-improvements`, {
236
+ suggestImprovements(id: string, payload: ImprovePromptPayloadConfig): Promise<PromptImprovementResponse> {
237
+ return this.post(`${id}/suggest-prompt-improvements`, {
250
238
  payload
251
239
  });
252
- return enhanceExecutionRun<ResultT, ParamsT>(r);
253
240
  }
254
241
 
255
- async suggestPromptImprovements<ResultT = any, ParamsT = any>(payload: ImprovePromptPayload): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>> {
256
- const r = await this.post(`/improve`, {
242
+ suggestPromptImprovements(payload: ImprovePromptPayload): Promise<PromptImprovementResponse> {
243
+ return this.post(`/improve`, {
257
244
  payload
258
245
  });
259
- return enhanceInteractionExecutionResult<ResultT, ParamsT>(r);
260
246
  }
261
247
 
262
248
 
@@ -3,6 +3,7 @@ import type {
3
3
  CreateOAuthClientPayload,
4
4
  OAuthClient,
5
5
  OAuthClientCreateResponse,
6
+ SuccessResponse,
6
7
  UpdateOAuthClientPayload,
7
8
  } from '@vertesia/common';
8
9
 
@@ -27,7 +28,7 @@ export default class OAuthClientsApi extends ApiTopic {
27
28
  return this.put(`/${clientId}`, { payload });
28
29
  }
29
30
 
30
- remove(clientId: string): Promise<{ success: true }> {
31
+ remove(clientId: string): Promise<SuccessResponse> {
31
32
  return this.del(`/${clientId}`);
32
33
  }
33
34
  }
@@ -1,9 +1,11 @@
1
1
  import { ApiTopic, ClientBase } from '@vertesia/api-fetch-client';
2
2
  import type {
3
3
  CreateOAuthProviderPayload,
4
+ OAuthProviderAccessTokenResponse,
4
5
  OAuthProvider,
5
6
  OAuthProviderAuthStatus,
6
7
  OAuthProviderAuthorizeResponse,
8
+ SuccessResponse,
7
9
  UpdateOAuthProviderPayload,
8
10
  } from '@vertesia/common';
9
11
 
@@ -37,7 +39,7 @@ export default class OAuthProvidersApi extends ApiTopic {
37
39
  return this.get(`/${id}/authorize`);
38
40
  }
39
41
 
40
- exchange(code: string, state: string): Promise<{ success: boolean }> {
42
+ exchange(code: string, state: string): Promise<SuccessResponse> {
41
43
  return this.post('/exchange', { payload: { code, state } });
42
44
  }
43
45
 
@@ -45,15 +47,15 @@ export default class OAuthProvidersApi extends ApiTopic {
45
47
  return this.get(`/${id}/status`);
46
48
  }
47
49
 
48
- connect(id: string): Promise<{ success: boolean }> {
50
+ connect(id: string): Promise<SuccessResponse> {
49
51
  return this.post(`/${id}/connect`, { payload: {} });
50
52
  }
51
53
 
52
- getToken(id: string): Promise<{ access_token: string }> {
54
+ getToken(id: string): Promise<OAuthProviderAccessTokenResponse> {
53
55
  return this.post(`/${id}/token`, { payload: {} });
54
56
  }
55
57
 
56
- disconnect(id: string): Promise<void> {
58
+ disconnect(id: string): Promise<SuccessResponse> {
57
59
  return this.del(`/${id}/disconnect`);
58
60
  }
59
61
  }
@@ -1,5 +1,5 @@
1
1
  import { ApiTopic, ClientBase, ServerError } from "@vertesia/api-fetch-client";
2
- import { AwsConfiguration, CompositeAppConfig, CompositeAppConfigPayload, ExaConfiguration, GithubConfiguration, GladiaConfiguration, ICreateProjectPayload, InCodeTypeDefinition, LinkupConfiguration, MagicPdfConfiguration, Project, ProjectConfiguration, ProjectIntegrationListEntry, ProjectRef, ProjectToolInfo, RenderingTemplateDefinition, RenderingTemplateDefinitionRef, ResendConfiguration, SerperConfiguration, SupportedIntegrations } from "@vertesia/common";
2
+ import { AwsConfiguration, CompositeAppConfig, CompositeAppConfigPayload, CountResult, DeleteByIdResult, ExaConfiguration, GithubConfiguration, GladiaConfiguration, ICreateProjectPayload, InCodeTypeDefinition, LinkupConfiguration, MagicPdfConfiguration, Project, ProjectConfiguration, ProjectIntegrationListEntry, ProjectIntegrationListResponse, ProjectRef, ProjectToolInfo, RenderingTemplateDefinition, RenderingTemplateDefinitionRef, ResendConfiguration, SerperConfiguration, SupportedIntegrations } from "@vertesia/common";
3
3
 
4
4
  export default class ProjectsApi extends ApiTopic {
5
5
  constructor(parent: ClientBase) {
@@ -26,6 +26,10 @@ export default class ProjectsApi extends ApiTopic {
26
26
  });
27
27
  }
28
28
 
29
+ delete(projectId: string): Promise<DeleteByIdResult> {
30
+ return this.del(`/${projectId}`);
31
+ }
32
+
29
33
  updateConfiguration(projectId: string, payload: Partial<ProjectConfiguration>): Promise<ProjectConfiguration> {
30
34
  return this.put(`/${projectId}/configuration`, {
31
35
  payload
@@ -94,7 +98,7 @@ class IntegrationsConfigurationApi extends ApiTopic {
94
98
  }
95
99
 
96
100
  list(projectId: string): Promise<ProjectIntegrationListEntry[]> {
97
- return this.get(`/${projectId}/integrations`).then(res => res.integrations);
101
+ return this.get(`/${projectId}/integrations`).then((res: ProjectIntegrationListResponse) => res.integrations);
98
102
  }
99
103
 
100
104
  retrieve(projectId: string, integrationId: SupportedIntegrations): Promise<GladiaConfiguration | GithubConfiguration | AwsConfiguration | MagicPdfConfiguration | SerperConfiguration | ExaConfiguration | LinkupConfiguration | ResendConfiguration | undefined> {
@@ -112,4 +116,12 @@ class IntegrationsConfigurationApi extends ApiTopic {
112
116
  });
113
117
  }
114
118
 
119
+ updatePlugins(projectId: string, plugins: string[]): Promise<CountResult> {
120
+ return this.post(`/${projectId}/plugins`, { payload: { plugins } });
121
+ }
122
+
123
+ listPlugins(projectId: string): Promise<string[]> {
124
+ return this.get(`/${projectId}/plugins`);
125
+ }
126
+
115
127
  }
package/src/RunsApi.ts CHANGED
@@ -30,7 +30,7 @@ export interface ComputeRunFacetsResponse {
30
30
  models?: { _id: string; count: number }[];
31
31
  tags?: { _id: string; count: number }[];
32
32
  status?: { _id: string; count: number }[];
33
- total?: { count: number }[];
33
+ total?: number;
34
34
  }
35
35
 
36
36
  export class RunsApi extends ApiTopic {
package/src/UsersApi.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { UpdateUserPayload, User } from '@vertesia/common';
1
+ import { DeleteByIdResult, UpdateUserPayload, User } from '@vertesia/common';
2
2
  import { ApiTopic, ClientBase } from '@vertesia/api-fetch-client';
3
3
 
4
4
 
@@ -16,7 +16,7 @@ export default class UsersApi extends ApiTopic {
16
16
  return this.put('/' + userId, { payload });
17
17
  }
18
18
 
19
- delete(userId: string): Promise<{ id: string }> {
19
+ delete(userId: string): Promise<DeleteByIdResult> {
20
20
  return this.del('/' + userId);
21
21
  }
22
22
  }
package/src/execute.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { AsyncExecutionPayload, ExecutionRunStatus, InteractionExecutionPayload, InteractionExecutionResult, NamedInteractionExecutionPayload, RateLimitRequestPayload, RateLimitRequestResponse } from '@vertesia/common';
1
+ import { AsyncExecutionPayload, AsyncExecutionResult, ExecutionRunStatus, InteractionExecutionPayload, InteractionExecutionResult, NamedInteractionExecutionPayload, RateLimitRequestPayload, RateLimitRequestResponse } from '@vertesia/common';
2
2
  import { VertesiaClient } from './client.js';
3
- import type { AsyncExecutionResult } from './InteractionsApi.js';
4
3
 
5
4
  export async function EventSourceProvider(): Promise<typeof EventSource> {
6
5
  if (typeof globalThis.EventSource === 'function') {
@@ -126,4 +125,4 @@ export async function checkRateLimit(client: VertesiaClient, payload: RateLimitR
126
125
  return await client.post('/api/v1/execute/rate-limit/request', {
127
126
  payload
128
127
  });
129
- }
128
+ }
package/src/index.ts CHANGED
@@ -1,4 +1,6 @@
1
- export type { OrphanedAppInstallation } from "./AppsApi.js";
1
+ import type { AsyncExecutionResult, ComputedFacetResponse } from '@vertesia/common';
2
+
3
+ export type { OrphanedAppInstallation } from "@vertesia/common";
2
4
  export * from './client.js';
3
5
  export type { GroupsQueryOptions } from './GroupsApi.js';
4
6
  export * from './InteractionBase.js';
@@ -8,7 +10,9 @@ export { default as OAuthGrantsApi } from './OAuthGrantsApi.js';
8
10
  export { default as OAuthProvidersApi } from './OAuthProvidersApi.js';
9
11
  export { default as OAuthServerApi } from './OAuthServerApi.js';
10
12
  export { default as RemoteMcpConnectionsApi } from './RemoteMcpConnectionsApi.js';
11
- export type { AsyncExecutionResult, ComputeInteractionFacetsResponse } from './InteractionsApi.js';
13
+ export type { AsyncExecutionResult };
14
+ /** @deprecated Use `ComputedFacetResponse` from `@vertesia/common`. */
15
+ export type ComputeInteractionFacetsResponse = ComputedFacetResponse;
12
16
  export type { ComputePromptFacetsResponse, ListInteractionsResponse } from './PromptsApi.js';
13
17
  export type { ComputeRunFacetsResponse, FilterOption } from './RunsApi.js';
14
18
  export * from "./store/index.js";
@@ -1,6 +1,17 @@
1
1
  import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
2
- import { Collection, ComplexCollectionSearchQuery, ComplexSearchPayload, ComputeCollectionFacetPayload, ComputeObjectFacetPayload, ContentObjectItem, ContentObjectStatus, CreateCollectionPayload, DynamicCollection } from "@vertesia/common";
3
- import { ComputeFacetsResponse, SearchResponse } from "./ObjectsApi.js";
2
+ import {
3
+ Collection,
4
+ ComplexCollectionSearchQuery,
5
+ ComplexSearchPayload,
6
+ ComputeCollectionFacetPayload,
7
+ ComputeObjectFacetPayload,
8
+ ComputedFacetResponse,
9
+ ContentObjectItem,
10
+ ContentObjectStatus,
11
+ CreateCollectionPayload,
12
+ DynamicCollection,
13
+ ObjectSearchResponse
14
+ } from "@vertesia/common";
4
15
 
5
16
 
6
17
  export class CollectionsApi extends ApiTopic {
@@ -23,7 +34,7 @@ export class CollectionsApi extends ApiTopic {
23
34
  * @param query: ComputeCollectionFacetPayload
24
35
  * @returns ComputeFacetsResponse list of facets
25
36
  **/
26
- computeListFacets(query: ComputeCollectionFacetPayload): Promise<ComputeFacetsResponse> {
37
+ computeListFacets(query: ComputeCollectionFacetPayload): Promise<ComputedFacetResponse> {
27
38
  return this.post("/facets", {
28
39
  payload: query
29
40
  });
@@ -72,13 +83,13 @@ export class CollectionsApi extends ApiTopic {
72
83
  });
73
84
  }
74
85
 
75
- computeFacets(collectionId: string, query: ComputeObjectFacetPayload): Promise<ComputeFacetsResponse> {
86
+ computeFacets(collectionId: string, query: ComputeObjectFacetPayload): Promise<ComputedFacetResponse> {
76
87
  return this.post(`/${collectionId}/facets`, {
77
88
  payload: query
78
89
  });
79
90
  }
80
91
 
81
- searchMembers(collectionId: string, payload: ComplexSearchPayload): Promise<SearchResponse> {
92
+ searchMembers(collectionId: string, payload: ComplexSearchPayload): Promise<ObjectSearchResponse> {
82
93
  return this.post(`/${collectionId}/search`, { payload });
83
94
  }
84
95
 
@@ -1,5 +1,13 @@
1
1
  import { ApiTopic, ClientBase } from '@vertesia/api-fetch-client';
2
- import { CostAnalyticsQuery, CostAnalyticsResponse, CostRunPriceQuery, CostRunPriceResponse, ModelPriceComparisonResponse } from '@vertesia/common';
2
+ import {
3
+ CostAnalyticsQuery,
4
+ CostAnalyticsResponse,
5
+ CostExportQuery,
6
+ CostModelPricesQuery,
7
+ CostRunPriceQuery,
8
+ CostRunPriceResponse,
9
+ ModelPriceComparisonResponse,
10
+ } from '@vertesia/common';
3
11
 
4
12
  export class CostApi extends ApiTopic {
5
13
  constructor(parent: ClientBase) {
@@ -31,9 +39,9 @@ export class CostApi extends ApiTopic {
31
39
  * Get current list prices and effective prices for the selected period.
32
40
  */
33
41
  getModelPrices(
34
- query: Pick<CostAnalyticsQuery, 'from' | 'to'> = {}
42
+ query: CostModelPricesQuery = {}
35
43
  ): Promise<ModelPriceComparisonResponse> {
36
- return this.get('/model-prices', { query });
44
+ return this.get('/model-prices', { query: { ...query } });
37
45
  }
38
46
 
39
47
  /**
@@ -57,10 +65,13 @@ export class CostApi extends ApiTopic {
57
65
  /**
58
66
  * Get the CSV export URL for raw inference audit events.
59
67
  */
60
- getExportUrl(params?: { from?: string | number; to?: string | number }): string {
68
+ getExportUrl(params?: CostExportQuery): string {
61
69
  const searchParams = new URLSearchParams();
62
70
  if (params?.from) searchParams.set('from', typeof params.from === 'number' ? new Date(params.from).toISOString() : params.from);
63
71
  if (params?.to) searchParams.set('to', typeof params.to === 'number' ? new Date(params.to).toISOString() : params.to);
72
+ if (params?.scope) searchParams.set('scope', params.scope);
73
+ if (params?.project_id) searchParams.set('project_id', params.project_id);
74
+ if (params?.workflow_id) searchParams.set('workflow_id', params.workflow_id);
64
75
  const qs = searchParams.toString();
65
76
  return `${this.baseUrl}/export${qs ? `?${qs}` : ''}`;
66
77
  }
@@ -3,10 +3,14 @@ import {
3
3
  CreateDashboardPayload,
4
4
  CreateDashboardSnapshotPayload,
5
5
  Dashboard,
6
+ DashboardArchiveResult,
7
+ DashboardBulkArchiveResult,
8
+ DashboardBulkDeleteResult,
6
9
  DashboardItem,
7
10
  DashboardStatus,
8
11
  DashboardVersion,
9
12
  DashboardVersionItem,
13
+ DashboardVersioningStatusResponse,
10
14
  DataStoreApiHeaders,
11
15
  PromoteDashboardVersionPayload,
12
16
  UpdateDashboardPayload,
@@ -112,7 +116,7 @@ export class DashboardApi extends ApiTopic {
112
116
  * @param id - Dashboard ID
113
117
  * @returns Object with the archived dashboard ID
114
118
  */
115
- delete(id: string): Promise<{ id: string; status: DashboardStatus }> {
119
+ delete(id: string): Promise<DashboardArchiveResult> {
116
120
  return this.del(`/${id}`, { headers: this.storeHeaders() });
117
121
  }
118
122
 
@@ -122,7 +126,7 @@ export class DashboardApi extends ApiTopic {
122
126
  * @param ids - Array of dashboard IDs
123
127
  * @returns Object with counts of archived and failed dashboards
124
128
  */
125
- bulkArchive(ids: string[]): Promise<{ archived: number; failed: number }> {
129
+ bulkArchive(ids: string[]): Promise<DashboardBulkArchiveResult> {
126
130
  return this.post('/bulk/archive', { payload: { ids }, headers: this.storeHeaders() });
127
131
  }
128
132
 
@@ -132,7 +136,7 @@ export class DashboardApi extends ApiTopic {
132
136
  * @param ids - Array of dashboard IDs
133
137
  * @returns Object with counts of deleted and failed dashboards
134
138
  */
135
- bulkDelete(ids: string[]): Promise<{ deleted: number; failed: number }> {
139
+ bulkDelete(ids: string[]): Promise<DashboardBulkDeleteResult> {
136
140
  return this.post('/bulk/delete', { payload: { ids }, headers: this.storeHeaders() });
137
141
  }
138
142
 
@@ -210,7 +214,7 @@ export class DashboardApi extends ApiTopic {
210
214
  setVersioningEnabled(
211
215
  dashboardId: string,
212
216
  enabled: boolean
213
- ): Promise<{ versioning_enabled: boolean }> {
217
+ ): Promise<DashboardVersioningStatusResponse> {
214
218
  return this.put(`/${dashboardId}/versioning`, { payload: { enabled }, headers: this.storeHeaders() });
215
219
  }
216
220
  }