notte-sdk 0.0.21 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +521 -102
- package/dist/index.d.mts +2139 -559
- package/dist/index.d.ts +2139 -559
- package/dist/index.js +2856 -684
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2802 -685
- 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 +10 -10
- package/dist/proxy/core.js.map +1 -1
- package/dist/proxy/core.mjs +10 -10
- 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 +10 -10
- package/dist/proxy/next.js.map +1 -1
- package/dist/proxy/next.mjs +10 -10
- 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 +29 -3
package/dist/index.d.ts
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.js';
|
|
3
4
|
|
|
4
5
|
type AuthToken = string | undefined;
|
|
5
6
|
interface Auth {
|
|
@@ -327,6 +328,22 @@ 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
348
|
baseUrl: 'https://us-staging.notte.cc' | (string & {});
|
|
332
349
|
};
|
|
@@ -800,12 +817,6 @@ type ApiSessionStartRequest = {
|
|
|
800
817
|
* The CDP URL of another remote session provider.
|
|
801
818
|
*/
|
|
802
819
|
cdp_url?: string | null;
|
|
803
|
-
/**
|
|
804
|
-
* Use File Storage
|
|
805
|
-
*
|
|
806
|
-
* Whether FileStorage should be attached to the session.
|
|
807
|
-
*/
|
|
808
|
-
use_file_storage?: boolean;
|
|
809
820
|
/**
|
|
810
821
|
* Screenshot Type
|
|
811
822
|
*
|
|
@@ -867,24 +878,6 @@ type ApiSessionStartRequest = {
|
|
|
867
878
|
type BaseModel = {
|
|
868
879
|
[key: string]: unknown;
|
|
869
880
|
};
|
|
870
|
-
/**
|
|
871
|
-
* Body_file_upload_downloaded_file_storage__session_id__downloads__filename__post
|
|
872
|
-
*/
|
|
873
|
-
type BodyFileUploadDownloadedFileStorageSessionIdDownloadsFilenamePost = {
|
|
874
|
-
/**
|
|
875
|
-
* File
|
|
876
|
-
*/
|
|
877
|
-
file: Blob | File;
|
|
878
|
-
};
|
|
879
|
-
/**
|
|
880
|
-
* Body_file_upload_storage_uploads__filename__post
|
|
881
|
-
*/
|
|
882
|
-
type BodyFileUploadStorageUploadsFilenamePost = {
|
|
883
|
-
/**
|
|
884
|
-
* File
|
|
885
|
-
*/
|
|
886
|
-
file: Blob | File;
|
|
887
|
-
};
|
|
888
881
|
/**
|
|
889
882
|
* Body_function_create_functions_post
|
|
890
883
|
*/
|
|
@@ -936,6 +929,15 @@ type BodySessionCookiesSetSessionsSessionIdCookiesPost = {
|
|
|
936
929
|
*/
|
|
937
930
|
cookies: Array<Cookie>;
|
|
938
931
|
};
|
|
932
|
+
/**
|
|
933
|
+
* Body_upload_session_file_sessions__session_id__files_post
|
|
934
|
+
*/
|
|
935
|
+
type BodyUploadSessionFileSessionsSessionIdFilesPost = {
|
|
936
|
+
/**
|
|
937
|
+
* File
|
|
938
|
+
*/
|
|
939
|
+
file: Blob | File;
|
|
940
|
+
};
|
|
939
941
|
/**
|
|
940
942
|
* BoundingBox
|
|
941
943
|
*/
|
|
@@ -2073,48 +2075,9 @@ type FallbackFillActionOutput = {
|
|
|
2073
2075
|
clear_before_fill?: boolean;
|
|
2074
2076
|
};
|
|
2075
2077
|
/**
|
|
2076
|
-
*
|
|
2077
|
-
*/
|
|
2078
|
-
type FileInfo = {
|
|
2079
|
-
/**
|
|
2080
|
-
* Name
|
|
2081
|
-
*/
|
|
2082
|
-
name: string;
|
|
2083
|
-
/**
|
|
2084
|
-
* Size
|
|
2085
|
-
*/
|
|
2086
|
-
size: number;
|
|
2087
|
-
/**
|
|
2088
|
-
* File Ext
|
|
2089
|
-
*/
|
|
2090
|
-
file_ext: string;
|
|
2091
|
-
/**
|
|
2092
|
-
* Updated At
|
|
2093
|
-
*/
|
|
2094
|
-
updated_at?: string | null;
|
|
2095
|
-
};
|
|
2096
|
-
/**
|
|
2097
|
-
* FileLinkResponse
|
|
2098
|
-
*/
|
|
2099
|
-
type FileLinkResponse = {
|
|
2100
|
-
/**
|
|
2101
|
-
* Url
|
|
2102
|
-
*
|
|
2103
|
-
* URL to download file from
|
|
2104
|
-
*/
|
|
2105
|
-
url: string;
|
|
2106
|
-
};
|
|
2107
|
-
/**
|
|
2108
|
-
* FileUploadResponse
|
|
2078
|
+
* FileSource
|
|
2109
2079
|
*/
|
|
2110
|
-
type
|
|
2111
|
-
/**
|
|
2112
|
-
* Success
|
|
2113
|
-
*
|
|
2114
|
-
* Whether the upload was successful
|
|
2115
|
-
*/
|
|
2116
|
-
success: boolean;
|
|
2117
|
-
};
|
|
2080
|
+
type FileSource = 'user_upload' | 'session_download';
|
|
2118
2081
|
/**
|
|
2119
2082
|
* FillAction
|
|
2120
2083
|
*/
|
|
@@ -2254,6 +2217,10 @@ type FrameData = {
|
|
|
2254
2217
|
* FunctionListItemResponse
|
|
2255
2218
|
*/
|
|
2256
2219
|
type FunctionListItemResponse = {
|
|
2220
|
+
/**
|
|
2221
|
+
* Default Runtime
|
|
2222
|
+
*/
|
|
2223
|
+
default_runtime?: 'standard' | 'extended';
|
|
2257
2224
|
/**
|
|
2258
2225
|
* Function Id
|
|
2259
2226
|
*
|
|
@@ -2340,6 +2307,12 @@ type FunctionListItemResponse = {
|
|
|
2340
2307
|
* Whether the build is finished and the function may be healed automatically. Can only be enabled on a function that has a thread for self-heal to resume.
|
|
2341
2308
|
*/
|
|
2342
2309
|
self_healing?: boolean;
|
|
2310
|
+
/**
|
|
2311
|
+
* Domain
|
|
2312
|
+
*
|
|
2313
|
+
* The site this function drives, used to group endpoints in the console. Null when the function never named a site.
|
|
2314
|
+
*/
|
|
2315
|
+
domain?: string | null;
|
|
2343
2316
|
/**
|
|
2344
2317
|
* Workflow Id
|
|
2345
2318
|
*/
|
|
@@ -2349,6 +2322,22 @@ type FunctionListItemResponse = {
|
|
|
2349
2322
|
* FunctionMetadataUpdateRequest
|
|
2350
2323
|
*/
|
|
2351
2324
|
type FunctionMetadataUpdateRequest = {
|
|
2325
|
+
/**
|
|
2326
|
+
* Default Runtime
|
|
2327
|
+
*/
|
|
2328
|
+
default_runtime?: 'standard' | 'extended' | null;
|
|
2329
|
+
/**
|
|
2330
|
+
* Name
|
|
2331
|
+
*/
|
|
2332
|
+
name?: string | null;
|
|
2333
|
+
/**
|
|
2334
|
+
* Description
|
|
2335
|
+
*/
|
|
2336
|
+
description?: string | null;
|
|
2337
|
+
/**
|
|
2338
|
+
* Domain
|
|
2339
|
+
*/
|
|
2340
|
+
domain?: string | null;
|
|
2352
2341
|
/**
|
|
2353
2342
|
* Instructions
|
|
2354
2343
|
*/
|
|
@@ -2357,11 +2346,23 @@ type FunctionMetadataUpdateRequest = {
|
|
|
2357
2346
|
* Self Healing
|
|
2358
2347
|
*/
|
|
2359
2348
|
self_healing?: boolean | null;
|
|
2349
|
+
/**
|
|
2350
|
+
* Response Format
|
|
2351
|
+
*
|
|
2352
|
+
* JSON Schema of run()'s return value, computed by the caller from its pydantic model
|
|
2353
|
+
*/
|
|
2354
|
+
response_format?: {
|
|
2355
|
+
[key: string]: unknown;
|
|
2356
|
+
} | null;
|
|
2360
2357
|
};
|
|
2361
2358
|
/**
|
|
2362
2359
|
* FunctionResponse
|
|
2363
2360
|
*/
|
|
2364
2361
|
type FunctionResponse = {
|
|
2362
|
+
/**
|
|
2363
|
+
* Default Runtime
|
|
2364
|
+
*/
|
|
2365
|
+
default_runtime?: 'standard' | 'extended';
|
|
2365
2366
|
/**
|
|
2366
2367
|
* Function Id
|
|
2367
2368
|
*
|
|
@@ -2448,12 +2449,26 @@ type FunctionResponse = {
|
|
|
2448
2449
|
* Whether the build is finished and the function may be healed automatically. Can only be enabled on a function that has a thread for self-heal to resume.
|
|
2449
2450
|
*/
|
|
2450
2451
|
self_healing?: boolean;
|
|
2452
|
+
/**
|
|
2453
|
+
* Domain
|
|
2454
|
+
*
|
|
2455
|
+
* The site this function drives, used to group endpoints in the console. Null when the function never named a site.
|
|
2456
|
+
*/
|
|
2457
|
+
domain?: string | null;
|
|
2451
2458
|
/**
|
|
2452
2459
|
* Instructions
|
|
2453
2460
|
*
|
|
2454
2461
|
* Builder's operating notes: typical run duration, known failure modes, which parameters matter.
|
|
2455
2462
|
*/
|
|
2456
2463
|
instructions?: string | null;
|
|
2464
|
+
/**
|
|
2465
|
+
* Response Format
|
|
2466
|
+
*
|
|
2467
|
+
* JSON Schema of the value run() returns, or null when the author never documented one.
|
|
2468
|
+
*/
|
|
2469
|
+
response_format?: {
|
|
2470
|
+
[key: string]: unknown;
|
|
2471
|
+
} | null;
|
|
2457
2472
|
/**
|
|
2458
2473
|
* Schedule Cron
|
|
2459
2474
|
*
|
|
@@ -2664,6 +2679,10 @@ type FunctionWithLinkResponse = {
|
|
|
2664
2679
|
* URL to download file from
|
|
2665
2680
|
*/
|
|
2666
2681
|
url: string;
|
|
2682
|
+
/**
|
|
2683
|
+
* Default Runtime
|
|
2684
|
+
*/
|
|
2685
|
+
default_runtime?: 'standard' | 'extended';
|
|
2667
2686
|
/**
|
|
2668
2687
|
* Function Id
|
|
2669
2688
|
*
|
|
@@ -2750,12 +2769,26 @@ type FunctionWithLinkResponse = {
|
|
|
2750
2769
|
* Whether the build is finished and the function may be healed automatically. Can only be enabled on a function that has a thread for self-heal to resume.
|
|
2751
2770
|
*/
|
|
2752
2771
|
self_healing?: boolean;
|
|
2772
|
+
/**
|
|
2773
|
+
* Domain
|
|
2774
|
+
*
|
|
2775
|
+
* The site this function drives, used to group endpoints in the console. Null when the function never named a site.
|
|
2776
|
+
*/
|
|
2777
|
+
domain?: string | null;
|
|
2753
2778
|
/**
|
|
2754
2779
|
* Instructions
|
|
2755
2780
|
*
|
|
2756
2781
|
* Builder's operating notes: typical run duration, known failure modes, which parameters matter.
|
|
2757
2782
|
*/
|
|
2758
2783
|
instructions?: string | null;
|
|
2784
|
+
/**
|
|
2785
|
+
* Response Format
|
|
2786
|
+
*
|
|
2787
|
+
* JSON Schema of the value run() returns, or null when the author never documented one.
|
|
2788
|
+
*/
|
|
2789
|
+
response_format?: {
|
|
2790
|
+
[key: string]: unknown;
|
|
2791
|
+
} | null;
|
|
2759
2792
|
/**
|
|
2760
2793
|
* Schedule Cron
|
|
2761
2794
|
*
|
|
@@ -2947,12 +2980,6 @@ type GlobalScrapeRequest = {
|
|
|
2947
2980
|
* The CDP URL of another remote session provider.
|
|
2948
2981
|
*/
|
|
2949
2982
|
cdp_url?: string | null;
|
|
2950
|
-
/**
|
|
2951
|
-
* Use File Storage
|
|
2952
|
-
*
|
|
2953
|
-
* Whether FileStorage should be attached to the session.
|
|
2954
|
-
*/
|
|
2955
|
-
use_file_storage?: boolean;
|
|
2956
2983
|
/**
|
|
2957
2984
|
* Screenshot Type
|
|
2958
2985
|
*
|
|
@@ -3114,6 +3141,10 @@ type GotoAction = {
|
|
|
3114
3141
|
* Url
|
|
3115
3142
|
*/
|
|
3116
3143
|
url: string;
|
|
3144
|
+
/**
|
|
3145
|
+
* Wait Until
|
|
3146
|
+
*/
|
|
3147
|
+
wait_until?: 'commit' | 'domcontentloaded' | 'load' | 'networkidle' | null;
|
|
3117
3148
|
};
|
|
3118
3149
|
/**
|
|
3119
3150
|
* GotoNewTabAction
|
|
@@ -3310,17 +3341,6 @@ type ListCredentialsResponse = {
|
|
|
3310
3341
|
*/
|
|
3311
3342
|
credentials: Array<Credential>;
|
|
3312
3343
|
};
|
|
3313
|
-
/**
|
|
3314
|
-
* ListFilesResponse
|
|
3315
|
-
*/
|
|
3316
|
-
type ListFilesResponse = {
|
|
3317
|
-
/**
|
|
3318
|
-
* Files
|
|
3319
|
-
*
|
|
3320
|
-
* List of files with metadata
|
|
3321
|
-
*/
|
|
3322
|
-
files: Array<FileInfo>;
|
|
3323
|
-
};
|
|
3324
3344
|
/**
|
|
3325
3345
|
* LlmModel
|
|
3326
3346
|
*/
|
|
@@ -3999,9 +4019,15 @@ type PersonaResponse = {
|
|
|
3999
4019
|
/**
|
|
4000
4020
|
* Email
|
|
4001
4021
|
*
|
|
4002
|
-
*
|
|
4022
|
+
* Public, human-readable email address of the persona
|
|
4003
4023
|
*/
|
|
4004
4024
|
email: string;
|
|
4025
|
+
/**
|
|
4026
|
+
* Internal Email
|
|
4027
|
+
*
|
|
4028
|
+
* Internal UUID-backed mailbox address of the persona
|
|
4029
|
+
*/
|
|
4030
|
+
internal_email: string;
|
|
4005
4031
|
/**
|
|
4006
4032
|
* Vault Id
|
|
4007
4033
|
*
|
|
@@ -4018,6 +4044,10 @@ type PersonaResponse = {
|
|
|
4018
4044
|
* Name
|
|
4019
4045
|
*/
|
|
4020
4046
|
name?: string | null;
|
|
4047
|
+
/**
|
|
4048
|
+
* Created At
|
|
4049
|
+
*/
|
|
4050
|
+
created_at: string;
|
|
4021
4051
|
};
|
|
4022
4052
|
/**
|
|
4023
4053
|
* PersonaUpdateRequest
|
|
@@ -4178,6 +4208,39 @@ type ReloadAction = {
|
|
|
4178
4208
|
*/
|
|
4179
4209
|
description?: string;
|
|
4180
4210
|
};
|
|
4211
|
+
/**
|
|
4212
|
+
* ReplayMissingResponse
|
|
4213
|
+
*/
|
|
4214
|
+
type ReplayMissingResponse = {
|
|
4215
|
+
/**
|
|
4216
|
+
* Detail
|
|
4217
|
+
*/
|
|
4218
|
+
detail: string;
|
|
4219
|
+
/**
|
|
4220
|
+
* Session Id
|
|
4221
|
+
*/
|
|
4222
|
+
session_id: string | null;
|
|
4223
|
+
/**
|
|
4224
|
+
* Status
|
|
4225
|
+
*/
|
|
4226
|
+
status: number;
|
|
4227
|
+
/**
|
|
4228
|
+
* Error
|
|
4229
|
+
*/
|
|
4230
|
+
error: string;
|
|
4231
|
+
/**
|
|
4232
|
+
* Message
|
|
4233
|
+
*/
|
|
4234
|
+
message: string;
|
|
4235
|
+
/**
|
|
4236
|
+
* Replay Status
|
|
4237
|
+
*/
|
|
4238
|
+
replay_status: 'waiting_for_session' | 'processing' | 'unavailable' | 'failed' | 'unknown';
|
|
4239
|
+
/**
|
|
4240
|
+
* Retryable
|
|
4241
|
+
*/
|
|
4242
|
+
retryable: boolean;
|
|
4243
|
+
};
|
|
4181
4244
|
/**
|
|
4182
4245
|
* ReplayResponse
|
|
4183
4246
|
*/
|
|
@@ -4225,6 +4288,12 @@ type RunFunctionRequest = {
|
|
|
4225
4288
|
variables: {
|
|
4226
4289
|
[key: string]: unknown;
|
|
4227
4290
|
};
|
|
4291
|
+
/**
|
|
4292
|
+
* Runtime
|
|
4293
|
+
*
|
|
4294
|
+
* Override the saved function runtime; omit to inherit its default
|
|
4295
|
+
*/
|
|
4296
|
+
runtime?: 'standard' | 'extended' | null;
|
|
4228
4297
|
/**
|
|
4229
4298
|
* Stream
|
|
4230
4299
|
*
|
|
@@ -4810,6 +4879,65 @@ type SessionDebugResponse = {
|
|
|
4810
4879
|
*/
|
|
4811
4880
|
tabs: Array<TabSessionDebugResponse>;
|
|
4812
4881
|
};
|
|
4882
|
+
/**
|
|
4883
|
+
* SessionFile
|
|
4884
|
+
*/
|
|
4885
|
+
type SessionFile = {
|
|
4886
|
+
/**
|
|
4887
|
+
* Id
|
|
4888
|
+
*/
|
|
4889
|
+
id: string;
|
|
4890
|
+
/**
|
|
4891
|
+
* Session Id
|
|
4892
|
+
*/
|
|
4893
|
+
session_id: string;
|
|
4894
|
+
/**
|
|
4895
|
+
* Filename
|
|
4896
|
+
*/
|
|
4897
|
+
filename: string;
|
|
4898
|
+
/**
|
|
4899
|
+
* Mime Type
|
|
4900
|
+
*/
|
|
4901
|
+
mime_type: string;
|
|
4902
|
+
/**
|
|
4903
|
+
* Size
|
|
4904
|
+
*/
|
|
4905
|
+
size: number;
|
|
4906
|
+
/**
|
|
4907
|
+
* Checksum
|
|
4908
|
+
*/
|
|
4909
|
+
checksum: string;
|
|
4910
|
+
/**
|
|
4911
|
+
* Created At
|
|
4912
|
+
*/
|
|
4913
|
+
created_at: string;
|
|
4914
|
+
/**
|
|
4915
|
+
* Expires At
|
|
4916
|
+
*/
|
|
4917
|
+
expires_at: string;
|
|
4918
|
+
source: FileSource;
|
|
4919
|
+
};
|
|
4920
|
+
/**
|
|
4921
|
+
* SessionFilesPage
|
|
4922
|
+
*/
|
|
4923
|
+
type SessionFilesPage = {
|
|
4924
|
+
/**
|
|
4925
|
+
* Files
|
|
4926
|
+
*/
|
|
4927
|
+
files: Array<SessionFile>;
|
|
4928
|
+
/**
|
|
4929
|
+
* Total
|
|
4930
|
+
*/
|
|
4931
|
+
total: number;
|
|
4932
|
+
/**
|
|
4933
|
+
* Limit
|
|
4934
|
+
*/
|
|
4935
|
+
limit: number;
|
|
4936
|
+
/**
|
|
4937
|
+
* Offset
|
|
4938
|
+
*/
|
|
4939
|
+
offset: number;
|
|
4940
|
+
};
|
|
4813
4941
|
/**
|
|
4814
4942
|
* SessionOffsetResponse
|
|
4815
4943
|
*/
|
|
@@ -4920,12 +5048,6 @@ type SessionResponse = {
|
|
|
4920
5048
|
* Browser Type
|
|
4921
5049
|
*/
|
|
4922
5050
|
browser_type?: 'chromium' | 'chrome' | 'firefox' | 'chrome-nightly' | 'chrome-turbo';
|
|
4923
|
-
/**
|
|
4924
|
-
* Use File Storage
|
|
4925
|
-
*
|
|
4926
|
-
* Whether FileStorage was attached to the session.
|
|
4927
|
-
*/
|
|
4928
|
-
use_file_storage?: boolean;
|
|
4929
5051
|
/**
|
|
4930
5052
|
* Network Request Bytes
|
|
4931
5053
|
*
|
|
@@ -5847,6 +5969,10 @@ type FormFillActionWritable = {
|
|
|
5847
5969
|
* FunctionListItemResponse
|
|
5848
5970
|
*/
|
|
5849
5971
|
type FunctionListItemResponseWritable = {
|
|
5972
|
+
/**
|
|
5973
|
+
* Default Runtime
|
|
5974
|
+
*/
|
|
5975
|
+
default_runtime?: 'standard' | 'extended';
|
|
5850
5976
|
/**
|
|
5851
5977
|
* Function Id
|
|
5852
5978
|
*
|
|
@@ -5933,11 +6059,21 @@ type FunctionListItemResponseWritable = {
|
|
|
5933
6059
|
* Whether the build is finished and the function may be healed automatically. Can only be enabled on a function that has a thread for self-heal to resume.
|
|
5934
6060
|
*/
|
|
5935
6061
|
self_healing?: boolean;
|
|
6062
|
+
/**
|
|
6063
|
+
* Domain
|
|
6064
|
+
*
|
|
6065
|
+
* The site this function drives, used to group endpoints in the console. Null when the function never named a site.
|
|
6066
|
+
*/
|
|
6067
|
+
domain?: string | null;
|
|
5936
6068
|
};
|
|
5937
6069
|
/**
|
|
5938
6070
|
* FunctionResponse
|
|
5939
6071
|
*/
|
|
5940
6072
|
type FunctionResponseWritable = {
|
|
6073
|
+
/**
|
|
6074
|
+
* Default Runtime
|
|
6075
|
+
*/
|
|
6076
|
+
default_runtime?: 'standard' | 'extended';
|
|
5941
6077
|
/**
|
|
5942
6078
|
* Function Id
|
|
5943
6079
|
*
|
|
@@ -6024,12 +6160,26 @@ type FunctionResponseWritable = {
|
|
|
6024
6160
|
* Whether the build is finished and the function may be healed automatically. Can only be enabled on a function that has a thread for self-heal to resume.
|
|
6025
6161
|
*/
|
|
6026
6162
|
self_healing?: boolean;
|
|
6163
|
+
/**
|
|
6164
|
+
* Domain
|
|
6165
|
+
*
|
|
6166
|
+
* The site this function drives, used to group endpoints in the console. Null when the function never named a site.
|
|
6167
|
+
*/
|
|
6168
|
+
domain?: string | null;
|
|
6027
6169
|
/**
|
|
6028
6170
|
* Instructions
|
|
6029
6171
|
*
|
|
6030
6172
|
* Builder's operating notes: typical run duration, known failure modes, which parameters matter.
|
|
6031
6173
|
*/
|
|
6032
6174
|
instructions?: string | null;
|
|
6175
|
+
/**
|
|
6176
|
+
* Response Format
|
|
6177
|
+
*
|
|
6178
|
+
* JSON Schema of the value run() returns, or null when the author never documented one.
|
|
6179
|
+
*/
|
|
6180
|
+
response_format?: {
|
|
6181
|
+
[key: string]: unknown;
|
|
6182
|
+
} | null;
|
|
6033
6183
|
/**
|
|
6034
6184
|
* Schedule Cron
|
|
6035
6185
|
*
|
|
@@ -6098,6 +6248,10 @@ type FunctionWithLinkResponseWritable = {
|
|
|
6098
6248
|
* URL to download file from
|
|
6099
6249
|
*/
|
|
6100
6250
|
url: string;
|
|
6251
|
+
/**
|
|
6252
|
+
* Default Runtime
|
|
6253
|
+
*/
|
|
6254
|
+
default_runtime?: 'standard' | 'extended';
|
|
6101
6255
|
/**
|
|
6102
6256
|
* Function Id
|
|
6103
6257
|
*
|
|
@@ -6184,12 +6338,26 @@ type FunctionWithLinkResponseWritable = {
|
|
|
6184
6338
|
* Whether the build is finished and the function may be healed automatically. Can only be enabled on a function that has a thread for self-heal to resume.
|
|
6185
6339
|
*/
|
|
6186
6340
|
self_healing?: boolean;
|
|
6341
|
+
/**
|
|
6342
|
+
* Domain
|
|
6343
|
+
*
|
|
6344
|
+
* The site this function drives, used to group endpoints in the console. Null when the function never named a site.
|
|
6345
|
+
*/
|
|
6346
|
+
domain?: string | null;
|
|
6187
6347
|
/**
|
|
6188
6348
|
* Instructions
|
|
6189
6349
|
*
|
|
6190
6350
|
* Builder's operating notes: typical run duration, known failure modes, which parameters matter.
|
|
6191
6351
|
*/
|
|
6192
6352
|
instructions?: string | null;
|
|
6353
|
+
/**
|
|
6354
|
+
* Response Format
|
|
6355
|
+
*
|
|
6356
|
+
* JSON Schema of the value run() returns, or null when the author never documented one.
|
|
6357
|
+
*/
|
|
6358
|
+
response_format?: {
|
|
6359
|
+
[key: string]: unknown;
|
|
6360
|
+
} | null;
|
|
6193
6361
|
/**
|
|
6194
6362
|
* Schedule Cron
|
|
6195
6363
|
*
|
|
@@ -6750,12 +6918,6 @@ type SessionResponseWritable = {
|
|
|
6750
6918
|
* Browser Type
|
|
6751
6919
|
*/
|
|
6752
6920
|
browser_type?: 'chromium' | 'chrome' | 'firefox' | 'chrome-nightly' | 'chrome-turbo';
|
|
6753
|
-
/**
|
|
6754
|
-
* Use File Storage
|
|
6755
|
-
*
|
|
6756
|
-
* Whether FileStorage was attached to the session.
|
|
6757
|
-
*/
|
|
6758
|
-
use_file_storage?: boolean;
|
|
6759
6921
|
/**
|
|
6760
6922
|
* Network Request Bytes
|
|
6761
6923
|
*
|
|
@@ -7506,6 +7668,14 @@ type SessionReplayData = {
|
|
|
7506
7668
|
url: '/sessions/{session_id}/replay';
|
|
7507
7669
|
};
|
|
7508
7670
|
type SessionReplayErrors = {
|
|
7671
|
+
/**
|
|
7672
|
+
* Replay missing; see replay_status and retryable.
|
|
7673
|
+
*/
|
|
7674
|
+
404: ReplayMissingResponse;
|
|
7675
|
+
/**
|
|
7676
|
+
* Capture completed without any frames.
|
|
7677
|
+
*/
|
|
7678
|
+
410: ReplayMissingResponse;
|
|
7509
7679
|
/**
|
|
7510
7680
|
* Validation Error
|
|
7511
7681
|
*/
|
|
@@ -7519,8 +7689,8 @@ type SessionReplayResponses = {
|
|
|
7519
7689
|
200: ReplayResponse;
|
|
7520
7690
|
};
|
|
7521
7691
|
type SessionReplayResponse = SessionReplayResponses[keyof SessionReplayResponses];
|
|
7522
|
-
type
|
|
7523
|
-
body
|
|
7692
|
+
type ListSessionFilesData = {
|
|
7693
|
+
body?: never;
|
|
7524
7694
|
headers?: {
|
|
7525
7695
|
/**
|
|
7526
7696
|
* X-Notte-Request-Origin
|
|
@@ -7531,15 +7701,179 @@ type AgentStartData = {
|
|
|
7531
7701
|
*/
|
|
7532
7702
|
'x-notte-sdk-version'?: string | null;
|
|
7533
7703
|
};
|
|
7534
|
-
path
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7704
|
+
path: {
|
|
7705
|
+
/**
|
|
7706
|
+
* Session Id
|
|
7707
|
+
*/
|
|
7708
|
+
session_id: string;
|
|
7709
|
+
};
|
|
7710
|
+
query?: {
|
|
7711
|
+
/**
|
|
7712
|
+
* Source
|
|
7713
|
+
*/
|
|
7714
|
+
source?: FileSource | null;
|
|
7715
|
+
/**
|
|
7716
|
+
* Limit
|
|
7717
|
+
*/
|
|
7718
|
+
limit?: number;
|
|
7719
|
+
/**
|
|
7720
|
+
* Offset
|
|
7721
|
+
*/
|
|
7722
|
+
offset?: number;
|
|
7723
|
+
};
|
|
7724
|
+
url: '/sessions/{session_id}/files';
|
|
7725
|
+
};
|
|
7726
|
+
type ListSessionFilesErrors = {
|
|
7727
|
+
/**
|
|
7728
|
+
* Validation Error
|
|
7729
|
+
*/
|
|
7730
|
+
422: HttpValidationError;
|
|
7731
|
+
};
|
|
7732
|
+
type ListSessionFilesError = ListSessionFilesErrors[keyof ListSessionFilesErrors];
|
|
7733
|
+
type ListSessionFilesResponses = {
|
|
7734
|
+
/**
|
|
7735
|
+
* Successful Response
|
|
7736
|
+
*/
|
|
7737
|
+
200: SessionFilesPage;
|
|
7738
|
+
};
|
|
7739
|
+
type ListSessionFilesResponse = ListSessionFilesResponses[keyof ListSessionFilesResponses];
|
|
7740
|
+
type UploadSessionFileData = {
|
|
7741
|
+
body: BodyUploadSessionFileSessionsSessionIdFilesPost;
|
|
7742
|
+
headers?: {
|
|
7743
|
+
/**
|
|
7744
|
+
* X-Notte-Request-Origin
|
|
7745
|
+
*/
|
|
7746
|
+
'x-notte-request-origin'?: string | null;
|
|
7747
|
+
/**
|
|
7748
|
+
* X-Notte-Sdk-Version
|
|
7749
|
+
*/
|
|
7750
|
+
'x-notte-sdk-version'?: string | null;
|
|
7751
|
+
};
|
|
7752
|
+
path: {
|
|
7753
|
+
/**
|
|
7754
|
+
* Session Id
|
|
7755
|
+
*/
|
|
7756
|
+
session_id: string;
|
|
7757
|
+
};
|
|
7758
|
+
query?: never;
|
|
7759
|
+
url: '/sessions/{session_id}/files';
|
|
7760
|
+
};
|
|
7761
|
+
type UploadSessionFileErrors = {
|
|
7762
|
+
/**
|
|
7763
|
+
* Validation Error
|
|
7764
|
+
*/
|
|
7765
|
+
422: HttpValidationError;
|
|
7766
|
+
};
|
|
7767
|
+
type UploadSessionFileError = UploadSessionFileErrors[keyof UploadSessionFileErrors];
|
|
7768
|
+
type UploadSessionFileResponses = {
|
|
7769
|
+
/**
|
|
7770
|
+
* Successful Response
|
|
7771
|
+
*/
|
|
7772
|
+
201: SessionFile;
|
|
7773
|
+
};
|
|
7774
|
+
type UploadSessionFileResponse = UploadSessionFileResponses[keyof UploadSessionFileResponses];
|
|
7775
|
+
type DeleteSessionFileData = {
|
|
7776
|
+
body?: never;
|
|
7777
|
+
headers?: {
|
|
7778
|
+
/**
|
|
7779
|
+
* X-Notte-Request-Origin
|
|
7780
|
+
*/
|
|
7781
|
+
'x-notte-request-origin'?: string | null;
|
|
7782
|
+
/**
|
|
7783
|
+
* X-Notte-Sdk-Version
|
|
7784
|
+
*/
|
|
7785
|
+
'x-notte-sdk-version'?: string | null;
|
|
7786
|
+
};
|
|
7787
|
+
path: {
|
|
7788
|
+
/**
|
|
7789
|
+
* Session Id
|
|
7790
|
+
*/
|
|
7791
|
+
session_id: string;
|
|
7792
|
+
/**
|
|
7793
|
+
* File Id
|
|
7794
|
+
*/
|
|
7795
|
+
file_id: string;
|
|
7796
|
+
};
|
|
7797
|
+
query?: never;
|
|
7798
|
+
url: '/sessions/{session_id}/files/{file_id}';
|
|
7799
|
+
};
|
|
7800
|
+
type DeleteSessionFileErrors = {
|
|
7801
|
+
/**
|
|
7802
|
+
* Validation Error
|
|
7803
|
+
*/
|
|
7804
|
+
422: HttpValidationError;
|
|
7805
|
+
};
|
|
7806
|
+
type DeleteSessionFileError = DeleteSessionFileErrors[keyof DeleteSessionFileErrors];
|
|
7807
|
+
type DeleteSessionFileResponses = {
|
|
7808
|
+
/**
|
|
7809
|
+
* Successful Response
|
|
7810
|
+
*/
|
|
7811
|
+
204: void;
|
|
7812
|
+
};
|
|
7813
|
+
type DeleteSessionFileResponse = DeleteSessionFileResponses[keyof DeleteSessionFileResponses];
|
|
7814
|
+
type DownloadSessionFileData = {
|
|
7815
|
+
body?: never;
|
|
7816
|
+
headers?: {
|
|
7817
|
+
/**
|
|
7818
|
+
* X-Notte-Request-Origin
|
|
7819
|
+
*/
|
|
7820
|
+
'x-notte-request-origin'?: string | null;
|
|
7821
|
+
/**
|
|
7822
|
+
* X-Notte-Sdk-Version
|
|
7823
|
+
*/
|
|
7824
|
+
'x-notte-sdk-version'?: string | null;
|
|
7825
|
+
};
|
|
7826
|
+
path: {
|
|
7827
|
+
/**
|
|
7828
|
+
* Session Id
|
|
7829
|
+
*/
|
|
7830
|
+
session_id: string;
|
|
7831
|
+
/**
|
|
7832
|
+
* File Id
|
|
7833
|
+
*/
|
|
7834
|
+
file_id: string;
|
|
7835
|
+
};
|
|
7836
|
+
query?: never;
|
|
7837
|
+
url: '/sessions/{session_id}/files/{file_id}';
|
|
7838
|
+
};
|
|
7839
|
+
type DownloadSessionFileErrors = {
|
|
7840
|
+
/**
|
|
7841
|
+
* File expired
|
|
7842
|
+
*/
|
|
7843
|
+
410: unknown;
|
|
7844
|
+
/**
|
|
7845
|
+
* Validation Error
|
|
7846
|
+
*/
|
|
7847
|
+
422: HttpValidationError;
|
|
7848
|
+
};
|
|
7849
|
+
type DownloadSessionFileError = DownloadSessionFileErrors[keyof DownloadSessionFileErrors];
|
|
7850
|
+
type DownloadSessionFileResponses = {
|
|
7851
|
+
/**
|
|
7852
|
+
* Successful Response
|
|
7853
|
+
*/
|
|
7854
|
+
200: unknown;
|
|
7855
|
+
};
|
|
7856
|
+
type AgentStartData = {
|
|
7857
|
+
body: ApiAgentStartRequest;
|
|
7858
|
+
headers?: {
|
|
7859
|
+
/**
|
|
7860
|
+
* X-Notte-Request-Origin
|
|
7861
|
+
*/
|
|
7862
|
+
'x-notte-request-origin'?: string | null;
|
|
7863
|
+
/**
|
|
7864
|
+
* X-Notte-Sdk-Version
|
|
7865
|
+
*/
|
|
7866
|
+
'x-notte-sdk-version'?: string | null;
|
|
7867
|
+
};
|
|
7868
|
+
path?: never;
|
|
7869
|
+
query?: never;
|
|
7870
|
+
url: '/agents/start';
|
|
7871
|
+
};
|
|
7872
|
+
type AgentStartErrors = {
|
|
7873
|
+
/**
|
|
7874
|
+
* Validation Error
|
|
7875
|
+
*/
|
|
7876
|
+
422: HttpValidationError;
|
|
7543
7877
|
};
|
|
7544
7878
|
type AgentStartError = AgentStartErrors[keyof AgentStartErrors];
|
|
7545
7879
|
type AgentStartResponses = {
|
|
@@ -8179,6 +8513,10 @@ type FunctionRunStartData = {
|
|
|
8179
8513
|
* X-Notte-Api-Key
|
|
8180
8514
|
*/
|
|
8181
8515
|
'x-notte-api-key': string;
|
|
8516
|
+
/**
|
|
8517
|
+
* X-Db-Preview
|
|
8518
|
+
*/
|
|
8519
|
+
'x-db-preview'?: string | null;
|
|
8182
8520
|
/**
|
|
8183
8521
|
* X-Notte-Request-Origin
|
|
8184
8522
|
*/
|
|
@@ -9889,7 +10227,7 @@ type GetUsageLogsData = {
|
|
|
9889
10227
|
*
|
|
9890
10228
|
* The endpoint to filter logs by
|
|
9891
10229
|
*/
|
|
9892
|
-
endpoint?: 'sessions.start' | 'sessions.stop' | 'sessions.status' | 'sessions.cookies.set' | 'sessions.cookies.get' | 'sessions.list' | 'sessions.replay' | 'sessions.offset' | 'sessions.debug.info' | 'sessions.debug.info.tab' | 'sessions.debug.recording.wss' | 'sessions.debug.log.wss' | 'sessions.debug.tab.wss' | 'sessions.debug.browser.wss' | 'sessions.network.logs' | 'sessions.script' | 'page.observe' | 'page.execute' | 'page.scrape' | 'profiles.create' | 'profiles.duplicate' | 'profiles.get' | 'profiles.list' | 'profiles.delete' | 'profiles.cookies.set' | 'profiles.cookies.get' | 'vaults.create' | 'vaults.list' | 'vaults.delete' | 'vaults.update' | 'vaults.credentials.add' | 'vaults.credentials.get' | 'vaults.credentials.delete' | 'vaults.credentials.list' | 'vaults.credit_card.set' | 'vaults.credit_card.get' | 'vaults.credit_card.delete' | 'personas.create' | 'personas.list' | 'personas.delete' | 'personas.emails' | 'personas.sms' | 'personas.number.create' | 'personas.get' | 'personas.update' | 'mailboxes.connect' | 'mailboxes.sync' | 'mailboxes.list' | 'mailboxes.get' | 'mailboxes.update' | 'mailboxes.delete' | '
|
|
10230
|
+
endpoint?: 'sessions.start' | 'sessions.stop' | 'sessions.status' | 'sessions.cookies.set' | 'sessions.cookies.get' | 'sessions.list' | 'sessions.replay' | 'sessions.offset' | 'sessions.debug.info' | 'sessions.debug.info.tab' | 'sessions.debug.recording.wss' | 'sessions.debug.log.wss' | 'sessions.debug.tab.wss' | 'sessions.debug.browser.wss' | 'sessions.network.logs' | 'sessions.script' | 'page.observe' | 'page.execute' | 'page.scrape' | 'profiles.create' | 'profiles.duplicate' | 'profiles.get' | 'profiles.list' | 'profiles.delete' | 'profiles.cookies.set' | 'profiles.cookies.get' | 'vaults.create' | 'vaults.list' | 'vaults.delete' | 'vaults.update' | 'vaults.credentials.add' | 'vaults.credentials.get' | 'vaults.credentials.delete' | 'vaults.credentials.list' | 'vaults.credit_card.set' | 'vaults.credit_card.get' | 'vaults.credit_card.delete' | 'personas.create' | 'personas.list' | 'personas.delete' | 'personas.emails' | 'personas.sms' | 'personas.number.create' | 'personas.get' | 'personas.update' | 'mailboxes.connect' | 'mailboxes.sync' | 'mailboxes.list' | 'mailboxes.get' | 'mailboxes.update' | 'mailboxes.delete' | 'sessions.files.upload' | 'sessions.files.list' | 'sessions.files.download' | 'sessions.files.delete' | 'agents.start' | 'agents.stop' | 'agents.status' | 'agents.list' | 'agents.replay' | 'agents.debug.recording' | 'agents.save' | 'agents.repeat' | 'agents.script' | 'bua' | 'scrape' | 'scrape_from_html' | 'search' | 'usage' | 'workflows.upload' | 'workflows.download' | 'workflows.list' | 'workflows.delete' | 'workflows.update' | 'workflows.fork' | 'workflows.rollback' | 'workflows.schedule.create' | 'workflows.schedule.delete' | 'workflows.runs.create' | 'workflows.runs.start' | 'workflows.runs.get' | 'workflows.runs.list' | 'workflows.runs.update' | 'workflows.runs.stop' | null;
|
|
9893
10231
|
/**
|
|
9894
10232
|
* Page
|
|
9895
10233
|
*
|
|
@@ -9937,8 +10275,8 @@ type GetUsageLogsResponses = {
|
|
|
9937
10275
|
200: PaginatedResponseUsageLog;
|
|
9938
10276
|
};
|
|
9939
10277
|
type GetUsageLogsResponse = GetUsageLogsResponses[keyof GetUsageLogsResponses];
|
|
9940
|
-
type
|
|
9941
|
-
body
|
|
10278
|
+
type AnythingStartData = {
|
|
10279
|
+
body: AnythingStartRequest;
|
|
9942
10280
|
headers?: {
|
|
9943
10281
|
/**
|
|
9944
10282
|
* X-Notte-Request-Origin
|
|
@@ -9949,37 +10287,25 @@ type FileDownloadData = {
|
|
|
9949
10287
|
*/
|
|
9950
10288
|
'x-notte-sdk-version'?: string | null;
|
|
9951
10289
|
};
|
|
9952
|
-
path
|
|
9953
|
-
/**
|
|
9954
|
-
* Session Id
|
|
9955
|
-
*/
|
|
9956
|
-
session_id: string;
|
|
9957
|
-
/**
|
|
9958
|
-
* Filename
|
|
9959
|
-
*/
|
|
9960
|
-
filename: string;
|
|
9961
|
-
};
|
|
10290
|
+
path?: never;
|
|
9962
10291
|
query?: never;
|
|
9963
|
-
url: '/
|
|
10292
|
+
url: '/anything/start';
|
|
9964
10293
|
};
|
|
9965
|
-
type
|
|
10294
|
+
type AnythingStartErrors = {
|
|
9966
10295
|
/**
|
|
9967
10296
|
* Validation Error
|
|
9968
10297
|
*/
|
|
9969
10298
|
422: HttpValidationError;
|
|
9970
10299
|
};
|
|
9971
|
-
type
|
|
9972
|
-
type
|
|
10300
|
+
type AnythingStartError = AnythingStartErrors[keyof AnythingStartErrors];
|
|
10301
|
+
type AnythingStartResponses = {
|
|
9973
10302
|
/**
|
|
9974
|
-
* Response File Download Storage Session Id Downloads Filename Get
|
|
9975
|
-
*
|
|
9976
10303
|
* Successful Response
|
|
9977
10304
|
*/
|
|
9978
|
-
200:
|
|
10305
|
+
200: unknown;
|
|
9979
10306
|
};
|
|
9980
|
-
type
|
|
9981
|
-
|
|
9982
|
-
body: BodyFileUploadDownloadedFileStorageSessionIdDownloadsFilenamePost;
|
|
10307
|
+
type ListSecretsData = {
|
|
10308
|
+
body?: never;
|
|
9983
10309
|
headers?: {
|
|
9984
10310
|
/**
|
|
9985
10311
|
* X-Notte-Request-Origin
|
|
@@ -9990,35 +10316,31 @@ type FileUploadDownloadedFileData = {
|
|
|
9990
10316
|
*/
|
|
9991
10317
|
'x-notte-sdk-version'?: string | null;
|
|
9992
10318
|
};
|
|
9993
|
-
path
|
|
9994
|
-
|
|
9995
|
-
* Session Id
|
|
9996
|
-
*/
|
|
9997
|
-
session_id: string;
|
|
10319
|
+
path?: never;
|
|
10320
|
+
query?: {
|
|
9998
10321
|
/**
|
|
9999
|
-
*
|
|
10322
|
+
* Namespace
|
|
10000
10323
|
*/
|
|
10001
|
-
|
|
10324
|
+
namespace?: SecretNamespace | null;
|
|
10002
10325
|
};
|
|
10003
|
-
|
|
10004
|
-
url: '/storage/{session_id}/downloads/{filename}';
|
|
10326
|
+
url: '/secrets';
|
|
10005
10327
|
};
|
|
10006
|
-
type
|
|
10328
|
+
type ListSecretsErrors = {
|
|
10007
10329
|
/**
|
|
10008
10330
|
* Validation Error
|
|
10009
10331
|
*/
|
|
10010
10332
|
422: HttpValidationError;
|
|
10011
10333
|
};
|
|
10012
|
-
type
|
|
10013
|
-
type
|
|
10334
|
+
type ListSecretsError = ListSecretsErrors[keyof ListSecretsErrors];
|
|
10335
|
+
type ListSecretsResponses = {
|
|
10014
10336
|
/**
|
|
10015
10337
|
* Successful Response
|
|
10016
10338
|
*/
|
|
10017
|
-
200:
|
|
10339
|
+
200: SecretListResponse;
|
|
10018
10340
|
};
|
|
10019
|
-
type
|
|
10020
|
-
type
|
|
10021
|
-
body
|
|
10341
|
+
type ListSecretsResponse = ListSecretsResponses[keyof ListSecretsResponses];
|
|
10342
|
+
type StoreSecretData = {
|
|
10343
|
+
body: SecretStoreRequest;
|
|
10022
10344
|
headers?: {
|
|
10023
10345
|
/**
|
|
10024
10346
|
* X-Notte-Request-Origin
|
|
@@ -10029,30 +10351,25 @@ type FileListDownloadsData = {
|
|
|
10029
10351
|
*/
|
|
10030
10352
|
'x-notte-sdk-version'?: string | null;
|
|
10031
10353
|
};
|
|
10032
|
-
path
|
|
10033
|
-
/**
|
|
10034
|
-
* Session Id
|
|
10035
|
-
*/
|
|
10036
|
-
session_id: string;
|
|
10037
|
-
};
|
|
10354
|
+
path?: never;
|
|
10038
10355
|
query?: never;
|
|
10039
|
-
url: '/
|
|
10356
|
+
url: '/secrets';
|
|
10040
10357
|
};
|
|
10041
|
-
type
|
|
10358
|
+
type StoreSecretErrors = {
|
|
10042
10359
|
/**
|
|
10043
10360
|
* Validation Error
|
|
10044
10361
|
*/
|
|
10045
10362
|
422: HttpValidationError;
|
|
10046
10363
|
};
|
|
10047
|
-
type
|
|
10048
|
-
type
|
|
10364
|
+
type StoreSecretError = StoreSecretErrors[keyof StoreSecretErrors];
|
|
10365
|
+
type StoreSecretResponses = {
|
|
10049
10366
|
/**
|
|
10050
10367
|
* Successful Response
|
|
10051
10368
|
*/
|
|
10052
|
-
|
|
10369
|
+
201: SecretMetadata;
|
|
10053
10370
|
};
|
|
10054
|
-
type
|
|
10055
|
-
type
|
|
10371
|
+
type StoreSecretResponse = StoreSecretResponses[keyof StoreSecretResponses];
|
|
10372
|
+
type GetSecretData = {
|
|
10056
10373
|
body?: never;
|
|
10057
10374
|
headers?: {
|
|
10058
10375
|
/**
|
|
@@ -10066,29 +10383,31 @@ type FileDownloadUploadedFileData = {
|
|
|
10066
10383
|
};
|
|
10067
10384
|
path: {
|
|
10068
10385
|
/**
|
|
10069
|
-
*
|
|
10386
|
+
* Name
|
|
10070
10387
|
*/
|
|
10071
|
-
|
|
10388
|
+
name: string;
|
|
10072
10389
|
};
|
|
10073
|
-
query
|
|
10074
|
-
|
|
10390
|
+
query: {
|
|
10391
|
+
namespace: SecretNamespace;
|
|
10392
|
+
};
|
|
10393
|
+
url: '/secrets/{name}';
|
|
10075
10394
|
};
|
|
10076
|
-
type
|
|
10395
|
+
type GetSecretErrors = {
|
|
10077
10396
|
/**
|
|
10078
10397
|
* Validation Error
|
|
10079
10398
|
*/
|
|
10080
10399
|
422: HttpValidationError;
|
|
10081
10400
|
};
|
|
10082
|
-
type
|
|
10083
|
-
type
|
|
10401
|
+
type GetSecretError = GetSecretErrors[keyof GetSecretErrors];
|
|
10402
|
+
type GetSecretResponses = {
|
|
10084
10403
|
/**
|
|
10085
10404
|
* Successful Response
|
|
10086
10405
|
*/
|
|
10087
|
-
200:
|
|
10406
|
+
200: SecretValueResponse;
|
|
10088
10407
|
};
|
|
10089
|
-
type
|
|
10090
|
-
type
|
|
10091
|
-
body
|
|
10408
|
+
type GetSecretResponse = GetSecretResponses[keyof GetSecretResponses];
|
|
10409
|
+
type DeleteSecretData = {
|
|
10410
|
+
body?: never;
|
|
10092
10411
|
headers?: {
|
|
10093
10412
|
/**
|
|
10094
10413
|
* X-Notte-Request-Origin
|
|
@@ -10099,56 +10418,57 @@ type FileUploadData = {
|
|
|
10099
10418
|
*/
|
|
10100
10419
|
'x-notte-sdk-version'?: string | null;
|
|
10101
10420
|
};
|
|
10102
|
-
path
|
|
10421
|
+
path: {
|
|
10422
|
+
/**
|
|
10423
|
+
* Secret Id
|
|
10424
|
+
*/
|
|
10425
|
+
secret_id: string;
|
|
10426
|
+
};
|
|
10103
10427
|
query?: never;
|
|
10104
|
-
url: '/
|
|
10428
|
+
url: '/secrets/{secret_id}';
|
|
10105
10429
|
};
|
|
10106
|
-
type
|
|
10430
|
+
type DeleteSecretErrors = {
|
|
10107
10431
|
/**
|
|
10108
10432
|
* Validation Error
|
|
10109
10433
|
*/
|
|
10110
10434
|
422: HttpValidationError;
|
|
10111
10435
|
};
|
|
10112
|
-
type
|
|
10113
|
-
type
|
|
10436
|
+
type DeleteSecretError = DeleteSecretErrors[keyof DeleteSecretErrors];
|
|
10437
|
+
type DeleteSecretResponses = {
|
|
10114
10438
|
/**
|
|
10115
10439
|
* Successful Response
|
|
10116
10440
|
*/
|
|
10117
|
-
|
|
10441
|
+
204: void;
|
|
10118
10442
|
};
|
|
10119
|
-
type
|
|
10120
|
-
type
|
|
10443
|
+
type DeleteSecretResponse = DeleteSecretResponses[keyof DeleteSecretResponses];
|
|
10444
|
+
type HealthCheckData = {
|
|
10121
10445
|
body?: never;
|
|
10122
|
-
headers?: {
|
|
10123
|
-
/**
|
|
10124
|
-
* X-Notte-Request-Origin
|
|
10125
|
-
*/
|
|
10126
|
-
'x-notte-request-origin'?: string | null;
|
|
10127
|
-
/**
|
|
10128
|
-
* X-Notte-Sdk-Version
|
|
10129
|
-
*/
|
|
10130
|
-
'x-notte-sdk-version'?: string | null;
|
|
10131
|
-
};
|
|
10132
10446
|
path?: never;
|
|
10133
10447
|
query?: never;
|
|
10134
|
-
url: '/
|
|
10448
|
+
url: '/health';
|
|
10135
10449
|
};
|
|
10136
|
-
type
|
|
10450
|
+
type HealthCheckResponses = {
|
|
10137
10451
|
/**
|
|
10138
|
-
*
|
|
10452
|
+
* Successful Response
|
|
10139
10453
|
*/
|
|
10140
|
-
|
|
10454
|
+
200: HealthResponse;
|
|
10455
|
+
};
|
|
10456
|
+
type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
|
|
10457
|
+
type ReadyCheckData = {
|
|
10458
|
+
body?: never;
|
|
10459
|
+
path?: never;
|
|
10460
|
+
query?: never;
|
|
10461
|
+
url: '/ready';
|
|
10141
10462
|
};
|
|
10142
|
-
type
|
|
10143
|
-
type FileListUploadsResponses = {
|
|
10463
|
+
type ReadyCheckResponses = {
|
|
10144
10464
|
/**
|
|
10145
10465
|
* Successful Response
|
|
10146
10466
|
*/
|
|
10147
|
-
200:
|
|
10467
|
+
200: HealthResponse;
|
|
10148
10468
|
};
|
|
10149
|
-
type
|
|
10150
|
-
type
|
|
10151
|
-
body:
|
|
10469
|
+
type ReadyCheckResponse = ReadyCheckResponses[keyof ReadyCheckResponses];
|
|
10470
|
+
type ScrapeWebpageData = {
|
|
10471
|
+
body: GlobalScrapeRequest;
|
|
10152
10472
|
headers?: {
|
|
10153
10473
|
/**
|
|
10154
10474
|
* X-Notte-Request-Origin
|
|
@@ -10161,201 +10481,9 @@ type AnythingStartData = {
|
|
|
10161
10481
|
};
|
|
10162
10482
|
path?: never;
|
|
10163
10483
|
query?: never;
|
|
10164
|
-
url: '/
|
|
10484
|
+
url: '/scrape';
|
|
10165
10485
|
};
|
|
10166
|
-
type
|
|
10167
|
-
/**
|
|
10168
|
-
* Validation Error
|
|
10169
|
-
*/
|
|
10170
|
-
422: HttpValidationError;
|
|
10171
|
-
};
|
|
10172
|
-
type AnythingStartError = AnythingStartErrors[keyof AnythingStartErrors];
|
|
10173
|
-
type AnythingStartResponses = {
|
|
10174
|
-
/**
|
|
10175
|
-
* Successful Response
|
|
10176
|
-
*/
|
|
10177
|
-
200: unknown;
|
|
10178
|
-
};
|
|
10179
|
-
type ListSecretsData = {
|
|
10180
|
-
body?: never;
|
|
10181
|
-
headers?: {
|
|
10182
|
-
/**
|
|
10183
|
-
* X-Notte-Request-Origin
|
|
10184
|
-
*/
|
|
10185
|
-
'x-notte-request-origin'?: string | null;
|
|
10186
|
-
/**
|
|
10187
|
-
* X-Notte-Sdk-Version
|
|
10188
|
-
*/
|
|
10189
|
-
'x-notte-sdk-version'?: string | null;
|
|
10190
|
-
};
|
|
10191
|
-
path?: never;
|
|
10192
|
-
query?: {
|
|
10193
|
-
/**
|
|
10194
|
-
* Namespace
|
|
10195
|
-
*/
|
|
10196
|
-
namespace?: SecretNamespace | null;
|
|
10197
|
-
};
|
|
10198
|
-
url: '/secrets';
|
|
10199
|
-
};
|
|
10200
|
-
type ListSecretsErrors = {
|
|
10201
|
-
/**
|
|
10202
|
-
* Validation Error
|
|
10203
|
-
*/
|
|
10204
|
-
422: HttpValidationError;
|
|
10205
|
-
};
|
|
10206
|
-
type ListSecretsError = ListSecretsErrors[keyof ListSecretsErrors];
|
|
10207
|
-
type ListSecretsResponses = {
|
|
10208
|
-
/**
|
|
10209
|
-
* Successful Response
|
|
10210
|
-
*/
|
|
10211
|
-
200: SecretListResponse;
|
|
10212
|
-
};
|
|
10213
|
-
type ListSecretsResponse = ListSecretsResponses[keyof ListSecretsResponses];
|
|
10214
|
-
type StoreSecretData = {
|
|
10215
|
-
body: SecretStoreRequest;
|
|
10216
|
-
headers?: {
|
|
10217
|
-
/**
|
|
10218
|
-
* X-Notte-Request-Origin
|
|
10219
|
-
*/
|
|
10220
|
-
'x-notte-request-origin'?: string | null;
|
|
10221
|
-
/**
|
|
10222
|
-
* X-Notte-Sdk-Version
|
|
10223
|
-
*/
|
|
10224
|
-
'x-notte-sdk-version'?: string | null;
|
|
10225
|
-
};
|
|
10226
|
-
path?: never;
|
|
10227
|
-
query?: never;
|
|
10228
|
-
url: '/secrets';
|
|
10229
|
-
};
|
|
10230
|
-
type StoreSecretErrors = {
|
|
10231
|
-
/**
|
|
10232
|
-
* Validation Error
|
|
10233
|
-
*/
|
|
10234
|
-
422: HttpValidationError;
|
|
10235
|
-
};
|
|
10236
|
-
type StoreSecretError = StoreSecretErrors[keyof StoreSecretErrors];
|
|
10237
|
-
type StoreSecretResponses = {
|
|
10238
|
-
/**
|
|
10239
|
-
* Successful Response
|
|
10240
|
-
*/
|
|
10241
|
-
201: SecretMetadata;
|
|
10242
|
-
};
|
|
10243
|
-
type StoreSecretResponse = StoreSecretResponses[keyof StoreSecretResponses];
|
|
10244
|
-
type GetSecretData = {
|
|
10245
|
-
body?: never;
|
|
10246
|
-
headers?: {
|
|
10247
|
-
/**
|
|
10248
|
-
* X-Notte-Request-Origin
|
|
10249
|
-
*/
|
|
10250
|
-
'x-notte-request-origin'?: string | null;
|
|
10251
|
-
/**
|
|
10252
|
-
* X-Notte-Sdk-Version
|
|
10253
|
-
*/
|
|
10254
|
-
'x-notte-sdk-version'?: string | null;
|
|
10255
|
-
};
|
|
10256
|
-
path: {
|
|
10257
|
-
/**
|
|
10258
|
-
* Name
|
|
10259
|
-
*/
|
|
10260
|
-
name: string;
|
|
10261
|
-
};
|
|
10262
|
-
query: {
|
|
10263
|
-
namespace: SecretNamespace;
|
|
10264
|
-
};
|
|
10265
|
-
url: '/secrets/{name}';
|
|
10266
|
-
};
|
|
10267
|
-
type GetSecretErrors = {
|
|
10268
|
-
/**
|
|
10269
|
-
* Validation Error
|
|
10270
|
-
*/
|
|
10271
|
-
422: HttpValidationError;
|
|
10272
|
-
};
|
|
10273
|
-
type GetSecretError = GetSecretErrors[keyof GetSecretErrors];
|
|
10274
|
-
type GetSecretResponses = {
|
|
10275
|
-
/**
|
|
10276
|
-
* Successful Response
|
|
10277
|
-
*/
|
|
10278
|
-
200: SecretValueResponse;
|
|
10279
|
-
};
|
|
10280
|
-
type GetSecretResponse = GetSecretResponses[keyof GetSecretResponses];
|
|
10281
|
-
type DeleteSecretData = {
|
|
10282
|
-
body?: never;
|
|
10283
|
-
headers?: {
|
|
10284
|
-
/**
|
|
10285
|
-
* X-Notte-Request-Origin
|
|
10286
|
-
*/
|
|
10287
|
-
'x-notte-request-origin'?: string | null;
|
|
10288
|
-
/**
|
|
10289
|
-
* X-Notte-Sdk-Version
|
|
10290
|
-
*/
|
|
10291
|
-
'x-notte-sdk-version'?: string | null;
|
|
10292
|
-
};
|
|
10293
|
-
path: {
|
|
10294
|
-
/**
|
|
10295
|
-
* Secret Id
|
|
10296
|
-
*/
|
|
10297
|
-
secret_id: string;
|
|
10298
|
-
};
|
|
10299
|
-
query?: never;
|
|
10300
|
-
url: '/secrets/{secret_id}';
|
|
10301
|
-
};
|
|
10302
|
-
type DeleteSecretErrors = {
|
|
10303
|
-
/**
|
|
10304
|
-
* Validation Error
|
|
10305
|
-
*/
|
|
10306
|
-
422: HttpValidationError;
|
|
10307
|
-
};
|
|
10308
|
-
type DeleteSecretError = DeleteSecretErrors[keyof DeleteSecretErrors];
|
|
10309
|
-
type DeleteSecretResponses = {
|
|
10310
|
-
/**
|
|
10311
|
-
* Successful Response
|
|
10312
|
-
*/
|
|
10313
|
-
204: void;
|
|
10314
|
-
};
|
|
10315
|
-
type DeleteSecretResponse = DeleteSecretResponses[keyof DeleteSecretResponses];
|
|
10316
|
-
type HealthCheckData = {
|
|
10317
|
-
body?: never;
|
|
10318
|
-
path?: never;
|
|
10319
|
-
query?: never;
|
|
10320
|
-
url: '/health';
|
|
10321
|
-
};
|
|
10322
|
-
type HealthCheckResponses = {
|
|
10323
|
-
/**
|
|
10324
|
-
* Successful Response
|
|
10325
|
-
*/
|
|
10326
|
-
200: HealthResponse;
|
|
10327
|
-
};
|
|
10328
|
-
type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
|
|
10329
|
-
type ReadyCheckData = {
|
|
10330
|
-
body?: never;
|
|
10331
|
-
path?: never;
|
|
10332
|
-
query?: never;
|
|
10333
|
-
url: '/ready';
|
|
10334
|
-
};
|
|
10335
|
-
type ReadyCheckResponses = {
|
|
10336
|
-
/**
|
|
10337
|
-
* Successful Response
|
|
10338
|
-
*/
|
|
10339
|
-
200: HealthResponse;
|
|
10340
|
-
};
|
|
10341
|
-
type ReadyCheckResponse = ReadyCheckResponses[keyof ReadyCheckResponses];
|
|
10342
|
-
type ScrapeWebpageData = {
|
|
10343
|
-
body: GlobalScrapeRequest;
|
|
10344
|
-
headers?: {
|
|
10345
|
-
/**
|
|
10346
|
-
* X-Notte-Request-Origin
|
|
10347
|
-
*/
|
|
10348
|
-
'x-notte-request-origin'?: string | null;
|
|
10349
|
-
/**
|
|
10350
|
-
* X-Notte-Sdk-Version
|
|
10351
|
-
*/
|
|
10352
|
-
'x-notte-sdk-version'?: string | null;
|
|
10353
|
-
};
|
|
10354
|
-
path?: never;
|
|
10355
|
-
query?: never;
|
|
10356
|
-
url: '/scrape';
|
|
10357
|
-
};
|
|
10358
|
-
type ScrapeWebpageErrors = {
|
|
10486
|
+
type ScrapeWebpageErrors = {
|
|
10359
10487
|
/**
|
|
10360
10488
|
* Validation Error
|
|
10361
10489
|
*/
|
|
@@ -10502,6 +10630,22 @@ declare const sessionNetworkLogs: <ThrowOnError extends boolean = false>(options
|
|
|
10502
10630
|
* Session Replay
|
|
10503
10631
|
*/
|
|
10504
10632
|
declare const sessionReplay: <ThrowOnError extends boolean = false>(options: Options<SessionReplayData, ThrowOnError>) => RequestResult<SessionReplayResponses, SessionReplayErrors, ThrowOnError>;
|
|
10633
|
+
/**
|
|
10634
|
+
* List Session Files
|
|
10635
|
+
*/
|
|
10636
|
+
declare const listSessionFiles: <ThrowOnError extends boolean = false>(options: Options<ListSessionFilesData, ThrowOnError>) => RequestResult<ListSessionFilesResponses, ListSessionFilesErrors, ThrowOnError>;
|
|
10637
|
+
/**
|
|
10638
|
+
* Upload Session File
|
|
10639
|
+
*/
|
|
10640
|
+
declare const uploadSessionFile: <ThrowOnError extends boolean = false>(options: Options<UploadSessionFileData, ThrowOnError>) => RequestResult<UploadSessionFileResponses, UploadSessionFileErrors, ThrowOnError>;
|
|
10641
|
+
/**
|
|
10642
|
+
* Delete Session File
|
|
10643
|
+
*/
|
|
10644
|
+
declare const deleteSessionFile: <ThrowOnError extends boolean = false>(options: Options<DeleteSessionFileData, ThrowOnError>) => RequestResult<DeleteSessionFileResponses, DeleteSessionFileErrors, ThrowOnError>;
|
|
10645
|
+
/**
|
|
10646
|
+
* Download Session File
|
|
10647
|
+
*/
|
|
10648
|
+
declare const downloadSessionFile: <ThrowOnError extends boolean = false>(options: Options<DownloadSessionFileData, ThrowOnError>) => RequestResult<DownloadSessionFileResponses, DownloadSessionFileErrors, ThrowOnError>;
|
|
10505
10649
|
/**
|
|
10506
10650
|
* Agent Start
|
|
10507
10651
|
*/
|
|
@@ -10754,30 +10898,6 @@ declare const getUsage: <ThrowOnError extends boolean = false>(options?: Options
|
|
|
10754
10898
|
* Get Usage Logs
|
|
10755
10899
|
*/
|
|
10756
10900
|
declare const getUsageLogs: <ThrowOnError extends boolean = false>(options?: Options<GetUsageLogsData, ThrowOnError>) => RequestResult<GetUsageLogsResponses, GetUsageLogsErrors, ThrowOnError>;
|
|
10757
|
-
/**
|
|
10758
|
-
* File Download
|
|
10759
|
-
*/
|
|
10760
|
-
declare const fileDownload: <ThrowOnError extends boolean = false>(options: Options<FileDownloadData, ThrowOnError>) => RequestResult<FileDownloadResponses, FileDownloadErrors, ThrowOnError>;
|
|
10761
|
-
/**
|
|
10762
|
-
* File Upload Downloaded File
|
|
10763
|
-
*/
|
|
10764
|
-
declare const fileUploadDownloadedFile: <ThrowOnError extends boolean = false>(options: Options<FileUploadDownloadedFileData, ThrowOnError>) => RequestResult<FileUploadDownloadedFileResponses, FileUploadDownloadedFileErrors, ThrowOnError>;
|
|
10765
|
-
/**
|
|
10766
|
-
* File List Downloads
|
|
10767
|
-
*/
|
|
10768
|
-
declare const fileListDownloads: <ThrowOnError extends boolean = false>(options: Options<FileListDownloadsData, ThrowOnError>) => RequestResult<FileListDownloadsResponses, FileListDownloadsErrors, ThrowOnError>;
|
|
10769
|
-
/**
|
|
10770
|
-
* File Download Uploaded File
|
|
10771
|
-
*/
|
|
10772
|
-
declare const fileDownloadUploadedFile: <ThrowOnError extends boolean = false>(options: Options<FileDownloadUploadedFileData, ThrowOnError>) => RequestResult<FileDownloadUploadedFileResponses, FileDownloadUploadedFileErrors, ThrowOnError>;
|
|
10773
|
-
/**
|
|
10774
|
-
* File Upload
|
|
10775
|
-
*/
|
|
10776
|
-
declare const fileUpload: <ThrowOnError extends boolean = false>(options: Options<FileUploadData, ThrowOnError>) => RequestResult<FileUploadResponses, FileUploadErrors, ThrowOnError>;
|
|
10777
|
-
/**
|
|
10778
|
-
* File List Uploads
|
|
10779
|
-
*/
|
|
10780
|
-
declare const fileListUploads: <ThrowOnError extends boolean = false>(options?: Options<FileListUploadsData, ThrowOnError>) => RequestResult<FileListUploadsResponses, FileListUploadsErrors, ThrowOnError>;
|
|
10781
10901
|
/**
|
|
10782
10902
|
* Anything Start
|
|
10783
10903
|
*/
|
|
@@ -10821,97 +10941,884 @@ declare const scrapeFromHtml: <ThrowOnError extends boolean = false>(options: Op
|
|
|
10821
10941
|
|
|
10822
10942
|
declare const client: Client;
|
|
10823
10943
|
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10944
|
+
/** Discriminated union of every action `session.execute()` accepts. */
|
|
10945
|
+
type ExecuteAction = PageExecuteData['body'];
|
|
10946
|
+
/** The `type` discriminator of an `ExecuteAction`. */
|
|
10947
|
+
type ActionType = ExecuteAction['type'];
|
|
10948
|
+
/** The union member whose `type` is `T`. */
|
|
10949
|
+
type ActionOfType<T extends ActionType> = Extract<ExecuteAction, {
|
|
10950
|
+
type: T;
|
|
10951
|
+
}>;
|
|
10952
|
+
/** The fields of an action minus its `type` discriminator. */
|
|
10953
|
+
type ActionInput<T extends ActionType> = Omit<ActionOfType<T>, 'type'>;
|
|
10954
|
+
/** Namespace object mirroring `from notte_sdk import actions`. */
|
|
10955
|
+
declare const actions: {
|
|
10956
|
+
readonly goto: (input: ActionInput<"goto">) => {
|
|
10957
|
+
type: "goto";
|
|
10958
|
+
} & GotoAction;
|
|
10959
|
+
readonly gotoNewTab: (input: ActionInput<"goto_new_tab">) => {
|
|
10960
|
+
type: "goto_new_tab";
|
|
10961
|
+
} & GotoNewTabAction;
|
|
10962
|
+
readonly closeTab: (input?: ActionInput<"close_tab"> | undefined) => {
|
|
10963
|
+
type: "close_tab";
|
|
10964
|
+
} & CloseTabAction;
|
|
10965
|
+
readonly switchTab: (input: ActionInput<"switch_tab">) => {
|
|
10966
|
+
type: "switch_tab";
|
|
10967
|
+
} & SwitchTabAction;
|
|
10968
|
+
readonly goBack: (input?: ActionInput<"go_back"> | undefined) => {
|
|
10969
|
+
type: "go_back";
|
|
10970
|
+
} & GoBackAction;
|
|
10971
|
+
readonly goForward: (input?: ActionInput<"go_forward"> | undefined) => {
|
|
10972
|
+
type: "go_forward";
|
|
10973
|
+
} & GoForwardAction;
|
|
10974
|
+
readonly reload: (input?: ActionInput<"reload"> | undefined) => {
|
|
10975
|
+
type: "reload";
|
|
10976
|
+
} & ReloadAction;
|
|
10977
|
+
readonly wait: (input: ActionInput<"wait">) => {
|
|
10978
|
+
type: "wait";
|
|
10979
|
+
} & WaitAction;
|
|
10980
|
+
readonly pressKey: (input: ActionInput<"press_key">) => {
|
|
10981
|
+
type: "press_key";
|
|
10982
|
+
} & PressKeyAction;
|
|
10983
|
+
readonly scrollUp: (input?: ActionInput<"scroll_up"> | undefined) => {
|
|
10984
|
+
type: "scroll_up";
|
|
10985
|
+
} & ScrollUpAction;
|
|
10986
|
+
readonly scrollDown: (input?: ActionInput<"scroll_down"> | undefined) => {
|
|
10987
|
+
type: "scroll_down";
|
|
10988
|
+
} & ScrollDownAction;
|
|
10989
|
+
readonly captchaSolve: (input?: ActionInput<"captcha_solve"> | undefined) => {
|
|
10990
|
+
type: "captcha_solve";
|
|
10991
|
+
} & CaptchaSolveAction;
|
|
10992
|
+
readonly help: (input: ActionInput<"help">) => {
|
|
10993
|
+
type: "help";
|
|
10994
|
+
} & HelpAction;
|
|
10995
|
+
readonly completion: (input: ActionInput<"completion">) => {
|
|
10996
|
+
type: "completion";
|
|
10997
|
+
} & CompletionAction;
|
|
10998
|
+
readonly scrape: (input?: ActionInput<"scrape"> | undefined) => {
|
|
10999
|
+
type: "scrape";
|
|
11000
|
+
} & ScrapeAction;
|
|
11001
|
+
readonly emailRead: (input?: ActionInput<"email_read"> | undefined) => {
|
|
11002
|
+
type: "email_read";
|
|
11003
|
+
} & EmailReadAction;
|
|
11004
|
+
readonly emailVerificationRead: (input: ActionInput<"email_verification_read">) => {
|
|
11005
|
+
type: "email_verification_read";
|
|
11006
|
+
} & EmailVerificationReadAction;
|
|
11007
|
+
readonly smsRead: (input?: ActionInput<"sms_read"> | undefined) => {
|
|
11008
|
+
type: "sms_read";
|
|
11009
|
+
} & SmsReadAction;
|
|
11010
|
+
readonly evaluateJs: (input: ActionInput<"evaluate_js">) => {
|
|
11011
|
+
type: "evaluate_js";
|
|
11012
|
+
} & EvaluateJsAction;
|
|
11013
|
+
readonly formFill: (input: ActionInput<"form_fill">) => {
|
|
11014
|
+
type: "form_fill";
|
|
11015
|
+
} & FormFillActionWritable;
|
|
11016
|
+
readonly click: (input?: ActionInput<"click"> | undefined) => {
|
|
11017
|
+
type: "click";
|
|
11018
|
+
} & ClickActionInput;
|
|
11019
|
+
readonly fill: (input: ActionInput<"fill">) => {
|
|
11020
|
+
type: "fill";
|
|
11021
|
+
} & FillActionInputWritable;
|
|
11022
|
+
readonly multiFactorFill: (input: ActionInput<"multi_factor_fill">) => {
|
|
11023
|
+
type: "multi_factor_fill";
|
|
11024
|
+
} & MultiFactorFillActionInputWritable;
|
|
11025
|
+
readonly fallbackFill: (input: ActionInput<"fallback_fill">) => {
|
|
11026
|
+
type: "fallback_fill";
|
|
11027
|
+
} & FallbackFillActionInputWritable;
|
|
11028
|
+
readonly check: (input: ActionInput<"check">) => {
|
|
11029
|
+
type: "check";
|
|
11030
|
+
} & CheckActionInput;
|
|
11031
|
+
readonly selectDropdownOption: (input: ActionInput<"select_dropdown_option">) => {
|
|
11032
|
+
type: "select_dropdown_option";
|
|
11033
|
+
} & SelectDropdownOptionActionInputWritable;
|
|
11034
|
+
readonly uploadFile: (input: ActionInput<"upload_file">) => {
|
|
11035
|
+
type: "upload_file";
|
|
11036
|
+
} & UploadFileActionInput;
|
|
11037
|
+
readonly downloadFile: (input?: ActionInput<"download_file"> | undefined) => {
|
|
11038
|
+
type: "download_file";
|
|
11039
|
+
} & DownloadFileActionInput;
|
|
11040
|
+
};
|
|
11041
|
+
/** True when the action is a captcha solve, which gets a longer request timeout and 408 retries. */
|
|
11042
|
+
declare function isCaptchaSolveAction(action: ExecuteAction): action is ActionOfType<'captcha_solve'>;
|
|
11043
|
+
|
|
11044
|
+
/**
|
|
11045
|
+
* Typed error hierarchy mirroring `notte_sdk.errors` and the `notte_core` errors
|
|
11046
|
+
* the Python SDK raises. Every error thrown by the SDK extends `NotteError`, so
|
|
11047
|
+
* callers can `catch (e) { if (e instanceof NotteError) ... }` and branch on the
|
|
11048
|
+
* concrete class or on `NotteAPIError.statusCode`.
|
|
11049
|
+
*/
|
|
11050
|
+
|
|
11051
|
+
declare class NotteError extends Error {
|
|
11052
|
+
constructor(message: string, options?: {
|
|
11053
|
+
cause?: unknown;
|
|
11054
|
+
});
|
|
10836
11055
|
}
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
11056
|
+
/**
|
|
11057
|
+
* Body of a failed HTTP response, best effort. JSON bodies are exposed as-is;
|
|
11058
|
+
* non-JSON bodies (HTML error pages, empty 502s) are wrapped as `{ message }`.
|
|
11059
|
+
*/
|
|
11060
|
+
type NotteAPIErrorBody = Record<string, unknown>;
|
|
11061
|
+
/** The API answered with a non-2xx status. */
|
|
11062
|
+
declare class NotteAPIError extends NotteError {
|
|
11063
|
+
readonly path: string;
|
|
11064
|
+
readonly statusCode: number;
|
|
11065
|
+
readonly error: NotteAPIErrorBody;
|
|
11066
|
+
readonly response: Response | undefined;
|
|
11067
|
+
constructor(path: string, statusCode: number, error: NotteAPIErrorBody, response?: Response);
|
|
11068
|
+
/** The API's own error message, when it sent one. */
|
|
11069
|
+
get apiMessage(): string | undefined;
|
|
11070
|
+
static fromBody(path: string, statusCode: number, body: unknown, response?: Response): NotteAPIError;
|
|
11071
|
+
}
|
|
11072
|
+
/** The API flagged the failure as an execution error (`x-error-class: NotteApiExecutionError`). */
|
|
11073
|
+
declare class NotteAPIExecutionError extends NotteAPIError {
|
|
11074
|
+
constructor(path: string, statusCode: number, error: NotteAPIErrorBody, response?: Response);
|
|
11075
|
+
}
|
|
11076
|
+
/** Missing or rejected credentials. Not retryable. */
|
|
11077
|
+
declare class AuthenticationError extends NotteError {
|
|
11078
|
+
constructor(message: string);
|
|
11079
|
+
}
|
|
11080
|
+
/** The request is malformed. Not retryable. */
|
|
11081
|
+
declare class InvalidRequestError extends NotteError {
|
|
11082
|
+
constructor(message: string);
|
|
11083
|
+
}
|
|
11084
|
+
/** A request or a wait exceeded its deadline. */
|
|
11085
|
+
declare class NotteTimeoutError extends NotteError {
|
|
11086
|
+
}
|
|
11087
|
+
/** A cloud function run finished with `status: "failed"`. */
|
|
11088
|
+
declare class FailedToRunCloudFunctionError extends NotteError {
|
|
11089
|
+
readonly functionId: string;
|
|
11090
|
+
readonly functionRunId: string;
|
|
11091
|
+
readonly response: unknown;
|
|
11092
|
+
constructor(functionId: string, functionRunId: string, response: unknown);
|
|
11093
|
+
}
|
|
11094
|
+
/** Structured scrape extraction failed (`StructuredData.success === false`). */
|
|
11095
|
+
declare class ScrapeFailedError extends NotteError {
|
|
11096
|
+
readonly structuredError: string | undefined;
|
|
11097
|
+
constructor(error: string | undefined);
|
|
11098
|
+
}
|
|
11099
|
+
/**
|
|
11100
|
+
* An action executed through `session.execute()` failed. Rehydrated from the
|
|
11101
|
+
* structured `exception_detail` payload the API returns, so `errorType` names
|
|
11102
|
+
* the concrete server-side error class and the three messages carry the same
|
|
11103
|
+
* text Python exposes on `NotteBaseError`.
|
|
11104
|
+
*/
|
|
11105
|
+
declare class ActionExecutionError extends NotteError {
|
|
11106
|
+
readonly errorType: string;
|
|
11107
|
+
readonly devMessage: string;
|
|
11108
|
+
readonly userMessage: string;
|
|
11109
|
+
readonly agentMessage: string;
|
|
11110
|
+
readonly shouldRetryLater: boolean;
|
|
11111
|
+
readonly shouldNotifyTeam: boolean;
|
|
11112
|
+
constructor(detail: SerializedError);
|
|
11113
|
+
static fromMessage(message: string, errorType?: string): ActionExecutionError;
|
|
11114
|
+
}
|
|
11115
|
+
/** `evaluate_js` reported success but the API build predates the data payload. */
|
|
11116
|
+
declare class EvaluateJsNoDataError extends NotteError {
|
|
11117
|
+
constructor();
|
|
11118
|
+
}
|
|
11119
|
+
/** The envelope returned by `session.fetch()` could not be decoded. */
|
|
11120
|
+
declare class FetchResponseDecodeError extends NotteError {
|
|
11121
|
+
constructor(reason: string);
|
|
11122
|
+
}
|
|
11123
|
+
interface RetryOptions {
|
|
11124
|
+
/** Maximum number of attempts, including the first one. */
|
|
11125
|
+
maxTries: number;
|
|
11126
|
+
/** Delay between attempts in milliseconds. Defaults to 5000 like the Python decorator. */
|
|
11127
|
+
delayMs?: number;
|
|
11128
|
+
/** Message of the `Error` raised once every attempt failed. */
|
|
11129
|
+
errorMessage?: string;
|
|
11130
|
+
/** Only retry when this returns true for the thrown error. Defaults to retrying on any error. */
|
|
11131
|
+
shouldRetry?: (error: unknown, attempt: number) => boolean;
|
|
11132
|
+
/** Called before sleeping between attempts. Defaults to `console.warn`. */
|
|
11133
|
+
onRetry?: (error: unknown, attempt: number, maxTries: number) => void;
|
|
11134
|
+
}
|
|
11135
|
+
/**
|
|
11136
|
+
* Wrap an async function so it is retried when it throws, mirroring
|
|
11137
|
+
* `notte_sdk.errors.retry`. The final failure is raised as an `Error` whose
|
|
11138
|
+
* `cause` is the last underlying error.
|
|
11139
|
+
*
|
|
11140
|
+
* ```ts
|
|
11141
|
+
* const start = retry(() => session.start(), { maxTries: 3, delayMs: 1000 });
|
|
11142
|
+
* await start();
|
|
11143
|
+
* ```
|
|
11144
|
+
*/
|
|
11145
|
+
declare function retry<TArgs extends unknown[], TResult>(fn: (...args: TArgs) => Promise<TResult>, options: RetryOptions): (...args: TArgs) => Promise<TResult>;
|
|
11146
|
+
|
|
11147
|
+
/**
|
|
11148
|
+
* Issue an HTTP request from the page a session is on, the port of
|
|
11149
|
+
* `notte_core.data.fetch`.
|
|
11150
|
+
*
|
|
11151
|
+
* `session.fetch()` runs the browser's own `fetch()` inside the current page, so
|
|
11152
|
+
* the request carries the page's cookies, the session's proxy and the browser's
|
|
11153
|
+
* network fingerprint. This module builds the script and reads the result back
|
|
11154
|
+
* into a `PageFetchResponse`.
|
|
11155
|
+
*/
|
|
11156
|
+
|
|
11157
|
+
/** A form body (`Record`) or a raw string body. */
|
|
11158
|
+
type FetchData = string | Record<string, unknown>;
|
|
11159
|
+
interface PageFetchOptions {
|
|
11160
|
+
/** HTTP method. Defaults to `GET`. */
|
|
11161
|
+
method?: string;
|
|
11162
|
+
/** Request headers. */
|
|
11163
|
+
headers?: Record<string, string>;
|
|
11164
|
+
/** Query parameters appended to the URL (before any fragment). Arrays repeat the key. */
|
|
11165
|
+
params?: Record<string, unknown>;
|
|
11166
|
+
/** JSON body, sent with `Content-Type: application/json` unless a content type is given. */
|
|
11167
|
+
json?: unknown;
|
|
11168
|
+
/** Form body (`Record`, sent url-encoded) or a raw string body sent verbatim. */
|
|
11169
|
+
data?: FetchData;
|
|
11170
|
+
/** Abort the request after this many milliseconds. Must be positive. */
|
|
11171
|
+
timeoutMs?: number;
|
|
11172
|
+
/**
|
|
11173
|
+
* Allow `http:` URLs and follow redirects. Off by default because the request
|
|
11174
|
+
* carries the page's cookies: an `https:` request redirected to `http:` would
|
|
11175
|
+
* send them in cleartext before the response can be inspected, so by default
|
|
11176
|
+
* redirects are not followed and a redirected response throws.
|
|
11177
|
+
*/
|
|
11178
|
+
allowInsecure?: boolean;
|
|
11179
|
+
/**
|
|
11180
|
+
* Browser `fetch` redirect mode. Defaults to `manual` (a redirect throws)
|
|
11181
|
+
* unless `allowInsecure` is set, in which case redirects are followed like
|
|
11182
|
+
* the Python SDK does.
|
|
11183
|
+
*/
|
|
11184
|
+
redirect?: 'follow' | 'manual' | 'error';
|
|
11185
|
+
}
|
|
11186
|
+
/**
|
|
11187
|
+
* Return the JavaScript that performs the request and serialises the response.
|
|
11188
|
+
*
|
|
11189
|
+
* The script is an async IIFE, which `evaluateJs` awaits. It returns a JSON
|
|
11190
|
+
* string so the value survives the evaluate round-trip unchanged.
|
|
11191
|
+
*
|
|
11192
|
+
* ```ts
|
|
11193
|
+
* const script = buildFetchScript('/api/items', { params: { page: 2 } });
|
|
11194
|
+
* const response = responseFromEvaluated(await session.evaluateJs(script));
|
|
11195
|
+
* ```
|
|
11196
|
+
*/
|
|
11197
|
+
declare function buildFetchScript(url: string, options?: PageFetchOptions): string;
|
|
11198
|
+
/** `response.raiseForStatus()` rejected a 4xx/5xx response, like `requests.HTTPError`. */
|
|
11199
|
+
declare class PageFetchHTTPError extends NotteError {
|
|
11200
|
+
readonly response: PageFetchResponse;
|
|
11201
|
+
constructor(response: PageFetchResponse);
|
|
11202
|
+
}
|
|
11203
|
+
/**
|
|
11204
|
+
* The response of `session.fetch()`, shaped like the Web `Response` with the
|
|
11205
|
+
* final `url` after redirects exposed as a plain property. A non-2xx status is
|
|
11206
|
+
* a response, not an error; `raiseForStatus()` throws `PageFetchHTTPError`.
|
|
11207
|
+
* `bytes()` holds the exact bytes the server sent, so binary bodies survive;
|
|
11208
|
+
* `text()` decodes them with the declared charset, or utf-8 when none is given.
|
|
11209
|
+
*/
|
|
11210
|
+
declare class PageFetchResponse {
|
|
11211
|
+
readonly status: number;
|
|
11212
|
+
readonly statusText: string;
|
|
11213
|
+
readonly headers: Headers;
|
|
11214
|
+
/** The final URL after redirects. */
|
|
11215
|
+
readonly url: string;
|
|
11216
|
+
/** The declared charset, `utf-8` when the body is valid utf-8, else `undefined`. */
|
|
11217
|
+
readonly encoding: string | undefined;
|
|
11218
|
+
private readonly content;
|
|
11219
|
+
constructor(init: {
|
|
11220
|
+
status: number;
|
|
11221
|
+
headers: Record<string, string>;
|
|
11222
|
+
url: string;
|
|
11223
|
+
content: Uint8Array;
|
|
11224
|
+
});
|
|
11225
|
+
get ok(): boolean;
|
|
11226
|
+
/** The raw body bytes. */
|
|
11227
|
+
bytes(): Uint8Array;
|
|
11228
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
11229
|
+
text(): Promise<string>;
|
|
11230
|
+
json(): Promise<unknown>;
|
|
11231
|
+
/** Throw `PageFetchHTTPError` on a 4xx/5xx status, like `requests.Response.raise_for_status()`. */
|
|
11232
|
+
raiseForStatus(): this;
|
|
11233
|
+
}
|
|
11234
|
+
/**
|
|
11235
|
+
* Turn the envelope `buildFetchScript` returns into a `PageFetchResponse`.
|
|
11236
|
+
* Throws `FetchResponseDecodeError` when the envelope cannot be read.
|
|
11237
|
+
*/
|
|
11238
|
+
declare function responseFromEvaluated(raw: string): PageFetchResponse;
|
|
11239
|
+
|
|
11240
|
+
/**
|
|
11241
|
+
* Shared scrape request/response handling for `client.scrape()` and
|
|
11242
|
+
* `session.scrape()`, mirroring `PageClient.scrape` in the Python SDK.
|
|
11243
|
+
*/
|
|
11244
|
+
|
|
11245
|
+
/** Minimal structural view of a Zod schema so `zod` stays an optional import path. */
|
|
11246
|
+
interface ZodLikeSchema<T> {
|
|
11247
|
+
parse(data: unknown): T;
|
|
11248
|
+
}
|
|
11249
|
+
/** Structured extraction result when `raiseOnFailure` is false, like `StructuredData` in Python. */
|
|
11250
|
+
interface StructuredData<T> {
|
|
11251
|
+
success: boolean;
|
|
11252
|
+
error?: string | null;
|
|
11253
|
+
data?: T | null;
|
|
11254
|
+
}
|
|
11255
|
+
interface ScrapeOptions<T = unknown> {
|
|
11256
|
+
/** A Zod schema or a JSON Schema object describing the data to extract. */
|
|
11257
|
+
response_format?: ZodLikeSchema<T> | Record<string, unknown> | null;
|
|
11258
|
+
/** JSON Schema to send instead of converting `response_format`. Only used with a Zod schema. */
|
|
11259
|
+
json_schema?: Record<string, unknown>;
|
|
11260
|
+
/**
|
|
11261
|
+
* When true (default) a failed structured extraction throws `ScrapeFailedError`
|
|
11262
|
+
* and the extracted data is returned directly. When false the `StructuredData`
|
|
11263
|
+
* wrapper is returned so callers can inspect `.success`.
|
|
11264
|
+
*/
|
|
11265
|
+
raiseOnFailure?: boolean;
|
|
11266
|
+
}
|
|
11267
|
+
type SessionScrapeOptions<T = unknown> = Omit<ScrapeRequest, 'response_format'> & ScrapeOptions<T>;
|
|
11268
|
+
type ScrapeResult<T> = string | ImageData[] | T | StructuredData<T>;
|
|
11269
|
+
/**
|
|
11270
|
+
* Post-process a scrape response according to the request options:
|
|
11271
|
+
* - `only_images` returns the image list,
|
|
11272
|
+
* - `response_format` / `instructions` return the extracted data (validated by
|
|
11273
|
+
* the Zod schema when one was given) or throw `ScrapeFailedError`,
|
|
11274
|
+
* - otherwise the markdown string is returned.
|
|
11275
|
+
*/
|
|
11276
|
+
declare function processScrapeResponse<T = unknown>(scrapeResponse: DataSpace | undefined, options: SessionScrapeOptions<T> & {
|
|
11277
|
+
instructions?: string | null;
|
|
11278
|
+
only_images?: boolean;
|
|
11279
|
+
}): ScrapeResult<T>;
|
|
11280
|
+
|
|
11281
|
+
/** A file ID was not found in the session, the counterpart of Python's `FileNotFoundError`. */
|
|
11282
|
+
declare class FileNotFoundError extends NotteError {
|
|
11283
|
+
}
|
|
11284
|
+
/** The download destination already exists, the counterpart of Python's `FileExistsError`. */
|
|
11285
|
+
declare class FileExistsError extends NotteError {
|
|
11286
|
+
}
|
|
11287
|
+
interface FileListOptions {
|
|
11288
|
+
/** Only return files from this source: `user_upload` or `session_download`. */
|
|
11289
|
+
source?: FileSource;
|
|
11290
|
+
/** Page size. Defaults to 100. */
|
|
11291
|
+
limit?: number;
|
|
11292
|
+
/** Page offset. Defaults to 0. */
|
|
11293
|
+
offset?: number;
|
|
11294
|
+
}
|
|
11295
|
+
interface FileDownloadOptions {
|
|
11296
|
+
/** Overwrite an existing local file instead of rejecting with `FileExistsError`. */
|
|
11297
|
+
force?: boolean;
|
|
11298
|
+
}
|
|
11299
|
+
/** Bytes accepted by `upload()`: a local path, a `Blob`/`File`, or an in-memory buffer. */
|
|
11300
|
+
type UploadableFile = string | Blob | Uint8Array;
|
|
11301
|
+
/**
|
|
11302
|
+
* Reduce a server-provided filename to a safe basename, like Python's
|
|
11303
|
+
* `Path(PureWindowsPath(filename).name).name`: both separators are honoured,
|
|
11304
|
+
* drive letters are dropped and only the last component is kept.
|
|
11305
|
+
*/
|
|
11306
|
+
declare function sanitizeFilename(filename: string): string;
|
|
11307
|
+
/**
|
|
11308
|
+
* Session-scoped file operations built on the generated `sessions/{id}/files`
|
|
11309
|
+
* client. Every API failure rejects with a `NotteAPIError`.
|
|
11310
|
+
*
|
|
11311
|
+
* ```ts
|
|
11312
|
+
* const files = client.Files(sessionId);
|
|
11313
|
+
* const uploaded = await files.upload(new Blob(['hello']), 'hello.txt');
|
|
11314
|
+
* const page = await files.list({ source: 'user_upload' });
|
|
11315
|
+
* ```
|
|
11316
|
+
*/
|
|
11317
|
+
declare class SessionFiles {
|
|
11318
|
+
private readonly client;
|
|
11319
|
+
readonly sessionId: string;
|
|
11320
|
+
constructor(client: Client, sessionId: string);
|
|
11321
|
+
/**
|
|
11322
|
+
* Upload bytes as a session file. `filename` is what the browser sees when
|
|
11323
|
+
* the file is later attached to a page.
|
|
11324
|
+
*
|
|
11325
|
+
* @param file - Bytes to upload as a Blob, File, or buffer.
|
|
11326
|
+
* @param filename - Stored filename, defaulting to `file`.
|
|
11327
|
+
* @returns Metadata for the uploaded file, including its ID, name, and size.
|
|
11328
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11329
|
+
*/
|
|
11330
|
+
upload(file: Blob | Uint8Array, filename?: string): Promise<SessionFile>;
|
|
11331
|
+
/** List the session's non-expired files, newest first.
|
|
11332
|
+
*
|
|
11333
|
+
* @param options - Optional source filter and pagination. Defaults to all sources, limit 100, and offset 0.
|
|
11334
|
+
* @returns One page of non-expired files and the total count; pagination is not automatic.
|
|
11335
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11336
|
+
*/
|
|
11337
|
+
list(options?: FileListOptions): Promise<SessionFilesPage>;
|
|
11338
|
+
/**
|
|
11339
|
+
* Find a file's metadata by ID by scanning the session listing. Rejects with
|
|
11340
|
+
* `FileNotFoundError` when the ID is unknown or expired.
|
|
11341
|
+
*
|
|
11342
|
+
* @param fileId - ID of a file belonging to this session.
|
|
11343
|
+
* @returns The matching file's metadata.
|
|
11344
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11345
|
+
* @throws FileNotFoundError if the file ID is unknown or expired.
|
|
11346
|
+
*/
|
|
11347
|
+
metadata(fileId: string): Promise<SessionFile>;
|
|
11348
|
+
/** Download a file's bytes as a `Blob`.
|
|
11349
|
+
*
|
|
11350
|
+
* @param fileId - ID of a file belonging to this session.
|
|
11351
|
+
* @returns The downloaded bytes as a Blob; no local file is written.
|
|
11352
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11353
|
+
*/
|
|
11354
|
+
download(fileId: string): Promise<Blob>;
|
|
11355
|
+
/** Stream a file's bytes. Used by `RemoteFileStorage.download()` to write to disk without buffering. */
|
|
11356
|
+
stream(fileId: string): Promise<ReadableStream<Uint8Array>>;
|
|
11357
|
+
/** Delete a session file.
|
|
11358
|
+
*
|
|
11359
|
+
* @param fileId - ID of the session file to delete.
|
|
11360
|
+
* @returns Resolves when deletion succeeds.
|
|
11361
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11362
|
+
*/
|
|
11363
|
+
delete(fileId: string): Promise<void>;
|
|
11364
|
+
}
|
|
11365
|
+
/**
|
|
11366
|
+
* File storage bound to a session, the counterpart of Python's
|
|
11367
|
+
* `RemoteFileStorage`. Create it unbound and pass it to `client.Session({ storage })`
|
|
11368
|
+
* so the session binds it on start, or bind it yourself with a session ID.
|
|
11369
|
+
*
|
|
11370
|
+
* ```ts
|
|
11371
|
+
* const storage = client.FileStorage(sessionId);
|
|
11372
|
+
* const uploaded = await storage.upload('./resume.pdf');
|
|
11373
|
+
* const localPath = await storage.download(uploaded.id, './downloads');
|
|
11374
|
+
* const blob = await storage.downloadBlob(uploaded.id);
|
|
11375
|
+
* ```
|
|
11376
|
+
*
|
|
11377
|
+
* `download()` saves to disk; `downloadBlob()` returns bytes in memory, and
|
|
11378
|
+
* `stream()` returns a readable stream. For lower-level session file access,
|
|
11379
|
+
* see [NotteClient.Files](/typescript-sdk-reference/client/files).
|
|
11380
|
+
*
|
|
11381
|
+
*/
|
|
11382
|
+
declare class RemoteFileStorage {
|
|
11383
|
+
readonly client: NotteClient;
|
|
11384
|
+
private _sessionId;
|
|
11385
|
+
constructor(client: NotteClient, sessionId?: string);
|
|
11386
|
+
/** Bind the storage to a session. Called by `Session.start()` when the storage was passed to the session. */
|
|
11387
|
+
setSessionId(sessionId: string): void;
|
|
11388
|
+
/**
|
|
11389
|
+
* Bind this storage once, cloning it when another session already owns it.
|
|
11390
|
+
*
|
|
11391
|
+
* ```ts
|
|
11392
|
+
* const first = storage.forSession('session-a'); // first === storage
|
|
11393
|
+
* const second = storage.forSession('session-b'); // a clone sharing the client
|
|
11394
|
+
* ```
|
|
11395
|
+
*/
|
|
11396
|
+
forSession(sessionId: string): RemoteFileStorage;
|
|
11397
|
+
/** ID of the bound session. Throws `InvalidRequestError` while the storage is unbound. */
|
|
11398
|
+
get sessionId(): string;
|
|
11399
|
+
/** Whether the storage has been bound to a session yet. */
|
|
11400
|
+
get isBound(): boolean;
|
|
11401
|
+
private files;
|
|
11402
|
+
/**
|
|
11403
|
+
* Upload a file to the session. A string is read as a local path and its
|
|
11404
|
+
* basename becomes the uploaded filename unless `uploadFileName` is set.
|
|
11405
|
+
*
|
|
11406
|
+
* @param file - Local file path, Blob, File, or buffer to upload.
|
|
11407
|
+
* @param uploadFileName - Optional stored filename. Local paths default to their basename; File objects keep their name.
|
|
11408
|
+
* @returns Metadata for the uploaded file, including its ID, name, and size.
|
|
11409
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11410
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11411
|
+
* @throws InvalidRequestError if a supplied local path is not a file.
|
|
11412
|
+
* @example
|
|
11413
|
+
* await storage.upload('./data/resume.pdf');
|
|
11414
|
+
* await storage.upload(Buffer.from('hello'), 'hello.txt');
|
|
11415
|
+
*/
|
|
11416
|
+
upload(file: UploadableFile, uploadFileName?: string): Promise<SessionFile>;
|
|
11417
|
+
/**
|
|
11418
|
+
* List the session's files.
|
|
11419
|
+
*
|
|
11420
|
+
* @param options - Optional source filter and pagination. Defaults to all sources, limit 100, and offset 0.
|
|
11421
|
+
* @returns One page of non-expired files and the total count; pagination is not automatic.
|
|
11422
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11423
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11424
|
+
* @example
|
|
11425
|
+
* const downloads = await storage.list({ source: 'session_download', limit: 1000 });
|
|
11426
|
+
*/
|
|
11427
|
+
list(options?: FileListOptions): Promise<SessionFilesPage>;
|
|
11428
|
+
/** Metadata of a file by ID. Rejects with `FileNotFoundError` when unknown.
|
|
11429
|
+
*
|
|
11430
|
+
* @param fileId - ID of a file belonging to this session.
|
|
11431
|
+
* @returns The matching file's metadata.
|
|
11432
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11433
|
+
* @throws FileNotFoundError if the file ID is unknown or expired.
|
|
11434
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11435
|
+
*/
|
|
11436
|
+
metadata(fileId: string): Promise<SessionFile>;
|
|
11437
|
+
/**
|
|
11438
|
+
* Download a file to `<localDir>/<filename>` and return the local path. The
|
|
11439
|
+
* file is written atomically (temporary file + rename). Rejects with
|
|
11440
|
+
* `FileExistsError` when the destination exists unless `force` is set.
|
|
11441
|
+
*
|
|
11442
|
+
* @param fileId - ID of the file to download.
|
|
11443
|
+
* @param localDir - Destination directory, created if needed. Defaults to the current directory.
|
|
11444
|
+
* @param options - Set `force` to overwrite an existing destination; defaults to false.
|
|
11445
|
+
* @returns The local file path after the download has been written successfully.
|
|
11446
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11447
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11448
|
+
* @throws FileExistsError if the destination exists and `force` is false. Filesystem errors also propagate.
|
|
11449
|
+
* @example
|
|
11450
|
+
* const path = await storage.download(fileId, './downloads', { force: true });
|
|
11451
|
+
*/
|
|
11452
|
+
download(fileId: string, localDir?: string, options?: FileDownloadOptions): Promise<string>;
|
|
11453
|
+
/** Download a file's bytes as a `Blob` without touching the local filesystem. */
|
|
11454
|
+
downloadBlob(fileId: string): Promise<Blob>;
|
|
11455
|
+
/** Stream a file's bytes without buffering the whole file in memory. */
|
|
11456
|
+
stream(fileId: string): Promise<ReadableStream<Uint8Array>>;
|
|
11457
|
+
/** Delete a session file.
|
|
11458
|
+
*
|
|
11459
|
+
* @param fileId - ID of the session file to delete.
|
|
11460
|
+
* @returns Resolves when deletion succeeds.
|
|
11461
|
+
* @throws NotteAPIError if the storage API request fails.
|
|
11462
|
+
* @throws InvalidRequestError if storage has not been bound to a session.
|
|
11463
|
+
*/
|
|
11464
|
+
delete(fileId: string): Promise<void>;
|
|
11465
|
+
}
|
|
11466
|
+
|
|
11467
|
+
/** Number of attempts `start()` makes on 5xx errors, like `RemoteSession.start(tries=3)`. */
|
|
11468
|
+
declare const SESSION_START_TRIES = 3;
|
|
11469
|
+
/** Delay before retrying `start()` after an HTTP 529 (cluster overload). */
|
|
11470
|
+
declare const CLUSTER_OVERLOAD_RETRY_DELAY_MS = 30000;
|
|
11471
|
+
/** Request timeout for `captcha_solve` actions, like `PageClient.execute` in Python. */
|
|
11472
|
+
declare const CAPTCHA_SOLVE_TIMEOUT_MS = 100000;
|
|
11473
|
+
type PerceptionType = NonNullable<ObserveRequest['perception_type']>;
|
|
11474
|
+
type SessionCloseReason = 'manual' | 'error';
|
|
11475
|
+
interface ExecuteOptions {
|
|
11476
|
+
/** Throw when the action fails. Defaults to the session's `raiseOnFailure` (true). */
|
|
11477
|
+
raiseOnFailure?: boolean;
|
|
11478
|
+
}
|
|
11479
|
+
interface ReplayOptions {
|
|
11480
|
+
/** Poll until the replay is ready instead of failing on 404. Defaults to true. */
|
|
11481
|
+
wait?: boolean;
|
|
11482
|
+
/** Maximum time to wait for the replay, in milliseconds. Defaults to 240 000. */
|
|
11483
|
+
timeoutMs?: number;
|
|
11484
|
+
/** Delay between polling attempts, in milliseconds. Defaults to 5 000. */
|
|
11485
|
+
pollIntervalMs?: number;
|
|
11486
|
+
}
|
|
11487
|
+
interface SessionScriptOptions {
|
|
11488
|
+
/** Return a standalone workflow script rather than only the relevant steps. Defaults to true. */
|
|
11489
|
+
as_workflow?: boolean;
|
|
11490
|
+
/** Infer a `response_format` schema for scrape calls that have instructions but no schema. */
|
|
11491
|
+
infer_response_format?: boolean;
|
|
11492
|
+
}
|
|
11493
|
+
interface SessionOptions extends ApiSessionStartRequest {
|
|
11494
|
+
/**
|
|
11495
|
+
* @deprecated Remote sessions always use the supported browser launch mode.
|
|
11496
|
+
* Retained as a boolean so existing typed configuration still compiles.
|
|
11497
|
+
* `true` is discarded; `false` raises a migration error when starting.
|
|
11498
|
+
*/
|
|
11499
|
+
headless?: boolean;
|
|
11500
|
+
/**
|
|
11501
|
+
* Open the live viewer in the local default browser after the session starts.
|
|
11502
|
+
* This is a local SDK option and is not sent to the API.
|
|
11503
|
+
*/
|
|
11504
|
+
open_viewer?: boolean;
|
|
11505
|
+
/**
|
|
11506
|
+
* Default for `execute()`: throw `ActionExecutionError` when an action fails.
|
|
11507
|
+
* The counterpart of `raise_on_failure` on `RemoteSession`. Defaults to true.
|
|
11508
|
+
*/
|
|
11509
|
+
raiseOnFailure?: boolean;
|
|
11510
|
+
/** Default perception type for `observe()`. Defaults to `fast`. */
|
|
11511
|
+
perception_type?: PerceptionType;
|
|
11512
|
+
/**
|
|
11513
|
+
* JSON cookie file: loaded into the session on `start()` when it exists and
|
|
11514
|
+
* appended with the session cookies on `stop()`.
|
|
11515
|
+
*/
|
|
11516
|
+
cookie_file?: string;
|
|
11517
|
+
/** File storage to attach to the session so agents can consume uploaded files. */
|
|
11518
|
+
storage?: RemoteFileStorage;
|
|
11519
|
+
}
|
|
11520
|
+
/**
|
|
11521
|
+
* Keep the external CDP client from competing with Notte for native dialogs.
|
|
11522
|
+
*
|
|
11523
|
+
* Playwright automatically handles a JavaScript dialog when no listener is
|
|
11524
|
+
* registered. Native dialogs are target-global, so that default races the
|
|
11525
|
+
* Notte browser controller attached to the same target. The backend owns
|
|
11526
|
+
* dialog handling; this listener makes the SDK Playwright connection an
|
|
11527
|
+
* observer without issuing a second `Page.handleJavaScriptDialog` command.
|
|
11528
|
+
*/
|
|
11529
|
+
declare function observeServerOwnedDialog(_dialog: Dialog): void;
|
|
11530
|
+
declare function installServerOwnedDialogPolicy(browser: Pick<Browser, 'contexts'>): void;
|
|
11531
|
+
/**
|
|
11532
|
+
* Browser session created with `client.Session(options)`.
|
|
11533
|
+
* Call `start()` before using it and `stop()` when finished, or use `use()`
|
|
11534
|
+
* to start and stop automatically around an asynchronous callback.
|
|
11535
|
+
*/
|
|
11536
|
+
declare class Session {
|
|
11537
|
+
private client;
|
|
11538
|
+
private options;
|
|
11539
|
+
private openViewer;
|
|
11540
|
+
private legacyHeadless;
|
|
11541
|
+
private defaultRaiseOnFailure;
|
|
11542
|
+
private defaultPerceptionType;
|
|
11543
|
+
private cookieFile;
|
|
11544
|
+
private fileStorage;
|
|
11545
|
+
private sessionId;
|
|
11546
|
+
private isActive;
|
|
11547
|
+
private response;
|
|
11548
|
+
private playwrightBrowser;
|
|
11549
|
+
private playwrightPage;
|
|
11550
|
+
constructor(client: NotteClient, options?: SessionOptions);
|
|
11551
|
+
/**
|
|
11552
|
+
* Start the session: creates a new session on the server.
|
|
11553
|
+
*
|
|
11554
|
+
* Retries up to `SESSION_START_TRIES` times on 5xx errors, waiting
|
|
11555
|
+
* `CLUSTER_OVERLOAD_RETRY_DELAY_MS` on HTTP 529 (cluster overload). 4xx
|
|
11556
|
+
* errors are never retried.
|
|
11557
|
+
*
|
|
11558
|
+
* Prefer `session.use(async session => { ... })`, which also stops the session.
|
|
11559
|
+
* @example
|
|
11560
|
+
* const session = client.Session();
|
|
11561
|
+
* await session.start();
|
|
11562
|
+
*/
|
|
11563
|
+
start(): Promise<void>;
|
|
11564
|
+
/**
|
|
11565
|
+
* Stop the session and clean up resources (including any Playwright
|
|
11566
|
+
* connection opened with `page()`). When a `cookie_file` was given, the
|
|
11567
|
+
* session cookies are appended to it first. A session the API reports as
|
|
11568
|
+
* already stopped is tolerated with a warning.
|
|
11569
|
+
*
|
|
11570
|
+
* @example
|
|
11571
|
+
* await session.stop();
|
|
11572
|
+
*/
|
|
11573
|
+
stop(closeReason?: SessionCloseReason): Promise<void>;
|
|
11574
|
+
private closePlaywright;
|
|
11575
|
+
/**
|
|
11576
|
+
* Get the current status of the session. Like Python, this keeps working
|
|
11577
|
+
* after `stop()` (for example to read the recorded `steps`).
|
|
11578
|
+
*
|
|
11579
|
+
* @returns Current session metadata, including lifecycle status and recorded steps. Works after `stop()`.
|
|
11580
|
+
* @throws Error if this session has never been started.
|
|
11581
|
+
* @throws NotteAPIError if the status request fails.
|
|
11582
|
+
* @example
|
|
11583
|
+
* const status = await session.status();
|
|
11584
|
+
* console.log(status.status); // 'active'
|
|
11585
|
+
*/
|
|
11586
|
+
status(): Promise<SessionResponse>;
|
|
11587
|
+
/** Session ID while the session is active, `null` otherwise. */
|
|
11588
|
+
getId(): string | null;
|
|
11589
|
+
/** Whether the session has been started and not stopped yet. */
|
|
11590
|
+
isSessionActive(): boolean;
|
|
11591
|
+
/** The last `SessionResponse` received from the API (start, stop or status). */
|
|
11592
|
+
getResponse(): SessionResponse | null;
|
|
11593
|
+
/** The file storage attached to the session, when one was given. */
|
|
11594
|
+
get storage(): RemoteFileStorage | undefined;
|
|
11595
|
+
private requireSessionId;
|
|
11596
|
+
/** Session ID of the active session, or of the last one when it was stopped. */
|
|
11597
|
+
private lastSessionId;
|
|
11598
|
+
/**
|
|
10871
11599
|
* Open the live viewer for this session in the local default browser.
|
|
11600
|
+
* @throws If the session has not started or no viewer URL is available.
|
|
10872
11601
|
*/
|
|
10873
11602
|
viewer(): void;
|
|
10874
11603
|
private openViewerInBrowser;
|
|
10875
11604
|
/**
|
|
10876
|
-
*
|
|
11605
|
+
* Get presigned URLs for the session replay. Recordings are finalized after
|
|
11606
|
+
* the session is closed, so by default this polls on 404 until the replay is
|
|
11607
|
+
* ready. It keeps working after `stop()`.
|
|
11608
|
+
*
|
|
11609
|
+
* Throws an `Error` when the API reports the session is still active and a
|
|
11610
|
+
* `NotteTimeoutError` when the replay is not ready within `timeoutMs`.
|
|
11611
|
+
* @example
|
|
11612
|
+
* await session.stop();
|
|
11613
|
+
* const replay = await session.replay();
|
|
11614
|
+
* console.log(replay.mp4_url);
|
|
11615
|
+
*/
|
|
11616
|
+
replay(options?: ReplayOptions): Promise<ReplayResponse>;
|
|
11617
|
+
/**
|
|
11618
|
+
* Download the MP4 replay to a local file, like `ReplayResponse.download()`
|
|
11619
|
+
* in Python. Resolves with the absolute path of the written file and throws
|
|
11620
|
+
* when the replay has no `mp4_url`.
|
|
11621
|
+
*
|
|
11622
|
+
* @example
|
|
11623
|
+
* await session.stop();
|
|
11624
|
+
* const file = await session.downloadReplay('session.mp4');
|
|
11625
|
+
*/
|
|
11626
|
+
downloadReplay(path?: string, options?: ReplayOptions): Promise<string>;
|
|
11627
|
+
/**
|
|
11628
|
+
* Upload cookies to the session.
|
|
11629
|
+
*
|
|
11630
|
+
* @example
|
|
11631
|
+
* await session.setCookies([{ name: 'token', value: 'abc', domain: 'example.com', path: '/', httpOnly: false }]);
|
|
10877
11632
|
*/
|
|
10878
11633
|
setCookies(cookies: Cookie[]): Promise<ExecutionResponse>;
|
|
10879
11634
|
/**
|
|
10880
|
-
*
|
|
11635
|
+
* Upload cookies from a JSON file (a list of cookies, like `getCookies()` returns).
|
|
11636
|
+
*
|
|
11637
|
+
* @example
|
|
11638
|
+
* await session.setCookiesFromFile('cookies.json');
|
|
10881
11639
|
*/
|
|
10882
11640
|
setCookiesFromFile(cookieFile: string): Promise<ExecutionResponse>;
|
|
10883
11641
|
/**
|
|
10884
|
-
* Get cookies
|
|
11642
|
+
* Get the cookies of the session.
|
|
11643
|
+
*
|
|
11644
|
+
* @example
|
|
11645
|
+
* const cookies = await session.getCookies();
|
|
11646
|
+
* await fs.writeFile('cookies.json', JSON.stringify(cookies));
|
|
10885
11647
|
*/
|
|
10886
11648
|
getCookies(): Promise<Cookie[]>;
|
|
11649
|
+
/** Detailed debug information for the session (debug URL, websocket URLs, tabs). */
|
|
11650
|
+
debugInfo(): Promise<SessionDebugResponse>;
|
|
10887
11651
|
/**
|
|
10888
|
-
*
|
|
11652
|
+
* Debug information for one tab of the session. The API client has no
|
|
11653
|
+
* dedicated tab endpoint, so this reads the tab from `debugInfo().tabs`.
|
|
10889
11654
|
*/
|
|
10890
|
-
|
|
11655
|
+
debugTabInfo(tabIdx?: number): Promise<TabSessionDebugResponse>;
|
|
10891
11656
|
/**
|
|
10892
|
-
*
|
|
11657
|
+
* Get the Chrome DevTools Protocol WebSocket URL for the session.
|
|
11658
|
+
*
|
|
11659
|
+
* A `cdp_url` given at construction (another browser provider) is returned
|
|
11660
|
+
* untouched. Notte-served URLs, from the start response or the debug info,
|
|
11661
|
+
* carry the database preview branch when one is configured.
|
|
11662
|
+
*
|
|
11663
|
+
* @returns The CDP WebSocket URL for connecting a browser automation client.
|
|
11664
|
+
* @throws Error if no session ID or CDP URL is available.
|
|
11665
|
+
* @example
|
|
11666
|
+
* const browser = await chromium.connectOverCDP(await session.cdpUrl());
|
|
10893
11667
|
*/
|
|
10894
|
-
|
|
11668
|
+
cdpUrl(): Promise<string>;
|
|
10895
11669
|
/**
|
|
10896
|
-
* Get session
|
|
11670
|
+
* Get a Playwright page connected to the session via CDP. The connection is
|
|
11671
|
+
* established lazily on first access, cached, and closed by `stop()`.
|
|
11672
|
+
* Native dialogs are left to the Notte backend.
|
|
11673
|
+
*
|
|
11674
|
+
* Requires the optional `playwright-core` peer dependency
|
|
11675
|
+
* (`npm install playwright-core`).
|
|
11676
|
+
*
|
|
11677
|
+
* @example
|
|
11678
|
+
* const page = await session.page();
|
|
11679
|
+
* await page.goto('https://www.google.com');
|
|
11680
|
+
* await page.screenshot({ path: 'screenshot.png' });
|
|
10897
11681
|
*/
|
|
10898
|
-
|
|
11682
|
+
page(): Promise<Page>;
|
|
10899
11683
|
/**
|
|
10900
|
-
*
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
11684
|
+
* Get the workflow code generated from the session steps
|
|
11685
|
+
* (`GET /sessions/{id}/workflow/code`).
|
|
11686
|
+
*
|
|
11687
|
+
* @example
|
|
11688
|
+
* const { python_script } = await session.getScript();
|
|
11689
|
+
*/
|
|
11690
|
+
getScript(options?: SessionScriptOptions): Promise<AgentFunctionCodeResponse>;
|
|
11691
|
+
/**
|
|
11692
|
+
* Execute an action on the current page.
|
|
11693
|
+
*
|
|
11694
|
+
* When the action fails and `raiseOnFailure` is true (the default, see the
|
|
11695
|
+
* session option), the structured `exception_detail` returned by the API is
|
|
11696
|
+
* rehydrated into an `ActionExecutionError` whose `errorType` names the
|
|
11697
|
+
* server-side error class. `captcha_solve` actions get a 100 s request
|
|
11698
|
+
* timeout and are retried up to 3 times on HTTP 408.
|
|
11699
|
+
*
|
|
11700
|
+
* @param action - Action type, target, and action-specific arguments.
|
|
11701
|
+
* @param options - Override failure handling for this call; otherwise use the session setting.
|
|
11702
|
+
* @returns The execution response, including `success` and failure details when throwing is disabled.
|
|
11703
|
+
* @throws ActionExecutionError if the action fails and failure throwing is enabled.
|
|
11704
|
+
* @throws NotteAPIError if the API request fails.
|
|
11705
|
+
* @example
|
|
11706
|
+
* import { actions } from 'notte-sdk';
|
|
11707
|
+
*
|
|
11708
|
+
* await session.execute({ type: 'goto', url: 'https://www.notte.cc' });
|
|
11709
|
+
* await session.execute(actions.fill({ selector: "input[name='email']", value: 'user@example.com' }));
|
|
11710
|
+
* const result = await session.execute({ type: 'click', id: 'B1' }, { raiseOnFailure: false });
|
|
11711
|
+
* if (!result.success) console.log(result.message);
|
|
11712
|
+
*/
|
|
11713
|
+
execute(action: ExecuteAction, options?: boolean | ExecuteOptions): Promise<ApiExecutionResponse>;
|
|
11714
|
+
/**
|
|
11715
|
+
* Evaluate JavaScript on the current page and return its result as a string.
|
|
11716
|
+
*
|
|
11717
|
+
* The result is stringified the way `evaluate_js` records it: objects and
|
|
11718
|
+
* arrays as JSON, a JS `null` as the string `"null"`. On failure the typed
|
|
11719
|
+
* `ActionExecutionError` is thrown with the actual JavaScript error; pass
|
|
11720
|
+
* `raiseOnFailure: false` to get the execution result envelope instead.
|
|
11721
|
+
*
|
|
11722
|
+
* @example
|
|
11723
|
+
* const title = await session.evaluateJs('document.title');
|
|
11724
|
+
* const payload = JSON.parse(await session.evaluateJs('(async () => JSON.stringify(await (await fetch("/api")).json()))()'));
|
|
11725
|
+
*/
|
|
11726
|
+
evaluateJs(code: string, options?: {
|
|
11727
|
+
raiseOnFailure?: true;
|
|
11728
|
+
}): Promise<string>;
|
|
11729
|
+
evaluateJs(code: string, options: {
|
|
11730
|
+
raiseOnFailure: false;
|
|
11731
|
+
}): Promise<ApiExecutionResponse>;
|
|
11732
|
+
/**
|
|
11733
|
+
* Issue an HTTP request from the page the session is on and return the response.
|
|
11734
|
+
*
|
|
11735
|
+
* The request runs inside the browser through `fetch()`, so it carries the
|
|
11736
|
+
* page's cookies, the session's proxy and the browser's own network
|
|
11737
|
+
* fingerprint. A relative `url` resolves against the current page, which
|
|
11738
|
+
* also makes it same-origin; a cross-origin URL is subject to CORS exactly
|
|
11739
|
+
* as in a browser tab, so `goto` the target origin first. Redirects are
|
|
11740
|
+
* followed and the final URL is on `response.url`. A non-2xx status is
|
|
11741
|
+
* returned, not thrown; `response.raiseForStatus()` throws `PageFetchHTTPError`.
|
|
11742
|
+
*
|
|
11743
|
+
* `json` is serialised as the body with an `application/json` content type,
|
|
11744
|
+
* `data` as a form body when it is an object or verbatim when it is a string.
|
|
11745
|
+
*
|
|
11746
|
+
* @param url - Absolute URL or a path relative to the current page.
|
|
11747
|
+
* @param options - HTTP method, headers, and request body settings.
|
|
11748
|
+
* @returns A response with status, headers, and body readers. Non-2xx responses are not automatically thrown.
|
|
11749
|
+
* @throws ActionExecutionError if browser-side execution fails.
|
|
11750
|
+
* @example
|
|
11751
|
+
* await session.execute({ type: 'goto', url: 'https://en.wikipedia.org/wiki/Main_Page' });
|
|
11752
|
+
* const summary = await (await session.fetch('/api/rest_v1/page/summary/Main_Page')).json();
|
|
11753
|
+
*/
|
|
11754
|
+
fetch(url: string, options?: PageFetchOptions): Promise<PageFetchResponse>;
|
|
11755
|
+
/**
|
|
11756
|
+
* Observe the current page: the list of actions that can be taken, a
|
|
11757
|
+
* screenshot and page metadata.
|
|
11758
|
+
*
|
|
11759
|
+
* The `perception_type` defaults to the session option (`fast`). A bare
|
|
11760
|
+
* string argument is accepted as the perception type.
|
|
11761
|
+
*
|
|
11762
|
+
* @param options - Observation settings, including an optional URL, or a perception-mode string.
|
|
11763
|
+
* @returns Structured page analysis, available actions, and page metadata.
|
|
11764
|
+
* @throws NotteAPIError if observation fails.
|
|
11765
|
+
* @example
|
|
11766
|
+
* const obs = await session.observe();
|
|
11767
|
+
* console.log(obs.space.description);
|
|
11768
|
+
* const deep = await session.observe({ perception_type: 'deep', max_nb_actions: 50 });
|
|
11769
|
+
*/
|
|
11770
|
+
observe(options?: ObserveRequest | PerceptionType): Promise<Observation>;
|
|
11771
|
+
/**
|
|
11772
|
+
* Scrape the current page.
|
|
11773
|
+
*
|
|
11774
|
+
* With `response_format` or `instructions`, the extracted data is returned
|
|
11775
|
+
* directly and a failed extraction throws `ScrapeFailedError`. Pass
|
|
11776
|
+
* `raiseOnFailure: false` to receive the `StructuredData` wrapper instead.
|
|
11777
|
+
* @example
|
|
11778
|
+
* const markdown = await session.scrape({ only_main_content: true });
|
|
11779
|
+
* const images = await session.scrape({ only_images: true });
|
|
11780
|
+
* const product = await session.scrape({ response_format: Product, instructions: 'Extract the product' });
|
|
11781
|
+
* const result = await session.scrape({ response_format: Product, raiseOnFailure: false });
|
|
11782
|
+
* if (result.success) console.log(result.data);
|
|
11783
|
+
*/
|
|
11784
|
+
scrape(options: SessionScrapeOptions<unknown> & {
|
|
11785
|
+
only_images: true;
|
|
11786
|
+
}): Promise<ImageData[]>;
|
|
11787
|
+
scrape(options?: SessionScrapeOptions<unknown> & {
|
|
11788
|
+
response_format?: undefined;
|
|
11789
|
+
instructions?: undefined | null;
|
|
11790
|
+
only_images?: false;
|
|
11791
|
+
}): Promise<string>;
|
|
11792
|
+
scrape<T>(options: SessionScrapeOptions<T> & {
|
|
11793
|
+
response_format: ZodLikeSchema<T>;
|
|
11794
|
+
raiseOnFailure?: true;
|
|
10906
11795
|
}): Promise<T>;
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
11796
|
+
scrape<T>(options: SessionScrapeOptions<T> & {
|
|
11797
|
+
response_format: ZodLikeSchema<T>;
|
|
11798
|
+
raiseOnFailure: false;
|
|
11799
|
+
}): Promise<StructuredData<T>>;
|
|
11800
|
+
scrape(options: SessionScrapeOptions<unknown>): Promise<ScrapeResult<unknown>>;
|
|
11801
|
+
/**
|
|
11802
|
+
* Context manager pattern: start the session, run the callback and stop the
|
|
11803
|
+
* session, with close reason `error` when the callback throws.
|
|
11804
|
+
*
|
|
11805
|
+
* @param callback - Async work to perform with the started session.
|
|
11806
|
+
* @returns The callback's return value after session cleanup has been attempted.
|
|
11807
|
+
* @throws Error if startup fails, the callback throws, or cleanup fails after a successful callback.
|
|
11808
|
+
* @example
|
|
11809
|
+
* await client.Session().use(async session => {
|
|
11810
|
+
* await session.execute({ type: 'goto', url: 'https://www.notte.cc' });
|
|
11811
|
+
* });
|
|
10910
11812
|
*/
|
|
10911
11813
|
use<T>(callback: (session: Session) => Promise<T>): Promise<T>;
|
|
10912
11814
|
/**
|
|
10913
|
-
* Async iterator pattern for session lifecycle management
|
|
10914
|
-
*
|
|
11815
|
+
* Async iterator pattern for session lifecycle management.
|
|
11816
|
+
*
|
|
11817
|
+
* ```ts
|
|
11818
|
+
* for await (const session of client.Session()) {
|
|
11819
|
+
* await session.execute({ type: 'goto', url: 'https://www.notte.cc' });
|
|
11820
|
+
* }
|
|
11821
|
+
* ```
|
|
10915
11822
|
*/
|
|
10916
11823
|
[Symbol.asyncIterator](): AsyncGenerator<this, void, unknown>;
|
|
10917
11824
|
}
|
|
@@ -10919,12 +11826,67 @@ declare class Session {
|
|
|
10919
11826
|
interface VaultConstructorWithId {
|
|
10920
11827
|
vault_id: string;
|
|
10921
11828
|
}
|
|
10922
|
-
interface VaultConstructorCreate extends
|
|
11829
|
+
interface VaultConstructorCreate extends VaultCreateRequest {
|
|
10923
11830
|
vault_id?: never;
|
|
10924
11831
|
}
|
|
10925
11832
|
type VaultConstructor = VaultConstructorWithId | VaultConstructorCreate;
|
|
11833
|
+
/** Credential fields read by `addCredentialsFromEnv`, in the order Python's `CredentialField.registry` declares them. */
|
|
11834
|
+
declare const CREDENTIAL_FIELDS: readonly ["email", "username", "mfa_secret", "password"];
|
|
11835
|
+
type CredentialField = (typeof CREDENTIAL_FIELDS)[number];
|
|
11836
|
+
/**
|
|
11837
|
+
* Get the root domain of a URL, the counterpart of `notte_core.utils.url.get_root_domain`.
|
|
11838
|
+
* Returns an empty string when no domain can be extracted.
|
|
11839
|
+
*
|
|
11840
|
+
* ```ts
|
|
11841
|
+
* getRootDomain('https://www.example.com/path'); // 'example.com'
|
|
11842
|
+
* getRootDomain('https://test.peeple.com/ok'); // 'peeple.com'
|
|
11843
|
+
* getRootDomain('https://shop.example.co.uk'); // 'example.co.uk'
|
|
11844
|
+
* ```
|
|
11845
|
+
*/
|
|
11846
|
+
declare function getRootDomain(url: string): string;
|
|
10926
11847
|
/**
|
|
10927
|
-
*
|
|
11848
|
+
* Normalise a credential URL to its root domain, the counterpart of
|
|
11849
|
+
* `notte_sdk.types.validate_url`. Throws `InvalidRequestError` when the URL
|
|
11850
|
+
* has no domain name.
|
|
11851
|
+
*
|
|
11852
|
+
* ```ts
|
|
11853
|
+
* validateUrl('https://github.com/login'); // 'github.com'
|
|
11854
|
+
* validateUrl('https://'); // throws InvalidRequestError
|
|
11855
|
+
* ```
|
|
11856
|
+
*/
|
|
11857
|
+
declare function validateUrl(url: string): string;
|
|
11858
|
+
/**
|
|
11859
|
+
* Check that a string is a base32 TOTP secret, with the padding rules Python's
|
|
11860
|
+
* `pyotp.TOTP(secret).now()` applies (`base64.b32decode` after right-padding
|
|
11861
|
+
* the secret to a multiple of eight characters).
|
|
11862
|
+
*/
|
|
11863
|
+
declare function isValidMfaSecret(secret: string): boolean;
|
|
11864
|
+
/**
|
|
11865
|
+
* Validate an MFA secret like `AddCredentialsRequest.check_email_and_username`
|
|
11866
|
+
* in Python. Rejects one-time codes (`999777`) and anything that is not base32.
|
|
11867
|
+
*/
|
|
11868
|
+
declare function validateMfaSecret(secret: string): void;
|
|
11869
|
+
/**
|
|
11870
|
+
* Apply the client-side rules of Python's `AddCredentialsRequest`: exactly one
|
|
11871
|
+
* of `username` / `email`, and a base32 `mfa_secret` when one is provided.
|
|
11872
|
+
* Returns the credentials unchanged.
|
|
11873
|
+
*/
|
|
11874
|
+
declare function validateCredentials(credentials: CredentialsDictInput): CredentialsDictInput;
|
|
11875
|
+
/**
|
|
11876
|
+
* Vault that fetches credentials stored using the SDK, the counterpart of
|
|
11877
|
+
* `notte_sdk.endpoints.vaults.NotteVault`.
|
|
11878
|
+
*
|
|
11879
|
+
* The remote vault is created lazily on the first API operation so local-only
|
|
11880
|
+
* helpers such as `generatePassword()` stay side-effect free. Every API
|
|
11881
|
+
* failure rejects with a `NotteAPIError`; caller mistakes (invalid URL,
|
|
11882
|
+
* one-time code stored as an MFA secret, ...) reject with `InvalidRequestError`.
|
|
11883
|
+
* // pragma: allowlist secret
|
|
11884
|
+
* ```ts
|
|
11885
|
+
* const vault = client.Vault({ name: 'My vault' });
|
|
11886
|
+
* await vault.addCredentials('https://github.com/', { email: 'me@example.org', password: 'secret' }); // pragma: allowlist secret
|
|
11887
|
+
* const credentials = await vault.getCredentials('https://github.com/login');
|
|
11888
|
+
* await vault.stop(); // deletes the vault and every credential it holds
|
|
11889
|
+
* ```
|
|
10928
11890
|
*/
|
|
10929
11891
|
declare class NotteVault {
|
|
10930
11892
|
private client;
|
|
@@ -10936,70 +11898,105 @@ declare class NotteVault {
|
|
|
10936
11898
|
private initNewVault;
|
|
10937
11899
|
private verifyVaultExists;
|
|
10938
11900
|
private ensureInitialized;
|
|
11901
|
+
/** ID of the remote vault. Throws until the first API operation has created or verified it. */
|
|
10939
11902
|
get vaultId(): string;
|
|
10940
11903
|
/**
|
|
10941
|
-
* Start the vault -
|
|
11904
|
+
* Start the vault. No-op kept for parity with Python's `SyncResource` interface.
|
|
10942
11905
|
*/
|
|
10943
11906
|
start(): void;
|
|
10944
11907
|
/**
|
|
10945
|
-
* Stop the vault
|
|
11908
|
+
* Stop the vault: deletes it together with every credential it holds.
|
|
11909
|
+
*
|
|
11910
|
+
* ```ts
|
|
11911
|
+
* await vault.stop();
|
|
11912
|
+
* ```
|
|
10946
11913
|
*/
|
|
10947
11914
|
stop(): Promise<void>;
|
|
10948
11915
|
/**
|
|
10949
|
-
* Add or update credentials for a URL
|
|
11916
|
+
* Add or update the credentials stored for a website. The URL is reduced to
|
|
11917
|
+
* its root domain (`https://github.com/login` → `github.com`) before it is
|
|
11918
|
+
* sent, like Python's `AddCredentialsRequest`.
|
|
11919
|
+
*
|
|
11920
|
+
* ```ts
|
|
11921
|
+
* await vault.addCredentials('https://github.com/', {
|
|
11922
|
+
* email: 'me@example.org',
|
|
11923
|
+
* password: 'secret', // pragma: allowlist secret
|
|
11924
|
+
* mfa_secret: 'JBSWY3DPEHPK3PXP', // pragma: allowlist secret
|
|
11925
|
+
* });
|
|
11926
|
+
* ```
|
|
10950
11927
|
*/
|
|
10951
11928
|
addCredentials(url: string, credentials: CredentialsDictInput): Promise<void>;
|
|
10952
11929
|
/**
|
|
10953
|
-
* Get credentials for a
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
*
|
|
11930
|
+
* Get the credentials stored for a website. Rejects with a `NotteAPIError`
|
|
11931
|
+
* when the vault holds no credentials for that domain, like Python's
|
|
11932
|
+
* `get_credentials`.
|
|
11933
|
+
*
|
|
11934
|
+
* ```ts
|
|
11935
|
+
* const { email, password } = await vault.getCredentials('https://github.com/login');
|
|
11936
|
+
* ```
|
|
10958
11937
|
*/
|
|
10959
|
-
|
|
11938
|
+
getCredentials(url: string): Promise<CredentialsDictOutput>;
|
|
10960
11939
|
/**
|
|
10961
|
-
*
|
|
11940
|
+
* Check whether the vault holds credentials for a website, the counterpart
|
|
11941
|
+
* of `BaseVault.has_credential`. Never rejects for a missing credential.
|
|
11942
|
+
*
|
|
11943
|
+
* ```ts
|
|
11944
|
+
* if (!(await vault.hasCredential('https://github.com/'))) {
|
|
11945
|
+
* await vault.addCredentialsFromEnv('https://github.com/');
|
|
11946
|
+
* }
|
|
11947
|
+
* ```
|
|
10962
11948
|
*/
|
|
10963
|
-
|
|
11949
|
+
hasCredential(url: string): Promise<boolean>;
|
|
10964
11950
|
/**
|
|
10965
|
-
*
|
|
11951
|
+
* Delete the credentials stored for a website.
|
|
11952
|
+
*
|
|
11953
|
+
* ```ts
|
|
11954
|
+
* await vault.deleteCredentials('https://github.com/');
|
|
11955
|
+
* ```
|
|
10966
11956
|
*/
|
|
10967
|
-
|
|
11957
|
+
deleteCredentials(url: string): Promise<void>;
|
|
10968
11958
|
/**
|
|
10969
|
-
* List
|
|
11959
|
+
* List the websites the vault holds credentials for. Passwords are never returned.
|
|
11960
|
+
*
|
|
11961
|
+
* ```ts
|
|
11962
|
+
* const credentials = await vault.listCredentials();
|
|
11963
|
+
* console.log(credentials.map(c => c.url));
|
|
11964
|
+
* ```
|
|
10970
11965
|
*/
|
|
10971
11966
|
listCredentials(): Promise<Credential[]>;
|
|
10972
11967
|
/**
|
|
10973
|
-
* Delete
|
|
10974
|
-
*/
|
|
10975
|
-
deleteCreditCard(): Promise<void>;
|
|
10976
|
-
/**
|
|
10977
|
-
* Delete the entire vault
|
|
11968
|
+
* Delete the vault and every credential it holds.
|
|
10978
11969
|
*/
|
|
10979
11970
|
delete(): Promise<void>;
|
|
10980
11971
|
/**
|
|
10981
|
-
* Add credentials from environment variables
|
|
10982
|
-
*
|
|
11972
|
+
* Add credentials read from environment variables, the counterpart of
|
|
11973
|
+
* `BaseVault.add_credentials_from_env`. For `https://github.com/` the
|
|
11974
|
+
* variables are `GITHUB_COM_EMAIL`, `GITHUB_COM_USERNAME`,
|
|
11975
|
+
* `GITHUB_COM_MFA_SECRET` and `GITHUB_COM_PASSWORD`.
|
|
11976
|
+
*
|
|
11977
|
+
* ```ts
|
|
11978
|
+
* process.env.GITHUB_COM_EMAIL = 'me@example.org';
|
|
11979
|
+
* process.env.GITHUB_COM_PASSWORD = 'secret'; // pragma: allowlist secret
|
|
11980
|
+
* await vault.addCredentialsFromEnv('https://github.com/');
|
|
11981
|
+
* ```
|
|
10983
11982
|
*/
|
|
10984
11983
|
addCredentialsFromEnv(url: string): Promise<void>;
|
|
10985
11984
|
/**
|
|
10986
|
-
*
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
*
|
|
10991
|
-
*
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
/**
|
|
10995
|
-
* Generate a secure random password
|
|
10996
|
-
* Mirrors Python's generate_password method
|
|
11985
|
+
* Generate a secure random password, the counterpart of Python's
|
|
11986
|
+
* `generate_password`. The result always contains a lowercase letter, an
|
|
11987
|
+
* uppercase letter and a digit, plus a special character unless
|
|
11988
|
+
* `includeSpecialChars` is false.
|
|
11989
|
+
*
|
|
11990
|
+
* ```ts
|
|
11991
|
+
* const password = vault.generatePassword(24);
|
|
11992
|
+
* ```
|
|
10997
11993
|
*/
|
|
10998
11994
|
generatePassword(length?: number, includeSpecialChars?: boolean): string;
|
|
10999
11995
|
}
|
|
11000
11996
|
|
|
11001
11997
|
type MessageReadOptions = NonNullable<PersonaEmailsListData['query']>;
|
|
11002
11998
|
type PersonaListOptions = NonNullable<ListPersonasData['query']>;
|
|
11999
|
+
type PersonaResponseWithInternalEmail = PersonaResponse;
|
|
11003
12000
|
interface PersonaConstructorWithId {
|
|
11004
12001
|
persona_id: string;
|
|
11005
12002
|
}
|
|
@@ -11026,11 +12023,12 @@ declare class NottePersona {
|
|
|
11026
12023
|
private response;
|
|
11027
12024
|
private initPromise;
|
|
11028
12025
|
private _vault;
|
|
12026
|
+
private readonly ownsPersona;
|
|
11029
12027
|
constructor(client: NotteClient, options?: PersonaConstructor);
|
|
11030
12028
|
/**
|
|
11031
12029
|
* Get persona info
|
|
11032
12030
|
*/
|
|
11033
|
-
get info():
|
|
12031
|
+
get info(): PersonaResponseWithInternalEmail;
|
|
11034
12032
|
/**
|
|
11035
12033
|
* Get vault (cached property equivalent)
|
|
11036
12034
|
*/
|
|
@@ -11046,6 +12044,14 @@ declare class NottePersona {
|
|
|
11046
12044
|
* Get persona ID
|
|
11047
12045
|
*/
|
|
11048
12046
|
get personaId(): string;
|
|
12047
|
+
/**
|
|
12048
|
+
* Public, human-readable email address of the persona
|
|
12049
|
+
*/
|
|
12050
|
+
get email(): string;
|
|
12051
|
+
/**
|
|
12052
|
+
* Internal UUID-backed mailbox address of the persona
|
|
12053
|
+
*/
|
|
12054
|
+
get internalEmail(): string;
|
|
11049
12055
|
/**
|
|
11050
12056
|
* Start the persona - ensures initialization
|
|
11051
12057
|
*/
|
|
@@ -11081,13 +12087,26 @@ declare class NottePersona {
|
|
|
11081
12087
|
/**
|
|
11082
12088
|
* Get persona information (alias for ensureInitialized)
|
|
11083
12089
|
*/
|
|
11084
|
-
get(): Promise<
|
|
12090
|
+
get(): Promise<PersonaResponseWithInternalEmail>;
|
|
11085
12091
|
/**
|
|
11086
|
-
*
|
|
12092
|
+
* Run a callback and automatically delete a persona created by this instance.
|
|
12093
|
+
* Personas loaded by an existing ID are retained after the callback finishes.
|
|
11087
12094
|
*/
|
|
11088
12095
|
use<T>(callback: (persona: NottePersona) => Promise<T>): Promise<T>;
|
|
11089
12096
|
}
|
|
11090
12097
|
|
|
12098
|
+
/**
|
|
12099
|
+
* If `response_format` is a Zod schema, convert it to JSON Schema for the API
|
|
12100
|
+
* and return the schema for later runtime validation of the agent's answer.
|
|
12101
|
+
* Mirrors the Zod handling on `session.scrape()`.
|
|
12102
|
+
*/
|
|
12103
|
+
declare function prepareAgentRequest<T = unknown>(data: AgentRunRequest & {
|
|
12104
|
+
response_format?: z.ZodSchema<T> | unknown | null;
|
|
12105
|
+
}): {
|
|
12106
|
+
apiData: AgentRunRequest;
|
|
12107
|
+
zodSchema: z.ZodSchema<T> | null;
|
|
12108
|
+
};
|
|
12109
|
+
declare function parseAgentStatusMessage(parsed: any, agentId: string): LegacyAgentStatusResponse | null;
|
|
11091
12110
|
interface AgentConstructorWithSession extends Omit<ApiAgentStartRequest, 'session_id' | 'vault_id' | 'persona_id' | 'task' | 'response_format' | 'url'> {
|
|
11092
12111
|
session: Session;
|
|
11093
12112
|
vault?: NotteVault;
|
|
@@ -11158,7 +12177,7 @@ declare class Agent {
|
|
|
11158
12177
|
/**
|
|
11159
12178
|
* Get agent status - mirrors Python status method
|
|
11160
12179
|
*/
|
|
11161
|
-
status(): Promise<LegacyAgentStatusResponse>;
|
|
12180
|
+
status(signal?: AbortSignal): Promise<LegacyAgentStatusResponse>;
|
|
11162
12181
|
/**
|
|
11163
12182
|
* Stop the agent - mirrors Python stop method
|
|
11164
12183
|
*/
|
|
@@ -11176,97 +12195,586 @@ declare class Agent {
|
|
|
11176
12195
|
*/
|
|
11177
12196
|
get sessionId(): string;
|
|
11178
12197
|
/**
|
|
11179
|
-
*
|
|
12198
|
+
* Whether `start()`/`run()` was called on this instance (or it was built from an agent id).
|
|
12199
|
+
* This is a local check and does not contact the API.
|
|
12200
|
+
*/
|
|
12201
|
+
hasStarted(): boolean;
|
|
12202
|
+
/**
|
|
12203
|
+
* Whether the agent is still active on the server. Fetches the current status,
|
|
12204
|
+
* like calling `agent.status()` in Python; an agent that was never started is not active.
|
|
12205
|
+
*/
|
|
12206
|
+
isActive(): Promise<boolean>;
|
|
12207
|
+
/**
|
|
12208
|
+
* @deprecated Only reports whether this instance was started; it does not
|
|
12209
|
+
* contact the API. Use `hasStarted()` for that check or `isActive()` for the
|
|
12210
|
+
* live server status.
|
|
11180
12211
|
*/
|
|
11181
12212
|
isRunning(): boolean;
|
|
11182
12213
|
}
|
|
11183
12214
|
|
|
11184
|
-
|
|
12215
|
+
/** Default deadline of `run()`, the counterpart of `WorkflowsClient.WORKFLOW_RUN_TIMEOUT` (5 minutes). */
|
|
12216
|
+
declare const FUNCTION_RUN_TIMEOUT_MS: number;
|
|
12217
|
+
/**
|
|
12218
|
+
* Run endpoints that the OpenAPI spec does not describe. They are the Python
|
|
12219
|
+
* SDK's `WorkflowsClient.CREATE_WORKFLOW_RUN` and `START_WORKFLOW_RUN` paths
|
|
12220
|
+
* and are only ever called through `NotteFunction.postRunEndpoint()`.
|
|
12221
|
+
*/
|
|
12222
|
+
declare const FUNCTION_RUN_ENDPOINTS: {
|
|
12223
|
+
/** `POST` creates a run record without executing it (`CreateFunctionRunRequest`). */
|
|
12224
|
+
readonly create: "/functions/{function_id}/runs/create";
|
|
12225
|
+
/** `POST` executes a previously created run (`StartFunctionRunRequest`). */
|
|
12226
|
+
readonly start: "/functions/{function_id}/runs/{run_id}";
|
|
12227
|
+
};
|
|
12228
|
+
/**
|
|
12229
|
+
* The run endpoints hand the caller's key to the execution runtime through
|
|
12230
|
+
* this header (the `Authorization` header is not forwarded), so `run()` sends
|
|
12231
|
+
* it whenever the client holds a key, like `WorkflowsClient.run` in Python.
|
|
12232
|
+
* Proxy-mode clients have no key; their proxy must add the header itself.
|
|
12233
|
+
*/
|
|
12234
|
+
declare const RUN_API_KEY_HEADER = "x-notte-api-key";
|
|
12235
|
+
type FunctionRuntime = NonNullable<RunFunctionRequest['runtime']>;
|
|
12236
|
+
type FunctionRunStatus = GetFunctionRunResponse['status'];
|
|
12237
|
+
/** Reference an existing function by ID. */
|
|
12238
|
+
interface FunctionConstructorWithId {
|
|
12239
|
+
function_id: string;
|
|
12240
|
+
/** Key used to decrypt the download URL of Notte managed functions. */
|
|
12241
|
+
decryption_key?: string;
|
|
12242
|
+
path?: never;
|
|
12243
|
+
}
|
|
12244
|
+
/**
|
|
12245
|
+
* Create a function from a local `.py` file, like `client.Function(path=...)`
|
|
12246
|
+
* in Python. The upload happens on the first operation that needs the ID.
|
|
12247
|
+
*/
|
|
12248
|
+
interface FunctionConstructorCreate {
|
|
12249
|
+
/** Path to the python file containing the `run` function. Must end with `.py`. */
|
|
12250
|
+
path: string;
|
|
12251
|
+
name?: string | null;
|
|
12252
|
+
description?: string | null;
|
|
12253
|
+
/** Whether the function is public and shared with other users. Defaults to false. */
|
|
12254
|
+
shared?: boolean;
|
|
12255
|
+
decryption_key?: string;
|
|
12256
|
+
function_id?: never;
|
|
12257
|
+
}
|
|
12258
|
+
type FunctionConstructor = FunctionConstructorWithId | FunctionConstructorCreate;
|
|
12259
|
+
/** Result of executing a run, the counterpart of `FunctionRunResponse` in Python. */
|
|
12260
|
+
interface FunctionRunResult {
|
|
12261
|
+
function_id: string;
|
|
11185
12262
|
function_run_id: string;
|
|
11186
|
-
|
|
12263
|
+
session_id: string | null;
|
|
12264
|
+
/** The value returned by the script's `run` function, decoded from JSON. */
|
|
12265
|
+
result: unknown;
|
|
12266
|
+
status: FunctionRunStatus;
|
|
11187
12267
|
}
|
|
11188
|
-
|
|
12268
|
+
/** Alias of `FunctionRunResult` using the Python model name. */
|
|
12269
|
+
type FunctionRunResponse = FunctionRunResult;
|
|
12270
|
+
/** @deprecated `run()` now returns `FunctionRunResult` whether or not it streams. */
|
|
12271
|
+
type FunctionRunStartResult = FunctionRunResult;
|
|
12272
|
+
/** Run record returned by `createRun()`, the counterpart of `CreateFunctionRunResponse` in Python. */
|
|
12273
|
+
interface FunctionRunCreateResult {
|
|
11189
12274
|
function_id: string;
|
|
11190
|
-
|
|
12275
|
+
function_run_id: string;
|
|
12276
|
+
created_at: string;
|
|
12277
|
+
status: 'created';
|
|
12278
|
+
}
|
|
12279
|
+
interface FunctionRunCreateOptions {
|
|
12280
|
+
/** Mark the record as a local run. Defaults to false; the Node SDK only executes on the cloud. */
|
|
12281
|
+
local?: boolean;
|
|
11191
12282
|
}
|
|
11192
|
-
interface
|
|
11193
|
-
/**
|
|
12283
|
+
interface FunctionRunOptions {
|
|
12284
|
+
/** Stream logs and wait for completion. Defaults to true. */
|
|
12285
|
+
stream?: boolean;
|
|
12286
|
+
/** Receive streamed logs instead of printing them to console.log. */
|
|
12287
|
+
onLog?: (message: string) => void;
|
|
12288
|
+
/** Throw `FailedToRunCloudFunctionError` when execution fails. Defaults to true, matching Python. */
|
|
12289
|
+
raiseOnFailure?: boolean;
|
|
12290
|
+
/** Execute a record returned by createRun(). Omit to create a new run. */
|
|
12291
|
+
functionRunId?: string;
|
|
12292
|
+
/** Override the saved function runtime; omit to inherit its default. */
|
|
12293
|
+
runtime?: FunctionRuntime;
|
|
12294
|
+
/**
|
|
12295
|
+
* Deadline of the whole execution in milliseconds. The wait is aborted with
|
|
12296
|
+
* `NotteTimeoutError` once it elapses. Defaults to `FUNCTION_RUN_TIMEOUT_MS` (5 minutes).
|
|
12297
|
+
*/
|
|
12298
|
+
timeoutMs?: number;
|
|
12299
|
+
}
|
|
12300
|
+
interface FunctionGetOptions {
|
|
12301
|
+
/** Version to fetch. Defaults to the latest version. */
|
|
11194
12302
|
version?: string;
|
|
12303
|
+
}
|
|
12304
|
+
interface FunctionUrlOptions extends FunctionGetOptions {
|
|
11195
12305
|
/** Overrides the decryption key passed to the constructor. */
|
|
11196
12306
|
decryption_key?: string;
|
|
11197
12307
|
}
|
|
11198
12308
|
interface FunctionDownloadOptions extends FunctionUrlOptions {
|
|
11199
|
-
/**
|
|
12309
|
+
/** Optional local destination ending in `.py`. Source text is returned whether or not a path is supplied. */
|
|
11200
12310
|
path?: string;
|
|
11201
12311
|
}
|
|
12312
|
+
interface FunctionUpdateOptions {
|
|
12313
|
+
/** Path to the new python code. Must end with `.py`. */
|
|
12314
|
+
path?: string;
|
|
12315
|
+
/** Only update this version. Defaults to creating a new version. */
|
|
12316
|
+
version?: string;
|
|
12317
|
+
/** Whether to restrict the function code. Defaults to true, like Python. */
|
|
12318
|
+
restricted?: boolean;
|
|
12319
|
+
}
|
|
12320
|
+
/** Metadata fields accepted by `PATCH /functions/{function_id}`. */
|
|
12321
|
+
type FunctionMetadataUpdateOptions = FunctionMetadataUpdateRequest;
|
|
12322
|
+
interface FunctionScheduleOptions {
|
|
12323
|
+
/** Cron expression of the schedule. */
|
|
12324
|
+
cron: FunctionScheduleCreateRequest['cron'];
|
|
12325
|
+
/** Variables passed to every scheduled run. */
|
|
12326
|
+
variables?: FunctionScheduleCreateRequest['variables'];
|
|
12327
|
+
}
|
|
12328
|
+
interface FunctionRollbackOptions extends FunctionRollbackRequest {
|
|
12329
|
+
/** Whether to restrict the function code. Defaults to true, like `update()`. */
|
|
12330
|
+
restricted?: boolean;
|
|
12331
|
+
}
|
|
11202
12332
|
/**
|
|
11203
12333
|
* Query options for listing a function's runs: `page`, `page_size`,
|
|
11204
|
-
* `only_active`, `only_current_token`, `include_system`.
|
|
12334
|
+
* `only_active`, `only_current_token`, `include_system`, `source`.
|
|
11205
12335
|
*/
|
|
11206
12336
|
type FunctionRunListOptions = NonNullable<ListFunctionRunsByFunctionIdData['query']>;
|
|
11207
12337
|
/**
|
|
11208
|
-
*
|
|
12338
|
+
* Cloud function saved in the Notte console, the counterpart of
|
|
12339
|
+
* `notte.Function` in Python.
|
|
12340
|
+
*
|
|
12341
|
+
* ```ts
|
|
12342
|
+
* const fn = client.NotteFunction({ function_id: '<your-function-id>' });
|
|
12343
|
+
* const result = await fn.run({ url: 'https://example.com' });
|
|
12344
|
+
*
|
|
12345
|
+
* const created = client.NotteFunction({ path: './scraper.py', name: 'Scraper' });
|
|
12346
|
+
* await created.run(); // uploads scraper.py first
|
|
12347
|
+
* ```
|
|
11209
12348
|
*/
|
|
11210
12349
|
declare class NotteFunction {
|
|
11211
|
-
private client;
|
|
11212
|
-
|
|
12350
|
+
private readonly client;
|
|
12351
|
+
private _functionId;
|
|
12352
|
+
private initPromise;
|
|
12353
|
+
private createData;
|
|
11213
12354
|
readonly decryptionKey?: string;
|
|
11214
12355
|
constructor(client: NotteClient, options: FunctionConstructor);
|
|
12356
|
+
/** The function ID. Throws before a `path`-constructed function has been uploaded. */
|
|
12357
|
+
get functionId(): string;
|
|
12358
|
+
/** Alias of the `functionId` accessor. */
|
|
12359
|
+
getFunctionId(): string;
|
|
12360
|
+
private ensureInitialized;
|
|
12361
|
+
private createFunction;
|
|
12362
|
+
/**
|
|
12363
|
+
* Get the function metadata together with its download URL, the
|
|
12364
|
+
* counterpart of `client.functions.get()` in Python.
|
|
12365
|
+
*
|
|
12366
|
+
* @param options - Optional version selector; omitted means the latest version.
|
|
12367
|
+
* @returns Function metadata, version history, and the download link returned by the API.
|
|
12368
|
+
* @throws NotteAPIError if the function cannot be retrieved.
|
|
12369
|
+
* @example
|
|
12370
|
+
* const { latest_version, versions } = await fn.get();
|
|
12371
|
+
*/
|
|
12372
|
+
get(options?: FunctionGetOptions): Promise<FunctionWithLinkResponse>;
|
|
12373
|
+
/**
|
|
12374
|
+
* Upload a new version of the code, mirroring `function.update(path=...)`.
|
|
12375
|
+
*
|
|
12376
|
+
* @param options - Local Python file path, optional version, and code-access settings.
|
|
12377
|
+
* @returns Updated function metadata, including its latest version.
|
|
12378
|
+
* @throws InvalidRequestError if the path is missing or does not end in `.py`.
|
|
12379
|
+
* @throws NotteAPIError if the upload is rejected.
|
|
12380
|
+
* @example
|
|
12381
|
+
* const updated = await fn.update({ path: './scraper.py' });
|
|
12382
|
+
* console.log(updated.latest_version);
|
|
12383
|
+
*/
|
|
12384
|
+
update(options: FunctionUpdateOptions): Promise<FunctionResponse>;
|
|
12385
|
+
/**
|
|
12386
|
+
* Update the function metadata (name, description, default runtime, ...).
|
|
12387
|
+
*
|
|
12388
|
+
* @param options - Metadata fields to update, such as name, description, or default runtime.
|
|
12389
|
+
* @returns Updated function metadata.
|
|
12390
|
+
* @throws NotteAPIError if the metadata update is rejected.
|
|
12391
|
+
* @example
|
|
12392
|
+
* await fn.updateMetadata({ name: 'Price monitor', default_runtime: 'extended' });
|
|
12393
|
+
*/
|
|
12394
|
+
updateMetadata(options: FunctionMetadataUpdateOptions): Promise<FunctionResponse>;
|
|
11215
12395
|
/**
|
|
11216
|
-
*
|
|
12396
|
+
* Delete the function from the Notte console.
|
|
12397
|
+
*
|
|
12398
|
+
* @returns The API's function-deletion confirmation.
|
|
12399
|
+
* @throws NotteAPIError if the function cannot be deleted.
|
|
12400
|
+
* @example
|
|
12401
|
+
* await fn.delete();
|
|
12402
|
+
*/
|
|
12403
|
+
delete(): Promise<DeleteFunctionResponse>;
|
|
12404
|
+
/**
|
|
12405
|
+
* Schedule the function to run on a cron expression.
|
|
12406
|
+
*
|
|
12407
|
+
* @param options - Cron expression and optional variables passed to each scheduled execution.
|
|
12408
|
+
* @returns The saved schedule configuration.
|
|
12409
|
+
* @throws NotteAPIError if the schedule cannot be saved.
|
|
12410
|
+
* @example
|
|
12411
|
+
* await fn.setSchedule({ cron: '0 9 * * *', variables: { url: 'https://example.com' } });
|
|
12412
|
+
*/
|
|
12413
|
+
setSchedule(options: FunctionScheduleOptions): Promise<ScheduleResponse>;
|
|
12414
|
+
/**
|
|
12415
|
+
* Remove the function schedule.
|
|
12416
|
+
*
|
|
12417
|
+
* @returns The API's schedule-deletion confirmation.
|
|
12418
|
+
* @throws NotteAPIError if schedule deletion fails.
|
|
12419
|
+
* @example
|
|
12420
|
+
* await fn.deleteSchedule();
|
|
12421
|
+
*/
|
|
12422
|
+
deleteSchedule(): Promise<ScheduleDeleteResponse>;
|
|
12423
|
+
/**
|
|
12424
|
+
* Roll the function back to a previous version.
|
|
12425
|
+
*
|
|
12426
|
+
* @param options - Target version and optional code-access restriction, which defaults to true.
|
|
12427
|
+
* @returns Updated function metadata after rollback.
|
|
12428
|
+
* @throws NotteAPIError if the requested version cannot be restored.
|
|
12429
|
+
* @example
|
|
12430
|
+
* const { versions } = await fn.get();
|
|
12431
|
+
* await fn.rollback({ version: versions[0] });
|
|
12432
|
+
*/
|
|
12433
|
+
rollback(options: FunctionRollbackOptions): Promise<FunctionResponse>;
|
|
12434
|
+
/**
|
|
12435
|
+
* Get metadata for a specific function run.
|
|
12436
|
+
*
|
|
12437
|
+
* @param functionRunId - ID of a run belonging to this function.
|
|
12438
|
+
* @returns The run's current status, logs, and result metadata. This does not wait for completion.
|
|
12439
|
+
* @throws NotteAPIError if the run cannot be retrieved.
|
|
12440
|
+
* @example
|
|
12441
|
+
* const run = await fn.getRun(result.function_run_id);
|
|
12442
|
+
* console.log(run.status, run.logs);
|
|
12443
|
+
*/
|
|
12444
|
+
getRun(functionRunId: string): Promise<GetFunctionRunResponse>;
|
|
12445
|
+
/**
|
|
12446
|
+
* Compatibility alias for getRun().
|
|
12447
|
+
* @deprecated Use getRun() instead. Retained for backwards compatibility.
|
|
11217
12448
|
*/
|
|
11218
12449
|
retrieve(functionRunId: string): Promise<GetFunctionRunResponse>;
|
|
12450
|
+
/**
|
|
12451
|
+
* Create a cloud run record without starting execution, like
|
|
12452
|
+
* `function.create_run()` in Python. Use this only when you need the ID
|
|
12453
|
+
* before execution, then pass it to `run(variables, { functionRunId })`.
|
|
12454
|
+
* `run()` otherwise creates a new run on its own.
|
|
12455
|
+
*
|
|
12456
|
+
* @param options - Run-record settings; `local` defaults to false. Node execution remains cloud-only.
|
|
12457
|
+
* @returns A created run record and its ID. No function code has executed yet.
|
|
12458
|
+
* @throws NotteAPIError if run creation is rejected.
|
|
12459
|
+
* @example
|
|
12460
|
+
* const created = await fn.createRun();
|
|
12461
|
+
* const result = await fn.run({ url: 'https://example.com' }, { functionRunId: created.function_run_id });
|
|
12462
|
+
*/
|
|
12463
|
+
createRun(options?: FunctionRunCreateOptions): Promise<FunctionRunCreateResult>;
|
|
11219
12464
|
/**
|
|
11220
12465
|
* List the runs of this function.
|
|
11221
12466
|
*
|
|
11222
|
-
*
|
|
11223
|
-
*
|
|
11224
|
-
*
|
|
11225
|
-
*
|
|
11226
|
-
*
|
|
11227
|
-
*
|
|
11228
|
-
*
|
|
11229
|
-
*
|
|
11230
|
-
*
|
|
11231
|
-
* this endpoint yet".
|
|
11232
|
-
*
|
|
11233
|
-
* Sending it explicitly pins this method to the documented behaviour against
|
|
11234
|
-
* whichever API version it is talking to, including deployments that predate
|
|
11235
|
-
* the server-side change. Callers who want only in-flight runs pass
|
|
11236
|
-
* `only_active: true`.
|
|
12467
|
+
* Includes completed runs by default. Set `only_active: true` to retrieve
|
|
12468
|
+
* only in-flight runs. Use the response pagination metadata to request
|
|
12469
|
+
* additional pages.
|
|
12470
|
+
*
|
|
12471
|
+
* @param options - Pagination and filtering options. `only_active` defaults to false, including completed runs.
|
|
12472
|
+
* @returns One page of run records and pagination metadata; additional pages require another call.
|
|
12473
|
+
* @throws NotteAPIError if the run history cannot be retrieved.
|
|
12474
|
+
* @example
|
|
12475
|
+
* const { items } = await fn.runs({ page_size: 20 });
|
|
11237
12476
|
*/
|
|
11238
12477
|
runs(options?: FunctionRunListOptions): Promise<PaginatedResponseFunctionRunListItemResponse>;
|
|
11239
12478
|
/**
|
|
11240
|
-
*
|
|
12479
|
+
* Run the function on the cloud and wait for its result, streaming logs by
|
|
12480
|
+
* default like `function.run(**variables)` in Python.
|
|
12481
|
+
*
|
|
12482
|
+
* Pass `{ stream: false }` to receive the backend's JSON response without
|
|
12483
|
+
* live logs; execution still blocks until completion. Pass `functionRunId`
|
|
12484
|
+
* to execute a record returned by `createRun()`; otherwise a new run record
|
|
12485
|
+
* is created first, exactly like Python. A failed execution throws
|
|
12486
|
+
* `FailedToRunCloudFunctionError` unless `raiseOnFailure` is false, and the
|
|
12487
|
+
* wait is aborted with `NotteTimeoutError` after `timeoutMs`.
|
|
12488
|
+
*
|
|
12489
|
+
* @param variables - JSON-serializable keyword arguments passed to the Python function's `run` entry point.
|
|
12490
|
+
* @param options - Log streaming, failure handling, runtime, run ID, and timeout settings.
|
|
12491
|
+
* @returns The completed execution response. The function's return value is in `result`. Disabling streaming still waits for completion.
|
|
12492
|
+
* @throws FailedToRunCloudFunctionError if execution fails and `raiseOnFailure` is true.
|
|
12493
|
+
* @throws NotteTimeoutError if the execution request exceeds `timeoutMs`.
|
|
12494
|
+
* @throws InvalidRequestError if the run options are invalid.
|
|
12495
|
+
* @example
|
|
12496
|
+
* const result = await fn.run({ url: 'https://example.com' });
|
|
12497
|
+
* console.log(result.result);
|
|
12498
|
+
*
|
|
12499
|
+
* await fn.run({ url: 'https://example.com' }, { runtime: 'extended', onLog: line => logger.info(line) });
|
|
11241
12500
|
*/
|
|
11242
|
-
run(variables?: Record<string, unknown
|
|
12501
|
+
run(variables?: Record<string, unknown>, options?: FunctionRunOptions): Promise<FunctionRunResult>;
|
|
11243
12502
|
/**
|
|
11244
12503
|
* Get the download URL of the function code, decrypting it when the API
|
|
11245
12504
|
* returns an encrypted one (Notte managed functions).
|
|
12505
|
+
*
|
|
12506
|
+
* @param options - Optional version and decryption-key override.
|
|
12507
|
+
* @returns An HTTP(S) URL for downloading the function source.
|
|
12508
|
+
* @throws InvalidRequestError if an encrypted URL has no usable decryption key.
|
|
12509
|
+
* @throws NotteError if decryption does not produce an HTTP(S) URL.
|
|
12510
|
+
* @example
|
|
12511
|
+
* const url = await fn.getUrl({ version: 'v1' });
|
|
11246
12512
|
*/
|
|
11247
12513
|
getUrl(options?: FunctionUrlOptions): Promise<string>;
|
|
11248
12514
|
/**
|
|
11249
12515
|
* Download the function code as a python file. Returns the code, and writes
|
|
11250
12516
|
* it to `path` when one is provided.
|
|
12517
|
+
*
|
|
12518
|
+
* @param options - Optional version, decryption key, and local `.py` destination path.
|
|
12519
|
+
* @returns The Python source text, including when a local destination is supplied.
|
|
12520
|
+
* @throws InvalidRequestError if the destination does not end in `.py` or the decryption key is invalid.
|
|
12521
|
+
* @throws NotteError if the source download fails. Local filesystem failures also propagate.
|
|
12522
|
+
* @example
|
|
12523
|
+
* const code = await fn.download({ path: './scraper.py' });
|
|
11251
12524
|
*/
|
|
11252
12525
|
download(options?: FunctionDownloadOptions): Promise<string>;
|
|
11253
12526
|
/**
|
|
11254
|
-
*
|
|
12527
|
+
* Call one of the run endpoints that the OpenAPI spec does not describe
|
|
12528
|
+
* (`FUNCTION_RUN_ENDPOINTS`). The generated client has no operation for
|
|
12529
|
+
* them, so this is the single place where they are hand-rolled; the request
|
|
12530
|
+
* and response shapes are transcribed from `notte_sdk.types`
|
|
12531
|
+
* (`CreateFunctionRunRequest` / `CreateFunctionRunResponse` and
|
|
12532
|
+
* `StartFunctionRunRequest` / `FunctionRunResponse`). Replace the callers
|
|
12533
|
+
* with generated operations once the spec exposes these paths.
|
|
11255
12534
|
*/
|
|
11256
|
-
|
|
12535
|
+
private postRunEndpoint;
|
|
12536
|
+
}
|
|
12537
|
+
|
|
12538
|
+
/**
|
|
12539
|
+
* Options of `client.search()`: the `POST /search` body minus the query
|
|
12540
|
+
* itself (`q`). Extra fields such as `maxResults` or `includeDomains` are
|
|
12541
|
+
* forwarded to the search provider untouched.
|
|
12542
|
+
*/
|
|
12543
|
+
type SearchOptions = Omit<SearchRequest, 'q'>;
|
|
12544
|
+
/** One ranked hit of a `searchResults` search. */
|
|
12545
|
+
interface SearchResultItem {
|
|
12546
|
+
url: string;
|
|
12547
|
+
name: string;
|
|
12548
|
+
content: string;
|
|
12549
|
+
[key: string]: unknown;
|
|
12550
|
+
}
|
|
12551
|
+
/** Response of a search with `outputType: 'searchResults'` (the default). */
|
|
12552
|
+
interface SearchResultsResponse {
|
|
12553
|
+
results: SearchResultItem[];
|
|
12554
|
+
[key: string]: unknown;
|
|
12555
|
+
}
|
|
12556
|
+
/** One supporting source of a `sourcedAnswer` search. */
|
|
12557
|
+
interface SearchSource {
|
|
12558
|
+
url: string;
|
|
12559
|
+
name?: string;
|
|
12560
|
+
snippet?: string;
|
|
12561
|
+
[key: string]: unknown;
|
|
12562
|
+
}
|
|
12563
|
+
/** Response of a search with `outputType: 'sourcedAnswer'`. */
|
|
12564
|
+
interface SearchSourcedAnswerResponse {
|
|
12565
|
+
answer: string;
|
|
12566
|
+
sources: SearchSource[];
|
|
12567
|
+
[key: string]: unknown;
|
|
12568
|
+
}
|
|
12569
|
+
/** Response of a search with `outputType: 'structured'`: the caller-provided schema decides the shape. */
|
|
12570
|
+
type SearchStructuredResponse = Record<string, unknown>;
|
|
12571
|
+
/**
|
|
12572
|
+
* Union of every shape `POST /search` can answer with. The OpenAPI spec leaves
|
|
12573
|
+
* the response untyped; these interfaces follow the documented shapes at
|
|
12574
|
+
* https://docs.notte.cc/concepts/search#response-shapes.
|
|
12575
|
+
*/
|
|
12576
|
+
type SearchResponse = SearchResultsResponse | SearchSourcedAnswerResponse | SearchStructuredResponse;
|
|
12577
|
+
|
|
12578
|
+
/** Body of `POST /anything/start`: the natural-language description of the task. */
|
|
12579
|
+
type AnythingStartOptions = AnythingStartRequest;
|
|
12580
|
+
/**
|
|
12581
|
+
* Response of `POST /anything/start`. The OpenAPI spec declares the 200
|
|
12582
|
+
* response as an untyped JSON object (`{}`), so the SDK exposes it as an
|
|
12583
|
+
* opaque record. In practice the Anything API answers with a reference to the
|
|
12584
|
+
* function it built for the task (for example a `function_id`), which can then
|
|
12585
|
+
* be run through `client.NotteFunction({ function_id })`. Check the keys at
|
|
12586
|
+
* runtime rather than relying on a fixed shape.
|
|
12587
|
+
*/
|
|
12588
|
+
type AnythingStartResponse = Record<string, unknown>;
|
|
12589
|
+
/**
|
|
12590
|
+
* Anything API, the counterpart of `POST /anything/start`: turn a plain-English
|
|
12591
|
+
* description of a web task into a deployed, reusable function.
|
|
12592
|
+
*
|
|
12593
|
+
* ```ts
|
|
12594
|
+
* const started = await client.anything.start({ task: 'fetch the top 3 hacker news posts' });
|
|
12595
|
+
* console.log(started);
|
|
12596
|
+
* ```
|
|
12597
|
+
*/
|
|
12598
|
+
declare class NotteAnything {
|
|
12599
|
+
private readonly client;
|
|
12600
|
+
constructor(client: NotteClient);
|
|
12601
|
+
/**
|
|
12602
|
+
* Start building a function for `task`. Building is slow (minutes) and
|
|
12603
|
+
* billable; prefer the marketplace (`client.functions.list()`) when a
|
|
12604
|
+
* ready-made function already fits.
|
|
12605
|
+
*
|
|
12606
|
+
* ```ts
|
|
12607
|
+
* const result = await client.anything.start({ task: 'get the weather in Paris' });
|
|
12608
|
+
* if (typeof result.function_id === 'string') {
|
|
12609
|
+
* const fn = client.NotteFunction({ function_id: result.function_id });
|
|
12610
|
+
* }
|
|
12611
|
+
* ```
|
|
12612
|
+
*
|
|
12613
|
+
* Rejects with a `NotteAPIError` when the API answers with a non-2xx status.
|
|
12614
|
+
*/
|
|
12615
|
+
start(body: AnythingStartOptions): Promise<AnythingStartResponse>;
|
|
12616
|
+
}
|
|
12617
|
+
|
|
12618
|
+
/** Options of `client.secrets.list()`: optionally filter by namespace. */
|
|
12619
|
+
type SecretListOptions = NonNullable<ListSecretsData['query']>;
|
|
12620
|
+
/** Body of `client.secrets.store()`. */
|
|
12621
|
+
type SecretStoreOptions = SecretStoreRequest;
|
|
12622
|
+
|
|
12623
|
+
/**
|
|
12624
|
+
* Workspace secrets store, the counterpart of the `/secrets` endpoints.
|
|
12625
|
+
* Secrets are scoped by namespace: `llm_provider` keys are used by agents and
|
|
12626
|
+
* scraping, `function_env` values are injected into function runs.
|
|
12627
|
+
*
|
|
12628
|
+
* ```ts
|
|
12629
|
+
* await client.secrets.store({ namespace: 'function_env', name: 'MY_TOKEN', value: 'xyz' });
|
|
12630
|
+
* const secrets = await client.secrets.list({ namespace: 'function_env' });
|
|
12631
|
+
* ```
|
|
12632
|
+
*/
|
|
12633
|
+
declare class NotteSecrets {
|
|
12634
|
+
private readonly client;
|
|
12635
|
+
constructor(client: NotteClient);
|
|
12636
|
+
/**
|
|
12637
|
+
* List secret metadata (never the values), optionally filtered by namespace.
|
|
12638
|
+
*
|
|
12639
|
+
* ```ts
|
|
12640
|
+
* const secrets = await client.secrets.list({ namespace: 'llm_provider' });
|
|
12641
|
+
* secrets.forEach(s => console.log(s.name, s.key_hint));
|
|
12642
|
+
* ```
|
|
12643
|
+
*/
|
|
12644
|
+
list(options?: SecretListOptions): Promise<SecretMetadata[]>;
|
|
12645
|
+
/**
|
|
12646
|
+
* Store (or overwrite) a secret and return its metadata.
|
|
12647
|
+
*
|
|
12648
|
+
* ```ts
|
|
12649
|
+
* const meta = await client.secrets.store({ namespace: 'function_env', name: 'API_TOKEN', value: 'xyz' });
|
|
12650
|
+
* console.log(meta.id, meta.key_hint);
|
|
12651
|
+
* ```
|
|
12652
|
+
*/
|
|
12653
|
+
store(body: SecretStoreOptions): Promise<SecretMetadata>;
|
|
12654
|
+
/**
|
|
12655
|
+
* Read the value of a secret by name within a namespace.
|
|
12656
|
+
*
|
|
12657
|
+
* ```ts
|
|
12658
|
+
* const { value } = await client.secrets.get('API_TOKEN', 'function_env');
|
|
12659
|
+
* ```
|
|
12660
|
+
*/
|
|
12661
|
+
get(name: string, namespace: SecretNamespace): Promise<SecretValueResponse>;
|
|
12662
|
+
/**
|
|
12663
|
+
* Delete a secret by id (the `id` field of `SecretMetadata`).
|
|
12664
|
+
*
|
|
12665
|
+
* ```ts
|
|
12666
|
+
* const meta = await client.secrets.store({ namespace: 'function_env', name: 'TMP', value: 'x' });
|
|
12667
|
+
* await client.secrets.delete(meta.id);
|
|
12668
|
+
* ```
|
|
12669
|
+
*/
|
|
12670
|
+
delete(secretId: string): Promise<void>;
|
|
12671
|
+
}
|
|
12672
|
+
|
|
12673
|
+
/** Options of `client.usage.get()`: the monthly period, e.g. `"May 2025"`. Defaults to the current month. */
|
|
12674
|
+
type UsageOptions = NonNullable<GetUsageData['query']>;
|
|
12675
|
+
/** Options of `client.usage.logs()`: endpoint filter and pagination. */
|
|
12676
|
+
type UsageLogsOptions = NonNullable<GetUsageLogsData['query']>;
|
|
12677
|
+
/** Endpoint names accepted by `UsageLogsOptions.endpoint`. */
|
|
12678
|
+
type UsageLogEndpoint = NonNullable<UsageLogsOptions['endpoint']>;
|
|
12679
|
+
|
|
12680
|
+
/**
|
|
12681
|
+
* Usage and billing, the counterpart of `GET /usage` and `GET /usage/logs`.
|
|
12682
|
+
*
|
|
12683
|
+
* ```ts
|
|
12684
|
+
* const usage = await client.usage.get();
|
|
12685
|
+
* console.log(usage.total_cost, usage.balance_amount);
|
|
12686
|
+
* ```
|
|
12687
|
+
*/
|
|
12688
|
+
declare class NotteUsage {
|
|
12689
|
+
private readonly client;
|
|
12690
|
+
constructor(client: NotteClient);
|
|
12691
|
+
/**
|
|
12692
|
+
* Usage summary for a monthly period (current month by default).
|
|
12693
|
+
*
|
|
12694
|
+
* ```ts
|
|
12695
|
+
* const usage = await client.usage.get({ period: 'May 2025' });
|
|
12696
|
+
* console.log(`${usage.session_count} sessions, $${usage.total_cost}`);
|
|
12697
|
+
* ```
|
|
12698
|
+
*/
|
|
12699
|
+
get(options?: UsageOptions): Promise<UsageResponse>;
|
|
12700
|
+
/**
|
|
12701
|
+
* Paginated per-request usage logs, optionally filtered by endpoint.
|
|
12702
|
+
*
|
|
12703
|
+
* ```ts
|
|
12704
|
+
* const page = await client.usage.logs({ endpoint: 'sessions.start', page: 1, page_size: 50 });
|
|
12705
|
+
* page.items.forEach(log => console.log(log.created_at, log.endpoint, log.duration_ms));
|
|
12706
|
+
* ```
|
|
12707
|
+
*/
|
|
12708
|
+
logs(options?: UsageLogsOptions): Promise<PaginatedResponseUsageLog>;
|
|
11257
12709
|
}
|
|
11258
12710
|
|
|
12711
|
+
declare const DEFAULT_NOTTE_API_URL = "https://api.notte.cc";
|
|
12712
|
+
declare const DEFAULT_REQUEST_TIMEOUT_MS = 60000;
|
|
12713
|
+
/**
|
|
12714
|
+
* Per-call header read by the client's request interceptor to override the
|
|
12715
|
+
* default request timeout. `0` disables the timeout (streaming responses).
|
|
12716
|
+
* The header is stripped before the request leaves the process.
|
|
12717
|
+
*/
|
|
12718
|
+
declare const TIMEOUT_HEADER = "x-notte-timeout-ms";
|
|
11259
12719
|
interface NotteClientConfig {
|
|
12720
|
+
/** API base URL. Defaults to `NOTTE_API_URL` or `https://api.notte.cc`. */
|
|
11260
12721
|
baseUrl?: string;
|
|
12722
|
+
/** API key. Defaults to `NOTTE_API_KEY`. Optional only for relative proxy base URLs. */
|
|
11261
12723
|
apiKey?: string;
|
|
12724
|
+
/** Default per-request timeout in milliseconds. Defaults to 60 000, like the Python SDK. */
|
|
12725
|
+
timeoutMs?: number;
|
|
12726
|
+
/** Database preview branch. Defaults to `NOTTE_DB_PREVIEW_BRANCH`. Internal. */
|
|
12727
|
+
dbPreview?: string;
|
|
12728
|
+
/** Log every request like `NotteClient(verbose=True)` in Python. */
|
|
12729
|
+
verbose?: boolean;
|
|
11262
12730
|
}
|
|
12731
|
+
type SessionListOptions = NonNullable<ListSessionsData['query']>;
|
|
12732
|
+
type AgentListOptions = NonNullable<ListAgentsData['query']>;
|
|
12733
|
+
type VaultListOptions = NonNullable<ListVaultsData['query']>;
|
|
12734
|
+
type FunctionListOptions = NonNullable<ListFunctionsData['query']>;
|
|
12735
|
+
/** Options of `client.scrape()`: the global scrape request minus `url`, plus the SDK-only scrape options. */
|
|
12736
|
+
type GlobalScrapeOptions<T = unknown> = Omit<GlobalScrapeRequest, 'url' | 'response_format'> & ScrapeOptions<T>;
|
|
12737
|
+
/** Entry point for sessions, agents, functions, vaults, personas, and session files. */
|
|
11263
12738
|
declare class NotteClient {
|
|
11264
|
-
private config;
|
|
12739
|
+
private readonly config;
|
|
12740
|
+
private readonly client;
|
|
11265
12741
|
constructor(config?: NotteClientConfig);
|
|
12742
|
+
/**
|
|
12743
|
+
* Map the raw value the generated client rejects with into a `NotteError`.
|
|
12744
|
+
* HTTP failures become `NotteAPIError` (or `NotteAPIExecutionError` when the
|
|
12745
|
+
* API flags them), timeouts become `NotteTimeoutError`, anything else is
|
|
12746
|
+
* returned untouched.
|
|
12747
|
+
*/
|
|
12748
|
+
private toTypedError;
|
|
12749
|
+
/**
|
|
12750
|
+
* Add the database preview branch to a websocket URL served by the Notte API.
|
|
12751
|
+
* The websocket handshake reads the branch from the query string, so without
|
|
12752
|
+
* it a preview-branch session is looked up in the default database.
|
|
12753
|
+
*/
|
|
12754
|
+
withDbPreview(url: string): string;
|
|
12755
|
+
/**
|
|
12756
|
+
* Health check the Notte API. Resolves when the API answers 200 and rejects
|
|
12757
|
+
* with a `NotteAPIError` (or a network error) otherwise.
|
|
12758
|
+
*/
|
|
12759
|
+
healthCheck(): Promise<void>;
|
|
11266
12760
|
/**
|
|
11267
12761
|
* Create a new session
|
|
11268
12762
|
*/
|
|
11269
12763
|
Session(options?: SessionOptions): Session;
|
|
12764
|
+
/** Access files owned by a specific session, including closed sessions. */
|
|
12765
|
+
Files(sessionId: string): SessionFiles;
|
|
12766
|
+
/**
|
|
12767
|
+
* File storage to attach to a session, the counterpart of `client.FileStorage()`.
|
|
12768
|
+
*
|
|
12769
|
+
* ```ts
|
|
12770
|
+
* const storage = client.FileStorage();
|
|
12771
|
+
* await client.Session({ storage }).use(async session => {
|
|
12772
|
+
* await storage.upload('./invoice.pdf');
|
|
12773
|
+
* const files = await storage.list({ source: 'session_download' });
|
|
12774
|
+
* });
|
|
12775
|
+
* ```
|
|
12776
|
+
*/
|
|
12777
|
+
FileStorage(sessionId?: string): RemoteFileStorage;
|
|
11270
12778
|
/**
|
|
11271
12779
|
* Create a new agent
|
|
11272
12780
|
*/
|
|
@@ -11283,6 +12791,53 @@ declare class NotteClient {
|
|
|
11283
12791
|
* Create or access a function
|
|
11284
12792
|
*/
|
|
11285
12793
|
NotteFunction(options: FunctionConstructor): NotteFunction;
|
|
12794
|
+
/** Alias of `NotteFunction`, matching `client.Function` in Python. */
|
|
12795
|
+
Function(options: FunctionConstructor): NotteFunction;
|
|
12796
|
+
/** Sessions listing, the counterpart of `client.sessions.list()`. */
|
|
12797
|
+
get sessions(): {
|
|
12798
|
+
list: (options?: SessionListOptions) => Promise<SessionResponse[]>;
|
|
12799
|
+
};
|
|
12800
|
+
/** Agents listing, the counterpart of `client.agents.list()`. */
|
|
12801
|
+
get agents(): {
|
|
12802
|
+
list: (options?: AgentListOptions) => Promise<AgentResponse[]>;
|
|
12803
|
+
};
|
|
12804
|
+
/** Vaults listing, the counterpart of `client.vaults.list()`. */
|
|
12805
|
+
get vaults(): {
|
|
12806
|
+
list: (options?: VaultListOptions) => Promise<Vault[]>;
|
|
12807
|
+
};
|
|
12808
|
+
/** Functions listing, the counterpart of `client.functions.list()`. */
|
|
12809
|
+
get functions(): {
|
|
12810
|
+
list: (options?: FunctionListOptions) => Promise<FunctionListItemResponse[]>;
|
|
12811
|
+
};
|
|
12812
|
+
/**
|
|
12813
|
+
* Search the public web (`POST /search`). Returns ranked results by default,
|
|
12814
|
+
* an answer with sources with `outputType: 'sourcedAnswer'`, or structured
|
|
12815
|
+
* output with `outputType: 'structured'`.
|
|
12816
|
+
*
|
|
12817
|
+
* ```ts
|
|
12818
|
+
* import { NotteClient } from 'notte-sdk';
|
|
12819
|
+
*
|
|
12820
|
+
* const client = new NotteClient();
|
|
12821
|
+
* const { results } = await client.search('notte browser agents');
|
|
12822
|
+
* const { answer } = await client.search('what is notte?', { outputType: 'sourcedAnswer' });
|
|
12823
|
+
* ```
|
|
12824
|
+
*/
|
|
12825
|
+
search(query: string, options?: SearchOptions & {
|
|
12826
|
+
outputType?: 'searchResults';
|
|
12827
|
+
}): Promise<SearchResultsResponse>;
|
|
12828
|
+
search(query: string, options: SearchOptions & {
|
|
12829
|
+
outputType: 'sourcedAnswer';
|
|
12830
|
+
}): Promise<SearchSourcedAnswerResponse>;
|
|
12831
|
+
search(query: string, options: SearchOptions & {
|
|
12832
|
+
outputType: 'structured';
|
|
12833
|
+
}): Promise<SearchStructuredResponse>;
|
|
12834
|
+
search(query: string, options: SearchOptions): Promise<SearchResponse>;
|
|
12835
|
+
/** Anything API (`POST /anything/start`). */
|
|
12836
|
+
get anything(): NotteAnything;
|
|
12837
|
+
/** Workspace secrets (`/secrets`). */
|
|
12838
|
+
get secrets(): NotteSecrets;
|
|
12839
|
+
/** Usage and billing (`/usage`, `/usage/logs`). */
|
|
12840
|
+
get usage(): NotteUsage;
|
|
11286
12841
|
/**
|
|
11287
12842
|
* Personas client for listing and managing personas
|
|
11288
12843
|
*/
|
|
@@ -11294,13 +12849,30 @@ declare class NotteClient {
|
|
|
11294
12849
|
*/
|
|
11295
12850
|
getClient(): Client;
|
|
11296
12851
|
/**
|
|
11297
|
-
* Scrape a webpage directly (without session)
|
|
12852
|
+
* Scrape a webpage directly (without session).
|
|
12853
|
+
*
|
|
12854
|
+
* ```ts
|
|
12855
|
+
* const markdown = await client.scrape('https://www.notte.cc', { only_main_content: true });
|
|
12856
|
+
* const product = await client.scrape('https://www.notte.cc', { response_format: Product, instructions: 'Extract the product' });
|
|
12857
|
+
* ```
|
|
12858
|
+
*
|
|
12859
|
+
* With `response_format` or `instructions`, the extracted data is returned
|
|
12860
|
+
* directly and a failed extraction throws `ScrapeFailedError`. Pass
|
|
12861
|
+
* `raiseOnFailure: false` to receive the `StructuredData` wrapper instead.
|
|
11298
12862
|
*/
|
|
11299
|
-
scrape(url: string, options?:
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
12863
|
+
scrape(url: string, options?: GlobalScrapeOptions<unknown> & {
|
|
12864
|
+
response_format?: undefined;
|
|
12865
|
+
instructions?: undefined | null;
|
|
12866
|
+
}): Promise<string>;
|
|
12867
|
+
scrape<T>(url: string, options: GlobalScrapeOptions<T> & {
|
|
12868
|
+
response_format: ZodLikeSchema<T>;
|
|
12869
|
+
raiseOnFailure?: true;
|
|
11303
12870
|
}): Promise<T>;
|
|
12871
|
+
scrape<T>(url: string, options: GlobalScrapeOptions<T> & {
|
|
12872
|
+
response_format: ZodLikeSchema<T>;
|
|
12873
|
+
raiseOnFailure: false;
|
|
12874
|
+
}): Promise<StructuredData<T>>;
|
|
12875
|
+
scrape(url: string, options: GlobalScrapeOptions<unknown>): Promise<ScrapeResult<unknown>>;
|
|
11304
12876
|
/**
|
|
11305
12877
|
* Get the client configuration
|
|
11306
12878
|
*/
|
|
@@ -11320,9 +12892,17 @@ declare class Encryption {
|
|
|
11320
12892
|
decrypt(token: string): string;
|
|
11321
12893
|
}
|
|
11322
12894
|
|
|
12895
|
+
/** Read a JSON cookie file (a list of cookies, like `session.getCookies()` returns). */
|
|
12896
|
+
declare function readCookiesFile(cookieFile: string): Promise<Cookie[]>;
|
|
12897
|
+
/**
|
|
12898
|
+
* Append `cookies` to the JSON list stored in `cookieFile`, creating the file
|
|
12899
|
+
* when it does not exist yet.
|
|
12900
|
+
*/
|
|
12901
|
+
declare function createOrAppendCookiesToFile(cookieFile: string, cookies: Cookie[]): Promise<void>;
|
|
12902
|
+
|
|
11323
12903
|
declare const createClient: (config?: {
|
|
11324
12904
|
baseUrl?: string;
|
|
11325
12905
|
token?: string;
|
|
11326
12906
|
}) => Client;
|
|
11327
12907
|
|
|
11328
|
-
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 BodyFileUploadDownloadedFileStorageSessionIdDownloadsFilenamePost, type BodyFileUploadStorageUploadsFilenamePost, type BodyFunctionCreateFunctionsPost, type BodyFunctionUpdateFunctionsFunctionIdPost, type BodySessionCookiesSetSessionsSessionIdCookiesPost, 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 DeleteVaultResponse, type DownloadFileActionInput, type DownloadFileActionOutput, type EmailReadAction, type EmailResponse, type EmailVerificationReadAction, Encryption, type EvaluateJsAction, type ExecutionResponse, type ExternalProxy, type FallbackFillActionInput, type FallbackFillActionInputWritable, type FallbackFillActionOutput, type FallbackFillActionOutputWritable, type FileDownloadData, type FileDownloadError, type FileDownloadErrors, type FileDownloadResponse, type FileDownloadResponses, type FileDownloadUploadedFileData, type FileDownloadUploadedFileError, type FileDownloadUploadedFileErrors, type FileDownloadUploadedFileResponse, type FileDownloadUploadedFileResponses, type FileInfo, type FileLinkResponse, type FileListDownloadsData, type FileListDownloadsError, type FileListDownloadsErrors, type FileListDownloadsResponse, type FileListDownloadsResponses, type FileListUploadsData, type FileListUploadsError, type FileListUploadsErrors, type FileListUploadsResponse, type FileListUploadsResponses, type FileUploadData, type FileUploadDownloadedFileData, type FileUploadDownloadedFileError, type FileUploadDownloadedFileErrors, type FileUploadDownloadedFileResponse, type FileUploadDownloadedFileResponses, type FileUploadError, type FileUploadErrors, type FileUploadResponse, type FileUploadResponse2, type FileUploadResponses, 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 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 ListFilesResponse, 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 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 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 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 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 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, fileDownload, fileDownloadUploadedFile, fileListDownloads, fileListUploads, fileUpload, fileUploadDownloadedFile, 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, listSessions, listVaults, mailboxConnectToken, mailboxDelete, mailboxGet, mailboxList, mailboxSync, mailboxUpdate, managedAuthConnectLinkCreate, 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, vaultCreate, vaultCredentialsAdd, vaultCredentialsDelete, vaultCredentialsGet, vaultCredentialsList, vaultCreditCardDelete, vaultCreditCardGet, vaultCreditCardSet, vaultDelete, vaultUpdate };
|
|
12908
|
+
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, 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 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 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 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 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, 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, 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 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 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 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 SessionReplayData, type SessionReplayError, type SessionReplayErrors, type SessionReplayResponse, type SessionReplayResponses, type SessionResponse, type SessionResponseWritable, type SessionScrapeOptions, type SessionScriptOptions, 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 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, createClient, createOrAppendCookiesToFile, NotteClient as default, deleteSecret, deleteSessionFile, downloadSessionFile, functionCreate, functionDelete, functionDownloadUrl, functionFork, functionMetadataUpdate, functionRollback, functionRunGetMetadata, functionRunStart, functionRunStop, functionRunUpdateMetadata, functionRuntimeHealth, functionScheduleDelete, functionScheduleSet, functionUpdate, 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, sessionCookiesGet, sessionCookiesSet, sessionDebugInfo, sessionNetworkLogs, sessionOffset, sessionReplay, sessionStart, sessionStatus, sessionStop, startVersionCheck, storeSecret, uploadSessionFile, validateCredentials, validateMfaSecret, validateUrl, vaultCreate, vaultCredentialsAdd, vaultCredentialsDelete, vaultCredentialsGet, vaultCredentialsList, vaultCreditCardDelete, vaultCreditCardGet, vaultCreditCardSet, vaultDelete, vaultUpdate };
|