Skip to content

Commit 95247f3

Browse files
Merge pull request #387 from OneBusAway/release-please--branches--main--changes--next--components--onebusaway-sdk
release: 1.19.0
2 parents 75e3eb8 + 785a697 commit 95247f3

12 files changed

Lines changed: 114 additions & 55 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.18.0"
2+
".": "1.19.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 30
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit/open-transit-e8511c379642404d73fd2ff068f81d845054108160ccd58343021bbd0b444a37.yml
3-
openapi_spec_hash: b8824d511c16ed314dc7cee996f4fd97
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit/open-transit-da4eecc88401fd486b0b8ac2a7b3f442748713e3128d878c7f3e24ea7f65f31d.yml
3+
openapi_spec_hash: 8df6b1871782bcd2bd8fb1fb2bbc2694
44
config_hash: c28ddf5b7754155603d9fd1c5fcaeeff

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.19.0 (2026-07-11)
4+
5+
Full Changelog: [v1.18.0...v1.19.0](https://github.com/OneBusAway/js-sdk/compare/v1.18.0...v1.19.0)
6+
7+
### Features
8+
9+
* **api:** api update ([5ed9418](https://github.com/OneBusAway/js-sdk/commit/5ed9418307a412c76041ff50de8de84a27f6e5ae))
10+
311
## 1.18.0 (2026-07-09)
412

513
Full Changelog: [v1.17.0...v1.18.0](https://github.com/OneBusAway/js-sdk/compare/v1.17.0...v1.18.0)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "onebusaway-sdk",
3-
"version": "1.18.0",
3+
"version": "1.19.0",
44
"description": "The official TypeScript library for the Onebusaway SDK API",
55
"author": "Onebusaway SDK <info@onebusaway.org>",
66
"types": "dist/index.d.ts",

src/resources/routes-for-location.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../resource';
4+
import { isRequestOptions } from '../core';
45
import * as Core from '../core';
56
import * as Shared from './shared';
67

@@ -9,9 +10,17 @@ export class RoutesForLocation extends APIResource {
910
* routes-for-location
1011
*/
1112
list(
12-
query: RoutesForLocationListParams,
13+
query?: RoutesForLocationListParams,
14+
options?: Core.RequestOptions,
15+
): Core.APIPromise<RoutesForLocationListResponse>;
16+
list(options?: Core.RequestOptions): Core.APIPromise<RoutesForLocationListResponse>;
17+
list(
18+
query: RoutesForLocationListParams | Core.RequestOptions = {},
1319
options?: Core.RequestOptions,
1420
): Core.APIPromise<RoutesForLocationListResponse> {
21+
if (isRequestOptions(query)) {
22+
return this.list({}, query);
23+
}
1524
return this._client.get('/api/where/routes-for-location.json', { query, ...options });
1625
}
1726
}
@@ -57,12 +66,18 @@ export namespace RoutesForLocationListResponse {
5766
}
5867

5968
export interface RoutesForLocationListParams {
60-
lat: number;
61-
62-
lon: number;
69+
/**
70+
* If omitted, defaults to 0.0.
71+
*/
72+
lat?: number;
6373

6474
latSpan?: number;
6575

76+
/**
77+
* If omitted, defaults to 0.0.
78+
*/
79+
lon?: number;
80+
6681
lonSpan?: number;
6782

6883
query?: string;

src/resources/stops-for-location.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../resource';
4+
import { isRequestOptions } from '../core';
45
import * as Core from '../core';
56
import * as Shared from './shared';
67

@@ -9,9 +10,17 @@ export class StopsForLocation extends APIResource {
910
* stops-for-location
1011
*/
1112
list(
12-
query: StopsForLocationListParams,
13+
query?: StopsForLocationListParams,
14+
options?: Core.RequestOptions,
15+
): Core.APIPromise<StopsForLocationListResponse>;
16+
list(options?: Core.RequestOptions): Core.APIPromise<StopsForLocationListResponse>;
17+
list(
18+
query: StopsForLocationListParams | Core.RequestOptions = {},
1319
options?: Core.RequestOptions,
1420
): Core.APIPromise<StopsForLocationListResponse> {
21+
if (isRequestOptions(query)) {
22+
return this.list({}, query);
23+
}
1524
return this._client.get('/api/where/stops-for-location.json', { query, ...options });
1625
}
1726
}
@@ -59,15 +68,21 @@ export namespace StopsForLocationListResponse {
5968
}
6069

6170
export interface StopsForLocationListParams {
62-
lat: number;
63-
64-
lon: number;
71+
/**
72+
* If omitted, defaults to 0.0.
73+
*/
74+
lat?: number;
6575

6676
/**
6777
* An alternative to radius to set the search bounding box (optional)
6878
*/
6979
latSpan?: number;
7080

81+
/**
82+
* If omitted, defaults to 0.0.
83+
*/
84+
lon?: number;
85+
7186
/**
7287
* An alternative to radius to set the search bounding box (optional)
7388
*/

src/resources/trips-for-location.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -265,21 +265,11 @@ export namespace TripsForLocationListResponse {
265265
}
266266

267267
export interface TripsForLocationListParams {
268-
/**
269-
* The latitude coordinate of the search center
270-
*/
271-
lat: number;
272-
273268
/**
274269
* Latitude span of the search bounding box
275270
*/
276271
latSpan: number;
277272

278-
/**
279-
* The longitude coordinate of the search center
280-
*/
281-
lon: number;
282-
283273
/**
284274
* Longitude span of the search bounding box
285275
*/
@@ -297,6 +287,16 @@ export interface TripsForLocationListParams {
297287
*/
298288
includeTrip?: boolean;
299289

290+
/**
291+
* The latitude coordinate of the search center. If omitted, defaults to 0.0.
292+
*/
293+
lat?: number;
294+
295+
/**
296+
* The longitude coordinate of the search center. If omitted, defaults to 0.0.
297+
*/
298+
lon?: number;
299+
300300
/**
301301
* Specific time for the query. Defaults to the current time.
302302
*/

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '1.18.0'; // x-release-please-version
1+
export const VERSION = '1.19.0'; // x-release-please-version

tests/api-resources/routes-for-location.test.ts

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const client = new OnebusawaySDK({
99
});
1010

1111
describe('resource routesForLocation', () => {
12-
test('list: only required params', async () => {
13-
const responsePromise = client.routesForLocation.list({ lat: 0, lon: 0 });
12+
test('list', async () => {
13+
const responsePromise = client.routesForLocation.list();
1414
const rawResponse = await responsePromise.asResponse();
1515
expect(rawResponse).toBeInstanceOf(Response);
1616
const response = await responsePromise;
@@ -20,14 +20,27 @@ describe('resource routesForLocation', () => {
2020
expect(dataAndResponse.response).toBe(rawResponse);
2121
});
2222

23-
test('list: required and optional params', async () => {
24-
const response = await client.routesForLocation.list({
25-
lat: 0,
26-
lon: 0,
27-
latSpan: 0,
28-
lonSpan: 0,
29-
query: 'query',
30-
radius: 0,
31-
});
23+
test('list: request options instead of params are passed correctly', async () => {
24+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
25+
await expect(client.routesForLocation.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
26+
OnebusawaySDK.NotFoundError,
27+
);
28+
});
29+
30+
test('list: request options and params are passed correctly', async () => {
31+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
32+
await expect(
33+
client.routesForLocation.list(
34+
{
35+
lat: 0,
36+
latSpan: 0,
37+
lon: 0,
38+
lonSpan: 0,
39+
query: 'query',
40+
radius: 0,
41+
},
42+
{ path: '/_stainless_unknown_path' },
43+
),
44+
).rejects.toThrow(OnebusawaySDK.NotFoundError);
3245
});
3346
});

0 commit comments

Comments
 (0)