@vertesia/client 1.6.0-dev.20261019.172735Z → 1.6.0-dev.20261120.123957Z
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/lib/AccountApi.d.ts +2 -0
- package/lib/AccountApi.d.ts.map +1 -1
- package/lib/AccountApi.js +3 -0
- package/lib/AccountApi.js.map +1 -1
- package/lib/AccountRolesApi.d.ts +11 -0
- package/lib/AccountRolesApi.d.ts.map +1 -0
- package/lib/AccountRolesApi.js +22 -0
- package/lib/AccountRolesApi.js.map +1 -0
- package/lib/ApiKeysApi.d.ts +4 -7
- package/lib/ApiKeysApi.d.ts.map +1 -1
- package/lib/ApiKeysApi.js +5 -4
- package/lib/ApiKeysApi.js.map +1 -1
- package/lib/AppsApi.d.ts +18 -3
- package/lib/AppsApi.d.ts.map +1 -1
- package/lib/AppsApi.js +34 -4
- package/lib/AppsApi.js.map +1 -1
- package/lib/AuditTrailApi.d.ts +6 -1
- package/lib/AuditTrailApi.d.ts.map +1 -1
- package/lib/AuditTrailApi.js +8 -0
- package/lib/AuditTrailApi.js.map +1 -1
- package/lib/IamApi.d.ts +1 -1
- package/lib/IamApi.js +1 -1
- package/lib/InteractionCatalogApi.d.ts +19 -1
- package/lib/InteractionCatalogApi.d.ts.map +1 -1
- package/lib/InteractionCatalogApi.js +30 -0
- package/lib/InteractionCatalogApi.js.map +1 -1
- package/lib/InteractionsApi.d.ts +6 -13
- package/lib/InteractionsApi.d.ts.map +1 -1
- package/lib/InteractionsApi.js +4 -24
- package/lib/InteractionsApi.js.map +1 -1
- package/lib/OAuthClientsApi.d.ts +3 -1
- package/lib/OAuthClientsApi.d.ts.map +1 -1
- package/lib/OAuthClientsApi.js +4 -0
- package/lib/OAuthClientsApi.js.map +1 -1
- package/lib/OAuthProvidersApi.d.ts +6 -2
- package/lib/OAuthProvidersApi.d.ts.map +1 -1
- package/lib/OAuthProvidersApi.js +6 -2
- package/lib/OAuthProvidersApi.js.map +1 -1
- package/lib/RunsApi.d.ts +3 -2
- package/lib/RunsApi.d.ts.map +1 -1
- package/lib/RunsApi.js +3 -2
- package/lib/RunsApi.js.map +1 -1
- package/lib/StreamSource.d.ts +19 -1
- package/lib/StreamSource.d.ts.map +1 -1
- package/lib/StreamSource.js +31 -1
- package/lib/StreamSource.js.map +1 -1
- package/lib/UsersApi.d.ts +7 -1
- package/lib/UsersApi.d.ts.map +1 -1
- package/lib/UsersApi.js +8 -0
- package/lib/UsersApi.js.map +1 -1
- package/lib/client.d.ts +14 -2
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +55 -8
- package/lib/client.js.map +1 -1
- package/lib/execute.d.ts +16 -2
- package/lib/execute.d.ts.map +1 -1
- package/lib/execute.js +16 -3
- package/lib/execute.js.map +1 -1
- package/lib/idempotency-key.d.ts +19 -0
- package/lib/idempotency-key.d.ts.map +1 -0
- package/lib/idempotency-key.js +34 -0
- package/lib/idempotency-key.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/nodejs/NodeStreamSource.d.ts +11 -1
- package/lib/nodejs/NodeStreamSource.d.ts.map +1 -1
- package/lib/nodejs/NodeStreamSource.js +56 -16
- package/lib/nodejs/NodeStreamSource.js.map +1 -1
- package/lib/store/AgentsApi.d.ts +3 -0
- package/lib/store/AgentsApi.d.ts.map +1 -1
- package/lib/store/AgentsApi.js +10 -1
- package/lib/store/AgentsApi.js.map +1 -1
- package/lib/store/ContentSourcesApi.d.ts +52 -0
- package/lib/store/ContentSourcesApi.d.ts.map +1 -0
- package/lib/store/ContentSourcesApi.js +85 -0
- package/lib/store/ContentSourcesApi.js.map +1 -0
- package/lib/store/CostApi.d.ts +6 -1
- package/lib/store/CostApi.d.ts.map +1 -1
- package/lib/store/CostApi.js +7 -0
- package/lib/store/CostApi.js.map +1 -1
- package/lib/store/DashboardApi.d.ts +61 -19
- package/lib/store/DashboardApi.d.ts.map +1 -1
- package/lib/store/DashboardApi.js +75 -19
- package/lib/store/DashboardApi.js.map +1 -1
- package/lib/store/DataApi.d.ts +9 -9
- package/lib/store/DataApi.d.ts.map +1 -1
- package/lib/store/DataApi.js +14 -10
- package/lib/store/DataApi.js.map +1 -1
- package/lib/store/FilesApi.d.ts +15 -1
- package/lib/store/FilesApi.d.ts.map +1 -1
- package/lib/store/FilesApi.js +54 -69
- package/lib/store/FilesApi.js.map +1 -1
- package/lib/store/IndexingApi.d.ts +0 -6
- package/lib/store/IndexingApi.d.ts.map +1 -1
- package/lib/store/IndexingApi.js +3 -17
- package/lib/store/IndexingApi.js.map +1 -1
- package/lib/store/NotificationsApi.d.ts +39 -0
- package/lib/store/NotificationsApi.d.ts.map +1 -0
- package/lib/store/NotificationsApi.js +68 -0
- package/lib/store/NotificationsApi.js.map +1 -0
- package/lib/store/ObjectsApi.d.ts +6 -7
- package/lib/store/ObjectsApi.d.ts.map +1 -1
- package/lib/store/ObjectsApi.js +25 -46
- package/lib/store/ObjectsApi.js.map +1 -1
- package/lib/store/RenderingApi.d.ts.map +1 -1
- package/lib/store/RenderingApi.js +1 -0
- package/lib/store/RenderingApi.js.map +1 -1
- package/lib/store/WorkflowsApi.d.ts +19 -1
- package/lib/store/WorkflowsApi.d.ts.map +1 -1
- package/lib/store/WorkflowsApi.js +21 -0
- package/lib/store/WorkflowsApi.js.map +1 -1
- package/lib/store/chunked-upload.d.ts +71 -0
- package/lib/store/chunked-upload.d.ts.map +1 -0
- package/lib/store/chunked-upload.js +206 -0
- package/lib/store/chunked-upload.js.map +1 -0
- package/lib/store/client.d.ts +9 -1
- package/lib/store/client.d.ts.map +1 -1
- package/lib/store/client.js +15 -1
- package/lib/store/client.js.map +1 -1
- package/lib/store/index.d.ts +3 -0
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +3 -0
- package/lib/store/index.js.map +1 -1
- package/lib/store/node-request.browser.d.ts +14 -0
- package/lib/store/node-request.browser.d.ts.map +1 -0
- package/lib/store/node-request.browser.js +20 -0
- package/lib/store/node-request.browser.js.map +1 -0
- package/lib/store/node-request.d.ts +20 -0
- package/lib/store/node-request.d.ts.map +1 -0
- package/lib/store/node-request.js +116 -0
- package/lib/store/node-request.js.map +1 -0
- package/lib/store/node-sessions.browser.d.ts +3 -0
- package/lib/store/node-sessions.browser.d.ts.map +1 -0
- package/lib/store/node-sessions.browser.js +15 -0
- package/lib/store/node-sessions.browser.js.map +1 -0
- package/lib/store/node-sessions.d.ts +14 -0
- package/lib/store/node-sessions.d.ts.map +1 -0
- package/lib/store/node-sessions.js +88 -0
- package/lib/store/node-sessions.js.map +1 -0
- package/lib/store/signed-url.d.ts +12 -16
- package/lib/store/signed-url.d.ts.map +1 -1
- package/lib/store/signed-url.js +111 -71
- package/lib/store/signed-url.js.map +1 -1
- package/lib/store/stream-bytes.d.ts +16 -0
- package/lib/store/stream-bytes.d.ts.map +1 -0
- package/lib/store/stream-bytes.js +70 -0
- package/lib/store/stream-bytes.js.map +1 -0
- package/lib/store/upload-body.d.ts +21 -0
- package/lib/store/upload-body.d.ts.map +1 -0
- package/lib/store/upload-body.js +32 -0
- package/lib/store/upload-body.js.map +1 -0
- package/lib/store/upload-content.d.ts +21 -0
- package/lib/store/upload-content.d.ts.map +1 -0
- package/lib/store/upload-content.js +113 -0
- package/lib/store/upload-content.js.map +1 -0
- package/lib/store/upload-runtime.d.ts +21 -0
- package/lib/store/upload-runtime.d.ts.map +1 -0
- package/lib/store/upload-runtime.js +40 -0
- package/lib/store/upload-runtime.js.map +1 -0
- package/lib/store/zeno-bulk.d.ts +9 -0
- package/lib/store/zeno-bulk.d.ts.map +1 -0
- package/lib/store/zeno-bulk.js +26 -0
- package/lib/store/zeno-bulk.js.map +1 -0
- package/lib/vertesia-client.js +10 -9
- package/lib/vertesia-client.js.map +1 -1
- package/package.json +38 -9
- package/src/AccountApi.ts +3 -0
- package/src/AccountRolesApi.ts +29 -0
- package/src/ApiKeysApi.ts +4 -12
- package/src/AppsApi.ts +58 -4
- package/src/AuditTrailApi.ts +11 -0
- package/src/IamApi.ts +1 -1
- package/src/InteractionCatalogApi.ts +44 -1
- package/src/InteractionsApi.ts +11 -33
- package/src/OAuthClientsApi.ts +6 -0
- package/src/OAuthProvidersApi.ts +7 -2
- package/src/RunsApi.ts +7 -2
- package/src/StreamSource.ts +29 -0
- package/src/UsersApi.ts +10 -1
- package/src/client.ts +72 -8
- package/src/execute.ts +33 -4
- package/src/idempotency-key.ts +34 -0
- package/src/index.ts +1 -0
- package/src/nodejs/NodeStreamSource.ts +63 -24
- package/src/store/AgentsApi.ts +13 -1
- package/src/store/ContentSourcesApi.ts +126 -0
- package/src/store/CostApi.ts +10 -0
- package/src/store/DashboardApi.ts +93 -18
- package/src/store/DataApi.ts +14 -10
- package/src/store/FilesApi.ts +84 -72
- package/src/store/IndexingApi.ts +3 -18
- package/src/store/NotificationsApi.ts +103 -0
- package/src/store/ObjectsApi.ts +32 -51
- package/src/store/RenderingApi.ts +1 -0
- package/src/store/WorkflowsApi.ts +25 -0
- package/src/store/chunked-upload.ts +272 -0
- package/src/store/client.ts +21 -1
- package/src/store/index.ts +3 -0
- package/src/store/node-request.browser.ts +22 -0
- package/src/store/node-request.ts +120 -0
- package/src/store/node-sessions.browser.ts +16 -0
- package/src/store/node-sessions.ts +109 -0
- package/src/store/signed-url.ts +126 -72
- package/src/store/stream-bytes.ts +79 -0
- package/src/store/upload-body.ts +37 -0
- package/src/store/upload-content.ts +129 -0
- package/src/store/upload-runtime.ts +42 -0
- package/src/store/zeno-bulk.ts +30 -0
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/client",
|
|
3
|
-
"version": "1.6.0-dev.
|
|
3
|
+
"version": "1.6.0-dev.20261120.123957Z",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
|
+
"browser": {
|
|
8
|
+
"./lib/store/node-request.js": "./lib/store/node-request.browser.js",
|
|
9
|
+
"./lib/store/node-sessions.js": "./lib/store/node-sessions.browser.js"
|
|
10
|
+
},
|
|
7
11
|
"files": [
|
|
8
12
|
"lib",
|
|
9
13
|
"src",
|
|
@@ -12,17 +16,37 @@
|
|
|
12
16
|
],
|
|
13
17
|
"license": "Apache-2.0",
|
|
14
18
|
"devDependencies": {
|
|
15
|
-
"@
|
|
19
|
+
"@azure/storage-blob": "^12.34.0",
|
|
20
|
+
"@google-cloud/storage": "^8.4.0",
|
|
21
|
+
"@types/node": "^24.19.2",
|
|
16
22
|
"@vertesia/tsconfig": "0.1.0",
|
|
17
|
-
"
|
|
23
|
+
"google-auth-library": "^11.3.2",
|
|
24
|
+
"rolldown": "1.2.16",
|
|
18
25
|
"typescript": "7.0.2",
|
|
19
|
-
"vitest": "5.0
|
|
26
|
+
"vitest": "5.1.0"
|
|
20
27
|
},
|
|
21
28
|
"dependencies": {
|
|
22
|
-
"@llumiverse/common": "1.6.0-dev.
|
|
23
|
-
"@vertesia/api-fetch-client": "1.6.0-dev.
|
|
24
|
-
"@vertesia/common": "1.6.0-dev.
|
|
25
|
-
"
|
|
29
|
+
"@llumiverse/common": "1.6.0-dev.20261120.123957Z",
|
|
30
|
+
"@vertesia/api-fetch-client": "1.6.0-dev.20261120.123957Z",
|
|
31
|
+
"@vertesia/common": "1.6.0-dev.20261120.123957Z",
|
|
32
|
+
"@vertesia/studio-utils": "1.6.0-dev.20261120.123957Z",
|
|
33
|
+
"eventsource": "^5.1.4"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@azure/storage-blob": "^12.34.0",
|
|
37
|
+
"@google-cloud/storage": ">=8.4.0",
|
|
38
|
+
"google-auth-library": ">=11.3.2"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"@azure/storage-blob": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"@google-cloud/storage": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"google-auth-library": {
|
|
48
|
+
"optional": true
|
|
49
|
+
}
|
|
26
50
|
},
|
|
27
51
|
"exports": {
|
|
28
52
|
".": {
|
|
@@ -49,7 +73,12 @@
|
|
|
49
73
|
"ai",
|
|
50
74
|
"typescript"
|
|
51
75
|
],
|
|
52
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "175a3f272cae5dc0273eff3fd198463106331045",
|
|
77
|
+
"releaseIdentity": {
|
|
78
|
+
"source_sha": "175a3f272cae5dc0273eff3fd198463106331045",
|
|
79
|
+
"dependency_sha": "b44c036a234f16aeba50fd4fb810121ac7dbf59f",
|
|
80
|
+
"lock_sha256": "e43dc89b7d72f8da4ece104946da392bfbb1376c67a47c4ab03a11eda2946ba8"
|
|
81
|
+
},
|
|
53
82
|
"scripts": {
|
|
54
83
|
"lint": "biome lint src",
|
|
55
84
|
"clean:lib": "rimraf ./lib ./tsconfig.tsbuildinfo",
|
package/src/AccountApi.ts
CHANGED
|
@@ -14,13 +14,16 @@ import type {
|
|
|
14
14
|
UserInviteToken,
|
|
15
15
|
} from '@vertesia/common';
|
|
16
16
|
import AccountApiKeysApi from './AccountApiKeysApi.js';
|
|
17
|
+
import AccountRolesApi from './AccountRolesApi.js';
|
|
17
18
|
|
|
18
19
|
export default class AccountApi extends ApiTopic {
|
|
19
20
|
readonly apikeys: AccountApiKeysApi;
|
|
21
|
+
readonly roles: AccountRolesApi;
|
|
20
22
|
|
|
21
23
|
constructor(parent: ClientBase) {
|
|
22
24
|
super(parent, '/api/v1/account');
|
|
23
25
|
this.apikeys = new AccountApiKeysApi(parent);
|
|
26
|
+
this.roles = new AccountRolesApi(parent);
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
/**
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
+
import type {
|
|
3
|
+
CreateCustomRolePayload,
|
|
4
|
+
CustomRoleDefinition,
|
|
5
|
+
DeleteOperationResult,
|
|
6
|
+
Permission,
|
|
7
|
+
UpdateCustomRolePayload,
|
|
8
|
+
} from '@vertesia/common';
|
|
9
|
+
|
|
10
|
+
export default class AccountRolesApi extends ApiTopic {
|
|
11
|
+
constructor(parent: ClientBase) {
|
|
12
|
+
super(parent, '/api/v1/account/roles');
|
|
13
|
+
}
|
|
14
|
+
list(): Promise<CustomRoleDefinition[]> {
|
|
15
|
+
return this.get('/');
|
|
16
|
+
}
|
|
17
|
+
permissions(): Promise<Permission[]> {
|
|
18
|
+
return this.get('/permissions');
|
|
19
|
+
}
|
|
20
|
+
create(payload: CreateCustomRolePayload): Promise<CustomRoleDefinition> {
|
|
21
|
+
return this.post('/', { payload });
|
|
22
|
+
}
|
|
23
|
+
update(name: string, payload: UpdateCustomRolePayload): Promise<CustomRoleDefinition> {
|
|
24
|
+
return this.put(`/${encodeURIComponent(name)}`, { payload });
|
|
25
|
+
}
|
|
26
|
+
delete(name: string): Promise<DeleteOperationResult> {
|
|
27
|
+
return this.del(`/${encodeURIComponent(name)}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
package/src/ApiKeysApi.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
2
|
import type {
|
|
3
3
|
ApiKey,
|
|
4
|
-
ApiKeyReadResponse,
|
|
5
4
|
ApiKeyWithValue,
|
|
6
5
|
AuthTokenResponse,
|
|
7
6
|
CreateApiKeyPayload,
|
|
@@ -42,17 +41,10 @@ export class ApiKeysApi extends ApiTopic {
|
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
|
-
* Retrieve an ApiKey
|
|
46
|
-
*
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* */
|
|
50
|
-
retrieve(id: string, withValue: true): Promise<ApiKeyWithValue>;
|
|
51
|
-
retrieve(id: string, withValue?: false): Promise<ApiKey>;
|
|
52
|
-
retrieve(id: string, withValue: boolean = false): Promise<ApiKeyReadResponse> {
|
|
53
|
-
if (withValue) {
|
|
54
|
-
return this.get(`/${id}`, { query: { withValue: true } });
|
|
55
|
-
}
|
|
44
|
+
* Retrieve an ApiKey without its value. The raw value is returned only once, by `create`.
|
|
45
|
+
* @returns ApiKey
|
|
46
|
+
*/
|
|
47
|
+
retrieve(id: string): Promise<ApiKey> {
|
|
56
48
|
return this.get(`/${id}`);
|
|
57
49
|
}
|
|
58
50
|
|
package/src/AppsApi.ts
CHANGED
|
@@ -28,13 +28,17 @@ import type {
|
|
|
28
28
|
AppScaffoldProgress,
|
|
29
29
|
AppsQuery,
|
|
30
30
|
AppToolCollection,
|
|
31
|
+
AppVersionLaunchTarget,
|
|
31
32
|
AppVersionListQuery,
|
|
32
33
|
AppVersionRecord,
|
|
33
34
|
CountResult,
|
|
34
35
|
CreateAppRepoBranchRequest,
|
|
36
|
+
CreateAppVersionLaunchRequest,
|
|
37
|
+
CreateAppVersionLaunchResponse,
|
|
35
38
|
DeleteAppVersionResponse,
|
|
36
39
|
ExchangeAppGithubAuthorizationResponse,
|
|
37
40
|
McpApiKeyStatus,
|
|
41
|
+
OAuthClient,
|
|
38
42
|
ProjectRef,
|
|
39
43
|
PromoteAppVersionResponse,
|
|
40
44
|
RequireAtLeastOne,
|
|
@@ -47,6 +51,7 @@ import type {
|
|
|
47
51
|
StartAppScaffoldResponse,
|
|
48
52
|
UpdateAppInstallationOAuthApprovalPayload,
|
|
49
53
|
UpdateAppInstallationToolAllowlistPayload,
|
|
54
|
+
UpdateAppInstallationToolPermissionsPayload,
|
|
50
55
|
UpdateAppPayload,
|
|
51
56
|
UpsertAppVersionRequest,
|
|
52
57
|
ValidateUrlRequest,
|
|
@@ -60,6 +65,11 @@ export default class AppsApi extends ApiTopic {
|
|
|
60
65
|
super(parent, '/api/v1/apps');
|
|
61
66
|
}
|
|
62
67
|
|
|
68
|
+
/** The publisher-managed OAuth registration shared by all installations of an app. */
|
|
69
|
+
getOAuthClient(appId: string): Promise<OAuthClient> {
|
|
70
|
+
return this.get(`/${encodeURIComponent(appId)}/oauth-client`);
|
|
71
|
+
}
|
|
72
|
+
|
|
63
73
|
create(manifest: AppManifestData): Promise<AppManifest> {
|
|
64
74
|
return this.post('/', { payload: manifest });
|
|
65
75
|
}
|
|
@@ -150,6 +160,29 @@ export default class AppsApi extends ApiTopic {
|
|
|
150
160
|
return this.post(`/versions/${recordId}/promote`);
|
|
151
161
|
}
|
|
152
162
|
|
|
163
|
+
/** Create an ephemeral launch of an immutable version with temporary installation settings. */
|
|
164
|
+
createVersionLaunch(
|
|
165
|
+
recordId: string,
|
|
166
|
+
payload: CreateAppVersionLaunchRequest,
|
|
167
|
+
): Promise<CreateAppVersionLaunchResponse> {
|
|
168
|
+
return this.post(`/versions/${recordId}/launches`, { payload });
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** List accessible projects where this app is installed and can host a temporary launch. */
|
|
172
|
+
listVersionLaunchTargets(recordId: string): Promise<AppVersionLaunchTarget[]> {
|
|
173
|
+
return this.get(`/versions/${recordId}/launch-targets`);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** Assign or move a stable deployment alias to an immutable app version. */
|
|
177
|
+
assignVersionAlias(recordId: string, alias: string): Promise<AppVersionRecord> {
|
|
178
|
+
return this.put(`/versions/${recordId}/aliases/${encodeURIComponent(alias)}`);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** Remove an alias only when it still points to the specified app version. */
|
|
182
|
+
removeVersionAlias(recordId: string, alias: string): Promise<AppVersionRecord> {
|
|
183
|
+
return this.del(`/versions/${recordId}/aliases/${encodeURIComponent(alias)}`);
|
|
184
|
+
}
|
|
185
|
+
|
|
153
186
|
rebuildVersion(recordId: string): Promise<StartAppBuildResponse> {
|
|
154
187
|
return this.post(`/versions/${recordId}/rebuild`);
|
|
155
188
|
}
|
|
@@ -364,9 +397,16 @@ export default class AppsApi extends ApiTopic {
|
|
|
364
397
|
* package-resolved (no per-id route), so this is how a client reads the full definition — type
|
|
365
398
|
* schema, interaction prompt, process definition, dashboard spec — to visualize an exposed id.
|
|
366
399
|
*/
|
|
367
|
-
getAppPackage(
|
|
400
|
+
getAppPackage(
|
|
401
|
+
appIdOrName: string,
|
|
402
|
+
scope: AppPackageScope | AppPackageScope[] = 'all',
|
|
403
|
+
deploymentAlias?: string,
|
|
404
|
+
): Promise<AppPackage> {
|
|
368
405
|
return this.get(`/${encodeURIComponent(appIdOrName)}/package`, {
|
|
369
|
-
query: {
|
|
406
|
+
query: {
|
|
407
|
+
scope: Array.isArray(scope) ? scope.join(',') : scope,
|
|
408
|
+
...(deploymentAlias ? { deployment_alias: deploymentAlias } : {}),
|
|
409
|
+
},
|
|
370
410
|
});
|
|
371
411
|
}
|
|
372
412
|
|
|
@@ -414,12 +454,15 @@ export default class AppsApi extends ApiTopic {
|
|
|
414
454
|
apiKeyParams?: AppApiKeyCollectionParams,
|
|
415
455
|
mcpParameters?: AppInstallationPayload['mcp_parameters'],
|
|
416
456
|
mcpSharedParameters?: AppInstallationPayload['mcp_shared_parameters'],
|
|
417
|
-
|
|
457
|
+
installation?: Pick<
|
|
458
|
+
AppInstallationPayload,
|
|
459
|
+
'approved_scopes' | 'deployment_alias' | 'instance_key' | 'display_name' | 'namespace_overrides'
|
|
460
|
+
>,
|
|
418
461
|
): Promise<AppInstallation> {
|
|
419
462
|
return this.post(`/install`, {
|
|
420
463
|
payload: {
|
|
421
464
|
app_id: appId,
|
|
422
|
-
...
|
|
465
|
+
...installation,
|
|
423
466
|
settings,
|
|
424
467
|
oauth_params: oauthParams,
|
|
425
468
|
oauth_provider_params: oauthProviderParams,
|
|
@@ -556,6 +599,17 @@ export default class AppsApi extends ApiTopic {
|
|
|
556
599
|
});
|
|
557
600
|
}
|
|
558
601
|
|
|
602
|
+
/**
|
|
603
|
+
* Update the tool allowlist and the tools requiring human approval of an app installation in one atomic write.
|
|
604
|
+
* Omit a field to leave it unchanged; pass null to clear it.
|
|
605
|
+
*/
|
|
606
|
+
updateToolPermissions(
|
|
607
|
+
installId: string,
|
|
608
|
+
payload: UpdateAppInstallationToolPermissionsPayload,
|
|
609
|
+
): Promise<AppInstallationWithManifest> {
|
|
610
|
+
return this.put(`/installations/${installId}/tool-permissions`, { payload });
|
|
611
|
+
}
|
|
612
|
+
|
|
559
613
|
/**
|
|
560
614
|
* Validate that a URL is safe to use as a remote tool/activity endpoint.
|
|
561
615
|
* Throws a ServerError(400) if the URL is blocked (SSRF protection).
|
package/src/AuditTrailApi.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
|
2
2
|
import type {
|
|
3
3
|
AuditAdoptionQuery,
|
|
4
4
|
AuditAdoptionResponse,
|
|
5
|
+
AuditAggregationBatchQuery,
|
|
6
|
+
AuditAggregationBatchResponse,
|
|
5
7
|
AuditAggregationQuery,
|
|
6
8
|
AuditAggregationResponse,
|
|
7
9
|
AuditTrailQuery,
|
|
@@ -38,6 +40,15 @@ export default class AuditTrailApi extends ApiTopic {
|
|
|
38
40
|
return this.post('/aggregate', { payload: query });
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Run several aggregations in one request. `results[i]` is what `aggregate(queries[i])` returns; the server
|
|
45
|
+
* computes the queries that share a scope, time range and filter in one pass over the audit events.
|
|
46
|
+
*/
|
|
47
|
+
aggregateBatch(queries: AuditAggregationQuery[]): Promise<AuditAggregationBatchResponse> {
|
|
48
|
+
const payload: AuditAggregationBatchQuery = { queries };
|
|
49
|
+
return this.post('/aggregate/batch', { payload });
|
|
50
|
+
}
|
|
51
|
+
|
|
41
52
|
adoption(query: AuditAdoptionQuery = {}): Promise<AuditAdoptionResponse> {
|
|
42
53
|
return this.post('/adoption', { payload: query });
|
|
43
54
|
}
|
package/src/IamApi.ts
CHANGED
|
@@ -51,7 +51,7 @@ export class RolesApi extends ApiTopic {
|
|
|
51
51
|
/**
|
|
52
52
|
* List system-domain roles only. Permissions are tightly typed as `Permission[]` —
|
|
53
53
|
* suited for client-side permission gating (button visibility, route guards).
|
|
54
|
-
* ABAC roles are excluded and must be consumed via the JWT `
|
|
54
|
+
* ABAC roles are excluded and must be consumed via the JWT `abac` claim.
|
|
55
55
|
*/
|
|
56
56
|
listSystem(options?: IRequestParams): Promise<SystemRoleDefinition[]> {
|
|
57
57
|
return this.get('/system', options);
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
CatalogAgentSearchQuery,
|
|
4
|
+
CatalogCallSearchQuery,
|
|
5
|
+
CatalogInteractionRef,
|
|
6
|
+
CatalogSearchResult,
|
|
7
|
+
InteractionStatus,
|
|
8
|
+
ResolvedCatalogInteraction,
|
|
9
|
+
} from '@vertesia/common';
|
|
3
10
|
|
|
4
11
|
export class InteractionCatalogApi extends ApiTopic {
|
|
5
12
|
constructor(parent: ClientBase) {
|
|
@@ -35,6 +42,42 @@ export class InteractionCatalogApi extends ApiTopic {
|
|
|
35
42
|
});
|
|
36
43
|
}
|
|
37
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Search the stored agents of the project: the interactions configured as agents
|
|
47
|
+
* (`agent_runner_options.is_agent`), in their draft version.
|
|
48
|
+
*/
|
|
49
|
+
listStoredAgents(query: CatalogAgentSearchQuery = {}): Promise<CatalogSearchResult> {
|
|
50
|
+
return this.get('/agents/stored', { query });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Search the system agents, which are defined in code by the platform. */
|
|
54
|
+
listSystemAgents(query: CatalogAgentSearchQuery = {}): Promise<CatalogSearchResult> {
|
|
55
|
+
return this.get('/agents/system', { query });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Search the agents provided by an app. The app is asked for its interactions, so this can be slow. */
|
|
59
|
+
listAppAgents(appName: string, query: CatalogAgentSearchQuery = {}): Promise<CatalogSearchResult> {
|
|
60
|
+
return this.get(`/agents/apps/${encodeURIComponent(appName)}`, { query });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Search the stored calls of the project: the interactions that are not agents (basic, tool and skill calls),
|
|
65
|
+
* in their draft version.
|
|
66
|
+
*/
|
|
67
|
+
listStoredCalls(query: CatalogCallSearchQuery = {}): Promise<CatalogSearchResult> {
|
|
68
|
+
return this.get('/calls/stored', { query });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Search the system calls, which are defined in code by the platform. */
|
|
72
|
+
listSystemCalls(query: CatalogCallSearchQuery = {}): Promise<CatalogSearchResult> {
|
|
73
|
+
return this.get('/calls/system', { query });
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Search the calls provided by an app. The app is asked for its interactions, so this can be slow. */
|
|
77
|
+
listAppCalls(appName: string, query: CatalogCallSearchQuery = {}): Promise<CatalogSearchResult> {
|
|
78
|
+
return this.get(`/calls/apps/${encodeURIComponent(appName)}`, { query });
|
|
79
|
+
}
|
|
80
|
+
|
|
38
81
|
/**
|
|
39
82
|
* List sys interactions
|
|
40
83
|
*/
|
package/src/InteractionsApi.ts
CHANGED
|
@@ -5,12 +5,8 @@ import type {
|
|
|
5
5
|
ComputedFacetResponse,
|
|
6
6
|
ComputeInteractionFacetPayload,
|
|
7
7
|
DeleteByIdResult,
|
|
8
|
-
GeneratedInteractionDefinition,
|
|
9
8
|
GeneratedTestDataRecord,
|
|
10
|
-
GenerateInteractionPayload,
|
|
11
9
|
GenerateTestDataPayload,
|
|
12
|
-
ImprovePromptPayload,
|
|
13
|
-
ImprovePromptPayloadConfig,
|
|
14
10
|
Interaction,
|
|
15
11
|
InteractionCreatePayload,
|
|
16
12
|
InteractionDeletePayload,
|
|
@@ -26,14 +22,19 @@ import type {
|
|
|
26
22
|
InteractionsExportPayload,
|
|
27
23
|
InteractionTags,
|
|
28
24
|
InteractionUpdatePayload,
|
|
29
|
-
PromptImprovementResponse,
|
|
30
25
|
RateLimitRequestPayload,
|
|
31
26
|
RateLimitRequestResponse,
|
|
32
27
|
ResolvedInteractionExecutionInfo,
|
|
33
28
|
ResolveInteractionQuery,
|
|
34
29
|
} from '@vertesia/common';
|
|
35
30
|
import type { VertesiaClient } from './client.js';
|
|
36
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
checkRateLimit,
|
|
33
|
+
type ExecuteInteractionRequestOptions,
|
|
34
|
+
executeInteraction,
|
|
35
|
+
executeInteractionAsync,
|
|
36
|
+
executeInteractionByName,
|
|
37
|
+
} from './execute.js';
|
|
37
38
|
import { InteractionCatalogApi } from './InteractionCatalogApi.js';
|
|
38
39
|
import { type EnhancedInteractionExecutionResult, enhanceInteractionExecutionResult } from './InteractionOutput.js';
|
|
39
40
|
|
|
@@ -222,13 +223,14 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
222
223
|
* @param nameWithTag
|
|
223
224
|
* @param payload
|
|
224
225
|
* @param onChunk
|
|
226
|
+
* @param requestOptions request options, e.g. `{ query: { include_prompt: false } }` to omit the rendered prompt
|
|
225
227
|
* @returns
|
|
226
228
|
*/
|
|
227
229
|
async executeByName<ResultT = unknown, ParamsT = unknown>(
|
|
228
230
|
nameWithTag: string,
|
|
229
231
|
payload: InteractionExecutionPayload = {},
|
|
230
232
|
onChunk?: (chunk: string) => void,
|
|
231
|
-
requestOptions?:
|
|
233
|
+
requestOptions?: ExecuteInteractionRequestOptions,
|
|
232
234
|
): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>> {
|
|
233
235
|
const r = await executeInteractionByName<ParamsT>(
|
|
234
236
|
this.client as VertesiaClient,
|
|
@@ -267,15 +269,6 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
267
269
|
});
|
|
268
270
|
}
|
|
269
271
|
|
|
270
|
-
/**
|
|
271
|
-
* Generate Composable definition of an interaction
|
|
272
|
-
**/
|
|
273
|
-
generateInteraction(id: string, payload: GenerateInteractionPayload): Promise<GeneratedInteractionDefinition[]> {
|
|
274
|
-
return this.post(`${id}/generate-interaction`, {
|
|
275
|
-
payload,
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
|
|
279
272
|
/**
|
|
280
273
|
* Generate Test Data for an interaction
|
|
281
274
|
**/
|
|
@@ -285,22 +278,6 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
285
278
|
});
|
|
286
279
|
}
|
|
287
280
|
|
|
288
|
-
/**
|
|
289
|
-
* Suggest Improvement for a prompt
|
|
290
|
-
* @deprecated use suggestPromptImprovements instead
|
|
291
|
-
*/
|
|
292
|
-
suggestImprovements(id: string, payload: ImprovePromptPayloadConfig): Promise<PromptImprovementResponse> {
|
|
293
|
-
return this.post(`${id}/suggest-prompt-improvements`, {
|
|
294
|
-
payload,
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
suggestPromptImprovements(payload: ImprovePromptPayload): Promise<PromptImprovementResponse> {
|
|
299
|
-
return this.post(`/improve`, {
|
|
300
|
-
payload,
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
|
|
304
281
|
/**
|
|
305
282
|
* List the versions of the interaction. Returns an empty array if no versions are found
|
|
306
283
|
* @param id
|
|
@@ -322,7 +299,8 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
322
299
|
/**
|
|
323
300
|
* Request a time slot to execute an interaction with a given environment / model
|
|
324
301
|
* @param payload RateLimitRequestPayload
|
|
325
|
-
* @returns RateLimitRequestResponse with delay_ms
|
|
302
|
+
* @returns RateLimitRequestResponse with delay_ms and, when the request holds a slot, its rate_limit_grant.
|
|
303
|
+
* Once admitted (delay_ms is 0), send the grant back as `workflow.rate_limit_id` when executing
|
|
326
304
|
*/
|
|
327
305
|
requestSlot(payload: RateLimitRequestPayload): Promise<RateLimitRequestResponse> {
|
|
328
306
|
return checkRateLimit(this.client as VertesiaClient, payload);
|
package/src/OAuthClientsApi.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
OAuthClientScopeMetadata,
|
|
7
7
|
SuccessResponse,
|
|
8
8
|
UpdateOAuthClientPayload,
|
|
9
|
+
UpdateOAuthClientStatusPayload,
|
|
9
10
|
} from '@vertesia/common';
|
|
10
11
|
|
|
11
12
|
export default class OAuthClientsApi extends ApiTopic {
|
|
@@ -33,6 +34,11 @@ export default class OAuthClientsApi extends ApiTopic {
|
|
|
33
34
|
return this.put(`/${clientId}`, { payload });
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
/** Enable or disable sign-in without changing application-managed configuration. */
|
|
38
|
+
setStatus(clientId: string, payload: UpdateOAuthClientStatusPayload): Promise<OAuthClient> {
|
|
39
|
+
return this.put(`/${encodeURIComponent(clientId)}/status`, { payload });
|
|
40
|
+
}
|
|
41
|
+
|
|
36
42
|
remove(clientId: string): Promise<SuccessResponse> {
|
|
37
43
|
return this.del(`/${clientId}`);
|
|
38
44
|
}
|
package/src/OAuthProvidersApi.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
OAuthProviderAccessTokenResponse,
|
|
6
6
|
OAuthProviderAuthorizeResponse,
|
|
7
7
|
OAuthProviderAuthStatus,
|
|
8
|
+
OAuthProviderTokenRequest,
|
|
8
9
|
SuccessResponse,
|
|
9
10
|
UpdateOAuthProviderPayload,
|
|
10
11
|
} from '@vertesia/common';
|
|
@@ -55,8 +56,12 @@ export default class OAuthProvidersApi extends ApiTopic {
|
|
|
55
56
|
return this.post(`/${id}/connect`, { payload: {} });
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Get an access token from the provider. With `scope`, asks for those scopes instead of the provider's default
|
|
61
|
+
* scopes; each must be in the provider's `default_scopes` or `allowed_scopes` (client_credentials providers only).
|
|
62
|
+
*/
|
|
63
|
+
getToken(id: string, request: OAuthProviderTokenRequest = {}): Promise<OAuthProviderAccessTokenResponse> {
|
|
64
|
+
return this.post(`/${id}/token`, { payload: request });
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
disconnect(id: string): Promise<SuccessResponse> {
|
package/src/RunsApi.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
ExecutionRunRef,
|
|
9
9
|
FindPayload,
|
|
10
10
|
FindRunResult,
|
|
11
|
+
GetRunQuery,
|
|
11
12
|
InteractionExecutionResult,
|
|
12
13
|
PopulatedExecutionRun,
|
|
13
14
|
RunClonePayload,
|
|
@@ -67,10 +68,14 @@ export class RunsApi extends ApiTopic {
|
|
|
67
68
|
* Get a run by id
|
|
68
69
|
*
|
|
69
70
|
* @param id
|
|
71
|
+
* @param query response options, e.g. `{ include_prompt: false }` to omit the rendered prompt
|
|
70
72
|
* @returns InteractionResult
|
|
71
73
|
**/
|
|
72
|
-
async retrieve<ResultT = unknown, ParamsT = unknown>(
|
|
73
|
-
|
|
74
|
+
async retrieve<ResultT = unknown, ParamsT = unknown>(
|
|
75
|
+
id: string,
|
|
76
|
+
query?: GetRunQuery,
|
|
77
|
+
): Promise<EnhancedExecutionRun<ResultT, ParamsT>> {
|
|
78
|
+
const r = await this.get<ExecutionRun<ParamsT>>(`/${id}`, { query });
|
|
74
79
|
return enhanceExecutionRun<ResultT, ParamsT>(r);
|
|
75
80
|
}
|
|
76
81
|
|
package/src/StreamSource.ts
CHANGED
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
export class StreamSource {
|
|
2
|
+
/**
|
|
3
|
+
* @param size the stream's length in bytes, when it is known in advance (e.g. from a response's declared
|
|
4
|
+
* length, see {@link responseBodyLength}). An upload then streams the content with that `Content-Length`
|
|
5
|
+
* instead of buffering it, and fails if the stream ends short of it or runs past it.
|
|
6
|
+
*/
|
|
2
7
|
constructor(
|
|
3
8
|
public stream: ReadableStream,
|
|
4
9
|
public name: string,
|
|
5
10
|
public type?: string,
|
|
6
11
|
public id?: string,
|
|
12
|
+
public size?: number,
|
|
7
13
|
) {}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The same content as a `Blob` that can be sent more than once without being held in memory, such as a
|
|
17
|
+
* blob backed by a local file. Uploads send it instead of {@link stream} when there is one, so a failed
|
|
18
|
+
* transfer can be retried. A plain stream source has none.
|
|
19
|
+
*/
|
|
20
|
+
replayableBody(): Promise<Blob | undefined> {
|
|
21
|
+
return Promise.resolve(undefined);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The length of a response body as it will be read, from its `Content-Length`: undefined when the header is
|
|
27
|
+
* missing or invalid, or when the body is content-encoded, since `fetch` decodes it and the bytes read then differ
|
|
28
|
+
* from the declared length.
|
|
29
|
+
*/
|
|
30
|
+
export function responseBodyLength(response: Response): number | undefined {
|
|
31
|
+
const encoding = response.headers.get('content-encoding')?.trim().toLowerCase();
|
|
32
|
+
if (encoding && encoding !== 'identity') return undefined;
|
|
33
|
+
const header = response.headers.get('content-length');
|
|
34
|
+
if (header === null || !/^\d+$/.test(header.trim())) return undefined;
|
|
35
|
+
const length = Number(header.trim());
|
|
36
|
+
return Number.isSafeInteger(length) ? length : undefined;
|
|
8
37
|
}
|
package/src/UsersApi.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
-
import type { DeleteByIdResult, UpdateUserPayload, User } from '@vertesia/common';
|
|
2
|
+
import type { CreateUserPayload, DeleteByIdResult, UpdateUserPayload, User } from '@vertesia/common';
|
|
3
3
|
|
|
4
4
|
export default class UsersApi extends ApiTopic {
|
|
5
5
|
constructor(parent: ClientBase) {
|
|
6
6
|
super(parent, '/api/v1/users');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Add a user to the current account with the member role, without sending an invitation.
|
|
11
|
+
* Creates the user when no user has the address; otherwise adds the existing one, leaving its
|
|
12
|
+
* profile unchanged. Repeating the call returns the same user.
|
|
13
|
+
*/
|
|
14
|
+
create(payload: CreateUserPayload): Promise<User> {
|
|
15
|
+
return this.post('', { payload });
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
retrieve(userId: string): Promise<User> {
|
|
10
19
|
return this.get(`/${userId}`);
|
|
11
20
|
}
|