Skip to content

feat(api): manual updates #57

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ Methods:

Types:

- <code><a href="./src/resources/projects/commits.ts">CommitCreateResponse</a></code>
- <code><a href="./src/resources/projects/commits.ts">CommitListResponse</a></code>

Methods:

- <code title="post /projects/{projectId}/versions">client.projects.commits.<a href="./src/resources/projects/commits.ts">create</a>(projectId, { ...params }) -> CommitCreateResponse</code>
- <code title="get /projects/{projectId}/versions">client.projects.commits.<a href="./src/resources/projects/commits.ts">list</a>(projectId, { ...params }) -> CommitListResponse</code>

## InferencePipelines
Expand All @@ -34,14 +36,6 @@ Methods:

# Commits

Types:

- <code><a href="./src/resources/commits/commits.ts">CommitCreateResponse</a></code>

Methods:

- <code title="post /projects/{projectId}/versions">client.commits.<a href="./src/resources/commits/commits.ts">create</a>(projectId, { ...params }) -> CommitCreateResponse</code>

## TestResults

Types:
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ export namespace Openlayer {
export import ProjectListParams = API.ProjectListParams;

export import Commits = API.Commits;
export import CommitCreateResponse = API.CommitCreateResponse;
export import CommitCreateParams = API.CommitCreateParams;

export import InferencePipelines = API.InferencePipelines;
export import InferencePipelineRetrieveResponse = API.InferencePipelineRetrieveResponse;
Expand Down
200 changes: 0 additions & 200 deletions src/resources/commits/commits.ts
Original file line number Diff line number Diff line change
@@ -1,213 +1,13 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as CommitsAPI from './commits';
import * as TestResultsAPI from './test-results';

export class Commits extends APIResource {
testResults: TestResultsAPI.TestResults = new TestResultsAPI.TestResults(this._client);

/**
* Create a new commit (project version) in a project.
*/
create(
projectId: string,
body: CommitCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<CommitCreateResponse> {
return this._client.post(`/projects/${projectId}/versions`, { body, ...options });
}
}

export interface CommitCreateResponse {
/**
* The project version (commit) id.
*/
id: string;

/**
* The details of a commit (project version).
*/
commit: CommitCreateResponse.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?: CommitCreateResponse.Links;
}

export namespace CommitCreateResponse {
/**
* 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;
}
}

export interface CommitCreateParams {
/**
* The details of a commit (project version).
*/
commit: CommitCreateParams.Commit;

/**
* The storage URI where the commit bundle is stored.
*/
storageUri: string;

/**
* Whether the commit is archived.
*/
archived?: boolean | null;

/**
* The deployment status associated with the commit's model.
*/
deploymentStatus?: string;
}

export namespace CommitCreateParams {
/**
* The details of a commit (project version).
*/
export interface Commit {
/**
* The commit message.
*/
message: string;
}
}

export namespace Commits {
export import CommitCreateResponse = CommitsAPI.CommitCreateResponse;
export import CommitCreateParams = CommitsAPI.CommitCreateParams;
export import TestResults = TestResultsAPI.TestResults;
export import TestResultListResponse = TestResultsAPI.TestResultListResponse;
export import TestResultListParams = TestResultsAPI.TestResultListParams;
Expand Down
2 changes: 1 addition & 1 deletion src/resources/commits/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { CommitCreateResponse, CommitCreateParams, Commits } from './commits';
export { Commits } from './commits';
export { TestResultListResponse, TestResultListParams, TestResults } from './test-results';
2 changes: 1 addition & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { CommitCreateResponse, CommitCreateParams, Commits } from './commits/commits';
export { Commits } from './commits/commits';
export {
InferencePipelineRetrieveResponse,
InferencePipelineUpdateResponse,
Expand Down
Loading