@onkernel/sdk 0.32.0 → 0.34.0

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 (133) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/client.d.mts +0 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +0 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +7 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +7 -3
  9. package/client.mjs.map +1 -1
  10. package/core/streaming.js.map +1 -1
  11. package/core/streaming.mjs.map +1 -1
  12. package/package.json +1 -1
  13. package/resources/auth/auth.d.mts +2 -2
  14. package/resources/auth/auth.d.mts.map +1 -1
  15. package/resources/auth/auth.d.ts +2 -2
  16. package/resources/auth/auth.d.ts.map +1 -1
  17. package/resources/auth/auth.js.map +1 -1
  18. package/resources/auth/auth.mjs.map +1 -1
  19. package/resources/auth/connections.d.mts +172 -59
  20. package/resources/auth/connections.d.mts.map +1 -1
  21. package/resources/auth/connections.d.ts +172 -59
  22. package/resources/auth/connections.d.ts.map +1 -1
  23. package/resources/auth/connections.js +12 -17
  24. package/resources/auth/connections.js.map +1 -1
  25. package/resources/auth/connections.mjs +12 -17
  26. package/resources/auth/connections.mjs.map +1 -1
  27. package/resources/auth/index.d.mts +1 -1
  28. package/resources/auth/index.d.mts.map +1 -1
  29. package/resources/auth/index.d.ts +1 -1
  30. package/resources/auth/index.d.ts.map +1 -1
  31. package/resources/auth/index.js.map +1 -1
  32. package/resources/auth/index.mjs.map +1 -1
  33. package/resources/browser-pools.d.mts +28 -28
  34. package/resources/browser-pools.d.ts +28 -28
  35. package/resources/browsers/browsers.d.mts +35 -35
  36. package/resources/browsers/browsers.d.ts +35 -35
  37. package/resources/credentials.d.mts +4 -0
  38. package/resources/credentials.d.mts.map +1 -1
  39. package/resources/credentials.d.ts +4 -0
  40. package/resources/credentials.d.ts.map +1 -1
  41. package/resources/index.d.mts +0 -1
  42. package/resources/index.d.mts.map +1 -1
  43. package/resources/index.d.ts +0 -1
  44. package/resources/index.d.ts.map +1 -1
  45. package/resources/index.js +1 -3
  46. package/resources/index.js.map +1 -1
  47. package/resources/index.mjs +0 -1
  48. package/resources/index.mjs.map +1 -1
  49. package/resources/invocations.d.mts +7 -7
  50. package/resources/invocations.d.ts +7 -7
  51. package/resources/shared.d.mts +21 -7
  52. package/resources/shared.d.mts.map +1 -1
  53. package/resources/shared.d.ts +21 -7
  54. package/resources/shared.d.ts.map +1 -1
  55. package/src/client.ts +9 -6
  56. package/src/core/streaming.ts +2 -2
  57. package/src/resources/auth/auth.ts +0 -2
  58. package/src/resources/auth/connections.ts +195 -60
  59. package/src/resources/auth/index.ts +0 -1
  60. package/src/resources/browser-pools.ts +28 -28
  61. package/src/resources/browsers/browsers.ts +35 -35
  62. package/src/resources/credentials.ts +5 -0
  63. package/src/resources/index.ts +0 -1
  64. package/src/resources/invocations.ts +7 -7
  65. package/src/resources/shared.ts +19 -7
  66. package/src/version.ts +1 -1
  67. package/version.d.mts +1 -1
  68. package/version.d.ts +1 -1
  69. package/version.js +1 -1
  70. package/version.mjs +1 -1
  71. package/resources/agents/agents.d.mts +0 -10
  72. package/resources/agents/agents.d.mts.map +0 -1
  73. package/resources/agents/agents.d.ts +0 -10
  74. package/resources/agents/agents.d.ts.map +0 -1
  75. package/resources/agents/agents.js +0 -17
  76. package/resources/agents/agents.js.map +0 -1
  77. package/resources/agents/agents.mjs +0 -12
  78. package/resources/agents/agents.mjs.map +0 -1
  79. package/resources/agents/auth/auth.d.mts +0 -474
  80. package/resources/agents/auth/auth.d.mts.map +0 -1
  81. package/resources/agents/auth/auth.d.ts +0 -474
  82. package/resources/agents/auth/auth.d.ts.map +0 -1
  83. package/resources/agents/auth/auth.js +0 -66
  84. package/resources/agents/auth/auth.js.map +0 -1
  85. package/resources/agents/auth/auth.mjs +0 -61
  86. package/resources/agents/auth/auth.mjs.map +0 -1
  87. package/resources/agents/auth/index.d.mts +0 -3
  88. package/resources/agents/auth/index.d.mts.map +0 -1
  89. package/resources/agents/auth/index.d.ts +0 -3
  90. package/resources/agents/auth/index.d.ts.map +0 -1
  91. package/resources/agents/auth/index.js +0 -9
  92. package/resources/agents/auth/index.js.map +0 -1
  93. package/resources/agents/auth/index.mjs +0 -4
  94. package/resources/agents/auth/index.mjs.map +0 -1
  95. package/resources/agents/auth/invocations.d.mts +0 -96
  96. package/resources/agents/auth/invocations.d.mts.map +0 -1
  97. package/resources/agents/auth/invocations.d.ts +0 -96
  98. package/resources/agents/auth/invocations.d.ts.map +0 -1
  99. package/resources/agents/auth/invocations.js +0 -50
  100. package/resources/agents/auth/invocations.js.map +0 -1
  101. package/resources/agents/auth/invocations.mjs +0 -46
  102. package/resources/agents/auth/invocations.mjs.map +0 -1
  103. package/resources/agents/auth.d.mts +0 -2
  104. package/resources/agents/auth.d.mts.map +0 -1
  105. package/resources/agents/auth.d.ts +0 -2
  106. package/resources/agents/auth.d.ts.map +0 -1
  107. package/resources/agents/auth.js +0 -6
  108. package/resources/agents/auth.js.map +0 -1
  109. package/resources/agents/auth.mjs +0 -3
  110. package/resources/agents/auth.mjs.map +0 -1
  111. package/resources/agents/index.d.mts +0 -3
  112. package/resources/agents/index.d.mts.map +0 -1
  113. package/resources/agents/index.d.ts +0 -3
  114. package/resources/agents/index.d.ts.map +0 -1
  115. package/resources/agents/index.js +0 -9
  116. package/resources/agents/index.js.map +0 -1
  117. package/resources/agents/index.mjs +0 -4
  118. package/resources/agents/index.mjs.map +0 -1
  119. package/resources/agents.d.mts +0 -2
  120. package/resources/agents.d.mts.map +0 -1
  121. package/resources/agents.d.ts +0 -2
  122. package/resources/agents.d.ts.map +0 -1
  123. package/resources/agents.js +0 -6
  124. package/resources/agents.js.map +0 -1
  125. package/resources/agents.mjs +0 -3
  126. package/resources/agents.mjs.map +0 -1
  127. package/src/resources/agents/agents.ts +0 -39
  128. package/src/resources/agents/auth/auth.ts +0 -599
  129. package/src/resources/agents/auth/index.ts +0 -22
  130. package/src/resources/agents/auth/invocations.ts +0 -137
  131. package/src/resources/agents/auth.ts +0 -3
  132. package/src/resources/agents/index.ts +0 -16
  133. package/src/resources/agents.ts +0 -3
