@onkernel/sdk 0.23.0 → 0.24.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.
- package/CHANGELOG.md +9 -0
- package/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +2 -2
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +2 -2
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/auth/auth.d.mts +113 -15
- package/resources/agents/auth/auth.d.mts.map +1 -1
- package/resources/agents/auth/auth.d.ts +113 -15
- package/resources/agents/auth/auth.d.ts.map +1 -1
- package/resources/agents/auth/auth.js +35 -0
- package/resources/agents/auth/auth.js.map +1 -1
- package/resources/agents/auth/auth.mjs +35 -0
- package/resources/agents/auth/auth.mjs.map +1 -1
- package/resources/agents/auth/index.d.mts +1 -1
- package/resources/agents/auth/index.d.mts.map +1 -1
- package/resources/agents/auth/index.d.ts +1 -1
- package/resources/agents/auth/index.d.ts.map +1 -1
- package/resources/agents/auth/index.js.map +1 -1
- package/resources/agents/auth/index.mjs.map +1 -1
- package/resources/agents/auth/invocations.d.mts +6 -0
- package/resources/agents/auth/invocations.d.mts.map +1 -1
- package/resources/agents/auth/invocations.d.ts +6 -0
- package/resources/agents/auth/invocations.d.ts.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/browser-pools.d.mts +63 -98
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +63 -98
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/credentials.d.mts +163 -0
- package/resources/credentials.d.mts.map +1 -0
- package/resources/credentials.d.ts +163 -0
- package/resources/credentials.d.ts.map +1 -0
- package/resources/credentials.js +82 -0
- package/resources/credentials.js.map +1 -0
- package/resources/credentials.mjs +78 -0
- package/resources/credentials.mjs.map +1 -0
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -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 -0
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +23 -8
- package/src/resources/agents/agents.ts +2 -0
- package/src/resources/agents/auth/auth.ts +138 -14
- package/src/resources/agents/auth/index.ts +1 -0
- package/src/resources/agents/auth/invocations.ts +7 -0
- package/src/resources/agents/index.ts +1 -0
- package/src/resources/browser-pools.ts +72 -115
- package/src/resources/credentials.ts +205 -0
- package/src/resources/index.ts +10 -4
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAcsB;AAbpB,6FAAA,IAAI,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,MAAM,EAAE;OACV,EACL,IAAI,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,MAAM,EAAE;OACV,EACL,IAAI,GAaL"}
|
|
@@ -111,7 +111,7 @@ export interface BrowserPool {
|
|
|
111
111
|
/**
|
|
112
112
|
* Configuration used to create all browsers in this pool
|
|
113
113
|
*/
|
|
114
|
-
browser_pool_config:
|
|
114
|
+
browser_pool_config: BrowserPool.BrowserPoolConfig;
|
|
115
115
|
/**
|
|
116
116
|
* Timestamp when the browser pool was created
|
|
117
117
|
*/
|
|
@@ -121,104 +121,69 @@ export interface BrowserPool {
|
|
|
121
121
|
*/
|
|
122
122
|
name?: string;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
* Request body for acquiring a browser from the pool.
|
|
126
|
-
*/
|
|
127
|
-
export interface BrowserPoolAcquireRequest {
|
|
128
|
-
/**
|
|
129
|
-
* Maximum number of seconds to wait for a browser to be available. Defaults to the
|
|
130
|
-
* calculated time it would take to fill the pool at the currently configured fill
|
|
131
|
-
* rate.
|
|
132
|
-
*/
|
|
133
|
-
acquire_timeout_seconds?: number;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Request body for releasing a browser back to the pool.
|
|
137
|
-
*/
|
|
138
|
-
export interface BrowserPoolReleaseRequest {
|
|
139
|
-
/**
|
|
140
|
-
* Browser session ID to release back to the pool
|
|
141
|
-
*/
|
|
142
|
-
session_id: string;
|
|
143
|
-
/**
|
|
144
|
-
* Whether to reuse the browser instance or destroy it and create a new one.
|
|
145
|
-
* Defaults to true.
|
|
146
|
-
*/
|
|
147
|
-
reuse?: boolean;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Parameters for creating a browser pool. All browsers in the pool will be created
|
|
151
|
-
* with the same configuration.
|
|
152
|
-
*/
|
|
153
|
-
export interface BrowserPoolRequest {
|
|
154
|
-
/**
|
|
155
|
-
* Number of browsers to create in the pool
|
|
156
|
-
*/
|
|
157
|
-
size: number;
|
|
158
|
-
/**
|
|
159
|
-
* List of browser extensions to load into the session. Provide each by id or name.
|
|
160
|
-
*/
|
|
161
|
-
extensions?: Array<Shared.BrowserExtension>;
|
|
162
|
-
/**
|
|
163
|
-
* Percentage of the pool to fill per minute. Defaults to 10%.
|
|
164
|
-
*/
|
|
165
|
-
fill_rate_per_minute?: number;
|
|
166
|
-
/**
|
|
167
|
-
* If true, launches the browser using a headless image. Defaults to false.
|
|
168
|
-
*/
|
|
169
|
-
headless?: boolean;
|
|
170
|
-
/**
|
|
171
|
-
* If true, launches the browser in kiosk mode to hide address bar and tabs in live
|
|
172
|
-
* view.
|
|
173
|
-
*/
|
|
174
|
-
kiosk_mode?: boolean;
|
|
124
|
+
export declare namespace BrowserPool {
|
|
175
125
|
/**
|
|
176
|
-
*
|
|
177
|
-
*/
|
|
178
|
-
name?: string;
|
|
179
|
-
/**
|
|
180
|
-
* Profile selection for the browser session. Provide either id or name. If
|
|
181
|
-
* specified, the matching profile will be loaded into the browser session.
|
|
182
|
-
* Profiles must be created beforehand.
|
|
183
|
-
*/
|
|
184
|
-
profile?: Shared.BrowserProfile;
|
|
185
|
-
/**
|
|
186
|
-
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
187
|
-
* belonging to the caller's org.
|
|
188
|
-
*/
|
|
189
|
-
proxy_id?: string;
|
|
190
|
-
/**
|
|
191
|
-
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
192
|
-
* mechanisms.
|
|
193
|
-
*/
|
|
194
|
-
stealth?: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* Default idle timeout in seconds for browsers acquired from this pool before they
|
|
197
|
-
* are destroyed. Defaults to 600 seconds if not specified
|
|
198
|
-
*/
|
|
199
|
-
timeout_seconds?: number;
|
|
200
|
-
/**
|
|
201
|
-
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
202
|
-
* image defaults apply (1920x1080@25). Only specific viewport configurations are
|
|
203
|
-
* supported. The server will reject unsupported combinations. Supported
|
|
204
|
-
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
|
|
205
|
-
* 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
|
|
206
|
-
* automatically determined from the width and height if they match a supported
|
|
207
|
-
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
208
|
-
* live view browser
|
|
209
|
-
*/
|
|
210
|
-
viewport?: Shared.BrowserViewport;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Parameters for updating a browser pool. All browsers in the pool will be created
|
|
214
|
-
* with the same configuration.
|
|
215
|
-
*/
|
|
216
|
-
export interface BrowserPoolUpdateRequest extends BrowserPoolRequest {
|
|
217
|
-
/**
|
|
218
|
-
* Whether to discard all idle browsers and rebuild the pool immediately. Defaults
|
|
219
|
-
* to false.
|
|
126
|
+
* Configuration used to create all browsers in this pool
|
|
220
127
|
*/
|
|
221
|
-
|
|
128
|
+
interface BrowserPoolConfig {
|
|
129
|
+
/**
|
|
130
|
+
* Number of browsers to create in the pool
|
|
131
|
+
*/
|
|
132
|
+
size: number;
|
|
133
|
+
/**
|
|
134
|
+
* List of browser extensions to load into the session. Provide each by id or name.
|
|
135
|
+
*/
|
|
136
|
+
extensions?: Array<Shared.BrowserExtension>;
|
|
137
|
+
/**
|
|
138
|
+
* Percentage of the pool to fill per minute. Defaults to 10%.
|
|
139
|
+
*/
|
|
140
|
+
fill_rate_per_minute?: number;
|
|
141
|
+
/**
|
|
142
|
+
* If true, launches the browser using a headless image. Defaults to false.
|
|
143
|
+
*/
|
|
144
|
+
headless?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* If true, launches the browser in kiosk mode to hide address bar and tabs in live
|
|
147
|
+
* view.
|
|
148
|
+
*/
|
|
149
|
+
kiosk_mode?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Optional name for the browser pool. Must be unique within the organization.
|
|
152
|
+
*/
|
|
153
|
+
name?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Profile selection for the browser session. Provide either id or name. If
|
|
156
|
+
* specified, the matching profile will be loaded into the browser session.
|
|
157
|
+
* Profiles must be created beforehand.
|
|
158
|
+
*/
|
|
159
|
+
profile?: Shared.BrowserProfile;
|
|
160
|
+
/**
|
|
161
|
+
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
162
|
+
* belonging to the caller's org.
|
|
163
|
+
*/
|
|
164
|
+
proxy_id?: string;
|
|
165
|
+
/**
|
|
166
|
+
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
167
|
+
* mechanisms.
|
|
168
|
+
*/
|
|
169
|
+
stealth?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Default idle timeout in seconds for browsers acquired from this pool before they
|
|
172
|
+
* are destroyed. Defaults to 600 seconds if not specified
|
|
173
|
+
*/
|
|
174
|
+
timeout_seconds?: number;
|
|
175
|
+
/**
|
|
176
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
177
|
+
* image defaults apply (1920x1080@25). Only specific viewport configurations are
|
|
178
|
+
* supported. The server will reject unsupported combinations. Supported
|
|
179
|
+
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
|
|
180
|
+
* 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
|
|
181
|
+
* automatically determined from the width and height if they match a supported
|
|
182
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
183
|
+
* live view browser
|
|
184
|
+
*/
|
|
185
|
+
viewport?: Shared.BrowserViewport;
|
|
186
|
+
}
|
|
222
187
|
}
|
|
223
188
|
export type BrowserPoolListResponse = Array<BrowserPool>;
|
|
224
189
|
export interface BrowserPoolAcquireResponse {
|
|
@@ -434,6 +399,6 @@ export interface BrowserPoolReleaseParams {
|
|
|
434
399
|
reuse?: boolean;
|
|
435
400
|
}
|
|
436
401
|
export declare namespace BrowserPools {
|
|
437
|
-
export { type BrowserPool as BrowserPool, type
|
|
402
|
+
export { type BrowserPool as BrowserPool, type BrowserPoolListResponse as BrowserPoolListResponse, type BrowserPoolAcquireResponse as BrowserPoolAcquireResponse, type BrowserPoolCreateParams as BrowserPoolCreateParams, type BrowserPoolUpdateParams as BrowserPoolUpdateParams, type BrowserPoolDeleteParams as BrowserPoolDeleteParams, type BrowserPoolAcquireParams as BrowserPoolAcquireParams, type BrowserPoolReleaseParams as BrowserPoolReleaseParams, };
|
|
438
403
|
}
|
|
439
404
|
//# sourceMappingURL=browser-pools.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-pools.d.mts","sourceRoot":"","sources":["../src/resources/browser-pools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIxF;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAI7E;;;;;;;;;;OAUG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAI1G;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAInE;;;;;;;;OAQG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IAQnB;;;;;;;;;;;;OAYG;IACH,OAAO,CACL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,CAAC;CACnC;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -111,7 +111,7 @@ export interface BrowserPool {
|
|
|
111
111
|
/**
|
|
112
112
|
* Configuration used to create all browsers in this pool
|
|
113
113
|
*/
|
|
114
|
-
browser_pool_config:
|
|
114
|
+
browser_pool_config: BrowserPool.BrowserPoolConfig;
|
|
115
115
|
/**
|
|
116
116
|
* Timestamp when the browser pool was created
|
|
117
117
|
*/
|
|
@@ -121,104 +121,69 @@ export interface BrowserPool {
|
|
|
121
121
|
*/
|
|
122
122
|
name?: string;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
* Request body for acquiring a browser from the pool.
|
|
126
|
-
*/
|
|
127
|
-
export interface BrowserPoolAcquireRequest {
|
|
128
|
-
/**
|
|
129
|
-
* Maximum number of seconds to wait for a browser to be available. Defaults to the
|
|
130
|
-
* calculated time it would take to fill the pool at the currently configured fill
|
|
131
|
-
* rate.
|
|
132
|
-
*/
|
|
133
|
-
acquire_timeout_seconds?: number;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Request body for releasing a browser back to the pool.
|
|
137
|
-
*/
|
|
138
|
-
export interface BrowserPoolReleaseRequest {
|
|
139
|
-
/**
|
|
140
|
-
* Browser session ID to release back to the pool
|
|
141
|
-
*/
|
|
142
|
-
session_id: string;
|
|
143
|
-
/**
|
|
144
|
-
* Whether to reuse the browser instance or destroy it and create a new one.
|
|
145
|
-
* Defaults to true.
|
|
146
|
-
*/
|
|
147
|
-
reuse?: boolean;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Parameters for creating a browser pool. All browsers in the pool will be created
|
|
151
|
-
* with the same configuration.
|
|
152
|
-
*/
|
|
153
|
-
export interface BrowserPoolRequest {
|
|
154
|
-
/**
|
|
155
|
-
* Number of browsers to create in the pool
|
|
156
|
-
*/
|
|
157
|
-
size: number;
|
|
158
|
-
/**
|
|
159
|
-
* List of browser extensions to load into the session. Provide each by id or name.
|
|
160
|
-
*/
|
|
161
|
-
extensions?: Array<Shared.BrowserExtension>;
|
|
162
|
-
/**
|
|
163
|
-
* Percentage of the pool to fill per minute. Defaults to 10%.
|
|
164
|
-
*/
|
|
165
|
-
fill_rate_per_minute?: number;
|
|
166
|
-
/**
|
|
167
|
-
* If true, launches the browser using a headless image. Defaults to false.
|
|
168
|
-
*/
|
|
169
|
-
headless?: boolean;
|
|
170
|
-
/**
|
|
171
|
-
* If true, launches the browser in kiosk mode to hide address bar and tabs in live
|
|
172
|
-
* view.
|
|
173
|
-
*/
|
|
174
|
-
kiosk_mode?: boolean;
|
|
124
|
+
export declare namespace BrowserPool {
|
|
175
125
|
/**
|
|
176
|
-
*
|
|
177
|
-
*/
|
|
178
|
-
name?: string;
|
|
179
|
-
/**
|
|
180
|
-
* Profile selection for the browser session. Provide either id or name. If
|
|
181
|
-
* specified, the matching profile will be loaded into the browser session.
|
|
182
|
-
* Profiles must be created beforehand.
|
|
183
|
-
*/
|
|
184
|
-
profile?: Shared.BrowserProfile;
|
|
185
|
-
/**
|
|
186
|
-
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
187
|
-
* belonging to the caller's org.
|
|
188
|
-
*/
|
|
189
|
-
proxy_id?: string;
|
|
190
|
-
/**
|
|
191
|
-
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
192
|
-
* mechanisms.
|
|
193
|
-
*/
|
|
194
|
-
stealth?: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* Default idle timeout in seconds for browsers acquired from this pool before they
|
|
197
|
-
* are destroyed. Defaults to 600 seconds if not specified
|
|
198
|
-
*/
|
|
199
|
-
timeout_seconds?: number;
|
|
200
|
-
/**
|
|
201
|
-
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
202
|
-
* image defaults apply (1920x1080@25). Only specific viewport configurations are
|
|
203
|
-
* supported. The server will reject unsupported combinations. Supported
|
|
204
|
-
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
|
|
205
|
-
* 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
|
|
206
|
-
* automatically determined from the width and height if they match a supported
|
|
207
|
-
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
208
|
-
* live view browser
|
|
209
|
-
*/
|
|
210
|
-
viewport?: Shared.BrowserViewport;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Parameters for updating a browser pool. All browsers in the pool will be created
|
|
214
|
-
* with the same configuration.
|
|
215
|
-
*/
|
|
216
|
-
export interface BrowserPoolUpdateRequest extends BrowserPoolRequest {
|
|
217
|
-
/**
|
|
218
|
-
* Whether to discard all idle browsers and rebuild the pool immediately. Defaults
|
|
219
|
-
* to false.
|
|
126
|
+
* Configuration used to create all browsers in this pool
|
|
220
127
|
*/
|
|
221
|
-
|
|
128
|
+
interface BrowserPoolConfig {
|
|
129
|
+
/**
|
|
130
|
+
* Number of browsers to create in the pool
|
|
131
|
+
*/
|
|
132
|
+
size: number;
|
|
133
|
+
/**
|
|
134
|
+
* List of browser extensions to load into the session. Provide each by id or name.
|
|
135
|
+
*/
|
|
136
|
+
extensions?: Array<Shared.BrowserExtension>;
|
|
137
|
+
/**
|
|
138
|
+
* Percentage of the pool to fill per minute. Defaults to 10%.
|
|
139
|
+
*/
|
|
140
|
+
fill_rate_per_minute?: number;
|
|
141
|
+
/**
|
|
142
|
+
* If true, launches the browser using a headless image. Defaults to false.
|
|
143
|
+
*/
|
|
144
|
+
headless?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* If true, launches the browser in kiosk mode to hide address bar and tabs in live
|
|
147
|
+
* view.
|
|
148
|
+
*/
|
|
149
|
+
kiosk_mode?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Optional name for the browser pool. Must be unique within the organization.
|
|
152
|
+
*/
|
|
153
|
+
name?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Profile selection for the browser session. Provide either id or name. If
|
|
156
|
+
* specified, the matching profile will be loaded into the browser session.
|
|
157
|
+
* Profiles must be created beforehand.
|
|
158
|
+
*/
|
|
159
|
+
profile?: Shared.BrowserProfile;
|
|
160
|
+
/**
|
|
161
|
+
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
162
|
+
* belonging to the caller's org.
|
|
163
|
+
*/
|
|
164
|
+
proxy_id?: string;
|
|
165
|
+
/**
|
|
166
|
+
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
167
|
+
* mechanisms.
|
|
168
|
+
*/
|
|
169
|
+
stealth?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Default idle timeout in seconds for browsers acquired from this pool before they
|
|
172
|
+
* are destroyed. Defaults to 600 seconds if not specified
|
|
173
|
+
*/
|
|
174
|
+
timeout_seconds?: number;
|
|
175
|
+
/**
|
|
176
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
177
|
+
* image defaults apply (1920x1080@25). Only specific viewport configurations are
|
|
178
|
+
* supported. The server will reject unsupported combinations. Supported
|
|
179
|
+
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
|
|
180
|
+
* 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
|
|
181
|
+
* automatically determined from the width and height if they match a supported
|
|
182
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
183
|
+
* live view browser
|
|
184
|
+
*/
|
|
185
|
+
viewport?: Shared.BrowserViewport;
|
|
186
|
+
}
|
|
222
187
|
}
|
|
223
188
|
export type BrowserPoolListResponse = Array<BrowserPool>;
|
|
224
189
|
export interface BrowserPoolAcquireResponse {
|
|
@@ -434,6 +399,6 @@ export interface BrowserPoolReleaseParams {
|
|
|
434
399
|
reuse?: boolean;
|
|
435
400
|
}
|
|
436
401
|
export declare namespace BrowserPools {
|
|
437
|
-
export { type BrowserPool as BrowserPool, type
|
|
402
|
+
export { type BrowserPool as BrowserPool, type BrowserPoolListResponse as BrowserPoolListResponse, type BrowserPoolAcquireResponse as BrowserPoolAcquireResponse, type BrowserPoolCreateParams as BrowserPoolCreateParams, type BrowserPoolUpdateParams as BrowserPoolUpdateParams, type BrowserPoolDeleteParams as BrowserPoolDeleteParams, type BrowserPoolAcquireParams as BrowserPoolAcquireParams, type BrowserPoolReleaseParams as BrowserPoolReleaseParams, };
|
|
438
403
|
}
|
|
439
404
|
//# sourceMappingURL=browser-pools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-pools.d.ts","sourceRoot":"","sources":["../src/resources/browser-pools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIxF;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,E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
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class Credentials extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new credential for storing login information. Values are encrypted at
|
|
8
|
+
* rest.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const credential = await client.credentials.create({
|
|
13
|
+
* domain: 'netflix.com',
|
|
14
|
+
* name: 'my-netflix-login',
|
|
15
|
+
* values: {
|
|
16
|
+
* username: 'user@example.com',
|
|
17
|
+
* password: 'mysecretpassword',
|
|
18
|
+
* },
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(body: CredentialCreateParams, options?: RequestOptions): APIPromise<Credential>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve a credential by its ID. Credential values are not returned.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const credential = await client.credentials.retrieve('id');
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Credential>;
|
|
32
|
+
/**
|
|
33
|
+
* Update a credential's name or values. Values are encrypted at rest.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const credential = await client.credentials.update('id');
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
update(id: string, body: CredentialUpdateParams, options?: RequestOptions): APIPromise<Credential>;
|
|
41
|
+
/**
|
|
42
|
+
* List credentials owned by the caller's organization. Credential values are not
|
|
43
|
+
* returned.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* // Automatically fetches more pages as needed.
|
|
48
|
+
* for await (const credential of client.credentials.list()) {
|
|
49
|
+
* // ...
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
list(query?: CredentialListParams | null | undefined, options?: RequestOptions): PagePromise<CredentialsOffsetPagination, Credential>;
|
|
54
|
+
/**
|
|
55
|
+
* Delete a credential by its ID.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* await client.credentials.delete('id');
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
63
|
+
}
|
|
64
|
+
export type CredentialsOffsetPagination = OffsetPagination<Credential>;
|
|
65
|
+
/**
|
|
66
|
+
* Request to create a new credential
|
|
67
|
+
*/
|
|
68
|
+
export interface CreateCredentialRequest {
|
|
69
|
+
/**
|
|
70
|
+
* Target domain this credential is for
|
|
71
|
+
*/
|
|
72
|
+
domain: string;
|
|
73
|
+
/**
|
|
74
|
+
* Unique name for the credential within the organization
|
|
75
|
+
*/
|
|
76
|
+
name: string;
|
|
77
|
+
/**
|
|
78
|
+
* Field name to value mapping (e.g., username, password)
|
|
79
|
+
*/
|
|
80
|
+
values: {
|
|
81
|
+
[key: string]: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A stored credential for automatic re-authentication
|
|
86
|
+
*/
|
|
87
|
+
export interface Credential {
|
|
88
|
+
/**
|
|
89
|
+
* Unique identifier for the credential
|
|
90
|
+
*/
|
|
91
|
+
id: string;
|
|
92
|
+
/**
|
|
93
|
+
* When the credential was created
|
|
94
|
+
*/
|
|
95
|
+
created_at: string;
|
|
96
|
+
/**
|
|
97
|
+
* Target domain this credential is for
|
|
98
|
+
*/
|
|
99
|
+
domain: string;
|
|
100
|
+
/**
|
|
101
|
+
* Unique name for the credential within the organization
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
/**
|
|
105
|
+
* When the credential was last updated
|
|
106
|
+
*/
|
|
107
|
+
updated_at: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Request to update an existing credential
|
|
111
|
+
*/
|
|
112
|
+
export interface UpdateCredentialRequest {
|
|
113
|
+
/**
|
|
114
|
+
* New name for the credential
|
|
115
|
+
*/
|
|
116
|
+
name?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Field name to value mapping (e.g., username, password). Replaces all existing
|
|
119
|
+
* values.
|
|
120
|
+
*/
|
|
121
|
+
values?: {
|
|
122
|
+
[key: string]: string;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface CredentialCreateParams {
|
|
126
|
+
/**
|
|
127
|
+
* Target domain this credential is for
|
|
128
|
+
*/
|
|
129
|
+
domain: string;
|
|
130
|
+
/**
|
|
131
|
+
* Unique name for the credential within the organization
|
|
132
|
+
*/
|
|
133
|
+
name: string;
|
|
134
|
+
/**
|
|
135
|
+
* Field name to value mapping (e.g., username, password)
|
|
136
|
+
*/
|
|
137
|
+
values: {
|
|
138
|
+
[key: string]: string;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
export interface CredentialUpdateParams {
|
|
142
|
+
/**
|
|
143
|
+
* New name for the credential
|
|
144
|
+
*/
|
|
145
|
+
name?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Field name to value mapping (e.g., username, password). Replaces all existing
|
|
148
|
+
* values.
|
|
149
|
+
*/
|
|
150
|
+
values?: {
|
|
151
|
+
[key: string]: string;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export interface CredentialListParams extends OffsetPaginationParams {
|
|
155
|
+
/**
|
|
156
|
+
* Filter by domain
|
|
157
|
+
*/
|
|
158
|
+
domain?: string;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace Credentials {
|
|
161
|
+
export { type CreateCredentialRequest as CreateCredentialRequest, type Credential as Credential, type UpdateCredentialRequest as UpdateCredentialRequest, type CredentialsOffsetPagination as CredentialsOffsetPagination, type CredentialCreateParams as CredentialCreateParams, type CredentialUpdateParams as CredentialUpdateParams, type CredentialListParams as CredentialListParams, };
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=credentials.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.mts","sourceRoot":"","sources":["../src/resources/credentials.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItF;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItE;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAIlG;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,2BAA2B,EAAE,UAAU,CAAC;IAIvD;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAM/D;AAED,MAAM,MAAM,2BAA2B,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAA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