@arcadeai/arcadejs 0.2.1 → 1.0.0-rc.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/CHANGELOG.md +44 -0
- package/README.md +4 -5
- package/core.d.ts.map +1 -1
- package/core.js +10 -1
- package/core.js.map +1 -1
- package/core.mjs +10 -1
- package/core.mjs.map +1 -1
- package/index.d.mts +9 -9
- package/index.d.ts +9 -9
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/index.mjs +2 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth.d.ts +73 -9
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js +81 -1
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs +79 -0
- package/resources/auth.mjs.map +1 -1
- package/resources/chat/chat.d.ts +5 -2
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +4 -1
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.ts +8 -22
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js +0 -5
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs +1 -3
- package/resources/shared.mjs.map +1 -1
- package/resources/tools/formatted.d.ts +4 -7
- package/resources/tools/formatted.d.ts.map +1 -1
- package/resources/tools/formatted.js +6 -6
- package/resources/tools/formatted.js.map +1 -1
- package/resources/tools/formatted.mjs +6 -6
- package/resources/tools/formatted.mjs.map +1 -1
- package/resources/tools/index.d.ts +2 -1
- package/resources/tools/index.d.ts.map +1 -1
- package/resources/tools/index.js +5 -1
- package/resources/tools/index.js.map +1 -1
- package/resources/tools/index.mjs +2 -1
- package/resources/tools/index.mjs.map +1 -1
- package/resources/tools/scheduled.d.ts +39 -0
- package/resources/tools/scheduled.d.ts.map +1 -0
- package/resources/tools/scheduled.js +24 -0
- package/resources/tools/scheduled.js.map +1 -0
- package/resources/tools/scheduled.mjs +20 -0
- package/resources/tools/scheduled.mjs.map +1 -0
- package/resources/tools/tools.d.ts +197 -72
- package/resources/tools/tools.d.ts.map +1 -1
- package/resources/tools/tools.js +16 -6
- package/resources/tools/tools.js.map +1 -1
- package/resources/tools/tools.mjs +13 -5
- package/resources/tools/tools.mjs.map +1 -1
- package/src/core.ts +11 -1
- package/src/index.ts +20 -23
- package/src/resources/auth.ts +127 -8
- package/src/resources/chat/chat.ts +6 -2
- package/src/resources/chat/completions.ts +5 -1
- package/src/resources/index.ts +7 -8
- package/src/resources/shared.ts +9 -30
- package/src/resources/tools/formatted.ts +14 -10
- package/src/resources/tools/index.ts +8 -8
- package/src/resources/tools/scheduled.ts +76 -0
- package/src/resources/tools/tools.ts +278 -86
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
import * as ToolsAPI from './tools';
|
|
7
|
+
import { ToolExecutionsOffsetPage } from './tools';
|
|
8
|
+
import { type OffsetPageParams } from '../../pagination';
|
|
9
|
+
|
|
10
|
+
export class Scheduled extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns a page of scheduled tool executions
|
|
13
|
+
*/
|
|
14
|
+
list(
|
|
15
|
+
query?: ScheduledListParams,
|
|
16
|
+
options?: Core.RequestOptions,
|
|
17
|
+
): Core.PagePromise<ToolExecutionsOffsetPage, ToolsAPI.ToolExecution>;
|
|
18
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ToolExecutionsOffsetPage, ToolsAPI.ToolExecution>;
|
|
19
|
+
list(
|
|
20
|
+
query: ScheduledListParams | Core.RequestOptions = {},
|
|
21
|
+
options?: Core.RequestOptions,
|
|
22
|
+
): Core.PagePromise<ToolExecutionsOffsetPage, ToolsAPI.ToolExecution> {
|
|
23
|
+
if (isRequestOptions(query)) {
|
|
24
|
+
return this.list({}, query);
|
|
25
|
+
}
|
|
26
|
+
return this._client.getAPIList('/v1/scheduled_tools', ToolExecutionsOffsetPage, { query, ...options });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Returns the details for a specific scheduled tool execution
|
|
31
|
+
*/
|
|
32
|
+
get(id: string, options?: Core.RequestOptions): Core.APIPromise<ScheduledGetResponse> {
|
|
33
|
+
return this._client.get(`/v1/scheduled_tools/${id}`, options);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ScheduledGetResponse {
|
|
38
|
+
id?: string;
|
|
39
|
+
|
|
40
|
+
attempts?: Array<ToolsAPI.ToolExecutionAttempt>;
|
|
41
|
+
|
|
42
|
+
created_at?: string;
|
|
43
|
+
|
|
44
|
+
execution_status?: string;
|
|
45
|
+
|
|
46
|
+
execution_type?: string;
|
|
47
|
+
|
|
48
|
+
finished_at?: string;
|
|
49
|
+
|
|
50
|
+
input?: Record<string, unknown>;
|
|
51
|
+
|
|
52
|
+
run_at?: string;
|
|
53
|
+
|
|
54
|
+
started_at?: string;
|
|
55
|
+
|
|
56
|
+
tool_name?: string;
|
|
57
|
+
|
|
58
|
+
toolkit_name?: string;
|
|
59
|
+
|
|
60
|
+
toolkit_version?: string;
|
|
61
|
+
|
|
62
|
+
updated_at?: string;
|
|
63
|
+
|
|
64
|
+
user_id?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ScheduledListParams extends OffsetPageParams {}
|
|
68
|
+
|
|
69
|
+
export declare namespace Scheduled {
|
|
70
|
+
export {
|
|
71
|
+
type ScheduledGetResponse as ScheduledGetResponse,
|
|
72
|
+
type ScheduledListParams as ScheduledListParams,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { ToolExecutionsOffsetPage };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
+
import * as ToolsAPI from './tools';
|
|
6
7
|
import * as Shared from '../shared';
|
|
7
|
-
import { ToolDefinitionsOffsetPage } from '../shared';
|
|
8
8
|
import * as FormattedAPI from './formatted';
|
|
9
9
|
import {
|
|
10
10
|
Formatted,
|
|
@@ -14,27 +14,31 @@ import {
|
|
|
14
14
|
FormattedListResponse,
|
|
15
15
|
FormattedListResponsesOffsetPage,
|
|
16
16
|
} from './formatted';
|
|
17
|
-
import
|
|
17
|
+
import * as ScheduledAPI from './scheduled';
|
|
18
|
+
import { Scheduled, ScheduledGetResponse, ScheduledListParams } from './scheduled';
|
|
19
|
+
import { OffsetPage, type OffsetPageParams } from '../../pagination';
|
|
18
20
|
|
|
19
21
|
export class Tools extends APIResource {
|
|
22
|
+
scheduled: ScheduledAPI.Scheduled = new ScheduledAPI.Scheduled(this._client);
|
|
20
23
|
formatted: FormattedAPI.Formatted = new FormattedAPI.Formatted(this._client);
|
|
21
24
|
|
|
22
25
|
/**
|
|
23
|
-
* Returns a page of tools, optionally filtered by
|
|
26
|
+
* Returns a page of tools from the engine configuration, optionally filtered by
|
|
27
|
+
* toolkit
|
|
24
28
|
*/
|
|
25
29
|
list(
|
|
26
30
|
query?: ToolListParams,
|
|
27
31
|
options?: Core.RequestOptions,
|
|
28
|
-
): Core.PagePromise<
|
|
29
|
-
list(options?: Core.RequestOptions): Core.PagePromise<
|
|
32
|
+
): Core.PagePromise<ToolListResponsesOffsetPage, ToolListResponse>;
|
|
33
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ToolListResponsesOffsetPage, ToolListResponse>;
|
|
30
34
|
list(
|
|
31
35
|
query: ToolListParams | Core.RequestOptions = {},
|
|
32
36
|
options?: Core.RequestOptions,
|
|
33
|
-
): Core.PagePromise<
|
|
37
|
+
): Core.PagePromise<ToolListResponsesOffsetPage, ToolListResponse> {
|
|
34
38
|
if (isRequestOptions(query)) {
|
|
35
39
|
return this.list({}, query);
|
|
36
40
|
}
|
|
37
|
-
return this._client.getAPIList('/v1/tools
|
|
41
|
+
return this._client.getAPIList('/v1/tools', ToolListResponsesOffsetPage, { query, ...options });
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
/**
|
|
@@ -43,34 +47,41 @@ export class Tools extends APIResource {
|
|
|
43
47
|
authorize(
|
|
44
48
|
body: ToolAuthorizeParams,
|
|
45
49
|
options?: Core.RequestOptions,
|
|
46
|
-
): Core.APIPromise<Shared.
|
|
50
|
+
): Core.APIPromise<Shared.AuthAuthorizationResponse> {
|
|
47
51
|
return this._client.post('/v1/tools/authorize', { body, ...options });
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
/**
|
|
51
55
|
* Executes a tool by name and arguments
|
|
52
56
|
*/
|
|
53
|
-
execute(body: ToolExecuteParams, options?: Core.RequestOptions): Core.APIPromise<
|
|
57
|
+
execute(body: ToolExecuteParams, options?: Core.RequestOptions): Core.APIPromise<ExecuteToolResponse> {
|
|
54
58
|
return this._client.post('/v1/tools/execute', { body, ...options });
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
/**
|
|
58
62
|
* Returns the arcade tool specification for a specific tool
|
|
59
63
|
*/
|
|
60
|
-
get(
|
|
61
|
-
return this._client.get(
|
|
64
|
+
get(name: string, options?: Core.RequestOptions): Core.APIPromise<ToolGetResponse> {
|
|
65
|
+
return this._client.get(`/v1/tools/${name}`, options);
|
|
62
66
|
}
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
export class ToolListResponsesOffsetPage extends OffsetPage<ToolListResponse> {}
|
|
70
|
+
|
|
71
|
+
export class ToolExecutionsOffsetPage extends OffsetPage<ToolExecution> {}
|
|
72
|
+
|
|
65
73
|
export interface AuthorizeToolRequest {
|
|
66
74
|
tool_name: string;
|
|
67
75
|
|
|
68
|
-
user_id: string;
|
|
69
|
-
|
|
70
76
|
/**
|
|
71
77
|
* Optional: if not provided, any version is used
|
|
72
78
|
*/
|
|
73
79
|
tool_version?: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Required only when calling with an API key
|
|
83
|
+
*/
|
|
84
|
+
user_id?: string;
|
|
74
85
|
}
|
|
75
86
|
|
|
76
87
|
export interface ExecuteToolRequest {
|
|
@@ -79,114 +90,289 @@ export interface ExecuteToolRequest {
|
|
|
79
90
|
/**
|
|
80
91
|
* JSON input to the tool, if any
|
|
81
92
|
*/
|
|
82
|
-
|
|
93
|
+
input?: Record<string, unknown>;
|
|
83
94
|
|
|
84
95
|
/**
|
|
85
|
-
*
|
|
96
|
+
* The time at which the tool should be run (optional). If not provided, the tool
|
|
97
|
+
* is run immediately
|
|
98
|
+
*/
|
|
99
|
+
run_at?: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The tool version to use (optional). If not provided, any version is used
|
|
86
103
|
*/
|
|
87
104
|
tool_version?: string;
|
|
88
105
|
|
|
89
106
|
user_id?: string;
|
|
90
107
|
}
|
|
91
108
|
|
|
92
|
-
export interface
|
|
93
|
-
|
|
109
|
+
export interface ExecuteToolResponse {
|
|
110
|
+
id?: string;
|
|
111
|
+
|
|
112
|
+
duration?: number;
|
|
113
|
+
|
|
114
|
+
execution_id?: string;
|
|
115
|
+
|
|
116
|
+
execution_type?: string;
|
|
117
|
+
|
|
118
|
+
finished_at?: string;
|
|
119
|
+
|
|
120
|
+
output?: ExecuteToolResponse.Output;
|
|
121
|
+
|
|
122
|
+
run_at?: string;
|
|
123
|
+
|
|
124
|
+
status?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Whether the request was successful. For immediately-executed requests, this will
|
|
128
|
+
* be true if the tool call succeeded. For scheduled requests, this will be true if
|
|
129
|
+
* the request was scheduled successfully.
|
|
130
|
+
*/
|
|
131
|
+
success?: boolean;
|
|
94
132
|
}
|
|
95
133
|
|
|
96
|
-
export
|
|
97
|
-
|
|
134
|
+
export namespace ExecuteToolResponse {
|
|
135
|
+
export interface Output {
|
|
136
|
+
authorization?: Shared.AuthAuthorizationResponse;
|
|
98
137
|
|
|
99
|
-
|
|
138
|
+
error?: Output.Error;
|
|
139
|
+
|
|
140
|
+
value?: unknown;
|
|
141
|
+
}
|
|
100
142
|
|
|
101
|
-
|
|
143
|
+
export namespace Output {
|
|
144
|
+
export interface Error {
|
|
145
|
+
message: string;
|
|
146
|
+
|
|
147
|
+
additional_prompt_content?: string;
|
|
148
|
+
|
|
149
|
+
can_retry?: boolean;
|
|
150
|
+
|
|
151
|
+
developer_message?: string;
|
|
152
|
+
|
|
153
|
+
retry_after_ms?: number;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
102
156
|
}
|
|
103
157
|
|
|
104
|
-
export interface
|
|
105
|
-
|
|
158
|
+
export interface ToolExecution {
|
|
159
|
+
id?: string;
|
|
106
160
|
|
|
107
|
-
|
|
161
|
+
created_at?: string;
|
|
108
162
|
|
|
109
|
-
|
|
163
|
+
execution_status?: string;
|
|
110
164
|
|
|
111
|
-
|
|
165
|
+
execution_type?: string;
|
|
112
166
|
|
|
113
|
-
|
|
167
|
+
finished_at?: string;
|
|
168
|
+
|
|
169
|
+
run_at?: string;
|
|
170
|
+
|
|
171
|
+
started_at?: string;
|
|
172
|
+
|
|
173
|
+
tool_name?: string;
|
|
174
|
+
|
|
175
|
+
toolkit_name?: string;
|
|
176
|
+
|
|
177
|
+
toolkit_version?: string;
|
|
178
|
+
|
|
179
|
+
updated_at?: string;
|
|
180
|
+
|
|
181
|
+
user_id?: string;
|
|
114
182
|
}
|
|
115
183
|
|
|
116
|
-
export interface
|
|
117
|
-
|
|
184
|
+
export interface ToolExecutionAttempt {
|
|
185
|
+
id?: string;
|
|
186
|
+
|
|
187
|
+
finished_at?: string;
|
|
188
|
+
|
|
189
|
+
output?: ToolExecutionAttempt.Output;
|
|
190
|
+
|
|
191
|
+
started_at?: string;
|
|
192
|
+
|
|
193
|
+
success?: boolean;
|
|
194
|
+
|
|
195
|
+
system_error_message?: string;
|
|
118
196
|
}
|
|
119
197
|
|
|
120
|
-
export namespace
|
|
121
|
-
export interface
|
|
122
|
-
|
|
198
|
+
export namespace ToolExecutionAttempt {
|
|
199
|
+
export interface Output {
|
|
200
|
+
authorization?: Shared.AuthAuthorizationResponse;
|
|
123
201
|
|
|
124
|
-
|
|
202
|
+
error?: Output.Error;
|
|
125
203
|
|
|
126
|
-
|
|
204
|
+
value?: unknown;
|
|
127
205
|
}
|
|
128
206
|
|
|
129
|
-
export namespace
|
|
130
|
-
export interface
|
|
131
|
-
|
|
207
|
+
export namespace Output {
|
|
208
|
+
export interface Error {
|
|
209
|
+
message: string;
|
|
210
|
+
|
|
211
|
+
additional_prompt_content?: string;
|
|
212
|
+
|
|
213
|
+
can_retry?: boolean;
|
|
214
|
+
|
|
215
|
+
developer_message?: string;
|
|
216
|
+
|
|
217
|
+
retry_after_ms?: number;
|
|
132
218
|
}
|
|
133
219
|
}
|
|
134
220
|
}
|
|
135
221
|
|
|
136
|
-
export interface
|
|
137
|
-
|
|
222
|
+
export interface ValueSchema {
|
|
223
|
+
val_type: string;
|
|
138
224
|
|
|
139
|
-
|
|
225
|
+
enum?: Array<string>;
|
|
140
226
|
|
|
141
|
-
|
|
227
|
+
inner_val_type?: string;
|
|
228
|
+
}
|
|
142
229
|
|
|
143
|
-
|
|
230
|
+
export interface ToolListResponse {
|
|
231
|
+
input: ToolListResponse.Input;
|
|
144
232
|
|
|
145
|
-
|
|
233
|
+
name: string;
|
|
234
|
+
|
|
235
|
+
toolkit: ToolListResponse.Toolkit;
|
|
236
|
+
|
|
237
|
+
description?: string;
|
|
238
|
+
|
|
239
|
+
fully_qualified_name?: string;
|
|
240
|
+
|
|
241
|
+
output?: ToolListResponse.Output;
|
|
242
|
+
|
|
243
|
+
requirements?: ToolListResponse.Requirements;
|
|
146
244
|
}
|
|
147
245
|
|
|
148
|
-
export namespace
|
|
149
|
-
export interface
|
|
150
|
-
|
|
246
|
+
export namespace ToolListResponse {
|
|
247
|
+
export interface Input {
|
|
248
|
+
parameters?: Array<Input.Parameter>;
|
|
151
249
|
}
|
|
152
|
-
}
|
|
153
250
|
|
|
154
|
-
export
|
|
155
|
-
|
|
251
|
+
export namespace Input {
|
|
252
|
+
export interface Parameter {
|
|
253
|
+
name: string;
|
|
156
254
|
|
|
157
|
-
|
|
255
|
+
value_schema: ToolsAPI.ValueSchema;
|
|
158
256
|
|
|
159
|
-
|
|
160
|
-
}
|
|
257
|
+
description?: string;
|
|
161
258
|
|
|
162
|
-
|
|
163
|
-
export interface Error {
|
|
164
|
-
message: string;
|
|
259
|
+
inferrable?: boolean;
|
|
165
260
|
|
|
166
|
-
|
|
261
|
+
required?: boolean;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
167
264
|
|
|
168
|
-
|
|
265
|
+
export interface Toolkit {
|
|
266
|
+
name: string;
|
|
169
267
|
|
|
170
|
-
|
|
268
|
+
description?: string;
|
|
269
|
+
|
|
270
|
+
version?: string;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface Output {
|
|
274
|
+
available_modes?: Array<string>;
|
|
275
|
+
|
|
276
|
+
description?: string;
|
|
277
|
+
|
|
278
|
+
value_schema?: ToolsAPI.ValueSchema;
|
|
279
|
+
}
|
|
171
280
|
|
|
172
|
-
|
|
281
|
+
export interface Requirements {
|
|
282
|
+
authorization?: Requirements.Authorization;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export namespace Requirements {
|
|
286
|
+
export interface Authorization {
|
|
287
|
+
id?: string;
|
|
288
|
+
|
|
289
|
+
oauth2?: Authorization.Oauth2;
|
|
290
|
+
|
|
291
|
+
provider_id?: string;
|
|
292
|
+
|
|
293
|
+
provider_type?: string;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export namespace Authorization {
|
|
297
|
+
export interface Oauth2 {
|
|
298
|
+
scopes?: Array<string>;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
173
301
|
}
|
|
174
302
|
}
|
|
175
303
|
|
|
176
|
-
export interface
|
|
304
|
+
export interface ToolGetResponse {
|
|
305
|
+
input: ToolGetResponse.Input;
|
|
306
|
+
|
|
177
307
|
name: string;
|
|
178
308
|
|
|
309
|
+
toolkit: ToolGetResponse.Toolkit;
|
|
310
|
+
|
|
179
311
|
description?: string;
|
|
180
312
|
|
|
181
|
-
|
|
313
|
+
fully_qualified_name?: string;
|
|
314
|
+
|
|
315
|
+
output?: ToolGetResponse.Output;
|
|
316
|
+
|
|
317
|
+
requirements?: ToolGetResponse.Requirements;
|
|
182
318
|
}
|
|
183
319
|
|
|
184
|
-
export
|
|
185
|
-
|
|
320
|
+
export namespace ToolGetResponse {
|
|
321
|
+
export interface Input {
|
|
322
|
+
parameters?: Array<Input.Parameter>;
|
|
323
|
+
}
|
|
186
324
|
|
|
187
|
-
|
|
325
|
+
export namespace Input {
|
|
326
|
+
export interface Parameter {
|
|
327
|
+
name: string;
|
|
188
328
|
|
|
189
|
-
|
|
329
|
+
value_schema: ToolsAPI.ValueSchema;
|
|
330
|
+
|
|
331
|
+
description?: string;
|
|
332
|
+
|
|
333
|
+
inferrable?: boolean;
|
|
334
|
+
|
|
335
|
+
required?: boolean;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface Toolkit {
|
|
340
|
+
name: string;
|
|
341
|
+
|
|
342
|
+
description?: string;
|
|
343
|
+
|
|
344
|
+
version?: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export interface Output {
|
|
348
|
+
available_modes?: Array<string>;
|
|
349
|
+
|
|
350
|
+
description?: string;
|
|
351
|
+
|
|
352
|
+
value_schema?: ToolsAPI.ValueSchema;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export interface Requirements {
|
|
356
|
+
authorization?: Requirements.Authorization;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export namespace Requirements {
|
|
360
|
+
export interface Authorization {
|
|
361
|
+
id?: string;
|
|
362
|
+
|
|
363
|
+
oauth2?: Authorization.Oauth2;
|
|
364
|
+
|
|
365
|
+
provider_id?: string;
|
|
366
|
+
|
|
367
|
+
provider_type?: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export namespace Authorization {
|
|
371
|
+
export interface Oauth2 {
|
|
372
|
+
scopes?: Array<string>;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
190
376
|
}
|
|
191
377
|
|
|
192
378
|
export interface ToolListParams extends OffsetPageParams {
|
|
@@ -199,12 +385,15 @@ export interface ToolListParams extends OffsetPageParams {
|
|
|
199
385
|
export interface ToolAuthorizeParams {
|
|
200
386
|
tool_name: string;
|
|
201
387
|
|
|
202
|
-
user_id: string;
|
|
203
|
-
|
|
204
388
|
/**
|
|
205
389
|
* Optional: if not provided, any version is used
|
|
206
390
|
*/
|
|
207
391
|
tool_version?: string;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Required only when calling with an API key
|
|
395
|
+
*/
|
|
396
|
+
user_id?: string;
|
|
208
397
|
}
|
|
209
398
|
|
|
210
399
|
export interface ToolExecuteParams {
|
|
@@ -213,23 +402,24 @@ export interface ToolExecuteParams {
|
|
|
213
402
|
/**
|
|
214
403
|
* JSON input to the tool, if any
|
|
215
404
|
*/
|
|
216
|
-
|
|
405
|
+
input?: Record<string, unknown>;
|
|
217
406
|
|
|
218
407
|
/**
|
|
219
|
-
*
|
|
408
|
+
* The time at which the tool should be run (optional). If not provided, the tool
|
|
409
|
+
* is run immediately
|
|
220
410
|
*/
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
user_id?: string;
|
|
224
|
-
}
|
|
411
|
+
run_at?: string;
|
|
225
412
|
|
|
226
|
-
export interface ToolGetParams {
|
|
227
413
|
/**
|
|
228
|
-
*
|
|
414
|
+
* The tool version to use (optional). If not provided, any version is used
|
|
229
415
|
*/
|
|
230
|
-
|
|
416
|
+
tool_version?: string;
|
|
417
|
+
|
|
418
|
+
user_id?: string;
|
|
231
419
|
}
|
|
232
420
|
|
|
421
|
+
Tools.ToolListResponsesOffsetPage = ToolListResponsesOffsetPage;
|
|
422
|
+
Tools.Scheduled = Scheduled;
|
|
233
423
|
Tools.Formatted = Formatted;
|
|
234
424
|
Tools.FormattedListResponsesOffsetPage = FormattedListResponsesOffsetPage;
|
|
235
425
|
|
|
@@ -237,18 +427,22 @@ export declare namespace Tools {
|
|
|
237
427
|
export {
|
|
238
428
|
type AuthorizeToolRequest as AuthorizeToolRequest,
|
|
239
429
|
type ExecuteToolRequest as ExecuteToolRequest,
|
|
240
|
-
type
|
|
241
|
-
type
|
|
242
|
-
type
|
|
243
|
-
type Requirements as Requirements,
|
|
244
|
-
type Response as Response,
|
|
245
|
-
type ResponseOutput as ResponseOutput,
|
|
246
|
-
type ToolkitDefinition as ToolkitDefinition,
|
|
430
|
+
type ExecuteToolResponse as ExecuteToolResponse,
|
|
431
|
+
type ToolExecution as ToolExecution,
|
|
432
|
+
type ToolExecutionAttempt as ToolExecutionAttempt,
|
|
247
433
|
type ValueSchema as ValueSchema,
|
|
434
|
+
type ToolListResponse as ToolListResponse,
|
|
435
|
+
type ToolGetResponse as ToolGetResponse,
|
|
436
|
+
ToolListResponsesOffsetPage as ToolListResponsesOffsetPage,
|
|
248
437
|
type ToolListParams as ToolListParams,
|
|
249
438
|
type ToolAuthorizeParams as ToolAuthorizeParams,
|
|
250
439
|
type ToolExecuteParams as ToolExecuteParams,
|
|
251
|
-
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
export {
|
|
443
|
+
Scheduled as Scheduled,
|
|
444
|
+
type ScheduledGetResponse as ScheduledGetResponse,
|
|
445
|
+
type ScheduledListParams as ScheduledListParams,
|
|
252
446
|
};
|
|
253
447
|
|
|
254
448
|
export {
|
|
@@ -260,5 +454,3 @@ export declare namespace Tools {
|
|
|
260
454
|
type FormattedGetParams as FormattedGetParams,
|
|
261
455
|
};
|
|
262
456
|
}
|
|
263
|
-
|
|
264
|
-
export { ToolDefinitionsOffsetPage };
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '1.0.0-rc.1'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "1.0.0-rc.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,eAAe,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,YAAY,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '1.0.0-rc.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,CAAC,2BAA2B"}
|