@bevorai/sdk 0.1.1 → 0.2.0-rc2
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/README.md +18 -15
- package/dist/client.d.ts +9 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +21 -19
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +42 -27
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +45 -29
- package/dist/errors.js.map +1 -1
- package/dist/graph/call-node.d.ts +9 -27
- package/dist/graph/call-node.d.ts.map +1 -1
- package/dist/graph/call-node.js +75 -41
- package/dist/graph/call-node.js.map +1 -1
- package/dist/graph/cursor.d.ts +7 -7
- package/dist/graph/cursor.d.ts.map +1 -1
- package/dist/graph/cursor.js.map +1 -1
- package/dist/graph/field-metadata.d.ts +11 -11
- package/dist/graph/field-metadata.d.ts.map +1 -1
- package/dist/graph/field-metadata.js +2 -18
- package/dist/graph/field-metadata.js.map +1 -1
- package/dist/graph/graph.d.ts +22 -22
- package/dist/graph/graph.d.ts.map +1 -1
- package/dist/graph/graph.js.map +1 -1
- package/dist/helpers/sarif.d.ts +7 -7
- package/dist/helpers/sarif.d.ts.map +1 -1
- package/dist/helpers/sarif.js.map +1 -1
- package/dist/index.d.ts +3 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/dist/node.js +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/resources/analyses.d.ts +204 -76
- package/dist/resources/analyses.d.ts.map +1 -1
- package/dist/resources/analyses.js +147 -33
- package/dist/resources/analyses.js.map +1 -1
- package/dist/resources/chats.d.ts +52 -27
- package/dist/resources/chats.d.ts.map +1 -1
- package/dist/resources/chats.js +45 -9
- package/dist/resources/chats.js.map +1 -1
- package/dist/resources/codes.d.ts +102 -41
- package/dist/resources/codes.d.ts.map +1 -1
- package/dist/resources/codes.js +78 -18
- package/dist/resources/codes.js.map +1 -1
- package/dist/resources/files.d.ts +22 -12
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +12 -2
- package/dist/resources/files.js.map +1 -1
- package/dist/resources/findings.d.ts +68 -32
- package/dist/resources/findings.d.ts.map +1 -1
- package/dist/resources/findings.js +49 -10
- package/dist/resources/findings.js.map +1 -1
- package/dist/resources/nodes.d.ts +28 -18
- package/dist/resources/nodes.d.ts.map +1 -1
- package/dist/resources/nodes.js +12 -2
- package/dist/resources/nodes.js.map +1 -1
- package/dist/resources/projects.d.ts +7 -3
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +5 -1
- package/dist/resources/projects.js.map +1 -1
- package/dist/resources/summary.d.ts +4 -3
- package/dist/resources/summary.d.ts.map +1 -1
- package/dist/resources/summary.js.map +1 -1
- package/dist/resources/transitions.d.ts +16 -12
- package/dist/resources/transitions.d.ts.map +1 -1
- package/dist/resources/transitions.js +9 -2
- package/dist/resources/transitions.js.map +1 -1
- package/dist/resources/users.d.ts +14 -9
- package/dist/resources/users.d.ts.map +1 -1
- package/dist/resources/users.js +6 -1
- package/dist/resources/users.js.map +1 -1
- package/dist/resources/versions.d.ts +29 -13
- package/dist/resources/versions.d.ts.map +1 -1
- package/dist/resources/versions.js +24 -5
- package/dist/resources/versions.js.map +1 -1
- package/dist/streaming.d.ts +1 -2
- package/dist/streaming.d.ts.map +1 -1
- package/dist/streaming.js +2 -2
- package/dist/streaming.js.map +1 -1
- package/dist/types/events.d.ts +53 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +2 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/generics.d.ts +18 -0
- package/dist/types/generics.d.ts.map +1 -0
- package/dist/types/generics.js +2 -0
- package/dist/types/generics.js.map +1 -0
- package/dist/types/graph_data.d.ts +137 -0
- package/dist/types/graph_data.d.ts.map +1 -0
- package/dist/types/graph_data.js +3 -0
- package/dist/types/graph_data.js.map +1 -0
- package/dist/types/literals.d.ts +11 -22
- package/dist/types/literals.d.ts.map +1 -1
- package/dist/types/literals.js +2 -15
- package/dist/types/literals.js.map +1 -1
- package/dist/types/requests.d.ts +246 -177
- package/dist/types/requests.d.ts.map +1 -1
- package/dist/types/requests.js +2 -2
- package/dist/types/requests.js.map +1 -1
- package/dist/types/responses.d.ts +592 -381
- package/dist/types/responses.d.ts.map +1 -1
- package/dist/types/responses.js +2 -10
- package/dist/types/responses.js.map +1 -1
- package/dist/types/shared.d.ts +8 -0
- package/dist/types/shared.d.ts.map +1 -0
- package/dist/types/shared.js +2 -0
- package/dist/types/shared.js.map +1 -0
- package/package.json +1 -1
- package/dist/helpers/call-chain.d.ts +0 -11
- package/dist/helpers/call-chain.d.ts.map +0 -1
- package/dist/helpers/call-chain.js +0 -79
- package/dist/helpers/call-chain.js.map +0 -1
- package/dist/helpers/static-analysis.d.ts +0 -18
- package/dist/helpers/static-analysis.d.ts.map +0 -1
- package/dist/helpers/static-analysis.js +0 -89
- package/dist/helpers/static-analysis.js.map +0 -1
- package/dist/types/graph-data.d.ts +0 -62
- package/dist/types/graph-data.d.ts.map +0 -1
- package/dist/types/graph-data.js +0 -2
- package/dist/types/graph-data.js.map +0 -1
- package/dist/types/static-analysis.d.ts +0 -28
- package/dist/types/static-analysis.d.ts.map +0 -1
- package/dist/types/static-analysis.js +0 -93
- package/dist/types/static-analysis.js.map +0 -1
|
@@ -1,303 +1,447 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { AnalysisRunStatus, AnalysisTrigger, ChatRole, ChatType, CodeVersionStatus, EdgeDirection, EdgeType, FindingDraftOperation, FindingLevel, FindingTransitionReason, ID, Language, MemberRole, Network, OnboardingPersona, OnboardingUseType, ProjectKind, VersionMethod, Visibility } from "./literals.js";
|
|
4
|
-
/** ISO 8601 timestamp, as sent by the API. */
|
|
5
|
-
export type DateTime = string;
|
|
6
|
-
export interface Pagination<T> {
|
|
7
|
-
results: T[];
|
|
8
|
-
page: number;
|
|
9
|
-
page_size: number;
|
|
10
|
-
more: boolean;
|
|
11
|
-
total_observations: number;
|
|
12
|
-
total_pages: number;
|
|
13
|
-
}
|
|
14
|
-
export interface ResultsResponse<T> {
|
|
15
|
-
results: T[];
|
|
16
|
-
}
|
|
17
|
-
export interface BooleanResponse {
|
|
18
|
-
success: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface ExistsResponse<T> {
|
|
21
|
-
exists: boolean;
|
|
22
|
-
data: T | null;
|
|
23
|
-
}
|
|
24
|
-
export interface InlineRef {
|
|
25
|
-
id: ID;
|
|
26
|
-
type: string;
|
|
27
|
-
source: string;
|
|
28
|
-
ref_ind: number;
|
|
29
|
-
name: string | null;
|
|
30
|
-
is_stale: boolean;
|
|
31
|
-
}
|
|
1
|
+
import type { GraphSnapshotNode } from "./graph_data.js";
|
|
2
|
+
import type { AnalysisEntrypointStatus, AnalysisTrigger, BlockchainNetwork, ChatMessageRole, ChatType, CodeVersionMethod, CodeVersionStatus, FindingDraftOperation, FindingLevel, FindingTransitionReason, ProjectKind } from "./literals.js";
|
|
32
3
|
export interface ActionDetails {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the caller can perform the action.
|
|
6
|
+
*/
|
|
33
7
|
is_allowed: boolean;
|
|
34
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* reasons why action is not allowed, if applicable.
|
|
10
|
+
*/
|
|
35
11
|
reasons: string[];
|
|
36
12
|
}
|
|
37
|
-
export interface
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export interface
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
is_self: boolean;
|
|
82
|
-
created_at: DateTime;
|
|
83
|
-
username: string;
|
|
84
|
-
}
|
|
85
|
-
export interface MemberActions {
|
|
86
|
-
remove: ActionDetails;
|
|
87
|
-
update: ActionDetails;
|
|
88
|
-
}
|
|
89
|
-
export interface MemberSchema extends UserSchema {
|
|
90
|
-
role: MemberRole;
|
|
91
|
-
seat_type: string;
|
|
92
|
-
is_creator: boolean;
|
|
93
|
-
actions: MemberActions;
|
|
13
|
+
export interface Analysis {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
created_at: string;
|
|
17
|
+
/**
|
|
18
|
+
* The analysis owner.
|
|
19
|
+
*/
|
|
20
|
+
user: User;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the caller owns this analysis.
|
|
23
|
+
*/
|
|
24
|
+
is_owner: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The requested version, HEAD by default.
|
|
27
|
+
*/
|
|
28
|
+
version: AnalysisVersion;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Operations the caller can perform on this version.
|
|
32
|
+
*/
|
|
33
|
+
export interface AnalysisActions {
|
|
34
|
+
fork: ActionDetails;
|
|
35
|
+
/**
|
|
36
|
+
* Add a version for new code on top of this one.
|
|
37
|
+
*/
|
|
38
|
+
create_child: ActionDetails;
|
|
39
|
+
commit_changes: ActionDetails;
|
|
40
|
+
delete: ActionDetails;
|
|
41
|
+
/**
|
|
42
|
+
* Run every entrypoint, including dependencies.
|
|
43
|
+
*/
|
|
44
|
+
run_pipeline: ActionDetails;
|
|
45
|
+
/**
|
|
46
|
+
* Run first-party entrypoints only.
|
|
47
|
+
*/
|
|
48
|
+
run_first_party_pipeline: ActionDetails;
|
|
49
|
+
retry_pipeline: ActionDetails;
|
|
50
|
+
merge_to: ActionDetails;
|
|
51
|
+
merge_from: ActionDetails;
|
|
52
|
+
/**
|
|
53
|
+
* Add, edit, or delete findings.
|
|
54
|
+
*/
|
|
55
|
+
stage_changes: ActionDetails;
|
|
56
|
+
set_as_head: ActionDetails;
|
|
94
57
|
}
|
|
95
|
-
export interface
|
|
96
|
-
|
|
97
|
-
|
|
58
|
+
export interface AnalysisCollisionResult {
|
|
59
|
+
is_created: false;
|
|
60
|
+
/**
|
|
61
|
+
* Existing versions of this code in the project.
|
|
62
|
+
*/
|
|
63
|
+
candidates: CollisionVersion[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The created analysis, or the existing versions this code collided with.
|
|
67
|
+
*/
|
|
68
|
+
export type AnalysisCreate = AnalysisCreatedResult | AnalysisCollisionResult;
|
|
69
|
+
export interface AnalysisCreatedResult {
|
|
70
|
+
is_created: true;
|
|
71
|
+
/**
|
|
72
|
+
* The created analysis.
|
|
73
|
+
*/
|
|
74
|
+
analysis: Analysis;
|
|
98
75
|
}
|
|
99
|
-
export interface
|
|
100
|
-
id:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
76
|
+
export interface AnalysisExpanded {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
created_at: string;
|
|
80
|
+
/**
|
|
81
|
+
* The analysis owner.
|
|
82
|
+
*/
|
|
83
|
+
user: User;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the caller owns this analysis.
|
|
86
|
+
*/
|
|
87
|
+
is_owner: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The requested version, HEAD by default.
|
|
90
|
+
*/
|
|
91
|
+
version: AnalysisVersion;
|
|
92
|
+
findings: Finding[];
|
|
93
|
+
}
|
|
94
|
+
export interface AnalysisFindingPoint {
|
|
95
|
+
id: string;
|
|
96
|
+
created_at: string;
|
|
97
|
+
trigger: AnalysisTrigger;
|
|
98
|
+
analysis_meta: AnalysisMetadata;
|
|
99
|
+
n_added: number;
|
|
100
|
+
n_updated: number;
|
|
101
|
+
n_removed: number;
|
|
102
|
+
n_remediated: number;
|
|
103
|
+
n_dismissed: number;
|
|
104
|
+
ind: number;
|
|
104
105
|
}
|
|
105
|
-
export interface
|
|
106
|
-
id:
|
|
106
|
+
export interface AnalysisMetadata {
|
|
107
|
+
id: string;
|
|
107
108
|
name: string;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
created_at: string;
|
|
110
|
+
/**
|
|
111
|
+
* The analysis owner.
|
|
112
|
+
*/
|
|
113
|
+
user: User;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the caller owns this analysis.
|
|
116
|
+
*/
|
|
117
|
+
is_owner: boolean;
|
|
113
118
|
}
|
|
114
|
-
export interface
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
export interface AnalysisNetworkPoint {
|
|
120
|
+
id: string;
|
|
121
|
+
created_at: string;
|
|
122
|
+
trigger: AnalysisTrigger;
|
|
123
|
+
analysis_meta: AnalysisMetadata;
|
|
124
|
+
ind: number;
|
|
125
|
+
merged_from_version: AnalysisVersionRef | null;
|
|
126
|
+
forked_from_version: AnalysisVersionRef | null;
|
|
127
|
+
parent_version: AnalysisVersionRef | null;
|
|
118
128
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
/**
|
|
130
|
+
* An immutable snapshot of an analysis's findings on one code version.
|
|
131
|
+
*/
|
|
132
|
+
export interface AnalysisVersion {
|
|
133
|
+
id: string;
|
|
134
|
+
created_at: string;
|
|
135
|
+
/**
|
|
136
|
+
* How this version was created.
|
|
137
|
+
*/
|
|
138
|
+
trigger: AnalysisTrigger;
|
|
139
|
+
/**
|
|
140
|
+
* Findings on this version, including staged changes.
|
|
141
|
+
*/
|
|
142
|
+
n_findings: number;
|
|
143
|
+
/**
|
|
144
|
+
* Uncommitted finding changes on this version.
|
|
145
|
+
*/
|
|
146
|
+
n_staged: number;
|
|
147
|
+
/**
|
|
148
|
+
* Findings from the parent version dropped because their code changed.
|
|
149
|
+
*/
|
|
150
|
+
n_remediations: number;
|
|
151
|
+
/**
|
|
152
|
+
* Whether this is the analysis's HEAD.
|
|
153
|
+
*/
|
|
154
|
+
is_head: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Whether any entrypoint is still being analyzed.
|
|
157
|
+
*/
|
|
158
|
+
has_pipeline_processing: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Whether any entrypoint failed in the latest run.
|
|
161
|
+
*/
|
|
162
|
+
has_pipeline_failed: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* The code this version analyzes.
|
|
165
|
+
*/
|
|
166
|
+
code_version: CodeVersion;
|
|
167
|
+
/**
|
|
168
|
+
* The version merged into this one.
|
|
169
|
+
*/
|
|
170
|
+
merged_from_version: AnalysisVersionRef | null;
|
|
171
|
+
/**
|
|
172
|
+
* The version this one was forked from.
|
|
173
|
+
*/
|
|
174
|
+
forked_from_version: AnalysisVersionRef | null;
|
|
175
|
+
/**
|
|
176
|
+
* The previous version in this analysis.
|
|
177
|
+
*/
|
|
178
|
+
parent_version: AnalysisVersionRef | null;
|
|
179
|
+
/**
|
|
180
|
+
* Versions built on this one.
|
|
181
|
+
*/
|
|
182
|
+
child_versions: AnalysisVersionRef[];
|
|
183
|
+
/**
|
|
184
|
+
* Versions this one was merged into.
|
|
185
|
+
*/
|
|
186
|
+
merged_versions: AnalysisVersionRef[];
|
|
187
|
+
/**
|
|
188
|
+
* Forks of this version.
|
|
189
|
+
*/
|
|
190
|
+
forked_versions: AnalysisVersionRef[];
|
|
191
|
+
actions: AnalysisActions;
|
|
122
192
|
}
|
|
123
|
-
export interface
|
|
124
|
-
id:
|
|
125
|
-
created_at:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
193
|
+
export interface AnalysisVersionDirect {
|
|
194
|
+
id: string;
|
|
195
|
+
created_at: string;
|
|
196
|
+
/**
|
|
197
|
+
* How this version was created.
|
|
198
|
+
*/
|
|
199
|
+
trigger: AnalysisTrigger;
|
|
200
|
+
/**
|
|
201
|
+
* Findings on this version, including staged changes.
|
|
202
|
+
*/
|
|
203
|
+
n_findings: number;
|
|
204
|
+
/**
|
|
205
|
+
* Uncommitted finding changes on this version.
|
|
206
|
+
*/
|
|
207
|
+
n_staged: number;
|
|
208
|
+
/**
|
|
209
|
+
* Findings from the parent version dropped because their code changed.
|
|
210
|
+
*/
|
|
211
|
+
n_remediations: number;
|
|
212
|
+
/**
|
|
213
|
+
* Whether this is the analysis's HEAD.
|
|
214
|
+
*/
|
|
215
|
+
is_head: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Whether any entrypoint is still being analyzed.
|
|
218
|
+
*/
|
|
219
|
+
has_pipeline_processing: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Whether any entrypoint failed in the latest run.
|
|
222
|
+
*/
|
|
223
|
+
has_pipeline_failed: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* The code this version analyzes.
|
|
226
|
+
*/
|
|
227
|
+
code_version: CodeVersion;
|
|
228
|
+
/**
|
|
229
|
+
* The version merged into this one.
|
|
230
|
+
*/
|
|
231
|
+
merged_from_version: AnalysisVersionRef | null;
|
|
232
|
+
/**
|
|
233
|
+
* The version this one was forked from.
|
|
234
|
+
*/
|
|
235
|
+
forked_from_version: AnalysisVersionRef | null;
|
|
236
|
+
/**
|
|
237
|
+
* The previous version in this analysis.
|
|
238
|
+
*/
|
|
239
|
+
parent_version: AnalysisVersionRef | null;
|
|
240
|
+
/**
|
|
241
|
+
* Versions built on this one.
|
|
242
|
+
*/
|
|
243
|
+
child_versions: AnalysisVersionRef[];
|
|
244
|
+
/**
|
|
245
|
+
* Versions this one was merged into.
|
|
246
|
+
*/
|
|
247
|
+
merged_versions: AnalysisVersionRef[];
|
|
248
|
+
/**
|
|
249
|
+
* Forks of this version.
|
|
250
|
+
*/
|
|
251
|
+
forked_versions: AnalysisVersionRef[];
|
|
252
|
+
actions: AnalysisActions;
|
|
253
|
+
/**
|
|
254
|
+
* The analysis this version belongs to.
|
|
255
|
+
*/
|
|
256
|
+
analysis_meta: AnalysisMetadata;
|
|
130
257
|
}
|
|
131
|
-
export interface
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
n_analyses: number;
|
|
135
|
-
n_users: number;
|
|
136
|
-
github_link: GithubLinkSchema | null;
|
|
258
|
+
export interface AnalysisVersionRef {
|
|
259
|
+
id: string;
|
|
260
|
+
analysis_id: string;
|
|
137
261
|
}
|
|
138
|
-
export interface
|
|
139
|
-
|
|
140
|
-
created_at: DateTime;
|
|
141
|
-
name: string;
|
|
142
|
-
is_default: boolean;
|
|
262
|
+
export interface BooleanResponse {
|
|
263
|
+
success: boolean;
|
|
143
264
|
}
|
|
144
|
-
export interface
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
provider: "google" | "github";
|
|
159
|
-
can_disconnect: boolean;
|
|
160
|
-
}
|
|
161
|
-
export interface UserDetailedSchema extends UserSchema {
|
|
162
|
-
email: string;
|
|
163
|
-
onboarding_persona: OnboardingPersona | null;
|
|
164
|
-
onboarding_use_type: OnboardingUseType | null;
|
|
165
|
-
is_onboarded: boolean;
|
|
166
|
-
oauth_methods: UserOauthMethod[];
|
|
167
|
-
require_paid_workspace: boolean;
|
|
168
|
-
default_workspace_id: ID | null;
|
|
169
|
-
default_project_id: ID | null;
|
|
170
|
-
}
|
|
171
|
-
export interface InviteSchema {
|
|
172
|
-
id: ID;
|
|
173
|
-
created_at: DateTime;
|
|
174
|
-
user_id: ID | null;
|
|
175
|
-
identifier: string;
|
|
176
|
-
role: MemberRole;
|
|
177
|
-
seat_type: string;
|
|
178
|
-
workspace: WorkspaceSchema;
|
|
179
|
-
can_update: boolean;
|
|
180
|
-
}
|
|
181
|
-
export interface ChatMessageSchema {
|
|
182
|
-
id: ID;
|
|
183
|
-
created_at: DateTime;
|
|
184
|
-
chat_id: ID;
|
|
185
|
-
chat_role: ChatRole;
|
|
265
|
+
export interface Chat {
|
|
266
|
+
id: string;
|
|
267
|
+
created_at: string;
|
|
268
|
+
code_id: string;
|
|
269
|
+
version_id: string | null;
|
|
270
|
+
title: string | null;
|
|
271
|
+
chat_type: ChatType;
|
|
272
|
+
total_messages: number;
|
|
273
|
+
}
|
|
274
|
+
export interface ChatMessage {
|
|
275
|
+
id: string;
|
|
276
|
+
created_at: string;
|
|
277
|
+
chat_id: string;
|
|
278
|
+
chat_role: ChatMessageRole;
|
|
186
279
|
message: string;
|
|
187
280
|
refs: InlineRef[];
|
|
188
281
|
has_proposal: boolean;
|
|
189
282
|
proposal_status: string | null;
|
|
190
283
|
}
|
|
191
|
-
export interface
|
|
192
|
-
id: ID;
|
|
193
|
-
created_at: DateTime;
|
|
194
|
-
code_id: ID;
|
|
195
|
-
version_id: ID | null;
|
|
196
|
-
title: string | null;
|
|
197
|
-
chat_type: ChatType;
|
|
198
|
-
total_messages: number;
|
|
199
|
-
}
|
|
200
|
-
export declare const STREAMED_MESSAGE_EVENT_TYPES: readonly ["text", "tool-call", "thinking", "approval", "failure", "reference"];
|
|
201
|
-
export interface StreamedMessageType {
|
|
284
|
+
export interface ChatMessageStream {
|
|
202
285
|
id: string | null;
|
|
203
|
-
event_type:
|
|
286
|
+
event_type: "text" | "tool-call" | "thinking" | "approval" | "failure" | "reference";
|
|
204
287
|
content: string | null;
|
|
205
288
|
}
|
|
206
|
-
export
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
289
|
+
export interface CodeContent {
|
|
290
|
+
content: string;
|
|
291
|
+
}
|
|
292
|
+
export interface CodeVersion {
|
|
293
|
+
id: string;
|
|
294
|
+
/**
|
|
295
|
+
* The chain the contract is deployed on.
|
|
296
|
+
*/
|
|
297
|
+
network: BlockchainNetwork | null;
|
|
298
|
+
/**
|
|
299
|
+
* How the code was sourced.
|
|
300
|
+
*/
|
|
301
|
+
version_method: CodeVersionMethod;
|
|
302
|
+
/**
|
|
303
|
+
* Uniquely identifies this code.
|
|
304
|
+
*/
|
|
217
305
|
version_fingerprint: string;
|
|
306
|
+
/**
|
|
307
|
+
* Processing status of the code.
|
|
308
|
+
*/
|
|
218
309
|
status: CodeVersionStatus;
|
|
219
310
|
branch: string | null;
|
|
220
|
-
commit:
|
|
221
|
-
repository:
|
|
222
|
-
}
|
|
223
|
-
export interface
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
311
|
+
commit: GithubCommit | null;
|
|
312
|
+
repository: GithubRepository | null;
|
|
313
|
+
}
|
|
314
|
+
export interface CodeVersionInstance {
|
|
315
|
+
id: string;
|
|
316
|
+
/**
|
|
317
|
+
* The chain the contract is deployed on.
|
|
318
|
+
*/
|
|
319
|
+
network: BlockchainNetwork | null;
|
|
320
|
+
/**
|
|
321
|
+
* How the code was sourced.
|
|
322
|
+
*/
|
|
323
|
+
version_method: CodeVersionMethod;
|
|
324
|
+
/**
|
|
325
|
+
* Uniquely identifies this code.
|
|
326
|
+
*/
|
|
327
|
+
version_fingerprint: string;
|
|
328
|
+
/**
|
|
329
|
+
* Processing status of the code.
|
|
330
|
+
*/
|
|
331
|
+
status: CodeVersionStatus;
|
|
332
|
+
branch: string | null;
|
|
333
|
+
commit: GithubCommit | null;
|
|
334
|
+
repository: GithubRepository | null;
|
|
335
|
+
created_at: string;
|
|
336
|
+
}
|
|
337
|
+
export interface CollisionVersion {
|
|
338
|
+
id: string;
|
|
339
|
+
created_at: string;
|
|
340
|
+
/**
|
|
341
|
+
* How this version was created.
|
|
342
|
+
*/
|
|
343
|
+
trigger: AnalysisTrigger;
|
|
344
|
+
/**
|
|
345
|
+
* Findings on this version, including staged changes.
|
|
346
|
+
*/
|
|
347
|
+
n_findings: number;
|
|
348
|
+
/**
|
|
349
|
+
* Uncommitted finding changes on this version.
|
|
350
|
+
*/
|
|
351
|
+
n_staged: number;
|
|
352
|
+
/**
|
|
353
|
+
* Findings from the parent version dropped because their code changed.
|
|
354
|
+
*/
|
|
355
|
+
n_remediations: number;
|
|
356
|
+
/**
|
|
357
|
+
* Whether this is the analysis's HEAD.
|
|
358
|
+
*/
|
|
359
|
+
is_head: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Whether any entrypoint is still being analyzed.
|
|
362
|
+
*/
|
|
363
|
+
has_pipeline_processing: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* Whether any entrypoint failed in the latest run.
|
|
366
|
+
*/
|
|
367
|
+
has_pipeline_failed: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* The code this version analyzes.
|
|
370
|
+
*/
|
|
371
|
+
code_version: CodeVersion;
|
|
372
|
+
/**
|
|
373
|
+
* The version merged into this one.
|
|
374
|
+
*/
|
|
375
|
+
merged_from_version: AnalysisVersionRef | null;
|
|
376
|
+
/**
|
|
377
|
+
* The version this one was forked from.
|
|
378
|
+
*/
|
|
379
|
+
forked_from_version: AnalysisVersionRef | null;
|
|
380
|
+
/**
|
|
381
|
+
* The previous version in this analysis.
|
|
382
|
+
*/
|
|
383
|
+
parent_version: AnalysisVersionRef | null;
|
|
384
|
+
/**
|
|
385
|
+
* Versions built on this one.
|
|
386
|
+
*/
|
|
387
|
+
child_versions: AnalysisVersionRef[];
|
|
388
|
+
/**
|
|
389
|
+
* Versions this one was merged into.
|
|
390
|
+
*/
|
|
391
|
+
merged_versions: AnalysisVersionRef[];
|
|
392
|
+
/**
|
|
393
|
+
* Forks of this version.
|
|
394
|
+
*/
|
|
395
|
+
forked_versions: AnalysisVersionRef[];
|
|
396
|
+
actions: AnalysisActions;
|
|
397
|
+
/**
|
|
398
|
+
* The analysis this version belongs to.
|
|
399
|
+
*/
|
|
400
|
+
analysis_meta: AnalysisMetadata;
|
|
401
|
+
/**
|
|
402
|
+
* The suggested way to reuse this version.
|
|
403
|
+
*/
|
|
404
|
+
on_collision: "fork" | "merge" | "view";
|
|
292
405
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
406
|
+
/**
|
|
407
|
+
* An externally callable function: the unit the security pipeline analyzes.
|
|
408
|
+
*/
|
|
409
|
+
export interface EntryPoint {
|
|
410
|
+
/**
|
|
411
|
+
* The entrypoint's node in the code graph.
|
|
412
|
+
*/
|
|
413
|
+
node: GraphSnapshotNode;
|
|
414
|
+
/**
|
|
415
|
+
* Whether it was ever analyzed.
|
|
416
|
+
*/
|
|
417
|
+
is_analyzed: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Whether it was inherited from a parent.
|
|
420
|
+
*/
|
|
421
|
+
is_inherited: boolean;
|
|
422
|
+
/**
|
|
423
|
+
* Whether it was analyzed in this version.
|
|
424
|
+
*/
|
|
425
|
+
is_analyzed_in_current: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* Most recent bevor security pipeline status
|
|
428
|
+
*/
|
|
429
|
+
pipeline_status: AnalysisEntrypointStatus;
|
|
430
|
+
/**
|
|
431
|
+
* Number of indings on this entrypoint.
|
|
432
|
+
*/
|
|
433
|
+
n_findings: number;
|
|
296
434
|
}
|
|
297
|
-
export interface
|
|
298
|
-
id:
|
|
299
|
-
created_at:
|
|
300
|
-
|
|
435
|
+
export interface Finding {
|
|
436
|
+
id: string;
|
|
437
|
+
created_at: string;
|
|
438
|
+
/**
|
|
439
|
+
* The finding's original ID, stable across versions and edits.
|
|
440
|
+
*/
|
|
441
|
+
origin_finding_id: string;
|
|
442
|
+
/**
|
|
443
|
+
* Whether a user acknowledged the finding.
|
|
444
|
+
*/
|
|
301
445
|
is_acknowledged: boolean;
|
|
302
446
|
type: string;
|
|
303
447
|
level: FindingLevel;
|
|
@@ -305,145 +449,212 @@ export interface FindingBareSchema {
|
|
|
305
449
|
explanation: string;
|
|
306
450
|
recommendation: string | null;
|
|
307
451
|
poc: string | null;
|
|
452
|
+
/**
|
|
453
|
+
* What produced the finding.
|
|
454
|
+
*/
|
|
308
455
|
tool: string;
|
|
456
|
+
/**
|
|
457
|
+
* The code graph node the finding is on.
|
|
458
|
+
*/
|
|
459
|
+
node_id: string;
|
|
460
|
+
/**
|
|
461
|
+
* Whether the finding was carried over from an earlier version.
|
|
462
|
+
*/
|
|
463
|
+
is_borrowed: boolean;
|
|
464
|
+
/**
|
|
465
|
+
* The source location within the node.
|
|
466
|
+
*/
|
|
467
|
+
location_id: string | null;
|
|
468
|
+
/**
|
|
469
|
+
* Who created the finding.
|
|
470
|
+
*/
|
|
471
|
+
created_by_user: User;
|
|
472
|
+
/**
|
|
473
|
+
* The code version the finding is on.
|
|
474
|
+
*/
|
|
475
|
+
code_id: string;
|
|
476
|
+
/**
|
|
477
|
+
* The finding's staged change, if any.
|
|
478
|
+
*/
|
|
479
|
+
operation: FindingDraftOperation | null;
|
|
480
|
+
/**
|
|
481
|
+
* The analysis version the finding belongs to.
|
|
482
|
+
*/
|
|
483
|
+
version: AnalysisVersionRef;
|
|
484
|
+
actions: FindingActions;
|
|
309
485
|
}
|
|
310
486
|
export interface FindingActions {
|
|
311
487
|
edit: ActionDetails;
|
|
312
488
|
revert: ActionDetails;
|
|
313
489
|
delete: ActionDetails;
|
|
314
490
|
}
|
|
315
|
-
export interface
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
491
|
+
export interface FindingBare {
|
|
492
|
+
id: string;
|
|
493
|
+
created_at: string;
|
|
494
|
+
/**
|
|
495
|
+
* The finding's original ID, stable across versions and edits.
|
|
496
|
+
*/
|
|
497
|
+
origin_finding_id: string;
|
|
498
|
+
/**
|
|
499
|
+
* Whether a user acknowledged the finding.
|
|
500
|
+
*/
|
|
501
|
+
is_acknowledged: boolean;
|
|
502
|
+
type: string;
|
|
503
|
+
level: FindingLevel;
|
|
504
|
+
name: string;
|
|
505
|
+
explanation: string;
|
|
506
|
+
recommendation: string | null;
|
|
507
|
+
poc: string | null;
|
|
508
|
+
/**
|
|
509
|
+
* What produced the finding.
|
|
510
|
+
*/
|
|
511
|
+
tool: string;
|
|
324
512
|
}
|
|
325
|
-
export interface
|
|
326
|
-
id:
|
|
327
|
-
created_at:
|
|
513
|
+
export interface FindingComment {
|
|
514
|
+
id: string;
|
|
515
|
+
created_at: string;
|
|
328
516
|
message: string;
|
|
329
517
|
refs: InlineRef[];
|
|
330
|
-
user:
|
|
518
|
+
user: User;
|
|
331
519
|
}
|
|
332
|
-
export interface
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
520
|
+
export interface FindingTransition {
|
|
521
|
+
id: string;
|
|
522
|
+
created_at: string;
|
|
523
|
+
before_version: AnalysisVersionRef;
|
|
524
|
+
after_version: AnalysisVersionRef;
|
|
525
|
+
/**
|
|
526
|
+
* How the finding changed.
|
|
527
|
+
*/
|
|
528
|
+
reason: FindingTransitionReason;
|
|
529
|
+
/**
|
|
530
|
+
* The finding before the change.
|
|
531
|
+
*/
|
|
532
|
+
before_finding: FindingBare | null;
|
|
533
|
+
/**
|
|
534
|
+
* The finding after the change.
|
|
535
|
+
*/
|
|
536
|
+
after_finding: FindingBare | null;
|
|
537
|
+
/**
|
|
538
|
+
* used when comparing staged changes
|
|
539
|
+
*/
|
|
540
|
+
changed_fields: string[];
|
|
344
541
|
}
|
|
345
|
-
export interface
|
|
346
|
-
id:
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
is_owner: boolean;
|
|
542
|
+
export interface GithubAccount {
|
|
543
|
+
id: number;
|
|
544
|
+
login: string;
|
|
545
|
+
type: string;
|
|
546
|
+
avatar_url: string;
|
|
351
547
|
}
|
|
352
|
-
export interface
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
trigger: AnalysisTrigger;
|
|
356
|
-
analysis_meta: AnalysisMetadataSchema;
|
|
548
|
+
export interface GithubBranchFilterMap {
|
|
549
|
+
pattern: string;
|
|
550
|
+
is_enabled: boolean;
|
|
357
551
|
}
|
|
358
|
-
export interface
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
n_staged: number;
|
|
364
|
-
n_remediations: number;
|
|
365
|
-
is_head: boolean;
|
|
366
|
-
has_pipeline_processing: boolean;
|
|
367
|
-
has_pipeline_failed: boolean;
|
|
368
|
-
code_version: CodeVersionSchema;
|
|
369
|
-
merged_from_version: AnalysisVersionRef | null;
|
|
370
|
-
forked_from_version: AnalysisVersionRef | null;
|
|
371
|
-
parent_version: AnalysisVersionRef | null;
|
|
372
|
-
child_versions: AnalysisVersionRef[];
|
|
373
|
-
merged_versions: AnalysisVersionRef[];
|
|
374
|
-
forked_versions: AnalysisVersionRef[];
|
|
375
|
-
actions: AnalysisActions;
|
|
552
|
+
export interface GithubCommit {
|
|
553
|
+
sha: string;
|
|
554
|
+
author: string;
|
|
555
|
+
message: string;
|
|
556
|
+
timestamp: string;
|
|
376
557
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
558
|
+
export interface GithubLink {
|
|
559
|
+
id: number;
|
|
560
|
+
name: string;
|
|
561
|
+
is_private: boolean;
|
|
562
|
+
account: GithubAccount;
|
|
563
|
+
push_events_enabled: boolean;
|
|
564
|
+
branch_filters: GithubBranchFilterMap[];
|
|
565
|
+
/**
|
|
566
|
+
* Full repository name: owner/repo-name
|
|
567
|
+
*/
|
|
568
|
+
full_name: string;
|
|
569
|
+
/**
|
|
570
|
+
* GitHub repository URL
|
|
571
|
+
*/
|
|
572
|
+
url: string;
|
|
380
573
|
}
|
|
381
|
-
export interface
|
|
382
|
-
|
|
574
|
+
export interface GithubRepository {
|
|
575
|
+
id: number;
|
|
576
|
+
name: string;
|
|
577
|
+
is_private: boolean;
|
|
578
|
+
account: GithubAccount;
|
|
579
|
+
/**
|
|
580
|
+
* Full repository name: owner/repo-name
|
|
581
|
+
*/
|
|
582
|
+
full_name: string;
|
|
583
|
+
/**
|
|
584
|
+
* GitHub repository URL
|
|
585
|
+
*/
|
|
586
|
+
url: string;
|
|
383
587
|
}
|
|
384
|
-
export interface
|
|
385
|
-
|
|
588
|
+
export interface InlineRef {
|
|
589
|
+
id: string;
|
|
590
|
+
type: string;
|
|
591
|
+
source: string;
|
|
592
|
+
ref_ind: number;
|
|
593
|
+
name: string | null;
|
|
594
|
+
is_stale: boolean;
|
|
386
595
|
}
|
|
387
|
-
export interface
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
596
|
+
export interface Project {
|
|
597
|
+
id: string;
|
|
598
|
+
created_at: string;
|
|
599
|
+
name: string;
|
|
600
|
+
description: string | null;
|
|
601
|
+
is_default: boolean;
|
|
602
|
+
kind: ProjectKind;
|
|
603
|
+
created_by_user: User;
|
|
604
|
+
n_codes: number;
|
|
605
|
+
n_analyses: number;
|
|
606
|
+
n_users: number;
|
|
607
|
+
github_link: GithubLink | null;
|
|
394
608
|
}
|
|
395
|
-
export interface
|
|
396
|
-
|
|
397
|
-
|
|
609
|
+
export interface ProjectUser {
|
|
610
|
+
id: string;
|
|
611
|
+
is_self: boolean;
|
|
612
|
+
created_at: string;
|
|
613
|
+
username: string;
|
|
614
|
+
external_id: string | null;
|
|
615
|
+
metadata: {
|
|
616
|
+
[k: string]: unknown;
|
|
617
|
+
};
|
|
398
618
|
}
|
|
399
|
-
export interface
|
|
400
|
-
|
|
619
|
+
export interface SigningKey {
|
|
620
|
+
key: string;
|
|
401
621
|
}
|
|
402
|
-
export interface
|
|
403
|
-
|
|
404
|
-
candidates: CollisionVersionSchema[];
|
|
622
|
+
export interface SigningToken {
|
|
623
|
+
token: string;
|
|
405
624
|
}
|
|
406
|
-
|
|
407
|
-
export type AnalysisCreateSchema = AnalysisCreatedResult | AnalysisCollisionResult;
|
|
408
|
-
interface BaseSummarySchema {
|
|
625
|
+
export interface ToolBreakdown {
|
|
409
626
|
n_added: number;
|
|
410
627
|
n_updated: number;
|
|
411
628
|
n_removed: number;
|
|
412
629
|
n_remediated: number;
|
|
413
630
|
n_dismissed: number;
|
|
414
|
-
}
|
|
415
|
-
export interface AnalysisNetworkPoint extends AnalysisVersionSlimSchema {
|
|
416
|
-
ind: number;
|
|
417
|
-
merged_from_version: AnalysisVersionRef | null;
|
|
418
|
-
forked_from_version: AnalysisVersionRef | null;
|
|
419
|
-
parent_version: AnalysisVersionRef | null;
|
|
420
|
-
}
|
|
421
|
-
export interface AnalysisFindingPoint extends BaseSummarySchema, AnalysisVersionSlimSchema {
|
|
422
|
-
ind: number;
|
|
423
|
-
}
|
|
424
|
-
export interface UserBreakdownSchema extends BaseSummarySchema {
|
|
425
|
-
user: UserSchema;
|
|
426
|
-
n_versions: number;
|
|
427
|
-
last_analysis_at: DateTime | null;
|
|
428
|
-
}
|
|
429
|
-
export interface ToolBreakdownSchema extends BaseSummarySchema {
|
|
430
631
|
tool: string;
|
|
431
632
|
}
|
|
432
|
-
export interface ToolHistoryPoint
|
|
633
|
+
export interface ToolHistoryPoint {
|
|
634
|
+
n_added: number;
|
|
635
|
+
n_updated: number;
|
|
636
|
+
n_removed: number;
|
|
637
|
+
n_remediated: number;
|
|
638
|
+
n_dismissed: number;
|
|
639
|
+
tool: string;
|
|
433
640
|
version: AnalysisVersionRef;
|
|
434
641
|
analysis_name: string;
|
|
435
|
-
created_at:
|
|
642
|
+
created_at: string;
|
|
436
643
|
}
|
|
437
|
-
export interface
|
|
438
|
-
id:
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
644
|
+
export interface User {
|
|
645
|
+
id: string;
|
|
646
|
+
is_self: boolean;
|
|
647
|
+
created_at: string;
|
|
648
|
+
username: string;
|
|
649
|
+
}
|
|
650
|
+
export interface UserBreakdown {
|
|
651
|
+
n_added: number;
|
|
652
|
+
n_updated: number;
|
|
653
|
+
n_removed: number;
|
|
654
|
+
n_remediated: number;
|
|
655
|
+
n_dismissed: number;
|
|
656
|
+
user: User;
|
|
657
|
+
n_versions: number;
|
|
658
|
+
last_analysis_at: string | null;
|
|
447
659
|
}
|
|
448
|
-
export {};
|
|
449
660
|
//# sourceMappingURL=responses.d.ts.map
|