Skip to content

Commit 7c398fb

Browse files
feat(api): manual updates (#14)
1 parent 6a04cdb commit 7c398fb

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-4e3ac088751d52ff03184c39a009d093a7457f4e25dc489a938fe25ad5d83d98.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-6860d955bb7b497681b9d1ae03c10c51a458c68f5011efc648ae9d049250d6c7.yml

src/resources/users/pats.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ export class Pats extends APIResource {
1111
* ListPersonalAccessTokens
1212
*/
1313
list(
14-
params: PatListParams | null | undefined = {},
14+
params: PatListParams,
1515
options?: RequestOptions,
1616
): PagePromise<PersonalAccessTokensPersonalAccessTokensPage, PersonalAccessToken> {
17-
const { token, pageSize, ...body } = params ?? {};
17+
const { token, pageSize, ...body } = params;
1818
return this._client.getAPIList(
1919
'/gitpod.v1.UserService/ListPersonalAccessTokens',
2020
PersonalAccessTokensPage<PersonalAccessToken>,

tests/api-resources/users/pats.test.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const client = new Gitpod({
1010
describe('resource pats', () => {
1111
// skipped: tests are disabled for the time being
1212
test.skip('list', async () => {
13-
const responsePromise = client.users.pats.list();
13+
const responsePromise = client.users.pats.list({});
1414
const rawResponse = await responsePromise.asResponse();
1515
expect(rawResponse).toBeInstanceOf(Response);
1616
const response = await responsePromise;
@@ -20,22 +20,6 @@ describe('resource pats', () => {
2020
expect(dataAndResponse.response).toBe(rawResponse);
2121
});
2222

23-
// skipped: tests are disabled for the time being
24-
test.skip('list: request options and params are passed correctly', async () => {
25-
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
26-
await expect(
27-
client.users.pats.list(
28-
{
29-
token: 'token',
30-
pageSize: 0,
31-
filter: { userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] },
32-
pagination: { token: 'token', pageSize: 100 },
33-
},
34-
{ path: '/_stainless_unknown_path' },
35-
),
36-
).rejects.toThrow(Gitpod.NotFoundError);
37-
});
38-
3923
// skipped: tests are disabled for the time being
4024
test.skip('delete', async () => {
4125
const responsePromise = client.users.pats.delete({});

0 commit comments

Comments
 (0)