-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathshared.ts
More file actions
89 lines (78 loc) · 2.15 KB
/
shared.ts
File metadata and controls
89 lines (78 loc) · 2.15 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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
/**
* An error message.
*/
export interface ErrorObject {
/**
* Human-readable message.
*/
message: string;
/**
* Reference ID for the error.
*/
ref_id: string;
/**
* Optional detail supporting the error.
*/
detail?: { [key: string]: unknown } | null;
}
/**
* Response object used for non-200 status codes.
*/
export interface ErrorResponse {
/**
* Error.
*/
error: ErrorObject;
/**
* Always 'error'.
*/
type: 'error';
}
/**
* Source policy for web search results.
*
* This policy governs which sources are allowed/disallowed in results.
*/
export interface SourcePolicy {
/**
* Optional start date for filtering search results. Results will be limited to
* content published on or after this date. Provided as an RFC 3339 date string
* (YYYY-MM-DD).
*/
after_date?: string | null;
/**
* List of domains to exclude from results. If specified, sources from these
* domains will be excluded. Accepts plain domains (e.g., example.com,
* subdomain.example.gov) or bare domain extension starting with a period (e.g.,
* .gov, .edu, .co.uk). The combined number of domains in include_domains and
* exclude_domains cannot exceed 200.
*/
exclude_domains?: Array<string>;
/**
* List of domains to restrict the results to. If specified, only sources from
* these domains will be included. Accepts plain domains (e.g., example.com,
* subdomain.example.gov) or bare domain extension starting with a period (e.g.,
* .gov, .edu, .co.uk). The combined number of domains in include_domains and
* exclude_domains cannot exceed 200.
*/
include_domains?: Array<string>;
}
/**
* Human-readable message for a task.
*/
export interface Warning {
/**
* Human-readable message.
*/
message: string;
/**
* Type of warning. Note that adding new warning types is considered a
* backward-compatible change.
*/
type: 'spec_validation_warning' | 'input_validation_warning' | 'warning';
/**
* Optional detail supporting the warning.
*/
detail?: { [key: string]: unknown } | null;
}