@vertesia/client 1.6.0-dev.20261008.064737Z → 1.6.0-dev.20261014.015055Z
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/store/CostApi.d.ts +0 -5
- package/lib/store/CostApi.d.ts.map +1 -1
- package/lib/store/CostApi.js +0 -7
- package/lib/store/CostApi.js.map +1 -1
- package/lib/store/ObjectsApi.d.ts +8 -1
- package/lib/store/ObjectsApi.d.ts.map +1 -1
- package/lib/store/ObjectsApi.js +11 -0
- package/lib/store/ObjectsApi.js.map +1 -1
- package/lib/store/ProcessApi.d.ts +4 -0
- package/lib/store/ProcessApi.d.ts.map +1 -1
- package/lib/store/ProcessApi.js +8 -1
- package/lib/store/ProcessApi.js.map +1 -1
- package/lib/store/ProcessTestRunApi.d.ts +3 -0
- package/lib/store/ProcessTestRunApi.d.ts.map +1 -1
- package/lib/store/ProcessTestRunApi.js +9 -5
- package/lib/store/ProcessTestRunApi.js.map +1 -1
- package/lib/vertesia-client.js +1 -1
- package/lib/vertesia-client.js.map +1 -1
- package/package.json +8 -8
- package/src/store/CostApi.ts +0 -8
- package/src/store/ObjectsApi.ts +13 -0
- package/src/store/ProcessApi.ts +8 -1
- package/src/store/ProcessTestRunApi.ts +9 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/client",
|
|
3
|
-
"version": "1.6.0-dev.
|
|
3
|
+
"version": "1.6.0-dev.20261014.015055Z",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
],
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@types/node": "^24.19.
|
|
15
|
+
"@types/node": "^24.19.1",
|
|
16
16
|
"@vertesia/tsconfig": "0.1.0",
|
|
17
|
-
"rolldown": "1.2.
|
|
17
|
+
"rolldown": "1.2.12",
|
|
18
18
|
"typescript": "7.0.2",
|
|
19
|
-
"vitest": "5.0.
|
|
19
|
+
"vitest": "5.0.3"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@llumiverse/common": "1.6.0-dev.
|
|
23
|
-
"@vertesia/api-fetch-client": "1.6.0-dev.
|
|
24
|
-
"@vertesia/common": "1.6.0-dev.
|
|
22
|
+
"@llumiverse/common": "1.6.0-dev.20261014.012028Z",
|
|
23
|
+
"@vertesia/api-fetch-client": "1.6.0-dev.20261014.015055Z",
|
|
24
|
+
"@vertesia/common": "1.6.0-dev.20261014.015055Z",
|
|
25
25
|
"eventsource": "^5.1.2"
|
|
26
26
|
},
|
|
27
27
|
"exports": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"ai",
|
|
50
50
|
"typescript"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "468240ecf939f968e1324116be26386cdf5ada49",
|
|
53
53
|
"scripts": {
|
|
54
54
|
"lint": "biome lint src",
|
|
55
55
|
"clean:lib": "rimraf ./lib ./tsconfig.tsbuildinfo",
|
package/src/store/CostApi.ts
CHANGED
|
@@ -23,14 +23,6 @@ export class CostApi extends ApiTopic {
|
|
|
23
23
|
return this.post('/analytics', { payload: query });
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
/**
|
|
27
|
-
* Get platform-wide cost analytics across all customers.
|
|
28
|
-
* Requires Vertesia staff privileges. Defaults to group_by='account'.
|
|
29
|
-
*/
|
|
30
|
-
getGlobalAnalytics(query: CostAnalyticsQuery = {}): Promise<CostAnalyticsResponse> {
|
|
31
|
-
return this.post('/analytics/global', { payload: query });
|
|
32
|
-
}
|
|
33
|
-
|
|
34
26
|
/**
|
|
35
27
|
* Get current list prices and effective prices for the selected period.
|
|
36
28
|
*/
|
package/src/store/ObjectsApi.ts
CHANGED
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
type ObjectSearchResponse,
|
|
40
40
|
type ProjectedContentObjectApiResponse,
|
|
41
41
|
type SetObjectEmbeddingsResponse,
|
|
42
|
+
type SetObjectTextPayload,
|
|
42
43
|
type StartContentObjectExportRequest,
|
|
43
44
|
type StartContentObjectExportResponse,
|
|
44
45
|
type SupportedEmbeddingTypes,
|
|
@@ -280,6 +281,18 @@ export class ObjectsApi extends ApiTopic {
|
|
|
280
281
|
return this.get(`/${id}/text`);
|
|
281
282
|
}
|
|
282
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Store the extracted text of an object as a text artifact.
|
|
286
|
+
*
|
|
287
|
+
* Pass the content etag the text was extracted from so the server records it as the
|
|
288
|
+
* object `text_etag`, allowing extraction to be skipped while the content is unchanged.
|
|
289
|
+
*/
|
|
290
|
+
setObjectText(id: string, payload: SetObjectTextPayload): Promise<ContentObjectTextResponse> {
|
|
291
|
+
return this.put(`/${id}/text`, {
|
|
292
|
+
payload,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
283
296
|
async upload(source: StreamSource | File) {
|
|
284
297
|
const isStream = source instanceof StreamSource;
|
|
285
298
|
// get a signed URL to upload the file a computed mimeType and the file object id.
|
package/src/store/ProcessApi.ts
CHANGED
|
@@ -82,8 +82,15 @@ export class ProcessApi extends ApiTopic {
|
|
|
82
82
|
return this.del(`/${processId}/test-suites/${suiteId}`);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Start a test run against a stored process revision. Set `idempotency_key` to make the call
|
|
87
|
+
* safe to retry: without one, a replay would start a second run, so no client retry applies.
|
|
88
|
+
*/
|
|
85
89
|
startTestRun(processId: string, payload: StartProcessTestRunPayload): Promise<ProcessTestRun> {
|
|
86
|
-
return this.post(`/${processId}/test-runs`, {
|
|
90
|
+
return this.post(`/${processId}/test-runs`, {
|
|
91
|
+
payload,
|
|
92
|
+
retryPolicy: payload.idempotency_key ? undefined : false,
|
|
93
|
+
});
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
listTestRuns(processId: string, query?: ListProcessTestRunsQuery): Promise<ProcessTestRun[]> {
|
|
@@ -17,13 +17,17 @@ export class ProcessTestRunApi extends ApiTopic {
|
|
|
17
17
|
* Start a test run against an in-code process or an inline definition, with the scenarios
|
|
18
18
|
* supplied in the request instead of a stored suite. Use
|
|
19
19
|
* `client.store.processes.startTestRun()` for stored process definitions and their suites.
|
|
20
|
+
*
|
|
21
|
+
* Set `idempotency_key` to make the call safe to retry: the client's retry policy then applies,
|
|
22
|
+
* and a replayed request returns the run the first one started.
|
|
20
23
|
*/
|
|
21
24
|
submit(payload: SubmitProcessTestRunPayload): Promise<ProcessTestRun> {
|
|
22
|
-
//
|
|
23
|
-
// would create a second run. Opt out of any client-level
|
|
24
|
-
// than relying on POST being absent from its method list.
|
|
25
|
-
// unaffected: those happen before the request reaches the
|
|
26
|
-
|
|
25
|
+
// Without a key, starting a run is not idempotent: a request abandoned client-side can still
|
|
26
|
+
// complete server-side, so a replay would create a second run. Opt out of any client-level
|
|
27
|
+
// retry policy explicitly rather than relying on POST being absent from its method list.
|
|
28
|
+
// Rate-limiter pacing retries are unaffected: those happen before the request reaches the
|
|
29
|
+
// handler.
|
|
30
|
+
return this.post('/', { payload, retryPolicy: payload.idempotency_key ? undefined : false });
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
retrieve(runId: string): Promise<ProcessTestRun> {
|