@arcadeai/arcadejs 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/LICENSE +201 -0
  3. package/README.md +305 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +242 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +903 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +871 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +53 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +143 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +127 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +146 -0
  87. package/index.d.ts +146 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +118 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +90 -0
  92. package/index.mjs.map +1 -0
  93. package/package.json +103 -0
  94. package/pagination.d.ts +26 -0
  95. package/pagination.d.ts.map +1 -0
  96. package/pagination.js +46 -0
  97. package/pagination.js.map +1 -0
  98. package/pagination.mjs +42 -0
  99. package/pagination.mjs.map +1 -0
  100. package/resource.d.ts +6 -0
  101. package/resource.d.ts.map +1 -0
  102. package/resource.js +11 -0
  103. package/resource.js.map +1 -0
  104. package/resource.mjs +7 -0
  105. package/resource.mjs.map +1 -0
  106. package/resources/auth.d.ts +68 -0
  107. package/resources/auth.d.ts.map +1 -0
  108. package/resources/auth.js +25 -0
  109. package/resources/auth.js.map +1 -0
  110. package/resources/auth.mjs +21 -0
  111. package/resources/auth.mjs.map +1 -0
  112. package/resources/chat/chat.d.ts +136 -0
  113. package/resources/chat/chat.d.ts.map +1 -0
  114. package/resources/chat/chat.js +40 -0
  115. package/resources/chat/chat.js.map +1 -0
  116. package/resources/chat/chat.mjs +13 -0
  117. package/resources/chat/chat.mjs.map +1 -0
  118. package/resources/chat/completions.d.ts +76 -0
  119. package/resources/chat/completions.d.ts.map +1 -0
  120. package/resources/chat/completions.js +17 -0
  121. package/resources/chat/completions.js.map +1 -0
  122. package/resources/chat/completions.mjs +13 -0
  123. package/resources/chat/completions.mjs.map +1 -0
  124. package/resources/chat/index.d.ts +3 -0
  125. package/resources/chat/index.d.ts.map +1 -0
  126. package/resources/chat/index.js +9 -0
  127. package/resources/chat/index.js.map +1 -0
  128. package/resources/chat/index.mjs +4 -0
  129. package/resources/chat/index.mjs.map +1 -0
  130. package/resources/health.d.ts +16 -0
  131. package/resources/health.d.ts.map +1 -0
  132. package/resources/health.js +17 -0
  133. package/resources/health.js.map +1 -0
  134. package/resources/health.mjs +13 -0
  135. package/resources/health.mjs.map +1 -0
  136. package/resources/index.d.ts +6 -0
  137. package/resources/index.d.ts.map +1 -0
  138. package/resources/index.js +28 -0
  139. package/resources/index.js.map +1 -0
  140. package/resources/index.mjs +7 -0
  141. package/resources/index.mjs.map +1 -0
  142. package/resources/shared.d.ts +30 -0
  143. package/resources/shared.d.ts.map +1 -0
  144. package/resources/shared.js +9 -0
  145. package/resources/shared.js.map +1 -0
  146. package/resources/shared.mjs +5 -0
  147. package/resources/shared.mjs.map +1 -0
  148. package/resources/tools/definition.d.ts +24 -0
  149. package/resources/tools/definition.d.ts.map +1 -0
  150. package/resources/tools/definition.js +17 -0
  151. package/resources/tools/definition.js.map +1 -0
  152. package/resources/tools/definition.mjs +13 -0
  153. package/resources/tools/definition.mjs.map +1 -0
  154. package/resources/tools/formatted.d.ts +48 -0
  155. package/resources/tools/formatted.d.ts.map +1 -0
  156. package/resources/tools/formatted.js +56 -0
  157. package/resources/tools/formatted.js.map +1 -0
  158. package/resources/tools/formatted.mjs +28 -0
  159. package/resources/tools/formatted.mjs.map +1 -0
  160. package/resources/tools/index.d.ts +3 -0
  161. package/resources/tools/index.d.ts.map +1 -0
  162. package/resources/tools/index.js +10 -0
  163. package/resources/tools/index.js.map +1 -0
  164. package/resources/tools/index.mjs +4 -0
  165. package/resources/tools/index.mjs.map +1 -0
  166. package/resources/tools/tools.d.ts +169 -0
  167. package/resources/tools/tools.d.ts.map +1 -0
  168. package/resources/tools/tools.js +68 -0
  169. package/resources/tools/tools.js.map +1 -0
  170. package/resources/tools/tools.mjs +41 -0
  171. package/resources/tools/tools.mjs.map +1 -0
  172. package/resources/tools.d.ts +161 -0
  173. package/resources/tools.d.ts.map +1 -0
  174. package/resources/tools.js +38 -0
  175. package/resources/tools.js.map +1 -0
  176. package/resources/tools.mjs +34 -0
  177. package/resources/tools.mjs.map +1 -0
  178. package/shims/node.d.ts +30 -0
  179. package/shims/node.d.ts.map +1 -0
  180. package/shims/node.js +31 -0
  181. package/shims/node.js.map +1 -0
  182. package/shims/node.mjs +5 -0
  183. package/shims/node.mjs.map +1 -0
  184. package/shims/web.d.ts +26 -0
  185. package/shims/web.d.ts.map +1 -0
  186. package/shims/web.js +31 -0
  187. package/shims/web.js.map +1 -0
  188. package/shims/web.mjs +5 -0
  189. package/shims/web.mjs.map +1 -0
  190. package/src/_shims/MultipartBody.ts +9 -0
  191. package/src/_shims/README.md +46 -0
  192. package/src/_shims/auto/runtime-bun.ts +4 -0
  193. package/src/_shims/auto/runtime-node.ts +4 -0
  194. package/src/_shims/auto/runtime.ts +4 -0
  195. package/src/_shims/auto/types-node.ts +4 -0
  196. package/src/_shims/auto/types.d.ts +101 -0
  197. package/src/_shims/auto/types.js +3 -0
  198. package/src/_shims/auto/types.mjs +3 -0
  199. package/src/_shims/bun-runtime.ts +14 -0
  200. package/src/_shims/index.d.ts +81 -0
  201. package/src/_shims/index.js +13 -0
  202. package/src/_shims/index.mjs +7 -0
  203. package/src/_shims/manual-types.d.ts +12 -0
  204. package/src/_shims/manual-types.js +3 -0
  205. package/src/_shims/manual-types.mjs +3 -0
  206. package/src/_shims/node-runtime.ts +81 -0
  207. package/src/_shims/node-types.d.ts +42 -0
  208. package/src/_shims/node-types.js +3 -0
  209. package/src/_shims/node-types.mjs +3 -0
  210. package/src/_shims/registry.ts +67 -0
  211. package/src/_shims/web-runtime.ts +103 -0
  212. package/src/_shims/web-types.d.ts +83 -0
  213. package/src/_shims/web-types.js +3 -0
  214. package/src/_shims/web-types.mjs +3 -0
  215. package/src/core.ts +1196 -0
  216. package/src/error.ts +146 -0
  217. package/src/index.ts +227 -0
  218. package/src/lib/.keep +4 -0
  219. package/src/pagination.ts +79 -0
  220. package/src/resource.ts +11 -0
  221. package/src/resources/auth.ts +97 -0
  222. package/src/resources/chat/chat.ts +186 -0
  223. package/src/resources/chat/completions.ts +102 -0
  224. package/src/resources/chat/index.ts +4 -0
  225. package/src/resources/health.ts +22 -0
  226. package/src/resources/index.ts +23 -0
  227. package/src/resources/shared.ts +46 -0
  228. package/src/resources/tools/definition.ts +31 -0
  229. package/src/resources/tools/formatted.ts +78 -0
  230. package/src/resources/tools/index.ts +27 -0
  231. package/src/resources/tools/tools.ts +249 -0
  232. package/src/resources/tools.ts +240 -0
  233. package/src/shims/node.ts +50 -0
  234. package/src/shims/web.ts +50 -0
  235. package/src/tsconfig.json +11 -0
  236. package/src/uploads.ts +255 -0
  237. package/src/version.ts +1 -0
  238. package/uploads.d.ts +75 -0
  239. package/uploads.d.ts.map +1 -0
  240. package/uploads.js +171 -0
  241. package/uploads.js.map +1 -0
  242. package/uploads.mjs +158 -0
  243. package/uploads.mjs.map +1 -0
  244. package/version.d.ts +2 -0
  245. package/version.d.ts.map +1 -0
  246. package/version.js +5 -0
  247. package/version.js.map +1 -0
  248. package/version.mjs +2 -0
  249. package/version.mjs.map +1 -0
