Skip to content

Commit 688061c

Browse files
committedApr 18, 2024
ci: regenerated with OpenAPI Doc 0.4.0, Speakeasy CLI 1.257.1
1 parent 9cc4123 commit 688061c

14 files changed

+6909
-998
lines changed
 

‎.speakeasy/gen.lock

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 89968bf0-a755-4d50-9acb-d47410010f05
33
management:
4-
docChecksum: fb8d80dde775dc830ade2c3c3fe88d18
4+
docChecksum: 2b280a7f12ab57c144a654766cc34af2
55
docVersion: 0.4.0
6-
speakeasyVersion: 1.253.3
7-
generationVersion: 2.306.3
8-
releaseVersion: 3.2.4
9-
configChecksum: 83833ccb996f879f3990f0e1c6502f52
6+
speakeasyVersion: 1.257.1
7+
generationVersion: 2.308.2
8+
releaseVersion: 3.2.5
9+
configChecksum: 5f977ae0b9fbd2ccda7a4153b63b3788
1010
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-typescript.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-typescript
@@ -93,6 +93,7 @@ generatedFiles:
9393
- src/sdk/models/operations/getrequestfromeventlog.ts
9494
- src/sdk/models/operations/queryeventlog.ts
9595
- src/sdk/models/operations/getorganizations.ts
96+
- src/sdk/models/operations/getchangesreportsignedurl.ts
9697
- src/sdk/models/operations/getlintingreportsignedurl.ts
9798
- src/sdk/models/operations/uploadreport.ts
9899
- src/sdk/models/operations/getembedaccesstoken.ts
@@ -219,6 +220,9 @@ generatedFiles:
219220
- docs/sdk/models/operations/queryeventlogrequest.md
220221
- docs/sdk/models/operations/queryeventlogresponse.md
221222
- docs/sdk/models/operations/getorganizationsresponse.md
223+
- docs/sdk/models/operations/getchangesreportsignedurlrequest.md
224+
- docs/sdk/models/operations/getchangesreportsignedurlsignedaccess.md
225+
- docs/sdk/models/operations/getchangesreportsignedurlresponse.md
222226
- docs/sdk/models/operations/getlintingreportsignedurlrequest.md
223227
- docs/sdk/models/operations/getlintingreportsignedurlsignedaccess.md
224228
- docs/sdk/models/operations/getlintingreportsignedurlresponse.md

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ run();
119119

120120
### [reports](docs/sdks/reports/README.md)
121121

