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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.4.0"
".": "3.5.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 35
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/val-town%2Fval-town-3ac7e8a7f7948034bde6b06f57af40cb8f31cc839b310088de0add852d670599.yml
openapi_spec_hash: 6db4f099c0000dfe18b841e31b690dcd
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/val-town%2Fval-town-788eacc57f251c5dc5d02fa7d7baf736fc40f0fdca4516777869f477c1635445.yml
openapi_spec_hash: 346b7e066306b63c3df2b2113b462126
config_hash: b9f0b230ea6da8b27fb8378d87fc23a7
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 3.5.0 (2026-01-15)

Full Changelog: [v3.4.0...v3.5.0](https://github.com/val-town/sdk/compare/v3.4.0...v3.5.0)

### Features

* **api:** api update ([05f2ce6](https://github.com/val-town/sdk/commit/05f2ce6c8a5f510c842e533ee1b982dceca9aa03))


### Chores

* break long lines in snippets into multiline ([20b8bf8](https://github.com/val-town/sdk/commit/20b8bf88e55f3b71d8d6a83351a5ffd9c5061530))
* fix typo in descriptions ([d0649ce](https://github.com/val-town/sdk/commit/d0649ce4d985c35efab447c0ef666b2980fc9abc))
* **internal:** upgrade babel, qs, js-yaml ([ea3a01f](https://github.com/val-town/sdk/commit/ea3a01f83a82db9c2120b8b5e3ac216a5b21af4d))

## 3.4.0 (2026-01-05)

Full Changelog: [v3.3.0...v3.4.0](https://github.com/val-town/sdk/compare/v3.3.0...v3.4.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@valtown/sdk",
"version": "3.4.0",
"version": "3.5.0",
"description": "The official TypeScript library for the Val Town API",
"author": "Val Town <support@val.town>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/emails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Emails extends APIResource {
}

/**
* Successfully sent email
* Email accepted to be sent
*/
export interface EmailSendResponse {
message: string;
Expand Down
27 changes: 16 additions & 11 deletions src/resources/vals/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ export class Files extends APIResource {
* // Automatically fetches more pages as needed.
* for await (const fileRetrieveResponse of client.vals.files.retrieve(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { limit: 1, offset: 0, path: 'path', recursive: true },
* {
* limit: 1,
* offset: 0,
* path: 'path',
* recursive: true,
* },
* )) {
* // ...
* }
Expand Down Expand Up @@ -289,7 +294,7 @@ export declare namespace FileCreateParams {
path: string;

/**
* Body param:
* Body param
*/
type: 'directory';

Expand All @@ -300,7 +305,7 @@ export declare namespace FileCreateParams {
branch_id?: string;

/**
* Body param:
* Body param
*/
content?: null;
}
Expand All @@ -319,7 +324,7 @@ export declare namespace FileCreateParams {
content: string;

/**
* Body param:
* Body param
*/
type: 'file' | 'interval' | 'http' | 'email' | 'script';

Expand Down Expand Up @@ -374,7 +379,7 @@ export interface FileUpdateParams {
content?: string;

/**
* Body param:
* Body param
*/
name?: string;

Expand All @@ -385,7 +390,7 @@ export interface FileUpdateParams {
parent_path?: string | null;

/**
* Body param:
* Body param
*/
type?: 'file' | 'interval' | 'http' | 'email' | 'script';
}
Expand Down Expand Up @@ -426,27 +431,27 @@ export interface FileGetContentParams {
version?: number;

/**
* Header param:
* Header param
*/
'Cache-Control'?: string;

/**
* Header param:
* Header param
*/
'If-Match'?: string;

/**
* Header param:
* Header param
*/
'If-Modified-Since'?: string;

/**
* Header param:
* Header param
*/
'If-None-Match'?: string;

/**
* Header param:
* Header param
*/
'If-Unmodified-Since'?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '3.4.0'; // x-release-please-version
export const VERSION = '3.5.0'; // x-release-please-version
48 changes: 40 additions & 8 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ describe('instantiate client', () => {
error: jest.fn(),
};

const client = new ValTown({ logger: logger, logLevel: 'debug', bearerToken: 'My Bearer Token' });
const client = new ValTown({
logger: logger,
logLevel: 'debug',
bearerToken: 'My Bearer Token',
});

await forceAPIResponseForClient(client);
expect(debugMock).toHaveBeenCalled();
Expand All @@ -107,7 +111,11 @@ describe('instantiate client', () => {
error: jest.fn(),
};

const client = new ValTown({ logger: logger, logLevel: 'info', bearerToken: 'My Bearer Token' });
const client = new ValTown({
logger: logger,
logLevel: 'info',
bearerToken: 'My Bearer Token',
});

await forceAPIResponseForClient(client);
expect(debugMock).not.toHaveBeenCalled();
Expand Down Expand Up @@ -157,7 +165,11 @@ describe('instantiate client', () => {
};

process.env['VAL_TOWN_LOG'] = 'debug';
const client = new ValTown({ logger: logger, logLevel: 'off', bearerToken: 'My Bearer Token' });
const client = new ValTown({
logger: logger,
logLevel: 'off',
bearerToken: 'My Bearer Token',
});

await forceAPIResponseForClient(client);
expect(debugMock).not.toHaveBeenCalled();
Expand All @@ -173,7 +185,11 @@ describe('instantiate client', () => {
};

process.env['VAL_TOWN_LOG'] = 'not a log level';
const client = new ValTown({ logger: logger, logLevel: 'debug', bearerToken: 'My Bearer Token' });
const client = new ValTown({
logger: logger,
logLevel: 'debug',
bearerToken: 'My Bearer Token',
});
expect(client.logLevel).toBe('debug');
expect(warnMock).not.toHaveBeenCalled();
});
Expand Down Expand Up @@ -549,7 +565,11 @@ describe('retries', () => {
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};

const client = new ValTown({ bearerToken: 'My Bearer Token', timeout: 10, fetch: testFetch });
const client = new ValTown({
bearerToken: 'My Bearer Token',
timeout: 10,
fetch: testFetch,
});

expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 });
expect(count).toEqual(2);
Expand Down Expand Up @@ -579,7 +599,11 @@ describe('retries', () => {
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};

const client = new ValTown({ bearerToken: 'My Bearer Token', fetch: testFetch, maxRetries: 4 });
const client = new ValTown({
bearerToken: 'My Bearer Token',
fetch: testFetch,
maxRetries: 4,
});

expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 });

Expand All @@ -603,7 +627,11 @@ describe('retries', () => {
capturedRequest = init;
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
const client = new ValTown({ bearerToken: 'My Bearer Token', fetch: testFetch, maxRetries: 4 });
const client = new ValTown({
bearerToken: 'My Bearer Token',
fetch: testFetch,
maxRetries: 4,
});

expect(
await client.request({
Expand Down Expand Up @@ -665,7 +693,11 @@ describe('retries', () => {
capturedRequest = init;
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
const client = new ValTown({ bearerToken: 'My Bearer Token', fetch: testFetch, maxRetries: 4 });
const client = new ValTown({
bearerToken: 'My Bearer Token',
fetch: testFetch,
maxRetries: 4,
});

expect(
await client.request({
Expand Down
Loading