From 3345b629c1904bfb2c2f9e05c86312c6c7b88b48 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 23 Jan 2025 14:02:43 +0000
Subject: [PATCH 01/14] feat(api): api update

---
 .github/workflows/create-releases.yml         | 41 +++++++++
 .github/workflows/publish-npm.yml             |  8 +-
 .github/workflows/release-doctor.yml          |  1 +
 bin/check-release-environment                 |  4 +
 .../inference-pipelines.ts                    | 72 ++++++++++++++++
 src/resources/projects/inference-pipelines.ts | 84 +++++++++++++++++++
 6 files changed, 204 insertions(+), 6 deletions(-)
 create mode 100644 .github/workflows/create-releases.yml

diff --git a/.github/workflows/create-releases.yml b/.github/workflows/create-releases.yml
new file mode 100644
index 0000000..d820b50
--- /dev/null
+++ b/.github/workflows/create-releases.yml
@@ -0,0 +1,41 @@
+name: Create releases
+on:
+  schedule:
+    - cron: '0 5 * * *' # every day at 5am UTC
+  push:
+    branches:
+      - main
+
+jobs:
+  release:
+    name: release
+    if: github.ref == 'refs/heads/main' && github.repository == 'openlayer-ai/openlayer-ts'
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v4
+
+      - uses: stainless-api/trigger-release-please@v1
+        id: release
+        with:
+          repo: ${{ github.event.repository.full_name }}
+          stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
+
+      - name: Set up Node
+        if: ${{ steps.release.outputs.releases_created }}
+        uses: actions/setup-node@v3
+        with:
+          node-version: '18'
+
+      - name: Install dependencies
+        if: ${{ steps.release.outputs.releases_created }}
+        run: |
+          yarn install
+
+      - name: Publish to NPM
+        if: ${{ steps.release.outputs.releases_created }}
+        run: |
+          bash ./bin/publish-npm
+        env:
+          NPM_TOKEN: ${{ secrets.OPENLAYER_NPM_TOKEN || secrets.NPM_TOKEN }}
+
diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml
index 361a64a..405e769 100644
--- a/.github/workflows/publish-npm.yml
+++ b/.github/workflows/publish-npm.yml
@@ -1,13 +1,9 @@
-# This workflow is triggered when a GitHub release is created.
-# It can also be run manually to re-publish to NPM in case it failed for some reason.
-# You can run this workflow by navigating to https://www.github.com/openlayer-ai/openlayer-ts/actions/workflows/publish-npm.yml
+# workflow for re-running publishing to NPM in case it fails for some reason
+# you can run this workflow by navigating to https://www.github.com/openlayer-ai/openlayer-ts/actions/workflows/publish-npm.yml
 name: Publish NPM
 on:
   workflow_dispatch:
 
-  release:
-    types: [published]
-
 jobs:
   publish:
     name: publish
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index f021d93..fe63f8c 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -18,5 +18,6 @@ jobs:
         run: |
           bash ./bin/check-release-environment
         env:
+          STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
           NPM_TOKEN: ${{ secrets.OPENLAYER_NPM_TOKEN || secrets.NPM_TOKEN }}
 
diff --git a/bin/check-release-environment b/bin/check-release-environment
index 0f4fafe..5da9dd7 100644
--- a/bin/check-release-environment
+++ b/bin/check-release-environment
@@ -2,6 +2,10 @@
 
 errors=()
 
