Skip to content

Commit 5022dfb

Browse files
committed
ci: regenerated with OpenAPI Doc 0.3.0, Speakeasy CLI 1.126.0
1 parent f95c60a commit 5022dfb

File tree

17 files changed

+259
-173
lines changed

17 files changed

+259
-173
lines changed

README.md

Lines changed: 50 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @speakeasy-api/speakeasy-client-sdk-typescript
22

3-
<!-- Start SDK Installation -->
3+
<!-- Start SDK Installation [installation] -->
44
## SDK Installation
55

66
### NPM
@@ -14,19 +14,20 @@ npm add @speakeasy-api/speakeasy-client-sdk-typescript
1414
```bash
1515
yarn add @speakeasy-api/speakeasy-client-sdk-typescript
1616
```
17-
<!-- End SDK Installation -->
17+
<!-- End SDK Installation [installation] -->
1818

19+
<!-- Start SDK Example Usage [usage] -->
1920
## SDK Example Usage
20-
<!-- Start SDK Example Usage -->
21+
2122
### Example
2223

2324
```typescript
2425
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
2526

26-
(async () => {
27+
async function run() {
2728
const sdk = new Speakeasy({
2829
security: {
29-
apiKey: "",
30+
apiKey: "<YOUR_API_KEY_HERE>",
3031
},
3132
});
3233

@@ -42,12 +43,14 @@ import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
4243
if (res.statusCode == 200) {
4344
// handle response
4445
}
45-
})();
46+
}
47+
48+
run();
4649

4750
```
48-
<!-- End SDK Example Usage -->
51+
<!-- End SDK Example Usage [usage] -->
4952

50-
<!-- Start SDK Available Operations -->
53+
<!-- Start Available Resources and Operations [operations] -->
5154
## Available Resources and Operations
5255

