diff --git a/CHANGELOG.md b/CHANGELOG.md index f848daf9..4d78d2a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [0.13.0](https://github.com/aspida/openapi2aspida/compare/v0.12.0...v0.13.0) (2020-11-14) + + +### ⚠ BREAKING CHANGES + +* change property without required to strict + +### Features + +* change property without required to strict ([8452b49](https://github.com/aspida/openapi2aspida/commit/8452b49aeb20a6c053990d70df8a9ea269faa84f)) + ## [0.12.0](https://github.com/aspida/openapi2aspida/compare/v0.11.0...v0.12.0) (2020-11-07) diff --git a/README.md b/README.md index c74cc3a7..db40ae6d 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,10 @@

+## Breaking change (2020/11/14) :warning: + +Since openapi2aspida >= `0.13.0` , optional for aspida only if the 'required' property of OpenAPI is set to `false`. + ## Getting Started Compatible with yaml/json of OpenAPI3.0/Swagger2.0 diff --git a/__tests__/index.spec.ts b/__tests__/index.spec.ts index a5b59995..6b82a68b 100644 --- a/__tests__/index.spec.ts +++ b/__tests__/index.spec.ts @@ -1,6 +1,18 @@ import fs from 'fs' import { ConfigFile } from '../src/getConfig' import build from '../src' +import path from 'path' + +function readDirRecursive(dirPath: string): string[] { + return fs + .readdirSync(dirPath, { withFileTypes: true }) + .map(file => + file.isDirectory() + ? readDirRecursive(path.join(dirPath, file.name)) + : [path.join(dirPath, file.name)] + ) + .reduce((acc, x) => acc.concat(x), []) +} describe('cli test', () => { beforeAll(() => fs.mkdirSync('_samples')) @@ -16,9 +28,11 @@ describe('cli test', () => { input: `_${config.input}` })[0] - expect(fs.readFileSync(`_${config.input}/$api.ts`, 'utf8')).toBe( - fs.readFileSync(`${config.input}/$api.ts`, 'utf8').replace(/\r/g, '') - ) + for (const filePath of readDirRecursive(config.input)) { + expect(fs.readFileSync(`_${filePath}`, 'utf8')).toBe( + fs.readFileSync(filePath, 'utf8').replace(/\r/g, '') + ) + } }) ) }) diff --git a/package.json b/package.json index 3d03d5a9..a4270617 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openapi2aspida", - "version": "0.12.0", + "version": "0.13.0", "description": "Convert OpenAPI 3.0 or Swagger 2.0 definitions into aspida", "author": "Solufa ", "license": "MIT", @@ -93,10 +93,10 @@ "devDependencies": { "@types/jest": "^26.0.15", "@types/js-yaml": "^3.12.5", - "@types/minimist": "^1.2.0", - "@typescript-eslint/eslint-plugin": "^4.6.1", - "@typescript-eslint/parser": "^4.6.1", - "eslint": "^7.12.1", + "@types/minimist": "^1.2.1", + "@typescript-eslint/eslint-plugin": "^4.7.0", + "@typescript-eslint/parser": "^4.7.0", + "eslint": "^7.13.0", "eslint-config-prettier": "^6.15.0", "eslint-config-standard": "^16.0.1", "eslint-plugin-import": "^2.22.1", @@ -104,11 +104,11 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.2", + "eslint-plugin-standard": "^4.1.0", "jest": "^26.6.3", "prettier": "^2.1.2", "standard-version": "^9.0.0", - "ts-jest": "^26.4.3", + "ts-jest": "^26.4.4", "typescript": "^4.0.5" } } diff --git a/samples/docs.baikalplatform.com/common/v2.2/common.json b/samples/docs.baikalplatform.com/common/v2.2/common.json new file mode 100644 index 00000000..9d04c647 --- /dev/null +++ b/samples/docs.baikalplatform.com/common/v2.2/common.json @@ -0,0 +1 @@ +{"info":{"description":"Common data for 4th Platform APIs","version":"2.2.1","title":"Common data for 4th Platform APIs","termsOfService":"https://www.telefonica.es/es/","contact":{"name":"4th Platform Team","email":"4pf@tid.es"}},"definitions":{"MoneyAmount":{"type":"object","description":"Money amount","required":["value","currency"],"properties":{"value":{"type":"number","format":"float","multipleOf":0.01,"description":"Amount value"},"currency":{"type":"string","description":"Currency code in which the amount is expressed. ISO 4217"},"tax_included":{"type":"boolean","description":"true if the amount includes government taxes","default":false}}},"Address":{"type":"object","description":"User's address information","required":["formatted"],"properties":{"formatted":{"type":"string","description":"Full address, formatted for display"},"street_address":{"type":"string","description":"Address information"},"postal_code":{"type":"string","description":"Postal code associated to the address"},"locality":{"type":"string","description":"City or locality where the user lives"},"country":{"type":"string","description":"Country name. Format iso3166-1"}}},"IdDocument":{"type":"object","description":"User legal id document information","required":["country","type","value"],"properties":{"country":{"type":"string","description":"Country of issuance of the id_document. Format iso3166-1"},"type":{"type":"string","description":"Type of document (e.g. passport)"},"value":{"type":"string","description":"Id number associated to the id_document"}}},"CommonQuota":{"type":"object","description":"Quota common information","required":["id","name","categories","start_date","max","consumed","remaining"],"properties":{"id":{"type":"string","description":"Unique identifier of this quota.\n This is a unique id, i.e.: it's the instantiation for a user of a mobile/landline/internet plan charactericic, voucher, etc."},"name":{"type":"string","description":"Name of this quota. User Friendly field."},"description":{"type":"string","description":"Description of this quota. User Friendly field."},"categories":{"type":"array","description":"List of categories of a quota","items":{"$ref":"#/definitions/QuotaCategory"}},"start_date":{"type":"string","description":"start UTC time for the application of the quota","format":"date-time"},"end_date":{"type":"string","description":"end UTC time for the application of the quota. Will not appear for quotas that never expire","format":"date-time"},"active":{"type":"boolean","description":"Whether the quota is active or is currently inhibited","default":true},"max":{"type":"number","description":"maximum amount allowed by current quota. -1 is interpreted as there is no limit","format":"decimal"},"consumed":{"type":"number","description":"amount already consumed of current quota by this phone_number (as identified in the request URL)","format":"decimal"},"remaining":{"type":"number","description":"amount remaining of the quota. -1 when quota is unlimited","format":"decimal"},"is_shared":{"type":"boolean","description":"whether this quota is shared with other lines or not","default":false},"tags":{"type":"array","description":"list of freely defined strings that tag the quota based on some criteria","items":{"type":"string"}}}},"QuotaDestination":{"type":"string","description":"Destinations for which the quota applies. Multiples values must be understood as logical OR.\n Possible values are restricted to country values indicated in ISO 3166-1 alfa-2 and a list of enumerated values indicating 'telefonica', 'non-telefonica', 'rural', 'local', 'regional', 'national', 'international', 'mobile', 'landline', 'any'.","pattern":"^(telefonica|non-telefonica|rural|local|regional|national|international|mobile|landline|any|[A-Z]{2})$","default":["national"]},"QuotaCategory":{"type":"string","enum":["general","promotion","voucher","application","pay_per_use"],"default":"general"},"QuotaTimeBand":{"type":"string","description":"Timebands when the quota applies. Multiples values must be understood as logical OR","enum":["day","night","morning","evening","weekends","workdays","all"],"default":["all"]}},"parameters":{"x-correlator":{"in":"header","name":"x-correlator","type":"string","required":false,"description":"Correlation id for the different services"},"ID":{"in":"path","name":"id","type":"string","required":true,"description":"Resource identifier"},"Page":{"name":"page","in":"query","description":"Requested page number for pagination purpose. If not included, page 1 is returned.","required":false,"type":"integer","format":"int32","default":1},"PerPage":{"name":"per_page","in":"query","description":"Number of element per page. If not included, a default number of 100 elements per page are returned.","required":false,"type":"integer","format":"int32","default":100},"QuotaCategories":{"name":"categories","description":"List of wanted categories separated by commas","in":"query","required":false,"type":"array","items":{"type":"string","enum":["general","promotion","voucher","application","pay_per_use"]}}}} \ No newline at end of file diff --git a/samples/docs.baikalplatform.com/errors/v2.0/errors.json b/samples/docs.baikalplatform.com/errors/v2.0/errors.json new file mode 100644 index 00000000..e40580d2 --- /dev/null +++ b/samples/docs.baikalplatform.com/errors/v2.0/errors.json @@ -0,0 +1 @@ +{"info":{"description":"Common errors for 4th Platform APIs","version":"2.0.2","title":"Common errors for 4th Platform APIs","termsOfService":"https://www.telefonica.es/es/","contact":{"name":"4th Platform Team","email":"4pf@tid.es"}},"definitions":{"ModelError":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"A human readable description of what the event represent"}}},"InvalidArgument":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["INVALID_ARGUMENT"],"default":"INVALID_ARGUMENT","description":"Client specified an invalid argument, request body or query param."}}},{"$ref":"#/definitions/ModelError"}]},"Conflict":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["CONFLICT"],"default":"CONFLICT","description":"A specified resource duplicate entry found"}}},{"$ref":"#/definitions/ModelError"}]},"FailedPrecondition":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["FAILED_PRECONDITION"],"default":"FAILED_PRECONDITION","description":"Request cannot be executed in the current system state."}}},{"$ref":"#/definitions/ModelError"}]},"OutOfRange":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["OUT_OF_RANGE"],"default":"OUT_OF_RANGE","description":"Client specified an invalid range"}}},{"$ref":"#/definitions/ModelError"}]},"Unauthenticated":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["UNAUTHENTICATED"],"default":"UNAUTHENTICATED","description":"Request not authenticated due to missing, invalid, or expired credentials."}}},{"$ref":"#/definitions/ModelError"}]},"PermissionDenied":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["PERMISSION_DENIED"],"default":"PERMISSION_DENIED","description":"Client does not have sufficient permissions to perform this action."}}},{"$ref":"#/definitions/ModelError"}]},"NotFound":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["NOT_FOUND"],"default":"NOT_FOUND","description":"The specified resource is not found"}}},{"$ref":"#/definitions/ModelError"}]},"Aborted":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["ABORTED"],"default":"ABORTED","description":"Concurrency conflict."}}},{"$ref":"#/definitions/ModelError"}]},"AlreadyExists":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["ALREADY_EXISTS"],"default":"ALREADY_EXISTS","description":"The resource that a client tried to create already exists."}}},{"$ref":"#/definitions/ModelError"}]},"TooManyRequests":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"default":"TOO_MANY_REQUESTS","description":"Either out of resource quota or reaching rate limiting."}}},{"$ref":"#/definitions/ModelError"}]},"DataLoss":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["DATA_LOSS"],"default":"DATA_LOSS","description":"Unrecoverable data loss or data corruption."}}},{"$ref":"#/definitions/ModelError"}]},"Internal":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["INTERNAL"],"default":"INTERNAL","description":"Unknown server error.Typically a server bug."}}},{"$ref":"#/definitions/ModelError"}]},"BadGateway":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BAD_GATEWAY"],"default":"BAD_GATEWAY","description":"Couldn't reach an upstream internal service."}}},{"$ref":"#/definitions/ModelError"}]},"Unavailable":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["UNAVAILABLE"],"default":"UNAVAILABLE","description":"Request timeout exceeded"}}},{"$ref":"#/definitions/ModelError"}]},"Timeout":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["TIMEOUT"],"default":"TIMEOUT","description":"Request timeout exceeded"}}},{"$ref":"#/definitions/ModelError"}]},"NotImplemented":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["NOT_IMPLEMENTED"],"default":"NOT_IMPLEMENTED","description":"This functionality is not implemented yet"}}},{"$ref":"#/definitions/ModelError"}]},"AuthenticationRequired":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["AUTHENTICATION_REQUIRED"],"default":"AUTHENTICATION_REQUIRED","description":"New authentication is required"}}},{"$ref":"#/definitions/ModelError"}]},"NotFoundAndOutOfRange":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["NOT_FOUND","OUT_OF_RANGE"],"default":"NOT_FOUND","description":"Not found."}}},{"$ref":"#/definitions/ModelError"}]}}} \ No newline at end of file diff --git a/samples/externals.json b/samples/externals.json index 697824cd..d1db21a8 100644 --- a/samples/externals.json +++ b/samples/externals.json @@ -69,7 +69,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -93,7 +93,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -117,7 +117,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -138,7 +138,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" }, "examples": { "response": { @@ -162,7 +162,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -181,7 +181,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -256,7 +256,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -280,7 +280,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -304,7 +304,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -325,7 +325,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" }, "examples": { "response": { @@ -349,7 +349,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -368,7 +368,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -438,7 +438,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -462,7 +462,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -486,7 +486,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -507,7 +507,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" }, "examples": { "response": { @@ -531,7 +531,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -550,7 +550,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -636,7 +636,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -660,7 +660,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -684,7 +684,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -705,7 +705,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -724,7 +724,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -794,7 +794,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -818,7 +818,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -842,7 +842,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -863,7 +863,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" }, "examples": { "response": { @@ -887,7 +887,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -906,7 +906,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -997,7 +997,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -1021,7 +1021,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -1045,7 +1045,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -1066,7 +1066,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -1085,7 +1085,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -1158,7 +1158,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -1182,7 +1182,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -1206,7 +1206,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -1227,7 +1227,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" }, "examples": { "response": { @@ -1251,7 +1251,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -1270,7 +1270,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -1469,7 +1469,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -1493,7 +1493,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -1517,7 +1517,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -1538,7 +1538,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -1557,7 +1557,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -1627,7 +1627,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -1651,7 +1651,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -1675,7 +1675,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -1696,7 +1696,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" }, "examples": { "response": { @@ -1720,7 +1720,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -1739,7 +1739,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -1843,7 +1843,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -1867,7 +1867,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -1891,7 +1891,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -1912,7 +1912,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -1931,7 +1931,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -2004,7 +2004,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -2028,7 +2028,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -2052,7 +2052,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -2073,7 +2073,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists" }, "examples": { "response": { @@ -2097,7 +2097,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -2116,7 +2116,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -2185,7 +2185,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -2209,7 +2209,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -2233,7 +2233,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -2254,7 +2254,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -2273,7 +2273,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -2361,7 +2361,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -2385,7 +2385,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -2409,7 +2409,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -2430,7 +2430,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -2449,7 +2449,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -2540,7 +2540,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument" }, "examples": { "response": { @@ -2564,7 +2564,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied" }, "examples": { "response": { @@ -2588,7 +2588,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound" }, "examples": { "response": { @@ -2609,7 +2609,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal" }, "examples": { "response": { "value": { "code": "INTERNAL", "message": "Server error" } } @@ -2628,7 +2628,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" + "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout" }, "examples": { "response": { @@ -3103,7 +3103,7 @@ "pattern": "^(day|week|month|year|\\d{1,4}-(days|hours))$" }, "amount": { - "$ref": "https://docs.baikalplatform.com/common/v2.2/common.json#/definitions/MoneyAmount" + "$ref": "docs.baikalplatform.com/common/v2.2/common.json#/definitions/MoneyAmount" }, "tax": { "type": "number", diff --git a/samples/externals/@types.ts b/samples/externals/@types.ts index 4b952471..7b39331f 100644 --- a/samples/externals/@types.ts +++ b/samples/externals/@types.ts @@ -63,7 +63,7 @@ export type SubscriptionType = 'prepaid' | 'postpaid' | 'control' export type ProductType = 'mobile' | 'landline' | 'internet' | 'iptv' | 'bundle' | 'device' | 'voucher' | 'value_added_service' | 'bolt-on' | 'dth' export type OfferedProduct = Product & { - sub_products?: OfferedProduct[] + sub_products: OfferedProduct[] } export type SubscribedProduct = Product & { @@ -77,9 +77,9 @@ export type SubscribedProduct = Product & { } export type Quotas = { - data?: DataQuota[] - voice?: VoiceQuota[] - sms?: SmsQuota[] + data: DataQuota[] + voice: VoiceQuota[] + sms: SmsQuota[] } export type CommonQuota = { diff --git a/samples/freee/$api.ts b/samples/freee/$api.ts index 956ab9e9..3e30c0b9 100644 --- a/samples/freee/$api.ts +++ b/samples/freee/$api.ts @@ -152,9 +152,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { $path: () => `${prefix}${prefix1}` } }, - get: (option?: { query?: Methods2['get']['query'], config?: T }) => + get: (option: { query: Methods2['get']['query'], config?: T }) => fetch(prefix, PATH1, GET, option).json(), - $get: (option?: { query?: Methods2['get']['query'], config?: T }) => + $get: (option: { query: Methods2['get']['query'], config?: T }) => fetch(prefix, PATH1, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods2['get']['query'] }) => `${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -164,9 +164,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix2 = `${PATH2}/${val2}` return { - get: (option?: { query?: Methods5['get']['query'], config?: T }) => + get: (option: { query: Methods5['get']['query'], config?: T }) => fetch(prefix, prefix2, GET, option).json(), - $get: (option?: { query?: Methods5['get']['query'], config?: T }) => + $get: (option: { query: Methods5['get']['query'], config?: T }) => fetch(prefix, prefix2, GET, option).json().then(r => r.body), put: (option?: { body?: Methods5['put']['reqBody'], config?: T }) => fetch(prefix, prefix2, PUT, option, 'URLSearchParams').json(), @@ -804,9 +804,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { `${prefix}${PATH35}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, me: { - get: (option?: { query?: Methods53['get']['query'], config?: T }) => + get: (option: { query: Methods53['get']['query'], config?: T }) => fetch(prefix, PATH36, GET, option).json(), - $get: (option?: { query?: Methods53['get']['query'], config?: T }) => + $get: (option: { query: Methods53['get']['query'], config?: T }) => fetch(prefix, PATH36, GET, option).json().then(r => r.body), put: (option?: { body?: Methods53['put']['reqBody'], config?: T }) => fetch(prefix, PATH36, PUT, option, 'URLSearchParams').json(), diff --git a/samples/freee/@types.ts b/samples/freee/@types.ts index d0b6bae4..94e48aaf 100644 --- a/samples/freee/@types.ts +++ b/samples/freee/@types.ts @@ -110,49 +110,49 @@ export type manualJournalUpdateParams = { } export type companyParams = { - name?: string - name_kana?: string - contact_name?: string + name: string + name_kana: string + contact_name: string - address_attributes?: { - zipcode?: string - prefecture_code?: number - street_name1?: string - street_name2?: string + address_attributes: { + zipcode: string + prefecture_code: number + street_name1: string + street_name2: string } - phone1?: string - phone2?: string - fax?: string + phone1: string + phone2: string + fax: string - sales_information_attributes?: { - industry_class?: 'agriculture_forestry_fisheries_ore' | 'construction' | 'manufacturing_processing' | 'it' | 'transportation_logistics' | 'retail_wholesale' | 'finance_insurance' | 'real_estate_rental' | 'profession' | 'design_production' | 'food' | 'leisure_entertainment' | 'lifestyle' | 'education' | 'medical_welfare' | 'other_services' | 'other' - industry_code?: 'agriculture' | 'forestry' | 'fishing_industry' | 'mining' | 'civil_contractors' | 'pavement' | 'carpenter' | 'renovation' | 'electrical_plumbing' | 'grocery' | 'machinery_manufacturing' | 'printing' | 'other_manufacturing' | 'software_development' | 'system_development' | 'survey_analysis' | 'server_management' | 'website_production' | 'online_service_management' | 'online_advertising_agency' | 'online_advertising_planning_production' | 'online_media_management' | 'portal_site_management' | 'other_it_services' | 'transport_delivery' | 'delivery' | 'other_transportation_logistics' | 'other_wholesale' | 'clothing_wholesale_fiber' | 'food_wholesale' | 'entrusted_development_wholesale' | 'online_shop' | 'fashion_grocery_store' | 'food_store' | 'entrusted_store' | 'other_store' | 'financial_instruments_exchange' | 'commodity_futures_investment_advisor' | 'other_financial' | 'brokerage_insurance' | 'other_insurance' | 'real_estate_developer' | 'real_estate_brokerage' | 'rent_coin_parking_management' | 'rental_office_co_working_space' | 'rental_lease' | 'cpa_tax_accountant' | 'law_office' | 'judicial_and_administrative_scrivener' | 'labor_consultant' | 'other_profession' | 'business_consultant' | 'academic_research_development' | 'advertising_agency' | 'advertising_planning_production' | 'design_development' | 'apparel_industry_design' | 'website_design' | 'advertising_planning_design' | 'other_design' | 'restaurants_coffee_shops' | 'sale_of_lunch' | 'bread_confectionery_manufacture_sale' | 'delivery_catering_mobile_catering' | 'hotel_inn' | 'homestay' | 'travel_agency' | 'leisure_sports_facility_management' | 'show_event_management' | 'barber' | 'beauty_salon' | 'spa_sand_bath_sauna' | 'este_ail_salon' | 'bridal_planning_introduce_wedding' | 'memorial_ceremony_funeral' | 'moving' | 'courier_industry' | 'house_maid_cleaning_agency' | 're_tailoring_clothes' | 'training_institute_management' | 'tutoring_school' | 'music_calligraphy_abacus_classroom' | 'english_school' | 'tennis_yoga_judo_school' | 'culture_school' | 'seminar_planning_management' | 'hospital_clinic' | 'dental_clinic' | 'other_medical_services' | 'nursery' | 'nursing_home' | 'rehabilitation_support_services' | 'other_welfare' | 'visit_welfare_service' | 'recruitment_temporary_staffing' | 'life_related_recruitment_temporary_staffing' | 'car_maintenance_car_repair' | 'machinery_equipment_maintenance_repair' | 'cleaning_maintenance_building_management' | 'security' | 'other_services' | 'npo' | 'general_incorporated_association' | 'general_incorporated_foundation' | 'other_association' + sales_information_attributes: { + industry_class: 'agriculture_forestry_fisheries_ore' | 'construction' | 'manufacturing_processing' | 'it' | 'transportation_logistics' | 'retail_wholesale' | 'finance_insurance' | 'real_estate_rental' | 'profession' | 'design_production' | 'food' | 'leisure_entertainment' | 'lifestyle' | 'education' | 'medical_welfare' | 'other_services' | 'other' + industry_code: 'agriculture' | 'forestry' | 'fishing_industry' | 'mining' | 'civil_contractors' | 'pavement' | 'carpenter' | 'renovation' | 'electrical_plumbing' | 'grocery' | 'machinery_manufacturing' | 'printing' | 'other_manufacturing' | 'software_development' | 'system_development' | 'survey_analysis' | 'server_management' | 'website_production' | 'online_service_management' | 'online_advertising_agency' | 'online_advertising_planning_production' | 'online_media_management' | 'portal_site_management' | 'other_it_services' | 'transport_delivery' | 'delivery' | 'other_transportation_logistics' | 'other_wholesale' | 'clothing_wholesale_fiber' | 'food_wholesale' | 'entrusted_development_wholesale' | 'online_shop' | 'fashion_grocery_store' | 'food_store' | 'entrusted_store' | 'other_store' | 'financial_instruments_exchange' | 'commodity_futures_investment_advisor' | 'other_financial' | 'brokerage_insurance' | 'other_insurance' | 'real_estate_developer' | 'real_estate_brokerage' | 'rent_coin_parking_management' | 'rental_office_co_working_space' | 'rental_lease' | 'cpa_tax_accountant' | 'law_office' | 'judicial_and_administrative_scrivener' | 'labor_consultant' | 'other_profession' | 'business_consultant' | 'academic_research_development' | 'advertising_agency' | 'advertising_planning_production' | 'design_development' | 'apparel_industry_design' | 'website_design' | 'advertising_planning_design' | 'other_design' | 'restaurants_coffee_shops' | 'sale_of_lunch' | 'bread_confectionery_manufacture_sale' | 'delivery_catering_mobile_catering' | 'hotel_inn' | 'homestay' | 'travel_agency' | 'leisure_sports_facility_management' | 'show_event_management' | 'barber' | 'beauty_salon' | 'spa_sand_bath_sauna' | 'este_ail_salon' | 'bridal_planning_introduce_wedding' | 'memorial_ceremony_funeral' | 'moving' | 'courier_industry' | 'house_maid_cleaning_agency' | 're_tailoring_clothes' | 'training_institute_management' | 'tutoring_school' | 'music_calligraphy_abacus_classroom' | 'english_school' | 'tennis_yoga_judo_school' | 'culture_school' | 'seminar_planning_management' | 'hospital_clinic' | 'dental_clinic' | 'other_medical_services' | 'nursery' | 'nursing_home' | 'rehabilitation_support_services' | 'other_welfare' | 'visit_welfare_service' | 'recruitment_temporary_staffing' | 'life_related_recruitment_temporary_staffing' | 'car_maintenance_car_repair' | 'machinery_equipment_maintenance_repair' | 'cleaning_maintenance_building_management' | 'security' | 'other_services' | 'npo' | 'general_incorporated_association' | 'general_incorporated_foundation' | 'other_association' } - head_count?: 0 | 1 | 2 | 3 | 13 | 14 | 15 | 18 | 16 | 17 - corporate_number?: string + head_count: 0 | 1 | 2 | 3 | 13 | 14 | 15 | 18 | 16 | 17 + corporate_number: string - fiscal_years_attributes?: { - use_industry_template?: number - indirect_write_off_method?: number - indirect_write_off_method_type?: number - start_date?: string - end_date?: string - accounting_period?: number - depreciation_fraction?: number - return_code?: number - tax_fraction?: number + fiscal_years_attributes: { + use_industry_template: number + indirect_write_off_method: number + indirect_write_off_method_type: number + start_date: string + end_date: string + accounting_period: number + depreciation_fraction: number + return_code: number + tax_fraction: number } - doc_template?: { - invoice_layout?: number - invoice_style?: number - amount_fraction?: number + doc_template: { + invoice_layout: number + invoice_style: number + amount_fraction: number } - txn_number_format?: 'not_used' | 'digits' | 'alnum' - private_settlement?: number + txn_number_format: 'not_used' | 'digits' | 'alnum' + private_settlement: number } export type itemParams = { @@ -206,11 +206,11 @@ export type expenseApplicationCreateParams = { section_id?: number tag_ids?: number[] expense_application_lines: { - transaction_date?: string - description?: string - amount?: number - expense_application_line_template_id?: number - receipt_id?: number + transaction_date: string + description: string + amount: number + expense_application_line_template_id: number + receipt_id: number }[] } @@ -223,12 +223,12 @@ export type expenseApplicationUpdateParams = { section_id?: number tag_ids?: number[] expense_application_lines: { - id?: number - transaction_date?: string - description?: string - amount?: number - expense_application_line_template_id?: number - receipt_id?: number + id: number + transaction_date: string + description: string + amount: number + expense_application_line_template_id: number + receipt_id: number }[] } @@ -248,39 +248,39 @@ export type partnerCreateParams = { transfer_fee_handling_side?: 'payer' | 'payee' address_attributes?: { - zipcode?: string - prefecture_code?: number - street_name1?: string - street_name2?: string + zipcode: string + prefecture_code: number + street_name1: string + street_name2: string } partner_doc_setting_attributes?: { - sending_method?: 'email' | 'posting' | 'email_and_posting' + sending_method: 'email' | 'posting' | 'email_and_posting' } partner_bank_account_attributes?: { - bank_name?: string - bank_name_kana?: string - bank_code?: string - branch_name?: string - branch_kana?: string - branch_code?: string - account_type?: string - account_number?: string - long_account_name?: string - account_name?: string + bank_name: string + bank_name_kana: string + bank_code: string + branch_name: string + branch_kana: string + branch_code: string + account_type: string + account_number: string + long_account_name: string + account_name: string } payment_term_attributes?: { - cutoff_day?: number - additional_months?: number - fixed_day?: number + cutoff_day: number + additional_months: number + fixed_day: number } invoice_payment_term_attributes?: { - cutoff_day?: number - additional_months?: number - fixed_day?: number + cutoff_day: number + additional_months: number + fixed_day: number } } @@ -299,39 +299,39 @@ export type partnerUpdateParams = { transfer_fee_handling_side?: 'payer' | 'payee' address_attributes?: { - zipcode?: string - prefecture_code?: number - street_name1?: string - street_name2?: string + zipcode: string + prefecture_code: number + street_name1: string + street_name2: string } partner_doc_setting_attributes?: { - sending_method?: 'email' | 'posting' | 'email_and_posting' + sending_method: 'email' | 'posting' | 'email_and_posting' } partner_bank_account_attributes?: { - bank_name?: string - bank_name_kana?: string - bank_code?: string - branch_name?: string - branch_kana?: string - branch_code?: string - account_type?: string - account_number?: string - long_account_name?: string - account_name?: string + bank_name: string + bank_name_kana: string + bank_code: string + branch_name: string + branch_kana: string + branch_code: string + account_type: string + account_number: string + long_account_name: string + account_name: string } payment_term_attributes?: { - cutoff_day?: number - additional_months?: number - fixed_day?: number + cutoff_day: number + additional_months: number + fixed_day: number } invoice_payment_term_attributes?: { - cutoff_day?: number - additional_months?: number - fixed_day?: number + cutoff_day: number + additional_months: number + fixed_day: number } } @@ -363,10 +363,10 @@ export type accountItemParams = { accumulated_dep_account_item_name?: string searchable?: number items?: { - id?: number + id: number }[] partners?: { - id?: number + id: number }[] } } @@ -476,9 +476,9 @@ export type trialBsResponse = { adjustment?: 'only' | 'without' created_at?: string balances: { - account_item_id?: number - account_item_name?: string - partners?: { + account_item_id: number + account_item_name: string + partners: { id: number name?: string opening_balance?: number @@ -487,7 +487,7 @@ export type trialBsResponse = { closing_balance?: number composition_ratio?: number }[] - items?: { + items: { id: number name?: string opening_balance?: number @@ -496,17 +496,17 @@ export type trialBsResponse = { closing_balance?: number composition_ratio?: number }[] - account_category_id?: number - account_category_name?: string - total_line?: boolean - hierarchy_level?: number - parent_account_category_id?: number - parent_account_category_name?: string - opening_balance?: number - debit_amount?: number - credit_amount?: number - closing_balance?: number - composition_ratio?: number + account_category_id: number + account_category_name: string + total_line: boolean + hierarchy_level: number + parent_account_category_id: number + parent_account_category_name: string + opening_balance: number + debit_amount: number + credit_amount: number + closing_balance: number + composition_ratio: number }[] } } @@ -528,31 +528,31 @@ export type trialBsTwoYearsResponse = { adjustment?: 'only' | 'without' created_at?: string balances: { - account_item_id?: number - account_item_name?: string - partners?: { + account_item_id: number + account_item_name: string + partners: { id: number name?: string last_year_closing_balance?: number closing_balance?: number year_on_year?: number }[] - items?: { + items: { id: number name?: string last_year_closing_balance?: number closing_balance?: number year_on_year?: number }[] - account_category_id?: number - account_category_name?: string - total_line?: boolean - hierarchy_level?: number - parent_account_category_id?: number - parent_account_category_name?: string - last_year_closing_balance?: number - closing_balance?: number - year_on_year?: number + account_category_id: number + account_category_name: string + total_line: boolean + hierarchy_level: number + parent_account_category_id: number + parent_account_category_name: string + last_year_closing_balance: number + closing_balance: number + year_on_year: number }[] } } @@ -574,9 +574,9 @@ export type trialBsThreeYearsResponse = { adjustment?: 'only' | 'without' created_at?: string balances: { - account_item_id?: number - account_item_name?: string - partners?: { + account_item_id: number + account_item_name: string + partners: { id: number name?: string two_years_before_closing_balance?: number @@ -584,7 +584,7 @@ export type trialBsThreeYearsResponse = { closing_balance?: number year_on_year?: number }[] - items?: { + items: { id: number name?: string two_years_before_closing_balance?: number @@ -592,16 +592,16 @@ export type trialBsThreeYearsResponse = { closing_balance?: number year_on_year?: number }[] - account_category_id?: number - account_category_name?: string - total_line?: boolean - hierarchy_level?: number - parent_account_category_id?: number - parent_account_category_name?: string - two_years_before_closing_balance?: number - last_year_closing_balance?: number - closing_balance?: number - year_on_year?: number + account_category_id: number + account_category_name: string + total_line: boolean + hierarchy_level: number + parent_account_category_id: number + parent_account_category_name: string + two_years_before_closing_balance: number + last_year_closing_balance: number + closing_balance: number + year_on_year: number }[] } } @@ -625,9 +625,9 @@ export type trialPlResponse = { cost_allocation?: 'only' | 'without' created_at?: string balances: { - account_item_id?: number - account_item_name?: string - partners?: { + account_item_id: number + account_item_name: string + partners: { id: number name?: string opening_balance?: number @@ -636,7 +636,7 @@ export type trialPlResponse = { closing_balance?: number composition_ratio?: number }[] - items?: { + items: { id: number name?: string opening_balance?: number @@ -645,7 +645,7 @@ export type trialPlResponse = { closing_balance?: number composition_ratio?: number }[] - sections?: { + sections: { id: number name?: string opening_balance?: number @@ -654,17 +654,17 @@ export type trialPlResponse = { closing_balance?: number composition_ratio?: number }[] - account_category_id?: number - account_category_name?: string - total_line?: boolean - hierarchy_level?: number - parent_account_category_id?: number - parent_account_category_name?: string - opening_balance?: number - debit_amount?: number - credit_amount?: number - closing_balance?: number - composition_ratio?: number + account_category_id: number + account_category_name: string + total_line: boolean + hierarchy_level: number + parent_account_category_id: number + parent_account_category_name: string + opening_balance: number + debit_amount: number + credit_amount: number + closing_balance: number + composition_ratio: number }[] } } @@ -688,38 +688,38 @@ export type trialPlTwoYearsResponse = { cost_allocation?: 'only' | 'without' created_at?: string balances: { - account_item_id?: number - account_item_name?: string - partners?: { + account_item_id: number + account_item_name: string + partners: { id: number name?: string last_year_closing_balance?: number closing_balance?: number year_on_year?: number }[] - items?: { + items: { id: number name?: string last_year_closing_balance?: number closing_balance?: number year_on_year?: number }[] - sections?: { + sections: { id: number name?: string last_year_closing_balance?: number closing_balance?: number year_on_year?: number }[] - account_category_id?: number - account_category_name?: string - total_line?: boolean - hierarchy_level?: number - parent_account_category_id?: number - parent_account_category_name?: string - last_year_closing_balance?: number - closing_balance?: number - year_on_year?: number + account_category_id: number + account_category_name: string + total_line: boolean + hierarchy_level: number + parent_account_category_id: number + parent_account_category_name: string + last_year_closing_balance: number + closing_balance: number + year_on_year: number }[] } } @@ -743,9 +743,9 @@ export type trialPlThreeYearsResponse = { cost_allocation?: 'only' | 'without' created_at?: string balances: { - account_item_id?: number - account_item_name?: string - partners?: { + account_item_id: number + account_item_name: string + partners: { id: number name?: string two_years_before_closing_balance?: number @@ -753,7 +753,7 @@ export type trialPlThreeYearsResponse = { closing_balance?: number year_on_year?: number }[] - items?: { + items: { id: number name?: string two_years_before_closing_balance?: number @@ -761,7 +761,7 @@ export type trialPlThreeYearsResponse = { closing_balance?: number year_on_year?: number }[] - sections?: { + sections: { id: number name?: string two_years_before_closing_balance?: number @@ -769,16 +769,16 @@ export type trialPlThreeYearsResponse = { closing_balance?: number year_on_year?: number }[] - account_category_id?: number - account_category_name?: string - total_line?: boolean - hierarchy_level?: number - parent_account_category_id?: number - parent_account_category_name?: string - two_years_before_closing_balance?: number - last_year_closing_balance?: number - closing_balance?: number - year_on_year?: number + account_category_id: number + account_category_name: string + total_line: boolean + hierarchy_level: number + parent_account_category_id: number + parent_account_category_name: string + two_years_before_closing_balance: number + last_year_closing_balance: number + closing_balance: number + year_on_year: number }[] } } @@ -802,9 +802,9 @@ export type trialPlSectionsResponse = { cost_allocation?: 'only' | 'without' created_at?: string balances: { - account_item_id?: number - account_item_name?: string - sections?: { + account_item_id: number + account_item_name: string + sections: { id: number name?: string closing_balance?: number @@ -819,13 +819,13 @@ export type trialPlSectionsResponse = { closing_balance?: number }[] }[] - account_category_id?: number - account_category_name?: string - total_line?: boolean - hierarchy_level?: number - parent_account_category_id?: number - parent_account_category_name?: string - closing_balance?: number + account_category_id: number + account_category_name: string + total_line: boolean + hierarchy_level: number + parent_account_category_id: number + parent_account_category_name: string + closing_balance: number }[] } } @@ -966,7 +966,7 @@ export type dealResponse = { } export type selectablesIndexResponse = { - account_categories?: { + account_categories: { balance: 'expense' | 'income' org_code: 'personal' | 'corporate' role: string @@ -980,19 +980,19 @@ export type selectablesIndexResponse = { shortcut?: string default_tax?: { - tax_rate_5?: { - id?: number - name?: string + tax_rate_5: { + id: number + name: string } - tax_rate_8?: { - id?: number - name?: string + tax_rate_8: { + id: number + name: string } } }[] }[] - account_groups?: { + account_groups: { id: number name: string account_structure_id: number @@ -1153,18 +1153,18 @@ export type companyResponse = { } export type unauthorizedError = { - message?: string - messages?: string + message: string + messages: string } export type forbiddenError = { - message?: string - messages?: string + message: string + messages: string } export type badRequestError = { - status_code?: number - errors?: { + status_code: number + errors: { messages: Partial type: 'status' | 'validation' | 'error' @@ -1172,8 +1172,8 @@ export type badRequestError = { } export type badRequestNotFoundError = { - status_code?: number - errors?: { + status_code: number + errors: { messages: Partial type: 'status' | 'validation' | 'error' @@ -1192,8 +1192,8 @@ export type tooManyRequestsError = { } export type internalServerError = { - status_code?: number - errors?: { + status_code: number + errors: { messages: Partial type: 'status' | 'validation' | 'error' @@ -1300,7 +1300,7 @@ export type walletableResponse = { walletable_balance?: number meta?: { - up_to_date?: boolean + up_to_date: boolean } } } @@ -1343,15 +1343,15 @@ export type transferResponse = { } export type userParams = { - display_name?: string - first_name?: string - last_name?: string - first_name_kana?: string - last_name_kana?: string + display_name: string + first_name: string + last_name: string + first_name_kana: string + last_name_kana: string } export type userResponse = { - user?: { + user: { id: number email: string display_name?: string @@ -1381,10 +1381,10 @@ export type meResponse = { } export type userCapability = { - read?: boolean - create?: boolean - update?: boolean - destroy?: boolean + read: boolean + create: boolean + update: boolean + destroy: boolean } export type receiptResponse = { @@ -1464,9 +1464,9 @@ export type approvalRequestParams = { approver_id?: number title: string request_items?: { - id?: number - type?: 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' - value?: string + id: number + type: 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' + value: string }[] } @@ -1479,9 +1479,9 @@ export type generalApplicationCreateParams = { draft: boolean parent_id?: number request_items: { - id?: number - type?: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' - value?: string + id: number + type: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' + value: string }[] } @@ -1492,9 +1492,9 @@ export type generalApplicationUpdateParams = { approver_id?: number draft: boolean request_items: { - id?: number - type?: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' - value?: string + id: number + type: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' + value: string }[] } diff --git a/samples/freee/api/$api.ts b/samples/freee/api/$api.ts index 48240fd4..48d3eba2 100644 --- a/samples/freee/api/$api.ts +++ b/samples/freee/api/$api.ts @@ -151,9 +151,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { $path: () => `${prefix}${prefix1}` } }, - get: (option?: { query?: Methods2['get']['query'], config?: T }) => + get: (option: { query: Methods2['get']['query'], config?: T }) => fetch(prefix, PATH1, GET, option).json(), - $get: (option?: { query?: Methods2['get']['query'], config?: T }) => + $get: (option: { query: Methods2['get']['query'], config?: T }) => fetch(prefix, PATH1, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods2['get']['query'] }) => `${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -163,9 +163,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix2 = `${PATH2}/${val2}` return { - get: (option?: { query?: Methods5['get']['query'], config?: T }) => + get: (option: { query: Methods5['get']['query'], config?: T }) => fetch(prefix, prefix2, GET, option).json(), - $get: (option?: { query?: Methods5['get']['query'], config?: T }) => + $get: (option: { query: Methods5['get']['query'], config?: T }) => fetch(prefix, prefix2, GET, option).json().then(r => r.body), put: (option?: { body?: Methods5['put']['reqBody'], config?: T }) => fetch(prefix, prefix2, PUT, option, 'URLSearchParams').json(), @@ -803,9 +803,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { `${prefix}${PATH35}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, me: { - get: (option?: { query?: Methods53['get']['query'], config?: T }) => + get: (option: { query: Methods53['get']['query'], config?: T }) => fetch(prefix, PATH36, GET, option).json(), - $get: (option?: { query?: Methods53['get']['query'], config?: T }) => + $get: (option: { query: Methods53['get']['query'], config?: T }) => fetch(prefix, PATH36, GET, option).json().then(r => r.body), put: (option?: { body?: Methods53['put']['reqBody'], config?: T }) => fetch(prefix, PATH36, PUT, option, 'URLSearchParams').json(), diff --git a/samples/freee/api/1/$api.ts b/samples/freee/api/1/$api.ts index d556f077..91d162f4 100644 --- a/samples/freee/api/1/$api.ts +++ b/samples/freee/api/1/$api.ts @@ -150,9 +150,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { $path: () => `${prefix}${prefix1}` } }, - get: (option?: { query?: Methods2['get']['query'], config?: T }) => + get: (option: { query: Methods2['get']['query'], config?: T }) => fetch(prefix, PATH1, GET, option).json(), - $get: (option?: { query?: Methods2['get']['query'], config?: T }) => + $get: (option: { query: Methods2['get']['query'], config?: T }) => fetch(prefix, PATH1, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods2['get']['query'] }) => `${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -162,9 +162,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix2 = `${PATH2}/${val2}` return { - get: (option?: { query?: Methods5['get']['query'], config?: T }) => + get: (option: { query: Methods5['get']['query'], config?: T }) => fetch(prefix, prefix2, GET, option).json(), - $get: (option?: { query?: Methods5['get']['query'], config?: T }) => + $get: (option: { query: Methods5['get']['query'], config?: T }) => fetch(prefix, prefix2, GET, option).json().then(r => r.body), put: (option?: { body?: Methods5['put']['reqBody'], config?: T }) => fetch(prefix, prefix2, PUT, option, 'URLSearchParams').json(), @@ -802,9 +802,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { `${prefix}${PATH35}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, me: { - get: (option?: { query?: Methods53['get']['query'], config?: T }) => + get: (option: { query: Methods53['get']['query'], config?: T }) => fetch(prefix, PATH36, GET, option).json(), - $get: (option?: { query?: Methods53['get']['query'], config?: T }) => + $get: (option: { query: Methods53['get']['query'], config?: T }) => fetch(prefix, PATH36, GET, option).json().then(r => r.body), put: (option?: { body?: Methods53['put']['reqBody'], config?: T }) => fetch(prefix, PATH36, PUT, option, 'URLSearchParams').json(), diff --git a/samples/freee/api/1/account_items/index.ts b/samples/freee/api/1/account_items/index.ts index 02c013ce..923b9775 100644 --- a/samples/freee/api/1/account_items/index.ts +++ b/samples/freee/api/1/account_items/index.ts @@ -5,7 +5,7 @@ export type Methods = { get: { query: { company_id: number - base_date?: string + base_date: string } status: 200 diff --git a/samples/freee/api/1/banks/$api.ts b/samples/freee/api/1/banks/$api.ts index 76814ca4..28b3938e 100644 --- a/samples/freee/api/1/banks/$api.ts +++ b/samples/freee/api/1/banks/$api.ts @@ -20,9 +20,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { $path: () => `${prefix}${prefix0}` } }, - get: (option?: { query?: Methods0['get']['query'], config?: T }) => + get: (option: { query: Methods0['get']['query'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option?: { query?: Methods0['get']['query'], config?: T }) => + $get: (option: { query: Methods0['get']['query'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods0['get']['query'] }) => `${prefix}${PATH0}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` diff --git a/samples/freee/api/1/banks/index.ts b/samples/freee/api/1/banks/index.ts index 9c9b1c5b..4c37302b 100644 --- a/samples/freee/api/1/banks/index.ts +++ b/samples/freee/api/1/banks/index.ts @@ -3,10 +3,10 @@ import * as Types from '../../../@types' export type Methods = { get: { - query?: { - offset?: number - limit?: number - type?: 'bank' | 'credit_card' | 'wallet' + query: { + offset: number + limit: number + type: 'bank' | 'credit_card' | 'wallet' } status: 200 diff --git a/samples/freee/api/1/companies/$api.ts b/samples/freee/api/1/companies/$api.ts index dc4479cd..5a5e100a 100644 --- a/samples/freee/api/1/companies/$api.ts +++ b/samples/freee/api/1/companies/$api.ts @@ -14,9 +14,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix0 = `${PATH0}/${val0}` return { - get: (option?: { query?: Methods1['get']['query'], config?: T }) => + get: (option: { query: Methods1['get']['query'], config?: T }) => fetch(prefix, prefix0, GET, option).json(), - $get: (option?: { query?: Methods1['get']['query'], config?: T }) => + $get: (option: { query: Methods1['get']['query'], config?: T }) => fetch(prefix, prefix0, GET, option).json().then(r => r.body), put: (option?: { body?: Methods1['put']['reqBody'], config?: T }) => fetch(prefix, prefix0, PUT, option, 'URLSearchParams').json(), diff --git a/samples/freee/api/1/companies/_id@number/index.ts b/samples/freee/api/1/companies/_id@number/index.ts index 5aa03019..88cb0b61 100644 --- a/samples/freee/api/1/companies/_id@number/index.ts +++ b/samples/freee/api/1/companies/_id@number/index.ts @@ -3,15 +3,15 @@ import * as Types from '../../../../@types' export type Methods = { get: { - query?: { - details?: true - account_items?: true - taxes?: true - items?: true - partners?: true - sections?: true - tags?: true - walletables?: true + query: { + details: true + account_items: true + taxes: true + items: true + partners: true + sections: true + tags: true + walletables: true } status: 200 diff --git a/samples/freee/api/1/deals/_id@number/index.ts b/samples/freee/api/1/deals/_id@number/index.ts index 84733c19..f0718dd1 100644 --- a/samples/freee/api/1/deals/_id@number/index.ts +++ b/samples/freee/api/1/deals/_id@number/index.ts @@ -5,7 +5,7 @@ export type Methods = { get: { query: { company_id: number - accruals?: 'without' | 'with' + accruals: 'without' | 'with' } status: 200 diff --git a/samples/freee/api/1/deals/index.ts b/samples/freee/api/1/deals/index.ts index 69410421..9f86383d 100644 --- a/samples/freee/api/1/deals/index.ts +++ b/samples/freee/api/1/deals/index.ts @@ -5,21 +5,21 @@ export type Methods = { get: { query: { company_id: number - partner_id?: number - account_item_id?: number - partner_code?: string - status?: 'unsettled' | 'settled' - type?: 'income' | 'expense' - start_issue_date?: string - end_issue_date?: string - start_due_date?: string - end_due_date?: string - start_renew_date?: string - end_renew_date?: string - offset?: number - limit?: number - registered_from?: 'me' - accruals?: 'without' | 'with' + partner_id: number + account_item_id: number + partner_code: string + status: 'unsettled' | 'settled' + type: 'income' | 'expense' + start_issue_date: string + end_issue_date: string + start_due_date: string + end_due_date: string + start_renew_date: string + end_renew_date: string + offset: number + limit: number + registered_from: 'me' + accruals: 'without' | 'with' } status: 200 diff --git a/samples/freee/api/1/expense_application_line_templates/index.ts b/samples/freee/api/1/expense_application_line_templates/index.ts index 7204553a..f031aff5 100644 --- a/samples/freee/api/1/expense_application_line_templates/index.ts +++ b/samples/freee/api/1/expense_application_line_templates/index.ts @@ -5,8 +5,8 @@ export type Methods = { get: { query: { company_id: number - offset?: number - limit?: number + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/expense_applications/index.ts b/samples/freee/api/1/expense_applications/index.ts index 608c85fd..3edd0925 100644 --- a/samples/freee/api/1/expense_applications/index.ts +++ b/samples/freee/api/1/expense_applications/index.ts @@ -5,8 +5,8 @@ export type Methods = { get: { query: { company_id: number - offset?: number - limit?: number + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/forms/selectables/index.ts b/samples/freee/api/1/forms/selectables/index.ts index 02a4be96..fc54f240 100644 --- a/samples/freee/api/1/forms/selectables/index.ts +++ b/samples/freee/api/1/forms/selectables/index.ts @@ -5,7 +5,7 @@ export type Methods = { get: { query: { company_id: number - includes?: 'account_item' + includes: 'account_item' } status: 200 diff --git a/samples/freee/api/1/invoices/index.ts b/samples/freee/api/1/invoices/index.ts index e3bdfdf6..b2b225c7 100644 --- a/samples/freee/api/1/invoices/index.ts +++ b/samples/freee/api/1/invoices/index.ts @@ -5,18 +5,18 @@ export type Methods = { get: { query: { company_id: number - partner_id?: number - partner_code?: string - issue_date_start?: string - issue_date_end?: string - due_date_start?: string - due_date_end?: string - invoice_number?: string - description?: string - invoice_status?: 'draft' | 'applying' | 'remanded' | 'rejected' | 'approved' | 'issued' | 'unsubmitted' - payment_status?: 'unsettled' | 'settled' - offset?: number - limit?: number + partner_id: number + partner_code: string + issue_date_start: string + issue_date_end: string + due_date_start: string + due_date_end: string + invoice_number: string + description: string + invoice_status: 'draft' | 'applying' | 'remanded' | 'rejected' | 'approved' | 'issued' | 'unsubmitted' + payment_status: 'unsettled' | 'settled' + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/journals/index.ts b/samples/freee/api/1/journals/index.ts index 854dc9f4..6d34d0cd 100644 --- a/samples/freee/api/1/journals/index.ts +++ b/samples/freee/api/1/journals/index.ts @@ -6,9 +6,9 @@ export type Methods = { query: { download_type: 'csv' | 'pdf' | 'yayoi' | 'generic' company_id: number - visible_tags?: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[] - start_date?: string - end_date?: string + visible_tags: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[] + start_date: string + end_date: string } status: 202 diff --git a/samples/freee/api/1/journals/reports/_id@number/status/index.ts b/samples/freee/api/1/journals/reports/_id@number/status/index.ts index 930ab013..db4da89a 100644 --- a/samples/freee/api/1/journals/reports/_id@number/status/index.ts +++ b/samples/freee/api/1/journals/reports/_id@number/status/index.ts @@ -5,9 +5,9 @@ export type Methods = { get: { query: { company_id: number - visible_tags?: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[] - start_date?: string - end_date?: string + visible_tags: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[] + start_date: string + end_date: string } status: 200 diff --git a/samples/freee/api/1/manual_journals/index.ts b/samples/freee/api/1/manual_journals/index.ts index 3053288b..2c5f6e4a 100644 --- a/samples/freee/api/1/manual_journals/index.ts +++ b/samples/freee/api/1/manual_journals/index.ts @@ -5,25 +5,25 @@ export type Methods = { get: { query: { company_id: number - start_issue_date?: string - end_issue_date?: string - entry_side?: 'credit' | 'debit' - account_item_id?: number - min_amount?: number - max_amount?: number - partner_id?: number - partner_code?: string - item_id?: number - section_id?: number - segment_1_tag_id?: number - segment_2_tag_id?: number - segment_3_tag_id?: number - comment_status?: 'posted_with_mention' | 'raised_with_mention' | 'resolved_with_mention' | 'posted' | 'raised' | 'resolved' | 'none' - comment_important?: boolean - adjustment?: 'only' | 'without' - txn_number?: string - offset?: number - limit?: number + start_issue_date: string + end_issue_date: string + entry_side: 'credit' | 'debit' + account_item_id: number + min_amount: number + max_amount: number + partner_id: number + partner_code: string + item_id: number + section_id: number + segment_1_tag_id: number + segment_2_tag_id: number + segment_3_tag_id: number + comment_status: 'posted_with_mention' | 'raised_with_mention' | 'resolved_with_mention' | 'posted' | 'raised' | 'resolved' | 'none' + comment_important: boolean + adjustment: 'only' | 'without' + txn_number: string + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/partners/index.ts b/samples/freee/api/1/partners/index.ts index 4b596930..b4628f1d 100644 --- a/samples/freee/api/1/partners/index.ts +++ b/samples/freee/api/1/partners/index.ts @@ -5,9 +5,9 @@ export type Methods = { get: { query: { company_id: number - offset?: number - limit?: number - keyword?: string + offset: number + limit: number + keyword: string } status: 200 diff --git a/samples/freee/api/1/quotations/index.ts b/samples/freee/api/1/quotations/index.ts index fe46a97e..2c39140b 100644 --- a/samples/freee/api/1/quotations/index.ts +++ b/samples/freee/api/1/quotations/index.ts @@ -5,15 +5,15 @@ export type Methods = { get: { query: { company_id: number - partner_id?: number - partner_code?: string - start_issue_date?: string - end_issue_date?: string - quotation_number?: string - description?: string - quotation_status?: 'all' | 'unsubmitted' | 'submitted' - offset?: number - limit?: number + partner_id: number + partner_code: string + start_issue_date: string + end_issue_date: string + quotation_number: string + description: string + quotation_status: 'all' | 'unsubmitted' | 'submitted' + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/receipts/index.ts b/samples/freee/api/1/receipts/index.ts index 0fa7ad17..de40a3e0 100644 --- a/samples/freee/api/1/receipts/index.ts +++ b/samples/freee/api/1/receipts/index.ts @@ -7,13 +7,13 @@ export type Methods = { company_id: number start_date: string end_date: string - user_name?: string - number?: number - comment_type?: 'posted' | 'raised' | 'resolved' - comment_important?: boolean - category?: 'all' | 'without_deal' | 'with_expense_application_line' | 'with_deal' | 'ignored' - offset?: number - limit?: number + user_name: string + number: number + comment_type: 'posted' | 'raised' | 'resolved' + comment_important: boolean + category: 'all' | 'without_deal' | 'with_expense_application_line' | 'with_deal' | 'ignored' + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/reports/trial_bs/index.ts b/samples/freee/api/1/reports/trial_bs/index.ts index b6163b8f..6d1b898c 100644 --- a/samples/freee/api/1/reports/trial_bs/index.ts +++ b/samples/freee/api/1/reports/trial_bs/index.ts @@ -5,17 +5,17 @@ export type Methods = { get: { query: { company_id: number - fiscal_year?: number - start_month?: number - end_month?: number - start_date?: string - end_date?: string - account_item_display_type?: 'account_item' | 'group' - breakdown_display_type?: 'partner' | 'item' | 'account_item' - partner_id?: number - partner_code?: string - item_id?: number - adjustment?: 'only' | 'without' + fiscal_year: number + start_month: number + end_month: number + start_date: string + end_date: string + account_item_display_type: 'account_item' | 'group' + breakdown_display_type: 'partner' | 'item' | 'account_item' + partner_id: number + partner_code: string + item_id: number + adjustment: 'only' | 'without' } status: 200 diff --git a/samples/freee/api/1/reports/trial_bs_three_years/index.ts b/samples/freee/api/1/reports/trial_bs_three_years/index.ts index 6f3f886c..1f2e6f02 100644 --- a/samples/freee/api/1/reports/trial_bs_three_years/index.ts +++ b/samples/freee/api/1/reports/trial_bs_three_years/index.ts @@ -5,17 +5,17 @@ export type Methods = { get: { query: { company_id: number - fiscal_year?: number - start_month?: number - end_month?: number - start_date?: string - end_date?: string - account_item_display_type?: 'account_item' | 'group' - breakdown_display_type?: 'partner' | 'item' | 'account_item' - partner_id?: number - partner_code?: string - item_id?: number - adjustment?: 'only' | 'without' + fiscal_year: number + start_month: number + end_month: number + start_date: string + end_date: string + account_item_display_type: 'account_item' | 'group' + breakdown_display_type: 'partner' | 'item' | 'account_item' + partner_id: number + partner_code: string + item_id: number + adjustment: 'only' | 'without' } status: 200 diff --git a/samples/freee/api/1/reports/trial_bs_two_years/index.ts b/samples/freee/api/1/reports/trial_bs_two_years/index.ts index 8fe3401f..02c302d8 100644 --- a/samples/freee/api/1/reports/trial_bs_two_years/index.ts +++ b/samples/freee/api/1/reports/trial_bs_two_years/index.ts @@ -5,17 +5,17 @@ export type Methods = { get: { query: { company_id: number - fiscal_year?: number - start_month?: number - end_month?: number - start_date?: string - end_date?: string - account_item_display_type?: 'account_item' | 'group' - breakdown_display_type?: 'partner' | 'item' | 'account_item' - partner_id?: number - partner_code?: string - item_id?: number - adjustment?: 'only' | 'without' + fiscal_year: number + start_month: number + end_month: number + start_date: string + end_date: string + account_item_display_type: 'account_item' | 'group' + breakdown_display_type: 'partner' | 'item' | 'account_item' + partner_id: number + partner_code: string + item_id: number + adjustment: 'only' | 'without' } status: 200 diff --git a/samples/freee/api/1/reports/trial_pl/index.ts b/samples/freee/api/1/reports/trial_pl/index.ts index 183b6eac..c72cdc3d 100644 --- a/samples/freee/api/1/reports/trial_pl/index.ts +++ b/samples/freee/api/1/reports/trial_pl/index.ts @@ -5,19 +5,19 @@ export type Methods = { get: { query: { company_id: number - fiscal_year?: number - start_month?: number - end_month?: number - start_date?: string - end_date?: string - account_item_display_type?: 'account_item' | 'group' - breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item' - partner_id?: number - partner_code?: string - item_id?: number - section_id?: number - adjustment?: 'only' | 'without' - cost_allocation?: 'only' | 'not_include' + fiscal_year: number + start_month: number + end_month: number + start_date: string + end_date: string + account_item_display_type: 'account_item' | 'group' + breakdown_display_type: 'partner' | 'item' | 'section' | 'account_item' + partner_id: number + partner_code: string + item_id: number + section_id: number + adjustment: 'only' | 'without' + cost_allocation: 'only' | 'not_include' } status: 200 diff --git a/samples/freee/api/1/reports/trial_pl_sections/index.ts b/samples/freee/api/1/reports/trial_pl_sections/index.ts index a66dc1e8..eb984568 100644 --- a/samples/freee/api/1/reports/trial_pl_sections/index.ts +++ b/samples/freee/api/1/reports/trial_pl_sections/index.ts @@ -6,18 +6,18 @@ export type Methods = { query: { company_id: number section_ids: string - fiscal_year?: number - start_month?: number - end_month?: number - start_date?: string - end_date?: string - account_item_display_type?: 'account_item' | 'group' - breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item' - partner_id?: number - partner_code?: string - item_id?: number - adjustment?: 'only' | 'without' - cost_allocation?: 'only' | 'not_include' + fiscal_year: number + start_month: number + end_month: number + start_date: string + end_date: string + account_item_display_type: 'account_item' | 'group' + breakdown_display_type: 'partner' | 'item' | 'section' | 'account_item' + partner_id: number + partner_code: string + item_id: number + adjustment: 'only' | 'without' + cost_allocation: 'only' | 'not_include' } status: 200 diff --git a/samples/freee/api/1/reports/trial_pl_three_years/index.ts b/samples/freee/api/1/reports/trial_pl_three_years/index.ts index 874ae9ea..ec2fc52c 100644 --- a/samples/freee/api/1/reports/trial_pl_three_years/index.ts +++ b/samples/freee/api/1/reports/trial_pl_three_years/index.ts @@ -5,19 +5,19 @@ export type Methods = { get: { query: { company_id: number - fiscal_year?: number - start_month?: number - end_month?: number - start_date?: string - end_date?: string - account_item_display_type?: 'account_item' | 'group' - breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item' - partner_id?: number - partner_code?: string - item_id?: number - section_id?: number - adjustment?: 'only' | 'without' - cost_allocation?: 'only' | 'not_include' + fiscal_year: number + start_month: number + end_month: number + start_date: string + end_date: string + account_item_display_type: 'account_item' | 'group' + breakdown_display_type: 'partner' | 'item' | 'section' | 'account_item' + partner_id: number + partner_code: string + item_id: number + section_id: number + adjustment: 'only' | 'without' + cost_allocation: 'only' | 'not_include' } status: 200 diff --git a/samples/freee/api/1/reports/trial_pl_two_years/index.ts b/samples/freee/api/1/reports/trial_pl_two_years/index.ts index 56917cc3..55c9d6f6 100644 --- a/samples/freee/api/1/reports/trial_pl_two_years/index.ts +++ b/samples/freee/api/1/reports/trial_pl_two_years/index.ts @@ -5,19 +5,19 @@ export type Methods = { get: { query: { company_id: number - fiscal_year?: number - start_month?: number - end_month?: number - start_date?: string - end_date?: string - account_item_display_type?: 'account_item' | 'group' - breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item' - partner_id?: number - partner_code?: string - item_id?: number - section_id?: number - adjustment?: 'only' | 'without' - cost_allocation?: 'only' | 'not_include' + fiscal_year: number + start_month: number + end_month: number + start_date: string + end_date: string + account_item_display_type: 'account_item' | 'group' + breakdown_display_type: 'partner' | 'item' | 'section' | 'account_item' + partner_id: number + partner_code: string + item_id: number + section_id: number + adjustment: 'only' | 'without' + cost_allocation: 'only' | 'not_include' } status: 200 diff --git a/samples/freee/api/1/segments/_segment_id@number/tags/index.ts b/samples/freee/api/1/segments/_segment_id@number/tags/index.ts index 4cea3cfe..86f4724d 100644 --- a/samples/freee/api/1/segments/_segment_id@number/tags/index.ts +++ b/samples/freee/api/1/segments/_segment_id@number/tags/index.ts @@ -5,8 +5,8 @@ export type Methods = { get: { query: { company_id: number - offset?: number - limit?: number + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/transfers/index.ts b/samples/freee/api/1/transfers/index.ts index 4701c35d..b9a1f84d 100644 --- a/samples/freee/api/1/transfers/index.ts +++ b/samples/freee/api/1/transfers/index.ts @@ -5,10 +5,10 @@ export type Methods = { get: { query: { company_id: number - start_date?: string - end_date?: string - offset?: number - limit?: number + start_date: string + end_date: string + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/users/$api.ts b/samples/freee/api/1/users/$api.ts index c80534fb..e9915eb2 100644 --- a/samples/freee/api/1/users/$api.ts +++ b/samples/freee/api/1/users/$api.ts @@ -22,9 +22,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { `${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, me: { - get: (option?: { query?: Methods2['get']['query'], config?: T }) => + get: (option: { query: Methods2['get']['query'], config?: T }) => fetch(prefix, PATH2, GET, option).json(), - $get: (option?: { query?: Methods2['get']['query'], config?: T }) => + $get: (option: { query: Methods2['get']['query'], config?: T }) => fetch(prefix, PATH2, GET, option).json().then(r => r.body), put: (option?: { body?: Methods2['put']['reqBody'], config?: T }) => fetch(prefix, PATH2, PUT, option, 'URLSearchParams').json(), diff --git a/samples/freee/api/1/users/index.ts b/samples/freee/api/1/users/index.ts index 97bf3b6a..54b3b442 100644 --- a/samples/freee/api/1/users/index.ts +++ b/samples/freee/api/1/users/index.ts @@ -5,7 +5,7 @@ export type Methods = { get: { query: { company_id: number - limit?: number + limit: number } status: 200 diff --git a/samples/freee/api/1/users/me/$api.ts b/samples/freee/api/1/users/me/$api.ts index 14990971..eaf65cd3 100644 --- a/samples/freee/api/1/users/me/$api.ts +++ b/samples/freee/api/1/users/me/$api.ts @@ -9,9 +9,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const PUT = 'PUT' return { - get: (option?: { query?: Methods0['get']['query'], config?: T }) => + get: (option: { query: Methods0['get']['query'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option?: { query?: Methods0['get']['query'], config?: T }) => + $get: (option: { query: Methods0['get']['query'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), put: (option?: { body?: Methods0['put']['reqBody'], config?: T }) => fetch(prefix, PATH0, PUT, option, 'URLSearchParams').json(), diff --git a/samples/freee/api/1/users/me/index.ts b/samples/freee/api/1/users/me/index.ts index b84837fe..1381167d 100644 --- a/samples/freee/api/1/users/me/index.ts +++ b/samples/freee/api/1/users/me/index.ts @@ -3,8 +3,8 @@ import * as Types from '../../../../@types' export type Methods = { get: { - query?: { - companies?: true + query: { + companies: true } status: 200 diff --git a/samples/freee/api/1/wallet_txns/index.ts b/samples/freee/api/1/wallet_txns/index.ts index 334b4b11..ed40a902 100644 --- a/samples/freee/api/1/wallet_txns/index.ts +++ b/samples/freee/api/1/wallet_txns/index.ts @@ -5,13 +5,13 @@ export type Methods = { get: { query: { company_id: number - walletable_type?: 'bank_account' | 'credit_card' | 'wallet' - walletable_id?: number - start_date?: string - end_date?: string - entry_side?: 'income' | 'expense' - offset?: number - limit?: number + walletable_type: 'bank_account' | 'credit_card' | 'wallet' + walletable_id: number + start_date: string + end_date: string + entry_side: 'income' | 'expense' + offset: number + limit: number } status: 200 diff --git a/samples/freee/api/1/walletables/index.ts b/samples/freee/api/1/walletables/index.ts index ec0b1351..93cd880d 100644 --- a/samples/freee/api/1/walletables/index.ts +++ b/samples/freee/api/1/walletables/index.ts @@ -5,8 +5,8 @@ export type Methods = { get: { query: { company_id: number - with_balance?: boolean - type?: 'bank_account' | 'credit_card' | 'wallet' + with_balance: boolean + type: 'bank_account' | 'credit_card' | 'wallet' } status: 200 @@ -15,7 +15,7 @@ export type Methods = { walletables: Types.walletableResponse['walletable'][] meta?: { - up_to_date?: boolean + up_to_date: boolean } } } diff --git a/samples/openapi/$api.ts b/samples/openapi/$api.ts index 0cbf7289..04032079 100644 --- a/samples/openapi/$api.ts +++ b/samples/openapi/$api.ts @@ -140,9 +140,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix1 = `${PATH2}/${val1}` return { - put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) => + put: (option: { body: Methods4['put']['reqBody'], config?: T }) => fetch(prefix, prefix1, PUT, option).send(), - $put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) => + $put: (option: { body: Methods4['put']['reqBody'], config?: T }) => fetch(prefix, prefix1, PUT, option).send().then(r => r.body), $path: () => `${prefix}${prefix1}` } @@ -152,16 +152,16 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { cards: { - post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) => + post: (option: { body: Methods5['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix2}${PATH3}`, POST, option).send(), - $post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods5['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix2}${PATH3}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix2}${PATH3}` }, url: { - post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) => + post: (option: { body: Methods6['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix2}${PATH4}`, POST, option).send(), - $post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods6['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix2}${PATH4}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix2}${PATH4}` } @@ -171,39 +171,39 @@ const api = ({ baseURL, fetch }: AspidaClient) => { fetch(prefix, PATH2, GET, option).json(), $get: (option?: { config?: T }) => fetch(prefix, PATH2, GET, option).json().then(r => r.body), - post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], config?: T }) => fetch(prefix, PATH2, POST, option).json(), - $post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods3['post']['reqBody'], config?: T }) => fetch(prefix, PATH2, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH2}` }, parse: { image: { - post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) => + post: (option: { body: Methods8['post']['reqBody'], config?: T }) => fetch(prefix, PATH6, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods8['post']['reqBody'], config?: T }) => fetch(prefix, PATH6, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH6}` }, - post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) => + post: (option: { body: Methods7['post']['reqBody'], config?: T }) => fetch(prefix, PATH5, POST, option).json(), - $post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods7['post']['reqBody'], config?: T }) => fetch(prefix, PATH5, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH5}` }, token: { - post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) => + post: (option: { body: Methods9['post']['reqBody'], config?: T }) => fetch(prefix, PATH7, POST, option).json(), - $post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods9['post']['reqBody'], config?: T }) => fetch(prefix, PATH7, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH7}` } }, v3: { $2fa: { - post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH8, POST, option).json(), - $post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH8, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH8}` }, @@ -222,9 +222,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix5 = `${prefix4}${PATH11}/${val5}` return { - post: (option?: { body?: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix5, POST, option).json(), - $post: (option?: { body?: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix5, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix5}` } @@ -234,9 +234,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { } }, news_feed: { - get: (option?: { query?: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH12}`, GET, option).json(), - $get: (option?: { query?: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH12}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods13['get']['query'] }) => `${prefix}${prefix3}${PATH12}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -254,111 +254,111 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { items: { audio: { - post: (option?: { body?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH13}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH13}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH13}` }, image: { - post: (option?: { body?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH14}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH14}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH14}` }, video: { - post: (option?: { body?: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods20['post']['reqBody'], headers: Methods20['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH15}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods20['post']['reqBody'], headers: Methods20['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH15}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH15}` }, - get: (option?: { query?: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods17['get']['query'], headers: Methods17['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH11}`, GET, option).json(), - $get: (option?: { query?: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods17['get']['query'], headers: Methods17['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH11}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH11}`, POST, option).json(), - $post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH11}`, POST, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods17['get']['query'] }) => `${prefix}${prefix7}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, itemslist: { - get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods21['get']['query'], headers: Methods21['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH16}`, GET, option).json(), - $get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods21['get']['query'], headers: Methods21['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH16}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods21['get']['query'] }) => `${prefix}${prefix7}${PATH16}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, users: { remove: { - post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH18}`, POST, option).send(), - $post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH18}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH18}` }, - get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods22['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, GET, option).json(), - $get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods22['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, POST, option).send(), - $post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, POST, option).send().then(r => r.body), - put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods22['put']['reqBody'], headers: Methods22['put']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, PUT, option).send(), - $put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods22['put']['reqBody'], headers: Methods22['put']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, PUT, option).send().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH17}` }, - get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods16['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, GET, option).json(), - $get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods16['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, GET, option).json().then(r => r.body), - put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods16['put']['reqBody'], headers: Methods16['put']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, PUT, option).send(), - $put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods16['put']['reqBody'], headers: Methods16['put']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, PUT, option).send().then(r => r.body), - delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) => + delete: (option: { headers: Methods16['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, DELETE, option).send(), - $delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) => + $delete: (option: { headers: Methods16['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, DELETE, option).send().then(r => r.body), $path: () => `${prefix}${prefix7}` } }, - get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH10}`, GET, option).json(), - $get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH10}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH10}`, POST, option).json(), - $post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH10}`, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix6}${PATH10}` }, notifications: { - get: (option?: { query?: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods24['get']['query'], headers: Methods24['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH19}`, GET, option).json(), - $get: (option?: { query?: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods24['get']['query'], headers: Methods24['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH19}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods24['get']['query'] }) => `${prefix}${prefix6}${PATH19}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, - get: (option?: { query?: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix6, GET, option).send(), - $get: (option?: { query?: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix6, GET, option).send().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods14['get']['query'] }) => `${prefix}${prefix6}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` } }, - get: (option?: { query?: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH9, GET, option).json(), - $get: (option?: { query?: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH9, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods11['get']['query'] }) => `${prefix}${PATH9}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -373,13 +373,13 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix9 = `${prefix8}${PATH11}/${val9}` return { - post: (option?: { body?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix9, POST, option).json(), - $post: (option?: { body?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix9, POST, option).json().then(r => r.body), - get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods25['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix9, GET, option).json(), - $get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods25['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix9, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix9}` } @@ -393,33 +393,33 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { items: { audio: { - post: (option?: { body?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH13}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH13}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix10}${PATH13}` }, image: { - post: (option?: { body?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH14}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH14}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix10}${PATH14}` }, video: { - post: (option?: { body?: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH15}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH15}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix10}${PATH15}` }, - get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) => + get: (option: { query?: Methods26['get']['query'], headers: Methods26['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH11}`, GET, option).json(), - $get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) => + $get: (option: { query?: Methods26['get']['query'], headers: Methods26['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH11}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH11}`, POST, option).json(), - $post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH11}`, POST, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods26['get']['query'] }) => `${prefix}${prefix10}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -427,32 +427,32 @@ const api = ({ baseURL, fetch }: AspidaClient) => { } }, keys: { - get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH21, GET, option).json(), - $get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH21, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH21}` } }, extension: { audio: { - post: (option?: { body?: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH22, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH22, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH22}` }, image: { - post: (option?: { body?: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH23, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH23, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH23}` }, parse: { - post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods33['post']['reqBody'], headers: Methods33['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH24, POST, option).json(), - $post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods33['post']['reqBody'], headers: Methods33['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH24, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH24}` }, @@ -462,89 +462,89 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { audio: { - post: (option?: { body?: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods35['post']['reqBody'], headers: Methods35['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH26}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods35['post']['reqBody'], headers: Methods35['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH26}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix11}${PATH26}` }, image: { - post: (option?: { body?: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods36['post']['reqBody'], headers: Methods36['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH27}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods36['post']['reqBody'], headers: Methods36['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH27}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix11}${PATH27}` }, video: { - post: (option?: { body?: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods37['post']['reqBody'], headers: Methods37['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH28}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods37['post']['reqBody'], headers: Methods37['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH28}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix11}${PATH28}` }, - post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods34['post']['reqBody'], headers: Methods34['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix11, POST, option, 'FormData').json(), - $post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods34['post']['reqBody'], headers: Methods34['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix11, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix11}` } } }, video: { - post: (option?: { body?: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH29, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH29, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH29}` } }, fcm_token: { - post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods39['post']['reqBody'], headers: Methods39['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH30, POST, option).send(), - $post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods39['post']['reqBody'], headers: Methods39['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH30, POST, option).send().then(r => r.body), $path: () => `${prefix}${PATH30}` }, info: { - get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH31, GET, option).json(), - $get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH31, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH31}` }, login: { - post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods41['post']['reqBody'], headers: Methods41['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH32, POST, option).json(), - $post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods41['post']['reqBody'], headers: Methods41['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH32, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH32}` }, logout: { - post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods42['post']['reqBody'], headers: Methods42['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH33, POST, option).send(), - $post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods42['post']['reqBody'], headers: Methods42['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH33, POST, option).send().then(r => r.body), $path: () => `${prefix}${PATH33}` }, me: { - get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods43['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH34, GET, option).json(), - $get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods43['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH34, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH34}` }, organisation: { users: { - get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods45['get']['query'], headers: Methods45['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH36, GET, option).json(), - $get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods45['get']['query'], headers: Methods45['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH36, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods45['get']['query'] }) => `${prefix}${PATH36}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, - get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods44['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH35, GET, option).json(), - $get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods44['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH35, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH35}` }, @@ -559,22 +559,22 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { reaction: { - post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods48['post']['reqBody'], headers: Methods48['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix13}${PATH38}`, POST, option).json(), - $post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods48['post']['reqBody'], headers: Methods48['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix13}${PATH38}`, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix13}${PATH38}` }, - get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods47['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix13, GET, option).json(), - $get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods47['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix13, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix13}` } }, - get: (option?: { query?: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods46['get']['query'], headers: Methods46['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix12}${PATH11}`, GET, option).json(), - $get: (option?: { query?: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods46['get']['query'], headers: Methods46['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix12}${PATH11}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods46['get']['query'] }) => `${prefix}${prefix12}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -587,23 +587,23 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix14 = `${PATH39}/${val14}` return { - get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods50['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix14, GET, option).json(), - $get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods50['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix14, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix14}` } }, profile: { - put: (option?: { body?: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods51['put']['reqBody'], headers: Methods51['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH40, PUT, option, 'FormData').send(), - $put: (option?: { body?: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods51['put']['reqBody'], headers: Methods51['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH40, PUT, option, 'FormData').send().then(r => r.body), $path: () => `${prefix}${PATH40}` }, - get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods49['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH39, GET, option).json(), - $get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods49['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH39, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH39}` } diff --git a/samples/openapi/@types.ts b/samples/openapi/@types.ts index e5d22278..17bbe03f 100644 --- a/samples/openapi/@types.ts +++ b/samples/openapi/@types.ts @@ -16,15 +16,15 @@ export type UserTokenHeader = { } export type AppOrganisationToken = { - 'x-tchop-app-organisation-token'?: string + 'x-tchop-app-organisation-token': string } export type UserPublicKey = { - 'x-tchop-user-public-key'?: string + 'x-tchop-user-public-key': string } export type UserSignedChallenge = { - 'x-tchop-user-signed-challenge'?: string + 'x-tchop-user-signed-challenge': string } export type AppOrganisationTokenRequired = { @@ -32,7 +32,7 @@ export type AppOrganisationTokenRequired = { } export type UserInstanceIdHeader = { - 'x-tchop-firebase-instance-id'?: string + 'x-tchop-firebase-instance-id': string } export type ErrorModel = { @@ -163,39 +163,39 @@ export type ReactionEnumModel = 'like' | 'love' | 'haha' | 'wow' | 'sad' | 'angr export type CardEnumModel = 'article' | 'image' | 'video' | 'quote' | 'editorial' | 'audio' export type ReactionCountModel = { - like?: number - love?: number - haha?: number - wow?: number - sad?: number - angry?: number + like: number + love: number + haha: number + wow: number + sad: number + angry: number } export type MediaEXIFModel = { - gps?: { + gps: { x: number y: number } } export type CardStyleModel = { - showAuthor?: boolean - teaserStyle?: 'standard' | 'small_with_text' | 'small_without_text' | 'big_without_text' + showAuthor: boolean + teaserStyle: 'standard' | 'small_with_text' | 'small_without_text' | 'big_without_text' } export type QuoteModel = { - quotePerson?: string - quotePersonHandle?: string - quote?: string - quoteSource?: string - image?: string - quotePersonImage?: string - quoteCreated?: string + quotePerson: string + quotePersonHandle: string + quote: string + quoteSource: string + image: string + quotePersonImage: string + quoteCreated: string } export type ArticleModel = { - title?: string - abstract?: string - sourceName?: string - image?: string + title: string + abstract: string + sourceName: string + image: string } diff --git a/samples/openapi/api/$api.ts b/samples/openapi/api/$api.ts index 2b5312fa..5bd7d027 100644 --- a/samples/openapi/api/$api.ts +++ b/samples/openapi/api/$api.ts @@ -139,9 +139,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix1 = `${PATH2}/${val1}` return { - put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) => + put: (option: { body: Methods4['put']['reqBody'], config?: T }) => fetch(prefix, prefix1, PUT, option).send(), - $put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) => + $put: (option: { body: Methods4['put']['reqBody'], config?: T }) => fetch(prefix, prefix1, PUT, option).send().then(r => r.body), $path: () => `${prefix}${prefix1}` } @@ -151,16 +151,16 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { cards: { - post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) => + post: (option: { body: Methods5['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix2}${PATH3}`, POST, option).send(), - $post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods5['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix2}${PATH3}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix2}${PATH3}` }, url: { - post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) => + post: (option: { body: Methods6['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix2}${PATH4}`, POST, option).send(), - $post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods6['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix2}${PATH4}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix2}${PATH4}` } @@ -170,39 +170,39 @@ const api = ({ baseURL, fetch }: AspidaClient) => { fetch(prefix, PATH2, GET, option).json(), $get: (option?: { config?: T }) => fetch(prefix, PATH2, GET, option).json().then(r => r.body), - post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], config?: T }) => fetch(prefix, PATH2, POST, option).json(), - $post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods3['post']['reqBody'], config?: T }) => fetch(prefix, PATH2, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH2}` }, parse: { image: { - post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) => + post: (option: { body: Methods8['post']['reqBody'], config?: T }) => fetch(prefix, PATH6, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods8['post']['reqBody'], config?: T }) => fetch(prefix, PATH6, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH6}` }, - post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) => + post: (option: { body: Methods7['post']['reqBody'], config?: T }) => fetch(prefix, PATH5, POST, option).json(), - $post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods7['post']['reqBody'], config?: T }) => fetch(prefix, PATH5, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH5}` }, token: { - post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) => + post: (option: { body: Methods9['post']['reqBody'], config?: T }) => fetch(prefix, PATH7, POST, option).json(), - $post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods9['post']['reqBody'], config?: T }) => fetch(prefix, PATH7, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH7}` } }, v3: { $2fa: { - post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH8, POST, option).json(), - $post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH8, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH8}` }, @@ -221,9 +221,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix5 = `${prefix4}${PATH11}/${val5}` return { - post: (option?: { body?: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix5, POST, option).json(), - $post: (option?: { body?: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix5, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix5}` } @@ -233,9 +233,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { } }, news_feed: { - get: (option?: { query?: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH12}`, GET, option).json(), - $get: (option?: { query?: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH12}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods13['get']['query'] }) => `${prefix}${prefix3}${PATH12}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -253,111 +253,111 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { items: { audio: { - post: (option?: { body?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH13}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH13}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH13}` }, image: { - post: (option?: { body?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH14}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH14}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH14}` }, video: { - post: (option?: { body?: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods20['post']['reqBody'], headers: Methods20['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH15}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods20['post']['reqBody'], headers: Methods20['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH15}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH15}` }, - get: (option?: { query?: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods17['get']['query'], headers: Methods17['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH11}`, GET, option).json(), - $get: (option?: { query?: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods17['get']['query'], headers: Methods17['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH11}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH11}`, POST, option).json(), - $post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH11}`, POST, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods17['get']['query'] }) => `${prefix}${prefix7}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, itemslist: { - get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods21['get']['query'], headers: Methods21['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH16}`, GET, option).json(), - $get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods21['get']['query'], headers: Methods21['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH16}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods21['get']['query'] }) => `${prefix}${prefix7}${PATH16}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, users: { remove: { - post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH18}`, POST, option).send(), - $post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH18}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH18}` }, - get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods22['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, GET, option).json(), - $get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods22['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, POST, option).send(), - $post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, POST, option).send().then(r => r.body), - put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods22['put']['reqBody'], headers: Methods22['put']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, PUT, option).send(), - $put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods22['put']['reqBody'], headers: Methods22['put']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH17}`, PUT, option).send().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH17}` }, - get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods16['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, GET, option).json(), - $get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods16['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, GET, option).json().then(r => r.body), - put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods16['put']['reqBody'], headers: Methods16['put']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, PUT, option).send(), - $put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods16['put']['reqBody'], headers: Methods16['put']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, PUT, option).send().then(r => r.body), - delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) => + delete: (option: { headers: Methods16['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, DELETE, option).send(), - $delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) => + $delete: (option: { headers: Methods16['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix7, DELETE, option).send().then(r => r.body), $path: () => `${prefix}${prefix7}` } }, - get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH10}`, GET, option).json(), - $get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH10}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH10}`, POST, option).json(), - $post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH10}`, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix6}${PATH10}` }, notifications: { - get: (option?: { query?: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods24['get']['query'], headers: Methods24['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH19}`, GET, option).json(), - $get: (option?: { query?: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods24['get']['query'], headers: Methods24['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix6}${PATH19}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods24['get']['query'] }) => `${prefix}${prefix6}${PATH19}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, - get: (option?: { query?: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix6, GET, option).send(), - $get: (option?: { query?: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix6, GET, option).send().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods14['get']['query'] }) => `${prefix}${prefix6}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` } }, - get: (option?: { query?: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH9, GET, option).json(), - $get: (option?: { query?: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH9, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods11['get']['query'] }) => `${prefix}${PATH9}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -372,13 +372,13 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix9 = `${prefix8}${PATH11}/${val9}` return { - post: (option?: { body?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix9, POST, option).json(), - $post: (option?: { body?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix9, POST, option).json().then(r => r.body), - get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods25['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix9, GET, option).json(), - $get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods25['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix9, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix9}` } @@ -392,33 +392,33 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { items: { audio: { - post: (option?: { body?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH13}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH13}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix10}${PATH13}` }, image: { - post: (option?: { body?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH14}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH14}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix10}${PATH14}` }, video: { - post: (option?: { body?: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH15}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH15}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix10}${PATH15}` }, - get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) => + get: (option: { query?: Methods26['get']['query'], headers: Methods26['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH11}`, GET, option).json(), - $get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) => + $get: (option: { query?: Methods26['get']['query'], headers: Methods26['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH11}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH11}`, POST, option).json(), - $post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH11}`, POST, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods26['get']['query'] }) => `${prefix}${prefix10}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -426,32 +426,32 @@ const api = ({ baseURL, fetch }: AspidaClient) => { } }, keys: { - get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH21, GET, option).json(), - $get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH21, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH21}` } }, extension: { audio: { - post: (option?: { body?: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH22, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH22, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH22}` }, image: { - post: (option?: { body?: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH23, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH23, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH23}` }, parse: { - post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods33['post']['reqBody'], headers: Methods33['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH24, POST, option).json(), - $post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods33['post']['reqBody'], headers: Methods33['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH24, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH24}` }, @@ -461,89 +461,89 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { audio: { - post: (option?: { body?: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods35['post']['reqBody'], headers: Methods35['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH26}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods35['post']['reqBody'], headers: Methods35['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH26}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix11}${PATH26}` }, image: { - post: (option?: { body?: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods36['post']['reqBody'], headers: Methods36['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH27}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods36['post']['reqBody'], headers: Methods36['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH27}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix11}${PATH27}` }, video: { - post: (option?: { body?: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods37['post']['reqBody'], headers: Methods37['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH28}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods37['post']['reqBody'], headers: Methods37['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix11}${PATH28}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix11}${PATH28}` }, - post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods34['post']['reqBody'], headers: Methods34['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix11, POST, option, 'FormData').json(), - $post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods34['post']['reqBody'], headers: Methods34['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix11, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix11}` } } }, video: { - post: (option?: { body?: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH29, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH29, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH29}` } }, fcm_token: { - post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods39['post']['reqBody'], headers: Methods39['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH30, POST, option).send(), - $post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods39['post']['reqBody'], headers: Methods39['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH30, POST, option).send().then(r => r.body), $path: () => `${prefix}${PATH30}` }, info: { - get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH31, GET, option).json(), - $get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH31, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH31}` }, login: { - post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods41['post']['reqBody'], headers: Methods41['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH32, POST, option).json(), - $post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods41['post']['reqBody'], headers: Methods41['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH32, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH32}` }, logout: { - post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods42['post']['reqBody'], headers: Methods42['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH33, POST, option).send(), - $post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods42['post']['reqBody'], headers: Methods42['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH33, POST, option).send().then(r => r.body), $path: () => `${prefix}${PATH33}` }, me: { - get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods43['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH34, GET, option).json(), - $get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods43['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH34, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH34}` }, organisation: { users: { - get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods45['get']['query'], headers: Methods45['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH36, GET, option).json(), - $get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods45['get']['query'], headers: Methods45['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH36, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods45['get']['query'] }) => `${prefix}${PATH36}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, - get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods44['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH35, GET, option).json(), - $get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods44['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH35, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH35}` }, @@ -558,22 +558,22 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { reaction: { - post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods48['post']['reqBody'], headers: Methods48['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix13}${PATH38}`, POST, option).json(), - $post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods48['post']['reqBody'], headers: Methods48['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix13}${PATH38}`, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix13}${PATH38}` }, - get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods47['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix13, GET, option).json(), - $get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods47['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix13, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix13}` } }, - get: (option?: { query?: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods46['get']['query'], headers: Methods46['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix12}${PATH11}`, GET, option).json(), - $get: (option?: { query?: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods46['get']['query'], headers: Methods46['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix12}${PATH11}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods46['get']['query'] }) => `${prefix}${prefix12}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -586,23 +586,23 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix14 = `${PATH39}/${val14}` return { - get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods50['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix14, GET, option).json(), - $get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods50['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix14, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix14}` } }, profile: { - put: (option?: { body?: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods51['put']['reqBody'], headers: Methods51['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH40, PUT, option, 'FormData').send(), - $put: (option?: { body?: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods51['put']['reqBody'], headers: Methods51['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH40, PUT, option, 'FormData').send().then(r => r.body), $path: () => `${prefix}${PATH40}` }, - get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods49['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH39, GET, option).json(), - $get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods49['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH39, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH39}` } diff --git a/samples/openapi/api/stream/v1/stories/_storyId@number/index.ts b/samples/openapi/api/stream/v1/stories/_storyId@number/index.ts index 8a04033b..97aa82fd 100644 --- a/samples/openapi/api/stream/v1/stories/_storyId@number/index.ts +++ b/samples/openapi/api/stream/v1/stories/_storyId@number/index.ts @@ -5,8 +5,8 @@ export type Methods = { get: { query: { token: string - offset?: number - limit?: number + offset: number + limit: number } status: 200 diff --git a/samples/openapi/api/v1/$api.ts b/samples/openapi/api/v1/$api.ts index bf160393..c6d32793 100644 --- a/samples/openapi/api/v1/$api.ts +++ b/samples/openapi/api/v1/$api.ts @@ -35,9 +35,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix0 = `${PATH1}/${val0}` return { - put: (option?: { body?: Methods2['put']['reqBody'], config?: T }) => + put: (option: { body: Methods2['put']['reqBody'], config?: T }) => fetch(prefix, prefix0, PUT, option).send(), - $put: (option?: { body?: Methods2['put']['reqBody'], config?: T }) => + $put: (option: { body: Methods2['put']['reqBody'], config?: T }) => fetch(prefix, prefix0, PUT, option).send().then(r => r.body), $path: () => `${prefix}${prefix0}` } @@ -47,16 +47,16 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { cards: { - post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix1}${PATH2}`, POST, option).send(), - $post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods3['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix1}${PATH2}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix1}${PATH2}` }, url: { - post: (option?: { body?: Methods4['post']['reqBody'], config?: T }) => + post: (option: { body: Methods4['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix1}${PATH3}`, POST, option).send(), - $post: (option?: { body?: Methods4['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods4['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix1}${PATH3}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix1}${PATH3}` } @@ -66,30 +66,30 @@ const api = ({ baseURL, fetch }: AspidaClient) => { fetch(prefix, PATH1, GET, option).json(), $get: (option?: { config?: T }) => fetch(prefix, PATH1, GET, option).json().then(r => r.body), - post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + post: (option: { body: Methods1['post']['reqBody'], config?: T }) => fetch(prefix, PATH1, POST, option).json(), - $post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods1['post']['reqBody'], config?: T }) => fetch(prefix, PATH1, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH1}` }, parse: { image: { - post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) => + post: (option: { body: Methods6['post']['reqBody'], config?: T }) => fetch(prefix, PATH5, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods6['post']['reqBody'], config?: T }) => fetch(prefix, PATH5, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH5}` }, - post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) => + post: (option: { body: Methods5['post']['reqBody'], config?: T }) => fetch(prefix, PATH4, POST, option).json(), - $post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods5['post']['reqBody'], config?: T }) => fetch(prefix, PATH4, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH4}` }, token: { - post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) => + post: (option: { body: Methods7['post']['reqBody'], config?: T }) => fetch(prefix, PATH6, POST, option).json(), - $post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods7['post']['reqBody'], config?: T }) => fetch(prefix, PATH6, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH6}` } diff --git a/samples/openapi/api/v1/mixes/$api.ts b/samples/openapi/api/v1/mixes/$api.ts index a2522961..04f33379 100644 --- a/samples/openapi/api/v1/mixes/$api.ts +++ b/samples/openapi/api/v1/mixes/$api.ts @@ -19,9 +19,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix0 = `${PATH0}/${val0}` return { - put: (option?: { body?: Methods1['put']['reqBody'], config?: T }) => + put: (option: { body: Methods1['put']['reqBody'], config?: T }) => fetch(prefix, prefix0, PUT, option).send(), - $put: (option?: { body?: Methods1['put']['reqBody'], config?: T }) => + $put: (option: { body: Methods1['put']['reqBody'], config?: T }) => fetch(prefix, prefix0, PUT, option).send().then(r => r.body), $path: () => `${prefix}${prefix0}` } @@ -31,16 +31,16 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { cards: { - post: (option?: { body?: Methods2['post']['reqBody'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix1}${PATH1}`, POST, option).send(), - $post: (option?: { body?: Methods2['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods2['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix1}${PATH1}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix1}${PATH1}` }, url: { - post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix1}${PATH2}`, POST, option).send(), - $post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods3['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix1}${PATH2}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix1}${PATH2}` } @@ -50,9 +50,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { fetch(prefix, PATH0, GET, option).json(), $get: (option?: { config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), - post: (option?: { body?: Methods0['post']['reqBody'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], config?: T }) => fetch(prefix, PATH0, POST, option).json(), - $post: (option?: { body?: Methods0['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], config?: T }) => fetch(prefix, PATH0, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v1/mixes/_id@string/index.ts b/samples/openapi/api/v1/mixes/_id@string/index.ts index 9b315349..561a59d0 100644 --- a/samples/openapi/api/v1/mixes/_id@string/index.ts +++ b/samples/openapi/api/v1/mixes/_id@string/index.ts @@ -3,7 +3,7 @@ export type Methods = { put: { status: 200 - reqBody?: { + reqBody: { name: string title?: string } diff --git a/samples/openapi/api/v1/mixes/_mixId@string/cards/index.ts b/samples/openapi/api/v1/mixes/_mixId@string/cards/index.ts index 43f4676d..51920531 100644 --- a/samples/openapi/api/v1/mixes/_mixId@string/cards/index.ts +++ b/samples/openapi/api/v1/mixes/_mixId@string/cards/index.ts @@ -5,7 +5,7 @@ export type Methods = { post: { status: 204 - reqBody?: { + reqBody: { type: Types.CardEnumModel title?: string abstract?: string diff --git a/samples/openapi/api/v1/mixes/_mixId@string/url/index.ts b/samples/openapi/api/v1/mixes/_mixId@string/url/index.ts index 300e6c27..4dfc2e83 100644 --- a/samples/openapi/api/v1/mixes/_mixId@string/url/index.ts +++ b/samples/openapi/api/v1/mixes/_mixId@string/url/index.ts @@ -3,7 +3,7 @@ export type Methods = { post: { status: 204 - reqBody?: { + reqBody: { url: string published?: boolean enableImage?: boolean diff --git a/samples/openapi/api/v1/mixes/index.ts b/samples/openapi/api/v1/mixes/index.ts index 29bdc1eb..8b812d3e 100644 --- a/samples/openapi/api/v1/mixes/index.ts +++ b/samples/openapi/api/v1/mixes/index.ts @@ -16,7 +16,7 @@ export type Methods = { id: number } - reqBody?: { + reqBody: { name: string title?: string } diff --git a/samples/openapi/api/v1/parse/$api.ts b/samples/openapi/api/v1/parse/$api.ts index 53bc276d..0a58dd62 100644 --- a/samples/openapi/api/v1/parse/$api.ts +++ b/samples/openapi/api/v1/parse/$api.ts @@ -11,15 +11,15 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { image: { - post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + post: (option: { body: Methods1['post']['reqBody'], config?: T }) => fetch(prefix, PATH1, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods1['post']['reqBody'], config?: T }) => fetch(prefix, PATH1, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH1}` }, - post: (option?: { body?: Methods0['post']['reqBody'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], config?: T }) => fetch(prefix, PATH0, POST, option).json(), - $post: (option?: { body?: Methods0['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], config?: T }) => fetch(prefix, PATH0, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v1/parse/image/$api.ts b/samples/openapi/api/v1/parse/image/$api.ts index 40f9107c..a2784e53 100644 --- a/samples/openapi/api/v1/parse/image/$api.ts +++ b/samples/openapi/api/v1/parse/image/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option?: { body?: Methods0['post']['reqBody'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods0['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v1/parse/image/index.ts b/samples/openapi/api/v1/parse/image/index.ts index 3141c544..6839ec57 100644 --- a/samples/openapi/api/v1/parse/image/index.ts +++ b/samples/openapi/api/v1/parse/image/index.ts @@ -9,7 +9,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob rightholder?: string statusCopyright?: 'unknown' | 'cc' | 'licensed' | 'sublicensed' diff --git a/samples/openapi/api/v1/parse/index.ts b/samples/openapi/api/v1/parse/index.ts index 22bdd426..adeffb2e 100644 --- a/samples/openapi/api/v1/parse/index.ts +++ b/samples/openapi/api/v1/parse/index.ts @@ -7,7 +7,7 @@ export type Methods = { resBody: Types.ArticleModel | Types.QuoteModel - reqBody?: { + reqBody: { url: string } } diff --git a/samples/openapi/api/v1/token/$api.ts b/samples/openapi/api/v1/token/$api.ts index 689b2d11..b5bef495 100644 --- a/samples/openapi/api/v1/token/$api.ts +++ b/samples/openapi/api/v1/token/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option?: { body?: Methods0['post']['reqBody'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], config?: T }) => fetch(prefix, PATH0, POST, option).json(), - $post: (option?: { body?: Methods0['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], config?: T }) => fetch(prefix, PATH0, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v1/token/index.ts b/samples/openapi/api/v1/token/index.ts index d5c4ccb1..790797fc 100644 --- a/samples/openapi/api/v1/token/index.ts +++ b/samples/openapi/api/v1/token/index.ts @@ -7,7 +7,7 @@ export type Methods = { token: string } - reqBody?: { + reqBody: { organisationSubdomain: string channelSubdomain: string userId: number diff --git a/samples/openapi/api/v3/$api.ts b/samples/openapi/api/v3/$api.ts index e45d4882..9367495d 100644 --- a/samples/openapi/api/v3/$api.ts +++ b/samples/openapi/api/v3/$api.ts @@ -85,9 +85,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { $2fa: { - post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).json(), - $post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` }, @@ -106,9 +106,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix2 = `${prefix1}${PATH3}/${val2}` return { - post: (option?: { body?: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix2, POST, option).json(), - $post: (option?: { body?: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix2, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix2}` } @@ -118,9 +118,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { } }, news_feed: { - get: (option?: { query?: Methods3['get']['query'], headers?: Methods3['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods3['get']['query'], headers: Methods3['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH4}`, GET, option).json(), - $get: (option?: { query?: Methods3['get']['query'], headers?: Methods3['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods3['get']['query'], headers: Methods3['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH4}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods3['get']['query'] }) => `${prefix}${prefix0}${PATH4}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -138,111 +138,111 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { items: { audio: { - post: (option?: { body?: Methods8['post']['reqBody'], headers?: Methods8['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods8['post']['reqBody'], headers: Methods8['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH5}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods8['post']['reqBody'], headers?: Methods8['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods8['post']['reqBody'], headers: Methods8['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH5}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH5}` }, image: { - post: (option?: { body?: Methods9['post']['reqBody'], headers?: Methods9['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods9['post']['reqBody'], headers: Methods9['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH6}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods9['post']['reqBody'], headers?: Methods9['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods9['post']['reqBody'], headers: Methods9['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH6}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH6}` }, video: { - post: (option?: { body?: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH7}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH7}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH7}` }, - get: (option?: { query?: Methods7['get']['query'], headers?: Methods7['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods7['get']['query'], headers: Methods7['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH3}`, GET, option).json(), - $get: (option?: { query?: Methods7['get']['query'], headers?: Methods7['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods7['get']['query'], headers: Methods7['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH3}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods7['post']['reqBody'], headers?: Methods7['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods7['post']['reqBody'], headers: Methods7['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH3}`, POST, option).json(), - $post: (option: { body: Methods7['post']['reqBody'], headers?: Methods7['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods7['post']['reqBody'], headers: Methods7['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH3}`, POST, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods7['get']['query'] }) => `${prefix}${prefix4}${PATH3}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, itemslist: { - get: (option: { query: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH8}`, GET, option).json(), - $get: (option: { query: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH8}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods11['get']['query'] }) => `${prefix}${prefix4}${PATH8}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, users: { remove: { - post: (option: { body: Methods13['post']['reqBody'], headers?: Methods13['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods13['post']['reqBody'], headers: Methods13['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH10}`, POST, option).send(), - $post: (option: { body: Methods13['post']['reqBody'], headers?: Methods13['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods13['post']['reqBody'], headers: Methods13['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH10}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH10}` }, - get: (option?: { headers?: Methods12['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods12['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH9}`, GET, option).json(), - $get: (option?: { headers?: Methods12['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods12['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH9}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH9}`, POST, option).send(), - $post: (option: { body: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH9}`, POST, option).send().then(r => r.body), - put: (option: { body: Methods12['put']['reqBody'], headers?: Methods12['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods12['put']['reqBody'], headers: Methods12['put']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH9}`, PUT, option).send(), - $put: (option: { body: Methods12['put']['reqBody'], headers?: Methods12['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods12['put']['reqBody'], headers: Methods12['put']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH9}`, PUT, option).send().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH9}` }, - get: (option?: { headers?: Methods6['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods6['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, GET, option).json(), - $get: (option?: { headers?: Methods6['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods6['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, GET, option).json().then(r => r.body), - put: (option: { body: Methods6['put']['reqBody'], headers?: Methods6['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods6['put']['reqBody'], headers: Methods6['put']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, PUT, option).send(), - $put: (option: { body: Methods6['put']['reqBody'], headers?: Methods6['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods6['put']['reqBody'], headers: Methods6['put']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, PUT, option).send().then(r => r.body), - delete: (option?: { headers?: Methods6['delete']['reqHeaders'], config?: T }) => + delete: (option: { headers: Methods6['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, DELETE, option).send(), - $delete: (option?: { headers?: Methods6['delete']['reqHeaders'], config?: T }) => + $delete: (option: { headers: Methods6['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, DELETE, option).send().then(r => r.body), $path: () => `${prefix}${prefix4}` } }, - get: (option?: { headers?: Methods5['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods5['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH2}`, GET, option).json(), - $get: (option?: { headers?: Methods5['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods5['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH2}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods5['post']['reqBody'], headers?: Methods5['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods5['post']['reqBody'], headers: Methods5['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH2}`, POST, option).json(), - $post: (option: { body: Methods5['post']['reqBody'], headers?: Methods5['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods5['post']['reqBody'], headers: Methods5['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH2}`, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix3}${PATH2}` }, notifications: { - get: (option?: { query?: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH11}`, GET, option).json(), - $get: (option?: { query?: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH11}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods14['get']['query'] }) => `${prefix}${prefix3}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, - get: (option?: { query?: Methods4['get']['query'], headers?: Methods4['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods4['get']['query'], headers: Methods4['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix3, GET, option).send(), - $get: (option?: { query?: Methods4['get']['query'], headers?: Methods4['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods4['get']['query'], headers: Methods4['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix3, GET, option).send().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods4['get']['query'] }) => `${prefix}${prefix3}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` } }, - get: (option?: { query?: Methods1['get']['query'], headers?: Methods1['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods1['get']['query'], headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH1, GET, option).json(), - $get: (option?: { query?: Methods1['get']['query'], headers?: Methods1['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods1['get']['query'], headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH1, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods1['get']['query'] }) => `${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -257,13 +257,13 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix6 = `${prefix5}${PATH3}/${val6}` return { - post: (option?: { body?: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix6, POST, option).json(), - $post: (option?: { body?: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix6, POST, option).json().then(r => r.body), - get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix6, GET, option).json(), - $get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix6, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix6}` } @@ -277,33 +277,33 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { items: { audio: { - post: (option?: { body?: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH5}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH5}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH5}` }, image: { - post: (option?: { body?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH6}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH6}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH6}` }, video: { - post: (option?: { body?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH7}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH7}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix7}${PATH7}` }, - get: (option?: { query?: Methods16['get']['query'], headers?: Methods16['get']['reqHeaders'], config?: T }) => + get: (option: { query?: Methods16['get']['query'], headers: Methods16['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH3}`, GET, option).json(), - $get: (option?: { query?: Methods16['get']['query'], headers?: Methods16['get']['reqHeaders'], config?: T }) => + $get: (option: { query?: Methods16['get']['query'], headers: Methods16['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH3}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods16['post']['reqBody'], headers?: Methods16['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods16['post']['reqBody'], headers: Methods16['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH3}`, POST, option).json(), - $post: (option: { body: Methods16['post']['reqBody'], headers?: Methods16['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods16['post']['reqBody'], headers: Methods16['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix7}${PATH3}`, POST, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods16['get']['query'] }) => `${prefix}${prefix7}${PATH3}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -311,32 +311,32 @@ const api = ({ baseURL, fetch }: AspidaClient) => { } }, keys: { - get: (option?: { headers?: Methods20['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods20['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH13, GET, option).json(), - $get: (option?: { headers?: Methods20['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods20['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH13, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH13}` } }, extension: { audio: { - post: (option?: { body?: Methods21['post']['reqBody'], headers?: Methods21['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods21['post']['reqBody'], headers: Methods21['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH14, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods21['post']['reqBody'], headers?: Methods21['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods21['post']['reqBody'], headers: Methods21['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH14, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH14}` }, image: { - post: (option?: { body?: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH15, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH15, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH15}` }, parse: { - post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH16, POST, option).json(), - $post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH16, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH16}` }, @@ -346,89 +346,89 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { audio: { - post: (option?: { body?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix8}${PATH18}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix8}${PATH18}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix8}${PATH18}` }, image: { - post: (option?: { body?: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix8}${PATH19}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix8}${PATH19}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix8}${PATH19}` }, video: { - post: (option?: { body?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix8}${PATH20}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix8}${PATH20}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix8}${PATH20}` }, - post: (option: { body: Methods24['post']['reqBody'], headers?: Methods24['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods24['post']['reqBody'], headers: Methods24['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix8, POST, option, 'FormData').json(), - $post: (option: { body: Methods24['post']['reqBody'], headers?: Methods24['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods24['post']['reqBody'], headers: Methods24['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix8, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix8}` } } }, video: { - post: (option?: { body?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH21, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH21, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH21}` } }, fcm_token: { - post: (option: { body: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH22, POST, option).send(), - $post: (option: { body: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH22, POST, option).send().then(r => r.body), $path: () => `${prefix}${PATH22}` }, info: { - get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH23, GET, option).json(), - $get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH23, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH23}` }, login: { - post: (option: { body: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH24, POST, option).json(), - $post: (option: { body: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH24, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH24}` }, logout: { - post: (option: { body: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH25, POST, option).send(), - $post: (option: { body: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH25, POST, option).send().then(r => r.body), $path: () => `${prefix}${PATH25}` }, me: { - get: (option?: { headers?: Methods33['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods33['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH26, GET, option).json(), - $get: (option?: { headers?: Methods33['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods33['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH26, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH26}` }, organisation: { users: { - get: (option: { query: Methods35['get']['query'], headers?: Methods35['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods35['get']['query'], headers: Methods35['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH28, GET, option).json(), - $get: (option: { query: Methods35['get']['query'], headers?: Methods35['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods35['get']['query'], headers: Methods35['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH28, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods35['get']['query'] }) => `${prefix}${PATH28}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, - get: (option?: { headers?: Methods34['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods34['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH27, GET, option).json(), - $get: (option?: { headers?: Methods34['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods34['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH27, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH27}` }, @@ -443,22 +443,22 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { reaction: { - post: (option: { body: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH30}`, POST, option).json(), - $post: (option: { body: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix10}${PATH30}`, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix10}${PATH30}` }, - get: (option?: { headers?: Methods37['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods37['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix10, GET, option).json(), - $get: (option?: { headers?: Methods37['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods37['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix10, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix10}` } }, - get: (option?: { query?: Methods36['get']['query'], headers?: Methods36['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods36['get']['query'], headers: Methods36['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix9}${PATH3}`, GET, option).json(), - $get: (option?: { query?: Methods36['get']['query'], headers?: Methods36['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods36['get']['query'], headers: Methods36['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix9}${PATH3}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods36['get']['query'] }) => `${prefix}${prefix9}${PATH3}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -471,23 +471,23 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix11 = `${PATH31}/${val11}` return { - get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix11, GET, option).json(), - $get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix11, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix11}` } }, profile: { - put: (option?: { body?: Methods41['put']['reqBody'], headers?: Methods41['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods41['put']['reqBody'], headers: Methods41['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH32, PUT, option, 'FormData').send(), - $put: (option?: { body?: Methods41['put']['reqBody'], headers?: Methods41['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods41['put']['reqBody'], headers: Methods41['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH32, PUT, option, 'FormData').send().then(r => r.body), $path: () => `${prefix}${PATH32}` }, - get: (option?: { headers?: Methods39['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods39['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH31, GET, option).json(), - $get: (option?: { headers?: Methods39['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods39['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH31, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH31}` } diff --git a/samples/openapi/api/v3/2fa/$api.ts b/samples/openapi/api/v3/2fa/$api.ts index f495c217..e209ec68 100644 --- a/samples/openapi/api/v3/2fa/$api.ts +++ b/samples/openapi/api/v3/2fa/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).json(), - $post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/2fa/index.ts b/samples/openapi/api/v3/2fa/index.ts index cb5ca5ea..7fd5886a 100644 --- a/samples/openapi/api/v3/2fa/index.ts +++ b/samples/openapi/api/v3/2fa/index.ts @@ -3,13 +3,13 @@ import * as Types from '../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationTokenRequired + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationTokenRequired status: 200 resBody: { - dataUrl?: string - otpURL?: string - secret?: string + dataUrl: string + otpURL: string + secret: string } reqBody: { diff --git a/samples/openapi/api/v3/channels/$api.ts b/samples/openapi/api/v3/channels/$api.ts index 466b3394..8c487dc3 100644 --- a/samples/openapi/api/v3/channels/$api.ts +++ b/samples/openapi/api/v3/channels/$api.ts @@ -48,9 +48,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix2 = `${prefix1}${PATH2}/${val2}` return { - post: (option?: { body?: Methods1['post']['reqBody'], headers?: Methods1['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods1['post']['reqBody'], headers: Methods1['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix2, POST, option).json(), - $post: (option?: { body?: Methods1['post']['reqBody'], headers?: Methods1['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods1['post']['reqBody'], headers: Methods1['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix2, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix2}` } @@ -60,9 +60,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { } }, news_feed: { - get: (option?: { query?: Methods2['get']['query'], headers?: Methods2['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods2['get']['query'], headers: Methods2['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH3}`, GET, option).json(), - $get: (option?: { query?: Methods2['get']['query'], headers?: Methods2['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods2['get']['query'], headers: Methods2['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH3}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods2['get']['query'] }) => `${prefix}${prefix0}${PATH3}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -80,111 +80,111 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { items: { audio: { - post: (option?: { body?: Methods7['post']['reqBody'], headers?: Methods7['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods7['post']['reqBody'], headers: Methods7['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH4}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods7['post']['reqBody'], headers?: Methods7['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods7['post']['reqBody'], headers: Methods7['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH4}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH4}` }, image: { - post: (option?: { body?: Methods8['post']['reqBody'], headers?: Methods8['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods8['post']['reqBody'], headers: Methods8['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH5}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods8['post']['reqBody'], headers?: Methods8['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods8['post']['reqBody'], headers: Methods8['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH5}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH5}` }, video: { - post: (option?: { body?: Methods9['post']['reqBody'], headers?: Methods9['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods9['post']['reqBody'], headers: Methods9['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH6}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods9['post']['reqBody'], headers?: Methods9['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods9['post']['reqBody'], headers: Methods9['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH6}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH6}` }, - get: (option?: { query?: Methods6['get']['query'], headers?: Methods6['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods6['get']['query'], headers: Methods6['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH2}`, GET, option).json(), - $get: (option?: { query?: Methods6['get']['query'], headers?: Methods6['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods6['get']['query'], headers: Methods6['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH2}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods6['post']['reqBody'], headers?: Methods6['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods6['post']['reqBody'], headers: Methods6['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH2}`, POST, option).json(), - $post: (option: { body: Methods6['post']['reqBody'], headers?: Methods6['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods6['post']['reqBody'], headers: Methods6['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH2}`, POST, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods6['get']['query'] }) => `${prefix}${prefix4}${PATH2}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, itemslist: { - get: (option: { query: Methods10['get']['query'], headers?: Methods10['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods10['get']['query'], headers: Methods10['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH7}`, GET, option).json(), - $get: (option: { query: Methods10['get']['query'], headers?: Methods10['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods10['get']['query'], headers: Methods10['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH7}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods10['get']['query'] }) => `${prefix}${prefix4}${PATH7}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, users: { remove: { - post: (option: { body: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH9}`, POST, option).send(), - $post: (option: { body: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH9}`, POST, option).send().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH9}` }, - get: (option?: { headers?: Methods11['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods11['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH8}`, GET, option).json(), - $get: (option?: { headers?: Methods11['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods11['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH8}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods11['post']['reqBody'], headers?: Methods11['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods11['post']['reqBody'], headers: Methods11['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH8}`, POST, option).send(), - $post: (option: { body: Methods11['post']['reqBody'], headers?: Methods11['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods11['post']['reqBody'], headers: Methods11['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH8}`, POST, option).send().then(r => r.body), - put: (option: { body: Methods11['put']['reqBody'], headers?: Methods11['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods11['put']['reqBody'], headers: Methods11['put']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH8}`, PUT, option).send(), - $put: (option: { body: Methods11['put']['reqBody'], headers?: Methods11['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods11['put']['reqBody'], headers: Methods11['put']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix4}${PATH8}`, PUT, option).send().then(r => r.body), $path: () => `${prefix}${prefix4}${PATH8}` }, - get: (option?: { headers?: Methods5['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods5['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, GET, option).json(), - $get: (option?: { headers?: Methods5['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods5['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, GET, option).json().then(r => r.body), - put: (option: { body: Methods5['put']['reqBody'], headers?: Methods5['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods5['put']['reqBody'], headers: Methods5['put']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, PUT, option).send(), - $put: (option: { body: Methods5['put']['reqBody'], headers?: Methods5['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods5['put']['reqBody'], headers: Methods5['put']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, PUT, option).send().then(r => r.body), - delete: (option?: { headers?: Methods5['delete']['reqHeaders'], config?: T }) => + delete: (option: { headers: Methods5['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, DELETE, option).send(), - $delete: (option?: { headers?: Methods5['delete']['reqHeaders'], config?: T }) => + $delete: (option: { headers: Methods5['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix4, DELETE, option).send().then(r => r.body), $path: () => `${prefix}${prefix4}` } }, - get: (option?: { headers?: Methods4['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods4['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH1}`, GET, option).json(), - $get: (option?: { headers?: Methods4['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods4['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH1}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods4['post']['reqBody'], headers?: Methods4['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods4['post']['reqBody'], headers: Methods4['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH1}`, POST, option).json(), - $post: (option: { body: Methods4['post']['reqBody'], headers?: Methods4['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods4['post']['reqBody'], headers: Methods4['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH1}`, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix3}${PATH1}` }, notifications: { - get: (option?: { query?: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH10}`, GET, option).json(), - $get: (option?: { query?: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix3}${PATH10}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods13['get']['query'] }) => `${prefix}${prefix3}${PATH10}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, - get: (option?: { query?: Methods3['get']['query'], headers?: Methods3['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods3['get']['query'], headers: Methods3['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix3, GET, option).send(), - $get: (option?: { query?: Methods3['get']['query'], headers?: Methods3['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods3['get']['query'], headers: Methods3['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix3, GET, option).send().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods3['get']['query'] }) => `${prefix}${prefix3}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` } }, - get: (option?: { query?: Methods0['get']['query'], headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods0['get']['query'], headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option?: { query?: Methods0['get']['query'], headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods0['get']['query'], headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods0['get']['query'] }) => `${prefix}${PATH0}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` diff --git a/samples/openapi/api/v3/channels/_channelId@number/chats/_chatId@number/items/_itemId@number/index.ts b/samples/openapi/api/v3/channels/_channelId@number/chats/_chatId@number/items/_itemId@number/index.ts index ff4d40f2..8f01cd61 100644 --- a/samples/openapi/api/v3/channels/_channelId@number/chats/_chatId@number/items/_itemId@number/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@number/chats/_chatId@number/items/_itemId@number/index.ts @@ -3,15 +3,15 @@ import * as Types from '../../../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader status: 200 resBody: { ok: boolean } - reqBody?: { - formattedText?: string + reqBody: { + formattedText: string } } } diff --git a/samples/openapi/api/v3/channels/_channelId@number/news-feed/index.ts b/samples/openapi/api/v3/channels/_channelId@number/news-feed/index.ts index ca4b0804..f33c1348 100644 --- a/samples/openapi/api/v3/channels/_channelId@number/news-feed/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@number/news-feed/index.ts @@ -3,13 +3,13 @@ import * as Types from '../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader - query?: { - timestamp?: number - offset?: number - limit?: number - reverse?: boolean + query: { + timestamp: number + offset: number + limit: number + reverse: boolean } status: 200 @@ -17,10 +17,10 @@ export type Methods = { resBody: { count: number data: (Types.ModelCard & { - storyId?: number + storyId: number - reactions?: Types.ReactionCountModel & { - myReaction?: Types.ReactionEnumModel + reactions: Types.ReactionCountModel & { + myReaction: Types.ReactionEnumModel } })[] } diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/index.ts index f5cb1cb7..87a663bc 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/index.ts @@ -3,55 +3,55 @@ import * as Types from '../../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { - chatId?: number - chatDescriptor?: string - channelId?: number - organisationId?: number - storyId?: number - itemId?: number + chatId: number + chatDescriptor: string + channelId: number + organisationId: number + storyId: number + itemId: number - pinnedContent?: { - pinType?: 'mix' | 'card' + pinnedContent: { + pinType: 'mix' | 'card' } - storyIdPinned?: number - type?: 'group' | 'p2p' - accessType?: 'private' | 'publicRead' | 'publicWrite' - usersCount?: number - name?: string - payload?: string - access?: 'admin' | 'banned' | 'r' | 'rw' - thumbnails?: { - image?: string - initials?: string + storyIdPinned: number + type: 'group' | 'p2p' + accessType: 'private' | 'publicRead' | 'publicWrite' + usersCount: number + name: string + payload: string + access: 'admin' | 'banned' | 'r' | 'rw' + thumbnails: { + image: string + initials: string }[] - level?: 'channel' | 'organisation' - recipientId?: number - created?: string - updated?: string + level: 'channel' | 'organisation' + recipientId: number + created: string + updated: string } } put: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 reqBody: { - name?: string - accessType?: 'private' | 'publicWrite' | 'publicRead' - payload?: string - storyId?: number - itemId?: number - level?: 'channel' | 'organisation' + name: string + accessType: 'private' | 'publicWrite' | 'publicRead' + payload: string + storyId: number + itemId: number + level: 'channel' | 'organisation' } } delete: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 } } diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/audio/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/audio/index.ts index b5a40ba0..b4b097a7 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/audio/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/audio/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.UserTokenHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.UserTokenHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/image/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/image/index.ts index 595ae602..5681502b 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/image/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/image/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/index.ts index 076597a6..fd692ff6 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/index.ts @@ -3,10 +3,10 @@ import * as Types from '../../../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader - query?: { - offset?: number + query: { + offset: number } status: 200 @@ -18,7 +18,7 @@ export type Methods = { } post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/video/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/video/index.ts index 595ae602..5681502b 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/video/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/items/video/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/itemslist/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/itemslist/index.ts index 45605c08..31cfd0ca 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/itemslist/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/itemslist/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken query: { ids: string diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/users/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/users/index.ts index 2aa36381..3ac69c80 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/users/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/users/index.ts @@ -3,32 +3,32 @@ import * as Types from '../../../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { - id?: number - email?: string - screenName?: string - access?: 'admin' | 'r' | 'rw' | 'banned' - isDeleted?: number - imageUrl?: string - initials?: string + id: number + email: string + screenName: string + access: 'admin' | 'r' | 'rw' | 'banned' + isDeleted: number + imageUrl: string + initials: string }[] } post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 201 reqBody: { - users?: number[] - bannedUsers?: number[] - self?: boolean + users: number[] + bannedUsers: number[] + self: boolean } } put: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 reqBody: { diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/users/remove/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/users/remove/index.ts index d68d2194..fbe97c4b 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/users/remove/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/_chatId@string/users/remove/index.ts @@ -3,12 +3,12 @@ import * as Types from '../../../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 reqBody: { - users?: number[] - self?: boolean + users: number[] + self: boolean } } } diff --git a/samples/openapi/api/v3/channels/_channelId@string/chats/index.ts b/samples/openapi/api/v3/channels/_channelId@string/chats/index.ts index c95b8354..359234de 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/chats/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/chats/index.ts @@ -3,77 +3,77 @@ import * as Types from '../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserPublicKey & Types.UserSignedChallenge + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserPublicKey & Types.UserSignedChallenge status: 200 resBody: { - chats?: { - access?: 'admin' | 'r' | 'w' | 'banned' - chatId?: number - chatDescriptor?: string - channelId?: number - organisationId?: number - name?: string - payload?: string - type?: 'group' | 'p2p' - accessType?: 'private' | 'publicWrite' | 'publicRead' - storyId?: number - itemId?: number - storyIdPinned?: number - storyPinnedEmpty?: boolean - usersCount?: number - publicToJoin?: boolean - thumbnails?: { - image?: string - initials?: string + chats: { + access: 'admin' | 'r' | 'w' | 'banned' + chatId: number + chatDescriptor: string + channelId: number + organisationId: number + name: string + payload: string + type: 'group' | 'p2p' + accessType: 'private' | 'publicWrite' | 'publicRead' + storyId: number + itemId: number + storyIdPinned: number + storyPinnedEmpty: boolean + usersCount: number + publicToJoin: boolean + thumbnails: { + image: string + initials: string }[] - level?: 'channel' | 'organisation' - recipientId?: number - created?: string - updated?: string + level: 'channel' | 'organisation' + recipientId: number + created: string + updated: string }[] - token?: string - publishKey?: string - subscribeKey?: string - cipherKey?: string + token: string + publishKey: string + subscribeKey: string + cipherKey: string - senderDevice?: { - ios?: string[] - android?: string[] + senderDevice: { + ios: string[] + android: string[] } } } post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 201 resBody: { - chatId?: number - chatDescriptor?: string - channelId?: number - organisationId?: number - storyId?: number - itemId?: number + chatId: number + chatDescriptor: string + channelId: number + organisationId: number + storyId: number + itemId: number - pinnedContent?: { - pinType?: 'mix' | 'card' + pinnedContent: { + pinType: 'mix' | 'card' } - type?: 'group' | 'p2p' - accessType?: 'private' | 'publicRead' | 'publicWrite' - usersCount?: number - name?: string - payload?: string - access?: 'admin' | 'banned' | 'r' | 'rw' - thumbnails?: { - image?: string - initials?: string + type: 'group' | 'p2p' + accessType: 'private' | 'publicRead' | 'publicWrite' + usersCount: number + name: string + payload: string + access: 'admin' | 'banned' | 'r' | 'rw' + thumbnails: { + image: string + initials: string }[] - level?: 'channel' | 'organisation' - recipientId?: number - created?: string - updated?: string + level: 'channel' | 'organisation' + recipientId: number + created: string + updated: string } reqBody: { diff --git a/samples/openapi/api/v3/channels/_channelId@string/index.ts b/samples/openapi/api/v3/channels/_channelId@string/index.ts index 085c5de3..4b8c3b4c 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/index.ts @@ -3,11 +3,11 @@ import * as Types from '../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader - query?: { - excludeItems?: boolean - excludePinned?: boolean + query: { + excludeItems: boolean + excludePinned: boolean } status: 200 diff --git a/samples/openapi/api/v3/channels/_channelId@string/notifications/index.ts b/samples/openapi/api/v3/channels/_channelId@string/notifications/index.ts index d538b1e8..914d296c 100644 --- a/samples/openapi/api/v3/channels/_channelId@string/notifications/index.ts +++ b/samples/openapi/api/v3/channels/_channelId@string/notifications/index.ts @@ -3,19 +3,19 @@ import * as Types from '../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken - query?: { - published?: boolean - offset?: number + query: { + published: boolean + offset: number } status: 200 resBody: { - count?: number - limit?: number - data?: { + count: number + limit: number + data: { id: number message: string title: string diff --git a/samples/openapi/api/v3/channels/index.ts b/samples/openapi/api/v3/channels/index.ts index fc0d264e..461125c8 100644 --- a/samples/openapi/api/v3/channels/index.ts +++ b/samples/openapi/api/v3/channels/index.ts @@ -3,11 +3,11 @@ import * as Types from '../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken - query?: { - unpublished?: boolean - 'read-only'?: boolean + query: { + unpublished: boolean + 'read-only': boolean } status: 200 diff --git a/samples/openapi/api/v3/chats/$api.ts b/samples/openapi/api/v3/chats/$api.ts index d85234b7..ed883c24 100644 --- a/samples/openapi/api/v3/chats/$api.ts +++ b/samples/openapi/api/v3/chats/$api.ts @@ -28,13 +28,13 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix1 = `${prefix0}${PATH1}/${val1}` return { - post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix1, POST, option).json(), - $post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix1, POST, option).json().then(r => r.body), - get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix1, GET, option).json(), - $get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix1, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix1}` } @@ -48,33 +48,33 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { items: { audio: { - post: (option?: { body?: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH2}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH2}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix2}${PATH2}` }, image: { - post: (option?: { body?: Methods3['post']['reqBody'], headers?: Methods3['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], headers: Methods3['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH3}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods3['post']['reqBody'], headers?: Methods3['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods3['post']['reqBody'], headers: Methods3['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH3}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix2}${PATH3}` }, video: { - post: (option?: { body?: Methods4['post']['reqBody'], headers?: Methods4['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods4['post']['reqBody'], headers: Methods4['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH4}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods4['post']['reqBody'], headers?: Methods4['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods4['post']['reqBody'], headers: Methods4['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH4}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix2}${PATH4}` }, - get: (option?: { query?: Methods1['get']['query'], headers?: Methods1['get']['reqHeaders'], config?: T }) => + get: (option: { query?: Methods1['get']['query'], headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH1}`, GET, option).json(), - $get: (option?: { query?: Methods1['get']['query'], headers?: Methods1['get']['reqHeaders'], config?: T }) => + $get: (option: { query?: Methods1['get']['query'], headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH1}`, GET, option).json().then(r => r.body), - post: (option: { body: Methods1['post']['reqBody'], headers?: Methods1['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods1['post']['reqBody'], headers: Methods1['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH1}`, POST, option).json(), - $post: (option: { body: Methods1['post']['reqBody'], headers?: Methods1['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods1['post']['reqBody'], headers: Methods1['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix2}${PATH1}`, POST, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods1['get']['query'] }) => `${prefix}${prefix2}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -82,9 +82,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { } }, keys: { - get: (option?: { headers?: Methods5['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods5['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH5, GET, option).json(), - $get: (option?: { headers?: Methods5['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods5['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH5, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH5}` } diff --git a/samples/openapi/api/v3/chats/_chatId@number/items/_itemId@number/index.ts b/samples/openapi/api/v3/chats/_chatId@number/items/_itemId@number/index.ts index c215dd4a..3580f841 100644 --- a/samples/openapi/api/v3/chats/_chatId@number/items/_itemId@number/index.ts +++ b/samples/openapi/api/v3/chats/_chatId@number/items/_itemId@number/index.ts @@ -3,20 +3,20 @@ import * as Types from '../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader status: 200 resBody: { ok: boolean } - reqBody?: { - formattedText?: string + reqBody: { + formattedText: string } } get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader status: 200 resBody: Types.ModelCard } diff --git a/samples/openapi/api/v3/chats/_chatId@string/items/audio/index.ts b/samples/openapi/api/v3/chats/_chatId@string/items/audio/index.ts index d01d344f..6cb31735 100644 --- a/samples/openapi/api/v3/chats/_chatId@string/items/audio/index.ts +++ b/samples/openapi/api/v3/chats/_chatId@string/items/audio/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.UserTokenHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.UserTokenHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/chats/_chatId@string/items/image/index.ts b/samples/openapi/api/v3/chats/_chatId@string/items/image/index.ts index 6925e545..755e9ae2 100644 --- a/samples/openapi/api/v3/chats/_chatId@string/items/image/index.ts +++ b/samples/openapi/api/v3/chats/_chatId@string/items/image/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/chats/_chatId@string/items/index.ts b/samples/openapi/api/v3/chats/_chatId@string/items/index.ts index b586327a..33401f9a 100644 --- a/samples/openapi/api/v3/chats/_chatId@string/items/index.ts +++ b/samples/openapi/api/v3/chats/_chatId@string/items/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader query?: { offset?: number @@ -19,7 +19,7 @@ export type Methods = { } post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { diff --git a/samples/openapi/api/v3/chats/_chatId@string/items/video/index.ts b/samples/openapi/api/v3/chats/_chatId@string/items/video/index.ts index 6925e545..755e9ae2 100644 --- a/samples/openapi/api/v3/chats/_chatId@string/items/video/index.ts +++ b/samples/openapi/api/v3/chats/_chatId@string/items/video/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/chats/keys/$api.ts b/samples/openapi/api/v3/chats/keys/$api.ts index 415faaeb..56e42d0d 100644 --- a/samples/openapi/api/v3/chats/keys/$api.ts +++ b/samples/openapi/api/v3/chats/keys/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const GET = 'GET' return { - get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/chats/keys/index.ts b/samples/openapi/api/v3/chats/keys/index.ts index ffaa2137..de4b8bb6 100644 --- a/samples/openapi/api/v3/chats/keys/index.ts +++ b/samples/openapi/api/v3/chats/keys/index.ts @@ -3,18 +3,18 @@ import * as Types from '../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserPublicKey & Types.UserSignedChallenge + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserPublicKey & Types.UserSignedChallenge status: 200 resBody: { - token?: string - publishKey?: string - subscribeKey?: string - cipherKey?: string + token: string + publishKey: string + subscribeKey: string + cipherKey: string - senderDevice?: { - ios?: string[] - android?: string[] + senderDevice: { + ios: string[] + android: string[] } } } diff --git a/samples/openapi/api/v3/extension/$api.ts b/samples/openapi/api/v3/extension/$api.ts index 2eb4ebaa..70299f76 100644 --- a/samples/openapi/api/v3/extension/$api.ts +++ b/samples/openapi/api/v3/extension/$api.ts @@ -23,23 +23,23 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { audio: { - post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH0}` }, image: { - post: (option?: { body?: Methods1['post']['reqBody'], headers?: Methods1['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods1['post']['reqBody'], headers: Methods1['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH1, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods1['post']['reqBody'], headers?: Methods1['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods1['post']['reqBody'], headers: Methods1['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH1, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH1}` }, parse: { - post: (option: { body: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH2, POST, option).json(), - $post: (option: { body: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH2, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH2}` }, @@ -49,38 +49,38 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { audio: { - post: (option?: { body?: Methods4['post']['reqBody'], headers?: Methods4['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods4['post']['reqBody'], headers: Methods4['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH4}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods4['post']['reqBody'], headers?: Methods4['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods4['post']['reqBody'], headers: Methods4['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH4}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}${PATH4}` }, image: { - post: (option?: { body?: Methods5['post']['reqBody'], headers?: Methods5['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods5['post']['reqBody'], headers: Methods5['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH5}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods5['post']['reqBody'], headers?: Methods5['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods5['post']['reqBody'], headers: Methods5['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH5}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}${PATH5}` }, video: { - post: (option?: { body?: Methods6['post']['reqBody'], headers?: Methods6['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods6['post']['reqBody'], headers: Methods6['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH6}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods6['post']['reqBody'], headers?: Methods6['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods6['post']['reqBody'], headers: Methods6['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH6}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}${PATH6}` }, - post: (option: { body: Methods3['post']['reqBody'], headers?: Methods3['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], headers: Methods3['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix0, POST, option, 'FormData').json(), - $post: (option: { body: Methods3['post']['reqBody'], headers?: Methods3['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods3['post']['reqBody'], headers: Methods3['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix0, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}` } } }, video: { - post: (option?: { body?: Methods7['post']['reqBody'], headers?: Methods7['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods7['post']['reqBody'], headers: Methods7['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH7, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods7['post']['reqBody'], headers?: Methods7['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods7['post']['reqBody'], headers: Methods7['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH7, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH7}` } diff --git a/samples/openapi/api/v3/extension/audio/$api.ts b/samples/openapi/api/v3/extension/audio/$api.ts index c81fcb22..40421788 100644 --- a/samples/openapi/api/v3/extension/audio/$api.ts +++ b/samples/openapi/api/v3/extension/audio/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/extension/audio/index.ts b/samples/openapi/api/v3/extension/audio/index.ts index 956b6dd5..6377f743 100644 --- a/samples/openapi/api/v3/extension/audio/index.ts +++ b/samples/openapi/api/v3/extension/audio/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob } } diff --git a/samples/openapi/api/v3/extension/image/$api.ts b/samples/openapi/api/v3/extension/image/$api.ts index 0b7233d3..c3407f87 100644 --- a/samples/openapi/api/v3/extension/image/$api.ts +++ b/samples/openapi/api/v3/extension/image/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/extension/image/index.ts b/samples/openapi/api/v3/extension/image/index.ts index ff1d7a43..0c433cc2 100644 --- a/samples/openapi/api/v3/extension/image/index.ts +++ b/samples/openapi/api/v3/extension/image/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -14,7 +14,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob } } diff --git a/samples/openapi/api/v3/extension/parse/$api.ts b/samples/openapi/api/v3/extension/parse/$api.ts index ecab854b..5fd8b508 100644 --- a/samples/openapi/api/v3/extension/parse/$api.ts +++ b/samples/openapi/api/v3/extension/parse/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).json(), - $post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/extension/parse/index.ts b/samples/openapi/api/v3/extension/parse/index.ts index 655271e1..d6a3fbf9 100644 --- a/samples/openapi/api/v3/extension/parse/index.ts +++ b/samples/openapi/api/v3/extension/parse/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader status: 200 resBody: { diff --git a/samples/openapi/api/v3/extension/story/$api.ts b/samples/openapi/api/v3/extension/story/$api.ts index 3c83ec08..913fbb8c 100644 --- a/samples/openapi/api/v3/extension/story/$api.ts +++ b/samples/openapi/api/v3/extension/story/$api.ts @@ -19,29 +19,29 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { audio: { - post: (option?: { body?: Methods1['post']['reqBody'], headers?: Methods1['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods1['post']['reqBody'], headers: Methods1['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods1['post']['reqBody'], headers?: Methods1['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods1['post']['reqBody'], headers: Methods1['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}${PATH1}` }, image: { - post: (option?: { body?: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH2}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH2}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}${PATH2}` }, video: { - post: (option?: { body?: Methods3['post']['reqBody'], headers?: Methods3['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], headers: Methods3['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH3}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods3['post']['reqBody'], headers?: Methods3['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods3['post']['reqBody'], headers: Methods3['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH3}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}${PATH3}` }, - post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix0, POST, option, 'FormData').json(), - $post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, prefix0, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}` } diff --git a/samples/openapi/api/v3/extension/story/_storyId@string/audio/index.ts b/samples/openapi/api/v3/extension/story/_storyId@string/audio/index.ts index 5bdab246..d6576110 100644 --- a/samples/openapi/api/v3/extension/story/_storyId@string/audio/index.ts +++ b/samples/openapi/api/v3/extension/story/_storyId@string/audio/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/extension/story/_storyId@string/image/index.ts b/samples/openapi/api/v3/extension/story/_storyId@string/image/index.ts index 2d74f8df..eccaf121 100644 --- a/samples/openapi/api/v3/extension/story/_storyId@string/image/index.ts +++ b/samples/openapi/api/v3/extension/story/_storyId@string/image/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/extension/story/_storyId@string/index.ts b/samples/openapi/api/v3/extension/story/_storyId@string/index.ts index 6f086098..58ba4db9 100644 --- a/samples/openapi/api/v3/extension/story/_storyId@string/index.ts +++ b/samples/openapi/api/v3/extension/story/_storyId@string/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { diff --git a/samples/openapi/api/v3/extension/story/_storyId@string/video/index.ts b/samples/openapi/api/v3/extension/story/_storyId@string/video/index.ts index 2d74f8df..eccaf121 100644 --- a/samples/openapi/api/v3/extension/story/_storyId@string/video/index.ts +++ b/samples/openapi/api/v3/extension/story/_storyId@string/video/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -12,7 +12,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob caption?: string headline?: string diff --git a/samples/openapi/api/v3/extension/video/$api.ts b/samples/openapi/api/v3/extension/video/$api.ts index 4275c2e8..b48e663d 100644 --- a/samples/openapi/api/v3/extension/video/$api.ts +++ b/samples/openapi/api/v3/extension/video/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/extension/video/index.ts b/samples/openapi/api/v3/extension/video/index.ts index ff1d7a43..0c433cc2 100644 --- a/samples/openapi/api/v3/extension/video/index.ts +++ b/samples/openapi/api/v3/extension/video/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: { @@ -14,7 +14,7 @@ export type Methods = { reqFormat: FormData - reqBody?: { + reqBody: { file: Blob } } diff --git a/samples/openapi/api/v3/fcm_token/$api.ts b/samples/openapi/api/v3/fcm_token/$api.ts index f99a0c1c..6d9dde32 100644 --- a/samples/openapi/api/v3/fcm_token/$api.ts +++ b/samples/openapi/api/v3/fcm_token/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).send(), - $post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).send().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/fcm_token/index.ts b/samples/openapi/api/v3/fcm_token/index.ts index 0b81ae38..873c71b5 100644 --- a/samples/openapi/api/v3/fcm_token/index.ts +++ b/samples/openapi/api/v3/fcm_token/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 204 reqBody: { diff --git a/samples/openapi/api/v3/info/$api.ts b/samples/openapi/api/v3/info/$api.ts index 577bd1b1..c0f570e9 100644 --- a/samples/openapi/api/v3/info/$api.ts +++ b/samples/openapi/api/v3/info/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const GET = 'GET' return { - get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/info/index.ts b/samples/openapi/api/v3/info/index.ts index 13bd4202..92fcf9bf 100644 --- a/samples/openapi/api/v3/info/index.ts +++ b/samples/openapi/api/v3/info/index.ts @@ -3,12 +3,12 @@ import * as Types from '../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader status: 200 resBody: { - state?: 'no_update' | 'force_update' - link?: string + state: 'no_update' | 'force_update' + link: string } } } diff --git a/samples/openapi/api/v3/login/$api.ts b/samples/openapi/api/v3/login/$api.ts index f5daccd0..2e190e93 100644 --- a/samples/openapi/api/v3/login/$api.ts +++ b/samples/openapi/api/v3/login/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).json(), - $post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/login/index.ts b/samples/openapi/api/v3/login/index.ts index 83256949..a7afbb9a 100644 --- a/samples/openapi/api/v3/login/index.ts +++ b/samples/openapi/api/v3/login/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: Types.UserInfo & { diff --git a/samples/openapi/api/v3/logout/$api.ts b/samples/openapi/api/v3/logout/$api.ts index 49a4d5e1..8e1c8812 100644 --- a/samples/openapi/api/v3/logout/$api.ts +++ b/samples/openapi/api/v3/logout/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const POST = 'POST' return { - post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).send(), - $post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, POST, option).send().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/logout/index.ts b/samples/openapi/api/v3/logout/index.ts index a96793d7..9cf5e3be 100644 --- a/samples/openapi/api/v3/logout/index.ts +++ b/samples/openapi/api/v3/logout/index.ts @@ -3,12 +3,12 @@ import * as Types from '../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 204 reqBody: { - fcmToken?: string - deviceToken?: string + fcmToken: string + deviceToken: string } } } diff --git a/samples/openapi/api/v3/me/$api.ts b/samples/openapi/api/v3/me/$api.ts index 058ee247..28eb51fa 100644 --- a/samples/openapi/api/v3/me/$api.ts +++ b/samples/openapi/api/v3/me/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const GET = 'GET' return { - get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/me/index.ts b/samples/openapi/api/v3/me/index.ts index 4496b10b..f5f97a9c 100644 --- a/samples/openapi/api/v3/me/index.ts +++ b/samples/openapi/api/v3/me/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: Types.UserInfo & { diff --git a/samples/openapi/api/v3/organisation/$api.ts b/samples/openapi/api/v3/organisation/$api.ts index 8979ca04..69cbd6ff 100644 --- a/samples/openapi/api/v3/organisation/$api.ts +++ b/samples/openapi/api/v3/organisation/$api.ts @@ -11,16 +11,16 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { users: { - get: (option: { query: Methods1['get']['query'], headers?: Methods1['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods1['get']['query'], headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH1, GET, option).json(), - $get: (option: { query: Methods1['get']['query'], headers?: Methods1['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods1['get']['query'], headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH1, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods1['get']['query'] }) => `${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` }, - get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/organisation/index.ts b/samples/openapi/api/v3/organisation/index.ts index aa77153b..40dff429 100644 --- a/samples/openapi/api/v3/organisation/index.ts +++ b/samples/openapi/api/v3/organisation/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationTokenRequired + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationTokenRequired status: 200 resBody: Types.OrganisationModel } diff --git a/samples/openapi/api/v3/organisation/users/$api.ts b/samples/openapi/api/v3/organisation/users/$api.ts index c4c485ea..f42a6ff4 100644 --- a/samples/openapi/api/v3/organisation/users/$api.ts +++ b/samples/openapi/api/v3/organisation/users/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const GET = 'GET' return { - get: (option: { query: Methods0['get']['query'], headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods0['get']['query'], headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option: { query: Methods0['get']['query'], headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods0['get']['query'], headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods0['get']['query'] }) => `${prefix}${PATH0}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` diff --git a/samples/openapi/api/v3/organisation/users/index.ts b/samples/openapi/api/v3/organisation/users/index.ts index 0357a946..26eeecf1 100644 --- a/samples/openapi/api/v3/organisation/users/index.ts +++ b/samples/openapi/api/v3/organisation/users/index.ts @@ -3,11 +3,11 @@ import * as Types from '../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationTokenRequired + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationTokenRequired query: { search: string - offset?: number + offset: number } status: 200 diff --git a/samples/openapi/api/v3/stories/$api.ts b/samples/openapi/api/v3/stories/$api.ts index 2e59cce8..c3b4c519 100644 --- a/samples/openapi/api/v3/stories/$api.ts +++ b/samples/openapi/api/v3/stories/$api.ts @@ -23,22 +23,22 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { reaction: { - post: (option: { body: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix1}${PATH2}`, POST, option).json(), - $post: (option: { body: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) => + $post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix1}${PATH2}`, POST, option).json().then(r => r.body), $path: () => `${prefix}${prefix1}${PATH2}` }, - get: (option?: { headers?: Methods1['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix1, GET, option).json(), - $get: (option?: { headers?: Methods1['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix1, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix1}` } }, - get: (option?: { query?: Methods0['get']['query'], headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { query: Methods0['get']['query'], headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, GET, option).json(), - $get: (option?: { query?: Methods0['get']['query'], headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { query: Methods0['get']['query'], headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, GET, option).json().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods0['get']['query'] }) => `${prefix}${prefix0}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` diff --git a/samples/openapi/api/v3/stories/_storyId@number/items/_itemId@number/index.ts b/samples/openapi/api/v3/stories/_storyId@number/items/_itemId@number/index.ts index fa4b813f..455770a8 100644 --- a/samples/openapi/api/v3/stories/_storyId@number/items/_itemId@number/index.ts +++ b/samples/openapi/api/v3/stories/_storyId@number/items/_itemId@number/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader status: 200 resBody: Types.ModelCard } diff --git a/samples/openapi/api/v3/stories/_storyId@number/items/_itemId@number/reaction/index.ts b/samples/openapi/api/v3/stories/_storyId@number/items/_itemId@number/reaction/index.ts index f877b0db..77ae9c05 100644 --- a/samples/openapi/api/v3/stories/_storyId@number/items/_itemId@number/reaction/index.ts +++ b/samples/openapi/api/v3/stories/_storyId@number/items/_itemId@number/reaction/index.ts @@ -3,18 +3,18 @@ import * as Types from '../../../../../../../@types' export type Methods = { post: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader status: 200 resBody: { - action?: 'add' | 'remove' | 'replace' + action: 'add' | 'remove' | 'replace' - reactions?: Types.ReactionCountModel & { - myReaction?: Types.ReactionEnumModel + reactions: Types.ReactionCountModel & { + myReaction: Types.ReactionEnumModel } - previousStatus?: Types.ReactionEnumModel - userType?: 'anonymous' | 'unique' + previousStatus: Types.ReactionEnumModel + userType: 'anonymous' | 'unique' } reqBody: { diff --git a/samples/openapi/api/v3/stories/_storyId@number/items/index.ts b/samples/openapi/api/v3/stories/_storyId@number/items/index.ts index 4b51dec4..e4ad492e 100644 --- a/samples/openapi/api/v3/stories/_storyId@number/items/index.ts +++ b/samples/openapi/api/v3/stories/_storyId@number/items/index.ts @@ -3,10 +3,10 @@ import * as Types from '../../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken & Types.UserInstanceIdHeader - query?: { - offset?: number + query: { + offset: number } status: 200 diff --git a/samples/openapi/api/v3/user/$api.ts b/samples/openapi/api/v3/user/$api.ts index 0d7eec57..1031a147 100644 --- a/samples/openapi/api/v3/user/$api.ts +++ b/samples/openapi/api/v3/user/$api.ts @@ -16,23 +16,23 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const prefix0 = `${PATH0}/${val0}` return { - get: (option?: { headers?: Methods1['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix0, GET, option).json(), - $get: (option?: { headers?: Methods1['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods1['get']['reqHeaders'], config?: T }) => fetch(prefix, prefix0, GET, option).json().then(r => r.body), $path: () => `${prefix}${prefix0}` } }, profile: { - put: (option?: { body?: Methods2['put']['reqBody'], headers?: Methods2['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods2['put']['reqBody'], headers: Methods2['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH1, PUT, option, 'FormData').send(), - $put: (option?: { body?: Methods2['put']['reqBody'], headers?: Methods2['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods2['put']['reqBody'], headers: Methods2['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH1, PUT, option, 'FormData').send().then(r => r.body), $path: () => `${prefix}${PATH1}` }, - get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json(), - $get: (option?: { headers?: Methods0['get']['reqHeaders'], config?: T }) => + $get: (option: { headers: Methods0['get']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, GET, option).json().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/user/_userId@string/index.ts b/samples/openapi/api/v3/user/_userId@string/index.ts index e0e4d742..73199a93 100644 --- a/samples/openapi/api/v3/user/_userId@string/index.ts +++ b/samples/openapi/api/v3/user/_userId@string/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: Types.UserInfo } diff --git a/samples/openapi/api/v3/user/index.ts b/samples/openapi/api/v3/user/index.ts index 883fc4b0..c0e8f0eb 100644 --- a/samples/openapi/api/v3/user/index.ts +++ b/samples/openapi/api/v3/user/index.ts @@ -3,7 +3,7 @@ import * as Types from '../../../@types' export type Methods = { get: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader & Types.AppOrganisationToken status: 200 resBody: Types.UserInfo[] } diff --git a/samples/openapi/api/v3/user/profile/$api.ts b/samples/openapi/api/v3/user/profile/$api.ts index f63e1b26..6fcf5fd6 100644 --- a/samples/openapi/api/v3/user/profile/$api.ts +++ b/samples/openapi/api/v3/user/profile/$api.ts @@ -8,9 +8,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { const PUT = 'PUT' return { - put: (option?: { body?: Methods0['put']['reqBody'], headers?: Methods0['put']['reqHeaders'], config?: T }) => + put: (option: { body: Methods0['put']['reqBody'], headers: Methods0['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, PUT, option, 'FormData').send(), - $put: (option?: { body?: Methods0['put']['reqBody'], headers?: Methods0['put']['reqHeaders'], config?: T }) => + $put: (option: { body: Methods0['put']['reqBody'], headers: Methods0['put']['reqHeaders'], config?: T }) => fetch(prefix, PATH0, PUT, option, 'FormData').send().then(r => r.body), $path: () => `${prefix}${PATH0}` } diff --git a/samples/openapi/api/v3/user/profile/index.ts b/samples/openapi/api/v3/user/profile/index.ts index 84b7b9d3..746d80cd 100644 --- a/samples/openapi/api/v3/user/profile/index.ts +++ b/samples/openapi/api/v3/user/profile/index.ts @@ -3,15 +3,15 @@ import * as Types from '../../../../@types' export type Methods = { put: { - reqHeaders?: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader + reqHeaders: Types.AppIdHeader & Types.AppPlatformHeader & Types.AppVersionHeader status: 204 reqFormat: FormData - reqBody?: { - screenName?: string - url?: string - image?: Blob - imageId?: string + reqBody: { + screenName: string + url: string + image: Blob + imageId: string } } } diff --git a/samples/rimraf.js b/samples/rimraf.js index 1efb0ee0..1d6aee7c 100644 --- a/samples/rimraf.js +++ b/samples/rimraf.js @@ -1,7 +1,7 @@ // for $ npm run dev:openapi require('fs') .readdirSync(__dirname) - .filter(n => require('fs').statSync(`${__dirname}/${n}`).isDirectory()) + .filter(n => require('fs').statSync(`${__dirname}/${n}`).isDirectory() && n !== 'docs.baikalplatform.com') .forEach(n => require('fs').rmdir(`${__dirname}/${n}`, { recursive: true }, err => { if (err) console.log(err) diff --git a/samples/simple/$api.ts b/samples/simple/$api.ts index 09abdd6a..c3c4e7c1 100644 --- a/samples/simple/$api.ts +++ b/samples/simple/$api.ts @@ -39,9 +39,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { $path: () => `${prefix}${prefix0}${PATH1}` }, query: { - put: (option?: { query?: Methods1['put']['query'], config?: T }) => + put: (option: { query: Methods1['put']['query'], config?: T }) => fetch(prefix, `${prefix0}${PATH2}`, PUT, option).send(), - $put: (option?: { query?: Methods1['put']['query'], config?: T }) => + $put: (option: { query: Methods1['put']['query'], config?: T }) => fetch(prefix, `${prefix0}${PATH2}`, PUT, option).send().then(r => r.body), $path: (option?: { method: 'put'; query: Methods1['put']['query'] }) => `${prefix}${prefix0}${PATH2}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -62,9 +62,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { upload: { - post: (option?: { body?: Methods3['post']['reqBody'], query?: Methods3['post']['query'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], query: Methods3['post']['query'], config?: T }) => fetch(prefix, `${prefix1}${PATH5}`, POST, option, 'Blob').send(), - $post: (option?: { body?: Methods3['post']['reqBody'], query?: Methods3['post']['query'], config?: T }) => + $post: (option: { body: Methods3['post']['reqBody'], query: Methods3['post']['query'], config?: T }) => fetch(prefix, `${prefix1}${PATH5}`, POST, option, 'Blob').send().then(r => r.body), $path: (option?: { method: 'post'; query: Methods3['post']['query'] }) => `${prefix}${prefix1}${PATH5}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` @@ -78,9 +78,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { abc: { - get: (option?: { query?: Methods5['get']['query'], config?: T }) => + get: (option: { query: Methods5['get']['query'], config?: T }) => fetch(prefix, `${prefix2}${PATH7}`, GET, option).send(), - $get: (option?: { query?: Methods5['get']['query'], config?: T }) => + $get: (option: { query: Methods5['get']['query'], config?: T }) => fetch(prefix, `${prefix2}${PATH7}`, GET, option).send().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods5['get']['query'] }) => `${prefix}${prefix2}${PATH7}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` diff --git a/samples/simple/@types.ts b/samples/simple/@types.ts index cf7349f1..684f5f8e 100644 --- a/samples/simple/@types.ts +++ b/samples/simple/@types.ts @@ -1,6 +1,6 @@ /* eslint-disable */ export type Customer = { - id?: number - name?: string - pet?: 1 | 2 | 3 + id: number + name: string + pet: 1 | 2 | 3 } diff --git a/samples/simple/dummy/$api.ts b/samples/simple/dummy/$api.ts index 185e5139..403ec582 100644 --- a/samples/simple/dummy/$api.ts +++ b/samples/simple/dummy/$api.ts @@ -25,9 +25,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { $path: () => `${prefix}${prefix0}${PATH1}` }, query: { - put: (option?: { query?: Methods1['put']['query'], config?: T }) => + put: (option: { query: Methods1['put']['query'], config?: T }) => fetch(prefix, `${prefix0}${PATH2}`, PUT, option).send(), - $put: (option?: { query?: Methods1['put']['query'], config?: T }) => + $put: (option: { query: Methods1['put']['query'], config?: T }) => fetch(prefix, `${prefix0}${PATH2}`, PUT, option).send().then(r => r.body), $path: (option?: { method: 'put'; query: Methods1['put']['query'] }) => `${prefix}${prefix0}${PATH2}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` diff --git a/samples/simple/dummy/_id@number/query/index.ts b/samples/simple/dummy/_id@number/query/index.ts index be063728..da62451d 100644 --- a/samples/simple/dummy/_id@number/query/index.ts +++ b/samples/simple/dummy/_id@number/query/index.ts @@ -1,8 +1,8 @@ /* eslint-disable */ export type Methods = { put: { - query?: { - q?: string + query: { + q: string } status: 202 diff --git a/samples/simple/file/$api.ts b/samples/simple/file/$api.ts index 7f67d81f..6413dce7 100644 --- a/samples/simple/file/$api.ts +++ b/samples/simple/file/$api.ts @@ -14,9 +14,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { upload: { - post: (option?: { body?: Methods0['post']['reqBody'], query?: Methods0['post']['query'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], query: Methods0['post']['query'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, POST, option, 'Blob').send(), - $post: (option?: { body?: Methods0['post']['reqBody'], query?: Methods0['post']['query'], config?: T }) => + $post: (option: { body: Methods0['post']['reqBody'], query: Methods0['post']['query'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, POST, option, 'Blob').send().then(r => r.body), $path: (option?: { method: 'post'; query: Methods0['post']['query'] }) => `${prefix}${prefix0}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` diff --git a/samples/simple/file/_id@number/upload/index.ts b/samples/simple/file/_id@number/upload/index.ts index 81cda0be..15588a67 100644 --- a/samples/simple/file/_id@number/upload/index.ts +++ b/samples/simple/file/_id@number/upload/index.ts @@ -1,11 +1,11 @@ /* eslint-disable */ export type Methods = { post: { - query?: { - path?: string + query: { + path: string } status: 204 - reqBody?: Blob + reqBody: Blob } } diff --git a/samples/simple/user/$api.ts b/samples/simple/user/$api.ts index 5e5a5c88..aa241021 100644 --- a/samples/simple/user/$api.ts +++ b/samples/simple/user/$api.ts @@ -20,9 +20,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { abc: { - get: (option?: { query?: Methods1['get']['query'], config?: T }) => + get: (option: { query: Methods1['get']['query'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, GET, option).send(), - $get: (option?: { query?: Methods1['get']['query'], config?: T }) => + $get: (option: { query: Methods1['get']['query'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, GET, option).send().then(r => r.body), $path: (option?: { method?: 'get'; query: Methods1['get']['query'] }) => `${prefix}${prefix0}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}` diff --git a/samples/simple/user/_id@number/abc/index.ts b/samples/simple/user/_id@number/abc/index.ts index bfae934b..e974c178 100644 --- a/samples/simple/user/_id@number/abc/index.ts +++ b/samples/simple/user/_id@number/abc/index.ts @@ -1,8 +1,8 @@ /* eslint-disable */ export type Methods = { get: { - query?: { - q?: string + query: { + q: string } status: 202 diff --git a/samples/strapi/auth/_provider@string/callback/index.ts b/samples/strapi/auth/_provider@string/callback/index.ts index 5caad4a2..e4461e66 100644 --- a/samples/strapi/auth/_provider@string/callback/index.ts +++ b/samples/strapi/auth/_provider@string/callback/index.ts @@ -4,7 +4,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/auth/email-confirmation/index.ts b/samples/strapi/auth/email-confirmation/index.ts index 5caad4a2..e4461e66 100644 --- a/samples/strapi/auth/email-confirmation/index.ts +++ b/samples/strapi/auth/email-confirmation/index.ts @@ -4,7 +4,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/auth/forgot-password/index.ts b/samples/strapi/auth/forgot-password/index.ts index b313451f..1b0f7c61 100644 --- a/samples/strapi/auth/forgot-password/index.ts +++ b/samples/strapi/auth/forgot-password/index.ts @@ -4,11 +4,11 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } reqBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/auth/local/index.ts b/samples/strapi/auth/local/index.ts index b313451f..1b0f7c61 100644 --- a/samples/strapi/auth/local/index.ts +++ b/samples/strapi/auth/local/index.ts @@ -4,11 +4,11 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } reqBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/auth/reset-password/index.ts b/samples/strapi/auth/reset-password/index.ts index b313451f..1b0f7c61 100644 --- a/samples/strapi/auth/reset-password/index.ts +++ b/samples/strapi/auth/reset-password/index.ts @@ -4,11 +4,11 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } reqBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/auth/send-email-confirmation/index.ts b/samples/strapi/auth/send-email-confirmation/index.ts index b313451f..1b0f7c61 100644 --- a/samples/strapi/auth/send-email-confirmation/index.ts +++ b/samples/strapi/auth/send-email-confirmation/index.ts @@ -4,11 +4,11 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } reqBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/connect/_any/index.ts b/samples/strapi/connect/_any/index.ts index 5caad4a2..e4461e66 100644 --- a/samples/strapi/connect/_any/index.ts +++ b/samples/strapi/connect/_any/index.ts @@ -4,7 +4,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/email/index.ts b/samples/strapi/email/index.ts index b313451f..1b0f7c61 100644 --- a/samples/strapi/email/index.ts +++ b/samples/strapi/email/index.ts @@ -4,11 +4,11 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } reqBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/upload/files/_id@string/index.ts b/samples/strapi/upload/files/_id@string/index.ts index 1a6a81c4..8ce7a1af 100644 --- a/samples/strapi/upload/files/_id@string/index.ts +++ b/samples/strapi/upload/files/_id@string/index.ts @@ -4,7 +4,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } @@ -12,7 +12,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/upload/files/count/index.ts b/samples/strapi/upload/files/count/index.ts index 5caad4a2..e4461e66 100644 --- a/samples/strapi/upload/files/count/index.ts +++ b/samples/strapi/upload/files/count/index.ts @@ -4,7 +4,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/upload/files/index.ts b/samples/strapi/upload/files/index.ts index 5caad4a2..e4461e66 100644 --- a/samples/strapi/upload/files/index.ts +++ b/samples/strapi/upload/files/index.ts @@ -4,7 +4,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/upload/index.ts b/samples/strapi/upload/index.ts index b313451f..1b0f7c61 100644 --- a/samples/strapi/upload/index.ts +++ b/samples/strapi/upload/index.ts @@ -4,11 +4,11 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } reqBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/upload/search/_id@string/index.ts b/samples/strapi/upload/search/_id@string/index.ts index 5caad4a2..e4461e66 100644 --- a/samples/strapi/upload/search/_id@string/index.ts +++ b/samples/strapi/upload/search/_id@string/index.ts @@ -4,7 +4,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/users-permissions/init/index.ts b/samples/strapi/users-permissions/init/index.ts index 5caad4a2..e4461e66 100644 --- a/samples/strapi/users-permissions/init/index.ts +++ b/samples/strapi/users-permissions/init/index.ts @@ -4,7 +4,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/users-permissions/roles/_role@string/index.ts b/samples/strapi/users-permissions/roles/_role@string/index.ts index 950d6c5d..1f01528e 100644 --- a/samples/strapi/users-permissions/roles/_role@string/index.ts +++ b/samples/strapi/users-permissions/roles/_role@string/index.ts @@ -12,7 +12,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/strapi/users/_id@string/index.ts b/samples/strapi/users/_id@string/index.ts index 82fa2e54..bc673ca0 100644 --- a/samples/strapi/users/_id@string/index.ts +++ b/samples/strapi/users/_id@string/index.ts @@ -17,7 +17,7 @@ export type Methods = { status: 200 resBody: { - foo?: string + foo: string } } } diff --git a/samples/swagger/$api.ts b/samples/swagger/$api.ts index b71bab10..54c64d71 100644 --- a/samples/swagger/$api.ts +++ b/samples/swagger/$api.ts @@ -36,9 +36,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { uploadImage: { - post: (option?: { body?: Methods2['post']['reqBody'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods2['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods2['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}${PATH1}` }, @@ -46,9 +46,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { fetch(prefix, prefix0, GET, option).json(), $get: (option?: { config?: T }) => fetch(prefix, prefix0, GET, option).json().then(r => r.body), - post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + post: (option: { body: Methods1['post']['reqBody'], config?: T }) => fetch(prefix, prefix0, POST, option, 'URLSearchParams').send(), - $post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods1['post']['reqBody'], config?: T }) => fetch(prefix, prefix0, POST, option, 'URLSearchParams').send().then(r => r.body), delete: (option?: { headers?: Methods1['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix0, DELETE, option).send(), diff --git a/samples/swagger/@types.ts b/samples/swagger/@types.ts index 7732a667..bd0fcd2a 100644 --- a/samples/swagger/@types.ts +++ b/samples/swagger/@types.ts @@ -1,7 +1,7 @@ /* eslint-disable */ export type Category = { - id?: number - name?: string + id: number + name: string } export type Pet = { @@ -14,32 +14,32 @@ export type Pet = { } export type Tag = { - id?: number - name?: string + id: number + name: string } export type ApiResponse = { - code?: number - type?: string - message?: string + code: number + type: string + message: string } export type Order = { - id?: number - petId?: number - quantity?: number - shipDate?: string - status?: 'placed' | 'approved' | 'delivered' - complete?: boolean + id: number + petId: number + quantity: number + shipDate: string + status: 'placed' | 'approved' | 'delivered' + complete: boolean } export type User = { - id?: number - username?: string - firstName?: string - lastName?: string - email?: string - password?: string - phone?: string - userStatus?: number + id: number + username: string + firstName: string + lastName: string + email: string + password: string + phone: string + userStatus: number } diff --git a/samples/swagger/pet/$api.ts b/samples/swagger/pet/$api.ts index 0f2e21e8..21d252c0 100644 --- a/samples/swagger/pet/$api.ts +++ b/samples/swagger/pet/$api.ts @@ -21,9 +21,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { return { uploadImage: { - post: (option?: { body?: Methods2['post']['reqBody'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, POST, option, 'FormData').json(), - $post: (option?: { body?: Methods2['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods2['post']['reqBody'], config?: T }) => fetch(prefix, `${prefix0}${PATH1}`, POST, option, 'FormData').json().then(r => r.body), $path: () => `${prefix}${prefix0}${PATH1}` }, @@ -31,9 +31,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => { fetch(prefix, prefix0, GET, option).json(), $get: (option?: { config?: T }) => fetch(prefix, prefix0, GET, option).json().then(r => r.body), - post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + post: (option: { body: Methods1['post']['reqBody'], config?: T }) => fetch(prefix, prefix0, POST, option, 'URLSearchParams').send(), - $post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + $post: (option: { body: Methods1['post']['reqBody'], config?: T }) => fetch(prefix, prefix0, POST, option, 'URLSearchParams').send().then(r => r.body), delete: (option?: { headers?: Methods1['delete']['reqHeaders'], config?: T }) => fetch(prefix, prefix0, DELETE, option).send(), diff --git a/samples/swagger/pet/_petId@number/index.ts b/samples/swagger/pet/_petId@number/index.ts index 7e1a4a26..673e7885 100644 --- a/samples/swagger/pet/_petId@number/index.ts +++ b/samples/swagger/pet/_petId@number/index.ts @@ -10,9 +10,9 @@ export type Methods = { post: { reqFormat: URLSearchParams - reqBody?: { - name?: string - status?: string + reqBody: { + name: string + status: string } } diff --git a/samples/swagger/pet/_petId@number/uploadImage/index.ts b/samples/swagger/pet/_petId@number/uploadImage/index.ts index e31b1aef..bab31486 100644 --- a/samples/swagger/pet/_petId@number/uploadImage/index.ts +++ b/samples/swagger/pet/_petId@number/uploadImage/index.ts @@ -7,9 +7,9 @@ export type Methods = { resBody: Types.ApiResponse reqFormat: FormData - reqBody?: { - additionalMetadata?: string - file?: Blob + reqBody: { + additionalMetadata: string + file: Blob } } } diff --git a/src/buildV3.ts b/src/buildV3.ts index c5b8affd..3786c72d 100644 --- a/src/buildV3.ts +++ b/src/buildV3.ts @@ -61,7 +61,8 @@ export default (openapi: OpenAPIV3.Document) => { const reqHeaders: Prop[] = [] const refQuery: PropValue[] = [] const query: Prop[] = [] - let queryRequired = false + let headerRequired = true + let queryRequired = true ;[...(openapi.paths[path].parameters || []), ...(target.parameters || [])].forEach( p => { @@ -72,10 +73,11 @@ export default (openapi: OpenAPIV3.Document) => { switch (ref.in) { case 'header': reqRefHeaders.push(val) + headerRequired = ref.required ?? true break case 'query': refQuery.push(val) - if (ref.required) queryRequired = true + queryRequired = ref.required ?? true break default: break @@ -86,17 +88,18 @@ export default (openapi: OpenAPIV3.Document) => { const prop = { name: getPropertyName(p.name), - required: !!p.required, + required: p.required ?? true, values: [value] } switch (p.in) { case 'header': reqHeaders.push(prop) + headerRequired = p.required ?? true break case 'query': query.push(prop) - if (p.required) queryRequired = true + queryRequired = p.required ?? true break default: break @@ -108,7 +111,7 @@ export default (openapi: OpenAPIV3.Document) => { if (reqHeaders.length || reqRefHeaders.length) { params.push({ name: 'reqHeaders', - required: false, + required: headerRequired, values: [ ...reqRefHeaders, ...(reqHeaders.length @@ -174,7 +177,9 @@ export default (openapi: OpenAPIV3.Document) => { return ( val && { name: getPropertyName(header), - required: true, + required: isRefObject(headerData) + ? true + : headerData.required ?? true, values: [val] } ) @@ -190,7 +195,7 @@ export default (openapi: OpenAPIV3.Document) => { if (target.requestBody) { let reqFormat = '' let reqBody: PropValue | null = null - let required = false + let required = true if (isRefObject(target.requestBody)) { const ref = resolveReqRef(openapi, target.requestBody.$ref) @@ -205,7 +210,7 @@ export default (openapi: OpenAPIV3.Document) => { isEnum: false, value: $ref2Type(target.requestBody.$ref) } - required = !!ref.required + required = ref.required ?? true } else { const typeSet = [ ['multipart/form-data', 'FormData'], @@ -218,7 +223,7 @@ export default (openapi: OpenAPIV3.Document) => { if (target.requestBody.content[typeSet[i][0]]?.schema) { reqFormat = typeSet[i][1] reqBody = schema2value(target.requestBody.content[typeSet[i][0]].schema!) - required = !!target.requestBody.required + required = target.requestBody.required ?? true break } diff --git a/src/builderUtils/converters.ts b/src/builderUtils/converters.ts index 00440d4d..cb5e7081 100644 --- a/src/builderUtils/converters.ts +++ b/src/builderUtils/converters.ts @@ -58,7 +58,7 @@ const object2value = (obj: OpenAPIV3.NonArraySchemaObject): Prop[] => { return { name: getPropertyName(name), - required: !!obj.required?.includes(name), + required: obj.required?.includes(name) ?? true, values: [val] } }) diff --git a/src/builderUtils/parameters2Props.ts b/src/builderUtils/parameters2Props.ts index f8c2f221..184cdddd 100644 --- a/src/builderUtils/parameters2Props.ts +++ b/src/builderUtils/parameters2Props.ts @@ -25,7 +25,7 @@ export default (params: OpenAPIV3.ComponentsObject['parameters'], openapi: OpenA props = [ { name: getPropertyName(target.name), - required: !!target.required, + required: target.required ?? true, values: [value] } ] diff --git a/yarn.lock b/yarn.lock index 8d75226f..4a685479 100644 --- a/yarn.lock +++ b/yarn.lock @@ -398,13 +398,6 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/create-cache-key-function@^26.5.0": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-26.6.2.tgz#04cf439207a4fd12418d8aee551cddc86f9ac5f5" - integrity sha512-LgEuqU1f/7WEIPYqwLPIvvHuc1sB6gMVbT6zWhin3txYUNYK/kGQrC1F2WR4gR34YlI9bBtViTm5z98RqVZAaw== - dependencies: - "@jest/types" "^26.6.2" - "@jest/environment@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" @@ -706,6 +699,11 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= +"@types/minimist@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" + integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== + "@types/node@*": version "14.0.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.5.tgz#3d03acd3b3414cf67faf999aed11682ed121f22b" @@ -738,20 +736,32 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.6.1.tgz#99d77eb7a016fd5a5e749d2c44a7e4c317eb7da3" - integrity sha512-SNZyflefTMK2JyrPfFFzzoy2asLmZvZJ6+/L5cIqg4HfKGiW2Gr1Go1OyEVqne/U4QwmoasuMwppoBHWBWF2nA== +"@typescript-eslint/eslint-plugin@^4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.7.0.tgz#85c9bbda00c0cb604d3c241f7bc7fb171a2d3479" + integrity sha512-li9aiSVBBd7kU5VlQlT1AqP0uWGDK6JYKUQ9cVDnOg34VNnd9t4jr0Yqc/bKxJr/tDCPDaB4KzoSFN9fgVxe/Q== dependencies: - "@typescript-eslint/experimental-utils" "4.6.1" - "@typescript-eslint/scope-manager" "4.6.1" + "@typescript-eslint/experimental-utils" "4.7.0" + "@typescript-eslint/scope-manager" "4.7.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.6.1", "@typescript-eslint/experimental-utils@^4.0.1": +"@typescript-eslint/experimental-utils@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.7.0.tgz#8d1058c38bec3d3bbd9c898a1c32318d80faf3c5" + integrity sha512-cymzovXAiD4EF+YoHAB5Oh02MpnXjvyaOb+v+BdpY7lsJXZQN34oIETeUwVT2XfV9rSNpXaIcknDLfupO/tUoA== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/scope-manager" "4.7.0" + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/typescript-estree" "4.7.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + +"@typescript-eslint/experimental-utils@^4.0.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.6.1.tgz#a9c691dfd530a9570274fe68907c24c07a06c4aa" integrity sha512-qyPqCFWlHZXkEBoV56UxHSoXW2qnTr4JrWVXOh3soBP3q0o7p4pUEMfInDwIa0dB/ypdtm7gLOS0hg0a73ijfg== @@ -763,14 +773,14 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.1.tgz#b801bff67b536ecc4a840ac9289ba2be57e02428" - integrity sha512-lScKRPt1wM9UwyKkGKyQDqf0bh6jm8DQ5iN37urRIXDm16GEv+HGEmum2Fc423xlk5NUOkOpfTnKZc/tqKZkDQ== +"@typescript-eslint/parser@^4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.7.0.tgz#44bdab0f788b478178368baa65d3365fdc63da1c" + integrity sha512-+meGV8bMP1sJHBI2AFq1GeTwofcGiur8LoIr6v+rEmD9knyCqDlrQcFHR0KDDfldHIFDU/enZ53fla6ReF4wRw== dependencies: - "@typescript-eslint/scope-manager" "4.6.1" - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/typescript-estree" "4.6.1" + "@typescript-eslint/scope-manager" "4.7.0" + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/typescript-estree" "4.7.0" debug "^4.1.1" "@typescript-eslint/scope-manager@4.6.1": @@ -781,11 +791,24 @@ "@typescript-eslint/types" "4.6.1" "@typescript-eslint/visitor-keys" "4.6.1" +"@typescript-eslint/scope-manager@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.7.0.tgz#2115526085fb72723ccdc1eeae75dec7126220ed" + integrity sha512-ILITvqwDJYbcDCROj6+Ob0oCKNg3SH46iWcNcTIT9B5aiVssoTYkhKjxOMNzR1F7WSJkik4zmuqve5MdnA0DyA== + dependencies: + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/visitor-keys" "4.7.0" + "@typescript-eslint/types@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.1.tgz#d3ad7478f53f22e7339dc006ab61aac131231552" integrity sha512-k2ZCHhJ96YZyPIsykickez+OMHkz06xppVLfJ+DY90i532/Cx2Z+HiRMH8YZQo7a4zVd/TwNBuRCdXlGK4yo8w== +"@typescript-eslint/types@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" + integrity sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg== + "@typescript-eslint/typescript-estree@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.1.tgz#6025cce724329413f57e4959b2d676fceeca246f" @@ -800,6 +823,20 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.7.0.tgz#539531167f05ba20eb0b6785567076679e29d393" + integrity sha512-5XZRQznD1MfUmxu1t8/j2Af4OxbA7EFU2rbo0No7meb46eHgGkSieFdfV6omiC/DGIBhH9H9gXn7okBbVOm8jw== + dependencies: + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/visitor-keys" "4.7.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.1.tgz#6b125883402d8939df7b54528d879e88f7ba3614" @@ -808,6 +845,14 @@ "@typescript-eslint/types" "4.6.1" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.7.0.tgz#6783824f22acfc49e754970ed21b88ac03b80e6f" + integrity sha512-aDJDWuCRsf1lXOtignlfiPODkzSxxop7D0rZ91L6ZuMlcMCSh0YyK+gAfo5zN/ih6WxMwhoXgJWC3cWQdaKC+A== + dependencies: + "@typescript-eslint/types" "4.7.0" + eslint-visitor-keys "^2.0.0" + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2020,10 +2065,10 @@ eslint-plugin-promise@^4.2.1: resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== -eslint-plugin-standard@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz#021211a9f077e63a6847e7bb9ab4247327ac8e0c" - integrity sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA== +eslint-plugin-standard@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" + integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== eslint-scope@^5.0.0: version "5.1.0" @@ -2058,10 +2103,10 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.12.1: - version "7.12.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.1.tgz#bd9a81fa67a6cfd51656cdb88812ce49ccec5801" - integrity sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg== +eslint@^7.13.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.13.0.tgz#7f180126c0dcdef327bfb54b211d7802decc08da" + integrity sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ== dependencies: "@babel/code-frame" "^7.0.0" "@eslint/eslintrc" "^0.2.1" @@ -5587,12 +5632,11 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -ts-jest@^26.4.3: - version "26.4.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.3.tgz#d153a616033e7ec8544b97ddbe2638cbe38d53db" - integrity sha512-pFDkOKFGY+nL9v5pkhm+BIFpoAuno96ff7GMnIYr/3L6slFOS365SI0fGEVYx2RKGji5M2elxhWjDMPVcOCdSw== +ts-jest@^26.4.4: + version "26.4.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.4.tgz#61f13fb21ab400853c532270e52cc0ed7e502c49" + integrity sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg== dependencies: - "@jest/create-cache-key-function" "^26.5.0" "@types/jest" "26.x" bs-logger "0.x" buffer-from "1.x"