@@ -1,137 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import * as AuthAPI from './auth';
5
- import { APIPromise } from '../../../core/api-promise';
6
- import { RequestOptions } from '../../../internal/request-options';
7
- import { path } from '../../../internal/utils/path';
8
-
9
- export class Invocations extends APIResource {
10
- /**
11
- * **Deprecated: Use POST /auth/connections/{id}/login instead.** Creates a new
12
- * authentication invocation for the specified auth agent. This starts the auth
13
- * flow and returns a hosted URL for the user to complete authentication.
14
- *
15
- * @deprecated
16
- */
17
- create(
18
- body: InvocationCreateParams,
19
- options?: RequestOptions,
20
- ): APIPromise<AuthAPI.AuthAgentInvocationCreateResponse> {
21
- return this._client.post('/agents/auth/invocations', { body, ...options });
22
- }
23
-
24
- /**
25
- * **Deprecated: Use GET /auth/connections/{id} instead.** Returns invocation
26
- * details including status, app_name, and domain. Supports both API key and JWT
27
- * (from exchange endpoint) authentication.
28
- *
29
- * @deprecated
30
- */
31
- retrieve(invocationID: string, options?: RequestOptions): APIPromise<AuthAPI.AgentAuthInvocationResponse> {
32
- return this._client.get(path`/agents/auth/invocations/${invocationID}`, options);
33
- }
34
-
35
- /**
36
- * **Deprecated: Use POST /auth/connections/{id}/exchange instead.** Validates the
37
- * handoff code and returns a JWT token for subsequent requests. No authentication
38
- * required (the handoff code serves as the credential).
39
- *
40
- * @deprecated
41
- */
42
- exchange(
43
- invocationID: string,
44
- body: InvocationExchangeParams,
45
- options?: RequestOptions,
46
- ): APIPromise<InvocationExchangeResponse> {
47
- return this._client.post(path`/agents/auth/invocations/${invocationID}/exchange`, { body, ...options });
48
- }
49
-
50
- /**
51
- * **Deprecated: Use POST /auth/connections/{id}/submit instead.** Submits field
52
- * values for the discovered login form. Returns immediately after submission is
53
- * accepted. Poll the invocation endpoint to track progress and get results.
54
- *
55
- * @deprecated
56
- */
57
- submit(
58
- invocationID: string,
59
- body: InvocationSubmitParams,
60
- options?: RequestOptions,
61
- ): APIPromise<AuthAPI.AgentAuthSubmitResponse> {
62
- return this._client.post(path`/agents/auth/invocations/${invocationID}/submit`, { body, ...options });
63
- }
64
- }
65
-
66
- /**
67
- * Response from exchange endpoint
68
- */
69
- export interface InvocationExchangeResponse {
70
- /**
71
- * Invocation ID
72
- */
73
- invocation_id: string;
74
-
75
- /**
76
- * JWT token with invocation_id claim (30 minute TTL)
77
- */
78
- jwt: string;
79
- }
80
-
81
- export interface InvocationCreateParams {
82
- /**
83
- * ID of the auth agent to create an invocation for
84
- */
85
- auth_agent_id: string;
86
-
87
- /**
88
- * If provided, saves the submitted credentials under this name upon successful
89
- * login. The credential will be linked to the auth agent for automatic
90
- * re-authentication.
91
- */
92
- save_credential_as?: string;
93
- }
94
-
95
- export interface InvocationExchangeParams {
96
- /**
97
- * Handoff code from start endpoint
98
- */
99
- code: string;
100
- }
101
-
102
- export type InvocationSubmitParams =
103
- | InvocationSubmitParams.Variant0
104
- | InvocationSubmitParams.Variant1
105
- | InvocationSubmitParams.Variant2;
106
-
107
- export declare namespace InvocationSubmitParams {
108
- export interface Variant0 {
109
- /**
110
- * Values for the discovered login fields
111
- */
112
- field_values: { [key: string]: string };
113
- }
114
-
115
- export interface Variant1 {
116
- /**
117
- * Selector of SSO button to click
118
- */
119
- sso_button: string;
120
- }
121
-
122
- export interface Variant2 {
123
- /**
124
- * The MFA delivery method type (includes password for auth method selection pages)
125
- */
126
- selected_mfa_type: 'sms' | 'call' | 'email' | 'totp' | 'push' | 'password';
127
- }
128
- }
129
-
130
- export declare namespace Invocations {
131
- export {
132
- type InvocationExchangeResponse as InvocationExchangeResponse,
133
- type InvocationCreateParams as InvocationCreateParams,
134
- type InvocationExchangeParams as InvocationExchangeParams,
135
- type InvocationSubmitParams as InvocationSubmitParams,
136
- };
137
- }
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export * from './auth/index';
@@ -1,16 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export { Agents } from './agents';
4
- export {
5
- Auth,
6
- type AgentAuthInvocationResponse,
7
- type AgentAuthSubmitResponse,
8
- type AuthAgent,
9
- type AuthAgentCreateRequest,
10
- type AuthAgentInvocationCreateRequest,
11
- type AuthAgentInvocationCreateResponse,
12
- type DiscoveredField,
13
- type AuthCreateParams,
14
- type AuthListParams,
15
- type AuthAgentsOffsetPagination,
16
- } from './auth/index';
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export * from './agents/index';