Skip to content

Commit

Permalink
chore: manual updates
Browse files Browse the repository at this point in the history
Also formatted, linted, and overrode linting errors.
  • Loading branch information
4ydx committed Oct 23, 2023
1 parent 8f05074 commit 62a9620
Show file tree
Hide file tree
Showing 16 changed files with 449 additions and 490 deletions.
431 changes: 191 additions & 240 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"@openapitools/openapi-generator-cli": "^2.7.0",
"@types/debug": "^4.1.10",
"@types/jest": "^29.5.6",
"@types/node": "^18.18.6",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@types/node": "^20.8.7",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"axios-mock-adapter": "^1.22.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"lint-staged": "^15.0.2",
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const pascallize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);
const writeClientSource = (
service: string,
apiClass: ClassDeclaration,
apiMethod: MethodDeclaration
apiMethod: MethodDeclaration,
) => {
const clientClassName = `${pascallize(service)}Client`;
const clientSource =
Expand Down Expand Up @@ -62,7 +62,7 @@ export class ${clientClassName} {
}
}
`.trim(),
{ overwrite: true }
{ overwrite: true },
);
if (!clientSource.getImportDeclaration("./openapi")) {
const namedImports: string[] = ["Configuration"];
Expand All @@ -89,7 +89,7 @@ export class ${clientClassName} {
clientClass
.getConstructors()[0]
.addStatements(
`this.${apiClassProperty} = new ${apiClass.getName()}(configuration)`
`this.${apiClassProperty} = new ${apiClass.getName()}(configuration)`,
);
}

Expand All @@ -114,7 +114,7 @@ const main = () => {
unlinkSync(`./src/generated/${service}/client.ts`);

apiSource = project.addSourceFileAtPath(
`./src/generated/${service}/openapi/api.ts`
`./src/generated/${service}/openapi/api.ts`,
);
for (const apiClass of apiSource.getClasses()) {
for (const apiMethod of apiClass.getMethods()) {
Expand Down
11 changes: 6 additions & 5 deletions src/generated/mobile/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
export { BASE_PATH as MOBILE_BASE_PATH } from "./openapi/base";

class CustomFormData extends FormData {
/* eslint-disable @typescript-eslint/no-explicit-any */
append(key: string, filename: any) {
const stream = createReadStream(filename);
super.append(key, stream, { filename });
Expand Down Expand Up @@ -106,12 +107,12 @@ export class MobileClient {
runTestPlan(
testPlanId: string,
runTestPlanRequest: RunTestPlanRequest,
options?: AxiosRequestConfig
options?: AxiosRequestConfig,
) {
return this.testPlansApi.runTestPlan(
testPlanId,
runTestPlanRequest,
options
options,
);
}

Expand All @@ -129,7 +130,7 @@ export class MobileClient {
describeTestResult(
projectId: string,
id: string,
options?: AxiosRequestConfig
options?: AxiosRequestConfig,
) {
return this.testResultsApi.describeTestResult(projectId, id, options);
}
Expand All @@ -150,14 +151,14 @@ export class MobileClient {
page?: number,
perPage?: number,
testPlanId?: string,
options?: AxiosRequestConfig
options?: AxiosRequestConfig,
) {
return this.testResultsApi.listTestResults(
projectId,
page,
perPage,
testPlanId,
options
options,
);
}
}
Loading

0 comments on commit 62a9620

Please sign in to comment.