@@ -4,43 +4,108 @@ This is the Speakeasy API Client SDK for Typescript. It is generated from our Op
4
4
5
5
This SDK was generated using Speakeasy's SDK Generator. For more information on how to use the generator to generate your own SDKs, please see the [ Speakeasy Client SDK Generator Docs] ( https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks ) .
6
6
7
- ## Installation
7
+ <!-- Start SDK Installation -->
8
+ ## SDK Installation
9
+
10
+ ### NPM
11
+
12
+ ``` bash
13
+ npm add @speakeasy-api/speakeasy-client-sdk-typescript
14
+ ```
15
+
16
+ ### Yarn
8
17
9
18
``` bash
10
- // Coming soon
11
- npm i --save speakeasy-client-sdk-typescript
19
+ yarn add @speakeasy-api/speakeasy-client-sdk-typescript
12
20
```
21
+ <!-- End SDK Installation -->
13
22
14
23
## Example usage
24
+
15
25
``` typescript
16
26
// Replace relative paths below with npm module once it's published
17
27
import {
18
28
SDK ,
19
29
WithSecurity ,
20
- } from " ../../ speakeasy-client-sdk-typescript/src/sdk/sdk " ;
30
+ } from " speakeasy-client-sdk-typescript" ;
21
31
import {
22
32
Security ,
23
33
SchemeApiKey ,
24
- } from " ../../ speakeasy-client-sdk-typescript/src/sdk/models/shared/security " ;
34
+ } from " speakeasy-client-sdk-typescript/src/sdk/models/shared" ;
25
35
import {
26
36
GetApisResponse ,
27
37
GetApisRequest ,
28
38
GetApisQueryParams ,
29
39
GetApisOp ,
30
- } from " ../../ speakeasy-client-sdk-typescript/src/sdk/models/operations" ;
40
+ } from " speakeasy-client-sdk-typescript/src/sdk/models/operations" ;
31
41
import { AxiosError } from " axios" ;
32
42
33
- const serverURL = " https://api.prod.speakeasyapi.dev" ;
34
43
const security: Security = new Security (new SchemeApiKey (" YOUR_API_KEY" )); // Replace with your API key from your Speakeasy Workspace
35
- const sdk: SDK = new SDK (WithSecurity (serverURL , security ));
44
+ const sdk: SDK = new SDK (WithSecurity (security ));
36
45
37
46
const metadata: Map <string , string []> = new Map ([[" label" , [" 1" ]]]);
38
47
const op: GetApisOp = new GetApisOp (true );
39
48
40
49
const request: GetApisRequest = new GetApisRequest (
41
50
new GetApisQueryParams (metadata , op )
42
51
);
43
- sdk .GetApis (request ).then ((res : GetApisResponse | AxiosError ) => {
52
+ sdk .Apis . getApis (request ).then ((res : GetApisResponse | AxiosError ) => {
44
53
console .log (res );
45
54
});
46
55
```
56
+
57
+ <!-- Start SDK Available Operations -->
58
+ ## SDK Available Operations
59
+
60
+ ### ApiEndpoints
61
+
62
+ * ` deleteApiEndpoint ` - Delete an ApiEndpoint.
63
+ * ` findApiEndpoint ` - Find an ApiEndpoint via its displayName.
64
+ * ` generateOpenApiSpecForApiEndpoint ` - Generate an OpenAPI specification for a particular ApiEndpoint.
65
+ * ` generatePostmanCollectionForApiEndpoint ` - Generate a Postman collection for a particular ApiEndpoint.
66
+ * ` getAllApiEndpoints ` - Get all Api endpoints for a particular apiID.
67
+ * ` getAllForVersionApiEndpoints ` - Get all ApiEndpoints for a particular apiID and versionID.
68
+ * ` getApiEndpoint ` - Get an ApiEndpoint.
69
+ * ` upsertApiEndpoint ` - Upsert an ApiEndpoint.
70
+
71
+ ### Apis
72
+
73
+ * ` deleteApi ` - Delete an Api.
74
+ * ` generateOpenApiSpec ` - Generate an OpenAPI specification for a particular Api.
75
+ * ` generatePostmanCollection ` - Generate a Postman collection for a particular Api.
76
+ * ` getAllApiVersions ` - Get all Api versions for a particular ApiEndpoint.
77
+ * ` getApis ` - Get a list of Apis for a given workspace
78
+ * ` upsertApi ` - Upsert an Api
79
+
80
+ ### Embeds
81
+
82
+ * ` getEmbedAccessToken ` - Get an embed access token for the current workspace.
83
+ * ` getValidEmbedAccessTokens ` - Get all valid embed access tokens for the current workspace.
84
+ * ` revokeEmbedAccessToken ` - Revoke an embed access EmbedToken.
85
+
86
+ ### Metadata
87
+
88
+ * ` deleteVersionMetadata ` - Delete metadata for a particular apiID and versionID.
89
+ * ` getVersionMetadata ` - Get all metadata for a particular apiID and versionID.
90
+ * ` insertVersionMetadata ` - Insert metadata for a particular apiID and versionID.
91
+
92
+ ### Requests
93
+
94
+ * ` generateRequestPostmanCollection ` - Generate a Postman collection for a particular request.
95
+ * ` getRequestFromEventLog ` - Get information about a particular request.
96
+ * ` queryEventLog ` - Query the event log to retrieve a list of requests.
97
+
98
+ ### Schemas
99
+
100
+ * ` deleteSchema ` - Delete a particular schema revision for an Api.
101
+ * ` downloadSchema ` - Download the latest schema for a particular apiID.
102
+ * ` downloadSchemaRevision ` - Download a particular schema revision for an Api.
103
+ * ` getSchema ` - Get information about the latest schema.
104
+ * ` getSchemaDiff ` - Get a diff of two schema revisions for an Api.
105
+ * ` getSchemaRevision ` - Get information about a particular schema revision for an Api.
106
+ * ` getSchemas ` - Get information about all schemas associated with a particular apiID.
107
+ * ` registerSchema ` - Register a schema.
108
+
109
+ <!-- End SDK Available Operations -->
110
+
111
+ ### SDK Generated by [ Speakeasy] ( https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks )
0 commit comments