-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommits.ts
180 lines (145 loc) · 3.57 KB
/
commits.ts
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as TestResultsAPI from './test-results';
import { TestResultListParams, TestResultListResponse, TestResults } from './test-results';
export class Commits extends APIResource {
testResults: TestResultsAPI.TestResults = new TestResultsAPI.TestResults(this._client);
/**
* Retrieve a project version (commit) by its id.
*/
retrieve(projectVersionId: string, options?: Core.RequestOptions): Core.APIPromise<CommitRetrieveResponse> {
return this._client.get(`/versions/${projectVersionId}`, options);
}
}
export interface CommitRetrieveResponse {
/**
* The project version (commit) id.
*/
id: string;
/**
* The details of a commit (project version).
*/
commit: CommitRetrieveResponse.Commit;
/**
* The commit archive date.
*/
dateArchived: string | null;
/**
* The project version (commit) creation date.
*/
dateCreated: string;
/**
* The number of tests that are failing for the commit.
*/
failingGoalCount: number;
/**
* The model id.
*/
mlModelId: string | null;
/**
* The number of tests that are passing for the commit.
*/
passingGoalCount: number;
/**
* The project id.
*/
projectId: string;
/**
* The commit status. Initially, the commit is `queued`, then, it switches to
* `running`. Finally, it can be `paused`, `failed`, or `completed`.
*/
status: 'queued' | 'running' | 'paused' | 'failed' | 'completed' | 'unknown';
/**
* The commit status message.
*/
statusMessage: string | null;
/**
* The total number of tests for the commit.
*/
totalGoalCount: number;
/**
* The training dataset id.
*/
trainingDatasetId: string | null;
/**
* The validation dataset id.
*/
validationDatasetId: string | null;
/**
* Whether the commit is archived.
*/
archived?: boolean | null;
/**
* The deployment status associated with the commit's model.
*/
deploymentStatus?: string;
links?: CommitRetrieveResponse.Links;
}
export namespace CommitRetrieveResponse {
/**
* The details of a commit (project version).
*/
export interface Commit {
/**
* The commit id.
*/
id: string;
/**
* The author id of the commit.
*/
authorId: string;
/**
* The size of the commit bundle in bytes.
*/
fileSize: number | null;
/**
* The commit message.
*/
message: string;
/**
* The model id.
*/
mlModelId: string | null;
/**
* The storage URI where the commit bundle is stored.
*/
storageUri: string;
/**
* The training dataset id.
*/
trainingDatasetId: string | null;
/**
* The validation dataset id.
*/
validationDatasetId: string | null;
/**
* The commit creation date.
*/
dateCreated?: string;
/**
* The ref of the corresponding git commit.
*/
gitCommitRef?: string;
/**
* The SHA of the corresponding git commit.
*/
gitCommitSha?: number;
/**
* The URL of the corresponding git commit.
*/
gitCommitUrl?: string;
}
export interface Links {
app: string;
}
}
Commits.TestResults = TestResults;
export declare namespace Commits {
export { type CommitRetrieveResponse as CommitRetrieveResponse };
export {
TestResults as TestResults,
type TestResultListResponse as TestResultListResponse,
type TestResultListParams as TestResultListParams,
};
}