-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from clear-street/release-please--branches--ma…
…in--changes--next--components--studio-sdk release: 0.1.0-alpha.12
- Loading branch information
Showing
13 changed files
with
238 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.1.0-alpha.10" | ||
".": "0.1.0-alpha.12" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 29 | ||
configured_endpoints: 30 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/clear-street%2Fstudio-sdk-468b5da24bbf73b3a3861d44c5a8051fe6c55a6ec64c5c6f2d45f22c76bf35b2.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@clear-street/studio-sdk", | ||
"version": "0.1.0-alpha.10", | ||
"version": "0.1.0-alpha.12", | ||
"description": "The official TypeScript library for the Studio SDK API", | ||
"author": "Studio SDK <[email protected]>", | ||
"types": "dist/index.d.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import { APIResource } from '../../resource'; | ||
import * as Core from '../../core'; | ||
import * as InventoriesAPI from './inventories'; | ||
|
||
export class Inventories extends APIResource { | ||
/** | ||
* Get located inventory for a symbol. | ||
*/ | ||
retrieve( | ||
accountId: string, | ||
symbol: string, | ||
options?: Core.RequestOptions, | ||
): Core.APIPromise<InventoryRetrieveResponse> { | ||
return this._client.get(`/accounts/${accountId}/inventories/${symbol}`, options); | ||
} | ||
} | ||
|
||
export interface InventoryRetrieveResponse { | ||
/** | ||
* Account ID for the account. | ||
*/ | ||
account_id?: string; | ||
|
||
/** | ||
* String representation of quantity. | ||
*/ | ||
available?: string; | ||
|
||
/** | ||
* String representation of quantity. | ||
*/ | ||
reserved?: string; | ||
|
||
symbol?: string; | ||
|
||
/** | ||
* String representation of quantity. | ||
*/ | ||
used?: string; | ||
} | ||
|
||
export namespace Inventories { | ||
export import InventoryRetrieveResponse = InventoriesAPI.InventoryRetrieveResponse; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const VERSION = '0.1.0-alpha.10'; // x-release-please-version | ||
export const VERSION = '0.1.0-alpha.12'; // x-release-please-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import StudioSDK from '@clear-street/studio-sdk'; | ||
import { Response } from 'node-fetch'; | ||
|
||
const client = new StudioSDK({ | ||
bearerToken: 'My Bearer Token', | ||
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', | ||
}); | ||
|
||
describe('resource inventories', () => { | ||
test('retrieve', async () => { | ||
const responsePromise = client.accounts.inventories.retrieve('x', 'AAPL'); | ||
const rawResponse = await responsePromise.asResponse(); | ||
expect(rawResponse).toBeInstanceOf(Response); | ||
const response = await responsePromise; | ||
expect(response).not.toBeInstanceOf(Response); | ||
const dataAndResponse = await responsePromise.withResponse(); | ||
expect(dataAndResponse.data).toBe(response); | ||
expect(dataAndResponse.response).toBe(rawResponse); | ||
}); | ||
|
||
test('retrieve: request options instead of params are passed correctly', async () => { | ||
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error | ||
await expect( | ||
client.accounts.inventories.retrieve('x', 'AAPL', { path: '/_stainless_unknown_path' }), | ||
).rejects.toThrow(StudioSDK.NotFoundError); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.