Skip to content

Commit 64ea127

Browse files
fix: update types for pty control, use int instead of str (#9235)
1 parent 788e18b commit 64ea127

6 files changed

Lines changed: 11 additions & 19 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 119
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-40b78fbce4172c1fdab1559718cc9a7ba6b47402ee0bcb8dbefa582448958384.yml
3-
openapi_spec_hash: 78673375a4e58f7b4cea847ce2686b0e
4-
config_hash: 07d725fff578f22e8cb52e3c588f24c6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-6ec03cfc156036a0758aebc523b469f3007de431312c536c434efe795e1892e7.yml
3+
openapi_spec_hash: 092761a0209e0950cfd8f262a981adb1
4+
config_hash: 06faf3176c48bf2b258730ce50809f0f

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Methods:
250250
Types:
251251

252252
- <code><a href="./src/resources/pty.ts">PtyConnectView</a></code>
253-
- <code><a href="./src/resources/pty.ts">PtyControlParameters</a></code>
253+
- <code><a href="./src/resources/pty.ts">PtyControlParams</a></code>
254254
- <code><a href="./src/resources/pty.ts">PtyControlResultView</a></code>
255255

256256
Methods:

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ import {
154154
Pty,
155155
PtyConnectParams,
156156
PtyConnectView,
157-
PtyControlParameters,
158157
PtyControlParams,
159158
PtyControlResultView,
160159
} from './resources/pty';
@@ -689,10 +688,9 @@ export declare namespace Runloop {
689688
export {
690689
Pty as Pty,
691690
type PtyConnectView as PtyConnectView,
692-
type PtyControlParameters as PtyControlParameters,
691+
type PtyControlParams as PtyControlParams,
693692
type PtyControlResultView as PtyControlResultView,
694693
type PtyConnectParams as PtyConnectParams,
695-
type PtyControlParams as PtyControlParams,
696694
};
697695

698696
export {

src/resources/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,9 @@ export {
175175
export {
176176
Pty,
177177
type PtyConnectView,
178-
type PtyControlParameters,
178+
type PtyControlParams,
179179
type PtyControlResultView,
180180
type PtyConnectParams,
181-
type PtyControlParams,
182181
} from './pty';
183182
export {
184183
RestrictedKeys,

src/resources/pty.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export interface PtyConnectView {
111111
status?: string;
112112
}
113113

114-
export interface PtyControlParameters {
114+
export interface PtyControlParams {
115115
action?: 'resize' | 'signal' | 'close';
116116

117117
cols?: number;
@@ -133,14 +133,14 @@ export interface PtyConnectParams {
133133
* when omitted. Applied only if both cols and rows are provided; otherwise
134134
* ignored.
135135
*/
136-
cols?: string;
136+
cols?: number;
137137

138138
/**
139139
* Optional initial terminal height in character cells (1..=1000). Defaults to 24
140140
* when omitted. Applied only if both cols and rows are provided; otherwise
141141
* ignored.
142142
*/
143-
rows?: string;
143+
rows?: number;
144144
}
145145

146146
export interface PtyControlParams {
@@ -156,9 +156,8 @@ export interface PtyControlParams {
156156
export declare namespace Pty {
157157
export {
158158
type PtyConnectView as PtyConnectView,
159-
type PtyControlParameters as PtyControlParameters,
159+
type PtyControlParams as PtyControlParams,
160160
type PtyControlResultView as PtyControlResultView,
161161
type PtyConnectParams as PtyConnectParams,
162-
type PtyControlParams as PtyControlParams,
163162
};
164163
}

tests/api-resources/pty.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ describe('resource pty', () => {
3030
test('connect: request options and params are passed correctly', async () => {
3131
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
3232
await expect(
33-
client.pty.connect(
34-
'session_name',
35-
{ cols: 'cols', rows: 'rows' },
36-
{ path: '/_stainless_unknown_path' },
37-
),
33+
client.pty.connect('session_name', { cols: 0, rows: 0 }, { path: '/_stainless_unknown_path' }),
3834
).rejects.toThrow(Runloop.NotFoundError);
3935
});
4036

0 commit comments

Comments
 (0)