Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.prism.log
node_modules
yarn-error.log
codegen.log
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.2.1"
".": "0.2.2"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 6
configured_endpoints: 8
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.2.2 (2024-07-05)

Full Changelog: [v0.2.1...v0.2.2](https://github.com/openlayer-ai/openlayer-ts/compare/v0.2.1...v0.2.2)

### Features

* **api:** update via SDK Studio ([#16](https://github.com/openlayer-ai/openlayer-ts/issues/16)) ([699ba47](https://github.com/openlayer-ai/openlayer-ts/commit/699ba477252cac4546237afd55f5375171fff381))


### Chores

* go live ([#18](https://github.com/openlayer-ai/openlayer-ts/issues/18)) ([fadc413](https://github.com/openlayer-ai/openlayer-ts/commit/fadc41325e5427f4b0d43281407b5f57f72f7854))
* update SDK settings ([#19](https://github.com/openlayer-ai/openlayer-ts/issues/19)) ([862666d](https://github.com/openlayer-ai/openlayer-ts/commit/862666da0c19f2cdb373be7aa89660c1fab9df8f))

## 0.2.1 (2024-06-10)

Full Changelog: [v0.2.0...v0.2.1](https://github.com/openlayer-ai/openlayer-ts/compare/v0.2.0...v0.2.1)
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
## Installation

```sh
npm install git+ssh://git@github.com:openlayer-ai/openlayer-ts.git
npm install openlayer
```

> [!NOTE]
> Once this package is [published to npm](https://app.stainlessapi.com/docs/guides/publish), this will become: `npm install openlayer`

## Usage

The full API of this library can be found in [api.md](api.md).
Expand Down
4 changes: 4 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

Types:

- <code><a href="./src/resources/projects/projects.ts">ProjectCreateResponse</a></code>
- <code><a href="./src/resources/projects/projects.ts">ProjectListResponse</a></code>

Methods:

- <code title="post /projects">client.projects.<a href="./src/resources/projects/projects.ts">create</a>({ ...params }) -> ProjectCreateResponse</code>
- <code title="get /projects">client.projects.<a href="./src/resources/projects/projects.ts">list</a>({ ...params }) -> ProjectListResponse</code>

## Commits
Expand All @@ -22,10 +24,12 @@ Methods:

Types:

- <code><a href="./src/resources/projects/inference-pipelines.ts">InferencePipelineCreateResponse</a></code>
- <code><a href="./src/resources/projects/inference-pipelines.ts">InferencePipelineListResponse</a></code>

Methods:

- <code title="post /projects/{id}/inference-pipelines">client.projects.inferencePipelines.<a href="./src/resources/projects/inference-pipelines.ts">create</a>(id, { ...params }) -> InferencePipelineCreateResponse</code>
- <code title="get /projects/{id}/inference-pipelines">client.projects.inferencePipelines.<a href="./src/resources/projects/inference-pipelines.ts">list</a>(id, { ...params }) -> InferencePipelineListResponse</code>

# Commits
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openlayer",
"version": "0.2.1",
"version": "0.2.2",
"description": "The official TypeScript library for the Openlayer API",
"author": "Openlayer <support@openlayer.com>",
"types": "dist/index.d.ts",
Expand Down
11 changes: 8 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import * as Core from './core';
import * as Errors from './error';
import { type Agent } from './_shims/index';
import * as Uploads from './uploads';
import { type Agent } from './_shims/index';
import * as Core from './core';
import * as API from './resources/index';

export interface ClientOptions {
Expand Down Expand Up @@ -69,7 +69,9 @@ export interface ClientOptions {
defaultQuery?: Core.DefaultQuery;
}

/** API Client for interfacing with the Openlayer API. */
/**
* API Client for interfacing with the Openlayer API.
*/
export class Openlayer extends Core.APIClient {
apiKey: string | null;

Expand Down Expand Up @@ -105,6 +107,7 @@ export class Openlayer extends Core.APIClient {
maxRetries: options.maxRetries,
fetch: options.fetch,
});

this._options = options;

this.apiKey = apiKey;
Expand Down Expand Up @@ -188,7 +191,9 @@ export namespace Openlayer {
export import RequestOptions = Core.RequestOptions;

export import Projects = API.Projects;
export import ProjectCreateResponse = API.ProjectCreateResponse;
export import ProjectListResponse = API.ProjectListResponse;
export import ProjectCreateParams = API.ProjectCreateParams;
export import ProjectListParams = API.ProjectListParams;

export import Commits = API.Commits;
Expand Down
2 changes: 1 addition & 1 deletion src/resources/commits/test-results.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

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

export class TestResults extends APIResource {
Expand Down
8 changes: 7 additions & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@

export { Commits } from './commits/commits';
export { InferencePipelines } from './inference-pipelines/inference-pipelines';
export { ProjectListResponse, ProjectListParams, Projects } from './projects/projects';
export {
ProjectCreateResponse,
ProjectListResponse,
ProjectCreateParams,
ProjectListParams,
Projects,
} from './projects/projects';
2 changes: 1 addition & 1 deletion src/resources/inference-pipelines/data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import * as Core from '../../core';
import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as DataAPI from './data';

export class Data extends APIResource {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/inference-pipelines/test-results.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

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

export class TestResults extends APIResource {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/projects/commits.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import * as Core from '../../core';
import { APIResource } from '../../resource';
import { isRequestOptions } from '../../core';
import * as Core from '../../core';
import * as CommitsAPI from './commits';

export class Commits extends APIResource {
Expand Down
10 changes: 9 additions & 1 deletion src/resources/projects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

export { CommitListResponse, CommitListParams, Commits } from './commits';
export {
InferencePipelineCreateResponse,
InferencePipelineListResponse,
InferencePipelineCreateParams,
InferencePipelineListParams,
InferencePipelines,
} from './inference-pipelines';
export { ProjectListResponse, ProjectListParams, Projects } from './projects';
export {
ProjectCreateResponse,
ProjectListResponse,
ProjectCreateParams,
ProjectListParams,
Projects,
} from './projects';
122 changes: 121 additions & 1 deletion src/resources/projects/inference-pipelines.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import * as Core from '../../core';
import { APIResource } from '../../resource';
import { isRequestOptions } from '../../core';
import * as Core from '../../core';
import * as InferencePipelinesAPI from './inference-pipelines';

export class InferencePipelines extends APIResource {
/**
* Create an inference pipeline under a project.
*/
create(
id: string,
body: InferencePipelineCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<InferencePipelineCreateResponse> {
return this._client.post(`/projects/${id}/inference-pipelines`, { body, ...options });
}

/**
* List the inference pipelines in a project.
*/
Expand All @@ -27,6 +38,91 @@ export class InferencePipelines extends APIResource {
}
}

export interface InferencePipelineCreateResponse {
/**
* The inference pipeline id.
*/
id: string;

/**
* The creation date.
*/
dateCreated: string;

/**
* The last test evaluation date.
*/
dateLastEvaluated: string | null;

/**
* The last data sample received date.
*/
dateLastSampleReceived: string | null;

/**
* The next test evaluation date.
*/
dateOfNextEvaluation: string | null;

/**
* The last updated date.
*/
dateUpdated: string;

/**
* The inference pipeline description.
*/
description: string | null;

/**
* The number of tests failing.
*/
failingGoalCount: number;

links: InferencePipelineCreateResponse.Links;

/**
* The inference pipeline name.
*/
name: string;

/**
* The number of tests passing.
*/
passingGoalCount: number;

/**
* The project id.
*/
projectId: string;

/**
* The status of test evaluation for the inference pipeline.
*/
status: 'queued' | 'running' | 'paused' | 'failed' | 'completed' | 'unknown';

/**
* The status message of test evaluation for the inference pipeline.
*/
statusMessage: string | null;

/**
* The total number of tests.
*/
totalGoalCount: number;

/**
* The storage type.
*/
storageType?: 'local' | 's3' | 'gcs' | 'azure';
}

export namespace InferencePipelineCreateResponse {
export interface Links {
app: string;
}
}

export interface InferencePipelineListResponse {
_meta: InferencePipelineListResponse._Meta;

Expand Down Expand Up @@ -142,6 +238,28 @@ export namespace InferencePipelineListResponse {
}
}

export interface InferencePipelineCreateParams {
/**
* The inference pipeline description.
*/
description: string | null;

/**
* The inference pipeline name.
*/
name: string;

/**
* The reference dataset URI.
*/
referenceDatasetUri?: string | null;

/**
* The storage type.
*/
storageType?: 'local' | 's3' | 'gcs' | 'azure';
}

export interface InferencePipelineListParams {
/**
* Filter list of items by name.
Expand All @@ -160,6 +278,8 @@ export interface InferencePipelineListParams {
}

export namespace InferencePipelines {
export import InferencePipelineCreateResponse = InferencePipelinesAPI.InferencePipelineCreateResponse;
export import InferencePipelineListResponse = InferencePipelinesAPI.InferencePipelineListResponse;
export import InferencePipelineCreateParams = InferencePipelinesAPI.InferencePipelineCreateParams;
export import InferencePipelineListParams = InferencePipelinesAPI.InferencePipelineListParams;
}
Loading