@arcadeai/arcadejs 1.8.1 → 1.9.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/core.d.ts +2 -2
  3. package/core.d.ts.map +1 -1
  4. package/core.js +5 -3
  5. package/core.js.map +1 -1
  6. package/core.mjs +5 -3
  7. package/core.mjs.map +1 -1
  8. package/index.d.mts +4 -2
  9. package/index.d.ts +4 -2
  10. package/index.d.ts.map +1 -1
  11. package/index.js.map +1 -1
  12. package/index.mjs +1 -1
  13. package/index.mjs.map +1 -1
  14. package/package.json +4 -5
  15. package/resources/admin/auth-providers.d.ts +150 -46
  16. package/resources/admin/auth-providers.d.ts.map +1 -1
  17. package/resources/auth.d.ts +17 -1
  18. package/resources/auth.d.ts.map +1 -1
  19. package/resources/auth.js +6 -0
  20. package/resources/auth.js.map +1 -1
  21. package/resources/auth.mjs +6 -0
  22. package/resources/auth.mjs.map +1 -1
  23. package/resources/chat/chat.d.ts +3 -1
  24. package/resources/chat/chat.d.ts.map +1 -1
  25. package/resources/chat/completions.d.ts +3 -1
  26. package/resources/chat/completions.d.ts.map +1 -1
  27. package/resources/index.d.ts +1 -1
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs +1 -1
  31. package/resources/index.mjs.map +1 -1
  32. package/resources/shared.d.ts +3 -1
  33. package/resources/shared.d.ts.map +1 -1
  34. package/resources/tools/scheduled.d.ts +3 -1
  35. package/resources/tools/scheduled.d.ts.map +1 -1
  36. package/resources/tools/tools.d.ts +9 -3
  37. package/resources/tools/tools.d.ts.map +1 -1
  38. package/src/core.ts +6 -4
  39. package/src/index.ts +15 -1
  40. package/src/resources/admin/auth-providers.ts +61 -46
  41. package/src/resources/auth.ts +31 -0
  42. package/src/resources/chat/chat.ts +1 -1
  43. package/src/resources/chat/completions.ts +1 -1
  44. package/src/resources/index.ts +9 -1
  45. package/src/resources/shared.ts +1 -1
  46. package/src/resources/tools/scheduled.ts +1 -1
  47. package/src/resources/tools/tools.ts +3 -3
  48. package/src/version.ts +1 -1
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
  51. package/version.mjs +1 -1
@@ -62,6 +62,16 @@ export class Auth extends APIResource {
62
62
  return this._client.post('/v1/auth/authorize', { body, ...options });
63
63
  }
64
64
 
65
+ /**
66
+ * Confirms a user's details during an authorization flow
67
+ */
68
+ confirmUser(
69
+ body: AuthConfirmUserParams,
70
+ options?: Core.RequestOptions,
71
+ ): Core.APIPromise<ConfirmUserResponse> {
72
+ return this._client.post('/v1/auth/confirm_user', { body, ...options });
73
+ }
74
+
65
75
  /**
66
76
  * Checks the status of an ongoing authorization process for a specific tool. If
67
77
  * 'wait' param is present, does not respond until either the auth status becomes
@@ -157,6 +167,18 @@ export namespace AuthRequest {
157
167
  }
158
168
  }
159
169
 
170
+ export interface ConfirmUserRequest {
171
+ flow_id: string;
172
+
173
+ user_id: string;
174
+ }
175
+
176
+ export interface ConfirmUserResponse {
177
+ auth_id: string;
178
+
179
+ next_uri?: string;
180
+ }
181
+
160
182
  export interface AuthAuthorizeParams {
161
183
  auth_requirement: AuthAuthorizeParams.AuthRequirement;
162
184
 
@@ -193,6 +215,12 @@ export namespace AuthAuthorizeParams {
193
215
  }
194
216
  }
195
217
 
218
+ export interface AuthConfirmUserParams {
219
+ flow_id: string;
220
+
221
+ user_id: string;
222
+ }
223
+
196
224
  export interface AuthStatusParams {
197
225
  /**
198
226
  * Authorization ID
@@ -222,7 +250,10 @@ export interface AuthStartOptions {
222
250
  export declare namespace Auth {
223
251
  export {
224
252
  type AuthRequest as AuthRequest,
253
+ type ConfirmUserRequest as ConfirmUserRequest,
254
+ type ConfirmUserResponse as ConfirmUserResponse,
225
255
  type AuthAuthorizeParams as AuthAuthorizeParams,
256
+ type AuthConfirmUserParams as AuthConfirmUserParams,
226
257
  type AuthStatusParams as AuthStatusParams,
227
258
  type AuthStartOptions as AuthStartOptions,
228
259
  };
@@ -63,7 +63,7 @@ export interface ChatRequest {
63
63
  * `"logit_bias":{"1639": 6}` refs:
64
64
  * https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
65
65
  */