5356
### [Speakeasy SDK](docs/sdks/speakeasy/README.md)
@@ -108,29 +111,15 @@ import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
108111
* [getEmbedAccessToken](docs/sdks/embeds/README.md#getembedaccesstoken) - Get an embed access token for the current workspace.
109112
* [getValidEmbedAccessTokens](docs/sdks/embeds/README.md#getvalidembedaccesstokens) - Get all valid embed access tokens for the current workspace.
110113
* [revokeEmbedAccessToken](docs/sdks/embeds/README.md#revokeembedaccesstoken) - Revoke an embed access EmbedToken.
111-
<!-- End SDK Available Operations -->
112-
113-
114-
115-
<!-- Start Dev Containers -->
116-
117-
<!-- End Dev Containers -->
118-
114+
<!-- End Available Resources and Operations [operations] -->
119115

120116

121-
<!-- Start Pagination -->
122-
# Pagination
123117

124-
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
125-
returned response object will have a `next` method that can be called to pull down the next group of results. If the
126-
return value of `next` is `null`, then there are no more pages to be fetched.
127118

128-
Here's an example of one such pagination call:
129-
<!-- End Pagination -->
130119

131120

132121

133-
<!-- Start Error Handling -->
122+
<!-- Start Error Handling [errors] -->
134123
## Error Handling
135124

136125
Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.
@@ -144,29 +133,36 @@ Example
144133
```typescript
145134
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
146135

147-
(async () => {
136+
async function run() {
148137
const sdk = new Speakeasy({
149138
security: {
150-
apiKey: "",
139+
apiKey: "<YOUR_API_KEY_HERE>",
151140
},
152141
});
153142

154143
let res;
155144
try {
156145
res = await sdk.validateApiKey();
157-
} catch (e) {}
146+
} catch (err) {
147+
if (err instanceof errors.SDKError) {
148+
console.error(err); // handle exception
149+
throw err;
150+
}
151+
}
158152

159153
if (res.statusCode == 200) {
160154
// handle response
161155
}
162-
})();
156+
}
157+
158+
run();
163159

164160
```
165-
<!-- End Error Handling -->
161+
<!-- End Error Handling [errors] -->
166162

167163

168164

169-
<!-- Start Server Selection -->
165+
<!-- Start Server Selection [server] -->
170166
## Server Selection
171167

172168
### Select Server by Name
@@ -176,16 +172,17 @@ You can override the default server globally by passing a server name to the `se
176172
| Name | Server | Variables |
177173
| ----- | ------ | --------- |
178174
| `prod` | `https://api.prod.speakeasyapi.dev` | None |
175+
179176
#### Example
180177

181178
```typescript
182179
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
183180

184-
(async () => {
181+
async function run() {
185182
const sdk = new Speakeasy({
186183
server: "prod",
187184
security: {
188-
apiKey: "",
185+
apiKey: "<YOUR_API_KEY_HERE>",
189186
},
190187
});
191188

@@ -194,7 +191,9 @@ import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
194191
if (res.statusCode == 200) {
195192
// handle response
196193
}
197-
})();
194+
}
195+
196+
run();
198197

199198
```
200199

@@ -205,11 +204,11 @@ The default server can also be overridden globally by passing a URL to the `serv
205204
```typescript
206205
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
207206

208-
(async () => {
207+
async function run() {
209208
const sdk = new Speakeasy({
210209
serverURL: "https://api.prod.speakeasyapi.dev",
211210
security: {
212-
apiKey: "",
211+
apiKey: "<YOUR_API_KEY_HERE>",
213212
},
214213
});
215214

@@ -218,35 +217,37 @@ import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
218217
if (res.statusCode == 200) {
219218
// handle response
220219
}
221-
})();
220+
}
221+
222+
run();
222223

223224
```
224-
<!-- End Server Selection -->
225+
<!-- End Server Selection [server] -->
225226

226227

227228

228-
<!-- Start Custom HTTP Client -->
229+
<!-- Start Custom HTTP Client [http-client] -->
229230
## Custom HTTP Client
230231

231-
The Typescript SDK makes API calls using the (axios)[https://axios-http.com/docs/intro] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object.
232+
The Typescript SDK makes API calls using the [axios](https://axios-http.com/docs/intro) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object.
232233

233234
For example, you could specify a header for every request that your sdk makes as follows:
234235

235236
```typescript
236-
from @speakeasy-api/speakeasy-client-sdk-typescript import Speakeasy;
237-
import axios;
237+
import { @speakeasy-api/speakeasy-client-sdk-typescript } from "Speakeasy";
238+
import axios from "axios";
238239

239240
const httpClient = axios.create({
240241
headers: {'x-custom-header': 'someValue'}
241242
})
242243

243244
const sdk = new Speakeasy({defaultClient: httpClient});
244245
```
245-
<!-- End Custom HTTP Client -->
246+
<!-- End Custom HTTP Client [http-client] -->
246247

247248

248249

249-
<!-- Start Authentication -->
250+
<!-- Start Authentication [security] -->
250251
## Authentication
251252

252253
### Per-Client Security Schemes
@@ -261,10 +262,10 @@ You can set the security parameters through the `security` optional parameter wh
261262
```typescript
262263
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
263264

264-
(async () => {
265+
async function run() {
265266
const sdk = new Speakeasy({
266267
security: {
267-
apiKey: "",
268+
apiKey: "<YOUR_API_KEY_HERE>",
268269
},
269270
});
270271

@@ -273,10 +274,12 @@ import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
273274
if (res.statusCode == 200) {
274275
// handle response
275276
}
276-
})();
277+
}
278+
279+
run();
277280

278281
```
279-
<!-- End Authentication -->
282+
<!-- End Authentication [security] -->
280283

281284
<!-- Placeholder for Future Speakeasy SDK Sections -->
282285

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,4 +1066,14 @@ Based on:
10661066
### Generated
10671067
- [typescript v2.1.3] .
10681068
### Releases
1069-
- [NPM v2.1.3] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/2.1.3 - .
1069+
- [NPM v2.1.3] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/2.1.3 - .
1070+
1071+
## 2023-12-12 00:11:33
1072+
### Changes
1073+
Based on:
1074+
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
1075+
- Speakeasy CLI 1.126.0 (2.213.3) https://github.com/speakeasy-api/speakeasy
1076+
### Generated
1077+
- [typescript v2.2.0] .
1078+
### Releases
1079+
- [NPM v2.2.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/2.2.0 - .

USAGE.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<!-- Start SDK Example Usage -->
1+
<!-- Start SDK Example Usage [usage] -->
22
```typescript
33
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
44

5-
(async () => {
5+
async function run() {
66
const sdk = new Speakeasy({
77
security: {
8-
apiKey: "",
8+
apiKey: "<YOUR_API_KEY_HERE>",
99
},
1010
});
1111

@@ -21,7 +21,9 @@ import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
2121
if (res.statusCode == 200) {
2222
// handle response
2323
}
24-
})();
24+
}
25+
26+
run();
2527

2628
```
27-
<!-- End SDK Example Usage -->
29+
<!-- End SDK Example Usage [usage] -->

docs/sdk/models/shared/security.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description | Example |
7-
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
8-
| `apiKey` | *string* | :heavy_check_mark: | N/A | |
6+
| Field | Type | Required | Description |
7+
| ------------------ | ------------------ | ------------------ | ------------------ |
8+
| `apiKey` | *string* | :heavy_check_mark: | N/A |

0 commit comments

Comments
 (0)