Repository navigation
Expand file tree
/
Copy pathprofiles.ts
More file actions
99 lines (84 loc) · 2.19 KB
/
Copy pathprofiles.ts
File metadata and controls
99 lines (84 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
/**
* See the authenticated browser profiles your organization created.
*/
export class Profiles extends APIResource {
/**
* List the browser profiles your organization created with `/web/scrape`, newest
* first.
*/
list(
query: ProfileListParams | null | undefined = {},
options?: RequestOptions,
): APIPromise<ProfileListResponse> {
return this._client.get('/org/browser/profiles', { query, ...options });
}
}
export interface ProfileListResponse {
/**
* Browser profiles, newest first.
*/
data: Array<ProfileListResponse.Data>;
/**
* Whether a next page exists.
*/
has_more: boolean;
/**
* Pass as `cursor` to fetch the next page.
*/
next_cursor: string | null;
/**
* Unique ID of this request, also in `X-Request-Id`. Include it when contacting
* support.
*/
request_id: string;
/**
* Credits this request used and your remaining balance.
*/
key_metadata?: ProfileListResponse.KeyMetadata;
}
export namespace ProfileListResponse {
export interface Data {
/**
* Profile ID to pass as `sharedParams.profile.profileId` on `/web/scrape`.
*/
id: string;
/**
* When the profile was created.
*/
created_at: string;
/**
* The description supplied when the profile was created, or null.
*/
description: string | null;
}
/**
* Credits this request used and your remaining balance.
*/
export interface KeyMetadata {
/**
* Credits charged for this request.
*/
credits_consumed: number;
/**
* Credits remaining for your organization.
*/
credits_remaining: number;
}
}
export interface ProfileListParams {
/**
* The `next_cursor` from the previous page.
*/
cursor?: string;
/**
* Number of profiles per page.
*/
limit?: number;
}
export declare namespace Profiles {
export { type ProfileListResponse as ProfileListResponse, type ProfileListParams as ProfileListParams };
}