@@ -0,0 +1,186 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as ChatAPI from './chat';
5
+ import * as Shared from '../shared';
6
+ import * as CompletionsAPI from './completions';
7
+
8
+ export class Chat extends APIResource {
9
+ completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client);
10
+ }
11
+
12
+ export interface ChatMessage {
13
+ /**
14
+ * The content of the message.
15
+ */
16
+ content: string;
17
+
18
+ /**
19
+ * The role of the author of this message. One of system, user, tool, or assistant.
20
+ */
21
+ role: string;
22
+
23
+ /**
24
+ * tool Name
25
+ */
26
+ name?: string;
27
+
28
+ /**
29
+ * tool_call_id
30
+ */
31
+ tool_call_id?: string;
32
+
33
+ /**
34
+ * tool calls if any
35
+ */
36
+ tool_calls?: Array<ChatMessage.ToolCall>;
37
+ }
38
+
39
+ export namespace ChatMessage {
40
+ export interface ToolCall {
41
+ id?: string;
42
+
43
+ function?: ToolCall.Function;
44
+
45
+ type?: 'function';
46
+ }
47
+
48
+ export namespace ToolCall {
49
+ export interface Function {
50
+ arguments?: string;
51
+
52
+ name?: string;
53
+ }
54
+ }
55
+ }
56
+
57
+ export interface ChatRequest {
58
+ frequency_penalty?: number;
59
+
60
+ /**
61
+ * LogitBias is must be a token id string (specified by their token ID in the
62
+ * tokenizer), not a word string. incorrect: `"logit_bias":{"You": 6}`, correct:
63
+ * `"logit_bias":{"1639": 6}` refs:
64
+ * https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
65
+ */
66
+ logit_bias?: Record<string, number>;
67
+
68
+ /**
69
+ * LogProbs indicates whether to return log probabilities of the output tokens or
70
+ * not. If true, returns the log probabilities of each output token returned in the
71
+ * content of message. This option is currently not available on the
72
+ * gpt-4-vision-preview model.
73
+ */
74
+ logprobs?: boolean;
75
+
76
+ max_tokens?: number;
77
+
78
+ messages?: Array<ChatMessage>;
79
+
80
+ model?: string;
81
+
82
+ n?: number;
83
+
84
+ /**
85
+ * Disable the default behavior of parallel tool calls by setting it: false.
86
+ */
87
+ parallel_tool_calls?: boolean;
88
+
89
+ presence_penalty?: number;
90
+
91
+ response_format?: 'json_object' | 'text';
92
+
93
+ seed?: number;
94
+
95
+ stop?: Array<string>;
96
+
97
+ stream?: boolean;
98
+
99
+ /**
100
+ * Options for streaming response. Only set this when you set stream: true.
101
+ */
102
+ stream_options?: ChatRequest.StreamOptions;
103
+
104
+ temperature?: number;
105
+
106
+ /**
107
+ * This can be either a string or an ToolChoice object.
108
+ */
109
+ tool_choice?: unknown;
110
+
111
+ tools?: unknown;
112
+
113
+ /**
114
+ * TopLogProbs is an integer between 0 and 5 specifying the number of most likely
115
+ * tokens to return at each token position, each with an associated log
116
+ * probability. logprobs must be set to true if this parameter is used.
117
+ */
118
+ top_logprobs?: number;
119
+
120
+ top_p?: number;
121
+
122
+ user?: string;
123
+ }
124
+
125
+ export namespace ChatRequest {
126
+ /**
127
+ * Options for streaming response. Only set this when you set stream: true.
128
+ */
129
+ export interface StreamOptions {
130
+ /**
131
+ * If set, an additional chunk will be streamed before the data: [DONE] message.
132
+ * The usage field on this chunk shows the token usage statistics for the entire
133
+ * request, and the choices field will always be an empty array. All other chunks
134
+ * will also include a usage field, but with a null value.
135
+ */
136
+ include_usage?: boolean;
137
+ }
138
+ }
139
+
140
+ export interface ChatResponse {
141
+ id?: string;
142
+
143
+ choices?: Array<Choice>;
144
+
145
+ created?: number;
146
+
147
+ model?: string;
148
+
149
+ object?: string;
150
+
151
+ system_fingerprint?: string;
152
+
153
+ usage?: Usage;
154
+ }
155
+
156
+ export interface Choice {
157
+ finish_reason?: string;
158
+
159
+ index?: number;
160
+
161
+ logprobs?: unknown;
162
+
163
+ message?: ChatMessage;
164
+
165
+ tool_authorizations?: Array<Shared.AuthorizationResponse>;
166
+
167
+ tool_messages?: Array<ChatMessage>;
168
+ }
169
+
170
+ export interface Usage {
171
+ completion_tokens?: number;
172
+
173
+ prompt_tokens?: number;
174
+
175
+ total_tokens?: number;
176
+ }
177
+
178
+ export namespace Chat {
179
+ export import ChatMessage = ChatAPI.ChatMessage;
180
+ export import ChatRequest = ChatAPI.ChatRequest;
181
+ export import ChatResponse = ChatAPI.ChatResponse;
182
+ export import Choice = ChatAPI.Choice;
183
+ export import Usage = ChatAPI.Usage;
184
+ export import Completions = CompletionsAPI.Completions;
185
+ export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
186
+ }
@@ -0,0 +1,102 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+ import * as CompletionsAPI from './completions';
6
+ import * as ChatAPI from './chat';
7
+
8
+ export class Completions extends APIResource {
9
+ /**
10
+ * Talk to different LLM Chat APIs via OpenAI's API
11
+ */
12
+ create(body: CompletionCreateParams, options?: Core.RequestOptions): Core.APIPromise<ChatAPI.ChatResponse> {
13
+ return this._client.post('/v1/chat/completions', { body, ...options });
14
+ }
15
+ }
16
+
17
+ export interface CompletionCreateParams {
18
+ frequency_penalty?: number;
19
+
20
+ /**
21
+ * LogitBias is must be a token id string (specified by their token ID in the
22
+ * tokenizer), not a word string. incorrect: `"logit_bias":{"You": 6}`, correct:
23
+ * `"logit_bias":{"1639": 6}` refs:
24
+ * https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
25
+ */
26
+ logit_bias?: Record<string, number>;
27
+
28
+ /**
29
+ * LogProbs indicates whether to return log probabilities of the output tokens or
30
+ * not. If true, returns the log probabilities of each output token returned in the
31
+ * content of message. This option is currently not available on the
32
+ * gpt-4-vision-preview model.
33
+ */
34
+ logprobs?: boolean;
35
+
36
+ max_tokens?: number;
37
+
38
+ messages?: Array<ChatAPI.ChatMessage>;
39
+
40
+ model?: string;
41
+
42
+ n?: number;
43
+
44
+ /**
45
+ * Disable the default behavior of parallel tool calls by setting it: false.
46
+ */
47
+ parallel_tool_calls?: boolean;
48
+
49
+ presence_penalty?: number;
50
+
51
+ response_format?: 'json_object' | 'text';
52
+
53
+ seed?: number;
54
+
55
+ stop?: Array<string>;
56
+
57
+ stream?: boolean;
58
+
59
+ /**
60
+ * Options for streaming response. Only set this when you set stream: true.
61
+ */
62
+ stream_options?: CompletionCreateParams.StreamOptions;
63
+
64
+ temperature?: number;
65
+
66
+ /**
67
+ * This can be either a string or an ToolChoice object.
68
+ */
69
+ tool_choice?: unknown;
70
+
71
+ tools?: unknown;
72
+
73
+ /**
74
+ * TopLogProbs is an integer between 0 and 5 specifying the number of most likely
75
+ * tokens to return at each token position, each with an associated log
76
+ * probability. logprobs must be set to true if this parameter is used.
77
+ */
78
+ top_logprobs?: number;
79
+
80
+ top_p?: number;
81
+
82
+ user?: string;
83
+ }
84
+
85
+ export namespace CompletionCreateParams {
86
+ /**
87
+ * Options for streaming response. Only set this when you set stream: true.
88
+ */
89
+ export interface StreamOptions {
90
+ /**
91
+ * If set, an additional chunk will be streamed before the data: [DONE] message.
92
+ * The usage field on this chunk shows the token usage statistics for the entire
93
+ * request, and the choices field will always be an empty array. All other chunks
94
+ * will also include a usage field, but with a null value.
95
+ */
96
+ include_usage?: boolean;
97
+ }
98
+ }
99
+
100
+ export namespace Completions {
101
+ export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
102
+ }
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { ChatMessage, ChatRequest, ChatResponse, Choice, Usage, Chat } from './chat';
4
+ export { CompletionCreateParams, Completions } from './completions';
@@ -0,0 +1,22 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../resource';
4
+ import * as Core from '../core';
5
+ import * as HealthAPI from './health';
6
+
7
+ export class Health extends APIResource {
8
+ /**
9
+ * Engine Health
10
+ */
11
+ check(options?: Core.RequestOptions): Core.APIPromise<HealthSchema> {
12
+ return this._client.get('/v1/health', options);
13
+ }
14
+ }
15
+
16
+ export interface HealthSchema {
17
+ healthy?: boolean;
18
+ }
19
+
20
+ export namespace Health {
21
+ export import HealthSchema = HealthAPI.HealthSchema;
22
+ }
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './shared';
4
+ export { AuthRequest, AuthAuthorizeParams, AuthStatusParams, Auth } from './auth';
5
+ export {
6
+ AuthorizeToolRequest,
7
+ ExecuteToolRequest,
8
+ Inputs,
9
+ Output,
10
+ Parameter,
11
+ Requirements,
12
+ Response,
13
+ ResponseOutput,
14
+ ToolkitDefinition,
15
+ ValueSchema,
16
+ ToolListParams,
17
+ ToolAuthorizeParams,
18
+ ToolExecuteParams,
19
+ ToolGetParams,
20
+ Tools,
21
+ } from './tools/tools';
22
+ export { ChatMessage, ChatRequest, ChatResponse, Choice, Usage, Chat } from './chat/chat';
23
+ export { HealthSchema, Health } from './health';
@@ -0,0 +1,46 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import * as ToolsAPI from './tools/tools';
4
+ import { OffsetPage } from '../pagination';
5
+
6
+ export interface AuthorizationResponse {
7
+ authorization_id?: string;
8
+
9
+ authorization_url?: string;
10
+
11
+ context?: AuthorizationResponse.Context;
12
+
13
+ scopes?: Array<string>;
14
+
15
+ status?: 'pending' | 'completed' | 'failed';
16
+ }
17
+
18
+ export namespace AuthorizationResponse {
19
+ export interface Context {
20
+ token?: string;
21
+
22
+ user_info?: Record<string, unknown>;
23
+ }
24
+ }
25
+
26
+ export interface Error {
27
+ message?: string;
28
+
29
+ name?: string;
30
+ }
31
+
32
+ export interface ToolDefinition {
33
+ inputs: ToolsAPI.Inputs;
34
+
35
+ name: string;
36
+
37
+ toolkit: ToolsAPI.ToolkitDefinition;
38
+
39
+ description?: string;
40
+
41
+ output?: ToolsAPI.Output;
42
+
43
+ requirements?: ToolsAPI.Requirements;
44
+ }
45
+
46
+ export class ToolDefinitionsOffsetPage extends OffsetPage<ToolDefinition> {}
@@ -0,0 +1,31 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+ import * as DefinitionAPI from './definition';
6
+ import * as Shared from '../shared';
7
+
8
+ export class Definition extends APIResource {
9
+ /**
10
+ * Returns the arcade tool specification for a specific tool
11
+ */
12
+ get(query: DefinitionGetParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ToolDefinition> {
13
+ return this._client.get('/v1/tools/definition', { query, ...options });
14
+ }
15
+ }
16
+
17
+ export interface DefinitionGetParams {
18
+ /**
19
+ * Director ID
20
+ */
21
+ directorId: string;
22
+
23
+ /**
24
+ * Tool ID
25
+ */
26
+ toolId: string;
27
+ }
28
+
29
+ export namespace Definition {
30
+ export import DefinitionGetParams = DefinitionAPI.DefinitionGetParams;
31
+ }
@@ -0,0 +1,78 @@
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 FormattedAPI from './formatted';
7
+ import { OffsetPage, type OffsetPageParams } from '../../pagination';
8
+
9
+ export class Formatted extends APIResource {
10
+ /**
11
+ * Returns a page of tools, optionally filtered by toolkit, formatted for a
12
+ * specific provider
13
+ */
14
+ list(
15
+ query?: FormattedListParams,
16
+ options?: Core.RequestOptions,
17
+ ): Core.PagePromise<FormattedListResponsesOffsetPage, FormattedListResponse>;
18
+ list(
19
+ options?: Core.RequestOptions,
20
+ ): Core.PagePromise<FormattedListResponsesOffsetPage, FormattedListResponse>;
21
+ list(
22
+ query: FormattedListParams | Core.RequestOptions = {},
23
+ options?: Core.RequestOptions,
24
+ ): Core.PagePromise<FormattedListResponsesOffsetPage, FormattedListResponse> {
25
+ if (isRequestOptions(query)) {
26
+ return this.list({}, query);
27
+ }
28
+ return this._client.getAPIList('/v1/tools/formatted/list', FormattedListResponsesOffsetPage, {
29
+ query,
30
+ ...options,
31
+ });
32
+ }
33
+
34
+ /**
35
+ * Returns the formatted tool specification for a specific tool, given a provider
36
+ */
37
+ get(query: FormattedGetParams, options?: Core.RequestOptions): Core.APIPromise<unknown> {
38
+ return this._client.get('/v1/tools/formatted/definition', { query, ...options });
39
+ }
40
+ }
41
+
42
+ export class FormattedListResponsesOffsetPage extends OffsetPage<FormattedListResponse> {}
43
+
44
+ export type FormattedListResponse = unknown;
45
+
46
+ export type FormattedGetResponse = unknown;
47
+
48
+ export interface FormattedListParams extends OffsetPageParams {
49
+ /**
50
+ * Provider format
51
+ */
52
+ format?: string;
53
+
54
+ /**
55
+ * Toolkit name
56
+ */
57
+ toolkit?: string;
58
+ }
59
+
60
+ export interface FormattedGetParams {
61
+ /**
62
+ * Tool ID
63
+ */
64
+ toolId: string;
65
+
66
+ /**
67
+ * Provider format
68
+ */
69
+ format?: string;
70
+ }
71
+
72
+ export namespace Formatted {
73
+ export import FormattedListResponse = FormattedAPI.FormattedListResponse;
74
+ export import FormattedGetResponse = FormattedAPI.FormattedGetResponse;
75
+ export import FormattedListResponsesOffsetPage = FormattedAPI.FormattedListResponsesOffsetPage;
76
+ export import FormattedListParams = FormattedAPI.FormattedListParams;
77
+ export import FormattedGetParams = FormattedAPI.FormattedGetParams;
78
+ }
@@ -0,0 +1,27 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ AuthorizeToolRequest,
5
+ ExecuteToolRequest,
6
+ Inputs,
7
+ Output,
8
+ Parameter,
9
+ Requirements,
10
+ Response,
11
+ ResponseOutput,
12
+ ToolkitDefinition,
13
+ ValueSchema,
14
+ ToolListParams,
15
+ ToolAuthorizeParams,
16
+ ToolExecuteParams,
17
+ ToolGetParams,
18
+ Tools,
19
+ } from './tools';
20
+ export {
21
+ FormattedListResponse,
22
+ FormattedGetResponse,
23
+ FormattedListParams,
24
+ FormattedGetParams,
25
+ FormattedListResponsesOffsetPage,
26
+ Formatted,
27
+ } from './formatted';