122+
* [getChangesReportSignedUrl](docs/sdks/reports/README.md#getchangesreportsignedurl) - Get the signed access url for the change reports for a particular document.
122123
* [getLintingReportSignedUrl](docs/sdks/reports/README.md#getlintingreportsignedurl) - Get the signed access url for the linting reports for a particular document.
123124
* [uploadReport](docs/sdks/reports/README.md#uploadreport) - Upload a report.
124125

‎RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1366,4 +1366,14 @@ Based on:
13661366
### Generated
13671367
- [typescript v3.2.4] .
13681368
### Releases
1369-
- [NPM v3.2.4] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/3.2.4 - .
1369+
- [NPM v3.2.4] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/3.2.4 - .
1370+
1371+
## 2024-04-18 00:11:33
1372+
### Changes
1373+
Based on:
1374+
- OpenAPI Doc 0.4.0 https://docs.speakeasyapi.dev/openapi.yaml
1375+
- Speakeasy CLI 1.257.1 (2.308.2) https://github.com/speakeasy-api/speakeasy
1376+
### Generated
1377+
- [typescript v3.2.5] .
1378+
### Releases
1379+
- [NPM v3.2.5] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/3.2.5 - .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# GetChangesReportSignedUrlRequest
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
8+
| `documentChecksum` | *string* | :heavy_check_mark: | The checksum of the document to retrieve the signed access url for. |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# GetChangesReportSignedUrlResponse
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
8+
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
9+
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
10+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
11+
| `signedAccess` | [operations.GetChangesReportSignedUrlSignedAccess](../../../sdk/models/operations/getchangesreportsignedurlsignedaccess.md) | :heavy_minus_sign: | OK |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GetChangesReportSignedUrlSignedAccess
2+
3+
OK
4+
5+
6+
## Fields
7+
8+
| Field | Type | Required | Description |
9+
| ------------------ | ------------------ | ------------------ | ------------------ |
10+
| `url` | *string* | :heavy_check_mark: | N/A |

‎docs/sdks/reports/README.md

+47
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,56 @@ REST APIs for managing reports
77

88
### Available Operations
99

10+
* [getChangesReportSignedUrl](#getchangesreportsignedurl) - Get the signed access url for the change reports for a particular document.
1011
* [getLintingReportSignedUrl](#getlintingreportsignedurl) - Get the signed access url for the linting reports for a particular document.
1112
* [uploadReport](#uploadreport) - Upload a report.
1213

14+
## getChangesReportSignedUrl
15+
16+
Get the signed access url for the change reports for a particular document.
17+
18+
### Example Usage
19+
20+
```typescript
21+
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
22+
23+
async function run() {
24+
const sdk = new Speakeasy({
25+
security: {
26+
apiKey: "<YOUR_API_KEY_HERE>",
27+
},
28+
workspaceID: "<value>",
29+
});
30+
31+
const res = await sdk.reports.getChangesReportSignedUrl({
32+
documentChecksum: "<value>",
33+
});
34+
35+
if (res.statusCode == 200) {
36+
// handle response
37+
}
38+
}
39+
40+
run();
41+
```
42+
43+
### Parameters
44+
45+
| Parameter | Type | Required | Description |
46+
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
47+
| `request` | [operations.GetChangesReportSignedUrlRequest](../../sdk/models/operations/getchangesreportsignedurlrequest.md) | :heavy_check_mark: | The request object to use for the request. |
48+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
49+
50+
51+
### Response
52+
53+
**Promise<[operations.GetChangesReportSignedUrlResponse](../../sdk/models/operations/getchangesreportsignedurlresponse.md)>**
54+
### Errors
55+
56+
| Error Object | Status Code | Content Type |
57+
| --------------- | --------------- | --------------- |
58+
| errors.SDKError | 4xx-5xx | */* |
59+
1360
## getLintingReportSignedUrl
1461

1562
Get the signed access url for the linting reports for a particular document.

‎gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ generation:
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
1212
typescript:
13-
version: 3.2.4
13+
version: 3.2.5
1414
author: Speakeasy
1515
clientServerStatusCodesAsErrors: false
1616
flattenGlobalSecurity: false

‎package-lock.json

+6,678-987
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@speakeasy-api/speakeasy-client-sdk-typescript",
3-
"version": "3.2.4",
3+
"version": "3.2.5",
44
"author": "Speakeasy",
55
"scripts": {
66
"prepare": "tsc --build",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
3+
*/
4+
5+
import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils";
6+
import { AxiosResponse } from "axios";
7+
import { Expose } from "class-transformer";
8+
9+
export class GetChangesReportSignedUrlRequest extends SpeakeasyBase {
10+
/**
11+
* The checksum of the document to retrieve the signed access url for.
12+
*/
13+
@SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=documentChecksum" })
14+
documentChecksum: string;
15+
}
16+
17+
/**
18+
* OK
19+
*/
20+
export class GetChangesReportSignedUrlSignedAccess extends SpeakeasyBase {
21+
@SpeakeasyMetadata()
22+
@Expose({ name: "url" })
23+
url: string;
24+
}
25+
26+
export class GetChangesReportSignedUrlResponse extends SpeakeasyBase {
27+
/**
28+
* HTTP response content type for this operation
29+
*/
30+
@SpeakeasyMetadata()
31+
contentType: string;
32+
33+
/**
34+
* HTTP response status code for this operation
35+
*/
36+
@SpeakeasyMetadata()
37+
statusCode: number;
38+
39+
/**
40+
* Raw HTTP response; suitable for custom response parsing
41+
*/
42+
@SpeakeasyMetadata()
43+
rawResponse: AxiosResponse;
44+
45+
/**
46+
* OK
47+
*/
48+
@SpeakeasyMetadata()
49+
signedAccess?: GetChangesReportSignedUrlSignedAccess;
50+
}

‎src/sdk/models/operations/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export * from "./getallforversionapiendpoints";
2121
export * from "./getapiendpoint";
2222
export * from "./getapis";
2323
export * from "./getblob";
24+
export * from "./getchangesreportsignedurl";
2425
export * from "./getembedaccesstoken";
2526
export * from "./getlintingreportsignedurl";
2627
export * from "./getmanifest";

‎src/sdk/reports.ts

+78
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,84 @@ export class Reports {
2020
this.sdkConfiguration = sdkConfig;
2121
}
2222

23+
/**
24+
* Get the signed access url for the change reports for a particular document.
25+
*/
26+
async getChangesReportSignedUrl(
27+
req: operations.GetChangesReportSignedUrlRequest,
28+
config?: AxiosRequestConfig
29+
): Promise<operations.GetChangesReportSignedUrlResponse> {
30+
if (!(req instanceof utils.SpeakeasyBase)) {
31+
req = new operations.GetChangesReportSignedUrlRequest(req);
32+
}
33+
34+
const baseURL: string = utils.templateUrl(
35+
this.sdkConfiguration.serverURL,
36+
this.sdkConfiguration.serverDefaults
37+
);
38+
const operationUrl: string = utils.generateURL(
39+
baseURL,
40+
"/v1/reports/changes/{documentChecksum}",
41+
req,
42+
this.sdkConfiguration.globals
43+
);
44+
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
45+
let globalSecurity = this.sdkConfiguration.security;
46+
if (typeof globalSecurity === "function") {
47+
globalSecurity = await globalSecurity();
48+
}
49+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
50+
globalSecurity = new shared.Security(globalSecurity);
51+
}
52+
const properties = utils.parseSecurityProperties(globalSecurity);
53+
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
54+
headers["Accept"] = "application/json";
55+
56+
headers["user-agent"] = this.sdkConfiguration.userAgent;
57+
58+
const httpRes: AxiosResponse = await client.request({
59+
validateStatus: () => true,
60+
url: operationUrl,
61+
method: "get",
62+
headers: headers,
63+
responseType: "arraybuffer",
64+
...config,
65+
});
66+
67+
const responseContentType: string = httpRes?.headers?.["content-type"] ?? "";
68+
69+
if (httpRes?.status == null) {
70+
throw new Error(`status code not found in response: ${httpRes}`);
71+
}
72+
73+
const res: operations.GetChangesReportSignedUrlResponse =
74+
new operations.GetChangesReportSignedUrlResponse({
75+
statusCode: httpRes.status,
76+
contentType: responseContentType,
77+
rawResponse: httpRes,
78+
});
79+
const decodedRes = new TextDecoder().decode(httpRes?.data);
80+
switch (true) {
81+
case httpRes?.status == 200:
82+
if (utils.matchContentType(responseContentType, `application/json`)) {
83+
res.signedAccess = utils.objectToClass(
84+
JSON.parse(decodedRes),
85+
operations.GetChangesReportSignedUrlSignedAccess
86+
);
87+
} else {
88+
throw new errors.SDKError(
89+
"unknown content-type received: " + responseContentType,
90+
httpRes.status,
91+
decodedRes,
92+
httpRes
93+
);
94+
}
95+
break;
96+
}
97+
98+
return res;
99+
}
100+
23101
/**
24102
* Get the signed access url for the linting reports for a particular document.
25103
*/

‎src/sdk/sdk.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ export class SDKConfiguration {
6767
serverDefaults: any;
6868
language = "typescript";
6969
openapiDocVersion = "0.4.0";
70-
sdkVersion = "3.2.4";
71-
genVersion = "2.306.3";
70+
sdkVersion = "3.2.5";
71+
genVersion = "2.308.2";
7272
userAgent =
73-
"speakeasy-sdk/typescript 3.2.4 2.306.3 0.4.0 @speakeasy-api/speakeasy-client-sdk-typescript";
73+
"speakeasy-sdk/typescript 3.2.5 2.308.2 0.4.0 @speakeasy-api/speakeasy-client-sdk-typescript";
7474
globals: any;
7575
retryConfig?: utils.RetryConfig;
7676
public constructor(init?: Partial<SDKConfiguration>) {

0 commit comments

Comments
 (0)
Please sign in to comment.