@onkernel/sdk 0.110.0 → 0.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth/connections.d.mts +26 -8
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +26 -8
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/browsers/telemetry.d.mts +13 -4
- package/resources/browsers/telemetry.d.mts.map +1 -1
- package/resources/browsers/telemetry.d.ts +13 -4
- package/resources/browsers/telemetry.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/search/contents.d.mts +267 -0
- package/resources/search/contents.d.mts.map +1 -0
- package/resources/search/contents.d.ts +267 -0
- package/resources/search/contents.d.ts.map +1 -0
- package/resources/search/contents.js +31 -0
- package/resources/search/contents.js.map +1 -0
- package/resources/search/contents.mjs +27 -0
- package/resources/search/contents.mjs.map +1 -0
- package/resources/search/index.d.mts +4 -0
- package/resources/search/index.d.mts.map +1 -0
- package/resources/search/index.d.ts +4 -0
- package/resources/search/index.d.ts.map +1 -0
- package/resources/search/index.js +11 -0
- package/resources/search/index.js.map +1 -0
- package/resources/search/index.mjs +5 -0
- package/resources/search/index.mjs.map +1 -0
- package/resources/search/providers.d.mts +141 -0
- package/resources/search/providers.d.mts.map +1 -0
- package/resources/search/providers.d.ts +141 -0
- package/resources/search/providers.d.ts.map +1 -0
- package/resources/search/providers.js +25 -0
- package/resources/search/providers.js.map +1 -0
- package/resources/search/providers.mjs +21 -0
- package/resources/search/providers.mjs.map +1 -0
- package/resources/search/search.d.mts +1187 -0
- package/resources/search/search.d.mts.map +1 -0
- package/resources/search/search.d.ts +1187 -0
- package/resources/search/search.d.ts.map +1 -0
- package/resources/search/search.js +58 -0
- package/resources/search/search.js.map +1 -0
- package/resources/search/search.mjs +53 -0
- package/resources/search/search.mjs.map +1 -0
- package/resources/search.d.mts +2 -0
- package/resources/search.d.mts.map +1 -0
- package/resources/search.d.ts +2 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +6 -0
- package/resources/search.js.map +1 -0
- package/resources/search.mjs +3 -0
- package/resources/search.mjs.map +1 -0
- package/resources/vaults/items.d.mts +21 -14
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +21 -14
- package/resources/vaults/items.d.ts.map +1 -1
- package/src/client.ts +30 -0
- package/src/resources/auth/connections.ts +28 -7
- package/src/resources/browsers/telemetry.ts +17 -4
- package/src/resources/index.ts +12 -0
- package/src/resources/search/contents.ts +327 -0
- package/src/resources/search/index.ts +16 -0
- package/src/resources/search/providers.ts +197 -0
- package/src/resources/search/search.ts +1496 -0
- package/src/resources/search.ts +3 -0
- package/src/resources/vaults/items.ts +27 -14
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Search the web and retrieve content for selected results.
|
|
9
|
+
*/
|
|
10
|
+
export class Providers extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Lists providers, capabilities, and machine-readable native-option schemas. Auto
|
|
13
|
+
* and fallback are strategies, not provider entries. The list is not paginated and
|
|
14
|
+
* contains no latency benchmarks. X-Request-Id identifies the request.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const providers = await client.search.providers.list();
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
list(
|
|
22
|
+
query: ProviderListParams | null | undefined = {},
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): APIPromise<ProviderListResponse> {
|
|
25
|
+
return this._client.get('/search/providers', { query, ...options });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Provider {
|
|
30
|
+
content: Provider.Content;
|
|
31
|
+
|
|
32
|
+
max_results_cap: number;
|
|
33
|
+
|
|
34
|
+
params: Provider.Params;
|
|
35
|
+
|
|
36
|
+
provider_options: Provider.ProviderOptions;
|
|
37
|
+
|
|
38
|
+
slug: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Provider-specific limitations, conditional filter support, and warnings about
|
|
42
|
+
* search modes.
|
|
43
|
+
*/
|
|
44
|
+
notes?: Array<string>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export namespace Provider {
|
|
48
|
+
export interface Content {
|
|
49
|
+
/**
|
|
50
|
+
* Can enforce the requested maximum content age.
|
|
51
|
+
*/
|
|
52
|
+
freshness_control: boolean;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Supports content retrieval with the search request.
|
|
56
|
+
*/
|
|
57
|
+
inline: boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Supports content retrieval after the search completes.
|
|
61
|
+
*/
|
|
62
|
+
post_hoc: boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface Params {
|
|
66
|
+
country: Params.Country;
|
|
67
|
+
|
|
68
|
+
end_date: Params.EndDate;
|
|
69
|
+
|
|
70
|
+
exclude_domains: Params.ExcludeDomains;
|
|
71
|
+
|
|
72
|
+
include_domains: Params.IncludeDomains;
|
|
73
|
+
|
|
74
|
+
language: Params.Language;
|
|
75
|
+
|
|
76
|
+
recency: Params.Recency;
|
|
77
|
+
|
|
78
|
+
safe_search: Params.SafeSearch;
|
|
79
|
+
|
|
80
|
+
start_date: Params.StartDate;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export namespace Params {
|
|
84
|
+
export interface Country {
|
|
85
|
+
support: 'native' | 'emulated' | 'unsupported';
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Translation behavior, limitations, and precision.
|
|
89
|
+
*/
|
|
90
|
+
notes?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface EndDate {
|
|
94
|
+
support: 'native' | 'emulated' | 'unsupported';
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Translation behavior, limitations, and precision.
|
|
98
|
+
*/
|
|
99
|
+
notes?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface ExcludeDomains {
|
|
103
|
+
support: 'native' | 'emulated' | 'unsupported';
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Translation behavior, limitations, and precision.
|
|
107
|
+
*/
|
|
108
|
+
notes?: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface IncludeDomains {
|
|
112
|
+
support: 'native' | 'emulated' | 'unsupported';
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Translation behavior, limitations, and precision.
|
|
116
|
+
*/
|
|
117
|
+
notes?: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface Language {
|
|
121
|
+
support: 'native' | 'emulated' | 'unsupported';
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Translation behavior, limitations, and precision.
|
|
125
|
+
*/
|
|
126
|
+
notes?: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface Recency {
|
|
130
|
+
support: 'native' | 'emulated' | 'unsupported';
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Translation behavior, limitations, and precision.
|
|
134
|
+
*/
|
|
135
|
+
notes?: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface SafeSearch {
|
|
139
|
+
support: 'native' | 'emulated' | 'unsupported';
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Translation behavior, limitations, and precision.
|
|
143
|
+
*/
|
|
144
|
+
notes?: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface StartDate {
|
|
148
|
+
support: 'native' | 'emulated' | 'unsupported';
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Translation behavior, limitations, and precision.
|
|
152
|
+
*/
|
|
153
|
+
notes?: string;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface ProviderOptions {
|
|
158
|
+
/**
|
|
159
|
+
* JSON Schema for the provider-native options accepted by POST /search.
|
|
160
|
+
*/
|
|
161
|
+
schema: { [key: string]: unknown };
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* OpenAPI component name for the matching typed provider-options schema.
|
|
165
|
+
*/
|
|
166
|
+
schema_ref: string;
|
|
167
|
+
|
|
168
|
+
examples?: Array<{ [key: string]: unknown }>;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type ProviderListResponse = Array<Provider>;
|
|
173
|
+
|
|
174
|
+
export interface ProviderListParams {
|
|
175
|
+
/**
|
|
176
|
+
* Optional concrete provider slug filter. Omit to list every provider.
|
|
177
|
+
*/
|
|
178
|
+
slug?:
|
|
179
|
+
| 'brave'
|
|
180
|
+
| 'exa'
|
|
181
|
+
| 'perplexity'
|
|
182
|
+
| 'context'
|
|
183
|
+
| 'parallel'
|
|
184
|
+
| 'valyu'
|
|
185
|
+
| 'octen'
|
|
186
|
+
| 'you'
|
|
187
|
+
| 'tavily'
|
|
188
|
+
| 'serpapi';
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export declare namespace Providers {
|
|
192
|
+
export {
|
|
193
|
+
type Provider as Provider,
|
|
194
|
+
type ProviderListResponse as ProviderListResponse,
|
|
195
|
+
type ProviderListParams as ProviderListParams,
|
|
196
|
+
};
|
|
197
|
+
}
|