Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0, Speakeay CLI 1.39.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed May 27, 2023
1 parent 72a6909 commit 951c660
Show file tree
Hide file tree
Showing 22 changed files with 1,482 additions and 1,522 deletions.
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,12 @@ Based on:
- OpenAPI Doc 1.0 https://prod.speakeasyapi.dev/v1/apis/Structure/version/1.0.0/schema/download
- Speakeasy CLI 1.37.5 (2.32.2) https://github.com/speakeasy-api/speakeasy
### Releases
- [NPM v0.15.0] https://www.npmjs.com/package/structure-ac/v/0.15.0 - .
- [NPM v0.15.0] https://www.npmjs.com/package/structure-ac/v/0.15.0 - .

## 2023-05-27 00:37:31
### Changes
Based on:
- OpenAPI Doc 1.0 https://prod.speakeasyapi.dev/v1/apis/Structure/version/1.0.0/schema/download
- Speakeasy CLI 1.39.0 (2.32.7) https://github.com/speakeasy-api/speakeasy
### Releases
- [NPM v0.15.1] https://www.npmjs.com/package/structure-ac/v/0.15.1 - .
6 changes: 3 additions & 3 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ configVersion: 1.0.0
management:
docChecksum: e0bf2d205ca94a0d32bd91d6ea558d5b
docVersion: "1.0"
speakeasyVersion: 1.37.5
generationVersion: 2.32.2
speakeasyVersion: 1.39.0
generationVersion: 2.32.7
generation:
sdkClassName: structure
singleTagPerOp: false
telemetryEnabled: false
typescript:
version: 0.15.0
version: 0.15.1
author: structure
maxMethodParams: 0
packageName: structure-ac
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "structure-ac",
"version": "0.15.0",
"version": "0.15.1",
"author": "structure",
"scripts": {
"prepare": "tsc --build"
Expand Down
127 changes: 62 additions & 65 deletions src/sdk/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,79 +10,76 @@ import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
* Accounts
*/
export class Accounts {
_defaultClient: AxiosInstance;
_securityClient: AxiosInstance;
_serverURL: string;
_language: string;
_sdkVersion: string;
_genVersion: string;
_defaultClient: AxiosInstance;
_securityClient: AxiosInstance;
_serverURL: string;
_language: string;
_sdkVersion: string;
_genVersion: string;

constructor(
defaultClient: AxiosInstance,
securityClient: AxiosInstance,
serverURL: string,
language: string,
sdkVersion: string,
genVersion: string
) {
this._defaultClient = defaultClient;
this._securityClient = securityClient;
this._serverURL = serverURL;
this._language = language;
this._sdkVersion = sdkVersion;
this._genVersion = genVersion;
}
constructor(
defaultClient: AxiosInstance,
securityClient: AxiosInstance,
serverURL: string,
language: string,
sdkVersion: string,
genVersion: string
) {
this._defaultClient = defaultClient;
this._securityClient = securityClient;
this._serverURL = serverURL;
this._language = language;
this._sdkVersion = sdkVersion;
this._genVersion = genVersion;
}

/**
* Show current user accounts
*/
async listUsers(
config?: AxiosRequestConfig
): Promise<operations.ListUsersResponse> {
const baseURL: string = this._serverURL;
const url: string = baseURL.replace(/\/$/, "") + "/accounts";
/**
* Show current user accounts
*/
async listUsers(config?: AxiosRequestConfig): Promise<operations.ListUsersResponse> {
const baseURL: string = this._serverURL;
const url: string = baseURL.replace(/\/$/, "") + "/accounts";

const client: AxiosInstance = this._securityClient || this._defaultClient;
const client: AxiosInstance = this._securityClient || this._defaultClient;

const headers = { ...config?.headers };
headers["Accept"] = "*/*";
headers[
"user-agent"
] = `speakeasy-sdk/${this._language} ${this._sdkVersion} ${this._genVersion}`;
const headers = { ...config?.headers };
headers["Accept"] = "*/*";
headers[
"user-agent"
] = `speakeasy-sdk/${this._language} ${this._sdkVersion} ${this._genVersion}`;

const httpRes: AxiosResponse = await client.request({
validateStatus: () => true,
url: url,
method: "get",
headers: headers,
...config,
});
const httpRes: AxiosResponse = await client.request({
validateStatus: () => true,
url: url,
method: "get",
headers: headers,
...config,
});

const contentType: string = httpRes?.headers?.["content-type"] ?? "";
const contentType: string = httpRes?.headers?.["content-type"] ?? "";

if (httpRes?.status == null) {
throw new Error(`status code not found in response: ${httpRes}`);
}
if (httpRes?.status == null) {
throw new Error(`status code not found in response: ${httpRes}`);
}

const res: operations.ListUsersResponse = new operations.ListUsersResponse({
statusCode: httpRes.status,
contentType: contentType,
rawResponse: httpRes,
});
switch (true) {
case httpRes?.status == 200:
if (utils.matchContentType(contentType, `*/*`)) {
const resBody: string = JSON.stringify(httpRes?.data, null, 0);
const out: Uint8Array = new Uint8Array(resBody.length);
for (let i = 0; i < resBody.length; i++)
out[i] = resBody.charCodeAt(i);
res.body = out;
const res: operations.ListUsersResponse = new operations.ListUsersResponse({
statusCode: httpRes.status,
contentType: contentType,
rawResponse: httpRes,
});
switch (true) {
case httpRes?.status == 200:
if (utils.matchContentType(contentType, `*/*`)) {
const resBody: string = JSON.stringify(httpRes?.data, null, 0);
const out: Uint8Array = new Uint8Array(resBody.length);
for (let i = 0; i < resBody.length; i++) out[i] = resBody.charCodeAt(i);
res.body = out;
}
break;
case httpRes?.status == 401:
break;
}
break;
case httpRes?.status == 401:
break;
}

return res;
}
return res;
}
}
Loading

0 comments on commit 951c660

Please sign in to comment.