66
- logit_bias?: Record<string, number>;
66
+ logit_bias?: { [key: string]: number };
67
67
 
68
68
  /**
69
69
  * LogProbs indicates whether to return log probabilities of the output tokens or
@@ -22,7 +22,7 @@ export interface CompletionCreateParams {
22
22
  * `"logit_bias":{"1639": 6}` refs:
23
23
  * https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
24
24
  */
25
- logit_bias?: Record<string, number>;
25
+ logit_bias?: { [key: string]: number };
26
26
 
27
27
  /**
28
28
  * LogProbs indicates whether to return log probabilities of the output tokens or
@@ -2,7 +2,15 @@
2
2
 
3
3
  export * from './shared';
4
4
  export { Admin } from './admin/admin';
5
- export { Auth, type AuthRequest, type AuthAuthorizeParams, type AuthStatusParams } from './auth';
5
+ export {
6
+ Auth,
7
+ type AuthRequest,
8
+ type ConfirmUserRequest,
9
+ type ConfirmUserResponse,
10
+ type AuthAuthorizeParams,
11
+ type AuthConfirmUserParams,
12
+ type AuthStatusParams,
13
+ } from './auth';
6
14
  export {
7
15
  Chat,
8
16
  type ChatMessage,
@@ -3,7 +3,7 @@
3
3
  export interface AuthorizationContext {
4
4
  token?: string;
5
5
 
6
- user_info?: Record<string, unknown>;
6
+ user_info?: { [key: string]: unknown };
7
7
  }
8
8
 
9
9
  export interface AuthorizationResponse {
@@ -47,7 +47,7 @@ export interface ScheduledGetResponse {
47
47
 
48
48
  finished_at?: string;
49
49
 
50
- input?: Record<string, unknown>;
50
+ input?: { [key: string]: unknown };
51
51
 
52
52
  run_at?: string;
53
53
 
@@ -105,7 +105,7 @@ export interface ExecuteToolRequest {
105
105
  /**
106
106
  * JSON input to the tool, if any
107
107
  */
108
- input?: Record<string, unknown>;
108
+ input?: { [key: string]: unknown };
109
109
 
110
110
  /**
111
111
  * The time at which the tool should be run (optional). If not provided, the tool
@@ -193,7 +193,7 @@ export interface ToolDefinition {
193
193
 
194
194
  description?: string;
195
195
 
196
- formatted_schema?: Record<string, unknown>;
196
+ formatted_schema?: { [key: string]: unknown };
197
197
 
198
198
  output?: ToolDefinition.Output;
199
199
 
@@ -401,7 +401,7 @@ export interface ToolExecuteParams {
401
401
  /**
402
402
  * JSON input to the tool, if any
403
403
  */
404
- input?: Record<string, unknown>;
404
+ input?: { [key: string]: unknown };
405
405
 
406
406
  /**
407
407
  * The time at which the tool should be run (optional). If not provided, the tool
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.8.1'; // x-release-please-version
1
+ export const VERSION = '1.9.1'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.8.1";
1
+ export declare const VERSION = "1.9.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.8.1'; // x-release-please-version
4
+ exports.VERSION = '1.9.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.8.1'; // x-release-please-version
1
+ export const VERSION = '1.9.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map