+if [ -z "${STAINLESS_API_KEY}" ]; then
+  errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
+fi
+
 if [ -z "${NPM_TOKEN}" ]; then
   errors+=("The OPENLAYER_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
 fi
diff --git a/src/resources/inference-pipelines/inference-pipelines.ts b/src/resources/inference-pipelines/inference-pipelines.ts
index efdb59b..4e5b1c8 100644
--- a/src/resources/inference-pipelines/inference-pipelines.ts
+++ b/src/resources/inference-pipelines/inference-pipelines.ts
@@ -275,26 +275,59 @@ export namespace InferencePipelineRetrieveResponse {
   }
 
   export interface Workspace {
+    /**
+     * The workspace id.
+     */
     id: string;
 
+    /**
+     * The workspace creator id.
+     */
     creatorId: string | null;
 
+    /**
+     * The workspace creation date.
+     */
     dateCreated: string;
 
+    /**
+     * The workspace last updated date.
+     */
     dateUpdated: string;
 
+    /**
+     * The number of invites in the workspace.
+     */
     inviteCount: number;
 
+    /**
+     * The number of members in the workspace.
+     */
     memberCount: number;
 
+    /**
+     * The workspace name.
+     */
     name: string;
 
+    /**
+     * The end date of the current billing period.
+     */
     periodEndDate: string | null;
 
+    /**
+     * The start date of the current billing period.
+     */
     periodStartDate: string | null;
 
+    /**
+     * The number of projects in the workspace.
+     */
     projectCount: number;
 
+    /**
+     * The workspace slug.
+     */
     slug: string;
 
     status:
@@ -309,6 +342,9 @@ export namespace InferencePipelineRetrieveResponse {
 
     monthlyUsage?: Array<Workspace.MonthlyUsage>;
 
+    /**
+     * Whether the workspace only allows SAML authentication.
+     */
     samlOnlyAccess?: boolean;
 
     wildcardDomains?: Array<string>;
@@ -528,26 +564,59 @@ export namespace InferencePipelineUpdateResponse {
   }
 
   export interface Workspace {
+    /**
+     * The workspace id.
+     */
     id: string;
 
+    /**
+     * The workspace creator id.
+     */
     creatorId: string | null;
 
+    /**
+     * The workspace creation date.
+     */
     dateCreated: string;
 
+    /**
+     * The workspace last updated date.
+     */
     dateUpdated: string;
 
+    /**
+     * The number of invites in the workspace.
+     */
     inviteCount: number;
 
+    /**
+     * The number of members in the workspace.
+     */
     memberCount: number;
 
+    /**
+     * The workspace name.
+     */
     name: string;
 
+    /**
+     * The end date of the current billing period.
+     */
     periodEndDate: string | null;
 
+    /**
+     * The start date of the current billing period.
+     */
     periodStartDate: string | null;
 
+    /**
+     * The number of projects in the workspace.
+     */
     projectCount: number;
 
+    /**
+     * The workspace slug.
+     */
     slug: string;
 
     status:
@@ -562,6 +631,9 @@ export namespace InferencePipelineUpdateResponse {
 
     monthlyUsage?: Array<Workspace.MonthlyUsage>;
 
+    /**
+     * Whether the workspace only allows SAML authentication.
+     */
     samlOnlyAccess?: boolean;
 
     wildcardDomains?: Array<string>;
diff --git a/src/resources/projects/inference-pipelines.ts b/src/resources/projects/inference-pipelines.ts
index 7f91d92..eed6c61 100644
--- a/src/resources/projects/inference-pipelines.ts
+++ b/src/resources/projects/inference-pipelines.ts
@@ -240,26 +240,59 @@ export namespace InferencePipelineCreateResponse {
   }
 
   export interface Workspace {
+    /**
+     * The workspace id.
+     */
     id: string;
 
+    /**
+     * The workspace creator id.
+     */
     creatorId: string | null;
 
+    /**
+     * The workspace creation date.
+     */
     dateCreated: string;
 
+    /**
+     * The workspace last updated date.
+     */
     dateUpdated: string;
 
+    /**
+     * The number of invites in the workspace.
+     */
     inviteCount: number;
 
+    /**
+     * The number of members in the workspace.
+     */
     memberCount: number;
 
+    /**
+     * The workspace name.
+     */
     name: string;
 
+    /**
+     * The end date of the current billing period.
+     */
     periodEndDate: string | null;
 
+    /**
+     * The start date of the current billing period.
+     */
     periodStartDate: string | null;
 
+    /**
+     * The number of projects in the workspace.
+     */
     projectCount: number;
 
+    /**
+     * The workspace slug.
+     */
     slug: string;
 
     status:
@@ -274,6 +307,9 @@ export namespace InferencePipelineCreateResponse {
 
     monthlyUsage?: Array<Workspace.MonthlyUsage>;
 
+    /**
+     * Whether the workspace only allows SAML authentication.
+     */
     samlOnlyAccess?: boolean;
 
     wildcardDomains?: Array<string>;
@@ -498,26 +534,59 @@ export namespace InferencePipelineListResponse {
     }
 
     export interface Workspace {
+      /**
+       * The workspace id.
+       */
       id: string;
 
+      /**
+       * The workspace creator id.
+       */
       creatorId: string | null;
 
+      /**
+       * The workspace creation date.
+       */
       dateCreated: string;
 
+      /**
+       * The workspace last updated date.
+       */
       dateUpdated: string;
 
+      /**
+       * The number of invites in the workspace.
+       */
       inviteCount: number;
 
+      /**
+       * The number of members in the workspace.
+       */
       memberCount: number;
 
+      /**
+       * The workspace name.
+       */
       name: string;
 
+      /**
+       * The end date of the current billing period.
+       */
       periodEndDate: string | null;
 
+      /**
+       * The start date of the current billing period.
+       */
       periodStartDate: string | null;
 
+      /**
+       * The number of projects in the workspace.
+       */
       projectCount: number;
 
+      /**
+       * The workspace slug.
+       */
       slug: string;
 
       status:
@@ -532,6 +601,9 @@ export namespace InferencePipelineListResponse {
 
       monthlyUsage?: Array<Workspace.MonthlyUsage>;
 
+      /**
+       * Whether the workspace only allows SAML authentication.
+       */
       samlOnlyAccess?: boolean;
 
       wildcardDomains?: Array<string>;
@@ -584,12 +656,24 @@ export namespace InferencePipelineCreateParams {
   }
 
   export interface Workspace {
+    /**
+     * The workspace name.
+     */
     name: string;
 
+    /**
+     * The workspace slug.
+     */
     slug: string;
 
+    /**
+     * The workspace invite code.
+     */
     inviteCode?: string;
 
+    /**
+     * Whether the workspace only allows SAML authentication.
+     */
     samlOnlyAccess?: boolean;
 
     wildcardDomains?: Array<string>;

From fd5d0a9808b2abf8d1b88d3becf2350d9b25887e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 24 Jan 2025 12:05:42 +0000
Subject: [PATCH 02/14] chore(internal): codegen related update

---
 README.md           |  2 +-
 src/index.ts        | 10 +++++-----
 tests/index.test.ts |  9 +++++++++
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index c0a8352..8244415 100644
--- a/README.md
+++ b/README.md
@@ -380,7 +380,7 @@ await client.inferencePipelines.data.stream(
 This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
 
 1. Changes that only affect static types, without breaking runtime behavior.
-2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
+2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
 3. Changes that we do not expect to impact the vast majority of users in practice.
 
 We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
diff --git a/src/index.ts b/src/index.ts
index e2cc2f8..96767aa 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -43,7 +43,7 @@ export interface ClientOptions {
    * Note that request timeouts are retried by default, so in a worst-case scenario you may wait
    * much longer than this timeout before the promise succeeds or fails.
    */
-  timeout?: number;
+  timeout?: number | undefined;
 
   /**
    * An HTTP agent used to manage HTTP(S) connections.
@@ -51,7 +51,7 @@ export interface ClientOptions {
    * If not provided, an agent will be constructed by default in the Node.js environment,
    * otherwise no agent is used.
    */
-  httpAgent?: Agent;
+  httpAgent?: Agent | undefined;
 
   /**
    * Specify a custom `fetch` function implementation.
@@ -67,7 +67,7 @@ export interface ClientOptions {
    *
    * @default 2
    */
-  maxRetries?: number;
+  maxRetries?: number | undefined;
 
   /**
    * Default headers to include with every request to the API.
@@ -75,7 +75,7 @@ export interface ClientOptions {
    * These can be removed in individual requests by explicitly setting the
    * header to `undefined` or `null` in request options.
    */
-  defaultHeaders?: Core.Headers;
+  defaultHeaders?: Core.Headers | undefined;
 
   /**
    * Default query parameters to include with every request to the API.
@@ -83,7 +83,7 @@ export interface ClientOptions {
    * These can be removed in individual requests by explicitly setting the
    * param to `undefined` in request options.
    */
-  defaultQuery?: Core.DefaultQuery;
+  defaultQuery?: Core.DefaultQuery | undefined;
 }
 
 /**
diff --git a/tests/index.test.ts b/tests/index.test.ts
index f45c1b0..86dc23a 100644
--- a/tests/index.test.ts
+++ b/tests/index.test.ts
@@ -96,6 +96,15 @@ describe('instantiate client', () => {
     expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true });
   });
 
+  test('explicit global fetch', async () => {
+    // make sure the global fetch type is assignable to our Fetch type
+    const client = new Openlayer({
+      baseURL: 'http://localhost:5000/',
+      apiKey: 'My API Key',
+      fetch: defaultFetch,
+    });
+  });
+
   test('custom signal', async () => {
     const client = new Openlayer({
       baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',

From ca173073bc522424d9d6a35b5a2af14ccd7b8c88 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 24 Jan 2025 12:07:38 +0000
Subject: [PATCH 03/14] chore(internal): codegen related update

---
 tests/api-resources/inference-pipelines/rows.test.ts     | 1 -
 tests/api-resources/projects/inference-pipelines.test.ts | 8 +-------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/tests/api-resources/inference-pipelines/rows.test.ts b/tests/api-resources/inference-pipelines/rows.test.ts
index 6856457..9694c3b 100644
--- a/tests/api-resources/inference-pipelines/rows.test.ts
+++ b/tests/api-resources/inference-pipelines/rows.test.ts
@@ -30,7 +30,6 @@ describe('resource rows', () => {
       config: {
         groundTruthColumnName: 'ground_truth',
         humanFeedbackColumnName: 'human_feedback',
-        inferenceIdColumnName: 'id',
         latencyColumnName: 'latency',
         timestampColumnName: 'timestamp',
       },
diff --git a/tests/api-resources/projects/inference-pipelines.test.ts b/tests/api-resources/projects/inference-pipelines.test.ts
index 80acc23..1be614c 100644
--- a/tests/api-resources/projects/inference-pipelines.test.ts
+++ b/tests/api-resources/projects/inference-pipelines.test.ts
@@ -28,13 +28,7 @@ describe('resource inferencePipelines', () => {
       description: 'This pipeline is used for production.',
       name: 'production',
       project: { name: 'My Project', taskType: 'llm-base', description: 'My project description.' },
-      workspace: {
-        name: 'Openlayer',
-        slug: 'openlayer',
-        inviteCode: 'inviteCode',
-        samlOnlyAccess: true,
-        wildcardDomains: ['string'],
-      },
+      workspace: { name: 'Openlayer', slug: 'openlayer', samlOnlyAccess: true, wildcardDomains: ['string'] },
     });
   });
 

From 1016df6f549fd3312c26f6ecfd15b3aac58c5d65 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 29 Jan 2025 03:52:21 +0000
Subject: [PATCH 04/14] chore(internal): codegen related update

---
 tests/api-resources/inference-pipelines/rows.test.ts     | 1 +
 tests/api-resources/projects/inference-pipelines.test.ts | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/api-resources/inference-pipelines/rows.test.ts b/tests/api-resources/inference-pipelines/rows.test.ts
index 9694c3b..6856457 100644
--- a/tests/api-resources/inference-pipelines/rows.test.ts
+++ b/tests/api-resources/inference-pipelines/rows.test.ts
@@ -30,6 +30,7 @@ describe('resource rows', () => {
       config: {
         groundTruthColumnName: 'ground_truth',
         humanFeedbackColumnName: 'human_feedback',
+        inferenceIdColumnName: 'id',
         latencyColumnName: 'latency',
         timestampColumnName: 'timestamp',
       },
diff --git a/tests/api-resources/projects/inference-pipelines.test.ts b/tests/api-resources/projects/inference-pipelines.test.ts
index 1be614c..80acc23 100644
--- a/tests/api-resources/projects/inference-pipelines.test.ts
+++ b/tests/api-resources/projects/inference-pipelines.test.ts
@@ -28,7 +28,13 @@ describe('resource inferencePipelines', () => {
       description: 'This pipeline is used for production.',
       name: 'production',
       project: { name: 'My Project', taskType: 'llm-base', description: 'My project description.' },
-      workspace: { name: 'Openlayer', slug: 'openlayer', samlOnlyAccess: true, wildcardDomains: ['string'] },
+      workspace: {
+        name: 'Openlayer',
+        slug: 'openlayer',
+        inviteCode: 'inviteCode',
+        samlOnlyAccess: true,
+        wildcardDomains: ['string'],
+      },
     });
   });
 

From 333edef002f95acecdb29d3e6a698343c3361937 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 5 Feb 2025 03:36:17 +0000
Subject: [PATCH 05/14] feat(client): send `X-Stainless-Timeout` header

---
 src/core.ts | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/core.ts b/src/core.ts
index 5981ff8..241cb76 100644
--- a/src/core.ts
+++ b/src/core.ts
@@ -280,6 +280,7 @@ export abstract class APIClient {
     options: FinalRequestOptions<Req>,
     { retryCount = 0 }: { retryCount?: number } = {},
   ): { req: RequestInit; url: string; timeout: number } {
+    options = { ...options };
     const { method, path, query, headers: headers = {} } = options;
 
     const body =
@@ -292,9 +293,9 @@ export abstract class APIClient {
 
     const url = this.buildURL(path!, query);
     if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
-    const timeout = options.timeout ?? this.timeout;
+    options.timeout = options.timeout ?? this.timeout;
     const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
-    const minAgentTimeout = timeout + 1000;
+    const minAgentTimeout = options.timeout + 1000;
     if (
       typeof (httpAgent as any)?.options?.timeout === 'number' &&
       minAgentTimeout > ((httpAgent as any).options.timeout ?? 0)
@@ -323,7 +324,7 @@ export abstract class APIClient {
       signal: options.signal ?? null,
     };
 
-    return { req, url, timeout };
+    return { req, url, timeout: options.timeout };
   }
 
   private buildHeaders({
@@ -351,15 +352,22 @@ export abstract class APIClient {
       delete reqHeaders['content-type'];
     }
 
-    // Don't set the retry count header if it was already set or removed through default headers or by the
-    // caller. We check `defaultHeaders` and `headers`, which can contain nulls, instead of `reqHeaders` to
-    // account for the removal case.
+    // Don't set theses headers if they were already set or removed through default headers or by the caller.
+    // We check `defaultHeaders` and `headers`, which can contain nulls, instead of `reqHeaders` to account
+    // for the removal case.
     if (
       getHeader(defaultHeaders, 'x-stainless-retry-count') === undefined &&
       getHeader(headers, 'x-stainless-retry-count') === undefined
     ) {
       reqHeaders['x-stainless-retry-count'] = String(retryCount);
     }
+    if (
+      getHeader(defaultHeaders, 'x-stainless-timeout') === undefined &&
+      getHeader(headers, 'x-stainless-timeout') === undefined &&
+      options.timeout
+    ) {
+      reqHeaders['x-stainless-timeout'] = String(options.timeout);
+    }
 
     this.validateHeaders(reqHeaders, headers);
 

From ac3dffce4624d350d5cf73e3020067cb2f71ab59 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 14 Feb 2025 05:17:23 +0000
Subject: [PATCH 06/14] fix(client): fix export map for index exports

---
 package.json | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/package.json b/package.json
index 13eefa3..5c52731 100644
--- a/package.json
+++ b/package.json
@@ -113,17 +113,17 @@
       "default": "./dist/index.mjs"
     },
     "./*.mjs": {
-      "types": "./dist/*.d.ts",
-      "default": "./dist/*.mjs"
+      "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"],
+      "default": ["./dist/*.mjs", "./dist/*/index.mjs"]
     },
     "./*.js": {
-      "types": "./dist/*.d.ts",
-      "default": "./dist/*.js"
+      "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"],
+      "default": ["./dist/*.js", "./dist/*/index.js"]
     },
     "./*": {
-      "types": "./dist/*.d.ts",
-      "require": "./dist/*.js",
-      "default": "./dist/*.mjs"
+      "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"],
+      "require": ["./dist/*.js", "./dist/*/index.js"],
+      "default": ["./dist/*.mjs", "./dist/*/index.mjs"]
     }
   }
 }

From 6a459de24ebec36ba38b751b6ab7143b3b9e16fd Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 22 Feb 2025 05:55:51 +0000
Subject: [PATCH 07/14] chore(internal): fix devcontainers setup

---
 .devcontainer/Dockerfile        | 23 -----------------------
 .devcontainer/devcontainer.json | 27 ++++++++++++---------------
 2 files changed, 12 insertions(+), 38 deletions(-)
 delete mode 100644 .devcontainer/Dockerfile

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
deleted file mode 100644
index 8ea34be..0000000
--- a/.devcontainer/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-# syntax=docker/dockerfile:1
-FROM debian:bookworm-slim AS stainless
-
-RUN apt-get update && apt-get install -y \
-  nodejs \
-  npm \
-  yarnpkg \
-  && apt-get clean autoclean
-
-# Ensure UTF-8 encoding
-ENV LANG=C.UTF-8
-ENV LC_ALL=C.UTF-8
-
-# Yarn
-RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
-
-WORKDIR /workspace
-
-COPY package.json yarn.lock /workspace/
-
-RUN yarn install
-
-COPY . /workspace
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index d55fc4d..763462f 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,20 +1,17 @@
 // For format details, see https://aka.ms/devcontainer.json. For config options, see the
 // README at: https://github.com/devcontainers/templates/tree/main/src/debian
 {
-  "name": "Debian",
-  "build": {
-    "dockerfile": "Dockerfile"
+  "name": "Development",
+  "image": "mcr.microsoft.com/devcontainers/typescript-node:latest",
+  "features": {
+    "ghcr.io/devcontainers/features/node:1": {}
+  },
+  "postCreateCommand": "yarn install",
+  "customizations": {
+    "vscode": {
+      "extensions": [
+        "esbenp.prettier-vscode"
+      ]
+    }
   }
-
-  // Features to add to the dev container. More info: https://containers.dev/features.
-  // "features": {},
-
-  // Use 'forwardPorts' to make a list of ports inside the container available locally.
-  // "forwardPorts": [],
-
-  // Configure tool-specific properties.
-  // "customizations": {},
-
-  // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
-  // "remoteUser": "root"
 }

From 3a317902d8bf523f3f54398cdb077a11a18d9995 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 27 Feb 2025 15:03:44 +0000
Subject: [PATCH 08/14] chore(internal): version bump


From e56ef04346aa002b8481a8018ad540c678a9a21e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 28 Feb 2025 03:29:39 +0000
Subject: [PATCH 09/14] docs: update URLs from stainlessapi.com to
 stainless.com

More details at https://www.stainless.com/changelog/stainless-com
---
 README.md   | 2 +-
 SECURITY.md | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 8244415..c58157a 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ This library provides convenient access to the Openlayer REST API from server-si
 
 The REST API documentation can be found on [openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). The full API of this library can be found in [api.md](api.md).
 
-It is generated with [Stainless](https://www.stainlessapi.com/).
+It is generated with [Stainless](https://www.stainless.com/).
 
 ## Installation
 
diff --git a/SECURITY.md b/SECURITY.md
index 6dfa13e..8614b05 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -2,9 +2,9 @@
 
 ## Reporting Security Issues
 
-This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
+This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
 
-To report a security issue, please contact the Stainless team at security@stainlessapi.com.
+To report a security issue, please contact the Stainless team at security@stainless.com.
 
 ## Responsible Disclosure
 

From 59a7cb4439a344c0ed6b4adb9e6b113dbed0f940 Mon Sep 17 00:00:00 2001
From: meorphis <eric@stainless.com>
Date: Fri, 14 Mar 2025 11:05:57 -0400
Subject: [PATCH 10/14] chore(internal): fix workflows

---
 .github/workflows/create-releases.yml | 41 ---------------------------
 .github/workflows/publish-npm.yml     |  8 ++++--
 .github/workflows/release-doctor.yml  |  1 -
 3 files changed, 6 insertions(+), 44 deletions(-)
 delete mode 100644 .github/workflows/create-releases.yml

diff --git a/.github/workflows/create-releases.yml b/.github/workflows/create-releases.yml
deleted file mode 100644
index d820b50..0000000
--- a/.github/workflows/create-releases.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-name: Create releases
-on:
-  schedule:
-    - cron: '0 5 * * *' # every day at 5am UTC
-  push:
-    branches:
-      - main
-
-jobs:
-  release:
-    name: release
-    if: github.ref == 'refs/heads/main' && github.repository == 'openlayer-ai/openlayer-ts'
-    runs-on: ubuntu-latest
-
-    steps:
-      - uses: actions/checkout@v4
-
-      - uses: stainless-api/trigger-release-please@v1
-        id: release
-        with:
-          repo: ${{ github.event.repository.full_name }}
-          stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
-
-      - name: Set up Node
-        if: ${{ steps.release.outputs.releases_created }}
-        uses: actions/setup-node@v3
-        with:
-          node-version: '18'
-
-      - name: Install dependencies
-        if: ${{ steps.release.outputs.releases_created }}
-        run: |
-          yarn install
-
-      - name: Publish to NPM
-        if: ${{ steps.release.outputs.releases_created }}
-        run: |
-          bash ./bin/publish-npm
-        env:
-          NPM_TOKEN: ${{ secrets.OPENLAYER_NPM_TOKEN || secrets.NPM_TOKEN }}
-
diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml
index 405e769..361a64a 100644
--- a/.github/workflows/publish-npm.yml
+++ b/.github/workflows/publish-npm.yml
@@ -1,9 +1,13 @@
-# workflow for re-running publishing to NPM in case it fails for some reason
-# you can run this workflow by navigating to https://www.github.com/openlayer-ai/openlayer-ts/actions/workflows/publish-npm.yml
+# This workflow is triggered when a GitHub release is created.
+# It can also be run manually to re-publish to NPM in case it failed for some reason.
+# You can run this workflow by navigating to https://www.github.com/openlayer-ai/openlayer-ts/actions/workflows/publish-npm.yml
 name: Publish NPM
 on:
   workflow_dispatch:
 
+  release:
+    types: [published]
+
 jobs:
   publish:
     name: publish
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index fe63f8c..f021d93 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -18,6 +18,5 @@ jobs:
         run: |
           bash ./bin/check-release-environment
         env:
-          STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
           NPM_TOKEN: ${{ secrets.OPENLAYER_NPM_TOKEN || secrets.NPM_TOKEN }}
 

From 9ac318013fd2128e7f0a98db699534569c8e18a3 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 20 Mar 2025 05:11:31 +0000
Subject: [PATCH 11/14] chore(exports): cleaner resource index imports (#113)

---
 src/resources.ts | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 src/resources.ts

diff --git a/src/resources.ts b/src/resources.ts
new file mode 100644
index 0000000..b283d57
--- /dev/null
+++ b/src/resources.ts
@@ -0,0 +1 @@
+export * from './resources/index';

From fdcd6e2effcd89201604c545e0c3b8f0f0800032 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 20 Mar 2025 05:12:49 +0000
Subject: [PATCH 12/14] chore(exports): stop using path fallbacks (#114)

---
 package.json | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/package.json b/package.json
index 5c52731..13eefa3 100644
--- a/package.json
+++ b/package.json
@@ -113,17 +113,17 @@
       "default": "./dist/index.mjs"
     },
     "./*.mjs": {
-      "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"],
-      "default": ["./dist/*.mjs", "./dist/*/index.mjs"]
+      "types": "./dist/*.d.ts",
+      "default": "./dist/*.mjs"
     },
     "./*.js": {
-      "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"],
-      "default": ["./dist/*.js", "./dist/*/index.js"]
+      "types": "./dist/*.d.ts",
+      "default": "./dist/*.js"
     },
     "./*": {
-      "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"],
-      "require": ["./dist/*.js", "./dist/*/index.js"],
-      "default": ["./dist/*.mjs", "./dist/*/index.mjs"]
+      "types": "./dist/*.d.ts",
+      "require": "./dist/*.js",
+      "default": "./dist/*.mjs"
     }
   }
 }

From 701091ff829ca7b7f6ee3bf66af961b660eb3371 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 22 Mar 2025 04:38:16 +0000
Subject: [PATCH 13/14] fix: avoid type error in certain environments (#115)

---
 src/core.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core.ts b/src/core.ts
index 241cb76..fbf6d3b 100644
--- a/src/core.ts
+++ b/src/core.ts
@@ -395,7 +395,7 @@ export abstract class APIClient {
       !headers ? {}
       : Symbol.iterator in headers ?
         Object.fromEntries(Array.from(headers as Iterable<string[]>).map((header) => [...header]))
-      : { ...headers }
+      : { ...(headers as any as Record<string, string>) }
     );
   }
 

From 3f243453d9ab9574625e0719057cfb1e20f60f9e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 22 Mar 2025 04:38:36 +0000
Subject: [PATCH 14/14] release: 0.13.0

---
 .release-please-manifest.json |  2 +-
 CHANGELOG.md                  | 32 ++++++++++++++++++++++++++++++++
 package.json                  |  2 +-
 src/version.ts                |  2 +-
 4 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 8032c17..ed21d28 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
 {
-  ".": "0.12.0"
+  ".": "0.13.0"
 }
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b97fbb..db22395 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,37 @@
 # Changelog
 
+## 0.13.0 (2025-03-22)
+
+Full Changelog: [v0.12.0...v0.13.0](https://github.com/openlayer-ai/openlayer-ts/compare/v0.12.0...v0.13.0)
+
+### Features
+
+* **api:** api update ([3345b62](https://github.com/openlayer-ai/openlayer-ts/commit/3345b629c1904bfb2c2f9e05c86312c6c7b88b48))
+* **client:** send `X-Stainless-Timeout` header ([333edef](https://github.com/openlayer-ai/openlayer-ts/commit/333edef002f95acecdb29d3e6a698343c3361937))
+
+
+### Bug Fixes
+
+* avoid type error in certain environments ([#115](https://github.com/openlayer-ai/openlayer-ts/issues/115)) ([701091f](https://github.com/openlayer-ai/openlayer-ts/commit/701091ff829ca7b7f6ee3bf66af961b660eb3371))
+* **client:** fix export map for index exports ([ac3dffc](https://github.com/openlayer-ai/openlayer-ts/commit/ac3dffce4624d350d5cf73e3020067cb2f71ab59))
+
+
+### Chores
+
+* **exports:** cleaner resource index imports ([#113](https://github.com/openlayer-ai/openlayer-ts/issues/113)) ([9ac3180](https://github.com/openlayer-ai/openlayer-ts/commit/9ac318013fd2128e7f0a98db699534569c8e18a3))
+* **exports:** stop using path fallbacks ([#114](https://github.com/openlayer-ai/openlayer-ts/issues/114)) ([fdcd6e2](https://github.com/openlayer-ai/openlayer-ts/commit/fdcd6e2effcd89201604c545e0c3b8f0f0800032))
+* **internal:** codegen related update ([1016df6](https://github.com/openlayer-ai/openlayer-ts/commit/1016df6f549fd3312c26f6ecfd15b3aac58c5d65))
+* **internal:** codegen related update ([ca17307](https://github.com/openlayer-ai/openlayer-ts/commit/ca173073bc522424d9d6a35b5a2af14ccd7b8c88))
+* **internal:** codegen related update ([fd5d0a9](https://github.com/openlayer-ai/openlayer-ts/commit/fd5d0a9808b2abf8d1b88d3becf2350d9b25887e))
+* **internal:** fix devcontainers setup ([6a459de](https://github.com/openlayer-ai/openlayer-ts/commit/6a459de24ebec36ba38b751b6ab7143b3b9e16fd))
+* **internal:** fix workflows ([59a7cb4](https://github.com/openlayer-ai/openlayer-ts/commit/59a7cb4439a344c0ed6b4adb9e6b113dbed0f940))
+* **internal:** version bump ([3a31790](https://github.com/openlayer-ai/openlayer-ts/commit/3a317902d8bf523f3f54398cdb077a11a18d9995))
+
+
+### Documentation
+
+* update URLs from stainlessapi.com to stainless.com ([e56ef04](https://github.com/openlayer-ai/openlayer-ts/commit/e56ef04346aa002b8481a8018ad540c678a9a21e))
+
 ## 0.12.0 (2025-03-14)
 
 Full Changelog: [v0.11.0...v0.12.0](https://github.com/openlayer-ai/openlayer-ts/compare/v0.11.0...v0.12.0)
diff --git a/package.json b/package.json
index 13eefa3..b6df9a9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "openlayer",
-  "version": "0.12.0",
+  "version": "0.13.0",
   "description": "The official TypeScript library for the Openlayer API",
   "author": "Openlayer <support@openlayer.com>",
   "types": "dist/index.d.ts",
diff --git a/src/version.ts b/src/version.ts
index ce6b899..9d013cc 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.12.0'; // x-release-please-version
+export const VERSION = '0.13.0'; // x-release-please-version