@vertesia/client 0.78.0 → 0.79.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.
- package/lib/cjs/AppsApi.js +8 -0
- package/lib/cjs/AppsApi.js.map +1 -1
- package/lib/cjs/InteractionBase.js.map +1 -1
- package/lib/cjs/InteractionCatalogApi.js +64 -0
- package/lib/cjs/InteractionCatalogApi.js.map +1 -0
- package/lib/cjs/InteractionOutput.js +300 -0
- package/lib/cjs/InteractionOutput.js.map +1 -0
- package/lib/cjs/InteractionResult.example.js +57 -0
- package/lib/cjs/InteractionResult.example.js.map +1 -0
- package/lib/cjs/InteractionsApi.js +28 -6
- package/lib/cjs/InteractionsApi.js.map +1 -1
- package/lib/cjs/ProjectsApi.js +2 -1
- package/lib/cjs/ProjectsApi.js.map +1 -1
- package/lib/cjs/RunsApi.js +12 -4
- package/lib/cjs/RunsApi.js.map +1 -1
- package/lib/cjs/client.js +122 -39
- package/lib/cjs/client.js.map +1 -1
- package/lib/cjs/execute.js +6 -0
- package/lib/cjs/execute.js.map +1 -1
- package/lib/cjs/index.js +6 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/store/CollectionsApi.js +21 -0
- package/lib/cjs/store/CollectionsApi.js.map +1 -1
- package/lib/cjs/store/FilesApi.js +9 -8
- package/lib/cjs/store/FilesApi.js.map +1 -1
- package/lib/cjs/store/ObjectsApi.js +36 -18
- package/lib/cjs/store/ObjectsApi.js.map +1 -1
- package/lib/cjs/store/TypesApi.js +1 -1
- package/lib/cjs/store/TypesApi.js.map +1 -1
- package/lib/cjs/store/WorkflowsApi.js +151 -2
- package/lib/cjs/store/WorkflowsApi.js.map +1 -1
- package/lib/cjs/store/client.js +17 -1
- package/lib/cjs/store/client.js.map +1 -1
- package/lib/cjs/store/version.js +6 -0
- package/lib/cjs/store/version.js.map +1 -0
- package/lib/esm/AppsApi.js +8 -0
- package/lib/esm/AppsApi.js.map +1 -1
- package/lib/esm/InteractionBase.js.map +1 -1
- package/lib/esm/InteractionCatalogApi.js +60 -0
- package/lib/esm/InteractionCatalogApi.js.map +1 -0
- package/lib/esm/InteractionOutput.js +293 -0
- package/lib/esm/InteractionOutput.js.map +1 -0
- package/lib/esm/InteractionResult.example.js +55 -0
- package/lib/esm/InteractionResult.example.js.map +1 -0
- package/lib/esm/InteractionsApi.js +29 -7
- package/lib/esm/InteractionsApi.js.map +1 -1
- package/lib/esm/ProjectsApi.js +1 -1
- package/lib/esm/ProjectsApi.js.map +1 -1
- package/lib/esm/RunsApi.js +12 -4
- package/lib/esm/RunsApi.js.map +1 -1
- package/lib/esm/client.js +121 -38
- package/lib/esm/client.js.map +1 -1
- package/lib/esm/execute.js +5 -0
- package/lib/esm/execute.js.map +1 -1
- package/lib/esm/index.js +3 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/store/CollectionsApi.js +21 -0
- package/lib/esm/store/CollectionsApi.js.map +1 -1
- package/lib/esm/store/FilesApi.js +9 -8
- package/lib/esm/store/FilesApi.js.map +1 -1
- package/lib/esm/store/ObjectsApi.js +36 -18
- package/lib/esm/store/ObjectsApi.js.map +1 -1
- package/lib/esm/store/TypesApi.js +1 -1
- package/lib/esm/store/TypesApi.js.map +1 -1
- package/lib/esm/store/WorkflowsApi.js +151 -2
- package/lib/esm/store/WorkflowsApi.js.map +1 -1
- package/lib/esm/store/client.js +17 -1
- package/lib/esm/store/client.js.map +1 -1
- package/lib/esm/store/version.js +3 -0
- package/lib/esm/store/version.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/AccountApi.d.ts +1 -0
- package/lib/types/AccountsApi.d.ts +1 -0
- package/lib/types/AnalyticsApi.d.ts +1 -0
- package/lib/types/ApiKeysApi.d.ts +1 -0
- package/lib/types/AppsApi.d.ts +8 -1
- package/lib/types/AppsApi.d.ts.map +1 -1
- package/lib/types/CommandsApi.d.ts +1 -0
- package/lib/types/EnvironmentsApi.d.ts +1 -0
- package/lib/types/GroupsApi.d.ts +1 -0
- package/lib/types/IamApi.d.ts +1 -0
- package/lib/types/InteractionBase.d.ts +3 -2
- package/lib/types/InteractionBase.d.ts.map +1 -1
- package/lib/types/InteractionCatalogApi.d.ts +37 -0
- package/lib/types/InteractionCatalogApi.d.ts.map +1 -0
- package/lib/types/InteractionOutput.d.ts +175 -0
- package/lib/types/InteractionOutput.d.ts.map +1 -0
- package/lib/types/InteractionResult.example.d.ts +7 -0
- package/lib/types/InteractionResult.example.d.ts.map +1 -0
- package/lib/types/InteractionsApi.d.ts +16 -6
- package/lib/types/InteractionsApi.d.ts.map +1 -1
- package/lib/types/ProjectsApi.d.ts +2 -1
- package/lib/types/ProjectsApi.d.ts.map +1 -1
- package/lib/types/PromptsApi.d.ts +1 -0
- package/lib/types/RefsApi.d.ts +1 -0
- package/lib/types/RunsApi.d.ts +7 -4
- package/lib/types/RunsApi.d.ts.map +1 -1
- package/lib/types/StreamSource.d.ts +1 -0
- package/lib/types/TrainingApi.d.ts +1 -0
- package/lib/types/UsersApi.d.ts +1 -0
- package/lib/types/client.d.ts +15 -5
- package/lib/types/client.d.ts.map +1 -1
- package/lib/types/execute.d.ts +5 -3
- package/lib/types/execute.d.ts.map +1 -1
- package/lib/types/index.d.ts +6 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/nodejs/NodeStreamSource.d.ts +1 -0
- package/lib/types/nodejs/index.d.ts +1 -0
- package/lib/types/store/AgentsApi.d.ts +1 -0
- package/lib/types/store/AnalyzeDocApi.d.ts +1 -0
- package/lib/types/store/CollectionsApi.d.ts +8 -0
- package/lib/types/store/CollectionsApi.d.ts.map +1 -1
- package/lib/types/store/CommandsApi.d.ts +1 -0
- package/lib/types/store/EmbeddingsApi.d.ts +1 -0
- package/lib/types/store/FilesApi.d.ts +4 -2
- package/lib/types/store/FilesApi.d.ts.map +1 -1
- package/lib/types/store/ObjectsApi.d.ts +13 -15
- package/lib/types/store/ObjectsApi.d.ts.map +1 -1
- package/lib/types/store/TypesApi.d.ts +1 -0
- package/lib/types/store/WorkflowsApi.d.ts +13 -0
- package/lib/types/store/WorkflowsApi.d.ts.map +1 -1
- package/lib/types/store/client.d.ts +8 -1
- package/lib/types/store/client.d.ts.map +1 -1
- package/lib/types/store/errors.d.ts +1 -0
- package/lib/types/store/index.d.ts +1 -0
- package/lib/types/store/version.d.ts +3 -0
- package/lib/types/store/version.d.ts.map +1 -0
- package/lib/vertesia-client.js +1 -1
- package/lib/vertesia-client.js.map +1 -1
- package/package.json +54 -54
- package/src/AppsApi.ts +10 -1
- package/src/InteractionBase.ts +3 -3
- package/src/InteractionOutput.test.ts +305 -0
- package/src/InteractionOutput.ts +328 -0
- package/src/InteractionResult.example.ts +72 -0
- package/src/InteractionsApi.ts +28 -10
- package/src/RunsApi.ts +7 -4
- package/src/client.ts +18 -0
- package/src/execute.ts +11 -5
- package/src/index.ts +1 -0
- package/src/store/CollectionsApi.ts +24 -0
- package/src/store/ObjectsApi.ts +40 -13
- package/src/store/TypesApi.ts +1 -1
- package/src/store/WorkflowsApi.ts +5 -2
- package/src/store/client.ts +18 -1
- package/src/store/version.ts +2 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { CompletionResult } from '@llumiverse/common';
|
|
2
|
+
import { ExecutionRun, InteractionExecutionResult } from '@vertesia/common';
|
|
3
|
+
/**
|
|
4
|
+
* Symbol used to mark InteractionOutputArray instances.
|
|
5
|
+
* This allows us to detect if a CompletionResult[] has already been wrapped.
|
|
6
|
+
*/
|
|
7
|
+
export declare const IS_INTERACTION_OUTPUT: unique symbol;
|
|
8
|
+
export declare function enhanceInteractionExecutionResult<ResultT = any, ParamsT = any>(r: InteractionExecutionResult<ParamsT>): EnhancedInteractionExecutionResult<ResultT, ParamsT>;
|
|
9
|
+
export declare function enhanceExecutionRun<ResultT = any, ParamsT = any>(r: ExecutionRun<ParamsT>): EnhancedExecutionRun<ResultT, ParamsT>;
|
|
10
|
+
/**
|
|
11
|
+
* A convenient wrapper around CompletionResult[] that provides ergonomic accessors
|
|
12
|
+
* for different result types (text, JSON/objects, images) from interaction executions.
|
|
13
|
+
*
|
|
14
|
+
* Use the static from() method to create a proxied array that acts as both
|
|
15
|
+
* an array and has these convenience methods.
|
|
16
|
+
*
|
|
17
|
+
* @template T - The expected type of JSON/object results. Defaults to any.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* // Recommended: Using the static from() method
|
|
22
|
+
* const output = InteractionOutput.from<MyResponse>(run.result);
|
|
23
|
+
* output[0]; // CompletionResult (array access)
|
|
24
|
+
* output.length; // number (array property)
|
|
25
|
+
* const obj = output.object(); // MyResponse (custom method)
|
|
26
|
+
* const text = output.text(); // string (custom getter)
|
|
27
|
+
*
|
|
28
|
+
* // Alternative: Using the class directly (less common)
|
|
29
|
+
* const output = new InteractionOutput<MyResponse>(run.result);
|
|
30
|
+
* const obj = output.object(); // Returns MyResponse
|
|
31
|
+
* const objs = output.objects(); // Returns MyResponse[]
|
|
32
|
+
*
|
|
33
|
+
* // Override type for specific objects
|
|
34
|
+
* interface OtherType { title: string; }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class InteractionOutput<T = any> {
|
|
38
|
+
readonly results: CompletionResult[];
|
|
39
|
+
/**
|
|
40
|
+
* The raw completion results array.
|
|
41
|
+
* Access this when you need to work with the underlying CompletionResult[] directly.
|
|
42
|
+
*/
|
|
43
|
+
constructor(results: CompletionResult[]);
|
|
44
|
+
/**
|
|
45
|
+
* Create an interaction output that acts as both an array and has convenience methods.
|
|
46
|
+
* This is the recommended way to work with interaction execution results.
|
|
47
|
+
*
|
|
48
|
+
* @template T - The expected type of JSON/object results. Defaults to any.
|
|
49
|
+
* @param results - The raw CompletionResult array from an interaction execution
|
|
50
|
+
* @returns A proxied array with convenience methods
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* interface MyResponse { name: string; age: number; }
|
|
55
|
+
* const output = InteractionOutput.from<MyResponse>(run.result);
|
|
56
|
+
*
|
|
57
|
+
* // Array access
|
|
58
|
+
* output[0]; // CompletionResult
|
|
59
|
+
* output.length; // number
|
|
60
|
+
*
|
|
61
|
+
* // Convenience methods
|
|
62
|
+
* const obj = output.object(); // MyResponse
|
|
63
|
+
* const text = output.text(); // string
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
static from<T = any>(results: CompletionResult[] | InteractionOutputArray<T> | Record<string, any> | string | null | undefined): InteractionOutputArray<T>;
|
|
67
|
+
static isInteractionOutputArray(obj: any): boolean;
|
|
68
|
+
get isEmpty(): boolean;
|
|
69
|
+
hasObject(): boolean;
|
|
70
|
+
hasText(): boolean;
|
|
71
|
+
hasImage(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Get the concatenated text from all text results.
|
|
74
|
+
* Returns an empty string if no text results exist.
|
|
75
|
+
*/
|
|
76
|
+
text(delimiter?: string): string;
|
|
77
|
+
/**
|
|
78
|
+
* Get an array of all text values from text results.
|
|
79
|
+
*/
|
|
80
|
+
texts(): string[];
|
|
81
|
+
/**
|
|
82
|
+
* Get the first JSON result as a parsed object.
|
|
83
|
+
* If no JSON result exists, attempts to parse the concatenated text as JSON.
|
|
84
|
+
* @returns The first JSON result typed as T (the class generic type)
|
|
85
|
+
* @throws Error if no JSON result found and text cannot be parsed as JSON
|
|
86
|
+
*/
|
|
87
|
+
object(): T;
|
|
88
|
+
/**
|
|
89
|
+
* Get all JSON results as parsed objects.
|
|
90
|
+
* @returns An array of all JSON results typed as T[] (the class generic type)
|
|
91
|
+
*/
|
|
92
|
+
objects(): T[];
|
|
93
|
+
/**
|
|
94
|
+
* Get a specific JSON result by index as a parsed object.
|
|
95
|
+
* @template U - The type of the object at this index. Defaults to T (the class generic).
|
|
96
|
+
* @param index - The zero-based index of the JSON result
|
|
97
|
+
* @returns The JSON result at the specified index typed as U
|
|
98
|
+
* @throws Error if the index is out of bounds
|
|
99
|
+
*/
|
|
100
|
+
objectAt<U = T>(index: number): U;
|
|
101
|
+
/**
|
|
102
|
+
* Get the first image result (base64 data URL or URL).
|
|
103
|
+
* @throws Error if no image result exists
|
|
104
|
+
*/
|
|
105
|
+
image(): string;
|
|
106
|
+
/**
|
|
107
|
+
* Get an array of all image values (base64 data URLs or URLs).
|
|
108
|
+
*/
|
|
109
|
+
images(): string[];
|
|
110
|
+
/**
|
|
111
|
+
* Convert all results to a string representation.
|
|
112
|
+
* Text and image results are used as-is, JSON results are stringified with the specified indent.
|
|
113
|
+
* All parts are joined using the specified separator.
|
|
114
|
+
*
|
|
115
|
+
* @param separator - The separator to use between parts (default: '\n')
|
|
116
|
+
* @param indent - The indentation to use for JSON.stringify (default: 0 = no formatting)
|
|
117
|
+
* @returns A string representation of all results
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* const output = InteractionOutput.from(results);
|
|
122
|
+
* output.stringify(); // Each part on a new line, compact JSON
|
|
123
|
+
* output.stringify('\n\n', 2); // Double newlines between parts, formatted JSON
|
|
124
|
+
* output.stringify(' '); // Space-separated, compact JSON
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
stringify(separator?: string, indent?: number): string;
|
|
128
|
+
/**
|
|
129
|
+
* Convert to string representation (concatenated text).
|
|
130
|
+
* Useful for template literals or string coercion.
|
|
131
|
+
*/
|
|
132
|
+
toString(): string;
|
|
133
|
+
/**
|
|
134
|
+
* Convert to JSON representation.
|
|
135
|
+
* Attempts to return the first JSON object, falls back to concatenated text.
|
|
136
|
+
*/
|
|
137
|
+
toJSON(): CompletionResult[];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Type representing a CompletionResult array enhanced with InteractionOutput methods.
|
|
141
|
+
* This is the return type of InteractionOutput.from() - it acts as both an array and has convenience methods.
|
|
142
|
+
*/
|
|
143
|
+
export type InteractionOutputArray<T = any> = CompletionResult[] & InteractionOutput<T>;
|
|
144
|
+
export interface EnhancedInteractionExecutionResult<ResultT = any, ParamsT = any> extends InteractionExecutionResult<ParamsT> {
|
|
145
|
+
result: InteractionOutputArray<ResultT>;
|
|
146
|
+
}
|
|
147
|
+
export interface EnhancedExecutionRun<ResultT = any, ParamsT = any> extends ExecutionRun<ParamsT> {
|
|
148
|
+
result: InteractionOutputArray<ResultT>;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Creates a proxied array that acts as both a CompletionResult[] and has InteractionOutput convenience methods.
|
|
152
|
+
* Note: It's recommended to use InteractionOutput.from() instead of calling this function directly.
|
|
153
|
+
*
|
|
154
|
+
* @template T - The expected type of JSON/object results. Defaults to any.
|
|
155
|
+
* @param results - The raw CompletionResult array from the interaction execution
|
|
156
|
+
* @returns A proxy that behaves as both an array and has convenience methods
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* interface MyResponse { name: string; age: number; }
|
|
161
|
+
* const output = createInteractionOutput<MyResponse>(run.result);
|
|
162
|
+
*
|
|
163
|
+
* // Array access
|
|
164
|
+
* output[0]; // CompletionResult
|
|
165
|
+
* output.length; // number
|
|
166
|
+
* output.map(r => r.type) // string[]
|
|
167
|
+
*
|
|
168
|
+
* // Convenience methods
|
|
169
|
+
* const obj = output.object(); // MyResponse
|
|
170
|
+
* const text = output.text(); // string
|
|
171
|
+
* const img = output.image(); // string
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
export declare function createInteractionOutput<T = any>(results: CompletionResult[]): InteractionOutputArray<T>;
|
|
175
|
+
//# sourceMappingURL=InteractionOutput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractionOutput.d.ts","sourceRoot":"","sources":["../../src/InteractionOutput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAE5E;;;GAGG;AACH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;IAQf;;OAEG;IACH,MAAM,IAAI,MAAM,EAAE;IAMlB;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,SAAS,SAAO,EAAE,MAAM,SAAI,GAAG,MAAM;IAa/C;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;OAGG;IACH,MAAM,IAAI,gBAAgB,EAAE;CAG/B;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,GAAG,IAAI,gBAAgB,EAAE,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAExF,MAAM,WAAW,kCAAkC,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,CAAE,SAAQ,0BAA0B,CAAC,OAAO,CAAC;IACzH,MAAM,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,CAAE,SAAQ,YAAY,CAAC,OAAO,CAAC;IAC7F,MAAM,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAwBvG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractionResult.example.d.ts","sourceRoot":"","sources":["../../src/InteractionResult.example.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
|
|
2
|
-
import { AsyncExecutionPayload, ComputeInteractionFacetPayload,
|
|
2
|
+
import { AsyncExecutionPayload, ComputeInteractionFacetPayload, GenerateInteractionPayload, GenerateTestDataPayload, ImprovePromptPayload, ImprovePromptPayloadConfig, Interaction, InteractionCreatePayload, InteractionEndpoint, InteractionEndpointQuery, InteractionExecutionPayload, InteractionForkPayload, InteractionPublishPayload, InteractionRef, InteractionRefWithSchema, InteractionSearchPayload, InteractionsExportPayload, InteractionUpdatePayload, RateLimitRequestPayload, RateLimitRequestResponse } from "@vertesia/common";
|
|
3
|
+
import { InteractionCatalogApi } from "./InteractionCatalogApi.js";
|
|
4
|
+
import { EnhancedExecutionRun, EnhancedInteractionExecutionResult } from "./InteractionOutput.js";
|
|
3
5
|
export interface ComputeInteractionFacetsResponse {
|
|
4
6
|
tags?: {
|
|
5
7
|
_id: string;
|
|
@@ -18,6 +20,7 @@ export interface AsyncExecutionResult {
|
|
|
18
20
|
workflowId: string;
|
|
19
21
|
}
|
|
20
22
|
export default class InteractionsApi extends ApiTopic {
|
|
23
|
+
catalog: InteractionCatalogApi;
|
|
21
24
|
constructor(parent: ClientBase);
|
|
22
25
|
/**
|
|
23
26
|
* Get the list of all interactions in the current project
|
|
@@ -96,7 +99,7 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
96
99
|
* @throws 500 if interaction execution fails
|
|
97
100
|
* @throws 500 if interaction execution times out
|
|
98
101
|
**/
|
|
99
|
-
execute<
|
|
102
|
+
execute<ResultT = any, ParamsT = any>(id: string, payload?: InteractionExecutionPayload, onChunk?: (chunk: string) => void): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>>;
|
|
100
103
|
/**
|
|
101
104
|
* Same as execute but uses the interaction name selector instead of the id.
|
|
102
105
|
*
|
|
@@ -112,7 +115,7 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
112
115
|
* @param onChunk
|
|
113
116
|
* @returns
|
|
114
117
|
*/
|
|
115
|
-
executeByName<
|
|
118
|
+
executeByName<ResultT = any, ParamsT = any>(nameWithTag: string, payload?: InteractionExecutionPayload, onChunk?: (chunk: string) => void): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>>;
|
|
116
119
|
/**
|
|
117
120
|
* Execute an interaction in an workflow
|
|
118
121
|
* @param payload
|
|
@@ -131,10 +134,10 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
131
134
|
generateTestData(id: string, payload: GenerateTestDataPayload): Promise<any[]>;
|
|
132
135
|
/**
|
|
133
136
|
* Suggest Improvement for a prompt
|
|
137
|
+
* @deprecated use suggestPromptImprovements instead
|
|
134
138
|
*/
|
|
135
|
-
suggestImprovements(id: string, payload:
|
|
136
|
-
|
|
137
|
-
}>;
|
|
139
|
+
suggestImprovements<ResultT = any, ParamsT = any>(id: string, payload: ImprovePromptPayloadConfig): Promise<EnhancedExecutionRun<ResultT, ParamsT>>;
|
|
140
|
+
suggestPromptImprovements<ResultT = any, ParamsT = any>(payload: ImprovePromptPayload): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>>;
|
|
138
141
|
/**
|
|
139
142
|
* List the versions of the interaction. Returns an empty array if no versions are found
|
|
140
143
|
* @param id
|
|
@@ -147,4 +150,11 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
147
150
|
* @returns the versions list or an empty array if no forks are found
|
|
148
151
|
*/
|
|
149
152
|
listForks(id: string): Promise<InteractionRef[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Request a time slot to execute an interaction with a given environment / model
|
|
155
|
+
* @param payload RateLimitRequestPayload
|
|
156
|
+
* @returns RateLimitRequestResponse with delay_ms
|
|
157
|
+
*/
|
|
158
|
+
requestSlot(payload: RateLimitRequestPayload): Promise<RateLimitRequestResponse>;
|
|
150
159
|
}
|
|
160
|
+
//# sourceMappingURL=InteractionsApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionsApi.d.ts","sourceRoot":"","sources":["../../src/InteractionsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAe,MAAM,4BAA4B,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"InteractionsApi.d.ts","sourceRoot":"","sources":["../../src/InteractionsApi.ts"],"names":[],"mappings":"AAAA,OA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AAO,CAAC,oBAAoB,CAAC;IAI3E,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,WAAW,CAAC;IAM7E,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC;IAMvE;;QAEI;IACJ,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAQpF;;QAEI;IACJ,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAO9E;;;OAGG;IACG,mBAAmB,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAOnJ,yBAAyB,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,kCAAkC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAQ3J;;;;OAIG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAInD;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAIhD;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAInF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
|
|
2
2
|
import { AwsConfiguration, GithubConfiguration, GladiaConfiguration, ICreateProjectPayload, MagicPdfConfiguration, Project, ProjectIntegrationListEntry, ProjectRef, SupportedIntegrations } from "@vertesia/common";
|
|
3
|
-
export
|
|
3
|
+
export declare class ProjectsApi extends ApiTopic {
|
|
4
4
|
constructor(parent: ClientBase);
|
|
5
5
|
list(account?: string[]): Promise<ProjectRef[]>;
|
|
6
6
|
retrieve(projectId: string): Promise<Project>;
|
|
@@ -15,3 +15,4 @@ declare class IntegrationsConfigurationApi extends ApiTopic {
|
|
|
15
15
|
update(projectId: string, integrationId: string, payload: any): Promise<GladiaConfiguration | GithubConfiguration>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
18
|
+
//# sourceMappingURL=ProjectsApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsApi.d.ts","sourceRoot":"","sources":["../../src/ProjectsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,OAAO,EAAE,2BAA2B,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAErN,
|
|
1
|
+
{"version":3,"file":"ProjectsApi.d.ts","sourceRoot":"","sources":["../../src/ProjectsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,OAAO,EAAE,2BAA2B,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAErN,qBAAa,WAAY,SAAQ,QAAQ;gBACzB,MAAM,EAAE,UAAU;IAI9B,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAI/C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7C,MAAM,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;IAMxD,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAMtE,YAAY,EAAE,4BAA4B,CAA0C;CAEvF;AAED,cAAM,4BAA6B,SAAQ,QAAQ;gBAEnC,MAAM,EAAE,UAAU;IAI9B,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,EAAE,CAAC;IAI/D,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,qBAAqB,GAAG,OAAO,CAAC,mBAAmB,GAAG,mBAAmB,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,SAAS,CAAC;IAS5K,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;CAMrH"}
|
package/lib/types/RefsApi.d.ts
CHANGED
package/lib/types/RunsApi.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
|
|
2
|
-
import { CheckpointConversationPayload, ComputeRunFacetPayload, ExecutionRun, ExecutionRunRef, FindPayload, RunCreatePayload, RunListingFilters, RunListingQueryOptions, RunSearchPayload, ToolResultsPayload, UserMessagePayload } from "@vertesia/common";
|
|
3
1
|
import type { ExecutionResponse } from "@llumiverse/common";
|
|
2
|
+
import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
|
|
3
|
+
import { CheckpointConversationPayload, ComputeRunFacetPayload, ExecutionRun, ExecutionRunRef, FindPayload, PopulatedExecutionRun, RunCreatePayload, RunListingFilters, RunListingQueryOptions, RunSearchPayload, ToolResultsPayload, UserMessagePayload } from "@vertesia/common";
|
|
4
|
+
import { EnhancedExecutionRun } from "./InteractionOutput.js";
|
|
4
5
|
export interface FilterOption {
|
|
5
6
|
id: string;
|
|
6
7
|
name: string;
|
|
@@ -47,13 +48,14 @@ export declare class RunsApi extends ApiTopic {
|
|
|
47
48
|
* @param id
|
|
48
49
|
* @returns InteractionResult
|
|
49
50
|
**/
|
|
50
|
-
retrieve<
|
|
51
|
+
retrieve<ResultT = any, ParamsT = any>(id: string): Promise<EnhancedExecutionRun<ResultT, ParamsT>>;
|
|
52
|
+
retrievePopulated<P = any>(id: string): Promise<PopulatedExecutionRun<P>>;
|
|
51
53
|
/**
|
|
52
54
|
* Get filter options for a field
|
|
53
55
|
* return FilterOption[]
|
|
54
56
|
*/
|
|
55
57
|
filterOptions(field: string, filters: RunListingFilters): Promise<FilterOption[]>;
|
|
56
|
-
create(payload: RunCreatePayload): Promise<
|
|
58
|
+
create<ResultT = any, ParamsT = any>(payload: RunCreatePayload): Promise<EnhancedExecutionRun<ResultT, ParamsT>>;
|
|
57
59
|
/**
|
|
58
60
|
* Send tool results and continues the conversation
|
|
59
61
|
* @param payload
|
|
@@ -75,3 +77,4 @@ export declare class RunsApi extends ApiTopic {
|
|
|
75
77
|
computeFacets(query: ComputeRunFacetPayload): Promise<ComputeRunFacetsResponse>;
|
|
76
78
|
search(payload: RunSearchPayload): Promise<ExecutionRunRef[]>;
|
|
77
79
|
}
|
|
80
|
+
//# sourceMappingURL=RunsApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunsApi.d.ts","sourceRoot":"","sources":["../../src/RunsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACH,6BAA6B,EAC7B,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,E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}
|
package/lib/types/UsersApi.d.ts
CHANGED
package/lib/types/client.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import CommandsApi from "./CommandsApi.js";
|
|
|
9
9
|
import EnvironmentsApi from "./EnvironmentsApi.js";
|
|
10
10
|
import { IamApi } from "./IamApi.js";
|
|
11
11
|
import InteractionsApi from "./InteractionsApi.js";
|
|
12
|
-
import ProjectsApi from "./ProjectsApi.js";
|
|
12
|
+
import { ProjectsApi } from "./ProjectsApi.js";
|
|
13
13
|
import PromptsApi from "./PromptsApi.js";
|
|
14
14
|
import { RefsApi } from "./RefsApi.js";
|
|
15
15
|
import { RunsApi } from "./RunsApi.js";
|
|
@@ -29,9 +29,10 @@ export type VertesiaClientProps = {
|
|
|
29
29
|
* @default api.vertesia.io
|
|
30
30
|
* @since 0.52.0
|
|
31
31
|
*/
|
|
32
|
-
site?:
|
|
32
|
+
site?: "api.vertesia.io" | "api-preview.vertesia.io" | "api-staging.vertesia.io";
|
|
33
33
|
serverUrl?: string;
|
|
34
34
|
storeUrl?: string;
|
|
35
|
+
tokenServerUrl?: string;
|
|
35
36
|
apikey?: string;
|
|
36
37
|
projectId?: string;
|
|
37
38
|
sessionTags?: string | string[];
|
|
@@ -51,6 +52,10 @@ export declare class VertesiaClient extends AbstractFetchClient<VertesiaClient>
|
|
|
51
52
|
* The session name will be sent when executing an interaction as a tag
|
|
52
53
|
*/
|
|
53
54
|
sessionTags?: string | string[];
|
|
55
|
+
/**
|
|
56
|
+
* tokenServerUrl
|
|
57
|
+
*/
|
|
58
|
+
tokenServerUrl: string;
|
|
54
59
|
/**
|
|
55
60
|
* Create a client from the given token.
|
|
56
61
|
* If you already have the decoded token you can pass it as the second argument to avoid decodinf it again.
|
|
@@ -61,6 +66,7 @@ export declare class VertesiaClient extends AbstractFetchClient<VertesiaClient>
|
|
|
61
66
|
static fromAuthToken(token: string, payload?: AuthTokenPayload): Promise<VertesiaClient>;
|
|
62
67
|
static decodeEndpoints(): void;
|
|
63
68
|
constructor(opts?: VertesiaClientProps);
|
|
69
|
+
withApiVersion(version: string | number | null): this;
|
|
64
70
|
/**
|
|
65
71
|
* Overwrite to keep store and composable clients synchronized on the auth callback
|
|
66
72
|
* @param authCb
|
|
@@ -88,12 +94,15 @@ export declare class VertesiaClient extends AbstractFetchClient<VertesiaClient>
|
|
|
88
94
|
get storeUrl(): string;
|
|
89
95
|
/**
|
|
90
96
|
*
|
|
91
|
-
* Generate a token for use with other
|
|
97
|
+
* Generate a token for use with other Vertesia's services
|
|
92
98
|
*
|
|
93
|
-
* @param accountId: selected account to generate the token for
|
|
94
99
|
* @returns AuthTokenResponse
|
|
95
100
|
*/
|
|
96
|
-
getAuthToken(token?: string
|
|
101
|
+
getAuthToken(token?: string): Promise<AuthTokenResponse>;
|
|
102
|
+
get initialHeaders(): {
|
|
103
|
+
"x-api-version": string;
|
|
104
|
+
accept: string;
|
|
105
|
+
};
|
|
97
106
|
projects: ProjectsApi;
|
|
98
107
|
environments: EnvironmentsApi;
|
|
99
108
|
interactions: InteractionsApi;
|
|
@@ -112,3 +121,4 @@ export declare class VertesiaClient extends AbstractFetchClient<VertesiaClient>
|
|
|
112
121
|
}
|
|
113
122
|
export declare function decodeJWT(jwt: string): AuthTokenPayload;
|
|
114
123
|
export declare function decodeEndpoints(endpoints: string | Record<string, string> | undefined): Record<string, string>;
|
|
124
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAA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OAEG;IACH,IAAI,KAAK,kCAER;IAED,IAAI,QAAQ,WAEX;IAED;;;;;OAKG;IACG,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAmB9D,IAAI,cAAc;;;MAKjB;IAED,QAAQ,cAAyB;IACjC,YAAY,kBAA6B;IACzC,YAAY,kBAA6B;IACzC,OAAO,aAAwB;IAC/B,IAAI,UAAqB;IACzB,OAAO,aAAwB;IAC/B,QAAQ,cAAyB;IACjC,OAAO,aAAwB;IAC/B,SAAS,eAA0B;IACnC,QAAQ,cAAyB;IACjC,KAAK,WAAsB;IAC3B,GAAG,SAAoB;IACvB,IAAI,UAAqB;IACzB,QAAQ,cAAyB;IACjC,IAAI,UAAqB;CAC5B;AAiBD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAIvD;AA2BD,wBAAgB,eAAe,CAC3B,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GACvD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASxB"}
|
package/lib/types/execute.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsyncExecutionPayload, InteractionExecutionPayload, InteractionExecutionResult } from '@vertesia/common';
|
|
1
|
+
import { AsyncExecutionPayload, InteractionExecutionPayload, InteractionExecutionResult, RateLimitRequestPayload, RateLimitRequestResponse } from '@vertesia/common';
|
|
2
2
|
import { VertesiaClient } from './client.js';
|
|
3
3
|
export declare function EventSourceProvider(): Promise<typeof EventSource>;
|
|
4
4
|
/**
|
|
@@ -12,7 +12,7 @@ export declare function EventSourceProvider(): Promise<typeof EventSource>;
|
|
|
12
12
|
* @param payload InteractionExecutionPayload
|
|
13
13
|
* @param onChunk callback to be called when the next chunk of the response is available
|
|
14
14
|
*/
|
|
15
|
-
export declare function executeInteraction<P = any
|
|
15
|
+
export declare function executeInteraction<P = any>(client: VertesiaClient, interactionId: string, payload?: InteractionExecutionPayload, onChunk?: (chunk: string) => void): Promise<InteractionExecutionResult<P>>;
|
|
16
16
|
/**
|
|
17
17
|
* Same as executeInteraction but uses the interaction name selector instead of the id.
|
|
18
18
|
* A name selector is the interaction endpoint name suffixed with an optional tag or version which is starting with a `@` character.
|
|
@@ -29,8 +29,10 @@ export declare function executeInteraction<P = any, R = any>(client: VertesiaCli
|
|
|
29
29
|
* @param onChunk
|
|
30
30
|
* @returns
|
|
31
31
|
*/
|
|
32
|
-
export declare function executeInteractionByName<P = any
|
|
32
|
+
export declare function executeInteractionByName<P = any>(client: VertesiaClient, interaction: string, payload?: InteractionExecutionPayload, onChunk?: (chunk: string) => void): Promise<InteractionExecutionResult<P>>;
|
|
33
33
|
export declare function executeInteractionAsync(client: VertesiaClient, payload: AsyncExecutionPayload): Promise<{
|
|
34
34
|
runId: string;
|
|
35
35
|
workflowId: string;
|
|
36
36
|
}>;
|
|
37
|
+
export declare function checkRateLimit(client: VertesiaClient, payload: RateLimitRequestPayload): Promise<RateLimitRequestResponse>;
|
|
38
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAsB,2BAA2B,EAAE,0BAA0B,EAAoC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAsB,2BAA2B,EAAE,0BAA0B,EAAoC,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC3N,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,WAAW,CAAC,CAMvE;AACD;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,cAAc,EACpE,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,2BAAgC,EACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAY7E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,wBAAwB,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,cAAc,EAC1E,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,2BAAgC,EACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAgB7E;AA0CD,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAIpJ;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAIhI"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
export type { OrphanedAppInstallation } from "./AppsApi.js";
|
|
1
2
|
export * from './client.js';
|
|
3
|
+
export type { GroupsQueryOptions } from './GroupsApi.js';
|
|
2
4
|
export * from './InteractionBase.js';
|
|
5
|
+
export * from './InteractionOutput.js';
|
|
3
6
|
export type { AsyncExecutionResult, ComputeInteractionFacetsResponse } from './InteractionsApi.js';
|
|
4
7
|
export type { ComputePromptFacetsResponse, ListInteractionsResponse } from './PromptsApi.js';
|
|
5
8
|
export type { ComputeRunFacetsResponse, FilterOption } from './RunsApi.js';
|
|
6
|
-
export type { GroupsQueryOptions } from './GroupsApi.js';
|
|
7
9
|
export * from "./store/index.js";
|
|
8
10
|
export * from "./StreamSource.js";
|
|
11
|
+
export { ProjectsApi } from './ProjectsApi.js';
|
|
12
|
+
export { RunsApi } from './RunsApi.js';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,oBAAoB,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACnG,YAAY,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,YAAY,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC3E,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,YAAY,EAAE,oBAAoB,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACnG,YAAY,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,YAAY,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC3E,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -39,6 +39,13 @@ export declare class CollectionsApi extends ApiTopic {
|
|
|
39
39
|
deleteMembers(collectionId: string, members: string[]): Promise<{
|
|
40
40
|
id: string;
|
|
41
41
|
}>;
|
|
42
|
+
addChildren(collectionId: string, children: string[]): Promise<{
|
|
43
|
+
count: number;
|
|
44
|
+
}>;
|
|
45
|
+
deleteChildren(collectionId: string, children: string[]): Promise<{
|
|
46
|
+
count: number;
|
|
47
|
+
}>;
|
|
48
|
+
searchChildren(collectionId: string, query?: ComplexCollectionSearchQuery): Promise<CollectionItem[]>;
|
|
42
49
|
delete(id: string): Promise<any>;
|
|
43
50
|
/**
|
|
44
51
|
* Update collection permissions and propagate to member objects
|
|
@@ -64,3 +71,4 @@ export declare class CollectionsApi extends ApiTopic {
|
|
|
64
71
|
objectsUpdated: number;
|
|
65
72
|
}>;
|
|
66
73
|
}
|
|
74
|
+
//# sourceMappingURL=CollectionsApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionsApi.d.ts","sourceRoot":"","sources":["../../../src/store/CollectionsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChQ,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGxE,qBAAa,cAAe,SAAQ,QAAQ;gBAE5B,MAAM,EAAE,UAAU;IAI9B;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAIxE;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAMvF;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,iBAA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AAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACnC,cAAc,EAAE,MAAM,CAAC;KAC1B,CAAC;IAMF;;;;;OAKG;IACH,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAChD,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACpC,cAAc,EAAE,MAAM,CAAC;KAC1B,CAAC;CAIL"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
|
|
2
|
-
import { GetFileUrlResponse, GetUploadUrlPayload } from "@vertesia/common";
|
|
2
|
+
import { GetFileUrlPayload, GetFileUrlResponse, GetUploadUrlPayload } from "@vertesia/common";
|
|
3
3
|
import { StreamSource } from "../StreamSource.js";
|
|
4
4
|
export declare const MEMORIES_PREFIX = "memories";
|
|
5
5
|
export declare function getMemoryFilePath(name: string): string;
|
|
@@ -29,7 +29,8 @@ export declare class FilesApi extends ApiTopic {
|
|
|
29
29
|
bucket: string;
|
|
30
30
|
}>;
|
|
31
31
|
getUploadUrl(payload: GetUploadUrlPayload): Promise<GetFileUrlResponse>;
|
|
32
|
-
getDownloadUrl(file: string): Promise<GetFileUrlResponse>;
|
|
32
|
+
getDownloadUrl(file: string, name?: string, disposition?: "inline" | "attachment"): Promise<GetFileUrlResponse>;
|
|
33
|
+
getDownloadUrlWithOptions(payload: GetFileUrlPayload): Promise<GetFileUrlResponse>;
|
|
33
34
|
/**
|
|
34
35
|
* Upload content to a file and return the full path (including bucket name) of the uploaded file
|
|
35
36
|
* @param source
|
|
@@ -45,3 +46,4 @@ export declare class FilesApi extends ApiTopic {
|
|
|
45
46
|
uploadMemoryPack(source: StreamSource | File): Promise<string>;
|
|
46
47
|
downloadMemoryPack(name: string, gunzip?: boolean): Promise<ReadableStream<Uint8Array>>;
|
|
47
48
|
}
|
|
49
|
+
//# sourceMappingURL=FilesApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilesApi.d.ts","sourceRoot":"","sources":["../../../src/store/FilesApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,
|
|
1
|
+
{"version":3,"file":"FilesApi.d.ts","sourceRoot":"","sources":["../../../src/store/FilesApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACH,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,eAAO,MAAM,eAAe,aAAa,CAAC;AAE1C,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,UAG7C;AAED,qBAAa,QAAS,SAAQ,QAAQ;gBACtB,MAAM,EAAE,UAAU;IAIxB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;IAKxE;;;;;;OAMG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IAQF;;;;OAIG;IACH,iBAAiB,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAIhD,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAOvE,cAAc,CAAC,IAAI,EAAE,MAAM,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