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
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/parallel-sdk-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
node-version: '24'

- name: Bootstrap
run: ./scripts/bootstrap
Expand All @@ -37,7 +37,7 @@ jobs:
build:
timeout-minutes: 5
name: build
runs-on: ${{ github.repository == 'stainless-sdks/parallel-sdk-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
permissions:
contents: read
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
node-version: '24'

- name: Bootstrap
run: ./scripts/bootstrap
Expand All @@ -58,7 +58,7 @@ jobs:

- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/parallel-sdk-typescript' &&
github.repository == 'parallel-web/parallel-sdk-typescript-staging' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
Expand All @@ -67,7 +67,7 @@ jobs:

- name: Upload tarball
if: |-
github.repository == 'stainless-sdks/parallel-sdk-typescript' &&
github.repository == 'parallel-web/parallel-sdk-typescript-staging' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
Expand All @@ -77,15 +77,15 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/parallel-sdk-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
node-version: '24'

- name: Bootstrap
run: ./scripts/bootstrap
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/detect-breaking-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: '20'
node-version: '24'
- name: Install dependencies
run: |
yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: '20'
node-version: '24'

- name: Install dependencies
run: |
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 @@
{
".": "1.1.0"
".": "1.2.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 30
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web/parallel-sdk-3001a018c926803bb713f19d99c3d5d39ed44ce3fe670bebefc326fd252b8821.yml
openapi_spec_hash: 0883a98aa5b566818f5910d01c831c4a
config_hash: 8572a2d7a5ede9ade3be8ad4d8aafd7d
configured_endpoints: 33
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web/parallel-sdk-e72f6dcf18ffc713480444feef670bbbe754221e0a68336823642b474c20ec93.yml
openapi_spec_hash: ae8c3c62a78f2413f52c240c2a5d68a8
config_hash: d4f69197dba970d05757624fe3f7b373
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 1.2.0 (2026-08-10)

Full Changelog: [v1.1.0...v1.2.0](https://github.com/parallel-web/parallel-sdk-typescript/compare/v1.1.0...v1.2.0)

### Features

* **api:** add memory support ([f1b25e8](https://github.com/parallel-web/parallel-sdk-typescript/commit/f1b25e80452f3b7783954c8458ef722afaf30138))
* **api:** manual updates ([cb62cb9](https://github.com/parallel-web/parallel-sdk-typescript/commit/cb62cb9593fdefeb891593118177bedbadabf3c9))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([992a6cb](https://github.com/parallel-web/parallel-sdk-typescript/commit/992a6cb9135579ee933cc823ab17f53701827ad2))


### Bug Fixes

* **ci:** bump @arethetypeswrong/cli to ^0.18.0 and run CI workflows on Node 24 ([d0d5961](https://github.com/parallel-web/parallel-sdk-typescript/commit/d0d596109348af8a07a761b7901c65d652bbec6a))
* **client:** send content-type header for requests with an omitted optional body ([c6fe4a8](https://github.com/parallel-web/parallel-sdk-typescript/commit/c6fe4a83c994e6e669223ef4343462c614a32541))
* **stlc:** stop hand-edited CI workflows from blocking seals and builds ([9758e4f](https://github.com/parallel-web/parallel-sdk-typescript/commit/9758e4f90e34d7e4de7144091e992235d674ba66))


### Chores

* **internal:** codegen related update ([7688dc2](https://github.com/parallel-web/parallel-sdk-typescript/commit/7688dc22e69e4ae68652997e359f239f556ba23c))
* **internal:** codegen related update ([4d4d2ac](https://github.com/parallel-web/parallel-sdk-typescript/commit/4d4d2aca26c360cb5af102eb6afa010c1700f32d))

## 1.1.0 (2026-06-08)

Full Changelog: [v1.0.1...v1.1.0](https://github.com/parallel-web/parallel-sdk-typescript/compare/v1.0.1...v1.1.0)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parallel-web",
"version": "1.1.0",
"version": "1.2.0",
"description": "The official TypeScript library for the Parallel API",
"author": "Parallel <support@parallel.ai>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.0",
"@arethetypeswrong/cli": "^0.18.0",
"@swc/core": "^1.3.102",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.4.0",
Expand Down
1 change: 1 addition & 0 deletions scripts/detect-breaking-changes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ TEST_PATHS=(
tests/api-resources/monitor.test.ts
tests/api-resources/beta/beta.test.ts
tests/api-resources/beta/findall.test.ts
tests/api-resources/beta/memory.test.ts
tests/index.test.ts
)

Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/upload-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ UPLOAD_RESPONSE=$(curl -v -X PUT \

if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/parallel-sdk-typescript/$SHA'\033[0m"
echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/parallel-sdk-typescript-staging/$SHA'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
Expand Down
10 changes: 9 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -782,11 +782,19 @@ export class Parallel {
return () => controller.abort();
}

private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
private buildBody({ options }: { options: FinalRequestOptions }): {
bodyHeaders: HeadersLike;
body: BodyInit | undefined;
} {
const { body, headers: rawHeaders } = options;
if (!body) {
// A resource method always passes a `body` key when its operation defines a
// request body, even if the caller omitted an optional body param. Keep the
// content-type for those, and only elide it for operations with no body at
// all (e.g. GET/DELETE).
if (body == null && 'body' in options) {
return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
}
return { bodyHeaders: undefined, body: undefined };
}
const headers = buildHeaders([rawHeaders]);
Expand Down
19 changes: 19 additions & 0 deletions src/resources/beta/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,22 @@ Methods:
- <code title="post /v1beta/findall/ingest">client.beta.findall.<a href="./src/resources/beta/findall.ts">ingest</a>({ ...params }) -> FindAllSchema</code>
- <code title="get /v1beta/findall/runs/{findall_id}/result">client.beta.findall.<a href="./src/resources/beta/findall.ts">result</a>(findallID, { ...params }) -> FindAllRunResult</code>
- <code title="get /v1beta/findall/runs/{findall_id}/schema">client.beta.findall.<a href="./src/resources/beta/findall.ts">schema</a>(findallID, { ...params }) -> FindAllSchema</code>

## Memory

Types:

- <code><a href="./src/resources/beta/memory.ts">FindAllMemoryResult</a></code>
- <code><a href="./src/resources/beta/memory.ts">MemoryClearRequest</a></code>
- <code><a href="./src/resources/beta/memory.ts">MemoryEvictRequest</a></code>
- <code><a href="./src/resources/beta/memory.ts">MemoryRetrieveRequest</a></code>
- <code><a href="./src/resources/beta/memory.ts">MemoryRetrieveResponse</a></code>
- <code><a href="./src/resources/beta/memory.ts">MonitorMemoryEvent</a></code>
- <code><a href="./src/resources/beta/memory.ts">MonitorMemoryResult</a></code>
- <code><a href="./src/resources/beta/memory.ts">TaskMemoryResult</a></code>

Methods:

- <code title="post /v1beta/memory/retrieve">client.beta.memory.<a href="./src/resources/beta/memory.ts">retrieve</a>({ ...params }) -> MemoryRetrieveResponse</code>
- <code title="post /v1beta/memory/clear">client.beta.memory.<a href="./src/resources/beta/memory.ts">clear</a>({ ...params }) -> void</code>
- <code title="post /v1beta/memory/evict">client.beta.memory.<a href="./src/resources/beta/memory.ts">evict</a>({ ...params }) -> void</code>
32 changes: 32 additions & 0 deletions src/resources/beta/beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,29 @@ import {
MatchCondition,
ParallelBeta,
} from './findall';
import * as MemoryAPI from './memory';
import {
FindAllMemoryResult,
Memory,
MemoryClearParams,
MemoryClearRequest,
MemoryEvictParams,
MemoryEvictRequest,
MemoryRetrieveParams,
MemoryRetrieveRequest,
MemoryRetrieveResponse,
MonitorMemoryEvent,
MonitorMemoryResult,
TaskMemoryResult,
} from './memory';

export class Beta extends APIResource {
findall: FindAllAPI.FindAll = new FindAllAPI.FindAll(this._client);
memory: MemoryAPI.Memory = new MemoryAPI.Memory(this._client);
}

Beta.FindAll = FindAll;
Beta.Memory = Memory;

export declare namespace Beta {
export {
Expand Down Expand Up @@ -72,4 +89,19 @@ export declare namespace Beta {
type FindAllResultParams as FindAllResultParams,
type FindAllSchemaParams as FindAllSchemaParams,
};

export {
Memory as Memory,
type FindAllMemoryResult as FindAllMemoryResult,
type MemoryClearRequest as MemoryClearRequest,
type MemoryEvictRequest as MemoryEvictRequest,
type MemoryRetrieveRequest as MemoryRetrieveRequest,
type MemoryRetrieveResponse as MemoryRetrieveResponse,
type MonitorMemoryEvent as MonitorMemoryEvent,
type MonitorMemoryResult as MonitorMemoryResult,
type TaskMemoryResult as TaskMemoryResult,
type MemoryRetrieveParams as MemoryRetrieveParams,
type MemoryClearParams as MemoryClearParams,
type MemoryEvictParams as MemoryEvictParams,
};
}
18 changes: 16 additions & 2 deletions src/resources/beta/findall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,17 @@ export interface FindAllRunInput {
objective: string;

/**
* List of entity names/IDs to exclude from results.
* List of entity names/IDs to exclude from results. At most 10,000 entries are
* allowed.
*/
exclude_list?: Array<FindAllRunInput.ExcludeList> | null;

/**
* User-provided key identifying the memory scope to use. Omit to use personal
* memory, if available.
*/
memory_scope_key?: string | null;

/**
* Metadata for the FindAll run.
*/
Expand Down Expand Up @@ -797,10 +804,17 @@ export interface FindAllCreateParams {
objective: string;

/**
* Body param: List of entity names/IDs to exclude from results.
* Body param: List of entity names/IDs to exclude from results. At most 10,000
* entries are allowed.
*/
exclude_list?: Array<FindAllCreateParams.ExcludeList> | null;

/**
* Body param: User-provided key identifying the memory scope to use. Omit to use
* personal memory, if available.
*/
memory_scope_key?: string | null;

/**
* Body param: Metadata for the FindAll run.
*/
Expand Down
14 changes: 14 additions & 0 deletions src/resources/beta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,17 @@ export {
type FindAllResultParams,
type FindAllSchemaParams,
} from './findall';
export {
Memory,
type FindAllMemoryResult,
type MemoryClearRequest,
type MemoryEvictRequest,
type MemoryRetrieveRequest,
type MemoryRetrieveResponse,
type MonitorMemoryEvent,
type MonitorMemoryResult,
type TaskMemoryResult,
type MemoryRetrieveParams,
type MemoryClearParams,
type MemoryEvictParams,
} from './memory';
Loading
Loading