notte-sdk 0.0.22 → 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.
- package/LICENSE +21 -0
- package/README.md +594 -102
- package/dist/index.d.mts +2529 -254
- package/dist/index.d.ts +2529 -254
- package/dist/index.js +4219 -1417
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4161 -1422
- package/dist/index.mjs.map +1 -1
- package/dist/proxy/core.d.mts +1 -1
- package/dist/proxy/core.d.ts +1 -1
- package/dist/proxy/core.js +27 -4
- package/dist/proxy/core.js.map +1 -1
- package/dist/proxy/core.mjs +27 -4
- package/dist/proxy/core.mjs.map +1 -1
- package/dist/proxy/next.d.mts +12 -7
- package/dist/proxy/next.d.ts +12 -7
- package/dist/proxy/next.js +27 -4
- package/dist/proxy/next.js.map +1 -1
- package/dist/proxy/next.mjs +27 -4
- package/dist/proxy/next.mjs.map +1 -1
- package/dist/{types-DmqqdEMP.d.mts → types-C5V9BOux.d.mts} +3 -1
- package/dist/{types-DmqqdEMP.d.ts → types-C5V9BOux.d.ts} +3 -1
- package/package.json +33 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Page, Browser, Dialog } from 'playwright-core';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
export { N as NotteProxyAuthError, a as NotteProxyConfig } from './types-
|
|
3
|
+
export { N as NotteProxyAuthError, a as NotteProxyConfig } from './types-C5V9BOux.mjs';
|
|
3
4
|
|
|
4
5
|
type AuthToken = string | undefined;
|
|
5
6
|
interface Auth {
|
|
@@ -327,8 +328,24 @@ interface TDataShape {
|
|
|
327
328
|
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
328
329
|
type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
329
330
|
|
|
331
|
+
type Env = Record<string, string | undefined>;
|
|
332
|
+
type VersionCheckOptions = {
|
|
333
|
+
currentVersion?: string;
|
|
334
|
+
packageName?: string;
|
|
335
|
+
fetchFn?: typeof fetch;
|
|
336
|
+
warnFn?: (message: string) => void;
|
|
337
|
+
env?: Env;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* Check the npm registry once per process and warn when a newer release exists.
|
|
341
|
+
* Called by `NotteClient` on construction, like `check_and_warn_version_mismatch`
|
|
342
|
+
* in the Python client. Never throws and never blocks the caller.
|
|
343
|
+
*/
|
|
344
|
+
declare function startVersionCheck(): void;
|
|
345
|
+
declare function checkForLatestVersion(options?: VersionCheckOptions): Promise<void>;
|
|
346
|
+
|
|
330
347
|
type ClientOptions = {
|
|
331
|
-
baseUrl: 'https://
|
|
348
|
+
baseUrl: 'https://api.notte.cc' | (string & {});
|
|
332
349
|
};
|
|
333
350
|
/**
|
|
334
351
|
* ActionParameter
|
|
@@ -729,6 +746,15 @@ type ApiExecutionResponse = {
|
|
|
729
746
|
*/
|
|
730
747
|
exception?: string | null;
|
|
731
748
|
exception_detail?: SerializedError | null;
|
|
749
|
+
captcha?: CaptchaStatus | null;
|
|
750
|
+
/**
|
|
751
|
+
* Action Executed
|
|
752
|
+
*/
|
|
753
|
+
action_executed?: boolean | null;
|
|
754
|
+
/**
|
|
755
|
+
* Code
|
|
756
|
+
*/
|
|
757
|
+
code?: string | null;
|
|
732
758
|
};
|
|
733
759
|
/**
|
|
734
760
|
* ApiSessionStartRequest
|
|
@@ -833,15 +859,19 @@ type ApiSessionStartRequest = {
|
|
|
833
859
|
/**
|
|
834
860
|
* Auth Ids
|
|
835
861
|
*
|
|
836
|
-
* Managed Auth connection IDs to verify and, when necessary, authenticate inside this session.
|
|
862
|
+
* Managed Auth connection IDs to verify and, when necessary, authenticate inside this session. Initial verification runs before returning; when login is needed, the session returns as authenticating. Poll /sessions/{id}/auth for readiness.
|
|
837
863
|
*/
|
|
838
864
|
auth_ids?: Array<string>;
|
|
839
865
|
/**
|
|
840
866
|
* Wait For Authentication
|
|
841
867
|
*
|
|
842
|
-
*
|
|
868
|
+
* SDK waiting preference. The API always verifies inline and returns authenticating when background login is needed; SDKs implement waiting through readiness polling.
|
|
843
869
|
*/
|
|
844
870
|
wait_for_authentication?: boolean;
|
|
871
|
+
/**
|
|
872
|
+
* Auth Retry
|
|
873
|
+
*/
|
|
874
|
+
auth_retry?: number;
|
|
845
875
|
/**
|
|
846
876
|
* Advanced Stealth
|
|
847
877
|
*
|
|
@@ -991,6 +1021,39 @@ type CaptchaSolveAction = {
|
|
|
991
1021
|
*/
|
|
992
1022
|
captcha_type?: 'recaptcha' | 'hcaptcha' | 'image' | 'text' | 'auth0' | 'cloudflare' | 'datadome' | 'arkose labs' | 'geetest' | 'press&hold' | 'unknown' | null;
|
|
993
1023
|
};
|
|
1024
|
+
/**
|
|
1025
|
+
* CaptchaStatus
|
|
1026
|
+
*/
|
|
1027
|
+
type CaptchaStatus = {
|
|
1028
|
+
/**
|
|
1029
|
+
* Captcha Id
|
|
1030
|
+
*/
|
|
1031
|
+
captcha_id: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* Page Id
|
|
1034
|
+
*/
|
|
1035
|
+
page_id: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* Generation
|
|
1038
|
+
*/
|
|
1039
|
+
generation: number;
|
|
1040
|
+
/**
|
|
1041
|
+
* State
|
|
1042
|
+
*/
|
|
1043
|
+
state: 'solving' | 'solved' | 'failed' | 'cancelled';
|
|
1044
|
+
/**
|
|
1045
|
+
* Retry After Ms
|
|
1046
|
+
*/
|
|
1047
|
+
retry_after_ms?: number;
|
|
1048
|
+
/**
|
|
1049
|
+
* Message
|
|
1050
|
+
*/
|
|
1051
|
+
message?: string;
|
|
1052
|
+
/**
|
|
1053
|
+
* Cancel Reason
|
|
1054
|
+
*/
|
|
1055
|
+
cancel_reason?: 'navigation' | null;
|
|
1056
|
+
};
|
|
994
1057
|
/**
|
|
995
1058
|
* CheckAction
|
|
996
1059
|
*/
|
|
@@ -2060,7 +2123,7 @@ type FallbackFillActionOutput = {
|
|
|
2060
2123
|
/**
|
|
2061
2124
|
* FileSource
|
|
2062
2125
|
*/
|
|
2063
|
-
type FileSource
|
|
2126
|
+
type FileSource = 'user_upload' | 'session_download';
|
|
2064
2127
|
/**
|
|
2065
2128
|
* FillAction
|
|
2066
2129
|
*/
|
|
@@ -3005,6 +3068,10 @@ type GlobalScrapeRequest = {
|
|
|
3005
3068
|
* Whether to wait for Managed Auth before returning the session. Defaults to true. When true, authentication failure or timeout fails session creation; when false, authentication continues in the background after the browser is ready.
|
|
3006
3069
|
*/
|
|
3007
3070
|
wait_for_authentication?: boolean;
|
|
3071
|
+
/**
|
|
3072
|
+
* Auth Retry
|
|
3073
|
+
*/
|
|
3074
|
+
auth_retry?: number;
|
|
3008
3075
|
/**
|
|
3009
3076
|
* Advanced Stealth
|
|
3010
3077
|
*
|
|
@@ -3463,6 +3530,88 @@ type ManagedAuthCredentials = {
|
|
|
3463
3530
|
*/
|
|
3464
3531
|
mfa_secret?: null;
|
|
3465
3532
|
};
|
|
3533
|
+
/**
|
|
3534
|
+
* ManagedAuthOperation
|
|
3535
|
+
*/
|
|
3536
|
+
type ManagedAuthOperation = {
|
|
3537
|
+
/**
|
|
3538
|
+
* Id
|
|
3539
|
+
*/
|
|
3540
|
+
id: string;
|
|
3541
|
+
/**
|
|
3542
|
+
* Connection Id
|
|
3543
|
+
*/
|
|
3544
|
+
connection_id: string;
|
|
3545
|
+
/**
|
|
3546
|
+
* Session Id
|
|
3547
|
+
*/
|
|
3548
|
+
session_id?: string | null;
|
|
3549
|
+
/**
|
|
3550
|
+
* Source
|
|
3551
|
+
*/
|
|
3552
|
+
source: string;
|
|
3553
|
+
/**
|
|
3554
|
+
* Status
|
|
3555
|
+
*/
|
|
3556
|
+
status: 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
3557
|
+
/**
|
|
3558
|
+
* Phase
|
|
3559
|
+
*/
|
|
3560
|
+
phase: string;
|
|
3561
|
+
/**
|
|
3562
|
+
* Attempt
|
|
3563
|
+
*/
|
|
3564
|
+
attempt?: number;
|
|
3565
|
+
/**
|
|
3566
|
+
* Auth Retry
|
|
3567
|
+
*/
|
|
3568
|
+
auth_retry?: number;
|
|
3569
|
+
/**
|
|
3570
|
+
* Authenticated
|
|
3571
|
+
*/
|
|
3572
|
+
authenticated?: boolean | null;
|
|
3573
|
+
/**
|
|
3574
|
+
* Failure Code
|
|
3575
|
+
*/
|
|
3576
|
+
failure_code?: string | null;
|
|
3577
|
+
/**
|
|
3578
|
+
* Error
|
|
3579
|
+
*/
|
|
3580
|
+
error?: string | null;
|
|
3581
|
+
/**
|
|
3582
|
+
* Deadline
|
|
3583
|
+
*/
|
|
3584
|
+
deadline: string;
|
|
3585
|
+
/**
|
|
3586
|
+
* Created At
|
|
3587
|
+
*/
|
|
3588
|
+
created_at: string;
|
|
3589
|
+
/**
|
|
3590
|
+
* Updated At
|
|
3591
|
+
*/
|
|
3592
|
+
updated_at: string;
|
|
3593
|
+
};
|
|
3594
|
+
/**
|
|
3595
|
+
* ManagedAuthReadiness
|
|
3596
|
+
*/
|
|
3597
|
+
type ManagedAuthReadiness = {
|
|
3598
|
+
/**
|
|
3599
|
+
* Session Id
|
|
3600
|
+
*/
|
|
3601
|
+
session_id: string;
|
|
3602
|
+
/**
|
|
3603
|
+
* Status
|
|
3604
|
+
*/
|
|
3605
|
+
status: 'authenticating' | 'active' | 'failed' | 'closed';
|
|
3606
|
+
/**
|
|
3607
|
+
* Operations
|
|
3608
|
+
*/
|
|
3609
|
+
operations?: Array<ManagedAuthOperation>;
|
|
3610
|
+
/**
|
|
3611
|
+
* Error
|
|
3612
|
+
*/
|
|
3613
|
+
error?: string | null;
|
|
3614
|
+
};
|
|
3466
3615
|
/**
|
|
3467
3616
|
* MultiFactorFillAction
|
|
3468
3617
|
*/
|
|
@@ -3950,6 +4099,190 @@ type ParameterInfo = {
|
|
|
3950
4099
|
*/
|
|
3951
4100
|
default?: string | null;
|
|
3952
4101
|
};
|
|
4102
|
+
/**
|
|
4103
|
+
* PaymentConnectRequest
|
|
4104
|
+
*/
|
|
4105
|
+
type PaymentConnectRequest = {
|
|
4106
|
+
/**
|
|
4107
|
+
* Mode
|
|
4108
|
+
*/
|
|
4109
|
+
mode?: 'test' | 'live';
|
|
4110
|
+
};
|
|
4111
|
+
/**
|
|
4112
|
+
* PaymentConnectionResponse
|
|
4113
|
+
*/
|
|
4114
|
+
type PaymentConnectionResponse = {
|
|
4115
|
+
/**
|
|
4116
|
+
* Id
|
|
4117
|
+
*/
|
|
4118
|
+
id: string;
|
|
4119
|
+
/**
|
|
4120
|
+
* Mode
|
|
4121
|
+
*/
|
|
4122
|
+
mode: string;
|
|
4123
|
+
/**
|
|
4124
|
+
* Status
|
|
4125
|
+
*/
|
|
4126
|
+
status: string;
|
|
4127
|
+
/**
|
|
4128
|
+
* Connection Url
|
|
4129
|
+
*/
|
|
4130
|
+
connection_url?: string | null;
|
|
4131
|
+
/**
|
|
4132
|
+
* Connection Phrase
|
|
4133
|
+
*/
|
|
4134
|
+
connection_phrase?: string | null;
|
|
4135
|
+
/**
|
|
4136
|
+
* Expires At
|
|
4137
|
+
*/
|
|
4138
|
+
expires_at?: string | null;
|
|
4139
|
+
/**
|
|
4140
|
+
* Error Code
|
|
4141
|
+
*/
|
|
4142
|
+
error_code?: string | null;
|
|
4143
|
+
};
|
|
4144
|
+
/**
|
|
4145
|
+
* PaymentDisconnectError
|
|
4146
|
+
*/
|
|
4147
|
+
type PaymentDisconnectError = {
|
|
4148
|
+
/**
|
|
4149
|
+
* Detail
|
|
4150
|
+
*/
|
|
4151
|
+
detail: string;
|
|
4152
|
+
};
|
|
4153
|
+
/**
|
|
4154
|
+
* PaymentDisconnectResponse
|
|
4155
|
+
*/
|
|
4156
|
+
type PaymentDisconnectResponse = {
|
|
4157
|
+
/**
|
|
4158
|
+
* Mode
|
|
4159
|
+
*/
|
|
4160
|
+
mode: 'test' | 'live';
|
|
4161
|
+
/**
|
|
4162
|
+
* Status
|
|
4163
|
+
*/
|
|
4164
|
+
status?: 'disconnected';
|
|
4165
|
+
};
|
|
4166
|
+
/**
|
|
4167
|
+
* PaymentNextAction
|
|
4168
|
+
*/
|
|
4169
|
+
type PaymentNextAction = {
|
|
4170
|
+
/**
|
|
4171
|
+
* Type
|
|
4172
|
+
*/
|
|
4173
|
+
type: 'ssn_verification' | 'identity_verification' | 'contact_support' | 'select_payment_method' | 'add_payment_method' | 'update_payment_method' | 're_authorize' | 'three_d_secure' | 'three_d_secure_retry';
|
|
4174
|
+
/**
|
|
4175
|
+
* Resolution
|
|
4176
|
+
*/
|
|
4177
|
+
resolution: 'auto_resume' | 'create_new_spend_request' | 'create_new_spend_request_after_completion';
|
|
4178
|
+
/**
|
|
4179
|
+
* Action Url
|
|
4180
|
+
*/
|
|
4181
|
+
action_url?: string | null;
|
|
4182
|
+
/**
|
|
4183
|
+
* Expires At
|
|
4184
|
+
*/
|
|
4185
|
+
expires_at?: string | null;
|
|
4186
|
+
};
|
|
4187
|
+
/**
|
|
4188
|
+
* PaymentRequest
|
|
4189
|
+
*/
|
|
4190
|
+
type PaymentRequest = {
|
|
4191
|
+
/**
|
|
4192
|
+
* Amount
|
|
4193
|
+
*
|
|
4194
|
+
* Amount in currency units, e.g. 100.91 means USD 100.91. Never rounded.
|
|
4195
|
+
*/
|
|
4196
|
+
amount: number | string;
|
|
4197
|
+
/**
|
|
4198
|
+
* Currency
|
|
4199
|
+
*/
|
|
4200
|
+
currency: string;
|
|
4201
|
+
/**
|
|
4202
|
+
* Merchant Url
|
|
4203
|
+
*/
|
|
4204
|
+
merchant_url: string;
|
|
4205
|
+
/**
|
|
4206
|
+
* Merchant Name
|
|
4207
|
+
*/
|
|
4208
|
+
merchant_name: string;
|
|
4209
|
+
/**
|
|
4210
|
+
* Description
|
|
4211
|
+
*/
|
|
4212
|
+
description: string;
|
|
4213
|
+
/**
|
|
4214
|
+
* Mode
|
|
4215
|
+
*/
|
|
4216
|
+
mode?: 'test' | 'live';
|
|
4217
|
+
};
|
|
4218
|
+
/**
|
|
4219
|
+
* PaymentResponse
|
|
4220
|
+
*/
|
|
4221
|
+
type PaymentResponse = {
|
|
4222
|
+
/**
|
|
4223
|
+
* Id
|
|
4224
|
+
*/
|
|
4225
|
+
id: string;
|
|
4226
|
+
/**
|
|
4227
|
+
* Session Id
|
|
4228
|
+
*/
|
|
4229
|
+
session_id: string;
|
|
4230
|
+
/**
|
|
4231
|
+
* Status
|
|
4232
|
+
*/
|
|
4233
|
+
status: string;
|
|
4234
|
+
/**
|
|
4235
|
+
* Mode
|
|
4236
|
+
*/
|
|
4237
|
+
mode: string;
|
|
4238
|
+
/**
|
|
4239
|
+
* Amount
|
|
4240
|
+
*
|
|
4241
|
+
* Amount in currency units, serialized as an exact decimal string.
|
|
4242
|
+
*/
|
|
4243
|
+
amount: string;
|
|
4244
|
+
/**
|
|
4245
|
+
* Currency
|
|
4246
|
+
*/
|
|
4247
|
+
currency: string;
|
|
4248
|
+
/**
|
|
4249
|
+
* Merchant Name
|
|
4250
|
+
*/
|
|
4251
|
+
merchant_name: string;
|
|
4252
|
+
/**
|
|
4253
|
+
* Merchant Url
|
|
4254
|
+
*/
|
|
4255
|
+
merchant_url: string;
|
|
4256
|
+
/**
|
|
4257
|
+
* Vault Id
|
|
4258
|
+
*/
|
|
4259
|
+
vault_id?: string | null;
|
|
4260
|
+
/**
|
|
4261
|
+
* Approval Url
|
|
4262
|
+
*/
|
|
4263
|
+
approval_url?: string | null;
|
|
4264
|
+
/**
|
|
4265
|
+
* Connection Url
|
|
4266
|
+
*/
|
|
4267
|
+
connection_url?: string | null;
|
|
4268
|
+
/**
|
|
4269
|
+
* Connection Phrase
|
|
4270
|
+
*/
|
|
4271
|
+
connection_phrase?: string | null;
|
|
4272
|
+
/**
|
|
4273
|
+
* Expires At
|
|
4274
|
+
*/
|
|
4275
|
+
expires_at?: string | null;
|
|
4276
|
+
/**
|
|
4277
|
+
* Error Code
|
|
4278
|
+
*/
|
|
4279
|
+
error_code?: string | null;
|
|
4280
|
+
next_action?: PaymentNextAction | null;
|
|
4281
|
+
/**
|
|
4282
|
+
* Purchase Status
|
|
4283
|
+
*/
|
|
4284
|
+
purchase_status?: 'unverified';
|
|
4285
|
+
};
|
|
3953
4286
|
/**
|
|
3954
4287
|
* PersonaCreateRequest
|
|
3955
4288
|
*/
|
|
@@ -4027,6 +4360,10 @@ type PersonaResponse = {
|
|
|
4027
4360
|
* Name
|
|
4028
4361
|
*/
|
|
4029
4362
|
name?: string | null;
|
|
4363
|
+
/**
|
|
4364
|
+
* Created At
|
|
4365
|
+
*/
|
|
4366
|
+
created_at: string;
|
|
4030
4367
|
};
|
|
4031
4368
|
/**
|
|
4032
4369
|
* PersonaUpdateRequest
|
|
@@ -4166,52 +4503,6 @@ type ProfileResponse = {
|
|
|
4166
4503
|
*/
|
|
4167
4504
|
persisted_domains?: Array<string>;
|
|
4168
4505
|
};
|
|
4169
|
-
/**
|
|
4170
|
-
* ProxyCredentialRequest
|
|
4171
|
-
*/
|
|
4172
|
-
type ProxyCredentialRequest = {
|
|
4173
|
-
/**
|
|
4174
|
-
* Country
|
|
4175
|
-
*
|
|
4176
|
-
* ISO 3166-1 alpha-2 country code, e.g. `us`.
|
|
4177
|
-
*/
|
|
4178
|
-
country?: string | null;
|
|
4179
|
-
/**
|
|
4180
|
-
* City
|
|
4181
|
-
*
|
|
4182
|
-
* Evomi city id or display name, e.g. `new.york`. Wins over country.
|
|
4183
|
-
*/
|
|
4184
|
-
city?: string | null;
|
|
4185
|
-
};
|
|
4186
|
-
/**
|
|
4187
|
-
* ProxyCredentialResponse
|
|
4188
|
-
*/
|
|
4189
|
-
type ProxyCredentialResponse = {
|
|
4190
|
-
/**
|
|
4191
|
-
* Username
|
|
4192
|
-
*/
|
|
4193
|
-
username: string;
|
|
4194
|
-
/**
|
|
4195
|
-
* Password
|
|
4196
|
-
*/
|
|
4197
|
-
password: string;
|
|
4198
|
-
/**
|
|
4199
|
-
* Expires At
|
|
4200
|
-
*/
|
|
4201
|
-
expires_at: string;
|
|
4202
|
-
/**
|
|
4203
|
-
* Proxy Url Tls
|
|
4204
|
-
*
|
|
4205
|
-
* `https://user:pass@host:443`, for clients that do TLS to the proxy.
|
|
4206
|
-
*/
|
|
4207
|
-
proxy_url_tls: string;
|
|
4208
|
-
/**
|
|
4209
|
-
* Proxy Url Plain
|
|
4210
|
-
*
|
|
4211
|
-
* `http://user:pass@host:3128`, for clients that cannot.
|
|
4212
|
-
*/
|
|
4213
|
-
proxy_url_plain: string;
|
|
4214
|
-
};
|
|
4215
4506
|
/**
|
|
4216
4507
|
* ProxyGeolocationCountry
|
|
4217
4508
|
*/
|
|
@@ -4234,11 +4525,44 @@ type ReloadAction = {
|
|
|
4234
4525
|
description?: string;
|
|
4235
4526
|
};
|
|
4236
4527
|
/**
|
|
4237
|
-
*
|
|
4528
|
+
* ReplayMissingResponse
|
|
4238
4529
|
*/
|
|
4239
|
-
type
|
|
4530
|
+
type ReplayMissingResponse = {
|
|
4240
4531
|
/**
|
|
4241
|
-
*
|
|
4532
|
+
* Detail
|
|
4533
|
+
*/
|
|
4534
|
+
detail: string;
|
|
4535
|
+
/**
|
|
4536
|
+
* Session Id
|
|
4537
|
+
*/
|
|
4538
|
+
session_id: string | null;
|
|
4539
|
+
/**
|
|
4540
|
+
* Status
|
|
4541
|
+
*/
|
|
4542
|
+
status: number;
|
|
4543
|
+
/**
|
|
4544
|
+
* Error
|
|
4545
|
+
*/
|
|
4546
|
+
error: string;
|
|
4547
|
+
/**
|
|
4548
|
+
* Message
|
|
4549
|
+
*/
|
|
4550
|
+
message: string;
|
|
4551
|
+
/**
|
|
4552
|
+
* Replay Status
|
|
4553
|
+
*/
|
|
4554
|
+
replay_status: 'waiting_for_session' | 'processing' | 'unavailable' | 'failed' | 'unknown';
|
|
4555
|
+
/**
|
|
4556
|
+
* Retryable
|
|
4557
|
+
*/
|
|
4558
|
+
retryable: boolean;
|
|
4559
|
+
};
|
|
4560
|
+
/**
|
|
4561
|
+
* ReplayResponse
|
|
4562
|
+
*/
|
|
4563
|
+
type ReplayResponse = {
|
|
4564
|
+
/**
|
|
4565
|
+
* Playlist Content
|
|
4242
4566
|
*/
|
|
4243
4567
|
playlist_content?: string | null;
|
|
4244
4568
|
/**
|
|
@@ -4874,7 +5198,7 @@ type SessionDebugResponse = {
|
|
|
4874
5198
|
/**
|
|
4875
5199
|
* SessionFile
|
|
4876
5200
|
*/
|
|
4877
|
-
type SessionFile
|
|
5201
|
+
type SessionFile = {
|
|
4878
5202
|
/**
|
|
4879
5203
|
* Id
|
|
4880
5204
|
*/
|
|
@@ -4907,16 +5231,16 @@ type SessionFile$1 = {
|
|
|
4907
5231
|
* Expires At
|
|
4908
5232
|
*/
|
|
4909
5233
|
expires_at: string;
|
|
4910
|
-
source: FileSource
|
|
5234
|
+
source: FileSource;
|
|
4911
5235
|
};
|
|
4912
5236
|
/**
|
|
4913
5237
|
* SessionFilesPage
|
|
4914
5238
|
*/
|
|
4915
|
-
type SessionFilesPage
|
|
5239
|
+
type SessionFilesPage = {
|
|
4916
5240
|
/**
|
|
4917
5241
|
* Files
|
|
4918
5242
|
*/
|
|
4919
|
-
files: Array<SessionFile
|
|
5243
|
+
files: Array<SessionFile>;
|
|
4920
5244
|
/**
|
|
4921
5245
|
* Total
|
|
4922
5246
|
*/
|
|
@@ -4958,6 +5282,16 @@ type SessionProfile = {
|
|
|
4958
5282
|
*/
|
|
4959
5283
|
persist?: boolean;
|
|
4960
5284
|
};
|
|
5285
|
+
/**
|
|
5286
|
+
* SessionProfilePreviewResponse
|
|
5287
|
+
*/
|
|
5288
|
+
type SessionProfilePreviewResponse = {
|
|
5289
|
+
profile?: SessionProfile | null;
|
|
5290
|
+
/**
|
|
5291
|
+
* Cookie Domains
|
|
5292
|
+
*/
|
|
5293
|
+
cookie_domains?: Array<string> | null;
|
|
5294
|
+
};
|
|
4961
5295
|
/**
|
|
4962
5296
|
* SessionResponse
|
|
4963
5297
|
*/
|
|
@@ -5006,10 +5340,8 @@ type SessionResponse = {
|
|
|
5006
5340
|
duration?: string;
|
|
5007
5341
|
/**
|
|
5008
5342
|
* Status
|
|
5009
|
-
*
|
|
5010
|
-
* Session status
|
|
5011
5343
|
*/
|
|
5012
|
-
status: 'active' | 'closed' | 'error' | 'timed_out';
|
|
5344
|
+
status: 'active' | 'authenticating' | 'closed' | 'error' | 'timed_out';
|
|
5013
5345
|
/**
|
|
5014
5346
|
* Close Reason
|
|
5015
5347
|
*
|
|
@@ -5725,6 +6057,15 @@ type ApiExecutionResponseWritable = {
|
|
|
5725
6057
|
*/
|
|
5726
6058
|
exception?: string | null;
|
|
5727
6059
|
exception_detail?: SerializedError | null;
|
|
6060
|
+
captcha?: CaptchaStatus | null;
|
|
6061
|
+
/**
|
|
6062
|
+
* Action Executed
|
|
6063
|
+
*/
|
|
6064
|
+
action_executed?: boolean | null;
|
|
6065
|
+
/**
|
|
6066
|
+
* Code
|
|
6067
|
+
*/
|
|
6068
|
+
code?: string | null;
|
|
5728
6069
|
};
|
|
5729
6070
|
/**
|
|
5730
6071
|
* BaseModel
|
|
@@ -6876,10 +7217,8 @@ type SessionResponseWritable = {
|
|
|
6876
7217
|
duration?: string;
|
|
6877
7218
|
/**
|
|
6878
7219
|
* Status
|
|
6879
|
-
*
|
|
6880
|
-
* Session status
|
|
6881
7220
|
*/
|
|
6882
|
-
status: 'active' | 'closed' | 'error' | 'timed_out';
|
|
7221
|
+
status: 'active' | 'authenticating' | 'closed' | 'error' | 'timed_out';
|
|
6883
7222
|
/**
|
|
6884
7223
|
* Close Reason
|
|
6885
7224
|
*
|
|
@@ -7003,6 +7342,41 @@ type UpdateFunctionRunResponseWritable = {
|
|
|
7003
7342
|
*/
|
|
7004
7343
|
status?: 'updated' | 'stopped';
|
|
7005
7344
|
};
|
|
7345
|
+
type SessionAuthReadinessData = {
|
|
7346
|
+
body?: never;
|
|
7347
|
+
headers?: {
|
|
7348
|
+
/**
|
|
7349
|
+
* X-Notte-Request-Origin
|
|
7350
|
+
*/
|
|
7351
|
+
'x-notte-request-origin'?: string | null;
|
|
7352
|
+
/**
|
|
7353
|
+
* X-Notte-Sdk-Version
|
|
7354
|
+
*/
|
|
7355
|
+
'x-notte-sdk-version'?: string | null;
|
|
7356
|
+
};
|
|
7357
|
+
path: {
|
|
7358
|
+
/**
|
|
7359
|
+
* Session Id
|
|
7360
|
+
*/
|
|
7361
|
+
session_id: string;
|
|
7362
|
+
};
|
|
7363
|
+
query?: never;
|
|
7364
|
+
url: '/sessions/{session_id}/auth';
|
|
7365
|
+
};
|
|
7366
|
+
type SessionAuthReadinessErrors = {
|
|
7367
|
+
/**
|
|
7368
|
+
* Validation Error
|
|
7369
|
+
*/
|
|
7370
|
+
422: HttpValidationError;
|
|
7371
|
+
};
|
|
7372
|
+
type SessionAuthReadinessError = SessionAuthReadinessErrors[keyof SessionAuthReadinessErrors];
|
|
7373
|
+
type SessionAuthReadinessResponses = {
|
|
7374
|
+
/**
|
|
7375
|
+
* Successful Response
|
|
7376
|
+
*/
|
|
7377
|
+
200: ManagedAuthReadiness;
|
|
7378
|
+
};
|
|
7379
|
+
type SessionAuthReadinessResponse = SessionAuthReadinessResponses[keyof SessionAuthReadinessResponses];
|
|
7006
7380
|
type ListSessionsData = {
|
|
7007
7381
|
body?: never;
|
|
7008
7382
|
headers?: {
|
|
@@ -7129,6 +7503,46 @@ type SessionStatusResponses = {
|
|
|
7129
7503
|
200: SessionResponse;
|
|
7130
7504
|
};
|
|
7131
7505
|
type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses];
|
|
7506
|
+
type SessionProfilePreviewData = {
|
|
7507
|
+
body?: never;
|
|
7508
|
+
headers?: {
|
|
7509
|
+
/**
|
|
7510
|
+
* X-Notte-Request-Origin
|
|
7511
|
+
*/
|
|
7512
|
+
'x-notte-request-origin'?: string | null;
|
|
7513
|
+
/**
|
|
7514
|
+
* X-Notte-Sdk-Version
|
|
7515
|
+
*/
|
|
7516
|
+
'x-notte-sdk-version'?: string | null;
|
|
7517
|
+
};
|
|
7518
|
+
path: {
|
|
7519
|
+
/**
|
|
7520
|
+
* Session Id
|
|
7521
|
+
*/
|
|
7522
|
+
session_id: string;
|
|
7523
|
+
};
|
|
7524
|
+
query?: {
|
|
7525
|
+
/**
|
|
7526
|
+
* Include Cookies
|
|
7527
|
+
*/
|
|
7528
|
+
include_cookies?: boolean;
|
|
7529
|
+
};
|
|
7530
|
+
url: '/sessions/{session_id}/profile-preview';
|
|
7531
|
+
};
|
|
7532
|
+
type SessionProfilePreviewErrors = {
|
|
7533
|
+
/**
|
|
7534
|
+
* Validation Error
|
|
7535
|
+
*/
|
|
7536
|
+
422: HttpValidationError;
|
|
7537
|
+
};
|
|
7538
|
+
type SessionProfilePreviewError = SessionProfilePreviewErrors[keyof SessionProfilePreviewErrors];
|
|
7539
|
+
type SessionProfilePreviewResponses = {
|
|
7540
|
+
/**
|
|
7541
|
+
* Successful Response
|
|
7542
|
+
*/
|
|
7543
|
+
200: SessionProfilePreviewResponse;
|
|
7544
|
+
};
|
|
7545
|
+
type SessionProfilePreviewResponse2 = SessionProfilePreviewResponses[keyof SessionProfilePreviewResponses];
|
|
7132
7546
|
type GetSessionScriptData = {
|
|
7133
7547
|
body?: never;
|
|
7134
7548
|
headers?: {
|
|
@@ -7529,6 +7943,22 @@ type PageExecuteData = {
|
|
|
7529
7943
|
session_id: string;
|
|
7530
7944
|
};
|
|
7531
7945
|
query?: {
|
|
7946
|
+
/**
|
|
7947
|
+
* Captcha Id
|
|
7948
|
+
*/
|
|
7949
|
+
captcha_id?: string | null;
|
|
7950
|
+
/**
|
|
7951
|
+
* Captcha Timeout Seconds
|
|
7952
|
+
*/
|
|
7953
|
+
captcha_timeout_seconds?: number;
|
|
7954
|
+
/**
|
|
7955
|
+
* Target Page Id
|
|
7956
|
+
*/
|
|
7957
|
+
target_page_id?: string | null;
|
|
7958
|
+
/**
|
|
7959
|
+
* Target Generation
|
|
7960
|
+
*/
|
|
7961
|
+
target_generation?: number | null;
|
|
7532
7962
|
/**
|
|
7533
7963
|
* Update Metadata
|
|
7534
7964
|
*/
|
|
@@ -7660,6 +8090,14 @@ type SessionReplayData = {
|
|
|
7660
8090
|
url: '/sessions/{session_id}/replay';
|
|
7661
8091
|
};
|
|
7662
8092
|
type SessionReplayErrors = {
|
|
8093
|
+
/**
|
|
8094
|
+
* Replay missing; see replay_status and retryable.
|
|
8095
|
+
*/
|
|
8096
|
+
404: ReplayMissingResponse;
|
|
8097
|
+
/**
|
|
8098
|
+
* Capture completed without any frames.
|
|
8099
|
+
*/
|
|
8100
|
+
410: ReplayMissingResponse;
|
|
7663
8101
|
/**
|
|
7664
8102
|
* Validation Error
|
|
7665
8103
|
*/
|
|
@@ -7695,7 +8133,7 @@ type ListSessionFilesData = {
|
|
|
7695
8133
|
/**
|
|
7696
8134
|
* Source
|
|
7697
8135
|
*/
|
|
7698
|
-
source?: FileSource
|
|
8136
|
+
source?: FileSource | null;
|
|
7699
8137
|
/**
|
|
7700
8138
|
* Limit
|
|
7701
8139
|
*/
|
|
@@ -7718,7 +8156,7 @@ type ListSessionFilesResponses = {
|
|
|
7718
8156
|
/**
|
|
7719
8157
|
* Successful Response
|
|
7720
8158
|
*/
|
|
7721
|
-
200: SessionFilesPage
|
|
8159
|
+
200: SessionFilesPage;
|
|
7722
8160
|
};
|
|
7723
8161
|
type ListSessionFilesResponse = ListSessionFilesResponses[keyof ListSessionFilesResponses];
|
|
7724
8162
|
type UploadSessionFileData = {
|
|
@@ -7753,7 +8191,7 @@ type UploadSessionFileResponses = {
|
|
|
7753
8191
|
/**
|
|
7754
8192
|
* Successful Response
|
|
7755
8193
|
*/
|
|
7756
|
-
201: SessionFile
|
|
8194
|
+
201: SessionFile;
|
|
7757
8195
|
};
|
|
7758
8196
|
type UploadSessionFileResponse = UploadSessionFileResponses[keyof UploadSessionFileResponses];
|
|
7759
8197
|
type DeleteSessionFileData = {
|
|
@@ -9141,6 +9579,157 @@ type ListVaultsResponses = {
|
|
|
9141
9579
|
200: PaginatedResponseVault;
|
|
9142
9580
|
};
|
|
9143
9581
|
type ListVaultsResponse = ListVaultsResponses[keyof ListVaultsResponses];
|
|
9582
|
+
type ConnectPaymentWalletData = {
|
|
9583
|
+
body: PaymentConnectRequest;
|
|
9584
|
+
headers?: {
|
|
9585
|
+
/**
|
|
9586
|
+
* X-Notte-Request-Origin
|
|
9587
|
+
*/
|
|
9588
|
+
'x-notte-request-origin'?: string | null;
|
|
9589
|
+
/**
|
|
9590
|
+
* X-Notte-Sdk-Version
|
|
9591
|
+
*/
|
|
9592
|
+
'x-notte-sdk-version'?: string | null;
|
|
9593
|
+
};
|
|
9594
|
+
path?: never;
|
|
9595
|
+
query?: never;
|
|
9596
|
+
url: '/payments/connect';
|
|
9597
|
+
};
|
|
9598
|
+
type ConnectPaymentWalletErrors = {
|
|
9599
|
+
/**
|
|
9600
|
+
* Validation Error
|
|
9601
|
+
*/
|
|
9602
|
+
422: HttpValidationError;
|
|
9603
|
+
};
|
|
9604
|
+
type ConnectPaymentWalletError = ConnectPaymentWalletErrors[keyof ConnectPaymentWalletErrors];
|
|
9605
|
+
type ConnectPaymentWalletResponses = {
|
|
9606
|
+
/**
|
|
9607
|
+
* Successful Response
|
|
9608
|
+
*/
|
|
9609
|
+
200: PaymentConnectionResponse;
|
|
9610
|
+
};
|
|
9611
|
+
type ConnectPaymentWalletResponse = ConnectPaymentWalletResponses[keyof ConnectPaymentWalletResponses];
|
|
9612
|
+
type DisconnectPaymentWalletData = {
|
|
9613
|
+
body: PaymentConnectRequest;
|
|
9614
|
+
headers?: {
|
|
9615
|
+
/**
|
|
9616
|
+
* X-Notte-Request-Origin
|
|
9617
|
+
*/
|
|
9618
|
+
'x-notte-request-origin'?: string | null;
|
|
9619
|
+
/**
|
|
9620
|
+
* X-Notte-Sdk-Version
|
|
9621
|
+
*/
|
|
9622
|
+
'x-notte-sdk-version'?: string | null;
|
|
9623
|
+
};
|
|
9624
|
+
path?: never;
|
|
9625
|
+
query?: never;
|
|
9626
|
+
url: '/payments/disconnect';
|
|
9627
|
+
};
|
|
9628
|
+
type DisconnectPaymentWalletErrors = {
|
|
9629
|
+
/**
|
|
9630
|
+
* Caller cannot disconnect the wallet
|
|
9631
|
+
*/
|
|
9632
|
+
403: PaymentDisconnectError;
|
|
9633
|
+
/**
|
|
9634
|
+
* Wallet has active payments
|
|
9635
|
+
*/
|
|
9636
|
+
409: PaymentDisconnectError;
|
|
9637
|
+
/**
|
|
9638
|
+
* Validation Error
|
|
9639
|
+
*/
|
|
9640
|
+
422: HttpValidationError;
|
|
9641
|
+
/**
|
|
9642
|
+
* Payments unavailable or wallet revocation must be retried
|
|
9643
|
+
*/
|
|
9644
|
+
503: PaymentDisconnectError;
|
|
9645
|
+
};
|
|
9646
|
+
type DisconnectPaymentWalletError = DisconnectPaymentWalletErrors[keyof DisconnectPaymentWalletErrors];
|
|
9647
|
+
type DisconnectPaymentWalletResponses = {
|
|
9648
|
+
/**
|
|
9649
|
+
* Successful Response
|
|
9650
|
+
*/
|
|
9651
|
+
200: PaymentDisconnectResponse;
|
|
9652
|
+
};
|
|
9653
|
+
type DisconnectPaymentWalletResponse = DisconnectPaymentWalletResponses[keyof DisconnectPaymentWalletResponses];
|
|
9654
|
+
type CreatePaymentData = {
|
|
9655
|
+
body: PaymentRequest;
|
|
9656
|
+
headers: {
|
|
9657
|
+
/**
|
|
9658
|
+
* Idempotency-Key
|
|
9659
|
+
*/
|
|
9660
|
+
'idempotency-key': string;
|
|
9661
|
+
/**
|
|
9662
|
+
* X-Notte-Request-Origin
|
|
9663
|
+
*/
|
|
9664
|
+
'x-notte-request-origin'?: string | null;
|
|
9665
|
+
/**
|
|
9666
|
+
* X-Notte-Sdk-Version
|
|
9667
|
+
*/
|
|
9668
|
+
'x-notte-sdk-version'?: string | null;
|
|
9669
|
+
};
|
|
9670
|
+
path: {
|
|
9671
|
+
/**
|
|
9672
|
+
* Session Id
|
|
9673
|
+
*/
|
|
9674
|
+
session_id: string;
|
|
9675
|
+
};
|
|
9676
|
+
query?: {
|
|
9677
|
+
/**
|
|
9678
|
+
* Update Metadata
|
|
9679
|
+
*/
|
|
9680
|
+
update_metadata?: boolean;
|
|
9681
|
+
};
|
|
9682
|
+
url: '/sessions/{session_id}/payments';
|
|
9683
|
+
};
|
|
9684
|
+
type CreatePaymentErrors = {
|
|
9685
|
+
/**
|
|
9686
|
+
* Validation Error
|
|
9687
|
+
*/
|
|
9688
|
+
422: HttpValidationError;
|
|
9689
|
+
};
|
|
9690
|
+
type CreatePaymentError = CreatePaymentErrors[keyof CreatePaymentErrors];
|
|
9691
|
+
type CreatePaymentResponses = {
|
|
9692
|
+
/**
|
|
9693
|
+
* Successful Response
|
|
9694
|
+
*/
|
|
9695
|
+
202: PaymentResponse;
|
|
9696
|
+
};
|
|
9697
|
+
type CreatePaymentResponse = CreatePaymentResponses[keyof CreatePaymentResponses];
|
|
9698
|
+
type GetPaymentData = {
|
|
9699
|
+
body?: never;
|
|
9700
|
+
headers?: {
|
|
9701
|
+
/**
|
|
9702
|
+
* X-Notte-Request-Origin
|
|
9703
|
+
*/
|
|
9704
|
+
'x-notte-request-origin'?: string | null;
|
|
9705
|
+
/**
|
|
9706
|
+
* X-Notte-Sdk-Version
|
|
9707
|
+
*/
|
|
9708
|
+
'x-notte-sdk-version'?: string | null;
|
|
9709
|
+
};
|
|
9710
|
+
path: {
|
|
9711
|
+
/**
|
|
9712
|
+
* Payment Id
|
|
9713
|
+
*/
|
|
9714
|
+
payment_id: string;
|
|
9715
|
+
};
|
|
9716
|
+
query?: never;
|
|
9717
|
+
url: '/payments/{payment_id}';
|
|
9718
|
+
};
|
|
9719
|
+
type GetPaymentErrors = {
|
|
9720
|
+
/**
|
|
9721
|
+
* Validation Error
|
|
9722
|
+
*/
|
|
9723
|
+
422: HttpValidationError;
|
|
9724
|
+
};
|
|
9725
|
+
type GetPaymentError = GetPaymentErrors[keyof GetPaymentErrors];
|
|
9726
|
+
type GetPaymentResponses = {
|
|
9727
|
+
/**
|
|
9728
|
+
* Successful Response
|
|
9729
|
+
*/
|
|
9730
|
+
200: PaymentResponse;
|
|
9731
|
+
};
|
|
9732
|
+
type GetPaymentResponse = GetPaymentResponses[keyof GetPaymentResponses];
|
|
9144
9733
|
type ProfileCreateData = {
|
|
9145
9734
|
body: ProfileCreateRequest;
|
|
9146
9735
|
headers?: {
|
|
@@ -10425,36 +11014,6 @@ type DeleteSecretResponses = {
|
|
|
10425
11014
|
204: void;
|
|
10426
11015
|
};
|
|
10427
11016
|
type DeleteSecretResponse = DeleteSecretResponses[keyof DeleteSecretResponses];
|
|
10428
|
-
type MintProxyCredentialsData = {
|
|
10429
|
-
body: ProxyCredentialRequest;
|
|
10430
|
-
headers?: {
|
|
10431
|
-
/**
|
|
10432
|
-
* X-Notte-Request-Origin
|
|
10433
|
-
*/
|
|
10434
|
-
'x-notte-request-origin'?: string | null;
|
|
10435
|
-
/**
|
|
10436
|
-
* X-Notte-Sdk-Version
|
|
10437
|
-
*/
|
|
10438
|
-
'x-notte-sdk-version'?: string | null;
|
|
10439
|
-
};
|
|
10440
|
-
path?: never;
|
|
10441
|
-
query?: never;
|
|
10442
|
-
url: '/proxies/gateway/credentials';
|
|
10443
|
-
};
|
|
10444
|
-
type MintProxyCredentialsErrors = {
|
|
10445
|
-
/**
|
|
10446
|
-
* Validation Error
|
|
10447
|
-
*/
|
|
10448
|
-
422: HttpValidationError;
|
|
10449
|
-
};
|
|
10450
|
-
type MintProxyCredentialsError = MintProxyCredentialsErrors[keyof MintProxyCredentialsErrors];
|
|
10451
|
-
type MintProxyCredentialsResponses = {
|
|
10452
|
-
/**
|
|
10453
|
-
* Successful Response
|
|
10454
|
-
*/
|
|
10455
|
-
200: ProxyCredentialResponse;
|
|
10456
|
-
};
|
|
10457
|
-
type MintProxyCredentialsResponse = MintProxyCredentialsResponses[keyof MintProxyCredentialsResponses];
|
|
10458
11017
|
type HealthCheckData = {
|
|
10459
11018
|
body?: never;
|
|
10460
11019
|
path?: never;
|
|
@@ -10584,6 +11143,10 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
10584
11143
|
*/
|
|
10585
11144
|
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
10586
11145
|
};
|
|
11146
|
+
/**
|
|
11147
|
+
* Session Auth Readiness
|
|
11148
|
+
*/
|
|
11149
|
+
declare const sessionAuthReadiness: <ThrowOnError extends boolean = false>(options: Options<SessionAuthReadinessData, ThrowOnError>) => RequestResult<SessionAuthReadinessResponses, SessionAuthReadinessErrors, ThrowOnError>;
|
|
10587
11150
|
/**
|
|
10588
11151
|
* List Sessions
|
|
10589
11152
|
*/
|
|
@@ -10596,6 +11159,10 @@ declare const sessionStart: <ThrowOnError extends boolean = false>(options: Opti
|
|
|
10596
11159
|
* Session Status
|
|
10597
11160
|
*/
|
|
10598
11161
|
declare const sessionStatus: <ThrowOnError extends boolean = false>(options: Options<SessionStatusData, ThrowOnError>) => RequestResult<SessionStatusResponses, SessionStatusErrors, ThrowOnError>;
|
|
11162
|
+
/**
|
|
11163
|
+
* Session Profile Preview
|
|
11164
|
+
*/
|
|
11165
|
+
declare const sessionProfilePreview: <ThrowOnError extends boolean = false>(options: Options<SessionProfilePreviewData, ThrowOnError>) => RequestResult<SessionProfilePreviewResponses, SessionProfilePreviewErrors, ThrowOnError>;
|
|
10599
11166
|
/**
|
|
10600
11167
|
* Get Session Script
|
|
10601
11168
|
*/
|
|
@@ -10789,19 +11356,35 @@ declare const vaultCreditCardSet: <ThrowOnError extends boolean = false>(options
|
|
|
10789
11356
|
*/
|
|
10790
11357
|
declare const listVaults: <ThrowOnError extends boolean = false>(options?: Options<ListVaultsData, ThrowOnError>) => RequestResult<ListVaultsResponses, ListVaultsErrors, ThrowOnError>;
|
|
10791
11358
|
/**
|
|
10792
|
-
*
|
|
11359
|
+
* Connect Payment Wallet
|
|
10793
11360
|
*/
|
|
10794
|
-
declare const
|
|
11361
|
+
declare const connectPaymentWallet: <ThrowOnError extends boolean = false>(options: Options<ConnectPaymentWalletData, ThrowOnError>) => RequestResult<ConnectPaymentWalletResponses, ConnectPaymentWalletErrors, ThrowOnError>;
|
|
10795
11362
|
/**
|
|
10796
|
-
*
|
|
11363
|
+
* Disconnect Payment Wallet
|
|
10797
11364
|
*/
|
|
10798
|
-
declare const
|
|
11365
|
+
declare const disconnectPaymentWallet: <ThrowOnError extends boolean = false>(options: Options<DisconnectPaymentWalletData, ThrowOnError>) => RequestResult<DisconnectPaymentWalletResponses, DisconnectPaymentWalletErrors, ThrowOnError>;
|
|
10799
11366
|
/**
|
|
10800
|
-
*
|
|
11367
|
+
* Create Payment
|
|
10801
11368
|
*/
|
|
10802
|
-
declare const
|
|
11369
|
+
declare const createPayment: <ThrowOnError extends boolean = false>(options: Options<CreatePaymentData, ThrowOnError>) => RequestResult<CreatePaymentResponses, CreatePaymentErrors, ThrowOnError>;
|
|
10803
11370
|
/**
|
|
10804
|
-
*
|
|
11371
|
+
* Get Payment
|
|
11372
|
+
*/
|
|
11373
|
+
declare const getPayment: <ThrowOnError extends boolean = false>(options: Options<GetPaymentData, ThrowOnError>) => RequestResult<GetPaymentResponses, GetPaymentErrors, ThrowOnError>;
|
|
11374
|
+
/**
|
|
11375
|
+
* Profile Create
|
|
11376
|
+
*/
|
|
11377
|
+
declare const profileCreate: <ThrowOnError extends boolean = false>(options: Options<ProfileCreateData, ThrowOnError>) => RequestResult<ProfileCreateResponses, ProfileCreateErrors, ThrowOnError>;
|
|
11378
|
+
/**
|
|
11379
|
+
* Profile Delete
|
|
11380
|
+
*/
|
|
11381
|
+
declare const profileDelete: <ThrowOnError extends boolean = false>(options: Options<ProfileDeleteData, ThrowOnError>) => RequestResult<ProfileDeleteResponses, ProfileDeleteErrors, ThrowOnError>;
|
|
11382
|
+
/**
|
|
11383
|
+
* Profile Get
|
|
11384
|
+
*/
|
|
11385
|
+
declare const profileGet: <ThrowOnError extends boolean = false>(options: Options<ProfileGetData, ThrowOnError>) => RequestResult<ProfileGetResponses, ProfileGetErrors, ThrowOnError>;
|
|
11386
|
+
/**
|
|
11387
|
+
* Profile Duplicate
|
|
10805
11388
|
*/
|
|
10806
11389
|
declare const profileDuplicate: <ThrowOnError extends boolean = false>(options: Options<ProfileDuplicateData, ThrowOnError>) => RequestResult<ProfileDuplicateResponses, ProfileDuplicateErrors, ThrowOnError>;
|
|
10807
11390
|
/**
|
|
@@ -10932,12 +11515,6 @@ declare const getSecret: <ThrowOnError extends boolean = false>(options: Options
|
|
|
10932
11515
|
* Delete Secret
|
|
10933
11516
|
*/
|
|
10934
11517
|
declare const deleteSecret: <ThrowOnError extends boolean = false>(options: Options<DeleteSecretData, ThrowOnError>) => RequestResult<DeleteSecretResponses, DeleteSecretErrors, ThrowOnError>;
|
|
10935
|
-
/**
|
|
10936
|
-
* Mint a short-lived proxy credential
|
|
10937
|
-
*
|
|
10938
|
-
* Returns a derived username/password for `proxy.notte.cc`, signed for this workspace and valid for your plan's maximum session duration (see `expires_at`). Traffic through it is billed to this API key's workspace at the proxy rate. Clients that support TLS to a proxy can also use the API key itself as the proxy password on port 443.
|
|
10939
|
-
*/
|
|
10940
|
-
declare const mintProxyCredentials: <ThrowOnError extends boolean = false>(options: Options<MintProxyCredentialsData, ThrowOnError>) => RequestResult<MintProxyCredentialsResponses, MintProxyCredentialsErrors, ThrowOnError>;
|
|
10941
11518
|
/**
|
|
10942
11519
|
* Health Check
|
|
10943
11520
|
*/
|
|
@@ -10961,7 +11538,623 @@ declare const scrapeFromHtml: <ThrowOnError extends boolean = false>(options: Op
|
|
|
10961
11538
|
|
|
10962
11539
|
declare const client: Client;
|
|
10963
11540
|
|
|
10964
|
-
|
|
11541
|
+
/**
|
|
11542
|
+
* Typed error hierarchy mirroring `notte_sdk.errors` and the `notte_core` errors
|
|
11543
|
+
* the Python SDK raises. Every error thrown by the SDK extends `NotteError`, so
|
|
11544
|
+
* callers can `catch (e) { if (e instanceof NotteError) ... }` and branch on the
|
|
11545
|
+
* concrete class or on `NotteAPIError.statusCode`.
|
|
11546
|
+
*/
|
|
11547
|
+
|
|
11548
|
+
declare class NotteError extends Error {
|
|
11549
|
+
constructor(message: string, options?: {
|
|
11550
|
+
cause?: unknown;
|
|
11551
|
+
});
|
|
11552
|
+
}
|
|
11553
|
+
/**
|
|
11554
|
+
* Body of a failed HTTP response, best effort. JSON bodies are exposed as-is;
|
|
11555
|
+
* non-JSON bodies (HTML error pages, empty 502s) are wrapped as `{ message }`.
|
|
11556
|
+
*/
|
|
11557
|
+
type NotteAPIErrorBody = Record<string, unknown>;
|
|
11558
|
+
/** The API answered with a non-2xx status. */
|
|
11559
|
+
declare class NotteAPIError extends NotteError {
|
|
11560
|
+
readonly path: string;
|
|
11561
|
+
readonly statusCode: number;
|
|
11562
|
+
readonly error: NotteAPIErrorBody;
|
|
11563
|
+
readonly response: Response | undefined;
|
|
11564
|
+
constructor(path: string, statusCode: number, error: NotteAPIErrorBody, response?: Response);
|
|
11565
|
+
/** The API's own error message, when it sent one. */
|
|
11566
|
+
get apiMessage(): string | undefined;
|
|
11567
|
+
static fromBody(path: string, statusCode: number, body: unknown, response?: Response): NotteAPIError;
|
|
11568
|
+
}
|
|
11569
|
+
/** The API flagged the failure as an execution error (`x-error-class: NotteApiExecutionError`). */
|
|
11570
|
+
declare class NotteAPIExecutionError extends NotteAPIError {
|
|
11571
|
+
constructor(path: string, statusCode: number, error: NotteAPIErrorBody, response?: Response);
|
|
11572
|
+
}
|
|
11573
|
+
/** Missing or rejected credentials. Not retryable. */
|
|
11574
|
+
declare class AuthenticationError extends NotteError {
|
|
11575
|
+
constructor(message: string);
|
|
11576
|
+
}
|
|
11577
|
+
/** The request is malformed. Not retryable. */
|
|
11578
|
+
declare class InvalidRequestError extends NotteError {
|
|
11579
|
+
constructor(message: string);
|
|
11580
|
+
}
|
|
11581
|
+
/** A request or a wait exceeded its deadline. */
|
|
11582
|
+
declare class NotteTimeoutError extends NotteError {
|
|
11583
|
+
}
|
|
11584
|
+
/** A cloud function run finished with `status: "failed"`. */
|
|
11585
|
+
declare class FailedToRunCloudFunctionError extends NotteError {
|
|
11586
|
+
readonly functionId: string;
|
|
11587
|
+
readonly functionRunId: string;
|
|
11588
|
+
readonly response: unknown;
|
|
11589
|
+
constructor(functionId: string, functionRunId: string, response: unknown);
|
|
11590
|
+
}
|
|
11591
|
+
/** Structured scrape extraction failed (`StructuredData.success === false`). */
|
|
11592
|
+
declare class ScrapeFailedError extends NotteError {
|
|
11593
|
+
readonly structuredError: string | undefined;
|
|
11594
|
+
constructor(error: string | undefined);
|
|
11595
|
+
}
|
|
11596
|
+
/**
|
|
11597
|
+
* An action executed through `session.execute()` failed. Rehydrated from the
|
|
11598
|
+
* structured `exception_detail` payload the API returns, so `errorType` names
|
|
11599
|
+
* the concrete server-side error class and the three messages carry the same
|
|
11600
|
+
* text Python exposes on `NotteBaseError`.
|
|
11601
|
+
*/
|
|
11602
|
+
declare class ActionExecutionError extends NotteError {
|
|
11603
|
+
readonly errorType: string;
|
|
11604
|
+
readonly devMessage: string;
|
|
11605
|
+
readonly userMessage: string;
|
|
11606
|
+
readonly agentMessage: string;
|
|
11607
|
+
readonly shouldRetryLater: boolean;
|
|
11608
|
+
readonly shouldNotifyTeam: boolean;
|
|
11609
|
+
constructor(detail: SerializedError);
|
|
11610
|
+
static fromMessage(message: string, errorType?: string): ActionExecutionError;
|
|
11611
|
+
}
|
|
11612
|
+
/** `evaluate_js` reported success but the API build predates the data payload. */
|
|
11613
|
+
declare class EvaluateJsNoDataError extends NotteError {
|
|
11614
|
+
constructor();
|
|
11615
|
+
}
|
|
11616
|
+
/** The envelope returned by `session.fetch()` could not be decoded. */
|
|
11617
|
+
declare class FetchResponseDecodeError extends NotteError {
|
|
11618
|
+
constructor(reason: string);
|
|
11619
|
+
}
|
|
11620
|
+
interface RetryOptions {
|
|
11621
|
+
/** Maximum number of attempts, including the first one. */
|
|
11622
|
+
maxTries: number;
|
|
11623
|
+
/** Delay between attempts in milliseconds. Defaults to 5000 like the Python decorator. */
|
|
11624
|
+
delayMs?: number;
|
|
11625
|
+
/** Message of the `Error` raised once every attempt failed. */
|
|
11626
|
+
errorMessage?: string;
|
|
11627
|
+
/** Only retry when this returns true for the thrown error. Defaults to retrying on any error. */
|
|
11628
|
+
shouldRetry?: (error: unknown, attempt: number) => boolean;
|
|
11629
|
+
/** Called before sleeping between attempts. Defaults to `console.warn`. */
|
|
11630
|
+
onRetry?: (error: unknown, attempt: number, maxTries: number) => void;
|
|
11631
|
+
}
|
|
11632
|
+
/**
|
|
11633
|
+
* Wrap an async function so it is retried when it throws, mirroring
|
|
11634
|
+
* `notte_sdk.errors.retry`. The final failure is raised as an `Error` whose
|
|
11635
|
+
* `cause` is the last underlying error.
|
|
11636
|
+
*
|
|
11637
|
+
* ```ts
|
|
11638
|
+
* const start = retry(() => session.start(), { maxTries: 3, delayMs: 1000 });
|
|
11639
|
+
* await start();
|
|
11640
|
+
* ```
|
|
11641
|
+
*/
|
|
11642
|
+
declare function retry<TArgs extends unknown[], TResult>(fn: (...args: TArgs) => Promise<TResult>, options: RetryOptions): (...args: TArgs) => Promise<TResult>;
|
|
11643
|
+
|
|
11644
|
+
/** A file ID was not found in the session, the counterpart of Python's `FileNotFoundError`. */
|
|
11645
|
+
declare class FileNotFoundError extends NotteError {
|
|
11646
|
+
}
|
|
11647
|
+
/** The download destination already exists, the counterpart of Python's `FileExistsError`. */
|
|
11648
|
+
declare class FileExistsError extends NotteError {
|
|
11649
|
+
}
|
|
11650
|
+
interface FileListOptions {
|
|
11651
|
+
/** Only return files from this source: `user_upload` or `session_download`. */
|
|
11652
|
+
source?: FileSource;
|
|
11653
|
+
/** Page size. Defaults to 100. */
|
|
11654
|
+
limit?: number;
|
|
11655
|
+
/** Page offset. Defaults to 0. */
|
|
11656
|
+
offset?: number;
|
|
11657
|
+
}
|
|
11658
|
+
interface FileDownloadOptions {
|
|
11659
|
+
/** Overwrite an existing local file instead of rejecting with `FileExistsError`. */
|
|
11660
|
+
force?: boolean;
|
|
11661
|
+
}
|
|
11662
|
+
/** Bytes accepted by `upload()`: a local path, a `Blob`/`File`, or an in-memory buffer. */
|
|
11663
|
+
type UploadableFile = string | Blob | Uint8Array;
|
|
11664
|
+
/**
|
|
11665
|
+
* Reduce a server-provided filename to a safe basename, like Python's
|
|
11666
|
+
* `Path(PureWindowsPath(filename).name).name`: both separators are honoured,
|
|
11667
|
+
* drive letters are dropped and only the last component is kept.
|
|
11668
|
+
*/
|
|
11669
|
+
declare function sanitizeFilename(filename: string): string;
|
|
11670
|
+
/**
|
|
11671
|
+
* Session-scoped file operations built on the generated `sessions/{id}/files`
|
|
11672
|
+
* client. Every API failure rejects with a `NotteAPIError`.
|
|
11673
|
+
*
|
|
11674
|
+
* ```ts
|
|
11675
|
+
* const files = client.Files(sessionId);
|
|
11676
|
+
* const uploaded = await files.upload(new Blob(['hello']), 'hello.txt');
|
|
11677
|
+
* const page = await files.list({ source: 'user_upload' });
|
|
11678
|
+
* ```
|
|
11679
|
+
*/
|
|
11680
|
+
declare class SessionFiles {
|
|
11681
|
+
private readonly client;
|
|
11682
|
+
readonly sessionId: string;
|
|
11683
|
+
constructor(client: Client, sessionId: string);
|
|
11684
|
+
/**
|
|
11685
|
+
* Upload bytes as a session file. `filename` is what the browser sees when
|
|
11686
|
+
* the file is later attached to a page.
|
|
11687
|
+
*
|
|
11688
|
+
* @param file - Bytes to upload as a Blob, File, or buffer.
|
|
11689
|
+
* @param filename - Stored filename, defaulting to `file`.
|
|
11690
|
+
* @returns Metadata for the uploaded file, including its ID, name, and size.
|
|
11691
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11692
|
+
*/
|
|
11693
|
+
upload(file: Blob | Uint8Array, filename?: string): Promise<SessionFile>;
|
|
11694
|
+
/** List the session's non-expired files, newest first.
|
|
11695
|
+
*
|
|
11696
|
+
* @param options - Optional source filter and pagination. Defaults to all sources, limit 100, and offset 0.
|
|
11697
|
+
* @returns One page of non-expired files and the total count; pagination is not automatic.
|
|
11698
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11699
|
+
*/
|
|
11700
|
+
list(options?: FileListOptions): Promise<SessionFilesPage>;
|
|
11701
|
+
/**
|
|
11702
|
+
* Find a file's metadata by ID by scanning the session listing. Rejects with
|
|
11703
|
+
* `FileNotFoundError` when the ID is unknown or expired.
|
|
11704
|
+
*
|
|
11705
|
+
* @param fileId - ID of a file belonging to this session.
|
|
11706
|
+
* @returns The matching file's metadata.
|
|
11707
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11708
|
+
* @throws FileNotFoundError if the file ID is unknown or expired.
|
|
11709
|
+
*/
|
|
11710
|
+
metadata(fileId: string): Promise<SessionFile>;
|
|
11711
|
+
/** Download a file's bytes as a `Blob`.
|
|
11712
|
+
*
|
|
11713
|
+
* @param fileId - ID of a file belonging to this session.
|
|
11714
|
+
* @returns The downloaded bytes as a Blob; no local file is written.
|
|
11715
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11716
|
+
*/
|
|
11717
|
+
download(fileId: string): Promise<Blob>;
|
|
11718
|
+
/** Stream a file's bytes. Used by `RemoteFileStorage.download()` to write to disk without buffering. */
|
|
11719
|
+
stream(fileId: string): Promise<ReadableStream<Uint8Array>>;
|
|
11720
|
+
/** Delete a session file.
|
|
11721
|
+
*
|
|
11722
|
+
* @param fileId - ID of the session file to delete.
|
|
11723
|
+
* @returns Resolves when deletion succeeds.
|
|
11724
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11725
|
+
*/
|
|
11726
|
+
delete(fileId: string): Promise<void>;
|
|
11727
|
+
}
|
|
11728
|
+
/**
|
|
11729
|
+
* File storage bound to a session, the counterpart of Python's
|
|
11730
|
+
* `RemoteFileStorage`. Create it unbound and pass it to `client.Session({ storage })`
|
|
11731
|
+
* so the session binds it on start, or bind it yourself with a session ID.
|
|
11732
|
+
*
|
|
11733
|
+
* ```ts
|
|
11734
|
+
* const storage = client.FileStorage(sessionId);
|
|
11735
|
+
* const uploaded = await storage.upload('./resume.pdf');
|
|
11736
|
+
* const localPath = await storage.download(uploaded.id, './downloads');
|
|
11737
|
+
* const blob = await storage.downloadBlob(uploaded.id);
|
|
11738
|
+
* ```
|
|
11739
|
+
*
|
|
11740
|
+
* `download()` saves to disk; `downloadBlob()` returns bytes in memory, and
|
|
11741
|
+
* `stream()` returns a readable stream. For lower-level session file access,
|
|
11742
|
+
* see [NotteClient.Files](/typescript-sdk-reference/client/files).
|
|
11743
|
+
*
|
|
11744
|
+
*/
|
|
11745
|
+
declare class RemoteFileStorage {
|
|
11746
|
+
readonly client: NotteClient;
|
|
11747
|
+
private _sessionId;
|
|
11748
|
+
constructor(client: NotteClient, sessionId?: string);
|
|
11749
|
+
/** Bind the storage to a session. Called by `Session.start()` when the storage was passed to the session. */
|
|
11750
|
+
setSessionId(sessionId: string): void;
|
|
11751
|
+
/**
|
|
11752
|
+
* Bind this storage once, cloning it when another session already owns it.
|
|
11753
|
+
*
|
|
11754
|
+
* ```ts
|
|
11755
|
+
* const first = storage.forSession('session-a'); // first === storage
|
|
11756
|
+
* const second = storage.forSession('session-b'); // a clone sharing the client
|
|
11757
|
+
* ```
|
|
11758
|
+
*/
|
|
11759
|
+
forSession(sessionId: string): RemoteFileStorage;
|
|
11760
|
+
/** ID of the bound session. Throws `InvalidRequestError` while the storage is unbound. */
|
|
11761
|
+
get sessionId(): string;
|
|
11762
|
+
/** Whether the storage has been bound to a session yet. */
|
|
11763
|
+
get isBound(): boolean;
|
|
11764
|
+
private files;
|
|
11765
|
+
/**
|
|
11766
|
+
* Upload a file to the session. A string is read as a local path and its
|
|
11767
|
+
* basename becomes the uploaded filename unless `uploadFileName` is set.
|
|
11768
|
+
*
|
|
11769
|
+
* @param file - Local file path, Blob, File, or buffer to upload.
|
|
11770
|
+
* @param uploadFileName - Optional stored filename. Local paths default to their basename; File objects keep their name.
|
|
11771
|
+
* @returns Metadata for the uploaded file, including its ID, name, and size.
|
|
11772
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11773
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11774
|
+
* @throws InvalidRequestError if a supplied local path is not a file.
|
|
11775
|
+
* @example
|
|
11776
|
+
* await storage.upload('./data/resume.pdf');
|
|
11777
|
+
* await storage.upload(Buffer.from('hello'), 'hello.txt');
|
|
11778
|
+
*/
|
|
11779
|
+
upload(file: UploadableFile, uploadFileName?: string): Promise<SessionFile>;
|
|
11780
|
+
/**
|
|
11781
|
+
* List the session's files.
|
|
11782
|
+
*
|
|
11783
|
+
* @param options - Optional source filter and pagination. Defaults to all sources, limit 100, and offset 0.
|
|
11784
|
+
* @returns One page of non-expired files and the total count; pagination is not automatic.
|
|
11785
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11786
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11787
|
+
* @example
|
|
11788
|
+
* const downloads = await storage.list({ source: 'session_download', limit: 1000 });
|
|
11789
|
+
*/
|
|
11790
|
+
list(options?: FileListOptions): Promise<SessionFilesPage>;
|
|
11791
|
+
/** Metadata of a file by ID. Rejects with `FileNotFoundError` when unknown.
|
|
11792
|
+
*
|
|
11793
|
+
* @param fileId - ID of a file belonging to this session.
|
|
11794
|
+
* @returns The matching file's metadata.
|
|
11795
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11796
|
+
* @throws FileNotFoundError if the file ID is unknown or expired.
|
|
11797
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11798
|
+
*/
|
|
11799
|
+
metadata(fileId: string): Promise<SessionFile>;
|
|
11800
|
+
/**
|
|
11801
|
+
* Download a file to `<localDir>/<filename>` and return the local path. The
|
|
11802
|
+
* file is written atomically (temporary file + rename). Rejects with
|
|
11803
|
+
* `FileExistsError` when the destination exists unless `force` is set.
|
|
11804
|
+
*
|
|
11805
|
+
* @param fileId - ID of the file to download.
|
|
11806
|
+
* @param localDir - Destination directory, created if needed. Defaults to the current directory.
|
|
11807
|
+
* @param options - Set `force` to overwrite an existing destination; defaults to false.
|
|
11808
|
+
* @returns The local file path after the download has been written successfully.
|
|
11809
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11810
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11811
|
+
* @throws FileExistsError if the destination exists and `force` is false. Filesystem errors also propagate.
|
|
11812
|
+
* @example
|
|
11813
|
+
* const path = await storage.download(fileId, './downloads', { force: true });
|
|
11814
|
+
*/
|
|
11815
|
+
download(fileId: string, localDir?: string, options?: FileDownloadOptions): Promise<string>;
|
|
11816
|
+
/** Download a file's bytes as a `Blob` without touching the local filesystem. */
|
|
11817
|
+
downloadBlob(fileId: string): Promise<Blob>;
|
|
11818
|
+
/** Stream a file's bytes without buffering the whole file in memory. */
|
|
11819
|
+
stream(fileId: string): Promise<ReadableStream<Uint8Array>>;
|
|
11820
|
+
/** Delete a session file.
|
|
11821
|
+
*
|
|
11822
|
+
* @param fileId - ID of the session file to delete.
|
|
11823
|
+
* @returns Resolves when deletion succeeds.
|
|
11824
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11825
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11826
|
+
*/
|
|
11827
|
+
delete(fileId: string): Promise<void>;
|
|
11828
|
+
}
|
|
11829
|
+
|
|
11830
|
+
/** Session response including managed authentication readiness. */
|
|
11831
|
+
type AuthSessionResponse = SessionResponse;
|
|
11832
|
+
interface ManagedAuthRunResponse {
|
|
11833
|
+
operation_id?: string | null;
|
|
11834
|
+
authenticated?: boolean | null;
|
|
11835
|
+
connection_id: string;
|
|
11836
|
+
status: string;
|
|
11837
|
+
message: string;
|
|
11838
|
+
}
|
|
11839
|
+
interface AuthWaitOptions {
|
|
11840
|
+
/** Overall waiting deadline, milliseconds. Defaults to 615000. */
|
|
11841
|
+
timeoutMs?: number;
|
|
11842
|
+
/** Delay between short polling requests, milliseconds. Defaults to 1000. */
|
|
11843
|
+
pollIntervalMs?: number;
|
|
11844
|
+
signal?: AbortSignal;
|
|
11845
|
+
}
|
|
11846
|
+
interface ManagedAuthRunOptions extends AuthWaitOptions {
|
|
11847
|
+
/** Wait for completion. Defaults to true. */
|
|
11848
|
+
wait?: boolean;
|
|
11849
|
+
/** Additional server-side login attempts, from 0 to 2. Defaults to 0. */
|
|
11850
|
+
auth_retry?: number;
|
|
11851
|
+
}
|
|
11852
|
+
declare class ManagedAuthError extends NotteError {
|
|
11853
|
+
}
|
|
11854
|
+
/**
|
|
11855
|
+
* Connection verification and recovery through `client.managedAuth`.
|
|
11856
|
+
*
|
|
11857
|
+
* ```typescript
|
|
11858
|
+
* const operation = await client.managedAuth.refreshConnection("<connection-id>", { wait: false });
|
|
11859
|
+
* await client.managedAuth.waitForAuth(operation);
|
|
11860
|
+
* ```
|
|
11861
|
+
*/
|
|
11862
|
+
declare class NotteManagedAuth {
|
|
11863
|
+
private readonly client;
|
|
11864
|
+
constructor(client: NotteClient);
|
|
11865
|
+
/** Run only the verifier; this does not submit login credentials. */
|
|
11866
|
+
checkConnection(connectionId: string): Promise<ManagedAuthRunResponse>;
|
|
11867
|
+
getOperation(operationId: string, options?: Pick<AuthWaitOptions, 'signal'>): Promise<ManagedAuthOperation>;
|
|
11868
|
+
/** Wait for an accepted operation. Aborting this wait does not cancel the server operation. */
|
|
11869
|
+
waitForAuth(operation: ManagedAuthOperation, options?: AuthWaitOptions): Promise<ManagedAuthOperation>;
|
|
11870
|
+
/** Verify first, logging in only when required and automatic recovery is allowed. */
|
|
11871
|
+
refreshConnection(connectionId: string, options?: ManagedAuthRunOptions): Promise<ManagedAuthOperation>;
|
|
11872
|
+
/** Explicitly request a new login. Conflicting operations remain HTTP 409 errors. */
|
|
11873
|
+
reauthenticateConnection(connectionId: string, options?: ManagedAuthRunOptions): Promise<ManagedAuthOperation>;
|
|
11874
|
+
private run;
|
|
11875
|
+
}
|
|
11876
|
+
|
|
11877
|
+
/** Per-request cancellation; authentication and transport stay bound to NotteClient. */
|
|
11878
|
+
interface ResourceRequestOptions {
|
|
11879
|
+
signal?: AbortSignal;
|
|
11880
|
+
}
|
|
11881
|
+
|
|
11882
|
+
/** Discriminated union of every action `session.execute()` accepts. */
|
|
11883
|
+
type ExecuteAction = PageExecuteData['body'];
|
|
11884
|
+
/** The `type` discriminator of an `ExecuteAction`. */
|
|
11885
|
+
type ActionType = ExecuteAction['type'];
|
|
11886
|
+
/** The union member whose `type` is `T`. */
|
|
11887
|
+
type ActionOfType<T extends ActionType> = Extract<ExecuteAction, {
|
|
11888
|
+
type: T;
|
|
11889
|
+
}>;
|
|
11890
|
+
/** The fields of an action minus its `type` discriminator. */
|
|
11891
|
+
type ActionInput<T extends ActionType> = Omit<ActionOfType<T>, 'type'>;
|
|
11892
|
+
/** Namespace object mirroring `from notte_sdk import actions`. */
|
|
11893
|
+
declare const actions: {
|
|
11894
|
+
readonly goto: (input: ActionInput<"goto">) => {
|
|
11895
|
+
type: "goto";
|
|
11896
|
+
} & GotoAction;
|
|
11897
|
+
readonly gotoNewTab: (input: ActionInput<"goto_new_tab">) => {
|
|
11898
|
+
type: "goto_new_tab";
|
|
11899
|
+
} & GotoNewTabAction;
|
|
11900
|
+
readonly closeTab: (input?: ActionInput<"close_tab"> | undefined) => {
|
|
11901
|
+
type: "close_tab";
|
|
11902
|
+
} & CloseTabAction;
|
|
11903
|
+
readonly switchTab: (input: ActionInput<"switch_tab">) => {
|
|
11904
|
+
type: "switch_tab";
|
|
11905
|
+
} & SwitchTabAction;
|
|
11906
|
+
readonly goBack: (input?: ActionInput<"go_back"> | undefined) => {
|
|
11907
|
+
type: "go_back";
|
|
11908
|
+
} & GoBackAction;
|
|
11909
|
+
readonly goForward: (input?: ActionInput<"go_forward"> | undefined) => {
|
|
11910
|
+
type: "go_forward";
|
|
11911
|
+
} & GoForwardAction;
|
|
11912
|
+
readonly reload: (input?: ActionInput<"reload"> | undefined) => {
|
|
11913
|
+
type: "reload";
|
|
11914
|
+
} & ReloadAction;
|
|
11915
|
+
readonly wait: (input: ActionInput<"wait">) => {
|
|
11916
|
+
type: "wait";
|
|
11917
|
+
} & WaitAction;
|
|
11918
|
+
readonly pressKey: (input: ActionInput<"press_key">) => {
|
|
11919
|
+
type: "press_key";
|
|
11920
|
+
} & PressKeyAction;
|
|
11921
|
+
readonly scrollUp: (input?: ActionInput<"scroll_up"> | undefined) => {
|
|
11922
|
+
type: "scroll_up";
|
|
11923
|
+
} & ScrollUpAction;
|
|
11924
|
+
readonly scrollDown: (input?: ActionInput<"scroll_down"> | undefined) => {
|
|
11925
|
+
type: "scroll_down";
|
|
11926
|
+
} & ScrollDownAction;
|
|
11927
|
+
readonly captchaSolve: (input?: ActionInput<"captcha_solve"> | undefined) => {
|
|
11928
|
+
type: "captcha_solve";
|
|
11929
|
+
} & CaptchaSolveAction;
|
|
11930
|
+
readonly help: (input: ActionInput<"help">) => {
|
|
11931
|
+
type: "help";
|
|
11932
|
+
} & HelpAction;
|
|
11933
|
+
readonly completion: (input: ActionInput<"completion">) => {
|
|
11934
|
+
type: "completion";
|
|
11935
|
+
} & CompletionAction;
|
|
11936
|
+
readonly scrape: (input?: ActionInput<"scrape"> | undefined) => {
|
|
11937
|
+
type: "scrape";
|
|
11938
|
+
} & ScrapeAction;
|
|
11939
|
+
readonly emailRead: (input?: ActionInput<"email_read"> | undefined) => {
|
|
11940
|
+
type: "email_read";
|
|
11941
|
+
} & EmailReadAction;
|
|
11942
|
+
readonly emailVerificationRead: (input: ActionInput<"email_verification_read">) => {
|
|
11943
|
+
type: "email_verification_read";
|
|
11944
|
+
} & EmailVerificationReadAction;
|
|
11945
|
+
readonly smsRead: (input?: ActionInput<"sms_read"> | undefined) => {
|
|
11946
|
+
type: "sms_read";
|
|
11947
|
+
} & SmsReadAction;
|
|
11948
|
+
readonly evaluateJs: (input: ActionInput<"evaluate_js">) => {
|
|
11949
|
+
type: "evaluate_js";
|
|
11950
|
+
} & EvaluateJsAction;
|
|
11951
|
+
readonly formFill: (input: ActionInput<"form_fill">) => {
|
|
11952
|
+
type: "form_fill";
|
|
11953
|
+
} & FormFillActionWritable;
|
|
11954
|
+
readonly click: (input?: ActionInput<"click"> | undefined) => {
|
|
11955
|
+
type: "click";
|
|
11956
|
+
} & ClickActionInput;
|
|
11957
|
+
readonly fill: (input: ActionInput<"fill">) => {
|
|
11958
|
+
type: "fill";
|
|
11959
|
+
} & FillActionInputWritable;
|
|
11960
|
+
readonly multiFactorFill: (input: ActionInput<"multi_factor_fill">) => {
|
|
11961
|
+
type: "multi_factor_fill";
|
|
11962
|
+
} & MultiFactorFillActionInputWritable;
|
|
11963
|
+
readonly fallbackFill: (input: ActionInput<"fallback_fill">) => {
|
|
11964
|
+
type: "fallback_fill";
|
|
11965
|
+
} & FallbackFillActionInputWritable;
|
|
11966
|
+
readonly check: (input: ActionInput<"check">) => {
|
|
11967
|
+
type: "check";
|
|
11968
|
+
} & CheckActionInput;
|
|
11969
|
+
readonly selectDropdownOption: (input: ActionInput<"select_dropdown_option">) => {
|
|
11970
|
+
type: "select_dropdown_option";
|
|
11971
|
+
} & SelectDropdownOptionActionInputWritable;
|
|
11972
|
+
readonly uploadFile: (input: ActionInput<"upload_file">) => {
|
|
11973
|
+
type: "upload_file";
|
|
11974
|
+
} & UploadFileActionInput;
|
|
11975
|
+
readonly downloadFile: (input?: ActionInput<"download_file"> | undefined) => {
|
|
11976
|
+
type: "download_file";
|
|
11977
|
+
} & DownloadFileActionInput;
|
|
11978
|
+
};
|
|
11979
|
+
/** True when the action is a captcha solve, which gets a longer request timeout and 408 retries. */
|
|
11980
|
+
declare function isCaptchaSolveAction(action: ExecuteAction): action is ActionOfType<'captcha_solve'>;
|
|
11981
|
+
|
|
11982
|
+
/** Execution envelope with the backend's additive CAPTCHA coordination fields. */
|
|
11983
|
+
type CaptchaExecutionResponse = ApiExecutionResponse & {
|
|
11984
|
+
captcha?: CaptchaStatus | null;
|
|
11985
|
+
action_executed?: boolean | null;
|
|
11986
|
+
code?: string | null;
|
|
11987
|
+
};
|
|
11988
|
+
|
|
11989
|
+
/**
|
|
11990
|
+
* Issue an HTTP request from the page a session is on, the port of
|
|
11991
|
+
* `notte_core.data.fetch`.
|
|
11992
|
+
*
|
|
11993
|
+
* `session.fetch()` runs the browser's own `fetch()` inside the current page, so
|
|
11994
|
+
* the request carries the page's cookies, the session's proxy and the browser's
|
|
11995
|
+
* network fingerprint. This module builds the script and reads the result back
|
|
11996
|
+
* into a `PageFetchResponse`.
|
|
11997
|
+
*/
|
|
11998
|
+
|
|
11999
|
+
/** A form body (`Record`) or a raw string body. */
|
|
12000
|
+
type FetchData = string | Record<string, unknown>;
|
|
12001
|
+
interface PageFetchOptions {
|
|
12002
|
+
/** HTTP method. Defaults to `GET`. */
|
|
12003
|
+
method?: string;
|
|
12004
|
+
/** Request headers. */
|
|
12005
|
+
headers?: Record<string, string>;
|
|
12006
|
+
/** Query parameters appended to the URL (before any fragment). Arrays repeat the key. */
|
|
12007
|
+
params?: Record<string, unknown>;
|
|
12008
|
+
/** JSON body, sent with `Content-Type: application/json` unless a content type is given. */
|
|
12009
|
+
json?: unknown;
|
|
12010
|
+
/** Form body (`Record`, sent url-encoded) or a raw string body sent verbatim. */
|
|
12011
|
+
data?: FetchData;
|
|
12012
|
+
/** Abort the request after this many milliseconds. Must be positive. */
|
|
12013
|
+
timeoutMs?: number;
|
|
12014
|
+
/**
|
|
12015
|
+
* Allow `http:` URLs and follow redirects. Off by default because the request
|
|
12016
|
+
* carries the page's cookies: an `https:` request redirected to `http:` would
|
|
12017
|
+
* send them in cleartext before the response can be inspected, so by default
|
|
12018
|
+
* redirects are not followed and a redirected response throws.
|
|
12019
|
+
*/
|
|
12020
|
+
allowInsecure?: boolean;
|
|
12021
|
+
/**
|
|
12022
|
+
* Browser `fetch` redirect mode. Defaults to `manual` (a redirect throws)
|
|
12023
|
+
* unless `allowInsecure` is set, in which case redirects are followed like
|
|
12024
|
+
* the Python SDK does.
|
|
12025
|
+
*/
|
|
12026
|
+
redirect?: 'follow' | 'manual' | 'error';
|
|
12027
|
+
}
|
|
12028
|
+
/**
|
|
12029
|
+
* Return the JavaScript that performs the request and serialises the response.
|
|
12030
|
+
*
|
|
12031
|
+
* The script is an async IIFE, which `evaluateJs` awaits. It returns a JSON
|
|
12032
|
+
* string so the value survives the evaluate round-trip unchanged.
|
|
12033
|
+
*
|
|
12034
|
+
* ```ts
|
|
12035
|
+
* const script = buildFetchScript('/api/items', { params: { page: 2 } });
|
|
12036
|
+
* const response = responseFromEvaluated(await session.evaluateJs(script));
|
|
12037
|
+
* ```
|
|
12038
|
+
*/
|
|
12039
|
+
declare function buildFetchScript(url: string, options?: PageFetchOptions): string;
|
|
12040
|
+
/** `response.raiseForStatus()` rejected a 4xx/5xx response, like `requests.HTTPError`. */
|
|
12041
|
+
declare class PageFetchHTTPError extends NotteError {
|
|
12042
|
+
readonly response: PageFetchResponse;
|
|
12043
|
+
constructor(response: PageFetchResponse);
|
|
12044
|
+
}
|
|
12045
|
+
/**
|
|
12046
|
+
* The response of `session.fetch()`, shaped like the Web `Response` with the
|
|
12047
|
+
* final `url` after redirects exposed as a plain property. A non-2xx status is
|
|
12048
|
+
* a response, not an error; `raiseForStatus()` throws `PageFetchHTTPError`.
|
|
12049
|
+
* `bytes()` holds the exact bytes the server sent, so binary bodies survive;
|
|
12050
|
+
* `text()` decodes them with the declared charset, or utf-8 when none is given.
|
|
12051
|
+
*/
|
|
12052
|
+
declare class PageFetchResponse {
|
|
12053
|
+
readonly status: number;
|
|
12054
|
+
readonly statusText: string;
|
|
12055
|
+
readonly headers: Headers;
|
|
12056
|
+
/** The final URL after redirects. */
|
|
12057
|
+
readonly url: string;
|
|
12058
|
+
/** The declared charset, `utf-8` when the body is valid utf-8, else `undefined`. */
|
|
12059
|
+
readonly encoding: string | undefined;
|
|
12060
|
+
private readonly content;
|
|
12061
|
+
constructor(init: {
|
|
12062
|
+
status: number;
|
|
12063
|
+
headers: Record<string, string>;
|
|
12064
|
+
url: string;
|
|
12065
|
+
content: Uint8Array;
|
|
12066
|
+
});
|
|
12067
|
+
get ok(): boolean;
|
|
12068
|
+
/** The raw body bytes. */
|
|
12069
|
+
bytes(): Uint8Array;
|
|
12070
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
12071
|
+
text(): Promise<string>;
|
|
12072
|
+
json(): Promise<unknown>;
|
|
12073
|
+
/** Throw `PageFetchHTTPError` on a 4xx/5xx status, like `requests.Response.raise_for_status()`. */
|
|
12074
|
+
raiseForStatus(): this;
|
|
12075
|
+
}
|
|
12076
|
+
/**
|
|
12077
|
+
* Turn the envelope `buildFetchScript` returns into a `PageFetchResponse`.
|
|
12078
|
+
* Throws `FetchResponseDecodeError` when the envelope cannot be read.
|
|
12079
|
+
*/
|
|
12080
|
+
declare function responseFromEvaluated(raw: string): PageFetchResponse;
|
|
12081
|
+
|
|
12082
|
+
/**
|
|
12083
|
+
* Shared scrape request/response handling for `client.scrape()` and
|
|
12084
|
+
* `session.scrape()`, mirroring `PageClient.scrape` in the Python SDK.
|
|
12085
|
+
*/
|
|
12086
|
+
|
|
12087
|
+
/** Minimal structural view of a Zod schema so `zod` stays an optional import path. */
|
|
12088
|
+
interface ZodLikeSchema<T> {
|
|
12089
|
+
parse(data: unknown): T;
|
|
12090
|
+
}
|
|
12091
|
+
/** Structured extraction result when `raiseOnFailure` is false, like `StructuredData` in Python. */
|
|
12092
|
+
interface StructuredData<T> {
|
|
12093
|
+
success: boolean;
|
|
12094
|
+
error?: string | null;
|
|
12095
|
+
data?: T | null;
|
|
12096
|
+
}
|
|
12097
|
+
interface ScrapeOptions<T = unknown> {
|
|
12098
|
+
/** A Zod schema or a JSON Schema object describing the data to extract. */
|
|
12099
|
+
response_format?: ZodLikeSchema<T> | Record<string, unknown> | null;
|
|
12100
|
+
/** JSON Schema to send instead of converting `response_format`. Only used with a Zod schema. */
|
|
12101
|
+
json_schema?: Record<string, unknown>;
|
|
12102
|
+
/**
|
|
12103
|
+
* When true (default) a failed structured extraction throws `ScrapeFailedError`
|
|
12104
|
+
* and the extracted data is returned directly. When false the `StructuredData`
|
|
12105
|
+
* wrapper is returned so callers can inspect `.success`.
|
|
12106
|
+
*/
|
|
12107
|
+
raiseOnFailure?: boolean;
|
|
12108
|
+
}
|
|
12109
|
+
type SessionScrapeOptions<T = unknown> = Omit<ScrapeRequest, 'response_format'> & ScrapeOptions<T>;
|
|
12110
|
+
type ScrapeResult<T> = string | ImageData[] | T | StructuredData<T>;
|
|
12111
|
+
/**
|
|
12112
|
+
* Post-process a scrape response according to the request options:
|
|
12113
|
+
* - `only_images` returns the image list,
|
|
12114
|
+
* - `response_format` / `instructions` return the extracted data (validated by
|
|
12115
|
+
* the Zod schema when one was given) or throw `ScrapeFailedError`,
|
|
12116
|
+
* - otherwise the markdown string is returned.
|
|
12117
|
+
*/
|
|
12118
|
+
declare function processScrapeResponse<T = unknown>(scrapeResponse: DataSpace | undefined, options: SessionScrapeOptions<T> & {
|
|
12119
|
+
instructions?: string | null;
|
|
12120
|
+
only_images?: boolean;
|
|
12121
|
+
}): ScrapeResult<T>;
|
|
12122
|
+
|
|
12123
|
+
/** Number of attempts `start()` makes on 5xx errors, like `RemoteSession.start(tries=3)`. */
|
|
12124
|
+
declare const SESSION_START_TRIES = 3;
|
|
12125
|
+
/** Delay before retrying `start()` after an HTTP 529 (cluster overload). */
|
|
12126
|
+
declare const CLUSTER_OVERLOAD_RETRY_DELAY_MS = 30000;
|
|
12127
|
+
/** @deprecated Legacy request limit; CAPTCHA polls now use at most 10 seconds per request. */
|
|
12128
|
+
declare const CAPTCHA_SOLVE_TIMEOUT_MS = 100000;
|
|
12129
|
+
type PerceptionType = NonNullable<ObserveRequest['perception_type']>;
|
|
12130
|
+
type SessionCloseReason = 'manual' | 'error';
|
|
12131
|
+
interface ExecuteOptions {
|
|
12132
|
+
/** Throw when the action fails. Defaults to the session's `raiseOnFailure` (true). */
|
|
12133
|
+
raiseOnFailure?: boolean;
|
|
12134
|
+
}
|
|
12135
|
+
interface ReplayOptions {
|
|
12136
|
+
/** Poll until the replay is ready instead of failing on 404. Defaults to true. */
|
|
12137
|
+
wait?: boolean;
|
|
12138
|
+
/** Maximum time to wait for the replay, in milliseconds. Defaults to 240 000. */
|
|
12139
|
+
timeoutMs?: number;
|
|
12140
|
+
/** Delay between polling attempts, in milliseconds. Defaults to 5 000. */
|
|
12141
|
+
pollIntervalMs?: number;
|
|
12142
|
+
}
|
|
12143
|
+
interface SessionScriptOptions {
|
|
12144
|
+
/** Return a standalone workflow script rather than only the relevant steps. Defaults to true. */
|
|
12145
|
+
as_workflow?: boolean;
|
|
12146
|
+
/** Infer a `response_format` schema for scrape calls that have instructions but no schema. */
|
|
12147
|
+
infer_response_format?: boolean;
|
|
12148
|
+
}
|
|
12149
|
+
interface SessionStartOptions extends AuthWaitOptions {
|
|
12150
|
+
/** Override the session default; false returns while authentication continues. */
|
|
12151
|
+
wait_for_authentication?: boolean;
|
|
12152
|
+
}
|
|
12153
|
+
interface SessionOptions extends ApiSessionStartRequest {
|
|
12154
|
+
/** Wait in the SDK for managed authentication on start(). Defaults to true; use() always waits. */
|
|
12155
|
+
wait_for_authentication?: boolean;
|
|
12156
|
+
/** Additional server-side login attempts, from 0 to 2. Only sent with auth_ids. */
|
|
12157
|
+
auth_retry?: number;
|
|
10965
12158
|
/**
|
|
10966
12159
|
* @deprecated Remote sessions always use the supported browser launch mode.
|
|
10967
12160
|
* Retained as a boolean so existing typed configuration still compiles.
|
|
@@ -10973,85 +12166,340 @@ interface SessionOptions extends Omit<ApiSessionStartRequest, 'use_file_storage'
|
|
|
10973
12166
|
* This is a local SDK option and is not sent to the API.
|
|
10974
12167
|
*/
|
|
10975
12168
|
open_viewer?: boolean;
|
|
12169
|
+
/**
|
|
12170
|
+
* Default for `execute()`: throw `ActionExecutionError` when an action fails.
|
|
12171
|
+
* The counterpart of `raise_on_failure` on `RemoteSession`. Defaults to true.
|
|
12172
|
+
*/
|
|
12173
|
+
raiseOnFailure?: boolean;
|
|
12174
|
+
/** Default perception type for `observe()`. Defaults to `fast`. */
|
|
12175
|
+
perception_type?: PerceptionType;
|
|
12176
|
+
/**
|
|
12177
|
+
* JSON cookie file: loaded into the session on `start()` when it exists and
|
|
12178
|
+
* appended with the session cookies on `stop()`.
|
|
12179
|
+
*/
|
|
12180
|
+
cookie_file?: string;
|
|
12181
|
+
/** File storage to attach to the session so agents can consume uploaded files. */
|
|
12182
|
+
storage?: RemoteFileStorage;
|
|
10976
12183
|
}
|
|
12184
|
+
/**
|
|
12185
|
+
* Keep the external CDP client from competing with Notte for native dialogs.
|
|
12186
|
+
*
|
|
12187
|
+
* Playwright automatically handles a JavaScript dialog when no listener is
|
|
12188
|
+
* registered. Native dialogs are target-global, so that default races the
|
|
12189
|
+
* Notte browser controller attached to the same target. The backend owns
|
|
12190
|
+
* dialog handling; this listener makes the SDK Playwright connection an
|
|
12191
|
+
* observer without issuing a second `Page.handleJavaScriptDialog` command.
|
|
12192
|
+
*/
|
|
12193
|
+
declare function observeServerOwnedDialog(_dialog: Dialog): void;
|
|
12194
|
+
declare function installServerOwnedDialogPolicy(browser: Pick<Browser, 'contexts'>): void;
|
|
12195
|
+
/**
|
|
12196
|
+
* Browser session created with `client.Session(options)`.
|
|
12197
|
+
* Call `start()` before using it and `stop()` when finished, or use `use()`
|
|
12198
|
+
* to start and stop automatically around an asynchronous callback.
|
|
12199
|
+
*/
|
|
10977
12200
|
declare class Session {
|
|
10978
12201
|
private client;
|
|
10979
12202
|
private options;
|
|
10980
12203
|
private openViewer;
|
|
10981
12204
|
private legacyHeadless;
|
|
12205
|
+
private defaultRaiseOnFailure;
|
|
12206
|
+
private defaultPerceptionType;
|
|
12207
|
+
private cookieFile;
|
|
12208
|
+
private cookiesLoaded;
|
|
12209
|
+
private cookieLoadPromise;
|
|
12210
|
+
private authenticationReady;
|
|
12211
|
+
private fileStorage;
|
|
10982
12212
|
private sessionId;
|
|
10983
12213
|
private isActive;
|
|
10984
12214
|
private response;
|
|
12215
|
+
private playwrightBrowser;
|
|
12216
|
+
private playwrightPage;
|
|
10985
12217
|
constructor(client: NotteClient, options?: SessionOptions);
|
|
10986
12218
|
/**
|
|
10987
|
-
* Start the session
|
|
12219
|
+
* Start the session: creates a new session on the server.
|
|
12220
|
+
*
|
|
12221
|
+
* Retries up to `SESSION_START_TRIES` times on 5xx errors, waiting
|
|
12222
|
+
* `CLUSTER_OVERLOAD_RETRY_DELAY_MS` on HTTP 529 (cluster overload). 4xx
|
|
12223
|
+
* errors are never retried.
|
|
12224
|
+
*
|
|
12225
|
+
* Managed-auth sessions wait for readiness by default. Pass
|
|
12226
|
+
* `{ wait_for_authentication: false }` for an explicit nonblocking start,
|
|
12227
|
+
* then call `waitForAuth()` before executing actions or connecting over CDP.
|
|
12228
|
+
* Cancellation during creation waits for its response so the new session can
|
|
12229
|
+
* be closed. Cancellation or failure during the startup wait also closes it.
|
|
12230
|
+
* Prefer `session.use(async session => { ... })`, which also stops the session.
|
|
12231
|
+
* @example
|
|
12232
|
+
* const session = client.Session();
|
|
12233
|
+
* await session.start();
|
|
10988
12234
|
*/
|
|
10989
|
-
start(): Promise<void>;
|
|
12235
|
+
start(options?: SessionStartOptions): Promise<void>;
|
|
10990
12236
|
/**
|
|
10991
|
-
*
|
|
12237
|
+
* Wait for this session to become usable without creating a session or submitting another login.
|
|
12238
|
+
* A standalone wait leaves session ownership with the caller, including on timeout or cancellation.
|
|
10992
12239
|
*/
|
|
10993
|
-
|
|
12240
|
+
waitForAuth(options?: AuthWaitOptions): Promise<void>;
|
|
12241
|
+
private loadInitialCookies;
|
|
10994
12242
|
/**
|
|
10995
|
-
*
|
|
12243
|
+
* Stop the session and clean up resources (including any Playwright
|
|
12244
|
+
* connection opened with `page()`). When a `cookie_file` was given, the
|
|
12245
|
+
* session cookies are appended to it first. A session the API reports as
|
|
12246
|
+
* already stopped is tolerated with a warning.
|
|
12247
|
+
*
|
|
12248
|
+
* @example
|
|
12249
|
+
* await session.stop();
|
|
10996
12250
|
*/
|
|
10997
|
-
|
|
12251
|
+
stop(closeReason?: SessionCloseReason): Promise<void>;
|
|
12252
|
+
private closePlaywright;
|
|
10998
12253
|
/**
|
|
10999
|
-
* Get session
|
|
12254
|
+
* Get the current status of the session. Like Python, this keeps working
|
|
12255
|
+
* after `stop()` (for example to read the recorded `steps`).
|
|
12256
|
+
*
|
|
12257
|
+
* @returns Current session metadata, including lifecycle status and recorded steps. Works after `stop()`.
|
|
12258
|
+
* @throws Error if this session has never been started.
|
|
12259
|
+
* @throws NotteAPIError if the status request fails.
|
|
12260
|
+
* @example
|
|
12261
|
+
* const status = await session.status();
|
|
12262
|
+
* console.log(status.status); // 'active'
|
|
11000
12263
|
*/
|
|
12264
|
+
status(): Promise<AuthSessionResponse>;
|
|
12265
|
+
/** Session ID while the session is active, `null` otherwise. */
|
|
11001
12266
|
getId(): string | null;
|
|
11002
|
-
/**
|
|
11003
|
-
* Check if session is active
|
|
11004
|
-
*/
|
|
12267
|
+
/** Whether the session has been started and not stopped yet. */
|
|
11005
12268
|
isSessionActive(): boolean;
|
|
11006
|
-
/**
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
12269
|
+
/** The last `SessionResponse` received from the API (start, stop or status). */
|
|
12270
|
+
getResponse(): AuthSessionResponse | null;
|
|
12271
|
+
/** The file storage attached to the session, when one was given. */
|
|
12272
|
+
get storage(): RemoteFileStorage | undefined;
|
|
12273
|
+
private requireSessionId;
|
|
12274
|
+
/** Session ID of the active session, or of the last one when it was stopped. */
|
|
12275
|
+
private lastSessionId;
|
|
11010
12276
|
/**
|
|
11011
12277
|
* Open the live viewer for this session in the local default browser.
|
|
12278
|
+
* @throws If the session has not started or no viewer URL is available.
|
|
11012
12279
|
*/
|
|
11013
12280
|
viewer(): void;
|
|
11014
12281
|
private openViewerInBrowser;
|
|
11015
12282
|
/**
|
|
11016
|
-
*
|
|
12283
|
+
* Get presigned URLs for the session replay. Recordings are finalized after
|
|
12284
|
+
* the session is closed, so by default this polls on 404 until the replay is
|
|
12285
|
+
* ready. It keeps working after `stop()`.
|
|
12286
|
+
*
|
|
12287
|
+
* Throws an `Error` when the API reports the session is still active and a
|
|
12288
|
+
* `NotteTimeoutError` when the replay is not ready within `timeoutMs`.
|
|
12289
|
+
* @example
|
|
12290
|
+
* await session.stop();
|
|
12291
|
+
* const replay = await session.replay();
|
|
12292
|
+
* console.log(replay.mp4_url);
|
|
12293
|
+
*/
|
|
12294
|
+
replay(options?: ReplayOptions): Promise<ReplayResponse>;
|
|
12295
|
+
/**
|
|
12296
|
+
* Download the MP4 replay to a local file, like `ReplayResponse.download()`
|
|
12297
|
+
* in Python. Resolves with the absolute path of the written file and throws
|
|
12298
|
+
* when the replay has no `mp4_url`.
|
|
12299
|
+
*
|
|
12300
|
+
* @example
|
|
12301
|
+
* await session.stop();
|
|
12302
|
+
* const file = await session.downloadReplay('session.mp4');
|
|
12303
|
+
*/
|
|
12304
|
+
downloadReplay(path?: string, options?: ReplayOptions): Promise<string>;
|
|
12305
|
+
/**
|
|
12306
|
+
* Upload cookies to the session.
|
|
12307
|
+
*
|
|
12308
|
+
* @example
|
|
12309
|
+
* await session.setCookies([{ name: 'token', value: 'abc', domain: 'example.com', path: '/', httpOnly: false }]);
|
|
11017
12310
|
*/
|
|
11018
12311
|
setCookies(cookies: Cookie[]): Promise<ExecutionResponse>;
|
|
11019
12312
|
/**
|
|
11020
|
-
*
|
|
12313
|
+
* Upload cookies from a JSON file (a list of cookies, like `getCookies()` returns).
|
|
12314
|
+
*
|
|
12315
|
+
* @example
|
|
12316
|
+
* await session.setCookiesFromFile('cookies.json');
|
|
11021
12317
|
*/
|
|
11022
12318
|
setCookiesFromFile(cookieFile: string): Promise<ExecutionResponse>;
|
|
11023
12319
|
/**
|
|
11024
|
-
* Get cookies
|
|
12320
|
+
* Get the cookies of the session.
|
|
12321
|
+
*
|
|
12322
|
+
* @example
|
|
12323
|
+
* const cookies = await session.getCookies();
|
|
12324
|
+
* await fs.writeFile('cookies.json', JSON.stringify(cookies));
|
|
11025
12325
|
*/
|
|
11026
12326
|
getCookies(): Promise<Cookie[]>;
|
|
12327
|
+
/** Detailed debug information for the session (debug URL, websocket URLs, tabs). */
|
|
12328
|
+
debugInfo(): Promise<SessionDebugResponse>;
|
|
11027
12329
|
/**
|
|
11028
|
-
*
|
|
12330
|
+
* Debug information for one tab of the session. The API client has no
|
|
12331
|
+
* dedicated tab endpoint, so this reads the tab from `debugInfo().tabs`.
|
|
11029
12332
|
*/
|
|
11030
|
-
|
|
12333
|
+
debugTabInfo(tabIdx?: number): Promise<TabSessionDebugResponse>;
|
|
11031
12334
|
/**
|
|
11032
|
-
*
|
|
12335
|
+
* Get the Chrome DevTools Protocol WebSocket URL for the session.
|
|
12336
|
+
*
|
|
12337
|
+
* A `cdp_url` given at construction (another browser provider) is returned
|
|
12338
|
+
* untouched. Notte-served URLs, from the start response or the debug info,
|
|
12339
|
+
* carry the database preview branch when one is configured.
|
|
12340
|
+
*
|
|
12341
|
+
* @returns The CDP WebSocket URL for connecting a browser automation client.
|
|
12342
|
+
* @throws Error if no session ID or CDP URL is available.
|
|
12343
|
+
* @example
|
|
12344
|
+
* const browser = await chromium.connectOverCDP(await session.cdpUrl());
|
|
11033
12345
|
*/
|
|
11034
|
-
|
|
12346
|
+
cdpUrl(): Promise<string>;
|
|
11035
12347
|
/**
|
|
11036
|
-
* Get session
|
|
12348
|
+
* Get a Playwright page connected to the session via CDP. The connection is
|
|
12349
|
+
* established lazily on first access, cached, and closed by `stop()`.
|
|
12350
|
+
* Native dialogs are left to the Notte backend.
|
|
12351
|
+
*
|
|
12352
|
+
* Requires the optional `playwright-core` peer dependency
|
|
12353
|
+
* (`npm install playwright-core`).
|
|
12354
|
+
*
|
|
12355
|
+
* @example
|
|
12356
|
+
* const page = await session.page();
|
|
12357
|
+
* await page.goto('https://www.google.com');
|
|
12358
|
+
* await page.screenshot({ path: 'screenshot.png' });
|
|
11037
12359
|
*/
|
|
11038
|
-
|
|
12360
|
+
page(): Promise<Page>;
|
|
11039
12361
|
/**
|
|
11040
|
-
*
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
12362
|
+
* Get the workflow code generated from the session steps
|
|
12363
|
+
* (`GET /sessions/{id}/workflow/code`).
|
|
12364
|
+
*
|
|
12365
|
+
* @example
|
|
12366
|
+
* const { python_script } = await session.getScript();
|
|
12367
|
+
*/
|
|
12368
|
+
getScript(options?: SessionScriptOptions): Promise<AgentFunctionCodeResponse>;
|
|
12369
|
+
/**
|
|
12370
|
+
* Execute an action on the current page.
|
|
12371
|
+
*
|
|
12372
|
+
* When the action fails and `raiseOnFailure` is true (the default, see the
|
|
12373
|
+
* session option), the structured `exception_detail` returned by the API is
|
|
12374
|
+
* rehydrated into an `ActionExecutionError` whose `errorType` names the
|
|
12375
|
+
* server-side error class. `captcha_solve` actions get a 100 s request
|
|
12376
|
+
* timeout and are retried up to 3 times on HTTP 408.
|
|
12377
|
+
*
|
|
12378
|
+
* @param action - Action type, target, and action-specific arguments.
|
|
12379
|
+
* @param options - Override failure handling for this call; otherwise use the session setting.
|
|
12380
|
+
* @returns The execution response, including `success` and failure details when throwing is disabled.
|
|
12381
|
+
* @throws ActionExecutionError if the action fails and failure throwing is enabled.
|
|
12382
|
+
* @throws NotteAPIError if the API request fails.
|
|
12383
|
+
* @example
|
|
12384
|
+
* import { actions } from 'notte-sdk';
|
|
12385
|
+
*
|
|
12386
|
+
* await session.execute({ type: 'goto', url: 'https://www.notte.cc' });
|
|
12387
|
+
* await session.execute(actions.fill({ selector: "input[name='email']", value: 'user@example.com' }));
|
|
12388
|
+
* const result = await session.execute({ type: 'click', id: 'B1' }, { raiseOnFailure: false });
|
|
12389
|
+
* if (!result.success) console.log(result.message);
|
|
12390
|
+
*/
|
|
12391
|
+
execute(action: ExecuteAction, options?: boolean | ExecuteOptions): Promise<CaptchaExecutionResponse>;
|
|
12392
|
+
/**
|
|
12393
|
+
* Evaluate JavaScript on the current page and return its result as a string.
|
|
12394
|
+
*
|
|
12395
|
+
* The result is stringified the way `evaluate_js` records it: objects and
|
|
12396
|
+
* arrays as JSON, a JS `null` as the string `"null"`. On failure the typed
|
|
12397
|
+
* `ActionExecutionError` is thrown with the actual JavaScript error; pass
|
|
12398
|
+
* `raiseOnFailure: false` to get the execution result envelope instead.
|
|
12399
|
+
*
|
|
12400
|
+
* @example
|
|
12401
|
+
* const title = await session.evaluateJs('document.title');
|
|
12402
|
+
* const payload = JSON.parse(await session.evaluateJs('(async () => JSON.stringify(await (await fetch("/api")).json()))()'));
|
|
12403
|
+
*/
|
|
12404
|
+
evaluateJs(code: string, options?: {
|
|
12405
|
+
raiseOnFailure?: true;
|
|
12406
|
+
}): Promise<string>;
|
|
12407
|
+
evaluateJs(code: string, options: {
|
|
12408
|
+
raiseOnFailure: false;
|
|
12409
|
+
}): Promise<ApiExecutionResponse>;
|
|
12410
|
+
/**
|
|
12411
|
+
* Issue an HTTP request from the page the session is on and return the response.
|
|
12412
|
+
*
|
|
12413
|
+
* The request runs inside the browser through `fetch()`, so it carries the
|
|
12414
|
+
* page's cookies, the session's proxy and the browser's own network
|
|
12415
|
+
* fingerprint. A relative `url` resolves against the current page, which
|
|
12416
|
+
* also makes it same-origin; a cross-origin URL is subject to CORS exactly
|
|
12417
|
+
* as in a browser tab, so `goto` the target origin first. Redirects are
|
|
12418
|
+
* followed and the final URL is on `response.url`. A non-2xx status is
|
|
12419
|
+
* returned, not thrown; `response.raiseForStatus()` throws `PageFetchHTTPError`.
|
|
12420
|
+
*
|
|
12421
|
+
* `json` is serialised as the body with an `application/json` content type,
|
|
12422
|
+
* `data` as a form body when it is an object or verbatim when it is a string.
|
|
12423
|
+
*
|
|
12424
|
+
* @param url - Absolute URL or a path relative to the current page.
|
|
12425
|
+
* @param options - HTTP method, headers, and request body settings.
|
|
12426
|
+
* @returns A response with status, headers, and body readers. Non-2xx responses are not automatically thrown.
|
|
12427
|
+
* @throws ActionExecutionError if browser-side execution fails.
|
|
12428
|
+
* @example
|
|
12429
|
+
* await session.execute({ type: 'goto', url: 'https://en.wikipedia.org/wiki/Main_Page' });
|
|
12430
|
+
* const summary = await (await session.fetch('/api/rest_v1/page/summary/Main_Page')).json();
|
|
12431
|
+
*/
|
|
12432
|
+
fetch(url: string, options?: PageFetchOptions): Promise<PageFetchResponse>;
|
|
12433
|
+
/**
|
|
12434
|
+
* Observe the current page: the list of actions that can be taken, a
|
|
12435
|
+
* screenshot and page metadata.
|
|
12436
|
+
*
|
|
12437
|
+
* The `perception_type` defaults to the session option (`fast`). A bare
|
|
12438
|
+
* string argument is accepted as the perception type.
|
|
12439
|
+
*
|
|
12440
|
+
* @param options - Observation settings, including an optional URL, or a perception-mode string.
|
|
12441
|
+
* @returns Structured page analysis, available actions, and page metadata.
|
|
12442
|
+
* @throws NotteAPIError if observation fails.
|
|
12443
|
+
* @example
|
|
12444
|
+
* const obs = await session.observe();
|
|
12445
|
+
* console.log(obs.space.description);
|
|
12446
|
+
* const deep = await session.observe({ perception_type: 'deep', max_nb_actions: 50 });
|
|
12447
|
+
*/
|
|
12448
|
+
observe(options?: ObserveRequest | PerceptionType): Promise<Observation>;
|
|
12449
|
+
/**
|
|
12450
|
+
* Scrape the current page.
|
|
12451
|
+
*
|
|
12452
|
+
* With `response_format` or `instructions`, the extracted data is returned
|
|
12453
|
+
* directly and a failed extraction throws `ScrapeFailedError`. Pass
|
|
12454
|
+
* `raiseOnFailure: false` to receive the `StructuredData` wrapper instead.
|
|
12455
|
+
* @example
|
|
12456
|
+
* const markdown = await session.scrape({ only_main_content: true });
|
|
12457
|
+
* const images = await session.scrape({ only_images: true });
|
|
12458
|
+
* const product = await session.scrape({ response_format: Product, instructions: 'Extract the product' });
|
|
12459
|
+
* const result = await session.scrape({ response_format: Product, raiseOnFailure: false });
|
|
12460
|
+
* if (result.success) console.log(result.data);
|
|
12461
|
+
*/
|
|
12462
|
+
scrape(options: SessionScrapeOptions<unknown> & {
|
|
12463
|
+
only_images: true;
|
|
12464
|
+
}): Promise<ImageData[]>;
|
|
12465
|
+
scrape(options?: SessionScrapeOptions<unknown> & {
|
|
12466
|
+
response_format?: undefined;
|
|
12467
|
+
instructions?: undefined | null;
|
|
12468
|
+
only_images?: false;
|
|
12469
|
+
}): Promise<string>;
|
|
12470
|
+
scrape<T>(options: SessionScrapeOptions<T> & {
|
|
12471
|
+
response_format: ZodLikeSchema<T>;
|
|
12472
|
+
raiseOnFailure?: true;
|
|
11046
12473
|
}): Promise<T>;
|
|
12474
|
+
scrape<T>(options: SessionScrapeOptions<T> & {
|
|
12475
|
+
response_format: ZodLikeSchema<T>;
|
|
12476
|
+
raiseOnFailure: false;
|
|
12477
|
+
}): Promise<StructuredData<T>>;
|
|
12478
|
+
scrape(options: SessionScrapeOptions<unknown>): Promise<ScrapeResult<unknown>>;
|
|
11047
12479
|
/**
|
|
11048
|
-
* Context manager pattern
|
|
11049
|
-
*
|
|
12480
|
+
* Context manager pattern: start the session, run the callback and stop the
|
|
12481
|
+
* session, with close reason `error` when the callback throws.
|
|
12482
|
+
*
|
|
12483
|
+
* Always waits for Managed Auth readiness before invoking the callback.
|
|
12484
|
+
*
|
|
12485
|
+
* @param callback - Async work to perform with the ready session.
|
|
12486
|
+
* @param options - Controls the Managed Auth readiness wait, including timeout and cancellation.
|
|
12487
|
+
* @returns The callback's return value after session cleanup has been attempted.
|
|
12488
|
+
* @throws Error if startup fails, the callback throws, or cleanup fails after a successful callback.
|
|
12489
|
+
* @example
|
|
12490
|
+
* await client.Session().use(async session => {
|
|
12491
|
+
* await session.execute({ type: 'goto', url: 'https://www.notte.cc' });
|
|
12492
|
+
* });
|
|
11050
12493
|
*/
|
|
11051
|
-
use<T>(callback: (session: Session) => Promise<T
|
|
12494
|
+
use<T>(callback: (session: Session) => Promise<T>, options?: AuthWaitOptions): Promise<T>;
|
|
11052
12495
|
/**
|
|
11053
|
-
* Async iterator pattern for session lifecycle management
|
|
11054
|
-
*
|
|
12496
|
+
* Async iterator pattern for session lifecycle management.
|
|
12497
|
+
*
|
|
12498
|
+
* ```ts
|
|
12499
|
+
* for await (const session of client.Session()) {
|
|
12500
|
+
* await session.execute({ type: 'goto', url: 'https://www.notte.cc' });
|
|
12501
|
+
* }
|
|
12502
|
+
* ```
|
|
11055
12503
|
*/
|
|
11056
12504
|
[Symbol.asyncIterator](): AsyncGenerator<this, void, unknown>;
|
|
11057
12505
|
}
|
|
@@ -11059,12 +12507,67 @@ declare class Session {
|
|
|
11059
12507
|
interface VaultConstructorWithId {
|
|
11060
12508
|
vault_id: string;
|
|
11061
12509
|
}
|
|
11062
|
-
interface VaultConstructorCreate extends
|
|
12510
|
+
interface VaultConstructorCreate extends VaultCreateRequest {
|
|
11063
12511
|
vault_id?: never;
|
|
11064
12512
|
}
|
|
11065
12513
|
type VaultConstructor = VaultConstructorWithId | VaultConstructorCreate;
|
|
12514
|
+
/** Credential fields read by `addCredentialsFromEnv`, in the order Python's `CredentialField.registry` declares them. */
|
|
12515
|
+
declare const CREDENTIAL_FIELDS: readonly ["email", "username", "mfa_secret", "password"];
|
|
12516
|
+
type CredentialField = (typeof CREDENTIAL_FIELDS)[number];
|
|
12517
|
+
/**
|
|
12518
|
+
* Get the root domain of a URL, the counterpart of `notte_core.utils.url.get_root_domain`.
|
|
12519
|
+
* Returns an empty string when no domain can be extracted.
|
|
12520
|
+
*
|
|
12521
|
+
* ```ts
|
|
12522
|
+
* getRootDomain('https://www.example.com/path'); // 'example.com'
|
|
12523
|
+
* getRootDomain('https://test.peeple.com/ok'); // 'peeple.com'
|
|
12524
|
+
* getRootDomain('https://shop.example.co.uk'); // 'example.co.uk'
|
|
12525
|
+
* ```
|
|
12526
|
+
*/
|
|
12527
|
+
declare function getRootDomain(url: string): string;
|
|
12528
|
+
/**
|
|
12529
|
+
* Normalise a credential URL to its root domain, the counterpart of
|
|
12530
|
+
* `notte_sdk.types.validate_url`. Throws `InvalidRequestError` when the URL
|
|
12531
|
+
* has no domain name.
|
|
12532
|
+
*
|
|
12533
|
+
* ```ts
|
|
12534
|
+
* validateUrl('https://github.com/login'); // 'github.com'
|
|
12535
|
+
* validateUrl('https://'); // throws InvalidRequestError
|
|
12536
|
+
* ```
|
|
12537
|
+
*/
|
|
12538
|
+
declare function validateUrl(url: string): string;
|
|
12539
|
+
/**
|
|
12540
|
+
* Check that a string is a base32 TOTP secret, with the padding rules Python's
|
|
12541
|
+
* `pyotp.TOTP(secret).now()` applies (`base64.b32decode` after right-padding
|
|
12542
|
+
* the secret to a multiple of eight characters).
|
|
12543
|
+
*/
|
|
12544
|
+
declare function isValidMfaSecret(secret: string): boolean;
|
|
11066
12545
|
/**
|
|
11067
|
-
*
|
|
12546
|
+
* Validate an MFA secret like `AddCredentialsRequest.check_email_and_username`
|
|
12547
|
+
* in Python. Rejects one-time codes (`999777`) and anything that is not base32.
|
|
12548
|
+
*/
|
|
12549
|
+
declare function validateMfaSecret(secret: string): void;
|
|
12550
|
+
/**
|
|
12551
|
+
* Apply the client-side rules of Python's `AddCredentialsRequest`: exactly one
|
|
12552
|
+
* of `username` / `email`, and a base32 `mfa_secret` when one is provided.
|
|
12553
|
+
* Returns the credentials unchanged.
|
|
12554
|
+
*/
|
|
12555
|
+
declare function validateCredentials(credentials: CredentialsDictInput): CredentialsDictInput;
|
|
12556
|
+
/**
|
|
12557
|
+
* Vault that fetches credentials stored using the SDK, the counterpart of
|
|
12558
|
+
* `notte_sdk.endpoints.vaults.NotteVault`.
|
|
12559
|
+
*
|
|
12560
|
+
* The remote vault is created lazily on the first API operation so local-only
|
|
12561
|
+
* helpers such as `generatePassword()` stay side-effect free. Every API
|
|
12562
|
+
* failure rejects with a `NotteAPIError`; caller mistakes (invalid URL,
|
|
12563
|
+
* one-time code stored as an MFA secret, ...) reject with `InvalidRequestError`.
|
|
12564
|
+
* // pragma: allowlist secret
|
|
12565
|
+
* ```ts
|
|
12566
|
+
* const vault = client.Vault({ name: 'My vault' });
|
|
12567
|
+
* await vault.addCredentials('https://github.com/', { email: 'me@example.org', password: 'secret' }); // pragma: allowlist secret
|
|
12568
|
+
* const credentials = await vault.getCredentials('https://github.com/login');
|
|
12569
|
+
* await vault.stop(); // deletes the vault and every credential it holds
|
|
12570
|
+
* ```
|
|
11068
12571
|
*/
|
|
11069
12572
|
declare class NotteVault {
|
|
11070
12573
|
private client;
|
|
@@ -11076,64 +12579,98 @@ declare class NotteVault {
|
|
|
11076
12579
|
private initNewVault;
|
|
11077
12580
|
private verifyVaultExists;
|
|
11078
12581
|
private ensureInitialized;
|
|
12582
|
+
/** ID of the remote vault. Throws until the first API operation has created or verified it. */
|
|
11079
12583
|
get vaultId(): string;
|
|
11080
12584
|
/**
|
|
11081
|
-
* Start the vault -
|
|
12585
|
+
* Start the vault. No-op kept for parity with Python's `SyncResource` interface.
|
|
11082
12586
|
*/
|
|
11083
12587
|
start(): void;
|
|
11084
12588
|
/**
|
|
11085
|
-
* Stop the vault
|
|
12589
|
+
* Stop the vault: deletes it together with every credential it holds.
|
|
12590
|
+
*
|
|
12591
|
+
* ```ts
|
|
12592
|
+
* await vault.stop();
|
|
12593
|
+
* ```
|
|
11086
12594
|
*/
|
|
11087
12595
|
stop(): Promise<void>;
|
|
11088
12596
|
/**
|
|
11089
|
-
* Add or update credentials for a URL
|
|
12597
|
+
* Add or update the credentials stored for a website. The URL is reduced to
|
|
12598
|
+
* its root domain (`https://github.com/login` → `github.com`) before it is
|
|
12599
|
+
* sent, like Python's `AddCredentialsRequest`.
|
|
12600
|
+
*
|
|
12601
|
+
* ```ts
|
|
12602
|
+
* await vault.addCredentials('https://github.com/', {
|
|
12603
|
+
* email: 'me@example.org',
|
|
12604
|
+
* password: 'secret', // pragma: allowlist secret
|
|
12605
|
+
* mfa_secret: 'JBSWY3DPEHPK3PXP', // pragma: allowlist secret
|
|
12606
|
+
* });
|
|
12607
|
+
* ```
|
|
11090
12608
|
*/
|
|
11091
12609
|
addCredentials(url: string, credentials: CredentialsDictInput): Promise<void>;
|
|
11092
12610
|
/**
|
|
11093
|
-
* Get credentials for a
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
*
|
|
12611
|
+
* Get the credentials stored for a website. Rejects with a `NotteAPIError`
|
|
12612
|
+
* when the vault holds no credentials for that domain, like Python's
|
|
12613
|
+
* `get_credentials`.
|
|
12614
|
+
*
|
|
12615
|
+
* ```ts
|
|
12616
|
+
* const { email, password } = await vault.getCredentials('https://github.com/login');
|
|
12617
|
+
* ```
|
|
11098
12618
|
*/
|
|
11099
|
-
|
|
12619
|
+
getCredentials(url: string): Promise<CredentialsDictOutput>;
|
|
11100
12620
|
/**
|
|
11101
|
-
*
|
|
12621
|
+
* Check whether the vault holds credentials for a website, the counterpart
|
|
12622
|
+
* of `BaseVault.has_credential`. Never rejects for a missing credential.
|
|
12623
|
+
*
|
|
12624
|
+
* ```ts
|
|
12625
|
+
* if (!(await vault.hasCredential('https://github.com/'))) {
|
|
12626
|
+
* await vault.addCredentialsFromEnv('https://github.com/');
|
|
12627
|
+
* }
|
|
12628
|
+
* ```
|
|
11102
12629
|
*/
|
|
11103
|
-
|
|
12630
|
+
hasCredential(url: string): Promise<boolean>;
|
|
11104
12631
|
/**
|
|
11105
|
-
*
|
|
12632
|
+
* Delete the credentials stored for a website.
|
|
12633
|
+
*
|
|
12634
|
+
* ```ts
|
|
12635
|
+
* await vault.deleteCredentials('https://github.com/');
|
|
12636
|
+
* ```
|
|
11106
12637
|
*/
|
|
11107
|
-
|
|
12638
|
+
deleteCredentials(url: string): Promise<void>;
|
|
11108
12639
|
/**
|
|
11109
|
-
* List
|
|
12640
|
+
* List the websites the vault holds credentials for. Passwords are never returned.
|
|
12641
|
+
*
|
|
12642
|
+
* ```ts
|
|
12643
|
+
* const credentials = await vault.listCredentials();
|
|
12644
|
+
* console.log(credentials.map(c => c.url));
|
|
12645
|
+
* ```
|
|
11110
12646
|
*/
|
|
11111
12647
|
listCredentials(): Promise<Credential[]>;
|
|
11112
12648
|
/**
|
|
11113
|
-
* Delete
|
|
11114
|
-
*/
|
|
11115
|
-
deleteCreditCard(): Promise<void>;
|
|
11116
|
-
/**
|
|
11117
|
-
* Delete the entire vault
|
|
12649
|
+
* Delete the vault and every credential it holds.
|
|
11118
12650
|
*/
|
|
11119
12651
|
delete(): Promise<void>;
|
|
11120
12652
|
/**
|
|
11121
|
-
* Add credentials from environment variables
|
|
11122
|
-
*
|
|
12653
|
+
* Add credentials read from environment variables, the counterpart of
|
|
12654
|
+
* `BaseVault.add_credentials_from_env`. For `https://github.com/` the
|
|
12655
|
+
* variables are `GITHUB_COM_EMAIL`, `GITHUB_COM_USERNAME`,
|
|
12656
|
+
* `GITHUB_COM_MFA_SECRET` and `GITHUB_COM_PASSWORD`.
|
|
12657
|
+
*
|
|
12658
|
+
* ```ts
|
|
12659
|
+
* process.env.GITHUB_COM_EMAIL = 'me@example.org';
|
|
12660
|
+
* process.env.GITHUB_COM_PASSWORD = 'secret'; // pragma: allowlist secret
|
|
12661
|
+
* await vault.addCredentialsFromEnv('https://github.com/');
|
|
12662
|
+
* ```
|
|
11123
12663
|
*/
|
|
11124
12664
|
addCredentialsFromEnv(url: string): Promise<void>;
|
|
11125
12665
|
/**
|
|
11126
|
-
*
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
*
|
|
11131
|
-
*
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
/**
|
|
11135
|
-
* Generate a secure random password
|
|
11136
|
-
* Mirrors Python's generate_password method
|
|
12666
|
+
* Generate a secure random password, the counterpart of Python's
|
|
12667
|
+
* `generate_password`. The result always contains a lowercase letter, an
|
|
12668
|
+
* uppercase letter and a digit, plus a special character unless
|
|
12669
|
+
* `includeSpecialChars` is false.
|
|
12670
|
+
*
|
|
12671
|
+
* ```ts
|
|
12672
|
+
* const password = vault.generatePassword(24);
|
|
12673
|
+
* ```
|
|
11137
12674
|
*/
|
|
11138
12675
|
generatePassword(length?: number, includeSpecialChars?: boolean): string;
|
|
11139
12676
|
}
|
|
@@ -11167,6 +12704,7 @@ declare class NottePersona {
|
|
|
11167
12704
|
private response;
|
|
11168
12705
|
private initPromise;
|
|
11169
12706
|
private _vault;
|
|
12707
|
+
private readonly ownsPersona;
|
|
11170
12708
|
constructor(client: NotteClient, options?: PersonaConstructor);
|
|
11171
12709
|
/**
|
|
11172
12710
|
* Get persona info
|
|
@@ -11232,11 +12770,24 @@ declare class NottePersona {
|
|
|
11232
12770
|
*/
|
|
11233
12771
|
get(): Promise<PersonaResponseWithInternalEmail>;
|
|
11234
12772
|
/**
|
|
11235
|
-
*
|
|
12773
|
+
* Run a callback and automatically delete a persona created by this instance.
|
|
12774
|
+
* Personas loaded by an existing ID are retained after the callback finishes.
|
|
11236
12775
|
*/
|
|
11237
12776
|
use<T>(callback: (persona: NottePersona) => Promise<T>): Promise<T>;
|
|
11238
12777
|
}
|
|
11239
12778
|
|
|
12779
|
+
/**
|
|
12780
|
+
* If `response_format` is a Zod schema, convert it to JSON Schema for the API
|
|
12781
|
+
* and return the schema for later runtime validation of the agent's answer.
|
|
12782
|
+
* Mirrors the Zod handling on `session.scrape()`.
|
|
12783
|
+
*/
|
|
12784
|
+
declare function prepareAgentRequest<T = unknown>(data: AgentRunRequest & {
|
|
12785
|
+
response_format?: z.ZodSchema<T> | unknown | null;
|
|
12786
|
+
}): {
|
|
12787
|
+
apiData: AgentRunRequest;
|
|
12788
|
+
zodSchema: z.ZodSchema<T> | null;
|
|
12789
|
+
};
|
|
12790
|
+
declare function parseAgentStatusMessage(parsed: any, agentId: string): LegacyAgentStatusResponse | null;
|
|
11240
12791
|
interface AgentConstructorWithSession extends Omit<ApiAgentStartRequest, 'session_id' | 'vault_id' | 'persona_id' | 'task' | 'response_format' | 'url'> {
|
|
11241
12792
|
session: Session;
|
|
11242
12793
|
vault?: NotteVault;
|
|
@@ -11307,7 +12858,7 @@ declare class Agent {
|
|
|
11307
12858
|
/**
|
|
11308
12859
|
* Get agent status - mirrors Python status method
|
|
11309
12860
|
*/
|
|
11310
|
-
status(): Promise<LegacyAgentStatusResponse>;
|
|
12861
|
+
status(signal?: AbortSignal): Promise<LegacyAgentStatusResponse>;
|
|
11311
12862
|
/**
|
|
11312
12863
|
* Stop the agent - mirrors Python stop method
|
|
11313
12864
|
*/
|
|
@@ -11325,134 +12876,592 @@ declare class Agent {
|
|
|
11325
12876
|
*/
|
|
11326
12877
|
get sessionId(): string;
|
|
11327
12878
|
/**
|
|
11328
|
-
*
|
|
12879
|
+
* Whether `start()`/`run()` was called on this instance (or it was built from an agent id).
|
|
12880
|
+
* This is a local check and does not contact the API.
|
|
12881
|
+
*/
|
|
12882
|
+
hasStarted(): boolean;
|
|
12883
|
+
/**
|
|
12884
|
+
* Whether the agent is still active on the server. Fetches the current status,
|
|
12885
|
+
* like calling `agent.status()` in Python; an agent that was never started is not active.
|
|
12886
|
+
*/
|
|
12887
|
+
isActive(): Promise<boolean>;
|
|
12888
|
+
/**
|
|
12889
|
+
* @deprecated Only reports whether this instance was started; it does not
|
|
12890
|
+
* contact the API. Use `hasStarted()` for that check or `isActive()` for the
|
|
12891
|
+
* live server status.
|
|
11329
12892
|
*/
|
|
11330
12893
|
isRunning(): boolean;
|
|
11331
12894
|
}
|
|
11332
12895
|
|
|
11333
|
-
/**
|
|
11334
|
-
|
|
11335
|
-
|
|
12896
|
+
/** Default deadline of `run()`, the counterpart of `WorkflowsClient.WORKFLOW_RUN_TIMEOUT` (5 minutes). */
|
|
12897
|
+
declare const FUNCTION_RUN_TIMEOUT_MS: number;
|
|
12898
|
+
/**
|
|
12899
|
+
* Run endpoints that the OpenAPI spec does not describe. They are the Python
|
|
12900
|
+
* SDK's `WorkflowsClient.CREATE_WORKFLOW_RUN` and `START_WORKFLOW_RUN` paths
|
|
12901
|
+
* and are only ever called through `NotteFunction.postRunEndpoint()`.
|
|
12902
|
+
*/
|
|
12903
|
+
declare const FUNCTION_RUN_ENDPOINTS: {
|
|
12904
|
+
/** `POST` creates a run record without executing it (`CreateFunctionRunRequest`). */
|
|
12905
|
+
readonly create: "/functions/{function_id}/runs/create";
|
|
12906
|
+
/** `POST` executes a previously created run (`StartFunctionRunRequest`). */
|
|
12907
|
+
readonly start: "/functions/{function_id}/runs/{run_id}";
|
|
12908
|
+
};
|
|
12909
|
+
/**
|
|
12910
|
+
* The run endpoints hand the caller's key to the execution runtime through
|
|
12911
|
+
* this header (the `Authorization` header is not forwarded), so `run()` sends
|
|
12912
|
+
* it whenever the client holds a key, like `WorkflowsClient.run` in Python.
|
|
12913
|
+
* Proxy-mode clients have no key; their proxy must add the header itself.
|
|
12914
|
+
*/
|
|
12915
|
+
declare const RUN_API_KEY_HEADER = "x-notte-api-key";
|
|
12916
|
+
type FunctionRuntime = NonNullable<RunFunctionRequest['runtime']>;
|
|
12917
|
+
type FunctionRunStatus = GetFunctionRunResponse['status'];
|
|
12918
|
+
/** Reference an existing function by ID. */
|
|
12919
|
+
interface FunctionConstructorWithId {
|
|
12920
|
+
function_id: string;
|
|
12921
|
+
/** Key used to decrypt the download URL of Notte managed functions. */
|
|
12922
|
+
decryption_key?: string;
|
|
12923
|
+
path?: never;
|
|
12924
|
+
}
|
|
12925
|
+
/**
|
|
12926
|
+
* Create a function from a local `.py` file, like `client.Function(path=...)`
|
|
12927
|
+
* in Python. The upload happens on the first operation that needs the ID.
|
|
12928
|
+
*/
|
|
12929
|
+
interface FunctionConstructorCreate {
|
|
12930
|
+
/** Path to the python file containing the `run` function. Must end with `.py`. */
|
|
12931
|
+
path: string;
|
|
12932
|
+
name?: string | null;
|
|
12933
|
+
description?: string | null;
|
|
12934
|
+
/** Whether the function is public and shared with other users. Defaults to false. */
|
|
12935
|
+
shared?: boolean;
|
|
12936
|
+
decryption_key?: string;
|
|
12937
|
+
function_id?: never;
|
|
12938
|
+
}
|
|
12939
|
+
type FunctionConstructor = FunctionConstructorWithId | FunctionConstructorCreate;
|
|
12940
|
+
/** Result of executing a run, the counterpart of `FunctionRunResponse` in Python. */
|
|
12941
|
+
interface FunctionRunResult {
|
|
12942
|
+
function_id: string;
|
|
11336
12943
|
function_run_id: string;
|
|
11337
|
-
|
|
12944
|
+
session_id: string | null;
|
|
12945
|
+
/** The value returned by the script's `run` function, decoded from JSON. */
|
|
12946
|
+
result: unknown;
|
|
12947
|
+
status: FunctionRunStatus;
|
|
11338
12948
|
}
|
|
11339
|
-
|
|
12949
|
+
/** Alias of `FunctionRunResult` using the Python model name. */
|
|
12950
|
+
type FunctionRunResponse = FunctionRunResult;
|
|
12951
|
+
/** @deprecated `run()` now returns `FunctionRunResult` whether or not it streams. */
|
|
12952
|
+
type FunctionRunStartResult = FunctionRunResult;
|
|
12953
|
+
/** Run record returned by `createRun()`, the counterpart of `CreateFunctionRunResponse` in Python. */
|
|
12954
|
+
interface FunctionRunCreateResult {
|
|
11340
12955
|
function_id: string;
|
|
11341
|
-
|
|
12956
|
+
function_run_id: string;
|
|
12957
|
+
created_at: string;
|
|
12958
|
+
status: 'created';
|
|
11342
12959
|
}
|
|
11343
|
-
interface
|
|
11344
|
-
/**
|
|
12960
|
+
interface FunctionRunCreateOptions {
|
|
12961
|
+
/** Mark the record as a local run. Defaults to false; the Node SDK only executes on the cloud. */
|
|
12962
|
+
local?: boolean;
|
|
12963
|
+
}
|
|
12964
|
+
interface FunctionRunOptions {
|
|
12965
|
+
/** Stream logs and wait for completion. Defaults to true. */
|
|
12966
|
+
stream?: boolean;
|
|
12967
|
+
/** Receive streamed logs instead of printing them to console.log. */
|
|
12968
|
+
onLog?: (message: string) => void;
|
|
12969
|
+
/** Throw `FailedToRunCloudFunctionError` when execution fails. Defaults to true, matching Python. */
|
|
12970
|
+
raiseOnFailure?: boolean;
|
|
12971
|
+
/** Execute a record returned by createRun(). Omit to create a new run. */
|
|
12972
|
+
functionRunId?: string;
|
|
12973
|
+
/** Override the saved function runtime; omit to inherit its default. */
|
|
12974
|
+
runtime?: FunctionRuntime;
|
|
12975
|
+
/**
|
|
12976
|
+
* Deadline of the whole execution in milliseconds. The wait is aborted with
|
|
12977
|
+
* `NotteTimeoutError` once it elapses. Defaults to `FUNCTION_RUN_TIMEOUT_MS` (5 minutes).
|
|
12978
|
+
*/
|
|
12979
|
+
timeoutMs?: number;
|
|
12980
|
+
}
|
|
12981
|
+
interface FunctionGetOptions {
|
|
12982
|
+
/** Version to fetch. Defaults to the latest version. */
|
|
11345
12983
|
version?: string;
|
|
12984
|
+
}
|
|
12985
|
+
interface FunctionUrlOptions extends FunctionGetOptions {
|
|
11346
12986
|
/** Overrides the decryption key passed to the constructor. */
|
|
11347
12987
|
decryption_key?: string;
|
|
11348
12988
|
}
|
|
11349
12989
|
interface FunctionDownloadOptions extends FunctionUrlOptions {
|
|
11350
|
-
/**
|
|
12990
|
+
/** Optional local destination ending in `.py`. Source text is returned whether or not a path is supplied. */
|
|
12991
|
+
path?: string;
|
|
12992
|
+
}
|
|
12993
|
+
interface FunctionUpdateOptions {
|
|
12994
|
+
/** Path to the new python code. Must end with `.py`. */
|
|
11351
12995
|
path?: string;
|
|
12996
|
+
/** Only update this version. Defaults to creating a new version. */
|
|
12997
|
+
version?: string;
|
|
12998
|
+
/** Whether to restrict the function code. Defaults to true, like Python. */
|
|
12999
|
+
restricted?: boolean;
|
|
13000
|
+
}
|
|
13001
|
+
/** Metadata fields accepted by `PATCH /functions/{function_id}`. */
|
|
13002
|
+
type FunctionMetadataUpdateOptions = FunctionMetadataUpdateRequest;
|
|
13003
|
+
interface FunctionScheduleOptions {
|
|
13004
|
+
/** Cron expression of the schedule. */
|
|
13005
|
+
cron: FunctionScheduleCreateRequest['cron'];
|
|
13006
|
+
/** Variables passed to every scheduled run. */
|
|
13007
|
+
variables?: FunctionScheduleCreateRequest['variables'];
|
|
13008
|
+
}
|
|
13009
|
+
interface FunctionRollbackOptions extends FunctionRollbackRequest {
|
|
13010
|
+
/** Whether to restrict the function code. Defaults to true, like `update()`. */
|
|
13011
|
+
restricted?: boolean;
|
|
11352
13012
|
}
|
|
11353
13013
|
/**
|
|
11354
13014
|
* Query options for listing a function's runs: `page`, `page_size`,
|
|
11355
|
-
* `only_active`, `only_current_token`, `include_system`.
|
|
13015
|
+
* `only_active`, `only_current_token`, `include_system`, `source`.
|
|
11356
13016
|
*/
|
|
11357
13017
|
type FunctionRunListOptions = NonNullable<ListFunctionRunsByFunctionIdData['query']>;
|
|
11358
13018
|
/**
|
|
11359
|
-
*
|
|
13019
|
+
* Cloud function saved in the Notte console, the counterpart of
|
|
13020
|
+
* `notte.Function` in Python.
|
|
13021
|
+
*
|
|
13022
|
+
* ```ts
|
|
13023
|
+
* const fn = client.NotteFunction({ function_id: '<your-function-id>' });
|
|
13024
|
+
* const result = await fn.run({ url: 'https://example.com' });
|
|
13025
|
+
*
|
|
13026
|
+
* const created = client.NotteFunction({ path: './scraper.py', name: 'Scraper' });
|
|
13027
|
+
* await created.run(); // uploads scraper.py first
|
|
13028
|
+
* ```
|
|
11360
13029
|
*/
|
|
11361
13030
|
declare class NotteFunction {
|
|
11362
|
-
private client;
|
|
11363
|
-
|
|
13031
|
+
private readonly client;
|
|
13032
|
+
private _functionId;
|
|
13033
|
+
private initPromise;
|
|
13034
|
+
private createData;
|
|
11364
13035
|
readonly decryptionKey?: string;
|
|
11365
13036
|
constructor(client: NotteClient, options: FunctionConstructor);
|
|
13037
|
+
/** The function ID. Throws before a `path`-constructed function has been uploaded. */
|
|
13038
|
+
get functionId(): string;
|
|
13039
|
+
/** Alias of the `functionId` accessor. */
|
|
13040
|
+
getFunctionId(): string;
|
|
13041
|
+
private ensureInitialized;
|
|
13042
|
+
private createFunction;
|
|
13043
|
+
/**
|
|
13044
|
+
* Get the function metadata together with its download URL, the
|
|
13045
|
+
* counterpart of `client.functions.get()` in Python.
|
|
13046
|
+
*
|
|
13047
|
+
* @param options - Optional version selector; omitted means the latest version.
|
|
13048
|
+
* @returns Function metadata, version history, and the download link returned by the API.
|
|
13049
|
+
* @throws NotteAPIError if the function cannot be retrieved.
|
|
13050
|
+
* @example
|
|
13051
|
+
* const { latest_version, versions } = await fn.get();
|
|
13052
|
+
*/
|
|
13053
|
+
get(options?: FunctionGetOptions): Promise<FunctionWithLinkResponse>;
|
|
13054
|
+
/**
|
|
13055
|
+
* Upload a new version of the code, mirroring `function.update(path=...)`.
|
|
13056
|
+
*
|
|
13057
|
+
* @param options - Local Python file path, optional version, and code-access settings.
|
|
13058
|
+
* @returns Updated function metadata, including its latest version.
|
|
13059
|
+
* @throws InvalidRequestError if the path is missing or does not end in `.py`.
|
|
13060
|
+
* @throws NotteAPIError if the upload is rejected.
|
|
13061
|
+
* @example
|
|
13062
|
+
* const updated = await fn.update({ path: './scraper.py' });
|
|
13063
|
+
* console.log(updated.latest_version);
|
|
13064
|
+
*/
|
|
13065
|
+
update(options: FunctionUpdateOptions): Promise<FunctionResponse>;
|
|
13066
|
+
/**
|
|
13067
|
+
* Update the function metadata (name, description, default runtime, ...).
|
|
13068
|
+
*
|
|
13069
|
+
* @param options - Metadata fields to update, such as name, description, or default runtime.
|
|
13070
|
+
* @returns Updated function metadata.
|
|
13071
|
+
* @throws NotteAPIError if the metadata update is rejected.
|
|
13072
|
+
* @example
|
|
13073
|
+
* await fn.updateMetadata({ name: 'Price monitor', default_runtime: 'extended' });
|
|
13074
|
+
*/
|
|
13075
|
+
updateMetadata(options: FunctionMetadataUpdateOptions): Promise<FunctionResponse>;
|
|
13076
|
+
/**
|
|
13077
|
+
* Delete the function from the Notte console.
|
|
13078
|
+
*
|
|
13079
|
+
* @returns The API's function-deletion confirmation.
|
|
13080
|
+
* @throws NotteAPIError if the function cannot be deleted.
|
|
13081
|
+
* @example
|
|
13082
|
+
* await fn.delete();
|
|
13083
|
+
*/
|
|
13084
|
+
delete(): Promise<DeleteFunctionResponse>;
|
|
13085
|
+
/**
|
|
13086
|
+
* Schedule the function to run on a cron expression.
|
|
13087
|
+
*
|
|
13088
|
+
* @param options - Cron expression and optional variables passed to each scheduled execution.
|
|
13089
|
+
* @returns The saved schedule configuration.
|
|
13090
|
+
* @throws NotteAPIError if the schedule cannot be saved.
|
|
13091
|
+
* @example
|
|
13092
|
+
* await fn.setSchedule({ cron: '0 9 * * *', variables: { url: 'https://example.com' } });
|
|
13093
|
+
*/
|
|
13094
|
+
setSchedule(options: FunctionScheduleOptions): Promise<ScheduleResponse>;
|
|
13095
|
+
/**
|
|
13096
|
+
* Remove the function schedule.
|
|
13097
|
+
*
|
|
13098
|
+
* @returns The API's schedule-deletion confirmation.
|
|
13099
|
+
* @throws NotteAPIError if schedule deletion fails.
|
|
13100
|
+
* @example
|
|
13101
|
+
* await fn.deleteSchedule();
|
|
13102
|
+
*/
|
|
13103
|
+
deleteSchedule(): Promise<ScheduleDeleteResponse>;
|
|
13104
|
+
/**
|
|
13105
|
+
* Roll the function back to a previous version.
|
|
13106
|
+
*
|
|
13107
|
+
* @param options - Target version and optional code-access restriction, which defaults to true.
|
|
13108
|
+
* @returns Updated function metadata after rollback.
|
|
13109
|
+
* @throws NotteAPIError if the requested version cannot be restored.
|
|
13110
|
+
* @example
|
|
13111
|
+
* const { versions } = await fn.get();
|
|
13112
|
+
* await fn.rollback({ version: versions[0] });
|
|
13113
|
+
*/
|
|
13114
|
+
rollback(options: FunctionRollbackOptions): Promise<FunctionResponse>;
|
|
13115
|
+
/**
|
|
13116
|
+
* Get metadata for a specific function run.
|
|
13117
|
+
*
|
|
13118
|
+
* @param functionRunId - ID of a run belonging to this function.
|
|
13119
|
+
* @returns The run's current status, logs, and result metadata. This does not wait for completion.
|
|
13120
|
+
* @throws NotteAPIError if the run cannot be retrieved.
|
|
13121
|
+
* @example
|
|
13122
|
+
* const run = await fn.getRun(result.function_run_id);
|
|
13123
|
+
* console.log(run.status, run.logs);
|
|
13124
|
+
*/
|
|
13125
|
+
getRun(functionRunId: string): Promise<GetFunctionRunResponse>;
|
|
11366
13126
|
/**
|
|
11367
|
-
*
|
|
13127
|
+
* Compatibility alias for getRun().
|
|
13128
|
+
* @deprecated Use getRun() instead. Retained for backwards compatibility.
|
|
11368
13129
|
*/
|
|
11369
13130
|
retrieve(functionRunId: string): Promise<GetFunctionRunResponse>;
|
|
13131
|
+
/**
|
|
13132
|
+
* Create a cloud run record without starting execution, like
|
|
13133
|
+
* `function.create_run()` in Python. Use this only when you need the ID
|
|
13134
|
+
* before execution, then pass it to `run(variables, { functionRunId })`.
|
|
13135
|
+
* `run()` otherwise creates a new run on its own.
|
|
13136
|
+
*
|
|
13137
|
+
* @param options - Run-record settings; `local` defaults to false. Node execution remains cloud-only.
|
|
13138
|
+
* @returns A created run record and its ID. No function code has executed yet.
|
|
13139
|
+
* @throws NotteAPIError if run creation is rejected.
|
|
13140
|
+
* @example
|
|
13141
|
+
* const created = await fn.createRun();
|
|
13142
|
+
* const result = await fn.run({ url: 'https://example.com' }, { functionRunId: created.function_run_id });
|
|
13143
|
+
*/
|
|
13144
|
+
createRun(options?: FunctionRunCreateOptions): Promise<FunctionRunCreateResult>;
|
|
11370
13145
|
/**
|
|
11371
13146
|
* List the runs of this function.
|
|
11372
13147
|
*
|
|
11373
|
-
*
|
|
11374
|
-
*
|
|
11375
|
-
*
|
|
11376
|
-
*
|
|
11377
|
-
*
|
|
11378
|
-
*
|
|
11379
|
-
*
|
|
11380
|
-
*
|
|
11381
|
-
*
|
|
11382
|
-
* this endpoint yet".
|
|
11383
|
-
*
|
|
11384
|
-
* Sending it explicitly pins this method to the documented behaviour against
|
|
11385
|
-
* whichever API version it is talking to, including deployments that predate
|
|
11386
|
-
* the server-side change. Callers who want only in-flight runs pass
|
|
11387
|
-
* `only_active: true`.
|
|
13148
|
+
* Includes completed runs by default. Set `only_active: true` to retrieve
|
|
13149
|
+
* only in-flight runs. Use the response pagination metadata to request
|
|
13150
|
+
* additional pages.
|
|
13151
|
+
*
|
|
13152
|
+
* @param options - Pagination and filtering options. `only_active` defaults to false, including completed runs.
|
|
13153
|
+
* @returns One page of run records and pagination metadata; additional pages require another call.
|
|
13154
|
+
* @throws NotteAPIError if the run history cannot be retrieved.
|
|
13155
|
+
* @example
|
|
13156
|
+
* const { items } = await fn.runs({ page_size: 20 });
|
|
11388
13157
|
*/
|
|
11389
13158
|
runs(options?: FunctionRunListOptions): Promise<PaginatedResponseFunctionRunListItemResponse>;
|
|
11390
13159
|
/**
|
|
11391
|
-
*
|
|
13160
|
+
* Run the function on the cloud and wait for its result, streaming logs by
|
|
13161
|
+
* default like `function.run(**variables)` in Python.
|
|
13162
|
+
*
|
|
13163
|
+
* Pass `{ stream: false }` to receive the backend's JSON response without
|
|
13164
|
+
* live logs; execution still blocks until completion. Pass `functionRunId`
|
|
13165
|
+
* to execute a record returned by `createRun()`; otherwise a new run record
|
|
13166
|
+
* is created first, exactly like Python. A failed execution throws
|
|
13167
|
+
* `FailedToRunCloudFunctionError` unless `raiseOnFailure` is false, and the
|
|
13168
|
+
* wait is aborted with `NotteTimeoutError` after `timeoutMs`.
|
|
13169
|
+
*
|
|
13170
|
+
* @param variables - JSON-serializable keyword arguments passed to the Python function's `run` entry point.
|
|
13171
|
+
* @param options - Log streaming, failure handling, runtime, run ID, and timeout settings.
|
|
13172
|
+
* @returns The completed execution response. The function's return value is in `result`. Disabling streaming still waits for completion.
|
|
13173
|
+
* @throws FailedToRunCloudFunctionError if execution fails and `raiseOnFailure` is true.
|
|
13174
|
+
* @throws NotteTimeoutError if the execution request exceeds `timeoutMs`.
|
|
13175
|
+
* @throws InvalidRequestError if the run options are invalid.
|
|
13176
|
+
* @example
|
|
13177
|
+
* const result = await fn.run({ url: 'https://example.com' });
|
|
13178
|
+
* console.log(result.result);
|
|
13179
|
+
*
|
|
13180
|
+
* await fn.run({ url: 'https://example.com' }, { runtime: 'extended', onLog: line => logger.info(line) });
|
|
11392
13181
|
*/
|
|
11393
|
-
run(variables?: Record<string, unknown>, options?: FunctionRunOptions): Promise<
|
|
13182
|
+
run(variables?: Record<string, unknown>, options?: FunctionRunOptions): Promise<FunctionRunResult>;
|
|
11394
13183
|
/**
|
|
11395
13184
|
* Get the download URL of the function code, decrypting it when the API
|
|
11396
13185
|
* returns an encrypted one (Notte managed functions).
|
|
13186
|
+
*
|
|
13187
|
+
* @param options - Optional version and decryption-key override.
|
|
13188
|
+
* @returns An HTTP(S) URL for downloading the function source.
|
|
13189
|
+
* @throws InvalidRequestError if an encrypted URL has no usable decryption key.
|
|
13190
|
+
* @throws NotteError if decryption does not produce an HTTP(S) URL.
|
|
13191
|
+
* @example
|
|
13192
|
+
* const url = await fn.getUrl({ version: 'v1' });
|
|
11397
13193
|
*/
|
|
11398
13194
|
getUrl(options?: FunctionUrlOptions): Promise<string>;
|
|
11399
13195
|
/**
|
|
11400
13196
|
* Download the function code as a python file. Returns the code, and writes
|
|
11401
13197
|
* it to `path` when one is provided.
|
|
13198
|
+
*
|
|
13199
|
+
* @param options - Optional version, decryption key, and local `.py` destination path.
|
|
13200
|
+
* @returns The Python source text, including when a local destination is supplied.
|
|
13201
|
+
* @throws InvalidRequestError if the destination does not end in `.py` or the decryption key is invalid.
|
|
13202
|
+
* @throws NotteError if the source download fails. Local filesystem failures also propagate.
|
|
13203
|
+
* @example
|
|
13204
|
+
* const code = await fn.download({ path: './scraper.py' });
|
|
11402
13205
|
*/
|
|
11403
13206
|
download(options?: FunctionDownloadOptions): Promise<string>;
|
|
11404
13207
|
/**
|
|
11405
|
-
*
|
|
13208
|
+
* Call one of the run endpoints that the OpenAPI spec does not describe
|
|
13209
|
+
* (`FUNCTION_RUN_ENDPOINTS`). The generated client has no operation for
|
|
13210
|
+
* them, so this is the single place where they are hand-rolled; the request
|
|
13211
|
+
* and response shapes are transcribed from `notte_sdk.types`
|
|
13212
|
+
* (`CreateFunctionRunRequest` / `CreateFunctionRunResponse` and
|
|
13213
|
+
* `StartFunctionRunRequest` / `FunctionRunResponse`). Replace the callers
|
|
13214
|
+
* with generated operations once the spec exposes these paths.
|
|
11406
13215
|
*/
|
|
11407
|
-
|
|
13216
|
+
private postRunEndpoint;
|
|
11408
13217
|
}
|
|
11409
13218
|
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
}
|
|
11428
|
-
|
|
13219
|
+
/**
|
|
13220
|
+
* Options of `client.search()`: the `POST /search` body minus the query
|
|
13221
|
+
* itself (`q`). Extra fields such as `maxResults` or `includeDomains` are
|
|
13222
|
+
* forwarded to the search provider untouched.
|
|
13223
|
+
*/
|
|
13224
|
+
type SearchOptions = Omit<SearchRequest, 'q'>;
|
|
13225
|
+
/** One ranked hit of a `searchResults` search. */
|
|
13226
|
+
interface SearchResultItem {
|
|
13227
|
+
url: string;
|
|
13228
|
+
name: string;
|
|
13229
|
+
content: string;
|
|
13230
|
+
[key: string]: unknown;
|
|
13231
|
+
}
|
|
13232
|
+
/** Response of a search with `outputType: 'searchResults'` (the default). */
|
|
13233
|
+
interface SearchResultsResponse {
|
|
13234
|
+
results: SearchResultItem[];
|
|
13235
|
+
[key: string]: unknown;
|
|
13236
|
+
}
|
|
13237
|
+
/** One supporting source of a `sourcedAnswer` search. */
|
|
13238
|
+
interface SearchSource {
|
|
13239
|
+
url: string;
|
|
13240
|
+
name?: string;
|
|
13241
|
+
snippet?: string;
|
|
13242
|
+
[key: string]: unknown;
|
|
13243
|
+
}
|
|
13244
|
+
/** Response of a search with `outputType: 'sourcedAnswer'`. */
|
|
13245
|
+
interface SearchSourcedAnswerResponse {
|
|
13246
|
+
answer: string;
|
|
13247
|
+
sources: SearchSource[];
|
|
13248
|
+
[key: string]: unknown;
|
|
13249
|
+
}
|
|
13250
|
+
/** Response of a search with `outputType: 'structured'`: the caller-provided schema decides the shape. */
|
|
13251
|
+
type SearchStructuredResponse = Record<string, unknown>;
|
|
13252
|
+
/**
|
|
13253
|
+
* Union of every shape `POST /search` can answer with. The OpenAPI spec leaves
|
|
13254
|
+
* the response untyped; these interfaces follow the documented shapes at
|
|
13255
|
+
* https://docs.notte.cc/concepts/search#response-shapes.
|
|
13256
|
+
*/
|
|
13257
|
+
type SearchResponse = SearchResultsResponse | SearchSourcedAnswerResponse | SearchStructuredResponse;
|
|
13258
|
+
|
|
13259
|
+
/** Body of `POST /anything/start`: the natural-language description of the task. */
|
|
13260
|
+
type AnythingStartOptions = AnythingStartRequest;
|
|
13261
|
+
/**
|
|
13262
|
+
* Response of `POST /anything/start`. The OpenAPI spec declares the 200
|
|
13263
|
+
* response as an untyped JSON object (`{}`), so the SDK exposes it as an
|
|
13264
|
+
* opaque record. In practice the Anything API answers with a reference to the
|
|
13265
|
+
* function it built for the task (for example a `function_id`), which can then
|
|
13266
|
+
* be run through `client.NotteFunction({ function_id })`. Check the keys at
|
|
13267
|
+
* runtime rather than relying on a fixed shape.
|
|
13268
|
+
*/
|
|
13269
|
+
type AnythingStartResponse = Record<string, unknown>;
|
|
13270
|
+
/**
|
|
13271
|
+
* Anything API, the counterpart of `POST /anything/start`: turn a plain-English
|
|
13272
|
+
* description of a web task into a deployed, reusable function.
|
|
13273
|
+
*
|
|
13274
|
+
* ```ts
|
|
13275
|
+
* const started = await client.anything.start({ task: 'fetch the top 3 hacker news posts' });
|
|
13276
|
+
* console.log(started);
|
|
13277
|
+
* ```
|
|
13278
|
+
*/
|
|
13279
|
+
declare class NotteAnything {
|
|
11429
13280
|
private readonly client;
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
13281
|
+
constructor(client: NotteClient);
|
|
13282
|
+
/**
|
|
13283
|
+
* Start building a function for `task`. Building is slow (minutes) and
|
|
13284
|
+
* billable; prefer the marketplace (`client.functions.list()`) when a
|
|
13285
|
+
* ready-made function already fits.
|
|
13286
|
+
*
|
|
13287
|
+
* ```ts
|
|
13288
|
+
* const result = await client.anything.start({ task: 'get the weather in Paris' });
|
|
13289
|
+
* if (typeof result.function_id === 'string') {
|
|
13290
|
+
* const fn = client.NotteFunction({ function_id: result.function_id });
|
|
13291
|
+
* }
|
|
13292
|
+
* ```
|
|
13293
|
+
*
|
|
13294
|
+
* Rejects with a `NotteAPIError` when the API answers with a non-2xx status.
|
|
13295
|
+
*/
|
|
13296
|
+
start(body: AnythingStartOptions): Promise<AnythingStartResponse>;
|
|
11441
13297
|
}
|
|
11442
13298
|
|
|
13299
|
+
/** Options of `client.secrets.list()`: optionally filter by namespace. */
|
|
13300
|
+
type SecretListOptions = NonNullable<ListSecretsData['query']>;
|
|
13301
|
+
/** Body of `client.secrets.store()`. */
|
|
13302
|
+
type SecretStoreOptions = SecretStoreRequest;
|
|
13303
|
+
|
|
13304
|
+
/**
|
|
13305
|
+
* Workspace secrets store, the counterpart of the `/secrets` endpoints.
|
|
13306
|
+
* Secrets are scoped by namespace: `llm_provider` keys are used by agents and
|
|
13307
|
+
* scraping, `function_env` values are injected into function runs.
|
|
13308
|
+
*
|
|
13309
|
+
* ```ts
|
|
13310
|
+
* await client.secrets.store({ namespace: 'function_env', name: 'MY_TOKEN', value: 'xyz' });
|
|
13311
|
+
* const secrets = await client.secrets.list({ namespace: 'function_env' });
|
|
13312
|
+
* ```
|
|
13313
|
+
*/
|
|
13314
|
+
declare class NotteSecrets {
|
|
13315
|
+
private readonly client;
|
|
13316
|
+
constructor(client: NotteClient);
|
|
13317
|
+
/**
|
|
13318
|
+
* List secret metadata (never the values), optionally filtered by namespace.
|
|
13319
|
+
*
|
|
13320
|
+
* ```ts
|
|
13321
|
+
* const secrets = await client.secrets.list({ namespace: 'llm_provider' });
|
|
13322
|
+
* secrets.forEach(s => console.log(s.name, s.key_hint));
|
|
13323
|
+
* ```
|
|
13324
|
+
*/
|
|
13325
|
+
list(options?: SecretListOptions): Promise<SecretMetadata[]>;
|
|
13326
|
+
/**
|
|
13327
|
+
* Store (or overwrite) a secret and return its metadata.
|
|
13328
|
+
*
|
|
13329
|
+
* ```ts
|
|
13330
|
+
* const meta = await client.secrets.store({ namespace: 'function_env', name: 'API_TOKEN', value: 'xyz' });
|
|
13331
|
+
* console.log(meta.id, meta.key_hint);
|
|
13332
|
+
* ```
|
|
13333
|
+
*/
|
|
13334
|
+
store(body: SecretStoreOptions): Promise<SecretMetadata>;
|
|
13335
|
+
/**
|
|
13336
|
+
* Read the value of a secret by name within a namespace.
|
|
13337
|
+
*
|
|
13338
|
+
* ```ts
|
|
13339
|
+
* const { value } = await client.secrets.get('API_TOKEN', 'function_env');
|
|
13340
|
+
* ```
|
|
13341
|
+
*/
|
|
13342
|
+
get(name: string, namespace: SecretNamespace): Promise<SecretValueResponse>;
|
|
13343
|
+
/**
|
|
13344
|
+
* Delete a secret by id (the `id` field of `SecretMetadata`).
|
|
13345
|
+
*
|
|
13346
|
+
* ```ts
|
|
13347
|
+
* const meta = await client.secrets.store({ namespace: 'function_env', name: 'TMP', value: 'x' });
|
|
13348
|
+
* await client.secrets.delete(meta.id);
|
|
13349
|
+
* ```
|
|
13350
|
+
*/
|
|
13351
|
+
delete(secretId: string): Promise<void>;
|
|
13352
|
+
}
|
|
13353
|
+
|
|
13354
|
+
/** Options of `client.usage.get()`: the monthly period, e.g. `"May 2025"`. Defaults to the current month. */
|
|
13355
|
+
type UsageOptions = NonNullable<GetUsageData['query']>;
|
|
13356
|
+
/** Options of `client.usage.logs()`: endpoint filter and pagination. */
|
|
13357
|
+
type UsageLogsOptions = NonNullable<GetUsageLogsData['query']>;
|
|
13358
|
+
/** Endpoint names accepted by `UsageLogsOptions.endpoint`. */
|
|
13359
|
+
type UsageLogEndpoint = NonNullable<UsageLogsOptions['endpoint']>;
|
|
13360
|
+
|
|
13361
|
+
/**
|
|
13362
|
+
* Usage and billing, the counterpart of `GET /usage` and `GET /usage/logs`.
|
|
13363
|
+
*
|
|
13364
|
+
* ```ts
|
|
13365
|
+
* const usage = await client.usage.get();
|
|
13366
|
+
* console.log(usage.total_cost, usage.balance_amount);
|
|
13367
|
+
* ```
|
|
13368
|
+
*/
|
|
13369
|
+
declare class NotteUsage {
|
|
13370
|
+
private readonly client;
|
|
13371
|
+
constructor(client: NotteClient);
|
|
13372
|
+
/**
|
|
13373
|
+
* Usage summary for a monthly period (current month by default).
|
|
13374
|
+
*
|
|
13375
|
+
* ```ts
|
|
13376
|
+
* const usage = await client.usage.get({ period: 'May 2025' });
|
|
13377
|
+
* console.log(`${usage.session_count} sessions, $${usage.total_cost}`);
|
|
13378
|
+
* ```
|
|
13379
|
+
*/
|
|
13380
|
+
get(options?: UsageOptions): Promise<UsageResponse>;
|
|
13381
|
+
/**
|
|
13382
|
+
* Paginated per-request usage logs, optionally filtered by endpoint.
|
|
13383
|
+
*
|
|
13384
|
+
* ```ts
|
|
13385
|
+
* const page = await client.usage.logs({ endpoint: 'sessions.start', page: 1, page_size: 50 });
|
|
13386
|
+
* page.items.forEach(log => console.log(log.created_at, log.endpoint, log.duration_ms));
|
|
13387
|
+
* ```
|
|
13388
|
+
*/
|
|
13389
|
+
logs(options?: UsageLogsOptions): Promise<PaginatedResponseUsageLog>;
|
|
13390
|
+
}
|
|
13391
|
+
|
|
13392
|
+
declare const DEFAULT_NOTTE_API_URL = "https://api.notte.cc";
|
|
13393
|
+
declare const DEFAULT_REQUEST_TIMEOUT_MS = 60000;
|
|
13394
|
+
/**
|
|
13395
|
+
* Per-call header read by the client's request interceptor to override the
|
|
13396
|
+
* default request timeout. `0` disables the timeout (streaming responses).
|
|
13397
|
+
* The header is stripped before the request leaves the process.
|
|
13398
|
+
*/
|
|
13399
|
+
declare const TIMEOUT_HEADER = "x-notte-timeout-ms";
|
|
11443
13400
|
interface NotteClientConfig {
|
|
13401
|
+
/** API base URL. Defaults to `NOTTE_API_URL` or `https://api.notte.cc`. */
|
|
11444
13402
|
baseUrl?: string;
|
|
13403
|
+
/** API key. Defaults to `NOTTE_API_KEY`. Optional only for relative proxy base URLs. */
|
|
11445
13404
|
apiKey?: string;
|
|
13405
|
+
/** Default per-request timeout in milliseconds. Defaults to 60 000, like the Python SDK. */
|
|
13406
|
+
timeoutMs?: number;
|
|
13407
|
+
/** Maximum CAPTCHA wait in seconds, separate from each HTTP timeout. Defaults to 180. */
|
|
13408
|
+
captchaTimeoutSeconds?: number;
|
|
13409
|
+
/** Database preview branch. Defaults to `NOTTE_DB_PREVIEW_BRANCH`. Internal. */
|
|
13410
|
+
dbPreview?: string;
|
|
13411
|
+
/** Log every request like `NotteClient(verbose=True)` in Python. */
|
|
13412
|
+
verbose?: boolean;
|
|
11446
13413
|
}
|
|
13414
|
+
type SessionListOptions = NonNullable<ListSessionsData['query']>;
|
|
13415
|
+
type AgentListOptions = NonNullable<ListAgentsData['query']>;
|
|
13416
|
+
type VaultListOptions = NonNullable<ListVaultsData['query']>;
|
|
13417
|
+
type FunctionListOptions = NonNullable<ListFunctionsData['query']>;
|
|
13418
|
+
/** Options of `client.scrape()`: the global scrape request minus `url`, plus the SDK-only scrape options. */
|
|
13419
|
+
type GlobalScrapeOptions<T = unknown> = Omit<GlobalScrapeRequest, 'url' | 'response_format' | 'wait_for_authentication'> & ScrapeOptions<T> & {
|
|
13420
|
+
/** Whether to wait for Managed Auth before the scrape request completes. Defaults to true. Authentication failure or timeout can fail the scrape request. */
|
|
13421
|
+
wait_for_authentication?: boolean;
|
|
13422
|
+
};
|
|
13423
|
+
/** Entry point for sessions, agents, functions, vaults, personas, and session files. */
|
|
11447
13424
|
declare class NotteClient {
|
|
11448
|
-
private config;
|
|
13425
|
+
private readonly config;
|
|
13426
|
+
private readonly client;
|
|
13427
|
+
private readonly resources;
|
|
11449
13428
|
constructor(config?: NotteClientConfig);
|
|
13429
|
+
/**
|
|
13430
|
+
* Map the raw value the generated client rejects with into a `NotteError`.
|
|
13431
|
+
* HTTP failures become `NotteAPIError` (or `NotteAPIExecutionError` when the
|
|
13432
|
+
* API flags them), timeouts become `NotteTimeoutError`, anything else is
|
|
13433
|
+
* returned untouched.
|
|
13434
|
+
*/
|
|
13435
|
+
private toTypedError;
|
|
13436
|
+
/**
|
|
13437
|
+
* Add the database preview branch to a websocket URL served by the Notte API.
|
|
13438
|
+
* The websocket handshake reads the branch from the query string, so without
|
|
13439
|
+
* it a preview-branch session is looked up in the default database.
|
|
13440
|
+
*/
|
|
13441
|
+
withDbPreview(url: string): string;
|
|
13442
|
+
/**
|
|
13443
|
+
* Health check the Notte API. Resolves when the API answers 200 and rejects
|
|
13444
|
+
* with a `NotteAPIError` (or a network error) otherwise.
|
|
13445
|
+
*/
|
|
13446
|
+
healthCheck(): Promise<void>;
|
|
11450
13447
|
/**
|
|
11451
13448
|
* Create a new session
|
|
11452
13449
|
*/
|
|
11453
13450
|
Session(options?: SessionOptions): Session;
|
|
11454
13451
|
/** Access files owned by a specific session, including closed sessions. */
|
|
11455
13452
|
Files(sessionId: string): SessionFiles;
|
|
13453
|
+
/**
|
|
13454
|
+
* File storage to attach to a session, the counterpart of `client.FileStorage()`.
|
|
13455
|
+
*
|
|
13456
|
+
* ```ts
|
|
13457
|
+
* const storage = client.FileStorage();
|
|
13458
|
+
* await client.Session({ storage }).use(async session => {
|
|
13459
|
+
* await storage.upload('./invoice.pdf');
|
|
13460
|
+
* const files = await storage.list({ source: 'session_download' });
|
|
13461
|
+
* });
|
|
13462
|
+
* ```
|
|
13463
|
+
*/
|
|
13464
|
+
FileStorage(sessionId?: string): RemoteFileStorage;
|
|
11456
13465
|
/**
|
|
11457
13466
|
* Create a new agent
|
|
11458
13467
|
*/
|
|
@@ -11469,24 +13478,282 @@ declare class NotteClient {
|
|
|
11469
13478
|
* Create or access a function
|
|
11470
13479
|
*/
|
|
11471
13480
|
NotteFunction(options: FunctionConstructor): NotteFunction;
|
|
13481
|
+
/** Alias of `NotteFunction`, matching `client.Function` in Python. */
|
|
13482
|
+
Function(options: FunctionConstructor): NotteFunction;
|
|
13483
|
+
/** Client-bound session API operations. `list()` retains its array return value. */
|
|
13484
|
+
get sessions(): {
|
|
13485
|
+
list: (options?: SessionListOptions) => Promise<AuthSessionResponse[]>;
|
|
13486
|
+
authReadiness: (sessionId: SessionAuthReadinessData["path"]["session_id"], requestOptions?: ResourceRequestOptions & {
|
|
13487
|
+
headers?: Omit<NonNullable<SessionAuthReadinessData["headers"]>, "x-notte-api-key">;
|
|
13488
|
+
}) => Promise<ManagedAuthReadiness>;
|
|
13489
|
+
createPayment: (sessionId: CreatePaymentData["path"]["session_id"], body: CreatePaymentData["body"], query: CreatePaymentData["query"], requestOptions: ResourceRequestOptions & {
|
|
13490
|
+
headers: Omit<NonNullable<CreatePaymentData["headers"]>, "x-notte-api-key">;
|
|
13491
|
+
}) => Promise<PaymentResponse>;
|
|
13492
|
+
debugInfo: (sessionId: SessionDebugInfoData["path"]["session_id"], query?: SessionDebugInfoData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13493
|
+
headers?: Omit<NonNullable<SessionDebugInfoData["headers"]>, "x-notte-api-key">;
|
|
13494
|
+
}) => Promise<SessionDebugResponse>;
|
|
13495
|
+
deleteSessionFile: (sessionId: DeleteSessionFileData["path"]["session_id"], fileId: DeleteSessionFileData["path"]["file_id"], requestOptions?: ResourceRequestOptions & {
|
|
13496
|
+
headers?: Omit<NonNullable<DeleteSessionFileData["headers"]>, "x-notte-api-key">;
|
|
13497
|
+
}) => Promise<void>;
|
|
13498
|
+
downloadSessionFile: (sessionId: DownloadSessionFileData["path"]["session_id"], fileId: DownloadSessionFileData["path"]["file_id"], requestOptions?: ResourceRequestOptions & {
|
|
13499
|
+
headers?: Omit<NonNullable<DownloadSessionFileData["headers"]>, "x-notte-api-key">;
|
|
13500
|
+
}) => Promise<unknown>;
|
|
13501
|
+
execute: (sessionId: PageExecuteData["path"]["session_id"], body: PageExecuteData["body"], query?: PageExecuteData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13502
|
+
headers?: Omit<NonNullable<PageExecuteData["headers"]>, "x-notte-api-key">;
|
|
13503
|
+
}) => Promise<ApiExecutionResponse>;
|
|
13504
|
+
getCookies: (sessionId: SessionCookiesGetData["path"]["session_id"], query?: SessionCookiesGetData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13505
|
+
headers?: Omit<NonNullable<SessionCookiesGetData["headers"]>, "x-notte-api-key">;
|
|
13506
|
+
}) => Promise<GetCookiesResponse>;
|
|
13507
|
+
getSessionScript: (sessionId: GetSessionScriptData["path"]["session_id"], query: GetSessionScriptData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13508
|
+
headers?: Omit<NonNullable<GetSessionScriptData["headers"]>, "x-notte-api-key">;
|
|
13509
|
+
}) => Promise<AgentFunctionCodeResponse>;
|
|
13510
|
+
listSessionFiles: (sessionId: ListSessionFilesData["path"]["session_id"], query?: ListSessionFilesData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13511
|
+
headers?: Omit<NonNullable<ListSessionFilesData["headers"]>, "x-notte-api-key">;
|
|
13512
|
+
}) => Promise<SessionFilesPage>;
|
|
13513
|
+
networkLogs: (sessionId: SessionNetworkLogsData["path"]["session_id"], query?: SessionNetworkLogsData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13514
|
+
headers?: Omit<NonNullable<SessionNetworkLogsData["headers"]>, "x-notte-api-key">;
|
|
13515
|
+
}) => Promise<NetworkLogsResponse>;
|
|
13516
|
+
observe: (sessionId: PageObserveData["path"]["session_id"], body: PageObserveData["body"], query?: PageObserveData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13517
|
+
headers?: Omit<NonNullable<PageObserveData["headers"]>, "x-notte-api-key">;
|
|
13518
|
+
}) => Promise<Observation>;
|
|
13519
|
+
offset: (sessionId: SessionOffsetData["path"]["session_id"], requestOptions?: ResourceRequestOptions & {
|
|
13520
|
+
headers?: Omit<NonNullable<SessionOffsetData["headers"]>, "x-notte-api-key">;
|
|
13521
|
+
}) => Promise<SessionOffsetResponse>;
|
|
13522
|
+
pageScreenshot: (sessionId: PageScreenshotData["path"]["session_id"], query?: PageScreenshotData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13523
|
+
headers?: Omit<NonNullable<PageScreenshotData["headers"]>, "x-notte-api-key">;
|
|
13524
|
+
}) => Promise<unknown>;
|
|
13525
|
+
profilePreview: (sessionId: SessionProfilePreviewData["path"]["session_id"], query?: SessionProfilePreviewData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13526
|
+
headers?: Omit<NonNullable<SessionProfilePreviewData["headers"]>, "x-notte-api-key">;
|
|
13527
|
+
}) => Promise<SessionProfilePreviewResponse>;
|
|
13528
|
+
replay: (sessionId: SessionReplayData["path"]["session_id"], requestOptions?: ResourceRequestOptions & {
|
|
13529
|
+
headers?: Omit<NonNullable<SessionReplayData["headers"]>, "x-notte-api-key">;
|
|
13530
|
+
}) => Promise<ReplayResponse>;
|
|
13531
|
+
scrape: (sessionId: PageScrapeData["path"]["session_id"], body: PageScrapeData["body"], query?: PageScrapeData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13532
|
+
headers?: Omit<NonNullable<PageScrapeData["headers"]>, "x-notte-api-key">;
|
|
13533
|
+
}) => Promise<DataSpace>;
|
|
13534
|
+
setCookies: (sessionId: SessionCookiesSetData["path"]["session_id"], body: SessionCookiesSetData["body"], query?: SessionCookiesSetData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13535
|
+
headers?: Omit<NonNullable<SessionCookiesSetData["headers"]>, "x-notte-api-key">;
|
|
13536
|
+
}) => Promise<ExecutionResponse>;
|
|
13537
|
+
start: (body: SessionStartData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13538
|
+
headers?: Omit<NonNullable<SessionStartData["headers"]>, "x-notte-api-key">;
|
|
13539
|
+
}) => Promise<SessionResponse>;
|
|
13540
|
+
status: (sessionId: SessionStatusData["path"]["session_id"], requestOptions?: ResourceRequestOptions & {
|
|
13541
|
+
headers?: Omit<NonNullable<SessionStatusData["headers"]>, "x-notte-api-key">;
|
|
13542
|
+
}) => Promise<SessionResponse>;
|
|
13543
|
+
stop: (sessionId: SessionStopData["path"]["session_id"], query?: SessionStopData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13544
|
+
headers?: Omit<NonNullable<SessionStopData["headers"]>, "x-notte-api-key">;
|
|
13545
|
+
}) => Promise<SessionResponse>;
|
|
13546
|
+
uploadSessionFile: (sessionId: UploadSessionFileData["path"]["session_id"], body: UploadSessionFileData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13547
|
+
headers?: Omit<NonNullable<UploadSessionFileData["headers"]>, "x-notte-api-key">;
|
|
13548
|
+
}) => Promise<SessionFile>;
|
|
13549
|
+
};
|
|
13550
|
+
/** Client-bound agent API operations. `list()` retains its array return value. */
|
|
13551
|
+
get agents(): {
|
|
13552
|
+
list: (options?: AgentListOptions) => Promise<AgentResponse[]>;
|
|
13553
|
+
getScript: (agentId: GetScriptData["path"]["agent_id"], query: GetScriptData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13554
|
+
headers?: Omit<NonNullable<GetScriptData["headers"]>, "x-notte-api-key">;
|
|
13555
|
+
}) => Promise<AgentFunctionCodeResponse>;
|
|
13556
|
+
start: (body: AgentStartData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13557
|
+
headers?: Omit<NonNullable<AgentStartData["headers"]>, "x-notte-api-key">;
|
|
13558
|
+
}) => Promise<AgentResponse>;
|
|
13559
|
+
status: (agentId: AgentStatusData["path"]["agent_id"], requestOptions?: ResourceRequestOptions & {
|
|
13560
|
+
headers?: Omit<NonNullable<AgentStatusData["headers"]>, "x-notte-api-key">;
|
|
13561
|
+
}) => Promise<LegacyAgentStatusResponse>;
|
|
13562
|
+
stop: (agentId: AgentStopData["path"]["agent_id"], query: AgentStopData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13563
|
+
headers?: Omit<NonNullable<AgentStopData["headers"]>, "x-notte-api-key">;
|
|
13564
|
+
}) => Promise<AgentStatusResponse>;
|
|
13565
|
+
};
|
|
13566
|
+
/** Client-bound vault API operations. `list()` retains its array return value. */
|
|
13567
|
+
get vaults(): {
|
|
13568
|
+
list: (options?: VaultListOptions) => Promise<Vault[]>;
|
|
13569
|
+
create: (body: VaultCreateData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13570
|
+
headers?: Omit<NonNullable<VaultCreateData["headers"]>, "x-notte-api-key">;
|
|
13571
|
+
}) => Promise<Vault>;
|
|
13572
|
+
credentialsAdd: (vaultId: VaultCredentialsAddData["path"]["vault_id"], body: VaultCredentialsAddData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13573
|
+
headers?: Omit<NonNullable<VaultCredentialsAddData["headers"]>, "x-notte-api-key">;
|
|
13574
|
+
}) => Promise<AddCredentialsResponse>;
|
|
13575
|
+
credentialsDelete: (vaultId: VaultCredentialsDeleteData["path"]["vault_id"], query: VaultCredentialsDeleteData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13576
|
+
headers?: Omit<NonNullable<VaultCredentialsDeleteData["headers"]>, "x-notte-api-key">;
|
|
13577
|
+
}) => Promise<DeleteCredentialsResponse>;
|
|
13578
|
+
credentialsGet: (vaultId: VaultCredentialsGetData["path"]["vault_id"], query: VaultCredentialsGetData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13579
|
+
headers?: Omit<NonNullable<VaultCredentialsGetData["headers"]>, "x-notte-api-key">;
|
|
13580
|
+
}) => Promise<GetCredentialsResponse>;
|
|
13581
|
+
credentialsList: (vaultId: VaultCredentialsListData["path"]["vault_id"], requestOptions?: ResourceRequestOptions & {
|
|
13582
|
+
headers?: Omit<NonNullable<VaultCredentialsListData["headers"]>, "x-notte-api-key">;
|
|
13583
|
+
}) => Promise<ListCredentialsResponse>;
|
|
13584
|
+
creditCardDelete: (vaultId: VaultCreditCardDeleteData["path"]["vault_id"], requestOptions?: ResourceRequestOptions & {
|
|
13585
|
+
headers?: Omit<NonNullable<VaultCreditCardDeleteData["headers"]>, "x-notte-api-key">;
|
|
13586
|
+
}) => Promise<DeleteCreditCardResponse>;
|
|
13587
|
+
creditCardGet: (vaultId: VaultCreditCardGetData["path"]["vault_id"], requestOptions?: ResourceRequestOptions & {
|
|
13588
|
+
headers?: Omit<NonNullable<VaultCreditCardGetData["headers"]>, "x-notte-api-key">;
|
|
13589
|
+
}) => Promise<GetCreditCardResponse>;
|
|
13590
|
+
creditCardSet: (vaultId: VaultCreditCardSetData["path"]["vault_id"], body: VaultCreditCardSetData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13591
|
+
headers?: Omit<NonNullable<VaultCreditCardSetData["headers"]>, "x-notte-api-key">;
|
|
13592
|
+
}) => Promise<AddCreditCardResponse>;
|
|
13593
|
+
delete: (vaultId: VaultDeleteData["path"]["vault_id"], requestOptions?: ResourceRequestOptions & {
|
|
13594
|
+
headers?: Omit<NonNullable<VaultDeleteData["headers"]>, "x-notte-api-key">;
|
|
13595
|
+
}) => Promise<DeleteVaultResponse>;
|
|
13596
|
+
update: (vaultId: VaultUpdateData["path"]["vault_id"], body: VaultUpdateData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13597
|
+
headers?: Omit<NonNullable<VaultUpdateData["headers"]>, "x-notte-api-key">;
|
|
13598
|
+
}) => Promise<Vault>;
|
|
13599
|
+
};
|
|
13600
|
+
/** Client-bound function API operations. `list()` retains its array return value. */
|
|
13601
|
+
get functions(): {
|
|
13602
|
+
list: (options?: FunctionListOptions) => Promise<FunctionListItemResponse[]>;
|
|
13603
|
+
create: (body: FunctionCreateData["body"], query?: FunctionCreateData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13604
|
+
headers?: Omit<NonNullable<FunctionCreateData["headers"]>, "x-notte-api-key">;
|
|
13605
|
+
}) => Promise<FunctionResponse>;
|
|
13606
|
+
delete: (functionId: FunctionDeleteData["path"]["function_id"], requestOptions?: ResourceRequestOptions & {
|
|
13607
|
+
headers?: Omit<NonNullable<FunctionDeleteData["headers"]>, "x-notte-api-key">;
|
|
13608
|
+
}) => Promise<DeleteFunctionResponse>;
|
|
13609
|
+
deleteSchedule: (functionId: FunctionScheduleDeleteData["path"]["function_id"], requestOptions?: ResourceRequestOptions & {
|
|
13610
|
+
headers?: Omit<NonNullable<FunctionScheduleDeleteData["headers"]>, "x-notte-api-key">;
|
|
13611
|
+
}) => Promise<ScheduleDeleteResponse>;
|
|
13612
|
+
downloadUrl: (functionId: FunctionDownloadUrlData["path"]["function_id"], query?: FunctionDownloadUrlData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13613
|
+
headers?: Omit<NonNullable<FunctionDownloadUrlData["headers"]>, "x-notte-api-key">;
|
|
13614
|
+
}) => Promise<FunctionWithLinkResponse>;
|
|
13615
|
+
fork: (functionId: FunctionForkData["path"]["function_id"], requestOptions?: ResourceRequestOptions & {
|
|
13616
|
+
headers?: Omit<NonNullable<FunctionForkData["headers"]>, "x-notte-api-key">;
|
|
13617
|
+
}) => Promise<FunctionResponse>;
|
|
13618
|
+
listRuns: (functionId: ListFunctionRunsByFunctionIdData["path"]["function_id"], query?: ListFunctionRunsByFunctionIdData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13619
|
+
headers?: Omit<NonNullable<ListFunctionRunsByFunctionIdData["headers"]>, "x-notte-api-key">;
|
|
13620
|
+
}) => Promise<PaginatedResponseFunctionRunListItemResponse>;
|
|
13621
|
+
metadataUpdate: (functionId: FunctionMetadataUpdateData["path"]["function_id"], body: FunctionMetadataUpdateData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13622
|
+
headers?: Omit<NonNullable<FunctionMetadataUpdateData["headers"]>, "x-notte-api-key">;
|
|
13623
|
+
}) => Promise<FunctionResponse>;
|
|
13624
|
+
rollback: (functionId: FunctionRollbackData["path"]["function_id"], body: FunctionRollbackData["body"], query?: FunctionRollbackData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13625
|
+
headers?: Omit<NonNullable<FunctionRollbackData["headers"]>, "x-notte-api-key">;
|
|
13626
|
+
}) => Promise<FunctionResponse>;
|
|
13627
|
+
runGetMetadata: (functionId: FunctionRunGetMetadataData["path"]["function_id"], runId: FunctionRunGetMetadataData["path"]["run_id"], requestOptions?: ResourceRequestOptions & {
|
|
13628
|
+
headers?: Omit<NonNullable<FunctionRunGetMetadataData["headers"]>, "x-notte-api-key">;
|
|
13629
|
+
}) => Promise<GetFunctionRunResponse>;
|
|
13630
|
+
runStart: (functionId: FunctionRunStartData["path"]["function_id"], body: FunctionRunStartData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13631
|
+
headers?: Omit<NonNullable<FunctionRunStartData["headers"]>, "x-notte-api-key">;
|
|
13632
|
+
}) => Promise<unknown>;
|
|
13633
|
+
runStop: (functionId: FunctionRunStopData["path"]["function_id"], runId: FunctionRunStopData["path"]["run_id"], requestOptions?: ResourceRequestOptions & {
|
|
13634
|
+
headers?: Omit<NonNullable<FunctionRunStopData["headers"]>, "x-notte-api-key">;
|
|
13635
|
+
}) => Promise<UpdateFunctionRunResponse>;
|
|
13636
|
+
runUpdateMetadata: (functionId: FunctionRunUpdateMetadataData["path"]["function_id"], runId: FunctionRunUpdateMetadataData["path"]["run_id"], body: FunctionRunUpdateMetadataData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13637
|
+
headers?: Omit<NonNullable<FunctionRunUpdateMetadataData["headers"]>, "x-notte-api-key">;
|
|
13638
|
+
}) => Promise<UpdateFunctionRunResponse>;
|
|
13639
|
+
runtimeHealth: (requestOptions?: ResourceRequestOptions & {
|
|
13640
|
+
headers?: Omit<NonNullable<FunctionRuntimeHealthData["headers"]>, "x-notte-api-key">;
|
|
13641
|
+
}) => Promise<FunctionRuntimeHealthResponse>;
|
|
13642
|
+
setSchedule: (functionId: FunctionScheduleSetData["path"]["function_id"], body: FunctionScheduleSetData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13643
|
+
headers?: Omit<NonNullable<FunctionScheduleSetData["headers"]>, "x-notte-api-key">;
|
|
13644
|
+
}) => Promise<ScheduleResponse>;
|
|
13645
|
+
update: (functionId: FunctionUpdateData["path"]["function_id"], body: FunctionUpdateData["body"], query?: FunctionUpdateData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13646
|
+
headers?: Omit<NonNullable<FunctionUpdateData["headers"]>, "x-notte-api-key">;
|
|
13647
|
+
}) => Promise<FunctionResponse>;
|
|
13648
|
+
};
|
|
13649
|
+
/**
|
|
13650
|
+
* Search the public web (`POST /search`). Returns ranked results by default,
|
|
13651
|
+
* an answer with sources with `outputType: 'sourcedAnswer'`, or structured
|
|
13652
|
+
* output with `outputType: 'structured'`.
|
|
13653
|
+
*
|
|
13654
|
+
* ```ts
|
|
13655
|
+
* import { NotteClient } from 'notte-sdk';
|
|
13656
|
+
*
|
|
13657
|
+
* const client = new NotteClient();
|
|
13658
|
+
* const { results } = await client.search('notte browser agents');
|
|
13659
|
+
* const { answer } = await client.search('what is notte?', { outputType: 'sourcedAnswer' });
|
|
13660
|
+
* ```
|
|
13661
|
+
*/
|
|
13662
|
+
search(query: string, options?: SearchOptions & {
|
|
13663
|
+
outputType?: 'searchResults';
|
|
13664
|
+
}): Promise<SearchResultsResponse>;
|
|
13665
|
+
search(query: string, options: SearchOptions & {
|
|
13666
|
+
outputType: 'sourcedAnswer';
|
|
13667
|
+
}): Promise<SearchSourcedAnswerResponse>;
|
|
13668
|
+
search(query: string, options: SearchOptions & {
|
|
13669
|
+
outputType: 'structured';
|
|
13670
|
+
}): Promise<SearchStructuredResponse>;
|
|
13671
|
+
search(query: string, options: SearchOptions): Promise<SearchResponse>;
|
|
13672
|
+
/** Anything API (`POST /anything/start`). */
|
|
13673
|
+
get anything(): NotteAnything;
|
|
13674
|
+
/** Workspace secrets (`/secrets`). */
|
|
13675
|
+
get secrets(): NotteSecrets;
|
|
13676
|
+
/** Managed authentication: verify connections, request login, and wait for readiness. */
|
|
13677
|
+
get managedAuth(): NotteManagedAuth;
|
|
13678
|
+
/** Usage and billing (`/usage`, `/usage/logs`). */
|
|
13679
|
+
get usage(): NotteUsage;
|
|
11472
13680
|
/**
|
|
11473
13681
|
* Personas client for listing and managing personas
|
|
11474
13682
|
*/
|
|
11475
13683
|
get personas(): {
|
|
11476
13684
|
list: (options?: PersonaListOptions) => Promise<PersonaResponse[]>;
|
|
13685
|
+
create: (body: PersonaCreateData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13686
|
+
headers?: Omit<NonNullable<PersonaCreateData["headers"]>, "x-notte-api-key">;
|
|
13687
|
+
}) => Promise<PersonaResponse>;
|
|
13688
|
+
delete: (personaId: PersonaDeleteData["path"]["persona_id"], requestOptions?: ResourceRequestOptions & {
|
|
13689
|
+
headers?: Omit<NonNullable<PersonaDeleteData["headers"]>, "x-notte-api-key">;
|
|
13690
|
+
}) => Promise<DeletePersonaResponse>;
|
|
13691
|
+
emailsList: (personaId: PersonaEmailsListData["path"]["persona_id"], query?: PersonaEmailsListData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13692
|
+
headers?: Omit<NonNullable<PersonaEmailsListData["headers"]>, "x-notte-api-key">;
|
|
13693
|
+
}) => Promise<EmailResponse[]>;
|
|
13694
|
+
get: (personaId: PersonaGetData["path"]["persona_id"], requestOptions?: ResourceRequestOptions & {
|
|
13695
|
+
headers?: Omit<NonNullable<PersonaGetData["headers"]>, "x-notte-api-key">;
|
|
13696
|
+
}) => Promise<PersonaResponse>;
|
|
13697
|
+
smsList: (personaId: PersonaSmsListData["path"]["persona_id"], query?: PersonaSmsListData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13698
|
+
headers?: Omit<NonNullable<PersonaSmsListData["headers"]>, "x-notte-api-key">;
|
|
13699
|
+
}) => Promise<SmsResponse[]>;
|
|
13700
|
+
update: (personaId: PersonaUpdateData["path"]["persona_id"], body: PersonaUpdateData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13701
|
+
headers?: Omit<NonNullable<PersonaUpdateData["headers"]>, "x-notte-api-key">;
|
|
13702
|
+
}) => Promise<PersonaResponse>;
|
|
11477
13703
|
};
|
|
11478
13704
|
/**
|
|
11479
13705
|
* Get the configured client instance
|
|
11480
13706
|
*/
|
|
11481
13707
|
getClient(): Client;
|
|
11482
|
-
/**
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
13708
|
+
/** Client-bound profile API operations, generated from OpenAPI. */
|
|
13709
|
+
get profiles(): {
|
|
13710
|
+
cookiesGet: (profileId: ProfileCookiesGetData["path"]["profile_id"], requestOptions?: ResourceRequestOptions & {
|
|
13711
|
+
headers?: Omit<NonNullable<ProfileCookiesGetData["headers"]>, "x-notte-api-key">;
|
|
13712
|
+
}) => Promise<GetCookiesResponse>;
|
|
13713
|
+
cookiesSet: (profileId: ProfileCookiesSetData["path"]["profile_id"], body: ProfileCookiesSetData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13714
|
+
headers?: Omit<NonNullable<ProfileCookiesSetData["headers"]>, "x-notte-api-key">;
|
|
13715
|
+
}) => Promise<ProfileCookiesImportResponse>;
|
|
13716
|
+
create: (body: ProfileCreateData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13717
|
+
headers?: Omit<NonNullable<ProfileCreateData["headers"]>, "x-notte-api-key">;
|
|
13718
|
+
}) => Promise<ProfileResponse>;
|
|
13719
|
+
delete: (profileId: ProfileDeleteData["path"]["profile_id"], requestOptions?: ResourceRequestOptions & {
|
|
13720
|
+
headers?: Omit<NonNullable<ProfileDeleteData["headers"]>, "x-notte-api-key">;
|
|
13721
|
+
}) => Promise<ProfileDeleteResponse>;
|
|
13722
|
+
duplicate: (profileId: ProfileDuplicateData["path"]["profile_id"], body: ProfileDuplicateData["body"], requestOptions?: ResourceRequestOptions & {
|
|
13723
|
+
headers?: Omit<NonNullable<ProfileDuplicateData["headers"]>, "x-notte-api-key">;
|
|
13724
|
+
}) => Promise<ProfileResponse>;
|
|
13725
|
+
get: (profileId: ProfileGetData["path"]["profile_id"], requestOptions?: ResourceRequestOptions & {
|
|
13726
|
+
headers?: Omit<NonNullable<ProfileGetData["headers"]>, "x-notte-api-key">;
|
|
13727
|
+
}) => Promise<ProfileResponse>;
|
|
13728
|
+
list: (query?: ProfileListData["query"], requestOptions?: ResourceRequestOptions & {
|
|
13729
|
+
headers?: Omit<NonNullable<ProfileListData["headers"]>, "x-notte-api-key">;
|
|
13730
|
+
}) => Promise<PaginatedResponseProfileResponse>;
|
|
13731
|
+
};
|
|
13732
|
+
/**
|
|
13733
|
+
* Scrape a webpage directly (without session).
|
|
13734
|
+
*
|
|
13735
|
+
* ```ts
|
|
13736
|
+
* const markdown = await client.scrape('https://www.notte.cc', { only_main_content: true });
|
|
13737
|
+
* const product = await client.scrape('https://www.notte.cc', { response_format: Product, instructions: 'Extract the product' });
|
|
13738
|
+
* ```
|
|
13739
|
+
*
|
|
13740
|
+
* With `response_format` or `instructions`, the extracted data is returned
|
|
13741
|
+
* directly and a failed extraction throws `ScrapeFailedError`. Pass
|
|
13742
|
+
* `raiseOnFailure: false` to receive the `StructuredData` wrapper instead.
|
|
13743
|
+
*/
|
|
13744
|
+
scrape(url: string, options?: GlobalScrapeOptions<unknown> & {
|
|
13745
|
+
response_format?: undefined;
|
|
13746
|
+
instructions?: undefined | null;
|
|
13747
|
+
}): Promise<string>;
|
|
13748
|
+
scrape<T>(url: string, options: GlobalScrapeOptions<T> & {
|
|
13749
|
+
response_format: ZodLikeSchema<T>;
|
|
13750
|
+
raiseOnFailure?: true;
|
|
11489
13751
|
}): Promise<T>;
|
|
13752
|
+
scrape<T>(url: string, options: GlobalScrapeOptions<T> & {
|
|
13753
|
+
response_format: ZodLikeSchema<T>;
|
|
13754
|
+
raiseOnFailure: false;
|
|
13755
|
+
}): Promise<StructuredData<T>>;
|
|
13756
|
+
scrape(url: string, options: GlobalScrapeOptions<unknown>): Promise<ScrapeResult<unknown>>;
|
|
11490
13757
|
/**
|
|
11491
13758
|
* Get the client configuration
|
|
11492
13759
|
*/
|
|
@@ -11506,9 +13773,17 @@ declare class Encryption {
|
|
|
11506
13773
|
decrypt(token: string): string;
|
|
11507
13774
|
}
|
|
11508
13775
|
|
|
13776
|
+
/** Read a JSON cookie file (a list of cookies, like `session.getCookies()` returns). */
|
|
13777
|
+
declare function readCookiesFile(cookieFile: string): Promise<Cookie[]>;
|
|
13778
|
+
/**
|
|
13779
|
+
* Append `cookies` to the JSON list stored in `cookieFile`, creating the file
|
|
13780
|
+
* when it does not exist yet.
|
|
13781
|
+
*/
|
|
13782
|
+
declare function createOrAppendCookiesToFile(cookieFile: string, cookies: Cookie[]): Promise<void>;
|
|
13783
|
+
|
|
11509
13784
|
declare const createClient: (config?: {
|
|
11510
13785
|
baseUrl?: string;
|
|
11511
13786
|
token?: string;
|
|
11512
13787
|
}) => Client;
|
|
11513
13788
|
|
|
11514
|
-
export { type ActionParameter, type ActionSpace, type ActionSpaceWritable, type AddCredentialsRequest, type AddCredentialsResponse, type AddCreditCardRequest, type AddCreditCardResponse, Agent, type AgentConstructor, type AgentFunctionCodeResponse, type AgentResponse, type AgentRunRequest, type AgentStartData, type AgentStartError, type AgentStartErrors, type AgentStartResponse, type AgentStartResponses, type AgentStatus, type AgentStatusData, type AgentStatusError, type AgentStatusErrors, type AgentStatusResponse, type AgentStatusResponse2, type AgentStatusResponses, type AgentStopData, type AgentStopError, type AgentStopErrors, type AgentStopResponse, type AgentStopResponses, type AgentUpdateHandler, type AnythingStartData, type AnythingStartError, type AnythingStartErrors, type AnythingStartRequest, type AnythingStartResponses, type ApiAgentStartRequest, type ApiExecutionResponse, type ApiExecutionResponseWritable, type ApiSessionStartRequest, type BaseModel, type BaseModelWritable, type BodyFunctionCreateFunctionsPost, type BodyFunctionUpdateFunctionsFunctionIdPost, type BodySessionCookiesSetSessionsSessionIdCookiesPost, type BodyUploadSessionFileSessionsSessionIdFilesPost, type BoundingBox, type CaptchaSolveAction, type CheckActionInput, type CheckActionOutput, type ClickActionInput, type ClickActionOutput, type ClientOptions, type CloseTabAction, type CompletionAction, type ConnectLinkContext, type ConnectLinkContextData, type ConnectLinkContextError, type ConnectLinkContextErrors, type ConnectLinkContextResponse, type ConnectLinkContextResponses, type ConnectLinkCreateRequest, type ConnectLinkCreateResponse, type ConnectLinkMailbox, type ConnectLinkMailboxConnectData, type ConnectLinkMailboxConnectError, type ConnectLinkMailboxConnectErrors, type ConnectLinkMailboxConnectRequest, type ConnectLinkMailboxConnectResponse, type ConnectLinkMailboxConnectResponse2, type ConnectLinkMailboxConnectResponses, type ConnectLinkMailboxSyncData, type ConnectLinkMailboxSyncError, type ConnectLinkMailboxSyncErrors, type ConnectLinkMailboxSyncRequest, type ConnectLinkMailboxSyncResponse, type ConnectLinkMailboxSyncResponses, type ConnectLinkMailboxesData, type ConnectLinkMailboxesError, type ConnectLinkMailboxesErrors, type ConnectLinkMailboxesResponse, type ConnectLinkMailboxesResponses, type ConnectLinkStatusData, type ConnectLinkStatusError, type ConnectLinkStatusErrors, type ConnectLinkStatusResponse, type ConnectLinkStatusResponse2, type ConnectLinkStatusResponses, type ConnectLinkSubmitData, type ConnectLinkSubmitError, type ConnectLinkSubmitErrors, type ConnectLinkSubmitRequest, type ConnectLinkSubmitRequestWritable, type ConnectLinkSubmitResponse, type ConnectLinkSubmitResponses, type Cookie, type Credential, type CredentialsDictInput, type CredentialsDictOutput, type CreditCardDictInput, type CreditCardDictOutput, type DataSpace, type DeleteCredentialsResponse, type DeleteCreditCardResponse, type DeleteFunctionResponse, type DeletePersonaResponse, type DeleteSecretData, type DeleteSecretError, type DeleteSecretErrors, type DeleteSecretResponse, type DeleteSecretResponses, type DeleteSessionFileData, type DeleteSessionFileError, type DeleteSessionFileErrors, type DeleteSessionFileResponse, type DeleteSessionFileResponses, type DeleteVaultResponse, type DownloadFileActionInput, type DownloadFileActionOutput, type DownloadSessionFileData, type DownloadSessionFileError, type DownloadSessionFileErrors, type DownloadSessionFileResponses, type EmailReadAction, type EmailResponse, type EmailVerificationReadAction, Encryption, type EvaluateJsAction, type ExecutionResponse, type ExternalProxy, type FallbackFillActionInput, type FallbackFillActionInputWritable, type FallbackFillActionOutput, type FallbackFillActionOutputWritable, type FileSource, type FillActionInput, type FillActionInputWritable, type FillActionOutput, type FillActionOutputWritable, type FormFillAction, type FormFillActionWritable, type FrameData, type FunctionConstructor, type FunctionCreateData, type FunctionCreateError, type FunctionCreateErrors, type FunctionCreateResponse, type FunctionCreateResponses, type FunctionDeleteData, type FunctionDeleteError, type FunctionDeleteErrors, type FunctionDeleteResponse, type FunctionDeleteResponses, type FunctionDownloadOptions, type FunctionDownloadUrlData, type FunctionDownloadUrlError, type FunctionDownloadUrlErrors, type FunctionDownloadUrlResponse, type FunctionDownloadUrlResponses, type FunctionForkData, type FunctionForkError, type FunctionForkErrors, type FunctionForkResponse, type FunctionForkResponses, type FunctionListItemResponse, type FunctionListItemResponseWritable, type FunctionMetadataUpdateData, type FunctionMetadataUpdateError, type FunctionMetadataUpdateErrors, type FunctionMetadataUpdateRequest, type FunctionMetadataUpdateResponse, type FunctionMetadataUpdateResponses, type FunctionResponse, type FunctionResponseWritable, type FunctionRollbackData, type FunctionRollbackError, type FunctionRollbackErrors, type FunctionRollbackRequest, type FunctionRollbackResponse, type FunctionRollbackResponses, type FunctionRunGetMetadataData, type FunctionRunGetMetadataError, type FunctionRunGetMetadataErrors, type FunctionRunGetMetadataResponse, type FunctionRunGetMetadataResponses, type FunctionRunListItemResponse, type FunctionRunListItemResponseWritable, type FunctionRunOptions, type FunctionRunStartData, type FunctionRunStartError, type FunctionRunStartErrors, type FunctionRunStartResponses, type FunctionRunStartResult, type FunctionRunStopData, type FunctionRunStopError, type FunctionRunStopErrors, type FunctionRunStopResponse, type FunctionRunStopResponses, type FunctionRunUpdateMetadataData, type FunctionRunUpdateMetadataError, type FunctionRunUpdateMetadataErrors, type FunctionRunUpdateMetadataResponse, type FunctionRunUpdateMetadataResponses, type FunctionRunUpdateRequest, type FunctionRuntimeHealthData, type FunctionRuntimeHealthError, type FunctionRuntimeHealthErrors, type FunctionRuntimeHealthResponse, type FunctionRuntimeHealthResponse2, type FunctionRuntimeHealthResponses, type FunctionScheduleCreateRequest, type FunctionScheduleDeleteData, type FunctionScheduleDeleteError, type FunctionScheduleDeleteErrors, type FunctionScheduleDeleteResponse, type FunctionScheduleDeleteResponses, type FunctionScheduleSetData, type FunctionScheduleSetError, type FunctionScheduleSetErrors, type FunctionScheduleSetResponse, type FunctionScheduleSetResponses, type FunctionSource, type FunctionUpdateData, type FunctionUpdateError, type FunctionUpdateErrors, type FunctionUpdateResponse, type FunctionUpdateResponses, type FunctionUrlOptions, type FunctionWithLinkResponse, type FunctionWithLinkResponseWritable, type GetCookiesResponse, type GetCredentialsResponse, type GetCreditCardResponse, type GetFunctionRunResponse, type GetFunctionRunResponseWritable, type GetScriptData, type GetScriptError, type GetScriptErrors, type GetScriptResponse, type GetScriptResponses, type GetSecretData, type GetSecretError, type GetSecretErrors, type GetSecretResponse, type GetSecretResponses, type GetSessionScriptData, type GetSessionScriptError, type GetSessionScriptErrors, type GetSessionScriptResponse, type GetSessionScriptResponses, type GetUsageData, type GetUsageError, type GetUsageErrors, type GetUsageLogsData, type GetUsageLogsError, type GetUsageLogsErrors, type GetUsageLogsResponse, type GetUsageLogsResponses, type GetUsageResponse, type GetUsageResponses, type GlobalScrapeRequest, type GoBackAction, type GoForwardAction, type GotoAction, type GotoNewTabAction, type HealthCheckData, type HealthCheckResponse, type HealthCheckResponses, type HealthResponse, type HelpAction, type HttpValidationError, type ImageCategory, type ImageData, type ImprovePromptData, type ImprovePromptError, type ImprovePromptErrors, type ImprovePromptRequest, type ImprovePromptResponse, type ImprovePromptResponse2, type ImprovePromptResponses, type LegacyAgentStatusResponse, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListCredentialsResponse, type ListFunctionRunsByFunctionIdData, type ListFunctionRunsByFunctionIdError, type ListFunctionRunsByFunctionIdErrors, type ListFunctionRunsByFunctionIdResponse, type ListFunctionRunsByFunctionIdResponses, type ListFunctionsData, type ListFunctionsError, type ListFunctionsErrors, type ListFunctionsResponse, type ListFunctionsResponses, type ListPersonasData, type ListPersonasError, type ListPersonasErrors, type ListPersonasResponse, type ListPersonasResponses, type ListSecretsData, type ListSecretsError, type ListSecretsErrors, type ListSecretsResponse, type ListSecretsResponses, type ListSessionFilesData, type ListSessionFilesError, type ListSessionFilesErrors, type ListSessionFilesResponse, type ListSessionFilesResponses, type ListSessionsData, type ListSessionsError, type ListSessionsErrors, type ListSessionsResponse, type ListSessionsResponses, type ListVaultsData, type ListVaultsError, type ListVaultsErrors, type ListVaultsResponse, type ListVaultsResponses, type LlmModel, type MailboxConnectRequest, type MailboxConnectResponse, type MailboxConnectTokenData, type MailboxConnectTokenError, type MailboxConnectTokenErrors, type MailboxConnectTokenResponse, type MailboxConnectTokenResponses, type MailboxConnection, type MailboxDeleteData, type MailboxDeleteError, type MailboxDeleteErrors, type MailboxDeleteResponse, type MailboxDeleteResponses, type MailboxGetData, type MailboxGetError, type MailboxGetErrors, type MailboxGetResponse, type MailboxGetResponses, type MailboxListData, type MailboxListError, type MailboxListErrors, type MailboxListResponse, type MailboxListResponse2, type MailboxListResponses, type MailboxSyncData, type MailboxSyncError, type MailboxSyncErrors, type MailboxSyncRequest, type MailboxSyncResponse, type MailboxSyncResponses, type MailboxUpdateData, type MailboxUpdateError, type MailboxUpdateErrors, type MailboxUpdateRequest, type MailboxUpdateResponse, type MailboxUpdateResponses, type ManagedAuthConnectLinkCreateData, type ManagedAuthConnectLinkCreateError, type ManagedAuthConnectLinkCreateErrors, type ManagedAuthConnectLinkCreateResponse, type ManagedAuthConnectLinkCreateResponses, type ManagedAuthCredentials, type ManagedAuthCredentialsWritable, type MessageReadOptions, type MintProxyCredentialsData, type MintProxyCredentialsError, type MintProxyCredentialsErrors, type MintProxyCredentialsResponse, type MintProxyCredentialsResponses, type MultiFactorFillActionInput, type MultiFactorFillActionInputWritable, type MultiFactorFillActionOutput, type MultiFactorFillActionOutputWritable, type NetworkBatchFile, type NetworkLogsResponse, type NodeSelectors, NotteClient, type NotteClientConfig, NotteFunction, NottePersona, type NotteProxy, NotteVault, type NudgePromptData, type NudgePromptError, type NudgePromptErrors, type NudgePromptRequest, type NudgePromptResponse, type NudgePromptResponse2, type NudgePromptResponses, type Observation, type ObservationWritable, type ObserveRequest, type Options, type PageExecuteData, type PageExecuteError, type PageExecuteErrors, type PageExecuteResponse, type PageExecuteResponses, type PageObserveData, type PageObserveError, type PageObserveErrors, type PageObserveResponse, type PageObserveResponses, type PageScrapeData, type PageScrapeError, type PageScrapeErrors, type PageScrapeResponse, type PageScrapeResponses, type PageScreenshotData, type PageScreenshotError, type PageScreenshotErrors, type PageScreenshotResponses, type PaginatedResponseAgentResponse, type PaginatedResponseAgentResponseWritable, type PaginatedResponseFunctionListItemResponse, type PaginatedResponseFunctionListItemResponseWritable, type PaginatedResponseFunctionRunListItemResponse, type PaginatedResponseFunctionRunListItemResponseWritable, type PaginatedResponsePersonaResponse, type PaginatedResponsePersonaResponseWritable, type PaginatedResponseProfileResponse, type PaginatedResponseProfileResponseWritable, type PaginatedResponseSessionResponse, type PaginatedResponseSessionResponseWritable, type PaginatedResponseUsageLog, type PaginatedResponseUsageLogWritable, type PaginatedResponseVault, type PaginatedResponseVaultWritable, type ParameterInfo, type PersonaConstructor, type PersonaCreateData, type PersonaCreateError, type PersonaCreateErrors, type PersonaCreateRequest, type PersonaCreateResponse, type PersonaCreateResponses, type PersonaDeleteData, type PersonaDeleteError, type PersonaDeleteErrors, type PersonaDeleteResponse, type PersonaDeleteResponses, type PersonaEmailsListData, type PersonaEmailsListError, type PersonaEmailsListErrors, type PersonaEmailsListResponse, type PersonaEmailsListResponses, type PersonaGetData, type PersonaGetError, type PersonaGetErrors, type PersonaGetResponse, type PersonaGetResponses, type PersonaListOptions, type PersonaResponse, type PersonaSmsListData, type PersonaSmsListError, type PersonaSmsListErrors, type PersonaSmsListResponse, type PersonaSmsListResponses, type PersonaUpdateData, type PersonaUpdateError, type PersonaUpdateErrors, type PersonaUpdateRequest, type PersonaUpdateResponse, type PersonaUpdateResponses, type PressKeyAction, type ProfileCookiesGetData, type ProfileCookiesGetError, type ProfileCookiesGetErrors, type ProfileCookiesGetResponse, type ProfileCookiesGetResponses, type ProfileCookiesImportRequest, type ProfileCookiesImportResponse, type ProfileCookiesSetData, type ProfileCookiesSetError, type ProfileCookiesSetErrors, type ProfileCookiesSetResponse, type ProfileCookiesSetResponses, type ProfileCreateData, type ProfileCreateError, type ProfileCreateErrors, type ProfileCreateRequest, type ProfileCreateResponse, type ProfileCreateResponses, type ProfileDeleteData, type ProfileDeleteError, type ProfileDeleteErrors, type ProfileDeleteResponse, type ProfileDeleteResponse2, type ProfileDeleteResponses, type ProfileDuplicateData, type ProfileDuplicateError, type ProfileDuplicateErrors, type ProfileDuplicateRequest, type ProfileDuplicateResponse, type ProfileDuplicateResponses, type ProfileGetData, type ProfileGetError, type ProfileGetErrors, type ProfileGetResponse, type ProfileGetResponses, type ProfileListData, type ProfileListError, type ProfileListErrors, type ProfileListResponse, type ProfileListResponses, type ProfileResponse, type ProxyCredentialRequest, type ProxyCredentialResponse, type ProxyGeolocationCountry, type ReadyCheckData, type ReadyCheckResponse, type ReadyCheckResponses, type ReloadAction, type ReplayResponse, type RootModelAny, type RunFunctionRequest, type RuntimePackage, type ScheduleDeleteResponse, type ScheduleResponse, type SchemaGenerationResponse, type ScrapeAction, type ScrapeFromHtmlData, type ScrapeFromHtmlError, type ScrapeFromHtmlErrors, type ScrapeFromHtmlRequest, type ScrapeFromHtmlResponse, type ScrapeFromHtmlResponses, type ScrapeRequest, type ScrapeSchemaResponse, type ScrapeWebpageData, type ScrapeWebpageError, type ScrapeWebpageErrors, type ScrapeWebpageResponse, type ScrapeWebpageResponses, type Screenshot, type ScrollDownAction, type ScrollUpAction, type SearchRequest, type SearchWebData, type SearchWebError, type SearchWebErrors, type SearchWebResponses, type SecretListResponse, type SecretMetadata, type SecretNamespace, type SecretStoreRequest, type SecretValueResponse, type SelectDropdownOptionActionInput, type SelectDropdownOptionActionInputWritable, type SelectDropdownOptionActionOutput, type SelectDropdownOptionActionOutputWritable, type SerializedError, Session, type SessionCookiesGetData, type SessionCookiesGetError, type SessionCookiesGetErrors, type SessionCookiesGetResponse, type SessionCookiesGetResponses, type SessionCookiesSetData, type SessionCookiesSetError, type SessionCookiesSetErrors, type SessionCookiesSetResponse, type SessionCookiesSetResponses, type SessionDebugInfoData, type SessionDebugInfoError, type SessionDebugInfoErrors, type SessionDebugInfoResponse, type SessionDebugInfoResponses, type SessionDebugResponse, type SessionFile, SessionFiles, type SessionFilesPage, type SessionNetworkLogsData, type SessionNetworkLogsError, type SessionNetworkLogsErrors, type SessionNetworkLogsResponse, type SessionNetworkLogsResponses, type SessionOffsetData, type SessionOffsetError, type SessionOffsetErrors, type SessionOffsetResponse, type SessionOffsetResponse2, type SessionOffsetResponses, type SessionOptions, type SessionProfile, type SessionReplayData, type SessionReplayError, type SessionReplayErrors, type SessionReplayResponse, type SessionReplayResponses, type SessionResponse, type SessionResponseWritable, type SessionStartData, type SessionStartError, type SessionStartErrors, type SessionStartResponse, type SessionStartResponses, type SessionStatusData, type SessionStatusError, type SessionStatusErrors, type SessionStatusResponse, type SessionStatusResponses, type SessionStopData, type SessionStopError, type SessionStopErrors, type SessionStopResponse, type SessionStopResponses, type SmsReadAction, type SmsResponse, type SnapshotMetadata, type SpaceCategory, type StoreSecretData, type StoreSecretError, type StoreSecretErrors, type StoreSecretResponse, type StoreSecretResponses, type StructuredDataBaseModel, type SubscriptionType, type SwitchTabAction, type TabSessionDebugResponse, type TabsData, type TailnetProxy, type UpdateFunctionRunResponse, type UpdateFunctionRunResponseWritable, type UploadFileActionInput, type UploadFileActionOutput, type UploadSessionFileData, type UploadSessionFileError, type UploadSessionFileErrors, type UploadSessionFileResponse, type UploadSessionFileResponses, type UsageLog, type UsageResponse, type ValidationError, type Vault, type VaultConstructor, type VaultCreateData, type VaultCreateError, type VaultCreateErrors, type VaultCreateRequest, type VaultCreateResponse, type VaultCreateResponses, type VaultCredentialsAddData, type VaultCredentialsAddError, type VaultCredentialsAddErrors, type VaultCredentialsAddResponse, type VaultCredentialsAddResponses, type VaultCredentialsDeleteData, type VaultCredentialsDeleteError, type VaultCredentialsDeleteErrors, type VaultCredentialsDeleteResponse, type VaultCredentialsDeleteResponses, type VaultCredentialsGetData, type VaultCredentialsGetError, type VaultCredentialsGetErrors, type VaultCredentialsGetResponse, type VaultCredentialsGetResponses, type VaultCredentialsListData, type VaultCredentialsListError, type VaultCredentialsListErrors, type VaultCredentialsListResponse, type VaultCredentialsListResponses, type VaultCreditCardDeleteData, type VaultCreditCardDeleteError, type VaultCreditCardDeleteErrors, type VaultCreditCardDeleteResponse, type VaultCreditCardDeleteResponses, type VaultCreditCardGetData, type VaultCreditCardGetError, type VaultCreditCardGetErrors, type VaultCreditCardGetResponse, type VaultCreditCardGetResponses, type VaultCreditCardSetData, type VaultCreditCardSetError, type VaultCreditCardSetErrors, type VaultCreditCardSetResponse, type VaultCreditCardSetResponses, type VaultDeleteData, type VaultDeleteError, type VaultDeleteErrors, type VaultDeleteResponse, type VaultDeleteResponses, type VaultUpdateData, type VaultUpdateError, type VaultUpdateErrors, type VaultUpdateRequest, type VaultUpdateResponse, type VaultUpdateResponses, type ViewportData, type WaitAction, type WebSocketUrls, agentStart, agentStatus, agentStop, anythingStart, client, connectLinkContext, connectLinkMailboxConnect, connectLinkMailboxSync, connectLinkMailboxes, connectLinkStatus, connectLinkSubmit, createClient, NotteClient as default, deleteSecret, deleteSessionFile, downloadSessionFile, functionCreate, functionDelete, functionDownloadUrl, functionFork, functionMetadataUpdate, functionRollback, functionRunGetMetadata, functionRunStart, functionRunStop, functionRunUpdateMetadata, functionRuntimeHealth, functionScheduleDelete, functionScheduleSet, functionUpdate, getScript, getSecret, getSessionScript, getUsage, getUsageLogs, healthCheck, improvePrompt, listAgents, listFunctionRunsByFunctionId, listFunctions, listPersonas, listSecrets, listSessionFiles, listSessions, listVaults, mailboxConnectToken, mailboxDelete, mailboxGet, mailboxList, mailboxSync, mailboxUpdate, managedAuthConnectLinkCreate, mintProxyCredentials, nudgePrompt, pageExecute, pageObserve, pageScrape, pageScreenshot, personaCreate, personaDelete, personaEmailsList, personaGet, personaSmsList, personaUpdate, profileCookiesGet, profileCookiesSet, profileCreate, profileDelete, profileDuplicate, profileGet, profileList, readyCheck, scrapeFromHtml, scrapeWebpage, searchWeb, sessionCookiesGet, sessionCookiesSet, sessionDebugInfo, sessionNetworkLogs, sessionOffset, sessionReplay, sessionStart, sessionStatus, sessionStop, storeSecret, uploadSessionFile, vaultCreate, vaultCredentialsAdd, vaultCredentialsDelete, vaultCredentialsGet, vaultCredentialsList, vaultCreditCardDelete, vaultCreditCardGet, vaultCreditCardSet, vaultDelete, vaultUpdate };
|
|
13789
|
+
export { ActionExecutionError, type ActionInput, type ActionOfType, type ActionParameter, type ActionSpace, type ActionSpaceWritable, type ActionType, type AddCredentialsRequest, type AddCredentialsResponse, type AddCreditCardRequest, type AddCreditCardResponse, Agent, type AgentConstructor, type AgentFunctionCodeResponse, type AgentListOptions, type AgentResponse, type AgentRunRequest, type AgentStartData, type AgentStartError, type AgentStartErrors, type AgentStartResponse, type AgentStartResponses, type AgentStatus, type AgentStatusData, type AgentStatusError, type AgentStatusErrors, type AgentStatusResponse, type AgentStatusResponse2, type AgentStatusResponses, type AgentStopData, type AgentStopError, type AgentStopErrors, type AgentStopResponse, type AgentStopResponses, type AgentUpdateHandler, type AnythingStartData, type AnythingStartError, type AnythingStartErrors, type AnythingStartOptions, type AnythingStartRequest, type AnythingStartResponse, type AnythingStartResponses, type ApiAgentStartRequest, type ApiExecutionResponse, type ApiExecutionResponseWritable, type ApiSessionStartRequest, type AuthSessionResponse, type AuthWaitOptions, AuthenticationError, type BaseModel, type BaseModelWritable, type BodyFunctionCreateFunctionsPost, type BodyFunctionUpdateFunctionsFunctionIdPost, type BodySessionCookiesSetSessionsSessionIdCookiesPost, type BodyUploadSessionFileSessionsSessionIdFilesPost, type BoundingBox, CAPTCHA_SOLVE_TIMEOUT_MS, CLUSTER_OVERLOAD_RETRY_DELAY_MS, CREDENTIAL_FIELDS, type CaptchaExecutionResponse, type CaptchaSolveAction, type CaptchaStatus, type CheckActionInput, type CheckActionOutput, type ClickActionInput, type ClickActionOutput, type ClientOptions, type CloseTabAction, type CompletionAction, type ConnectLinkContext, type ConnectLinkContextData, type ConnectLinkContextError, type ConnectLinkContextErrors, type ConnectLinkContextResponse, type ConnectLinkContextResponses, type ConnectLinkCreateRequest, type ConnectLinkCreateResponse, type ConnectLinkMailbox, type ConnectLinkMailboxConnectData, type ConnectLinkMailboxConnectError, type ConnectLinkMailboxConnectErrors, type ConnectLinkMailboxConnectRequest, type ConnectLinkMailboxConnectResponse, type ConnectLinkMailboxConnectResponse2, type ConnectLinkMailboxConnectResponses, type ConnectLinkMailboxSyncData, type ConnectLinkMailboxSyncError, type ConnectLinkMailboxSyncErrors, type ConnectLinkMailboxSyncRequest, type ConnectLinkMailboxSyncResponse, type ConnectLinkMailboxSyncResponses, type ConnectLinkMailboxesData, type ConnectLinkMailboxesError, type ConnectLinkMailboxesErrors, type ConnectLinkMailboxesResponse, type ConnectLinkMailboxesResponses, type ConnectLinkStatusData, type ConnectLinkStatusError, type ConnectLinkStatusErrors, type ConnectLinkStatusResponse, type ConnectLinkStatusResponse2, type ConnectLinkStatusResponses, type ConnectLinkSubmitData, type ConnectLinkSubmitError, type ConnectLinkSubmitErrors, type ConnectLinkSubmitRequest, type ConnectLinkSubmitRequestWritable, type ConnectLinkSubmitResponse, type ConnectLinkSubmitResponses, type ConnectPaymentWalletData, type ConnectPaymentWalletError, type ConnectPaymentWalletErrors, type ConnectPaymentWalletResponse, type ConnectPaymentWalletResponses, type Cookie, type CreatePaymentData, type CreatePaymentError, type CreatePaymentErrors, type CreatePaymentResponse, type CreatePaymentResponses, type Credential, type CredentialField, type CredentialsDictInput, type CredentialsDictOutput, type CreditCardDictInput, type CreditCardDictOutput, DEFAULT_NOTTE_API_URL, DEFAULT_REQUEST_TIMEOUT_MS, type DataSpace, type DeleteCredentialsResponse, type DeleteCreditCardResponse, type DeleteFunctionResponse, type DeletePersonaResponse, type DeleteSecretData, type DeleteSecretError, type DeleteSecretErrors, type DeleteSecretResponse, type DeleteSecretResponses, type DeleteSessionFileData, type DeleteSessionFileError, type DeleteSessionFileErrors, type DeleteSessionFileResponse, type DeleteSessionFileResponses, type DeleteVaultResponse, type DisconnectPaymentWalletData, type DisconnectPaymentWalletError, type DisconnectPaymentWalletErrors, type DisconnectPaymentWalletResponse, type DisconnectPaymentWalletResponses, type DownloadFileActionInput, type DownloadFileActionOutput, type DownloadSessionFileData, type DownloadSessionFileError, type DownloadSessionFileErrors, type DownloadSessionFileResponses, type EmailReadAction, type EmailResponse, type EmailVerificationReadAction, Encryption, type EvaluateJsAction, EvaluateJsNoDataError, type ExecuteAction, type ExecuteOptions, type ExecutionResponse, type ExternalProxy, FUNCTION_RUN_ENDPOINTS, FUNCTION_RUN_TIMEOUT_MS, FailedToRunCloudFunctionError, type FallbackFillActionInput, type FallbackFillActionInputWritable, type FallbackFillActionOutput, type FallbackFillActionOutputWritable, type FetchData, FetchResponseDecodeError, type FileDownloadOptions, FileExistsError, type FileListOptions, FileNotFoundError, type FileSource, type FillActionInput, type FillActionInputWritable, type FillActionOutput, type FillActionOutputWritable, type FormFillAction, type FormFillActionWritable, type FrameData, type FunctionConstructor, type FunctionConstructorCreate, type FunctionConstructorWithId, type FunctionCreateData, type FunctionCreateError, type FunctionCreateErrors, type FunctionCreateResponse, type FunctionCreateResponses, type FunctionDeleteData, type FunctionDeleteError, type FunctionDeleteErrors, type FunctionDeleteResponse, type FunctionDeleteResponses, type FunctionDownloadOptions, type FunctionDownloadUrlData, type FunctionDownloadUrlError, type FunctionDownloadUrlErrors, type FunctionDownloadUrlResponse, type FunctionDownloadUrlResponses, type FunctionForkData, type FunctionForkError, type FunctionForkErrors, type FunctionForkResponse, type FunctionForkResponses, type FunctionGetOptions, type FunctionListItemResponse, type FunctionListItemResponseWritable, type FunctionListOptions, type FunctionMetadataUpdateData, type FunctionMetadataUpdateError, type FunctionMetadataUpdateErrors, type FunctionMetadataUpdateOptions, type FunctionMetadataUpdateRequest, type FunctionMetadataUpdateResponse, type FunctionMetadataUpdateResponses, type FunctionResponse, type FunctionResponseWritable, type FunctionRollbackData, type FunctionRollbackError, type FunctionRollbackErrors, type FunctionRollbackOptions, type FunctionRollbackRequest, type FunctionRollbackResponse, type FunctionRollbackResponses, type FunctionRunCreateOptions, type FunctionRunCreateResult, type FunctionRunGetMetadataData, type FunctionRunGetMetadataError, type FunctionRunGetMetadataErrors, type FunctionRunGetMetadataResponse, type FunctionRunGetMetadataResponses, type FunctionRunListItemResponse, type FunctionRunListItemResponseWritable, type FunctionRunListOptions, type FunctionRunOptions, type FunctionRunResponse, type FunctionRunResult, type FunctionRunStartData, type FunctionRunStartError, type FunctionRunStartErrors, type FunctionRunStartResponses, type FunctionRunStartResult, type FunctionRunStatus, type FunctionRunStopData, type FunctionRunStopError, type FunctionRunStopErrors, type FunctionRunStopResponse, type FunctionRunStopResponses, type FunctionRunUpdateMetadataData, type FunctionRunUpdateMetadataError, type FunctionRunUpdateMetadataErrors, type FunctionRunUpdateMetadataResponse, type FunctionRunUpdateMetadataResponses, type FunctionRunUpdateRequest, type FunctionRuntime, type FunctionRuntimeHealthData, type FunctionRuntimeHealthError, type FunctionRuntimeHealthErrors, type FunctionRuntimeHealthResponse, type FunctionRuntimeHealthResponse2, type FunctionRuntimeHealthResponses, type FunctionScheduleCreateRequest, type FunctionScheduleDeleteData, type FunctionScheduleDeleteError, type FunctionScheduleDeleteErrors, type FunctionScheduleDeleteResponse, type FunctionScheduleDeleteResponses, type FunctionScheduleOptions, type FunctionScheduleSetData, type FunctionScheduleSetError, type FunctionScheduleSetErrors, type FunctionScheduleSetResponse, type FunctionScheduleSetResponses, type FunctionSource, type FunctionUpdateData, type FunctionUpdateError, type FunctionUpdateErrors, type FunctionUpdateOptions, type FunctionUpdateResponse, type FunctionUpdateResponses, type FunctionUrlOptions, type FunctionWithLinkResponse, type FunctionWithLinkResponseWritable, type GetCookiesResponse, type GetCredentialsResponse, type GetCreditCardResponse, type GetFunctionRunResponse, type GetFunctionRunResponseWritable, type GetPaymentData, type GetPaymentError, type GetPaymentErrors, type GetPaymentResponse, type GetPaymentResponses, type GetScriptData, type GetScriptError, type GetScriptErrors, type GetScriptResponse, type GetScriptResponses, type GetSecretData, type GetSecretError, type GetSecretErrors, type GetSecretResponse, type GetSecretResponses, type GetSessionScriptData, type GetSessionScriptError, type GetSessionScriptErrors, type GetSessionScriptResponse, type GetSessionScriptResponses, type GetUsageData, type GetUsageError, type GetUsageErrors, type GetUsageLogsData, type GetUsageLogsError, type GetUsageLogsErrors, type GetUsageLogsResponse, type GetUsageLogsResponses, type GetUsageResponse, type GetUsageResponses, type GlobalScrapeOptions, type GlobalScrapeRequest, type GoBackAction, type GoForwardAction, type GotoAction, type GotoNewTabAction, type HealthCheckData, type HealthCheckResponse, type HealthCheckResponses, type HealthResponse, type HelpAction, type HttpValidationError, type ImageCategory, type ImageData, type ImprovePromptData, type ImprovePromptError, type ImprovePromptErrors, type ImprovePromptRequest, type ImprovePromptResponse, type ImprovePromptResponse2, type ImprovePromptResponses, InvalidRequestError, type LegacyAgentStatusResponse, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListCredentialsResponse, type ListFunctionRunsByFunctionIdData, type ListFunctionRunsByFunctionIdError, type ListFunctionRunsByFunctionIdErrors, type ListFunctionRunsByFunctionIdResponse, type ListFunctionRunsByFunctionIdResponses, type ListFunctionsData, type ListFunctionsError, type ListFunctionsErrors, type ListFunctionsResponse, type ListFunctionsResponses, type ListPersonasData, type ListPersonasError, type ListPersonasErrors, type ListPersonasResponse, type ListPersonasResponses, type ListSecretsData, type ListSecretsError, type ListSecretsErrors, type ListSecretsResponse, type ListSecretsResponses, type ListSessionFilesData, type ListSessionFilesError, type ListSessionFilesErrors, type ListSessionFilesResponse, type ListSessionFilesResponses, type ListSessionsData, type ListSessionsError, type ListSessionsErrors, type ListSessionsResponse, type ListSessionsResponses, type ListVaultsData, type ListVaultsError, type ListVaultsErrors, type ListVaultsResponse, type ListVaultsResponses, type LlmModel, type MailboxConnectRequest, type MailboxConnectResponse, type MailboxConnectTokenData, type MailboxConnectTokenError, type MailboxConnectTokenErrors, type MailboxConnectTokenResponse, type MailboxConnectTokenResponses, type MailboxConnection, type MailboxDeleteData, type MailboxDeleteError, type MailboxDeleteErrors, type MailboxDeleteResponse, type MailboxDeleteResponses, type MailboxGetData, type MailboxGetError, type MailboxGetErrors, type MailboxGetResponse, type MailboxGetResponses, type MailboxListData, type MailboxListError, type MailboxListErrors, type MailboxListResponse, type MailboxListResponse2, type MailboxListResponses, type MailboxSyncData, type MailboxSyncError, type MailboxSyncErrors, type MailboxSyncRequest, type MailboxSyncResponse, type MailboxSyncResponses, type MailboxUpdateData, type MailboxUpdateError, type MailboxUpdateErrors, type MailboxUpdateRequest, type MailboxUpdateResponse, type MailboxUpdateResponses, type ManagedAuthConnectLinkCreateData, type ManagedAuthConnectLinkCreateError, type ManagedAuthConnectLinkCreateErrors, type ManagedAuthConnectLinkCreateResponse, type ManagedAuthConnectLinkCreateResponses, type ManagedAuthCredentials, type ManagedAuthCredentialsWritable, ManagedAuthError, type ManagedAuthOperation, type ManagedAuthReadiness, type ManagedAuthRunOptions, type ManagedAuthRunResponse, type MessageReadOptions, type MultiFactorFillActionInput, type MultiFactorFillActionInputWritable, type MultiFactorFillActionOutput, type MultiFactorFillActionOutputWritable, type NetworkBatchFile, type NetworkLogsResponse, type NodeSelectors, NotteAPIError, type NotteAPIErrorBody, NotteAPIExecutionError, NotteAnything, NotteClient, type NotteClientConfig, NotteError, NotteFunction, NotteManagedAuth, NottePersona, type NotteProxy, NotteSecrets, NotteTimeoutError, NotteUsage, NotteVault, type NudgePromptData, type NudgePromptError, type NudgePromptErrors, type NudgePromptRequest, type NudgePromptResponse, type NudgePromptResponse2, type NudgePromptResponses, type Observation, type ObservationWritable, type ObserveRequest, type Options, type PageExecuteData, type PageExecuteError, type PageExecuteErrors, type PageExecuteResponse, type PageExecuteResponses, PageFetchHTTPError, type PageFetchOptions, PageFetchResponse, type PageObserveData, type PageObserveError, type PageObserveErrors, type PageObserveResponse, type PageObserveResponses, type PageScrapeData, type PageScrapeError, type PageScrapeErrors, type PageScrapeResponse, type PageScrapeResponses, type PageScreenshotData, type PageScreenshotError, type PageScreenshotErrors, type PageScreenshotResponses, type PaginatedResponseAgentResponse, type PaginatedResponseAgentResponseWritable, type PaginatedResponseFunctionListItemResponse, type PaginatedResponseFunctionListItemResponseWritable, type PaginatedResponseFunctionRunListItemResponse, type PaginatedResponseFunctionRunListItemResponseWritable, type PaginatedResponsePersonaResponse, type PaginatedResponsePersonaResponseWritable, type PaginatedResponseProfileResponse, type PaginatedResponseProfileResponseWritable, type PaginatedResponseSessionResponse, type PaginatedResponseSessionResponseWritable, type PaginatedResponseUsageLog, type PaginatedResponseUsageLogWritable, type PaginatedResponseVault, type PaginatedResponseVaultWritable, type ParameterInfo, type PaymentConnectRequest, type PaymentConnectionResponse, type PaymentDisconnectError, type PaymentDisconnectResponse, type PaymentNextAction, type PaymentRequest, type PaymentResponse, type PerceptionType, type PersonaConstructor, type PersonaCreateData, type PersonaCreateError, type PersonaCreateErrors, type PersonaCreateRequest, type PersonaCreateResponse, type PersonaCreateResponses, type PersonaDeleteData, type PersonaDeleteError, type PersonaDeleteErrors, type PersonaDeleteResponse, type PersonaDeleteResponses, type PersonaEmailsListData, type PersonaEmailsListError, type PersonaEmailsListErrors, type PersonaEmailsListResponse, type PersonaEmailsListResponses, type PersonaGetData, type PersonaGetError, type PersonaGetErrors, type PersonaGetResponse, type PersonaGetResponses, type PersonaListOptions, type PersonaResponse, type PersonaResponseWithInternalEmail, type PersonaSmsListData, type PersonaSmsListError, type PersonaSmsListErrors, type PersonaSmsListResponse, type PersonaSmsListResponses, type PersonaUpdateData, type PersonaUpdateError, type PersonaUpdateErrors, type PersonaUpdateRequest, type PersonaUpdateResponse, type PersonaUpdateResponses, type PressKeyAction, type ProfileCookiesGetData, type ProfileCookiesGetError, type ProfileCookiesGetErrors, type ProfileCookiesGetResponse, type ProfileCookiesGetResponses, type ProfileCookiesImportRequest, type ProfileCookiesImportResponse, type ProfileCookiesSetData, type ProfileCookiesSetError, type ProfileCookiesSetErrors, type ProfileCookiesSetResponse, type ProfileCookiesSetResponses, type ProfileCreateData, type ProfileCreateError, type ProfileCreateErrors, type ProfileCreateRequest, type ProfileCreateResponse, type ProfileCreateResponses, type ProfileDeleteData, type ProfileDeleteError, type ProfileDeleteErrors, type ProfileDeleteResponse, type ProfileDeleteResponse2, type ProfileDeleteResponses, type ProfileDuplicateData, type ProfileDuplicateError, type ProfileDuplicateErrors, type ProfileDuplicateRequest, type ProfileDuplicateResponse, type ProfileDuplicateResponses, type ProfileGetData, type ProfileGetError, type ProfileGetErrors, type ProfileGetResponse, type ProfileGetResponses, type ProfileListData, type ProfileListError, type ProfileListErrors, type ProfileListResponse, type ProfileListResponses, type ProfileResponse, type ProxyGeolocationCountry, RUN_API_KEY_HEADER, type ReadyCheckData, type ReadyCheckResponse, type ReadyCheckResponses, type ReloadAction, RemoteFileStorage, type ReplayMissingResponse, type ReplayOptions, type ReplayResponse, type ResourceRequestOptions, type RetryOptions, type RootModelAny, type RunFunctionRequest, type RuntimePackage, SESSION_START_TRIES, type ScheduleDeleteResponse, type ScheduleResponse, type SchemaGenerationResponse, type ScrapeAction, ScrapeFailedError, type ScrapeFromHtmlData, type ScrapeFromHtmlError, type ScrapeFromHtmlErrors, type ScrapeFromHtmlRequest, type ScrapeFromHtmlResponse, type ScrapeFromHtmlResponses, type ScrapeOptions, type ScrapeRequest, type ScrapeResult, type ScrapeSchemaResponse, type ScrapeWebpageData, type ScrapeWebpageError, type ScrapeWebpageErrors, type ScrapeWebpageResponse, type ScrapeWebpageResponses, type Screenshot, type ScrollDownAction, type ScrollUpAction, type SearchOptions, type SearchRequest, type SearchResponse, type SearchResultItem, type SearchResultsResponse, type SearchSource, type SearchSourcedAnswerResponse, type SearchStructuredResponse, type SearchWebData, type SearchWebError, type SearchWebErrors, type SearchWebResponses, type SecretListOptions, type SecretListResponse, type SecretMetadata, type SecretNamespace, type SecretStoreOptions, type SecretStoreRequest, type SecretValueResponse, type SelectDropdownOptionActionInput, type SelectDropdownOptionActionInputWritable, type SelectDropdownOptionActionOutput, type SelectDropdownOptionActionOutputWritable, type SerializedError, Session, type SessionAuthReadinessData, type SessionAuthReadinessError, type SessionAuthReadinessErrors, type SessionAuthReadinessResponse, type SessionAuthReadinessResponses, type SessionCloseReason, type SessionCookiesGetData, type SessionCookiesGetError, type SessionCookiesGetErrors, type SessionCookiesGetResponse, type SessionCookiesGetResponses, type SessionCookiesSetData, type SessionCookiesSetError, type SessionCookiesSetErrors, type SessionCookiesSetResponse, type SessionCookiesSetResponses, type SessionDebugInfoData, type SessionDebugInfoError, type SessionDebugInfoErrors, type SessionDebugInfoResponse, type SessionDebugInfoResponses, type SessionDebugResponse, type SessionFile, SessionFiles, type SessionFilesPage, type SessionListOptions, type SessionNetworkLogsData, type SessionNetworkLogsError, type SessionNetworkLogsErrors, type SessionNetworkLogsResponse, type SessionNetworkLogsResponses, type SessionOffsetData, type SessionOffsetError, type SessionOffsetErrors, type SessionOffsetResponse, type SessionOffsetResponse2, type SessionOffsetResponses, type SessionOptions, type SessionProfile, type SessionProfilePreviewData, type SessionProfilePreviewError, type SessionProfilePreviewErrors, type SessionProfilePreviewResponse, type SessionProfilePreviewResponse2, type SessionProfilePreviewResponses, type SessionReplayData, type SessionReplayError, type SessionReplayErrors, type SessionReplayResponse, type SessionReplayResponses, type AuthSessionResponse as SessionResponse, type SessionResponseWritable, type SessionScrapeOptions, type SessionScriptOptions, type SessionStartData, type SessionStartError, type SessionStartErrors, type SessionStartOptions, type SessionStartResponse, type SessionStartResponses, type SessionStatusData, type SessionStatusError, type SessionStatusErrors, type SessionStatusResponse, type SessionStatusResponses, type SessionStopData, type SessionStopError, type SessionStopErrors, type SessionStopResponse, type SessionStopResponses, type SmsReadAction, type SmsResponse, type SnapshotMetadata, type SpaceCategory, type StoreSecretData, type StoreSecretError, type StoreSecretErrors, type StoreSecretResponse, type StoreSecretResponses, type StructuredData, type StructuredDataBaseModel, type SubscriptionType, type SwitchTabAction, TIMEOUT_HEADER, type TabSessionDebugResponse, type TabsData, type TailnetProxy, type UpdateFunctionRunResponse, type UpdateFunctionRunResponseWritable, type UploadFileActionInput, type UploadFileActionOutput, type UploadSessionFileData, type UploadSessionFileError, type UploadSessionFileErrors, type UploadSessionFileResponse, type UploadSessionFileResponses, type UploadableFile, type UsageLog, type UsageLogEndpoint, type UsageLogsOptions, type UsageOptions, type UsageResponse, type ValidationError, type Vault, type VaultConstructor, type VaultConstructorCreate, type VaultConstructorWithId, type VaultCreateData, type VaultCreateError, type VaultCreateErrors, type VaultCreateRequest, type VaultCreateResponse, type VaultCreateResponses, type VaultCredentialsAddData, type VaultCredentialsAddError, type VaultCredentialsAddErrors, type VaultCredentialsAddResponse, type VaultCredentialsAddResponses, type VaultCredentialsDeleteData, type VaultCredentialsDeleteError, type VaultCredentialsDeleteErrors, type VaultCredentialsDeleteResponse, type VaultCredentialsDeleteResponses, type VaultCredentialsGetData, type VaultCredentialsGetError, type VaultCredentialsGetErrors, type VaultCredentialsGetResponse, type VaultCredentialsGetResponses, type VaultCredentialsListData, type VaultCredentialsListError, type VaultCredentialsListErrors, type VaultCredentialsListResponse, type VaultCredentialsListResponses, type VaultCreditCardDeleteData, type VaultCreditCardDeleteError, type VaultCreditCardDeleteErrors, type VaultCreditCardDeleteResponse, type VaultCreditCardDeleteResponses, type VaultCreditCardGetData, type VaultCreditCardGetError, type VaultCreditCardGetErrors, type VaultCreditCardGetResponse, type VaultCreditCardGetResponses, type VaultCreditCardSetData, type VaultCreditCardSetError, type VaultCreditCardSetErrors, type VaultCreditCardSetResponse, type VaultCreditCardSetResponses, type VaultDeleteData, type VaultDeleteError, type VaultDeleteErrors, type VaultDeleteResponse, type VaultDeleteResponses, type VaultListOptions, type VaultUpdateData, type VaultUpdateError, type VaultUpdateErrors, type VaultUpdateRequest, type VaultUpdateResponse, type VaultUpdateResponses, type ViewportData, type WaitAction, type WebSocketUrls, type ZodLikeSchema, actions, agentStart, agentStatus, agentStop, anythingStart, buildFetchScript, checkForLatestVersion, client, connectLinkContext, connectLinkMailboxConnect, connectLinkMailboxSync, connectLinkMailboxes, connectLinkStatus, connectLinkSubmit, connectPaymentWallet, createClient, createOrAppendCookiesToFile, createPayment, NotteClient as default, deleteSecret, deleteSessionFile, disconnectPaymentWallet, downloadSessionFile, functionCreate, functionDelete, functionDownloadUrl, functionFork, functionMetadataUpdate, functionRollback, functionRunGetMetadata, functionRunStart, functionRunStop, functionRunUpdateMetadata, functionRuntimeHealth, functionScheduleDelete, functionScheduleSet, functionUpdate, getPayment, getRootDomain, getScript, getSecret, getSessionScript, getUsage, getUsageLogs, healthCheck, improvePrompt, installServerOwnedDialogPolicy, isCaptchaSolveAction, isValidMfaSecret, listAgents, listFunctionRunsByFunctionId, listFunctions, listPersonas, listSecrets, listSessionFiles, listSessions, listVaults, mailboxConnectToken, mailboxDelete, mailboxGet, mailboxList, mailboxSync, mailboxUpdate, managedAuthConnectLinkCreate, nudgePrompt, observeServerOwnedDialog, pageExecute, pageObserve, pageScrape, pageScreenshot, parseAgentStatusMessage, personaCreate, personaDelete, personaEmailsList, personaGet, personaSmsList, personaUpdate, prepareAgentRequest, processScrapeResponse, profileCookiesGet, profileCookiesSet, profileCreate, profileDelete, profileDuplicate, profileGet, profileList, readCookiesFile, readyCheck, responseFromEvaluated, retry, sanitizeFilename, scrapeFromHtml, scrapeWebpage, searchWeb, sessionAuthReadiness, sessionCookiesGet, sessionCookiesSet, sessionDebugInfo, sessionNetworkLogs, sessionOffset, sessionProfilePreview, sessionReplay, sessionStart, sessionStatus, sessionStop, startVersionCheck, storeSecret, uploadSessionFile, validateCredentials, validateMfaSecret, validateUrl, vaultCreate, vaultCredentialsAdd, vaultCredentialsDelete, vaultCredentialsGet, vaultCredentialsList, vaultCreditCardDelete, vaultCreditCardGet, vaultCreditCardSet, vaultDelete, vaultUpdate };
|